From b855148c9b6d28fedfd083d037bcf246f1913d92 Mon Sep 17 00:00:00 2001 From: wkj Date: Sun, 16 May 2004 07:54:22 +0000 Subject: Checkpoint. --- src/cmd/postscript/tr2post/Bgetfield.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/cmd/postscript/tr2post/Bgetfield.c') 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]; -- cgit v1.2.3