diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-30 08:10:46 +1100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-30 08:31:53 +1100 |
commit | e3a8ed5183ed5a24e391395c9faeae03dc9e4a6a (patch) | |
tree | 6490fa5d2d135dd74b748f0fe31179411144f63f /planner.c | |
parent | 468d3f28f9f1f2795960b8e8b79b9d02024e34ed (diff) | |
download | subsurface-e3a8ed5183ed5a24e391395c9faeae03dc9e4a6a.tar.gz |
Massive cleanup
Mostly coding style and whitespace changes plus making lots of functions
static that have no need to be extern. This also helped find a bit of code
that is actually no longer used.
This should have absolutely no functional impact - all changes should be
purely cosmetic. But it removes a bunch of lines of code and makes the
rest easier to read.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -332,7 +332,7 @@ void add_to_end_of_diveplan(struct diveplan *diveplan, struct divedatapoint *dp) struct divedatapoint **lastdp = &diveplan->dp; struct divedatapoint *ldp = *lastdp; int lasttime = 0; - while(*lastdp) { + while (*lastdp) { ldp = *lastdp; if (ldp->time > lasttime) lasttime = ldp->time; @@ -524,7 +524,7 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive) he = newhe; lasttime = dp->time; lastdepth = dp->depth; - } while((dp = dp->next) != NULL); + } while ((dp = dp->next) != NULL); len = strlen(buffer); snprintf(buffer + len, sizeof(buffer) - len, _("Gas consumption:\n")); for (gasidx = 0; gasidx < MAX_CYLINDERS; gasidx++) { @@ -938,7 +938,7 @@ void show_planned_dive(void) memcpy(&tempplan, &diveplan, sizeof(struct diveplan)); dpp = &tempplan.dp; dp = diveplan.dp; - while(dp && *dpp) { + while (dp && *dpp) { *dpp = malloc(sizeof(struct divedatapoint)); memcpy(*dpp, dp, sizeof(struct divedatapoint)); dp = dp->next; @@ -1163,7 +1163,7 @@ static void add_waypoint_cb(GtkButton *button, gpointer _data) } static void add_entry_with_callback(GtkWidget *box, int length, char *label, char *initialtext, - gboolean (*callback)(GtkWidget *, GdkEvent *, gpointer ), gpointer data) + gboolean (*callback)(GtkWidget *, GdkEvent *, gpointer), gpointer data) { GtkWidget *entry = add_entry_to_box(box, label); gtk_entry_set_max_length(GTK_ENTRY(entry), length); |