Use fputs instead of printf in perror.c
authorceriel <none@none>
Mon, 21 May 1990 10:20:15 +0000 (10:20 +0000)
committerceriel <none@none>
Mon, 21 May 1990 10:20:15 +0000 (10:20 +0000)
lang/cem/libcc.ansi/stdio/perror.c

index 70055e6..962d4bc 100644 (file)
 void
 perror(const char *s)
 {
-       if (s && *s)
-               (void) fprintf(stderr,"%s: ", s);
-       (void) fprintf(stderr,"%s\n", strerror(errno));
+       if (s && *s) {
+               (void) fputs(s, stderr);
+               (void) fputs(": ", stderr);
+       }
+       (void) fputs(strerror(errno), stderr);
+       (void) fputs("\n", stderr);
 }