remove char to char* conversion
This commit is contained in:
parent
cc36fb8071
commit
d95f76629a
|
|
@ -2,6 +2,7 @@
|
||||||
* ivars.c, ivars.h, inpcom.c, inp.c, util.c, util.h:
|
* ivars.c, ivars.h, inpcom.c, inp.c, util.c, util.h:
|
||||||
rename internal fcn dirname() to ngdirname() because it is different
|
rename internal fcn dirname() to ngdirname() because it is different
|
||||||
from LINUX dirnam().
|
from LINUX dirnam().
|
||||||
|
* analog/file_source/cfunc.mod: remove implicit char to char* conversion
|
||||||
|
|
||||||
2011-06-25 Robert Larice
|
2011-06-25 Robert Larice
|
||||||
* src/ngsconvert.c :
|
* src/ngsconvert.c :
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
|
||||||
amploffssize = PARAM_NULL(amploffset) ? 0 : PARAM_SIZE(amploffset);
|
amploffssize = PARAM_NULL(amploffset) ? 0 : PARAM_SIZE(amploffset);
|
||||||
while (TIME >= timeinterval[1] && !state->atend) {
|
while (TIME >= timeinterval[1] && !state->atend) {
|
||||||
char line[512];
|
char line[512];
|
||||||
char *cp;
|
char *cp, *cpdel;
|
||||||
char *cp2;
|
char *cp2;
|
||||||
double t;
|
double t;
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -180,14 +180,18 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
state->pos = ftell(state->fp);
|
state->pos = ftell(state->fp);
|
||||||
cp = line;
|
cpdel = cp = strdup(line);
|
||||||
while (*cp && isspace(*cp))
|
while (*cp && isspace(*cp))
|
||||||
++cp;
|
++cp;
|
||||||
if (*cp == '#' || *cp == ';')
|
if (*cp == '#' || *cp == ';') {
|
||||||
|
free(cpdel);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
t = strtod(cp, &cp2);
|
t = strtod(cp, &cp2);
|
||||||
if (cp2 == cp)
|
if (cp2 == cp) {
|
||||||
|
free(cpdel);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
cp = cp2;
|
cp = cp2;
|
||||||
if (!PARAM_NULL(timescale))
|
if (!PARAM_NULL(timescale))
|
||||||
t *= PARAM(timescale);
|
t *= PARAM(timescale);
|
||||||
|
|
@ -212,6 +216,7 @@ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc.
|
||||||
t += PARAM(amploffset[i]);
|
t += PARAM(amploffset[i]);
|
||||||
amplinterval[2 * i + 1] = t;
|
amplinterval[2 * i + 1] = t;
|
||||||
}
|
}
|
||||||
|
free(cpdel);
|
||||||
}
|
}
|
||||||
if (TIME < timeinterval[1] && timeinterval[0] < timeinterval[1] && 0.0 <= timeinterval[0]) {
|
if (TIME < timeinterval[1] && timeinterval[0] < timeinterval[1] && 0.0 <= timeinterval[0]) {
|
||||||
if (!PARAM_NULL(amplstep) && PARAM(amplstep) == MIF_TRUE) {
|
if (!PARAM_NULL(amplstep) && PARAM(amplstep) == MIF_TRUE) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue