[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] libc-mini: Don't print newline in puts
From: |
Jan Nieuwenhuizen |
Subject: |
Re: [PATCH] libc-mini: Don't print newline in puts |
Date: |
Sun, 18 Apr 2021 17:21:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
W. J. van der Laan writes:
Hello,
> * lib/stdlib/puts.c (puts): Don't print a newline after printing the
> string, as this is not part of the specified behavior.
Thanks for the patch, it looks nice. However, the GNU libc manual says
https://www.gnu.org/software/libc/manual/html_node/Simple-Output.html#index-puts
--8<---------------cut here---------------start------------->8---
Function: int puts (const char *s)
The puts function writes the string s to the stream stdout followed by
a newline. The terminating null character of the string is not
written.
--8<---------------cut here---------------end--------------->8---
Maybe what you see is that we don't really have FILE* in the Mes C
library, fputs should not print a newline?
It would be great to remove the FILE* => fd hack and introduce a FILE
struct...
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com