diff --git a/dos/gccdos.mak b/dos/gccdos.mak index f0ff99c3..c673393a 100644 --- a/dos/gccdos.mak +++ b/dos/gccdos.mak @@ -69,8 +69,6 @@ demos: $(DEMOS) #------------------------------------------------------------------------ -PDCOBJS += pdcgo32.o - $(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) $(LIBEXE) $(LIBFLAGS) $@ $(LIBOBJS) $(PDCOBJS) diff --git a/dos/pdcdos.h b/dos/pdcdos.h index c249f292..accc3568 100644 --- a/dos/pdcdos.h +++ b/dos/pdcdos.h @@ -11,7 +11,7 @@ * See the file maintain.er for details of the current maintainer. * ************************************************************************/ -/* $Id: pdcdos.h,v 1.24 2006/12/29 17:41:53 wmcbrine Exp $ */ +/* $Id: pdcdos.h,v 1.25 2006/12/29 18:36:35 wmcbrine Exp $ */ #include #include @@ -87,6 +87,7 @@ extern unsigned pdc_video_ofs; #define _FP_OFFSET(p) ((unsigned short)p & 0x000f) #ifdef __DJGPP__ +# include unsigned char getdosmembyte(int offs); unsigned short getdosmemword(int offs); void setdosmembyte(int offs, unsigned char b); diff --git a/dos/pdcgo32.c b/dos/pdcgo32.c deleted file mode 100644 index b6b3bccd..00000000 --- a/dos/pdcgo32.c +++ /dev/null @@ -1,45 +0,0 @@ -/************************************************************************ - * This file is part of PDCurses. PDCurses is public domain software; * - * you may use it for any purpose. This software is provided AS IS with * - * NO WARRANTY whatsoever. * - * * - * If you use PDCurses in an application, an acknowledgement would be * - * appreciated, but is not mandatory. If you make corrections or * - * enhancements to PDCurses, please forward them to the current * - * maintainer for the benefit of other users. * - * * - * See the file maintain.er for details of the current maintainer. * - ************************************************************************/ - -#include "pdcdos.h" - -RCSID("$Id: pdcgo32.c,v 1.12 2006/10/15 02:42:25 wmcbrine Exp $"); - -#include -#include /* prototypes of dosmemget() and dosmemput() */ - -unsigned char getdosmembyte(int offset) -{ - unsigned char b; - - dosmemget(offset, sizeof(unsigned char), &b); - return b; -} - -unsigned short getdosmemword(int offset) -{ - unsigned short w; - - dosmemget(offset, sizeof(unsigned short), &w); - return w; -} - -void setdosmembyte(int offset, unsigned char b) -{ - dosmemput(&b, sizeof(unsigned char), offset); -} - -void setdosmemword(int offset, unsigned short w) -{ - dosmemput(&w, sizeof(unsigned short), offset); -} diff --git a/dos/pdcscrn.c b/dos/pdcscrn.c index 2e03a524..6237359f 100644 --- a/dos/pdcscrn.c +++ b/dos/pdcscrn.c @@ -15,11 +15,7 @@ #include -#ifdef __DJGPP__ -# include -#endif - -RCSID("$Id: pdcscrn.c,v 1.76 2006/12/29 18:19:37 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.77 2006/12/29 18:36:35 wmcbrine Exp $"); int pdc_adapter; /* screen type */ int pdc_scrnmode; /* default screen mode */ diff --git a/dos/pdcutil.c b/dos/pdcutil.c index 634a6fb0..9c43373c 100644 --- a/dos/pdcutil.c +++ b/dos/pdcutil.c @@ -19,7 +19,7 @@ #include -RCSID("$Id: pdcutil.c,v 1.15 2006/12/29 18:19:37 wmcbrine Exp $"); +RCSID("$Id: pdcutil.c,v 1.16 2006/12/29 18:36:35 wmcbrine Exp $"); void PDC_beep(void) { @@ -71,6 +71,36 @@ const char *PDC_sysname(void) return "DOS"; } +#ifdef __DJGPP__ + +unsigned char getdosmembyte(int offset) +{ + unsigned char b; + + dosmemget(offset, sizeof(unsigned char), &b); + return b; +} + +unsigned short getdosmemword(int offset) +{ + unsigned short w; + + dosmemget(offset, sizeof(unsigned short), &w); + return w; +} + +void setdosmembyte(int offset, unsigned char b) +{ + dosmemput(&b, sizeof(unsigned char), offset); +} + +void setdosmemword(int offset, unsigned short w) +{ + dosmemput(&w, sizeof(unsigned short), offset); +} + +#endif + #if defined(__WATCOMC__) && defined(__386__) void PDC_dpmi_int(int vector, pdc_dpmi_regs *rmregs)