mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-03 06:51:29 +02:00
Change all uses of unlocked-wrapped functions to their upper case wrapper names.
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
+5
-5
@@ -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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -408,7 +408,7 @@ trace (fxn)
|
||||
printf ("%s:", fxn);
|
||||
for (a = args; *a; a++)
|
||||
printf (" %s", *a);
|
||||
putchar ('\n');
|
||||
PUTCHAR ('\n');
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
+11
-11
@@ -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. */
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
+13
-13
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+11
-11
@@ -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
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -66,7 +66,7 @@ print_uptime (int n, const STRUCT_UTMP *this)
|
||||
res = sscanf (buf, "%lf", &upsecs);
|
||||
if (res == 1)
|
||||
uptime = (time_t) upsecs;
|
||||
fclose (fp);
|
||||
FCLOSE (fp);
|
||||
}
|
||||
#endif /* HAVE_PROC_UPTIME */
|
||||
/* Loop through all the utmp entries we just read and count up the valid
|
||||
@@ -122,7 +122,7 @@ print_uptime (int n, const STRUCT_UTMP *this)
|
||||
#endif
|
||||
|
||||
if (loads == -1)
|
||||
putchar ('\n');
|
||||
PUTCHAR ('\n');
|
||||
else
|
||||
{
|
||||
if (loads > 0)
|
||||
@@ -132,7 +132,7 @@ print_uptime (int n, const STRUCT_UTMP *this)
|
||||
if (loads > 2)
|
||||
printf (", %.2f", avg[2]);
|
||||
if (loads > 0)
|
||||
putchar ('\n');
|
||||
PUTCHAR ('\n');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ list_entries_users (int n, const STRUCT_UTMP *this)
|
||||
int c;
|
||||
fputs (u[i], stdout);
|
||||
c = (i < n_entries - 1 ? ' ' : '\n');
|
||||
putchar (c);
|
||||
PUTCHAR (c);
|
||||
}
|
||||
|
||||
for (i = 0; i < n_entries; i++)
|
||||
|
||||
@@ -202,7 +202,7 @@ print_entry (const STRUCT_UTMP *utmp_ent)
|
||||
}
|
||||
#endif
|
||||
|
||||
putchar ('\n');
|
||||
PUTCHAR ('\n');
|
||||
}
|
||||
|
||||
/* Print the username of each valid entry and the number of valid entries
|
||||
|
||||
Reference in New Issue
Block a user