projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
[gnulib.git]
/
lib
/
sig2str.c
diff --git
a/lib/sig2str.c
b/lib/sig2str.c
index
4096465
..
15d969c
100644
(file)
--- a/
lib/sig2str.c
+++ b/
lib/sig2str.c
@@
-1,6
+1,6
@@
/* sig2str.c -- convert between signal names and numbers
/* sig2str.c -- convert between signal names and numbers
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002
, 2004
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
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
@@
-28,10
+28,6
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
#include "sig2str.h"
#ifndef SIGRTMIN
#include "sig2str.h"
#ifndef SIGRTMIN
@@
-257,7
+253,7
@@
static struct numname { int num; char const name[8]; } numname_table[] =
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
ISDIGIT_LOCALE unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
ISDIGIT_LOCALE unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
-#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
+#define ISDIGIT(c) ((unsigned
int
) (c) - '0' <= 9)
/* Convert the signal name SIGNAME to a signal number. Return the
signal number if successful, -1 otherwise. */
/* Convert the signal name SIGNAME to a signal number. Return the
signal number if successful, -1 otherwise. */
@@
-274,7
+270,7
@@
str2signum (char const *signame)
}
else
{
}
else
{
- int i;
+
unsigned
int i;
for (i = 0; i < NUMNAME_ENTRIES; i++)
if (strcmp (numname_table[i].name, signame) == 0)
return numname_table[i].num;
for (i = 0; i < NUMNAME_ENTRIES; i++)
if (strcmp (numname_table[i].name, signame) == 0)
return numname_table[i].num;
@@
-319,7
+315,7
@@
str2sig (char const *signame, int *signum)
int
sig2str (int signum, char *signame)
{
int
sig2str (int signum, char *signame)
{
- int i;
+
unsigned
int i;
for (i = 0; i < NUMNAME_ENTRIES; i++)
if (numname_table[i].num == signum)
{
for (i = 0; i < NUMNAME_ENTRIES; i++)
if (numname_table[i].num == signum)
{