diff options
author | Jim Rees <rees@cvs.openbsd.org> | 2001-08-02 15:09:36 +0000 |
---|---|---|
committer | Jim Rees <rees@cvs.openbsd.org> | 2001-08-02 15:09:36 +0000 |
commit | 6572d3231e1d2176c55c8c6fee5a5ec4e6858a13 (patch) | |
tree | 44e05d8a8d3ae2db73fa4f8b907e3a8b85c685f9 /lib/libsectok | |
parent | caf3703092e6dc266380f783ce03a52085b42dd4 (diff) |
add Palm version of sectok_dump_reply()
Diffstat (limited to 'lib/libsectok')
-rw-r--r-- | lib/libsectok/r1r2.c | 18 | ||||
-rw-r--r-- | lib/libsectok/sectok.h | 4 |
2 files changed, 19 insertions, 3 deletions
diff --git a/lib/libsectok/r1r2.c b/lib/libsectok/r1r2.c index d264d1ef1e5..daca07d752b 100644 --- a/lib/libsectok/r1r2.c +++ b/lib/libsectok/r1r2.c @@ -1,4 +1,4 @@ -/* $Id: r1r2.c,v 1.6 2001/07/30 20:05:39 rees Exp $ */ +/* $Id: r1r2.c,v 1.7 2001/08/02 15:09:35 rees Exp $ */ /* copyright 1999 @@ -176,4 +176,20 @@ sectok_dump_reply(unsigned char *p, int n, int sw) { return sectok_fdump_reply(stdout, p, n, sw); } +#else +int +sectok_dump_reply(unsigned char *p, int n, int sw) +{ + int i; + + hidefield(printfield->id); + for (i = 0; i < n; i++) + palmprintf("%d:%x ", i + 1, p[i]); + if (n) + palmprintf("\n"); + if (sw) + palmprintf("%s\n", sectok_get_sw(sw)); + showfield(printfield->id); + return n; +} #endif diff --git a/lib/libsectok/sectok.h b/lib/libsectok/sectok.h index 87fc526b3aa..08d3b3af8db 100644 --- a/lib/libsectok/sectok.h +++ b/lib/libsectok/sectok.h @@ -1,4 +1,4 @@ -/* $Id: sectok.h,v 1.14 2001/07/27 21:55:36 jakob Exp $ */ +/* $Id: sectok.h,v 1.15 2001/08/02 15:09:35 rees Exp $ */ /* copyright 2001 @@ -87,8 +87,8 @@ int sectok_parse_input(char *ibuf, unsigned char *obuf, int olen); #ifndef __palmos__ int sectok_get_input(FILE *f, unsigned char *obuf, int omin, int olen); int sectok_fdump_reply(FILE *f, unsigned char *p, int n, int sw); -int sectok_dump_reply(unsigned char *p, int n, int sw); #endif +int sectok_dump_reply(unsigned char *p, int n, int sw); void sectok_print_sw(int sw); char *sectok_get_sw(int sw); char *sectok_get_ins(int ins); |