On Thu, 29 May 1997 15:41:28 -0400 (EDT) Pierre Phaneuf pp@dilu.ml.org 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
On Fri, 30 May 1997, The African Chief wrote:
[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.
Is the updated BPCOMPAT available?
Pierre Phaneuf
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense." - Edsger W. Dijkstra.
Hello, Pierre Phaneuf! You wrote:
On Fri, 30 May 1997, The African Chief wrote:
[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.
Is the updated BPCOMPAT available?
I am waiting until you finish your TStream stuff, and then we can release the result.
On Sun, 1 Jun 1997, A.A. Olowofoyeku wrote:
AFAIK the SYSTEM unit is now totally portable.
Is the updated BPCOMPAT available?
I am waiting until you finish your TStream stuff, and then we can release the result.
Well, it's just because SYSTEM.PAS doesn't compile correctly here, and instead of making it compile here, then give you the TStream stuff, then find out it doesn't work with *your* SYSTEM.PAS... So could you send me your SYSTEM.PAS please? :-)
Pierre Phaneuf
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense." - Edsger W. Dijkstra.