| 91 |
|
MODCONT * |
| 92 |
|
addmodifier(char *modn, char *outf, char *prms, char *binv, int bincnt) |
| 93 |
|
{ |
| 94 |
< |
LUENT *lep = lu_find(&modconttab,modn); |
| 95 |
< |
MODCONT *mp; |
| 96 |
< |
EPNODE *ebinv; |
| 97 |
< |
int i; |
| 98 |
< |
|
| 94 |
> |
static int lastNCS = 0; |
| 95 |
> |
LUENT *lep = lu_find(&modconttab,modn); |
| 96 |
> |
MODCONT *mp; |
| 97 |
> |
EPNODE *ebinv; |
| 98 |
> |
int i; |
| 99 |
> |
|
| 100 |
> |
if (!lastNCS) |
| 101 |
> |
lastNCS = NCSAMP; |
| 102 |
> |
else if (NCSAMP != lastNCS) |
| 103 |
> |
error(INTERNAL, |
| 104 |
> |
"number of spectral samples must be set before first modifier"); |
| 105 |
|
if (lep->data != NULL) { |
| 106 |
|
sprintf(errmsg, "duplicate modifier '%s'", modn); |
| 107 |
|
error(USER, errmsg); |
| 117 |
|
else |
| 118 |
|
modname = (char **)realloc(modname, modasiz*sizeof(char *)); |
| 119 |
|
if (modname == NULL) |
| 120 |
< |
error(SYSTEM, "Out of memory in addmodifier()"); |
| 120 |
> |
error(SYSTEM, "out of memory in addmodifier()"); |
| 121 |
|
} |
| 122 |
|
modname[nmods++] = modn; /* XXX assumes static string */ |
| 123 |
|
lep->key = modn; /* XXX assumes static string */ |