From: bowman@montana.com   
      
   On Sat, 07 Feb 2026 21:26:55 GMT, Charlie Gibbs wrote:   
      
   > On 2026-02-07, rbowman wrote:   
   >   
   >> On Sat, 07 Feb 2026 15:36:18 +0000, Richard Kettlewell wrote:   
   >>   
   >>> It’s not like Java has a monopoly on being arbitrary and weird!   
   >>>   
   >>> int fputs(const char *s, FILE *stream);   
   >>> int fprintf(FILE *stream, const char *format, ...);   
   >>>   
   >>> Whether the stream argument is first or last depends which function   
   >>> you’re using.   
   >>   
   >> After all these years I use 'man fputs' more than I should. Then you   
   >> throw in the similar functions that take an int file descriptor rather   
   >> than a FILE*.   
   >>   
   >> I'd still rather deal with that arbitrariness than C++'s streams.   
   >   
   > I deal with those by remembering that fputs() can have any number of   
   > arguments, so we might as well get the file pointer out there first. On   
   > the other hand, putc() only has one argument, so fputc() adds the file   
   > pointer at the end. Then I just have to remember how the arguments go   
   > with fgets() - and I've replaced it with getline(), which is quite   
   > similar. I always read strings and parse them myself, so that about   
   > covers I/O for me.   
      
   man fputs   
      
   SYNOPSIS   
    #include    
      
    int fputc(int c, FILE *stream);   
    int putc(int c, FILE *stream);   
    int putchar(int c);   
      
    int fputs(const char *restrict s, FILE *restrict stream);   
    int puts(const char *s);   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|