From: Bob Subject: Re: port borland to djgpp To: mmathews AT genesis DOT tiac DOT net (Mark Mathews) Date: Wed, 12 Apr 1995 18:34:46 -0500 (CDT) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu [snip the initial routines as i've no idea. you probably should check in the _go32 stuff or maybe dpmi stuff?] > > setmem > > Assigns a value to a range of memory > > Declaration: void setmem(void *dest, unsigned length, char value); have you tried memset()? is similar if not the same. it's also more portable. Borland has this as well. > > ltoa, ultoa > > - ltoa converts a long to a string > - ultoa converts an unsigned long to a string i had this problem myself. i think it might be because gcc considers ints to be longs instead of shorts as does borland. i think i saw an itoa(). this might do, otherwise, i'm using sprintf( %s, "%ld", (long) ); i had already made this change b4 i realized i had to change all of my int's to short int's. i didn't notice, but i wonder if there's a stoa for short 2 ascii? > > getcurdir > > Gets current directory for specified drive. > > Declaration: int getcurdir(int drive, char *directory); i think there's a getcwd() or something similar? im not sure how gcc handles DOS drive specs, but i know it uses standard unix notation for the paths, so '/' instead of '\'. this is also more portable. i think Borland has this as well. > getftime, setftime > > Gets or sets file date and time > > Declaration: > - int getftime(int handle, struct ftime *ftimep); > - int setftime(int handle, struct ftime *ftimep); dunno about this one. > > > filelength > > Gets file size in bytes > > Declaration: long filelength(int handle); im not sure about this one, but if all else fails, i'd do an lseek to the end of the file and then use the tell() command to find the length. this should work, tho i've not tried it w/ djgpp/gcc -- Robert Hollinger <-------------------------------------> 4B Chaucer Ln. > \ www- http://www.xnet.com/~bob / < Disclaimer: Streamwood, IL 60107 > \/\/ bob AT xnet DOT com \/\/ < 708-483-9391 <------------------------------------->I don't know her! "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV!"