revert back to using lower case _unlocked wrapper names

This commit is contained in:
Jim Meyering
1998-06-29 15:59:39 +00:00
parent 257c5c4737
commit 83d4b736d2
6 changed files with 48 additions and 72 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
#endif
printf (" %s", mount_point);
}
PUTCHAR ('\n');
putchar ('\n');
}
/* Identify the directory, if any, that device
+5 -5
View File
@@ -397,7 +397,7 @@ dc_parse_file (const char *filename)
err = dc_parse_stream (fp, filename);
if (fp != stdin && FCLOSE (fp) == EOF)
if (fp != stdin && fclose (fp) == EOF)
{
error (0, errno, "%s", filename);
return 1;
@@ -472,8 +472,8 @@ dircolors' internal database"));
int i;
for (i = 0; i < G_N_LINES; i++)
{
FWRITE (G_line[i], 1, G_line_length[i], stdout);
FPUTC ('\n', stdout);
fwrite (G_line[i], 1, G_line_length[i], stdout);
fputc ('\n', stdout);
}
}
else
@@ -513,14 +513,14 @@ dircolors' internal database"));
suffix = "'\n";
}
fputs (prefix, stdout);
FWRITE (s, 1, len, stdout);
fwrite (s, 1, len, stdout);
fputs (suffix, stdout);
}
}
close_stdout ();
if (have_read_stdin && FCLOSE (stdin) == EOF)
if (have_read_stdin && fclose (stdin) == EOF)
error (EXIT_FAILURE, errno, _("standard input"));
exit (err == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
+1 -1
View File
@@ -408,7 +408,7 @@ print_size (uintmax_t n_blocks, const char *string)
printf ("%s\t%s\n",
human_readable (n_blocks, buf, ST_NBLOCKSIZE, output_block_size),
string);
FFLUSH (stdout);
fflush (stdout);
}
/* Recursively print the sizes of the directories (and, if selected, files)
+13 -13
View File
@@ -566,7 +566,7 @@ static char const *const time_args[] =
and later output themselves. */
static size_t dired_pos;
#define DIRED_PUTCHAR(c) do {PUTCHAR ((c)); ++dired_pos;} while (0)
#define DIRED_PUTCHAR(c) do {putchar ((c)); ++dired_pos;} while (0)
/* Write S to STREAM and increment DIRED_POS by S_LEN. */
#define DIRED_FPUTS(s, stream, s_len) \
@@ -2131,7 +2131,7 @@ print_current_files (void)
for (i = 0; i < files_index; i++)
{
print_file_name_and_frills (files + i);
PUTCHAR ('\n');
putchar ('\n');
}
break;
@@ -2366,7 +2366,7 @@ quote_name (FILE *out, const char *p, struct quoting_options const *options)
buf[i] = '?';
}
FWRITE (buf, 1, len, out);
fwrite (buf, 1, len, out);
return len;
}
@@ -2533,7 +2533,7 @@ put_indicator (const struct bin_str *ind)
p = ind->string;
for (i = ind->len; i > 0; --i)
PUTCHAR (*(p++));
putchar (*(p++));
}
static int
@@ -2651,7 +2651,7 @@ print_many_per_line (void)
indent (pos + name_length, pos + max_name_length);
pos += max_name_length;
}
PUTCHAR ('\n');
putchar ('\n');
}
}
@@ -2720,7 +2720,7 @@ print_horizontal (void)
if (col == 0)
{
PUTCHAR ('\n');
putchar ('\n');
pos = 0;
}
else
@@ -2734,7 +2734,7 @@ print_horizontal (void)
name_length = length_of_file_name_and_frills (files + filesno);
max_name_length = line_fmt->col_arr[col];
}
PUTCHAR ('\n');
putchar ('\n');
}
static void
@@ -2755,18 +2755,18 @@ print_with_commas (void)
if (old_pos != 0 && pos >= line_length)
{
PUTCHAR ('\n');
putchar ('\n');
pos -= old_pos;
}
print_file_name_and_frills (files + filesno);
if (filesno + 1 < files_index)
{
PUTCHAR (',');
PUTCHAR (' ');
putchar (',');
putchar (' ');
}
}
PUTCHAR ('\n');
putchar ('\n');
}
/* Assuming cursor is at position FROM, indent up to position TO.
@@ -2779,12 +2779,12 @@ indent (int from, int to)
{
if (tabsize > 0 && to / tabsize > (from + 1) / tabsize)
{
PUTCHAR ('\t');
putchar ('\t');
from += tabsize - from % tabsize;
}
else
{
PUTCHAR (' ');
putchar (' ');
from++;
}
}
+4 -4
View File
@@ -155,7 +155,7 @@ print_nth_dir (FILE *stream, unsigned int depth)
sum += length[i];
}
FWRITE (dir_name, 1, sum, stream);
fwrite (dir_name, 1, sum, stream);
}
static inline struct active_dir_ent *
@@ -801,10 +801,10 @@ NOTIFY YOUR SYSTEM MANAGER.\n\
The following two directories have the same inode number:\n"));
/* FIXME: test this!! */
print_nth_dir (stderr, current_depth ());
FPUTC ('\n', stderr);
fputc ('\n', stderr);
print_nth_dir (stderr, old_ent->depth);
FPUTC ('\n', stderr);
FFLUSH (stderr);
fputc ('\n', stderr);
fflush (stderr);
free (old_ent);
+24 -48
View File
@@ -162,86 +162,62 @@ off_t lseek ();
are more efficient but not thread-safe. That they're not thread-safe
is fine since all these applications are single threaded. */
#undef CLEARERR
#ifdef HAVE_CLEARERR_UNLOCKED
# define CLEARERR(S) clearerr_unlocked (S)
#else
# define CLEARERR(S) clearerr (S)
# undef clearerr
# define clearerr(S) clearerr_unlocked (S)
#endif
#undef FCLOSE
#ifdef HAVE_FCLOSE_UNLOCKED
# define FCLOSE(S) fclose_unlocked (S)
#else
# define FCLOSE(S) fclose (S)
# undef fclose
# define fclose(S) fclose_unlocked (S)
#endif
#undef FEOF
#ifdef HAVE_FEOF_UNLOCKED
# define FEOF(S) feof_unlocked (S)
#else
# define FEOF(S) feof (S)
# undef feof
# define feof(S) feof_unlocked (S)
#endif
#undef FERROR
#ifdef HAVE_FERROR_UNLOCKED
# define FERROR(S) ferror_unlocked (S)
#else
# define FERROR(S) ferror (S)
# undef ferror
# define ferror(S) ferror_unlocked (S)
#endif
#undef FFLUSH
#ifdef HAVE_FFLUSH_UNLOCKED
# define FFLUSH(S) fflush_unlocked (S)
#else
# define FFLUSH(S) fflush (S)
# undef fflush
# define fflush(S) fflush_unlocked (S)
#endif
#undef FPUTC
#ifdef HAVE_FPUTC_UNLOCKED
# define FPUTC(C, S) fputc_unlocked (C, S)
#else
# define FPUTC(C, S) fputc (C, S)
# undef fputc
# define fputc(C, S) fputc_unlocked (C, S)
#endif
#undef FREAD
#ifdef HAVE_FREAD_UNLOCKED
# define FREAD(P, Z, N, S) fread_unlocked (P, Z, N, S)
#else
# define FREAD(P, Z, N, S) fread (P, Z, N, S)
# undef fread
# define fread(P, Z, N, S) fread_unlocked (P, Z, N, S)
#endif
#undef FWRITE
#ifdef HAVE_FWRITE_UNLOCKED
# define FWRITE(P, Z, N, S) fwrite_unlocked (P, Z, N, S)
#else
# define FWRITE(P, Z, N, S) fwrite (P, Z, N, S)
# undef fwrite
# define fwrite(P, Z, N, S) fwrite_unlocked (P, Z, N, S)
#endif
#undef GETC
#ifdef HAVE_GETC_UNLOCKED
# define GETC(S) getc_unlocked (S)
#else
# define GETC(S) getc (S)
# undef getc
# define getc(S) getc_unlocked (S)
#endif
#undef GETCHAR
#ifdef HAVE_GETCHAR_UNLOCKED
# define GETCHAR(S) getchar_unlocked (S)
#else
# define GETCHAR(S) getchar (S)
# undef getchar
# define getchar(S) getchar_unlocked (S)
#endif
#undef PUTC
#ifdef HAVE_PUTC_UNLOCKED
# define PUTC(C, S) putc_unlocked (C, S)
#else
# define PUTC(C, S) putc (C, S)
# undef putc
# define putc(C, S) putc_unlocked (C, S)
#endif
#undef PUTCHAR
#ifdef HAVE_PUTCHAR_UNLOCKED
# define PUTCHAR(C) putchar_unlocked (C)
#else
# define PUTCHAR(C) putchar (C)
# undef putchar
# define putchar(C) putchar_unlocked (C)
#endif