[git commit] ed: align output of read command with POSIX.1-2008
Denys Vlasenko
vda.linux at googlemail.com
Sun Dec 19 22:17:52 UTC 2021
commit: https://git.busybox.net/busybox/commit/?id=a05a3d5932b5002d0513adfa817b931dcc1686c0
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
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.
function old new delta
.rodata 104203 104196 -7
readLines 409 388 -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-28) Total: -28 bytes
Signed-off-by: Sören Tempel <soeren+git at soeren-tempel.net>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
editors/ed.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/editors/ed.c b/editors/ed.c
index fed10c470..dfe0f1a77 100644
--- a/editors/ed.c
+++ b/editors/ed.c
@@ -402,9 +402,6 @@ static int readLines(const char *file, int num)
charCount = 0;
cc = 0;
- printf("\"%s\", ", file);
- fflush_all();
-
do {
cp = memchr(bufPtr, '\n', bufUsed);
More information about the busybox-cvs
mailing list