10 |
|
#include <stdio.h> |
11 |
|
#include <stdlib.h> |
12 |
|
#include <ctype.h> |
13 |
+ |
|
14 |
+ |
#include "standard.h" |
15 |
|
#include "vars.h" |
16 |
|
|
17 |
|
#define NOCHAR 127 /* constant for character to delete */ |
60 |
|
int |
61 |
|
setvariable(ass, mv) /* assign variable according to string */ |
62 |
|
register char *ass; |
63 |
< |
VARIABLE *(*mv)(); |
63 |
> |
VARIABLE *(*mv)(char*); |
64 |
|
{ |
65 |
|
char varname[32]; |
66 |
|
int n; |
90 |
|
if (vp == NULL) |
91 |
|
return(-1); |
92 |
|
/* assign new value */ |
93 |
< |
if (i = vp->nass) { |
93 |
> |
if ( (i = vp->nass) ) { |
94 |
|
cp = vp->value; |
95 |
|
while (i--) |
96 |
|
while (*cp++) |
97 |
|
; |
98 |
|
i = cp - vp->value; |
99 |
< |
vp->value = (char *)realloc(vp->value, i+n+1); |
99 |
> |
vp->value = (char *)realloc((void *)vp->value, i+n+1); |
100 |
|
} else |
101 |
|
vp->value = (char *)malloc(n+1); |
102 |
|
if (vp->value == NULL) { |
140 |
|
{ |
141 |
|
register char *cp; |
142 |
|
|
143 |
< |
if (vval(vn) == NULL | n < 0 | n >= vdef(vn)) |
143 |
> |
if ((vval(vn) == NULL) | (n < 0) | (n >= vdef(vn))) |
144 |
|
return(NULL); |
145 |
|
cp = vval(vn); |
146 |
|
while (n--) |