www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/05/05/01:58:16

Date: Wed, 5 May 1993 00:36 EST
From: "Wonkoo Kim, EE, U. of Pittsburgh" <WKIM AT vms DOT cis DOT pitt DOT edu>
Subject: djgpp(gcc) equivalents to some bcc/tcc functions
To: djgpp AT sun DOT soe DOT clarkson DOT EDU

I am converting my C program from bcc/tcc to djgpp/gcc, and I couldn't find 
the following functions in the djgpp/gcc: 
	fnsplit()	split dos filename into path, name, extensions ..
	coreleft()	determine the size of free memory
	filelength()	determine the file size
	getch()		read a char (doesn't need a return key)
Are there the equivalents or the similar functions to these in djgpp/gcc?
Or, do I have to write programs for these?  (Then, could you show some hints or 
examples?)

I would implement the function getch() as
char getch(void) { while(!kbhit()); return(getkey() & 0xff); }
Is this the best way to implement getch()?  No way by #define macro?

Thanks in advance.

Wonkoo Kim
EE, U. of Pittsburgh
wkim AT vms DOT cis DOT pitt DOT edu

- Raw text -


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