aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/postscript/tr2post/Bgetfield.c
diff options
context:
space:
mode:
authorwkj <devnull@localhost>2004-05-16 07:54:22 +0000
committerwkj <devnull@localhost>2004-05-16 07:54:22 +0000
commitb855148c9b6d28fedfd083d037bcf246f1913d92 (patch)
tree0075eb6ea37427fa48b78cb937fabc04175cead1 /src/cmd/postscript/tr2post/Bgetfield.c
parent61f5c35c9465f0702739b41249a664d409f0482c (diff)
downloadplan9port-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.c13
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];