delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/25/00:46:48

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bioskey and Turbo C
Date: Thu, 23 Apr 1998 23:47:24 -0400
Organization: Two pounds of chaos and a pinch of salt.
Lines: 26
Message-ID: <35400B4C.3533@cs.com>
References: <353fae6c DOT 6448359 AT news DOT ncf DOT carleton DOT ca>
NNTP-Posting-Host: ppp241.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Pierre A. Dagenais wrote:
> 
> #ifdef TURBOC
>     k.i = bioskey(0);
> #endif
> 
>  I have a program that compile ok with turboc but acts very strange
> when compiled with DJGPP. The display waits for the enter key to be
> pressed before it shows the prompt. Does anyone know of a difference
> between tc bioskey and djgpp bioskey functions. How to modify so it
> runs as expected?

Read chapter 9.4 of the DJGPP Frequently Asked Questions list.  You're
mixing stdio and conio functions, which is never guaranteed to work as
expected.  The fact that it does on Turbo C is a coincidence.

For a quick and dirty solution, insert fflush(stdout) after every stdio
output call that is followed by a conio function.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "A generation which ignores history  |
|       aka Fighteer I       | has no past--and no future."         |
|   mailto:fighteer AT cs DOT com   |                                      |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019