1 |
– |
/* Copyright (c) 1995 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* Read white space separated values from stream |
6 |
+ |
* |
7 |
+ |
* External symbols declared in rtio.h |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include <stdio.h> |
10 |
> |
#include "rtio.h" |
11 |
|
|
12 |
< |
#include <math.h> |
14 |
< |
|
12 |
> |
#include <stdlib.h> |
13 |
|
#include <ctype.h> |
14 |
|
|
17 |
– |
|
18 |
– |
#ifdef DCL_ATOF |
19 |
– |
extern double atof(); |
20 |
– |
#endif |
21 |
– |
extern int atoi(); |
22 |
– |
extern long atol(); |
23 |
– |
extern char *strcpy(); |
24 |
– |
|
25 |
– |
|
15 |
|
int |
16 |
< |
fgetval(fp, ty, vp) /* get specified data word */ |
17 |
< |
register FILE *fp; |
18 |
< |
int ty; |
19 |
< |
char *vp; |
16 |
> |
fgetval( /* get specified data word */ |
17 |
> |
FILE *fp, |
18 |
> |
int ty, |
19 |
> |
void *vp /* type depends on ty */ |
20 |
> |
) |
21 |
|
{ |
22 |
|
char wrd[64]; |
23 |
< |
register char *cp; |
24 |
< |
register int c; |
23 |
> |
char *cp; |
24 |
> |
int c; |
25 |
|
/* elide comments (# to EOL) */ |
26 |
|
do { |
27 |
|
while ((c = getc(fp)) != EOF && isspace(c)) |