[hackers] [sbase] Use printf() instead of fprintf() in uuencode(1) || sin
commit 31894adad272f50410e8871e8cac16e9475b2c12
Author: sin <sin_AT_2f30.org>
Date: Fri Jan 31 15:53:46 2014 +0000
Use printf() instead of fprintf() in uuencode(1)
diff --git a/uuencode.c b/uuencode.c
index 0766e39..1aca541 100644
--- a/uuencode.c
+++ b/uuencode.c
_AT_@ -50,7 +50,7 @@ uuencode(FILE *fp, const char *name, const char *s)
if (fstat(fileno(fp), &st) < 0)
eprintf("fstat %s:", s);
- fprintf(stdout, "begin %o %s
", st.st_mode & 0777, name);
+ printf("begin %o %s
", st.st_mode & 0777, name);
while ((n = fread(buf, 1, sizeof(buf), fp))) {
ch = ' ' + (n & 0x3f);
putchar(ch == ' ' ? '`' : ch);
_AT_@ -73,5 +73,5 @@ uuencode(FILE *fp, const char *name, const char *s)
}
if (ferror(fp))
eprintf("'%s' read error:", s);
- fprintf(stdout, "%c
end
", '`');
+ printf("%c
end
", '`');
}
Received on Fri Jan 31 2014 - 16:55:43 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 31 2014 - 17:00:13 CET