diff options
-rw-r--r-- | dive.h | 2 | ||||
-rw-r--r-- | file.c | 6 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 1 | ||||
-rw-r--r-- | xslt/manualcsv2xml.xslt | 10 |
4 files changed, 17 insertions, 2 deletions
@@ -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 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 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 divemaster, 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); @@ -969,7 +969,7 @@ 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 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) +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 divemasterf, 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; @@ -982,6 +982,7 @@ int parse_manual_file(const char *filename, int sepidx, int units, int dateforma char gpsbuf[MAXCOLDIGITS]; char maxdepthbuf[MAXCOLDIGITS]; char meandepthbuf[MAXCOLDIGITS]; + char divemasterbuf[MAXCOLDIGITS]; char buddybuf[MAXCOLDIGITS]; char notesbuf[MAXCOLDIGITS]; char weightbuf[MAXCOLDIGITS]; @@ -1014,6 +1015,7 @@ int parse_manual_file(const char *filename, int sepidx, int units, int dateforma snprintf(gpsbuf, MAXCOLDIGITS, "%d", gpsf); snprintf(maxdepthbuf, MAXCOLDIGITS, "%d", maxdepthf); snprintf(meandepthbuf, MAXCOLDIGITS, "%d", meandepthf); + snprintf(divemasterbuf, MAXCOLDIGITS, "%d", divemasterf); snprintf(buddybuf, MAXCOLDIGITS, "%d", buddyf); snprintf(notesbuf, MAXCOLDIGITS, "%d", notesf); snprintf(weightbuf, MAXCOLDIGITS, "%d", weightf); @@ -1053,6 +1055,8 @@ int parse_manual_file(const char *filename, int sepidx, int units, int dateforma params[pnr++] = maxdepthbuf; params[pnr++] = "meanDepthField"; params[pnr++] = meandepthbuf; + params[pnr++] = "divemasterField"; + params[pnr++] = divemasterbuf; params[pnr++] = "buddyField"; params[pnr++] = buddybuf; params[pnr++] = "notesField"; diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 5ee964f72..df1be75db 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -413,6 +413,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() r.indexOf(tr("GPS")), r.indexOf(tr("Max depth")), r.indexOf(tr("Mean depth")), + r.indexOf(tr("Divemaster")), r.indexOf(tr("Buddy")), r.indexOf(tr("Notes")), r.indexOf(tr("Weight")), diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt index 544220a37..877410ba7 100644 --- a/xslt/manualcsv2xml.xslt +++ b/xslt/manualcsv2xml.xslt @@ -15,6 +15,7 @@ <xsl:param name="gpsField" select="gpsField"/> <xsl:param name="maxDepthField" select="maxDepthField"/> <xsl:param name="meanDepthField" select="meanDepthField"/> + <xsl:param name="divemasterField" select="divemasterField"/> <xsl:param name="buddyField" select="buddyField"/> <xsl:param name="notesField" select="notesField"/> <xsl:param name="weightField" select="weightField"/> @@ -311,6 +312,15 @@ </depth> </xsl:if> + <xsl:if test="$divemasterField >= 0"> + <divemaster> + <xsl:call-template name="getFieldByIndex"> + <xsl:with-param name="index" select="$divemasterField"/> + <xsl:with-param name="line" select="$line"/> + </xsl:call-template> + </divemaster> + </xsl:if> + <xsl:if test="$buddyField >= 0"> <buddy> <xsl:call-template name="getFieldByIndex"> |