home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 135,284 of 135,536   
   rbowman to Charlie Gibbs   
   Re: C/C++ timeline (was Re: Python: A Li   
   08 Feb 26 01:55:27   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca