add appropriate copyright; written by Sam Leffler
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 27 Jul 1988 04:16:44 +0000 (20:16 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 27 Jul 1988 04:16:44 +0000 (20:16 -0800)
SCCS-vsn: lib/libc/gen/psignal.c 5.3

usr/src/lib/libc/gen/psignal.c

index 26053ef..2488a85 100644 (file)
@@ -1,12 +1,23 @@
 /*
 /*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)psignal.c  5.2 (Berkeley) %G%";
-#endif LIBC_SCCS and not lint
+static char sccsid[] = "@(#)psignal.c  5.3 (Berkeley) %G%";
+#endif /* LIBC_SCCS and not lint */
 
 /*
  * Print the name of the signal indicated
 
 /*
  * Print the name of the signal indicated
@@ -17,20 +28,21 @@ static char sccsid[] = "@(#)psignal.c       5.2 (Berkeley) %G%";
 extern char *sys_siglist[];
 
 psignal(sig, s)
 extern char *sys_siglist[];
 
 psignal(sig, s)
-       unsigned sig;
+       unsigned int sig;
        char *s;
 {
        register char *c;
        char *s;
 {
        register char *c;
-       register n;
+       register int n;
 
 
-       c = "Unknown signal";
        if (sig < NSIG)
                c = sys_siglist[sig];
        if (sig < NSIG)
                c = sys_siglist[sig];
+       else
+               c = "Unknown signal";
        n = strlen(s);
        if (n) {
        n = strlen(s);
        if (n) {
-               write(2, s, n);
-               write(2, ": ", 2);
+               (void)write(2, s, n);
+               (void)write(2, ": ", 2);
        }
        }
-       write(2, c, strlen(c));
-       write(2, "\n", 1);
+       (void)write(2, c, strlen(c));
+       (void)write(2, "\n", 1);
 }
 }