www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/13/06:09:36

Message-Id: <199605130959.FAA13600@delorie.com>
Date: Mon, 13 May 96 12:42:14 LIT
From: Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT>
Subject: System header files
To: j DOT aldrich6 AT genie DOT com, DJGPP mailing list <djgpp AT delorie DOT com>
In-Reply-To: Your message of Sun, 12 May 96 00:17:00 UTC 0000

>
>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 -


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