diff options
author | wkj <devnull@localhost> | 2004-05-16 07:54:22 +0000 |
---|---|---|
committer | wkj <devnull@localhost> | 2004-05-16 07:54:22 +0000 |
commit | b855148c9b6d28fedfd083d037bcf246f1913d92 (patch) | |
tree | 0075eb6ea37427fa48b78cb937fabc04175cead1 /src/cmd/postscript/tr2post/Bgetfield.c | |
parent | 61f5c35c9465f0702739b41249a664d409f0482c (diff) | |
download | plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.tar.gz plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.tar.bz2 plan9port-b855148c9b6d28fedfd083d037bcf246f1913d92.zip |
Checkpoint.
Diffstat (limited to 'src/cmd/postscript/tr2post/Bgetfield.c')
-rw-r--r-- | src/cmd/postscript/tr2post/Bgetfield.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cmd/postscript/tr2post/Bgetfield.c b/src/cmd/postscript/tr2post/Bgetfield.c index 8922139d..974fce62 100644 --- a/src/cmd/postscript/tr2post/Bgetfield.c +++ b/src/cmd/postscript/tr2post/Bgetfield.c @@ -4,9 +4,6 @@ #include "../common/common.h" #include "tr2post.h" -#undef isspace -#define isspace bisspace - int isspace(Rune r) { @@ -14,7 +11,7 @@ isspace(Rune r) } int -Bskipws(Biobuf *bp) { +Bskipws(Biobufhdr *bp) { int r; char c[UTFmax]; int sindex = 0; @@ -36,13 +33,15 @@ Bskipws(Biobuf *bp) { int asc2dig(char c, int base) { - if (c >= '0' && c <= '9') + if (c >= '0' && c <= '9'){ if (base == 8 && c > '7') return(-1); else return(c - '0'); + } - if (base == 16) + if (base == 16){ if (c >= 'a' && c <= 'f') return(10 + c - 'a'); else if (c >= 'A' && c <= 'F') return(10 + c - 'A'); + } return(-1); } @@ -55,7 +54,7 @@ asc2dig(char c, int base) { */ int -Bgetfield(Biobuf *bp, int type, void *thing, int size) { +Bgetfield(Biobufhdr *bp, int type, void *thing, int size) { int r; Rune R; char c[UTFmax]; |