HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dynwind fixes
[bpt/emacs.git]
/
lib
/
sig2str.c
diff --git
a/lib/sig2str.c
b/lib/sig2str.c
index
2f5b21c
..
119006a
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, 2004, 2006, 2009-201
2
Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, 2009-201
4
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
@@
-325,21
+325,25
@@
sig2str (int signum, char *signame)
{
int rtmin = SIGRTMIN;
int rtmax = SIGRTMAX;
{
int rtmin = SIGRTMIN;
int rtmax = SIGRTMAX;
+ int base, delta;
if (! (rtmin <= signum && signum <= rtmax))
return -1;
if (signum <= rtmin + (rtmax - rtmin) / 2)
{
if (! (rtmin <= signum && signum <= rtmax))
return -1;
if (signum <= rtmin + (rtmax - rtmin) / 2)
{
-
int delta = signum - rtmin
;
-
sprintf (signame, delta ? "RTMIN+%d" : "RTMIN", delta)
;
+
strcpy (signame, "RTMIN")
;
+
base = rtmin
;
}
else
{
}
else
{
-
int delta = rtmax - signum
;
-
sprintf (signame, delta ? "RTMAX-%d" : "RTMAX", delta)
;
+
strcpy (signame, "RTMAX")
;
+
base = rtmax
;
}
}
+ delta = signum - base;
+ if (delta != 0)
+ sprintf (signame + 5, "%+d", delta);
return 0;
}
}
return 0;
}
}