| 14 |
|
|
| 15 |
|
|
| 16 |
|
int |
| 17 |
< |
readfargs(fa, fp) /* read function arguments from stream */ |
| 18 |
< |
register FUNARGS *fa; |
| 19 |
< |
FILE *fp; |
| 17 |
> |
readfargs( /* read function arguments from stream */ |
| 18 |
> |
FUNARGS *fa, |
| 19 |
> |
FILE *fp |
| 20 |
> |
) |
| 21 |
|
{ |
| 22 |
|
#define getstr(s) (fgetword(s,sizeof(s),fp)!=NULL) |
| 23 |
|
#define getint(s) (getstr(s) && isint(s)) |
| 24 |
|
#define getflt(s) (getstr(s) && isflt(s)) |
| 25 |
|
char sbuf[MAXSTR]; |
| 26 |
< |
register int n, i; |
| 26 |
> |
int n, i; |
| 27 |
|
|
| 28 |
|
if (!getint(sbuf) || (n = atoi(sbuf)) < 0) |
| 29 |
|
return(0); |
| 30 |
< |
if (fa->nsargs = n) { |
| 30 |
> |
if ( (fa->nsargs = n) ) { |
| 31 |
|
fa->sarg = (char **)malloc(n*sizeof(char *)); |
| 32 |
|
if (fa->sarg == NULL) |
| 33 |
|
return(-1); |
| 58 |
|
#endif |
| 59 |
|
if (!getint(sbuf) || (n = atoi(sbuf)) < 0) |
| 60 |
|
return(0); |
| 61 |
< |
if (fa->nfargs = n) { |
| 61 |
> |
if ( (fa->nfargs = n) ) { |
| 62 |
|
fa->farg = (RREAL *)malloc(n*sizeof(RREAL)); |
| 63 |
|
if (fa->farg == NULL) |
| 64 |
|
return(-1); |
| 77 |
|
|
| 78 |
|
|
| 79 |
|
void |
| 80 |
< |
freefargs(fa) /* free object arguments */ |
| 81 |
< |
register FUNARGS *fa; |
| 80 |
> |
freefargs( /* free object arguments */ |
| 81 |
> |
FUNARGS *fa |
| 82 |
> |
) |
| 83 |
|
{ |
| 84 |
< |
register int i; |
| 84 |
> |
int i; |
| 85 |
|
|
| 86 |
|
if (fa->nsargs) { |
| 87 |
|
for (i = 0; i < fa->nsargs; i++) |