[fpc-devel] crt unit fix

Michael Van Canneyt michael at freepascal.org
Wed Mar 16 22:11:03 CET 2005

On Wed, 16 Mar 2005, Dr. Karl-Michael Schindler wrote:

> Hi,
> When I was at the crt unit, I noticed that a number procedures are small (less
> then 5 lines of code) and called only once. Some others are quite general like
> scrollregion, but called only once with one line. In my opinion the code would
> be better readable with some degree of "inlining" these procedures. Would you
> accept such a modest rewrite of the crt unit?

The code is usually separated out for porting purposes; it allows to {$ifdef}
an entire procedure instead of having {$ifdef } in the code itself.

What really needs to be done is to rewrite the CRT unit so it uses the video unit.
Then we would have only 1 CRT unit, and not 4, as now. The video unit offers a
cross-platform interface. When porting to a new platform, only video must be 
ported. Now both video and crt must be ported.


More information about the fpc-devel mailing list