kill.c (216629) | kill.c (218285) |
---|---|
1/*- 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34 The Regents of the University of California. All rights reserved.\n"; 35#endif /* not lint */ 36 37#ifndef lint 38static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95"; 39#endif /* not lint */ 40#endif 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1988, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 25 unchanged lines hidden (view full) --- 34 The Regents of the University of California. All rights reserved.\n"; 35#endif /* not lint */ 36 37#ifndef lint 38static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95"; 39#endif /* not lint */ 40#endif 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/bin/kill/kill.c 216629 2010-12-21 22:47:34Z jilles $"); | 42__FBSDID("$FreeBSD: head/bin/kill/kill.c 218285 2011-02-04 16:40:50Z jilles $"); |
43 44#include <ctype.h> 45#include <err.h> 46#include <errno.h> 47#include <signal.h> 48#include <stdio.h> 49#include <stdlib.h> 50#include <string.h> --- 96 unchanged lines hidden (view full) --- 147 return (errors); 148} 149 150static int 151signame_to_signum(const char *sig) 152{ 153 int n; 154 | 43 44#include <ctype.h> 45#include <err.h> 46#include <errno.h> 47#include <signal.h> 48#include <stdio.h> 49#include <stdlib.h> 50#include <string.h> --- 96 unchanged lines hidden (view full) --- 147 return (errors); 148} 149 150static int 151signame_to_signum(const char *sig) 152{ 153 int n; 154 |
155 if (!strncasecmp(sig, "sig", (size_t)3)) | 155 if (!strncasecmp(sig, "SIG", (size_t)3)) |
156 sig += 3; 157 for (n = 1; n < sys_nsig; n++) { 158 if (!strcasecmp(sys_signame[n], sig)) 159 return (n); 160 } 161 return (-1); 162} 163 --- 42 unchanged lines hidden --- | 156 sig += 3; 157 for (n = 1; n < sys_nsig; n++) { 158 if (!strcasecmp(sys_signame[n], sig)) 159 return (n); 160 } 161 return (-1); 162} 163 --- 42 unchanged lines hidden --- |