summaryrefslogtreecommitdiff
path: root/src/libstddjb/sig_number.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/sig_number.c')
-rw-r--r--src/libstddjb/sig_number.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstddjb/sig_number.c b/src/libstddjb/sig_number.c
new file mode 100644
index 0000000..93d9b59
--- /dev/null
+++ b/src/libstddjb/sig_number.c
@@ -0,0 +1,12 @@
+/* ISC license. */
+
+#include <skalibs/bytestr.h>
+#include <skalibs/sig.h>
+#include "sig-internal.h"
+
+int sig_number (char const *name)
+{
+ register sigtable_t const *p = skalibs_sigtable ;
+ for (; p->name ; p++) if (!str_diff(name, p->name)) break ;
+ return p->number ;
+}