summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-06-29 15:57:45 +0000
committerJim Meyering <jim@meyering.net>1998-06-29 15:57:45 +0000
commit257c5c4737ce0399316199903ae402ae9e794a84 (patch)
tree649dc55a3e71f5f0cc99fa9b3cb1bfe460536e38 /src/sum.c
parent391c960cba3d7207149f5148d99c068331add803 (diff)
downloadcoreutils-257c5c4737ce0399316199903ae402ae9e794a84.tar.xz
revert back to using lower case _unlocked wrapper names
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c14
1 files changed, 7 insertions, 7 deletions
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);
}