Re: [AD] Bloat Issues

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Grzegorz Adam Hankiewicz wrote:
> On Fri, 25 Feb 2000, Burton Radons wrote:
> > Why does this violation of modular segregation exist?
> 
> Historic reasons. IIRC Shawn stated that if he was meant to write _now_
> Allegro from scratch, he would have made Allegro more modular. But Allegro
> is now very big, and I think that the effort to rewrite it wouldn't be
> soooo terrifying useful to gain a few bytes.

Actually, _midi_constructor just sets two statics and returns.  That is
not a good enough reason or a strong enough tie.  The two statics should
be moved into allegro.c and set directly from there.

The other constructor is for initialising datafile types.  If
allegro_init can call it directly, then the constructor attribute use
makes Allegro behave differently on different systems.  It should be
turned to the simple call and the last of those dinosaur constructors
will be gone.

If users insist on playing with datafiles before calling allegro_init,
the datafile functions can have init calls at their tops.  It only costs
6 or 7 clocks if it fails and it's the only portable solution here.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/