scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

fputs.c (176B)


      1 #include <stdio.h>
      2 
      3 #undef fputs
      4 
      5 int
      6 fputs(const char *restrict bp, FILE *restrict fp)
      7 {
      8 	int r, ch;
      9 
     10 	r = 0;
     11 
     12 	while ((ch = *bp++) != '\0')
     13 		r = putc(ch, fp);
     14 
     15 	return r;
     16 }