This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Convert prototypes to ISO C90


Here's a trivial patch to convert some prototypes to ISO C90.  Ok to
commit?

Andreas

2003-09-26  Andreas Jaeger  <aj@suse.de>

	* intl/loadmsgcat.c: Convert prototypes to ISO C90.
	* ctype/isctype.c (__isctype): Likewise.
	* intl/bindtextdom.c: Likewise.
	* intl/dcgettext.c (DCGETTEXT): Likewise.
	* intl/dcigettext.c: Likewise.
	* intl/dcngettext.c (DCNGETTEXT): Likewise.
	* intl/dgettext.c (DGETTEXT): Likewise.
	* intl/finddomain.c (_nl_find_domain): Likewise.
	* intl/localealias.c: Likewise.
	* intl/ngettext.c (NGETTEXT): Likewise.
	* intl/plural-eval.c (plural_eval): Likewise.
	* locale/nl_langinfo.c (__nl_langinfo_l): Likewise.

============================================================
Index: intl/bindtextdom.c
--- intl/bindtextdom.c	11 Dec 2002 22:58:28 -0000	1.21
+++ intl/bindtextdom.c	26 Sep 2003 16:50:55 -0000
@@ -1,5 +1,5 @@
 /* Implementation of the bindtextdomain(3) function
-   Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998,2000,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -99,10 +99,8 @@ static void set_binding_values PARAMS ((
    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;
@@ -349,9 +347,7 @@ set_binding_values (domainname, dirnamep
 /* 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;
@@ -360,9 +356,7 @@ BINDTEXTDOMAIN (domainname, 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;
============================================================
Index: intl/dcgettext.c
--- intl/dcgettext.c	11 Dec 2002 22:58:28 -0000	1.35
+++ intl/dcgettext.c	26 Sep 2003 16:50:55 -0000
@@ -1,5 +1,5 @@
 /* Implementation of the dcgettext(3) function.
-   Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999,2000,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,10 +45,7 @@
 /* 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);
 }
============================================================
Index: intl/dcigettext.c
--- intl/dcigettext.c	11 Jun 2003 21:45:34 -0000	1.45
+++ intl/dcigettext.c	26 Sep 2003 16:50:56 -0000
@@ -380,13 +380,8 @@ static int enable_secure;
    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;
@@ -668,11 +663,9 @@ DCIGETTEXT (domainname, msgid1, msgid2, 
 
 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;
   nls_uint32 nstrings;
@@ -979,11 +972,8 @@ _nl_find_msg (domain_file, domainbinding
 /* 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;
============================================================
Index: intl/dcngettext.c
--- intl/dcngettext.c	11 Dec 2002 22:58:28 -0000	1.7
+++ intl/dcngettext.c	26 Sep 2003 16:50:56 -0000
@@ -1,5 +1,5 @@
 /* Implementation of the dcngettext(3) function.
-   Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -45,12 +45,8 @@
 /* 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);
 }
============================================================
Index: intl/dgettext.c
--- intl/dgettext.c	11 Dec 2002 22:58:28 -0000	1.10
+++ intl/dgettext.c	26 Sep 2003 16:50:56 -0000
@@ -1,5 +1,5 @@
 /* Implementation of the dgettext(3) function.
-   Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1997,2000,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -47,9 +47,7 @@
 /* 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);
 }
============================================================
Index: intl/finddomain.c
--- intl/finddomain.c	1 Nov 2002 20:43:55 -0000	1.29
+++ intl/finddomain.c	26 Sep 2003 16:50:56 -0000
@@ -1,5 +1,5 @@
 /* Handle list of needed message catalogs
-   Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -48,11 +48,8 @@ static struct loaded_l10nfile *_nl_loade
    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;
============================================================
Index: intl/loadmsgcat.c
--- intl/loadmsgcat.c	3 Sep 2003 17:44:46 -0000	1.49
+++ intl/loadmsgcat.c	26 Sep 2003 16:50:56 -0000
@@ -485,8 +485,7 @@ int _nl_msg_cat_cntr;
 
 /* Expand a system dependent string segment.  Return NULL if unsupported.  */
 static const char *
-get_sysdep_segment_value (name)
-     const char *name;
+get_sysdep_segment_value (const char *name)
 {
   /* Test for an ISO C 99 section 7.8.1 format string directive.
      Syntax:
@@ -743,10 +742,9 @@ get_sysdep_segment_value (name)
    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
@@ -862,8 +860,7 @@ _nl_init_domain_conv (domain_file, domai
 /* 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);
@@ -883,9 +880,7 @@ _nl_free_domain_conv (domain)
    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;
@@ -1280,8 +1275,7 @@ _nl_load_domain (domain_file, domainbind
 #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);
============================================================
Index: intl/localealias.c
--- intl/localealias.c	4 Sep 2003 08:25:12 -0000	1.42
+++ intl/localealias.c	26 Sep 2003 16:50:56 -0000
@@ -130,16 +130,15 @@ static size_t maxmap;
 
 
 /* Prototypes for local functions.  */
-static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+static size_t read_alias_file (const char *fname, int fname_len)
      internal_function;
-static int extend_alias_table PARAMS ((void));
-static int alias_compare PARAMS ((const struct alias_map *map1,
-				  const struct alias_map *map2));
+static int extend_alias_table (void);
+static int alias_compare (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 = LOCALE_ALIAS_PATH;
   struct alias_map *retval;
@@ -201,9 +200,7 @@ _nl_expand_alias (name)
 
 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;
@@ -362,7 +359,7 @@ read_alias_file (fname, fname_len)
 
 
 static int
-extend_alias_table ()
+extend_alias_table (void)
 {
   size_t new_size;
   struct alias_map *new_map;
@@ -381,9 +378,7 @@ extend_alias_table ()
 
 
 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);
============================================================
Index: intl/ngettext.c
--- intl/ngettext.c	11 Dec 2002 22:58:28 -0000	1.10
+++ intl/ngettext.c	26 Sep 2003 16:50:56 -0000
@@ -1,5 +1,5 @@
 /* Implementation of ngettext(3) function.
-   Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -55,10 +55,7 @@
    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);
 }
============================================================
Index: intl/plural-eval.c
--- intl/plural-eval.c	27 Nov 2001 22:52:33 -0000	1.1
+++ intl/plural-eval.c	26 Sep 2003 16:50:57 -0000
@@ -1,5 +1,5 @@
 /* Plural expression evaluation.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,7 @@ static unsigned long int plural_eval (st
 
 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)
     {
============================================================
Index: ctype/isctype.c
--- ctype/isctype.c	1 Sep 2002 18:24:55 -0000	1.1
+++ ctype/isctype.c	26 Sep 2003 16:50:57 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,7 @@
 #undef __isctype
 
 int
-__isctype (ch, mask)
-     int ch;
-     int mask;
+__isctype (int ch, int mask)
 {
   return (((uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128)
 	  [(int) (ch)] & mask);
============================================================
Index: locale/nl_langinfo.c
--- locale/nl_langinfo.c	29 Aug 2002 02:17:54 -0000	1.16
+++ locale/nl_langinfo.c	26 Sep 2003 16:50:57 -0000
@@ -1,5 +1,5 @@
 /* User interface for extracting locale-dependent parameters.
-   Copyright (C) 1995,96,97,99,2000,01,02 Free Software Foundation, Inc.
+   Copyright (C) 1995,96,97,99,2000,01,02,03 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -28,13 +28,10 @@
 
 #ifdef USE_IN_EXTENDED_LOCALE_MODEL
 char *
-__nl_langinfo_l (item, l)
-     nl_item item;
-     __locale_t l;
+__nl_langinfo_l (nl_item item, __locale_t l)
 #else
 char *
-nl_langinfo (item)
-     nl_item item;
+nl_langinfo (nl_item item)
 #endif
 {
   int category = _NL_ITEM_CATEGORY (item);

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]