From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug using Delay()... Date: Tue, 22 Apr 1997 09:55:01 -0400 Organization: Cornell University http://www.cornell.edu Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <335CC334.4862@cornell.edu> References: <335C96C2 DOT 369F AT csc DOT liv DOT ac DOT uk> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: cu-dialup-0027.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Daniel Johnson wrote: > > I recently came across an unusual bug, when running the following > program under > Windows 3.1 : > > #include > #include > > 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/ \ ~/ *******************************************************************