mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove unused function and define
These were left unused by cleaning up the import function parameters. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14999341e0
commit
837daa08ea
1 changed files with 0 additions and 84 deletions
84
file.c
84
file.c
|
@ -835,93 +835,9 @@ int parse_txt_file(const char *filename, const char *csv)
|
|||
}
|
||||
|
||||
#define MAXCOLDIGITS 10
|
||||
#define MAXCOLS 100
|
||||
#define DATESTR 9
|
||||
#define TIMESTR 6
|
||||
|
||||
int init_csv_file_parsing(char **params, time_t *now, struct tm *timep, int timef, int depthf, int tempf, int po2f, int o2sensor1f, int o2sensor2f, int o2sensor3f, int cnsf, int ndlf, int ttsf, int stopdepthf, int pressuref, int setpointf, int sepidx, const char *csvtemplate, int unitidx)
|
||||
{
|
||||
int pnr = 0;
|
||||
char tmpbuf[MAXCOLDIGITS];
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", timef);
|
||||
params[pnr++] = "timeField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", depthf);
|
||||
params[pnr++] = "depthField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", tempf);
|
||||
params[pnr++] = "tempField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", po2f);
|
||||
params[pnr++] = "po2Field";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", o2sensor1f);
|
||||
params[pnr++] = "o2sensor1Field";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", o2sensor2f);
|
||||
params[pnr++] = "o2sensor2Field";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", o2sensor3f);
|
||||
params[pnr++] = "o2sensor3Field";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", cnsf);
|
||||
params[pnr++] = "cnsField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", ndlf);
|
||||
params[pnr++] = "ndlField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", ttsf);
|
||||
params[pnr++] = "ttsField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", stopdepthf);
|
||||
params[pnr++] = "stopdepthField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", pressuref);
|
||||
params[pnr++] = "pressureField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", setpointf);
|
||||
params[pnr++] = "setpointField";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", sepidx);
|
||||
params[pnr++] = "separatorIndex";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
snprintf(tmpbuf, MAXCOLDIGITS, "%d", unitidx);
|
||||
params[pnr++] = "units";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
time(now);
|
||||
timep = localtime(now);
|
||||
|
||||
strftime(tmpbuf, MAXCOLDIGITS, "%Y%m%d", timep);
|
||||
params[pnr++] = "date";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
/* As the parameter is numeric, we need to ensure that the leading zero
|
||||
* is not discarded during the transform, thus prepend time with 1 */
|
||||
strftime(tmpbuf, MAXCOLDIGITS, "1%H%M", timep);
|
||||
params[pnr++] = "time";
|
||||
params[pnr++] = strdup(tmpbuf);
|
||||
|
||||
params[pnr++] = NULL;
|
||||
|
||||
return pnr - 1;
|
||||
}
|
||||
|
||||
int parse_csv_file(const char *filename, char **params, int pnr, const char *csvtemplate)
|
||||
{
|
||||
int ret, i;
|
||||
|
|
Loading…
Add table
Reference in a new issue