diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/atimer.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-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.c | 39 |
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); | |||
| 68 | static void schedule_atimer (struct atimer *); | 68 | static void schedule_atimer (struct atimer *); |
| 69 | static struct atimer *append_atimer_lists (struct atimer *, | 69 | static struct atimer *append_atimer_lists (struct atimer *, |
| 70 | struct atimer *); | 70 | struct atimer *); |
| 71 | SIGTYPE alarm_signal_handler (); | 71 | SIGTYPE 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 | ||
| 92 | struct atimer * | 92 | struct atimer * |
| 93 | start_atimer (type, time, fn, client_data) | 93 | start_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 | ||
| 161 | void | 157 | void |
| 162 | cancel_atimer (timer) | 158 | cancel_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 | ||
| 201 | static struct atimer * | 196 | static struct atimer * |
| 202 | append_atimer_lists (list1, list2) | 197 | append_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 | ||
| 223 | void | 217 | void |
| 224 | stop_other_atimers (t) | 218 | stop_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 | ||
| 259 | void | 252 | void |
| 260 | run_all_atimers () | 253 | run_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 | ||
| 285 | Lisp_Object | 278 | Lisp_Object |
| 286 | unwind_stop_other_atimers (dummy) | 279 | unwind_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 | ||
| 296 | static void | 288 | static void |
| 297 | set_alarm () | 289 | set_alarm (void) |
| 298 | { | 290 | { |
| 299 | if (atimers) | 291 | if (atimers) |
| 300 | { | 292 | { |
| @@ -330,8 +322,7 @@ set_alarm () | |||
| 330 | already. */ | 322 | already. */ |
| 331 | 323 | ||
| 332 | static void | 324 | static void |
| 333 | schedule_atimer (t) | 325 | schedule_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 | ||
| 351 | static void | 342 | static void |
| 352 | run_timers () | 343 | run_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 | ||
| 403 | SIGTYPE | 394 | SIGTYPE |
| 404 | alarm_signal_handler (signo) | 395 | alarm_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 | ||
| 422 | void | 412 | void |
| 423 | do_pending_atimers () | 413 | do_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 | ||
| 437 | void | 427 | void |
| 438 | turn_on_atimers (on) | 428 | turn_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 | ||
| 451 | void | 440 | void |
| 452 | init_atimer () | 441 | init_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; |