]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
javascript: Simplify Unicode character escape handling
authorDaiki Ueno <ueno@gnu.org>
Thu, 27 Nov 2014 09:32:23 +0000 (18:32 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 27 Nov 2014 09:32:23 +0000 (18:32 +0900)
ECMA-262 only supports "\uXXXX" style Unicode character escape and
we don't need extra space for character names.
* x-javascript.c: Don't include "uniname.h".
(phase2_pushback): Decrease to 5.  Don't refer to UNINAME_MAX.

gettext-tools/src/ChangeLog
gettext-tools/src/x-javascript.c

index e250ae14494f791e61d9dbd1c8505288b2844f4b..d20a4ff2a0e7a1d02e7559c71e08dd84a783e06d 100644 (file)
@@ -1,3 +1,11 @@
+2014-11-27  Daiki Ueno  <ueno@gnu.org>
+
+       javascript: Simplify Unicode character escape handling
+       ECMA-262 only supports "\uXXXX" style Unicode character escape and
+       we don't need extra space for character names.
+       * x-javascript.c: Don't include "uniname.h".
+       (phase2_pushback): Decrease to 5.  Don't refer to UNINAME_MAX.
+
 2014-11-18  Daiki Ueno  <ueno@gnu.org>
 
        * read-mo.c: Include "xsize.h".
index e09a31d4b974af90fe717879b088365b2b2995fb..35c9a9e640e0e1a2ec8c69e59b09a22c10d32d22 100644 (file)
@@ -43,7 +43,6 @@
 #include "c-strstr.h"
 #include "c-ctype.h"
 #include "po-charset.h"
-#include "uniname.h"
 #include "unistr.h"
 #include "gettext.h"
 
@@ -205,7 +204,8 @@ phase1_ungetc (int c)
 
 static lexical_context_ty lexical_context;
 
-static int phase2_pushback[max (9, UNINAME_MAX + 3)];
+/* Maximum used, length of "<![CDATA[" tag minus one.  */
+static int phase2_pushback[8];
 static int phase2_pushback_length;
 
 /* Read the next Unicode UCS-4 character from the input file.  */