mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 07:45:21 +00:00
Moved functions from pdcgo32.c into util.c.
This commit is contained in:
@@ -69,8 +69,6 @@ demos: $(DEMOS)
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
PDCOBJS += pdcgo32.o
|
||||
|
||||
$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS)
|
||||
$(LIBEXE) $(LIBFLAGS) $@ $(LIBOBJS) $(PDCOBJS)
|
||||
|
||||
|
||||
@@ -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 <curspriv.h>
|
||||
#include <string.h>
|
||||
@@ -87,6 +87,7 @@ extern unsigned pdc_video_ofs;
|
||||
#define _FP_OFFSET(p) ((unsigned short)p & 0x000f)
|
||||
|
||||
#ifdef __DJGPP__
|
||||
# include <sys/movedata.h>
|
||||
unsigned char getdosmembyte(int offs);
|
||||
unsigned short getdosmemword(int offs);
|
||||
void setdosmembyte(int offs, unsigned char b);
|
||||
|
||||
@@ -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 <pc.h>
|
||||
#include <sys/movedata.h> /* 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);
|
||||
}
|
||||
@@ -15,11 +15,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DJGPP__
|
||||
# include <sys/movedata.h>
|
||||
#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 */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user