1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1996 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
37 |
|
|
38 |
|
|
39 |
|
char * |
40 |
< |
sskip(s) /* skip word in string */ |
40 |
> |
sskip(s) /* skip word in string, leaving on space */ |
41 |
|
register char *s; |
42 |
|
{ |
43 |
|
while (isspace(*s)) |
49 |
|
|
50 |
|
|
51 |
|
char * |
52 |
+ |
sskip2(s, n) /* skip word(s) in string, leaving on word */ |
53 |
+ |
register char *s; |
54 |
+ |
register int n; |
55 |
+ |
{ |
56 |
+ |
while (isspace(*s)) |
57 |
+ |
s++; |
58 |
+ |
while (n-- > 0) { |
59 |
+ |
while (*s && !isspace(*s)) |
60 |
+ |
s++; |
61 |
+ |
while (isspace(*s)) |
62 |
+ |
s++; |
63 |
+ |
} |
64 |
+ |
return(s); |
65 |
+ |
} |
66 |
+ |
|
67 |
+ |
|
68 |
+ |
char * |
69 |
|
iskip(s) /* skip integer in string */ |
70 |
|
register char *s; |
71 |
|
{ |
86 |
|
fskip(s) /* skip float in string */ |
87 |
|
register char *s; |
88 |
|
{ |
89 |
< |
register char *cp = s; |
89 |
> |
register char *cp; |
90 |
|
|
91 |
< |
while (isspace(*cp)) |
92 |
< |
cp++; |
93 |
< |
if (*cp == '-' || *cp == '+') |
94 |
< |
cp++; |
95 |
< |
s = cp; |
91 |
> |
while (isspace(*s)) |
92 |
> |
s++; |
93 |
> |
if (*s == '-' || *s == '+') |
94 |
> |
s++; |
95 |
> |
cp = s; |
96 |
|
while (isdigit(*cp)) |
97 |
|
cp++; |
98 |
|
if (*cp == '.') { |
124 |
|
register char *cp; |
125 |
|
|
126 |
|
cp = iskip(s); |
127 |
< |
return(cp != NULL && strchr(*cp, ds) != NULL); |
127 |
> |
return(cp != NULL && strchr(ds, *cp) != NULL); |
128 |
|
} |
129 |
|
|
130 |
|
|
144 |
|
register char *cp; |
145 |
|
|
146 |
|
cp = fskip(s); |
147 |
< |
return(cp != NULL && strchr(*cp, ds) != NULL); |
147 |
> |
return(cp != NULL && strchr(ds, *cp) != NULL); |
148 |
|
} |