Mercurial > emacs
comparison src/msdos.c @ 13520:8c7a3533a688
(dos_menubar_clock_displayed): New variable.
(check_timer): Erase the clock if it has been turned off.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 11 Nov 1995 23:48:29 +0000 |
parents | c4549fcdd5f3 |
children | 47484dd9a970 |
comparison
equal
deleted
inserted
replaced
13519:aee6ea2166bc | 13520:8c7a3533a688 |
---|---|
2339 | 2339 |
2340 #ifndef HAVE_SELECT | 2340 #ifndef HAVE_SELECT |
2341 #include "sysselect.h" | 2341 #include "sysselect.h" |
2342 | 2342 |
2343 static int last_ti_sec = -1; | 2343 static int last_ti_sec = -1; |
2344 static int dos_menubar_clock_displayed = 0; | |
2344 | 2345 |
2345 static void | 2346 static void |
2346 check_timer (t) | 2347 check_timer (t) |
2347 struct time *t; | 2348 struct time *t; |
2348 { | 2349 { |
2381 if (hour == 0) hour = 12; | 2382 if (hour == 0) hour = 12; |
2382 } | 2383 } |
2383 | 2384 |
2384 len = sprintf (clock_str, "%2d.%02d.%02d", hour, min, t->ti_sec); | 2385 len = sprintf (clock_str, "%2d.%02d.%02d", hour, min, t->ti_sec); |
2385 dos_direct_output (0, screen_size_X - len - 1, clock_str, len); | 2386 dos_direct_output (0, screen_size_X - len - 1, clock_str, len); |
2387 dos_menubar_clock_displayed = 1; | |
2388 } | |
2389 else if (dos_menubar_clock_displayed) | |
2390 { | |
2391 /* Erase last displayed time. */ | |
2392 dos_direct_output (0, screen_size_X - 9, " ", 8); | |
2393 dos_menubar_clock_displayed = 0; | |
2386 } | 2394 } |
2387 | 2395 |
2388 if (!NILP (Vdos_timer_hooks)) | 2396 if (!NILP (Vdos_timer_hooks)) |
2389 run_dos_timer_hooks++; | 2397 run_dos_timer_hooks++; |
2390 } | 2398 } |