]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
revert back to using lower case _unlocked wrapper names
authorJim Meyering <jim@meyering.net>
Mon, 29 Jun 1998 15:59:39 +0000 (15:59 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 29 Jun 1998 15:59:39 +0000 (15:59 +0000)
src/df.c
src/dircolors.c
src/du.c
src/ls.c
src/remove.c
src/sys2.h

index 3b2c98278fd8d2af7a4340e78cbc2289000aed59..097cafccd6cc81381c0cfe97d3eb3291ad10b912 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -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
index 49039a8b69060af110f170f7f8bf56bb631f50f9..f1c0cbc6eedcda60392b0a7806f0f9a3b90a2b15 100644 (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);
index b78b7e4c878484d0ec4903f1240f6aca9fc14335..54b321bba5e2745c3a086d9baafc52d5146d15a1 100644 (file)
--- a/src/du.c
+++ b/src/du.c
@@ -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)
index d0285093335e123ea47e7f4c4e9848b5917a7aaf..fe37c2a01361396197cb38ad5bbf8c312ae3d847 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -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++;
        }
     }
index 99337ad555625515e1f5686a1f234fb8957bc0e2..7a6585bd10e593c69531f76aafa3de10467d26eb 100644 (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);
 
index 09eb937d898a7607034618799569d0dd0ec186df..16e2db53b7af4208d87d27cf622c67f53d5acfb5 100644 (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