Added a common pdcos2.h for OS/2, like pdcwin.h for Win32.

This commit is contained in:
William McBrine
2006-10-09 00:11:14 +00:00
parent f420d166bc
commit c0a01636cb
10 changed files with 67 additions and 65 deletions

View File

@@ -28,6 +28,8 @@ include $(PDCURSES_HOME)/libobjs.mif
osdir = $(PDCURSES_HOME)/os2
PDCURSES_OS2_H = $(osdir)/pdcos2.h
CC = gcc
ifeq ($(EMXVIDEO),Y)
@@ -121,11 +123,9 @@ panel.lib: panel.a
$(LIBOBJS) $(DLLOBJS) $(PDCOBJS) $(PDCDLOS) $(PANOBJS) $(DEMOOBJS) : \
$(PDCURSES_HEADERS)
$(PDCOBJS) : $(PDCURSES_OS2_H)
$(PANOBJS) ptest.o: $(PANEL_HEADER)
$(DEMOS) : $(LIBCURSES)
terminfo.o terminfo.dlo: $(TERM_HEADER)
$(LIBOBJS) : %.o: $(srcdir)/%.c

View File

@@ -25,6 +25,8 @@ O = obj
osdir = $(PDCURSES_HOME)\os2
PDCURSES_OS2_H = $(osdir)\pdcos2.h
CC = icc
!ifdef DEBUG
@@ -180,29 +182,29 @@ util.obj: $(srcdir)\util.c $(PDCURSES_HEADERS)
window.obj: $(srcdir)\window.c $(PDCURSES_HEADERS)
$(BUILD) $(srcdir)\window.c
pdcclip.obj: $(osdir)\pdcclip.c $(PDCURSES_HEADERS)
$(BUILD) $(osdir)\pdcclip.c
pdcdebug.obj: $(srcdir)\pdcdebug.c $(PDCURSES_HEADERS)
$(BUILD) $(srcdir)\pdcdebug.c
pdcdisp.obj: $(osdir)\pdcdisp.c $(PDCURSES_HEADERS)
pdcclip.obj: $(osdir)\pdcclip.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcclip.c
pdcdisp.obj: $(osdir)\pdcdisp.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcdisp.c
pdcgetsc.obj: $(osdir)\pdcgetsc.c $(PDCURSES_HEADERS)
pdcgetsc.obj: $(osdir)\pdcgetsc.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcgetsc.c
pdckbd.obj: $(osdir)\pdckbd.c $(PDCURSES_HEADERS)
pdckbd.obj: $(osdir)\pdckbd.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdckbd.c
pdcscrn.obj: $(osdir)\pdcscrn.c $(PDCURSES_HEADERS)
pdcscrn.obj: $(osdir)\pdcscrn.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcscrn.c
pdcsetsc.obj: $(osdir)\pdcsetsc.c $(PDCURSES_HEADERS)
pdcsetsc.obj: $(osdir)\pdcsetsc.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcsetsc.c
pdcutil.obj: $(osdir)\pdcutil.c $(PDCURSES_HEADERS)
pdcutil.obj: $(osdir)\pdcutil.c $(PDCURSES_HEADERS) $(PDCURSES_OS2_H)
$(BUILD) $(osdir)\pdcutil.c
#------------------------------------------------------------------------

View File

@@ -15,18 +15,12 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_DOS
# define INCL_WIN
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#include <stdlib.h>
#include <string.h>
RCSID("$Id: pdcclip.c,v 1.23 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcclip.c,v 1.24 2006/10/09 00:11:14 wmcbrine Exp $");
/*man-start**************************************************************

View File

@@ -15,15 +15,11 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#include <string.h>
RCSID("$Id: pdcdisp.c,v 1.37 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcdisp.c,v 1.38 2006/10/09 00:11:14 wmcbrine Exp $");
/*man-start**************************************************************

View File

@@ -15,15 +15,11 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#include <stdlib.h>
RCSID("$Id: pdcgetsc.c,v 1.28 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcgetsc.c,v 1.29 2006/10/09 00:11:14 wmcbrine Exp $");
/*man-start**************************************************************

View File

@@ -15,12 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#if defined(CURSES__32BIT__) || defined(__IBMC__) || defined(__TURBOC__)
# include <signal.h>
@@ -37,7 +32,7 @@ static int tahead = -1;
static KBDINFO kbdinfo; /* default keyboard mode */
#endif
RCSID("$Id: pdckbd.c,v 1.39 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdckbd.c,v 1.40 2006/10/09 00:11:14 wmcbrine Exp $");
/************************************************************************
* Table for key code translation of function keys in keypad mode *

33
os2/pdcos2.h Normal file
View File

@@ -0,0 +1,33 @@
/************************************************************************
* 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. *
* *
* No distribution of modified PDCurses code may be made under the name *
* "PDCurses", except by the current maintainer. (Although PDCurses is *
* public domain, the name is a trademark.) *
* *
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
/* $Id: pdcos2.h,v 1.1 2006/10/09 00:11:14 wmcbrine Exp $ */
#ifndef EMXVIDEO
# define INCL_DOS
# define INCL_DOSMISC
# define INCL_WIN
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
extern int pdc_font;
extern void PDC_get_keyboard_info(void);
extern void PDC_set_keyboard_default(void);

View File

@@ -15,16 +15,11 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_DOSMISC
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#include <stdlib.h>
RCSID("$Id: pdcscrn.c,v 1.51 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcscrn.c,v 1.52 2006/10/09 00:11:14 wmcbrine Exp $");
int pdc_font; /* default font size */

View File

@@ -15,15 +15,11 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#include <string.h>
RCSID("$Id: pdcsetsc.c,v 1.32 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcsetsc.c,v 1.33 2006/10/09 00:11:14 wmcbrine Exp $");
extern int pdc_font;

View File

@@ -15,12 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
#ifndef EMXVIDEO
# define INCL_VIO
# define INCL_KBD
# include <os2.h>
#endif
#include <curspriv.h>
#include "pdcos2.h"
#ifdef __EMX__
# include <stdlib.h>
@@ -30,7 +25,7 @@
APIRET APIENTRY DosSleep(ULONG ulTime);
#endif
RCSID("$Id: pdcutil.c,v 1.7 2006/10/08 20:54:30 wmcbrine Exp $");
RCSID("$Id: pdcutil.c,v 1.8 2006/10/09 00:11:14 wmcbrine Exp $");
void PDC_beep(void)
{