From 837daa08ea85be1658758e57d9f9f212fdc2f004 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Thu, 27 Aug 2015 17:36:25 +0300 Subject: Remove unused function and define These were left unused by cleaning up the import function parameters. Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- file.c | 84 ------------------------------------------------------------------ 1 file changed, 84 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index cd3d3cad4..19d708f00 100644 --- a/file.c +++ b/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; -- cgit v1.2.3-70-g09d2