Message-Id: <9809010939.AA16600@axe.bre.da> Subject: SIGALRM question / Text in Graphics mode To: djgpp AT delorie DOT com Date: Tue, 01 Sep 1998 11:39:13 METDST From: Jens Bischoff Precedence: bulk Hello, I have two questions: 1.) See this demo program: ---- #include #include static void sig_alarm (int sig) { static nr = 0; printf ("Seconds: %d\n", ++nr); #ifdef unix signal (SIGALRM, sig_alarm); #endif alarm (1); } int main () { int i = 1; if (SIG_ERR == signal (SIGALRM, sig_alarm)) { puts ("SIG_ERR!"); return 1; } alarm (1); while (' ' != getchar ()); return 0; } ---- The signal handler should normally be called every 1 second. But what happens is that it is called only after a key is pressed. Is this a bug or a feature with DJGPP? (By the way: Another stange behaviour occurs when I replace the whole line that contains the "while"-statement with a simple "while (1);": The program hangs (CTRL-C does not work, no output is shown), but a "while (1);" works then. Why this?!? 2. ) When in Standard-VGA graphics mode, text output will be displayed on the screen, too. How can this be done in VESA/Super-VGA modes (here the output is not shown) ? Any comment is welcome! Many thanks in advance Jens -- | | | Jens Bischoff | Daimler-Benz Aerospace Airbus | | ---- +-----------------+---------------------------------+ | | | Aerodynamic Data Department (EFD) | | Dasa Airbus | Huenefeldstrasse 1-5 D-28199 Bremen (Germany) |