ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rclock.C
(Generate patch)

Comparing rxvt-unicode/src/rclock.C (file contents):
Revision 1.3 by root, Mon May 10 00:37:29 2021 UTC vs.
Revision 1.4 by root, Mon May 10 00:40:41 2021 UTC

134#define MAILUPDATE 60 134#define MAILUPDATE 60
135#define REMINDERS_TIME 10 135#define REMINDERS_TIME 10
136#define DEFER_TIME 3 136#define DEFER_TIME 3
137#define ADJUST_TIME 137#define ADJUST_TIME
138 138
139#define CENTURY 2000 / TODO: verify */ 139#define CENTURY 2000 /* TODO: verify */
140 140
141/*----------------------------------------------------------------------* 141/*----------------------------------------------------------------------*
142 * #define FONT_NAME "7x14" 142 * #define FONT_NAME "7x14"
143 * to define the font to be used for appointment reminders 143 * to define the font to be used for appointment reminders
144 * 144 *
278/* subroutine declarations */ 278/* subroutine declarations */
279static void geometry2sizehint (mywindow_t * /* win */ , 279static void geometry2sizehint (mywindow_t * /* win */ ,
280 const char * /* geom */ ); 280 const char * /* geom */ );
281static void Create_Windows (int /* argc */ , 281static void Create_Windows (int /* argc */ ,
282 char * /* argv */ []); 282 char * /* argv */ []);
283static void getXevent (void); 283static void getXevent ();
284static void print_error (const char * /* fmt */ , ...); 284static void print_error (const char * /* fmt */ , ...);
285 285
286static void Draw_Window (mywindow_t * /* this_win */ , 286static void Draw_Window (mywindow_t * /* this_win */ ,
287 int /* full_redraw */ ); 287 int /* full_redraw */ );
288static void Reminder (void); 288static void Reminder ();
289static void Next_Reminder (int /* update_only */ ); 289static void Next_Reminder (int /* update_only */ );
290 290
291/* Arguments for Next_Reminder() */ 291/* Arguments for Next_Reminder() */
292#define REPLACE 0 292#define REPLACE 0
293#define UPDATE 1 293#define UPDATE 1
294 294
295/*----------------------------------------------------------------------*/ 295/*----------------------------------------------------------------------*/
296 296
297static void 297static void
298usage (void) 298usage ()
299{ 299{
300 int i; 300 int i;
301 struct 301 struct
302 { 302 {
303 const char *const opt; 303 const char *const opt;
342 * Check out if we are using a maildir drop (qmail) 342 * Check out if we are using a maildir drop (qmail)
343 * Note: this changes mail_dir to hold the "new" diretory 343 * Note: this changes mail_dir to hold the "new" diretory
344 */ 344 */
345#ifdef MAIL 345#ifdef MAIL
346static void 346static void
347CheckMaildir (void) 347CheckMaildir ()
348{ 348{
349 struct stat st; 349 struct stat st;
350 char *buf, *p; 350 char *buf, *p;
351 351
352 if (!*mail_file || stat (mail_file, &st) || !S_ISDIR (st.st_mode)) 352 if (!*mail_file || stat (mail_file, &st) || !S_ISDIR (st.st_mode))
742static time_t 742static time_t
743mk_time (struct tm *tmval) 743mk_time (struct tm *tmval)
744{ 744{
745 return (tmval->tm_min + 60 * (tmval->tm_hour + 24 * (tmval->tm_mday + 31 * ((tmval->tm_mon + 1) + 12 * tmval->tm_year)))); 745 return (tmval->tm_min + 60 * (tmval->tm_hour + 24 * (tmval->tm_mday + 31 * ((tmval->tm_mon + 1) + 12 * tmval->tm_year))));
746} 746}
747
748 747
749#ifdef MAIL 748#ifdef MAIL
750static int 749static int
751MailAvailable () 750MailAvailable ()
752{ 751{
1403 1402
1404/* 1403/*
1405 * Provide reminder by mapping the message window 1404 * Provide reminder by mapping the message window
1406 */ 1405 */
1407static void 1406static void
1408Reminder (void) 1407Reminder ()
1409{ 1408{
1410 char *beg, *next; 1409 char *beg, *next;
1411 int lines; 1410 int lines;
1412 1411
1413 if (Msg_Mapped) 1412 if (Msg_Mapped)
1476 1475
1477/* 1476/*
1478 * Loops forever, looking for stuff to do. Sleeps 1 minute if nothing to do 1477 * Loops forever, looking for stuff to do. Sleeps 1 minute if nothing to do
1479 */ 1478 */
1480static void 1479static void
1481getXevent (void) 1480getXevent ()
1482{ 1481{
1483 XEvent ev; 1482 XEvent ev;
1484 int num_fds; /* number of file descriptors being used */ 1483 int num_fds; /* number of file descriptors being used */
1485 struct timeval tm; 1484 struct timeval tm;
1486 struct tm *tmval; 1485 struct tm *tmval;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines