mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
Moved MSC, int86 defines and bios.h include from curses.h to pdcdos.h;
moved _NAIVE_DOS_REGS define from gccdos.mak to pdcdos.h.
This commit is contained in:
13
curses.h
13
curses.h
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: curses.h,v 1.226 2006/09/21 08:38:26 wmcbrine Exp $ */
|
||||
/* $Id: curses.h,v 1.227 2006/09/21 16:09:33 wmcbrine Exp $ */
|
||||
|
||||
/*----------------------------------------------------------------------*
|
||||
* PDCurses *
|
||||
@@ -32,7 +32,6 @@ PDCurses definitions list: (Only define those needed)
|
||||
OS2 True if compiling for OS/2.
|
||||
WIN32 True if compiling for Windows.
|
||||
XCURSES True if compiling for X11.
|
||||
MSC True if using a Microsoft compiler.
|
||||
NOMACROS Don't use (most) macros in place of functions.
|
||||
|
||||
PDCurses portable platform definitions list:
|
||||
@@ -93,7 +92,6 @@ PDCurses portable platform definitions list:
|
||||
# pragma off(prototype_override_warnings)
|
||||
# ifdef __MSDOS__
|
||||
# define DOS 6 /* Major release of DOS supported */
|
||||
# include <bios.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -101,12 +99,10 @@ PDCurses portable platform definitions list:
|
||||
* MICROSOFT COMPILERS MSC
|
||||
*
|
||||
* Microsoft definitions:
|
||||
* MSC
|
||||
* DOS || OS2
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER /* defined by compiler */
|
||||
# define MSC 1
|
||||
# ifdef __OS2__ /* You will have to define in makefile */
|
||||
# define USE_OS2_H 1 /* Use the os2.h for the compiler */
|
||||
# define OS2 3 /* Major release of OS/2 supported */
|
||||
@@ -118,7 +114,6 @@ PDCurses portable platform definitions list:
|
||||
# endif
|
||||
# else
|
||||
# define DOS 6 /* Major release of DOS supported */
|
||||
# include <bios.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@@ -129,9 +124,7 @@ PDCurses portable platform definitions list:
|
||||
*/
|
||||
|
||||
#ifdef _QC /* defined by compiler */
|
||||
# define MSC 1
|
||||
# define DOS 6 /* Major release of DOS supported */
|
||||
# include <bios.h>
|
||||
#endif
|
||||
|
||||
/*----------------------------------------
|
||||
@@ -272,10 +265,6 @@ PDCurses portable platform definitions list:
|
||||
#ifdef __WATCOMC__
|
||||
# if defined(__DOS__) || defined(__DOS4G__)
|
||||
# define DOS 7 /* Major release of DOS supported */
|
||||
# ifdef __386__
|
||||
# define int86 int386
|
||||
# define int86x int386x
|
||||
# endif
|
||||
# endif
|
||||
# if defined(__OS2__) || defined(__OS2V2__)
|
||||
# define OS2 3 /* Major release of OS/2 supported */
|
||||
|
||||
@@ -37,7 +37,7 @@ else
|
||||
LDFLAGS =
|
||||
endif
|
||||
|
||||
CPPFLAGS = -I$(PDCURSES_HOME) -D_NAIVE_DOS_REGS -funsigned-char
|
||||
CPPFLAGS = -I$(PDCURSES_HOME) -funsigned-char
|
||||
|
||||
CCFLAGS = $(CFLAGS) $(CPPFLAGS)
|
||||
|
||||
|
||||
16
dos/pdcdos.h
16
dos/pdcdos.h
@@ -15,11 +15,19 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: pdcdos.h,v 1.14 2006/08/13 06:32:29 wmcbrine Exp $ */
|
||||
/* $Id: pdcdos.h,v 1.15 2006/09/21 16:09:34 wmcbrine Exp $ */
|
||||
|
||||
#define CURSES_LIBRARY 1
|
||||
#include <curses.h>
|
||||
|
||||
#if defined(_MSC_VER) || defined(_QC)
|
||||
# define MSC 1
|
||||
#endif
|
||||
|
||||
#if defined(__HIGHC__) || MSC
|
||||
# include <bios.h>
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* MEMORY MODEL SUPPORT:
|
||||
*
|
||||
@@ -62,6 +70,7 @@ extern unsigned pdc_video_seg;
|
||||
extern unsigned pdc_video_ofs;
|
||||
|
||||
#ifdef __DJGPP__ /* Note: works only in plain DOS... */
|
||||
# define _NAIVE_DOS_REGS
|
||||
# if DJGPP == 2
|
||||
# define _FAR_POINTER(s,o) ((((int)(s)) << 4) + ((int)(o)))
|
||||
# else
|
||||
@@ -82,6 +91,11 @@ extern unsigned pdc_video_ofs;
|
||||
#endif
|
||||
#define _FP_OFFSET(p) ((unsigned short)p & 0x000f)
|
||||
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
# define int86 int386
|
||||
# define int86x int386x
|
||||
#endif
|
||||
|
||||
#ifdef __DJGPP__
|
||||
unsigned char getdosmembyte(int offs);
|
||||
unsigned short getdosmemword(int offs);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <time.h>
|
||||
|
||||
RCSID("$Id: pdcutil.c,v 1.9 2006/08/23 09:06:16 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcutil.c,v 1.10 2006/09/21 16:09:34 wmcbrine Exp $");
|
||||
|
||||
void PDC_beep(void)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ void PDC_napms(int ms)
|
||||
|
||||
delay(ms);
|
||||
|
||||
# elif defined(MSC)
|
||||
# elif defined(_MSC_VER) || defined(_QC)
|
||||
{
|
||||
clock_t goal = (ms / 50) + clock();
|
||||
while (goal > clock())
|
||||
|
||||
Reference in New Issue
Block a user