Mail Archives: djgpp/1997/02/27/00:22:18
Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote:
: Schuster writes:
: >I'm writting on a c++ program with Allegro. I switched to alleg22 beta
: >and now get a lot of warnings, cause the textout-function claims that
: >the char* argument should be "unsigned char* ". Why this change?
: >Is there any way to get rid of it or change it to the old way?
: I changed this while I was extending the font routines to support
: extended character sets, because the unsigned char type makes more sense
: for storing characters above 127. It never occured to me that this would
: break any code, but if it is a problem for people, it can easily be
: changed back. Opinions, anyone?
Hmm. The new type is more logical - I doubt that anyone needs to pass
negative numbers to the function, if it wasn't defined before anyway.
You could change it to "int" and allow for massive font expansion :)
You could define two versions, one signed and one unsigned, but this
wouldn't work in C programs, only in C++, and might be confusing to
some people.
You could make two separate functions, with slightly different names,
but again this could get confusing.
You could make a #define people could use before #including <allegro.h>
which changed the prototype for the function, but would this link
correctly?
If I were you, I think I'd make it an int, though.
--
George Foot <gfoot AT mc31 DOT merton DOT ox DOT ac DOT uk>
Merton College, Oxford.
- Raw text -