Mercurial > hg > xemacs-beta
diff lib-src/wakeup.c @ 169:15872534500d r20-3b11
Import from CVS: tag r20-3b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:46:53 +0200 |
parents | ac2d302a0011 |
children | e11d67e05968 |
line wrap: on
line diff
--- a/lib-src/wakeup.c Mon Aug 13 09:45:48 2007 +0200 +++ b/lib-src/wakeup.c Mon Aug 13 09:46:53 2007 +0200 @@ -21,14 +21,10 @@ #endif #endif -void -main (argc, argv) - int argc; - char **argv; +int +main (int argc, char *argv[]) { int period = 60; - time_t when; - struct tm *tp; if (argc > 1) period = atoi (argv[1]); @@ -37,13 +33,15 @@ { /* Make sure wakeup stops when Emacs goes away. */ if (getppid () == 1) - exit (0); + return 0; printf ("Wake up!\n"); fflush (stdout); /* If using a period of 60, produce the output when the minute changes. */ if (period == 60) { + time_t when; + struct tm *tp; time (&when); tp = localtime (&when); sleep (60 - tp->tm_sec);