Mercurial > hg > xemacs-beta
annotate lib-src/wakeup.c @ 4451:e214ff9f9507
Use char-tables, not vectors, to instantiate the display table specifiers.
2007-07-21 Aidan Kehoe <kehoea@parhasard.net>
* mule/cyril-util.el:
* mule/cyril-util.el (cyrillic-encode-koi8-r-char): Removed.
* mule/cyril-util.el (cyrillic-encode-alternativnyj-char):
Removed. No-one uses these functions in google.com/codesearch,
GNU have a comment doubting their utility, and their
implementation is trivial.
* mule/cyril-util.el (cyrillic-language-alist):
Reformatted.
* mule/cyril-util.el (standard-display-table)): Removed. It wasn't
used anyway.
* mule/cyril-util.el (standard-display-cyrillic-translit):
Rewrite it to work with character tables as display tables, and
not to abort with an error.
2007-07-21 Aidan Kehoe <kehoea@parhasard.net>
* disp-table.el:
* disp-table.el (make-display-table): Moved earlier in the file in
a weak attempt at making syncing with GNU easier.
* disp-table.el (frob-display-table):
Autoload it, accept TAG-SET, for editing specifiers.
* disp-table.el (describe-display-table):
Have it handle character sets.
* disp-table.el (standard-display-8bit-1):
* disp-table.el (standard-display-8bit):
* disp-table.el (standard-display-default-1):
* disp-table.el (standard-display-ascii):
* disp-table.el (standard-display-g1):
* disp-table.el (standard-display-graphic):
* disp-table.el (standard-display-underline):
* disp-table.el (standard-display-european):
Rework them all to use put-char-table, remove-char-table instead
of aset. Limit standard-display-g1, standard-display-graphic to
TTYs; have standard-display-underline work on X11 too.
* font.el (font-caps-display-table):
Use put-char-table instead of aset when editing a display table.
* x-init.el:
* x-init.el (tab):
Create the initial display table as a char-table, not a vector.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 24 Dec 2007 20:22:08 +0100 |
parents | abe6d1db359e |
children |
rev | line source |
---|---|
428 | 1 /* Program to produce output at regular intervals. */ |
2 | |
438 | 3 #include <config.h> |
428 | 4 |
5 #if __STDC__ || defined(STDC_HEADERS) | |
6 #include <stdlib.h> | |
442 | 7 #ifdef HAVE_UNISTD_H |
428 | 8 #include <unistd.h> |
9 #endif | |
442 | 10 #endif |
428 | 11 |
12 #include <stdio.h> | |
13 #include <sys/types.h> | |
14 | |
442 | 15 #ifdef WIN32_NATIVE |
428 | 16 #define WIN32_LEAN_AND_MEAN |
17 #include <windows.h> | |
18 #undef sleep | |
19 #define sleep(t) Sleep ((t) * 1000) | |
20 #define getppid() (0) | |
21 #undef HAVE_SYS_TIME_H | |
442 | 22 #endif /* WIN32_NATIVE */ |
428 | 23 |
24 #ifdef TIME_WITH_SYS_TIME | |
25 #include <sys/time.h> | |
26 #include <time.h> | |
27 #else | |
28 #ifdef HAVE_SYS_TIME_H | |
29 #include <sys/time.h> | |
30 #else | |
31 #include <time.h> | |
32 #endif | |
33 #endif | |
34 | |
35 int | |
36 main (int argc, char *argv[]) | |
37 { | |
38 int period = 60; | |
39 | |
40 if (argc > 1) | |
41 period = atoi (argv[1]); | |
42 | |
43 while (1) | |
44 { | |
45 /* Make sure wakeup stops when Emacs goes away. */ | |
46 if (getppid () == 1) | |
47 return 0; | |
48 printf ("Wake up!\n"); | |
49 /* If fflush fails, then our stdout pipe is broken. */ | |
50 if (fflush (stdout) != 0) | |
51 return 0; | |
52 /* If using a period of 60, produce the output when the minute | |
53 changes. */ | |
54 if (period == 60) | |
55 { | |
56 time_t when; | |
57 struct tm *tp; | |
58 time (&when); | |
59 tp = localtime (&when); | |
60 sleep (60 - tp->tm_sec); | |
61 } | |
62 else | |
63 sleep (period); | |
64 } | |
65 } |