| 74 |
|
|
| 75 |
|
/************************** INITIALIZATION ROUTINES ***********************/ |
| 76 |
|
|
| 77 |
< |
char * |
| 77 |
> |
const char * |
| 78 |
|
formstr( /* return format identifier */ |
| 79 |
|
int f |
| 80 |
|
) |
| 107 |
|
error(USER, errmsg); |
| 108 |
|
} |
| 109 |
|
if (nmods >= modasiz) { /* need bigger modifier array */ |
| 110 |
< |
modasiz += modasiz/3 + 64; |
| 110 |
> |
modasiz += modasiz/2 + 64; |
| 111 |
|
if (modname == NULL) |
| 112 |
|
modname = (char **)malloc(modasiz*sizeof(char *)); |
| 113 |
|
else |
| 164 |
|
FILE *fp; |
| 165 |
|
|
| 166 |
|
if (path == NULL || (fp = fopen(path, "r")) == NULL) { |
| 167 |
< |
sprintf(errmsg, "cannot load modifier file '%s'", |
| 168 |
< |
path != NULL ? path : fname); |
| 167 |
> |
if (path == NULL) |
| 168 |
> |
sprintf(errmsg, "cannot find modifier file '%s'", fname); |
| 169 |
> |
else |
| 170 |
> |
sprintf(errmsg, "cannot load modifier file '%s'", path); |
| 171 |
|
error(SYSTEM, errmsg); |
| 172 |
|
} |
| 173 |
|
while (fgetword(mod, sizeof(mod), fp) != NULL) |
| 174 |
< |
addmodifier(mod, outf, prms, binv, bincnt); |
| 174 |
> |
addmodifier(savqstr(mod), outf, prms, binv, bincnt); |
| 175 |
|
fclose(fp); |
| 176 |
|
} |
| 177 |
|
|