diff options
-rw-r--r-- | save-html.c | 24 | ||||
-rw-r--r-- | worldmap-save.c | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/save-html.c b/save-html.c index 386ce9359..45bec2a96 100644 --- a/save-html.c +++ b/save-html.c @@ -123,7 +123,7 @@ void put_HTML_tags(struct membuffer *b, struct dive *dive, const char *pre, cons void write_attribute(struct membuffer *b, const char *att_name, const char *value) { if (!value) - value="--"; + value = "--"; put_format(b, "\"%s\":\"%s\",", att_name, value); } @@ -145,12 +145,12 @@ void write_one_dive(struct membuffer *b, struct dive *dive, int *dive_no) write_attribute(b, "divemaster", dive->divemaster); write_attribute(b, "suit", dive->suit); put_HTML_tags(b, dive, "\"tags\":", ","); - put_HTML_notes(b, dive ,"\"notes\":\"" ,"\","); + put_HTML_notes(b, dive, "\"notes\":\"", "\","); put_string(b, "},\n"); (*dive_no)++; } -void write_no_trip (struct membuffer *b, int *dive_no) +void write_no_trip(struct membuffer *b, int *dive_no) { int i; struct dive *dive; @@ -159,30 +159,30 @@ void write_no_trip (struct membuffer *b, int *dive_no) put_format(b, "\"name\":\"Other\","); put_format(b, "\"dives\":["); - for_each_dive(i, dive) { + for_each_dive (i, dive) { if (!dive->divetrip) write_one_dive(b, dive, dive_no); } put_format(b, "]},\n\n"); } -void write_trip (struct membuffer *b, dive_trip_t *trip, int *dive_no) +void write_trip(struct membuffer *b, dive_trip_t *trip, int *dive_no) { int i; struct dive *dive; put_format(b, "{"); - put_format(b, "\"name\":\"%s\",",trip->location); + put_format(b, "\"name\":\"%s\",", trip->location); put_format(b, "\"dives\":["); - for (dive = trip->dives; dive != NULL; dive = dive->next){ + for (dive = trip->dives; dive != NULL; dive = dive->next) { write_one_dive(b, dive, dive_no); } put_format(b, "]},\n\n"); } -void write_trips(struct membuffer *b,bool selected_only) +void write_trips(struct membuffer *b, bool selected_only) { int i, dive_no = 0; struct dive *dive; @@ -196,7 +196,7 @@ void write_trips(struct membuffer *b,bool selected_only) put_format(b, "\"name\":\"Other\","); put_format(b, "\"dives\":["); - for_each_dive(i, dive) { + for_each_dive (i, dive) { if (!dive->selected) continue; write_one_dive(b, dive, &dive_no); @@ -204,8 +204,7 @@ void write_trips(struct membuffer *b,bool selected_only) put_format(b, "]},\n\n"); } else { - for_each_dive(i, dive) { - + for_each_dive (i, dive) { trip = dive->divetrip; /*Continue if the dive have no trips or we have seen this trip before*/ @@ -222,7 +221,8 @@ void write_trips(struct membuffer *b,bool selected_only) } } -void export_list(struct membuffer *b,bool selected_only){ +void export_list(struct membuffer *b, bool selected_only) +{ put_string(b, "trips=["); write_trips(b, selected_only); put_string(b, "]"); diff --git a/worldmap-save.c b/worldmap-save.c index 3892014e1..0b22b554c 100644 --- a/worldmap-save.c +++ b/worldmap-save.c @@ -21,7 +21,7 @@ void writeMarkers(struct membuffer *b, const bool selected_only) int i, dive_no = 0; struct dive *dive; - for_each_dive(i, dive) { + for_each_dive (i, dive) { if (selected_only) { if (!dive->selected) continue; @@ -37,7 +37,7 @@ void writeMarkers(struct membuffer *b, const bool selected_only) put_duration(b, dive->duration, translate("gettextFromC", "<p>Duration: "), translate("gettextFromC", " min</p>")); put_depth(b, dive->maxdepth, translate("gettextFromC", "<p>Max Depth: "), translate("gettextFromC", " m</p>")); put_HTML_airtemp(b, dive, translate("gettextFromC", "<p>Air Temp: "), "</p>"); - put_HTML_watertemp(b, dive,translate("gettextFromC", "<p>Water Temp : ") , "</p>"); + put_HTML_watertemp(b, dive, translate("gettextFromC", "<p>Water Temp : "), "</p>"); put_format(b, "<p>Location : <b>%s</b></p>", quote(dive->location)); put_HTML_notes(b, dive, translate("gettextFromC", "<p> Notes"), " </p>"); put_string(b, "</p>'+'</div>'+'</div>'});\ninfowindows.push(tempinfowindow);\n"); |