Mercurial > emacs
view lib-src/=wakeup.c @ 23339:2da87b489590
(check_composing_code): Fix previous change. Now it
alwasy returns 0 or -1.
(decode_coding_iso2022): Adjusted for the above change.
(encode_coding_iso2022): When encoding the last block, flush out
tailing garbage bytes.
(setup_coding_system): Delete unnecessary code.
(shrink_decoding_region): Check translation table. If ASCII
should be translated, give up shrinking.
(shrink_encoding_region): Likewise.
(SHRINK_CONVERSION_REGION_THRESHHOLD): New macro.
(SHRINK_CONVERSION_REGION): New macro.
(code_convert_region): Call SHRINK_CONVERSION_REGION. Delete text
properties here.
(code_convert_region): In the case of encoding, always calulate
correct character number.
(code_convert_string): Call SHRINK_CONVERSION_REGION.
(code_convert_region1): Don't delete text properties here.
(check_composing_code): Fix previous change. Now it
alwasy returns 0 or -1.
(decode_coding_iso2022): Adjusted for the above change.
(encode_coding_iso2022): When encoding the last block, flush out
tailing garbage bytes.
(setup_coding_system): Delete unnecessary code.
(shrink_decoding_region): Check translation table. If ASCII
should be translated, give up shrinking.
(shrink_encoding_region): Likewise.
(SHRINK_CONVERSION_REGION_THRESHHOLD): New macro.
(SHRINK_CONVERSION_REGION): New macro.
(code_convert_region): Call SHRINK_CONVERSION_REGION. Delete text
properties here.
(code_convert_region): In the case of encoding, always calulate
correct character number.
(code_convert_string): Call SHRINK_CONVERSION_REGION.
(code_convert_region1): Don't delete text properties here.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 28 Sep 1998 11:52:53 +0000 |
parents | f41d9619ffc4 |
children |
line wrap: on
line source
/* Program to produce output at regular intervals. */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <sys/types.h> #ifdef TIME_WITH_SYS_TIME #include <sys/time.h> #include <time.h> #else #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #else #include <time.h> #endif #endif struct tm *localtime (); void main (argc, argv) int argc; char **argv; { int period = 60; time_t when; struct tm *tp; if (argc > 1) period = atoi (argv[1]); while (1) { /* Make sure wakeup stops when Emacs goes away. */ if (getppid () == 1) exit (0); printf ("Wake up!\n"); fflush (stdout); /* If using a period of 60, produce the output when the minute changes. */ if (period == 60) { time (&when); tp = localtime (&when); sleep (60 - tp->tm_sec); } else sleep (period); } }