summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-06-29 16:24:01 +0000
committerJim Meyering <jim@meyering.net>1998-06-29 16:24:01 +0000
commitf3c14cb59f66ab6cbfa199cbcbd1ade1c141a003 (patch)
tree7f6ed88bc79c3bcd0820015f2e85dfe8be43f47f /src
parent8ba97d963e065c7bc711c4ffa921fd3b06ed8aff (diff)
downloadcoreutils-f3c14cb59f66ab6cbfa199cbcbd1ade1c141a003.tar.xz
revert back to using lower case _unlocked wrapper names
Diffstat (limited to 'src')
-rw-r--r--src/date.c4
-rw-r--r--src/echo.c10
-rw-r--r--src/expr.c2
-rw-r--r--src/factor.c2
-rw-r--r--src/hostid.c2
-rw-r--r--src/id.c8
-rw-r--r--src/pinky.c22
-rw-r--r--src/printenv.c2
-rw-r--r--src/printf.c26
-rw-r--r--src/spline.c2
-rw-r--r--src/stty.c22
-rw-r--r--src/test.c2
-rw-r--r--src/tty.c2
-rw-r--r--src/yes.c2
14 files changed, 54 insertions, 54 deletions
diff --git a/src/date.c b/src/date.c
index 5902ba1e5..3e4612e0c 100644
--- a/src/date.c
+++ b/src/date.c
@@ -182,7 +182,7 @@ batch_convert (const char *input_filename, const char *format)
free (initial_TZ);
- if (FCLOSE (in_stream) == EOF)
+ if (fclose (in_stream) == EOF)
error (2, errno, input_filename);
if (line != NULL)
@@ -353,7 +353,7 @@ argument must be a format string beginning with `+'."),
show_date (format, when);
}
- if (FCLOSE (stdout) == EOF)
+ if (fclose (stdout) == EOF)
error (2, errno, _("write error"));
exit (status);
diff --git a/src/echo.c b/src/echo.c
index 7ba50f3ac..345070a87 100644
--- a/src/echo.c
+++ b/src/echo.c
@@ -205,15 +205,15 @@ just_echo:
c = c * 8 + (*s++ - '0');
break;
case '\\': break;
- default: PUTCHAR ('\\'); break;
+ default: putchar ('\\'); break;
}
}
- PUTCHAR(c);
+ putchar(c);
}
argc--;
argv++;
if (argc > 0)
- PUTCHAR(' ');
+ putchar(' ');
}
}
else
@@ -225,11 +225,11 @@ just_echo:
argc--;
argv++;
if (argc > 0)
- PUTCHAR (' ');
+ putchar (' ');
}
}
}
if (display_return)
- PUTCHAR ('\n');
+ putchar ('\n');
exit (0);
}
diff --git a/src/expr.c b/src/expr.c
index 3af67c446..abeae7e3e 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -408,7 +408,7 @@ trace (fxn)
printf ("%s:", fxn);
for (a = args; *a; a++)
printf (" %s", *a);
- PUTCHAR ('\n');
+ putchar ('\n');
}
#endif
diff --git a/src/factor.c b/src/factor.c
index ee66c8aee..843c58896 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -137,7 +137,7 @@ print_factors (const char *s)
printf ("%lu:", n);
for (i = 0; i < n_factors; i++)
printf (" %lu", factors[i]);
- PUTCHAR ('\n');
+ putchar ('\n');
return 0;
}
diff --git a/src/hostid.c b/src/hostid.c
index b3a821e51..f7a31fa12 100644
--- a/src/hostid.c
+++ b/src/hostid.c
@@ -73,7 +73,7 @@ main (int argc, char **argv)
id = gethostid ();
printf ("%lx\n", id);
- if (FCLOSE (stdout) == EOF)
+ if (fclose (stdout) == EOF)
error (EXIT_FAILURE, errno, _("write error"));
exit (EXIT_SUCCESS);
diff --git a/src/id.c b/src/id.c
index e32eda596..9371a32d0 100644
--- a/src/id.c
+++ b/src/id.c
@@ -170,7 +170,7 @@ main (int argc, char **argv)
print_group_list (argv[optind]);
else
print_full_info (argv[optind]);
- PUTCHAR ('\n');
+ putchar ('\n');
exit (problems != 0);
}
@@ -261,7 +261,7 @@ print_group_list (const char *username)
print_group (rgid);
if (egid != rgid)
{
- PUTCHAR (' ');
+ putchar (' ');
print_group (egid);
}
@@ -280,7 +280,7 @@ print_group_list (const char *username)
for (i = 0; i < n_groups; i++)
if (groups[i] != rgid && groups[i] != egid)
{
- PUTCHAR (' ');
+ putchar (' ');
print_group (groups[i]);
}
free (groups);
@@ -347,7 +347,7 @@ print_full_info (const char *username)
for (i = 0; i < n_groups; i++)
{
if (i > 0)
- PUTCHAR (',');
+ putchar (',');
printf ("%u", (unsigned) groups[i]);
grp = getgrgid (groups[i]);
if (grp == NULL)
diff --git a/src/pinky.c b/src/pinky.c
index 96531f8e4..db230bf0b 100644
--- a/src/pinky.c
+++ b/src/pinky.c
@@ -221,7 +221,7 @@ print_entry (const STRUCT_UTMP *utmp_ent)
}
#endif
- PUTCHAR ('\n');
+ putchar ('\n');
}
/* Display a verbose line of information about UTMP_ENT. */
@@ -252,7 +252,7 @@ print_long_entry (const char name[])
printf (" %s", pw->pw_gecos);
}
- PUTCHAR ('\n');
+ putchar ('\n');
if (include_home_and_shell)
{
@@ -260,7 +260,7 @@ print_long_entry (const char name[])
printf ("%-29s", pw->pw_dir);
printf (_("Shell: "));
printf (" %s", pw->pw_shell);
- PUTCHAR ('\n');
+ putchar ('\n');
}
if (include_project)
@@ -281,9 +281,9 @@ print_long_entry (const char name[])
printf (_("Project: "));
- while ((bytes = FREAD (buf, 1, sizeof (buf), stream)) > 0)
- FWRITE (buf, 1, bytes, stdout);
- FCLOSE (stream);
+ while ((bytes = fread (buf, 1, sizeof (buf), stream)) > 0)
+ fwrite (buf, 1, bytes, stdout);
+ fclose (stream);
}
free (project);
@@ -307,15 +307,15 @@ print_long_entry (const char name[])
printf (_("Plan:\n"));
- while ((bytes = FREAD (buf, 1, sizeof (buf), stream)) > 0)
- FWRITE (buf, 1, bytes, stdout);
- FCLOSE (stream);
+ while ((bytes = fread (buf, 1, sizeof (buf), stream)) > 0)
+ fwrite (buf, 1, bytes, stdout);
+ fclose (stream);
}
free (plan);
}
- PUTCHAR ('\n');
+ putchar ('\n');
}
/* Print the username of each valid entry and the number of valid entries
@@ -335,7 +335,7 @@ print_heading (void)
if (include_where)
printf (" %s", _("Where"));
#endif
- PUTCHAR ('\n');
+ putchar ('\n');
}
/* Display UTMP_BUF, which should have N entries. */
diff --git a/src/printenv.c b/src/printenv.c
index b92e60725..5ff7b2d5b 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -136,7 +136,7 @@ main (int argc, char **argv)
exit_status = (matches != argc - optind);
}
- if (FERROR (stdout) || fclose (stdout) == EOF)
+ if (ferror (stdout) || fclose (stdout) == EOF)
error (2, errno, _("standard output"));
exit (exit_status);
diff --git a/src/printf.c b/src/printf.c
index 892f23c5d..be7403394 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -180,31 +180,31 @@ print_esc_char (int c)
switch (c)
{
case 'a': /* Alert. */
- PUTCHAR (7);
+ putchar (7);
break;
case 'b': /* Backspace. */
- PUTCHAR (8);
+ putchar (8);
break;
case 'c': /* Cancel the rest of the output. */
exit (0);
break;
case 'f': /* Form feed. */
- PUTCHAR (12);
+ putchar (12);
break;
case 'n': /* New line. */
- PUTCHAR (10);
+ putchar (10);
break;
case 'r': /* Carriage return. */
- PUTCHAR (13);
+ putchar (13);
break;
case 't': /* Horizontal tab. */
- PUTCHAR (9);
+ putchar (9);
break;
case 'v': /* Vertical tab. */
- PUTCHAR (11);
+ putchar (11);
break;
default:
- PUTCHAR (c);
+ putchar (c);
break;
}
}
@@ -229,7 +229,7 @@ print_esc (const char *escstart)
esc_value = esc_value * 16 + hextobin (*p);
if (esc_length == 0)
error (1, 0, _("missing hexadecimal number in escape"));
- PUTCHAR (esc_value);
+ putchar (esc_value);
}
else if (*p == '0')
{
@@ -237,7 +237,7 @@ print_esc (const char *escstart)
esc_length < 3 && isodigit (*p);
++esc_length, ++p)
esc_value = esc_value * 8 + octtobin (*p);
- PUTCHAR (esc_value);
+ putchar (esc_value);
}
else if (strchr ("\"\\abcfnrtv", *p))
print_esc_char (*p++);
@@ -255,7 +255,7 @@ print_esc_string (const char *str)
if (*str == '\\')
str += print_esc (str);
else
- PUTCHAR (*str);
+ putchar (*str);
}
/* Output a % directive. START is the start of the directive,
@@ -382,7 +382,7 @@ print_formatted (const char *format, int argc, char **argv)
field_width = precision = -1;
if (*f == '%')
{
- PUTCHAR ('%');
+ putchar ('%');
break;
}
if (*f == 'b')
@@ -468,7 +468,7 @@ print_formatted (const char *format, int argc, char **argv)
break;
default:
- PUTCHAR (*f);
+ putchar (*f);
}
}
diff --git a/src/spline.c b/src/spline.c
index 70379c31c..c6296cd95 100644
--- a/src/spline.c
+++ b/src/spline.c
@@ -253,7 +253,7 @@ char **argv;
getdata(fdinp); /* Read data from fdinp. */
if (fdinp != stdin)
- FCLOSE(fdinp); /* Close input data file. */
+ fclose(fdinp); /* Close input data file. */
if (nknots == 0) {
error(NODATA, datafile);
}
diff --git a/src/stty.c b/src/stty.c
index 95988c5bb..ba98e4ef3 100644
--- a/src/stty.c
+++ b/src/stty.c
@@ -464,12 +464,12 @@ wrapf (const char *message,...)
buflen = strlen (buf);
if (current_col + (current_col > 0) + buflen >= max_col)
{
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
}
if (current_col > 0)
{
- PUTCHAR (' ');
+ putchar (' ');
current_col++;
}
fputs (buf, stdout);
@@ -1447,7 +1447,7 @@ display_changed (struct termios *mode)
#ifdef HAVE_C_LINE
wrapf ("line = %d;", mode->c_line);
#endif
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
empty_line = 1;
@@ -1478,7 +1478,7 @@ display_changed (struct termios *mode)
(int) mode->c_cc[VTIME]);
}
else if (empty_line == 0)
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
empty_line = 1;
@@ -1490,7 +1490,7 @@ display_changed (struct termios *mode)
{
if (empty_line == 0)
{
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
empty_line = 1;
}
@@ -1514,7 +1514,7 @@ display_changed (struct termios *mode)
}
}
if (empty_line == 0)
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
}
@@ -1533,7 +1533,7 @@ display_all (struct termios *mode, int fd, const char *device_name)
#ifdef HAVE_C_LINE
wrapf ("line = %d;", mode->c_line);
#endif
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
for (i = 0; ! STREQ (control_info[i].name, "min"); ++i)
@@ -1558,7 +1558,7 @@ display_all (struct termios *mode, int fd, const char *device_name)
#endif
wrapf ("min = %d; time = %d;", mode->c_cc[VMIN], mode->c_cc[VTIME]);
if (current_col != 0)
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
for (i = 0; mode_info[i].name != NULL; ++i)
@@ -1567,7 +1567,7 @@ display_all (struct termios *mode, int fd, const char *device_name)
continue;
if (mode_info[i].type != prev_type)
{
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
prev_type = mode_info[i].type;
}
@@ -1579,7 +1579,7 @@ display_all (struct termios *mode, int fd, const char *device_name)
else if (mode_info[i].flags & REV)
wrapf ("-%s", mode_info[i].name);
}
- PUTCHAR ('\n');
+ putchar ('\n');
current_col = 0;
}
@@ -1607,7 +1607,7 @@ display_recoverable (struct termios *mode)
(unsigned long) mode->c_cflag, (unsigned long) mode->c_lflag);
for (i = 0; i < NCCS; ++i)
printf (":%x", (unsigned int) mode->c_cc[i]);
- PUTCHAR ('\n');
+ putchar ('\n');
}
static int
diff --git a/src/test.c b/src/test.c
index 1d06348ae..542048dac 100644
--- a/src/test.c
+++ b/src/test.c
@@ -134,7 +134,7 @@ test_syntax_error (char *format, char *arg)
{
fprintf (stderr, "%s: ", argv[0]);
fprintf (stderr, format, arg);
- FFLUSH (stderr);
+ fflush (stderr);
test_exit (SHELL_BOOLEAN (FALSE));
}
diff --git a/src/tty.c b/src/tty.c
index 7a2d9deac..a96faead2 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
else
puts (_("not a tty"));
- if (FERROR (stdout) || fclose (stdout) == EOF)
+ if (ferror (stdout) || fclose (stdout) == EOF)
error (3, errno, _("standard output"));
}
diff --git a/src/yes.c b/src/yes.c
index 8d0df1b36..bd9628f01 100644
--- a/src/yes.c
+++ b/src/yes.c
@@ -70,7 +70,7 @@ main (int argc, char **argv)
for (i = 1; i < argc; i++)
{
fputs (argv[i], stdout);
- PUTCHAR (i == argc - 1 ? '\n' : ' ');
+ putchar (i == argc - 1 ? '\n' : ' ');
}
}
}