coreutils
[Top][All Lists]
Advanced

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

[PATCH] maint: adjust split.c formatting to conform


From: Jim Meyering
Subject: [PATCH] maint: adjust split.c formatting to conform
Date: Sat, 30 Apr 2011 15:21:35 +0200

FYI, I've just pushed this.  No semantic change:

>From b83d2896854de3823665d32630fb68e2c887c17b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 30 Apr 2011 07:48:08 +0200
Subject: [PATCH] maint: adjust split.c formatting to conform

* src/split.c (usage): Correct indentation.
(ofile_open): Likewise.
(create): "char *name", not "char* name".
(struct of_info) [ofile]: Similar.
(parse_chunk): Add spaces around "+".
---
 src/split.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/split.c b/src/split.c
index 3a630a0..65e44dd 100644
--- a/src/split.c
+++ b/src/split.c
@@ -105,7 +105,7 @@ static struct option const longopts[] =
   {"numeric-suffixes", no_argument, NULL, 'd'},
   {"verbose", no_argument, NULL, VERBOSE_OPTION},
   {"-io-blksize", required_argument, NULL,
-    IO_BLKSIZE_OPTION}, /* do not document */
+   IO_BLKSIZE_OPTION}, /* do not document */
   {GETOPT_HELP_OPTION_DECL},
   {GETOPT_VERSION_OPTION_DECL},
   {NULL, 0, NULL, 0}
@@ -155,7 +155,7 @@ usage (int status)
 Usage: %s [OPTION]... [INPUT [PREFIX]]\n\
 "),
               program_name);
-    fputs (_("\
+      fputs (_("\
 Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default\n\
 size is 1000 lines, and default PREFIX is `x'.  With no INPUT, or when INPUT\n\
 is -, read standard input.\n\
@@ -181,7 +181,7 @@ Mandatory arguments to long options are mandatory for short 
options too.\n\
       fputs (HELP_OPTION_DESCRIPTION, stdout);
       fputs (VERSION_OPTION_DESCRIPTION, stdout);
       emit_size_note ();
-fputs (_("\n\
+      fputs (_("\n\
 CHUNKS may be:\n\
 N       split into N files based on size of input\n\
 K/N     output Kth of N to stdout\n\
@@ -254,7 +254,7 @@ next_file_name (void)
 /* Create or truncate a file.  */

 static int
-create (const char* name)
+create (const char *name)
 {
   if (verbose)
     fprintf (stdout, _("creating file %s\n"), quote (name));
@@ -574,7 +574,7 @@ typedef struct of_info
 {
   char *of_name;
   int ofd;
-  FILE* ofile;
+  FILE *ofile;
 } of_t;

 enum
@@ -616,9 +616,9 @@ ofile_open (of_t *files, size_t i_check, size_t nfiles)
                  from the fifo, terminating on conditions in the data
                  itself, or perhaps never in the case of `tail -f`.
                  I.E. for fifos it is valid to attempt this reopen.  */
-               fd = open (files[i_check].of_name,
-                          O_WRONLY | O_BINARY | O_APPEND | O_NONBLOCK);
-             }
+              fd = open (files[i_check].of_name,
+                         O_WRONLY | O_BINARY | O_APPEND | O_NONBLOCK);
+            }

           if (-1 < fd)
             break;
@@ -779,9 +779,9 @@ static void
 parse_chunk (uintmax_t *k_units, uintmax_t *n_units, char *slash)
 {
   *slash = '\0';
-  if (xstrtoumax (slash+1, NULL, 10, n_units, "") != LONGINT_OK
+  if (xstrtoumax (slash + 1, NULL, 10, n_units, "") != LONGINT_OK
       || *n_units == 0)
-    error (EXIT_FAILURE, 0, _("%s: invalid number of chunks"), slash+1);
+    error (EXIT_FAILURE, 0, _("%s: invalid number of chunks"), slash + 1);
   if (slash != optarg           /* a leading number is specified.  */
       && (xstrtoumax (optarg, NULL, 10, k_units, "") != LONGINT_OK
           || *k_units == 0 || *n_units < *k_units))
--
1.7.5.134.g1c08b



reply via email to

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