]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Portability to SunOS4.
authorBruno Haible <bruno@clisp.org>
Wed, 31 Oct 2001 20:52:50 +0000 (20:52 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 20:46:11 +0000 (22:46 +0200)
src/ChangeLog
src/Makefile.am
src/format-c.c
src/format.h
src/message.h
src/po-charset.c
src/write-java.c
src/x-java.l

index 5451d99ef601024e30aaa226a610186b6c42392b..9f86e5768cd666bf42123349d9d294e0e8d49c13 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-31  Bruno Haible  <haible@clisp.cons.org>
+
+       * Makefile.am (noinst_HEADERS): Add read-java.h, write-java.h,
+       format.h, msgunfmt.h.
+       * message.h (NFORMATS): Define via #define, not via an enum value.
+       * format.h (struct formatstring_parser): Use PARAMS.
+       * format-c.c (FAT_SIZE_MASK): Remove extraneous backslashes.
+       * po-charset.c (po_lex_charset_set): Fix syntax error.
+       * write-java.c (write_java_string): Drop hexdigit[] size.
+       * x-java.l (add_object): Remove C++ style comment.
+
 2001-10-28  Bruno Haible  <haible@clisp.cons.org>
 
        * hostname.c: Include "progname.h".
index 19e2fe7f6cc809dc0c7203c9fa2046c3b31a8a05..b19914d2ad3248b1306b434141c16bd07b63068d 100644 (file)
@@ -30,8 +30,9 @@ lib_LTLIBRARIES = libgettextsrc.la
 noinst_HEADERS = pos.h message.h po-gram.h po-hash.h po-charset.h po-lex.h \
 po.h open-po.h read-po.h str-list.h write-po.h dir-list.h file-list.h \
 po-gram-gen.h po-hash-gen.h msgl-charset.h msgl-equal.h msgl-iconv.h \
-msgl-ascii.h msgl-cat.h msgl-english.h msgfmt.h read-mo.h write-mo.h \
-po-time.h xgettext.h x-c.h x-po.h x-java.h x-ycp.h x-rst.h
+msgl-ascii.h msgl-cat.h msgl-english.h msgfmt.h msgunfmt.h read-mo.h \
+write-mo.h read-java.h write-java.h po-time.h format.h xgettext.h x-c.h \
+x-po.h x-java.h x-ycp.h x-rst.h
 
 EXTRA_DIST = FILES
 
index 733335afc46211d7735b52f121513aef328a4c15..926a19243a4ab3dbcf322e1217d482dc089dc30b 100644 (file)
@@ -102,9 +102,9 @@ enum format_arg_type
   FAT_COUNT_LONGLONGINT_POINTER        = FAT_COUNT_POINTER | FAT_SIZE_LONGLONG,
   */
   /* Bitmasks */
-  FAT_SIZE_MASK                = (FAT_SIZE_SHORT | FAT_SIZE_CHAR \
-                          | FAT_SIZE_LONG | FAT_SIZE_LONGLONG \
-                          | FAT_SIZE_INTMAX_T | FAT_SIZE_SIZE_T \
+  FAT_SIZE_MASK                = (FAT_SIZE_SHORT | FAT_SIZE_CHAR
+                          | FAT_SIZE_LONG | FAT_SIZE_LONGLONG
+                          | FAT_SIZE_INTMAX_T | FAT_SIZE_SIZE_T
                           | FAT_SIZE_PTRDIFF_T)
 };
 
index 9b013976f029dcdd273916b12651540dcd5c293b..2d338534ad62f3016ae675cbde4e1cb1a5c205eb 100644 (file)
@@ -30,14 +30,14 @@ struct formatstring_parser
        1. the argument types/names needed for the format string,
        2. the total number of format directives.
      Return NULL if the string is not a valid format string.  */
-  void * (*parse) (const char *string);
+  void * (*parse) PARAMS ((const char *string));
 
   /* Free a format string descriptor, returned by parse().  */
-  void (*free) (void *descr);
+  void (*free) PARAMS ((void *descr));
 
   /* Return the number of format directives.
      A string that can be output literally has 0 format directives.  */
-  int (*get_number_of_directives) (void *descr);
+  int (*get_number_of_directives) PARAMS ((void *descr));
 
   /* Verify that the argument types/names in msgid_descr and those in
      msgstr_descr are the same.  If not, signal an error using
@@ -45,7 +45,7 @@ struct formatstring_parser
        error_at_line (0, 0, pos->file_name, pos->line_number, ...);
        error_with_progname = true;
      and return true.  Otherwise return false.  */
-  bool (*check) (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr);
+  bool (*check) PARAMS ((const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr));
 };
 
 /* Format string parsers, each defined in its own file.  */
index 9a63bc344bf000190849f1026eb76210f84dff5a..432cd17ee190476ff3af3bcf2f2caa6b6636081f 100644 (file)
@@ -38,9 +38,9 @@ enum format_type
   format_lisp,
   format_java,
   format_pascal,
-  format_ycp,
-  NFORMATS
+  format_ycp
 };
+#define NFORMATS 6     /* Number of format_type enum values.  */
 extern const char *const format_language[NFORMATS];
 extern const char *const format_language_pretty[NFORMATS];
 
index 9a00be0e8d940ccf95a8a5ec78505748a8a9510c..fc3608d8ef3f9a8b2c9bf771f2fdc50babb571eb 100644 (file)
@@ -255,6 +255,8 @@ would fix this problem.\n")));
                  multiline_warning (NULL, xasprintf (_("%s\n"), note));
                }
 #else
+             size_t i;
+
              for (i = 0; i < SIZEOF (weird_charsets); i++)
                if (strcmp (po_lex_charset, weird_charsets[i]) == 0)
                  break;
index c65f2e638df5c2975ea1d9819bf9626d5e6efa50..57a33ad63a7a0b30c24a166bd0a22e2c171868b9 100644 (file)
@@ -369,7 +369,7 @@ write_java_string (stream, str)
      FILE *stream;
      const char *str;
 {
-  static const char hexdigit[16] = "0123456789abcdef";
+  static const char hexdigit[] = "0123456789abcdef";
   const char *str_limit = str + strlen (str);
 
   fprintf (stream, "\"");
index 380ad13cf731248362ccc40f483dbe58d628b651..237b4f099e3bcb7faff28c6837c021208251745f 100644 (file)
@@ -334,7 +334,6 @@ add_object (list, object)
 {
   if (list->num_obj + 1 >= list->max_num_obj)
     {
-      // resize
       list->max_num_obj += OBJECT_LIST_GROWTH;
       list->objects =
        xrealloc (list->objects, list->max_num_obj * sizeof (void *));