From 4528e5f34ca3404eed7fa679811c233629d64264 Mon Sep 17 00:00:00 2001 From: siflfran <siflfran> Date: Mon, 24 Apr 2006 13:38:26 +0000 Subject: [PATCH] indent --- 01_git/astime_x.c | 116 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 94 insertions(+), 22 deletions(-) diff --git a/01_git/astime_x.c b/01_git/astime_x.c index 79b7cc7..0dbdd67 100644 --- a/01_git/astime_x.c +++ b/01_git/astime_x.c @@ -312,7 +312,7 @@ void draw_window(Window win) } } - if ( state.show_label ) { + if (state.show_label) { mainGCV.foreground = label_pix; XChangeGC( mainDisplay, @@ -383,6 +383,7 @@ void calculate_hands() while (loc_time->tm_hour < 0) loc_time->tm_hour += 24; } + if (state.counterclockwise) { loc_time->tm_sec = 60 - loc_time->tm_sec; loc_time->tm_min = 60 - loc_time->tm_min; @@ -394,8 +395,10 @@ void calculate_hands() yrate[0] = convert2y((float) loc_time->tm_sec); /* minutes */ - xrate[1] = convert2x((float) (loc_time->tm_min + (float) (loc_time->tm_sec) / 60.0)); - yrate[1] = convert2y((float) (loc_time->tm_min + (float) (loc_time->tm_sec) / 60.0)); + xrate[1] = convert2x((float) (loc_time->tm_min + + (float) (loc_time->tm_sec) / 60.0)); + yrate[1] = convert2y((float) (loc_time->tm_min + + (float) (loc_time->tm_sec) / 60.0)); /* hours */ if (state.twentyfour) { @@ -436,8 +439,10 @@ void calculate_hands() end -= ((double) end_min) / 60.0; start_sec = (int) (start * 360); end_sec = (int) (end * 360); - printf("Buergerliche Daemmerung beginnt um %d:%d:%d Uhr und endet um %d:%d:%d Uhr.\n", - start_hour, start_min, start_sec, end_hour, end_min, end_sec); + printf("Buergerliche Daemmerung beginnt um %d:%d:%d Uhr", + start_hour, start_min, start_sec); + printf("und endet um %d:%d:%d Uhr.\n", + end_hour, end_min, end_sec); } #endif @@ -628,30 +633,97 @@ void draw_dial() #ifdef DEBUG printf("dot at %d %d\n", tmp_coord.x, tmp_coord.y); #endif - XDrawPoint(mainDisplay, backgroundWindow, mainGC, tmp_coord.x, tmp_coord.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + tmp_coord.x, + tmp_coord.y); if (state.tprop == 2) { if (!((int) tmp % 5)) { - XDrawPoint(mainDisplay, backgroundWindow, mainGC, tmp_coord.x, tmp_coord.y + 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, tmp_coord.x + 1, tmp_coord.y); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, tmp_coord.x, tmp_coord.y - 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, tmp_coord.x - 1, tmp_coord.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + tmp_coord.x, + tmp_coord.y + 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + tmp_coord.x + 1, + tmp_coord.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + tmp_coord.x, tmp_coord.y - 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + tmp_coord.x - 1, + tmp_coord.y); } } } if (state.tprop == 1) { - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x - watch_size.x - 1, center.y - 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x - watch_size.x - 1, center.y + 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x - watch_size.x, center.y); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x + watch_size.x + 1, center.y - 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x + watch_size.x + 1, center.y + 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x + watch_size.x, center.y); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x - 1, center.y - watch_size.y - 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x + 1, center.y - watch_size.y - 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x, center.y - watch_size.y); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x - 1, center.y + watch_size.y + 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x + 1, center.y + watch_size.y + 1); - XDrawPoint(mainDisplay, backgroundWindow, mainGC, center.x, center.y + watch_size.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x - watch_size.x - 1, + center.y - 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x - watch_size.x - 1, + center.y + 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x - watch_size.x, + center.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x + watch_size.x + 1, + center.y - 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x + watch_size.x + 1, + center.y + 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x + watch_size.x, + center.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x - 1, + center.y - watch_size.y - 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x + 1, + center.y - watch_size.y - 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x, + center.y - watch_size.y); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x - 1, + center.y + watch_size.y + 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x + 1, + center.y + watch_size.y + 1); + XDrawPoint(mainDisplay, + backgroundWindow, + mainGC, + center.x, + center.y + watch_size.y); } } } -- GitLab