[BusyBox-cvs] CVS busybox/libbb

CVS User landley landley at codepoet.org
Mon Jan 24 07:00:05 UTC 2005


Update of /var/cvs/busybox/libbb
In directory nail:/tmp/cvs-serv3049/busybox/libbb

Modified Files:
	get_line_from_file.c 
Log Message:
Sort rewrite to be SUSv3 compliant.  New config option, updated help, and
a couple of infrastructure bits.


--- /var/cvs/busybox/libbb/get_line_from_file.c	2004/03/15 08:28:42	1.7
+++ /var/cvs/busybox/libbb/get_line_from_file.c	2005/01/24 07:00:02	1.8
@@ -44,7 +44,8 @@
 			linebuf = xrealloc(linebuf, linebufsz += GROWBY);
 		}
 		linebuf[idx++] = (char)ch;
-		if (ch == '\n' || ch == '\0') {
+		if (!ch) return linebuf;
+		if (c<2 && ch == '\n') {
 			if (c) {
 				--idx;
 			}
@@ -71,6 +72,11 @@
 	return private_get_line_from_file(file, 1);
 }
 
+extern char *bb_get_chunk_from_file(FILE *file)
+{
+	return private_get_line_from_file(file, 2);
+}
+
 
 /* END CODE */
 /*



More information about the busybox-cvs mailing list