summaryrefslogtreecommitdiff
path: root/lib/libsectok/input.c
diff options
context:
space:
mode:
authorJim Rees <rees@cvs.openbsd.org>2001-07-02 20:07:10 +0000
committerJim Rees <rees@cvs.openbsd.org>2001-07-02 20:07:10 +0000
commit3bb4c653100b0557977753c622bb3f03269640b5 (patch)
tree781f7c657e6140053f301beba954a40f3f064013 /lib/libsectok/input.c
parentadf9057e8e5d9b01ad93c03f8febd4119a51339e (diff)
separate sectok from sc7816 and give each its own include file
change status word to a single word instead of two bytes add sc7816 layer for backward compatibility other minor changes
Diffstat (limited to 'lib/libsectok/input.c')
-rw-r--r--lib/libsectok/input.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libsectok/input.c b/lib/libsectok/input.c
index 30f7c8280a3..971981095ac 100644
--- a/lib/libsectok/input.c
+++ b/lib/libsectok/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.4 2001/06/26 22:47:24 rees Exp $ */
+/* $Id: input.c,v 1.5 2001/07/02 20:07:08 rees Exp $ */
/*
copyright 2001
@@ -51,7 +51,7 @@ char *av[];
unsigned char obuf[256];
while (1) {
- n = get_input(stdin, obuf, 1, sizeof obuf);
+ n = sectok_get_input(stdin, obuf, 1, sizeof obuf);
if (!n)
break;
for (i = 0; i < n; i++)
@@ -64,19 +64,19 @@ char *av[];
#ifndef __palmos__
int
-get_input(FILE *f, unsigned char *obuf, int omin, int olen)
+sectok_get_input(FILE *f, unsigned char *obuf, int omin, int olen)
{
int n = 0;
char ibuf[1024];
while (n < omin && fgets(ibuf, sizeof ibuf, f) != NULL)
- n += parse_input(ibuf, obuf + n, olen - n);
+ n += sectok_parse_input(ibuf, obuf + n, olen - n);
return n;
}
#endif
int
-parse_input(char *ibuf, unsigned char *obuf, int olen)
+sectok_parse_input(char *ibuf, unsigned char *obuf, int olen)
{
char *cp;
unsigned char *up;
@@ -137,7 +137,7 @@ parse_input(char *ibuf, unsigned char *obuf, int olen)
void
sectok_parse_fname(char *buf, unsigned char *fid)
{
- if (buf[0] == '/' || parse_input(buf, fid, 2) < 2) {
+ if (buf[0] == '/' || sectok_parse_input(buf, fid, 2) < 2) {
/* root */
fid[0] = 0x3f;
fid[1] = 0;