]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix bug found by HP-UX ia64 cc.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Oct 2003 20:33:37 +0000 (20:33 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:05 +0000 (12:11 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/x-java.c

index 2dc5f640a0cb5536f31b6ef255eb24bac301eb79..8d8fd0320da827c16cd305fd57c5cb9be6565997 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * x-java.c (phase3_getc): Fix typo: Use phase2_ungetc, not phase2_getc.
+
 2003-10-20  Bruno Haible  <bruno@clisp.org>
 
        Portability to AIX with cc.
index 9652c98f2d2627838f0f4fd097968890415a2dc5..eb38a8482f11643a8d6e1434bcd9a440b4e2ba0b 100644 (file)
@@ -286,14 +286,12 @@ phase2_getc ()
   return c;
 }
 
-#ifdef unused
 static void
 phase2_ungetc (int c)
 {
   if (c != P2_EOF)
     phase2_pushback[phase2_pushback_length++] = c;
 }
-#endif
 
 
 /* Fetch the next single-byte character or Unicode character from the file.
@@ -326,7 +324,7 @@ phase3_getc ()
       int c1 = phase2_getc ();
 
       if (RED (c1) != '\n')
-       phase2_getc (c1);
+       phase2_ungetc (c1);
 
       /* Seen line terminator CR or CR/LF.  */
       if (c == '\r' || c1 == '\n')
@@ -495,9 +493,11 @@ string_buffer_append (struct string_buffer *bp, int c)
       if (bp->utf16_surr != 0
          && (c >= UNICODE (0xdc00) && c < UNICODE (0xe000)))
        {
-         unsigned short utf16buf[2] = { bp->utf16_surr, UTF16_VALUE (c) };
+         unsigned short utf16buf[2];
          unsigned int uc;
 
+         utf16buf[0] = bp->utf16_surr;
+         utf16buf[1] = UTF16_VALUE (c);
          if (u16_mbtouc_aux (&uc, utf16buf, 2) != 2)
            abort ();