diff --git a/dosvga/pdcdos.h b/dosvga/pdcdos.h index f1db210a..52df4282 100644 --- a/dosvga/pdcdos.h +++ b/dosvga/pdcdos.h @@ -107,7 +107,9 @@ extern void PDC_private_cursor_on(int row, int col); # else # define _FAR_POINTER(s,o) (0xe0000000 + (((int)(s)) << 4) + ((int)(o))) # endif -# define _FP_SEG(p) (unsigned short)((((long)p) >> 4) & 0xffff) +# ifndef __WATCOMC__ +# define _FP_SEG(p) (unsigned short)((((long)p) >> 4) & 0xffff) +# endif #else # ifdef __TURBOC__ # define _FAR_POINTER(s,o) MK_FP(s,o) @@ -119,9 +121,14 @@ extern void PDC_private_cursor_on(int row, int col); # define _FAR_POINTER(s,o) (((long)s << 16) | (long)o) # endif # endif -# define _FP_SEG(p) (unsigned short)(((long)p) >> 4) +# ifndef __WATCOMC__ +# define _FP_SEG(p) (unsigned short)(((long)p) >> 4) +# endif +#endif + +#ifndef __WATCOMC__ +# define _FP_OFF(p) ((unsigned short)p & 0x000f) #endif -#define _FP_OFF(p) ((unsigned short)p & 0x000f) #ifdef __DJGPP__ # include diff --git a/tests/ripoff.c b/tests/ripoff.c index 9cd0a52e..9c434a6a 100644 --- a/tests/ripoff.c +++ b/tests/ripoff.c @@ -20,6 +20,10 @@ of this works very well in PDCurses.) */ #include +#ifdef __DMC__ + #define snprintf _snprintf +#endif + int ripoff_callback( WINDOW *win, int width) { char buff[100];