On Thu, Apr 04, 2002, Iftach Hyams wrote about "RE: c question":
>  It has nothing to do with C (except the fact that most of the O.S. I know
> has API is in C).
>  It has to do with the implementation by the OS + runtime library of the
> printf and stderr.

This is not true. The standard IO library (fprintf, stdout, fflush, setvbuf)
is part of the ANSI C standard (check out any good ANSI C book, like
Kernighan & Ritchie 2nd edition, or Harbison & Steele, if you don't belive
me). All C libraries on all OSs must implement these functions. I'm not
sure, however, whether stdout's default buffering (see my previous email)
is mandated in the standard (Harbison & Steele and Kernighan & Ritchie are
very vague on this issue).

What is *not* part of the C standard is the system calls (part 2 of the
manual), like write(), open(), and so on. That would be part of some UNIX
(or POSIX) standard.

> Anyhow, fputc is your friend. It doesn't solve your
> problem but is more likely to use when writing single non formatted
> character.

As you said, fputc (or putchar()) doesn't really solve his problem :)

>  The answer is probably fflush or setvbuf.

Right.

P.S.
I found the ultimate command line to look at the procmailex manual
searching for duplicates. Here it is:
        man -P"less +/duplicates" procmailex


-- 
Nadav Har'El                        |      Thursday, Apr 4 2002, 22 Nisan 5762
[EMAIL PROTECTED]             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |This space is for sale - inquire inside.
http://nadav.harel.org.il           |

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to