bpcompat-1.0.zip_(re)

Fri, 30 May 1997 10:25:16 +0100 (BST)


On Thu, 29 May 1997 15:41:28 -0400 (EDT) Pierre Phaneuf  wrote:

>> >Better make their functionality integrated in the units, 
>> 
>> I am not sure what this means. If it means writing the code for DOS
>> and CRT from the scratch, I wouldn't want to be the one to do that!
>
>No, but instead of putting the conio.h port with GPC, we could look what
>they do in their sources, port it to Pascal and put the port into a
>conio.pas unit or directly in the CRT unit...

That is what I meant - translating the C sources is not something
I would like to do. It would be fraught with difficulties anyway, because
presumably, the C sources themselves will be making calls to functions 
that are platform dependent.

>> AFAICS the unix version is not in the DOS version, otherwise I would
>> have used it (I tried to use only portable C functions in the SYSTEM 
>> unit). The problem is that itoa() exists in DJGPP and EMX (and perhaps
>> CYGWIN) but not in unix/Linux. If there is a function in the unix/Linux
>> C libraries that does the same thing, that function does not exist in 
>> DJGPP, so it cannot be used there. I cannot see any solution other
>> than an IFDEF here!
>
>It seems the portable way is to use sprintf(), but Peter suggest using
>WriteStr() instead, which is standard Extended Pascal, which will work
>same both with DJGPP, EMX and Unix!

Yes. I first changed it to use sprintf(), then after some correspondence 
with Peter, I have changed it to use WriteStr() instead. Other amendments
include;

[1] "_fmode" is now used only if "__MSDOS__" is defined
[2] the DPMI stuff is only used if "__DJGPP__" is defined. 
- which means that MemAvail() and MaxAvail() return zero in other
platforms.

AFAIK the  SYSTEM unit is now totally portable.

Does anyone know of any way (including portable C functions) to return 
the total available system memory, and the total free system memory?

Information of this kind would help in making MemAvail() and MaxAvail()
useful on platforms other than DJGPP. Thanks.

Best regards, The Chief 
Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant)
Author of:  Chief's Installer Pro v3.50 for Win16 and Win32.
Homepage:  http://ourworld.compuserve.com/homepages/African_Chief/
E-mail: laa12@cc.keele.ac.uk



The African Chief (laa12@cc.keele.ac.uk)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es