77 |
|
if (fnew == NULL) |
78 |
|
return(0); |
79 |
|
fnew->next = NULL; |
80 |
< |
cp = fnew->arg; /* copy argument and comments */ |
80 |
> |
cp = fnew->val; /* copy value and comments */ |
81 |
|
while ((*cp++ = *fval++)) |
82 |
|
; |
83 |
|
fnew->rem = cp; |
163 |
|
|
164 |
|
if ((idf == NULL) | (param == NULL)) |
165 |
|
return(0); |
166 |
+ |
/* quick check if already there */ |
167 |
+ |
if (param == (prev==NULL ? idf->pfirst : prev->dnext)) |
168 |
+ |
return(1); |
169 |
|
/* find in IDF list, first*/ |
170 |
|
for (plast = NULL, pptr = idf->pfirst; |
171 |
|
pptr != param; plast = pptr, pptr = pptr->dnext) |
172 |
|
if (pptr == NULL) |
173 |
|
return(0); |
174 |
< |
if (plast == NULL) { |
172 |
< |
if (prev == NULL) |
173 |
< |
return(1); /* already in place */ |
174 |
> |
if (plast == NULL) |
175 |
|
idf->pfirst = param->dnext; |
176 |
< |
} else { |
176 |
< |
if (prev == plast) |
177 |
< |
return(1); /* already in place */ |
176 |
> |
else |
177 |
|
plast->dnext = param->dnext; |
179 |
– |
} |
178 |
|
if (idf->plast == param) |
179 |
|
idf->plast = plast; |
180 |
|
if (prev == NULL) { /* means they want it at beginning */ |
365 |
|
fputs(param->rem, fp); |
366 |
|
for (fptr = param->flist; fptr != NULL; fptr = fptr->next) { |
367 |
|
if (!incl_comm) |
368 |
< |
fputs("\n\t", fp); |
369 |
< |
fputs(fptr->arg, fp); |
368 |
> |
fputs("\n ", fp); |
369 |
> |
fputs(fptr->val, fp); |
370 |
|
fputc((fptr->next==NULL ? ';' : ','), fp); |
371 |
|
if (incl_comm) |
372 |
|
fputs(fptr->rem, fp); |