]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Support Smalltalk format strings.
authorBruno Haible <bruno@clisp.org>
Fri, 9 Nov 2001 10:31:29 +0000 (10:31 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 20:55:29 +0000 (22:55 +0200)
src/ChangeLog
src/format-ycp.c
src/format.c
src/format.h
src/message.c
src/message.h

index 670bbdd531c9d7ec0e15f153953f9edcd015fec6..5874879aece38bbb5f3de357e3d84143dbbeba7e 100644 (file)
@@ -1,3 +1,12 @@
+2001-11-08  Bruno Haible  <haible@clisp.cons.org>
+
+       * message.h: New enum value format_smalltalk.
+       * message.c (format_language): Add value for format_smalltalk.
+       (format_language_pretty): Likewise.
+       * format.h (formatstring_smalltalk): New declaration.
+       * format-ycp.c (formatstring_smalltalk): New variable.
+       * format.c (formatstring_parsers): Add value for format_smalltalk.
+
 2001-11-05  Bruno Haible  <haible@clisp.cons.org>
 
        * format-lisp.c (parse_upto): Remove 'base' argument. It is always 0.
index 2d79c186e6f9db00ec92fae7a77454aa9fc9195f..dd4b7089aa236615bd3acc671fdb4d31f48cc5ed 100644 (file)
@@ -1,4 +1,4 @@
-/* YCP format strings.
+/* YCP and Smalltalk format strings.
    Copyright (C) 2001 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
@@ -34,6 +34,8 @@
 /* YCP sformat strings are described in libycp documentation YCP-builtins.html.
    A directive starts with '%' and is followed by '%' or a nonzero digit ('1'
    to '9').
+   GNU Smalltalk format strings are described in the CharArray documentation,
+   methods 'bindWith:' and 'bindWithArguments:'. They have the same syntax.
  */
 
 struct spec
@@ -154,6 +156,15 @@ struct formatstring_parser formatstring_ycp =
 };
 
 
+struct formatstring_parser formatstring_smalltalk =
+{
+  format_parse,
+  format_free,
+  format_get_number_of_directives,
+  format_check
+};
+
+
 #ifdef TEST
 
 /* Test program: Print the argument list specification returned by
index 30b54f8c2f6c633acdf9baeda3426a1147149452..1658b749316882a6c5e17c6740c4f050cfb01d2d 100644 (file)
 /* Table of all format string parsers.  */
 struct formatstring_parser *formatstring_parsers[NFORMATS] =
 {
-  /* format_c */       &formatstring_c,
-  /* format_python */  &formatstring_python,
-  /* format_lisp */    &formatstring_lisp,
-  /* format_java */    &formatstring_java,
-  /* format_pascal */  &formatstring_pascal,
-  /* format_ycp */     &formatstring_ycp
+  /* format_c */               &formatstring_c,
+  /* format_python */          &formatstring_python,
+  /* format_lisp */            &formatstring_lisp,
+  /* format_smalltalk */       &formatstring_smalltalk,
+  /* format_java */            &formatstring_java,
+  /* format_pascal */          &formatstring_pascal,
+  /* format_ycp */             &formatstring_ycp
 };
index 2d338534ad62f3016ae675cbde4e1cb1a5c205eb..58e730ee2cb30cc39ccb478bf2e064158bebda2c 100644 (file)
@@ -52,6 +52,7 @@ struct formatstring_parser
 extern struct formatstring_parser formatstring_c;
 extern struct formatstring_parser formatstring_python;
 extern struct formatstring_parser formatstring_lisp;
+extern struct formatstring_parser formatstring_smalltalk;
 extern struct formatstring_parser formatstring_java;
 extern struct formatstring_parser formatstring_pascal;
 extern struct formatstring_parser formatstring_ycp;
index e9fe122d8222a1f8cd4d20a22dcbbb470ba89885..6b60c8d5ada00e3bf66cff273ea317ebbfeeacd5 100644 (file)
@@ -41,22 +41,24 @@ static message_ty *message_list_search_fuzzy_inner PARAMS ((
 
 const char *const format_language[NFORMATS] =
 {
-  /* format_c */       "c",
-  /* format_python */  "python",
-  /* format_lisp */    "lisp",
-  /* format_java */    "java",
-  /* format_pascal */  "object-pascal",
-  /* format_ycp */     "ycp"
+  /* format_c */               "c",
+  /* format_python */          "python",
+  /* format_lisp */            "lisp",
+  /* format_smalltalk */       "smalltalk",
+  /* format_java */            "java",
+  /* format_pascal */          "object-pascal",
+  /* format_ycp */             "ycp"
 };
 
 const char *const format_language_pretty[NFORMATS] =
 {
-  /* format_c */       "C",
-  /* format_python */  "Python",
-  /* format_lisp */    "Lisp",
-  /* format_java */    "Java",
-  /* format_pascal */  "Object Pascal",
-  /* format_ycp */     "YCP"
+  /* format_c */               "C",
+  /* format_python */          "Python",
+  /* format_lisp */            "Lisp",
+  /* format_smalltalk */       "Smalltalk",
+  /* format_java */            "Java",
+  /* format_pascal */          "Object Pascal",
+  /* format_ycp */             "YCP"
 };
 
 
index 8634507de49cd75fa67167819541f80fef762007..db3ea1734fa1187bc956d6f40c0683c4b9d3e4bc 100644 (file)
@@ -36,6 +36,7 @@ enum format_type
   format_c,
   format_python,
   format_lisp,
+  format_smalltalk,
   format_java,
   format_pascal,
   format_ycp