commit 536b50828d486f224bdc21942c1fcc24ac3fa700
parent c86e645a39230786cf3eeb889a6de80ae64fa095
Author: ukai <ukai>
Date: Wed, 19 Dec 2001 16:24:21 +0000
[w3m-dev 02672]
From: Tsutomu Okada <okada@furuno.co.jp>
Diffstat:
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-20 Tsutomu Okada <okada@furuno.co.jp>
+
+ * [w3m-dev 02672]
+ * main.c (wrap_GC_warn_proc): msg_ring initial value
+ * main.c (SigAlarm): not need #ifdef USE_ALARM, already guarded
+
2001-12-18 Fumitoshi UKAI <ukai@debian.or.jp>
* [#493911] too few arguments to function `longjmp'
diff --git a/main.c b/main.c
@@ -162,26 +162,21 @@ static void
wrap_GC_warn_proc(char *msg, GC_word arg)
{
if (fmInitialized) {
- /* *INDENT-OFF* */
- static struct {
- char *msg;
- GC_word arg;
- } msg_ring[GC_WARN_KEEP_MAX] = {
- {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
- {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
- {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
- {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0}, {NULL, 0},
- };
- /* *INDENT-ON* */
+ /* *INDENT-OFF* */
+ static struct {
+ char *msg;
+ GC_word arg;
+ } msg_ring[GC_WARN_KEEP_MAX];
+ /* *INDENT-ON* */
static int i = 0;
static int n = 0;
static int lock = 0;
int j;
-
+
j = (i + n) % (sizeof(msg_ring) / sizeof(msg_ring[0]));
msg_ring[j].msg = msg;
msg_ring[j].arg = arg;
-
+
if (n < sizeof(msg_ring) / sizeof(msg_ring[0]))
++n;
else
@@ -4662,7 +4657,6 @@ SigAlarm(SIGNAL_ARG)
#endif
w3mFuncList[alarm_event.cmd].func();
onA();
-#ifdef USE_ALARM
if (alarm_status == AL_IMPLICIT) {
alarm_buffer = Currentbuf;
alarm_status = AL_IMPLICIT_DONE;
@@ -4675,7 +4669,6 @@ SigAlarm(SIGNAL_ARG)
signal(SIGALRM, SigAlarm);
alarm(alarm_sec);
}
-#endif
}
SIGNAL_RETURN;
}