summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-30 08:10:46 +1100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-30 08:31:53 +1100
commite3a8ed5183ed5a24e391395c9faeae03dc9e4a6a (patch)
tree6490fa5d2d135dd74b748f0fe31179411144f63f /print.c
parent468d3f28f9f1f2795960b8e8b79b9d02024e34ed (diff)
downloadsubsurface-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 'print.c')
-rw-r--r--print.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/print.c b/print.c
index eb6c2af79..222bf8d43 100644
--- a/print.c
+++ b/print.c
@@ -227,7 +227,7 @@ static void print_tanks (struct dive *dive, cairo_t *cr, int maxwidth, int maxhe
/* Then the cylinder stuff */
n = first_tank;
counter = 0;
- while ( n < tank_count && n < first_tank + 4) {
+ while (n < tank_count && n < first_tank + 4) {
int decimals;
const char *unit, *desc;
double gas_usage;
@@ -436,7 +436,7 @@ static void show_dive_tanks(struct dive *dive, cairo_t *cr, double w,
maxheight = h * PANGO_SCALE * 0.9;
/* We need to know how many cylinders we used*/
- for ( tank_count = 0; tank_count < MAX_CYLINDERS; tank_count++ ){
+ for (tank_count = 0; tank_count < MAX_CYLINDERS; tank_count++){
if (cylinder_nodata(dive->cylinder+tank_count)) {
break;
}
@@ -446,7 +446,7 @@ static void show_dive_tanks(struct dive *dive, cairo_t *cr, double w,
if (tank_count == 0) {
height = maxheight;
} else {
- if ( tank_count<=4 ) {
+ if (tank_count<=4) {
height = maxheight / (tank_count + 1);
} else {
height = maxheight / 5;
@@ -521,7 +521,7 @@ static void show_table_header(cairo_t *cr, double w, double h,
curwidth = 0;
for (i = 0; i < 7; i++) {
cairo_move_to(cr, curwidth / PANGO_SCALE, 0);
- if (i == 0 || i == 2 || i == 3 ){
+ if (i == 0 || i == 2 || i == 3){
// Column 0, 2 and 3 (Dive #, Depth and Time) get 1/2 width
pango_layout_set_width(layout, colwidth/ (double) 2);
curwidth = curwidth + (colwidth / 2);
@@ -727,7 +727,7 @@ static void print_table(int divenr, cairo_t *cr, double x, double y,
cairo_set_line_join(cr, CAIRO_LINE_JOIN_MITER);
cairo_stroke(cr);
for (i = 0; i < 6; i++) {
- if (i == 0 || i == 2 || i == 3 ){
+ if (i == 0 || i == 2 || i == 3){
// Column 0, 2 and 3 (Dive #, Depth and Time) get 1/2 width
curwidth = curwidth + (maxwidth/7/2);
} else {