diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-25 18:35:28 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-25 18:35:28 +0000 |
commit | 6a5377ac14bec2f2ae62c4ec085ff3b149cc11ad (patch) | |
tree | bb2200121abb55f06facbe8793c649ae90f53717 | |
parent | ea7645bab62c6f68c755cf717662bceaa04858ed (diff) | |
download | busybox-w32-6a5377ac14bec2f2ae62c4ec085ff3b149cc11ad.tar.gz busybox-w32-6a5377ac14bec2f2ae62c4ec085ff3b149cc11ad.tar.bz2 busybox-w32-6a5377ac14bec2f2ae62c4ec085ff3b149cc11ad.zip |
documentation bits in comments, no code changes
-rw-r--r-- | editors/ed.c | 2 | ||||
-rw-r--r-- | include/libbb.h | 6 | ||||
-rw-r--r-- | libbb/lineedit.c | 5 | ||||
-rw-r--r-- | libbb/skip_whitespace.c | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/editors/ed.c b/editors/ed.c index f5b9c39bb..cd3836aed 100644 --- a/editors/ed.c +++ b/editors/ed.c | |||
@@ -82,7 +82,6 @@ static int bad_nums(int num1, int num2, const char *for_what) | |||
82 | 82 | ||
83 | static char *skip_blank(const char *cp) | 83 | static char *skip_blank(const char *cp) |
84 | { | 84 | { |
85 | // NB: fix comment in skip_whitespace! | ||
86 | while (isblank(*cp)) | 85 | while (isblank(*cp)) |
87 | cp++; | 86 | cp++; |
88 | return (char *)cp; | 87 | return (char *)cp; |
@@ -125,7 +124,6 @@ static void doCommands(void) | |||
125 | smallint have1, have2; | 124 | smallint have1, have2; |
126 | 125 | ||
127 | while (TRUE) { | 126 | while (TRUE) { |
128 | // NB: fix comment in lineedit.c! | ||
129 | /* Returns: | 127 | /* Returns: |
130 | * -1 on read errors or EOF, or on bare Ctrl-D. | 128 | * -1 on read errors or EOF, or on bare Ctrl-D. |
131 | * 0 on ctrl-C, | 129 | * 0 on ctrl-C, |
diff --git a/include/libbb.h b/include/libbb.h index 25b2e4489..407b723b2 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -892,6 +892,12 @@ enum { | |||
892 | FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, | 892 | FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, |
893 | }; | 893 | }; |
894 | line_input_t *new_line_input_t(int flags); | 894 | line_input_t *new_line_input_t(int flags); |
895 | /* Returns: | ||
896 | * -1 on read errors or EOF, or on bare Ctrl-D. | ||
897 | * 0 on ctrl-C, | ||
898 | * >0 length of input string, including terminating '\n' | ||
899 | * [is this true? stores "" in 'command' if return value is 0 or -1] | ||
900 | */ | ||
895 | int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state); | 901 | int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state); |
896 | #else | 902 | #else |
897 | int read_line_input(const char* prompt, char* command, int maxsize); | 903 | int read_line_input(const char* prompt, char* command, int maxsize); |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 62f8949d6..a018a53ff 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1253,6 +1253,11 @@ static void win_changed(int nsig) | |||
1253 | #undef CTRL | 1253 | #undef CTRL |
1254 | #define CTRL(a) ((a) & ~0x40) | 1254 | #define CTRL(a) ((a) & ~0x40) |
1255 | 1255 | ||
1256 | /* Returns: | ||
1257 | * -1 on read errors or EOF, or on bare Ctrl-D. | ||
1258 | * 0 on ctrl-C, | ||
1259 | * >0 length of input string, including terminating '\n' | ||
1260 | */ | ||
1256 | int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *st) | 1261 | int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *st) |
1257 | { | 1262 | { |
1258 | int lastWasTab = FALSE; | 1263 | int lastWasTab = FALSE; |
diff --git a/libbb/skip_whitespace.c b/libbb/skip_whitespace.c index bdfb97d70..87b5f23ba 100644 --- a/libbb/skip_whitespace.c +++ b/libbb/skip_whitespace.c | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | char *skip_whitespace(const char *s) | 12 | char *skip_whitespace(const char *s) |
13 | { | 13 | { |
14 | /* NB: isspace('0') returns 0 */ | 14 | /* NB: isspace('\0') returns 0 */ |
15 | while (isspace(*s)) ++s; | 15 | while (isspace(*s)) ++s; |
16 | 16 | ||
17 | return (char *) s; | 17 | return (char *) s; |