summaryrefslogtreecommitdiff
path: root/src/libstddjb/sig0_scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/sig0_scan.c')
-rw-r--r--src/libstddjb/sig0_scan.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libstddjb/sig0_scan.c b/src/libstddjb/sig0_scan.c
new file mode 100644
index 0000000..7714bfc
--- /dev/null
+++ b/src/libstddjb/sig0_scan.c
@@ -0,0 +1,13 @@
+/* ISC license. */
+
+#include <sys/types.h>
+#include <skalibs/sig.h>
+
+size_t sig0_scan (char const *s, int *sig)
+{
+ int t ;
+ size_t len = sig_scan(s, &t) ;
+ if (!len || s[len]) return 0 ;
+ *sig = t ;
+ return len ;
+}