diff options
Diffstat (limited to 'clients/xzwrite/bfgets.c')
-rw-r--r-- | clients/xzwrite/bfgets.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/clients/xzwrite/bfgets.c b/clients/xzwrite/bfgets.c deleted file mode 100644 index 96636f9..0000000 --- a/clients/xzwrite/bfgets.c +++ /dev/null @@ -1,33 +0,0 @@ -/* bfgets.c - * - * declaration: - * char *bfgets(s, n, iop) - * char *s; - * int n; - * FILE *iop; - * - * Reads n-1 characters or until a newline from iop. The terminating newline - * is NOT RETURNED. - * - * Written by Barr3y Jaspan (bjaspan@athena.mit.edu) - */ - -#include <stdio.h> - -char *bfgets(); - -char *bfgets(s, n, iop) - char *s; - int n; - FILE *iop; -{ - register int c = 0; - register char *cs; - - cs = s; - while ((--n > 0) && ((c = getc(iop)) !=EOF) && (c != '\n')) - *cs++ = c; - - *cs = '\0'; - return (c == EOF && cs == s) ? NULL : s; -} |