From: Bruno Haible Date: Mon, 19 May 2008 22:16:32 +0000 (+0200) Subject: Remove trailing spaces. X-Git-Tag: v0.1~7378 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=f19c2f156e388e1da7ab9b13250dfeb380c0ab84;p=gnulib.git Remove trailing spaces. --- diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c index c3ebf7f5e..524d5d349 100644 --- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -808,7 +808,7 @@ conflict_write (FILE *fp, struct conflict *c) /* Long options. */ static const struct option long_options[] = -{ +{ { "help", no_argument, NULL, 'h' }, { "split-merged-entry", no_argument, NULL, CHAR_MAX + 1 }, { "version", no_argument, NULL, 'V' }, diff --git a/lib/javacomp.h b/lib/javacomp.h index 4cf0921d8..7ebcbaae1 100644 --- a/lib/javacomp.h +++ b/lib/javacomp.h @@ -36,7 +36,7 @@ 1.4 48.0 1.5 49.0 1.6 50.0 - target_version can also be given as NULL. In this case, the required + target_version can also be given as NULL. In this case, the required target_version is determined from the found JVM (see javaversion.h). Specifying target_version is useful when building a library (.jar) that is useful outside the given package. Passing target_version = NULL is useful diff --git a/lib/round.c b/lib/round.c index 4f85402df..df6232d51 100644 --- a/lib/round.c +++ b/lib/round.c @@ -67,7 +67,7 @@ DOUBLE FLOOR_BASED_ROUND (DOUBLE x) { - if (x >= L_(0.0)) + if (x >= L_(0.0)) { DOUBLE y = FLOOR (x); if (x - y >= L_(0.5)) diff --git a/lib/trim.c b/lib/trim.c index 3802301df..9293a64ce 100644 --- a/lib/trim.c +++ b/lib/trim.c @@ -24,7 +24,7 @@ #include #include -#if HAVE_MBRTOWC +#if HAVE_MBRTOWC # include # include # include "mbchar.h" @@ -44,72 +44,72 @@ char * trim2(const char *s, int how) { char *d; - + d = strdup(s); if (!d) xalloc_die(); - + #if HAVE_MBRTOWC if (MB_CUR_MAX > 1) { mbi_iterator_t i; - + /* Trim leading whitespaces. */ - if (how != TRIM_TRAILING) + if (how != TRIM_TRAILING) { mbi_init (i, d, strlen (d)); - + for (; mbi_avail (i) && mb_isspace (mbi_cur (i)); mbi_advance (i)) ; - + memmove (d, mbi_cur_ptr (i), strlen (mbi_cur_ptr (i)) + 1); } - + /* Trim trailing whitespaces. */ - if (how != TRIM_LEADING) + if (how != TRIM_LEADING) { int state = 0; char *r IF_LINT (= NULL); /* used only while state = 2 */ - + mbi_init (i, d, strlen (d)); - for (; mbi_avail (i); mbi_advance (i)) + for (; mbi_avail (i); mbi_advance (i)) { - if (state == 0 && mb_isspace (mbi_cur (i))) + if (state == 0 && mb_isspace (mbi_cur (i))) { state = 0; continue; } - + if (state == 0 && !mb_isspace (mbi_cur (i))) { state = 1; continue; } - + if (state == 1 && !mb_isspace (mbi_cur (i))) { state = 1; continue; } - - if (state == 1 && mb_isspace (mbi_cur (i))) + + if (state == 1 && mb_isspace (mbi_cur (i))) { state = 2; r = (char *) mbi_cur_ptr (i); } - else if (state == 2 && mb_isspace (mbi_cur (i))) + else if (state == 2 && mb_isspace (mbi_cur (i))) { state = 2; - } - else + } + else { state = 1; } } - - if (state == 2) + + if (state == 2) *r = '\0'; } } @@ -117,11 +117,11 @@ trim2(const char *s, int how) #endif /* HAVE_MBRTOWC */ { char *p; - + /* Trim leading whitespaces. */ if (how != TRIM_TRAILING) { for (p = d; *p && isspace ((unsigned char) *p); p++) - ; + ; memmove (d, p, strlen (p) + 1); } @@ -132,7 +132,7 @@ trim2(const char *s, int how) *p = '\0'; } } - + return d; } - + diff --git a/modules/unilbrk/u16-possible-linebreaks b/modules/unilbrk/u16-possible-linebreaks index f3c2bab3c..2b9a86762 100644 --- a/modules/unilbrk/u16-possible-linebreaks +++ b/modules/unilbrk/u16-possible-linebreaks @@ -9,7 +9,7 @@ Depends-on: unilbrk/base unilbrk/tables utf16-ucs4-unsafe -streq +streq configure.ac: diff --git a/modules/unilbrk/u32-possible-linebreaks b/modules/unilbrk/u32-possible-linebreaks index 46b363f90..eda95189a 100644 --- a/modules/unilbrk/u32-possible-linebreaks +++ b/modules/unilbrk/u32-possible-linebreaks @@ -8,7 +8,7 @@ lib/uniwidth/cjk.h Depends-on: unilbrk/base unilbrk/tables -streq +streq configure.ac: diff --git a/modules/unilbrk/u8-possible-linebreaks b/modules/unilbrk/u8-possible-linebreaks index 284b96a94..f963afdc3 100644 --- a/modules/unilbrk/u8-possible-linebreaks +++ b/modules/unilbrk/u8-possible-linebreaks @@ -9,7 +9,7 @@ Depends-on: unilbrk/base unilbrk/tables utf8-ucs4-unsafe -streq +streq configure.ac: diff --git a/tests/test-round2.c b/tests/test-round2.c index b3ae0c80b..aa993ef56 100644 --- a/tests/test-round2.c +++ b/tests/test-round2.c @@ -19,7 +19,7 @@ /* Get the two reference implementations of round under the names round_reference1 and round_reference2. - + round.c will #include for us. */ #define FLOOR_BASED_ROUND round_reference1 #define FLOOR_FREE_ROUND round_reference2 @@ -60,7 +60,7 @@ equal (const char *message, DOUBLE x, DOUBLE y0, DOUBLE y1) { if (ISNAN (y0) ? ISNAN (y1) : y0 == y1) return true; - else + else { fprintf (stderr, "%s: "FUNCTION"(%g(%a)) = %g(%a) or %g(%a)?\n", message, x, x, y0, y0, y1, y1); @@ -75,9 +75,9 @@ check (DOUBLE x) DOUBLE ref1 = round_reference1 (x); DOUBLE ref2 = round_reference2 (x); DOUBLE result = ROUND (x); - + /* If the reference implementations disagree, bail out immediately. */ - if (!equal ("reference implementations disagree", x, ref1, ref2)) + if (!equal ("reference implementations disagree", x, ref1, ref2)) exit (EXIT_FAILURE); /* If the actual implementation is wrong, return an error code. */ diff --git a/tests/unictype/test-categ_and.c b/tests/unictype/test-categ_and.c index 7dc461338..5531ff40b 100644 --- a/tests/unictype/test-categ_and.c +++ b/tests/unictype/test-categ_and.c @@ -41,7 +41,7 @@ main () uc_general_category_and ( uc_general_category_or (UC_LETTER, UC_DECIMAL_DIGIT_NUMBER), uc_general_category_or (UC_UPPERCASE_LETTER, UC_NUMBER)); - + ASSERT (uc_is_general_category ('A', ct)); ASSERT (!uc_is_general_category ('a', ct)); ASSERT (uc_is_general_category ('7', ct)); diff --git a/tests/unictype/test-categ_and_not.c b/tests/unictype/test-categ_and_not.c index 91a1da99f..90b40f8ba 100644 --- a/tests/unictype/test-categ_and_not.c +++ b/tests/unictype/test-categ_and_not.c @@ -41,7 +41,7 @@ main () uc_general_category_and_not ( uc_general_category_or (UC_LETTER, UC_NUMBER), uc_general_category_or (UC_UPPERCASE_LETTER, UC_DECIMAL_DIGIT_NUMBER)); - + ASSERT (!uc_is_general_category ('A', ct)); ASSERT (uc_is_general_category ('a', ct)); ASSERT (!uc_is_general_category ('7', ct));