From: Dan Nelson Subject: Re: port borland to djgpp To: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp) Date: Wed, 12 Apr 1995 20:23:11 -0500 (CDT) in the last episode, Mark Mathews said: > > I' currently porting a Borland program called WADVIEW ( for DOOM) and I ran > into several Borland Functions that have no DJGPP equivalents. Can > somebody help me with the following: Side note: a new version of DEU has just been released. Edit Doom, Doom ][, and Heretic levels! > getvect, and setvect Try to code around these. A WAD viewer should not have to hook interrupts. > poke, pokeb > FP_OFF, FP_SEG, and MK_FP macros I'm assuming the program is trying to do some low-level DOS suff here; maybe updating the graphics screen directly? If you can, use a graphics library like libgrx. Otherwise, study and good luck. > setmem > Declaration: void setmem(void *dest, unsigned length, char value); use memset(char* dest,char val,int length). > > > ltoa, ultoa > > - ltoa converts a long to a string > - ultoa converts an unsigned long to a string use sprintf. > getcurdir > Gets current directory for specified drive. There is a similar function for djgpp called getcwd I believe, but it returns the current drive also. To find current directory on a specific drive letter D:, do a chdir("D:"), then a getcwd. > getftime, setftime > > Gets or sets file date and time Hmm. According to the man pages, these exist. I'm not on a DOS machine, so I can't tell for sure. If they don't, use stat()/utime() for reading and writing. > filelength > Declaration: long filelength(int handle); use stat(). -Dan Nelson // /\ /\/\ | (_, /\ Some people think MS-DOS is a \X/ necessary evil. They are wrong. dnelson AT xnet DOT com dan AT nccseq DOT noctrl DOT edu MS-DOS is *not* necessary.