Re: Bug#34956: ps formatting problem (fwd)
On Thu, Mar 25, 1999 at 02:55:03PM +1100, Craig Small wrote:
> G'day glibc-ers,
>
> I received this email from the upstream guy for procps. I'm not sure
> if you need to do this or not but here is the patch.
Um, no, I don't think so. I recommend you point him at the fputs(3)
man page, where it says:
RETURN VALUES
fputc(), putc() and putchar() return the character written
as an unsigned char cast to an int or EOF on error.
puts() and fputs() return a non - negative number on suc-
cess, or EOF on error.
CONFORMING TO
ANSI - C, POSIX.1
Notice that it is NOT specified what the non-negative number is. If he
wants the length returned, he should use printf() instead of fputs().
There is no point to hacking around this in glibc.
> 1999-03-02 Nix <nix@esperi.demon.co.uk>
>
> * stdlib/fputs.c (fputs): Return `len' rather than 0 on success.
Dan
/--------------------------------\ /--------------------------------\
| Daniel Jacobowitz |__| CMU, CS class of 2002 |
| Debian GNU/Linux Developer __ Part-Time Systems Programmer |
| dan@debian.org | | drow@cs.cmu.edu |
\--------------------------------/ \--------------------------------/
Reply to: