diff options
author | Frederic Culot <calcurse@culot.org> | 2007-07-28 13:11:42 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2007-07-28 13:11:42 +0000 |
commit | 4b987f70ac463121f9791eb3493952a77aba495f (patch) | |
tree | 2754295b8dd40b6818ddd80d97a327329de854c0 /src/help.c | |
parent | fdc325acd8549acf0fb52c84b8074aef0c2c38c7 (diff) | |
download | calcurse-4b987f70ac463121f9791eb3493952a77aba495f.tar.gz calcurse-4b987f70ac463121f9791eb3493952a77aba495f.zip |
unuseful headers removed and some functions became static
Diffstat (limited to 'src/help.c')
-rwxr-xr-x | src/help.c | 37 |
1 files changed, 16 insertions, 21 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: help.c,v 1.18 2007/07/23 19:29:34 culot Exp $ */ +/* $calcurse: help.c,v 1.19 2007/07/28 13:11:42 culot Exp $ */ /* * Calcurse - text-based organizer @@ -24,28 +24,35 @@ * */ -#include <ncurses.h> #include <stdlib.h> -#include <stdio.h> #include <string.h> -#include <stdbool.h> #include <ctype.h> #include <sys/types.h> #include "i18n.h" #include "help.h" #include "custom.h" -#include "vars.h" #include "utils.h" -#include "apoint.h" #include "notify.h" -#include "wins.h" + +/* Returns the number of lines in an help text. */ +static int +get_help_lines(char *text) +{ + int i; + int nl = 0; + + for (i = 0; text[i]; i++) { + if (text[i] == '\n') nl++; + } + return nl + 1; +} /* * Write the desired help text inside the help pad, and return the number * of lines that were written. - * */ -int + */ +static int write_help_pad(WINDOW *win, char *title, char *text, int pad_width) { int nl_title = 0; @@ -61,18 +68,6 @@ write_help_pad(WINDOW *win, char *title, char *text, int pad_width) return nl_text + nl_title; } -int -get_help_lines(char *text) -{ - int i; - int nl = 0; - - for (i = 0; text[i]; i++) { - if (text[i] == '\n') nl++; - } - return nl + 1; -} - /* Draws the help screen */ void help_screen(void) |