Re: [AD] Allegro and OpenWatcom |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> The attached patch silences all the warnings by defining AL_CONST for
> Watcom C version 11 or later.
Err... no, Glenn spotted another one. Updated patch attached.
--
Eric Botcazou
--- /cvs/allegro/include/allegro/platform/alwatcom.h Sat Nov 2 19:34:10 2002
+++ allegro/include/allegro/platform/alwatcom.h Fri Dec 13 17:14:00 2002
@@ -47,6 +47,7 @@
#define ALLEGRO_LFN 0
#if __WATCOMC__ >= 1100
+ #define AL_CONST const
#define ALLEGRO_MMX
#endif
--- /cvs/allegro/src/misc/modex.c Wed Oct 2 20:27:40 2002
+++ allegro/src/misc/modex.c Fri Dec 13 17:21:50 2002
@@ -1149,7 +1149,7 @@
*/
void _x_draw_rle_sprite(BITMAP *bmp, AL_CONST RLE_SPRITE *sprite, int x, int y)
{
- signed char *p = sprite->dat;
+ AL_CONST signed char *p = sprite->dat;
int c;
int x_pos, y_pos;
int lgap, width;
@@ -1253,7 +1253,7 @@
*/
void _x_draw_trans_rle_sprite(BITMAP *bmp, AL_CONST RLE_SPRITE *sprite, int x, int y)
{
- signed char *p = sprite->dat;
+ AL_CONST signed char *p = sprite->dat;
int c;
int x_pos, y_pos;
int lgap, width;
@@ -1359,7 +1359,7 @@
*/
void _x_draw_lit_rle_sprite(BITMAP *bmp, AL_CONST RLE_SPRITE *sprite, int x, int y, int color)
{
- signed char *p = sprite->dat;
+ AL_CONST signed char *p = sprite->dat;
int c;
int x_pos, y_pos;
int lgap, width;
@@ -1486,8 +1486,8 @@
*/
void _x_draw_glyph(BITMAP *bmp, AL_CONST FONT_GLYPH *glyph, int x, int y, int color, int bg)
{
- unsigned char *data = glyph->dat;
- unsigned char *dat;
+ AL_CONST unsigned char *data = glyph->dat;
+ AL_CONST unsigned char *dat;
unsigned long addr;
int w = glyph->w;
int h = glyph->h;
--- /cvs/allegro/src/misc/vbeaf.c Wed Oct 2 20:27:40 2002
+++ allegro/src/misc/vbeaf.c Fri Dec 13 20:58:22 2002
@@ -2653,7 +2653,7 @@
*/
static void vbeaf_draw_glyph(BITMAP *bmp, AL_CONST FONT_GLYPH *glyph, int x, int y, int color, int bg)
{
- unsigned char *data = glyph->dat;
+ AL_CONST unsigned char *data = glyph->dat;
int w = glyph->w;
int h = glyph->h;
int stride = (w+7)/8;
@@ -2700,7 +2700,7 @@
af_driver->PutMonoImage(af_driver, color, d,
x+bmp->x_ofs, y+bmp->y_ofs,
- stride, 0, 0, stride*8, h, data);
+ stride, 0, 0, stride*8, h, (unsigned char *)data);
af_driver->SetMix(af_driver, vbeaf_fg_mix, vbeaf_bg_mix);
);
--- /home/eric/cvs/allegro/docs/build/watcom.txt Fri Jul 5 12:23:46 2002
+++ allegro/docs/build/watcom.txt Fri Dec 13 18:08:51 2002
@@ -27,8 +27,8 @@
respect.
This library works with version 10.6 and the various 11.0 versions of the
- Watcom C compiler, except the latest one (11.0c) which can build the
- library but cannot link Allegro programs.
+ Watcom C compiler (except the original 11.0c version) as well as with
+ recent versions (0.85 or later) of the OpenWatcom C compiler.
@@ -36,7 +36,7 @@
============ Required software ============
===========================================
- - Watcom C, version 10.6 or 11.0 (but not 11.0c).
+ - Watcom C version 10.6 or 11.0, or OpenWatcom C version 0.85 or later.
- djgpp compiler (djdev*.zip, gcc*b.zip, and bnu*b.zip).
- GNU make (mak*b.zip).
- GNU sed (sed*b.zip):