diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-08-27 17:36:25 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-27 08:59:56 -0700 |
commit | 837daa08ea85be1658758e57d9f9f212fdc2f004 (patch) | |
tree | 03cb8d04d1c37c7bcf784dbc93ab090e1d409ac1 /file.c | |
parent | 14999341e01eb9b494368d0c9431097853e1141f (diff) | |
download | subsurface-837daa08ea85be1658758e57d9f9f212fdc2f004.tar.gz |
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>
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 84 |
1 files changed, 0 insertions, 84 deletions
@@ -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; |