aboutsummaryrefslogtreecommitdiffstats
path: root/src/atimer.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/atimer.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/atimer.c')
-rw-r--r--src/atimer.c39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/atimer.c b/src/atimer.c
index 3ef51522c31..46c333a9106 100644
--- a/src/atimer.c
+++ b/src/atimer.c
@@ -68,7 +68,7 @@ static void set_alarm (void);
68static void schedule_atimer (struct atimer *); 68static void schedule_atimer (struct atimer *);
69static struct atimer *append_atimer_lists (struct atimer *, 69static struct atimer *append_atimer_lists (struct atimer *,
70 struct atimer *); 70 struct atimer *);
71SIGTYPE alarm_signal_handler (); 71SIGTYPE alarm_signal_handler (int signo);
72 72
73 73
74/* Start a new atimer of type TYPE. TIME specifies when the timer is 74/* Start a new atimer of type TYPE. TIME specifies when the timer is
@@ -90,11 +90,7 @@ SIGTYPE alarm_signal_handler ();
90 to cancel_atimer; don't free it yourself. */ 90 to cancel_atimer; don't free it yourself. */
91 91
92struct atimer * 92struct atimer *
93start_atimer (type, time, fn, client_data) 93start_atimer (enum atimer_type type, struct timeval time, atimer_callback fn, void *client_data)
94 enum atimer_type type;
95 EMACS_TIME time;
96 atimer_callback fn;
97 void *client_data;
98{ 94{
99 struct atimer *t; 95 struct atimer *t;
100 96
@@ -159,8 +155,7 @@ start_atimer (type, time, fn, client_data)
159/* Cancel and free atimer TIMER. */ 155/* Cancel and free atimer TIMER. */
160 156
161void 157void
162cancel_atimer (timer) 158cancel_atimer (struct atimer *timer)
163 struct atimer *timer;
164{ 159{
165 int i; 160 int i;
166 161
@@ -199,8 +194,7 @@ cancel_atimer (timer)
199 result list. */ 194 result list. */
200 195
201static struct atimer * 196static struct atimer *
202append_atimer_lists (list1, list2) 197append_atimer_lists (struct atimer *list1, struct atimer *list2)
203 struct atimer *list1, *list2;
204{ 198{
205 if (list1 == NULL) 199 if (list1 == NULL)
206 return list2; 200 return list2;
@@ -221,8 +215,7 @@ append_atimer_lists (list1, list2)
221/* Stop all timers except timer T. T null means stop all timers. */ 215/* Stop all timers except timer T. T null means stop all timers. */
222 216
223void 217void
224stop_other_atimers (t) 218stop_other_atimers (struct atimer *t)
225 struct atimer *t;
226{ 219{
227 BLOCK_ATIMERS; 220 BLOCK_ATIMERS;
228 221
@@ -257,7 +250,7 @@ stop_other_atimers (t)
257 stop_other_atimers. */ 250 stop_other_atimers. */
258 251
259void 252void
260run_all_atimers () 253run_all_atimers (void)
261{ 254{
262 if (stopped_atimers) 255 if (stopped_atimers)
263 { 256 {
@@ -283,8 +276,7 @@ run_all_atimers ()
283/* A version of run_all_timers suitable for a record_unwind_protect. */ 276/* A version of run_all_timers suitable for a record_unwind_protect. */
284 277
285Lisp_Object 278Lisp_Object
286unwind_stop_other_atimers (dummy) 279unwind_stop_other_atimers (Lisp_Object dummy)
287 Lisp_Object dummy;
288{ 280{
289 run_all_atimers (); 281 run_all_atimers ();
290 return Qnil; 282 return Qnil;
@@ -294,7 +286,7 @@ unwind_stop_other_atimers (dummy)
294/* Arrange for a SIGALRM to arrive when the next timer is ripe. */ 286/* Arrange for a SIGALRM to arrive when the next timer is ripe. */
295 287
296static void 288static void
297set_alarm () 289set_alarm (void)
298{ 290{
299 if (atimers) 291 if (atimers)
300 { 292 {
@@ -330,8 +322,7 @@ set_alarm ()
330 already. */ 322 already. */
331 323
332static void 324static void
333schedule_atimer (t) 325schedule_atimer (struct atimer *t)
334 struct atimer *t;
335{ 326{
336 struct atimer *a = atimers, *prev = NULL; 327 struct atimer *a = atimers, *prev = NULL;
337 328
@@ -349,7 +340,7 @@ schedule_atimer (t)
349} 340}
350 341
351static void 342static void
352run_timers () 343run_timers (void)
353{ 344{
354 EMACS_TIME now; 345 EMACS_TIME now;
355 346
@@ -401,8 +392,7 @@ run_timers ()
401 SIGALRM. */ 392 SIGALRM. */
402 393
403SIGTYPE 394SIGTYPE
404alarm_signal_handler (signo) 395alarm_signal_handler (int signo)
405 int signo;
406{ 396{
407#ifndef SYNC_INPUT 397#ifndef SYNC_INPUT
408 SIGNAL_THREAD_CHECK (signo); 398 SIGNAL_THREAD_CHECK (signo);
@@ -420,7 +410,7 @@ alarm_signal_handler (signo)
420/* Call alarm_signal_handler for pending timers. */ 410/* Call alarm_signal_handler for pending timers. */
421 411
422void 412void
423do_pending_atimers () 413do_pending_atimers (void)
424{ 414{
425 if (pending_atimers) 415 if (pending_atimers)
426 { 416 {
@@ -435,8 +425,7 @@ do_pending_atimers ()
435 some systems like HPUX (see process.c). */ 425 some systems like HPUX (see process.c). */
436 426
437void 427void
438turn_on_atimers (on) 428turn_on_atimers (int on)
439 int on;
440{ 429{
441 if (on) 430 if (on)
442 { 431 {
@@ -449,7 +438,7 @@ turn_on_atimers (on)
449 438
450 439
451void 440void
452init_atimer () 441init_atimer (void)
453{ 442{
454 free_atimers = stopped_atimers = atimers = NULL; 443 free_atimers = stopped_atimers = atimers = NULL;
455 pending_atimers = 0; 444 pending_atimers = 0;