From 3ea2606e4125cf29694757dea9c4f607043536ce Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 7 Oct 1997 23:58:29 +0000 Subject: indent cpp directives to reflect nesting --- src/cat.c | 6 +++--- src/cksum.c | 20 ++++++++++---------- src/csplit.c | 16 ++++++++-------- src/fmt.c | 44 ++++++++++++++++++++++---------------------- src/nl.c | 4 ++-- src/paste.c | 2 +- 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/cat.c b/src/cat.c index 48b2ca9a6..076898695 100644 --- a/src/cat.c +++ b/src/cat.c @@ -28,7 +28,7 @@ #include #include #ifndef _POSIX_SOURCE -#include +# include #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 diff --git a/src/cksum.c b/src/cksum.c index 42cd8d4a3..77588fd03 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -44,10 +44,10 @@ #ifdef CRCTAB -#include +# include -#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 -#include -#include -#include "system.h" -#include "error.h" +# include +# include +# include +# 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; diff --git a/src/csplit.c b/src/csplit.c index 07b6026aa..7d45bf9a9 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -30,7 +30,7 @@ #include #include #ifdef HAVE_LIMITS_H -#include +# include #endif /* HAVE_LIMITS_H */ #ifndef UINT_MAX @@ -51,19 +51,19 @@ #include "xstrtoul.h" #ifdef STDC_HEADERS -#include +# include #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. */ diff --git a/src/fmt.c b/src/fmt.c index 7de19e368..29b426f56 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -46,15 +46,15 @@ "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 @@ -64,62 +64,62 @@ 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. */ diff --git a/src/nl.c b/src/nl.c index c3c21c855..3c437c4ce 100644 --- 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. */ diff --git a/src/paste.c b/src/paste.c index 12e25d1d3..2fac48f3a 100644 --- a/src/paste.c +++ b/src/paste.c @@ -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. */ -- cgit v1.2.3-54-g00ecf