From 257c5c4737ce0399316199903ae402ae9e794a84 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 29 Jun 1998 15:57:45 +0000 Subject: revert back to using lower case _unlocked wrapper names --- src/sum.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/sum.c') diff --git a/src/sum.c b/src/sum.c index b013afd34..de3dfe15a 100644 --- a/src/sum.c +++ b/src/sum.c @@ -107,7 +107,7 @@ bsd_sum_file (const char *file, int print_name) } } - while ((ch = GETC (fp)) != EOF) + while ((ch = getc (fp)) != EOF) { total_bytes++; ROTATE_RIGHT (checksum); @@ -115,15 +115,15 @@ bsd_sum_file (const char *file, int print_name) checksum &= 0xffff; /* Keep it within bounds. */ } - if (FERROR (fp)) + if (ferror (fp)) { error (0, errno, "%s", file); if (!STREQ (file, "-")) - FCLOSE (fp); + fclose (fp); return -1; } - if (!STREQ (file, "-") && FCLOSE (fp) == EOF) + if (!STREQ (file, "-") && fclose (fp) == EOF) { error (0, errno, "%s", file); return -1; @@ -132,7 +132,7 @@ bsd_sum_file (const char *file, int print_name) printf ("%05lu %5ld", checksum, (total_bytes + 1024 - 1) / 1024); if (print_name > 1) printf (" %s", file); - PUTCHAR ('\n'); + putchar ('\n'); return 0; } @@ -192,7 +192,7 @@ sysv_sum_file (const char *file, int print_name) printf ("%lu %ld", checksum % 0xffff, (total_bytes + 512 - 1) / 512); if (print_name) printf (" %s", file); - PUTCHAR ('\n'); + putchar ('\n'); return 0; } @@ -252,7 +252,7 @@ main (int argc, char **argv) if ((*sum_func) (argv[optind], files_given) < 0) errors = 1; - if (have_read_stdin && FCLOSE (stdin) == EOF) + if (have_read_stdin && fclose (stdin) == EOF) error (EXIT_FAILURE, errno, "-"); exit (errors == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } -- cgit v1.2.3-54-g00ecf