Mail Archives: djgpp/1997/04/22/15:34:32
Daniel Johnson wrote:
>
> I recently came across an unusual bug, when running the following
> program under
> Windows 3.1 :
>
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(void) {
> delay(2500);
> exit(0);
> }
>
> It works fine when run under dos, but hangs the machine when run in a
> Windows dos box.
i don't have 3.x installed any more so i could not test it there. it
works fine under win 95, though. would including the correct prototype
(declared in dos.h) make any difference by any chance? if you compile
the code above using -Wall, you will see:
delayt.c:5: warning: implicit declaration of function `delay'
-- Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
*******************************************************************
- Raw text -