summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Rees <rees@cvs.openbsd.org>2001-06-26 22:47:25 +0000
committerJim Rees <rees@cvs.openbsd.org>2001-06-26 22:47:25 +0000
commit1f2c0586bf3c066d99d54b0059263e05f8e7f43f (patch)
tree15d4e185908d4c7dc8fc10f222d8b149f28e3203 /lib
parentad5cc109b0ed32437c25b30b9412c196ad273b53 (diff)
add sectok_parse_fname()
Diffstat (limited to 'lib')
-rw-r--r--lib/libsectok/input.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libsectok/input.c b/lib/libsectok/input.c
index 014525b9abb..30f7c8280a3 100644
--- a/lib/libsectok/input.c
+++ b/lib/libsectok/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.3 2001/06/08 15:04:03 rees Exp $ */
+/* $Id: input.c,v 1.4 2001/06/26 22:47:24 rees Exp $ */
/*
copyright 2001
@@ -133,3 +133,13 @@ parse_input(char *ibuf, unsigned char *obuf, int olen)
return (up - obuf);
}
+
+void
+sectok_parse_fname(char *buf, unsigned char *fid)
+{
+ if (buf[0] == '/' || parse_input(buf, fid, 2) < 2) {
+ /* root */
+ fid[0] = 0x3f;
+ fid[1] = 0;
+ }
+}