bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH - Cosmetic] Removal of Old-Style Function Definitions


From: Joseph D. Wagner
Subject: [PATCH - Cosmetic] Removal of Old-Style Function Definitions
Date: Fri, 8 Jul 2005 16:57:00 -0500

Some non-GNU compliers don't like the traditional-style, or old-style, function 
definitions.  This patch removes those old-style function definitions and 
replaces them with their ISO C style equivalents.

This patch only pertains to file in the intl directory.  I wanted to see how 
well this patch was received before changing the rest file files.

I hope it is well received, because it makes the source code more compatible 
across different compilers and more standardized.

Joseph D. Wagner

diff -r --unified=5 sed-4.1.4/intl/bindtextdom.c sed-4.1.4-1/intl/bindtextdom.c
--- sed-4.1.4/intl/bindtextdom.c        2004-11-09 12:04:12.000000000 -0600
+++ sed-4.1.4-1/intl/bindtextdom.c      2005-07-08 11:10:29.000000000 -0500
@@ -91,14 +91,13 @@
    If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
    modified, only the current value is returned.
    If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
    modified nor returned.  */
 static void
-set_binding_values (domainname, dirnamep, codesetp)
-     const char *domainname;
-     const char **dirnamep;
-     const char **codesetp;
+set_binding_values (const char *domainname,
+                    const char **dirnamep,
+                    const char **codesetp)
 {
   struct binding *binding;
   int modified;
 
   /* Some sanity checks.  */
@@ -341,24 +340,22 @@
 }
 
 /* Specify that the DOMAINNAME message catalog will be found
    in DIRNAME rather than in the system locale data base.  */
 char *
-BINDTEXTDOMAIN (domainname, dirname)
-     const char *domainname;
-     const char *dirname;
+BINDTEXTDOMAIN (const char *domainname,
+                const char *dirname)
 {
   set_binding_values (domainname, &dirname, NULL);
   return (char *) dirname;
 }
 
 /* Specify the character encoding in which the messages from the
    DOMAINNAME message catalog will be returned.  */
 char *
-BIND_TEXTDOMAIN_CODESET (domainname, codeset)
-     const char *domainname;
-     const char *codeset;
+BIND_TEXTDOMAIN_CODESET (const char *domainname,
+                         const char *codeset)
 {
   set_binding_values (domainname, NULL, &codeset);
   return (char *) codeset;
 }
 
diff -r --unified=5 sed-4.1.4/intl/dcgettext.c sed-4.1.4-1/intl/dcgettext.c
--- sed-4.1.4/intl/dcgettext.c  2004-11-09 12:04:12.000000000 -0600
+++ sed-4.1.4-1/intl/dcgettext.c        2005-07-08 11:35:41.000000000 -0500
@@ -42,14 +42,13 @@
 #endif
 
 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
    locale.  */
 char *
-DCGETTEXT (domainname, msgid, category)
-     const char *domainname;
-     const char *msgid;
-     int category;
+DCGETTEXT (const char *domainname,
+           const char *msgid,
+           int category)
 {
   return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/dcigettext.c sed-4.1.4-1/intl/dcigettext.c
--- sed-4.1.4/intl/dcigettext.c 2004-11-09 12:04:12.000000000 -0600
+++ sed-4.1.4-1/intl/dcigettext.c       2005-07-08 11:35:27.000000000 -0500
@@ -229,13 +229,12 @@
 # endif
 
 /* Function to compare two entries in the table of known translations.  */
 static int transcmp PARAMS ((const void *p1, const void *p2));
 static int
-transcmp (p1, p2)
-     const void *p1;
-     const void *p2;
+transcmp (const void *p1,
+          const void *p2)
 {
   const struct known_translation_t *s1;
   const struct known_translation_t *s2;
   int result;
 
@@ -386,17 +385,16 @@
 
 /* Look up MSGID in the DOMAINNAME message catalog for the current
    CATEGORY locale and, if PLURAL is nonzero, search over string
    depending on the plural form determined by N.  */
 char *
-DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     int plural;
-     unsigned long int n;
-     int category;
+DCIGETTEXT (const char *domainname,
+            const char *msgid1,
+            const char *msgid2,
+            int plural,
+            unsigned long int n,
+            int category)
 {
 #ifndef HAVE_ALLOCA
   struct block_list *block_list = NULL;
 #endif
   struct loaded_l10nfile *domain;
@@ -669,15 +667,13 @@
 }
 
 
 char *
 internal_function
-_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
-     struct loaded_l10nfile *domain_file;
-     struct binding *domainbinding;
-     const char *msgid;
-     size_t *lengthp;
+_nl_find_msg (struct loaded_l10nfile *domain_file,
+              struct binding *domainbinding,
+              const char *msgid, size_t *lengthp)
 {
   struct loaded_domain *domain;
   size_t act;
   char *result;
   size_t resultlen;
@@ -960,15 +956,14 @@
 
 
 /* Look up a plural variant.  */
 static char *
 internal_function
-plural_lookup (domain, n, translation, translation_len)
-     struct loaded_l10nfile *domain;
-     unsigned long int n;
-     const char *translation;
-     size_t translation_len;
+plural_lookup (struct loaded_l10nfile *domain,
+               unsigned long int n,
+               const char *translation,
+               size_t translation_len)
 {
   struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
   unsigned long int index;
   const char *p;
 
@@ -1001,12 +996,11 @@
 
 
 /* Return string representation of locale CATEGORY.  */
 static const char *
 internal_function
-category_to_name (category)
-     int category;
+category_to_name (int category)
 {
   const char *retval;
 
   switch (category)
   {
@@ -1061,13 +1055,12 @@
 }
 
 /* Guess value of current locale from value of the environment variables.  */
 static const char *
 internal_function
-guess_category_value (category, categoryname)
-     int category;
-     const char *categoryname;
+guess_category_value (int category,
+                      const char *categoryname)
 {
   const char *language;
   const char *retval;
 
   /* The highest priority value is the `LANGUAGE' environment
@@ -1104,26 +1097,24 @@
    avoid the non-standard function stpcpy.  In GNU C Library this
    function is available, though.  Also allow the symbol HAVE_STPCPY
    to be defined.  */
 #if !_LIBC && !HAVE_STPCPY
 static char *
-stpcpy (dest, src)
-     char *dest;
-     const char *src;
+stpcpy (char *dest,
+        const char *src)
 {
   while ((*dest++ = *src++) != '\0')
     /* Do nothing. */ ;
   return dest - 1;
 }
 #endif
 
 #if !_LIBC && !HAVE_MEMPCPY
 static void *
-mempcpy (dest, src, n)
-     void *dest;
-     const void *src;
-     size_t n;
+mempcpy (void *dest,
+         const void *src,
+         size_t n)
 {
   return (void *) ((char *) memcpy (dest, src, n) + n);
 }
 #endif
 
diff -r --unified=5 sed-4.1.4/intl/dcngettext.c sed-4.1.4-1/intl/dcngettext.c
--- sed-4.1.4/intl/dcngettext.c 2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/dcngettext.c       2005-07-08 11:32:04.000000000 -0500
@@ -42,16 +42,15 @@
 #endif
 
 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
    locale.  */
 char *
-DCNGETTEXT (domainname, msgid1, msgid2, n, category)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
-     int category;
+DCNGETTEXT (const char *domainname,
+            const char *msgid1,
+            const char *msgid2,
+            unsigned long int n,
+            int category)
 {
   return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/dgettext.c sed-4.1.4-1/intl/dgettext.c
--- sed-4.1.4/intl/dgettext.c   2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/dgettext.c 2005-07-08 11:31:42.000000000 -0500
@@ -44,13 +44,12 @@
 #endif
 
 /* Look up MSGID in the DOMAINNAME message catalog of the current
    LC_MESSAGES locale.  */
 char *
-DGETTEXT (domainname, msgid)
-     const char *domainname;
-     const char *msgid;
+DGETTEXT (const char *domainname,
+          const char *msgid)
 {
   return DCGETTEXT (domainname, msgid, LC_MESSAGES);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/dngettext.c sed-4.1.4-1/intl/dngettext.c
--- sed-4.1.4/intl/dngettext.c  2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/dngettext.c        2005-07-08 11:31:27.000000000 -0500
@@ -44,15 +44,14 @@
 #endif
 
 /* Look up MSGID in the DOMAINNAME message catalog of the current
    LC_MESSAGES locale and skip message according to the plural form.  */
 char *
-DNGETTEXT (domainname, msgid1, msgid2, n)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
+DNGETTEXT (const char *domainname,
+           const char *msgid1,
+           const char *msgid2,
+           unsigned long int n)
 {
   return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/eval-plural.h sed-4.1.4-1/intl/eval-plural.h
--- sed-4.1.4/intl/eval-plural.h        2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/eval-plural.h      2005-07-08 11:40:00.000000000 -0500
@@ -25,13 +25,12 @@
      internal_function;
 
 STATIC
 unsigned long int
 internal_function
-plural_eval (pexp, n)
-     struct expression *pexp;
-     unsigned long int n;
+plural_eval (struct expression *pexp,
+             unsigned long int n)
 {
   switch (pexp->nargs)
     {
     case 0:
       switch (pexp->operation)
diff -r --unified=5 sed-4.1.4/intl/explodename.c sed-4.1.4-1/intl/explodename.c
--- sed-4.1.4/intl/explodename.c        2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/explodename.c      2005-07-08 11:31:04.000000000 -0500
@@ -36,33 +36,30 @@
 #endif
 
 /* @@ end of prolog @@ */
 
 char *
-_nl_find_language (name)
-     const char *name;
+_nl_find_language (const char *name)
 {
   while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
         && name[0] != '+' && name[0] != ',')
     ++name;
 
   return (char *) name;
 }
 
 
 int
-_nl_explode_name (name, language, modifier, territory, codeset,
-                 normalized_codeset, special, sponsor, revision)
-     char *name;
-     const char **language;
-     const char **modifier;
-     const char **territory;
-     const char **codeset;
-     const char **normalized_codeset;
-     const char **special;
-     const char **sponsor;
-     const char **revision;
+_nl_explode_name (char *name,
+                  const char **language,
+                  const char **modifier,
+                  const char **territory,
+                  const char **codeset,
+                  const char **normalized_codeset,
+                  const char **special,
+                  const char **sponsor,
+                  const char **revision)
 {
   enum { undecided, xpg, cen } syntax;
   char *cp;
   int mask;
 
diff -r --unified=5 sed-4.1.4/intl/finddomain.c sed-4.1.4-1/intl/finddomain.c
--- sed-4.1.4/intl/finddomain.c 2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/finddomain.c       2005-07-08 11:36:10.000000000 -0500
@@ -45,15 +45,14 @@
 /* Return a data structure describing the message catalog described by
    the DOMAINNAME and CATEGORY parameters with respect to the currently
    established bindings.  */
 struct loaded_l10nfile *
 internal_function
-_nl_find_domain (dirname, locale, domainname, domainbinding)
-     const char *dirname;
-     char *locale;
-     const char *domainname;
-     struct binding *domainbinding;
+_nl_find_domain (const char *dirname,
+                 char *locale,
+                 const char *domainname,
+                 struct binding *domainbinding)
 {
   struct loaded_l10nfile *retval;
   const char *language;
   const char *modifier;
   const char *territory;
diff -r --unified=5 sed-4.1.4/intl/gettext.c sed-4.1.4-1/intl/gettext.c
--- sed-4.1.4/intl/gettext.c    2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/gettext.c  2005-07-06 03:22:36.000000000 -0500
@@ -50,12 +50,11 @@
 
 /* Look up MSGID in the current default message catalog for the current
    LC_MESSAGES locale.  If not found, returns MSGID itself (the default
    text).  */
 char *
-GETTEXT (msgid)
-     const char *msgid;
+GETTEXT (const char *msgid)
 {
   return DCGETTEXT (NULL, msgid, LC_MESSAGES);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/gettextP.h sed-4.1.4-1/intl/gettextP.h
--- sed-4.1.4/intl/gettextP.h   2004-11-09 12:04:13.000000000 -0600
+++ sed-4.1.4-1/intl/gettextP.h 2005-07-05 09:40:23.000000000 -0500
@@ -62,12 +62,11 @@
 #ifdef _LIBC
 # include <byteswap.h>
 # define SWAP(i) bswap_32 (i)
 #else
 static inline nls_uint32
-SWAP (i)
-     nls_uint32 i;
+SWAP (nls_uint32 i)
 {
   return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
 }
 #endif
 
diff -r --unified=5 sed-4.1.4/intl/hash-string.h sed-4.1.4-1/intl/hash-string.h
--- sed-4.1.4/intl/hash-string.h        2004-11-09 12:04:14.000000000 -0600
+++ sed-4.1.4-1/intl/hash-string.h      2005-07-08 11:39:01.000000000 -0500
@@ -34,12 +34,11 @@
    [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
    1986, 1987 Bell Telephone Laboratories, Inc.]  */
 static unsigned long int hash_string PARAMS ((const char *__str_param));
 
 static inline unsigned long int
-hash_string (str_param)
-     const char *str_param;
+hash_string (const char *str_param)
 {
   unsigned long int hval, g;
   const char *str = str_param;
 
   /* Compute the hash value for the given string.  */
diff -r --unified=5 sed-4.1.4/intl/intl-compat.c sed-4.1.4-1/intl/intl-compat.c
--- sed-4.1.4/intl/intl-compat.c        2004-11-09 12:04:14.000000000 -0600
+++ sed-4.1.4-1/intl/intl-compat.c      2005-07-08 11:29:25.000000000 -0500
@@ -79,88 +79,79 @@
 #undef bindtextdomain
 #undef bind_textdomain_codeset
 
 
 char *
-gettext (msgid)
-     const char *msgid;
+gettext (const char *msgid)
 {
   return gettext__ (msgid);
 }
 
 
 char *
-dgettext (domainname, msgid)
-     const char *domainname;
-     const char *msgid;
+dgettext (const char *domainname,
+          const char *msgid)
 {
   return dgettext__ (domainname, msgid);
 }
 
 
 char *
-dcgettext (domainname, msgid, category)
-     const char *domainname;
-     const char *msgid;
-     int category;
+dcgettext (const char *domainname,
+           const char *msgid,
+           int category)
 {
   return dcgettext__ (domainname, msgid, category);
 }
 
 
 char *
-ngettext (msgid1, msgid2, n)
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
+ngettext (const char *msgid1,
+          const char *msgid2,
+          unsigned long int n)
 {
   return ngettext__ (msgid1, msgid2, n);
 }
 
 
 char *
-dngettext (domainname, msgid1, msgid2, n)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
+dngettext (const char *domainname,
+           const char *msgid1,
+           const char *msgid2,
+           unsigned long int n)
 {
   return dngettext__ (domainname, msgid1, msgid2, n);
 }
 
 
 char *
-dcngettext (domainname, msgid1, msgid2, n, category)
-     const char *domainname;
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
-     int category;
+dcngettext (const char *domainname,
+            const char *msgid1,
+            const char *msgid2,
+            unsigned long int n,
+            int category)
 {
   return dcngettext__ (domainname, msgid1, msgid2, n, category);
 }
 
 
 char *
-textdomain (domainname)
-     const char *domainname;
+textdomain (const char *domainname)
 {
   return textdomain__ (domainname);
 }
 
 
 char *
-bindtextdomain (domainname, dirname)
-     const char *domainname;
-     const char *dirname;
+bindtextdomain (const char *domainname,
+                const char *dirname)
 {
   return bindtextdomain__ (domainname, dirname);
 }
 
 
 char *
-bind_textdomain_codeset (domainname, codeset)
-     const char *domainname;
-     const char *codeset;
+bind_textdomain_codeset (const char *domainname,
+                         const char *codeset)
 {
   return bind_textdomain_codeset__ (domainname, codeset);
 }
diff -r --unified=5 sed-4.1.4/intl/l10nflist.c sed-4.1.4-1/intl/l10nflist.c
--- sed-4.1.4/intl/l10nflist.c  2004-11-09 12:04:14.000000000 -0600
+++ sed-4.1.4-1/intl/l10nflist.c        2005-07-08 11:26:21.000000000 -0500
@@ -67,13 +67,12 @@
 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
 /* Returns the number of strings in ARGZ.  */
 static size_t argz_count__ PARAMS ((const char *argz, size_t len));
 
 static size_t
-argz_count__ (argz, len)
-     const char *argz;
-     size_t len;
+argz_count__ (const char *argz,
+              size_t len)
 {
   size_t count = 0;
   while (len > 0)
     {
       size_t part_len = strlen (argz);
@@ -91,14 +90,13 @@
 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
    except the last into the character SEP.  */
 static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
 
 static void
-argz_stringify__ (argz, len, sep)
-     char *argz;
-     size_t len;
-     int sep;
+argz_stringify__ (char *argz,
+                  size_t len,
+                  int sep)
 {
   while (len > 0)
     {
       size_t part_len = strlen (argz);
       argz += part_len;
@@ -114,14 +112,13 @@
 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
 static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
                                  const char *entry));
 
 static char *
-argz_next__ (argz, argz_len, entry)
-     char *argz;
-     size_t argz_len;
-     const char *entry;
+argz_next__ (char *argz,
+             size_t argz_len,
+             const char *entry)
 {
   if (entry)
     {
       if (entry < argz + argz_len)
         entry = strchr (entry, '\0') + 1;
@@ -141,41 +138,37 @@
 
 /* Return number of bits set in X.  */
 static int pop PARAMS ((int x));
 
 static inline int
-pop (x)
-     int x;
+pop (int x)
 {
   /* We assume that no more than 16 bits are used.  */
   x = ((x & ~0x5555) >> 1) + (x & 0x5555);
   x = ((x & ~0x3333) >> 2) + (x & 0x3333);
   x = ((x >> 4) + x) & 0x0f0f;
   x = ((x >> 8) + x) & 0xff;
 
   return x;
 }
 
-

+
 struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
-                   territory, codeset, normalized_codeset, modifier, special,
-                   sponsor, revision, filename, do_allocate)
-     struct loaded_l10nfile **l10nfile_list;
-     const char *dirlist;
-     size_t dirlist_len;
-     int mask;
-     const char *language;
-     const char *territory;
-     const char *codeset;
-     const char *normalized_codeset;
-     const char *modifier;
-     const char *special;
-     const char *sponsor;
-     const char *revision;
-     const char *filename;
-     int do_allocate;
+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
+                    const char *dirlist,
+                    size_t dirlist_len,
+                    int mask,
+                    const char *language,
+                    const char *territory,
+                    const char *codeset,
+                    const char *normalized_codeset,
+                    const char *modifier,
+                    const char *special,
+                    const char *sponsor,
+                    const char *revision,
+                    const char *filename,
+                    int do_allocate)
 {
   char *abs_filename;
   struct loaded_l10nfile *last = NULL;
   struct loaded_l10nfile *retval;
   char *cp;
@@ -332,19 +325,18 @@
       }
   retval->successor[entries] = NULL;
 
   return retval;
 }
-

+
 /* Normalize codeset name.  There is no standard for the codeset
    names.  Normalization allows the user to use any of the common
    names.  The return value is dynamically allocated and has to be
    freed by the caller.  */
 const char *
-_nl_normalize_codeset (codeset, name_len)
-     const char *codeset;
-     size_t name_len;
+_nl_normalize_codeset (const char *codeset,
+                       size_t name_len)
 {
   int len = 0;
   int only_digit = 1;
   char *retval;
   char *wp;
@@ -387,13 +379,12 @@
    avoid the non-standard function stpcpy.  In GNU C Library this
    function is available, though.  Also allow the symbol HAVE_STPCPY
    to be defined.  */
 #if !_LIBC && !HAVE_STPCPY
 static char *
-stpcpy (dest, src)
-     char *dest;
-     const char *src;
+stpcpy (char *dest,
+        const char *src)
 {
   while ((*dest++ = *src++) != '\0')
     /* Do nothing. */ ;
   return dest - 1;
 }
diff -r --unified=5 sed-4.1.4/intl/loadmsgcat.c sed-4.1.4-1/intl/loadmsgcat.c
--- sed-4.1.4/intl/loadmsgcat.c 2004-11-09 12:04:14.000000000 -0600
+++ sed-4.1.4-1/intl/loadmsgcat.c       2005-07-08 11:21:03.000000000 -0500
@@ -126,14 +126,13 @@
 
 /* Initialize the codeset dependent parts of an opened message catalog.
    Return the header entry.  */
 const char *
 internal_function
-_nl_init_domain_conv (domain_file, domain, domainbinding)
-     struct loaded_l10nfile *domain_file;
-     struct loaded_domain *domain;
-     struct binding *domainbinding;
+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
+                      struct loaded_domain *domain,
+                      struct binding *domainbinding)
 {
   /* Find out about the character set the file is encoded with.
      This can be found (in textual form) in the entry "".  If this
      entry does not exist or if this does not contain the `charset='
      information, we will assume the charset matches the one the
@@ -241,12 +240,11 @@
 }
 
 /* Frees the codeset dependent parts of an opened message catalog.  */
 void
 internal_function
-_nl_free_domain_conv (domain)
-     struct loaded_domain *domain;
+_nl_free_domain_conv (struct loaded_domain *domain)
 {
   if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
     free (domain->conv_tab);
 
 #ifdef _LIBC
@@ -262,13 +260,12 @@
 
 /* Load the message catalogs specified by FILENAME.  If it is no valid
    message catalog do nothing.  */
 void
 internal_function
-_nl_load_domain (domain_file, domainbinding)
-     struct loaded_l10nfile *domain_file;
-     struct binding *domainbinding;
+_nl_load_domain (struct loaded_l10nfile *domain_file,
+                 struct binding *domainbinding)
 {
   int fd;
   size_t size;
 #ifdef _LIBC
   struct stat64 st;
@@ -423,12 +420,11 @@
 
 
 #ifdef _LIBC
 void
 internal_function
-_nl_unload_domain (domain)
-     struct loaded_domain *domain;
+_nl_unload_domain (struct loaded_domain *domain)
 {
   if (domain->plural != &__gettext_germanic_plural)
     __gettext_free_exp (domain->plural);
 
   _nl_free_domain_conv (domain);
diff -r --unified=5 sed-4.1.4/intl/localealias.c sed-4.1.4-1/intl/localealias.c
--- sed-4.1.4/intl/localealias.c        2004-11-09 12:04:15.000000000 -0600
+++ sed-4.1.4-1/intl/localealias.c      2005-07-08 11:20:05.000000000 -0500
@@ -130,12 +130,11 @@
 static int alias_compare PARAMS ((const struct alias_map *map1,
                                  const struct alias_map *map2));
 
 
 const char *
-_nl_expand_alias (name)
-    const char *name;
+_nl_expand_alias (const char *name)
 {
   static const char *locale_alias_path;
   struct alias_map *retval;
   const char *result = NULL;
   size_t added;
@@ -197,13 +196,12 @@
 }
 
 
 static size_t
 internal_function
-read_alias_file (fname, fname_len)
-     const char *fname;
-     int fname_len;
+read_alias_file (const char *fname,
+                 int fname_len)
 {
   FILE *fp;
   char *full_fname;
   size_t added;
   static const char aliasfile[] = "/locale.alias";
@@ -385,13 +383,12 @@
 text_set_element (__libc_subfreeres, free_mem);
 #endif
 
 
 static int
-alias_compare (map1, map2)
-     const struct alias_map *map1;
-     const struct alias_map *map2;
+alias_compare (const struct alias_map *map1,
+               const struct alias_map *map2)
 {
 #if defined _LIBC || defined HAVE_STRCASECMP
   return strcasecmp (map1->alias, map2->alias);
 #else
   const unsigned char *p1 = (const unsigned char *) map1->alias;
diff -r --unified=5 sed-4.1.4/intl/localename.c sed-4.1.4-1/intl/localename.c
--- sed-4.1.4/intl/localename.c 2004-11-09 12:04:15.000000000 -0600
+++ sed-4.1.4-1/intl/localename.c       2005-07-08 11:18:19.000000000 -0500
@@ -360,13 +360,12 @@
    The codeset part in the result is not reliable; the locale_charset()
    should be used for codeset information instead.
    The result must not be freed; it is statically allocated.  */
 
 const char *
-_nl_locale_name (category, categoryname)
-     int category;
-     const char *categoryname;
+_nl_locale_name (int category,
+                 const char *categoryname)
 {
   const char *retval;
 
 #ifndef WIN32
 
diff -r --unified=5 sed-4.1.4/intl/ngettext.c sed-4.1.4-1/intl/ngettext.c
--- sed-4.1.4/intl/ngettext.c   2004-11-09 12:04:15.000000000 -0600
+++ sed-4.1.4-1/intl/ngettext.c 2005-07-08 11:17:18.000000000 -0500
@@ -52,14 +52,13 @@
 
 /* Look up MSGID in the current default message catalog for the current
    LC_MESSAGES locale.  If not found, returns MSGID itself (the default
    text).  */
 char *
-NGETTEXT (msgid1, msgid2, n)
-     const char *msgid1;
-     const char *msgid2;
-     unsigned long int n;
+NGETTEXT (const char *msgid1,
+          const char *msgid2,
+          unsigned long int n)
 {
   return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
 }
 
 #ifdef _LIBC
diff -r --unified=5 sed-4.1.4/intl/plural.c sed-4.1.4-1/intl/plural.c
--- sed-4.1.4/intl/plural.c     2004-11-09 12:04:16.000000000 -0600
+++ sed-4.1.4-1/intl/plural.c   2005-07-08 11:13:59.000000000 -0500
@@ -88,14 +88,12 @@
 static void yyerror PARAMS ((const char *str));
 
 /* Allocation of expressions.  */
 
 static struct expression *
-new_exp (nargs, op, args)
-     int nargs;
-     enum operator op;
-     struct expression * const *args;
+new_exp (int nargs, enum op,
+         struct expression * const *args)
 {
   int i;
   struct expression *newp;
 
   /* If any of the argument could not be malloc'ed, just return NULL.  */
@@ -120,46 +118,42 @@
 
   return NULL;
 }
 
 static inline struct expression *
-new_exp_0 (op)
-     enum operator op;
+new_exp_0 (enum operator op)
 {
   return new_exp (0, op, NULL);
 }
 
 static inline struct expression *
-new_exp_1 (op, right)
-     enum operator op;
-     struct expression *right;
+new_exp_1 (enum operator op,
+           struct expression *right)
 {
   struct expression *args[1];
 
   args[0] = right;
   return new_exp (1, op, args);
 }
 
 static struct expression *
-new_exp_2 (op, left, right)
-     enum operator op;
-     struct expression *left;
-     struct expression *right;
+new_exp_2 (enum operator op,
+           struct expression *left,
+           struct expression *right)
 {
   struct expression *args[2];
 
   args[0] = left;
   args[1] = right;
   return new_exp (2, op, args);
 }
 
 static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
-     enum operator op;
-     struct expression *bexp;
-     struct expression *tbranch;
-     struct expression *fbranch;
+new_exp_3 (enum operator op,
+           struct expression *bexp,
+           struct expression *tbranch,
+           struct expression *fbranch)
 {
   struct expression *args[3];
 
   args[0] = bexp;
   args[1] = tbranch;
@@ -466,11 +460,11 @@
 #endif
 
 #ifndef YYMAXDEPTH
 #define YYMAXDEPTH 10000
 #endif
-

+
 /* Define __yy_memcpy.  Note that the size argument
    should be passed with type unsigned int, because that is what the non-GCC
    definitions require.  With GCC, __builtin_memcpy takes an arg
    of type size_t, but it can handle unsigned int.  */
 
@@ -480,14 +474,13 @@
 #ifndef __cplusplus
 
 /* This is the most reliable way to avoid incompatibilities
    in available built-in functions on various systems.  */
 static void
-__yy_memcpy (to, from, count)
-     char *to;
-     char *from;
-     unsigned int count;
+__yy_memcpy (char *to,
+             char *from,
+             unsigned int count)
 {
   register char *f = from;
   register char *t = to;
   register int i = count;
 
@@ -498,11 +491,13 @@
 #else /* __cplusplus */
 
 /* This is the most reliable way to avoid incompatibilities
    in available built-in functions on various systems.  */
 static void
-__yy_memcpy (char *to, char *from, unsigned int count)
+__yy_memcpy (char *to,
+             char *from,
+             unsigned int count)
 {
   register char *t = to;
   register char *f = from;
   register int i = count;
 
@@ -510,11 +505,11 @@
     *t++ = *f++;
 }
 
 #endif
 #endif
-

+
 #line 217 "/usr/local/share/bison.simple"
 
 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
    into yyparse.  The argument should have type void *.
    It should actually point to an object.
@@ -542,12 +537,11 @@
 int yyparse (void);
 #endif
 #endif
 
 int
-yyparse(YYPARSE_PARAM_ARG)
-     YYPARSE_PARAM_DECL
+yyparse(YYPARSE_PARAM_DECL YYPARSE_PARAM_ARG)
 {
   register int yystate;
   register int yyn;
   register short *yyssp;
   register YYSTYPE *yyvsp;
@@ -917,11 +911,11 @@
          ;
     break;}
 }
    /* the action file gets copied in in place of this dollarsign */
 #line 543 "/usr/local/share/bison.simple"
-

+
   yyvsp -= yylen;
   yyssp -= yylen;
 #ifdef YYLSP_NEEDED
   yylsp -= yylen;
 #endif
@@ -1141,12 +1135,11 @@
 #line 229 "plural.y"
 
 
 void
 internal_function
-FREE_EXPRESSION (exp)
-     struct expression *exp;
+FREE_EXPRESSION (struct expression *exp)
 {
   if (exp == NULL)
     return;
 
   /* Handle the recursive case.  */
@@ -1168,13 +1161,12 @@
   free (exp);
 }
 
 
 static int
-yylex (lval, pexp)
-     YYSTYPE *lval;
-     const char **pexp;
+yylex (YYSTYPE *lval,
+       const char **pexp)
 {
   const char *exp = *pexp;
   int result;
 
   while (1)
@@ -1313,10 +1305,9 @@
   return result;
 }
 
 
 static void
-yyerror (str)
-     const char *str;
+yyerror (const char *str)
 {
   /* Do nothing.  We don't print error messages here.  */
 }
diff -r --unified=5 sed-4.1.4/intl/plural-exp.c sed-4.1.4-1/intl/plural-exp.c
--- sed-4.1.4/intl/plural-exp.c 2004-11-09 12:04:15.000000000 -0600
+++ sed-4.1.4-1/intl/plural-exp.c       2005-07-08 11:11:11.000000000 -0500
@@ -94,14 +94,13 @@
 
 #endif
 
 void
 internal_function
-EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
-     const char *nullentry;
-     struct expression **pluralp;
-     unsigned long int *npluralsp;
+EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
+                           struct expression **pluralp,
+                           unsigned long int *npluralsp)
 {
   if (nullentry != NULL)
     {
       const char *plural;
       const char *nplurals;
diff -r --unified=5 sed-4.1.4/intl/textdomain.c sed-4.1.4-1/intl/textdomain.c
--- sed-4.1.4/intl/textdomain.c 2004-11-09 12:04:16.000000000 -0600
+++ sed-4.1.4-1/intl/textdomain.c       2005-07-06 03:16:10.000000000 -0500
@@ -75,12 +75,11 @@
 
 /* Set the current default message catalog to DOMAINNAME.
    If DOMAINNAME is null, return the current default.
    If DOMAINNAME is "", reset to the default of "messages".  */
 char *
-TEXTDOMAIN (domainname)
-     const char *domainname;
+TEXTDOMAIN (const char *domainname)
 {
   char *new_domain;
   char *old_domain;
 
   /* A NULL pointer requests the current setting.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]