From: Bruno Haible Date: Tue, 12 Feb 2002 12:36:17 +0000 (+0000) Subject: Don't confuse bool and int. X-Git-Tag: v0.11.1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ba6a83b595ca36012e36ddcb25c0aadfdb0763;p=thirdparty%2Fgettext.git Don't confuse bool and int. --- diff --git a/lib/xerror.c b/lib/xerror.c index dbb1e6ebb..6c552fb04 100644 --- a/lib/xerror.c +++ b/lib/xerror.c @@ -105,7 +105,7 @@ multiline_warning (prefix, message) goto after_indent; } - while (1) + for (;;) { const char *np; diff --git a/src/po-lex.c b/src/po-lex.c index 76ba7e166..c71b65d0b 100644 --- a/src/po-lex.c +++ b/src/po-lex.c @@ -1020,7 +1020,7 @@ po_gram_lex () if (pass_comments) { bufpos = 0; - while (1) + for (;;) { while (bufpos + mb_len (mbc) >= bufmax) { @@ -1059,7 +1059,7 @@ po_gram_lex () case '"': /* Accumulate a string. */ bufpos = 0; - while (1) + for (;;) { lex_getc (mbc); while (bufpos + mb_len (mbc) >= bufmax) diff --git a/src/x-awk.c b/src/x-awk.c index 8915e5310..e9d10843f 100644 --- a/src/x-awk.c +++ b/src/x-awk.c @@ -705,7 +705,7 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas) /* Start state is 0. */ state = 0; - while (1) + for (;;) { token_ty token; diff --git a/src/x-c.c b/src/x-c.c index 142b45ee3..494552f8d 100644 --- a/src/x-c.c +++ b/src/x-c.c @@ -284,7 +284,7 @@ phase1_getc () ++line_number; return c; } - while (1) + for (;;) { c = getc (fp); switch (c) @@ -522,7 +522,7 @@ phase4_getc () /* C comment. */ comment_start (); last_was_star = false; - while (1) + for (;;) { c = phase3_getc (); if (c == EOF) @@ -562,7 +562,7 @@ phase4_getc () case '/': /* C++ or ISO C 99 comment. */ comment_start (); - while (1) + for (;;) { c = phase3_getc (); if (c == '\n' || c == EOF) @@ -879,7 +879,7 @@ phase5_get (tp) number tokens. This is mostly due to token pasting (another thing we can ignore here). */ bufpos = 0; - while (1) + for (;;) { if (bufpos >= bufmax) { @@ -942,7 +942,7 @@ phase5_get (tp) but ignoring it has no effect unless one of the keywords is "L". Just pretend it won't happen. Also, we don't need to remember the character constant. */ - while (1) + for (;;) { c = phase7_getc (); if (c == P7_NEWLINE) @@ -966,7 +966,7 @@ phase5_get (tp) let the compiler complain about the argument not matching the prototype. Just pretend it won't happen. */ bufpos = 0; - while (1) + for (;;) { c = phase7_getc (); if (c == P7_NEWLINE) @@ -1101,7 +1101,7 @@ phase6_get (tp) *tp = phase6_pushback[--phase6_pushback_length]; return; } - while (1) + for (;;) { /* Get the next token. If it is not a '#' at the beginning of a line (ignoring whitespace), return immediately. */ @@ -1112,7 +1112,7 @@ phase6_get (tp) /* Accumulate the rest of the directive in a buffer, until the "define" keyword is seen or until end of line. */ bufpos = 0; - while (1) + for (;;) { phaseX_get (tp); if (tp->type == token_type_eoln || tp->type == token_type_eof) @@ -1187,7 +1187,7 @@ phase8_get (tp) phase6_get (tp); if (tp->type != token_type_string_literal) return; - while (1) + for (;;) { token_ty tmp; size_t len; @@ -1217,7 +1217,7 @@ static void x_c_lex (tp) xgettext_token_ty *tp; { - while (1) + for (;;) { token_ty token; void *keyword_value; @@ -1343,7 +1343,7 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas) /* Start state is 0. */ state = 0; - while (1) + for (;;) { xgettext_token_ty token; diff --git a/src/x-java.l b/src/x-java.l index 8cee75aaf..e8d9e325a 100644 --- a/src/x-java.l +++ b/src/x-java.l @@ -191,7 +191,7 @@ ID [a-zA-Z_][a-zA-Z0-9_]* char *str; char_buf *charbuf = create_char_buf (); - while (1) + for (;;) { c = input (); last = input (); diff --git a/src/x-python.c b/src/x-python.c index 6553bdd22..cda238654 100644 --- a/src/x-python.c +++ b/src/x-python.c @@ -1033,7 +1033,7 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas) /* Start state is 0. */ state = 0; - while (1) + for (;;) { token_ty token; diff --git a/src/x-ycp.c b/src/x-ycp.c index fbc4f0dbe..d41e2b1d7 100644 --- a/src/x-ycp.c +++ b/src/x-ycp.c @@ -170,7 +170,7 @@ phase2_getc () /* sh comment. */ buflen = 0; lineno = line_number; - while (1) + for (;;) { c = phase1_getc (); if (c == '\n' || c == EOF) @@ -271,7 +271,7 @@ phase2_getc () /* C++ comment. */ buflen = 0; lineno = line_number; - while (1) + for (;;) { c = phase1_getc (); if (c == '\n' || c == EOF)