]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Switch from K&R C to ANSI C.
authorBruno Haible <bruno@clisp.org>
Thu, 14 Nov 2002 15:00:41 +0000 (15:00 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:08:51 +0000 (12:08 +0200)
240 files changed:
ChangeLog
configure.in
lib/ChangeLog
lib/Makefile.am
lib/addext.c
lib/alloca.c
lib/argmatch.c
lib/argmatch.h
lib/backupfile.c
lib/backupfile.h
lib/basename.c
lib/basename.h
lib/c-ctype.c
lib/c-ctype.h
lib/classpath.c
lib/concatpath.c
lib/copy-file.c
lib/copy-file.h
lib/execute.c
lib/execute.h
lib/findprog.c
lib/findprog.h
lib/fstrcmp.c
lib/fstrcmp.h
lib/full-write.c
lib/full-write.h
lib/gcd.c
lib/gcd.h
lib/getline.c
lib/getline.h
lib/hash.c
lib/hash.h
lib/javacomp.c
lib/javacomp.h
lib/javaexec.c
lib/javaexec.h
lib/libstdarg.h [deleted file]
lib/linebreak.c
lib/linebreak.h
lib/mbswidth.c
lib/mbswidth.h
lib/memmove.c
lib/memset.c
lib/mkdtemp.c
lib/mkdtemp.h
lib/pathname.h
lib/pfnmatch.c
lib/pfnmatch.h
lib/pipe-bidi.c
lib/pipe-in.c
lib/pipe-out.c
lib/pipe.h
lib/progname.c
lib/progname.h
lib/safe-read.c
lib/safe-read.h
lib/setenv.c
lib/setenv.h
lib/sh-quote.c
lib/sh-quote.h
lib/stpcpy.c
lib/stpcpy.h
lib/stpncpy.c
lib/stpncpy.h
lib/strcase.h
lib/strcasecmp.c
lib/strcspn.c
lib/strncasecmp.c
lib/strpbrk.c
lib/strpbrk.h
lib/strstr.c
lib/strstr.h
lib/tmpdir.c
lib/tmpdir.h
lib/ucs4-utf16.h
lib/ucs4-utf8.h
lib/unsetenv.c
lib/utf16-ucs4.h
lib/utf8-ucs4.h
lib/vasprintf.c
lib/vasprintf.h
lib/wait-process.c
lib/wait-process.h
lib/xerror.c
lib/xerror.h
lib/xgetcwd.h
lib/xmalloc.c
lib/xmalloc.h
lib/xsetenv.c
lib/xsetenv.h
lib/xstrdup.c
libasprintf/ChangeLog
libasprintf/Makefile.am
libasprintf/asnprintf.c
libasprintf/asprintf.c
libasprintf/libstdarg.h [deleted file]
libasprintf/printf-args.c
libasprintf/printf-args.h
libasprintf/printf-parse.c
libasprintf/printf-parse.h
libasprintf/vasnprintf.c
libasprintf/vasnprintf.h
libasprintf/vasprintf.c
libasprintf/vasprintf.h
libuniname/ChangeLog
libuniname/test-names.c
libuniname/uniname.c
libuniname/uniname.h
m4/ChangeLog
m4/Makefile.am
m4/c-bs-a.m4 [deleted file]
misc/ChangeLog
misc/tcl_gettext.c
os2/configure.awk
src/ChangeLog
src/dir-list.c
src/dir-list.h
src/file-list.c
src/file-list.h
src/format-awk.c
src/format-c.c
src/format-elisp.c
src/format-java.c
src/format-librep.c
src/format-lisp.c
src/format-pascal.c
src/format-php.c
src/format-python.c
src/format-tcl.c
src/format-ycp.c
src/format.h
src/gettext.c
src/hostname.c
src/message.c
src/message.h
src/msgattrib.c
src/msgcat.c
src/msgcmp.c
src/msgcomm.c
src/msgconv.c
src/msgen.c
src/msgexec.c
src/msgfilter.c
src/msgfmt.c
src/msggrep.c
src/msginit.c
src/msgl-ascii.c
src/msgl-ascii.h
src/msgl-cat.c
src/msgl-cat.h
src/msgl-charset.c
src/msgl-charset.h
src/msgl-english.c
src/msgl-english.h
src/msgl-equal.c
src/msgl-equal.h
src/msgl-iconv.c
src/msgl-iconv.h
src/msgmerge.c
src/msgunfmt.c
src/msguniq.c
src/ngettext.c
src/open-po.c
src/open-po.h
src/po-charset.c
src/po-charset.h
src/po-gram.h
src/po-hash-gen.y
src/po-hash.h
src/po-lex.c
src/po-lex.h
src/po-time.c
src/po-time.h
src/po.c
src/po.h
src/read-java.c
src/read-java.h
src/read-mo.c
src/read-mo.h
src/read-po.c
src/read-po.h
src/read-tcl.c
src/read-tcl.h
src/str-list.c
src/str-list.h
src/urlget.c
src/write-java.c
src/write-java.h
src/write-mo.c
src/write-mo.h
src/write-po.c
src/write-po.h
src/write-tcl.c
src/write-tcl.h
src/x-awk.c
src/x-awk.h
src/x-c.c
src/x-c.h
src/x-elisp.c
src/x-elisp.h
src/x-glade.c
src/x-glade.h
src/x-java.h
src/x-java.l
src/x-librep.c
src/x-librep.h
src/x-lisp.c
src/x-lisp.h
src/x-php.c
src/x-php.h
src/x-po.c
src/x-po.h
src/x-python.c
src/x-python.h
src/x-rst.c
src/x-rst.h
src/x-smalltalk.c
src/x-smalltalk.h
src/x-tcl.c
src/x-tcl.h
src/x-ycp.c
src/x-ycp.h
src/xgettext.c
src/xgettext.h
tests/ChangeLog
tests/format-c-3
tests/format-c-3-prg.c
tests/format-c-4
tests/format-c-4-prg.c
tests/plural-1-prg.c
tests/rpathlx/usex.c
tests/rpathly/usey.c
tests/rpathlyx/usey.c
tests/rpathlz/usez.c
tests/rpathlzyx/usez.c
tests/rpathy/rpathy.c
tests/rpathz/rpathz.c
tests/setlocale.c
tests/tstgettext.c
tests/tstngettext.c

index d259b7bb8111a3c35ea19356c8c55ea58cef4c69..ec171bfd5ee90d8dc6ec767c6390c95016e6791f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * configure.in: Remove AC_C_BACKSLASH_A call.
+       * os2/configure.awk: Remove HAVE_C_BACKSLASH_A setting.
+
 2002-11-07  Bruno Haible  <bruno@clisp.org>
 
        * ltmain.sh: Upgrade to libtool-1.4.3.
index ca07c27cb224a7284e6b24a27e08226fbf656652..249dacbcc7dc614e40535a3438cd4bc7bf16752b 100644 (file)
@@ -64,7 +64,6 @@ dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
 bh_C_SIGNED
-AC_C_BACKSLASH_A
 jm_AC_TYPE_UNSIGNED_LONG_LONG
 AC_TYPE_OFF_T
 AC_TYPE_SIZE_T
index 482e0016d61e02240272c314c7f750878bebe98d..7960cce7a63bbde812d835bef95b824ae5d6f789 100644 (file)
@@ -1,3 +1,146 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * libstdarg.h: Remove file.
+       * Makefile.am (LIBADD_SOURCE): Remove libstdarg.h.
+       * addext.c (addext): Use ANSI C function declarations.
+       * alloca.c (alloca): Likewise.
+       * argmatch.h (PARAMS): Remove macro.
+       (argmatch, argmatch_exit_fn, argmatch_invalid, argmatch_valid,
+       __xargmatch_internal, argmatch_to_argument): Use ANSI C function
+       declarations.
+       * argmatch.c (argmatch, argmatch_invalid, argmatch_valid,
+       __xargmatch_internal, argmatch_to_argument): Likewise.
+       * backupfile.h (PARAMS): Remove macro.
+       (find_backup_file_name, get_version, xget_version, addext): Use ANSI C
+       function declarations.
+       * backupfile.c (find_backup_file_name, max_backup_version,
+       version_number, get_version, xget_version): Likewise.
+       * basename.h (gnu_basename): Likewise.
+       * basename.c (basename): Likewise.
+       * c-ctype.h (PARAMS): Remove macro.
+       (c_isascii, c_isalnum, c_isalpha, c_isblank, c_iscntrl, c_isdigit,
+       c_islower, c_isgraph, c_isprint, c_ispunct, c_isspace, c_isupper,
+       c_isxdigit, c_tolower, c_toupper): Use ANSI C function declarations.
+       * c-ctype.c (c_isascii, c_isalnum, c_isalpha, c_isblank, c_iscntrl,
+       c_isdigit, c_islower, c_isgraph, c_isprint, c_ispunct, c_isspace,
+       c_isupper, c_isxdigit, c_tolower, c_toupper): Likewise.
+       * classpath.c (new_classpath, set_classpath, reset_classpath):
+       Likewise.
+       * concatpath.c (concatenated_pathname): Likewise.
+       * copy-file.h (copy_file): Likewise.
+       * copy-file.c (copy_file): Likewise.
+       * execute.h (execute): Likewise.
+       * execute.c (nonintr_close, nonintr_open, execute): Likewise.
+       * findprog.h (find_in_path): Likewise.
+       * findprog.c (find_in_path): Likewise.
+       * fstrcmp.h (fstrcmp): Likewise.
+       * fstrcmp.c (diag, compareseq, fstrcmp): Likewise.
+       * full-write.h (full_write): Likewise.
+       * full-write.c (full_write): Likewise.
+       * gcd.h (PARAMS): Remove macro.
+       (gcd): Use ANSI C function declarations.
+       * gcd.c (gcd): Likewise.
+       * getline.h (PARAMS): Remove macro.
+       (getline, getdelim): Use ANSI C function declarations.
+       * getline.c (getstr, getline, getdelim): Likewise.
+       * hash.h (PARAMS): Remove macro.
+       (init_hash, delete_hash, insert_entry, find_entry, iterate_table,
+       next_prime): Use ANSI C function declarations.
+       * hash.c (init_hash, delete_hash, insert_entry, insert_entry_2,
+       find_entry, iterate_table, lookup, compute_hashval, next_prime,
+       is_prime): Likewise.
+       * javacomp.h (compile_java_class): Likewise.
+       * javacomp.c (compile_java_class): Likewise.
+       * javaexec.h (execute_fn, execute_java_class): Likewise.
+       * javaexec.c (execute_java_class): Likewise.
+       * linebreak.h (PARAMS): Remove macro.
+       (locale_charset, uc_width, u8_width, u16_width, u32_width,
+       u8_possible_linebreaks, u16_possible_linebreaks,
+       u32_possible_linebreaks, mbs_possible_linebreaks, u8_width_linebreaks,
+       u16_width_linebreaks, u32_width_linebreaks, mbs_width_linebreaks): Use
+       ANSI C function declarations.
+       * linebreak.c (u32_mbtouc, is_cjk_encoding, is_utf8_encoding,
+       uc_width, u8_width, u16_width, u32_width, lbrkprop_lookup,
+       u8_possible_linebreaks, u16_possible_linebreaks,
+       u32_possible_linebreaks, u8_width_linebreaks, u16_width_linebreaks,
+       u32_width_linebreaks, read_file, main, iconv_string_length,
+       iconv_string_keeping_offsets, is_all_ascii, mbs_possible_linebreaks,
+       mbs_width_linebreaks, read_file, main): Likewise.
+       * mbswidth.h (PARAMS): Remove macro.
+       (mbswidth, mbsnwidth): Use ANSI C function declarations.
+       * mbswidth.c (mbswidth, mbsnwidth): Likewise.
+       * memmove.c (memmove): Likewise.
+       * memset.c (memset): Likewise.
+       * mkdtemp.h (PARAMS): Remove macro.
+       (mkdtemp): Use ANSI C function declarations.
+       * mkdtemp.c (gen_tempname, mkdtemp): Likewise.
+       * pathname.h (PARAMS): Remove macro.
+       (concatenated_pathname): Use ANSI C function declarations.
+       * pfnmatch.h (PARAMS): Remove macro.
+       (fnmatch): Use ANSI C function declarations.
+       * pfnmatch.c (fnmatch): Likewise.
+       * pipe.h (create_pipe_out, create_pipe_in, create_pipe_bidi):
+       Likewise.
+       * pipe-bidi.c (nonintr_close, create_pipe_bidi): Likewise.
+       * pipe-in.c (nonintr_close, nonintr_open, create_pipe_in): Likewise.
+       * pipe-out.c (nonintr_close, nonintr_open, create_pipe_out): Likewise.
+       * progname.h (set_program_name, maybe_print_progname): Likewise.
+       * progname.c (set_program_name): Likewise.
+       * safe-read.h (safe_read): Likewise.
+       * safe-read.c (safe_read): Likewise.
+       * setenv.h (PARAMS): Remove macro.
+       (setenv, unsetenv): Use ANSI C function declarations.
+       * setenv.c (compar_fn_t, __add_to_environ, setenv): Likewise.
+       * sh-quote.h (shell_quote_length, shell_quote_copy, shell_quote,
+       shell_quote_argv): Likewise.
+       * sh-quote.c (shell_quote_length, shell_quote_copy, shell_quote,
+       shell_quote_argv): Likewise.
+       * stpcpy.h (PARAMS): Remove macro.
+       (stpcpy): Use ANSI C function declarations.
+       * stpcpy.c (__stpcpy): Likewise.
+       * stpncpy.h (PARAMS): Remove macro.
+       (gnu_stpncpy): Use ANSI C function declarations.
+       * stpncpy.c (__stpncpy): Likewise.
+       * strcase.h (PARAMS): Remove macro.
+       (strcasecmp, strncasecmp): Use ANSI C function declarations.
+       * strcasecmp.c (__strcasecmp): Likewise.
+       * strncasecmp.c (__strncasecmp): Likewise.
+       * strcspn.c (strcspn): Likewise.
+       * strpbrk.h (PARAMS): Remove macro.
+       (strpbrk): Use ANSI C function declarations.
+       * strpbrk.c (strpbrk): Likewise.
+       * strstr.h (PARAMS): Remove macro.
+       (strstr): Use ANSI C function declarations.
+       * strstr.c (strstr): Likewise.
+       * tmpdir.h (PARAMS): Remove macro.
+       (path_search): Use ANSI C function declarations.
+       * tmpdir.c (direxists, path_search): Likewise.
+       * ucs4-utf8.h (u8_uctomb_aux, u8_uctomb): Likewise.
+       * ucs4-utf16.h (u16_uctomb_aux, u16_uctomb): Likewise.
+       * unsetenv.c (unsetenv): Likewise.
+       * utf8-ucs4.h (u8_mbtouc_aux, u8_mbtouc): Likewise.
+       * utf16-ucs4.h (u16_mbtouc_aux, u16_mbtouc): Likewise.
+       * vasprintf.h (PARAMS): Remove macro.
+       Include <stdarg.h> instead of libstdarg.h.
+       (asprintf, vasprintf): Use ANSI C function declarations.
+       * vasprintf.c: Include <stdarg.h> instead of libstdarg.h.
+       (int_vasprintf, asprintf, checkit): Use ANSI C function declarations.
+       Use va_start instead of VA_START.
+       * wait-process.h (wait_subprocess): Likewise.
+       * wait-process.c (wait_subprocess): Likewise.
+       * xerror.h (xasprintf, multiline_warning, multiline_error): Likewise.
+       * xerror.c: Include <stdarg.h> instead of libstdarg.h.
+       (xasprintf, multiline_warning, multiline_error): Use ANSI C function
+       declarations. Use va_start instead of VA_START.
+       * xgetcwd.h (PARAMS): Remove macro.
+       (xgetcwd): Use ANSI C function declarations.
+       * xmalloc.h (xmalloc, xcalloc, xrealloc, xstrdup): Likewise.
+       * xmalloc.c (fixup_null_alloc, xmalloc, xcalloc, xrealloc): Likewise.
+       * xsetenv.h (xsetenv): Likewise.
+       * xsetenv.c (xsetenv): Likewise.
+       * xstrdup.c (xstrdup): Likewise.
+
 2002-11-05  Bruno Haible  <bruno@clisp.org>
 
        * argmatch.c: Include gettext.h instead of <locale.h> and <libintl.h>.
index e297d58d6c9ecc23432a796837de18dd0eba98ff..7a32a36318fcd7182d0f0fc17938ca1556d09b85 100644 (file)
@@ -72,7 +72,6 @@ LIBADD_SOURCE = \
   mkdtemp.h mkdtemp.c \
   pfnmatch.h pfnmatch.c \
   setenv.h setenv.c unsetenv.c \
-  libstdarg.h \
   stpcpy.h stpcpy.c \
   strcase.h strcasecmp.c strncasecmp.c \
   strcspn.c \
index 9e601bd933d9b5e51235a8d166f412e8e00083b4..ec6c42e24e941d28f65683018ee2e9efce2ca60b 100644 (file)
@@ -1,5 +1,5 @@
 /* addext.c -- add an extension to a file name
-   Copyright (C) 1990, 1997-1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1997-1999, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    in which case just append the character E.  */
 
 void
-addext (filename, ext, e)
-     char *filename;
-     char const *ext;
-     int e;
+addext (char *filename, char const *ext, char e)
 {
   char *s = basename (filename);
   size_t slen = strlen (s), extlen = strlen (ext);
index 11e4cc374af7298c33ca59adaa206d1c0991b4b1..1f6ebbdd48801eac75bdd3cd927504d452a2091a 100644 (file)
@@ -186,11 +186,10 @@ static header *last_alloca_header = NULL; /* -> last alloca header.  */
 
 pointer
 #ifdef EMACS_WANTS_C_ALLOCA
-c_alloca (size)
+c_alloca (unsigned size)
 #else
-alloca (size)
+alloca (unsigned size)
 #endif
-     unsigned size;
 {
   auto char probe;             /* Probes stack depth: */
   register char *depth = ADDRESS_FUNCTION (probe);
index c3972e64744269327bbd5532ed7b9c8badf65841..0ff6ef861f6809178fd784cdae2bdfe181ad9e40 100644 (file)
@@ -41,11 +41,6 @@ ARGMATCH_DIE_DECL;
 #endif
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void __argmatch_die PARAMS ((void));
-
-
 static void
 __argmatch_die ()
 {
@@ -69,11 +64,8 @@ argmatch_exit_fn argmatch_die = __argmatch_die;
    "y" is a valid argument, for `0', and "n" for `1'.  */
 
 int
-argmatch (arg, arglist, vallist, valsize)
-     const char *arg;
-     const char *const *arglist;
-     const char *vallist;
-     size_t valsize;
+argmatch (const char *arg, const char *const *arglist,
+         const char *vallist, size_t valsize)
 {
   int i;                       /* Temporary index in ARGLIST.  */
   size_t arglen;               /* Length of ARG.  */
@@ -119,10 +111,7 @@ argmatch (arg, arglist, vallist, valsize)
    PROBLEM is the return value from argmatch.  */
 
 void
-argmatch_invalid (context, value, problem)
-     const char *context;
-     const char *value;
-     int problem;
+argmatch_invalid (const char *context, const char *value, int problem)
 {
   char const *format = (problem == -1
                        ? _("invalid argument `%s' for `%s'")
@@ -136,10 +125,8 @@ argmatch_invalid (context, value, problem)
    VALLIST is a pointer to an array of values.
    VALSIZE is the size of the elements of VALLIST */
 void
-argmatch_valid (arglist, vallist, valsize)
-     const char *const *arglist;
-     const char *vallist;
-     size_t valsize;
+argmatch_valid (const char *const *arglist,
+               const char *vallist, size_t valsize)
 {
   int i;
   const char *last_val = NULL;
@@ -168,13 +155,10 @@ argmatch_valid (arglist, vallist, valsize)
    calls the (supposed never to return) function EXIT_FN. */
 
 int
-__xargmatch_internal (context, arg, arglist, vallist, valsize, exit_fn)
-     const char *context;
-     const char *arg;
-     const char *const *arglist;
-     const char *vallist;
-     size_t valsize;
-     argmatch_exit_fn exit_fn;
+__xargmatch_internal (const char *context,
+                     const char *arg, const char *const *arglist,
+                     const char *vallist, size_t valsize,
+                     argmatch_exit_fn exit_fn)
 {
   int res = argmatch (arg, arglist, vallist, valsize);
   if (res >= 0)
@@ -192,11 +176,9 @@ __xargmatch_internal (context, arg, arglist, vallist, valsize, exit_fn)
 /* Look for VALUE in VALLIST, an array of objects of size VALSIZE and
    return the first corresponding argument in ARGLIST */
 const char *
-argmatch_to_argument (value, arglist, vallist, valsize)
-     const char *value;
-     const char *const *arglist;
-     const char *vallist;
-     size_t valsize;
+argmatch_to_argument (const char *value,
+                     const char *const *arglist,
+                     const char *vallist, size_t valsize)
 {
   int i;
 
index 380985ea978df66f215b55db112bc71d6aaf9caf..fb87a6f5f2a744eacd24ab886013c795fa12f56b 100644 (file)
@@ -1,5 +1,5 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
-   Copyright (C) 1990, 1998, 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 # include <sys/types.h>
 
-# ifndef PARAMS
-#  if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#   define PARAMS(args) args
-#  else
-#   define PARAMS(args) ()
-#  endif  /* ANSI C.  */
-# endif  /* Not PARAMS.  */
-
 /* Assert there are as many real arguments as there are values
    (argument list ends with a NULL guard).  There is no execution
    cost, since it will be statically evalauted to `assert (0)' or
@@ -51,9 +43,8 @@
    false ambiguities (i.e., different matches of ARG but corresponding
    to the same values in VALLIST).  */
 
-int argmatch
-  PARAMS ((const char *arg, const char *const *arglist,
-          const char *vallist, size_t valsize));
+int argmatch (const char *arg, const char *const *arglist,
+             const char *vallist, size_t valsize);
 
 # define ARGMATCH(Arg, Arglist, Vallist) \
   argmatch ((Arg), (Arglist), (const char *) (Vallist), sizeof (*(Vallist)))
@@ -61,13 +52,12 @@ int argmatch
 /* xargmatch calls this function when it fails.  This function should not
    return.  By default, this is a function that calls ARGMATCH_DIE which
    in turn defaults to `exit (EXIT_FAILURE)'.  */
-typedef void (*argmatch_exit_fn) PARAMS ((void));
+typedef void (*argmatch_exit_fn) (void);
 extern argmatch_exit_fn argmatch_die;
 
 /* Report on stderr why argmatch failed.  Report correct values. */
 
-void argmatch_invalid
-  PARAMS ((const char *context, const char *value, int problem));
+void argmatch_invalid (const char *context, const char *value, int problem);
 
 /* Left for compatibility with the old name invalid_arg */
 
@@ -78,9 +68,8 @@ void argmatch_invalid
 
 /* Report on stderr the list of possible arguments.  */
 
-void argmatch_valid
-  PARAMS ((const char *const *arglist,
-          const char *vallist, size_t valsize));
+void argmatch_valid (const char *const *arglist,
+                    const char *vallist, size_t valsize);
 
 # define ARGMATCH_VALID(Arglist, Vallist) \
   argmatch_valid (Arglist, (const char *) Vallist, sizeof (*(Vallist)))
@@ -90,11 +79,10 @@ void argmatch_valid
 /* Same as argmatch, but upon failure, reports a explanation on the
    failure, and exits using the function EXIT_FN. */
 
-int __xargmatch_internal
-  PARAMS ((const char *context,
-          const char *arg, const char *const *arglist,
-          const char *vallist, size_t valsize,
-          argmatch_exit_fn exit_fn));
+int __xargmatch_internal (const char *context,
+                         const char *arg, const char *const *arglist,
+                         const char *vallist, size_t valsize,
+                         argmatch_exit_fn exit_fn);
 
 /* Programmer friendly interface to __xargmatch_internal. */
 
@@ -106,9 +94,9 @@ int __xargmatch_internal
 
 /* Convert a value into a corresponding argument. */
 
-const char *argmatch_to_argument
-  PARAMS ((char const *value, const char *const *arglist,
-          const char *vallist, size_t valsize));
+const char *argmatch_to_argument (char const *value,
+                                 const char *const *arglist,
+                                 const char *vallist, size_t valsize);
 
 # define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist)                 \
   argmatch_to_argument ((char const *) &(Value), (Arglist),            \
index 78f2ad0a2e29821b78f1196adfb7f48dfb220eaf..24e0043a11aeb2fcd534d297f28584e1a179b792 100644 (file)
@@ -1,5 +1,5 @@
 /* backupfile.c -- make Emacs style backup file names
-   Copyright (C) 1990-1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-1999, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 const char *simple_backup_suffix = "~";
 
 #if HAVE_DIR
-static int max_backup_version PARAMS ((const char *, const char *));
-static int version_number PARAMS ((const char *, const char *, size_t));
+static int max_backup_version (const char *, const char *);
+static int version_number (const char *, const char *, size_t);
 #endif
 
 /* Return the name of the new backup file for file FILE,
@@ -110,9 +110,7 @@ static int version_number PARAMS ((const char *, const char *, size_t));
    Do not call this function if backup_type == none. */
 
 char *
-find_backup_file_name (file, backup_type)
-     const char *file;
-     enum backup_type backup_type;
+find_backup_file_name (const char *file, enum backup_type backup_type)
 {
   size_t backup_suffix_size_max;
   size_t file_len = strlen (file);
@@ -161,9 +159,7 @@ find_backup_file_name (file, backup_type)
    */
 
 static int
-max_backup_version (file, dir)
-     const char *file;
-     const char *dir;
+max_backup_version (const char *file, const char *dir)
 {
   DIR *dirp;
   struct dirent *dp;
@@ -197,10 +193,7 @@ max_backup_version (file, dir)
    */
 
 static int
-version_number (base, backup, base_length)
-     const char *base;
-     const char *backup;
-     size_t base_length;
+version_number (const char *base, const char *backup, size_t base_length)
 {
   int version;
   const char *p;
@@ -244,9 +237,7 @@ static const enum backup_type backup_types[] =
    for the specified CONTEXT.  Unambiguous abbreviations are accepted.  */
 
 enum backup_type
-get_version (context, version)
-     const char *context;
-     const char *version;
+get_version (const char *context, const char *version)
 {
   if (version == 0 || *version == 0)
     return numbered_existing;
@@ -262,9 +253,7 @@ get_version (context, version)
    Unambiguous abbreviations are accepted.  */
 
 enum backup_type
-xget_version (context, version)
-      const char *context;
-      const char *version;
+xget_version (const char *context, const char *version)
 {
   if (version && *version)
     return get_version (context, version);
index b06116157718f13414a5dba2fc3f64b2f97806c1..55ac682714ec60abe273286c02e71a658b1d3a5f 100644 (file)
@@ -1,5 +1,5 @@
 /* backupfile.h -- declarations for making Emacs style backup file names
-   Copyright (C) 1990-1992, 1997-1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-1992, 1997-1999, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -44,20 +44,10 @@ enum backup_type
 
 extern char const *simple_backup_suffix;
 
-# ifndef PARAMS
-#  if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-#   define PARAMS(Args) Args
-#  else
-#   define PARAMS(Args) ()
-#  endif
-# endif
-
-extern char *find_backup_file_name PARAMS ((char const *file,
-                                           enum backup_type backup_type));
-extern enum backup_type get_version PARAMS ((char const *context,
-                                            char const *arg));
-extern enum backup_type xget_version PARAMS ((char const *context,
-                                             char const *arg));
-extern void addext PARAMS ((char *, char const *, int));
+extern char *find_backup_file_name (char const *file,
+                                   enum backup_type backup_type);
+extern enum backup_type get_version (char const *context, char const *arg);
+extern enum backup_type xget_version (char const *context, char const *arg);
+extern void addext (char *filename, char const *ext, char e);
 
 #endif /* ! BACKUPFILE_H_ */
index 6daf723a535b12c3636f407752de399f90706d94..5c589412281945c9fd476562628b862372479828 100644 (file)
@@ -61,8 +61,7 @@
    If NAME is all slashes, be sure to return `/'.  */
 
 char *
-basename (name)
-     char const *name;
+basename (char const *name)
 {
   char const *base = name += FILESYSTEM_PREFIX_LEN (name);
   int all_slashes = 1;
index 38530ec1f4fe92e910725186b093e9e1fc742af6..03059582b6d860f98eed4bfea173df9b022d8650 100644 (file)
@@ -25,7 +25,7 @@
 #if !(__GLIBC__ >= 2)
 /* When not using the GNU libc we use the basename implementation we
    provide here.  */
-extern char *gnu_basename PARAMS ((const char *));
+extern char *gnu_basename (const char *);
 #define basename(Arg) gnu_basename (Arg)
 #endif
 
index f918dc6d6b9a3e1666037f4dc5a46103bd72d735..b8452060de7bd6621766feb0576f9d7325f8b54f 100644 (file)
@@ -38,15 +38,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 /* The function isascii is not locale dependent. Its use in EBCDIC is
    questionable. */
 bool
-c_isascii (c)
-     int c;
+c_isascii (int c)
 {
   return ((c & ~0x7f) == 0);
 }
 
 bool
-c_isalnum (c)
-     int c;
+c_isalnum (int c)
 {
 #if C_CTYPE_CONSECUTIVE_DIGITS \
     && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
@@ -76,8 +74,7 @@ c_isalnum (c)
 }
 
 bool
-c_isalpha (c)
-     int c;
+c_isalpha (int c)
 {
 #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
   return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
@@ -102,15 +99,13 @@ c_isalpha (c)
 }
 
 bool
-c_isblank (c)
-     int c;
+c_isblank (int c)
 {
   return (c == ' ' || c == '\t');
 }
 
 bool
-c_iscntrl (c)
-     int c;
+c_iscntrl (int c)
 {
 #if C_CTYPE_ASCII
   return ((c & ~0x1f) == 0 || c == 0x7f);
@@ -144,8 +139,7 @@ c_iscntrl (c)
 }
 
 bool
-c_isdigit (c)
-     int c;
+c_isdigit (int c)
 {
 #if C_CTYPE_CONSECUTIVE_DIGITS
   return (c >= '0' && c <= '9');
@@ -162,8 +156,7 @@ c_isdigit (c)
 }
 
 bool
-c_islower (c)
-     int c;
+c_islower (int c)
 {
 #if C_CTYPE_CONSECUTIVE_LOWERCASE
   return (c >= 'a' && c <= 'z');
@@ -183,8 +176,7 @@ c_islower (c)
 }
 
 bool
-c_isgraph (c)
-     int c;
+c_isgraph (int c)
 {
 #if C_CTYPE_ASCII
   return (c >= '!' && c <= '~');
@@ -218,8 +210,7 @@ c_isgraph (c)
 }
 
 bool
-c_isprint (c)
-     int c;
+c_isprint (int c)
 {
 #if C_CTYPE_ASCII
   return (c >= ' ' && c <= '~');
@@ -253,8 +244,7 @@ c_isprint (c)
 }
 
 bool
-c_ispunct (c)
-     int c;
+c_ispunct (int c)
 {
 #if C_CTYPE_ASCII
   return ((c >= '!' && c <= '~')
@@ -279,16 +269,14 @@ c_ispunct (c)
 }
 
 bool
-c_isspace (c)
-     int c;
+c_isspace (int c)
 {
   return (c == ' ' || c == '\t'
           || c == '\n' || c == '\v' || c == '\f' || c == '\r');
 }
 
 bool
-c_isupper (c)
-     int c;
+c_isupper (int c)
 {
 #if C_CTYPE_CONSECUTIVE_UPPERCASE
   return (c >= 'A' && c <= 'Z');
@@ -308,8 +296,7 @@ c_isupper (c)
 }
 
 bool
-c_isxdigit (c)
-     int c;
+c_isxdigit (int c)
 {
 #if C_CTYPE_CONSECUTIVE_DIGITS \
     && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
@@ -331,8 +318,7 @@ c_isxdigit (c)
 }
 
 int
-c_tolower (c)
-     int c;
+c_tolower (int c)
 {
 #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
   return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
@@ -371,8 +357,7 @@ c_tolower (c)
 }
 
 int
-c_toupper (c)
-     int c;
+c_toupper (int c)
 {
 #if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
   return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
index 929b14ec17c58cf38d3bb34aae1277df37d4e027..104d7dae2777e55fbd05d12e92f66ff1476bc41a 100644 (file)
@@ -24,14 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #ifndef C_CTYPE_H
 #define C_CTYPE_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 #include <stdbool.h>
 
 
@@ -100,23 +92,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Function declarations. */
 
-extern bool c_isascii PARAMS ((int c)); /* not locale dependent */
-
-extern bool c_isalnum PARAMS ((int c));
-extern bool c_isalpha PARAMS ((int c));
-extern bool c_isblank PARAMS ((int c));
-extern bool c_iscntrl PARAMS ((int c));
-extern bool c_isdigit PARAMS ((int c));
-extern bool c_islower PARAMS ((int c));
-extern bool c_isgraph PARAMS ((int c));
-extern bool c_isprint PARAMS ((int c));
-extern bool c_ispunct PARAMS ((int c));
-extern bool c_isspace PARAMS ((int c));
-extern bool c_isupper PARAMS ((int c));
-extern bool c_isxdigit PARAMS ((int c));
-
-extern int c_tolower PARAMS ((int c));
-extern int c_toupper PARAMS ((int c));
+extern bool c_isascii (int c); /* not locale dependent */
+
+extern bool c_isalnum (int c);
+extern bool c_isalpha (int c);
+extern bool c_isblank (int c);
+extern bool c_iscntrl (int c);
+extern bool c_isdigit (int c);
+extern bool c_islower (int c);
+extern bool c_isgraph (int c);
+extern bool c_isprint (int c);
+extern bool c_ispunct (int c);
+extern bool c_isspace (int c);
+extern bool c_isupper (int c);
+extern bool c_isxdigit (int c);
+
+extern int c_tolower (int c);
+extern int c_toupper (int c);
 
 
 #if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
index 949702a21ccabde0ac80d78927d88287c2c9a32b..a58924f2956f361821bd2add1bc9242c2c1fbb2b 100644 (file)
@@ -1,5 +1,5 @@
 /* Java CLASSPATH handling.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #endif
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static char * new_classpath PARAMS ((const char * const *classpaths,
-                                    unsigned int classpaths_count,
-                                    bool use_minimal_classpath));
-static char * set_classpath PARAMS ((const char * const *classpaths,
-                                    unsigned int classpaths_count,
-                                    bool use_minimal_classpath,
-                                    bool verbose));
-static void reset_classpath PARAMS ((char *old_classpath));
-
-
 /* Return the new CLASSPATH value.  The given classpaths are prepended to
    the current CLASSPATH value.   If use_minimal_classpath, the current
    CLASSPATH is ignored.  */
 static char *
-new_classpath (classpaths, classpaths_count, use_minimal_classpath)
-     const char * const *classpaths;
-     unsigned int classpaths_count;
-     bool use_minimal_classpath;
+new_classpath (const char * const *classpaths, unsigned int classpaths_count,
+              bool use_minimal_classpath)
 {
   const char *old_classpath;
   unsigned int length;
@@ -90,11 +76,8 @@ new_classpath (classpaths, classpaths_count, use_minimal_classpath)
 
 /* Set CLASSPATH and returns a safe copy of its old value.  */
 static char *
-set_classpath (classpaths, classpaths_count, use_minimal_classpath, verbose)
-     const char * const *classpaths;
-     unsigned int classpaths_count;
-     bool use_minimal_classpath;
-     bool verbose;
+set_classpath (const char * const *classpaths, unsigned int classpaths_count,
+              bool use_minimal_classpath, bool verbose)
 {
   const char *old_CLASSPATH = getenv ("CLASSPATH");
   char *result = (old_CLASSPATH != NULL ? xstrdup (old_CLASSPATH) : NULL);
@@ -113,8 +96,7 @@ set_classpath (classpaths, classpaths_count, use_minimal_classpath, verbose)
 
 /* Restore CLASSPATH to its previous value.  */
 static void
-reset_classpath (old_classpath)
-     char *old_classpath;
+reset_classpath (char *old_classpath)
 {
   if (old_classpath != NULL)
     {
index 88c2864f84df9d11fac3425f1d98977cd300b2a8..d57f965102cbca09d6016ee214dfb6968ebbe98c 100644 (file)
@@ -1,5 +1,5 @@
 /* Construct a full pathname from a directory and a filename.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    argument may not start with the directory separator (it is relative).
    Return a freshly allocated pathname.  */
 char *
-concatenated_pathname (directory, filename, suffix)
-     const char *directory;
-     const char *filename;
-     const char *suffix;
+concatenated_pathname (const char *directory, const char *filename,
+                      const char *suffix)
 {
   char *result;
   char *p;
index 07697ab2d13e8232b4134428e9681083fb5eb6d9..d1c194e8eb581d57bb6dbcc8f7b71103b2729f36 100644 (file)
@@ -1,5 +1,5 @@
 /* Copying of files.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -45,9 +45,7 @@
 #define _(str) gettext (str)
 
 void
-copy_file (src_filename, dest_filename)
-     const char *src_filename;
-     const char *dest_filename;
+copy_file (const char *src_filename, const char *dest_filename)
 {
   int src_fd;
   struct stat statbuf;
index e0958bdeb9d053c96de7cc97566c7573bcb143c0..1608ab70cc7fc2a5accfa466e8dae8c8d9718455 100644 (file)
@@ -1,5 +1,5 @@
 /* Copying of files.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -19,5 +19,4 @@
 /* Copy a regular file: from src_filename to dest_filename.
    The destination file is assumed to be a backup file.
    Exit upon failure.  */
-extern void copy_file PARAMS ((const char *src_filename,
-                              const char *dest_filename));
+extern void copy_file (const char *src_filename, const char *dest_filename);
index 6b11c7f009f1a0d76af4a265fac586dc0100b59f..0c5bcaaa960b31bdabab05f3308058b51413637b 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of autonomous subprocesses.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
-# ifdef __GNUC__
-static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
-                                       mode_t mode));
-# endif
-#endif
-
-
 #ifdef EINTR
 
 /* EINTR handling for close(), open().
@@ -77,8 +66,7 @@ static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -91,10 +79,7 @@ nonintr_close (fd)
 #define close nonintr_close
 
 static inline int
-nonintr_open (pathname, oflag, mode)
-     const char *pathname;
-     int oflag;
-     mode_t mode;
+nonintr_open (const char *pathname, int oflag, mode_t mode)
 {
   int retval;
 
@@ -114,14 +99,10 @@ nonintr_open (pathname, oflag, mode)
    If it didn't terminate correctly, exit if exit_on_error is true, otherwise
    return 127.  */
 int
-execute (progname, prog_path, prog_argv, null_stdin, null_stdout, null_stderr, exit_on_error)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     bool null_stdin;
-     bool null_stdout;
-     bool null_stderr;
-     bool exit_on_error;
+execute (const char *progname,
+        const char *prog_path, char **prog_argv,
+        bool null_stdin, bool null_stdout, bool null_stderr,
+        bool exit_on_error)
 {
   /* Note about 127: Some errors during posix_spawnp() cause the function
      posix_spawnp() to return an error code; some other errors cause the
index ac0fbeddbda5072c3e99a90495cdcbd016c6694d..5915dc4fd877f901c7b5d3a7c235e83c24f9e2d7 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of autonomous subprocesses.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
    descriptors to /dev/null.  Return its exit code.
    If it didn't terminate correctly, exit if exit_on_error is true, otherwise
    return 127.  */
-extern int execute PARAMS ((const char *progname,
-                           const char *prog_path, char **prog_argv,
-                           bool null_stdin,
-                           bool null_stdout, bool null_stderr,
-                           bool exit_on_error));
+extern int execute (const char *progname,
+                   const char *prog_path, char **prog_argv,
+                   bool null_stdin, bool null_stdout, bool null_stderr,
+                   bool exit_on_error);
 
 #endif /* _EXECUTE_H */
index 571ed4740be709dd480335b32cff21a06bdb6385..af0a40573a56c5474243ea893430aaebce8bc489 100644 (file)
@@ -1,5 +1,5 @@
 /* Locating a program in PATH.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -36,8 +36,7 @@
 
 
 const char *
-find_in_path (progname)
-     const char *progname;
+find_in_path (const char *progname)
 {
 #if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
   /* Win32, OS/2, DOS */
index 3a0d13526d926118cd1efb6f69d1117bb4af7f6f..713f028add1571d2f91ad985e8bebfac77626d7f 100644 (file)
@@ -1,5 +1,5 @@
 /* Locating a program in PATH.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -21,4 +21,4 @@
    of PROGNAME.  If successful, return a pathname containing a slash
    (either absolute or relative to the current directory).  Otherwise,
    return PROGNAME unmodified.  */
-extern const char *find_in_path PARAMS ((const char *progname));
+extern const char *find_in_path (const char *progname);
index ef73d1f18aef514ab8fcf01f2b7dc7bbfcd96710..369319af91a230993a5bd1aca94a4c9ce9d0d0c0 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions to make fuzzy comparisons between strings
-   Copyright (C) 1988-1989, 1992-1993, 1995, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1988-1989, 1992-1993, 1995, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -147,16 +147,9 @@ struct partition
        cause suboptimal diff output.  It cannot cause incorrect diff
        output.  */
 
-static int diag PARAMS ((int, int, int, int, int, struct partition *));
-
 static int
-diag (xoff, xlim, yoff, ylim, minimal, part)
-     int xoff;
-     int xlim;
-     int yoff;
-     int ylim;
-     int minimal;
-     struct partition *part;
+diag (int xoff, int xlim, int yoff, int ylim, int minimal,
+      struct partition *part)
 {
   int *const fd = fdiag;       /* Give the compiler a chance. */
   int *const bd = bdiag;       /* Additional help for the compiler. */
@@ -474,15 +467,8 @@ diag (xoff, xlim, yoff, ylim, minimal, part)
        If MINIMAL is nonzero, find a minimal difference no matter how
        expensive it is.  */
 
-static void compareseq PARAMS ((int, int, int, int, int));
-
 static void
-compareseq (xoff, xlim, yoff, ylim, minimal)
-     int xoff;
-     int xlim;
-     int yoff;
-     int ylim;
-     int minimal;
+compareseq (int xoff, int xlim, int yoff, int ylim, int minimal)
 {
   const char *const xv = string[0].data;       /* Help the compiler.  */
   const char *const yv = string[1].data;
@@ -570,9 +556,7 @@ compareseq (xoff, xlim, yoff, ylim, minimal)
        similar.  */
 
 double
-fstrcmp (string1, string2)
-     const char *string1;
-     const char *string2;
+fstrcmp (const char *string1, const char *string2)
 {
   int i;
 
index 422f650cf881b4fa026ceb85794a54a87c93ec94..fa3f1bbe564376ba0d904a989c8d98665d0ed902 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2000, 2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <pmiller@agso.gov.au>
 
@@ -20,6 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #ifndef _FSTRCMP_H
 #define _FSTRCMP_H
 
-extern double fstrcmp PARAMS ((const char *__s1, const char *__s2));
+extern double fstrcmp (const char *__s1, const char *__s2);
 
 #endif
index bb784ac400b61ed43575813ac13cabbff23c1dd6..2d38878b8ac360c00d4fe88d7597f2efceb82560 100644 (file)
@@ -1,5 +1,5 @@
 /* full-write.c -- an interface to write that retries after interrupts
-   Copyright (C) 1993-1994, 1997-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1993-1994, 1997-1998, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -40,10 +40,7 @@ extern int errno;
    Return LEN upon success, write's (negative) error code otherwise.  */
 
 ssize_t
-full_write (desc, ptr, len)
-     int desc;
-     const char *ptr;
-     size_t len;
+full_write (int desc, const char *ptr, size_t len)
 {
   int total_written;
 
index d7070a2f0ad2ee8b59c18027a4f373d1bacfce67..5747855a619c5118b9bff384d5b4aee5fdc4d884 100644 (file)
@@ -1,5 +1,5 @@
 /* write() wrapper.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,4 +24,4 @@
 
 /* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted.
    Return LEN upon success, write's (negative) error code otherwise.  */
-extern ssize_t full_write PARAMS ((int desc, const char *ptr, size_t len));
+extern ssize_t full_write (int desc, const char *ptr, size_t len);
index 4d9e88f2d9c2d802f3d7dd471f11b4712f450a25..3a14e501218cc0dce8655644752033182170fd2e 100644 (file)
--- a/lib/gcd.c
+++ b/lib/gcd.c
@@ -1,5 +1,5 @@
 /* Arithmetic.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -23,9 +23,7 @@
 
 /* Return the greatest common divisor of a > 0 and b > 0.  */
 unsigned int
-gcd (a, b)
-     unsigned int a;
-     unsigned int b;
+gcd (unsigned int a, unsigned int b)
 {
   /* Why no division, as in Euclid's algorithm? Because in Euclid's algorithm
      the division result floor(a/b) or floor(b/a) is very often = 1 or = 2,
index 37ff21ea52127fb21cad4921dfa45a9187cdc608..6be393383d19c5b0c1a0faa014b2293d1c72c4b8 100644 (file)
--- a/lib/gcd.h
+++ b/lib/gcd.h
@@ -1,5 +1,5 @@
 /* Arithmetic.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #ifndef _GCD_H
 #define _GCD_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* Return the greatest common divisor of a > 0 and b > 0.  */
-extern unsigned int gcd PARAMS ((unsigned int a, unsigned int b));
+extern unsigned int gcd (unsigned int a, unsigned int b);
 
 #endif /* _GCD_H */
index 86bba0d09760c7639f8da19166f36b13604a286b..29efa2742f57e492e30def3636c36795d4ea6ee6 100644 (file)
@@ -36,10 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
 #if defined __GNU_LIBRARY__ && HAVE_GETDELIM
 
 int
-getline (lineptr, n, stream)
-     char **lineptr;
-     size_t *n;
-     FILE *stream;
+getline (char **lineptr, size_t *n, FILE *stream)
 {
   return getdelim (lineptr, n, '\n', stream);
 }
@@ -66,12 +63,8 @@ extern char *realloc ();
    NOTE: There is another getstr() function declared in <curses.h>.  */
 
 static int
-getstr (lineptr, n, stream, terminator, offset)
-     char **lineptr;
-     size_t *n;
-     FILE *stream;
-     char terminator;
-     size_t offset;
+getstr (char **lineptr, size_t *n, FILE *stream, char terminator,
+       size_t offset)
 {
   int nchars_avail;            /* Allocated but unused chars in *LINEPTR.  */
   char *read_pos;              /* Where we're reading into *LINEPTR. */
@@ -140,20 +133,13 @@ getstr (lineptr, n, stream, terminator, offset)
 }
 
 int
-getline (lineptr, n, stream)
-     char **lineptr;
-     size_t *n;
-     FILE *stream;
+getline (char **lineptr, size_t *n, FILE *stream)
 {
   return getstr (lineptr, n, stream, '\n', 0);
 }
 
 int
-getdelim (lineptr, n, delimiter, stream)
-     char **lineptr;
-     size_t *n;
-     int delimiter;
-     FILE *stream;
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *stream)
 {
   return getstr (lineptr, n, stream, delimiter, 0);
 }
index 6eb59c6e1441b4b1da4c3291453cf493a5bfc8fc..e0fe87ea3ce6d478316ee3560fc3ac1cdbffd6cf 100644 (file)
@@ -1,4 +1,4 @@
-/*  Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc.
+/*  Copyright (C) 1995, 2000-2002 Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -20,22 +20,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 # include <stddef.h>
 # include <stdio.h>
 
-# ifndef PARAMS
-#  if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#   define PARAMS(args) args
-#  else
-#   define PARAMS(args) ()
-#  endif
-# endif
-
 /* glibc2 has these functions declared in <stdio.h>.  Avoid redeclarations.  */
 # if __GLIBC__ < 2
 
 int
-getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
+getline (char **_lineptr, size_t *_n, FILE *_stream);
 
 int
-getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
+getdelim (char **_lineptr, size_t *_n, int _delimiter, FILE *_stream);
 
 # endif
 
index 382d0be17b24a6b3194a9f032476ff68977d20e9..5eb480fbfbdbf83bc165dc2a3710d893c0720381 100644 (file)
@@ -1,5 +1,5 @@
 /* hash - implement simple hashing table with string based keys.
-   Copyright (C) 1994, 1995, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1994-1995, 2000-2002 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, October 1994.
 
    This program is free software; you can redistribute it and/or modify
@@ -77,22 +77,19 @@ typedef struct hash_entry
 }
 hash_entry;
 
-/* Prototypes for local functions.  */
-static void insert_entry_2 PARAMS ((hash_table *htab,
-                                   const void *key, size_t keylen,
-                                   unsigned long int hval, size_t idx,
-                                   void *data));
-static size_t lookup PARAMS ((hash_table *htab,
-                             const void *key, size_t keylen,
-                             unsigned long int hval));
-static unsigned long compute_hashval PARAMS ((const void *key, size_t keylen));
-static int is_prime PARAMS ((unsigned long int candidate));
+/* Forward declaration of local functions.  */
+static void insert_entry_2 (hash_table *htab,
+                           const void *key, size_t keylen,
+                           unsigned long int hval, size_t idx, void *data);
+static size_t lookup (hash_table *htab,
+                     const void *key, size_t keylen,
+                     unsigned long int hval);
+static unsigned long compute_hashval (const void *key, size_t keylen);
+static int is_prime (unsigned long int candidate);
 
 
 int
-init_hash (htab, init_size)
-     hash_table *htab;
-     unsigned long int init_size;
+init_hash (hash_table *htab, unsigned long int init_size)
 {
   /* We need the size to be a prime.  */
   init_size = next_prime (init_size);
@@ -110,8 +107,7 @@ init_hash (htab, init_size)
 
 
 int
-delete_hash (htab)
-     hash_table *htab;
+delete_hash (hash_table *htab)
 {
   free (htab->table);
   obstack_free (&htab->mem_pool, NULL);
@@ -120,11 +116,7 @@ delete_hash (htab)
 
 
 int
-insert_entry (htab, key, keylen, data)
-     hash_table *htab;
-     const void *key;
-     size_t keylen;
-     void *data;
+insert_entry (hash_table *htab, const void *key, size_t keylen, void *data)
 {
   unsigned long int hval = compute_hashval (key, keylen);
   hash_entry *table = (hash_entry *) htab->table;
@@ -143,13 +135,9 @@ insert_entry (htab, key, keylen, data)
 }
 
 static void
-insert_entry_2 (htab, key, keylen, hval, idx, data)
-     hash_table *htab;
-     const void *key;
-     size_t keylen;
-     unsigned long int hval;
-     size_t idx;
-     void *data;
+insert_entry_2 (hash_table *htab,
+               const void *key, size_t keylen,
+               unsigned long int hval, size_t idx, void *data)
 {
   hash_entry *table = (hash_entry *) htab->table;
 
@@ -196,11 +184,7 @@ insert_entry_2 (htab, key, keylen, hval, idx, data)
 
 
 int
-find_entry (htab, key, keylen, result)
-     hash_table *htab;
-     const void *key;
-     size_t keylen;
-     void **result;
+find_entry (hash_table *htab, const void *key, size_t keylen, void **result)
 {
   hash_entry *table = (hash_entry *) htab->table;
   size_t idx = lookup (htab, key, keylen, compute_hashval (key, keylen));
@@ -214,12 +198,8 @@ find_entry (htab, key, keylen, result)
 
 
 int
-iterate_table (htab, ptr, key, keylen, data)
-     hash_table *htab;
-     void **ptr;
-     const void **key;
-     size_t *keylen;
-     void **data;
+iterate_table (hash_table *htab, void **ptr, const void **key, size_t *keylen,
+              void **data)
 {
   if (*ptr == NULL)
     {
@@ -246,11 +226,9 @@ iterate_table (htab, ptr, key, keylen, data)
    [Knuth]           The Art of Computer Programming, part3 (6.4) */
 
 static size_t
-lookup (htab, key, keylen, hval)
-     hash_table *htab;
-     const void *key;
-     size_t keylen;
-     unsigned long int hval;
+lookup (hash_table *htab,
+       const void *key, size_t keylen,
+       unsigned long int hval)
 {
   unsigned long int hash;
   size_t idx;
@@ -289,9 +267,7 @@ lookup (htab, key, keylen, hval)
 
 
 static unsigned long
-compute_hashval (key, keylen)
-     const void *key;
-     size_t keylen;
+compute_hashval (const void *key, size_t keylen)
 {
   size_t cnt;
   unsigned long int hval;
@@ -310,8 +286,7 @@ compute_hashval (key, keylen)
 
 
 unsigned long
-next_prime (seed)
-     unsigned long int seed;
+next_prime (unsigned long int seed)
 {
   /* Make it definitely odd.  */
   seed |= 1;
@@ -324,8 +299,7 @@ next_prime (seed)
 
 
 static int
-is_prime (candidate)
-     unsigned long int candidate;
+is_prime (unsigned long int candidate)
 {
   /* No even number and none less than 10 will be passed here.  */
   unsigned long int divn = 3;
index d568c11e9b4eedf52ee6743db397876346a0c8cb..10e512c9d9e0705c951e9d23b302cf130f3614f6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 2000-2002 Free Software Foundation, Inc.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License as
@@ -30,27 +30,19 @@ typedef struct hash_table
 }
 hash_table;
 
-# ifndef PARAMS
-#  if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#   define PARAMS(Args) Args
-#  else
-#   define PARAMS(Args) ()
-#  endif
-# endif
-
-extern int init_hash PARAMS ((hash_table *htab, unsigned long int init_size));
-extern int delete_hash PARAMS ((hash_table *htab));
-extern int insert_entry PARAMS ((hash_table *htab,
-                                const void *key, size_t keylen,
-                                void *data));
-extern int find_entry PARAMS ((hash_table *htab,
-                              const void *key, size_t keylen,
-                              void **result));
-
-extern int iterate_table PARAMS ((hash_table *htab, void **ptr,
-                                 const void **key, size_t *keylen,
-                                 void **data));
-
-extern unsigned long int next_prime PARAMS ((unsigned long int seed));
+extern int init_hash (hash_table *htab, unsigned long int init_size);
+extern int delete_hash (hash_table *htab);
+extern int insert_entry (hash_table *htab,
+                        const void *key, size_t keylen,
+                        void *data);
+extern int find_entry (hash_table *htab,
+                      const void *key, size_t keylen,
+                      void **result);
+
+extern int iterate_table (hash_table *htab, void **ptr,
+                         const void **key, size_t *keylen,
+                         void **data);
+
+extern unsigned long int next_prime (unsigned long int seed);
 
 #endif /* not _HASH_H */
index 83a6dd6f95ebdfa45e934634c526abba657869b2..46164b0f177e34c4701bf8de6fb8a98cad3e578b 100644 (file)
  */
 
 bool
-compile_java_class (java_sources, java_sources_count,
-                   classpaths, classpaths_count,
-                   directory, optimize, debug, use_minimal_classpath, verbose)
-     const char * const *java_sources;
-     unsigned int java_sources_count;
-     const char * const *classpaths;
-     unsigned int classpaths_count;
-     const char *directory;
-     bool optimize;
-     bool debug;
-     bool use_minimal_classpath;
-     bool verbose;
+compile_java_class (const char * const *java_sources,
+                   unsigned int java_sources_count,
+                   const char * const *classpaths,
+                   unsigned int classpaths_count,
+                   const char *directory,
+                   bool optimize, bool debug,
+                   bool use_minimal_classpath,
+                   bool verbose)
 {
   bool err = false;
   char *old_JAVA_HOME;
index 83c435c166722334b03f6f2c651a0951973a5bdd..0294d552e76cf0d188f19753c76c8967f21df573 100644 (file)
@@ -1,5 +1,5 @@
 /* Compile a Java program.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
    Java version.
    If verbose, the command to be executed will be printed.
    Return false if OK, true on error.  */
-extern bool compile_java_class PARAMS ((const char * const *java_sources,
-                                       unsigned int java_sources_count,
-                                       const char * const *classpaths,
-                                       unsigned int classpaths_count,
-                                       const char *directory,
-                                       bool optimize, bool debug,
-                                       bool use_minimal_classpath,
-                                       bool verbose));
+extern bool compile_java_class (const char * const *java_sources,
+                               unsigned int java_sources_count,
+                               const char * const *classpaths,
+                               unsigned int classpaths_count,
+                               const char *directory,
+                               bool optimize, bool debug,
+                               bool use_minimal_classpath,
+                               bool verbose);
 
 #endif /* _JAVACOMP_H */
index 092396c6e56fad20c230ccc5570d7d3d067ce686..fd82b549bfd38e2bd16b4de3ecdc6188db0b17a0 100644 (file)
  */
 
 bool
-execute_java_class (class_name,
-                   classpaths, classpaths_count, use_minimal_classpath,
-                   exe_dir,
-                   args,
-                   verbose, quiet,
-                   executer, private_data)
-     const char *class_name;
-     const char * const *classpaths;
-     unsigned int classpaths_count;
-     bool use_minimal_classpath;
-     const char *exe_dir;
-     const char * const *args;
-     bool verbose;
-     bool quiet;
-     execute_fn *executer;
-     void *private_data;
+execute_java_class (const char *class_name,
+                   const char * const *classpaths,
+                   unsigned int classpaths_count,
+                   bool use_minimal_classpath,
+                   const char *exe_dir,
+                   const char * const *args,
+                   bool verbose, bool quiet,
+                   execute_fn *executer, void *private_data)
 {
   bool err = false;
   unsigned int nargs;
index 9f33aacfe80b305fb3b7516f70a7356e3cef3d84..ac2e8ae2ead08b1dcda673eba9e335608004d781 100644 (file)
@@ -21,9 +21,9 @@
 
 #include <stdbool.h>
 
-typedef bool execute_fn PARAMS ((const char *progname,
-                                const char *prog_path, char **prog_argv,
-                                void *private_data));
+typedef bool execute_fn (const char *progname,
+                        const char *prog_path, char **prog_argv,
+                        void *private_data);
 
 /* Execute a Java class.
    class_name is the Java class name to be executed.
@@ -39,14 +39,13 @@ typedef bool execute_fn PARAMS ((const char *progname,
    private_data argument.  This function returns false if OK, true on error.
    Return false if OK, true on error.
    If quiet, error messages will not be printed.  */
-extern bool execute_java_class PARAMS ((const char *class_name,
-                                       const char * const *classpaths,
-                                       unsigned int classpaths_count,
-                                       bool use_minimal_classpath,
-                                       const char *exe_dir,
-                                       const char * const *args,
-                                       bool verbose, bool quiet,
-                                       execute_fn *executer,
-                                       void *private_data));
+extern bool execute_java_class (const char *class_name,
+                               const char * const *classpaths,
+                               unsigned int classpaths_count,
+                               bool use_minimal_classpath,
+                               const char *exe_dir,
+                               const char * const *args,
+                               bool verbose, bool quiet,
+                               execute_fn *executer, void *private_data);
 
 #endif /* _JAVAEXEC_H */
diff --git a/lib/libstdarg.h b/lib/libstdarg.h
deleted file mode 100644 (file)
index 79c86da..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* <stdarg.h> with fallback on <varargs.h> for old platforms.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Library General Public License as published
-   by the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _LIBSTDARG_H
-#define _LIBSTDARG_H
-
-#if __STDC__ || defined __SUNPRO_C || defined __cplusplus
-# include <stdarg.h>
-# define VA_START(args, lastarg) va_start (args, lastarg)
-# define VA_PARAMS(stdc_params, oldc_params) stdc_params
-#else
-# include <varargs.h>
-# define VA_START(args, lastarg) va_start (args)
-# define VA_PARAMS(stdc_params, oldc_params) oldc_params
-#endif
-
-#endif /* _LIBSTDARG_H */
index f62826b2f73df5f770b27031baeaa19c2ff4fb34..200272e8810731cccf74e37f172ff44844de05f6 100644 (file)
@@ -33,10 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "utf16-ucs4.h"
 
 static inline int
-u32_mbtouc (puc, s, n)
-     unsigned int *puc;
-     const unsigned int *s;
-     size_t n;
+u32_mbtouc (unsigned int *puc, const unsigned int *s, size_t n)
 {
   *puc = *s;
   return 1;
@@ -192,8 +189,7 @@ streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23,
 
 
 static int
-is_cjk_encoding (encoding)
-     const char *encoding;
+is_cjk_encoding (const char *encoding)
 {
   if (0
       /* Legacy Japanese encodings */
@@ -212,8 +208,7 @@ is_cjk_encoding (encoding)
 }
 
 static int
-is_utf8_encoding (encoding)
-     const char *encoding;
+is_utf8_encoding (const char *encoding)
 {
   if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0))
     return 1;
@@ -222,7 +217,7 @@ is_utf8_encoding (encoding)
 
 
 /* Determine number of column positions required for UC. */
-int uc_width PARAMS ((unsigned int uc, const char *encoding));
+int uc_width (unsigned int uc, const char *encoding);
 
 /*
  * Non-spacing attribute table.
@@ -415,9 +410,7 @@ static const signed char nonspacing_table_ind[240] = {
 
 /* Determine number of column positions required for UC. */
 int
-uc_width (uc, encoding)
-     unsigned int uc;
-     const char *encoding;
+uc_width (unsigned int uc, const char *encoding)
 {
   /* Test for non-spacing or control character.  */
   if ((uc >> 9) < 240)
@@ -469,10 +462,7 @@ uc_width (uc, encoding)
    (or fewer if S ends before this) in S.  */
 
 int
-u8_width (s, n, encoding)
-     const unsigned char *s;
-     size_t n;
-     const char *encoding;
+u8_width (const unsigned char *s, size_t n, const char *encoding)
 {
   const unsigned char *s_end = s + n;
   int width = 0;
@@ -496,10 +486,7 @@ u8_width (s, n, encoding)
 }
 
 int
-u16_width (s, n, encoding)
-     const unsigned short *s;
-     size_t n;
-     const char *encoding;
+u16_width (const unsigned short *s, size_t n, const char *encoding)
 {
   const unsigned short *s_end = s + n;
   int width = 0;
@@ -523,10 +510,7 @@ u16_width (s, n, encoding)
 }
 
 int
-u32_width (s, n, encoding)
-     const unsigned int *s;
-     size_t n;
-     const char *encoding;
+u32_width (const unsigned int *s, size_t n, const char *encoding)
 {
   const unsigned int *s_end = s + n;
   int width = 0;
@@ -593,8 +577,7 @@ enum
 #include "lbrkprop.h"
 
 static inline unsigned char
-lbrkprop_lookup (uc)
-     unsigned int uc;
+lbrkprop_lookup (unsigned int uc)
 {
   unsigned int index1 = uc >> lbrkprop_header_0;
   if (index1 < lbrkprop_header_1)
@@ -647,11 +630,7 @@ static const unsigned char lbrk_table[19][19] = {
 /* Note: The (PR,ID) entry should probably be D instead of I.  */
 
 void
-u8_possible_linebreaks (s, n, encoding, p)
-     const unsigned char *s;
-     size_t n;
-     const char *encoding;
-     char *p;
+u8_possible_linebreaks (const unsigned char *s, size_t n, const char *encoding, char *p)
 {
   int LBP_AI_REPLACEMENT = (is_cjk_encoding (encoding) ? LBP_ID : LBP_AL);
   const unsigned char *s_end = s + n;
@@ -765,11 +744,7 @@ u8_possible_linebreaks (s, n, encoding, p)
 #ifdef unused
 
 void
-u16_possible_linebreaks (s, n, encoding, p)
-     const unsigned short *s;
-     size_t n;
-     const char *encoding;
-     char *p;
+u16_possible_linebreaks (const unsigned short *s, size_t n, const char *encoding, char *p)
 {
   int LBP_AI_REPLACEMENT = (is_cjk_encoding (encoding) ? LBP_ID : LBP_AL);
   const unsigned short *s_end = s + n;
@@ -881,11 +856,7 @@ u16_possible_linebreaks (s, n, encoding, p)
 }
 
 void
-u32_possible_linebreaks (s, n, encoding, p)
-     const unsigned int *s;
-     size_t n;
-     const char *encoding;
-     char *p;
+u32_possible_linebreaks (const unsigned int *s, size_t n, const char *encoding, char *p)
 {
   int LBP_AI_REPLACEMENT = (is_cjk_encoding (encoding) ? LBP_ID : LBP_AL);
   const unsigned int *s_end = s + n;
@@ -999,15 +970,10 @@ u32_possible_linebreaks (s, n, encoding, p)
    Return the column after the end of the string.  */
 
 int
-u8_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
-     const unsigned char *s;
-     size_t n;
-     int width;
-     int start_column;
-     int at_end_columns;
-     const char *o;
-     const char *encoding;
-     char *p;
+u8_width_linebreaks (const unsigned char *s, size_t n,
+                     int width, int start_column, int at_end_columns,
+                     const char *o, const char *encoding,
+                     char *p)
 {
   const unsigned char *s_end;
   char *last_p;
@@ -1090,15 +1056,10 @@ u8_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
 #ifdef unused
 
 int
-u16_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
-     const unsigned short *s;
-     size_t n;
-     int width;
-     int start_column;
-     int at_end_columns;
-     const char *o;
-     const char *encoding;
-     char *p;
+u16_width_linebreaks (const unsigned short *s, size_t n,
+                      int width, int start_column, int at_end_columns,
+                      const char *o, const char *encoding,
+                      char *p)
 {
   const unsigned short *s_end;
   char *last_p;
@@ -1179,15 +1140,10 @@ u16_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
 }
 
 int
-u32_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
-     const unsigned int *s;
-     size_t n;
-     int width;
-     int start_column;
-     int at_end_columns;
-     const char *o;
-     const char *encoding;
-     char *p;
+u32_width_linebreaks (const unsigned int *s, size_t n,
+                      int width, int start_column, int at_end_columns,
+                      const char *o, const char *encoding,
+                      char *p)
 {
   const unsigned int *s_end;
   char *last_p;
@@ -1276,8 +1232,7 @@ u32_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
 /* Read the contents of an input stream, and return it, terminated with a NUL
    byte. */
 char *
-read_file (stream)
-     FILE *stream;
+read_file (FILE *stream)
 {
 #define BUFSIZE 4096
   char *buf = NULL;
@@ -1323,9 +1278,7 @@ read_file (stream)
 }
 
 int
-main (argc, argv)
-     int argc;
-     char * argv[];
+main (int argc, char * argv[])
 {
   if (argc == 1)
     {
@@ -1423,10 +1376,7 @@ main (argc, argv)
 
 /* Return the length of a string after conversion through an iconv_t.  */
 static size_t
-iconv_string_length (cd, s, n)
-     iconv_t cd;
-     const char *s;
-     size_t n;
+iconv_string_length (iconv_t cd, const char *s, size_t n)
 {
 #define TMPBUFSIZE 4096
   size_t count = 0;
@@ -1461,13 +1411,8 @@ iconv_string_length (cd, s, n)
 }
 
 static void
-iconv_string_keeping_offsets (cd, s, n, offtable, t, m)
-     iconv_t cd;
-     const char *s;
-     size_t n;
-     size_t *offtable;
-     char *t;
-     size_t m;
+iconv_string_keeping_offsets (iconv_t cd, const char *s, size_t n,
+                              size_t *offtable, char *t, size_t m)
 {
   size_t i;
   const char *s_end;
@@ -1525,9 +1470,7 @@ iconv_string_keeping_offsets (cd, s, n, offtable, t, m)
 /* Tests whether a string is entirely ASCII.  Returns 1 if yes.
    Returns 0 if the string is in an 8-bit encoding or an ISO-2022 encoding.  */
 static int
-is_all_ascii (s, n)
-     const char *s;
-     size_t n;
+is_all_ascii (const char *s, size_t n)
 {
   for (; n > 0; s++, n--)
     {
@@ -1544,11 +1487,8 @@ is_all_ascii (s, n)
 #if defined unused || defined TEST2
 
 void
-mbs_possible_linebreaks (s, n, encoding, p)
-     const char *s;
-     size_t n;
-     const char *encoding;
-     char *p;
+mbs_possible_linebreaks (const char *s, size_t n, const char *encoding,
+                         char *p)
 {
   if (is_utf8_encoding (encoding))
     u8_possible_linebreaks ((const unsigned char *) s, n, encoding, p);
@@ -1626,15 +1566,10 @@ mbs_possible_linebreaks (s, n, encoding, p)
 #endif
 
 int
-mbs_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
-     const char *s;
-     size_t n;
-     int width;
-     int start_column;
-     int at_end_columns;
-     const char *o;
-     const char *encoding;
-     char *p;
+mbs_width_linebreaks (const char *s, size_t n,
+                      int width, int start_column, int at_end_columns,
+                      const char *o, const char *encoding,
+                      char *p)
 {
   if (is_utf8_encoding (encoding))
     return u8_width_linebreaks ((const unsigned char *) s, n, width, start_column, at_end_columns, o, encoding, p);
@@ -1735,8 +1670,7 @@ mbs_width_linebreaks (s, n, width, start_column, at_end_columns, o, encoding, p)
 /* Read the contents of an input stream, and return it, terminated with a NUL
    byte. */
 char *
-read_file (stream)
-     FILE *stream;
+read_file (FILE *stream)
 {
 #define BUFSIZE 4096
   char *buf = NULL;
@@ -1782,9 +1716,7 @@ read_file (stream)
 }
 
 int
-main (argc, argv)
-     int argc;
-     char * argv[];
+main (int argc, char * argv[])
 {
   setlocale (LC_CTYPE, "");
   if (argc == 1)
index 59b7371872f196cb7cf9e4df9817883fa1cfd273..93af62d9b23acd93513610b4c8edd345b4db0972 100644 (file)
@@ -1,5 +1,5 @@
 /* linebreak.h - line breaking of Unicode strings
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
 This program is free software; you can redistribute it and/or modify
@@ -19,14 +19,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #ifndef _LINEBREAK_H
 #define _LINEBREAK_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* Get size_t.  */
 #include <stddef.h>
 
@@ -37,16 +29,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    the encoding (e.g. "ISO-8859-2" for Polish).  */
 
 /* Return the encoding of the current locale.  */
-extern const char * locale_charset PARAMS ((void));
+extern const char * locale_charset (void);
 
 /* Determine number of column positions required for UC. */
-extern int uc_width PARAMS ((unsigned int uc, const char *encoding));
+extern int uc_width (unsigned int uc, const char *encoding);
 
 /* Determine number of column positions required for first N units
    (or fewer if S ends before this) in S.  */
-extern int u8_width PARAMS ((const unsigned char *s, size_t n, const char *encoding));
-extern int u16_width PARAMS ((const unsigned short *s, size_t n, const char *encoding));
-extern int u32_width PARAMS ((const unsigned int *s, size_t n, const char *encoding));
+extern int u8_width (const unsigned char *s, size_t n, const char *encoding);
+extern int u16_width (const unsigned short *s, size_t n, const char *encoding);
+extern int u32_width (const unsigned int *s, size_t n, const char *encoding);
 
 
 /* Line breaking.  */
@@ -68,20 +60,20 @@ enum {
           hyphenation rules.
    p[i] = UC_BREAK_PROHIBITED means that s[i-1] and s[i] must not be separated.
  */
-extern void u8_possible_linebreaks PARAMS ((const unsigned char *s, size_t n, const char *encoding, char *p));
-extern void u16_possible_linebreaks PARAMS ((const unsigned short *s, size_t n, const char *encoding, char *p));
-extern void u32_possible_linebreaks PARAMS ((const unsigned int *s, size_t n, const char *encoding, char *p));
-extern void mbs_possible_linebreaks PARAMS ((const char *s, size_t n, const char *encoding, char *p));
+extern void u8_possible_linebreaks (const unsigned char *s, size_t n, const char *encoding, char *p);
+extern void u16_possible_linebreaks (const unsigned short *s, size_t n, const char *encoding, char *p);
+extern void u32_possible_linebreaks (const unsigned int *s, size_t n, const char *encoding, char *p);
+extern void mbs_possible_linebreaks (const char *s, size_t n, const char *encoding, char *p);
 
 /* Choose the best line breaks, assuming the uc_width function.
    Return the column after the end of the string.
    o is an optional override; if o[i] != UC_BREAK_UNDEFINED, o[i] takes
    precedence over p[i] as returned by the *_possible_linebreaks function.
  */
-extern int u8_width_linebreaks PARAMS ((const unsigned char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p));
-extern int u16_width_linebreaks PARAMS ((const unsigned short *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p));
-extern int u32_width_linebreaks PARAMS ((const unsigned int *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p));
-extern int mbs_width_linebreaks PARAMS ((const char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p));
+extern int u8_width_linebreaks (const unsigned char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p);
+extern int u16_width_linebreaks (const unsigned short *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p);
+extern int u32_width_linebreaks (const unsigned int *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p);
+extern int mbs_width_linebreaks (const char *s, size_t n, int width, int start_column, int at_end_columns, const char *o, const char *encoding, char *p);
 
 
 #endif /* _LINEBREAK_H */
index 9d5ebe74ae055c5ca88b884ddc1cda3ef74f0dac..a2ef5b3fdaf5af14677c3cebc2199224ce69a12f 100644 (file)
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a string.
-   Copyright (C) 2000-2001 Free Software Foundation, Inc.
+   Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -87,9 +87,7 @@ int wcwidth ();
    With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is
    the multibyte analogon of the wcswidth function.  */
 int
-mbswidth (string, flags)
-     const char *string;
-     int flags;
+mbswidth (const char *string, int flags)
 {
   return mbsnwidth (string, strlen (string), flags);
 }
@@ -99,10 +97,7 @@ mbswidth (string, flags)
    non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is
    specified, -1 is returned.  */
 int
-mbsnwidth (string, nbytes, flags)
-     const char *string;
-     size_t nbytes;
-     int flags;
+mbsnwidth (const char *string, size_t nbytes, int flags)
 {
   const char *p = string;
   const char *plimit = p + nbytes;
index 1f9c660014028567ed7ff658cc0549a77f6d38b5..40d4cba0419debe8bd3b802acf05ef59d6388ef8 100644 (file)
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a string.
-   Copyright (C) 2000-2001 Free Software Foundation, Inc.
+   Copyright (C) 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stddef.h>
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 /* Optional flags to influence mbswidth/mbsnwidth behavior.  */
 
 /* If this bit is set, return -1 upon finding an invalid or incomplete
@@ -38,8 +30,8 @@
 
 /* Returns the number of screen columns needed for STRING.  */
 #define mbswidth gnu_mbswidth  /* avoid clash with UnixWare 7.1.1 function */
-extern int mbswidth PARAMS ((const char *string, int flags));
+extern int mbswidth (const char *string, int flags);
 
 /* Returns the number of screen columns needed for the NBYTES bytes
    starting at BUF.  */
-extern int mbsnwidth PARAMS ((const char *buf, size_t nbytes, int flags));
+extern int mbsnwidth (const char *buf, size_t nbytes, int flags);
index ea38e8df549e9e1210c0a38bbe8ed08e45a93603..5d4af5d7481352ebc282abaef35df11b1a892a09 100644 (file)
@@ -8,10 +8,7 @@
 #endif
 
 void *
-memmove (dest, source, length)
-     char *dest;
-     const char *source;
-     unsigned length;
+memmove (char *dest, const char *source, unsigned length)
 {
   char *d0 = dest;
   if (source < dest)
index a0db560a993ce4edce5e89749f0d378138f3c79d..5e090b1ac139f93d54b1bde06cdc142df78f7f21 100644 (file)
@@ -1,5 +1,5 @@
 /* memset.c -- set an area of memory to a given value
-   Copyright (C) 1991 Free Software Foundation, Inc.
+   Copyright (C) 1991, 2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 char *
-memset (str, c, len)
-     char *str;
-     int c;
-     unsigned len;
+memset (char *str, int c, unsigned len)
 {
   register char *st = str;
 
index 15081020dd4a63e13ed398758271e1d7663925a4..93900a7f760518fa8b3ab2a61982f16309e143ff 100644 (file)
@@ -116,8 +116,7 @@ static const char letters[] =
 
    We use a clever algorithm to get hard-to-predict names. */
 static int
-gen_tempname (tmpl)
-     char *tmpl;
+gen_tempname (char *tmpl)
 {
   int len;
   char *XXXXXX;
@@ -191,8 +190,7 @@ gen_tempname (tmpl)
    The directory is created, mode 700, and its name is returned.
    (This function comes from OpenBSD.) */
 char *
-mkdtemp (template)
-     char *template;
+mkdtemp (char *template)
 {
   if (gen_tempname (template))
     return NULL;
index dbc47ac3625efe85857b3b93bc50a73d27066458..65ee99eff3211bec42f386a2d861c24b68d3d00c 100644 (file)
@@ -1,5 +1,5 @@
 /* Creating a private temporary directory.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #if HAVE_MKDTEMP
 
 /* Get mkdtemp() declaration.  */
@@ -35,6 +27,6 @@
    they are replaced with a string that makes the directory name unique.
    Returns TEMPLATE, or a null pointer if it cannot get a unique name.
    The directory is created mode 700.  */
-extern char * mkdtemp PARAMS ((char *template));
+extern char * mkdtemp (char *template);
 
 #endif
index d2a4c757830ebd8ceb0909c347575b5f0804e3e0..7b817a4f724251fa54596ff7102d63cb89626a76 100644 (file)
@@ -1,5 +1,5 @@
 /* Pathname support.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef _PATHNAME_H
 #define _PATHNAME_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* Pathname support.
    ISSLASH(C)           tests whether C is a directory separator character.
    IS_ABSOLUTE_PATH(P)  tests whether P is an absolute path.  If it is not,
@@ -52,8 +44,7 @@
 
 /* Concatenate a directory pathname, a relative pathname and an optional
    suffix.  Return a freshly allocated pathname.  */
-extern char *concatenated_pathname PARAMS ((const char *directory,
-                                           const char *filename,
-                                           const char *suffix));
+extern char *concatenated_pathname (const char *directory,
+                                   const char *filename, const char *suffix);
 
 #endif /* _PATHNAME_H */
index e2c897aa45bbd46bc58372277d7cb6e3e8ace548..209d598b799c82ebe5420c94f22103d68dbad2f1 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX fnmatch().
-   Copyright 1991-1993, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+   Copyright 1991-1993, 1996-1997, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Match STRING against the filename pattern PATTERN, returning zero if
    it matches, nonzero if not.  */
 int
-fnmatch (pattern, string, flags)
-     const char *pattern;
-     const char *string;
-     int flags;
+fnmatch (const char *pattern, const char *string, int flags)
 {
   register const char *p = pattern, *n = string;
   register char c;
index 420024e204ddb5483e35a57ce9d5472c2346670c..c2d2a36392e02c7ddbafcced0edb1a4640ce8606 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX <fnmatch.h>.
-   Copyright (C) 1991-1993, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1991-1993, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
 extern "C" {
 #endif
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 
 /* We #undef these before defining them because some losing systems
    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
@@ -52,8 +44,7 @@ extern "C" {
 
 /* Match STRING against the filename pattern PATTERN,
    returning zero if it matches, FNM_NOMATCH if not.  */
-extern int fnmatch PARAMS ((const char *__pattern, const char *__string,
-                           int __flags));
+extern int fnmatch (const char *__pattern, const char *__string, int __flags);
 
 #ifdef __cplusplus
 }
index 28c1b31c3d5368e24d045bae87085ed4ac6a4c94..1e51af5d2e8c843b3106b2b38eee2513b479f4ce 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of subprocesses, communicating via pipes.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
-#endif
-
-
 #ifdef EINTR
 
 /* EINTR handling for close().
@@ -68,8 +61,7 @@ static inline int nonintr_close PARAMS ((int fd));
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -93,13 +85,11 @@ nonintr_close (fd)
  *
  */
 pid_t
-create_pipe_bidi (progname, prog_path, prog_argv, null_stderr, exit_on_error, fd)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     bool null_stderr;
-     bool exit_on_error;
-     int fd[2];
+create_pipe_bidi (const char *progname,
+                 const char *prog_path, char **prog_argv,
+                 bool null_stderr,
+                 bool exit_on_error,
+                 int fd[2])
 {
   int ifd[2];
   int ofd[2];
index 00380bff7f5795cfd8621a9dec3abb536b216ce8..4273dc1df3f6ebe6e8ccdc068dfe264efa100faa 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of subprocesses, communicating via pipes.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
-# ifdef __GNUC__
-static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
-                                       mode_t mode));
-# endif
-#endif
-
-
 #ifdef EINTR
 
 /* EINTR handling for close(), open().
@@ -72,8 +61,7 @@ static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -86,10 +74,7 @@ nonintr_close (fd)
 #define close nonintr_close
 
 static inline int
-nonintr_open (pathname, oflag, mode)
-     const char *pathname;
-     int oflag;
-     mode_t mode;
+nonintr_open (const char *pathname, int oflag, mode_t mode)
 {
   int retval;
 
@@ -112,14 +97,11 @@ nonintr_open (pathname, oflag, mode)
  *
  */
 pid_t
-create_pipe_in (progname, prog_path, prog_argv, prog_stdin, null_stderr, exit_on_error, fd)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     const char *prog_stdin;
-     bool null_stderr;
-     bool exit_on_error;
-     int fd[1];
+create_pipe_in (const char *progname,
+               const char *prog_path, char **prog_argv,
+               const char *prog_stdin, bool null_stderr,
+               bool exit_on_error,
+               int fd[1])
 {
   int ifd[2];
 #if HAVE_POSIX_SPAWN
index 3ee8137a05ddc6675ad07c068ca975e0420b8e2f..cda7db303990ac10d2337264b790cf5f9aa189b0 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of subprocesses, communicating via pipes.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
-# ifdef __GNUC__
-static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
-                                       mode_t mode));
-# endif
-#endif
-
-
 #ifdef EINTR
 
 /* EINTR handling for close(), open().
@@ -72,8 +61,7 @@ static inline int nonintr_open PARAMS ((const char *pathname, int oflag,
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -86,10 +74,7 @@ nonintr_close (fd)
 #define close nonintr_close
 
 static inline int
-nonintr_open (pathname, oflag, mode)
-     const char *pathname;
-     int oflag;
-     mode_t mode;
+nonintr_open (const char *pathname, int oflag, mode_t mode)
 {
   int retval;
 
@@ -112,14 +97,11 @@ nonintr_open (pathname, oflag, mode)
  *
  */
 pid_t
-create_pipe_out (progname, prog_path, prog_argv, prog_stdout, null_stderr, exit_on_error, fd)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     const char *prog_stdout;
-     bool null_stderr;
-     bool exit_on_error;
-     int fd[1];
+create_pipe_out (const char *progname,
+                const char *prog_path, char **prog_argv,
+                const char *prog_stdout, bool null_stderr,
+                bool exit_on_error,
+                int fd[1])
 {
   int ofd[2];
 #if HAVE_POSIX_SPAWN
index 528a3c2cb56f6a19e689be2d3dc0ba404d0a91ae..f32dcaf0cc4bdf0d9b880a384d5cf17f67173026 100644 (file)
@@ -1,5 +1,5 @@
 /* Creation of subprocesses, communicating via pipes.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
  *    parent  ->   fd[0]   ->   STDIN_FILENO    ->   child
  *
  */
-extern pid_t create_pipe_out PARAMS ((const char *progname,
-                                     const char *prog_path, char **prog_argv,
-                                     const char *prog_stdout, bool null_stderr,
-                                     bool exit_on_error,
-                                     int fd[1]));
+extern pid_t create_pipe_out (const char *progname,
+                             const char *prog_path, char **prog_argv,
+                             const char *prog_stdout, bool null_stderr,
+                             bool exit_on_error,
+                             int fd[1]);
 
 /* Open a pipe for input from a child process.
  * The child's stdin comes from a file.
@@ -66,11 +66,11 @@ extern pid_t create_pipe_out PARAMS ((const char *progname,
  *    parent  <-   fd[0]   <-   STDOUT_FILENO   <-   child
  *
  */
-extern pid_t create_pipe_in PARAMS ((const char *progname,
-                                    const char *prog_path, char **prog_argv,
-                                    const char *prog_stdin, bool null_stderr,
-                                    bool exit_on_error,
-                                    int fd[1]));
+extern pid_t create_pipe_in (const char *progname,
+                            const char *prog_path, char **prog_argv,
+                            const char *prog_stdin, bool null_stderr,
+                            bool exit_on_error,
+                            int fd[1]);
 
 /* Open a bidirectional pipe.
  *
@@ -80,10 +80,10 @@ extern pid_t create_pipe_in PARAMS ((const char *progname,
  *           read        system                write
  *
  */
-extern pid_t create_pipe_bidi PARAMS ((const char *progname,
-                                      const char *prog_path, char **prog_argv,
-                                      bool null_stderr,
-                                      bool exit_on_error,
-                                      int fd[2]));
+extern pid_t create_pipe_bidi (const char *progname,
+                              const char *prog_path, char **prog_argv,
+                              bool null_stderr,
+                              bool exit_on_error,
+                              int fd[2]);
 
 #endif /* _PIPE_H */
index 6f48a219afd8e49e11255cd5d9ee8c4323dc8ab2..98e1a6013e72638dae74be14c595ddaa219c0e77 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,8 +34,7 @@ const char *program_name;
 
 /* Set program_name, based on argv[0].  */
 void
-set_program_name (argv0)
-     const char *argv0;
+set_program_name (const char *argv0)
 {
   /* libtool creates a temporary executable whose name is prefixed with
      "lt-".  Remove this prefix here.  */
index b6883115e758b25a0e831f4752f8cce341d50266..0b50bfe38d25687a78aa4ee328248225a56132c9 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,7 +33,7 @@
 extern const char *program_name;
 
 /* Set program_name, based on argv[0].  */
-extern void set_program_name PARAMS ((const char *argv0));
+extern void set_program_name (const char *argv0);
 
 /* Indicates whether errors and warnings get prefixed with program_name.
    Default is true.
@@ -43,6 +43,6 @@ extern bool error_with_progname;
 
 /* Print program_name prefix on stderr if and only if error_with_progname
    is true.  */
-extern void maybe_print_progname PARAMS ((void));
+extern void maybe_print_progname (void);
 
 #endif /* _PROGNAME_H */
index a8947af389cb9843d7c54220225f5087c86241b3..8fe36ad9a38b836584026f8782cc780270e852dc 100644 (file)
@@ -1,5 +1,5 @@
 /* safe-read.c -- an interface to read that retries after interrupts
-   Copyright (C) 1993-1994, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1993-1994, 1998, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,10 +39,7 @@ extern int errno;
    for an error.  */
 
 ssize_t
-safe_read (desc, ptr, len)
-     int desc;
-     void *ptr;
-     size_t len;
+safe_read (int desc, void *ptr, size_t len)
 {
   ssize_t n_chars;
 
index 1b111a66f09481db7f0f4156080862570219dd12..d08043778ff13082d74fc4120b79e88d698b3262 100644 (file)
@@ -1,5 +1,5 @@
 /* read() wrapper.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -25,4 +25,4 @@
 /* Read LEN bytes at PTR from descriptor DESC, retrying if interrupted.
    Return the actual number of bytes read, zero for EOF, or negative
    for an error.  */
-extern ssize_t safe_read PARAMS ((int desc, void *ptr, size_t len));
+extern ssize_t safe_read (int desc, void *ptr, size_t len);
index c0047a149c287ef7f4adc8b4c60f0fe4dd4279bd..6a7548f0fe42c1aeb5bbd3abf17e585817c7f11e 100644 (file)
@@ -73,7 +73,7 @@ __libc_lock_define_initialized (static, envlock)
                      && defined __GNUC__)
 # define USE_TSEARCH   1
 # include <search.h>
-typedef int (*compar_fn_t) PARAMS ((const void *, const void *));
+typedef int (*compar_fn_t) (const void *, const void *);
 
 /* This is a pointer to the root of the search tree with the known
    values.  */
@@ -108,11 +108,8 @@ static char **last_environ;
    to reuse values once generated for a `setenv' call since we can never
    free the strings.  */
 int
-__add_to_environ (name, value, combined, replace)
-     const char *name;
-     const char *value;
-     const char *combined;
-     int replace;
+__add_to_environ (const char *name, const char *value, const char *combined,
+                 int replace)
 {
   register char **ep;
   register size_t size;
@@ -258,10 +255,7 @@ __add_to_environ (name, value, combined, replace)
 }
 
 int
-setenv (name, value, replace)
-     const char *name;
-     const char *value;
-     int replace;
+setenv (const char *name, const char *value, int replace)
 {
   return __add_to_environ (name, value, NULL, replace);
 }
index 49e7c5d3164c9a253ea78bfa8add154fa95e1283..9068b70ff2320e6a223dec9a5e83db7ab2fc2799 100644 (file)
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #if HAVE_SETENV || HAVE_UNSETENV
 
 /* Get setenv(), unsetenv() declarations.  */
@@ -38,14 +30,14 @@ extern "C" {
 
 /* Set NAME to VALUE in the environment.
    If REPLACE is nonzero, overwrite an existing value.  */
-extern int setenv PARAMS ((const char *name, const char *value, int replace));
+extern int setenv (const char *name, const char *value, int replace);
 
 #endif
 
 #if !HAVE_UNSETENV
 
 /* Remove the variable NAME from the environment.  */
-extern int unsetenv PARAMS ((const char *name));
+extern int unsetenv (const char *name);
 
 #endif
 
index 8cc300f92d0e2774f90851070e6c29921625b1bd..41c82c3bbc271a41be6d99399492071b3c987d21 100644 (file)
@@ -1,5 +1,5 @@
 /* Shell quoting.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -33,8 +33,7 @@
 
 /* Returns the number of bytes needed for the quoted string.  */
 size_t
-shell_quote_length (string)
-     const char *string;
+shell_quote_length (const char *string)
 {
   if (strpbrk (string, SHELL_SPECIAL_CHARS) == NULL)
     return strlen (string);
@@ -66,9 +65,7 @@ shell_quote_length (string)
 
 /* Copies the quoted string to p and returns the incremented p.  */
 char *
-shell_quote_copy (p, string)
-     char *p;
-     const char *string;
+shell_quote_copy (char *p, const char *string)
 {
   if (strpbrk (string, SHELL_SPECIAL_CHARS) == NULL)
     {
@@ -102,8 +99,7 @@ shell_quote_copy (p, string)
 
 /* Returns the freshly allocated quoted string.  */
 char *
-shell_quote (string)
-     const char *string;
+shell_quote (const char *string)
 {
   size_t length = shell_quote_length (string);
   char *quoted = (char *) xmalloc (length + 1);
@@ -115,8 +111,7 @@ shell_quote (string)
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
 char *
-shell_quote_argv (argv)
-     char **argv;
+shell_quote_argv (char **argv)
 {
   if (*argv != NULL)
     {
index 8c18c9895e52893c7b1a435ad8570163447ca8a4..76a5831039ea8ee9f16ece9ee2d1382f69329249 100644 (file)
@@ -1,5 +1,5 @@
 /* Shell quoting.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #include <stddef.h>
 
 /* Returns the number of bytes needed for the quoted string.  */
-extern size_t shell_quote_length PARAMS ((const char *string));
+extern size_t shell_quote_length (const char *string);
 
 /* Copies the quoted string to p and returns the incremented p.  */
-extern char * shell_quote_copy PARAMS ((char *p, const char *string));
+extern char * shell_quote_copy (char *p, const char *string);
 
 /* Returns the freshly allocated quoted string.  */
-extern char * shell_quote PARAMS ((const char *string));
+extern char * shell_quote (const char *string);
 
 /* Returns a freshly allocated string containing all argument strings, quoted,
    separated through spaces.  */
-extern char * shell_quote_argv PARAMS ((char **argv));
+extern char * shell_quote_argv (char **argv);
index d1b13598935fb568ffa3d8a780cc984f9b8c406b..83d82775ebafab91fdbdc6d2964ba2a09cf03637 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1997, 2002 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
@@ -33,9 +33,7 @@
 
 /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST.  */
 char *
-__stpcpy (dest, src)
-     char *dest;
-     const char *src;
+__stpcpy (char *dest, const char *src)
 {
   register char *d = dest;
   register const char *s = src;
index ce8fe0ec473b1ed228d4eb3b70f62fcc64e959b5..6583189ffb539b0a0606c3084c41b29849c4c671 100644 (file)
@@ -1,5 +1,5 @@
 /* String copying.
-   Copyright (C) 1995, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #ifndef _STPCPY_H
 #define _STPCPY_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 #if HAVE_STPCPY
 
 /* Get stpcpy() declaration.  */
@@ -33,7 +25,7 @@
 
 #else
 
-extern char *stpcpy PARAMS ((char *__dst, const char *__src));
+extern char *stpcpy (char *__dst, const char *__src);
 
 #endif
 
index cb34e08c6abd2ae9811c113fceea7edf3cbb277c..42e31ad0d68fa4cb286eca1de2b711149d8a402b 100644 (file)
 /* Copy no more than N characters of SRC to DEST, returning the address of
    the terminating '\0' in DEST, if any, or else DEST + N.  */
 char *
-__stpncpy (dest, src, n)
-     char *dest;
-     const char *src;
-     size_t n;
+__stpncpy (char *dest, const char *src, size_t n)
 {
   char c;
   char *s = dest;
index 2b1e680fb0f6233fd43565452191150acb7ab18b..af239dc55d37d598e79152a3dfe1057f6358dbf0 100644 (file)
 #ifndef _STPNCPY_H
 #define _STPNCPY_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 #include <string.h>
 
 #ifndef __GNU_LIBRARY__
 
 /* When not using the GNU libc we use the stpncpy implementation we
    provide here.  */
-extern char *gnu_stpncpy PARAMS ((char *__dst, const char *__src, size_t __n));
+extern char *gnu_stpncpy (char *__dst, const char *__src, size_t __n);
 #define stpncpy(Dst, Src, N) gnu_stpncpy (Dst, Src, N)
 
 #endif
index be2d0dd718798bd9f5eb7bf7bca01c4d613531c2..f590e8d21dcde9e2e85ab9c933270cd6c1925896 100644 (file)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison functions.
-   Copyright (C) 1995-1996, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stddef.h>
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
-extern int strcasecmp PARAMS ((const char *__s1, const char *__s2));
-extern int strncasecmp PARAMS ((const char *__s1, const char *__s2,
-                               size_t __n));
+extern int strcasecmp (const char *__s1, const char *__s2);
+extern int strncasecmp (const char *__s1, const char *__s2, size_t __n);
 
 #endif /* _STRCASE_H */
index 778d317d39e348a3db07e8bd710775a14dad84c2..8f85d1589747d92df07bed1f38ae8466e8fe813d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1992, 1995-1997, 2002 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
 #endif
 
 #ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define LOCALE_PARAM , loc
-# define LOCALE_PARAM_DECL __locale_t loc;
+# define LOCALE_PARAM , __locale_t loc
 #else
 # define LOCALE_PARAM
-# define LOCALE_PARAM_DECL
 #endif
 
 /* Compare S1 and S2, ignoring case, returning less than, equal to or
    greater than zero if S1 is lexicographically less than,
    equal to or greater than S2.  */
 int
-__strcasecmp (s1, s2 LOCALE_PARAM)
-     const char *s1;
-     const char *s2;
-     LOCALE_PARAM_DECL
+__strcasecmp (const char *s1, const char *s2 LOCALE_PARAM)
 {
   const unsigned char *p1 = (const unsigned char *) s1;
   const unsigned char *p2 = (const unsigned char *) s2;
index 6a81c93a2c335203dc18a3078072adea8536809c..8ff1109db2f826140a9588ba37c26f21fc6eabdc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996-1997, 2002 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
@@ -36,9 +36,7 @@
 /* Return the length of the maximum initial segment of S
    which contains no characters from REJECT.  */
 size_t
-strcspn (s, reject)
-     const char *s;
-     const char *reject;
+strcspn (const char *s, const char *reject)
 {
   size_t count = 0;
 
index cb331c4409229a8b90d425ce70420abc4e6a75ef..0cdbabe933face3d94842973e81f36e6291a60e3 100644 (file)
@@ -1,6 +1,6 @@
 /* Compare at most N characters of two strings without taking care for
    the case.
-   Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1996-1997, 2002 Free Software Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C Library.
    Bugs can be reported to bug-glibc@gnu.org.
 #endif
 
 #ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define LOCALE_PARAM , loc
-# define LOCALE_PARAM_DECL __locale_t loc;
+# define LOCALE_PARAM , __locale_t loc
 #else
 # define LOCALE_PARAM
-# define LOCALE_PARAM_DECL
 #endif
 
 /* Compare no more than N characters of S1 and S2,
    greater than zero if S1 is lexicographically less
    than, equal to or greater than S2.  */
 int
-__strncasecmp (s1, s2, n LOCALE_PARAM)
-     const char *s1;
-     const char *s2;
-     size_t n;
-     LOCALE_PARAM_DECL
+__strncasecmp (const char *s1, const char *s2, size_t n LOCALE_PARAM)
 {
   const unsigned char *p1 = (const unsigned char *) s1;
   const unsigned char *p2 = (const unsigned char *) s2;
index a49d2b145b26607d1480b92cd9192494262f038b..1546233daa9199ce7dfd915dc5252d61d564b163 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1996-1997, 2002 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,9 +28,7 @@
 
 /* Find the first occurrence in S of any character in ACCEPT.  */
 char *
-strpbrk (s, accept)
-     const char *s;
-     const char *accept;
+strpbrk (const char *s, const char *accept)
 {
   while (*s != '\0')
     {
index 67aa525d94ff653f99902aa6828d7afdc562ebc4..cee75b9c6def1022be734fa0cd66aac38af1a83d 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #if HAVE_STRPBRK
 
 /* Get strpbrk() declaration.  */
@@ -31,6 +23,6 @@
 #else
 
 /* Find the first occurrence in S of any character in ACCEPT.  */
-extern char *strpbrk PARAMS ((const char *s, const char *accept));
+extern char *strpbrk (const char *s, const char *accept);
 
 #endif
index 3eb2f2207d64f2b8b3f3eaf71ade0582d9cabde5..b16346b161860c6aa9bc7f39f3b294a38578b18c 100644 (file)
@@ -1,5 +1,5 @@
 /* Return the offset of one string within another.
-   Copyright (C) 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1996, 1997, 2000, 2002 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
@@ -39,9 +39,7 @@ typedef unsigned chartype;
 #undef strstr
 
 char *
-strstr (phaystack, pneedle)
-     const char *phaystack;
-     const char *pneedle;
+strstr (const char *phaystack, const char *pneedle)
 {
   register const unsigned char *haystack, *needle;
   register chartype b, c;
index 0162d097102f9f2c2194010dd591328b54fb8be3..e424b8340f824bad18f6059d8dbf7507c0a7269d 100644 (file)
@@ -1,5 +1,5 @@
 /* Searching in a string.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #if HAVE_STRSTR
 
 /* Get strstr() declaration.  */
@@ -31,6 +23,6 @@
 #else
 
 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
-extern char *strstr PARAMS ((const char *haystack, const char *needle));
+extern char *strstr (const char *haystack, const char *needle);
 
 #endif
index 11b62944e4088cbde4d8487c059dfeb569bbec5b..5c19f7ee595c74b107af26c74f03414dc998cc5a 100644 (file)
 #endif
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static bool direxists PARAMS ((const char *dir));
-
-
 /* Return nonzero if DIR is an existent directory.  */
 static bool
-direxists (dir)
-     const char *dir;
+direxists (const char *dir)
 {
   struct_stat64 buf;
   return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
@@ -98,12 +92,8 @@ direxists (dir)
    doesn't exist, none of the searched dirs exists, or there's not
    enough space in TMPL. */
 int
-path_search (tmpl, tmpl_len, dir, pfx, try_tmpdir)
-     char *tmpl;
-     size_t tmpl_len;
-     const char *dir;
-     const char *pfx;
-     bool try_tmpdir;
+path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
+            bool try_tmpdir)
 {
   const char *d;
   size_t dlen, plen;
index 8eaed9e2df3c5baaead2a61da22be12ef1621915..2c8068168c62e52dc46c194d09ae1cd1e946f53c 100644 (file)
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #include <stdbool.h>
 #include <stddef.h>
 
@@ -32,4 +24,4 @@
    for use with mk[s]temp.  Will fail (-1) if DIR is non-null and
    doesn't exist, none of the searched dirs exists, or there's not
    enough space in TMPL. */
-extern int path_search PARAMS ((char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir));
+extern int path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir);
index 3c55f9c9c919cb6321475fcb3c7863c2264a1a9a..bf56a551f75a11ea5372fbd3d50ee04ddea22c3d 100644 (file)
@@ -19,21 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <stddef.h>
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int
-u16_uctomb_aux PARAMS ((unsigned short *s, unsigned int uc, int n));
-static inline int
-u16_uctomb PARAMS ((unsigned short *s, unsigned int uc, int n));
-
 /* Return the length (number of units) of the UTF-16 representation of uc,
    after storing it at S.  Return -1 upon failure, -2 if the number of
    available units, N, is too small.  */
 static int
-u16_uctomb_aux (s, uc, n)
-     unsigned short *s;
-     unsigned int uc;
-     int n;
+u16_uctomb_aux (unsigned short *s, unsigned int uc, int n)
 {
   if (uc >= 0x10000)
     {
@@ -53,10 +43,7 @@ u16_uctomb_aux (s, uc, n)
 }
 
 static inline int
-u16_uctomb (s, uc, n)
-     unsigned short *s;
-     unsigned int uc;
-     int n;
+u16_uctomb (unsigned short *s, unsigned int uc, int n)
 {
   if (uc < 0x10000 && n > 0)
     {
index 965d92a15468d36cd86f62ec18c49da7635f328d..0757325c47a7f3f0a27b4e9b8a08bd95af7306a3 100644 (file)
@@ -19,21 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <stddef.h>
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int
-u8_uctomb_aux PARAMS ((unsigned char *s, unsigned int uc, int n));
-static inline int
-u8_uctomb PARAMS ((unsigned char *s, unsigned int uc, int n));
-
 /* Return the length (number of units) of the UTF-8 representation of uc,
    after storing it at S.  Return -1 upon failure, -2 if the number of
    available units, N, is too small.  */
 static int
-u8_uctomb_aux (s, uc, n)
-     unsigned char *s;
-     unsigned int uc;
-     int n;
+u8_uctomb_aux (unsigned char *s, unsigned int uc, int n)
 {
   int count;
 
@@ -75,10 +65,7 @@ u8_uctomb_aux (s, uc, n)
 }
 
 static inline int
-u8_uctomb (s, uc, n)
-     unsigned char *s;
-     unsigned int uc;
-     int n;
+u8_uctomb (unsigned char *s, unsigned int uc, int n)
 {
   if (uc < 0x80 && n > 0)
     {
index 56b35f06a7c9a41f95c0a664e5d2da1fc312eae0..734589dce0a620050f233bbb78f1341f380bdfda 100644 (file)
@@ -63,8 +63,7 @@ __libc_lock_define_initialized (static, envlock)
 
 
 int
-unsetenv (name)
-     const char *name;
+unsetenv (const char *name)
 {
   size_t len;
   char **ep;
index 7a7ae52b8b90eb99238dbe79983098102a162a7d..48caab4b80587ebfb28048d352705945477233b8 100644 (file)
@@ -1,5 +1,5 @@
 /* Conversion UTF-16 to UCS-4.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
 This program is free software; you can redistribute it and/or modify
@@ -19,20 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <stddef.h>
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int
-u16_mbtouc_aux PARAMS ((unsigned int *puc, const unsigned short *s, size_t n));
-static inline int
-u16_mbtouc PARAMS ((unsigned int *puc, const unsigned short *s, size_t n));
-
 /* Return the length (number of units) of the first character in S, putting
    its 'ucs4_t' representation in *PUC.  */
 static int
-u16_mbtouc_aux (puc, s, n)
-     unsigned int *puc;
-     const unsigned short *s;
-     size_t n;
+u16_mbtouc_aux (unsigned int *puc, const unsigned short *s, size_t n)
 {
   unsigned short c = *s;
 
@@ -59,10 +49,7 @@ u16_mbtouc_aux (puc, s, n)
   return 1;
 }
 static inline int
-u16_mbtouc (puc, s, n)
-     unsigned int *puc;
-     const unsigned short *s;
-     size_t n;
+u16_mbtouc (unsigned int *puc, const unsigned short *s, size_t n)
 {
   unsigned short c = *s;
 
index a3f28834b4165821887764f6bf5723145336d136..3cee14b2922930ac22e3a3c4eccabe6bc703db4f 100644 (file)
@@ -19,20 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <stddef.h>
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int
-u8_mbtouc_aux PARAMS ((unsigned int *puc, const unsigned char *s, size_t n));
-static inline int
-u8_mbtouc PARAMS ((unsigned int *puc, const unsigned char *s, size_t n));
-
 /* Return the length (number of units) of the first character in S, putting
    its 'ucs4_t' representation in *PUC.  */
 static int
-u8_mbtouc_aux (puc, s, n)
-     unsigned int *puc;
-     const unsigned char *s;
-     size_t n;
+u8_mbtouc_aux (unsigned int *puc, const unsigned char *s, size_t n)
 {
   unsigned char c = *s;
 
@@ -163,10 +153,7 @@ u8_mbtouc_aux (puc, s, n)
   return 1;
 }
 static inline int
-u8_mbtouc (puc, s, n)
-     unsigned int *puc;
-     const unsigned char *s;
-     size_t n;
+u8_mbtouc (unsigned int *puc, const unsigned char *s, size_t n)
 {
   unsigned char c = *s;
 
index bd66b79113d50d3e010996edabfacebbf7ae4532..2016e967f3915fb80a6bf4fb9f168d5b461ad742 100644 (file)
@@ -26,19 +26,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stdarg.h>
 #include <math.h>
 
-#include "libstdarg.h"
-
 #ifdef TEST
 size_t global_total_width;
 #endif
 
 static int
-int_vasprintf (result, format, args)
-     char **result;
-     const char *format;
-     va_list *args;
+int_vasprintf (char **result, const char *format, va_list *args)
 {
   const char *p = format;
   /* Add one to make sure that it is never zero, which might cause malloc
@@ -126,25 +122,18 @@ int_vasprintf (result, format, args)
 }
 
 int
-vasprintf (result, format, args)
-     char **result;
-     const char *format;
-     va_list args;
+vasprintf (char **result, const char *format, va_list args)
 {
   return int_vasprintf (result, format, &args);
 }
 
 int
-asprintf VA_PARAMS ((char **result, const char *format, ...),
-                   (result, format, va_alist)
-     char **result;
-     const char *format;
-     va_dcl)
+asprintf (char **result, const char *format, ...)
 {
   va_list args;
   int done;
 
-  VA_START (args, format);
+  va_start (args, format);
   done = vasprintf (result, format, args);
   va_end (args);
 
@@ -158,15 +147,12 @@ asprintf VA_PARAMS ((char **result, const char *format, ...),
 #include <float.h>
 
 void
-checkit VA_PARAMS ((const char* format, ...),
-                  (format, va_alist)
-     const char *format;
-     va_dcl)
+checkit (const char* format, ...)
 {
   va_list args;
   char *result;
 
-  VA_START (args, format);
+  va_start (args, format);
   vasprintf (&result, format, args);
   if (strlen (result) < global_total_width)
     printf ("PASS: ");
index 686e37c59d4e3838c3f10638c9fd811f0fdfaa14..cd4a8aa822b069c87f8085ecf52cec3d8eec0107 100644 (file)
 #ifndef _VASPRINTF_H
 #define _VASPRINTF_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 #if HAVE_VASPRINTF
 
 /* Get asprintf(), vasprintf() declarations.  */
 #else
 
 /* Get va_list.  */
-#if __STDC__ || defined __cplusplus
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
@@ -57,9 +45,9 @@
 extern "C" {
 #endif
 
-extern int asprintf PARAMS ((char **result, const char *format, ...))
+extern int asprintf (char **result, const char *format, ...)
        __attribute__ ((__format__ (__printf__, 2, 3)));
-extern int vasprintf PARAMS ((char **result, const char *format, va_list args))
+extern int vasprintf (char **result, const char *format, va_list args)
        __attribute__ ((__format__ (__printf__, 2, 0)));
 
 #ifdef __cplusplus
index cd4e3a0ef44ae0e74caafb1b76de561642a3577b..af315f0c7b607bdb0af4dccb2110ce06fddce8e5 100644 (file)
 
 
 int
-wait_subprocess (child, progname, exit_on_error)
-     pid_t child;
-     const char *progname;
-     bool exit_on_error;
+wait_subprocess (pid_t child, const char *progname, bool exit_on_error)
 {
   /* waitpid() is just as portable as wait() nowadays.  */
   WAIT_T status;
index 509d73d61a644661e11a96e4cde9c9113c726376..22440f4107e58cda828474c230eed02415e19a61 100644 (file)
@@ -1,5 +1,5 @@
 /* Waiting for a subprocess to finish.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@
 /* Wait for a subprocess to finish.  Return its exit code.
    If it didn't terminate correctly, exit if exit_on_error is true, otherwise
    return 127.  */
-extern int wait_subprocess PARAMS ((pid_t child, const char *progname,
-                                   bool exit_on_error));
+extern int wait_subprocess (pid_t child, const char *progname,
+                           bool exit_on_error);
 
 #endif /* _WAIT_PROCESS_H */
index bab939f6cd7611e78955c10469d016c8e3edde3b..b07a6d662aaf004c66b9c1de31cffdaa967f05b2 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdarg.h>
 
 #include "error.h"
 #include "progname.h"
 #include "exit.h"
 #include "mbswidth.h"
 #include "vasprintf.h"
-#include "libstdarg.h"
 #include "gettext.h"
 
 #define _(str) gettext (str)
 
 /* Format a message and return the freshly allocated resulting string.  */
 char *
-xasprintf VA_PARAMS ((const char *format, ...),
-                    (format, va_alist)
-     const char *format;
-     va_dcl)
+xasprintf (const char *format, ...)
 {
   va_list args;
   char *result;
 
-  VA_START (args, format);
+  va_start (args, format);
   if (vasprintf (&result, format, args) < 0)
     error (EXIT_FAILURE, 0, _("memory exhausted"));
   va_end (args);
@@ -60,9 +57,7 @@ xasprintf VA_PARAMS ((const char *format, ...),
    the same amount of spaces.  Reuse the spaces of the previous call if
    PREFIX is NULL.  Free the PREFIX and MESSAGE when done.  */
 void
-multiline_warning (prefix, message)
-     char *prefix;
-     char *message;
+multiline_warning (char *prefix, char *message)
 {
   static int width;
   const char *cp;
@@ -115,9 +110,7 @@ multiline_warning (prefix, message)
    the same amount of spaces.  Reuse the spaces of the previous call if
    PREFIX is NULL.  Free the PREFIX and MESSAGE when done.  */
 void
-multiline_error (prefix, message)
-     char *prefix;
-     char *message;
+multiline_error (char *prefix, char *message)
 {
   if (prefix != NULL)
     ++error_message_count;
index 788cbb2b0b93f791f09e1b8231c784dff548ecf0..543ac96d0dd4a28ac64f7bf3ca9d79107e2667e8 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiline error-reporting functions.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #include "error.h"
 
 /* Format a message and return the freshly allocated resulting string.  */
-#if defined (__STDC__) && __STDC__
 extern char *xasprintf (const char *format, ...)
      __attribute__ ((__format__ (__printf__, 1, 2)));
-#else
-extern char *xasprintf ();
-#endif
 
 /* Emit a multiline warning to stderr, consisting of MESSAGE, with the
    first line prefixed with PREFIX and the remaining lines prefixed with
    the same amount of spaces.  Reuse the spaces of the previous call if
    PREFIX is NULL.  Free the PREFIX and MESSAGE when done.  */
-extern void multiline_warning PARAMS ((char *prefix, char *message));
+extern void multiline_warning (char *prefix, char *message);
 
 /* Emit a multiline error to stderr, consisting of MESSAGE, with the
    first line prefixed with PREFIX and the remaining lines prefixed with
    the same amount of spaces.  Reuse the spaces of the previous call if
    PREFIX is NULL.  Free the PREFIX and MESSAGE when done.  */
-extern void multiline_error PARAMS ((char *prefix, char *message));
+extern void multiline_error (char *prefix, char *message);
 
 #endif /* _XERROR_H */
index 2f6df8a6dbded7d065d4918e40eb13010c10cb6e..6af2cdcbcdcb6c0d269dca58ac0a96c7de623212 100644 (file)
@@ -1,5 +1,5 @@
 /* xgetcwd -- return current directory with unlimited length
-   Copyright (C) 1995, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program; if not, write to the Free Software Foundation,
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(args) args
-# else
-#  define PARAMS(args) ()
-# endif
-#endif
-
 /* Wrapper function with error checking for standard function.  */
-extern char *xgetcwd PARAMS ((void));
+extern char *xgetcwd (void);
index d7fa812792f31bb7138fc336f8a159ab4bfd174a..ed757d2a9c70ec755d821360826d84c20288ea03 100644 (file)
@@ -1,5 +1,5 @@
 /* xmalloc.c -- malloc with out of memory checking
-   Copyright (C) 1990-1996, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990-1996, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void *fixup_null_alloc PARAMS ((size_t n));
-
-
 /* Exit value when the requested amount of memory is not available.
    The caller may set it to some other value.  */
 int xmalloc_exit_failure = EXIT_FAILURE;
 
 static void *
-fixup_null_alloc (n)
-     size_t n;
+fixup_null_alloc (size_t n)
 {
   void *p;
 
@@ -57,8 +51,7 @@ fixup_null_alloc (n)
 /* Allocate N bytes of memory dynamically, with error checking.  */
 
 void *
-xmalloc (n)
-     size_t n;
+xmalloc (size_t n)
 {
   void *p;
 
@@ -71,8 +64,7 @@ xmalloc (n)
 /* Allocate memory for N elements of S bytes, with error checking.  */
 
 void *
-xcalloc (n, s)
-     size_t n, s;
+xcalloc (size_t n, size_t s)
 {
   void *p;
 
@@ -87,9 +79,7 @@ xcalloc (n, s)
    If P is NULL, run xmalloc.  */
 
 void *
-xrealloc (p, n)
-     void *p;
-     size_t n;
+xrealloc (void *p, size_t n)
 {
   if (p == NULL)
     return xmalloc (n);
index 880bb405d949ba95124014c13c4164a8dc6a731b..c5b47ece378aa9bb2506987cd82465733c28ef1c 100644 (file)
@@ -1,5 +1,5 @@
 /* malloc with out of memory checking.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 /* Defined in xmalloc.c.  */
 
 /* Allocate SIZE bytes of memory dynamically, with error checking.  */
-extern void *xmalloc PARAMS ((size_t size));
+extern void *xmalloc (size_t size);
 
 /* Allocate memory for NMEMB elements of SIZE bytes, with error checking.  */
-extern void *xcalloc PARAMS ((size_t nmemb, size_t size));
+extern void *xcalloc (size_t nmemb, size_t size);
 
 /* Change the size of an allocated block of memory PTR to SIZE bytes,
    with error checking.  If PTR is NULL, run xmalloc.  */
-extern void *xrealloc PARAMS ((void *ptr, size_t size));
+extern void *xrealloc (void *ptr, size_t size);
 
 
 /* Defined in xstrdup.c.  */
 
 /* Return a newly allocated copy of STRING.  */
-extern char *xstrdup PARAMS ((const char *string));
+extern char *xstrdup (const char *string);
 
 
 #endif /* _XMALLOC_H */
index f20d1a9e6ed2274ca9a4972bf53db96b1d8d51c2..43537f637a5f739bd5fbcd417b776a9ae1737a86 100644 (file)
@@ -1,5 +1,5 @@
 /* Setting environment variables, with out-of-memory checking.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    If REPLACE is nonzero, overwrite an existing value.
    With error checking.  */
 void
-xsetenv (name, value, replace)
-     const char *name;
-     const char *value;
-     int replace;
+xsetenv (const char *name, const char *value, int replace)
 {
   if (setenv (name, value, replace) < 0)
     error (EXIT_FAILURE, 0, _("memory exhausted"));
index 67803f09333fbb1368b223fd1f8aadd7a996bd52..a3b5e9faf3b949c3bfee255a7da639de9c59d11c 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
 /* Set NAME to VALUE in the environment.
    If REPLACE is nonzero, overwrite an existing value.
    With error checking.  */
-extern void xsetenv PARAMS ((const char *name, const char *value, int replace));
+extern void xsetenv (const char *name, const char *value, int replace);
 
 #ifdef __cplusplus
 }
index ca117a7c6febcdcc00a8f3c1ad965341edeb60d9..6d20e2b5518bf8d658152bf7a2a647cb2cd5ee0a 100644 (file)
@@ -1,5 +1,5 @@
 /* xstrdup.c -- copy a string with out of memory checking
-   Copyright (C) 1990, 1996, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1996, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -27,8 +27,7 @@
 /* Return a newly allocated copy of STRING.  */
 
 char *
-xstrdup (string)
-     const char *string;
+xstrdup (const char *string)
 {
   return strcpy (xmalloc (strlen (string) + 1), string);
 }
index 6e452c7112c3bbaa92147874b7a92e579baffbfa..b5a2fa266995f074d9618dcc3a95979ba5116910 100644 (file)
@@ -1,3 +1,26 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * libstdarg.h: Remove file.
+       * Makefile.am (lib_asprintf_EXTRASOURCES): Remove libstdarg.h.
+       * asnprintf.c: Include <stdarg.h> instead of libstdarg.h.
+       (asnprintf): Use ANSI C function declarations. Use va_start instead of
+       VA_START.
+       * asprintf.c: Include <stdarg.h> instead of libstdarg.h.
+       (asnprintf): Use ANSI C function declarations. Use va_start instead of
+       VA_START.
+       * printf-args.h (PARAMS): Remove macro.
+       (printf_fetchargs): Use ANSI C function declarations.
+       * printf-args.c (printf_fetchargs): Likewise.
+       * printf-parse.h (printf_parse): Likewise.
+       * printf-parse.c (printf_parse): Likewise.
+       * vasnprintf.h (PARAMS): Remove macro.
+       (asnprintf, vasnprintf): Use ANSI C function declarations.
+       * vasnprintf.c (vasnprintf): Likewise.
+       * vasprintf.h (PARAMS): Remove macro.
+       (asprintf, vasprintf): Use ANSI C function declarations.
+       * vasprintf.c (vasprintf): Likewise.
+
 2002-10-27  Bruno Haible  <bruno@clisp.org>
 
        * printf-args.h, printf-args.c: New files.
index aea2c8cb84a2573441c7e2703cd6e960cf1b5eda..e0debdf7a6287ff7baf7488170ab03d7d5b3019e 100644 (file)
@@ -41,8 +41,7 @@ lib_asprintf_EXTRASOURCES = \
   printf-parse.h printf-parse.c \
   vasnprintf.h vasnprintf.c asnprintf.c \
   vasprintf.h vasprintf.c asprintf.c \
-  liballoca.h \
-  libstdarg.h
+  liballoca.h
 lib-asprintf.lo: $(lib_asprintf_EXTRASOURCES)
 
 
index 7d7d6b12a48e61ebf6e3132bb32864215a5586ca..8fb9d3c82305cbcd891f938811d06a90b81f2ef6 100644 (file)
 /* Specification.  */
 #include "vasnprintf.h"
 
-#include "libstdarg.h"
+#include <stdarg.h>
 
 char *
-asnprintf VA_PARAMS ((char *resultbuf, size_t *lengthp, const char *format, ...),
-                    (resultbuf, lengthp, format, va_alist)
-     char *resultbuf;
-     size_t *lengthp;
-     const char *format;
-     va_dcl)
+asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
 {
   va_list args;
   char *result;
 
-  VA_START (args, format);
+  va_start (args, format);
   result = vasnprintf (resultbuf, lengthp, format, args);
   va_end (args);
   return result;
index c7029052364ae4efb352cfd94ac5f576d4ee88fc..a8e1bf8992b981647661ec1d5df3b43fb0e671ac 100644 (file)
 /* Specification.  */
 #include "vasprintf.h"
 
-#include "libstdarg.h"
+#include <stdarg.h>
 
 int
-asprintf VA_PARAMS ((char **resultp, const char *format, ...),
-                   (resultp, format, va_alist)
-     char **resultp;
-     const char *format;
-     va_dcl)
+asprintf (char **resultp, const char *format, ...)
 {
   va_list args;
   int result;
 
-  VA_START (args, format);
+  va_start (args, format);
   result = vasprintf (resultp, format, args);
   va_end (args);
   return result;
diff --git a/libasprintf/libstdarg.h b/libasprintf/libstdarg.h
deleted file mode 100644 (file)
index 79c86da..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* <stdarg.h> with fallback on <varargs.h> for old platforms.
-   Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Library General Public License as published
-   by the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _LIBSTDARG_H
-#define _LIBSTDARG_H
-
-#if __STDC__ || defined __SUNPRO_C || defined __cplusplus
-# include <stdarg.h>
-# define VA_START(args, lastarg) va_start (args, lastarg)
-# define VA_PARAMS(stdc_params, oldc_params) stdc_params
-#else
-# include <varargs.h>
-# define VA_START(args, lastarg) va_start (args)
-# define VA_PARAMS(stdc_params, oldc_params) oldc_params
-#endif
-
-#endif /* _LIBSTDARG_H */
index 60bb989d1a3be8966a86675b70ea175257fb6492..85731302c80a2e555e0940ea361c92c7b894143f 100644 (file)
@@ -27,9 +27,7 @@
 STATIC
 #endif
 int
-printf_fetchargs (args, a)
-     va_list args;
-     arguments *a;
+printf_fetchargs (va_list args, arguments *a)
 {
   unsigned int i;
   argument *ap;
index 55c81912b135b33d092f8e49002c89197a1c2b75..5fcbb2ced9a94cae362cea0e60d3bd0cacd7c6dd 100644 (file)
 #endif
 
 /* Get va_list.  */
-#if __STDC__ || defined __SUNPRO_C || defined __cplusplus
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
+#include <stdarg.h>
 
 
 /* Argument types */
@@ -136,6 +124,6 @@ STATIC
 #else
 extern
 #endif
-int printf_fetchargs PARAMS ((va_list args, arguments *a));
+int printf_fetchargs (va_list args, arguments *a);
 
 #endif /* _PRINTF_ARGS_H */
index 50fe1dc327bd1689afc8d9b6f715dc94191d1a86..45ed1b60d55f98a35b3ac98c795c06983e3e8b03 100644 (file)
 STATIC
 #endif
 int
-printf_parse (format, d, a)
-     const char *format;
-     char_directives *d;
-     arguments *a;
+printf_parse (const char *format, char_directives *d, arguments *a)
 {
   const char *cp = format;             /* pointer into format */
   int arg_posn = 0;            /* number of regular arguments consumed */
index c3344a92c89ff5604ee1675ea6b8396a9167b7cd..97e432af1f8434974717ef0d1a7ca1aa4e495dd6 100644 (file)
@@ -67,7 +67,6 @@ STATIC
 #else
 extern
 #endif
-int printf_parse PARAMS ((const char *format, char_directives *d,
-                         arguments *a));
+int printf_parse (const char *format, char_directives *d, arguments *a);
 
 #endif /* _PRINTF_PARSE_H */
index b17c74436e0b8e81314cd689d0b6c7c5b9d3457f..806cc088de9fc6a2b7d3c7898a3d72d4b2ed9f2b 100644 (file)
 #endif
 
 char *
-vasnprintf (resultbuf, lengthp, format, args)
-     char *resultbuf;
-     size_t *lengthp;
-     const char *format;
-     va_list args;
+vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
 {
   char_directives d;
   arguments a;
index 903e7bccb1b371a4ad2d5f568dc11fe43b5489fe..6822ae9ac44e877e903ef775e1c0dfbabd3721c2 100644 (file)
 #ifndef _VASNPRINTF_H
 #define _VASNPRINTF_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 /* Get va_list.  */
-#if __STDC__ || defined __SUNPRO_C || defined __cplusplus
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
 
 /* Get size_t.  */
 #include <stddef.h>
@@ -54,9 +42,9 @@
 extern "C" {
 #endif
 
-extern char * asnprintf PARAMS ((char *resultbuf, size_t *lengthp, const char *format, ...))
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
        __attribute__ ((__format__ (__printf__, 3, 4)));
-extern char * vasnprintf PARAMS ((char *resultbuf, size_t *lengthp, const char *format, va_list args))
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
        __attribute__ ((__format__ (__printf__, 3, 0)));
 
 #ifdef __cplusplus
index 0162025539d5442e6a471c0aa5e8ad2a4e830d27..925d2fb81869fad156ee733851e15089e66278b9 100644 (file)
 #include "vasnprintf.h"
 
 int
-vasprintf (resultp, format, args)
-     char **resultp;
-     const char *format;
-     va_list args;
+vasprintf (char **resultp, const char *format, va_list args)
 {
   size_t length;
   char *result = vasnprintf (NULL, &length, format, args);
index 31434193804af657905ba66eb7a64e1dcaec7657..c82d7b7bb95615dbdef1e5ba174dce5d8f4412ee 100644 (file)
 #ifndef _VASPRINTF_H
 #define _VASPRINTF_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 /* Get va_list.  */
-#if __STDC__ || defined __SUNPRO_C || defined __cplusplus
-# include <stdarg.h>
-#else
-# include <varargs.h>
-#endif
+#include <stdarg.h>
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
@@ -51,9 +39,9 @@
 extern "C" {
 #endif
 
-extern int asprintf PARAMS ((char **result, const char *format, ...))
+extern int asprintf (char **result, const char *format, ...)
        __attribute__ ((__format__ (__printf__, 2, 3)));
-extern int vasprintf PARAMS ((char **result, const char *format, va_list args))
+extern int vasprintf (char **result, const char *format, va_list args)
        __attribute__ ((__format__ (__printf__, 2, 0)));
 
 #ifdef __cplusplus
index 8c92d602889b0f03689e82a31b54890c8033fca9..8156fa32f2b06bc617e8bfb88e3d72f8a600085c 100644 (file)
@@ -1,3 +1,13 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * uniname.h (PARAMS): Remove macro.
+       (unicode_character_name, unicode_name_character): Use ANSI C function
+       declarations.
+       * uniname.c (unicode_name_word, unicode_name_word_lookup,
+       unicode_character_name, unicode_name_character): Likewise.
+       * test-names.c (getfield, fill_names, main): Likewise.
+
 2002-08-06  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.11.5 released.
index 8ce0dfedaba28864dc0be099cc1674d612e4260d..19a757c549a310168a63ef27919b85ed1dffd2ea 100644 (file)
@@ -38,10 +38,7 @@ const char * unicode_names [0x110000];
    Reads up to (but excluding) DELIM.
    Returns 1 when a field was successfully read, otherwise 0.  */
 static int
-getfield (stream, buffer, delim)
-     FILE *stream;
-     char *buffer;
-     int delim;
+getfield (FILE *stream, char *buffer, int delim)
 {
   int count = 0;
   int c;
@@ -67,8 +64,7 @@ getfield (stream, buffer, delim)
 /* Stores in unicode_names[] the relevant contents of the UnicodeData.txt
    file.  */
 static void
-fill_names (unicodedata_filename)
-     const char *unicodedata_filename;
+fill_names (const char *unicodedata_filename)
 {
   unsigned int i;
   FILE *stream;
@@ -253,9 +249,7 @@ test_inverse_lookup ()
 }
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int error = 0;
 
index 4deb465ef9b45a0352f4ded426b6b99cb0df5cde..68017ecdf95309c965b0641be49ef810ddac0fb0 100644 (file)
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static const char * unicode_name_word PARAMS ((unsigned int index, unsigned int *lengthp));
-static int unicode_name_word_lookup PARAMS ((const char *word, unsigned int length));
-
-
 /* Table of Unicode character names, derived from UnicodeData.txt.  */
 #define uint16_t unsigned short
 #define uint32_t unsigned int
@@ -57,9 +51,7 @@ static int unicode_name_word_lookup PARAMS ((const char *word, unsigned int leng
 
 /* Returns the word with a given index.  */
 static const char *
-unicode_name_word (index, lengthp)
-     unsigned int index;
-     unsigned int *lengthp;
+unicode_name_word (unsigned int index, unsigned int *lengthp)
 {
   unsigned int i1;
   unsigned int i2;
@@ -93,9 +85,7 @@ unicode_name_word (index, lengthp)
 
 /* Looks up the index of a word.  */
 static int
-unicode_name_word_lookup (word, length)
-     const char *word;
-     unsigned int length;
+unicode_name_word_lookup (const char *word, unsigned int length)
 {
   if (length > 0 && length < SIZEOF (unicode_name_by_length) - 1)
     {
@@ -156,9 +146,7 @@ static const char jamo_final_short_name[28][3] =
 /* Looks up the name of a Unicode character, in uppercase ASCII.
    Returns the filled buf, or NULL if the character does not have a name.  */
 char *
-unicode_character_name (c, buf)
-     unsigned int c;
-     char *buf;
+unicode_character_name (unsigned int c, char *buf)
 {
   if (c >= 0xAC00 && c <= 0xD7A3)
     {
@@ -302,8 +290,7 @@ unicode_character_name (c, buf)
 /* Looks up the Unicode character with a given name, in upper- or lowercase
    ASCII.  Returns the character if found, or UNINAME_INVALID if not found.  */
 unsigned int
-unicode_name_character (name)
-     const char *name;
+unicode_name_character (const char *name)
 {
   unsigned int len = strlen (name);
   if (len > 1 && len <= UNICODE_CHARNAME_MAX_LENGTH)
index 2ea51c31bcb6887d4143bdc919f919363697f956..550df022bd6c669c365df71acd4b71c0496cfe6b 100644 (file)
 #ifndef _UNINAME_H
 #define _UNINAME_H
 
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
 /* Required size of buffer for a Unicode character name.  */
 #define UNINAME_MAX 256
 
 /* Looks up the name of a Unicode character, in uppercase ASCII.
    Returns the filled buf, or NULL if the character does not have a name.  */
-extern char * unicode_character_name PARAMS ((unsigned int uc, char *buf));
+extern char * unicode_character_name (unsigned int uc, char *buf);
 
 /* Looks up the Unicode character with a given name, in upper- or lowercase
    ASCII.  Returns the character if found, or UNINAME_INVALID if not found.  */
-extern unsigned int unicode_name_character PARAMS ((const char *name));
+extern unsigned int unicode_name_character (const char *name);
 #define UNINAME_INVALID ((unsigned int) 0xFFFF)
 
 #endif /* _UNINAME_H */
index 4808a93038df3e7a282a251e512fd5f5a045a2a7..71a9a59b6d7e208fa73319f775363e7f26ad0020 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * c-bs-a.m4: Remove file.
+       * Makefile.am (EXTRA_DIST): Remove it.
+
 2002-11-08  Bruno Haible  <bruno@clisp.org>
 
        * progtest.m4 (AM_PATH_PROG_WITH_TEST): Portability to OS/2.
index dffd1b65a080a4152154c2b4768df5fbc568cfb0..e09fdd82979b57d90adba78ce776b5d3d4f2faf4 100644 (file)
@@ -7,7 +7,7 @@ aclocal_DATA = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4
 # find . -type f -name '*.m4' -printf '%f\n'|sort |fmt |tr '\012' @ \
 #   |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012'
 EXTRA_DIST = README \
-backupfile.m4 c-bs-a.m4 codeset.m4 error.m4 flex.m4 fnmatch.m4 gcj.m4 \
+backupfile.m4 codeset.m4 error.m4 flex.m4 fnmatch.m4 gcj.m4 \
 getline.m4 gettext.m4 glibc21.m4 hostname.m4 iconv.m4 intdiv0.m4 intmax.m4 \
 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 javacomp.m4 \
 javaexec.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 libtool.m4 \
diff --git a/m4/c-bs-a.m4 b/m4/c-bs-a.m4
deleted file mode 100644 (file)
index 1c7eb1c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-# c-bs-a.m4 serial 4 (fileutils-4.1.3)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License.  As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Paul Eggert.
-
-AC_DEFUN([AC_C_BACKSLASH_A],
-[
-  AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a,
-   [AC_TRY_COMPILE([],
-     [
-#if '\a' == 'a'
-      syntax error;
-#endif
-      char buf['\a' == 'a' ? -1 : 1];
-      buf[0] = '\a';
-      return buf[0] != "\a"[0];
-     ],
-     ac_cv_c_backslash_a=yes,
-     ac_cv_c_backslash_a=no)])
-  if test $ac_cv_c_backslash_a = yes; then
-    AC_DEFINE(HAVE_C_BACKSLASH_A, 1,
-      [Define if backslash-a works in C strings.])
-  fi
-])
index b072020424577a6b7c23e51f36f9be49e614afba..9e683ba68d4be69e62cd08d0b1629aa354aaf47f 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * tcl_gettext.c (tcl_gettext, tcl_textdomain, tcl_bindtextdomain):
+       Use ANSI C function declarations.
+
 2002-10-25  Karl Eichwalder  <ke@suse.de>
 
         * po-compat.el (po-find-file-coding-system-guts): Provide the old
index f399ca0e1157def936f780fbe97bc2a5c017acbe..b26849bbc15326558906290fc2eed5d18ae492b0 100644 (file)
@@ -1,5 +1,5 @@
 /* tcl_gettext - Module implementing gettext interface for Tcl.
-   Copyright (C) 1995, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1998, 2002 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, December 1995.
 
    This program is free software; you can redistribute it and/or modify
 /* Data for Tcl interpreter interface.  */
 #include "tcl.h"
 
-/* Prototypes for local functions.  */
-static int
-tcl_gettext (ClientData client_data, Tcl_Interp *interp, int argc,
-            char *argv[]);
-static int
-tcl_textdomain (ClientData client_data, Tcl_Interp *interp, int argc,
-               char *argv[]);
-static int
-tcl_bindtextdomain (ClientData client_data, Tcl_Interp *interp, int argc,
-                   char *argv[]);
-
-
-/* Initialization functions.  Called from the tclAppInit.c/tkAppInit.c
-   or while the dynamic loading with Tcl7.x, x>= 5.  */
-int
-Gettext_Init (interp)
-     Tcl_Interp *interp;
-{
-  Tcl_CreateCommand (interp, "gettext", tcl_gettext, (ClientData) 0,
-                    (Tcl_CmdDeleteProc *) NULL);
-  Tcl_CreateCommand (interp, "textdomain", tcl_textdomain, (ClientData) 0,
-                    (Tcl_CmdDeleteProc *) NULL);
-  Tcl_CreateCommand (interp, "bindtextdomain", tcl_bindtextdomain,
-                    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
-
-  return TCL_OK;
-}
-
 
 static int
-tcl_gettext (client_data, interp, argc, argv)
-     ClientData client_data;
-     Tcl_Interp *interp;
-     int argc;
-     char *argv[];
+tcl_gettext (ClientData client_data, Tcl_Interp *interp,
+            int argc, char *argv[])
 {
   const char *domainname = NULL;
   int category = LC_MESSAGES;
@@ -130,11 +99,8 @@ tcl_gettext (client_data, interp, argc, argv)
 
 
 static int
-tcl_textdomain (client_data, interp, argc, argv)
-     ClientData client_data;
-     Tcl_Interp *interp;
-     int argc;
-     char *argv[];
+tcl_textdomain (ClientData client_data, Tcl_Interp *interp,
+               int argc, char *argv[])
 {
   if (argc != 2)
     {
@@ -149,11 +115,8 @@ tcl_textdomain (client_data, interp, argc, argv)
 
 
 static int
-tcl_bindtextdomain (client_data, interp, argc, argv)
-     ClientData client_data;
-     Tcl_Interp *interp;
-     int argc;
-     char *argv[];
+tcl_bindtextdomain (ClientData client_data, Tcl_Interp *interp,
+                   int argc, char *argv[])
 {
   if (argc != 3)
     {
@@ -163,3 +126,19 @@ tcl_bindtextdomain (client_data, interp, argc, argv)
 
   return bindtextdomain (argv[1], argv[2]) == NULL ? TCL_ERROR : TCL_OK;
 }
+
+
+/* Initialization functions.  Called from the tclAppInit.c/tkAppInit.c
+   or while the dynamic loading with Tcl7.x, x>= 5.  */
+int
+Gettext_Init (Tcl_Interp *interp)
+{
+  Tcl_CreateCommand (interp, "gettext", tcl_gettext, (ClientData) 0,
+                    (Tcl_CmdDeleteProc *) NULL);
+  Tcl_CreateCommand (interp, "textdomain", tcl_textdomain, (ClientData) 0,
+                    (Tcl_CmdDeleteProc *) NULL);
+  Tcl_CreateCommand (interp, "bindtextdomain", tcl_bindtextdomain,
+                    (ClientData) 0, (Tcl_CmdDeleteProc *) NULL);
+
+  return TCL_OK;
+}
index 58f01fcae21a8257da9e1064b2b14cd1fad8ef01..c23e4a108034e24565283491d36c8b9ef0d4ecd0 100644 (file)
@@ -56,7 +56,6 @@ BEGIN{
   cfg["HAVE_ICONV"] = 1;
   cfg["ICONV_CONST"] = "const";
   cfg["_GNU_SOURCE"] = 1;
-  cfg["HAVE_C_BACKSLASH_A"] = 1;
   cfg["HAVE_UNSIGNED_LONG_LONG"] = 1;
   cfg["HAVE_PTRDIFF_T"] = 1;
   cfg["vfork"] = "fork";
index 9c872b5c6b8521a2669624b5809132290b89499b..534e68a709d82cf5ab72e76818d3d4e2130c7bee 100644 (file)
@@ -1,3 +1,307 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * dir-list.h (dir_list_append, dir_list_nth, dir_list_save_reset,
+       dir_list_restore): Use ANSI C function declarations.
+       * dir-list.c (dir_list_append, dir_list_nth, dir_list_restore):
+       Likewise.
+       * file-list.h (read_names_from_file): Likewise.
+       * file-list.c (read_names_from_file): Likewise.
+       * format.h (struct formatstring_parser, get_c99_format_directives):
+       Likewise.
+       * format-awk.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-c.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check,
+       get_c99_format_directives, format_print): Likewise.
+       * format-elisp.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-java.c (message_format_parse, date_format_parse,
+       number_format_parse, choice_format_parse, numbered_arg_compare,
+       format_parse, format_free, format_get_number_of_directives,
+       format_check, format_print): Likewise.
+       * format-librep.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-lisp.c (verify_element, verify_list, free_element, free_list,
+       copy_element, copy_list, equal_element, equal_list,
+       ensure_initial_alloc, grow_initial_alloc, ensure_repeated_alloc,
+       grow_repeated_alloc, normalize_outermost_list, normalize_list,
+       is_empty_list, unfold_loop, rotate_loop, initial_splitelement,
+       initial_unshare, shift_list, make_intersected_element,
+       append_repeated_to_initial, backtrack_in_initial,
+       make_intersected_list, make_intersection_with_empty_list,
+       intersection, make_union_element, make_union_list,
+       make_union_with_empty_list, union, is_required,
+       add_required_constraint, add_end_constraint, add_type_constraint,
+       add_listtype_constraint, add_req_type_constraint,
+       add_req_listtype_constraint, make_repeated_list_of_lists,
+       make_repeated_list, check_params, nocheck_params, parse_upto,
+       format_parse, format_free, format_get_number_of_directives,
+       format_check, print_element, print_list, format_print): Likewise.
+       * format-pascal.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-php.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-python.c (named_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-tcl.c (numbered_arg_compare, format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * format-ycp.c (format_parse, format_free,
+       format_get_number_of_directives, format_check, format_print): Likewise.
+       * gettext.c (main, usage, expand_escape): Likewise.
+       * hostname.c (main, usage): Likewise.
+       * message.h (possible_format_p, message_alloc, message_free,
+       message_comment_append, message_comment_dot_append,
+       message_comment_filepos, message_copy, message_list_alloc,
+       message_list_free, message_list_append, message_list_prepend,
+       message_list_delete_nth, message_predicate_ty,
+       message_list_remove_if_not, message_list_search,
+       message_list_search_fuzzy, message_list_list_alloc,
+       message_list_list_free, message_list_list_append,
+       message_list_list_append_list, message_list_list_search,
+       message_list_list_search_fuzzy, msgdomain_alloc, msgdomain_free,
+       msgdomain_list_alloc, msgdomain_list_free, msgdomain_list_append,
+       msgdomain_list_append_list, msgdomain_list_sublist,
+       msgdomain_list_search, msgdomain_list_search_fuzzy): Likewise.
+       * message.c (possible_format_p, message_alloc, message_free,
+       message_comment_append, message_comment_dot_append,
+       message_comment_filepos, message_copy, message_list_alloc,
+       message_list_free, message_list_append, message_list_prepend,
+       message_list_delete_nth, message_list_remove_if_not,
+       message_list_search, message_list_search_fuzzy_inner,
+       message_list_search_fuzzy, message_list_list_free,
+       message_list_list_append, message_list_list_append_list,
+       message_list_list_search, message_list_list_search_fuzzy,
+       msgdomain_alloc, msgdomain_free, msgdomain_list_alloc,
+       msgdomain_list_free, msgdomain_list_append,
+       msgdomain_list_append_list, msgdomain_list_sublist,
+       msgdomain_list_search, msgdomain_list_search_fuzzy): Likewise.
+       * msgattrib.c (main, usage, is_message_selected, process_message_list,
+       process_msgdomain_list): Likewise.
+       * msgcat.c (main, usage): Likewise.
+       * msgcmp.c (main, usage, is_message_selected, remove_obsoletes,
+       match_domain, compare): Likewise.
+       * msgcomm.c (main, usage): Likewise.
+       * msgconv.c (locale_charset, main, usage): Likewise.
+       * msgen.c (main, usage): Likewise.
+       * msgexec.c (main, usage, nonintr_close, process_string,
+       process_message, process_message_list, process_msgdomain_list):
+       Likewise.
+       * msgfilter.c (main, usage, nonintr_close, nonintr_read, nonintr_write,
+       nonintr_select, process_string, process_message, process_message_list,
+       process_msgdomain_list): Likewise.
+       * msgfmt.c (main, usage, add_mo_suffix, new_domain, is_nonobsolete,
+       sigfpe_handler, check_plural_eval, check_plural, check_pair,
+       check_header_entry, format_constructor, format_debrief,
+       format_directive_domain, format_directive_message,
+       format_comment_special, read_po_file): Likewise.
+       * msggrep.c (main, no_pass, usage, filename_list_match, nonintr_close,
+       is_string_selected, is_message_selected, process_message_list,
+       process_msgdomain_list): Likewise.
+       * msginit.c (locale_charset, _nl_locale_name, _nl_expand_alias, main,
+       usage, catalogname_for_locale, language_of_locale, po_revision_date,
+       content_type, fields, get_field, put_field, subst_string,
+       subst_string_list, fill_header): Likewise.
+       * msgl-ascii.h (is_ascii_string, is_ascii_string_list,
+       is_ascii_message, is_ascii_message_list): Likewise.
+       * msgl-ascii.c (is_ascii_string, is_ascii_string_list,
+       is_ascii_message, is_ascii_message_list): Likewise.
+       * msgl-cat.h (catenate_msgdomain_list): Likewise.
+       * msgl-cat.c (is_message_selected, is_message_needed,
+       is_message_first_needed, catenate_msgdomain_list): Likewise.
+       * msgl-charset.h (compare_po_locale_charsets): Likewise.
+       * msgl-charset.c (locale_charset, compare_po_locale_charsets):
+       Likewise.
+       * msgl-english.h (msgdomain_list_english): Likewise.
+       * msgl-english.c (msgdomain_list_english): Likewise.
+       * msgl-equal.h (string_list_equal, message_equal, message_list_equal,
+       msgdomain_list_equal): Likewise.
+       * msgl-equal.c (msgstr_equal, msgstr_equal_ignoring_potcdate,
+       pos_equal, string_list_equal, message_equal, message_list_equal,
+       msgdomain_equal, msgdomain_list_equal): Likewise.
+       * msgl-iconv.h (convert_string, iconv_message_list,
+       iconv_msgdomain_list): Likewise.
+       * msgl-iconv.c (iconv_string, convert_string, convert_string_list,
+       convert_msgid, convert_msgstr, iconv_message_list,
+       iconv_msgdomain_list): Likewise.
+       * msgmerge.c (main, usage, compendium, msgfmt_check_pair_fails,
+       message_merge, match_domain, merge): Likewise.
+       * msgunfmt.c (main, usage): Likewise.
+       * msguniq.c (main, usage): Likewise.
+       * ngettext.c (main, usage, expand_escape): Likewise.
+       * open-po.h (open_po_file): Likewise.
+       * open-po.c (open_po_file): Likewise.
+       * po-charset.h (po_charset_canonicalize, po_charset_ascii_compatible,
+       po_is_charset_weird, po_is_charset_weird_cjk, po_lex_charset_init,
+       po_lex_charset_set, po_lex_charset_close): Likewise.
+       * po-charset.c (po_charset_canonicalize, po_charset_ascii_compatible,
+       po_is_charset_weird, po_is_charset_weird_cjk, po_lex_charset_set):
+       Likewise.
+       * po-gram.h (po_gram_parse): Likewise.
+       * po-hash-gen.y (yyerror, yylex, po_hash): Likewise.
+       * po-hash.h (po_hash): Likewise.
+       * po-lex.h (lex_start, lex_end, lex_open, lex_close, po_gram_lex,
+       po_lex_pass_comments, po_lex_pass_obsolete_entries, po_gram_error,
+       po_gram_error_at_line): Likewise.
+       * po-lex.c: Include <stdarg.h> instead of libstdarg.h.
+       (ALERT_CHAR): Remove macro.
+       (po_gram_error, po_gram_error_at_line): Use ANSI C function
+       declarations. Use va_start instead of VA_START.
+       (memcpy_small, mb_iseof, mb_ptr, mb_len, mb_iseq, mb_isnul, mb_cmp,
+       mb_equal, mb_isascii, mb_width, mb_putc, mb_setascii, mb_copy,
+       mbfile_init, mbfile_getc, mbfile_ungetc, lex_start, lex_open,
+       lex_getc, lex_ungetc, keyword_p, po_lex_pass_comments,
+       po_lex_pass_obsolete_entries): Use ANSI C function declarations.
+       * po-time.h (po_strftime): Likewise.
+       * po-time.c (difftm, po_strftime): Likewise.
+       * po.h (struct po_method_ty, po_alloc, po_scan, po_scan_file, po_free,
+       po_callback_domain, po_callback_message, po_callback_comment,
+       po_callback_comment_dot, po_callback_comment_filepos,
+       po_parse_comment_special): Likewise.
+       * po.c (po_alloc, po_free, po_parse_brief, po_parse_debrief, po_scan,
+       po_scan_file, po_directive_domain, po_callback_domain,
+       po_directive_message, po_callback_message, po_comment_special,
+       po_comment, po_comment_dot, po_callback_comment, po_comment_filepos,
+       po_callback_comment_filepos, po_parse_comment_special): Likewise.
+       * read-java.h (msgdomain_read_java): Likewise.
+       * read-java.c (execute_and_read_po_output, msgdomain_read_java):
+       Likewise.
+       * read-mo.h (read_mo_file): Likewise.
+       * read-mo.c (read_binary_mo_file, get_uint32, get_string,
+       get_sysdep_string, read_mo_file): Likewise.
+       * read-po.h (read_po, read_po_file): Likewise.
+       * read-po.c (readall_constructor, readall_destructor,
+       readall_directive_domain, readall_directive_message,
+       readall_parse_brief, readall_comment, readall_comment_dot,
+       readall_comment_special, readall_comment_filepos, read_po,
+       read_po_file): Likewise.
+       * read-tcl.h (msgdomain_read_tcl): Likewise.
+       * read-tcl.c (msgdomain_read_tcl): Likewise.
+       * str-list.h (string_list_init, string_list_alloc, string_list_append,
+       string_list_append_unique, string_list_destroy, string_list_free,
+       string_list_concat, string_list_concat_destroy, string_list_join,
+       string_list_member): Likewise.
+       * str-list.c (string_list_init, string_list_append,
+       string_list_append_unique, string_list_destroy, string_list_free,
+       string_list_concat, string_list_concat_destroy, string_list_join,
+       string_list_member): Likewise.
+       * urlget.c (main, usage, cat_file, execute_it, fetch): Likewise.
+       * write-java.h (msgdomain_write_java): Likewise.
+       * write-java.c (check_resource_name, string_hashcode,
+       compute_hashsize, compare_index, compute_table_items,
+       write_java_string, write_java_msgstr, write_lookup_code,
+       is_expression_boolean, write_java_expression, write_java_code,
+       cleanup, msgdomain_write_java): Likewise.
+       * write-mo.h (msgdomain_write_mo): Likewise.
+       * write-mo.c (compare_id, write_table, msgdomain_write_mo): Likewise.
+       * write-po.h (message_page_width_set, message_page_width_ignore,
+       message_print_style_indent, message_print_style_uniforum,
+       message_print_style_escape, msgdomain_list_print,
+       msgdomain_list_sort_by_msgid, msgdomain_list_sort_by_filepos):
+       Likewise.
+       * write-po.c (message_page_width_set, message_print_style_escape,
+       make_format_description_string, significant_format_p,
+       has_significant_format_p, make_c_width_description_string,
+       memcpy_small, wrap, print_blank_line, message_print,
+       message_print_obsolete, msgdomain_list_print, cmp_by_msgid,
+       msgdomain_list_sort_by_msgid, cmp_filepos,
+       msgdomain_list_sort_filepos, cmp_by_filepos,
+       msgdomain_list_sort_by_filepos): Likewise.
+       * write-tcl.h (msgdomain_write_tcl): Likewise.
+       * write-tcl.c (write_tcl_string, write_msg, msgdomain_write_tcl):
+       Likewise.
+       * x-awk.h (extract_awk, x_awk_keyword, x_awk_extract_all): Likewise.
+       * x-awk.c (ALERT_CHAR): Remove macro.
+       (x_awk_keyword, phase1_ungetc, phase2_ungetc, free_token, x_awk_lex,
+       extract_parenthesized, extract_awk): Use ANSI C function declarations.
+       * x-c.h (extract_c, x_c_extract_all, x_c_keyword, x_c_any_keywords,
+       x_c_trigraphs): Likewise.
+       * x-c.c (ALERT_CHAR): Remove macro.
+       (x_c_keyword, phase1_ungetc, phase2_ungetc, phase3_ungetc,
+       comment_add, comment_line_end, phase4_ungetc, phase7_ungetc,
+       free_token, phase5_get, phaseX_get, phase6_get, phase6_unget,
+       is_inttypes_macro, phase8a_get, phase8a_unget, phase8_get, x_c_lex,
+       extract_parenthesized, extract_c): Use ANSI C function declarations.
+       * x-elisp.h (extract_elisp, x_elisp_extract_all, x_elisp_keyword):
+       Likewise.
+       * x-elisp.c (ALERT_CHAR): Remove macro.
+       (x_elisp_keyword, do_ungetc, init_token, free_token, grow_token,
+       is_integer, is_float, read_token, comment_add, comment_line_end,
+       free_object, string_of_object, do_getc_escaped, read_object,
+       extract_elisp): Use ANSI C function declarations.
+       * x-glade.h (extract_glade, x_glade_extract_all, x_glade_keyword):
+       Likewise.
+       * x-glade.c (x_glade_keyword, XML_StartElementHandler,
+       XML_EndElementHandler, XML_CharacterDataHandler, XML_CommentHandler,
+       p_XML_ParserCreate, p_XML_SetElementHandler,
+       p_XML_SetCharacterDataHandler, p_XML_SetCommentHandler, p_XML_Parse,
+       p_XML_GetErrorCode, p_XML_GetCurrentLineNumber,
+       p_XML_GetCurrentColumnNumber, p_XML_ParserFree, p_XML_ErrorString,
+       ensure_stack_size, start_element_handler, end_element_handler,
+       character_data_handler, comment_handler, do_extract_glade,
+       extract_glade): Likewise.
+       * x-java.h (extract_java, x_java_keyword, x_java_extract_all):
+       Likewise.
+       * x-java.l (append_char_buf, get_string, destroy_charbuf,
+       update_line_no, strip_ending_spaces, append_strings, isplus, isdot,
+       translate_esc, object_list_destroy, get_num_objects, get_object,
+       add_object, alloc_keyword, tailcmp, do_compare, is_keyword,
+       x_java_keyword, extract_java): Likewise.
+       * x-librep.h (extract_librep, x_librep_extract_all, x_librep_keyword):
+       Likewise.
+       * x-librep.c (ALERT_CHAR): Remove macro.
+       (x_librep_keyword, do_ungetc, init_token, free_token, grow_token,
+       read_token, comment_add, comment_line_end, free_object,
+       string_of_object, do_getc_escaped, read_object, extract_librep): Use
+       ANSI C function declarations.
+       * x-lisp.h (extract_lisp, x_lisp_extract_all, x_lisp_keyword):
+       Likewise.
+       * x-lisp.c (x_lisp_keyword, do_ungetc, syntax_code_of,
+       read_char_syntax, attribute_of, init_token, free_token, grow_token,
+       read_token, has_a_dot, all_a_number, a_letter_to_digit, has_a_digit,
+       has_adjacent_letters, is_potential_number, is_number, upcase_token,
+       downcase_token, case_convert_token, comment_add, comment_line_end,
+       free_object, string_of_object, read_object, extract_lisp): Likewise.
+       * x-php.h (extract_php, x_php_keyword, x_php_extract_all): Likewise.
+       * x-php.c (x_php_keyword, phase1_ungetc, phase2_ungetc, comment_add,
+       comment_line_end, phase3_ungetc, free_token, x_php_lex,
+       extract_parenthesized, extract_php): Likewise.
+       * x-po.h (extract_po): Likewise.
+       * x-po.c (extract_constructor, extract_directive_domain,
+       extract_directive_message, extract_parse_brief, extract_comment,
+       extract_comment_dot, extract_comment_filepos, extract_comment_special,
+       extract_po): Likewise.
+       * x-python.h (extract_python, x_python_keyword, x_python_extract_all):
+       Likewise.
+       * x-python.c (ALERT_CHAR): Remove macro.
+       (x_python_keyword, phase1_ungetc, comment_add, phase2_ungetc,
+       phase7_getuc, phase5_get, phase5_unget, x_python_lex,
+       extract_parenthesized, extract_python): Use ANSI C function
+       declarations.
+       * x-rst.h (extract_rst): Likewise.
+       * x-rst.c (extract_rst): Likewise.
+       * x-smalltalk.h (extract_smalltalk): Likewise.
+       * x-smalltalk.c (phase1_ungetc, comment_add, phase2_get, phase2_unget,
+       x_smalltalk_lex, extract_smalltalk): Likewise.
+       * x-tcl.h (extract_tcl, x_tcl_extract_all, x_tcl_keyword): Likewise.
+       * x-tcl.c (ALERT_CHAR): Remove macro.
+       (x_tcl_keyword, do_ungetc, phase1_ungetc, phase2_pop, phase2_ungetc,
+       init_token, free_token, grow_token, comment_add, free_word,
+       string_of_word, accumulate_word, read_word, read_command,
+       read_command_list, extract_tcl): Use ANSI C function declarations.
+       * x-ycp.h (extract_ycp): Likewise.
+       * x-ycp.c (phase1_ungetc, phase2_ungetc, x_ycp_lex, extract_ycp):
+       Likewise.
+       * xgettext.h (split_keywordspec, xgettext_comment_add,
+       xgettext_comment, xgettext_comment_reset, remember_a_message,
+       remember_a_message_plural): Likewise.
+       * xgettext.c (extractor_func, main, usage, exclude_directive_domain,
+       exclude_directive_message, read_exclusion_file, split_keywordspec,
+       xgettext_comment_add, xgettext_comment, xgettext_open,
+       extract_from_file, remember_a_message, remember_a_message_plural,
+       finalize_header, language_to_extractor, extension_to_language):
+       Likewise.
+
 2002-11-05  Bruno Haible  <bruno@clisp.org>
 
        Allow non-ASCII msgids in POT files.
index d3bfde903deea82ea24d16339d13df7d32da60fd..4b8c374a1d5480b1ac3992099c7f49f04019ba84 100644 (file)
@@ -35,8 +35,7 @@ static string_list_ty *directory /* = NULL */;
 
 /* Append a directory to the end of the list of directories.  */
 void
-dir_list_append (s)
-     const char *s;
+dir_list_append (const char *s)
 {
   if (directory == NULL)
     directory = string_list_alloc ();
@@ -46,8 +45,7 @@ dir_list_append (s)
 
 /* Return the nth directory, or NULL of n is out of range.  */
 const char *
-dir_list_nth (n)
-     int n;
+dir_list_nth (int n)
 {
   /* The default value of the list consists of the single directory ".".  */
   if (directory == NULL)
@@ -73,8 +71,7 @@ dir_list_save_reset ()
 
 /* Restore a previously saved list of directories.  */
 void
-dir_list_restore (saved_value)
-     void *saved_value;
+dir_list_restore (void *saved_value)
 {
   /* Don't free the contained strings, because they may have been returned
      by dir_list_nth and may still be in use.  */
index f712189ceb941fe0491482783955e10d90e290ec..dc8ad21c612287e1a1e6d301e23eb9d336c9116e 100644 (file)
    list consists of the single directory ".".  */
 
 /* Append a directory to the end of the list of directories.  */
-extern void dir_list_append PARAMS ((const char *directory));
+extern void dir_list_append (const char *directory);
 
 /* Return the nth directory, or NULL of n is out of range.  */
-extern const char *dir_list_nth PARAMS ((int n));
+extern const char *dir_list_nth (int n);
 
 /* Return the current list of directories, for later use with dir_list_restore.
    Reset the list to empty.  */
-extern void *dir_list_save_reset PARAMS ((void));
+extern void *dir_list_save_reset (void);
 
 /* Restore a previously saved list of directories.  */
-extern void dir_list_restore PARAMS ((void *saved_value));
+extern void dir_list_restore (void *saved_value);
 
 #endif /* _DIR_LIST_H */
index 2c9a007c18efea7ce3878796e3c33222fa87f3bb..d349769b723051ba710425faae6beb75376a7dd0 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading file lists.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -39,8 +39,7 @@
 
 /* Read list of filenames from a file.  */
 string_list_ty *
-read_names_from_file (file_name)
-     const char *file_name;
+read_names_from_file (const char *file_name)
 {
   size_t line_len = 0;
   char *line_buf = NULL;
index 3326c7fae044cb9179eb818498623173b87e7a4e..9d34d0f4a87747017b31575eb0abf1ec0f473a5c 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading file lists.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,6 @@
 /* Read list of filenames from a file.
    One filename per line.  Lines starting with # and whitespace lines are
    ignored.  Trailing whitespace is removed.  */
-extern string_list_ty *read_names_from_file PARAMS ((const char *file_name));
+extern string_list_ty *read_names_from_file (const char *file_name);
 
 #endif /* _FILE_LIST_H */
index add968fd8dc7b274debccb1e877f9e98ce79f30b..0c8bbd51cfbff8296ef5fc06f4f077db2b941232 100644 (file)
@@ -83,22 +83,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -107,8 +93,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   unsigned int unnumbered_arg_count;
@@ -415,8 +400,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -426,8 +410,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -435,13 +418,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -546,8 +524,7 @@ struct formatstring_parser formatstring_awk =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index 2101874d272ee626ca5533223b092452545a6413..ad9b3e616ed050ee75b7aae42e1582202cc5c0a1 100644 (file)
@@ -160,22 +160,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -184,8 +170,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   unsigned int numbered_arg_count;
@@ -713,8 +698,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -726,8 +710,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -735,13 +718,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -792,10 +770,8 @@ struct formatstring_parser formatstring_c =
 
 
 void
-get_c99_format_directives (string, intervalsp, lengthp)
-     const char *string;
-     struct interval **intervalsp;
-     size_t *lengthp;
+get_c99_format_directives (const char *string,
+                          struct interval **intervalsp, size_t *lengthp)
 {
   struct spec *descr = (struct spec *) format_parse (string);
 
@@ -831,8 +807,7 @@ get_c99_format_directives (string, intervalsp, lengthp)
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int i;
index fa366eed2d62063898f3ddb3ab2dd5b679620438..b121a4c0e9fc22870021bda6965c3c034db1d33d 100644 (file)
@@ -84,22 +84,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -108,8 +94,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -292,8 +277,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -303,8 +287,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -312,13 +295,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -423,8 +401,7 @@ struct formatstring_parser formatstring_elisp =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index 6b49cd574cbb49bee4fa7e5179cd5db81ba89f8d..3665f665c1e9aedf82f83a6daa4d8ec97b70e5b6 100644 (file)
@@ -1,5 +1,5 @@
 /* Java format strings.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -126,22 +126,10 @@ struct spec
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static bool message_format_parse PARAMS ((const char *format,
-                                         struct spec *spec));
-static bool date_format_parse PARAMS ((const char *format));
-static bool number_format_parse PARAMS ((const char *format));
-static bool choice_format_parse PARAMS ((const char *format,
-                                        struct spec *spec));
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
+/* Forward declaration of local functions.  */
+static bool date_format_parse (const char *format);
+static bool number_format_parse (const char *format);
+static bool choice_format_parse (const char *format, struct spec *spec);
 
 
 /* Quote handling:
@@ -159,9 +147,7 @@ static bool format_check PARAMS ((const lex_pos_ty *pos,
 /* Return true if a format is a valid messageFormatPattern.
    Extracts argument type information into spec.  */
 static bool
-message_format_parse (format, spec)
-     const char *format;
-     struct spec *spec;
+message_format_parse (const char *format, struct spec *spec)
 {
   bool quoting = false;
 
@@ -286,8 +272,7 @@ message_format_parse (format, spec)
 
 /* Return true if a format is a valid dateFormatPattern.  */
 static bool
-date_format_parse (format)
-     const char *format;
+date_format_parse (const char *format)
 {
   /* Any string is valid.  Single-quote starts a quoted section, to be
      terminated at the next single-quote or string end.  Double single-quote
@@ -299,8 +284,7 @@ date_format_parse (format)
 
 /* Return true if a format is a valid numberFormatPattern.  */
 static bool
-number_format_parse (format)
-     const char *format;
+number_format_parse (const char *format)
 {
   /* Pattern Syntax:
        pattern     := pos_pattern{';' neg_pattern}
@@ -443,9 +427,7 @@ number_format_parse (format)
 /* Return true if a format is a valid choiceFormatPattern.
    Extracts argument type information into spec.  */
 static bool
-choice_format_parse (format, spec)
-     const char *format;
-     struct spec *spec;
+choice_format_parse (const char *format, struct spec *spec)
 {
   /* Pattern syntax:
        pattern   := | choice | choice '|' pattern
@@ -525,9 +507,7 @@ choice_format_parse (format, spec)
 }
 
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -536,8 +516,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -603,8 +582,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -614,8 +592,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -623,13 +600,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -734,8 +706,7 @@ struct formatstring_parser formatstring_java =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index 97d2c9572fc1ea6f06256bd21746f836383e3d94..71cad3fd6366dca23f8ccd9afefca41f9d26a591 100644 (file)
@@ -81,22 +81,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -105,8 +91,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -256,8 +241,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -267,8 +251,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -276,13 +259,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -387,8 +365,7 @@ struct formatstring_parser formatstring_librep =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index a09eefbd0b8501b2020e51266a2a83689bee05fb..745c95dc70847f32280c6dad436b65f582c48e17 100644 (file)
@@ -1,5 +1,5 @@
 /* Lisp format strings.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -126,121 +126,28 @@ struct param
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
+/* Forward declaration of local functions.  */
 #define union make_union
-static void verify_element PARAMS ((const struct format_arg * e));
-static void verify_list PARAMS ((const struct format_arg_list *list));
-static inline void free_element PARAMS ((struct format_arg *element));
-static void free_list PARAMS ((struct format_arg_list *list));
-static inline void copy_element PARAMS ((struct format_arg *newelement,
-                                        const struct format_arg *oldelement));
-static struct format_arg_list * copy_list
-                                PARAMS ((const struct format_arg_list *list));
-static bool equal_element PARAMS ((const struct format_arg * e1,
-                                  const struct format_arg * e2));
-static bool equal_list PARAMS ((const struct format_arg_list *list1,
-                               const struct format_arg_list *list2));
-static inline void ensure_initial_alloc PARAMS ((struct format_arg_list *list,
-                                                unsigned int newcount));
-static inline void grow_initial_alloc PARAMS ((struct format_arg_list *list));
-static inline void ensure_repeated_alloc PARAMS ((struct format_arg_list *list,
-                                                 unsigned int newcount));
-static inline void grow_repeated_alloc PARAMS ((struct format_arg_list *list));
-static void normalize_outermost_list PARAMS ((struct format_arg_list *list));
-static void normalize_list PARAMS ((struct format_arg_list *list));
-static struct format_arg_list * make_unconstrained_list PARAMS ((void));
-static struct format_arg_list * make_empty_list PARAMS ((void));
-static bool is_empty_list PARAMS ((const struct format_arg_list *list));
-static void unfold_loop PARAMS ((struct format_arg_list *list, unsigned int m));
-static void rotate_loop PARAMS ((struct format_arg_list *list, unsigned int m));
-static unsigned int initial_splitelement PARAMS ((struct format_arg_list *list,
-                                                 unsigned int n));
-static unsigned int initial_unshare PARAMS ((struct format_arg_list *list,
-                                            unsigned int n));
-static void shift_list PARAMS ((struct format_arg_list *list, unsigned int n));
-static bool make_intersected_element PARAMS ((struct format_arg *re,
-                                             const struct format_arg * e1,
-                                             const struct format_arg * e2));
-static void append_repeated_to_initial PARAMS ((struct format_arg_list *list));
-static struct format_arg_list * backtrack_in_initial
-                                      PARAMS ((struct format_arg_list *list));
+static void verify_list (const struct format_arg_list *list);
+static void free_list (struct format_arg_list *list);
+static struct format_arg_list * copy_list (const struct format_arg_list *list);
+static bool equal_list (const struct format_arg_list *list1,
+                       const struct format_arg_list *list2);
 static struct format_arg_list * make_intersected_list
-                                     PARAMS ((struct format_arg_list *list1,
-                                              struct format_arg_list *list2));
+                                              (struct format_arg_list *list1,
+                                               struct format_arg_list *list2);
 static struct format_arg_list * make_intersection_with_empty_list
-                                     PARAMS ((struct format_arg_list *list));
-#ifdef unused
-static struct format_arg_list * intersection
-                                     PARAMS ((struct format_arg_list *list1,
-                                              struct format_arg_list *list2));
-#endif
-static void make_union_element PARAMS ((struct format_arg *re,
-                                       const struct format_arg * e1,
-                                       const struct format_arg * e2));
+                                               (struct format_arg_list *list);
 static struct format_arg_list * make_union_list
-                                     PARAMS ((struct format_arg_list *list1,
-                                              struct format_arg_list *list2));
-static struct format_arg_list * make_union_with_empty_list
-                                      PARAMS ((struct format_arg_list *list));
-static struct format_arg_list * union PARAMS ((struct format_arg_list *list1,
-                                              struct format_arg_list *list2));
-static bool is_required PARAMS ((const struct format_arg_list *list,
-                                unsigned int n));
-static struct format_arg_list * add_required_constraint
-                                        PARAMS ((struct format_arg_list *list,
-                                                 unsigned int n));
-static struct format_arg_list * add_end_constraint
-                      PARAMS ((struct format_arg_list *list, unsigned int n));
-static struct format_arg_list * add_type_constraint
-                        PARAMS ((struct format_arg_list *list, unsigned int n,
-                                 enum format_arg_type type));
-static struct format_arg_list * add_listtype_constraint
-                        PARAMS ((struct format_arg_list *list, unsigned int n,
-                                 enum format_arg_type type,
-                                 struct format_arg_list *sublist));
-static void add_req_type_constraint
-                        PARAMS ((struct format_arg_list **listp,
-                                 unsigned int position,
-                                 enum format_arg_type type));
-static void add_req_listtype_constraint
-                        PARAMS ((struct format_arg_list **listp,
-                                 unsigned int position,
-                                 enum format_arg_type type,
-                                 struct format_arg_list *sublist));
-static struct format_arg_list * make_repeated_list_of_lists
-                                   PARAMS ((struct format_arg_list *sublist));
-static struct format_arg_list * make_repeated_list
-                                     PARAMS ((struct format_arg_list *sublist,
-                                              unsigned int period));
-static bool check_params PARAMS ((struct format_arg_list **listp,
-                                 unsigned int paramcount,
-                                 struct param *params, unsigned int t_count,
-                                 const enum format_arg_type *t_types));
-static bool nocheck_params PARAMS ((struct format_arg_list **listp,
-                                   unsigned int paramcount,
-                                   struct param *params));
-static bool parse_upto PARAMS ((const char **formatp, int *positionp,
-                               struct format_arg_list **listp,
-                               struct format_arg_list **escapep,
-                               int *separatorp, struct spec *spec,
-                               /*promote: char*/ int terminator,
-                               bool separator));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
+                                              (struct format_arg_list *list1,
+                                               struct format_arg_list *list2);
 
 
 /* ======================= Verify a format_arg_list ======================= */
 
 /* Verify some invariants.  */
 static void
-verify_element (e)
-     const struct format_arg * e;
+verify_element (const struct format_arg * e)
 {
   ASSERT (e->repcount > 0);
   if (e->type == FAT_LIST)
@@ -250,8 +157,7 @@ verify_element (e)
 /* Verify some invariants.  */
 /* Memory effects: none.  */
 static void
-verify_list (list)
-     const struct format_arg_list *list;
+verify_list (const struct format_arg_list *list)
 {
   unsigned int i;
   unsigned int total_repcount;
@@ -282,8 +188,7 @@ verify_list (list)
 
 /* Free the data belonging to an argument list element.  */
 static inline void
-free_element (element)
-     struct format_arg *element;
+free_element (struct format_arg *element)
 {
   if (element->type == FAT_LIST)
     free_list (element->list);
@@ -292,8 +197,7 @@ free_element (element)
 /* Free an argument list.  */
 /* Memory effects: Frees list.  */
 static void
-free_list (list)
-     struct format_arg_list *list;
+free_list (struct format_arg_list *list)
 {
   unsigned int i;
 
@@ -313,9 +217,8 @@ free_list (list)
 
 /* Copy the data belonging to an argument list element.  */
 static inline void
-copy_element (newelement, oldelement)
-     struct format_arg *newelement;
-     const struct format_arg *oldelement;
+copy_element (struct format_arg *newelement,
+             const struct format_arg *oldelement)
 {
   newelement->repcount = oldelement->repcount;
   newelement->presence = oldelement->presence;
@@ -327,8 +230,7 @@ copy_element (newelement, oldelement)
 /* Copy an argument list.  */
 /* Memory effects: Freshly allocated result.  */
 static struct format_arg_list *
-copy_list (list)
-     const struct format_arg_list *list;
+copy_list (const struct format_arg_list *list)
 {
   struct format_arg_list *newlist;
   unsigned int length;
@@ -388,9 +290,7 @@ copy_list (list)
 /* Tests whether two normalized argument constraints are equivalent,
    ignoring the repcount.  */
 static bool
-equal_element (e1, e2)
-     const struct format_arg * e1;
-     const struct format_arg * e2;
+equal_element (const struct format_arg * e1, const struct format_arg * e2)
 {
   return (e1->presence == e2->presence
          && e1->type == e2->type
@@ -400,9 +300,8 @@ equal_element (e1, e2)
 /* Tests whether two normalized argument list constraints are equivalent.  */
 /* Memory effects: none.  */
 static bool
-equal_list (list1, list2)
-     const struct format_arg_list *list1;
-     const struct format_arg_list *list2;
+equal_list (const struct format_arg_list *list1,
+           const struct format_arg_list *list2)
 {
   unsigned int n, i;
 
@@ -441,9 +340,7 @@ equal_list (list1, list2)
 
 /* Ensure list->initial.allocated >= newcount.  */
 static inline void
-ensure_initial_alloc (list, newcount)
-     struct format_arg_list *list;
-     unsigned int newcount;
+ensure_initial_alloc (struct format_arg_list *list, unsigned int newcount)
 {
   if (newcount > list->initial.allocated)
     {
@@ -458,8 +355,7 @@ ensure_initial_alloc (list, newcount)
 
 /* Ensure list->initial.allocated > list->initial.count.  */
 static inline void
-grow_initial_alloc (list)
-     struct format_arg_list *list;
+grow_initial_alloc (struct format_arg_list *list)
 {
   if (list->initial.count >= list->initial.allocated)
     {
@@ -474,9 +370,7 @@ grow_initial_alloc (list)
 
 /* Ensure list->repeated.allocated >= newcount.  */
 static inline void
-ensure_repeated_alloc (list, newcount)
-     struct format_arg_list *list;
-     unsigned int newcount;
+ensure_repeated_alloc (struct format_arg_list *list, unsigned int newcount)
 {
   if (newcount > list->repeated.allocated)
     {
@@ -491,8 +385,7 @@ ensure_repeated_alloc (list, newcount)
 
 /* Ensure list->repeated.allocated > list->repeated.count.  */
 static inline void
-grow_repeated_alloc (list)
-     struct format_arg_list *list;
+grow_repeated_alloc (struct format_arg_list *list)
 {
   if (list->repeated.count >= list->repeated.allocated)
     {
@@ -512,8 +405,7 @@ grow_repeated_alloc (list)
    normalized.  */
 /* Memory effects: Destructively modifies list.  */
 static void
-normalize_outermost_list (list)
-     struct format_arg_list *list;
+normalize_outermost_list (struct format_arg_list *list)
 {
   unsigned int n, i, j;
 
@@ -669,8 +561,7 @@ normalize_outermost_list (list)
 /* Normalize an argument list constraint.  */
 /* Memory effects: Destructively modifies list.  */
 static void
-normalize_list (list)
-     struct format_arg_list *list;
+normalize_list (struct format_arg_list *list)
 {
   unsigned int n, i;
 
@@ -752,8 +643,7 @@ make_empty_list ()
 /* Test for an empty list.  */
 /* Memory effects: none.  */
 static bool
-is_empty_list (list)
-     const struct format_arg_list *list;
+is_empty_list (const struct format_arg_list *list)
 {
   return (list->initial.count == 0 && list->repeated.count == 0);
 }
@@ -765,9 +655,7 @@ is_empty_list (list)
    Assumes list->repeated.count > 0.  */
 /* Memory effects: list is destructively modified.  */
 static void
-unfold_loop (list, m)
-     struct format_arg_list *list;
-     unsigned int m;
+unfold_loop (struct format_arg_list *list, unsigned int m)
 {
   unsigned int i, j, k;
 
@@ -788,9 +676,7 @@ unfold_loop (list, m)
    Assumes list->repeated.count > 0.  */
 /* Memory effects: list is destructively modified.  */
 static void
-rotate_loop (list, m)
-     struct format_arg_list *list;
-     unsigned int m;
+rotate_loop (struct format_arg_list *list, unsigned int m)
 {
   if (m == list->initial.length)
     return;
@@ -899,9 +785,7 @@ rotate_loop (list, m)
    different adjacent elements.  */
 /* Memory effects: list is destructively modified.  */
 static unsigned int
-initial_splitelement (list, n)
-     struct format_arg_list *list;
-     unsigned int n;
+initial_splitelement (struct format_arg_list *list, unsigned int n)
 {
   unsigned int s;
   unsigned int t;
@@ -949,9 +833,7 @@ initial_splitelement (list, n)
 /* Ensure index n in the initial segment is not shared.  Return its index.  */
 /* Memory effects: list is destructively modified.  */
 static unsigned int
-initial_unshare (list, n)
-     struct format_arg_list *list;
-     unsigned int n;
+initial_unshare (struct format_arg_list *list, unsigned int n)
 {
   /* This does the same side effects as
        initial_splitelement (list, n);
@@ -1033,9 +915,7 @@ initial_unshare (list, n)
 /* Add n unconstrained elements at the front of the list.  */
 /* Memory effects: list is destructively modified.  */
 static void
-shift_list (list, n)
-     struct format_arg_list *list;
-     unsigned int n;
+shift_list (struct format_arg_list *list, unsigned int n)
 {
   VERIFY_LIST (list);
 
@@ -1066,10 +946,9 @@ shift_list (list, n)
    two constraints give a contradiction.  */
 /* Memory effects: Freshly allocated element's sublist.  */
 static bool
-make_intersected_element (re, e1, e2)
-     struct format_arg *re;
-     const struct format_arg * e1;
-     const struct format_arg * e2;
+make_intersected_element (struct format_arg *re,
+                         const struct format_arg * e1,
+                         const struct format_arg * e2)
 {
   /* Intersect the cdr types.  */
   if (e1->presence == FCT_REQUIRED || e2->presence == FCT_REQUIRED)
@@ -1168,8 +1047,7 @@ make_intersected_element (re, e1, e2)
 /* Append list->repeated to list->initial, and clear list->repeated.  */
 /* Memory effects: list is destructively modified.  */
 static void
-append_repeated_to_initial (list)
-     struct format_arg_list *list;
+append_repeated_to_initial (struct format_arg_list *list)
 {
   if (list->repeated.count > 0)
     {
@@ -1198,8 +1076,7 @@ append_repeated_to_initial (list)
 /* Memory effects: list is destructively modified.  If NULL is returned,
    list is freed.  */
 static struct format_arg_list *
-backtrack_in_initial (list)
-     struct format_arg_list *list;
+backtrack_in_initial (struct format_arg_list *list)
 {
   ASSERT (list->repeated.count == 0);
 
@@ -1239,9 +1116,8 @@ backtrack_in_initial (list)
 /* Memory effects: list1 and list2 are freed.  The result, if non-NULL, is
    freshly allocated.  */
 static struct format_arg_list *
-make_intersected_list (list1, list2)
-     struct format_arg_list *list1;
-     struct format_arg_list *list2;
+make_intersected_list (struct format_arg_list *list1,
+                      struct format_arg_list *list2)
 {
   struct format_arg_list *result;
 
@@ -1449,8 +1325,7 @@ make_intersected_list (list1, list2)
    Return NULL if the intersection is empty.  */
 /* Memory effects: The result, if non-NULL, is freshly allocated.  */
 static struct format_arg_list *
-make_intersection_with_empty_list (list)
-     struct format_arg_list *list;
+make_intersection_with_empty_list (struct format_arg_list *list)
 {
 #if 0 /* equivalent but slower */
   return make_intersected_list (copy_list (list), make_empty_list ());
@@ -1472,9 +1347,7 @@ make_intersection_with_empty_list (list)
 /* Memory effects: list1 and list2 are freed if non-NULL.  The result,
    if non-NULL, is freshly allocated.  */
 static struct format_arg_list *
-intersection (list1, list2)
-     struct format_arg_list *list1;
-     struct format_arg_list *list2;
+intersection (struct format_arg_list *list1, struct format_arg_list *list2)
 {
   if (list1 != NULL)
     {
@@ -1505,10 +1378,9 @@ intersection (list1, list2)
 /* Create the union (i.e. alternative constraints) of two argument
    constraints.  */
 static void
-make_union_element (re, e1, e2)
-     struct format_arg *re;
-     const struct format_arg * e1;
-     const struct format_arg * e2;
+make_union_element (struct format_arg *re,
+                   const struct format_arg * e1,
+                   const struct format_arg * e2)
 {
   /* Union of the cdr types.  */
   if (e1->presence == FCT_REQUIRED && e2->presence == FCT_REQUIRED)
@@ -1608,9 +1480,7 @@ make_union_element (re, e1, e2)
 /* Memory effects: list1 and list2 are freed.  The result is freshly
    allocated.  */
 static struct format_arg_list *
-make_union_list (list1, list2)
-     struct format_arg_list *list1;
-     struct format_arg_list *list2;
+make_union_list (struct format_arg_list *list1, struct format_arg_list *list2)
 {
   struct format_arg_list *result;
 
@@ -1884,8 +1754,7 @@ make_union_list (list1, list2)
 /* Create the union of an argument list and the empty list.  */
 /* Memory effects: list is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-make_union_with_empty_list (list)
-     struct format_arg_list *list;
+make_union_with_empty_list (struct format_arg_list *list)
 {
 #if 0 /* equivalent but slower */
   return make_union_list (list, make_empty_list ());
@@ -1920,9 +1789,7 @@ make_union_with_empty_list (list)
 /* Memory effects: list1 and list2 are freed if non-NULL.  The result,
    if non-NULL, is freshly allocated.  */
 static struct format_arg_list *
-union (list1, list2)
-     struct format_arg_list *list1;
-     struct format_arg_list *list2;
+union (struct format_arg_list *list1, struct format_arg_list *list2)
 {
   if (list1 != NULL)
     {
@@ -1946,9 +1813,7 @@ union (list1, list2)
 
 /* Test whether arguments 0..n are required arguments in a list.  */
 static bool
-is_required (list, n)
-     const struct format_arg_list *list;
-     unsigned int n;
+is_required (const struct format_arg_list *list, unsigned int n)
 {
   unsigned int s;
   unsigned int t;
@@ -2006,9 +1871,7 @@ is_required (list, n)
    present.  NULL stands for an impossible situation, i.e. a contradiction.  */
 /* Memory effects: list is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-add_required_constraint (list, n)
-     struct format_arg_list *list;
-     unsigned int n;
+add_required_constraint (struct format_arg_list *list, unsigned int n)
 {
   unsigned int i, rest;
 
@@ -2045,9 +1908,7 @@ add_required_constraint (list, n)
    contradiction.  */
 /* Memory effects: list is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-add_end_constraint (list, n)
-     struct format_arg_list *list;
-     unsigned int n;
+add_end_constraint (struct format_arg_list *list, unsigned int n)
 {
   unsigned int s, i;
   enum format_cdr_type n_presence;
@@ -2095,10 +1956,8 @@ add_end_constraint (list, n)
    contradiction.  Assumes a preceding add_required_constraint (list, n).  */
 /* Memory effects: list is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-add_type_constraint (list, n, type)
-     struct format_arg_list *list;
-     unsigned int n;
-     enum format_arg_type type;
+add_type_constraint (struct format_arg_list *list, unsigned int n,
+                    enum format_arg_type type)
 {
   unsigned int s;
   struct format_arg newconstraint;
@@ -2132,11 +1991,9 @@ add_type_constraint (list, n, type)
    contradiction.  Assumes a preceding add_required_constraint (list, n).  */
 /* Memory effects: list is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-add_listtype_constraint (list, n, type, sublist)
-     struct format_arg_list *list;
-     unsigned int n;
-     enum format_arg_type type;
-     struct format_arg_list *sublist;
+add_listtype_constraint (struct format_arg_list *list, unsigned int n,
+                        enum format_arg_type type,
+                        struct format_arg_list *sublist)
 {
   unsigned int s;
   struct format_arg newconstraint;
@@ -2169,10 +2026,8 @@ add_listtype_constraint (list, n, type, sublist)
 /* ============= Subroutines used by the format string parser ============= */
 
 static void
-add_req_type_constraint (listp, position, type)
-     struct format_arg_list **listp;
-     unsigned int position;
-     enum format_arg_type type;
+add_req_type_constraint (struct format_arg_list **listp,
+                        unsigned int position, enum format_arg_type type)
 {
   *listp = add_required_constraint (*listp, position);
   *listp = add_type_constraint (*listp, position, type);
@@ -2180,11 +2035,9 @@ add_req_type_constraint (listp, position, type)
 
 
 static void
-add_req_listtype_constraint (listp, position, type, sublist)
-     struct format_arg_list **listp;
-     unsigned int position;
-     enum format_arg_type type;
-     struct format_arg_list *sublist;
+add_req_listtype_constraint (struct format_arg_list **listp,
+                            unsigned int position, enum format_arg_type type,
+                            struct format_arg_list *sublist)
 {
   *listp = add_required_constraint (*listp, position);
   *listp = add_listtype_constraint (*listp, position, type, sublist);
@@ -2195,8 +2048,7 @@ add_req_listtype_constraint (listp, position, type, sublist)
    by sublist.  */
 /* Memory effects: sublist is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-make_repeated_list_of_lists (sublist)
-     struct format_arg_list *sublist;
+make_repeated_list_of_lists (struct format_arg_list *sublist)
 {
   if (sublist == NULL)
     /* The list cannot have a single element.  */
@@ -2240,9 +2092,7 @@ make_repeated_list_of_lists (sublist)
  */
 /* Memory effects: sublist is freed.  The result is freshly allocated.  */
 static struct format_arg_list *
-make_repeated_list (sublist, period)
-     struct format_arg_list *sublist;
-     unsigned int period;
+make_repeated_list (struct format_arg_list *sublist, unsigned int period)
 {
   struct segment tmp;
   struct segment *srcseg;
@@ -2475,12 +2325,9 @@ static const enum format_arg_type THREE [3] = {
 /* Check the parameters.  For V params, add the constraint to the argument
    list.  Return false if the format string is invalid.  */
 static bool
-check_params (listp, paramcount, params, t_count, t_types)
-     struct format_arg_list **listp;
-     unsigned int paramcount;
-     struct param *params;
-     unsigned int t_count;
-     const enum format_arg_type *t_types;
+check_params (struct format_arg_list **listp,
+             unsigned int paramcount, struct param *params,
+             unsigned int t_count, const enum format_arg_type *t_types)
 {
   for (; paramcount > 0 && t_count > 0;
         params++, paramcount--, t_types++, t_count--)
@@ -2548,10 +2395,8 @@ check_params (listp, paramcount, params, t_count, t_types)
    For V params, add the constraint to the argument list.
    Return false if the format string is invalid.  */
 static bool
-nocheck_params (listp, paramcount, params)
-     struct format_arg_list **listp;
-     unsigned int paramcount;
-     struct param *params;
+nocheck_params (struct format_arg_list **listp,
+               unsigned int paramcount, struct param *params)
 {
   for (; paramcount > 0; params++, paramcount--)
     if (params->type == PT_V)
@@ -2583,16 +2428,10 @@ nocheck_params (listp, paramcount, params)
    separator specifies if ~; separators are allowed.
    If the format string is invalid, false is returned.  */
 static bool
-parse_upto (formatp, positionp, listp, escapep,
-           separatorp, spec, terminator, separator)
-     const char **formatp;
-     int *positionp;
-     struct format_arg_list **listp;
-     struct format_arg_list **escapep;
-     int *separatorp;
-     struct spec *spec;
-     char terminator;
-     bool separator;
+parse_upto (const char **formatp,
+           int *positionp, struct format_arg_list **listp,
+           struct format_arg_list **escapep, int *separatorp,
+           struct spec *spec, char terminator, bool separator)
 {
   const char *format = *formatp;
   int position = *positionp;
@@ -3307,8 +3146,7 @@ parse_upto (formatp, positionp, listp, escapep,
 /* ============== Top level format string handling functions ============== */
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -3340,8 +3178,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -3349,8 +3186,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -3358,13 +3194,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -3430,11 +3261,10 @@ struct formatstring_parser formatstring_lisp =
 #include <stdio.h>
 #include "getline.h"
 
-static void print_list PARAMS ((struct format_arg_list *list));
+static void print_list (struct format_arg_list *list);
 
 static void
-print_element (element)
-     struct format_arg *element;
+print_element (struct format_arg *element)
 {
   switch (element->presence)
     {
@@ -3485,8 +3315,7 @@ print_element (element)
 }
 
 static void
-print_list (list)
-     struct format_arg_list *list;
+print_list (struct format_arg_list *list)
 {
   unsigned int i, j;
 
@@ -3515,8 +3344,7 @@ print_list (list)
 }
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
index 12a33d198d5e4fbe67abed65990b727022afd8ac..cf2d959a34b358f1bd4fc7190a05d241bdaae7f4 100644 (file)
@@ -93,22 +93,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -117,8 +103,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   unsigned int directives;
   unsigned int numbered_arg_count;
@@ -346,8 +331,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -357,8 +341,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -366,13 +349,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -477,8 +455,7 @@ struct formatstring_parser formatstring_pascal =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index 9ca6ef0c8d59d9eaa13e46344093472d7392b8e0..d91803b1e8c942c382effcd6aa54294469c843a7 100644 (file)
@@ -83,22 +83,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -107,8 +93,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   unsigned int directives;
   unsigned int numbered_arg_count;
@@ -286,8 +271,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -297,8 +281,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -306,13 +289,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -417,8 +395,7 @@ struct formatstring_parser formatstring_php =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index b59bddf0494ee138c9b1ecc86170e57c2a2f915b..1116a70210d824c1195f2a7c5e662532e1353e42 100644 (file)
@@ -1,5 +1,5 @@
 /* Python format strings.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -101,30 +101,15 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int named_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-named_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+named_arg_compare (const void *p1, const void *p2)
 {
   return strcmp (((const struct named_arg *) p1)->name,
                 ((const struct named_arg *) p2)->name);
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -349,8 +334,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -367,8 +351,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -376,13 +359,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -548,8 +526,7 @@ struct formatstring_parser formatstring_python =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int i;
index d765308deff8f16b3c2a98842f401c9c7907065e..e74126d14d9800113ac01d0a4941845fc2ea4640 100644 (file)
@@ -87,22 +87,8 @@ struct spec
 #define isdigit(c) ((unsigned int) ((c) - '0') < 10)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int numbered_arg_compare PARAMS ((const void *p1, const void *p2));
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static int
-numbered_arg_compare (p1, p2)
-     const void *p1;
-     const void *p2;
+numbered_arg_compare (const void *p1, const void *p2)
 {
   unsigned int n1 = ((const struct numbered_arg *) p1)->number;
   unsigned int n2 = ((const struct numbered_arg *) p2)->number;
@@ -111,8 +97,7 @@ numbered_arg_compare (p1, p2)
 }
 
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -322,8 +307,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -333,8 +317,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -342,13 +325,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -453,8 +431,7 @@ struct formatstring_parser formatstring_tcl =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int last;
index 4010fdb8885a694e09de856c5a57b81960346bdf..fd41610b0f8fcb98cc4a62f7990dc37f8099faa6 100644 (file)
@@ -1,5 +1,5 @@
 /* YCP and Smalltalk format strings.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -46,20 +46,8 @@ struct spec
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void *format_parse PARAMS ((const char *format));
-static void format_free PARAMS ((void *descr));
-static int format_get_number_of_directives PARAMS ((void *descr));
-static bool format_check PARAMS ((const lex_pos_ty *pos,
-                                 void *msgid_descr, void *msgstr_descr,
-                                 bool equality,
-                                 bool noisy, const char *pretty_msgstr));
-
-
 static void *
-format_parse (format)
-     const char *format;
+format_parse (const char *format)
 {
   struct spec spec;
   struct spec *result;
@@ -98,8 +86,7 @@ format_parse (format)
 }
 
 static void
-format_free (descr)
-     void *descr;
+format_free (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -107,8 +94,7 @@ format_free (descr)
 }
 
 static int
-format_get_number_of_directives (descr)
-     void *descr;
+format_get_number_of_directives (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
 
@@ -116,13 +102,8 @@ format_get_number_of_directives (descr)
 }
 
 static bool
-format_check (pos, msgid_descr, msgstr_descr, equality, noisy, pretty_msgstr)
-     const lex_pos_ty *pos;
-     void *msgid_descr;
-     void *msgstr_descr;
-     bool equality;
-     bool noisy;
-     const char *pretty_msgstr;
+format_check (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr,
+             bool equality, bool noisy, const char *pretty_msgstr)
 {
   struct spec *spec1 = (struct spec *) msgid_descr;
   struct spec *spec2 = (struct spec *) msgstr_descr;
@@ -182,8 +163,7 @@ struct formatstring_parser formatstring_smalltalk =
 #include "getline.h"
 
 static void
-format_print (descr)
-     void *descr;
+format_print (void *descr)
 {
   struct spec *spec = (struct spec *) descr;
   unsigned int i;
index 682744a5341228894111a8085121c35901204fab..9d2105b08fc2600c184cc8b9c74ca4fc858dbfb1 100644 (file)
@@ -32,14 +32,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) PARAMS ((const char *string));
+  void * (*parse) (const char *string);
 
   /* Free a format string descriptor, returned by parse().  */
-  void (*free) PARAMS ((void *descr));
+  void (*free) (void *descr);
 
   /* Return the number of format directives.
      A string that can be output literally has 0 format directives.  */
-  int (*get_number_of_directives) PARAMS ((void *descr));
+  int (*get_number_of_directives) (void *descr);
 
   /* Verify that the argument types/names in msgid_descr and those in
      msgstr_descr are the same (if equality=true), or (if equality=false)
@@ -50,7 +50,7 @@ struct formatstring_parser
        error_at_line (0, 0, pos->file_name, pos->line_number, ...);
        error_with_progname = true;
      (but only if noisy=true) and return true.  Otherwise return false.  */
-  bool (*check) PARAMS ((const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr, bool equality, bool noisy, const char *pretty_msgstr));
+  bool (*check) (const lex_pos_ty *pos, void *msgid_descr, void *msgstr_descr, bool equality, bool noisy, const char *pretty_msgstr);
 };
 
 /* Format string parsers, each defined in its own file.  */
@@ -79,6 +79,6 @@ struct interval
   size_t startpos;
   size_t endpos;
 };
-extern void get_c99_format_directives PARAMS ((const char *string, struct interval **intervalsp, size_t *lengthp));
+extern void get_c99_format_directives (const char *string, struct interval **intervalsp, size_t *lengthp);
 
 #endif /* _FORMAT_H */
index a9590153d3f258c48a006feb450fbdb4571491b4..78ea862b41248f9ead8cd97811556399141ee0ac 100644 (file)
@@ -55,19 +55,16 @@ static const struct option long_options[] =
   { NULL, 0, NULL, 0 }
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static const char *expand_escape PARAMS ((const char *str));
+static const char *expand_escape (const char *str);
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   const char *msgid;
@@ -233,8 +230,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -283,8 +279,7 @@ Standard search directory: %s\n"),
 
 /* Expand some escape sequences found in the argument string.  */
 static const char *
-expand_escape (str)
-     const char *str;
+expand_escape (const char *str)
 {
   char *retval, *rp;
   const char *cp = str;
index 5380999e4a0ebcdbd298088fe2bc0cd27191922d..0bcbe413ca64f918c20ca63d9a3c7647398e26c4 100644 (file)
@@ -103,20 +103,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static char * xgethostname PARAMS ((void));
-static void print_hostname PARAMS ((void));
+static void print_hostname (void);
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   bool do_help;
@@ -197,8 +193,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index 59d975b63519dad45f86c1c324ca75e019d241cb..d49d0ca35356bebedd75fe367ca3fbb5cbf5979b 100644 (file)
 #include "xmalloc.h"
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static message_ty *message_list_search_fuzzy_inner PARAMS ((
-       message_list_ty *mlp, const char *msgid, double *best_weight_p));
-
-
 const char *const format_language[NFORMATS] =
 {
   /* format_c */               "c",
@@ -72,20 +66,16 @@ const char *const format_language_pretty[NFORMATS] =
 
 
 bool
-possible_format_p (is_format)
-     enum is_format is_format;
+possible_format_p (enum is_format is_format)
 {
   return is_format == possible || is_format == yes;
 }
 
 
 message_ty *
-message_alloc (msgid, msgid_plural, msgstr, msgstr_len, pp)
-     const char *msgid;
-     const char *msgid_plural;
-     const char *msgstr;
-     size_t msgstr_len;
-     const lex_pos_ty *pp;
+message_alloc (const char *msgid, const char *msgid_plural,
+              const char *msgstr, size_t msgstr_len,
+              const lex_pos_ty *pp)
 {
   message_ty *mp;
   size_t i;
@@ -111,8 +101,7 @@ message_alloc (msgid, msgid_plural, msgstr, msgstr_len, pp)
 
 
 void
-message_free (mp)
-     message_ty *mp;
+message_free (message_ty *mp)
 {
   size_t j;
 
@@ -133,9 +122,7 @@ message_free (mp)
 
 
 void
-message_comment_append (mp, s)
-     message_ty *mp;
-     const char *s;
+message_comment_append (message_ty *mp, const char *s)
 {
   if (mp->comment == NULL)
     mp->comment = string_list_alloc ();
@@ -144,9 +131,7 @@ message_comment_append (mp, s)
 
 
 void
-message_comment_dot_append (mp, s)
-     message_ty *mp;
-     const char *s;
+message_comment_dot_append (message_ty *mp, const char *s)
 {
   if (mp->comment_dot == NULL)
     mp->comment_dot = string_list_alloc ();
@@ -155,10 +140,7 @@ message_comment_dot_append (mp, s)
 
 
 void
-message_comment_filepos (mp, name, line)
-     message_ty *mp;
-     const char *name;
-     size_t line;
+message_comment_filepos (message_ty *mp, const char *name, size_t line)
 {
   size_t j;
   size_t nbytes;
@@ -184,8 +166,7 @@ message_comment_filepos (mp, name, line)
 
 
 message_ty *
-message_copy (mp)
-     message_ty *mp;
+message_copy (message_ty *mp)
 {
   message_ty *result;
   size_t j, i;
@@ -217,8 +198,7 @@ message_copy (mp)
 
 
 message_list_ty *
-message_list_alloc (use_hashtable)
-     bool use_hashtable;
+message_list_alloc (bool use_hashtable)
 {
   message_list_ty *mlp;
 
@@ -233,8 +213,7 @@ message_list_alloc (use_hashtable)
 
 
 void
-message_list_free (mlp)
-     message_list_ty *mlp;
+message_list_free (message_list_ty *mlp)
 {
   size_t j;
 
@@ -249,9 +228,7 @@ message_list_free (mlp)
 
 
 void
-message_list_append (mlp, mp)
-     message_list_ty *mlp;
-     message_ty *mp;
+message_list_append (message_list_ty *mlp, message_ty *mp)
 {
   if (mlp->nitems >= mlp->nitems_max)
     {
@@ -272,9 +249,7 @@ message_list_append (mlp, mp)
 
 
 void
-message_list_prepend (mlp, mp)
-     message_list_ty *mlp;
-     message_ty *mp;
+message_list_prepend (message_list_ty *mlp, message_ty *mp)
 {
   size_t j;
 
@@ -301,9 +276,7 @@ message_list_prepend (mlp, mp)
 
 #if 0 /* unused */
 void
-message_list_delete_nth (mlp, n)
-     message_list_ty *mlp;
-     size_t n;
+message_list_delete_nth (message_list_ty *mlp, size_t n)
 {
   size_t j;
 
@@ -325,9 +298,8 @@ message_list_delete_nth (mlp, n)
 
 
 void
-message_list_remove_if_not (mlp, predicate)
-     message_list_ty *mlp;
-     message_predicate_ty *predicate;
+message_list_remove_if_not (message_list_ty *mlp,
+                           message_predicate_ty *predicate)
 {
   size_t i, j;
 
@@ -345,9 +317,7 @@ message_list_remove_if_not (mlp, predicate)
 
 
 message_ty *
-message_list_search (mlp, msgid)
-     message_list_ty *mlp;
-     const char *msgid;
+message_list_search (message_list_ty *mlp, const char *msgid)
 {
   if (mlp->use_hashtable)
     {
@@ -376,10 +346,8 @@ message_list_search (mlp, msgid)
 
 
 static message_ty *
-message_list_search_fuzzy_inner (mlp, msgid, best_weight_p)
-     message_list_ty *mlp;
-     const char *msgid;
-     double *best_weight_p;
+message_list_search_fuzzy_inner (message_list_ty *mlp, const char *msgid,
+                                double *best_weight_p)
 {
   size_t j;
   message_ty *best_mp;
@@ -406,9 +374,7 @@ message_list_search_fuzzy_inner (mlp, msgid, best_weight_p)
 
 
 message_ty *
-message_list_search_fuzzy (mlp, msgid)
-     message_list_ty *mlp;
-     const char *msgid;
+message_list_search_fuzzy (message_list_ty *mlp, const char *msgid)
 {
   double best_weight;
 
@@ -432,8 +398,7 @@ message_list_list_alloc ()
 
 #if 0 /* unused */
 void
-message_list_list_free (mllp)
-     message_list_list_ty *mllp;
+message_list_list_free (message_list_list_ty *mllp)
 {
   size_t j;
 
@@ -447,9 +412,7 @@ message_list_list_free (mllp)
 
 
 void
-message_list_list_append (mllp, mlp)
-     message_list_list_ty *mllp;
-     message_list_ty *mlp;
+message_list_list_append (message_list_list_ty *mllp, message_list_ty *mlp)
 {
   if (mllp->nitems >= mllp->nitems_max)
     {
@@ -464,9 +427,8 @@ message_list_list_append (mllp, mlp)
 
 
 void
-message_list_list_append_list (mllp, mllp2)
-     message_list_list_ty *mllp;
-     message_list_list_ty *mllp2;
+message_list_list_append_list (message_list_list_ty *mllp,
+                              message_list_list_ty *mllp2)
 {
   size_t j;
 
@@ -476,9 +438,7 @@ message_list_list_append_list (mllp, mllp2)
 
 
 message_ty *
-message_list_list_search (mllp, msgid)
-     message_list_list_ty *mllp;
-     const char *msgid;
+message_list_list_search (message_list_list_ty *mllp, const char *msgid)
 {
   message_ty *best_mp;
   int best_weight; /* 0: not found, 1: found without msgstr, 2: translated */
@@ -508,9 +468,7 @@ message_list_list_search (mllp, msgid)
 
 
 message_ty *
-message_list_list_search_fuzzy (mllp, msgid)
-     message_list_list_ty *mllp;
-     const char *msgid;
+message_list_list_search_fuzzy (message_list_list_ty *mllp, const char *msgid)
 {
   size_t j;
   double best_weight;
@@ -533,9 +491,7 @@ message_list_list_search_fuzzy (mllp, msgid)
 
 
 msgdomain_ty*
-msgdomain_alloc (domain, use_hashtable)
-     const char *domain;
-     bool use_hashtable;
+msgdomain_alloc (const char *domain, bool use_hashtable)
 {
   msgdomain_ty *mdp;
 
@@ -547,8 +503,7 @@ msgdomain_alloc (domain, use_hashtable)
 
 
 void
-msgdomain_free (mdp)
-     msgdomain_ty *mdp;
+msgdomain_free (msgdomain_ty *mdp)
 {
   message_list_free (mdp->messages);
   free (mdp);
@@ -556,8 +511,7 @@ msgdomain_free (mdp)
 
 
 msgdomain_list_ty *
-msgdomain_list_alloc (use_hashtable)
-     bool use_hashtable;
+msgdomain_list_alloc (bool use_hashtable)
 {
   msgdomain_list_ty *mdlp;
 
@@ -576,8 +530,7 @@ msgdomain_list_alloc (use_hashtable)
 
 #if 0 /* unused */
 void
-msgdomain_list_free (mdlp)
-     msgdomain_list_ty *mdlp;
+msgdomain_list_free (msgdomain_list_ty *mdlp)
 {
   size_t j;
 
@@ -591,9 +544,7 @@ msgdomain_list_free (mdlp)
 
 
 void
-msgdomain_list_append (mdlp, mdp)
-     msgdomain_list_ty *mdlp;
-     msgdomain_ty *mdp;
+msgdomain_list_append (msgdomain_list_ty *mdlp, msgdomain_ty *mdp)
 {
   if (mdlp->nitems >= mdlp->nitems_max)
     {
@@ -609,9 +560,7 @@ msgdomain_list_append (mdlp, mdp)
 
 #if 0 /* unused */
 void
-msgdomain_list_append_list (mdlp, mdlp2)
-     msgdomain_list_ty *mdlp;
-     msgdomain_list_ty *mdlp2;
+msgdomain_list_append_list (msgdomain_list_ty *mdlp, msgdomain_list_ty *mdlp2)
 {
   size_t j;
 
@@ -622,10 +571,8 @@ msgdomain_list_append_list (mdlp, mdlp2)
 
 
 message_list_ty *
-msgdomain_list_sublist (mdlp, domain, create)
-     msgdomain_list_ty *mdlp;
-     const char *domain;
-     bool create;
+msgdomain_list_sublist (msgdomain_list_ty *mdlp, const char *domain,
+                       bool create)
 {
   size_t j;
 
@@ -646,9 +593,7 @@ msgdomain_list_sublist (mdlp, domain, create)
 
 #if 0 /* unused */
 message_ty *
-msgdomain_list_search (mdlp, msgid)
-     msgdomain_list_ty *mdlp;
-     const char *msgid;
+msgdomain_list_search (msgdomain_list_ty *mdlp, const char *msgid)
 {
   size_t j;
 
@@ -669,9 +614,7 @@ msgdomain_list_search (mdlp, msgid)
 
 #if 0 /* unused */
 message_ty *
-msgdomain_list_search_fuzzy (mdlp, msgid)
-     msgdomain_list_ty *mdlp;
-     const char *msgid;
+msgdomain_list_search_fuzzy (msgdomain_list_ty *mdlp, const char *msgid)
 {
   size_t j;
   double best_weight;
index ffec3ee08e8e6680ceaca9553f4c9a203cf41a67..fe506d78910c0bbc7bbda5f1535513099c2241f2 100644 (file)
@@ -62,7 +62,7 @@ enum is_format
 };
 
 extern bool
-       possible_format_p PARAMS ((enum is_format));
+       possible_format_p (enum is_format);
 
 
 /* Is current msgid wrappable?  */
@@ -140,21 +140,19 @@ struct message_ty
 };
 
 extern message_ty *
-       message_alloc PARAMS ((const char *msgid, const char *msgid_plural,
-                             const char *msgstr, size_t msgstr_len,
-                             const lex_pos_ty *pp));
+       message_alloc (const char *msgid, const char *msgid_plural,
+                     const char *msgstr, size_t msgstr_len,
+                     const lex_pos_ty *pp);
 extern void
-       message_free PARAMS ((message_ty *mp));
+       message_free (message_ty *mp);
 extern void
-       message_comment_append PARAMS ((message_ty *mp, const char *comment));
+       message_comment_append (message_ty *mp, const char *comment);
 extern void
-       message_comment_dot_append PARAMS ((message_ty *mp,
-                                          const char *comment));
+       message_comment_dot_append (message_ty *mp, const char *comment);
 extern void
-       message_comment_filepos PARAMS ((message_ty *mp,
-                                       const char *name, size_t line));
+       message_comment_filepos (message_ty *mp, const char *name, size_t line);
 extern message_ty *
-       message_copy PARAMS ((message_ty *mp));
+       message_copy (message_ty *mp);
 
 
 typedef struct message_list_ty message_list_ty;
@@ -172,24 +170,23 @@ struct message_list_ty
    message_list_search().  USE_HASHTABLE can only be set to true if it is
    known that the message list will not contain duplicate msgids.  */
 extern message_list_ty *
-       message_list_alloc PARAMS ((bool use_hashtable));
+       message_list_alloc (bool use_hashtable);
 extern void
-       message_list_free PARAMS ((message_list_ty *mlp));
+       message_list_free (message_list_ty *mlp);
 extern void
-       message_list_append PARAMS ((message_list_ty *mlp, message_ty *mp));
+       message_list_append (message_list_ty *mlp, message_ty *mp);
 extern void
-       message_list_prepend PARAMS ((message_list_ty *mlp, message_ty *mp));
+       message_list_prepend (message_list_ty *mlp, message_ty *mp);
 extern void
-       message_list_delete_nth PARAMS ((message_list_ty *mlp, size_t n));
-typedef bool message_predicate_ty PARAMS ((const message_ty *mp));
+       message_list_delete_nth (message_list_ty *mlp, size_t n);
+typedef bool message_predicate_ty (const message_ty *mp);
 extern void
-       message_list_remove_if_not PARAMS ((message_list_ty *mlp,
-                                          message_predicate_ty *predicate));
+       message_list_remove_if_not (message_list_ty *mlp,
+                                  message_predicate_ty *predicate);
 extern message_ty *
-       message_list_search PARAMS ((message_list_ty *mlp, const char *msgid));
+       message_list_search (message_list_ty *mlp, const char *msgid);
 extern message_ty *
-       message_list_search_fuzzy PARAMS ((message_list_ty *mlp,
-                                         const char *msgid));
+       message_list_search_fuzzy (message_list_ty *mlp, const char *msgid);
 
 
 typedef struct message_list_list_ty message_list_list_ty;
@@ -201,21 +198,21 @@ struct message_list_list_ty
 };
 
 extern message_list_list_ty *
-       message_list_list_alloc PARAMS ((void));
+       message_list_list_alloc (void);
 extern void
-       message_list_list_free PARAMS ((message_list_list_ty *mllp));
+       message_list_list_free (message_list_list_ty *mllp);
 extern void
-       message_list_list_append PARAMS ((message_list_list_ty *mllp,
-                                        message_list_ty *mlp));
+       message_list_list_append (message_list_list_ty *mllp,
+                                message_list_ty *mlp);
 extern void
-       message_list_list_append_list PARAMS ((message_list_list_ty *mllp,
-                                             message_list_list_ty *mllp2));
+       message_list_list_append_list (message_list_list_ty *mllp,
+                                     message_list_list_ty *mllp2);
 extern message_ty *
-       message_list_list_search PARAMS ((message_list_list_ty *mllp,
-                                        const char *msgid));
+       message_list_list_search (message_list_list_ty *mllp,
+                                const char *msgid);
 extern message_ty *
-       message_list_list_search_fuzzy PARAMS ((message_list_list_ty *mllp,
-                                              const char *msgid));
+       message_list_list_search_fuzzy (message_list_list_ty *mllp,
+                                      const char *msgid);
 
 
 typedef struct msgdomain_ty msgdomain_ty;
@@ -226,9 +223,9 @@ struct msgdomain_ty
 };
 
 extern msgdomain_ty *
-       msgdomain_alloc PARAMS ((const char *domain, bool use_hashtable));
+       msgdomain_alloc (const char *domain, bool use_hashtable);
 extern void
-       msgdomain_free PARAMS ((msgdomain_ty *mdp));
+       msgdomain_free (msgdomain_ty *mdp);
 
 
 typedef struct msgdomain_list_ty msgdomain_list_ty;
@@ -241,24 +238,21 @@ struct msgdomain_list_ty
 };
 
 extern msgdomain_list_ty *
-       msgdomain_list_alloc PARAMS ((bool use_hashtable));
+       msgdomain_list_alloc (bool use_hashtable);
 extern void
-       msgdomain_list_free PARAMS ((msgdomain_list_ty *mdlp));
+       msgdomain_list_free (msgdomain_list_ty *mdlp);
 extern void
-       msgdomain_list_append PARAMS ((msgdomain_list_ty *mdlp,
-                                     msgdomain_ty *mdp));
+       msgdomain_list_append (msgdomain_list_ty *mdlp, msgdomain_ty *mdp);
 extern void
-       msgdomain_list_append_list PARAMS ((msgdomain_list_ty *mdlp,
-                                          msgdomain_list_ty *mdlp2));
+       msgdomain_list_append_list (msgdomain_list_ty *mdlp,
+                                  msgdomain_list_ty *mdlp2);
 extern message_list_ty *
-       msgdomain_list_sublist PARAMS ((msgdomain_list_ty *mdlp,
-                                      const char *domain, bool create));
+       msgdomain_list_sublist (msgdomain_list_ty *mdlp, const char *domain,
+                              bool create);
 extern message_ty *
-       msgdomain_list_search PARAMS ((msgdomain_list_ty *mdlp,
-                                     const char *msgid));
+       msgdomain_list_search (msgdomain_list_ty *mdlp, const char *msgid);
 extern message_ty *
-       msgdomain_list_search_fuzzy PARAMS ((msgdomain_list_ty *mdlp,
-                                           const char *msgid));
+       msgdomain_list_search_fuzzy (msgdomain_list_ty *mdlp, const char *msgid);
 
 
 #endif /* message.h */
index 05622a3288d724347f2deb9a937725cb98b9600d..37b59c011e4b4fb71d7a84aae2ee6cad5ccf1360 100644 (file)
@@ -99,19 +99,17 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
-static bool is_message_selected PARAMS ((const message_ty *mp));
-static void process_message_list PARAMS ((message_list_ty *mlp));
-static msgdomain_list_ty *
-       process_msgdomain_list PARAMS ((msgdomain_list_ty *mdlp));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
+static msgdomain_list_ty *process_msgdomain_list (msgdomain_list_ty *mdlp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int optchar;
   bool do_help;
@@ -320,8 +318,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -416,8 +413,7 @@ Informative output:\n\
 
 /* Return true if a message should be kept.  */
 static bool
-is_message_selected (mp)
-     const message_ty *mp;
+is_message_selected (const message_ty *mp)
 {
   /* Always keep the header entry.  */
   if (mp->msgid[0] == '\0')
@@ -446,8 +442,7 @@ is_message_selected (mp)
 
 
 static void
-process_message_list (mlp)
-     message_list_ty *mlp;
+process_message_list (message_list_ty *mlp)
 {
   /* Keep only the selected messages.  */
   message_list_remove_if_not (mlp, is_message_selected);
@@ -476,8 +471,7 @@ process_message_list (mlp)
 
 
 static msgdomain_list_ty *
-process_msgdomain_list (mdlp)
-     msgdomain_list_ty *mdlp;
+process_msgdomain_list (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
index 35b94e0aa58afe4c6815cb040d249554b1a692de..2ad5fa6fe38601792efc1ef04ec911c3a3c12117 100644 (file)
@@ -77,15 +77,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int cnt;
   int optchar;
@@ -288,8 +289,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index 0919f5283a5b3a657e3501b77aeb5f1413ac08a5..8505e6e8b096ec5fcb5e47b61f9ea41797ef588b 100644 (file)
@@ -57,21 +57,17 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
-static bool is_message_selected PARAMS ((const message_ty *mp));
-static msgdomain_list_ty * remove_obsoletes PARAMS ((msgdomain_list_ty *mdlp));
-static void match_domain PARAMS ((const char *fn1, const char *fn2,
-                                 message_list_ty *defmlp,
-                                 message_list_ty *refmlp, int *nerrors));
-static void compare PARAMS ((const char *, const char *));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
+static void compare (const char *fn1, const char *fn2);
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   bool do_help;
@@ -159,8 +155,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -217,8 +212,7 @@ Informative output:\n\
 
 /* Return true if a message should be kept.  */
 static bool
-is_message_selected (mp)
-     const message_ty *mp;
+is_message_selected (const message_ty *mp)
 {
   /* Always keep the header entry.  */
   if (mp->msgid[0] == '\0')
@@ -230,8 +224,7 @@ is_message_selected (mp)
 
 /* Remove obsolete messages from a message list.  Return the modified list.  */
 static msgdomain_list_ty *
-remove_obsoletes (mdlp)
-     msgdomain_list_ty *mdlp;
+remove_obsoletes (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
@@ -243,12 +236,9 @@ remove_obsoletes (mdlp)
 
 
 static void
-match_domain (fn1, fn2, defmlp, refmlp, nerrors)
-     const char *fn1;
-     const char *fn2;
-     message_list_ty *defmlp;
-     message_list_ty *refmlp;
-     int *nerrors;
+match_domain (const char *fn1, const char *fn2,
+             message_list_ty *defmlp, message_list_ty *refmlp,
+             int *nerrors)
 {
   size_t j;
 
@@ -287,9 +277,7 @@ this message is used but not defined in %s"), fn1);
 
 
 static void
-compare (fn1, fn2)
-     const char *fn1;
-     const char *fn2;
+compare (const char *fn1, const char *fn2)
 {
   msgdomain_list_ty *def;
   msgdomain_list_ty *ref;
index 92542c0beed072d02263d70b107c745092319124..62c58ba67e94f5471719b0f7bd98d270a1f6e6e7 100644 (file)
@@ -80,9 +80,8 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ > 4) || __GNUC__ > 2)
        __attribute__ ((noreturn))
 #endif
@@ -90,9 +89,7 @@ static void usage PARAMS ((int status))
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int cnt;
   int optchar;
@@ -304,8 +301,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index 4447aef509b0b3efe71a027115f1b1a3ba29785c..a95094662922e3d36ad0996c7e826589c8052fc6 100644 (file)
@@ -40,7 +40,7 @@
 
 #define _(str) gettext (str)
 
-extern const char * locale_charset PARAMS ((void));
+extern const char * locale_charset (void);
 
 
 /* Force output of PO file even if empty.  */
@@ -72,15 +72,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -241,8 +242,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index be800b4d71faf529e0b4efa68527bba9fb56d1d9..add0f658cf8f3a1b582997326d1f2fbb7a8e7431 100644 (file)
@@ -66,15 +66,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -225,8 +226,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index 50bfc1195ee24693f919ee145108d53ebd301806..2de37cd07301ff3a569763bdf606e6bb33c50c97 100644 (file)
@@ -80,23 +80,17 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
 #endif
-static void process_string PARAMS ((const message_ty *mp,
-                                   const char *str, size_t len));
-static void process_message PARAMS ((const message_ty *mp));
-static void process_message_list PARAMS ((const message_list_ty *mlp));
-static void process_msgdomain_list PARAMS ((const msgdomain_list_ty *mdlp));
+;
+static void process_msgdomain_list (const msgdomain_list_ty *mdlp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -216,8 +210,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -279,8 +272,7 @@ Informative output:\n\
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -298,10 +290,7 @@ nonintr_close (fd)
 /* Pipe a string STR of size LEN bytes to the subprogram.
    The byte after STR is known to be a '\0' byte.  */
 static void
-process_string (mp, str, len)
-     const message_ty *mp;
-     const char *str;
-     size_t len;
+process_string (const message_ty *mp, const char *str, size_t len)
 {
   ssize_t nwritten;
 
@@ -347,8 +336,7 @@ process_string (mp, str, len)
 
 
 static void
-process_message (mp)
-     const message_ty *mp;
+process_message (const message_ty *mp)
 {
   const char *msgstr = mp->msgstr;
   size_t msgstr_len = mp->msgstr_len;
@@ -367,8 +355,7 @@ process_message (mp)
 
 
 static void
-process_message_list (mlp)
-     const message_list_ty *mlp;
+process_message_list (const message_list_ty *mlp)
 {
   size_t j;
 
@@ -378,8 +365,7 @@ process_message_list (mlp)
 
 
 static void
-process_msgdomain_list (mdlp)
-     const msgdomain_list_ty *mdlp;
+process_msgdomain_list (const msgdomain_list_ty *mdlp)
 {
   size_t k;
 
index 7391b69f1aa4ab163c9c1f23f4872fccab51b6c3..90bf192b8f23a82d10ddb0e3f3e7e23e8d31914a 100644 (file)
@@ -112,32 +112,17 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
-static inline ssize_t nonintr_read PARAMS ((int fd, void *buf, size_t count));
-static inline ssize_t nonintr_write PARAMS ((int fd, const void *buf,
-                                            size_t count));
-#if HAVE_SELECT
-static inline int nonintr_select PARAMS ((int n, fd_set *readfds,
-                                         fd_set *writefds, fd_set *exceptfds,
-                                         struct timeval *timeout));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
 #endif
-#endif
-static void process_string PARAMS ((const char *str, size_t len,
-                                   char **resultp, size_t *lengthp));
-static void process_message PARAMS ((message_ty *mp));
-static void process_message_list PARAMS ((message_list_ty *mlp));
-static msgdomain_list_ty *
-       process_msgdomain_list PARAMS ((msgdomain_list_ty *mdlp));
+;
+static msgdomain_list_ty *process_msgdomain_list (msgdomain_list_ty *mdlp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -344,8 +329,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -438,8 +422,7 @@ Informative output:\n\
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -452,10 +435,7 @@ nonintr_close (fd)
 #define close nonintr_close
 
 static inline ssize_t
-nonintr_read (fd, buf, count)
-     int fd;
-     void *buf;
-     size_t count;
+nonintr_read (int fd, void *buf, size_t count)
 {
   ssize_t retval;
 
@@ -468,10 +448,7 @@ nonintr_read (fd, buf, count)
 #define read nonintr_read
 
 static inline ssize_t
-nonintr_write (fd, buf, count)
-     int fd;
-     const void *buf;
-     size_t count;
+nonintr_write (int fd, const void *buf, size_t count)
 {
   ssize_t retval;
 
@@ -486,12 +463,8 @@ nonintr_write (fd, buf, count)
 # if HAVE_SELECT
 
 static inline int
-nonintr_select (n, readfds, writefds, exceptfds, timeout)
-     int n;
-     fd_set *readfds;
-     fd_set *writefds;
-     fd_set *exceptfds;
-     struct timeval *timeout;
+nonintr_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+               struct timeval *timeout)
 {
   int retval;
 
@@ -527,11 +500,7 @@ nonintr_select (n, readfds, writefds, exceptfds, timeout)
    Store the freshly allocated result at *RESULTP and its length at *LENGTHP.
  */
 static void
-process_string (str, len, resultp, lengthp)
-     const char *str;
-     size_t len;
-     char **resultp;
-     size_t *lengthp;
+process_string (const char *str, size_t len, char **resultp, size_t *lengthp)
 {
   pid_t child;
   int fd[2];
@@ -682,8 +651,7 @@ process_string (str, len, resultp, lengthp)
 
 
 static void
-process_message (mp)
-     message_ty *mp;
+process_message (message_ty *mp)
 {
   const char *msgstr = mp->msgstr;
   size_t msgstr_len = mp->msgstr_len;
@@ -738,8 +706,7 @@ process_message (mp)
 
 
 static void
-process_message_list (mlp)
-     message_list_ty *mlp;
+process_message_list (message_list_ty *mlp)
 {
   size_t j;
 
@@ -749,8 +716,7 @@ process_message_list (mlp)
 
 
 static msgdomain_list_ty *
-process_msgdomain_list (mdlp)
-     msgdomain_list_ty *mdlp;
+process_msgdomain_list (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
index 9f4091f0656623346aafd1ac9097e281f816b72d..191d6989d9f0534c48210416da9bd8c0a7c4385b 100644 (file)
@@ -177,51 +177,21 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
        __attribute__ ((noreturn))
 #endif
 ;
-static const char *add_mo_suffix PARAMS ((const char *));
-static struct msg_domain *new_domain PARAMS ((const char *name,
-                                             const char *file_name));
-static bool is_nonobsolete PARAMS ((const message_ty *mp));
-#if USE_SIGINFO
-static void sigfpe_handler PARAMS ((int sig, siginfo_t *sip, void *scp));
-#else
-static void sigfpe_handler PARAMS ((int sig));
-#endif
-static void install_sigfpe_handler PARAMS ((void));
-static void uninstall_sigfpe_handler PARAMS ((void));
-static void check_plural_eval PARAMS ((struct expression *plural_expr,
-                                      unsigned long nplurals_value,
-                                      const lex_pos_ty *header_pos));
-static void check_plural PARAMS ((message_list_ty *mlp));
-static void check_pair PARAMS ((const char *msgid, const lex_pos_ty *msgid_pos,
-                               const char *msgid_plural,
-                               const char *msgstr, size_t msgstr_len,
-                               const lex_pos_ty *msgstr_pos,
-                               enum is_format is_format[NFORMATS]));
-static void check_header_entry PARAMS ((const char *msgstr_string));
-static void format_constructor PARAMS ((po_ty *that));
-static void format_debrief PARAMS ((po_ty *));
-static void format_directive_domain PARAMS ((po_ty *pop, char *name));
-static void format_directive_message PARAMS ((po_ty *pop, char *msgid,
-                                             lex_pos_ty *msgid_pos,
-                                             char *msgid_plural,
-                                             char *msgstr, size_t msgstr_len,
-                                             lex_pos_ty *msgstr_pos,
-                                             bool obsolete));
-static void format_comment_special PARAMS ((po_ty *pop, const char *s));
-static void read_po_file PARAMS ((char *filename));
+static const char *add_mo_suffix (const char *);
+static struct msg_domain *new_domain (const char *name, const char *file_name);
+static bool is_nonobsolete (const message_ty *mp);
+static void check_plural (message_list_ty *mlp);
+static void read_po_file (char *filename);
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int opt;
   bool do_help = false;
@@ -521,8 +491,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -627,8 +596,7 @@ Informative output:\n\
 
 
 static const char *
-add_mo_suffix (fname)
-     const char *fname;
+add_mo_suffix (const char *fname)
 {
   size_t len;
   char *result;
@@ -645,9 +613,7 @@ add_mo_suffix (fname)
 
 
 static struct msg_domain *
-new_domain (name, file_name)
-     const char *name;
-     const char *file_name;
+new_domain (const char *name, const char *file_name)
 {
   struct msg_domain **p_dom = &domain_list;
 
@@ -671,8 +637,7 @@ new_domain (name, file_name)
 
 
 static bool
-is_nonobsolete (mp)
-     const message_ty *mp;
+is_nonobsolete (const message_ty *mp)
 {
   return !mp->obsolete;
 }
@@ -687,10 +652,7 @@ static int sigfpe_code;
 /* Signal handler called in case of arithmetic exception (e.g. division
    by zero) during plural_eval.  */
 static void
-sigfpe_handler (sig, sip, scp)
-     int sig;
-     siginfo_t *sip;
-     void *scp;
+sigfpe_handler (int sig, siginfo_t *sip, void *scp)
 {
   sigfpe_code = sip->si_code;
   siglongjmp (sigfpe_exit, 1);
@@ -701,8 +663,7 @@ sigfpe_handler (sig, sip, scp)
 /* Signal handler called in case of arithmetic exception (e.g. division
    by zero) during plural_eval.  */
 static void
-sigfpe_handler (sig)
-     int sig;
+sigfpe_handler (int sig)
 {
   siglongjmp (sigfpe_exit, 1);
 }
@@ -739,10 +700,9 @@ uninstall_sigfpe_handler ()
 
 /* Check the values returned by plural_eval.  */
 static void
-check_plural_eval (plural_expr, nplurals_value, header_pos)
-     struct expression *plural_expr;
-     unsigned long nplurals_value;
-     const lex_pos_ty *header_pos;
+check_plural_eval (struct expression *plural_expr,
+                  unsigned long nplurals_value,
+                  const lex_pos_ty *header_pos)
 {
   if (sigsetjmp (sigfpe_exit, 1) == 0)
     {
@@ -825,8 +785,7 @@ check_plural_eval (plural_expr, nplurals_value, header_pos)
 
 /* Perform plural expression checking.  */
 static void
-check_plural (mlp)
-     message_list_ty *mlp;
+check_plural (message_list_ty *mlp)
 {
   const lex_pos_ty *has_plural;
   unsigned long min_nplurals;
@@ -1034,15 +993,11 @@ check_plural (mlp)
 
 /* Perform miscellaneous checks on a message.  */
 static void
-check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos,
-           is_format)
-     const char *msgid;
-     const lex_pos_ty *msgid_pos;
-     const char *msgid_plural;
-     const char *msgstr;
-     size_t msgstr_len;
-     const lex_pos_ty *msgstr_pos;
-     enum is_format is_format[NFORMATS];
+check_pair (const char *msgid,
+           const lex_pos_ty *msgid_pos,
+           const char *msgid_plural,
+           const char *msgstr, size_t msgstr_len,
+           const lex_pos_ty *msgstr_pos, enum is_format is_format[NFORMATS])
 {
   int has_newline;
   size_t i;
@@ -1258,8 +1213,7 @@ check_pair (msgid, msgid_pos, msgid_plural, msgstr, msgstr_len, msgstr_pos,
 
 /* Perform miscellaneous checks on a header entry.  */
 static void
-check_header_entry (msgstr_string)
-     const char *msgstr_string;
+check_header_entry (const char *msgstr_string)
 {
   static const char *required_fields[] =
   {
@@ -1323,8 +1277,7 @@ field `%s' still has initial default value\n"),
 
 /* Prepare for first message.  */
 static void
-format_constructor (that)
-     po_ty *that;
+format_constructor (po_ty *that)
 {
   msgfmt_class_ty *this = (msgfmt_class_ty *) that;
   size_t i;
@@ -1340,8 +1293,7 @@ format_constructor (that)
 
 /* Some checks after whole file is read.  */
 static void
-format_debrief (that)
-     po_ty *that;
+format_debrief (po_ty *that)
 {
   msgfmt_class_ty *this = (msgfmt_class_ty *) that;
 
@@ -1375,9 +1327,7 @@ warning: older versions of msgfmt will give an error on this\n")));
 
 /* Process `domain' directive from .po file.  */
 static void
-format_directive_domain (pop, name)
-     po_ty *pop;
-     char *name;
+format_directive_domain (po_ty *pop, char *name)
 {
   /* If no output file was given, we change it with each `domain'
      directive.  */
@@ -1417,16 +1367,13 @@ domain name \"%s\" not suitable as file name: will use prefix"), name);
 
 /* Process `msgid'/`msgstr' pair from .po file.  */
 static void
-format_directive_message (that, msgid_string, msgid_pos, msgid_plural,
-                         msgstr_string, msgstr_len, msgstr_pos, obsolete)
-     po_ty *that;
-     char *msgid_string;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr_string;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+format_directive_message (po_ty *that,
+                         char *msgid_string,
+                         lex_pos_ty *msgid_pos,
+                         char *msgid_plural,
+                         char *msgstr_string, size_t msgstr_len,
+                         lex_pos_ty *msgstr_pos,
+                         bool obsolete)
 {
   msgfmt_class_ty *this = (msgfmt_class_ty *) that;
   message_ty *mp;
@@ -1535,9 +1482,7 @@ format_directive_message (that, msgid_string, msgid_pos, msgid_plural,
 
 /* Test for `#, fuzzy' comments and warn.  */
 static void
-format_comment_special (that, s)
-     po_ty *that;
-     const char *s;
+format_comment_special (po_ty *that, const char *s)
 {
   msgfmt_class_ty *this = (msgfmt_class_ty *) that;
   bool fuzzy;
@@ -1585,8 +1530,7 @@ static po_method_ty format_methods =
 
 /* Read .po file FILENAME and store translation pairs.  */
 static void
-read_po_file (filename)
-     char *filename;
+read_po_file (char *filename)
 {
   po_ty *pop;
 
index 0b8fbdbd7bdeb9e01354ff59ff2fc49de33ed150..9197bb8eefa629b2180901637c066d44e479b960 100644 (file)
@@ -106,28 +106,22 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void no_pass PARAMS ((int opt));
-static void usage PARAMS ((int status));
-static bool filename_list_match PARAMS ((const string_list_ty *slp,
-                                        const char *filename));
-#ifdef EINTR
-static inline int nonintr_close PARAMS ((int fd));
+/* Forward declaration of local functions.  */
+static void no_pass (int opt)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
 #endif
-static bool is_string_selected PARAMS ((int grep_pass, const char *str,
-                                       size_t len));
-static bool is_message_selected PARAMS ((const message_ty *mp));
-static void process_message_list PARAMS ((const char *domain,
-                                         message_list_ty *mlp));
-static msgdomain_list_ty *
-       process_msgdomain_list PARAMS ((msgdomain_list_ty *mdlp));
+;
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
+static msgdomain_list_ty *process_msgdomain_list (msgdomain_list_ty *mdlp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -383,8 +377,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 
 static void
-no_pass (opt)
-     int opt;
+no_pass (int opt)
 {
   error (EXIT_SUCCESS, 0,
         _("option '%c' cannot be used before 'K' or 'T' has been specified"),
@@ -395,8 +388,7 @@ no_pass (opt)
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -500,9 +492,7 @@ Informative output:\n\
 /* Return 1 if FILENAME is contained in a list of filename patterns,
    0 otherwise.  */
 static bool
-filename_list_match (slp, filename)
-     const string_list_ty *slp;
-     const char *filename;
+filename_list_match (const string_list_ty *slp, const char *filename)
 {
   size_t j;
 
@@ -520,8 +510,7 @@ filename_list_match (slp, filename)
    signal handlers set up, namely when we get interrupted via SIGSTOP.  */
 
 static inline int
-nonintr_close (fd)
-     int fd;
+nonintr_close (int fd)
 {
   int retval;
 
@@ -539,10 +528,7 @@ nonintr_close (fd)
 /* Process a string STR of size LEN bytes through grep, and return true
    if it matches.  */
 static bool
-is_string_selected (grep_pass, str, len)
-     int grep_pass;
-     const char *str;
-     size_t len;
+is_string_selected (int grep_pass, const char *str, size_t len)
 {
   if (grep_args[grep_pass]->nitems > 0)
     {
@@ -573,8 +559,7 @@ is_string_selected (grep_pass, str, len)
 
 /* Return true if a message matches.  */
 static bool
-is_message_selected (mp)
-     const message_ty *mp;
+is_message_selected (const message_ty *mp)
 {
   size_t i;
   const char *msgstr;
@@ -646,9 +631,7 @@ is_message_selected (mp)
 
 
 static void
-process_message_list (domain, mlp)
-     const char *domain;
-     message_list_ty *mlp;
+process_message_list (const char *domain, message_list_ty *mlp)
 {
   if (string_list_member (domain_names, domain))
     /* Keep all the messages in the list.  */
@@ -660,8 +643,7 @@ process_message_list (domain, mlp)
 
 
 static msgdomain_list_ty *
-process_msgdomain_list (mdlp)
-     msgdomain_list_ty *mdlp;
+process_msgdomain_list (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
index d443c2ad0976473d8c40fd439011bf12d815226b..07b7e026cffde83d86f0d47a991bb01afa699f18 100644 (file)
 
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
 
-extern const char * locale_charset PARAMS ((void));
-extern const char * _nl_locale_name PARAMS ((int category,
-                                            const char *categoryname));
-extern const char * _nl_expand_alias PARAMS ((const char *name));
+extern const char * locale_charset (void);
+extern const char * _nl_locale_name (int category, const char *categoryname);
+extern const char * _nl_expand_alias (const char *name);
 
 /* Locale name.  */
 static const char *locale;
@@ -125,48 +124,21 @@ static const struct option long_options[] =
   { NULL, 0, NULL, 0 }
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static const char *find_pot PARAMS ((void));
-static const char *catalogname_for_locale PARAMS ((const char *locale));
-static const char *language_of_locale PARAMS ((const char *locale));
-static const char *canonical_locale_charset PARAMS ((void));
-static const char *englishname_of_language PARAMS ((void));
-static const char *project_id PARAMS ((void));
-static const char *project_id_version PARAMS ((void));
-static const char *po_revision_date PARAMS ((const char *header));
-static struct passwd *get_user_pwd PARAMS ((void));
-static const char *get_user_fullname PARAMS ((void));
-static const char *get_user_email PARAMS ((void));
-static const char *last_translator PARAMS ((void));
-static const char *language_team_address PARAMS ((void));
-static const char *language_team PARAMS ((void));
-static const char *mime_version PARAMS ((void));
-static const char *content_type PARAMS ((const char *header));
-static const char *content_transfer_encoding PARAMS ((void));
-static const char *plural_forms PARAMS ((void));
-static char *get_field PARAMS ((const char *header, const char *field));
-static char *put_field PARAMS ((const char *old_header, const char *field,
-                               const char *value));
-static const char *get_title PARAMS ((void));
-static const char *subst_string PARAMS ((const char *str,
-                                        unsigned int nsubst,
-                                        const char *(*subst)[2]));
-static void subst_string_list PARAMS ((string_list_ty *slp,
-                                      unsigned int nsubst,
-                                      const char *(*subst)[2]));
-static msgdomain_list_ty *fill_header PARAMS ((msgdomain_list_ty *mdlp));
+static const char *find_pot (void);
+static const char *catalogname_for_locale (const char *locale);
+static const char *language_of_locale (const char *locale);
+static char *get_field (const char *header, const char *field);
+static msgdomain_list_ty *fill_header (msgdomain_list_ty *mdlp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -342,8 +314,7 @@ the output .po file through the --output-file option.\n"),
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -473,8 +444,7 @@ Please specify the input .pot file through the --input option.\n")));
    because the resulting catalog can be used as a default for all "de_XX",
    such as "de_AT".  */
 static const char *
-catalogname_for_locale (locale)
-     const char *locale;
+catalogname_for_locale (const char *locale)
 {
   static const char *locales_with_principal_territory[] = {
                /* Language     Main territory */
@@ -624,8 +594,7 @@ catalogname_for_locale (locale)
 
 /* Return the language of a locale.  */
 static const char *
-language_of_locale (locale)
-     const char *locale;
+language_of_locale (const char *locale)
 {
   const char *language_end;
 
@@ -982,8 +951,7 @@ project_id_version ()
 
 /* Construct the value for the PO-Revision-Date field.  */
 static const char *
-po_revision_date (header)
-     const char *header;
+po_revision_date (const char *header)
 {
   if (no_translator)
     /* Because the PO file is automatically generated, we use the
@@ -1214,8 +1182,7 @@ mime_version ()
 
 /* Construct the value for the Content-Type field.  */
 static const char *
-content_type (header)
-     const char *header;
+content_type (const char *header)
 {
   bool was_utf8;
   const char *old_field;
@@ -1272,8 +1239,8 @@ plural_forms ()
 static struct
 {
   const char *name;
-  const char * (*getter0) PARAMS ((void));
-  const char * (*getter1) PARAMS ((const char *header));
+  const char * (*getter0) (void);
+  const char * (*getter1) (const char *header);
 }
 fields[] =
   {
@@ -1293,9 +1260,7 @@ fields[] =
 
 /* Retrieve a freshly allocated copy of a field's value.  */
 static char *
-get_field (header, field)
-     const char *header;
-     const char *field;
+get_field (const char *header, const char *field)
 {
   size_t len = strlen (field);
   const char *line;
@@ -1333,10 +1298,7 @@ get_field (header, field)
 
 /* Add a field with value to a header, and return the new header.  */
 static char *
-put_field (old_header, field, value)
-     const char *old_header;
-     const char *field;
-     const char *value;
+put_field (const char *old_header, const char *field, const char *value)
 {
   size_t len = strlen (field);
   const char *line;
@@ -1491,10 +1453,8 @@ get_title ()
    string.  When subst[j][0] found, it is replaced with subst[j][1].
    subst[j][0] must not be the empty string.  */
 static const char *
-subst_string (str, nsubst, subst)
-     const char *str;
-     unsigned int nsubst;
-     const char *(*subst)[2];
+subst_string (const char *str,
+             unsigned int nsubst, const char *(*subst)[2])
 {
   if (nsubst > 0)
     {
@@ -1544,10 +1504,8 @@ subst_string (str, nsubst, subst)
    When subst[j][0] found, it is replaced with subst[j][1].  subst[j][0]
    must not be the empty string.  */
 static void
-subst_string_list (slp, nsubst, subst)
-     string_list_ty *slp;
-     unsigned int nsubst;
-     const char *(*subst)[2];
+subst_string_list (string_list_ty *slp,
+                  unsigned int nsubst, const char *(*subst)[2])
 {
   size_t j;
 
@@ -1558,8 +1516,7 @@ subst_string_list (slp, nsubst, subst)
 
 /* Fill the templates in all fields of the header entry.  */
 static msgdomain_list_ty *
-fill_header (mdlp)
-     msgdomain_list_ty *mdlp;
+fill_header (msgdomain_list_ty *mdlp)
 {
   /* Cache the strings filled in, for use when there are multiple domains
      and a header entry for each domain.  */
index b43aca7e0dadc240b47eac97b4bab8f856da8e51..90c401b5fa8cc00352d3a5723a76573a6c942208 100644 (file)
@@ -31,8 +31,7 @@
 
 
 bool
-is_ascii_string (string)
-     const char *string;
+is_ascii_string (const char *string)
 {
   for (; *string; string++)
     if (!c_isascii ((unsigned char) *string))
@@ -41,8 +40,7 @@ is_ascii_string (string)
 }
 
 bool
-is_ascii_string_list (slp)
-     string_list_ty *slp;
+is_ascii_string_list (string_list_ty *slp)
 {
   size_t i;
 
@@ -54,8 +52,7 @@ is_ascii_string_list (slp)
 }
 
 bool
-is_ascii_message (mp)
-     message_ty *mp;
+is_ascii_message (message_ty *mp)
 {
   const char *p = mp->msgstr;
   const char *p_end = p + mp->msgstr_len;
@@ -80,8 +77,7 @@ is_ascii_message (mp)
 }
 
 bool
-is_ascii_message_list (mlp)
-     message_list_ty *mlp;
+is_ascii_message_list (message_list_ty *mlp)
 {
   size_t j;
 
index fcb47b2b194424390d0af339dfc5287732007475..c4e9bd2d4dccc4529271942803be57ecb6556273 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list test for ASCII character set.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 #include <stdbool.h>
 
 extern bool
-       is_ascii_string PARAMS ((const char *string));
+       is_ascii_string (const char *string);
 extern bool
-       is_ascii_string_list PARAMS ((string_list_ty *slp));
+       is_ascii_string_list (string_list_ty *slp);
 extern bool
-       is_ascii_message PARAMS ((message_ty *mp));
+       is_ascii_message (message_ty *mp);
 extern bool
-       is_ascii_message_list PARAMS ((message_list_ty *mlp));
+       is_ascii_message_list (message_list_ty *mlp);
 
 #endif /* _MSGL_ASCII_H */
index d1807e3780744722ae3e53eaf3f6bafd367ddb59..659e1d403b64b64d1c19b4230737c8d84c6fe9bc 100644 (file)
@@ -63,16 +63,8 @@ bool msgcomm_mode = false;
 bool omit_header = false;
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static bool is_message_selected PARAMS ((const message_ty *tmp));
-static bool is_message_needed PARAMS ((const message_ty *tmp));
-static bool is_message_first_needed PARAMS ((const message_ty *tmp));
-
-
 static bool
-is_message_selected (tmp)
-     const message_ty *tmp;
+is_message_selected (const message_ty *tmp)
 {
   int used = (tmp->used >= 0 ? tmp->used : - tmp->used);
 
@@ -83,8 +75,7 @@ is_message_selected (tmp)
 
 
 static bool
-is_message_needed (mp)
-     const message_ty *mp;
+is_message_needed (const message_ty *mp)
 {
   if (!msgcomm_mode
       && ((mp->msgid[0] != '\0' && mp->is_fuzzy) || mp->msgstr[0] == '\0'))
@@ -98,8 +89,7 @@ is_message_needed (mp)
 
 /* The use_first logic.  */
 static bool
-is_message_first_needed (mp)
-     const message_ty *mp;
+is_message_first_needed (const message_ty *mp)
 {
   if (mp->tmp->obsolete && is_message_needed (mp))
     {
@@ -112,9 +102,7 @@ is_message_first_needed (mp)
 
 
 msgdomain_list_ty *
-catenate_msgdomain_list (file_list, to_code)
-     string_list_ty *file_list;
-     const char *to_code;
+catenate_msgdomain_list (string_list_ty *file_list, const char *to_code)
 {
   const char * const *files = file_list->item;
   size_t nfiles = file_list->nitems;
index 3a76b5846d919c387ac30e876500dcc07ded29da..7b6f9747752b0bdb4ec6439bc69439f02c0fa4ad 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list concatenation and duplicate handling.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@ extern bool msgcomm_mode;
 extern bool omit_header;
 
 extern msgdomain_list_ty *
-       catenate_msgdomain_list PARAMS ((string_list_ty *file_list,
-                                       const char *to_code));
+       catenate_msgdomain_list (string_list_ty *file_list,
+                               const char *to_code);
 
 #endif /* _MSGL_CAT_H */
index 850ddc8018e7f1a813ac105acb7d30702e88f221..269c4e905ac470000110d70aa306d1939e79f6d5 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list charset and locale charset handling.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
 
 #define _(str) gettext (str)
 
-extern const char * locale_charset PARAMS ((void));
+extern const char * locale_charset (void);
 
 void
-compare_po_locale_charsets (mdlp)
-     const msgdomain_list_ty *mdlp;
+compare_po_locale_charsets (const msgdomain_list_ty *mdlp)
 {
   const char *locale_code;
   const char *canon_locale_code;
index 6c29df23c1ccb9b01adb01285322905057896ca5..7fe28b3855798e534c293a6f911fb77c3440353a 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list charset and locale charset handling.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,6 @@
 #include "message.h"
 
 extern void
-       compare_po_locale_charsets PARAMS ((const msgdomain_list_ty *mdlp));
+       compare_po_locale_charsets (const msgdomain_list_ty *mdlp);
 
 #endif /* _MSGL_CHARSET_H */
index 9a07071f99fb4f0d230287691cfd0dfc45e34ab5..8c92df628808a554536f08413bf8f285208320c9 100644 (file)
@@ -1,5 +1,5 @@
 /* Message translation initialization for English.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -30,8 +30,7 @@
 
 
 msgdomain_list_ty *
-msgdomain_list_english (mdlp)
-     msgdomain_list_ty *mdlp;
+msgdomain_list_english (msgdomain_list_ty *mdlp)
 {
   size_t j, k;
 
index dec694825161b7c17225354845f0c7856e77b861..c3f1128f28c6f4a69bb94844266994e1c4211b62 100644 (file)
@@ -1,5 +1,5 @@
 /* Message translation initialization for English.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,6 @@
 #include "message.h"
 
 extern msgdomain_list_ty *
-       msgdomain_list_english PARAMS ((msgdomain_list_ty *mdlp));
+       msgdomain_list_english (msgdomain_list_ty *mdlp);
 
 #endif /* _MSGL_ENGLISH_H */
index 1252af9e57dc67d72f193dcd5a6ead17d062420e..b1ab7b7fa2ea55f253a7475d042ad5668e717d83 100644 (file)
 #include <string.h>
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static inline bool msgstr_equal PARAMS ((const char *msgstr1,
-                                        size_t msgstr1_len,
-                                        const char *msgstr2,
-                                        size_t msgstr2_len));
-static inline bool msgstr_equal_ignoring_potcdate PARAMS ((const char *msgstr1,
-                                                          size_t msgstr1_len,
-                                                          const char *msgstr2,
-                                                          size_t msgstr2_len));
-static inline bool pos_equal PARAMS ((const lex_pos_ty *pos1,
-                                     const lex_pos_ty *pos2));
-static inline bool msgdomain_equal PARAMS ((const msgdomain_ty *mdp1,
-                                           const msgdomain_ty *mdp2,
-                                           bool ignore_potcdate));
-
-
 static inline bool
-msgstr_equal (msgstr1, msgstr1_len, msgstr2, msgstr2_len)
-     const char *msgstr1;
-     size_t msgstr1_len;
-     const char *msgstr2;
-     size_t msgstr2_len;
+msgstr_equal (const char *msgstr1, size_t msgstr1_len,
+             const char *msgstr2, size_t msgstr2_len)
 {
   return (msgstr1_len == msgstr2_len
          && memcmp (msgstr1, msgstr2, msgstr1_len) == 0);
 }
 
 static bool
-msgstr_equal_ignoring_potcdate (msgstr1, msgstr1_len, msgstr2, msgstr2_len)
-     const char *msgstr1;
-     size_t msgstr1_len;
-     const char *msgstr2;
-     size_t msgstr2_len;
+msgstr_equal_ignoring_potcdate (const char *msgstr1, size_t msgstr1_len,
+                               const char *msgstr2, size_t msgstr2_len)
 {
   const char *msgstr1_end = msgstr1 + msgstr1_len;
   const char *msgstr2_end = msgstr2 + msgstr2_len;
@@ -131,9 +108,7 @@ msgstr_equal_ignoring_potcdate (msgstr1, msgstr1_len, msgstr2, msgstr2_len)
 }
 
 static inline bool
-pos_equal (pos1, pos2)
-     const lex_pos_ty *pos1;
-     const lex_pos_ty *pos2;
+pos_equal (const lex_pos_ty *pos1, const lex_pos_ty *pos2)
 {
   return ((pos1->file_name == pos2->file_name
           || strcmp (pos1->file_name, pos2->file_name) == 0)
@@ -141,9 +116,7 @@ pos_equal (pos1, pos2)
 }
 
 bool
-string_list_equal (slp1, slp2)
-     const string_list_ty *slp1;
-     const string_list_ty *slp2;
+string_list_equal (const string_list_ty *slp1, const string_list_ty *slp2)
 {
   size_t i, i1, i2;
 
@@ -158,10 +131,8 @@ string_list_equal (slp1, slp2)
 }
 
 bool
-message_equal (mp1, mp2, ignore_potcdate)
-     const message_ty *mp1;
-     const message_ty *mp2;
-     bool ignore_potcdate;
+message_equal (const message_ty *mp1, const message_ty *mp2,
+              bool ignore_potcdate)
 {
   size_t i, i1, i2;
 
@@ -212,10 +183,8 @@ message_equal (mp1, mp2, ignore_potcdate)
 }
 
 bool
-message_list_equal (mlp1, mlp2, ignore_potcdate)
-     const message_list_ty *mlp1;
-     const message_list_ty *mlp2;
-     bool ignore_potcdate;
+message_list_equal (const message_list_ty *mlp1, const message_list_ty *mlp2,
+                   bool ignore_potcdate)
 {
   size_t i, i1, i2;
 
@@ -230,10 +199,8 @@ message_list_equal (mlp1, mlp2, ignore_potcdate)
 }
 
 static inline bool
-msgdomain_equal (mdp1, mdp2, ignore_potcdate)
-     const msgdomain_ty *mdp1;
-     const msgdomain_ty *mdp2;
-     bool ignore_potcdate;
+msgdomain_equal (const msgdomain_ty *mdp1, const msgdomain_ty *mdp2,
+                bool ignore_potcdate)
 {
   return (strcmp (mdp1->domain, mdp2->domain) == 0
          && message_list_equal (mdp1->messages, mdp2->messages,
@@ -241,10 +208,9 @@ msgdomain_equal (mdp1, mdp2, ignore_potcdate)
 }
 
 bool
-msgdomain_list_equal (mdlp1, mdlp2, ignore_potcdate)
-     const msgdomain_list_ty *mdlp1;
-     const msgdomain_list_ty *mdlp2;
-     bool ignore_potcdate;
+msgdomain_list_equal (const msgdomain_list_ty *mdlp1,
+                     const msgdomain_list_ty *mdlp2,
+                     bool ignore_potcdate)
 {
   size_t i, i1, i2;
 
index c131b2ded4dbf75afcc4520c171278d79ccb384f..5eafa00ef4260452c2221f8579f003a49165c1b3 100644 (file)
 #include <stdbool.h>
 
 extern bool
-       string_list_equal PARAMS ((const string_list_ty *slp1,
-                                 const string_list_ty *slp2));
+       string_list_equal (const string_list_ty *slp1,
+                         const string_list_ty *slp2);
 
 /* Test whether the written representation of two messages / message lists
    would be the same.  */
 
 extern bool
-       message_equal PARAMS ((const message_ty *mp1, const message_ty *mp2,
-                             bool ignore_potcdate));
+       message_equal (const message_ty *mp1, const message_ty *mp2,
+                     bool ignore_potcdate);
 extern bool
-       message_list_equal PARAMS ((const message_list_ty *mlp1,
-                                  const message_list_ty *mlp2,
-                                  bool ignore_potcdate));
+       message_list_equal (const message_list_ty *mlp1,
+                          const message_list_ty *mlp2,
+                          bool ignore_potcdate);
 extern bool
-       msgdomain_list_equal PARAMS ((const msgdomain_list_ty *mdlp1,
-                                    const msgdomain_list_ty *mdlp2,
-                                    bool ignore_potcdate));
+       msgdomain_list_equal (const msgdomain_list_ty *mdlp1,
+                            const msgdomain_list_ty *mdlp2,
+                            bool ignore_potcdate);
 
 #endif /* _MSGL_EQUAL_H */
index 61633b5e1393d486cabb651ce9a75f2eef14212b..97616d692a70b2fc8df5bcef989f9cb0e465d45e 100644 (file)
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-#if HAVE_ICONV
-static int iconv_string PARAMS ((iconv_t cd,
-                                const char *start, const char *end,
-                                char **resultp, size_t *lengthp));
-static void convert_string_list PARAMS ((iconv_t cd, string_list_ty *slp));
-static void convert_msgid PARAMS ((iconv_t cd, message_ty *mp));
-static void convert_msgstr PARAMS ((iconv_t cd, message_ty *mp));
-#endif
-
-
 #if HAVE_ICONV
 
 /* Converts an entire string from one encoding to another, using iconv.
    Return value: 0 if successful, otherwise -1 and errno set.  */
 static int
-iconv_string (cd, start, end, resultp, lengthp)
-     iconv_t cd;
-     const char *start;
-     const char *end;
-     char **resultp;
-     size_t *lengthp;
+iconv_string (iconv_t cd, const char *start, const char *end,
+             char **resultp, size_t *lengthp)
 {
 #define tmpbufsize 4096
   size_t length;
@@ -185,9 +169,7 @@ iconv_string (cd, start, end, resultp, lengthp)
 }
 
 char *
-convert_string (cd, string)
-     iconv_t cd;
-     const char *string;
+convert_string (iconv_t cd, const char *string)
 {
   size_t len = strlen (string) + 1;
   char *result = NULL;
@@ -205,9 +187,7 @@ convert_string (cd, string)
 }
 
 static void
-convert_string_list (cd, slp)
-     iconv_t cd;
-     string_list_ty *slp;
+convert_string_list (iconv_t cd, string_list_ty *slp)
 {
   size_t i;
 
@@ -217,9 +197,7 @@ convert_string_list (cd, slp)
 }
 
 static void
-convert_msgid (cd, mp)
-     iconv_t cd;
-     message_ty *mp;
+convert_msgid (iconv_t cd, message_ty *mp)
 {
   mp->msgid = convert_string (cd, mp->msgid);
   if (mp->msgid_plural != NULL)
@@ -227,9 +205,7 @@ convert_msgid (cd, mp)
 }
 
 static void
-convert_msgstr (cd, mp)
-     iconv_t cd;
-     message_ty *mp;
+convert_msgstr (iconv_t cd, message_ty *mp)
 {
   char *result = NULL;
   size_t resultlen;
@@ -270,11 +246,9 @@ convert_msgstr (cd, mp)
 
 
 void
-iconv_message_list (mlp, canon_from_code, canon_to_code, from_filename)
-     message_list_ty *mlp;
-     const char *canon_from_code;
-     const char *canon_to_code;
-     const char *from_filename;
+iconv_message_list (message_list_ty *mlp,
+                   const char *canon_from_code, const char *canon_to_code,
+                   const char *from_filename)
 {
   bool canon_from_code_overridden = (canon_from_code != NULL);
   size_t j;
@@ -402,10 +376,9 @@ This version was built without iconv()."),
 }
 
 msgdomain_list_ty *
-iconv_msgdomain_list (mdlp, to_code, from_filename)
-     msgdomain_list_ty *mdlp;
-     const char *to_code;
-     const char *from_filename;
+iconv_msgdomain_list (msgdomain_list_ty *mdlp,
+                     const char *to_code,
+                     const char *from_filename)
 {
   const char *canon_to_code;
   size_t k;
index 976427ada8607b115001d2e9d254311b8aa2f0b8..0428452f945e2dc9bc862836b9b9d90ed58f0c53 100644 (file)
@@ -27,7 +27,7 @@
 
 #if HAVE_ICONV
 /* Converts the STRING through the conversion descriptor CD.  */
-extern char *convert_string PARAMS ((iconv_t cd, const char *string));
+extern char *convert_string (iconv_t cd, const char *string);
 #endif
 
 /* Converts the message list MLP to the (already canonicalized) encoding
@@ -35,15 +35,15 @@ extern char *convert_string PARAMS ((iconv_t cd, const char *string));
    can be passed as CANON_FROM_CODE; if NULL is passed instead, the
    encoding is looked up in the header entry.  */
 extern void
-       iconv_message_list PARAMS ((message_list_ty *mlp,
-                                  const char *canon_from_code,
-                                  const char *canon_to_code,
-                                  const char *from_filename));
+       iconv_message_list (message_list_ty *mlp,
+                          const char *canon_from_code,
+                          const char *canon_to_code,
+                          const char *from_filename);
 
 /* Converts all the message lists in MDLP to the encoding TO_CODE.  */
 extern msgdomain_list_ty *
-       iconv_msgdomain_list PARAMS ((msgdomain_list_ty *mdlp,
-                                    const char *to_code,
-                                    const char *from_filename));
+       iconv_msgdomain_list (msgdomain_list_ty *mdlp,
+                            const char *to_code,
+                            const char *from_filename);
 
 #endif /* _MSGL_ICONV_H */
index adae8060ef818bd1d90c5c3c3d27fb5a45901abe..90fa9726f0df52afdb5e7ffb1ee7537737448f53 100644 (file)
@@ -113,30 +113,19 @@ struct statistics
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
-static void compendium PARAMS ((const char *filename));
-static bool msgfmt_check_pair_fails PARAMS ((const lex_pos_ty *pos,
-                                            const char *msgid,
-                                            const char *msgid_plural,
-                                            const char *msgstr,
-                                            size_t msgstr_len, size_t fmt));
-static message_ty *message_merge PARAMS ((message_ty *def, message_ty *ref));
-static void match_domain PARAMS ((const char *fn1, const char *fn2,
-                                 message_list_list_ty *definitions,
-                                 message_list_ty *refmlp,
-                                 message_list_ty *resultmlp,
-                                 struct statistics *stats,
-                                 unsigned int *processed));
-static msgdomain_list_ty *merge PARAMS ((const char *fn1, const char *fn2,
-                                        msgdomain_list_ty **defp));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
+static void compendium (const char *filename);
+static msgdomain_list_ty *merge (const char *fn1, const char *fn2,
+                                msgdomain_list_ty **defp);
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int opt;
   bool do_help;
@@ -382,8 +371,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -495,8 +483,7 @@ Informative output:\n\
 
 
 static void
-compendium (filename)
-    const char *filename;
+compendium (const char *filename)
 {
   msgdomain_list_ty *mdlp;
   size_t k;
@@ -510,13 +497,10 @@ compendium (filename)
 
 
 static bool
-msgfmt_check_pair_fails (pos, msgid, msgid_plural, msgstr, msgstr_len, fmt)
-     const lex_pos_ty *pos;
-     const char *msgid;
-     const char *msgid_plural;
-     const char *msgstr;
-     size_t msgstr_len;
-     size_t fmt;
+msgfmt_check_pair_fails (const lex_pos_ty *pos,
+                        const char *msgid, const char *msgid_plural,
+                        const char *msgstr, size_t msgstr_len,
+                        size_t fmt)
 {
   bool failure;
   struct formatstring_parser *parser = formatstring_parsers[fmt];
@@ -554,9 +538,7 @@ msgfmt_check_pair_fails (pos, msgid, msgid_plural, msgstr, msgstr_len, fmt)
 
 
 static message_ty *
-message_merge (def, ref)
-     message_ty *def;
-     message_ty *ref;
+message_merge (message_ty *def, message_ty *ref)
 {
   const char *msgstr;
   size_t msgstr_len;
@@ -804,14 +786,10 @@ message_merge (def, ref)
 #define DOT_FREQUENCY 10
 
 static void
-match_domain (fn1, fn2, definitions, refmlp, resultmlp, stats, processed)
-     const char *fn1;
-     const char *fn2;
-     message_list_list_ty *definitions;
-     message_list_ty *refmlp;
-     message_list_ty *resultmlp;
-     struct statistics *stats;
-     unsigned int *processed;
+match_domain (const char *fn1, const char *fn2,
+             message_list_list_ty *definitions, message_list_ty *refmlp,
+             message_list_ty *resultmlp,
+             struct statistics *stats, unsigned int *processed)
 {
   size_t j;
 
@@ -977,10 +955,7 @@ this message should not define plural forms"));
 }
 
 static msgdomain_list_ty *
-merge (fn1, fn2, defp)
-     const char *fn1;                  /* definitions */
-     const char *fn2;                  /* references */
-     msgdomain_list_ty **defp;         /* return definition list */
+merge (const char *fn1, const char *fn2, msgdomain_list_ty **defp)
 {
   msgdomain_list_ty *def;
   msgdomain_list_ty *ref;
index fcfbabd9abedf709cce1f4b0481c5bc69612ef49..eb650b16d49beb0eded7d3b107441a6d28ab9260 100644 (file)
@@ -81,15 +81,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int optchar;
   bool do_help = false;
@@ -307,8 +308,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index bc88e7eeb0a307058bdb6b1377f1940e50c2cb4a..29b8748f34fa40ced415e6ad92f45b3b0380785a 100644 (file)
@@ -74,15 +74,16 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status));
+/* Forward declaration of local functions.  */
+static void usage (int status)
+#if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
+       __attribute__ ((noreturn))
+#endif
+;
 
 
 int
-main (argc, argv)
-     int argc;
-     char **argv;
+main (int argc, char **argv)
 {
   int optchar;
   bool do_help;
@@ -267,8 +268,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
index b266a6b7ff2b7321fe0b90aea9615bdc2b9d58b4..989e0ff66d400da494764bba0e44586695ca4df9 100644 (file)
@@ -51,19 +51,16 @@ static const struct option long_options[] =
   { NULL, 0, NULL, 0 }
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static const char *expand_escape PARAMS ((const char *str));
+static const char *expand_escape (const char *str);
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   const char *msgid;
@@ -203,8 +200,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -250,8 +246,7 @@ Standard search directory: %s\n"),
 
 /* Expand some escape sequences found in the argument string.  */
 static const char *
-expand_escape (str)
-     const char *str;
+expand_escape (const char *str)
 {
   char *retval, *rp;
   const char *cp = str;
index b1aa0f6fc58938e4417147d937fef5807c846d2b..70a1e31ae74f00e3b3f1745b31e6b6cbb62df279 100644 (file)
@@ -44,9 +44,7 @@
    file's pathname is returned in *REAL_FILE_NAME_P, for error message
    purposes.  */
 FILE *
-open_po_file (input_name, real_file_name_p)
-     const char *input_name;
-     char **real_file_name_p;
+open_po_file (const char *input_name, char **real_file_name_p)
 {
   static const char *extension[] = { "", ".po", ".pot", };
   char *file_name;
index 556168a0019feb13bbbd4aafb9efe8a01bb85391..1a4d25375d7cb5d124deb7d90ea50c89be194cb7 100644 (file)
@@ -1,5 +1,5 @@
 /* Opening PO files.
-   Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1997, 2000-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,7 +25,6 @@
    not found, the list of directories in "dir-list.h" is searched.  The
    file's pathname is returned in *REAL_FILE_NAME_P, for error message
    purposes.  */
-extern FILE *open_po_file PARAMS ((const char *input_name,
-                                  char **real_file_name_p));
+extern FILE *open_po_file (const char *input_name, char **real_file_name_p);
 
 #endif /* _OPEN_PO_H */
index f3d73686d86add27f5b05b3509ed5df3133dbfab..79cfbeea70df152f258f29550fa1f505efb52e20 100644 (file)
@@ -51,8 +51,7 @@ const char *po_charset_utf8 = utf8;
 
 /* Canonicalize an encoding name.  */
 const char *
-po_charset_canonicalize (charset)
-     const char *charset;
+po_charset_canonicalize (const char *charset)
 {
   /* The list of charsets supported by glibc's iconv() and by the portable
      iconv() across platforms.  Taken from intl/config.charset.  */
@@ -113,8 +112,7 @@ po_charset_canonicalize (charset)
 
 /* Test for ASCII compatibility.  */
 bool
-po_charset_ascii_compatible (canon_charset)
-     const char *canon_charset;
+po_charset_ascii_compatible (const char *canon_charset)
 {
   /* There are only a few exceptions to ASCII compatibility.  */
   if (strcmp (canon_charset, "SHIFT_JIS") == 0
@@ -127,8 +125,7 @@ po_charset_ascii_compatible (canon_charset)
 
 /* Test for a weird encoding, i.e. an encoding which has double-byte
    characters ending in 0x5C.  */
-bool po_is_charset_weird (canon_charset)
-     const char *canon_charset;
+bool po_is_charset_weird (const char *canon_charset)
 {
   static const char *weird_charsets[] =
   {
@@ -151,8 +148,7 @@ bool po_is_charset_weird (canon_charset)
    An encoding has CJK structure if every valid character stream is composed
    of single bytes in the range 0x{00..7F} and of byte pairs in the range
    0x{80..FF}{30..FF}.  */
-bool po_is_charset_weird_cjk (canon_charset)
-     const char *canon_charset;
+bool po_is_charset_weird_cjk (const char *canon_charset)
 {
   static const char *weird_cjk_charsets[] =
   {                    /* single bytes   double bytes       */
@@ -194,9 +190,7 @@ po_lex_charset_init ()
 }
 
 void
-po_lex_charset_set (header_entry, filename)
-     const char *header_entry;
-     const char *filename;
+po_lex_charset_set (const char *header_entry, const char *filename)
 {
   /* Verify the validity of CHARSET.  It is necessary
      1. for the correct treatment of multibyte characters containing
index dfc7f6f05b8ea5e26f37db831c93bd724fb0e573..9b03a0dfca3b75c67df2f6a7dff80174dca3d86a 100644 (file)
@@ -28,7 +28,7 @@
 /* Canonicalize an encoding name.
    The results of this function are statically allocated and can be
    compared using ==.  */
-extern const char *po_charset_canonicalize PARAMS ((const char *charset));
+extern const char *po_charset_canonicalize (const char *charset);
 
 /* The canonicalized encoding name for ASCII.  */
 extern const char *po_charset_ascii;
@@ -37,17 +37,17 @@ extern const char *po_charset_ascii;
 extern const char *po_charset_utf8;
 
 /* Test for ASCII compatibility.  */
-extern bool po_charset_ascii_compatible PARAMS ((const char *canon_charset));
+extern bool po_charset_ascii_compatible (const char *canon_charset);
 
 /* Test for a weird encoding, i.e. an encoding which has double-byte
    characters ending in 0x5C.  */
-extern bool po_is_charset_weird PARAMS ((const char *canon_charset));
+extern bool po_is_charset_weird (const char *canon_charset);
 
 /* Test for a weird CJK encoding, i.e. a weird encoding with CJK structure.
    An encoding has CJK structure if every valid character stream is composed
    of single bytes in the range 0x{00..7F} and of byte pairs in the range
    0x{80..FF}{30..FF}.  */
-extern bool po_is_charset_weird_cjk PARAMS ((const char *canon_charset));
+extern bool po_is_charset_weird_cjk (const char *canon_charset);
 
 
 /* The PO file's encoding, as specified in the header entry.  */
@@ -62,13 +62,13 @@ extern iconv_t po_lex_iconv;
 extern bool po_lex_weird_cjk;
 
 /* Initialize the PO file's encoding.  */
-extern void po_lex_charset_init PARAMS ((void));
+extern void po_lex_charset_init (void);
 
 /* Set the PO file's encoding from the header entry.  */
-extern void po_lex_charset_set PARAMS ((const char *header_entry,
-                                       const char *filename));
+extern void po_lex_charset_set (const char *header_entry,
+                               const char *filename);
 
 /* Finish up with the PO file's encoding.  */
-extern void po_lex_charset_close PARAMS ((void));
+extern void po_lex_charset_close (void);
 
 #endif /* _PO_CHARSET_H */
index 83424e80da1caedf24ef9b36181770cbd715488d..99c0975a4f71c356a4f1b6eba3a4a627ebdf2fdd 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -23,6 +23,6 @@
 /* Include some fundamental headers.  */
 #include <sys/types.h>
 
-extern int po_gram_parse PARAMS ((void));
+extern int po_gram_parse (void);
 
 #endif
index c27fc671795380ed6b63e6ec94d008bdde3de2a4..ff611570e85776507e8510760b4620ef879e108d 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998, 2001-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <pmiller@agso.gov.au>
 
 static const char *cur;
 
 
-void yyerror PARAMS ((char *));
-int yylex PARAMS ((void));
+void yyerror (char *);
+int yylex (void);
 
 
 int
-po_hash (s)
-     const char *s;
+po_hash (const char *s)
 {
-  extern int yyparse PARAMS ((void));
+  extern int yyparse (void);
 
   cur = s;
   return yyparse ();
@@ -128,8 +127,7 @@ po_hash (s)
 
 
 void
-yyerror (s)
-     char *s;
+yyerror (char *s)
 {
   /* Do nothing, the grammar is used as a recogniser.  */
 }
index df46618f328403ea7ef7c03ac1a216730801967e..98f4c21586e72fd8459ea9a4cc49cb24dd9cfd78 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998, 2001-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -20,6 +20,6 @@
 #ifndef _PO_HASH_H
 #define _PO_HASH_H
 
-extern int po_hash PARAMS ((const char *string));
+extern int po_hash (const char *string);
 
 #endif /* _PO_HASH_H */
index adcb398a3c92e61c97b36dcfc94fc83e4f016494..e183a3386df9812ec701d9c68d939ba0527852f2 100644 (file)
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <stdarg.h>
 
 #if HAVE_ICONV
 # include <iconv.h>
@@ -39,7 +40,6 @@
 #include "c-ctype.h"
 #include "linebreak.h"
 #include "vasprintf.h"
-#include "libstdarg.h"
 #include "gettext.h"
 #include "po-charset.h"
 #include "xmalloc.h"
 # define getc getc_unlocked
 #endif
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* Current position within the PO file.  */
 lex_pos_ty gram_pos;
@@ -84,15 +78,12 @@ int gram_pos_column;
 
 /* VARARGS1 */
 void
-po_gram_error VA_PARAMS ((const char *fmt, ...),
-                        (fmt, va_alist)
-     const char *fmt;
-     va_dcl)
+po_gram_error (const char *fmt, ...)
 {
   va_list ap;
   char *buffer;
 
-  VA_START (ap, fmt);
+  va_start (ap, fmt);
   if (vasprintf (&buffer, fmt, ap) < 0)
     error (EXIT_FAILURE, 0, _("memory exhausted"));
   va_end (ap);
@@ -116,16 +107,12 @@ po_gram_error VA_PARAMS ((const char *fmt, ...),
 
 /* VARARGS2 */
 void
-po_gram_error_at_line VA_PARAMS ((const lex_pos_ty *pp, const char *fmt, ...),
-                                (pp, fmt, va_alist)
-     const lex_pos_ty *pp;
-     const char *fmt;
-     va_dcl)
+po_gram_error_at_line (const lex_pos_ty *pp, const char *fmt, ...)
 {
   va_list ap;
   char *buffer;
 
-  VA_START (ap, fmt);
+  va_start (ap, fmt);
   if (vasprintf (&buffer, fmt, ap) < 0)
     error (EXIT_FAILURE, 0, _("memory exhausted"));
   va_end (ap);
@@ -178,30 +165,9 @@ struct mbchar
    therefore we use an array type.  */
 typedef struct mbchar mbchar_t[1];
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static inline void memcpy_small PARAMS ((void *dst, const void *src, size_t n));
-static inline bool mb_iseof PARAMS ((const mbchar_t mbc));
-static inline const char *mb_ptr PARAMS ((const mbchar_t mbc));
-static inline size_t mb_len PARAMS ((const mbchar_t mbc));
-static inline bool mb_iseq PARAMS ((const mbchar_t mbc,
-                                   /*promote: char*/ int sc));
-static inline bool mb_isnul PARAMS ((const mbchar_t mbc));
-static inline int mb_cmp PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
-static inline bool mb_equal PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
-static inline bool mb_isascii PARAMS ((const mbchar_t mbc));
-static int mb_width PARAMS ((const mbchar_t mbc));
-static inline void mb_putc PARAMS ((const mbchar_t mbc, FILE *stream));
-static inline void mb_setascii PARAMS ((mbchar_t mbc,
-                                       /*promote: char*/ int sc));
-static inline void mb_copy PARAMS ((mbchar_t new, const mbchar_t old));
-
 /* A version of memcpy optimized for the case n <= 1.  */
 static inline void
-memcpy_small (dst, src, n)
-     void *dst;
-     const void *src;
-     size_t n;
+memcpy_small (void *dst, const void *src, size_t n)
 {
   if (n > 0)
     {
@@ -217,22 +183,19 @@ memcpy_small (dst, src, n)
 /* EOF (not a real character) is represented with bytes = 0 and
    uc_valid = false.  */
 static inline bool
-mb_iseof (mbc)
-     const mbchar_t mbc;
+mb_iseof (const mbchar_t mbc)
 {
   return (mbc->bytes == 0);
 }
 
 /* Access the current character.  */
 static inline const char *
-mb_ptr (mbc)
-     const mbchar_t mbc;
+mb_ptr (const mbchar_t mbc)
 {
   return mbc->buf;
 }
 static inline size_t
-mb_len (mbc)
-     const mbchar_t mbc;
+mb_len (const mbchar_t mbc)
 {
   return mbc->bytes;
 }
@@ -240,9 +203,7 @@ mb_len (mbc)
 /* Comparison of characters.  */
 
 static inline bool
-mb_iseq (mbc, sc)
-     const mbchar_t mbc;
-     char sc;
+mb_iseq (const mbchar_t mbc, char sc)
 {
   /* Note: It is wrong to compare only mbc->uc, because when the encoding is
      SHIFT_JIS, mbc->buf[0] == '\\' corresponds to mbc->uc == 0x00A5, but we
@@ -257,8 +218,7 @@ mb_iseq (mbc, sc)
 }
 
 static inline bool
-mb_isnul (mbc)
-     const mbchar_t mbc;
+mb_isnul (const mbchar_t mbc)
 {
 #if HAVE_ICONV
   if (mbc->uc_valid)
@@ -269,9 +229,7 @@ mb_isnul (mbc)
 }
 
 static inline int
-mb_cmp (mbc1, mbc2)
-     const mbchar_t mbc1;
-     const mbchar_t mbc2;
+mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2)
 {
 #if HAVE_ICONV
   if (mbc1->uc_valid && mbc2->uc_valid)
@@ -286,9 +244,7 @@ mb_cmp (mbc1, mbc2)
 }
 
 static inline bool
-mb_equal (mbc1, mbc2)
-     const mbchar_t mbc1;
-     const mbchar_t mbc2;
+mb_equal (const mbchar_t mbc1, const mbchar_t mbc2)
 {
 #if HAVE_ICONV
   if (mbc1->uc_valid && mbc2->uc_valid)
@@ -302,8 +258,7 @@ mb_equal (mbc1, mbc2)
 /* <ctype.h>, <wctype.h> classification.  */
 
 static inline bool
-mb_isascii (mbc)
-     const mbchar_t mbc;
+mb_isascii (const mbchar_t mbc)
 {
 #if HAVE_ICONV
   if (mbc->uc_valid)
@@ -326,8 +281,7 @@ mb_isascii (mbc)
 #define MB_UNPRINTABLE_WIDTH 1
 
 static int
-mb_width (mbc)
-     const mbchar_t mbc;
+mb_width (const mbchar_t mbc)
 {
 #if HAVE_ICONV
   if (mbc->uc_valid)
@@ -370,18 +324,14 @@ mb_width (mbc)
 
 /* Output.  */
 static inline void
-mb_putc (mbc, stream)
-     const mbchar_t mbc;
-     FILE *stream;
+mb_putc (const mbchar_t mbc, FILE *stream)
 {
   fwrite (mbc->buf, 1, mbc->bytes, stream);
 }
 
 /* Assignment.  */
 static inline void
-mb_setascii (mbc, sc)
-     mbchar_t mbc;
-     char sc;
+mb_setascii (mbchar_t mbc, char sc)
 {
   mbc->bytes = 1;
 #if HAVE_ICONV
@@ -393,9 +343,7 @@ mb_setascii (mbc, sc)
 
 /* Copying a character.  */
 static inline void
-mb_copy (new, old)
-     mbchar_t new;
-     const mbchar_t old;
+mb_copy (mbchar_t new, const mbchar_t old)
 {
   memcpy_small (&new->buf[0], &old->buf[0], old->bytes);
   new->bytes = old->bytes;
@@ -431,16 +379,8 @@ typedef struct mbfile mbfile_t[1];
    or silently tolerated.  */
 static bool signal_eilseq;
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static inline void mbfile_init PARAMS ((mbfile_t mbf, FILE *stream));
-static void mbfile_getc PARAMS ((mbchar_t mbc, mbfile_t mbf));
-static void mbfile_ungetc PARAMS ((const mbchar_t mbc, mbfile_t mbf));
-
 static inline void
-mbfile_init (mbf, stream)
-     mbfile_t mbf;
-     FILE *stream;
+mbfile_init (mbfile_t mbf, FILE *stream)
 {
   mbf->fp = stream;
   mbf->eof_seen = false;
@@ -449,9 +389,7 @@ mbfile_init (mbf, stream)
 }
 
 static void
-mbfile_getc (mbc, mbf)
-     mbchar_t mbc;
-     mbfile_t mbf;
+mbfile_getc (mbchar_t mbc, mbfile_t mbf)
 {
   size_t bytes;
 
@@ -642,9 +580,7 @@ eof:
 }
 
 static void
-mbfile_ungetc (mbc, mbf)
-     const mbchar_t mbc;
-     mbfile_t mbf;
+mbfile_ungetc (const mbchar_t mbc, mbfile_t mbf)
 {
   if (mbf->have_pushback >= NPUSHBACK)
     abort ();
@@ -662,20 +598,9 @@ static bool pass_comments = false;
 bool pass_obsolete_entries = false;
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void lex_getc PARAMS ((mbchar_t mbc));
-static void lex_ungetc PARAMS ((const mbchar_t mbc));
-static int keyword_p PARAMS ((const char *s));
-static int control_sequence PARAMS ((void));
-
-
 /* Prepare lexical analysis.  */
 void
-lex_start (fp, real_filename, logical_filename)
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
+lex_start (FILE *fp, const char *real_filename, const char *logical_filename)
 {
   /* Ignore the logical_filename, because PO file entries already have
      their file names attached.  But use real_filename for error messages.  */
@@ -718,8 +643,7 @@ lex_end ()
 
 /* Open the PO file FNAME and prepare its lexical analysis.  */
 void
-lex_open (fname)
-     const char *fname;
+lex_open (const char *fname)
 {
   char *real_filename;
   FILE *fp = open_po_file (fname, &real_filename);
@@ -746,8 +670,7 @@ lex_close ()
 /* Read a single character, dealing with backslash-newline.
    Also keep track of the current line number and column number.  */
 static void
-lex_getc (mbc)
-     mbchar_t mbc;
+lex_getc (mbchar_t mbc)
 {
   for (;;)
     {
@@ -793,8 +716,7 @@ lex_getc (mbc)
 
 
 static void
-lex_ungetc (mbc)
-     const mbchar_t mbc;
+lex_ungetc (const mbchar_t mbc)
 {
   if (!mb_iseof (mbc))
     {
@@ -811,8 +733,7 @@ lex_ungetc (mbc)
 
 
 static int
-keyword_p (s)
-     const char *s;
+keyword_p (const char *s)
 {
   if (!strcmp (s, "domain"))
     return DOMAIN;
@@ -857,7 +778,7 @@ control_sequence ()
        return '\v';
 
       case 'a':
-       return ALERT_CHAR;
+       return '\a';
 
       case '\\':
       case '"':
@@ -1192,8 +1113,7 @@ po_gram_lex ()
 
 /* po_gram_lex() can return comments as COMMENT.  Switch this on or off.  */
 void
-po_lex_pass_comments (flag)
-     bool flag;
+po_lex_pass_comments (bool flag)
 {
   pass_comments = flag;
 }
@@ -1202,8 +1122,7 @@ po_lex_pass_comments (flag)
 /* po_gram_lex() can return obsolete entries as if they were normal entries.
    Switch this on or off.  */
 void
-po_lex_pass_obsolete_entries (flag)
-     bool flag;
+po_lex_pass_obsolete_entries (bool flag)
 {
   pass_obsolete_entries = flag;
 }
index f984b3d73ff7ff154e5fd82855597b88e6d98ca9..002a481f3155c3ac42841f87db9494d6aa5f5cfa 100644 (file)
@@ -46,28 +46,28 @@ extern bool pass_obsolete_entries;
 
 
 /* Prepare lexical analysis.  */
-extern void lex_start PARAMS ((FILE *fp, const char *real_filename,
-                              const char *logical_filename));
+extern void lex_start (FILE *fp, const char *real_filename,
+                      const char *logical_filename);
 
 /* Terminate lexical analysis.  */
-extern FILE *lex_end PARAMS ((void));
+extern FILE *lex_end (void);
 
 /* Open the PO file FNAME and prepare its lexical analysis.  */
-extern void lex_open PARAMS ((const char *fname));
+extern void lex_open (const char *fname);
 
 /* Terminate lexical analysis and close the current PO file.  */
-extern void lex_close PARAMS ((void));
+extern void lex_close (void);
 
 /* Return the next token in the PO file.  The return codes are defined
    in "po-gram-gen2.h".  Associated data is put in 'po_gram_lval.  */
-extern int po_gram_lex PARAMS ((void));
+extern int po_gram_lex (void);
 
 /* po_gram_lex() can return comments as COMMENT.  Switch this on or off.  */
-extern void po_lex_pass_comments PARAMS ((bool flag));
+extern void po_lex_pass_comments (bool flag);
 
 /* po_gram_lex() can return obsolete entries as if they were normal entries.
    Switch this on or off.  */
-extern void po_lex_pass_obsolete_entries PARAMS ((bool flag));
+extern void po_lex_pass_obsolete_entries (bool flag);
 
 
 /* ISO C 99 is smart enough to allow optimizations like this.  */
@@ -142,9 +142,8 @@ extern void po_lex_pass_obsolete_entries PARAMS ((bool flag));
   } while (0)
 
 #else
-extern void po_gram_error PARAMS ((const char *fmt, ...));
-extern void po_gram_error_at_line PARAMS ((const lex_pos_ty *pos,
-                                          const char *fmt, ...));
+extern void po_gram_error (const char *fmt, ...);
+extern void po_gram_error_at_line (const lex_pos_ty *pos, const char *fmt, ...);
 #endif
 
 
index 75b680db38a1c906d3ab57d22bf799a97ca8474b..6583395e451ecdcb2d473d91a435a4f9743a2c94 100644 (file)
@@ -1,5 +1,5 @@
 /* PO/POT file timestamps.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
 
    This program is free software; you can redistribute it and/or modify
 #include "xerror.h"
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static long difftm PARAMS ((const struct tm *a, const struct tm *b));
-
-
 #define TM_YEAR_ORIGIN 1900
 
 /* Yield A - B, measured in seconds.  */
 static long
-difftm (a, b)
-     const struct tm *a;
-     const struct tm *b;
+difftm (const struct tm *a, const struct tm *b)
 {
   int ay = a->tm_year + TM_YEAR_ORIGIN - 1;
   int by = b->tm_year + TM_YEAR_ORIGIN - 1;
@@ -59,8 +52,7 @@ difftm (a, b)
 
 
 char *
-po_strftime (tp)
-     const time_t *tp;
+po_strftime (const time_t *tp)
 {
   struct tm local_time;
   char tz_sign;
index 3a81c1e326c78480964432aca062cdcdab815c91..941309a12e4bfd136893c12888eeb8c6e013ad1a 100644 (file)
@@ -1,5 +1,5 @@
 /* PO/POT file timestamps.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,6 @@
 
 /* Return a freshly allocated string containing the given time in the
    format YYYY-MM-DD HH:MM+TZOFF.  */
-extern char *po_strftime PARAMS ((const time_t *tp));
+extern char *po_strftime (const time_t *tp);
 
 #endif /* _PO_TIME_H */
index 26a4bbf81503b1798b7d99598f5953b121b7693a..20caa306be6e76625fa9ac4657efe0260eb2f567 100644 (file)
--- a/src/po.c
+++ b/src/po.c
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998, 2000-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
 #include <string.h>
 
 #include "po-charset.h"
+#include "po-gram.h"
 #include "po-hash.h"
 #include "xmalloc.h"
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void po_parse_brief PARAMS ((po_ty *pop));
-static void po_parse_debrief PARAMS ((po_ty *pop));
-
-/* Methods used indirectly by po_scan.  */
-static void po_directive_domain PARAMS ((po_ty *pop, char *name));
-static void po_directive_message PARAMS ((po_ty *pop, char *msgid,
-                                         lex_pos_ty *msgid_pos,
-                                         char *msgid_plural,
-                                         char *msgstr, size_t msgstr_len,
-                                         lex_pos_ty *msgstr_pos,
-                                         bool obsolete));
-static void po_comment PARAMS ((po_ty *pop, const char *s));
-static void po_comment_dot PARAMS ((po_ty *pop, const char *s));
-static void po_comment_filepos PARAMS ((po_ty *pop, const char *name,
-                                       size_t line));
-static void po_comment_special PARAMS ((po_ty *pop, const char *s));
-
 /* Local variables.  */
 static po_ty *callback_arg;
 
 
 po_ty *
-po_alloc (pomp)
-     po_method_ty *pomp;
+po_alloc (po_method_ty *pomp)
 {
   po_ty *pop;
 
@@ -70,8 +51,7 @@ po_alloc (pomp)
 
 
 void
-po_free (pop)
-     po_ty *pop;
+po_free (po_ty *pop)
 {
   if (pop->method->destructor)
     pop->method->destructor (pop);
@@ -79,15 +59,26 @@ po_free (pop)
 }
 
 
-void
-po_scan (pop, fp, real_filename, logical_filename)
-     po_ty *pop;
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
+static void
+po_parse_brief (po_ty *pop)
+{
+  if (pop->method->parse_brief)
+    pop->method->parse_brief (pop);
+}
+
+
+static void
+po_parse_debrief (po_ty *pop)
 {
-  extern int po_gram_parse PARAMS ((void));
+  if (pop->method->parse_debrief)
+    pop->method->parse_debrief (pop);
+}
+
 
+void
+po_scan (po_ty *pop, FILE *fp,
+        const char *real_filename, const char *logical_filename)
+{
   /* The parse will call the po_callback_... functions (see below)
      when the various directive are recognised.  The callback_arg
      variable is used to tell these functions which instance is to
@@ -105,12 +96,8 @@ po_scan (pop, fp, real_filename, logical_filename)
 
 
 void
-po_scan_file (pop, filename)
-     po_ty *pop;
-     const char *filename;
+po_scan_file (po_ty *pop, const char *filename)
 {
-  extern int po_gram_parse PARAMS ((void));
-
   /* The parse will call the po_callback_... functions (see below)
      when the various directive are recognised.  The callback_arg
      variable is used to tell these functions which instance is to
@@ -128,27 +115,7 @@ po_scan_file (pop, filename)
 
 
 static void
-po_parse_brief (pop)
-     po_ty *pop;
-{
-  if (pop->method->parse_brief)
-    pop->method->parse_brief (pop);
-}
-
-
-static void
-po_parse_debrief (pop)
-     po_ty *pop;
-{
-  if (pop->method->parse_debrief)
-    pop->method->parse_debrief (pop);
-}
-
-
-static void
-po_directive_domain (pop, name)
-     po_ty *pop;
-     char *name;
+po_directive_domain (po_ty *pop, char *name)
 {
   if (pop->method->directive_domain)
     pop->method->directive_domain (pop, name);
@@ -156,8 +123,7 @@ po_directive_domain (pop, name)
 
 
 void
-po_callback_domain (name)
-     char *name;
+po_callback_domain (char *name)
 {
   /* assert(callback_arg); */
   po_directive_domain (callback_arg, name);
@@ -165,16 +131,13 @@ po_callback_domain (name)
 
 
 static void
-po_directive_message (pop, msgid, msgid_pos, msgid_plural,
-                     msgstr, msgstr_len, msgstr_pos, obsolete)
-     po_ty *pop;
-     char *msgid;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+po_directive_message (po_ty *pop,
+                     char *msgid,
+                     lex_pos_ty *msgid_pos,
+                     char *msgid_plural,
+                     char *msgstr, size_t msgstr_len,
+                     lex_pos_ty *msgstr_pos,
+                     bool obsolete)
 {
   if (pop->method->directive_message)
     pop->method->directive_message (pop, msgid, msgid_pos, msgid_plural,
@@ -183,16 +146,9 @@ po_directive_message (pop, msgid, msgid_pos, msgid_plural,
 
 
 void
-po_callback_message (msgid, msgid_pos, msgid_plural,
-                    msgstr, msgstr_len, msgstr_pos,
-                    obsolete)
-     char *msgid;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+po_callback_message (char *msgid, lex_pos_ty *msgid_pos, char *msgid_plural,
+                    char *msgstr, size_t msgstr_len, lex_pos_ty *msgstr_pos,
+                    bool obsolete)
 {
   /* assert(callback_arg); */
 
@@ -206,9 +162,7 @@ po_callback_message (msgid, msgid_pos, msgid_plural,
 
 
 static void
-po_comment_special (pop, s)
-     po_ty *pop;
-     const char *s;
+po_comment_special (po_ty *pop, const char *s)
 {
   if (pop->method->comment_special != NULL)
     pop->method->comment_special (pop, s);
@@ -216,9 +170,7 @@ po_comment_special (pop, s)
 
 
 static void
-po_comment (pop, s)
-     po_ty *pop;
-     const char *s;
+po_comment (po_ty *pop, const char *s)
 {
   if (pop->method->comment != NULL)
     pop->method->comment (pop, s);
@@ -226,9 +178,7 @@ po_comment (pop, s)
 
 
 static void
-po_comment_dot (pop, s)
-     po_ty *pop;
-     const char *s;
+po_comment_dot (po_ty *pop, const char *s)
 {
   if (pop->method->comment_dot != NULL)
     pop->method->comment_dot (pop, s);
@@ -239,8 +189,7 @@ po_comment_dot (pop, s)
    seen.  It analyzes the comment to see what sort it is, and then
    dispatces it to the appropriate method.  */
 void
-po_callback_comment (s)
-     const char *s;
+po_callback_comment (const char *s)
 {
   /* assert(callback_arg); */
   if (*s == '.')
@@ -279,10 +228,7 @@ po_callback_comment (s)
 
 
 static void
-po_comment_filepos (pop, name, line)
-     po_ty *pop;
-     const char *name;
-     size_t line;
+po_comment_filepos (po_ty *pop, const char *name, size_t line)
 {
   if (pop->method->comment_filepos)
     pop->method->comment_filepos (pop, name, line);
@@ -290,9 +236,7 @@ po_comment_filepos (pop, name, line)
 
 
 void
-po_callback_comment_filepos (name, line)
-     const char *name;
-     size_t line;
+po_callback_comment_filepos (const char *name, size_t line)
 {
   /* assert(callback_arg); */
   po_comment_filepos (callback_arg, name, line);
@@ -301,11 +245,9 @@ po_callback_comment_filepos (name, line)
 
 /* Parse a special comment and put the result in *fuzzyp, formatp, *wrapp.  */
 void
-po_parse_comment_special (s, fuzzyp, formatp, wrapp)
-     const char *s;
-     bool *fuzzyp;
-     enum is_format formatp[NFORMATS];
-     enum is_wrap *wrapp;
+po_parse_comment_special (const char *s,
+                         bool *fuzzyp, enum is_format formatp[NFORMATS],
+                         enum is_wrap *wrapp)
 {
   size_t i;
 
index f1b3c3a92109ad84f4921c6466a5371903bc0aa9..a088ff01aa13a749f36a1a1daf21d01705e304b6 100644 (file)
--- a/src/po.h
+++ b/src/po.h
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998, 2000-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -49,54 +49,53 @@ struct po_method_ty
   size_t size;
 
   /* what to do immediately after the instance is malloc()ed */
-  void (*constructor) PARAMS ((struct po_ty *pop));
+  void (*constructor) (struct po_ty *pop);
 
   /* what to do immediately before the instance is free()ed */
-  void (*destructor) PARAMS ((struct po_ty *pop));
+  void (*destructor) (struct po_ty *pop);
 
   /* what to do with a domain directive */
-  void (*directive_domain) PARAMS ((struct po_ty *pop, char *name));
+  void (*directive_domain) (struct po_ty *pop, char *name);
 
   /* what to do with a message directive */
-  void (*directive_message) PARAMS ((struct po_ty *pop,
-                                    char *msgid, lex_pos_ty *msgid_pos,
-                                    char *msgid_plural,
-                                    char *msgstr, size_t msgstr_len,
-                                    lex_pos_ty *msgstr_pos,
-                                    bool obsolete));
+  void (*directive_message) (struct po_ty *pop,
+                            char *msgid, lex_pos_ty *msgid_pos,
+                            char *msgid_plural,
+                            char *msgstr, size_t msgstr_len,
+                            lex_pos_ty *msgstr_pos,
+                            bool obsolete);
 
   /* This method is invoked before the parse, but after the file is
      opened by the lexer.  */
-  void (*parse_brief) PARAMS ((struct po_ty *pop));
+  void (*parse_brief) (struct po_ty *pop);
 
   /* This method is invoked after the parse, but before the file is
      closed by the lexer.  The intention is to make consistency checks
      against the file here, and emit the errors through the lex_error*
      functions.  */
-  void (*parse_debrief) PARAMS ((struct po_ty *pop));
+  void (*parse_debrief) (struct po_ty *pop);
 
   /* What to do with a plain-vanilla comment - the expectation is that
      they will be accumulated, and added to the next message
      definition seen.  Or completely ignored.  */
-  void (*comment) PARAMS ((struct po_ty *pop, const char *s));
+  void (*comment) (struct po_ty *pop, const char *s);
 
   /* What to do with a comment that starts with a dot (i.e.  extracted
      by xgettext) - the expectation is that they will be accumulated,
      and added to the next message definition seen.  Or completely
      ignored.  */
-  void (*comment_dot) PARAMS ((struct po_ty *pop, const char *s));
+  void (*comment_dot) (struct po_ty *pop, const char *s);
 
   /* What to do with a file position seen in a comment (i.e. a message
      location comment extracted by xgettext) - the expectation is that
      they will be accumulated, and added to the next message
      definition seen.  Or completely ignored.  */
-  void (*comment_filepos) PARAMS ((struct po_ty *pop, const char *s,
-                                  size_t line));
+  void (*comment_filepos) (struct po_ty *pop, const char *s, size_t line);
 
   /* What to do with a comment that starts with a `!' - this is a
      special comment.  One of the possible uses is to indicate a
      inexact translation.  */
-  void (*comment_special) PARAMS ((struct po_ty *pop, const char *s));
+  void (*comment_special) (struct po_ty *pop, const char *s);
 };
 
 
@@ -121,37 +120,37 @@ struct po_ty
 
 /* Allocate a fresh po_ty (or derived class) instance and call its
    constructor.  */
-extern po_ty *po_alloc PARAMS ((po_method_ty *jtable));
+extern po_ty *po_alloc (po_method_ty *jtable);
 
 /* Read a PO file from a stream, and dispatch to the various po_method_ty
    methods.  */
-extern void po_scan PARAMS ((po_ty *pop, FILE *fp, const char *real_filename,
-                            const char *logical_filename));
+extern void po_scan (po_ty *pop, FILE *fp, const char *real_filename,
+                    const char *logical_filename);
 
 /* Locate a PO file, open it, read it, dispatching to the various po_method_ty
    methods, and close it.  */
-extern void po_scan_file PARAMS ((po_ty *pop, const char *filename));
+extern void po_scan_file (po_ty *pop, const char *filename);
 
 /* Call the destructor and deallocate a po_ty (or derived class)
    instance.  */
-extern void po_free PARAMS ((po_ty *pop));
+extern void po_free (po_ty *pop);
 
 
 /* Callbacks used by po-gram.y or po-hash.y or po-lex.c, indirectly
    from po_scan.  */
-extern void po_callback_domain PARAMS ((char *name));
-extern void po_callback_message PARAMS ((char *msgid, lex_pos_ty *msgid_pos,
-                                        char *msgid_plural,
-                                        char *msgstr, size_t msgstr_len,
-                                        lex_pos_ty *msgstr_pos,
-                                        bool obsolete));
-extern void po_callback_comment PARAMS ((const char *s));
-extern void po_callback_comment_dot PARAMS ((const char *s));
-extern void po_callback_comment_filepos PARAMS ((const char *s, size_t line));
+extern void po_callback_domain (char *name);
+extern void po_callback_message (char *msgid, lex_pos_ty *msgid_pos,
+                                char *msgid_plural,
+                                char *msgstr, size_t msgstr_len,
+                                lex_pos_ty *msgstr_pos,
+                                bool obsolete);
+extern void po_callback_comment (const char *s);
+extern void po_callback_comment_dot (const char *s);
+extern void po_callback_comment_filepos (const char *s, size_t line);
 
 /* Parse a special comment and put the result in *fuzzyp, formatp, *wrapp.  */
-extern void po_parse_comment_special PARAMS ((const char *s, bool *fuzzyp,
-                                             enum is_format formatp[NFORMATS],
-                                             enum is_wrap *wrapp));
+extern void po_parse_comment_special (const char *s, bool *fuzzyp,
+                                     enum is_format formatp[NFORMATS],
+                                     enum is_wrap *wrapp);
 
 #endif /* _PO_H */
index 3528bec60bdf37ba591982067586236c23d34619..b9f376eb54343ce0b2d2d0ba76d505e318869ccd 100644 (file)
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static bool execute_and_read_po_output PARAMS ((const char *progname,
-                                               const char *prog_path,
-                                               char **prog_argv,
-                                               void *private_data));
-
-
 /* A Java resource name can only be manipulated by a Java virtual machine.
    So we start a JVM to execute the DumpResource program, and read its
    output, which is .po format without comments.  */
@@ -59,11 +51,9 @@ struct locals
 };
 
 static bool
-execute_and_read_po_output (progname, prog_path, prog_argv, private_data)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     void *private_data;
+execute_and_read_po_output (const char *progname,
+                           const char *prog_path, char **prog_argv,
+                           void *private_data)
 {
   struct locals *l = (struct locals *) private_data;
   pid_t child;
@@ -95,9 +85,7 @@ execute_and_read_po_output (progname, prog_path, prog_argv, private_data)
 
 
 msgdomain_list_ty *
-msgdomain_read_java (resource_name, locale_name)
-     const char *resource_name;
-     const char *locale_name;
+msgdomain_read_java (const char *resource_name, const char *locale_name)
 {
   const char *class_name = "gnu.gettext.DumpResource";
   const char *gettextjexedir;
index 9b9e079a843e6041400ae1c3f2ea254146af71dd..62559bb92144c1f97aa54c6e92f35cb77dee630c 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading Java ResourceBundles.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
 /* Read the Java resource given by resource_name and locale_name.
    Returns a list of messages.  */
 extern msgdomain_list_ty *
-       msgdomain_read_java PARAMS ((const char *resource_name,
-                                   const char *locale_name));
+       msgdomain_read_java (const char *resource_name,
+                           const char *locale_name);
 
 #endif /* _READ_JAVA_H */
index 998e7e0edfef7b21d6824247e092aca237be6464..e6fc2d1d1d36b4404fa7a1c4f642a35ce53ce76d 100644 (file)
@@ -52,26 +52,10 @@ struct binary_mo_file
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void read_binary_mo_file PARAMS ((struct binary_mo_file *bfp,
-                                        FILE *fp, const char *filename));
-static nls_uint32 get_uint32 PARAMS ((const struct binary_mo_file *bfp,
-                                     size_t offset));
-static char * get_string PARAMS ((const struct binary_mo_file *bfp,
-                                 size_t offset, size_t *lengthp));
-static char * get_sysdep_string PARAMS ((const struct binary_mo_file *bfp,
-                                        size_t offset,
-                                        const struct mo_file_header *header,
-                                        size_t *lengthp));
-
-
 /* Read the contents of the given input stream.  */
 static void
-read_binary_mo_file (bfp, fp, filename)
-     struct binary_mo_file *bfp;
-     FILE *fp;
-     const char *filename;
+read_binary_mo_file (struct binary_mo_file *bfp,
+                    FILE *fp, const char *filename)
 {
   char *buf = NULL;
   size_t alloc = 0;
@@ -106,9 +90,7 @@ read_binary_mo_file (bfp, fp, filename)
 
 /* Get a 32-bit number from the file, at the given file position.  */
 static nls_uint32
-get_uint32 (bfp, offset)
-     const struct binary_mo_file *bfp;
-     size_t offset;
+get_uint32 (const struct binary_mo_file *bfp, size_t offset)
 {
   nls_uint32 b0, b1, b2, b3;
 
@@ -127,10 +109,7 @@ get_uint32 (bfp, offset)
 
 /* Get a static string from the file, at the given file position.  */
 static char *
-get_string (bfp, offset, lengthp)
-     const struct binary_mo_file *bfp;
-     size_t offset;
-     size_t *lengthp;
+get_string (const struct binary_mo_file *bfp, size_t offset, size_t *lengthp)
 {
   /* See 'struct string_desc'.  */
   nls_uint32 s_length = get_uint32 (bfp, offset);
@@ -149,11 +128,8 @@ get_string (bfp, offset, lengthp)
 
 /* Get a system dependent string from the file, at the given file position.  */
 static char *
-get_sysdep_string (bfp, offset, header, lengthp)
-     const struct binary_mo_file *bfp;
-     size_t offset;
-     const struct mo_file_header *header;
-     size_t *lengthp;
+get_sysdep_string (const struct binary_mo_file *bfp, size_t offset,
+                  const struct mo_file_header *header, size_t *lengthp)
 {
   /* See 'struct sysdep_string'.  */
   size_t length;
@@ -244,9 +220,7 @@ get_sysdep_string (bfp, offset, header, lengthp)
 
 /* Reads an existing .mo file and adds the messages to mlp.  */
 void
-read_mo_file (mlp, fn)
-     message_list_ty *mlp;
-     const char *fn;
+read_mo_file (message_list_ty *mlp, const char *fn)
 {
   FILE *fp;
   struct binary_mo_file bf;
index de732862ae65139ad1dc599c781599830ab50d38..88e969939d8e5a1af59b020211661968cfa071ac 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading binary .mo files.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
 
    This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,6 @@
 #include "message.h"
 
 /* Reads an existing .mo file and adds the messages to mlp.  */
-extern void read_mo_file PARAMS ((message_list_ty *mlp, const char *fn));
+extern void read_mo_file (message_list_ty *mlp, const char *fn);
 
 #endif /* _READ_MO_H */
index 75215f17f83a5d959d850b1170209700fd3faa34..772f87629a28a23f9e70bad9d2359426aa4e7ff0 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
    This program is free software; you can redistribute it and/or modify
@@ -76,29 +76,9 @@ struct readall_class_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void readall_constructor PARAMS ((po_ty *that));
-static void readall_destructor PARAMS ((po_ty *that));
-static void readall_directive_domain PARAMS ((po_ty *that, char *name));
-static void readall_directive_message PARAMS ((po_ty *that, char *msgid,
-                                              lex_pos_ty *msgid_pos,
-                                              char *msgid_plural,
-                                              char *msgstr, size_t msgstr_len,
-                                              lex_pos_ty *msgstr_pos,
-                                              bool obsolete));
-static void readall_parse_brief PARAMS ((po_ty *that));
-static void readall_comment PARAMS ((po_ty *that, const char *s));
-static void readall_comment_dot PARAMS ((po_ty *that, const char *s));
-static void readall_comment_special PARAMS ((po_ty *that, const char *s));
-static void readall_comment_filepos PARAMS ((po_ty *that, const char *name,
-                                            size_t line));
-
-
 /* Prepare for first message.  */
 static void
-readall_constructor (that)
-     po_ty *that;
+readall_constructor (po_ty *that)
 {
   readall_class_ty *this = (readall_class_ty *) that;
   size_t i;
@@ -118,8 +98,7 @@ readall_constructor (that)
 
 
 static void
-readall_destructor (that)
-     po_ty *that;
+readall_destructor (po_ty *that)
 {
   readall_class_ty *this = (readall_class_ty *) that;
   size_t j;
@@ -138,9 +117,7 @@ readall_destructor (that)
 
 /* Process 'domain' directive from .po file.  */
 static void
-readall_directive_domain (that, name)
-     po_ty *that;
-     char *name;
+readall_directive_domain (po_ty *that, char *name)
 {
   size_t j;
 
@@ -172,16 +149,13 @@ readall_directive_domain (that, name)
 
 /* Process 'msgid'/'msgstr' pair from .po file.  */
 static void
-readall_directive_message (that, msgid, msgid_pos, msgid_plural,
-                          msgstr, msgstr_len, msgstr_pos, obsolete)
-     po_ty *that;
-     char *msgid;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+readall_directive_message (po_ty *that,
+                          char *msgid,
+                          lex_pos_ty *msgid_pos,
+                          char *msgid_plural,
+                          char *msgstr, size_t msgstr_len,
+                          lex_pos_ty *msgstr_pos,
+                          bool obsolete)
 {
   readall_class_ty *this = (readall_class_ty *) that;
   message_ty *mp;
@@ -253,17 +227,14 @@ readall_directive_message (that, msgid, msgid_pos, msgid_plural,
 
 
 static void
-readall_parse_brief (that)
-     po_ty *that;
+readall_parse_brief (po_ty *that)
 {
   po_lex_pass_comments (true);
 }
 
 
 static void
-readall_comment (that, s)
-     po_ty *that;
-     const char *s;
+readall_comment (po_ty *that, const char *s)
 {
   readall_class_ty *this = (readall_class_ty *) that;
 
@@ -274,9 +245,7 @@ readall_comment (that, s)
 
 
 static void
-readall_comment_dot (that, s)
-     po_ty *that;
-     const char *s;
+readall_comment_dot (po_ty *that, const char *s)
 {
   readall_class_ty *this = (readall_class_ty *) that;
 
@@ -288,9 +257,7 @@ readall_comment_dot (that, s)
 
 /* Test for '#, fuzzy' comments and warn.  */
 static void
-readall_comment_special (that, s)
-     po_ty *that;
-     const char *s;
+readall_comment_special (po_ty *that, const char *s)
 {
   readall_class_ty *this = (readall_class_ty *) that;
 
@@ -300,10 +267,7 @@ readall_comment_special (that, s)
 
 
 static void
-readall_comment_filepos (that, name, line)
-     po_ty *that;
-     const char *name;
-     size_t line;
+readall_comment_filepos (po_ty *that, const char *name, size_t line)
 {
   readall_class_ty *this = (readall_class_ty *) that;
   size_t nbytes;
@@ -342,10 +306,7 @@ static po_method_ty readall_methods =
 
 
 msgdomain_list_ty *
-read_po (fp, real_filename, logical_filename)
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
+read_po (FILE *fp, const char *real_filename, const char *logical_filename)
 {
   po_ty *pop;
   msgdomain_list_ty *mdlp;
@@ -360,8 +321,7 @@ read_po (fp, real_filename, logical_filename)
 
 
 msgdomain_list_ty *
-read_po_file (filename)
-     const char *filename;
+read_po_file (const char *filename)
 {
   po_ty *pop;
   msgdomain_list_ty *mdlp;
index 455f957a2dd9c16ec7958f35c2bf9ebe03efced7..a75f817a98662bb2a3c1075a0ae9e5d2feab6b59 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    This file was written by Bruno Haible <haible@clisp.cons.org>.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,13 +34,13 @@ extern int line_comment;
 extern bool allow_duplicates;
 
 /* Read the input file from a stream.  Returns a list of messages.  */
-extern msgdomain_list_ty *read_po PARAMS ((FILE *fp, const char *real_filename,
-                                          const char *logical_filename));
+extern msgdomain_list_ty *read_po (FILE *fp, const char *real_filename,
+                                  const char *logical_filename);
 
 /* Read the input file with the name INPUT_NAME.  The ending .po is added
    if necessary.  If INPUT_NAME is not an absolute file name and the file is
    not found, the list of directories in "dir-list.h" is searched.  Returns
    a list of messages.  */
-extern msgdomain_list_ty *read_po_file PARAMS ((const char *input_name));
+extern msgdomain_list_ty *read_po_file (const char *input_name);
 
 #endif /* _READ_PO_H */
index 49c0aed05e5e203114ae0c54ca54d45206936088..c312ef9ff2903a1d5ab55b67f5aa487d376bc75d 100644 (file)
@@ -46,9 +46,7 @@
    the msgid/msgstr pair to us, instead of storing it in the hash table.  */
 
 msgdomain_list_ty *
-msgdomain_read_tcl (locale_name, directory)
-     const char *locale_name;
-     const char *directory;
+msgdomain_read_tcl (const char *locale_name, const char *directory)
 {
   const char *gettextdatadir;
   char *tclscript;
index 5ffcfaf119b09f3909817ec149761448094d48a3..e20722d95a81232259e3d04fc28b00e38255b97b 100644 (file)
@@ -24,7 +24,6 @@
 /* Read the Tcl msg file given by locale_name and directory.
    Returns a list of messages.  */
 extern msgdomain_list_ty *
-       msgdomain_read_tcl PARAMS ((const char *locale_name,
-                                  const char *directory));
+       msgdomain_read_tcl (const char *locale_name, const char *directory);
 
 #endif /* _READ_TCL_H */
index 887ebc1211fb5444d79857cd6a7a169cbcc21553..71c2211658565d6096fdbcd410d215ba9297ff47 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1998, 2000-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -33,8 +33,7 @@
 
 /* Initialize an empty list of strings.  */
 void
-string_list_init (slp)
-     string_list_ty *slp;
+string_list_init (string_list_ty *slp)
 {
   slp->item = NULL;
   slp->nitems = 0;
@@ -59,9 +58,7 @@ string_list_alloc ()
 
 /* Append a single string to the end of a list of strings.  */
 void
-string_list_append (slp, s)
-     string_list_ty *slp;
-     const char *s;
+string_list_append (string_list_ty *slp, const char *s)
 {
   /* Grow the list.  */
   if (slp->nitems >= slp->nitems_max)
@@ -81,9 +78,7 @@ string_list_append (slp, s)
 /* Append a single string to the end of a list of strings, unless it is
    already contained in the list.  */
 void
-string_list_append_unique (slp, s)
-     string_list_ty *slp;
-     const char *s;
+string_list_append_unique (string_list_ty *slp, const char *s)
 {
   size_t j;
 
@@ -108,8 +103,7 @@ string_list_append_unique (slp, s)
 
 /* Destroy a list of strings.  */
 void
-string_list_destroy (slp)
-     string_list_ty *slp;
+string_list_destroy (string_list_ty *slp)
 {
   size_t j;
 
@@ -122,8 +116,7 @@ string_list_destroy (slp)
 
 /* Free a list of strings.  */
 void
-string_list_free (slp)
-     string_list_ty *slp;
+string_list_free (string_list_ty *slp)
 {
   size_t j;
 
@@ -138,8 +131,7 @@ string_list_free (slp)
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list.  */
 char *
-string_list_concat (slp)
-     const string_list_ty *slp;
+string_list_concat (const string_list_ty *slp)
 {
   size_t len;
   size_t j;
@@ -165,8 +157,7 @@ string_list_concat (slp)
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list, and destroy the list.  */
 char *
-string_list_concat_destroy (slp)
-     string_list_ty *slp;
+string_list_concat_destroy (string_list_ty *slp)
 {
   char *result;
 
@@ -188,8 +179,7 @@ string_list_concat_destroy (slp)
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list, separated by spaces.  */
 char *
-string_list_join (slp)
-     const string_list_ty *slp;
+string_list_join (const string_list_ty *slp)
 {
   size_t len;
   size_t j;
@@ -220,9 +210,7 @@ string_list_join (slp)
 
 /* Return 1 if s is contained in the list of strings, 0 otherwise.  */
 bool
-string_list_member (slp, s)
-     const string_list_ty *slp;
-     const char *s;
+string_list_member (const string_list_ty *slp, const char *s)
 {
   size_t j;
 
index de6062c95430cbb468456c81578c0f88cbf04404..4414d510cf49dbf94b1933c11ba3ac8055534311 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 1998, 2000-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -37,39 +37,37 @@ struct string_list_ty
 };
 
 /* Initialize an empty list of strings.  */
-extern void string_list_init PARAMS ((string_list_ty *slp));
+extern void string_list_init (string_list_ty *slp);
 
 /* Return a fresh, empty list of strings.  */
-extern string_list_ty *string_list_alloc PARAMS ((void));
+extern string_list_ty *string_list_alloc (void);
 
 /* Append a single string to the end of a list of strings.  */
-extern void string_list_append PARAMS ((string_list_ty *slp, const char *s));
+extern void string_list_append (string_list_ty *slp, const char *s);
 
 /* Append a single string to the end of a list of strings, unless it is
    already contained in the list.  */
-extern void string_list_append_unique PARAMS ((string_list_ty *slp,
-                                              const char *s));
+extern void string_list_append_unique (string_list_ty *slp, const char *s);
 
 /* Destroy a list of strings.  */
-extern void string_list_destroy PARAMS ((string_list_ty *slp));
+extern void string_list_destroy (string_list_ty *slp);
 
 /* Free a list of strings.  */
-extern void string_list_free PARAMS ((string_list_ty *slp));
+extern void string_list_free (string_list_ty *slp);
 
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list.  */
-extern char *string_list_concat PARAMS ((const string_list_ty *slp));
+extern char *string_list_concat (const string_list_ty *slp);
 
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list, and destroy the list.  */
-extern char *string_list_concat_destroy PARAMS ((string_list_ty *slp));
+extern char *string_list_concat_destroy (string_list_ty *slp);
 
 /* Return a freshly allocated string obtained by concatenating all the
    strings in the list, separated by spaces.  */
-extern char *string_list_join PARAMS ((const string_list_ty *slp));
+extern char *string_list_join (const string_list_ty *slp);
 
 /* Return 1 if s is contained in the list of strings, 0 otherwise.  */
-extern bool string_list_member PARAMS ((const string_list_ty *slp,
-                                       const char *s));
+extern bool string_list_member (const string_list_ty *slp, const char *s);
 
 #endif /* _STR_LIST_H */
index 4776ccdcf0d9de6b62e8ba96e0fd22244cdf0b34..82362733576e5aeae1b9e5a8d60943f0390b0073 100644 (file)
@@ -70,24 +70,17 @@ static const struct option long_options[] =
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static void cat_file PARAMS ((const char *src_filename));
-static bool execute_it PARAMS ((const char *progname,
-                               const char *prog_path, char **prog_argv,
-                               void *private_data));
-static void fetch PARAMS ((const char *url, const char *file));
+static void fetch (const char *url, const char *file);
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   bool do_help;
@@ -157,8 +150,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -192,8 +184,7 @@ Informative output:\n\
 
 /* Copy a file's contents to stdout.  */
 static void
-cat_file (src_filename)
-     const char *src_filename;
+cat_file (const char *src_filename)
 {
   int src_fd;
   char buf[4096];
@@ -227,11 +218,9 @@ cat_file (src_filename)
 }
 
 static bool
-execute_it (progname, prog_path, prog_argv, private_data)
-     const char *progname;
-     const char *prog_path;
-     char **prog_argv;
-     void *private_data;
+execute_it (const char *progname,
+           const char *prog_path, char **prog_argv,
+           void *private_data)
 {
   (void) private_data;
 
@@ -241,9 +230,7 @@ execute_it (progname, prog_path, prog_argv, private_data)
 
 /* Fetch the URL.  Upon error, use the FILE as fallback.  */
 static void
-fetch (url, file)
-     const char *url;
-     const char *file;
+fetch (const char *url, const char *file)
 {
   /* First try: using Java.  */
   {
index c53370ecd7e8ee0296b58cd4cda6aa5dd5ac3082..c9eef80276a82a3f28a4a0072dbe70037ef96835 100644 (file)
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int check_resource_name PARAMS ((const char *name));
-static unsigned int string_hashcode PARAMS ((const char *str));
-static unsigned int compute_hashsize PARAMS ((message_list_ty *mlp,
-                                             bool *collisionp));
-static int compare_index PARAMS ((const void *pval1, const void *pval2));
-static struct table_item * compute_table_items PARAMS ((message_list_ty *mlp,
-                                                       unsigned int hashsize));
-static void write_java_string PARAMS ((FILE *stream, const char *str));
-static void write_java_msgstr PARAMS ((FILE *stream, message_ty *mp));
-static void write_lookup_code PARAMS ((FILE *stream, unsigned int hashsize,
-                                      bool collisions));
-static bool is_expression_boolean PARAMS ((struct expression *exp));
-static void write_java_expression PARAMS ((FILE *stream,
-                                          struct expression *exp,
-                                          bool as_boolean));
-static void write_java_code PARAMS ((FILE *stream, const char *class_name,
-                                    message_list_ty *mlp, bool assume_java2));
-static void uninstall_handlers PARAMS ((void));
-static void cleanup PARAMS ((int sig));
-static void install_handlers PARAMS ((void));
-#if HAVE_POSIX_SIGNALBLOCKING
-static void init_signal_set PARAMS ((void));
-static void block PARAMS ((void));
-static void unblock PARAMS ((void));
-#endif
-
-
 /* Check that the resource name is a valid Java class name.  To simplify
    things, we allow only ASCII characters in the class name.
    Return the number of dots in the class name, or -1 if not OK.  */
 static int
-check_resource_name (name)
-     const char *name;
+check_resource_name (const char *name)
 {
   int ndots = 0;
   const char *p = name;
@@ -148,8 +118,7 @@ check_resource_name (name)
    this removes one bit but greatly simplifies the following "mod hash_size"
    and "mod (hash_size - 2)" operations.  */
 static unsigned int
-string_hashcode (str)
-     const char *str;
+string_hashcode (const char *str)
 {
   const char *str_limit = str + strlen (str);
   int hash = 0;
@@ -175,9 +144,7 @@ string_hashcode (str)
 
 /* Compute a good hash table size for the given set of msgids.  */
 static unsigned int
-compute_hashsize (mlp, collisionp)
-     message_list_ty *mlp;
-     bool *collisionp;
+compute_hashsize (message_list_ty *mlp, bool *collisionp)
 {
   /* This is an O(n^2) algorithm, but should be sufficient because few
      programs have more than 1000 messages in a single domain.  */
@@ -310,9 +277,7 @@ compute_hashsize (mlp, collisionp)
 struct table_item { unsigned int index; message_ty *mp; };
 
 static int
-compare_index (pval1, pval2)
-     const void *pval1;
-     const void *pval2;
+compare_index (const void *pval1, const void *pval2)
 {
   return (int)((const struct table_item *) pval1)->index
         - (int)((const struct table_item *) pval2)->index;
@@ -321,9 +286,7 @@ compare_index (pval1, pval2)
 /* Compute the list of messages and table indices, sorted according to the
    indices.  */
 static struct table_item *
-compute_table_items (mlp, hashsize)
-     message_list_ty *mlp;
-     unsigned int hashsize;
+compute_table_items (message_list_ty *mlp, unsigned int hashsize)
 {
   unsigned int n = mlp->nitems;
   struct table_item *arr =
@@ -366,9 +329,7 @@ compute_table_items (mlp, hashsize)
 
 /* Write a string in Java Unicode notation to the given stream.  */
 static void
-write_java_string (stream, str)
-     FILE *stream;
-     const char *str;
+write_java_string (FILE *stream, const char *str)
 {
   static const char hexdigit[] = "0123456789abcdef";
   const char *str_limit = str + strlen (str);
@@ -417,9 +378,7 @@ write_java_string (stream, str)
    has plural forms, it is an expression of type String[], otherwise it is
    an expression of type String.  */
 static void
-write_java_msgstr (stream, mp)
-     FILE *stream;
-     message_ty *mp;
+write_java_msgstr (FILE *stream, message_ty *mp)
 {
   if (mp->msgid_plural != NULL)
     {
@@ -450,10 +409,7 @@ write_java_msgstr (stream, mp)
 /* Writes the body of the function which returns the local value for a key
    named 'msgid'.  */
 static void
-write_lookup_code (stream, hashsize, collisions)
-     FILE *stream;
-     unsigned int hashsize;
-     bool collisions;
+write_lookup_code (FILE *stream, unsigned int hashsize, bool collisions)
 {
   fprintf (stream, "    int hash_val = msgid.hashCode() & 0x7fffffff;\n");
   fprintf (stream, "    int idx = (hash_val %% %d) << 1;\n", hashsize);
@@ -492,8 +448,7 @@ write_lookup_code (stream, hashsize, collisions)
 /* Tests whether a plural expression, evaluated according to the C rules,
    can only produce the values 0 and 1.  */
 static bool
-is_expression_boolean (exp)
-     struct expression *exp;
+is_expression_boolean (struct expression *exp)
 {
   switch (exp->operation)
     {
@@ -528,10 +483,7 @@ is_expression_boolean (exp)
 /* Write Java code that evaluates a plural expression according to the C rules.
    The variable is called 'n'.  */
 static void
-write_java_expression (stream, exp, as_boolean)
-     FILE *stream;
-     struct expression *exp;
-     bool as_boolean;
+write_java_expression (FILE *stream, struct expression *exp, bool as_boolean)
 {
   /* We use parentheses everywhere.  This frees us from tracking the priority
      of arithmetic operators.  */
@@ -712,11 +664,8 @@ write_java_expression (stream, exp, as_boolean)
    because applications can have their own classes called X.Y.ResourceBundle
    or X.Y.String.  */
 static void
-write_java_code (stream, class_name, mlp, assume_java2)
-     FILE *stream;
-     const char *class_name;
-     message_list_ty *mlp;
-     bool assume_java2;
+write_java_code (FILE *stream, const char *class_name, message_list_ty *mlp,
+                bool assume_java2)
 {
   const char *last_dot;
   unsigned int plurals;
@@ -963,8 +912,7 @@ uninstall_handlers ()
 
 /* The signal handler.  It gets called asynchronously.  */
 static void
-cleanup (sig)
-     int sig;
+cleanup (int sig)
 {
   unsigned int i;
 
@@ -1070,12 +1018,10 @@ unblock ()
 
 
 int
-msgdomain_write_java (mlp, resource_name, locale_name, directory, assume_java2)
-     message_list_ty *mlp;
-     const char *resource_name;
-     const char *locale_name;
-     const char *directory;
-     bool assume_java2;
+msgdomain_write_java (message_list_ty *mlp,
+                     const char *resource_name, const char *locale_name,
+                     const char *directory,
+                     bool assume_java2)
 {
   int retval;
   char *template;
index 3cec77452fb0f0f344de07b64f8e90271bf34bec..37e1947b7060d5bb9c39cad0ede16dd08976813c 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing Java ResourceBundles.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
    separators) or NULL, directory is the base directory.
    Return 0 if ok, nonzero on error.  */
 extern int
-       msgdomain_write_java PARAMS ((message_list_ty *mlp,
-                                    const char *resource_name,
-                                    const char *locale_name,
-                                    const char *directory,
-                                    bool assume_java2));
+       msgdomain_write_java (message_list_ty *mlp,
+                            const char *resource_name,
+                            const char *locale_name,
+                            const char *directory,
+                            bool assume_java2);
 
 #endif /* _WRITE_JAVA_H */
index 9db7f180a531fd192c7506332dd2f55b36cf9151..ee1cb6aafac02abe1d96d979a4af08e51943f56a 100644 (file)
@@ -66,12 +66,6 @@ size_t alignment;
 bool no_hash_table;
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int compare_id PARAMS ((const void *pval1, const void *pval2));
-static void write_table PARAMS ((FILE *output_file, message_list_ty *mlp));
-
-
 /* Indices into the strings contained in 'struct pre_message' and
    'struct pre_sysdep_message'.  */
 enum
@@ -96,9 +90,7 @@ struct pre_message
 };
 
 static int
-compare_id (pval1, pval2)
-     const void *pval1;
-     const void *pval2;
+compare_id (const void *pval1, const void *pval2)
 {
   return strcmp (((struct pre_message *) pval1)->str[M_ID].pointer,
                 ((struct pre_message *) pval2)->str[M_ID].pointer);
@@ -138,9 +130,7 @@ struct pre_sysdep_message
 
 /* Write the message list to the given open file.  */
 static void
-write_table (output_file, mlp)
-     FILE *output_file;
-     message_list_ty *mlp;
+write_table (FILE *output_file, message_list_ty *mlp)
 {
   size_t nstrings;
   struct pre_message *msg_arr;
@@ -678,10 +668,9 @@ write_table (output_file, mlp)
 
 
 int
-msgdomain_write_mo (mlp, domain_name, file_name)
-     message_list_ty *mlp;
-     const char *domain_name;
-     const char *file_name;
+msgdomain_write_mo (message_list_ty *mlp,
+                   const char *domain_name,
+                   const char *file_name)
 {
   FILE *output_file;
 
index cbae7efb8d7926a618dc75ab31a9400722b19ee3..b0b4923002c153b35bac3de59ecf9a1a20d85c17 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing binary .mo files.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995.
 
    This program is free software; you can redistribute it and/or modify
@@ -34,8 +34,8 @@ extern bool no_hash_table;
    domain_name is the domain name, file_name is the desired file name.
    Return 0 if ok, nonzero on error.  */
 extern int
-       msgdomain_write_mo PARAMS ((message_list_ty *mlp,
-                                  const char *domain_name,
-                                  const char *file_name));
+       msgdomain_write_mo (message_list_ty *mlp,
+                          const char *domain_name,
+                          const char *file_name);
 
 #endif /* _WRITE_MO_H */
index 5fec377563c89ee4c65e082734ff05e23ddcb92b..5424661aed1cf3479ef8421e3d96097ad32dce19 100644 (file)
 #endif
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static const char *make_format_description_string PARAMS ((enum is_format,
-                                                          const char *lang,
-                                                          bool debug));
-static bool significant_format_p PARAMS ((enum is_format is_format));
-static bool has_significant_format_p
-                          PARAMS ((const enum is_format is_format[NFORMATS]));
-static const char *make_c_width_description_string PARAMS ((enum is_wrap));
-static inline void memcpy_small PARAMS ((void *dst, const void *src, size_t n));
-static void wrap PARAMS ((FILE *fp, const char *line_prefix, const char *name,
-                         const char *value, enum is_wrap do_wrap,
-                         const char *charset));
-static void print_blank_line PARAMS ((FILE *fp));
-static void message_print PARAMS ((const message_ty *mp, FILE *fp,
-                                  const char *charset, bool blank_line,
-                                  bool debug));
-static void message_print_obsolete PARAMS ((const message_ty *mp, FILE *fp,
-                                           const char *charset,
-                                           bool blank_line));
-static int cmp_by_msgid PARAMS ((const void *va, const void *vb));
-static int cmp_filepos PARAMS ((const void *va, const void *vb));
-static void msgdomain_list_sort_filepos PARAMS ((msgdomain_list_ty *mdlp));
-static int cmp_by_filepos PARAMS ((const void *va, const void *vb));
-
-
 /* This variable controls the page width when printing messages.
    Defaults to PAGE_WIDTH if not set.  Zero (0) given to message_page_-
    width_set will result in no wrapping being performed.  */
 static size_t page_width = PAGE_WIDTH;
 
 void
-message_page_width_set (n)
-     size_t n;
+message_page_width_set (size_t n)
 {
   if (n == 0)
     {
@@ -134,8 +107,7 @@ message_print_style_uniforum ()
 }
 
 void
-message_print_style_escape (flag)
-     bool flag;
+message_print_style_escape (bool flag)
 {
   escape = flag;
 }
@@ -145,10 +117,8 @@ message_print_style_escape (flag)
 
 
 static const char *
-make_format_description_string (is_format, lang, debug)
-     enum is_format is_format;
-     const char *lang;
-     bool debug;
+make_format_description_string (enum is_format is_format, const char *lang,
+                               bool debug)
 {
   static char result[100];
 
@@ -177,16 +147,14 @@ make_format_description_string (is_format, lang, debug)
 
 
 static bool
-significant_format_p (is_format)
-     enum is_format is_format;
+significant_format_p (enum is_format is_format)
 {
   return is_format != undecided && is_format != impossible;
 }
 
 
 static bool
-has_significant_format_p (is_format)
-     const enum is_format is_format[NFORMATS];
+has_significant_format_p (const enum is_format is_format[NFORMATS])
 {
   size_t i;
 
@@ -198,8 +166,7 @@ has_significant_format_p (is_format)
 
 
 static const char *
-make_c_width_description_string (do_wrap)
-     enum is_wrap do_wrap;
+make_c_width_description_string (enum is_wrap do_wrap)
 {
   const char *result = NULL;
 
@@ -221,10 +188,7 @@ make_c_width_description_string (do_wrap)
 
 /* A version of memcpy optimized for the case n <= 1.  */
 static inline void
-memcpy_small (dst, src, n)
-     void *dst;
-     const void *src;
-     size_t n;
+memcpy_small (void *dst, const void *src, size_t n)
 {
   if (n > 0)
     {
@@ -239,13 +203,8 @@ memcpy_small (dst, src, n)
 
 
 static void
-wrap (fp, line_prefix, name, value, do_wrap, charset)
-     FILE *fp;
-     const char *line_prefix;
-     const char *name;
-     const char *value;
-     enum is_wrap do_wrap;
-     const char *charset;
+wrap (FILE *fp, const char *line_prefix, const char *name, const char *value,
+      enum is_wrap do_wrap, const char *charset)
 {
   const char *canon_charset;
   const char *s;
@@ -613,8 +572,7 @@ internationalized messages should not contain the `\\%c' escape sequence"),
 
 
 static void
-print_blank_line (fp)
-     FILE *fp;
+print_blank_line (FILE *fp)
 {
   if (uniforum)
     fputs ("#\n", fp);
@@ -623,12 +581,8 @@ print_blank_line (fp)
 }
 
 static void
-message_print (mp, fp, charset, blank_line, debug)
-     const message_ty *mp;
-     FILE *fp;
-     const char *charset;
-     bool blank_line;
-     bool debug;
+message_print (const message_ty *mp, FILE *fp, const char *charset,
+              bool blank_line, bool debug)
 {
   size_t j;
 
@@ -810,11 +764,8 @@ different from yours. Consider using a pure ASCII msgid instead.\n\
 
 
 static void
-message_print_obsolete (mp, fp, charset, blank_line)
-     const message_ty *mp;
-     FILE *fp;
-     const char *charset;
-     bool blank_line;
+message_print_obsolete (const message_ty *mp, FILE *fp, const char *charset,
+                       bool blank_line)
 {
   size_t j;
 
@@ -905,11 +856,8 @@ different from yours. Consider using a pure ASCII msgid instead.\n\
 
 
 void
-msgdomain_list_print (mdlp, filename, force, debug)
-     msgdomain_list_ty *mdlp;
-     const char *filename;
-     bool force;
-     bool debug;
+msgdomain_list_print (msgdomain_list_ty *mdlp, const char *filename,
+                     bool force, bool debug)
 {
   FILE *fp;
   size_t j, k;
@@ -1031,9 +979,7 @@ msgdomain_list_print (mdlp, filename, force, debug)
 
 
 static int
-cmp_by_msgid (va, vb)
-     const void *va;
-     const void *vb;
+cmp_by_msgid (const void *va, const void *vb)
 {
   const message_ty *a = *(const message_ty **) va;
   const message_ty *b = *(const message_ty **) vb;
@@ -1045,8 +991,7 @@ cmp_by_msgid (va, vb)
 
 
 void
-msgdomain_list_sort_by_msgid (mdlp)
-     msgdomain_list_ty *mdlp;
+msgdomain_list_sort_by_msgid (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
@@ -1063,9 +1008,7 @@ msgdomain_list_sort_by_msgid (mdlp)
 /* Sort the file positions of every message.  */
 
 static int
-cmp_filepos (va, vb)
-     const void *va;
-     const void *vb;
+cmp_filepos (const void *va, const void *vb)
 {
   const lex_pos_ty *a = (const lex_pos_ty *) va;
   const lex_pos_ty *b = (const lex_pos_ty *) vb;
@@ -1079,8 +1022,7 @@ cmp_filepos (va, vb)
 }
 
 static void
-msgdomain_list_sort_filepos (mdlp)
-    msgdomain_list_ty *mdlp;
+msgdomain_list_sort_filepos (msgdomain_list_ty *mdlp)
 {
   size_t j, k;
 
@@ -1103,9 +1045,7 @@ msgdomain_list_sort_filepos (mdlp)
 /* Sort the messages according to the file position.  */
 
 static int
-cmp_by_filepos (va, vb)
-     const void *va;
-     const void *vb;
+cmp_by_filepos (const void *va, const void *vb)
 {
   const message_ty *a = *(const message_ty **) va;
   const message_ty *b = *(const message_ty **) vb;
@@ -1139,8 +1079,7 @@ cmp_by_filepos (va, vb)
 
 
 void
-msgdomain_list_sort_by_filepos (mdlp)
-    msgdomain_list_ty *mdlp;
+msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp)
 {
   size_t k;
 
index 3896c97b557614a09e51c5227c6fb4669b02d6a5..ffebda4ada32ce57504d44ca1f62c72f13979759 100644 (file)
 #include <stdbool.h>
 
 extern void
-       message_page_width_set PARAMS ((size_t width));
+       message_page_width_set (size_t width);
 extern void
-       message_page_width_ignore PARAMS ((void));
+       message_page_width_ignore (void);
 extern void
-       message_print_style_indent PARAMS ((void));
+       message_print_style_indent (void);
 extern void
-       message_print_style_uniforum PARAMS ((void));
+       message_print_style_uniforum (void);
 extern void
-       message_print_style_escape PARAMS ((bool flag));
+       message_print_style_escape (bool flag);
 
 extern void
-       msgdomain_list_print PARAMS ((msgdomain_list_ty *mdlp,
-                                    const char *filename,
-                                    bool force, bool debug));
+       msgdomain_list_print (msgdomain_list_ty *mdlp,
+                            const char *filename,
+                            bool force, bool debug);
 extern void
-       msgdomain_list_sort_by_msgid PARAMS ((msgdomain_list_ty *mdlp));
+       msgdomain_list_sort_by_msgid (msgdomain_list_ty *mdlp);
 extern void
-       msgdomain_list_sort_by_filepos PARAMS ((msgdomain_list_ty *mdlp));
+       msgdomain_list_sort_by_filepos (msgdomain_list_ty *mdlp);
 
 #endif /* _WRITE_PO_H */
index 9533a1108767d52f0e293656172f930dd9481051..729942e8903ae40dc5e4dffdb5b0a8b37c5434b7 100644 (file)
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void write_tcl_string PARAMS ((FILE *stream, const char *str));
-static void write_msg PARAMS ((FILE *output_file, message_list_ty *mlp,
-                              const char *locale_name));
-
-
 /* Write a string in Tcl Unicode notation to the given stream.
    Tcl 8 uses Unicode for its internal string representation.
    In tcl-8.3.3, the .msg files are read in using the locale dependent
@@ -57,9 +50,7 @@ static void write_msg PARAMS ((FILE *output_file, message_list_ty *mlp,
    form is the \unnnn notation.  Newer tcl versions have this fixed:
    they read the .msg files in UTF-8 encoding.  */
 static void
-write_tcl_string (stream, str)
-     FILE *stream;
-     const char *str;
+write_tcl_string (FILE *stream, const char *str)
 {
   static const char hexdigit[] = "0123456789abcdef";
   const char *str_limit = str + strlen (str);
@@ -115,10 +106,7 @@ write_tcl_string (stream, str)
 
 
 static void
-write_msg (output_file, mlp, locale_name)
-     FILE *output_file;
-     message_list_ty *mlp;
-     const char *locale_name;
+write_msg (FILE *output_file, message_list_ty *mlp, const char *locale_name)
 {
   size_t j;
 
@@ -145,10 +133,9 @@ write_msg (output_file, mlp, locale_name)
 }
 
 int
-msgdomain_write_tcl (mlp, locale_name, directory)
-     message_list_ty *mlp;
-     const char *locale_name;
-     const char *directory;
+msgdomain_write_tcl (message_list_ty *mlp,
+                    const char *locale_name,
+                    const char *directory)
 {
   /* If no entry for this domain don't even create the file.  */
   if (mlp->nitems == 0)
index 0ccb4425a0df75e0f09501f1806692a660be77c9..2b135db67f6464a83cef6dab04e3280c9545188c 100644 (file)
@@ -26,8 +26,8 @@
    the base directory.
    Return 0 if ok, nonzero on error.  */
 extern int
-       msgdomain_write_tcl PARAMS ((message_list_ty *mlp,
-                                   const char *locale_name,
-                                   const char *directory));
+       msgdomain_write_tcl (message_list_ty *mlp,
+                           const char *locale_name,
+                           const char *directory);
 
 #endif /* _WRITE_TCL_H */
index e9d10843f1e1f6c6ada36ffe2d3036401bbd8f4d..4d368a7fbd9561f8c55e59d84af24cf1153cb04b 100644 (file)
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* The awk syntax is defined in the gawk manual page and documentation.
    See also gawk/awkgram.y.  */
@@ -70,21 +64,6 @@ struct token_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void init_keywords PARAMS ((void));
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-static int phase7_getc PARAMS ((void));
-static inline void free_token PARAMS ((token_ty *tp));
-static void x_awk_lex PARAMS ((token_ty *tp));
-static bool extract_parenthesized PARAMS ((message_list_ty *mlp,
-                                          int commas_to_skip,
-                                          int plural_commas));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -102,8 +81,7 @@ x_awk_extract_all ()
 
 
 void
-x_awk_keyword (name)
-     const char *name;
+x_awk_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -186,8 +164,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -242,8 +219,7 @@ phase2_getc ()
 }
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   if (c != EOF)
     phase1_ungetc (c);
@@ -278,7 +254,7 @@ phase7_getc ()
        switch (c)
          {
          case 'a':
-           return ALERT_CHAR;
+           return '\a';
          case 'b':
            return '\b';
          case 'f':
@@ -355,8 +331,7 @@ phase7_getc ()
 
 /* Free the memory pointed to by a 'struct token_ty'.  */
 static inline void
-free_token (tp)
-     token_ty *tp;
+free_token (token_ty *tp)
 {
   switch (tp->type)
     {
@@ -385,8 +360,7 @@ free_token (tp)
 static bool prefer_division_over_regexp;
 
 static void
-x_awk_lex (tp)
-     token_ty *tp;
+x_awk_lex (token_ty *tp)
 {
   static char *buffer;
   static int bufmax;
@@ -688,10 +662,8 @@ x_awk_lex (tp)
    When no specific argument shall be extracted, COMMAS_TO_SKIP < 0.
    Return true upon eof, false upon closing parenthesis.  */
 static bool
-extract_parenthesized (mlp, commas_to_skip, plural_commas)
-     message_list_ty *mlp;
-     int commas_to_skip;
-     int plural_commas;
+extract_parenthesized (message_list_ty *mlp,
+                      int commas_to_skip, int plural_commas)
 {
   /* Remember the message containing the msgid, for msgid_plural.  */
   message_ty *plural_mp = NULL;
@@ -834,11 +806,9 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas)
 
 
 void
-extract_awk (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_awk (FILE *f,
+            const char *real_filename, const char *logical_filename,
+            msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
 
index 0b10b0fb5e48cf15b42d0531f8f0bfe3ce026ed2..a9a2c7f56cfb7d1d7481aee3401e89f2c136ec99 100644 (file)
@@ -24,9 +24,9 @@
   { "awk",        extract_awk, &formatstring_awk },                    \
 
 /* Scan an awk file and add its translatable strings to mdlp.  */
-extern void extract_awk PARAMS ((FILE *fp, const char *real_filename,
-                                const char *logical_filename,
-                                msgdomain_list_ty *mdlp));
+extern void extract_awk (FILE *fp, const char *real_filename,
+                        const char *logical_filename,
+                        msgdomain_list_ty *mdlp);
 
-extern void x_awk_keyword PARAMS ((const char *keyword));
-extern void x_awk_extract_all PARAMS ((void));
+extern void x_awk_keyword (const char *keyword);
+extern void x_awk_extract_all (void);
index 8f359718e91ba1c5cc1706c65f5ca47e661cc213..16c86c07d6f0d4b0927e3d8b6825c2278615e41f 100644 (file)
--- a/src/x-c.c
+++ b/src/x-c.c
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* The ANSI C standard defines several phases of translation:
 
@@ -137,38 +131,6 @@ struct token_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void init_keywords PARAMS ((void));
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-static int phase3_getc PARAMS ((void));
-static void phase3_ungetc PARAMS ((int c));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((size_t chars_to_remove));
-static int phase4_getc PARAMS ((void));
-static void phase4_ungetc PARAMS ((int c));
-static int phase7_getc PARAMS ((void));
-static void phase7_ungetc PARAMS ((int c));
-static inline void free_token PARAMS ((token_ty *tp));
-static void phase5_get PARAMS ((token_ty *tp));
-static void phase5_unget PARAMS ((token_ty *tp));
-static void phaseX_get PARAMS ((token_ty *tp));
-static void phase6_get PARAMS ((token_ty *tp));
-static void phase6_unget PARAMS ((token_ty *tp));
-static bool is_inttypes_macro PARAMS ((const char *name));
-static void phase8a_get PARAMS ((token_ty *tp));
-static void phase8a_unget PARAMS ((token_ty *tp));
-static void phase8_get PARAMS ((token_ty *tp));
-static void x_c_lex PARAMS ((xgettext_token_ty *tp));
-static bool extract_parenthesized PARAMS ((message_list_ty *mlp,
-                                          int commas_to_skip,
-                                          int plural_commas));
-
-
 /* ========================= Lexer customization.  ========================= */
 
 static bool trigraphs = false;
@@ -197,8 +159,7 @@ x_c_extract_all ()
 
 
 void
-x_c_keyword (name)
-     const char *name;
+x_c_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -329,8 +290,7 @@ error while reading \"%s\""), real_file_name);
 
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   switch (c)
     {
@@ -405,8 +365,7 @@ phase2_getc ()
 
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   if (c != EOF)
     phase2_pushback[phase2_pushback_length++] = c;
@@ -443,8 +402,7 @@ phase3_getc ()
 
 
 static void
-phase3_ungetc (c)
-     int c;
+phase3_ungetc (int c)
 {
   if (c != EOF)
     phase3_pushback[phase3_pushback_length++] = c;
@@ -464,8 +422,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -476,8 +433,7 @@ comment_add (c)
 }
 
 static inline void
-comment_line_end (chars_to_remove)
-     size_t chars_to_remove;
+comment_line_end (size_t chars_to_remove)
 {
   buflen -= chars_to_remove;
   while (buflen >= 1
@@ -580,8 +536,7 @@ phase4_getc ()
 
 
 static void
-phase4_ungetc (c)
-     int c;
+phase4_ungetc (int c)
 {
   phase3_ungetc (c);
 }
@@ -647,7 +602,7 @@ phase7_getc ()
       return c;
 
     case 'a':
-      return ALERT_CHAR;
+      return '\a';
     case 'b':
       return '\b';
 
@@ -733,8 +688,7 @@ phase7_getc ()
 
 
 static void
-phase7_ungetc (c)
-     int c;
+phase7_ungetc (int c)
 {
   phase3_ungetc (c);
 }
@@ -742,8 +696,7 @@ phase7_ungetc (c)
 
 /* Free the memory pointed to by a 'struct token_ty'.  */
 static inline void
-free_token (tp)
-     token_ty *tp;
+free_token (token_ty *tp)
 {
   if (tp->type == token_type_name || tp->type == token_type_string_literal)
     free (tp->string);
@@ -759,8 +712,7 @@ static int phase5_pushback_length;
 
 
 static void
-phase5_get (tp)
-     token_ty *tp;
+phase5_get (token_ty *tp)
 {
   static char *buffer;
   static int bufmax;
@@ -1029,8 +981,7 @@ phase5_get (tp)
 
 
 static void
-phase5_unget (tp)
-     token_ty *tp;
+phase5_unget (token_ty *tp)
 {
   if (tp->type != token_type_eof)
     phase5_pushback[phase5_pushback_length++] = *tp;
@@ -1042,8 +993,7 @@ phase5_unget (tp)
    makes the phase 6 easier.  */
 
 static void
-phaseX_get (tp)
-     token_ty *tp;
+phaseX_get (token_ty *tp)
 {
   static bool middle;  /* false at the beginning of a line, true otherwise.  */
 
@@ -1091,8 +1041,7 @@ static int phase6_pushback_length;
 
 
 static void
-phase6_get (tp)
-     token_ty *tp;
+phase6_get (token_ty *tp)
 {
   static token_ty *buf;
   static int bufmax;
@@ -1171,8 +1120,7 @@ phase6_get (tp)
 
 
 static void
-phase6_unget (tp)
-     token_ty *tp;
+phase6_unget (token_ty *tp)
 {
   if (tp->type != token_type_eof)
     phase6_pushback[phase6_pushback_length++] = *tp;
@@ -1184,8 +1132,7 @@ phase6_unget (tp)
 
 /* Test for an ISO C 99 section 7.8.1 format string directive.  */
 static bool
-is_inttypes_macro (name)
-     const char *name;
+is_inttypes_macro (const char *name)
 {
   /* Syntax:
      P R I { d | i | o | u | x | X }
@@ -1223,8 +1170,7 @@ is_inttypes_macro (name)
 }
 
 static void
-phase8a_get (tp)
-     token_ty *tp;
+phase8a_get (token_ty *tp)
 {
   phase6_get (tp);
   if (tp->type == token_type_name && is_inttypes_macro (tp->string))
@@ -1243,8 +1189,7 @@ phase8a_get (tp)
 }
 
 static void
-phase8a_unget (tp)
-     token_ty *tp;
+phase8a_unget (token_ty *tp)
 {
   phase6_unget (tp);
 }
@@ -1255,8 +1200,7 @@ phase8a_unget (tp)
    will miss).  */
 
 static void
-phase8_get (tp)
-     token_ty *tp;
+phase8_get (token_ty *tp)
 {
   phase8a_get (tp);
   if (tp->type != token_type_string_literal)
@@ -1288,8 +1232,7 @@ phase8_get (tp)
    discards any white space from the translation unit.  */
 
 static void
-x_c_lex (tp)
-     xgettext_token_ty *tp;
+x_c_lex (xgettext_token_ty *tp)
 {
   for (;;)
     {
@@ -1400,10 +1343,8 @@ x_c_lex (tp)
    When no specific argument shall be extracted, COMMAS_TO_SKIP < 0.
    Return true upon eof, false upon closing parenthesis.  */
 static bool
-extract_parenthesized (mlp, commas_to_skip, plural_commas)
-     message_list_ty *mlp;
-     int commas_to_skip;
-     int plural_commas;
+extract_parenthesized (message_list_ty *mlp,
+                      int commas_to_skip, int plural_commas)
 {
   /* Remember the message containing the msgid, for msgid_plural.  */
   message_ty *plural_mp = NULL;
@@ -1516,11 +1457,9 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas)
 
 
 void
-extract_c (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_c (FILE *f,
+          const char *real_filename, const char *logical_filename,
+          msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
 
index 72057431b13b6f2ac559d0ace9fd74b2f157d5d6..738e19f2a01abd9bffedc45b976fbf457b031ef1 100644 (file)
--- a/src/x-c.h
+++ b/src/x-c.h
@@ -1,5 +1,5 @@
 /* xgettext C/C++/ObjectiveC backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
   { "ObjectiveC", extract_c, &formatstring_c },                                \
 
 /* Scan a C/C++/ObjectiveC file and add its translatable strings to mdlp.  */
-extern void extract_c PARAMS ((FILE *fp, const char *real_filename,
-                              const char *logical_filename,
-                              msgdomain_list_ty *mdlp));
+extern void extract_c (FILE *fp, const char *real_filename,
+                      const char *logical_filename,
+                      msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_c_extract_all PARAMS ((void));
+extern void x_c_extract_all (void);
 
-extern void x_c_keyword PARAMS ((const char *name));
-extern bool x_c_any_keywords PARAMS ((void));
+extern void x_c_keyword (const char *name);
+extern bool x_c_any_keywords (void);
 
-extern void x_c_trigraphs PARAMS ((void));
+extern void x_c_trigraphs (void);
index 9a0cf3b45447fb2c1e8c4110554c8dfb4364e309..b721ce5d118e03cf970088cab6366c4c8b62fa09 100644 (file)
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* Summary of Emacs Lisp syntax:
    - ';' starts a comment until end of line.
    The reader is implemented in emacs-21.1/src/lread.c.  */
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-struct token;
-struct object;
-static void init_keywords PARAMS ((void));
-static int do_getc PARAMS ((void));
-static void do_ungetc PARAMS ((int c));
-static inline void init_token PARAMS ((struct token *tp));
-static inline void free_token PARAMS ((struct token *tp));
-static inline void grow_token PARAMS ((struct token *tp));
-static inline bool is_integer PARAMS ((const char *p));
-static inline bool is_float PARAMS ((const char *p));
-static bool read_token PARAMS ((struct token *tp, int first));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((size_t chars_to_remove));
-static inline void free_object PARAMS ((struct object *op));
-static char * string_of_object PARAMS ((const struct object *op));
-static int do_getc_escaped PARAMS ((int c, bool in_string));
-static void read_object PARAMS ((struct object *op,
-                                bool first_in_list, bool new_backquote_flag));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -104,8 +75,7 @@ x_elisp_extract_all ()
 
 
 void
-x_elisp_keyword (name)
-     const char *name;
+x_elisp_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -180,8 +150,7 @@ error while reading \"%s\""), real_file_name);
 
 /* Put back the last fetched character, not EOF.  */
 static void
-do_ungetc (c)
-     int c;
+do_ungetc (int c)
 {
   if (c == '\n')
     line_number--;
@@ -202,8 +171,7 @@ struct token
 
 /* Initialize a 'struct token'.  */
 static inline void
-init_token (tp)
-     struct token *tp;
+init_token (struct token *tp)
 {
   tp->allocated = 10;
   tp->chars = (char *) xmalloc (tp->allocated * sizeof (char));
@@ -212,16 +180,14 @@ init_token (tp)
 
 /* Free the memory pointed to by a 'struct token'.  */
 static inline void
-free_token (tp)
-     struct token *tp;
+free_token (struct token *tp)
 {
   free (tp->chars);
 }
 
 /* Ensure there is enough room in the token for one more character.  */
 static inline void
-grow_token (tp)
-     struct token *tp;
+grow_token (struct token *tp)
 {
   if (tp->charcount == tp->allocated)
     {
@@ -232,8 +198,7 @@ grow_token (tp)
 
 /* Test whether a token has integer syntax.  */
 static inline bool
-is_integer (p)
-     const char *p;
+is_integer (const char *p)
 {
   /* NB: Yes, '+.' and '-.' both designate the integer 0.  */
   const char *p_start = p;
@@ -251,8 +216,7 @@ is_integer (p)
 
 /* Test whether a token has float syntax.  */
 static inline bool
-is_float (p)
-     const char *p;
+is_float (const char *p)
 {
   enum { LEAD_INT = 1, DOT_CHAR = 2, TRAIL_INT = 4, E_CHAR = 8, EXP_INT = 16 };
   int state;
@@ -311,9 +275,7 @@ is_float (p)
 /* Read the next token.  'first' is the first character, which has already
    been read.  Returns true for a symbol, false for a number.  */
 static bool
-read_token (tp, first)
-     struct token *tp;
-     int first;
+read_token (struct token *tp, int first)
 {
   int c;
   bool quoted = false;
@@ -373,8 +335,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -385,8 +346,7 @@ comment_add (c)
 }
 
 static inline void
-comment_line_end (chars_to_remove)
-     size_t chars_to_remove;
+comment_line_end (size_t chars_to_remove)
 {
   buflen -= chars_to_remove;
   while (buflen >= 1
@@ -439,8 +399,7 @@ struct object
 
 /* Free the memory pointed to by a 'struct object'.  */
 static inline void
-free_object (op)
-     struct object *op;
+free_object (struct object *op)
 {
   if (op->type == t_symbol || op->type == t_string)
     {
@@ -451,8 +410,7 @@ free_object (op)
 
 /* Convert a t_symbol/t_string token to a char*.  */
 static char *
-string_of_object (op)
-     const struct object *op;
+string_of_object (const struct object *op)
 {
   char *str;
   int n;
@@ -469,14 +427,12 @@ string_of_object (op)
 /* Returns the character represented by an escape sequence.  */
 #define IGNORABLE_ESCAPE (EOF - 1)
 static int
-do_getc_escaped (c, in_string)
-     int c;
-     bool in_string;
+do_getc_escaped (int c, bool in_string)
 {
   switch (c)
     {
     case 'a':
-      return ALERT_CHAR;
+      return '\a';
     case 'b':
       return '\b';
     case 'd':
@@ -653,10 +609,7 @@ do_getc_escaped (c, in_string)
    'first_in_list' and 'new_backquote_flag' are used for reading old
    backquote syntax and new backquote syntax.  */
 static void
-read_object (op, first_in_list, new_backquote_flag)
-     struct object *op;
-     bool first_in_list;
-     bool new_backquote_flag;
+read_object (struct object *op, bool first_in_list, bool new_backquote_flag)
 {
   for (;;)
     {
@@ -1247,11 +1200,9 @@ read_object (op, first_in_list, new_backquote_flag)
 
 
 void
-extract_elisp (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_elisp (FILE *f,
+              const char *real_filename, const char *logical_filename,
+              msgdomain_list_ty *mdlp)
 {
   mlp = mdlp->item[0]->messages;
 
index dce716ceb08281870e3edaa9bb2bff3e6fe6e6d1..9dfe1d658e91ad61c1ab58f9d33ff3bb85db7304 100644 (file)
   { "EmacsLisp",  extract_elisp, &formatstring_elisp },                        \
 
 /* Scan an Emacs Lisp file and add its translatable strings to mdlp.  */
-extern void extract_elisp PARAMS ((FILE *fp, const char *real_filename,
-                                  const char *logical_filename,
-                                  msgdomain_list_ty *mdlp));
+extern void extract_elisp (FILE *fp, const char *real_filename,
+                          const char *logical_filename,
+                          msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_elisp_extract_all PARAMS ((void));
-extern void x_elisp_keyword PARAMS ((const char *name));
+extern void x_elisp_extract_all (void);
+extern void x_elisp_keyword (const char *name);
index 369e07759136fd534963995b9ebf631e107278ee..3ba11cb88e7e6475c21f847d7995ed0c622d9ad8 100644 (file)
    libglade-0.16.  */
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void init_keywords PARAMS ((void));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -78,8 +73,7 @@ x_glade_extract_all ()
 
 
 void
-x_glade_keyword (name)
-     const char *name;
+x_glade_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -116,29 +110,25 @@ init_keywords ()
 
 #if DYNLOAD_LIBEXPAT
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static bool load_libexpat PARAMS ((void));
-
 typedef void *XML_Parser;
 typedef char XML_Char;
 typedef char XML_LChar;
 enum XML_Error { XML_ERROR_NONE };
-typedef void (*XML_StartElementHandler) PARAMS ((void *userData, const XML_Char *name, const XML_Char **atts));
-typedef void (*XML_EndElementHandler) PARAMS ((void *userData, const XML_Char *name));
-typedef void (*XML_CharacterDataHandler) PARAMS ((void *userData, const XML_Char *s, int len));
-typedef void (*XML_CommentHandler) PARAMS ((void *userData, const XML_Char *data));
-
-static XML_Parser (*p_XML_ParserCreate) PARAMS ((const XML_Char *encoding));
-static void (*p_XML_SetElementHandler) PARAMS ((XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end));
-static void (*p_XML_SetCharacterDataHandler) PARAMS ((XML_Parser parser, XML_CharacterDataHandler handler));
-static void (*p_XML_SetCommentHandler) PARAMS ((XML_Parser parser, XML_CommentHandler handler));
-static int (*p_XML_Parse) PARAMS ((XML_Parser parser, const char *s, int len, int isFinal));
-static enum XML_Error (*p_XML_GetErrorCode) PARAMS ((XML_Parser parser));
-static int (*p_XML_GetCurrentLineNumber) PARAMS ((XML_Parser parser));
-static int (*p_XML_GetCurrentColumnNumber) PARAMS ((XML_Parser parser));
-static void (*p_XML_ParserFree) PARAMS ((XML_Parser parser));
-static const XML_LChar * (*p_XML_ErrorString) PARAMS ((int code));
+typedef void (*XML_StartElementHandler) (void *userData, const XML_Char *name, const XML_Char **atts);
+typedef void (*XML_EndElementHandler) (void *userData, const XML_Char *name);
+typedef void (*XML_CharacterDataHandler) (void *userData, const XML_Char *s, int len);
+typedef void (*XML_CommentHandler) (void *userData, const XML_Char *data);
+
+static XML_Parser (*p_XML_ParserCreate) (const XML_Char *encoding);
+static void (*p_XML_SetElementHandler) (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end);
+static void (*p_XML_SetCharacterDataHandler) (XML_Parser parser, XML_CharacterDataHandler handler);
+static void (*p_XML_SetCommentHandler) (XML_Parser parser, XML_CommentHandler handler);
+static int (*p_XML_Parse) (XML_Parser parser, const char *s, int len, int isFinal);
+static enum XML_Error (*p_XML_GetErrorCode) (XML_Parser parser);
+static int (*p_XML_GetCurrentLineNumber) (XML_Parser parser);
+static int (*p_XML_GetCurrentColumnNumber) (XML_Parser parser);
+static void (*p_XML_ParserFree) (XML_Parser parser);
+static const XML_LChar * (*p_XML_ErrorString) (int code);
 
 #define XML_ParserCreate (*p_XML_ParserCreate)
 #define XML_SetElementHandler (*p_XML_SetElementHandler)
@@ -189,20 +179,6 @@ load_libexpat ()
 
 #if DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void ensure_stack_size PARAMS ((size_t size));
-static void start_element_handler PARAMS ((void *userData, const char *name,
-                                          const char **attributes));
-static void end_element_handler PARAMS ((void *userData, const char *name));
-static void character_data_handler PARAMS ((void *userData, const char *s,
-                                           int len));
-static void comment_handler PARAMS ((void *userData, const char *data));
-static void do_extract_glade PARAMS ((FILE *fp, const char *real_filename,
-                                     const char *logical_filename,
-                                     msgdomain_list_ty *mdlp));
-
-
 /* Accumulator for the extracted messages.  */
 static message_list_ty *mlp; 
 
@@ -225,8 +201,7 @@ static size_t stack_size;
 
 /* Ensures stack_size >= size.  */
 static void
-ensure_stack_size (size)
-     size_t size;
+ensure_stack_size (size_t size)
 {
   if (size > stack_size)
     {
@@ -243,10 +218,8 @@ static size_t stack_depth;
 
 /* Callback called when <element> is seen.  */
 static void
-start_element_handler (userData, name, attributes)
-     void *userData;
-     const char *name;
-     const char **attributes;
+start_element_handler (void *userData, const char *name,
+                      const char **attributes)
 {
   struct element_state *p;
   void *hash_result;
@@ -271,9 +244,7 @@ start_element_handler (userData, name, attributes)
 
 /* Callback called when </element> is seen.  */
 static void
-end_element_handler (userData, name)
-     void *userData;
-     const char *name;
+end_element_handler (void *userData, const char *name)
 {
   struct element_state *p = &stack[stack_depth];
 
@@ -309,10 +280,7 @@ end_element_handler (userData, name)
 
 /* Callback called when some text is seen.  */
 static void
-character_data_handler (userData, s, len)
-     void *userData;
-     const char *s;
-     int len;
+character_data_handler (void *userData, const char *s, int len)
 {
   struct element_state *p = &stack[stack_depth];
 
@@ -333,9 +301,7 @@ character_data_handler (userData, s, len)
 
 /* Callback called when some comment text is seen.  */
 static void
-comment_handler (userData, data)
-     void *userData;
-     const char *data;
+comment_handler (void *userData, const char *data)
 {
   /* Split multiline comment into lines, and remove leading and trailing
      whitespace.  */
@@ -364,11 +330,9 @@ comment_handler (userData, data)
 
 
 static void
-do_extract_glade (fp, real_filename, logical_filename, mdlp)
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+do_extract_glade (FILE *fp,
+                 const char *real_filename, const char *logical_filename,
+                 msgdomain_list_ty *mdlp)
 {
   mlp = mdlp->item[0]->messages;
 
@@ -424,11 +388,9 @@ error while reading \"%s\""), real_filename);
 #endif
 
 void
-extract_glade (fp, real_filename, logical_filename, mdlp)
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_glade (FILE *fp,
+              const char *real_filename, const char *logical_filename,
+              msgdomain_list_ty *mdlp)
 {
 #if DYNLOAD_LIBEXPAT || HAVE_LIBEXPAT
   if (LIBEXPAT_AVAILABLE ())
index 3d9672a5dda4e46f132879a00c5c8893bfc9c8c4..db6ae6f07cd9b31eedde7a788874eca8cad37aa0 100644 (file)
   { "glade",      extract_glade, NULL },                               \
 
 /* Scan a glade XML file and add its translatable strings to mdlp.  */
-extern void extract_glade PARAMS ((FILE *fp, const char *real_filename,
-                                  const char *logical_filename,
-                                  msgdomain_list_ty *mdlp));
+extern void extract_glade (FILE *fp, const char *real_filename,
+                          const char *logical_filename,
+                          msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_glade_extract_all PARAMS ((void));
-extern void x_glade_keyword PARAMS ((const char *name));
+extern void x_glade_extract_all (void);
+extern void x_glade_keyword (const char *name);
index ddb040c8f3f60f57fcb024470483005be166d8a6..fd30fcd38a9f0e652750b5b64a6db43c6872a96e 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Java backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Tommy Johansson <tommy.johansson@kanalen.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -22,9 +22,9 @@
 #define SCANNERS_JAVA \
   { "Java",        extract_java, &formatstring_java },                 \
 
-extern void extract_java PARAMS ((FILE *fp, const char *real_filename,
-                                 const char *logical_filename,
-                                 msgdomain_list_ty *mdlp));
+extern void extract_java (FILE *fp, const char *real_filename,
+                         const char *logical_filename,
+                         msgdomain_list_ty *mdlp);
 
-extern void x_java_keyword PARAMS ((const char *keyword));
-extern void x_java_extract_all PARAMS ((void));
+extern void x_java_keyword (const char *keyword);
+extern void x_java_extract_all (void);
index e8d9e325a2042148cacd831fb5155c77dd3e107a..dee61a2f4e9055151b7cae4b397d7c02d1374e96 100644 (file)
@@ -91,31 +91,6 @@ typedef struct _java_keyword
 } java_keyword;
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static char_buf *create_char_buf PARAMS ((void));
-static void append_char_buf PARAMS ((char_buf *b, int c));
-static char *get_string PARAMS ((char_buf *b));
-static void destroy_charbuf PARAMS ((char_buf *b));
-static void update_line_no PARAMS ((int c));
-static void strip_ending_spaces PARAMS ((char *str));
-static char *append_strings PARAMS ((char *a, char *b));
-static inline bool isplus PARAMS ((char *s));
-static inline bool isdot PARAMS ((char *s));
-static char *translate_esc PARAMS ((char *s));
-static object_list * object_list_alloc PARAMS ((void));
-static void object_list_destroy PARAMS ((object_list *list));
-static int get_num_objects PARAMS ((const object_list *list));
-static void * get_object PARAMS ((const object_list *list, int i));
-static void add_object PARAMS ((object_list *list, void *object));
-static java_keyword * alloc_keyword PARAMS ((const char *keyword,
-                                            int arg1, int arg2));
-static bool tailcmp PARAMS ((const char *s1, const char *s2));
-static bool do_compare PARAMS ((const char *s1, const char *s2));
-static java_keyword *is_keyword PARAMS ((const char *s));
-static void free_global PARAMS ((void));
-
-
 #define INITIAL_CHARBUF_SIZE 500
 #define CHARBUF_GROWTH 100
 static char_buf *
@@ -130,9 +105,7 @@ create_char_buf ()
 }
 
 static void
-append_char_buf (b, c)
-     char_buf *b;
-     int c;
+append_char_buf (char_buf *b, int c)
 {
   if (b->len >= b->maxlen - 1)
     {
@@ -144,31 +117,27 @@ append_char_buf (b, c)
 }
 
 static char *
-get_string (b)
-     char_buf *b;
+get_string (char_buf *b)
 {
   return xstrdup (b->data);
 }
 
 static void
-destroy_charbuf (b)
-     char_buf *b;
+destroy_charbuf (char_buf *b)
 {
   free (b->data);
   free (b);
 }
 
 static void
-update_line_no (c)
-     int c;
+update_line_no (int c)
 {
   if (c == '\n')
     parser_global->line_no++;
 }
 
 static void
-strip_ending_spaces (str)
-     char *str;
+strip_ending_spaces (char *str)
 {
   int len = strlen (str);
 
@@ -252,9 +221,7 @@ ID [a-zA-Z_][a-zA-Z0-9_]*
 %%
 
 static char *
-append_strings (a, b)
-     char *a;
-     char *b;
+append_strings (char *a, char *b)
 {
   int total_size = strlen (a) + strlen (b) + 1;
   char *new_string = (char *) xmalloc (total_size);
@@ -264,23 +231,20 @@ append_strings (a, b)
 }
 
 static inline bool
-isplus (s)
-     char *s;
+isplus (char *s)
 {
   return *s == '+';
 }
 
 static inline bool
-isdot (s)
-     char *s;
+isdot (char *s)
 {
   return *s == '.';
 }
 
 
 static char *
-translate_esc (s)
-     char *s;
+translate_esc (char *s)
 {
   char *n = (char *) xmalloc (strlen (s) + 1);
   size_t i;
@@ -314,32 +278,26 @@ object_list_alloc ()
 }
 
 static void
-object_list_destroy (list)
-     object_list *list;
+object_list_destroy (object_list *list)
 {
   free (list->objects);
   free (list);
 }
 
 static int
-get_num_objects (list)
-     const object_list *list;
+get_num_objects (const object_list *list)
 {
   return list->num_obj;
 }
 
 static void *
-get_object (list, i)
-     const object_list *list;
-     int i;
+get_object (const object_list *list, int i)
 {
   return list->objects[i];
 }
 
 static void
-add_object (list, object)
-     object_list *list;
-     void *object;
+add_object (object_list *list, void *object)
 {
   if (list->num_obj + 1 >= list->max_num_obj)
     {
@@ -362,10 +320,7 @@ x_java_extract_all ()
 
 
 static java_keyword *
-alloc_keyword (keyword, arg1, arg2)
-     const char *keyword;
-     int arg1;
-     int arg2;
+alloc_keyword (const char *keyword, int arg1, int arg2)
 {
   java_keyword *jk = xmalloc (sizeof (java_keyword));
   jk->keyword = xstrdup (keyword);
@@ -381,9 +336,7 @@ static object_list *java_keywords = NULL;
  * Backwards substring match.
  */
 static bool
-tailcmp (s1, s2)
-     const char *s1;
-     const char *s2;
+tailcmp (const char *s1, const char *s2)
 {
   int len1 = strlen (s1);
   int len2 = strlen (s2);
@@ -398,9 +351,7 @@ tailcmp (s1, s2)
  * true substring match is used.
  */
 static bool
-do_compare (s1, s2)
-     const char *s1;
-     const char *s2;
+do_compare (const char *s1, const char *s2)
 {
   if (substring_match)
     return strstr (s1, s2) != NULL;
@@ -412,8 +363,7 @@ do_compare (s1, s2)
  * Check if a string is a keyword or not.
  */
 static java_keyword *
-is_keyword (s)
-     const char *s;
+is_keyword (const char *s)
 {
   int i;
   int num_keywords = get_num_objects (java_keywords);
@@ -433,8 +383,7 @@ is_keyword (s)
  * Add a keyword to the list of possible keywords.
  */
 void
-x_java_keyword (keyword)
-     const char *keyword;
+x_java_keyword (const char *keyword)
 {
   const char *keyword_end;
   int arg1;
@@ -499,11 +448,9 @@ free_global ()
  * Main java keyword extract function.
  */
 void
-extract_java (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_java (FILE *f,
+             const char *real_filename, const char *logical_filename,
+             msgdomain_list_ty *mdlp)
 {
   char *logical_file_name = xstrdup (logical_filename);
   int token;
index 8cf9d1357ad2647662d2b4a18cfff933dd52abe7..06cc2bf9a66a07e782f235a6e26733f08bccc020 100644 (file)
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* Summary of librep syntax:
    - ';' starts a comment until end of line.
    The reader is implemented in librep-0.14/src/lisp.c.  */
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-struct token;
-struct object;
-static void init_keywords PARAMS ((void));
-static int do_getc PARAMS ((void));
-static void do_ungetc PARAMS ((int c));
-static inline void init_token PARAMS ((struct token *tp));
-static inline void free_token PARAMS ((struct token *tp));
-static inline void grow_token PARAMS ((struct token *tp));
-static bool read_token PARAMS ((struct token *tp, const int *first));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((size_t chars_to_remove));
-static inline void free_object PARAMS ((struct object *op));
-static char * string_of_object PARAMS ((const struct object *op));
-static int do_getc_escaped PARAMS ((int c));
-static void read_object PARAMS ((struct object *op));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -103,8 +77,7 @@ x_librep_extract_all ()
 
 
 void
-x_librep_keyword (name)
-     const char *name;
+x_librep_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -179,8 +152,7 @@ error while reading \"%s\""), real_file_name);
 
 /* Put back the last fetched character, not EOF.  */
 static void
-do_ungetc (c)
-     int c;
+do_ungetc (int c)
 {
   if (c == '\n')
     line_number--;
@@ -201,8 +173,7 @@ struct token
 
 /* Initialize a 'struct token'.  */
 static inline void
-init_token (tp)
-     struct token *tp;
+init_token (struct token *tp)
 {
   tp->allocated = 10;
   tp->chars = (char *) xmalloc (tp->allocated * sizeof (char));
@@ -211,16 +182,14 @@ init_token (tp)
 
 /* Free the memory pointed to by a 'struct token'.  */
 static inline void
-free_token (tp)
-     struct token *tp;
+free_token (struct token *tp)
 {
   free (tp->chars);
 }
 
 /* Ensure there is enough room in the token for one more character.  */
 static inline void
-grow_token (tp)
-     struct token *tp;
+grow_token (struct token *tp)
 {
   if (tp->charcount == tp->allocated)
     {
@@ -233,9 +202,7 @@ grow_token (tp)
    character, which has already been read.  Returns true for a symbol,
    false for a number.  */
 static bool
-read_token (tp, first)
-     struct token *tp;
-     const int *first;
+read_token (struct token *tp, const int *first)
 {
   int c;
   /* Variables for speculative number parsing:  */
@@ -449,8 +416,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -461,8 +427,7 @@ comment_add (c)
 }
 
 static inline void
-comment_line_end (chars_to_remove)
-     size_t chars_to_remove;
+comment_line_end (size_t chars_to_remove)
 {
   buflen -= chars_to_remove;
   while (buflen >= 1
@@ -514,8 +479,7 @@ struct object
 
 /* Free the memory pointed to by a 'struct object'.  */
 static inline void
-free_object (op)
-     struct object *op;
+free_object (struct object *op)
 {
   if (op->type == t_symbol || op->type == t_string)
     {
@@ -526,8 +490,7 @@ free_object (op)
 
 /* Convert a t_symbol/t_string token to a char*.  */
 static char *
-string_of_object (op)
-     const struct object *op;
+string_of_object (const struct object *op)
 {
   char *str;
   int n;
@@ -543,8 +506,7 @@ string_of_object (op)
 
 /* Returns the character represented by an escape sequence.  */
 static int
-do_getc_escaped (c)
-     int c;
+do_getc_escaped (int c)
 {
   switch (c)
     {
@@ -559,7 +521,7 @@ do_getc_escaped (c)
     case 'v':
       return '\v';
     case 'a':
-      return ALERT_CHAR;
+      return '\a';
     case '^':
       c = do_getc ();
       if (c == EOF)
@@ -620,8 +582,7 @@ do_getc_escaped (c)
 
 /* Read the next object.  */
 static void
-read_object (op)
-     struct object *op;
+read_object (struct object *op)
 {
   for (;;)
     {
@@ -1122,11 +1083,9 @@ read_object (op)
 
 
 void
-extract_librep (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_librep (FILE *f,
+               const char *real_filename, const char *logical_filename,
+               msgdomain_list_ty *mdlp)
 {
   mlp = mdlp->item[0]->messages;
 
index 12ec2ece0b25921887fc0ff44fd2ef3e6dfb6073..9280d7efdc8c45a1420147c3384fcf36041622f8 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext librep backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
   { "librep",     extract_librep, &formatstring_librep },              \
 
 /* Scan a librep file and add its translatable strings to mdlp.  */
-extern void extract_librep PARAMS ((FILE *fp, const char *real_filename,
-                                   const char *logical_filename,
-                                   msgdomain_list_ty *mdlp));
+extern void extract_librep (FILE *fp, const char *real_filename,
+                           const char *logical_filename,
+                           msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_librep_extract_all PARAMS ((void));
-extern void x_librep_keyword PARAMS ((const char *name));
+extern void x_librep_extract_all (void);
+extern void x_librep_keyword (const char *name);
index 8ea35efa43bdee88ce4df59bf9a8a6982f5e6ba1..6bf61340a375cc0edd04f47a61614e0be60f576b 100644 (file)
  */
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-struct char_syntax;
-struct token;
-struct object;
-static void init_keywords PARAMS ((void));
-static int do_getc PARAMS ((void));
-static void do_ungetc PARAMS ((int c));
-static inline void init_token PARAMS ((struct token *tp));
-static inline void free_token PARAMS ((struct token *tp));
-static inline void grow_token PARAMS ((struct token *tp));
-static void read_token PARAMS ((struct token *tp,
-                               const struct char_syntax *first));
-static inline bool has_a_dot PARAMS ((const struct token *tp));
-static inline bool all_a_number PARAMS ((const struct token *tp));
-static inline void a_letter_to_digit PARAMS ((const struct token *tp,
-                                             int base));
-static inline bool has_a_digit PARAMS ((const struct token *tp));
-static inline bool has_adjacent_letters PARAMS ((const struct token *tp));
-static bool is_potential_number PARAMS ((const struct token *tp, int *basep));
-static void upcase_token PARAMS ((struct token *tp));
-static void downcase_token PARAMS ((struct token *tp));
-static void case_convert_token  PARAMS ((struct token *tp));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((size_t chars_to_remove));
-static inline void free_object PARAMS ((struct object *op));
-static char * string_of_object PARAMS ((const struct object *op));
-static void read_object PARAMS ((struct object *op));
-
-
 /* ========================= Lexer customization.  ========================= */
 
 /* 'readtable_case' is the case conversion that is applied to non-escaped
@@ -149,8 +118,7 @@ x_lisp_extract_all ()
 
 
 void
-x_lisp_keyword (name)
-     const char *name;
+x_lisp_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -244,8 +212,7 @@ error while reading \"%s\""), real_file_name);
 
 /* Put back the last fetched character, not EOF.  */
 static void
-do_ungetc (c)
-     int c;
+do_ungetc (int c)
 {
   if (c == '\n')
     line_number--;
@@ -270,16 +237,9 @@ enum syntax_code
   syntax_nt_macro      /* '#' (non-terminating macro)          */
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static enum syntax_code
-       syntax_code_of PARAMS ((/*promote: unsigned char*/ int c));
-static void read_char_syntax PARAMS ((struct char_syntax *p));
-
 /* Returns the syntax code of a character.  */
 static enum syntax_code
-syntax_code_of (c)
-     unsigned char c;
+syntax_code_of (unsigned char c)
 {
   switch (c)
     {
@@ -309,8 +269,7 @@ struct char_syntax
 
 /* Returns the next character and its syntax code.  */
 static void
-read_char_syntax (p)
-     struct char_syntax *p;
+read_char_syntax (struct char_syntax *p)
 {
   int c = do_getc ();
 
@@ -343,14 +302,9 @@ enum attribute
 #define is_letter_attribute(a) ((a) >= a_letter)
 #define is_number_attribute(a) ((a) >= a_ratio)
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static enum attribute attribute_of PARAMS ((/*promote: unsigned char*/ int c));
-
 /* Returns the attribute of a character, assuming base 10.  */
 static enum attribute
-attribute_of (c)
-     unsigned char c;
+attribute_of (unsigned char c)
 {
   switch (c)
     {
@@ -400,8 +354,7 @@ struct token
 
 /* Initialize a 'struct token'.  */
 static inline void
-init_token (tp)
-     struct token *tp;
+init_token (struct token *tp)
 {
   tp->allocated = 10;
   tp->chars =
@@ -411,16 +364,14 @@ init_token (tp)
 
 /* Free the memory pointed to by a 'struct token'.  */
 static inline void
-free_token (tp)
-     struct token *tp;
+free_token (struct token *tp)
 {
   free (tp->chars);
 }
 
 /* Ensure there is enough room in the token for one more character.  */
 static inline void
-grow_token (tp)
-     struct token *tp;
+grow_token (struct token *tp)
 {
   if (tp->charcount == tp->allocated)
     {
@@ -433,9 +384,7 @@ grow_token (tp)
    character, which has already been read.
    The algorithm follows CLHS 2.2 "Reader Algorithm".  */
 static void
-read_token (tp, first)
-     struct token *tp;
-     const struct char_syntax *first;
+read_token (struct token *tp, const struct char_syntax *first)
 {
   bool multiple_escape_flag;
   struct char_syntax curr;
@@ -530,8 +479,7 @@ read_token (tp, first)
  */
 
 static inline bool
-has_a_dot (tp)
-     const struct token *tp;
+has_a_dot (const struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -543,8 +491,7 @@ has_a_dot (tp)
 }
 
 static inline bool
-all_a_number (tp)
-     const struct token *tp;
+all_a_number (const struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -556,9 +503,7 @@ all_a_number (tp)
 }
 
 static inline void
-a_letter_to_digit (tp, base)
-     const struct token *tp;
-     int base;
+a_letter_to_digit (const struct token *tp, int base)
 {
   int n = tp->charcount;
   int i;
@@ -577,8 +522,7 @@ a_letter_to_digit (tp, base)
 }
 
 static inline bool
-has_a_digit (tp)
-     const struct token *tp;
+has_a_digit (const struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -592,8 +536,7 @@ has_a_digit (tp)
 }
 
 static inline bool
-has_adjacent_letters (tp)
-     const struct token *tp;
+has_adjacent_letters (const struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -606,9 +549,7 @@ has_adjacent_letters (tp)
 }
 
 static bool
-is_potential_number (tp, basep)
-     const struct token *tp;
-     int *basep;
+is_potential_number (const struct token *tp, int *basep)
 {
   /* CLHS 2.3.1.1.1:
      "A potential number cannot contain any escape characters."  */
@@ -653,14 +594,8 @@ enum number_type
   n_float
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static enum number_type is_number PARAMS ((const struct token *tp, int *basep));
-
 static enum number_type
-is_number (tp, basep)
-     const struct token *tp;
-     int *basep;
+is_number (const struct token *tp, int *basep)
 {
   struct token_char *ptr_limit;
   struct token_char *ptr1;
@@ -801,8 +736,7 @@ is_number (tp, basep)
    For portability, we convert only ASCII characters here.  */
 
 static void
-upcase_token (tp)
-     struct token *tp;
+upcase_token (struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -817,8 +751,7 @@ upcase_token (tp)
 }
 
 static void
-downcase_token (tp)
-     struct token *tp;
+downcase_token (struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -833,8 +766,7 @@ downcase_token (tp)
 }
 
 static void
-case_convert_token  (tp)
-     struct token *tp;
+case_convert_token (struct token *tp)
 {
   int n = tp->charcount;
   int i;
@@ -895,8 +827,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -907,8 +838,7 @@ comment_add (c)
 }
 
 static inline void
-comment_line_end (chars_to_remove)
-     size_t chars_to_remove;
+comment_line_end (size_t chars_to_remove)
 {
   buflen -= chars_to_remove;
   while (buflen >= 1
@@ -960,8 +890,7 @@ struct object
 
 /* Free the memory pointed to by a 'struct object'.  */
 static inline void
-free_object (op)
-     struct object *op;
+free_object (struct object *op)
 {
   if (op->type == t_symbol || op->type == t_string)
     {
@@ -972,8 +901,7 @@ free_object (op)
 
 /* Convert a t_symbol/t_string token to a char*.  */
 static char *
-string_of_object (op)
-     const struct object *op;
+string_of_object (const struct object *op)
 {
   char *str;
   const struct token_char *p;
@@ -993,8 +921,7 @@ string_of_object (op)
 
 /* Read the next object.  */
 static void
-read_object (op)
-     struct object *op;
+read_object (struct object *op)
 {
   for (;;)
     {
@@ -1443,11 +1370,9 @@ read_object (op)
 
 
 void
-extract_lisp (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_lisp (FILE *f,
+             const char *real_filename, const char *logical_filename,
+             msgdomain_list_ty *mdlp)
 {
   mlp = mdlp->item[0]->messages;
 
index 1c6b02b61b6d566ff339b1bd934bfd6f3480f16a..b7377b1f8a2a690b5b4a39a48797609fb8dc4665 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext Lisp backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
   { "Lisp",       extract_lisp, &formatstring_lisp },                  \
 
 /* Scan a Lisp file and add its translatable strings to mdlp.  */
-extern void extract_lisp PARAMS ((FILE *fp, const char *real_filename,
-                                 const char *logical_filename,
-                                 msgdomain_list_ty *mdlp));
+extern void extract_lisp (FILE *fp, const char *real_filename,
+                         const char *logical_filename,
+                         msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_lisp_extract_all PARAMS ((void));
-extern void x_lisp_keyword PARAMS ((const char *name));
+extern void x_lisp_extract_all (void);
+extern void x_lisp_keyword (const char *name);
index 63a61078de9961ace891ff86ba2c161790d7b969..214269594fd7f415e1ebe52ba81d31fa89843291 100644 (file)
@@ -61,28 +61,6 @@ struct token_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void init_keywords PARAMS ((void));
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static void skip_html PARAMS ((void));
-#if 0
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-#endif
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((size_t chars_to_remove));
-static int phase3_getc PARAMS ((void));
-static void phase3_ungetc PARAMS ((int c));
-static inline void free_token PARAMS ((token_ty *tp));
-static void x_php_lex PARAMS ((token_ty *tp));
-static bool extract_parenthesized PARAMS ((message_list_ty *mlp,
-                                          int commas_to_skip,
-                                          int plural_commas));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -100,8 +78,7 @@ x_php_extract_all ()
 
 
 void
-x_php_keyword (name)
-     const char *name;
+x_php_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -193,8 +170,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -535,8 +511,7 @@ phase2_getc ()
 }
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   if (c != EOF)
     phase2_pushback[phase2_pushback_length++] = c;
@@ -558,8 +533,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -570,8 +544,7 @@ comment_add (c)
 }
 
 static inline void
-comment_line_end (chars_to_remove)
-     size_t chars_to_remove;
+comment_line_end (size_t chars_to_remove)
 {
   buflen -= chars_to_remove;
   while (buflen >= 1
@@ -733,8 +706,7 @@ phase3_getc ()
 }
 
 static void
-phase3_ungetc (c)
-     int c;
+phase3_ungetc (int c)
 {
   if (c != EOF)
     phase3_pushback[phase3_pushback_length++] = c;
@@ -743,8 +715,7 @@ phase3_ungetc (c)
 
 /* Free the memory pointed to by a 'struct token_ty'.  */
 static inline void
-free_token (tp)
-     token_ty *tp;
+free_token (token_ty *tp)
 {
   if (tp->type == token_type_string_literal || tp->type == token_type_symbol)
     free (tp->string);
@@ -754,8 +725,7 @@ free_token (tp)
 /* 4. Combine characters into tokens.  Discard whitespace.  */
 
 static void
-x_php_lex (tp)
-     token_ty *tp;
+x_php_lex (token_ty *tp)
 {
   static char *buffer;
   static int bufmax;
@@ -1207,10 +1177,8 @@ x_php_lex (tp)
    When no specific argument shall be extracted, COMMAS_TO_SKIP < 0.
    Return true upon eof, false upon closing parenthesis.  */
 static bool
-extract_parenthesized (mlp, commas_to_skip, plural_commas)
-     message_list_ty *mlp;
-     int commas_to_skip;
-     int plural_commas;
+extract_parenthesized (message_list_ty *mlp,
+                      int commas_to_skip, int plural_commas)
 {
   /* Remember the message containing the msgid, for msgid_plural.  */
   message_ty *plural_mp = NULL;
@@ -1342,11 +1310,9 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas)
 
 
 void
-extract_php (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_php (FILE *f,
+            const char *real_filename, const char *logical_filename,
+            msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
 
index 8583356fc4bf08a12a2a1ac4e03f41f2df5952ec..603e40079cd9f549da0bec7f1638666a1bae6b78 100644 (file)
@@ -26,9 +26,9 @@
   { "PHP",        extract_php, &formatstring_php },                    \
 
 /* Scan a PHP file and add its translatable strings to mdlp.  */
-extern void extract_php PARAMS ((FILE *fp, const char *real_filename,
-                                const char *logical_filename,
-                                msgdomain_list_ty *mdlp));
+extern void extract_php (FILE *fp, const char *real_filename,
+                        const char *logical_filename,
+                        msgdomain_list_ty *mdlp);
 
-extern void x_php_keyword PARAMS ((const char *keyword));
-extern void x_php_extract_all PARAMS ((void));
+extern void x_php_keyword (const char *keyword);
+extern void x_php_extract_all (void);
index 85f334a2ec44f619f8a7b85acf157a3a8ba1da45..bf7f60e2648ce08c75ce8bd191756f7bc489af9d 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext PO backend.
-   Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
 #define _(str) gettext (str)
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void extract_constructor PARAMS ((po_ty *that));
-static void extract_directive_domain PARAMS ((po_ty *that, char *name));
-static void extract_directive_message PARAMS ((po_ty *that, char *msgid,
-                                              lex_pos_ty *msgid_pos,
-                                              char *msgid_plural,
-                                              char *msgstr, size_t msgstr_len,
-                                              lex_pos_ty *msgstr_pos,
-                                              bool obsolete));
-static void extract_parse_brief PARAMS ((po_ty *that));
-static void extract_comment PARAMS ((po_ty *that, const char *s));
-static void extract_comment_dot PARAMS ((po_ty *that, const char *s));
-static void extract_comment_filepos PARAMS ((po_ty *that, const char *name,
-                                            size_t line));
-static void extract_comment_special PARAMS ((po_ty *that, const char *s));
-
-
 typedef struct extract_class_ty extract_class_ty;
 struct extract_class_ty
 {
@@ -79,8 +61,7 @@ struct extract_class_ty
 
 
 static void
-extract_constructor (that)
-     po_ty *that;
+extract_constructor (po_ty *that)
 {
   extract_class_ty *this = (extract_class_ty *) that;
   size_t i;
@@ -98,9 +79,7 @@ extract_constructor (that)
 
 
 static void
-extract_directive_domain (that, name)
-     po_ty *that;
-     char *name;
+extract_directive_domain (po_ty *that, char *name)
 {
   po_gram_error_at_line (&gram_pos,
                         _("this file may not contain domain directives"));
@@ -108,16 +87,13 @@ extract_directive_domain (that, name)
 
 
 static void
-extract_directive_message (that, msgid, msgid_pos, msgid_plural,
-                          msgstr, msgstr_len, msgstr_pos, obsolete)
-     po_ty *that;
-     char *msgid;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+extract_directive_message (po_ty *that,
+                          char *msgid,
+                          lex_pos_ty *msgid_pos,
+                          char *msgid_plural,
+                          char *msgstr, size_t msgstr_len,
+                          lex_pos_ty *msgstr_pos,
+                          bool obsolete)
 {
   extract_class_ty *this = (extract_class_ty *)that;
   message_ty *mp;
@@ -213,17 +189,14 @@ extract_directive_message (that, msgid, msgid_pos, msgid_plural,
 
 
 static void
-extract_parse_brief (that)
-     po_ty *that;
+extract_parse_brief (po_ty *that)
 {
   po_lex_pass_comments (true);
 }
 
 
 static void
-extract_comment (that, s)
-     po_ty *that;
-     const char *s;
+extract_comment (po_ty *that, const char *s)
 {
   extract_class_ty *this = (extract_class_ty *) that;
 
@@ -234,9 +207,7 @@ extract_comment (that, s)
 
 
 static void
-extract_comment_dot (that, s)
-     po_ty *that;
-     const char *s;
+extract_comment_dot (po_ty *that, const char *s)
 {
   extract_class_ty *this = (extract_class_ty *) that;
 
@@ -247,10 +218,7 @@ extract_comment_dot (that, s)
 
 
 static void
-extract_comment_filepos (that, name, line)
-     po_ty *that;
-     const char *name;
-     size_t line;
+extract_comment_filepos (po_ty *that, const char *name, size_t line)
 {
   extract_class_ty *this = (extract_class_ty *) that;
   size_t nbytes;
@@ -269,9 +237,7 @@ extract_comment_filepos (that, name, line)
 
 
 static void
-extract_comment_special (that, s)
-     po_ty *that;
-     const char *s;
+extract_comment_special (po_ty *that, const char *s)
 {
   extract_class_ty *this = (extract_class_ty *) that;
 
@@ -303,11 +269,9 @@ static po_method_ty extract_methods =
 
 
 void
-extract_po (fp, real_filename, logical_filename, mdlp)
-     FILE *fp;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_po (FILE *fp,
+           const char *real_filename, const char *logical_filename,
+           msgdomain_list_ty *mdlp)
 {
   po_ty *pop = po_alloc (&extract_methods);
   ((extract_class_ty *) pop)->mlp = mdlp->item[0]->messages;
index a851172a2e7cefeb55643d81bab504bd89938d5f..986d6e2da0ff0ac6bdcedd4aacf216ad3da8fed1 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext PO backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -25,6 +25,6 @@
   { "PO", extract_po, NULL },                                          \
 
 /* Scan a PO file and add its translatable strings to mdlp.  */
-extern void extract_po PARAMS ((FILE *fp, const char *real_filename,
-                               const char *logical_filename,
-                               msgdomain_list_ty *mdlp));
+extern void extract_po (FILE *fp, const char *real_filename,
+                       const char *logical_filename,
+                       msgdomain_list_ty *mdlp);
index 161a10306941b01f203b67baa403a08c52ebe7f1..5efd314d65f521bc64331eb3c7b8fd3d6c4ea15f 100644 (file)
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* The Python syntax is defined in the Python Reference Manual
    /usr/share/doc/packages/python/html/ref/index.html.
@@ -78,27 +72,6 @@ struct token_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void init_keywords PARAMS ((void));
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((void));
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-static int phase7_getuc PARAMS ((int quote_char, bool triple,
-                                bool interpret_ansic, bool interpret_unicode,
-                                unsigned int *backslash_counter));
-static void phase5_get PARAMS ((token_ty *tp));
-static void phase5_unget PARAMS ((token_ty *tp));
-static void x_python_lex PARAMS ((token_ty *tp));
-static bool extract_parenthesized PARAMS ((message_list_ty *mlp,
-                                          int commas_to_skip,
-                                          int plural_commas));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -116,8 +89,7 @@ x_python_extract_all ()
 
 
 void
-x_python_keyword (name)
-     const char *name;
+x_python_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -212,8 +184,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -238,8 +209,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   /* We assume the program source is in ISO-8859-1 (for consistency with
      Python's \ooo and \xnn syntax inside strings), but we produce a POT
@@ -320,8 +290,7 @@ phase2_getc ()
 }
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   phase1_ungetc (c);
 }
@@ -343,12 +312,9 @@ phase2_ungetc (c)
 #define P7_STRING_END (-2)
 
 static int
-phase7_getuc (quote_char, triple, interpret_ansic, interpret_unicode, backslash_counter)
-     int quote_char;
-     bool triple;
-     bool interpret_ansic;
-     bool interpret_unicode;
-     unsigned int *backslash_counter;
+phase7_getuc (int quote_char,
+             bool triple, bool interpret_ansic, bool interpret_unicode,
+             unsigned int *backslash_counter)
 {
   int c;
 
@@ -437,7 +403,7 @@ phase7_getuc (quote_char, triple, interpret_ansic, interpret_unicode, backslash_
            return c;
          case 'a':
            *backslash_counter = 0;
-           return ALERT_CHAR;
+           return '\a';
          case 'b':
            *backslash_counter = 0;
            return '\b';
@@ -672,8 +638,7 @@ static token_ty phase5_pushback[2];
 static int phase5_pushback_length;
 
 static void
-phase5_get (tp)
-     token_ty *tp;
+phase5_get (token_ty *tp)
 {
   int c;
 
@@ -953,8 +918,7 @@ phase5_get (tp)
 }
 
 static void
-phase5_unget (tp)
-     token_ty *tp;
+phase5_unget (token_ty *tp)
 {
   if (tp->type != token_type_eof)
     phase5_pushback[phase5_pushback_length++] = *tp;
@@ -966,8 +930,7 @@ phase5_unget (tp)
    belong to different logical lines will not be concatenated.  */
 
 static void
-x_python_lex (tp)
-     token_ty *tp;
+x_python_lex (token_ty *tp)
 {
   phase5_get (tp);
   if (tp->type != token_type_string)
@@ -1016,10 +979,8 @@ x_python_lex (tp)
    When no specific argument shall be extracted, COMMAS_TO_SKIP < 0.
    Return true upon eof, false upon closing parenthesis.  */
 static bool
-extract_parenthesized (mlp, commas_to_skip, plural_commas)
-     message_list_ty *mlp;
-     int commas_to_skip;
-     int plural_commas;
+extract_parenthesized (message_list_ty *mlp,
+                      int commas_to_skip, int plural_commas)
 {
   /* Remember the message containing the msgid, for msgid_plural.  */
   message_ty *plural_mp = NULL;
@@ -1151,11 +1112,9 @@ extract_parenthesized (mlp, commas_to_skip, plural_commas)
 
 
 void
-extract_python (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_python (FILE *f,
+               const char *real_filename, const char *logical_filename,
+               msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
 
index 26b55ac935298323c9fee7a064932ffa4989312c..e2edeeec4a2c9f700320b97595171271429d8b2e 100644 (file)
@@ -24,9 +24,9 @@
   { "Python",     extract_python, &formatstring_python },              \
 
 /* Scan a Python file and add its translatable strings to mdlp.  */
-extern void extract_python PARAMS ((FILE *fp, const char *real_filename,
-                                   const char *logical_filename,
-                                   msgdomain_list_ty *mdlp));
+extern void extract_python (FILE *fp, const char *real_filename,
+                           const char *logical_filename,
+                           msgdomain_list_ty *mdlp);
 
-extern void x_python_keyword PARAMS ((const char *keyword));
-extern void x_python_extract_all PARAMS ((void));
+extern void x_python_keyword (const char *keyword);
+extern void x_python_extract_all (void);
index cd1ac8618e49f5d0b0f9203c72199c44ddba8542..63ceb7c59fcfaed458fe73c2d7be96c792cb0ad9 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext RST backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This file was written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
  */
 
 void
-extract_rst (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_rst (FILE *f,
+            const char *real_filename, const char *logical_filename,
+            msgdomain_list_ty *mdlp)
 {
   static char *buffer;
   static int bufmax;
index 04a9d9b2f84052e8a9748a607afe3d86de2acc98..de0b152bf3db3a715d7993409c42c1bdd184e091 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext RST backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,6 @@
   { "RST",        extract_rst, &formatstring_pascal },                 \
 
 /* Scan an RST file and add its translatable strings to mdlp.  */
-extern void extract_rst PARAMS ((FILE *fp, const char *real_filename,
-                                const char *logical_filename,
-                                msgdomain_list_ty *mdlp));
+extern void extract_rst (FILE *fp, const char *real_filename,
+                        const char *logical_filename,
+                        msgdomain_list_ty *mdlp);
index 6537ac7477efe944663b36f1a707fc61cb3f9402..d9bdf80200e4da877a429bf51c7f392654228e63 100644 (file)
@@ -79,18 +79,6 @@ struct token_ty
 };
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((void));
-static void phase2_get PARAMS ((token_ty *tp));
-static void phase2_unget PARAMS ((token_ty *tp));
-static void x_smalltalk_lex PARAMS ((token_ty *tp));
-
-
 /* ======================== Reading of characters.  ======================== */
 
 
@@ -127,8 +115,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -153,8 +140,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -193,8 +179,7 @@ static token_ty phase2_pushback[2];
 static int phase2_pushback_length;
 
 static void
-phase2_get (tp)
-     token_ty *tp;
+phase2_get (token_ty *tp)
 {
   static char *buffer;
   static int bufmax;
@@ -446,8 +431,7 @@ phase2_get (tp)
 }
 
 static void
-phase2_unget (tp)
-     token_ty *tp;
+phase2_unget (token_ty *tp)
 {
   if (tp->type != token_type_eof)
     phase2_pushback[phase2_pushback_length++] = *tp;
@@ -457,8 +441,7 @@ phase2_unget (tp)
 /* 3. Combine "# string_literal" and "# symbol" to a single token.  */
 
 static void
-x_smalltalk_lex (tp)
-     token_ty *tp;
+x_smalltalk_lex (token_ty *tp)
 {
   phase2_get (tp);
   if (tp->type == token_type_uniq)
@@ -492,11 +475,9 @@ x_smalltalk_lex (tp)
  */
 
 void
-extract_smalltalk (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_smalltalk (FILE *f,
+                  const char *real_filename, const char *logical_filename,
+                  msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
 
index 75be85f4f1f1ff735816424bc88b08460ad19179..ca5a9eb5fb6964d2e7fd6b45902c3fd1e1156c03 100644 (file)
@@ -24,6 +24,6 @@
   { "Smalltalk",  extract_smalltalk, &formatstring_smalltalk },                \
 
 /* Scan a Smalltalk file and add its translatable strings to mdlp.  */
-extern void extract_smalltalk PARAMS ((FILE *fp, const char *real_filename,
-                                      const char *logical_filename,
-                                      msgdomain_list_ty *mdlp));
+extern void extract_smalltalk (FILE *fp, const char *real_filename,
+                              const char *logical_filename,
+                              msgdomain_list_ty *mdlp);
index b7446328702a8d5c900adb664dc4a55a0f00427a..8cad4ead8a5d4be0cf524aa7bb1b5e798678a754 100644 (file)
 
 #define _(s) gettext(s)
 
-#if HAVE_C_BACKSLASH_A
-# define ALERT_CHAR '\a'
-#else
-# define ALERT_CHAR '\7'
-#endif
-
 
 /* The Tcl syntax is defined in the Tcl.n manual page.
    Summary of Tcl syntax:
    The parser is implemented in tcl8.3.3/generic/tclParse.c.  */
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-struct token;
-struct word;
-static void init_keywords PARAMS ((void));
-static int do_getc PARAMS ((void));
-static void do_ungetc PARAMS ((int c));
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static int phase2_push PARAMS ((void));
-static void phase2_pop PARAMS ((int previous_depth));
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-static inline void init_token PARAMS ((struct token *tp));
-static inline void free_token PARAMS ((struct token *tp));
-static inline void grow_token PARAMS ((struct token *tp));
-static inline void comment_start PARAMS ((void));
-static inline void comment_add PARAMS ((int c));
-static inline void comment_line_end PARAMS ((void));
-static inline void free_word PARAMS ((struct word *wp));
-static char * string_of_word PARAMS ((const struct word *wp));
-static int do_getc_escaped PARAMS ((void));
-
-
 /* ====================== Keyword set customization.  ====================== */
 
 /* If true extract all strings.  */
@@ -110,8 +80,7 @@ x_tcl_extract_all ()
 
 
 void
-x_tcl_keyword (name)
-     const char *name;
+x_tcl_keyword (const char *name)
 {
   if (name == NULL)
     default_keywords = false;
@@ -184,8 +153,7 @@ error while reading \"%s\""), real_file_name);
 
 /* Put back the last fetched character, not EOF.  */
 static void
-do_ungetc (c)
-     int c;
+do_ungetc (int c)
 {
   if (c == '\n')
     line_number--;
@@ -237,8 +205,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   switch (c)
     {
@@ -283,8 +250,7 @@ phase2_push ()
 }
 
 static void
-phase2_pop (previous_depth)
-     int previous_depth;
+phase2_pop (int previous_depth)
 {
   brace_depth = previous_depth;
 }
@@ -317,8 +283,7 @@ phase2_getc ()
 }
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -355,8 +320,7 @@ struct token
 
 /* Initialize a 'struct token'.  */
 static inline void
-init_token (tp)
-     struct token *tp;
+init_token (struct token *tp)
 {
   tp->allocated = 10;
   tp->chars = (char *) xmalloc (tp->allocated * sizeof (char));
@@ -365,16 +329,14 @@ init_token (tp)
 
 /* Free the memory pointed to by a 'struct token'.  */
 static inline void
-free_token (tp)
-     struct token *tp;
+free_token (struct token *tp)
 {
   free (tp->chars);
 }
 
 /* Ensure there is enough room in the token for one more character.  */
 static inline void
-grow_token (tp)
-     struct token *tp;
+grow_token (struct token *tp)
 {
   if (tp->charcount == tp->allocated)
     {
@@ -398,8 +360,7 @@ comment_start ()
 }
 
 static inline void
-comment_add (c)
-     int c;
+comment_add (int c)
 {
   if (buflen >= bufmax)
     {
@@ -461,8 +422,7 @@ struct word
 
 /* Free the memory pointed to by a 'struct word'.  */
 static inline void
-free_word (wp)
-     struct word *wp;
+free_word (struct word *wp)
 {
   if (wp->type == t_string)
     {
@@ -473,8 +433,7 @@ free_word (wp)
 
 /* Convert a t_string token to a char*.  */
 static char *
-string_of_word (wp)
-     const struct word *wp;
+string_of_word (const struct word *wp)
 {
   char *str;
   int n;
@@ -502,7 +461,7 @@ do_getc_escaped ()
     case EOF:
       return '\\';
     case 'a':
-      return ALERT_CHAR;
+      return '\a';
     case 'b':
       return '\b';
     case 'f':
@@ -597,20 +556,13 @@ enum terminator
   te_quote                     /* looking for '"' */
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int accumulate_word PARAMS ((struct word *wp,
-                                   enum terminator looking_for));
-static void read_word PARAMS ((struct word *wp, int looking_for));
-static enum word_type read_command PARAMS ((int looking_for));
-static enum word_type read_command_list PARAMS ((int looking_for));
+/* Forward declaration of local functions.  */
+static enum word_type read_command_list (int looking_for);
 
 /* Accumulate tokens into the given word.
    'looking_for' denotes a parse terminator combination.  */
 static int
-accumulate_word (wp, looking_for)
-     struct word *wp;
-     enum terminator looking_for;
+accumulate_word (struct word *wp, enum terminator looking_for)
 {
   int c;
 
@@ -743,9 +695,7 @@ accumulate_word (wp, looking_for)
 /* Read the next word.
    'looking_for' denotes a parse terminator, either ']' or '\0'.  */
 static void
-read_word (wp, looking_for)
-     struct word *wp;
-     int looking_for;
+read_word (struct word *wp, int looking_for)
 {
   int c;
 
@@ -846,8 +796,7 @@ read_word (wp, looking_for)
    Returns the type of the word that terminated the command: t_separator or
    t_bracket (only if looking_for is ']') or t_brace or t_eof.  */
 static enum word_type
-read_command (looking_for)
-     int looking_for;
+read_command (int looking_for)
 {
   int c;
 
@@ -979,8 +928,7 @@ read_command (looking_for)
    Returns the type of the word that terminated the command list:
    t_bracket (only if looking_for is ']') or t_brace or t_eof.  */
 static enum word_type
-read_command_list (looking_for)
-     int looking_for;
+read_command_list (int looking_for)
 {
   for (;;)
     {
@@ -994,11 +942,9 @@ read_command_list (looking_for)
 
 
 void
-extract_tcl (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_tcl (FILE *f,
+            const char *real_filename, const char *logical_filename,
+            msgdomain_list_ty *mdlp)
 {
   mlp = mdlp->item[0]->messages;
 
index d2b39f7d0dbd7c6f095166e7cd7c13e69c2fc0b1..494171184ed1eb4edc45f48dcc3923ee208a1dd7 100644 (file)
   { "Tcl",        extract_tcl, &formatstring_tcl },                    \
 
 /* Scan a Tcl file and add its translatable strings to mdlp.  */
-extern void extract_tcl PARAMS ((FILE *fp, const char *real_filename,
-                                const char *logical_filename,
-                                msgdomain_list_ty *mdlp));
+extern void extract_tcl (FILE *fp, const char *real_filename,
+                        const char *logical_filename,
+                        msgdomain_list_ty *mdlp);
 
 
 /* Handling of options specific to this language.  */
 
-extern void x_tcl_extract_all PARAMS ((void));
-extern void x_tcl_keyword PARAMS ((const char *name));
+extern void x_tcl_extract_all (void);
+extern void x_tcl_keyword (const char *name);
index d41e2b1d77835898257c88f1760ab97badc2c07e..aa2c36fb1ecf4047b520e7154aca74720e3f0cd0 100644 (file)
@@ -81,16 +81,6 @@ static int last_comment_line;
 static int last_non_comment_line;
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static int phase1_getc PARAMS ((void));
-static void phase1_ungetc PARAMS ((int c));
-static int phase2_getc PARAMS ((void));
-static void phase2_ungetc PARAMS ((int c));
-static int phase7_getc PARAMS ((void));
-static void x_ycp_lex PARAMS ((token_ty *tp));
-
-
 /* 1. line_number handling.  */
 
 static int
@@ -118,8 +108,7 @@ phase1_getc ()
 }
 
 static void
-phase1_ungetc (c)
-     int c;
+phase1_ungetc (int c)
 {
   if (c != EOF)
     {
@@ -299,8 +288,7 @@ phase2_getc ()
 }
 
 static void
-phase2_ungetc (c)
-     int c;
+phase2_ungetc (int c)
 {
   if (c != EOF)
     phase2_pushback[phase2_pushback_length++] = c;
@@ -382,8 +370,7 @@ phase7_getc ()
 /* Combine characters into tokens.  Discard whitespace.  */
 
 static void
-x_ycp_lex (tp)
-     token_ty *tp;
+x_ycp_lex (token_ty *tp)
 {
   static char *buffer;
   static int bufmax;
@@ -525,11 +512,9 @@ x_ycp_lex (tp)
 
 
 void
-extract_ycp (f, real_filename, logical_filename, mdlp)
-     FILE *f;
-     const char *real_filename;
-     const char *logical_filename;
-     msgdomain_list_ty *mdlp;
+extract_ycp (FILE *f,
+            const char *real_filename, const char *logical_filename,
+            msgdomain_list_ty *mdlp)
 {
   message_list_ty *mlp = mdlp->item[0]->messages;
   int state;
index 36a725c38de6108832b83ee7edac7821d46c5a92..3cd31e49121b17ef84b5c89915c32a4765426421 100644 (file)
@@ -1,5 +1,5 @@
 /* xgettext YCP backend.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -24,6 +24,6 @@
   { "YCP",        extract_ycp, &formatstring_ycp },                    \
 
 /* Scan an YCP file and add its translatable strings to mdlp.  */
-extern void extract_ycp PARAMS ((FILE *fp, const char *real_filename,
-                                const char *logical_filename,
-                                msgdomain_list_ty *mdlp));
+extern void extract_ycp (FILE *fp, const char *real_filename,
+                        const char *logical_filename,
+                        msgdomain_list_ty *mdlp);
index 52f67477b97d5f18ced14a42f6a2577db67a8ce8..8b57e12017b13f50e87f5cfb4f0bb4136006805b 100644 (file)
@@ -177,41 +177,28 @@ static const struct option long_options[] =
 /* The extractors must all be functions returning void and taking three
    arguments designating the input stream and one message domain list argument
    in which to add the messages.  */
-typedef void (*extractor_func) PARAMS ((FILE *fp, const char *real_filename,
-                                       const char *logical_filename,
-                                       msgdomain_list_ty *mdlp));
+typedef void (*extractor_func) (FILE *fp, const char *real_filename,
+                               const char *logical_filename,
+                               msgdomain_list_ty *mdlp);
 
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ > 4) || __GNUC__ > 2)
        __attribute__ ((noreturn))
 #endif
 ;
-static void exclude_directive_domain PARAMS ((po_ty *pop, char *name));
-static void exclude_directive_message PARAMS ((po_ty *pop, char *msgid,
-                                              lex_pos_ty *msgid_pos,
-                                              char *msgid_plural,
-                                              char *msgstr, size_t msgstr_len,
-                                              lex_pos_ty *msgstr_pos,
-                                              bool obsolete));
-static void read_exclusion_file PARAMS ((char *file_name));
-static FILE *xgettext_open PARAMS ((const char *fn, char **logical_file_name_p,
-                                   char **real_file_name_p));
-static void extract_from_file PARAMS ((const char *file_name,
-                                      extractor_func extractor,
-                                      msgdomain_list_ty *mdlp));
-static message_ty *construct_header PARAMS ((void));
-static void finalize_header PARAMS ((msgdomain_list_ty *mdlp));
-static extractor_func language_to_extractor PARAMS ((const char *name));
-static const char *extension_to_language PARAMS ((const char *extension));
+static void read_exclusion_file (char *file_name);
+static void extract_from_file (const char *file_name, extractor_func extractor,
+                              msgdomain_list_ty *mdlp);
+static message_ty *construct_header (void);
+static void finalize_header (msgdomain_list_ty *mdlp);
+static extractor_func language_to_extractor (const char *name);
+static const char *extension_to_language (const char *extension);
 
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int cnt;
   int optchar;
@@ -600,8 +587,7 @@ warning: file `%s' extension `%s' is unknown; will try C"), fname, extension);
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -718,9 +704,7 @@ Informative output:\n\
 
 
 static void
-exclude_directive_domain (pop, name)
-     po_ty *pop;
-     char *name;
+exclude_directive_domain (po_ty *pop, char *name)
 {
   po_gram_error_at_line (&gram_pos,
                         _("this file may not contain domain directives"));
@@ -728,16 +712,13 @@ exclude_directive_domain (pop, name)
 
 
 static void
-exclude_directive_message (pop, msgid, msgid_pos, msgid_plural,
-                          msgstr, msgstr_len, msgstr_pos, obsolete)
-     po_ty *pop;
-     char *msgid;
-     lex_pos_ty *msgid_pos;
-     char *msgid_plural;
-     char *msgstr;
-     size_t msgstr_len;
-     lex_pos_ty *msgstr_pos;
-     bool obsolete;
+exclude_directive_message (po_ty *pop,
+                          char *msgid,
+                          lex_pos_ty *msgid_pos,
+                          char *msgid_plural,
+                          char *msgstr, size_t msgstr_len,
+                          lex_pos_ty *msgstr_pos,
+                          bool obsolete)
 {
   message_ty *mp;
 
@@ -783,8 +764,7 @@ static po_method_ty exclude_methods =
 
 
 static void
-read_exclusion_file (file_name)
-     char *file_name;
+read_exclusion_file (char *file_name)
 {
   po_ty *pop;
 
@@ -795,11 +775,8 @@ read_exclusion_file (file_name)
 
 
 void
-split_keywordspec (spec, endp, argnum1p, argnum2p)
-     const char *spec;
-     const char **endp;
-     int *argnum1p;
-     int *argnum2p;
+split_keywordspec (const char *spec,
+                  const char **endp, int *argnum1p, int *argnum2p)
 {
   const char *p;
 
@@ -862,8 +839,7 @@ split_keywordspec (spec, endp, argnum1p, argnum2p)
 static string_list_ty *comment;
 
 void
-xgettext_comment_add (str)
-     const char *str;
+xgettext_comment_add (const char *str)
 {
   if (comment == NULL)
     comment = string_list_alloc ();
@@ -871,8 +847,7 @@ xgettext_comment_add (str)
 }
 
 const char *
-xgettext_comment (n)
-     size_t n;
+xgettext_comment (size_t n)
 {
   if (comment == NULL || n >= comment->nitems)
     return NULL;
@@ -892,10 +867,8 @@ xgettext_comment_reset ()
 
 
 static FILE *
-xgettext_open (fn, logical_file_name_p, real_file_name_p)
-     const char *fn;
-     char **logical_file_name_p;
-     char **real_file_name_p;
+xgettext_open (const char *fn,
+              char **logical_file_name_p, char **real_file_name_p)
 {
   FILE *fp;
   char *new_name;
@@ -955,10 +928,8 @@ error while opening \"%s\" for reading"), new_name);
 
 
 static void
-extract_from_file (file_name, extractor, mdlp)
-     const char *file_name;
-     extractor_func extractor;
-     msgdomain_list_ty *mdlp;
+extract_from_file (const char *file_name, extractor_func extractor,
+                  msgdomain_list_ty *mdlp)
 {
   char *logical_file_name;
   char *real_file_name;
@@ -1017,10 +988,7 @@ static struct formatstring_parser *current_formatstring_parser;
 
 
 message_ty *
-remember_a_message (mlp, string, pos)
-     message_list_ty *mlp;
-     char *string;
-     lex_pos_ty *pos;
+remember_a_message (message_list_ty *mlp, char *string, lex_pos_ty *pos)
 {
   enum is_format is_format[NFORMATS];
   enum is_wrap do_wrap;
@@ -1204,10 +1172,7 @@ meta information, not the empty string.\n")));
 
 
 void
-remember_a_message_plural (mp, string, pos)
-     message_ty *mp;
-     char *string;
-     lex_pos_ty *pos;
+remember_a_message_plural (message_ty *mp, char *string, lex_pos_ty *pos)
 {
   char *msgid_plural;
   char *msgstr1;
@@ -1317,8 +1282,7 @@ FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.\n");
 }
 
 static void
-finalize_header (mdlp)
-     msgdomain_list_ty *mdlp;
+finalize_header (msgdomain_list_ty *mdlp)
 {
   /* If the generated PO file has plural forms, add a Plural-Forms template
      to the constructed header.  */
@@ -1402,8 +1366,7 @@ finalize_header (mdlp)
 
 
 static extractor_func
-language_to_extractor (name)
-     const char *name;
+language_to_extractor (const char *name)
 {
   typedef struct table_ty table_ty;
   struct table_ty
@@ -1451,8 +1414,7 @@ language_to_extractor (name)
 
 
 static const char *
-extension_to_language (extension)
-     const char *extension;
+extension_to_language (const char *extension)
 {
   typedef struct table_ty table_ty;
   struct table_ty
index ad36fbd6c5192d285c65a0a1730344d97f5768f1..97408b87eec4899350294432b94565a52c2d1f96 100644 (file)
@@ -39,8 +39,8 @@ extern int xgettext_omit_header;
 extern bool substring_match;
 
 /* Split keyword spec into keyword, argnum1, argnum2.  */
-extern void split_keywordspec PARAMS ((const char *spec, const char **endp,
-                                      int *argnum1p, int *argnum2p));
+extern void split_keywordspec (const char *spec, const char **endp,
+                              int *argnum1p, int *argnum2p);
 
 /* Canonicalized encoding name for all input files.  */
 extern const char *xgettext_global_source_encoding;
@@ -66,21 +66,21 @@ extern message_list_ty *exclude;
 
 /* Comment handling: There is a list of automatic comments that may be appended
    to the next message.  Used by remember_a_message().  */
-extern void xgettext_comment_add PARAMS ((const char *str));
-extern const char *xgettext_comment PARAMS ((size_t n));
-extern void xgettext_comment_reset PARAMS ((void));
+extern void xgettext_comment_add (const char *str);
+extern const char *xgettext_comment (size_t n);
+extern void xgettext_comment_reset (void);
 
 /* Add a message to the list of extracted messages.
    string must be malloc()ed string; its ownership is passed to the callee.
    pos->file_name must be allocated with indefinite extent.  */
-extern message_ty *remember_a_message PARAMS ((message_list_ty *mlp,
-                                              char *string, lex_pos_ty *pos));
+extern message_ty *remember_a_message (message_list_ty *mlp,
+                                      char *string, lex_pos_ty *pos);
 /* Add an msgid_plural to a message previously returned by
    remember_a_message.
    string must be malloc()ed string; its ownership is passed to the callee.
    pos->file_name must be allocated with indefinite extent.  */
-extern void remember_a_message_plural PARAMS ((message_ty *mp,
-                                              char *string, lex_pos_ty *pos));
+extern void remember_a_message_plural (message_ty *mp,
+                                      char *string, lex_pos_ty *pos);
 
 
 #endif /* _XGETTEXT_H */
index 8050d31ac603126a45da0ff840ca550ea8a37bb3..0e3b44a41e54b8d294c9a4ca7b426408bd8272be 100644 (file)
@@ -1,3 +1,24 @@
+2002-11-13  Bruno Haible  <bruno@clisp.org>
+
+       Assume ANSI C.
+       * format-c-3-prg.c (main): Use ANSI C function declarations and
+       preprocessor string concatenation.
+       * format-c-3: Don't test for return code 77.
+       * format-c-4-prg.c (main): Use ANSI C function declarations and
+       preprocessor string concatenation.
+       * format-c-4: Don't test for return code 77.
+       * plural-1-prg.c (main): Use ANSI C function declarations.
+       * setlocale.c (category_to_name, setlocale): Likewise.
+       * tstgettext.c (main, usage, expand_escape): Likewise.
+       * tstngettext.c (main, usage): Likewise.
+       * rpathlx/usex.c (rpathx_value): Likewise.
+       * rpathly/usey.c (rpathy_value): Likewise.
+       * rpathlyx/usey.c (rpathy_value): Likewise.
+       * rpathlz/usez.c (rpathz_value): Likewise.
+       * rpathlzyx/usez.c (rpathz_value): Likewise.
+       * rpathy/rpathy.c (rpathx_value): Likewise.
+       * rpathz/rpathz.c (rpathx_value, rpathy_value): Likewise.
+
 2002-11-11  Bruno Haible  <bruno@clisp.org>
 
        * tstgettext.c (program_name): Declare as external.
index 35b385524326cfa772b89f9fc9596fa33f9aaac9..4d705b0049bd3ba11ecb061531fc49dc11524231 100755 (executable)
@@ -46,10 +46,6 @@ ${DIFF} de.po.strip de.po.tmp || exit 1
 LANGUAGE= ./fc3 de_DE
 result=$?
 
-if test $result = 77; then
-  echo "SKIP: format-c-3"
-fi
-
 rm -fr $tmpfiles
 
 exit $result
index 0814b7cc057946ffd53194441f2e201ab443f715..629f71678fc4e22215d573d8c18d2a9ffb4729fd 100644 (file)
 # define PRId8 "d"
 #endif
 
-int main (argc, argv)
-  int argc;
-  char *argv[];
+int
+main (int argc, char *argv[])
 {
-/* This test requires ANSI C string concatenation.  */
-#ifdef __STDC__
   unsigned char n = 5;
   const char *s;
   const char *c1;
@@ -84,7 +81,4 @@ int main (argc, argv)
       exit (1);
     }
   return 0;
-#else
-  exit (77);
-#endif
 }
index f31c017d9bbe43caf003b7de87dbcf8b1be7ef2b..78fa50a0785dd9e29f25601daefa1020c7983451 100755 (executable)
@@ -50,10 +50,6 @@ ${DIFF} de.po.strip de.po.tmp || exit 1
 LANGUAGE= ./fc4 de_DE
 result=$?
 
-if test $result = 77; then
-  echo "SKIP: format-c-4"
-fi
-
 rm -fr $tmpfiles
 
 exit $result
index b91d97b196240e408dcfd75a4dc3219477873704..7d1f055bf2c08fda7a4e86fcc01b96e62eed8ec1 100644 (file)
 # define PRId8 "d"
 #endif
 
-int main (argc, argv)
-  int argc;
-  char *argv[];
+int
+main (int argc, char *argv[])
 {
-/* This test requires ANSI C string concatenation.  */
-#ifdef __STDC__
   unsigned char n = 5;
   const char *s;
   const char *c1;
@@ -84,7 +81,4 @@ int main (argc, argv)
       exit (1);
     }
   return 0;
-#else
-  exit (77);
-#endif
 }
index e1acd2db79f9298a86cb8b24cd2097abc921e9d8..82f372b3a18b836abdd9e48a4efdde8a24d23b5a 100644 (file)
@@ -28,9 +28,8 @@
 #undef _LIBINTL_H
 #include "libgnuintl.h"
 
-int main (argc, argv)
-  int argc;
-  char *argv[];
+int
+main (int argc, char *argv[])
 {
   int n = atoi (argv[2]);
 
index 674e70ff2d429239bf4f352e15824205f882837d..d09b111766c00e849640eb22e5812c78672ac506 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathx_value ();
+extern int rpathx_value (void);
 int main () { return !(rpathx_value () == 5); }
index d3fe71d116f14fb597c77ae28cd97393d69edd8c..9fff7871ba0fe232c4b1d0dd41141b459848d3c7 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathy_value ();
+extern int rpathy_value (void);
 int main () { return !(rpathy_value () == 57); }
index d3fe71d116f14fb597c77ae28cd97393d69edd8c..9fff7871ba0fe232c4b1d0dd41141b459848d3c7 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathy_value ();
+extern int rpathy_value (void);
 int main () { return !(rpathy_value () == 57); }
index 000f336a1ba050893637c7f7ebe8c2cb3c551e1d..18d86897b0ab6658fc892e77ae59f490c57e1a94 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathz_value ();
+extern int rpathz_value (void);
 int main () { return !(rpathz_value () == 5171); }
index 000f336a1ba050893637c7f7ebe8c2cb3c551e1d..18d86897b0ab6658fc892e77ae59f490c57e1a94 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathz_value ();
+extern int rpathz_value (void);
 int main () { return !(rpathz_value () == 5171); }
index 7369d80bc15bf598ec72c63cf4ddab3a1d0071e9..42514bf1af681129581385246d6e5c8edd7f450a 100644 (file)
@@ -1,2 +1,2 @@
-extern int rpathx_value ();
+extern int rpathx_value (void);
 int rpathy_value () { return 10 * rpathx_value () + 7; }
index 80f3a4475ab0cd25c4a0e0ea877df8b64010fd8c..da34af1c873a4c64f5077ded0ed583e3f02c94d1 100644 (file)
@@ -1,3 +1,3 @@
-extern int rpathx_value ();
-extern int rpathy_value ();
+extern int rpathx_value (void);
+extern int rpathy_value (void);
 int rpathz_value () { return 1000 * rpathx_value () + 3 * rpathy_value (); }
index 71d2637ce1f485b0ea5bcad80ddb1c59ce69626c..f48d1f56f81de4b033ab9df35ddc149ac6978b2a 100644 (file)
@@ -1,5 +1,5 @@
 /* Fake setlocale - platform independent, for testing purposes.
-   Copyright (C) 2001 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -25,8 +25,7 @@
 
 /* Return string representation of locale CATEGORY.  */
 static const char *
-category_to_name (category)
-     int category;
+category_to_name (int category)
 {
   const char *retval;
 
@@ -86,9 +85,7 @@ category_to_name (category)
    actually change the behaviour of locale dependent functions.
    Assumes setenv()/putenv() is not called.  */
 char *
-setlocale (category, locale)
-     int category;
-     SETLOCALE_CONST char *locale;
+setlocale (int category, SETLOCALE_CONST char *locale)
 {
   static char C_string[] = "C";
   static char *current_locale = C_string;
index 2cb102a6d46ef181adc21c15f684b1f3356019f7..4fdfb1c504ddbb7a0b2b658cebaa3998ff08e207 100644 (file)
@@ -61,19 +61,16 @@ static const struct option long_options[] =
   { NULL, 0, NULL, 0 }
 };
 
-/* Prototypes for local functions.  Needed to ensure compiler checking of
-   function argument counts despite of K&R C function definition syntax.  */
-static void usage PARAMS ((int status))
+/* Forward declaration of local functions.  */
+static void usage (int status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
-static const char *expand_escape PARAMS ((const char *str));
+static const char *expand_escape (const char *str);
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   const char *msgid;
@@ -259,8 +256,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),
@@ -309,8 +305,7 @@ Standard search directory: %s\n"),
 
 /* Expand some escape sequences found in the argument string.  */
 static const char *
-expand_escape (str)
-     const char *str;
+expand_escape (const char *str)
 {
   char *retval, *rp;
   const char *cp = str;
index 669944b254586139d44b3e3305828684e3de27f3..a7429c24827cbfb357eea65824f2959ae209144d 100644 (file)
@@ -51,17 +51,15 @@ static const struct option long_options[] =
   { NULL, 0, NULL, 0 }
 };
 
-/* Prototypes for local functions.  */
-static void usage PARAMS ((int __status))
+/* Forward declaration of local functions.  */
+static void usage (int __status)
 #if defined __GNUC__ && ((__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || __GNUC__ > 2)
      __attribute__ ((noreturn))
 #endif
 ;
 
 int
-main (argc, argv)
-     int argc;
-     char *argv[];
+main (int argc, char *argv[])
 {
   int optchar;
   const char *msgid;
@@ -196,8 +194,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
 
 /* Display usage information and exit.  */
 static void
-usage (status)
-     int status;
+usage (int status)
 {
   if (status != EXIT_SUCCESS)
     fprintf (stderr, _("Try `%s --help' for more information.\n"),