]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Shell: Bump phase1_pushback buffer size.
authorBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 04:46:55 +0000 (06:46 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 21 Jun 2025 04:46:55 +0000 (06:46 +0200)
* gettext-tools/src/x-sh.c (phase1_pushback): Bump size to 9.
* gettext-tools/tests/xgettext-sh-8: Add more test cases.

gettext-tools/src/x-sh.c
gettext-tools/tests/xgettext-sh-8

index 84a4ec0a76904e41c0e134ae2f8c18d261200d68..67ff5730a18d5510999f816d04a951ae122655f2 100644 (file)
@@ -185,7 +185,7 @@ do_ungetc (int c)
 
 /* Remove backslash followed by newline from the input stream.  */
 
-static int phase1_pushback[2];
+static int phase1_pushback[9];
 static int phase1_pushback_length;
 
 static int
@@ -215,7 +215,7 @@ phase1_getc ()
     }
 }
 
-/* Supports only one pushback character.  */
+/* Supports 9 pushback characters.  */
 static void
 phase1_ungetc (int c)
 {
index 2aedf9f3becf9a0b7f68777147bf35a7d2e495e3..00ad79daa169b8061b9629d272dc0329b9fd1746 100755 (executable)
@@ -5,6 +5,10 @@
 
 cat <<\EOF > xg-sh-8.sh
 echo `gettext $'\'\x'`
+gettext $'\u#'
+gettext $'\U#'
+gettext $'\U123456'
+gettext $'\U12345678'
 EOF
 
 : ${XGETTEXT=xgettext}
@@ -14,6 +18,18 @@ LC_ALL=C tr -d '\r' < xg-sh-8.tmp.po > xg-sh-8.po || Exit 1
 cat <<\EOF > xg-sh-8.ok
 msgid "'\\x"
 msgstr ""
+
+msgid "\\u#"
+msgstr ""
+
+msgid "\\U#"
+msgstr ""
+
+msgid "\\U123456"
+msgstr ""
+
+msgid "\\U12345678"
+msgstr ""
 EOF
 
 : ${DIFF=diff}