From: Bruno Haible Date: Mon, 20 Oct 2003 20:33:37 +0000 (+0000) Subject: Fix bug found by HP-UX ia64 cc. X-Git-Tag: v0.13~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=246cae12fba7db944082957afc79ae5b995f4995;p=thirdparty%2Fgettext.git Fix bug found by HP-UX ia64 cc. --- diff --git a/gettext-tools/src/ChangeLog b/gettext-tools/src/ChangeLog index 2dc5f640a..8d8fd0320 100644 --- a/gettext-tools/src/ChangeLog +++ b/gettext-tools/src/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bruno Haible + + * x-java.c (phase3_getc): Fix typo: Use phase2_ungetc, not phase2_getc. + 2003-10-20 Bruno Haible Portability to AIX with cc. diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c index 9652c98f2..eb38a8482 100644 --- a/gettext-tools/src/x-java.c +++ b/gettext-tools/src/x-java.c @@ -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 ();