Re: [AD] Various fixes/improvements

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


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In reply to  (stickman2000@xxxxxxxxxx):
[snip]
>One question, misc/pckeys.c:322,23: shouldn't the && be ||? I'm 99% sure
>it should be ||.

It should indeed be || since KEY_MAX is a +ve integer (108 on my setup):

   if ((scancode < 0) && (scancode >= KEY_MAX))

should be changed to

   if ((scancode < 0) || (scancode >= KEY_MAX))

Unfortunately, gcc does not seem to issue a warning about this.

If this is not changed, Allegro will attempt to access outside an array
when passed invalid input - although it will probably only ever get
invalid input from client code anyway, which is a bug in the client code
:-)

>One more question, is there a patch program that makes this
>syncronization process more efficient?

Yes - there are two utilities that you will be interested in: GNU diff
and GNU patch. you don't say what platform you're using so I can't point
you in the right direction.

>makefile.all:123: replace with '@echo Installing...'
>makefile.all:124: insert $(MAKE) install
>makefile.all:132: replace with '@echo Installing...'
>makefile.all:133: insert $(MAKE) installall

About the makefile change: 'make' and 'make install' are two separate
commands for a reason. When making changes to the library, it would be
incredibly inconvenient if the library installed itself whenever you
typed 'make' to see how your changes are progressing.

Also, some users may not want Allegro to automatically install itself on
their system.

Given that, with your change, there is no easy way to just make Allegro
and not install it, and that without your change installation is just a
simple extra command (and in the readme file), I would suggest that the
current method of doing things is probably the most convenient. To back
me up, most other packages also require 'make' and 'make install' to be
issued separately :-)

Bye for now,
- -- 
Laurence Withers, lwithers@xxxxxxxxxx
                http://www.lwithers.demon.co.uk/

-----BEGIN PGP SIGNATURE-----
Version: PGPsdk version 1.7.1

iQA/AwUBOU94W3cA2AQvE3AZEQJvvwCgtN2Zsb1T0zcvxwi/q5bW0lRnTQ4AnAsi
BqZzXeKIBMb0puzbenDu/PhV
=9Qra
-----END PGP SIGNATURE-----



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