[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] ed: align output of read command with POSIX.1-2008
From:       soeren () soeren-tempel ! net
Date:       2021-11-17 14:12:25
Message-ID: 20211117141225.21136-1-soeren () soeren-tempel ! net
[Download RAW message or body]

From: Sören Tempel <soeren+git@soeren-tempel.net>

POSIX.1-2008 mandates the following regarding the read command:

	If the read is successful, and -s was not specified, the number
	of bytes read shall be written to standard output in the
	following format:

	    "%d\n", <number of bytes read>

This commit aligns the output of busybox ed with POSIX.1-2008 by
removing the file name from the output for the read command.

This slipped through in 4836a0708fd0aaeb82871a3762b40fcf4b61e812.

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
---
 editors/ed.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/editors/ed.c b/editors/ed.c
index cb903bca7..0d96d263c 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -400,9 +400,6 @@ static int readLines(const char *file, int num)
 	charCount = 0;
 	cc = 0;
 
-	printf("\"%s\", ", file);
-	fflush_all();
-
 	do {
 		cp = memchr(bufPtr, '\n', bufUsed);
 
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic