Prof A Olowofoyeku (The African Chief) wrote:
What kind of programs are these?
Games, demos, etc.
Well, in this case be happy if you get them to compile with non-BP at all. (Am I too pessimistic? ;-)
If they use CRT routines to work in a graphics context, this isn't portable anyway, and I suggest to change the programs to use the appropriate Graph calls directly. (As I said, unless they really do graphics *and* text I/O.)
Many of them use Readkey and/or Keypressed, ClrScr, Delay, and Sound/NoSound. Readkey and Keypressed are conditionally implemented in the Graph unit. Delay can be implemented using Grx. What I tried to do was to avoid using the real Crt unit by using things that are available in Grx.
As I said, I just needed to get these programs to compile (under Mingw) - and it is easier to create the graphcrt unit than to change all the source files. Indeed, I can still compile the code under BP, because graphcrt is only used when the compiler is GPC.
Perhaps such compatibility wrappers (i.e., for BP programs that `uses' CRT, but don't really *use* CRT ;-) for `ClrScr' and `Delay' (and perhaps dummies for `Sound' and `NoSound') can be added conditionally to the Graph unit as well. You might want to suggest this code to the GRX maintainers. (Of course, programs that really use both GRX and CRT need to turn off the conditional, just like they do now with `KeyPressed' etc.)
Frank