diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-06 15:31:58 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2001-12-06 15:31:58 +0000 |
commit | b7690e82bcaeb2a89279768c4e204f2954d63e0d (patch) | |
tree | 7297ef1937432deb3b3ff8a0074bbd5e0f70168f /main.c | |
parent | [w3m-dev 02619] (diff) | |
download | w3m-b7690e82bcaeb2a89279768c4e204f2954d63e0d.tar.gz w3m-b7690e82bcaeb2a89279768c4e204f2954d63e0d.zip |
[w3m-dev 02622]
From: Tsutomu Okada <okada@furuno.co.jp>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.32 2001/12/04 16:24:09 ukai Exp $ */ +/* $Id: main.c,v 1.33 2001/12/06 15:31:58 ukai Exp $ */ #define MAINPROGRAM #include "fm.h" #include <signal.h> @@ -858,8 +858,7 @@ MAIN(int argc, char **argv, char **envp) } else if (alarm_status == AL_IMPLICIT_DONE && alarm_buffer != Currentbuf) { - alarm_sec = 0; - alarm_status = AL_UNSET; + setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL); } if (alarm_sec > 0) { signal(SIGALRM, SigAlarm); @@ -4686,8 +4685,7 @@ SigAlarm(SIGNAL_ARG) } else if (alarm_status == AL_IMPLICIT_DONE && alarm_buffer != Currentbuf) { - alarm_sec = 0; - alarm_status = AL_UNSET; + setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL); } if (alarm_sec > 0) { signal(SIGALRM, SigAlarm); @@ -4722,7 +4720,7 @@ setAlarm(void) setAlarmEvent(sec, AL_EXPLICIT, cmd, getQWord(&data)); } else { - alarm_sec = 0; + setAlarmEvent(0, AL_UNSET, FUNCNAME_nulcmd, NULL); } displayBuffer(Currentbuf, B_NORMAL); } @@ -4730,14 +4728,12 @@ setAlarm(void) void setAlarmEvent(int sec, short status, int cmd, void *data) { - if (status == AL_EXPLICIT + if (status == AL_UNSET || status == AL_EXPLICIT || (status == AL_IMPLICIT && alarm_status != AL_EXPLICIT)) { alarm_sec = sec; alarm_status = status; alarm_event.cmd = cmd; alarm_event.user_data = data; - signal(SIGALRM, SigAlarm); - alarm(alarm_sec); } } #endif |