indent cpp directives to reflect nesting
authorJim Meyering <jim@meyering.net>
Tue, 7 Oct 1997 23:58:29 +0000 (23:58 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 7 Oct 1997 23:58:29 +0000 (23:58 +0000)
src/cat.c
src/cksum.c
src/csplit.c
src/fmt.c
src/nl.c
src/paste.c

index 48b2ca9..0768986 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -28,7 +28,7 @@
 #include <getopt.h>
 #include <sys/types.h>
 #ifndef _POSIX_SOURCE
-#include <sys/ioctl.h>
+# include <sys/ioctl.h>
 #endif
 #include "system.h"
 #include "error.h"
@@ -279,9 +279,9 @@ cat (
                     Irix-5 returns ENOSYS on pipes.  */
                  if (errno == EOPNOTSUPP || errno == ENOTTY
                      || errno == EINVAL || errno == ENODEV
-#ifdef ENOSYS
+# ifdef ENOSYS
                      || errno == ENOSYS
-#endif
+# endif
                      )
                    use_fionread = 0;
                  else
index 42cd8d4..77588fd 100644 (file)
 
 #ifdef CRCTAB
 
-#include <stdio.h>
+# include <stdio.h>
 
-#define BIT(x) ( (unsigned long)1 << (x) )
-#define SBIT   BIT(31)
+# define BIT(x)        ( (unsigned long)1 << (x) )
+# define SBIT  BIT(31)
 
 /* The generating polynomial is
 
@@ -56,7 +56,7 @@
 
   The i bit in GEN is set if X^i is a summand of G(X) except X^32.  */
 
-#define GEN     (BIT(26)|BIT(23)|BIT(22)|BIT(16)|BIT(12)|BIT(11)|BIT(10)\
+# define GEN     (BIT(26)|BIT(23)|BIT(22)|BIT(16)|BIT(12)|BIT(11)|BIT(10)\
                 |BIT(8) |BIT(7) |BIT(5) |BIT(4) |BIT(2) |BIT(1) |BIT(0));
 
 static unsigned long r[8];
@@ -104,14 +104,14 @@ main ()
 
 #else /* !CRCTAB */
 
-#include <stdio.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include "system.h"
-#include "error.h"
+# include <stdio.h>
+# include <getopt.h>
+# include <sys/types.h>
+# include "system.h"
+# include "error.h"
 
 /* Number of bytes to read at once.  */
-#define BUFLEN (1 << 16)
+# define BUFLEN (1 << 16)
 
 /* The name this program was run with.  */
 char *program_name;
index 07b6026..7d45bf9 100644 (file)
@@ -30,7 +30,7 @@
 #include <sys/types.h>
 #include <signal.h>
 #ifdef HAVE_LIMITS_H
-#include <limits.h>
+# include <limits.h>
 #endif /* HAVE_LIMITS_H */
 
 #ifndef UINT_MAX
 #include "xstrtoul.h"
 
 #ifdef STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
 #else
 char *malloc ();
 char *realloc ();
 #endif
 
 #ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+# define MAX(a,b) (((a) > (b)) ? (a) : (b))
 #endif
 
 #ifndef TRUE
-#define FALSE 0
-#define TRUE 1
+# define FALSE 0
+# define TRUE 1
 #endif
 
 /* Increment size of area for control records. */
@@ -98,9 +98,9 @@ struct control
 
 #ifdef DEBUG
 /* Some small values to test the algorithms. */
-#define START_SIZE     200
-#define INCR_SIZE      10
-#define CTRL_SIZE      1
+# define START_SIZE    200
+# define INCR_SIZE     10
+# define CTRL_SIZE     1
 #endif
 
 /* A string with a length count. */
index 7de19e3..29b426f 100644 (file)
--- a/src/fmt.c
+++ b/src/fmt.c
    "best".  Adjust to taste, subject to the caveats given.  */
 
 /* Default longest permitted line length (max_width).  */
-#define        WIDTH   75
+#define WIDTH  75
 
 /* Prefer lines to be LEEWAY % shorter than the maximum width, giving
    room for optimization.  */
-#define        LEEWAY  7
+#define LEEWAY 7
 
 /* The default secondary indent of tagged paragraph used for unindented
    one-line paragraphs not preceded by any multi-line paragraphs.  */
-#define        DEF_INDENT 3
+#define DEF_INDENT 3
 
 /* Costs and bonuses are expressed as the equivalent departure from the
    optimal line length, multiplied by 10.  e.g. assigning something a
 
 typedef long COST;
 
-#define        MAXCOST (~(((unsigned long) 1) << (8 * sizeof (COST) -1)))
+#define MAXCOST        (~(((unsigned long) 1) << (8 * sizeof (COST) -1)))
 
-#define        SQR(n)          ((n) * (n))
-#define        EQUIV(n)        SQR ((COST) (n))
+#define SQR(n)         ((n) * (n))
+#define EQUIV(n)       SQR ((COST) (n))
 
 /* Cost of a filled line n chars longer or shorter than best_width.  */
-#define        SHORT_COST(n)   EQUIV ((n) * 10)
+#define SHORT_COST(n)  EQUIV ((n) * 10)
 
 /* Cost of the difference between adjacent filled lines.  */
-#define        RAGGED_COST(n)  (SHORT_COST (n) / 2)
+#define RAGGED_COST(n) (SHORT_COST (n) / 2)
 
 /* Basic cost per line.  */
-#define        LINE_COST       EQUIV (70)
+#define LINE_COST      EQUIV (70)
 
 /* Cost of breaking a line after the first word of a sentence, where
    the length of the word is N.  */
-#define        WIDOW_COST(n)   (EQUIV (200) / ((n) + 2))
+#define WIDOW_COST(n)  (EQUIV (200) / ((n) + 2))
 
 /* Cost of breaking a line before the last word of a sentence, where
    the length of the word is N.  */
-#define        ORPHAN_COST(n)  (EQUIV (150) / ((n) + 2))
+#define ORPHAN_COST(n) (EQUIV (150) / ((n) + 2))
 
 /* Bonus for breaking a line at the end of a sentence.  */
-#define        SENTENCE_BONUS  EQUIV (50)
+#define SENTENCE_BONUS EQUIV (50)
 
 /* Cost of breaking a line after a period not marking end of a sentence.
    With the definition of sentence we are using (borrowed from emacs, see
    get_line()) such a break would then look like a sentence break.  Hence
    we assign a very high cost -- it should be avoided unless things are
    really bad.  */
-#define        NOBREAK_COST    EQUIV (600)
+#define NOBREAK_COST   EQUIV (600)
 
 /* Bonus for breaking a line before open parenthesis.  */
-#define        PAREN_BONUS     EQUIV (40)
+#define PAREN_BONUS    EQUIV (40)
 
 /* Bonus for breaking a line after other punctuation.  */
-#define        PUNCT_BONUS     EQUIV(40)
+#define PUNCT_BONUS    EQUIV(40)
 
 /* Credit for breaking a long paragraph one line later.  */
-#define        LINE_CREDIT     EQUIV(3)
+#define LINE_CREDIT    EQUIV(3)
 
 /* Size of paragraph buffer, in words and characters.  Longer paragraphs
    are handled neatly (cf. flush_paragraph()), so there's little to gain
    by making these larger.  */
-#define        MAXWORDS        1000
-#define        MAXCHARS        5000
+#define MAXWORDS       1000
+#define MAXCHARS       5000
 
 /* Extra ctype(3)-style macros.  */
 
-#define        isopen(c)       (strchr ("([`'\"", c) != NULL)
-#define        isclose(c)      (strchr (")]'\"", c) != NULL)
-#define        isperiod(c)     (strchr (".?!", c) != NULL)
+#define isopen(c)      (strchr ("([`'\"", c) != NULL)
+#define isclose(c)     (strchr (")]'\"", c) != NULL)
+#define isperiod(c)    (strchr (".?!", c) != NULL)
 
 /* Size of a tab stop, for expansion on input and re-introduction on
    output.  */
-#define        TABWIDTH        8
+#define TABWIDTH       8
 
 /* Miscellaneous definitions.  */
 
index c3c21c8..3c437c4 100644 (file)
--- a/src/nl.c
+++ b/src/nl.c
@@ -48,8 +48,8 @@
 #include "xstrtol.h"
 
 #ifndef TRUE
-#define TRUE   1
-#define FALSE  0
+# define TRUE   1
+# define FALSE  0
 #endif
 
 /* Line-number formats. */
index 12e25d1..2fac48f 100644 (file)
@@ -54,7 +54,7 @@ char *xrealloc ();
 
 static FILE dummy_closed;
 /* Element marking a file that has reached EOF and been closed. */
-#define        CLOSED (&dummy_closed)
+#define CLOSED (&dummy_closed)
 
 static FILE dummy_endlist;
 /* Element marking end of list of open files. */