svn commit: trunk/busybox: archival coreutils editors findutils inc etc...

vda at busybox.net vda at busybox.net
Thu Oct 26 23:25:18 UTC 2006


Author: vda
Date: 2006-10-26 16:25:17 -0700 (Thu, 26 Oct 2006)
New Revision: 16447

Log:
rename functions to more understandable names


Modified:
   trunk/busybox/archival/dpkg.c
   trunk/busybox/coreutils/cat.c
   trunk/busybox/coreutils/cksum.c
   trunk/busybox/coreutils/cmp.c
   trunk/busybox/coreutils/cut.c
   trunk/busybox/coreutils/fold.c
   trunk/busybox/coreutils/head.c
   trunk/busybox/coreutils/md5_sha1_sum.c
   trunk/busybox/coreutils/sum.c
   trunk/busybox/coreutils/tee.c
   trunk/busybox/coreutils/uudecode.c
   trunk/busybox/coreutils/wc.c
   trunk/busybox/editors/sed.c
   trunk/busybox/findutils/grep.c
   trunk/busybox/include/libbb.h
   trunk/busybox/libbb/Kbuild
   trunk/busybox/libbb/fclose_nonstdin.c
   trunk/busybox/libbb/fgets_str.c
   trunk/busybox/libbb/wfopen.c
   trunk/busybox/libbb/wfopen_input.c
   trunk/busybox/libbb/xfuncs.c
   trunk/busybox/loginutils/deluser.c
   trunk/busybox/miscutils/readahead.c
   trunk/busybox/miscutils/strings.c
   trunk/busybox/shell/lash.c
   trunk/busybox/util-linux/fdisk.c
   trunk/busybox/util-linux/more.c


Changeset:
Modified: trunk/busybox/archival/dpkg.c
===================================================================
--- trunk/busybox/archival/dpkg.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/archival/dpkg.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -787,7 +787,7 @@
 	unsigned int status_num;
 
 	status_file = xfopen(filename, "r");
-	while ((control_buffer = fgets_str(status_file, "\n\n")) != NULL) {
+	while ((control_buffer = xmalloc_fgets_str(status_file, "\n\n")) != NULL) {
 		const unsigned int package_num = fill_package_struct(control_buffer);
 		if (package_num != -1) {
 			status_node = xmalloc(sizeof(status_node_t));
@@ -842,7 +842,7 @@
 	int i = 0;
 
 	/* Update previously known packages */
-	while ((control_buffer = fgets_str(old_status_file, "\n\n")) != NULL) {
+	while ((control_buffer = xmalloc_fgets_str(old_status_file, "\n\n")) != NULL) {
 		if ((tmp_string = strstr(control_buffer, "Package:")) == NULL) {
 			continue;
 		}

Modified: trunk/busybox/coreutils/cat.c
===================================================================
--- trunk/busybox/coreutils/cat.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/cat.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -26,10 +26,10 @@
 	}
 
 	do {
-		f = bb_wfopen_input(*argv);
+		f = fopen_or_warn_stdin(*argv);
 		if (f) {
 			off_t r = bb_copyfd_eof(fileno(f), STDOUT_FILENO);
-			bb_fclose_nonstdin(f);
+			fclose_if_not_stdin(f);
 			if (r >= 0) {
 				continue;
 			}

Modified: trunk/busybox/coreutils/cksum.c
===================================================================
--- trunk/busybox/coreutils/cksum.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/cksum.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -22,7 +22,7 @@
 	int inp_stdin = (argc == optind) ? 1 : 0;
 
 	do {
-		fp = bb_wfopen_input((inp_stdin) ? bb_msg_standard_input : *++argv);
+		fp = fopen_or_warn_stdin((inp_stdin) ? bb_msg_standard_input : *++argv);
 
 		crc = 0;
 		length = 0;

Modified: trunk/busybox/coreutils/cmp.c
===================================================================
--- trunk/busybox/coreutils/cmp.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/cmp.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -27,10 +27,9 @@
 {
 	FILE *fp;
 
-	if ((fp = bb_wfopen_input(filename)) != NULL) {
+	fp = fopen_or_warn_stdin(filename);
+	if (fp)
 		return fp;
-	}
-
 	exit(xfunc_error_retval);	/* We already output an error message. */
 }
 

Modified: trunk/busybox/coreutils/cut.c
===================================================================
--- trunk/busybox/coreutils/cut.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/cut.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -272,7 +272,7 @@
 		FILE *file;
 
 		for (; optind < argc; optind++) {
-			file = bb_wfopen(argv[optind], "r");
+			file = fopen_or_warn(argv[optind], "r");
 			if (file) {
 				cut_file(file);
 				fclose(file);

Modified: trunk/busybox/coreutils/fold.c
===================================================================
--- trunk/busybox/coreutils/fold.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/fold.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -70,7 +70,7 @@
 	}
 
 	do {
-		FILE *istream = bb_wfopen_input(*argv);
+		FILE *istream = fopen_or_warn_stdin(*argv);
 		int c;
 		int column = 0;		/* Screen column where next char will go. */
 		int offset_out = 0;	/* Index in `line_out' for next char. */
@@ -144,7 +144,7 @@
 			fwrite(line_out, sizeof(char), (size_t) offset_out, stdout);
 		}
 
-		if (ferror(istream) || bb_fclose_nonstdin(istream)) {
+		if (ferror(istream) || fclose_if_not_stdin(istream)) {
 			bb_perror_msg("%s", *argv);	/* Avoid multibyte problems. */
 			errs |= EXIT_FAILURE;
 		}

Modified: trunk/busybox/coreutils/head.c
===================================================================
--- trunk/busybox/coreutils/head.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/head.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -112,7 +112,7 @@
 #endif
 
 	do {
-		fp = bb_wfopen_input(*argv);
+		fp = fopen_or_warn_stdin(*argv);
 		if (fp) {
 			if (fp == stdin) {
 				*argv = (char *) bb_msg_standard_input;
@@ -127,7 +127,7 @@
 				}
 				putchar(c);
 			}
-			if (bb_fclose_nonstdin(fp)) {
+			if (fclose_if_not_stdin(fp)) {
 				bb_perror_msg("%s", *argv);	/* Avoid multibyte problems. */
 				retval = EXIT_FAILURE;
 			}

Modified: trunk/busybox/coreutils/md5_sha1_sum.c
===================================================================
--- trunk/busybox/coreutils/md5_sha1_sum.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/md5_sha1_sum.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -162,7 +162,7 @@
 			bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
 						 count_failed, count_total);
 		}
-		if (bb_fclose_nonstdin(pre_computed_stream) == EOF) {
+		if (fclose_if_not_stdin(pre_computed_stream) == EOF) {
 			bb_perror_msg_and_die("cannot close file %s", file_ptr);
 		}
 	} else {

Modified: trunk/busybox/coreutils/sum.c
===================================================================
--- trunk/busybox/coreutils/sum.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/sum.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -38,7 +38,7 @@
 		fp = stdin;
 		have_read_stdin++;
 	} else {
-		fp = bb_wfopen(file, "r");
+		fp = fopen_or_warn(file, "r");
 		if (fp == NULL)
 			goto out;
 	}
@@ -52,11 +52,11 @@
 
 	if (ferror(fp)) {
 		bb_perror_msg(file);
-		bb_fclose_nonstdin(fp);
+		fclose_if_not_stdin(fp);
 		goto out;
 	}
 
-	if (bb_fclose_nonstdin(fp) == EOF) {
+	if (fclose_if_not_stdin(fp) == EOF) {
 		bb_perror_msg(file);
 		goto out;
 	}

Modified: trunk/busybox/coreutils/tee.c
===================================================================
--- trunk/busybox/coreutils/tee.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/tee.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -49,7 +49,7 @@
 	goto GOT_NEW_FILE;
 
 	do {
-		if ((*p = bb_wfopen(*argv, mode)) == NULL) {
+		if ((*p = fopen_or_warn(*argv, mode)) == NULL) {
 			retval = EXIT_FAILURE;
 			continue;
 		}

Modified: trunk/busybox/coreutils/uudecode.c
===================================================================
--- trunk/busybox/coreutils/uudecode.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/uudecode.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -174,7 +174,7 @@
 		}
 		free(line);
 		ret = decode_fn_ptr(src_stream, dst_stream);
-		bb_fclose_nonstdin(src_stream);
+		fclose_if_not_stdin(src_stream);
 		return(ret);
 	}
 	bb_error_msg_and_die("No `begin' line");

Modified: trunk/busybox/coreutils/wc.c
===================================================================
--- trunk/busybox/coreutils/wc.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/coreutils/wc.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -107,7 +107,7 @@
 
 	while ((arg = *argv++) != 0) {
 		++num_files;
-		fp = bb_wfopen_input(arg);
+		fp = fopen_or_warn_stdin(arg);
 		if (!fp) {
 			status = EXIT_FAILURE;
 			continue;
@@ -172,7 +172,7 @@
 		}
 		totals[WC_LENGTH] -= counts[WC_LENGTH];
 
-		bb_fclose_nonstdin(fp);
+		fclose_if_not_stdin(fp);
 
 	OUTPUT:
 		/* coreutils wc tries hard to print pretty columns

Modified: trunk/busybox/editors/sed.c
===================================================================
--- trunk/busybox/editors/sed.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/editors/sed.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -1194,7 +1194,7 @@
 				process_files();
 				continue;
 			}
-			file = bb_wfopen(argv[i], "r");
+			file = fopen_or_warn(argv[i], "r");
 			if (!file) {
 				status = EXIT_FAILURE;
 				continue;

Modified: trunk/busybox/findutils/grep.c
===================================================================
--- trunk/busybox/findutils/grep.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/findutils/grep.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -447,7 +447,7 @@
 			}
 		}
 		matched += grep_file(file);
-		bb_fclose_nonstdin(file);
+		fclose_if_not_stdin(file);
  grep_done:
 		if (matched < 0) {
 			/* we found a match but were told to be quiet, stop here and

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/include/libbb.h	2006-10-26 23:25:17 UTC (rev 16447)
@@ -240,20 +240,29 @@
 extern long *find_pid_by_name( const char* pidName);
 extern long *pidlist_reverse(long *pidList);
 extern char *find_block_device(char *path);
-extern char *xmalloc_fgets(FILE *file);
-/* Chops off '\n' from the end, unlike fgets: */
-extern char *xmalloc_getline(FILE *file);
-extern char *bb_get_chunk_from_file(FILE *file, int *end);
 extern off_t bb_copyfd_size(int fd1, int fd2, off_t size);
 extern off_t bb_copyfd_eof(int fd1, int fd2);
 extern char  bb_process_escape_sequence(const char **ptr);
 extern char *bb_get_last_path_component(char *path);
-extern FILE *bb_wfopen(const char *path, const char *mode);
-extern FILE *bb_wfopen_input(const char *filename);
-extern FILE *xfopen(const char *path, const char *mode);
 
-extern int bb_fclose_nonstdin(FILE *f);
+/* Prints to stdout closes entire FILE. Exits on error: */
+extern void xprint_and_close_file(FILE *file);
+extern char *xmalloc_fgets(FILE *file);
+/* /* Read up to (and including) TERMINATING_STRING: */
+extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string);
+/* Chops off '\n' from the end, unlike fgets: */
+extern char *xmalloc_getline(FILE *file);
+extern char *bb_get_chunk_from_file(FILE *file, int *end);
+extern void die_if_ferror(FILE *file, const char *msg);
+extern void die_if_ferror_stdout(void);
+extern void xfflush_stdout(void);
 extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN;
+extern int fclose_if_not_stdin(FILE *file);
+extern FILE *xfopen(const char *filename, const char *mode);
+/* Prints warning to stderr and returns NULL on failure: */
+extern FILE *fopen_or_warn(const char *filename, const char *mode);
+/* "Opens" stdin if filename is special, else just opens file: */
+extern FILE *fopen_or_warn_stdin(const char *filename);
 
 extern void xstat(char *filename, struct stat *buf);
 extern int  xsocket(int domain, int type, int protocol);
@@ -278,10 +287,6 @@
 extern uint32_t option_mask32;
 extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...);
 
-extern void die_if_ferror(FILE *fp, const char *fn);
-extern void die_if_ferror_stdout(void);
-extern void xfflush_stdout(void);
-
 extern void bb_warn_ignoring_args(int n);
 
 extern void chomp(char *s);
@@ -430,8 +435,6 @@
 char *concat_subpath_file(const char *path, const char *filename);
 char *last_char_is(const char *s, int c);
 
-char *fgets_str(FILE *file, const char *terminating_string);
-
 int execable_file(const char *name);
 char *find_execable(const char *filename);
 int exists_execable(const char *filename);
@@ -577,7 +580,6 @@
 void reset_ino_dev_hashtable(void);
 
 char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
-void xprint_and_close_file(FILE *file);
 
 #define FAIL_DELAY    3
 extern void bb_do_delay(int seconds);

Modified: trunk/busybox/libbb/Kbuild
===================================================================
--- trunk/busybox/libbb/Kbuild	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/Kbuild	2006-10-26 23:25:17 UTC (rev 16447)
@@ -9,7 +9,7 @@
 	compare_string_array.o concat_path_file.o copy_file.o copyfd.o \
 	crc32.o create_icmp_socket.o create_icmp6_socket.o \
 	device_open.o dump.o error_msg.o error_msg_and_die.o \
-	find_pid_by_name.o find_root_device.o fgets_str.o \
+	find_pid_by_name.o find_root_device.o xmalloc_fgets_str.o \
 	full_write.o get_last_path_component.o get_line_from_file.o \
 	herror_msg.o herror_msg_and_die.o \
 	human_readable.o inet_common.o inode_hash.o isdirectory.o \

Modified: trunk/busybox/libbb/fclose_nonstdin.c
===================================================================
--- trunk/busybox/libbb/fclose_nonstdin.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/fclose_nonstdin.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -15,7 +15,7 @@
 #include <stdio.h>
 #include <libbb.h>
 
-int bb_fclose_nonstdin(FILE *f)
+int fclose_if_not_stdin(FILE *f)
 {
 	if (f != stdin) {
 		return fclose(f);

Modified: trunk/busybox/libbb/fgets_str.c
===================================================================
--- trunk/busybox/libbb/fgets_str.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/fgets_str.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -8,17 +8,12 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include "libbb.h"
 
 /* Read up to (and including) TERMINATING_STRING from FILE and return it.
  * Return NULL on EOF.  */
 
-char *fgets_str(FILE *file, const char *terminating_string)
+char *xmalloc_fgets_str(FILE *file, const char *terminating_string)
 {
 	char *linebuf = NULL;
 	const int term_length = strlen(terminating_string);
@@ -36,7 +31,8 @@
 
 		/* grow the line buffer as necessary */
 		while (idx > linebufsz - 2) {
-			linebuf = xrealloc(linebuf, linebufsz += 1000);
+			linebufsz += 200;
+			linebuf = xrealloc(linebuf, linebufsz);
 		}
 
 		linebuf[idx] = ch;

Modified: trunk/busybox/libbb/wfopen.c
===================================================================
--- trunk/busybox/libbb/wfopen.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/wfopen.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -7,14 +7,12 @@
  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
  */
 
-#include <stdio.h>
-#include <errno.h>
 #include "libbb.h"
 
-FILE *bb_wfopen(const char *path, const char *mode)
+FILE *fopen_or_warn(const char *path, const char *mode)
 {
-	FILE *fp;
-	if ((fp = fopen(path, mode)) == NULL) {
+	FILE *fp = fopen(path, mode);
+	if (!fp) {
 		bb_perror_msg("%s", path);
 		errno = 0;
 	}

Modified: trunk/busybox/libbb/wfopen_input.c
===================================================================
--- trunk/busybox/libbb/wfopen_input.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/wfopen_input.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -14,18 +14,17 @@
  * Note: We also consider "" to main stdin (for 'cmp' at least).
  */
 
-#include <stdio.h>
-#include <sys/stat.h>
-#include <libbb.h>
+#include "libbb.h"
 
-FILE *bb_wfopen_input(const char *filename)
+FILE *fopen_or_warn_stdin(const char *filename)
 {
 	FILE *fp = stdin;
 
-	if ((filename != bb_msg_standard_input)
-		&& filename[0] && ((filename[0] != '-') || filename[1])
+	if (filename != bb_msg_standard_input
+	 && filename[0]
+	 && (filename[0] != '-' || filename[1])
 	) {
-		fp = bb_wfopen(filename, "r");
+		fp = fopen_or_warn(filename, "r");
 	}
 
 	return fp;

Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/libbb/xfuncs.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -341,6 +341,7 @@
 // close that file.
 void xprint_and_close_file(FILE *file)
 {
+	fflush(stdout);
 	// copyfd outputs error messages for us.
 	if (bb_copyfd_eof(fileno(file), 1) == -1)
 		exit(xfunc_error_retval);

Modified: trunk/busybox/loginutils/deluser.c
===================================================================
--- trunk/busybox/loginutils/deluser.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/loginutils/deluser.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -54,7 +54,7 @@
 	struct stat statbuf;
 
 
-	if ((passwd = bb_wfopen(filename, "r"))) {
+	if ((passwd = fopen_or_warn(filename, "r"))) {
 		// Remove pointless const.
 		xstat((char *)filename, &statbuf);
 		buffer = (char *) xmalloc(statbuf.st_size * sizeof(char));
@@ -64,7 +64,7 @@
 		b = boundary(buffer, login);
 		if (b.stop != 0) {
 			/* write the file w/o the user */
-			if ((passwd = bb_wfopen(filename, "w"))) {
+			if ((passwd = fopen_or_warn(filename, "w"))) {
 				fwrite(buffer, (b.start - 1), sizeof(char), passwd);
 				fwrite(&buffer[b.stop], (statbuf.st_size - b.stop), sizeof(char), passwd);
 				fclose(passwd);

Modified: trunk/busybox/miscutils/readahead.c
===================================================================
--- trunk/busybox/miscutils/readahead.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/miscutils/readahead.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -20,7 +20,7 @@
 	if (argc == 1) bb_show_usage();
 
 	while (*++argv) {
-		if ((f = bb_wfopen(*argv, "r")) != NULL) {
+		if ((f = fopen_or_warn(*argv, "r")) != NULL) {
 			int r, fd=fileno(f);
 
 			r = readahead(fd, 0, fdlength(fd));

Modified: trunk/busybox/miscutils/strings.c
===================================================================
--- trunk/busybox/miscutils/strings.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/miscutils/strings.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -45,7 +45,7 @@
 	}
 
 	do {
-		file = bb_wfopen(*argv, "r");
+		file = fopen_or_warn(*argv, "r");
 		if (file) {
 PIPE:
 			count = 0;
@@ -75,7 +75,7 @@
 				}
 				count++;
 			} while (c != EOF);
-			bb_fclose_nonstdin(file);
+			fclose_if_not_stdin(file);
 		} else {
 			status = EXIT_FAILURE;
 		}

Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/shell/lash.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -426,7 +426,7 @@
 	FILE *input;
 	int status;
 
-	input = bb_wfopen(child->argv[1], "r");
+	input = fopen_or_warn(child->argv[1], "r");
 	if (!input) {
 		return EXIT_FAILURE;
 	}
@@ -1522,7 +1522,7 @@
 			llist_add_to(&close_me_list, (void *)(long)fileno(prof_input));
 			/* Now run the file */
 			busy_loop(prof_input);
-			bb_fclose_nonstdin(prof_input);
+			fclose_if_not_stdin(prof_input);
 			llist_pop(&close_me_list);
 		}
 	}

Modified: trunk/busybox/util-linux/fdisk.c
===================================================================
--- trunk/busybox/util-linux/fdisk.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/util-linux/fdisk.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -2771,7 +2771,7 @@
 	char line[100], ptname[100], devname[120], *s;
 	int ma, mi, sz;
 
-	procpt = bb_wfopen("/proc/partitions", "r");
+	procpt = fopen_or_warn("/proc/partitions", "r");
 
 	while (fgets(line, sizeof(line), procpt)) {
 		if (sscanf(line, " %d %d %d %[^\n ]",

Modified: trunk/busybox/util-linux/more.c
===================================================================
--- trunk/busybox/util-linux/more.c	2006-10-26 23:21:47 UTC (rev 16446)
+++ trunk/busybox/util-linux/more.c	2006-10-26 23:25:17 UTC (rev 16447)
@@ -81,7 +81,7 @@
 		if (argc == 0) {
 			file = stdin;
 		} else
-			file = bb_wfopen(*argv, "r");
+			file = fopen_or_warn(*argv, "r");
 		if(file==0)
 			goto loop;
 




More information about the busybox-cvs mailing list