Signed-off-by: Miika Turkia <[email protected]>
---
 dive.h | 2 +-
 file.c | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/dive.h b/dive.h
index c814fb4..6821a84 100644
--- a/dive.h
+++ b/dive.h
@@ -633,7 +633,7 @@ extern int parse_file(const char *filename);
 extern int parse_csv_file(const char *filename, int time, int depth, int temp, 
int po2f, int cnsf, int ndlf, int ttsf, int stopdepthf, int pressuref, int 
sepidx, const char *csvtemplate, int units);
 extern int parse_seabear_csv_file(const char *filename, int time, int depth, 
int temp, int po2f, int cnsf, int ndlf, int ttsf, int stopdepthf, int 
pressuref, int sepidx, const char *csvtemplate, int units);
 extern int parse_txt_file(const char *filename, const char *csv);
-extern int parse_manual_file(const char *filename, int separator_index, int 
units, int dateformat, int number, int date, int time, int duration, int 
location, int gps, int maxdepth, int meandepth, int buddy, int notes, int 
weight, int tags, int cylsizef, int startpresf, int endpresf, int o2f, int hef, 
int airtempf, int watertempf);
+extern int parse_manual_file(const char *filename, int separator_index, int 
units, int dateformat, int durationformat, int number, int date, int time, int 
duration, int location, int gps, int maxdepth, int meandepth, int buddy, int 
notes, int weight, int tags, int cylsizef, int startpresf, int endpresf, int 
o2f, int hef, int airtempf, int watertempf);
 
 extern int save_dives(const char *filename);
 extern int save_dives_logic(const char *filename, bool select_only);
diff --git a/file.c b/file.c
index 4ef2233..d3d5125 100644
--- a/file.c
+++ b/file.c
@@ -969,11 +969,11 @@ int parse_seabear_csv_file(const char *filename, int 
timef, int depthf, int temp
        return ret;
 }
 
-int parse_manual_file(const char *filename, int sepidx, int units, int 
dateformat, int numberf, int datef, int timef, int durationf, int locationf, 
int gpsf, int maxdepthf, int meandepthf, int buddyf, int notesf, int weightf, 
int tagsf, int cylsizef, int startpresf, int endpresf, int o2f, int hef, int 
airtempf, int watertempf)
+int parse_manual_file(const char *filename, int sepidx, int units, int 
dateformat, int durationformat, int numberf, int datef, int timef, int 
durationf, int locationf, int gpsf, int maxdepthf, int meandepthf, int buddyf, 
int notesf, int weightf, int tagsf, int cylsizef, int startpresf, int endpresf, 
int o2f, int hef, int airtempf, int watertempf)
 {
        struct memblock mem;
        int pnr = 0;
-       char *params[49];
+       char *params[51];
        char numberbuf[MAXCOLDIGITS];
        char datebuf[MAXCOLDIGITS];
        char timebuf[MAXCOLDIGITS];
@@ -989,6 +989,7 @@ int parse_manual_file(const char *filename, int sepidx, int 
units, int dateforma
        char separator_index[MAXCOLDIGITS];
        char unit[MAXCOLDIGITS];
        char datefmt[MAXCOLDIGITS];
+       char durationfmt[MAXCOLDIGITS];
        char cylsizebuf[MAXCOLDIGITS];
        char startpresbuf[MAXCOLDIGITS];
        char endpresbuf[MAXCOLDIGITS];
@@ -1020,6 +1021,7 @@ int parse_manual_file(const char *filename, int sepidx, 
int units, int dateforma
        snprintf(separator_index, MAXCOLDIGITS, "%d", sepidx);
        snprintf(unit, MAXCOLDIGITS, "%d", units);
        snprintf(datefmt, MAXCOLDIGITS, "%d", dateformat);
+       snprintf(durationfmt, MAXCOLDIGITS, "%d", durationformat);
        snprintf(cylsizebuf, MAXCOLDIGITS, "%d", cylsizef);
        snprintf(startpresbuf, MAXCOLDIGITS, "%d", startpresf);
        snprintf(endpresbuf, MAXCOLDIGITS, "%d", endpresf);
@@ -1069,6 +1071,8 @@ int parse_manual_file(const char *filename, int sepidx, 
int units, int dateforma
        params[pnr++] = unit;
        params[pnr++] = "datefmt";
        params[pnr++] = datefmt;
+       params[pnr++] = "durationfmt";
+       params[pnr++] = durationfmt;
        params[pnr++] = "cylindersizeField";
        params[pnr++] = cylsizebuf;
        params[pnr++] = "startpressureField";
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to