]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Tiny tweak.
authorBruno Haible <bruno@clisp.org>
Fri, 28 Sep 2001 20:14:56 +0000 (20:14 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 28 Sep 2001 20:14:56 +0000 (20:14 +0000)
src/ChangeLog
src/x-c.c

index c9f9a2ce2383f8915b726483e536a8fd5ccb4f4d..ffa5cead9b55cdb4894edaae86fe6c29af4c0956 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-16  Bruno Haible  <haible@clisp.cons.org>
+
+       * x-c.c (phase4_getc): Rename local variable 'state' to
+       'last_was_star'.
+
 2001-09-11  Bruno Haible  <haible@clisp.cons.org>
 
        * Makefile.am (COMMON_SOURCES, FORMAT_SOURCES): New variables.
index 5f50af1e9369de40b903e2234dff31ba117b4f1d..3d206a612918418fc1c83b9ac1886fb71c100a8f 100644 (file)
--- a/src/x-c.c
+++ b/src/x-c.c
@@ -377,7 +377,7 @@ phase4_getc ()
   static size_t bufmax;
   size_t buflen;
   int c;
-  int state;
+  bool last_was_star;
 
   c = phase3_getc ();
   if (c != '/')
@@ -392,7 +392,7 @@ phase4_getc ()
     case '*':
       /* C comment.  */
       buflen = 0;
-      state = 0;
+      last_was_star = false;
       while (1)
        {
          c = phase3_getc ();
@@ -417,15 +417,15 @@ phase4_getc ()
              buffer[buflen] = 0;
              xgettext_comment_add (buffer);
              buflen = 0;
-             state = 0;
+             last_was_star = false;
              continue;
 
            case '*':
-             state = 1;
+             last_was_star = true;
              continue;
 
            case '/':
-             if (state == 1)
+             if (last_was_star)
                {
                  buflen -= 2;
                  while (buflen >= 1 && (buffer[buflen - 1] == ' '
@@ -438,7 +438,7 @@ phase4_getc ()
              /* FALLTHROUGH */
 
            default:
-             state = 0;
+             last_was_star = false;
              continue;
            }
          break;
@@ -502,7 +502,7 @@ phase7_getc ()
 
   /* Return a magic newline indicator, so that we can distinguish
      between the user requesting a newline in the string (e.g. using
-     "\n" or "\15") from the user failing to terminate the string or
+     "\n" or "\012") from the user failing to terminate the string or
      character constant.  The ANSI C standard says: 3.1.3.4 Character
      Constants contain ``any character except single quote, backslash or
      newline; or an escape sequence'' and 3.1.4 String Literals contain