OSDN Git Service

2007-11-22 Johannes Singler <singler@ira.uka.de>
[pf3gnuchains/gcc-fork.git] / libiberty / strsignal.c
index 86c8aca..4ca9e21 100644 (file)
@@ -2,15 +2,14 @@
    Written by Fred Fish.  fnf@cygnus.com
    This file is in the public domain.  */
 
+#include "config.h"
 #include "ansidecl.h"
 #include "libiberty.h"
 
-#include "config.h"
-
 /* We need to declare sys_siglist, because even if the system provides
    it we can't assume that it is declared in <signal.h> (for example,
    SunOS provides sys_siglist, but it does not declare it in any
-   header file).  fHowever, we can't declare sys_siglist portably,
+   header file).  However, we can't declare sys_siglist portably,
    because on some systems it is declared with const and on some
    systems it is declared without const.  If we were using autoconf,
    we could work out the right declaration.  Until, then we just
@@ -42,18 +41,14 @@ extern PTR memset ();
 #undef sys_nsig
 
 #ifndef NULL
-#  ifdef __STDC__
-#    define NULL (void *) 0
-#  else
-#    define NULL 0
-#  endif
+#  define NULL (void *) 0
 #endif
 
 #ifndef MAX
 #  define MAX(a,b) ((a) > (b) ? (a) : (b))
 #endif
 
-static void init_signal_tables PARAMS ((void));
+static void init_signal_tables (void);
 
 /* Translation table for signal values.
 
@@ -289,7 +284,7 @@ BUGS
 */
 
 static void
-init_signal_tables ()
+init_signal_tables (void)
 {
   const struct signal_info *eip;
   int nbytes;
@@ -370,7 +365,7 @@ symbolic name or message.
 */
 
 int
-signo_max ()
+signo_max (void)
 {
   int maxsize;
 
@@ -410,8 +405,7 @@ call to @code{strsignal}.
 #ifndef HAVE_STRSIGNAL
 
 const char *
-strsignal (signo)
-  int signo;
+strsignal (int signo)
 {
   const char *msg;
   static char buf[32];
@@ -470,8 +464,7 @@ valid until the next call to @code{strsigno}.
 */
 
 const char *
-strsigno (signo)
-  int signo;
+strsigno (int signo)
 {
   const char *name;
   static char buf[32];
@@ -514,8 +507,7 @@ translation is found, returns 0.
 */
 
 int
-strtosigno (name)
-     const char *name;
+strtosigno (const char *name)
 {
   int signo = 0;
 
@@ -544,7 +536,7 @@ strtosigno (name)
 
 /*
 
-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+@deftypefn Supplemental void psignal (int @var{signo}, char *@var{message})
 
 Print @var{message} to the standard error, followed by a colon,
 followed by the description of the signal specified by @var{signo},
@@ -557,9 +549,7 @@ followed by a newline.
 #ifndef HAVE_PSIGNAL
 
 void
-psignal (signo, message)
-  unsigned signo;
-  char *message;
+psignal (int signo, char *message)
 {
   if (signal_names == NULL)
     {
@@ -586,7 +576,7 @@ psignal (signo, message)
 #include <stdio.h>
 
 int
-main ()
+main (void)
 {
   int signo;
   int maxsigno;