coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] [PATCH 4/4] maint: make spacing around "=" consistent, even


From: Jim Meyering
Subject: [coreutils] [PATCH 4/4] maint: make spacing around "=" consistent, even in IF_LINT
Date: Mon, 31 May 2010 11:12:18 +0200

From: Jim Meyering <address@hidden>

E.g.,
  -  size_t desired_width IF_LINT (= 0);
  +  size_t desired_width IF_LINT ( = 0);
Use this command:
  g grep -l IF_LINT | grep '\.[ch]$' \
    | xargs perl -pi -e 's/(IF_LINT \()= /$1 = /'
---
 src/chmod.c    |    4 ++--
 src/copy.c     |    2 +-
 src/cp.c       |    2 +-
 src/cut.c      |    2 +-
 src/df.c       |    2 +-
 src/expand.c   |    4 ++--
 src/expr.c     |    2 +-
 src/ls.c       |    2 +-
 src/md5sum.c   |    4 ++--
 src/od.c       |    4 ++--
 src/paste.c    |    4 ++--
 src/pr.c       |    2 +-
 src/shred.c    |    4 ++--
 src/sort.c     |    2 +-
 src/truncate.c |    2 +-
 src/unexpand.c |    6 +++---
 src/uniq.c     |    4 ++--
 17 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/chmod.c b/src/chmod.c
index 3dab92e..83f6783 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -180,8 +180,8 @@ process_file (FTS *fts, FTSENT *ent)
   char const *file_full_name = ent->fts_path;
   char const *file = ent->fts_accpath;
   const struct stat *file_stats = ent->fts_statp;
-  mode_t old_mode IF_LINT (= 0);
-  mode_t new_mode IF_LINT (= 0);
+  mode_t old_mode IF_LINT ( = 0);
+  mode_t new_mode IF_LINT ( = 0);
   bool ok = true;
   bool chmod_succeeded = false;

diff --git a/src/copy.c b/src/copy.c
index 78c97cc..171499c 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1242,7 +1242,7 @@ copy_internal (char const *src_name, char const *dst_name,
   struct stat src_sb;
   struct stat dst_sb;
   mode_t src_mode;
-  mode_t dst_mode IF_LINT (= 0);
+  mode_t dst_mode IF_LINT ( = 0);
   mode_t dst_mode_bits;
   mode_t omitted_permissions;
   bool restore_dst_mode = false;
diff --git a/src/cp.c b/src/cp.c
index cc958d1..0355269 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -405,7 +405,7 @@ make_dir_parents_private (char const *const_dir, size_t 
src_offset,
         slash++;
       while ((slash = strchr (slash, '/')))
         {
-          struct dir_attr *new IF_LINT (= NULL);
+          struct dir_attr *new IF_LINT ( = NULL);
           bool missing_dir;

           *slash = '\0';
diff --git a/src/cut.c b/src/cut.c
index 8c93c89..5fcf074 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -756,7 +756,7 @@ main (int argc, char **argv)
   int optc;
   bool ok;
   bool delim_specified = false;
-  char *spec_list_string IF_LINT (= NULL);
+  char *spec_list_string IF_LINT ( = NULL);

   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
diff --git a/src/df.c b/src/df.c
index 40011f8..f47b3fc 100644
--- a/src/df.c
+++ b/src/df.c
@@ -850,7 +850,7 @@ Mandatory arguments to long options are mandatory for short 
options too.\n\
 int
 main (int argc, char **argv)
 {
-  struct stat *stats IF_LINT (= 0);
+  struct stat *stats IF_LINT ( = 0);

   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
diff --git a/src/expand.c b/src/expand.c
index 6a04d36..be50063 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -144,8 +144,8 @@ static void
 parse_tab_stops (char const *stops)
 {
   bool have_tabval = false;
-  uintmax_t tabval IF_LINT (= 0);
-  char const *num_start IF_LINT (= NULL);
+  uintmax_t tabval IF_LINT ( = 0);
+  char const *num_start IF_LINT ( = NULL);
   bool ok = true;

   for (; *stops; stops++)
diff --git a/src/expr.c b/src/expr.c
index 1ebb4b9..dbeaeba 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -547,7 +547,7 @@ trace (fxn)
 static VALUE *
 docolon (VALUE *sv, VALUE *pv)
 {
-  VALUE *v IF_LINT (= NULL);
+  VALUE *v IF_LINT ( = NULL);
   const char *errmsg;
   struct re_pattern_buffer re_buffer;
   char fastmap[UCHAR_MAX + 1];
diff --git a/src/ls.c b/src/ls.c
index 3c04438..9549130 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -3849,7 +3849,7 @@ quote_name (FILE *out, const char *name, struct 
quoting_options const *options,
   char smallbuf[BUFSIZ];
   size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, name, -1, options);
   char *buf;
-  size_t displayed_width IF_LINT (= 0);
+  size_t displayed_width IF_LINT ( = 0);

   if (len < sizeof smallbuf)
     buf = smallbuf;
diff --git a/src/md5sum.c b/src/md5sum.c
index edd21ce..cbf1986 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -460,9 +460,9 @@ digest_check (const char *checkfile_name)
   line_chars_allocated = 0;
   do
     {
-      char *filename IF_LINT (= NULL);
+      char *filename IF_LINT ( = NULL);
       int binary;
-      unsigned char *hex_digest IF_LINT (= NULL);
+      unsigned char *hex_digest IF_LINT ( = NULL);
       ssize_t line_length;

       ++line_number;
diff --git a/src/od.c b/src/od.c
index cde3bf9..1d106b1 100644
--- a/src/od.c
+++ b/src/od.c
@@ -1513,7 +1513,7 @@ main (int argc, char **argv)
   int n_files;
   size_t i;
   int l_c_m;
-  size_t desired_width IF_LINT (= 0);
+  size_t desired_width IF_LINT ( = 0);
   bool modern = false;
   bool width_specified = false;
   bool ok = true;
@@ -1522,7 +1522,7 @@ main (int argc, char **argv)

   /* The old-style `pseudo starting address' to be printed in parentheses
      after any true address.  */
-  uintmax_t pseudo_start IF_LINT (= 0);
+  uintmax_t pseudo_start IF_LINT ( = 0);

   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
diff --git a/src/paste.c b/src/paste.c
index ca2847f..36e1cfb 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -231,8 +231,8 @@ paste_parallel (size_t nfiles, char **fnamptr)

       for (i = 0; i < nfiles && files_open; i++)
         {
-          int chr IF_LINT (= 0);       /* Input character. */
-          int err IF_LINT (= 0);       /* Input errno value.  */
+          int chr IF_LINT ( = 0);      /* Input character. */
+          int err IF_LINT ( = 0);      /* Input errno value.  */
           size_t line_length = 0;      /* Number of chars in line. */

           if (fileptr[i])
diff --git a/src/pr.c b/src/pr.c
index 9d4c90f..f942151 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -2437,7 +2437,7 @@ static bool
 read_line (COLUMN *p)
 {
   int c;
-  int chars IF_LINT (= 0);
+  int chars IF_LINT ( = 0);
   int last_input_position;
   int j, k;
   COLUMN *q;
diff --git a/src/shred.c b/src/shred.c
index 659ac5a..1da197f 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -365,7 +365,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type,
 {
   off_t size = *sizep;
   off_t offset;                        /* Current file posiiton */
-  time_t thresh IF_LINT (= 0); /* Time to maybe print next status update */
+  time_t thresh IF_LINT ( = 0);        /* Time to maybe print next status 
update */
   time_t now = 0;              /* Current time */
   size_t lim;                  /* Amount of data to try writing */
   size_t soff;                 /* Offset into buffer for next write */
@@ -388,7 +388,7 @@ dopass (int fd, char const *qname, off_t *sizep, int type,

   /* Printable previous offset into the file */
   char previous_offset_buf[LONGEST_HUMAN_READABLE + 1];
-  char const *previous_human_offset IF_LINT (= 0);
+  char const *previous_human_offset IF_LINT ( = 0);

   if (lseek (fd, 0, SEEK_SET) == -1)
     {
diff --git a/src/sort.c b/src/sort.c
index 41194ba..5c3da0c 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -945,7 +945,7 @@ pipe_fork (int pipefds[2], size_t tries)
   struct tempnode *saved_temphead;
   int saved_errno;
   double wait_retry = 0.25;
-  pid_t pid IF_LINT (= -1);
+  pid_t pid IF_LINT ( = -1);
   struct cs_status cs;

   if (pipe (pipefds) < 0)
diff --git a/src/truncate.c b/src/truncate.c
index 493f7f7..610787d 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -228,7 +228,7 @@ int
 main (int argc, char **argv)
 {
   bool got_size = false;
-  off_t size IF_LINT (= 0);
+  off_t size IF_LINT ( = 0);
   off_t rsize = -1;
   rel_mode_t rel_mode = rm_abs;
   mode_t omode;
diff --git a/src/unexpand.c b/src/unexpand.c
index a3bb4a8..e9e5c6a 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -163,8 +163,8 @@ static void
 parse_tab_stops (char const *stops)
 {
   bool have_tabval = false;
-  uintmax_t tabval IF_LINT (= 0);
-  char const *num_start IF_LINT (= NULL);
+  uintmax_t tabval IF_LINT ( = 0);
+  char const *num_start IF_LINT ( = NULL);
   bool ok = true;

   for (; *stops; stops++)
@@ -450,7 +450,7 @@ int
 main (int argc, char **argv)
 {
   bool have_tabval = false;
-  uintmax_t tabval IF_LINT (= 0);
+  uintmax_t tabval IF_LINT ( = 0);
   int c;

   /* If true, cancel the effect of any -a (explicit or implicit in -t),
diff --git a/src/uniq.c b/src/uniq.c
index 1f59469..df59b12 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -301,8 +301,8 @@ check_file (const char *infile, const char *outfile, char 
delimiter)

   if (output_unique && output_first_repeated && countmode == count_none)
     {
-      char *prevfield IF_LINT (= NULL);
-      size_t prevlen IF_LINT (= 0);
+      char *prevfield IF_LINT ( = NULL);
+      size_t prevlen IF_LINT ( = 0);

       while (!feof (stdin))
         {
-- 
1.7.1.348.gb26ba




reply via email to

[Prev in Thread] Current Thread [Next in Thread]