mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do some whitespace cleanup
The previous commit was a patch from Lubomir, which also had some whitespace fixes (to go with some new whitespace bugs to replace them) in it. I removed the whitespace changes from that patch (don't mix whitespace fixes with other fixes, unless they are on the same lines!) but decided to look for other whitespace issues, and this is the result. I left the non-C files alone, some of the spec and script files also have whitespace at the end of lines etc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
9d10574694
commit
9380f78c82
7 changed files with 18 additions and 18 deletions
10
gtk-gui.c
10
gtk-gui.c
|
@ -98,7 +98,7 @@ void report_error(GError* error)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error_info_bar == NULL)
|
if (error_info_bar == NULL)
|
||||||
{
|
{
|
||||||
error_count = 1;
|
error_count = 1;
|
||||||
|
@ -108,11 +108,11 @@ void report_error(GError* error)
|
||||||
g_signal_connect(error_info_bar, "response", G_CALLBACK(on_info_bar_response), NULL);
|
g_signal_connect(error_info_bar, "response", G_CALLBACK(on_info_bar_response), NULL);
|
||||||
gtk_info_bar_set_message_type(GTK_INFO_BAR(error_info_bar),
|
gtk_info_bar_set_message_type(GTK_INFO_BAR(error_info_bar),
|
||||||
GTK_MESSAGE_ERROR);
|
GTK_MESSAGE_ERROR);
|
||||||
|
|
||||||
error_label = gtk_label_new(error->message);
|
error_label = gtk_label_new(error->message);
|
||||||
GtkWidget *container = gtk_info_bar_get_content_area(GTK_INFO_BAR(error_info_bar));
|
GtkWidget *container = gtk_info_bar_get_content_area(GTK_INFO_BAR(error_info_bar));
|
||||||
gtk_container_add(GTK_CONTAINER(container), error_label);
|
gtk_container_add(GTK_CONTAINER(container), error_label);
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(main_vbox), error_info_bar, FALSE, FALSE, 0);
|
gtk_box_pack_start(GTK_BOX(main_vbox), error_info_bar, FALSE, FALSE, 0);
|
||||||
gtk_widget_show_all(main_vbox);
|
gtk_widget_show_all(main_vbox);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ static void file_open(GtkWidget *w, gpointer data)
|
||||||
GSList *filenames, *fn_glist;
|
GSList *filenames, *fn_glist;
|
||||||
char *filename;
|
char *filename;
|
||||||
filenames = fn_glist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
|
filenames = fn_glist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(dialog));
|
||||||
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
while(filenames != NULL) {
|
while(filenames != NULL) {
|
||||||
filename = filenames->data;
|
filename = filenames->data;
|
||||||
|
@ -162,7 +162,7 @@ static void file_open(GtkWidget *w, gpointer data)
|
||||||
g_error_free(error);
|
g_error_free(error);
|
||||||
error = NULL;
|
error = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free(filename);
|
g_free(filename);
|
||||||
filenames = g_slist_next(filenames);
|
filenames = g_slist_next(filenames);
|
||||||
}
|
}
|
||||||
|
|
4
info.c
4
info.c
|
@ -1,7 +1,7 @@
|
||||||
/* info.c */
|
/* info.c */
|
||||||
/* creates the UI for the info frame -
|
/* creates the UI for the info frame -
|
||||||
* controlled through the following interfaces:
|
* controlled through the following interfaces:
|
||||||
*
|
*
|
||||||
* void show_dive_info(struct dive *dive)
|
* void show_dive_info(struct dive *dive)
|
||||||
*
|
*
|
||||||
* called from gtk-ui:
|
* called from gtk-ui:
|
||||||
|
|
6
main.c
6
main.c
|
@ -172,7 +172,7 @@ static void parse_argument(const char *arg)
|
||||||
if (strncmp(arg, "-psn_", 5) == 0) {
|
if (strncmp(arg, "-psn_", 5) == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Bad argument '%s'\n", arg);
|
fprintf(stderr, "Bad argument '%s'\n", arg);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -217,7 +217,7 @@ int main(int argc, char **argv)
|
||||||
parse_xml_init();
|
parse_xml_init();
|
||||||
|
|
||||||
init_ui(&argc, &argv);
|
init_ui(&argc, &argv);
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
const char *a = argv[i];
|
const char *a = argv[i];
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
parse_file(a, &error);
|
parse_file(a, &error);
|
||||||
|
|
||||||
if (error != NULL)
|
if (error != NULL)
|
||||||
{
|
{
|
||||||
report_error(error);
|
report_error(error);
|
||||||
|
|
|
@ -1420,8 +1420,8 @@ void parse_xml_buffer(const char *url, const char *buffer, int size, GError **er
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* we assume that the last (or only) filename passed as argument is a
|
/* we assume that the last (or only) filename passed as argument is a
|
||||||
* great filename to use as default when saving the dives */
|
* great filename to use as default when saving the dives */
|
||||||
set_filename(url);
|
set_filename(url);
|
||||||
reset_all();
|
reset_all();
|
||||||
dive_start();
|
dive_start();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* profile.c */
|
/* profile.c */
|
||||||
/* creates all the necessary data for drawing the dive profile
|
/* creates all the necessary data for drawing the dive profile
|
||||||
* uses cairo to draw it
|
* uses cairo to draw it
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -873,7 +873,7 @@ static velocity_t velocity(int speed)
|
||||||
else if (speed < -25) /* -5ft/min */
|
else if (speed < -25) /* -5ft/min */
|
||||||
v = SLOW;
|
v = SLOW;
|
||||||
else if (speed < 25) /* very hard to find data, but it appears that the recommendations
|
else if (speed < 25) /* very hard to find data, but it appears that the recommendations
|
||||||
for descent are usually about 2x ascent rate; still, we want
|
for descent are usually about 2x ascent rate; still, we want
|
||||||
stable to mean stable */
|
stable to mean stable */
|
||||||
v = STABLE;
|
v = STABLE;
|
||||||
else if (speed < 152) /* between 5 and 30ft/min is considered slow */
|
else if (speed < 152) /* between 5 and 30ft/min is considered slow */
|
||||||
|
@ -929,7 +929,7 @@ static struct plot_info *analyze_plot_info(struct plot_info *pi)
|
||||||
int past = -2;
|
int past = -2;
|
||||||
while (i+past > 0 && entry[0].sec - entry[past].sec < 15)
|
while (i+past > 0 && entry[0].sec - entry[past].sec < 15)
|
||||||
past--;
|
past--;
|
||||||
entry->velocity = velocity((entry[0].depth - entry[past].depth) /
|
entry->velocity = velocity((entry[0].depth - entry[past].depth) /
|
||||||
(entry[0].sec - entry[past].sec));
|
(entry[0].sec - entry[past].sec));
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
@ -941,7 +941,7 @@ static struct plot_info *analyze_plot_info(struct plot_info *pi)
|
||||||
struct plot_data *entry = pi->entry +i;
|
struct plot_data *entry = pi->entry +i;
|
||||||
analyze_plot_info_minmax(entry, pi->entry, pi->entry+nr);
|
analyze_plot_info_minmax(entry, pi->entry, pi->entry+nr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pi;
|
return pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ static void show_single_dive_stats(struct dive *dive)
|
||||||
set_label(single_w.date, buf);
|
set_label(single_w.date, buf);
|
||||||
set_label(single_w.dive_time, "%d min", (dive->duration.seconds + 30) / 60);
|
set_label(single_w.dive_time, "%d min", (dive->duration.seconds + 30) / 60);
|
||||||
if (prev_dive)
|
if (prev_dive)
|
||||||
set_label(single_w.surf_intv,
|
set_label(single_w.surf_intv,
|
||||||
get_time_string(dive->when - (prev_dive->when + prev_dive->duration.seconds), 4));
|
get_time_string(dive->when - (prev_dive->when + prev_dive->duration.seconds), 4));
|
||||||
else
|
else
|
||||||
set_label(single_w.surf_intv, "unknown");
|
set_label(single_w.surf_intv, "unknown");
|
||||||
|
|
2
uemis.h
2
uemis.h
|
@ -28,7 +28,7 @@ typedef struct {
|
||||||
uint16_t consumption; // (units unclear)
|
uint16_t consumption; // (units unclear)
|
||||||
uint8_t rgt; // (remaining gas time in minutes)
|
uint8_t rgt; // (remaining gas time in minutes)
|
||||||
uint8_t cns;
|
uint8_t cns;
|
||||||
uint8_t flags[8];
|
uint8_t flags[8];
|
||||||
} __attribute((packed)) uemis_sample_t;
|
} __attribute((packed)) uemis_sample_t;
|
||||||
|
|
||||||
#endif /* DIVE_H */
|
#endif /* DIVE_H */
|
||||||
|
|
Loading…
Add table
Reference in a new issue