… | |
… | |
304 | 0, 0, /* base size */ |
304 | 0, 0, /* base size */ |
305 | NorthWestGravity /* gravity */ |
305 | NorthWestGravity /* gravity */ |
306 | }; |
306 | }; |
307 | |
307 | |
308 | /* subroutine declarations */ |
308 | /* subroutine declarations */ |
309 | static void geometry2sizehint (mywindow_t * /* win */ , |
309 | static void geometry2sizehint (mywindow_t *win, const char *geom); |
310 | const char * /* geom */ ); |
|
|
311 | static void Create_Windows (int /* argc */ , |
310 | static void Create_Windows (int argc, char *argv[]); |
312 | char * /* argv */ []); |
|
|
313 | static void getXevent (); |
311 | static void getXevent (); |
314 | static void print_error (const char * /* fmt */ , ...); |
312 | static void print_error (const char *fmt, ...); |
315 | |
313 | |
316 | static void Draw_Window (mywindow_t * /* this_win */ , |
314 | static void Draw_Window (mywindow_t *this_win, int full_redraw); |
317 | int /* full_redraw */ ); |
|
|
318 | static void Reminder (); |
315 | static void Reminder (); |
319 | static void Next_Reminder (int /* update_only */ ); |
316 | static void Next_Reminder (int update_only); |
320 | |
317 | |
321 | /* Arguments for Next_Reminder() */ |
318 | /* Arguments for Next_Reminder() */ |
322 | #define REPLACE 0 |
319 | #define REPLACE 0 |
323 | #define UPDATE 1 |
320 | #define UPDATE 1 |
324 | |
321 | |
… | |
… | |
636 | |
633 | |
637 | /* |
634 | /* |
638 | * translate geometry string to appropriate sizehint |
635 | * translate geometry string to appropriate sizehint |
639 | */ |
636 | */ |
640 | static void |
637 | static void |
641 | geometry2sizehint (mywindow_t * win, const char *geom) |
638 | geometry2sizehint (mywindow_t *win, const char *geom) |
642 | { |
639 | { |
643 | int x, y, flags; |
640 | int x, y, flags; |
644 | unsigned int width, height; |
641 | unsigned int width, height; |
645 | |
642 | |
646 | /* copy in values */ |
643 | /* copy in values */ |
… | |
… | |
770 | } |
767 | } |
771 | |
768 | |
772 | static time_t |
769 | static time_t |
773 | mk_time (struct tm *tmval) |
770 | mk_time (struct tm *tmval) |
774 | { |
771 | { |
775 | return (tmval->tm_min + 60 * (tmval->tm_hour + 24 * (tmval->tm_mday + 31 * ((tmval->tm_mon + 1) + 12 * tmval->tm_year)))); |
772 | return (tmval->tm_min |
|
|
773 | + 60 * (tmval->tm_hour |
|
|
774 | + 24 * (tmval->tm_mday |
|
|
775 | + 31 * ((tmval->tm_mon + 1) |
|
|
776 | + 12 * tmval->tm_year)))); |
776 | } |
777 | } |
777 | |
778 | |
778 | #ifdef MAIL |
779 | #ifdef MAIL |
779 | static int |
780 | static int |
780 | MailAvailable () |
781 | MailAvailable () |
… | |
… | |
811 | * Redraw the whole window after an exposure or size change. |
812 | * Redraw the whole window after an exposure or size change. |
812 | * After a timeout, only redraw the hands. |
813 | * After a timeout, only redraw the hands. |
813 | * Provide reminder if needed. |
814 | * Provide reminder if needed. |
814 | *----------------------------------------------------------------------*/ |
815 | *----------------------------------------------------------------------*/ |
815 | static void |
816 | static void |
816 | Draw_Window (mywindow_t * W, int full_redraw) |
817 | Draw_Window (mywindow_t *W, int full_redraw) |
817 | { |
818 | { |
818 | static int savedDay = -1; |
819 | static int savedDay = -1; |
819 | |
820 | |
820 | time_t currentTime; |
821 | time_t currentTime; |
821 | struct tm *tmval; |
822 | struct tm *tmval; |