If the graphics-mode discrepancies described above are too awful for you to live with, it is possible in theory to disable the TurboC-provided graphics functions and instead to use alternate functions. (I've not actually tried any of this myself, so if you make it work I'd appreciate it if you could send me detailed instructions.) For example, there is a 2D graphics library called the GRX library ( by Csaba Biegl, Michael Goffioul, and Hartmut Schirmer). The GRX website does not advertise (or even mention) Turbo C compatibility. However, it contains quite a few functions of the same name (and, apparently, the same functionality) as Turbo C library functions. To find out more, download the library using the link above. After unpacking the tarball, you'll find the Borland replacement functions in the src/bgi directory, and information about them in the doc/readme.bgi file.
Disabling the graphics functions present in the TurboC library involves these steps:
- Edit the TurboC library's Makefile, remove the compiler switch "-DWITH_X", and rebuild the TurboC library.
- Eliminate the TurboC version of graphics.h from the system includes (probably /usr/include).
- Install GRX.
Realize that I have not really evaluated the GRX library, and so do not understand its ins and outs. For example, I don't know how many BGI functions it implements. I believe that the main advantage of GRX relative to TurboC is that in a system without X it can directly used the graphics controller. I believe that the main disadvantage of GRX relative to TurboC is that it is not integrated with the other non-graphics Turbo C functions like getch. Since the TurboC library's version of getch (for example) depends on the TurboC library's implementation of graphics functionality, it will not work properly with GRX.
No comments:
Post a Comment