svn commit: trunk/busybox: editors include libbb

vda at busybox.net vda at busybox.net
Tue Sep 25 18:35:29 UTC 2007


Author: vda
Date: 2007-09-25 11:35:28 -0700 (Tue, 25 Sep 2007)
New Revision: 20025

Log:
documentation bits in comments, no code changes



Modified:
   trunk/busybox/editors/ed.c
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/lineedit.c
   trunk/busybox/libbb/skip_whitespace.c


Changeset:
Modified: trunk/busybox/editors/ed.c
===================================================================
--- trunk/busybox/editors/ed.c	2007-09-25 18:06:36 UTC (rev 20024)
+++ trunk/busybox/editors/ed.c	2007-09-25 18:35:28 UTC (rev 20025)
@@ -82,7 +82,6 @@
 
 static char *skip_blank(const char *cp)
 {
-// NB: fix comment in skip_whitespace!
 	while (isblank(*cp))
 		cp++;
 	return (char *)cp;
@@ -125,7 +124,6 @@
 	smallint have1, have2;
 
 	while (TRUE) {
-// NB: fix comment in lineedit.c!
 		/* Returns:
 		 * -1 on read errors or EOF, or on bare Ctrl-D.
 		 * 0  on ctrl-C,

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2007-09-25 18:06:36 UTC (rev 20024)
+++ trunk/busybox/include/libbb.h	2007-09-25 18:35:28 UTC (rev 20025)
@@ -892,6 +892,12 @@
 	FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION,
 };
 line_input_t *new_line_input_t(int flags);
+/* Returns:
+ * -1 on read errors or EOF, or on bare Ctrl-D.
+ * 0  on ctrl-C,
+ * >0 length of input string, including terminating '\n'
+ * [is this true? stores "" in 'command' if return value is 0 or -1]
+ */
 int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state);
 #else
 int read_line_input(const char* prompt, char* command, int maxsize);

Modified: trunk/busybox/libbb/lineedit.c
===================================================================
--- trunk/busybox/libbb/lineedit.c	2007-09-25 18:06:36 UTC (rev 20024)
+++ trunk/busybox/libbb/lineedit.c	2007-09-25 18:35:28 UTC (rev 20025)
@@ -1253,6 +1253,11 @@
 #undef CTRL
 #define CTRL(a) ((a) & ~0x40)
 
+/* Returns:
+ * -1 on read errors or EOF, or on bare Ctrl-D.
+ * 0  on ctrl-C,
+ * >0 length of input string, including terminating '\n'
+ */
 int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *st)
 {
 	int lastWasTab = FALSE;

Modified: trunk/busybox/libbb/skip_whitespace.c
===================================================================
--- trunk/busybox/libbb/skip_whitespace.c	2007-09-25 18:06:36 UTC (rev 20024)
+++ trunk/busybox/libbb/skip_whitespace.c	2007-09-25 18:35:28 UTC (rev 20025)
@@ -11,7 +11,7 @@
 
 char *skip_whitespace(const char *s)
 {
-	/* NB: isspace('0') returns 0 */
+	/* NB: isspace('\0') returns 0 */
 	while (isspace(*s)) ++s;
 
 	return (char *) s;




More information about the busybox-cvs mailing list