Removed remnants of unfinished Unix port.

This commit is contained in:
William McBrine
2006-01-03 20:07:15 +00:00
parent c1d63d248b
commit 9e037c33e0
11 changed files with 17 additions and 280 deletions

View File

@@ -18,7 +18,7 @@
***************************************************************************
*/
/*
$Id: curses.h,v 1.63 2006/01/03 19:54:29 wmcbrine Exp $
$Id: curses.h,v 1.64 2006/01/03 20:07:12 wmcbrine Exp $
*/
/*
*----------------------------------------------------------------------
@@ -677,26 +677,6 @@ PDCurses portable platform definitions list:
# endif
#endif
#if 0
/*----------------------------------------
* gcc under UNIX
*
* GNU definitions:
* UNIX
*/
#ifdef UNIX
# define HAVE_PROTO 1 /* GNU C supports ANSI C prototypes */
# ifdef SUNOS
# define NO_VSSCANF
# define NO_MEMMOVE
# undef BSD
# endif
# ifdef linux
# undef BSD
# endif
#endif
#endif
/*----------------------------------------
* MicroWay NDP C/C++ 386 4.2.0 compiler
*/
@@ -2009,7 +1989,7 @@ int PDC_CDECL PDC_set_line_color Args(( short ));
#define wstandend(w) wattrset(w, A_NORMAL)
#define wstandout(w) wattrset(w, A_STANDOUT)
#if !defined(UNIX) && !defined(XCURSES)
#if !defined(XCURSES)
# define nocbreak() (SP->cbreak = FALSE, SP->delaytenths = 0, OK)
# define cbreak() (SP->cbreak = TRUE, OK)
# define nocrmode() (SP->cbreak = FALSE, OK)

View File

@@ -18,7 +18,7 @@
***************************************************************************
*/
/*
$Id: curspriv.h,v 1.14 2006/01/03 19:54:29 wmcbrine Exp $
$Id: curspriv.h,v 1.15 2006/01/03 20:07:14 wmcbrine Exp $
*/
/*
*
@@ -343,11 +343,6 @@ int PDC_get_scrn_mode Args(( void ));
int PDC_query_adapter_type Args(( void ));
# endif
# ifdef UNIX
int PDC_kbhit Args((void));
int PDC_setup_keys Args((void));
# endif
# ifdef WIN32
void PDC_doupdate Args((void));
# endif

View File

@@ -25,13 +25,8 @@
#include <panel.h>
#ifdef UNIX
#include <defs.h>
#include <term.h>
#endif
#ifdef PDCDEBUG
char *rcsid_panel = "$Id: panel.c,v 1.8 2005/12/14 19:40:29 wmcbrine Exp $";
char *rcsid_panel = "$Id: panel.c,v 1.9 2006/01/03 20:07:15 wmcbrine Exp $";
#endif

View File

@@ -23,11 +23,6 @@
#endif
#include <curses.h>
#ifdef UNIX
#include <defs.h>
#include <term.h>
#endif
/* undefine any macros for functions defined in this module */
#undef beep
#undef flash
@@ -38,7 +33,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_beep = "$Id: beep.c,v 1.3 2006/01/03 08:32:12 wmcbrine Exp $";
char *rcsid_beep = "$Id: beep.c,v 1.4 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -89,7 +84,7 @@ int PDC_CDECL beep()
PDC_beep();
return( OK );
return OK;
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -101,22 +96,15 @@ int PDC_CDECL flash()
{
PDC_LOG(("flash() - called\n"));
#ifdef UNIX
if (flash_screen != NULL)
putp(flash_screen);
return(OK);
#endif
#if defined(DOS) || defined(OS2) || defined(WIN32)
PDC_scroll(0, 0, LINES - 1, COLS - 1, 0, A_NORMAL);
napms( 50 );
PDC_scroll(0, 0, LINES - 1, COLS - 1, 0, A_REVERSE);
wrefresh(curscr);
return( OK );
#endif
#if defined(XCURSES)
XCursesInstructAndWait(CURSES_FLASH);
return( OK );
#endif
return OK;
}

View File

@@ -27,11 +27,6 @@
# include <string.h>
#endif
#ifdef UNIX
#include <defs.h>
#include <term.h>
#endif
/* undefine any macros for functions defined in this module */
#undef start_color
#undef init_pair
@@ -53,7 +48,7 @@ static int PDC_init_pair();
#endif
#ifdef PDCDEBUG
char *rcsid_color = "$Id: color.c,v 1.13 2006/01/03 07:34:43 wmcbrine Exp $";
char *rcsid_color = "$Id: color.c,v 1.14 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -322,14 +317,7 @@ int PDC_CDECL can_change_color()
{
PDC_LOG(("can_change_color() - called\n"));
#ifdef UNIX
if (can_change)
return(TRUE);
else
return(FALSE);
#else
return(FALSE);
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO

View File

@@ -39,7 +39,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_getch = "$Id: getch.c,v 1.11 2006/01/03 07:34:43 wmcbrine Exp $";
char *rcsid_getch = "$Id: getch.c,v 1.12 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -152,12 +152,7 @@ extern WINDOW* _getch_win_;
#endif
/* static chtype buffer[_INBUFSIZ];MH*/ /* character buffer */
static int buffer[_INBUFSIZ]; /* character buffer */
#ifdef UNIX
short display_key = 0400;
bool cbreak_set = FALSE;
#else
short display_key = 0x100;
#endif
int waitingtenths = 0;
PDC_LOG(("wgetch() - called\n"));
@@ -229,20 +224,6 @@ extern WINDOW* _getch_win_;
for(;;) /* loop for any buffering */
{
#ifdef UNIX
if (!(SP->raw_inp || SP->cbreak))
{
cbreak();
cbreak_set = TRUE;
}
if (w->_use_keypad)
key = PDC_sysgetch();
else
key = PDC_rawgetch();
if (cbreak_set)
nocbreak();
#endif
#if defined(DOS) || defined(OS2) || defined(WIN32)
if (SP->raw_inp)
{

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_getstr = "$Id: getstr.c,v 1.9 2006/01/03 07:34:43 wmcbrine Exp $";
char *rcsid_getstr = "$Id: getstr.c,v 1.10 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -213,24 +213,6 @@ int n;
if (win == (WINDOW *)NULL)
return (ERR);
#ifdef UNIX
/*
* this code is very dodgy
*
wrefresh(win);
while ((*str = wgetch(win)) != ERR && *str != '\n')
;
if (*str == ERR) {
*str = '\0';
waddstr(win,p);
return ERR;
}
*str = '\0';
waddstr(win,p);
return OK;
*/
#else
oldcbreak = SP->cbreak; /* remember states */
oldecho = SP->echo;
oldnodelay = win->_nodelay;
@@ -343,5 +325,4 @@ int n;
win->_nodelay = oldnodelay;
return (OK);
#endif
}

View File

@@ -27,12 +27,6 @@
#include <memory.h>
#endif
#ifdef UNIX
#define NOTLIB
#include <defs.h>
#include <term.h>
#endif
/* undefine any macros for functions defined in this module */
#undef initscr
#undef endwin
@@ -52,16 +46,8 @@
# undef wnoutrefresh
#endif
#ifdef UNIX
#define NOTLIB
#include <defs.h>
#include <term.h>
/* following is to stop compilation problems with #define of lines */
#undef lines
#endif
#ifdef PDCDEBUG
char *rcsid_initscr = "$Id: initscr.c,v 1.13 2006/01/03 19:54:29 wmcbrine Exp $";
char *rcsid_initscr = "$Id: initscr.c,v 1.14 2006/01/03 20:07:15 wmcbrine Exp $";
#else
char* _curses_notice = "PDCurses 2.2 - Public Domain 1994";
#endif
@@ -119,7 +105,7 @@ extern void efree(); /* user's efree(ptr) */
# endif
#endif
#if !defined(UNIX) && !defined(XCURSES)
#if !defined(XCURSES)
# ifdef HAVE_PROTO
extern void* malloc( size_t ); /* runtime's malloc(size) */
extern void* calloc( size_t, size_t ); /* runtime's calloc(num,size) */
@@ -283,12 +269,6 @@ register int i;
reallc = realloc;
}
#ifdef UNIX
setupterm((char *)0,1,(int *)0);
if (enter_ca_mode != NULL)
putp(enter_ca_mode);
#endif
#if defined (XCURSES)
if (XCursesInitscr(NULL,argc,argv) == ERR)
exit(7);
@@ -428,11 +408,7 @@ register int i;
SP->alive = TRUE;
#ifdef UNIX
PDC_setup_keys();
#else
def_shell_mode(); /* don't do this for UNIX as scropen has already changed things */
#endif
def_shell_mode();
return( stdscr );
}

View File

@@ -23,12 +23,6 @@
#endif
#include <curses.h>
#ifdef UNIX
#define NOTLIB
#include <defs.h>
#include <term.h>
#endif
/* undefine any macros for functions defined in this module */
#undef cbreak
#undef nocbreak
@@ -55,7 +49,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_inopts = "$Id: inopts.c,v 1.5 2006/01/03 07:41:49 wmcbrine Exp $";
char *rcsid_inopts = "$Id: inopts.c,v 1.6 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -207,21 +201,6 @@ int PDC_CDECL cbreak()
{
PDC_LOG(("cbreak() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
_CUR_TERM.prog_mode.c_lflag &= ~(ICANON);
_CUR_TERM.prog_mode.c_iflag &= ~(ICRNL);
/* _CUR_TERM.prog_mode.c_lflag |= ISIG;*/
_CUR_TERM.prog_mode.c_cc[VMIN] = 1;
_CUR_TERM.prog_mode.c_cc[VTIME] = 0;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM.prog_mode.sg_flags |= CBREAK;
ioctl(_CUR_TERM.fd, TIOCSETP, &_CUR_TERM.prog_mode);
#endif
#endif
SP->cbreak = TRUE;
return( OK );
}
@@ -235,16 +214,6 @@ int PDC_CDECL nocbreak()
{
PDC_LOG(("nocbreak() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
_CUR_TERM.prog_mode.c_lflag |= ICANON;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM->prog_mode.sg_flags &= ~CBREAK;
ioctl(_CUR_TERM.fd, TIOCSETP,&_CUR_TERM.prog_mode);
#endif
#endif
SP->cbreak = FALSE;
SP->delaytenths = 0;
return( OK );
@@ -259,16 +228,6 @@ int PDC_CDECL echo()
{
PDC_LOG(("echo() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
_CUR_TERM.prog_mode.c_lflag |= ECHOCTL|ECHOKE;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM.prog_mode.sg_flags |= ECHO;
ioctl(_CUR_TERM.fd, TIOCSETP, &_CUR_TERM.prog_mode);
#endif
#endif
SP->echo = TRUE;
return( OK );
}
@@ -282,16 +241,6 @@ int PDC_CDECL noecho()
{
PDC_LOG(("noecho() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
_CUR_TERM.prog_mode.c_lflag &= ~(ECHO|ECHOPRT);
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM.prog_mode.sg_flags &= ~ECHO;
ioctl(_CUR_TERM.fd, TIOCSETP, &_CUR_TERM.prog_mode);
#endif
#endif
SP->echo = FALSE;
return( OK );
}
@@ -425,26 +374,6 @@ int PDC_CDECL raw()
KbdInfo.fsMask &= ~KEYBOARD_ASCII_MODE;
KbdSetStatus(&KbdInfo,0);
# endif
#endif
#if defined( UNIX ) /* || defined( EMXVIDEO ) NOT COMPLETED */
#ifdef USE_TERMIO
#if 0
_CUR_TERM.prog_mode.c_lflag &= ~(ICANON|ISIG);
_CUR_TERM.prog_mode.c_iflag &= ~(INPCK|ISTRIP|IXON);
_CUR_TERM.prog_mode.c_oflag &= ~(OPOST);
_CUR_TERM.prog_mode.c_cc[VMIN] = 1;
_CUR_TERM.prog_mode.c_cc[VTIME] = 0;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#endif
_CUR_TERM.prog_mode.c_lflag &= ~(ICANON|ISIG);
_CUR_TERM.prog_mode.c_iflag &= ~(IXON);
_CUR_TERM.prog_mode.c_iflag |= ICRNL;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM.prog_mode.sg_flags |= RAW;
ioctl(_CUR_TERM.fd, TIOCSETP, &_CUR_TERM.prog_mode);
#endif
#endif
SP->raw_inp = TRUE;
@@ -475,23 +404,6 @@ int PDC_CDECL noraw()
KbdInfo.fsMask &= ~KEYBOARD_BINARY_MODE;
KbdSetStatus(&KbdInfo,0);
# endif
#endif
#if defined( UNIX ) /* || defined( EMXVIDEO ) NOT COMPLETE */
#ifdef USE_TERMIO
#if 0
_CUR_TERM.prog_mode.c_lflag |= ISIG|ICANON;
_CUR_TERM.prog_mode.c_iflag |= IXON|INPCK|ISTRIP;
_CUR_TERM.prog_mode.c_oflag |= OPOST;
_CUR_TERM.prog_mode.c_cc[VMIN] = _CUR_TERM.shell_mode.c_cc[VMIN];
_CUR_TERM.prog_mode.c_cc[VTIME] = _CUR_TERM.shell_mode.c_cc[VTIME];
#endif
_CUR_TERM.prog_mode.c_lflag |= ICANON;
ioctl(_CUR_TERM.fd, TCSETAW, &_CUR_TERM.prog_mode);
#else
_CUR_TERM.prog_mode.sg_flags &= ~RAW;
ioctl(_CUR_TERM.fd, TIOCSETP, &_CUR_TERM.prog_mode);
#endif
#endif
SP->raw_inp = FALSE;

View File

@@ -23,11 +23,6 @@
#endif
#include <curses.h>
#ifdef UNIX
#include <defs.h>
#include <term.h>
#endif
#include <stdio.h>
#include <string.h>
#include <limits.h>
@@ -48,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_termattr = "$Id: termattr.c,v 1.6 2006/01/03 19:54:29 wmcbrine Exp $";
char *rcsid_termattr = "$Id: termattr.c,v 1.7 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -157,15 +152,11 @@ int PDC_CDECL baudrate()
{
PDC_LOG(("baudrate() - called\n"));
#ifdef UNIX
return (_CUR_TERM.baudrate);
#else
#ifdef FAST_VIDEO
return (SP->direct_video ? INT_MAX : 19200 );
#else
return (19200); /* Approx. guess at BIOS speeds.*/
#endif
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -177,17 +168,7 @@ char PDC_CDECL erasechar()
{
PDC_LOG(("erasechar() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
ioctl(_CUR_TERM.fd, TCGETA, &_CUR_TERM.prog_mode);
return(_CUR_TERM.prog_mode.c_cc[VERASE]);
#else
ioctl(_CUR_TERM.fd, TIOCGETP, &_CUR_TERM.prog_mode.v6);
return(_CUR_TERM.prog_mode.v6.sg_erase);
#endif
#else
return( _ECHAR ); /* character delete char (^H) */
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -199,14 +180,7 @@ bool PDC_CDECL has_ic()
{
PDC_LOG(("has_ic() - called\n"));
#ifdef UNIX
if (insert_character != NULL && delete_character != NULL)
return(TRUE);
else
return(FALSE);
#else
return( TRUE );
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -218,14 +192,7 @@ bool PDC_CDECL has_il()
{
PDC_LOG(("has_il() - called\n"));
#ifdef UNIX
if (insert_line != NULL && delete_line != NULL)
return(TRUE);
else
return(FALSE);
#else
return( TRUE );
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -237,17 +204,7 @@ char PDC_CDECL killchar()
{
PDC_LOG(("killchar() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
ioctl(_CUR_TERM.fd, TCGETA, &_CUR_TERM.prog_mode);
return(_CUR_TERM.prog_mode.c_cc[VKILL]);
#else
ioctl(_CUR_TERM.fd, TIOCGETP, &_CUR_TERM.prog_mode.v6);
return(_CUR_TERM.prog_mode.v6.sg_kill);
#endif
#else
return( _DLCHAR ); /* line delete char (^U) */
#endif
}
/***********************************************************************/
#ifdef HAVE_PROTO
@@ -390,19 +347,5 @@ char PDC_CDECL wordchar()
{
PDC_LOG(("wordchar() - called\n"));
#ifdef UNIX
#ifdef USE_TERMIO
ioctl(_CUR_TERM.fd, TCGETA, &_CUR_TERM.prog_mode);
return(_CUR_TERM.prog_mode.c_cc[VWERASE]);
#else
#ifdef TIOCGLTC
ioctl(_CUR_TERM.fd, TIOCGLTC, &_CUR_TERM.prog_mode.bsd_new);
return(_CUR_TERM.prog_mode.bsd_new.t_werase);
#else
return(0);
#endif
#endif
#else
return (_DWCHAR); /* word delete char */
#endif
}

View File

@@ -48,7 +48,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_window = "$Id: window.c,v 1.7 2006/01/03 07:34:43 wmcbrine Exp $";
char *rcsid_window = "$Id: window.c,v 1.8 2006/01/03 20:07:15 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -226,9 +226,7 @@ extern void (*fre)();
}
}
}
#ifdef UNIX
PDC_gotoxy(begy, begx);
#endif
return( win );
}
/***********************************************************************/