Mail Archives: djgpp/1996/05/13/06:09:36
>
>BTW, doesn't Turbo C suck? I had a program that used ftruncate in
><unistd.h>, only to discover that TC has no such library and no such
>function.
>
It *definitely* does. Though it has the fn you needed. It's called chsize()
and acts eactly as ftruncate(). BTW, allthough BC/TC really suck, why not
have some compatibility with them, anyway? That would make porting DOS prgs
to DJGPP easier. For example, open() is declared only in <unistd.h>. I
personally am used to having open/close/read/write functions in <io.h>.
Would that break UNIX compatibility? I think not (#ifdefs could be used to
avoid multiple declarations). Also, I think DOS file attribute macros
_A_NORMAL etc. need their FA_... eauivalents defined, since Borland supports
both and there might be sources using FA_... (it looks nicer to me as well).
Plus, I think DOS specific file functions (_open, _close, _read, _write)
belong in <dos.h> (not sure how Borland does it). One reason might be that
macros for their arguments are #defined in <dos.h> so you would have to
#include it anyway. Or, alternatively, _A_... macros could be copied/moved
to <io.h>. Eli?
Martynas
P.S.: could someone recommend me a good free 256 color PCX editor?
- Raw text -