PDC_putc() and PDC_putctty() are used only in DOS. I hesitated to remove

these for a long time, because, although they weren't used, they _could_
be used as part of a hypothetical implementation of terminfo functions.
But, if I ever get around to that, I can always pull them back in then.
This commit is contained in:
William McBrine
2006-07-28 09:24:40 +00:00
parent 050396f30b
commit edc3d4c825
6 changed files with 5 additions and 156 deletions

View File

@@ -15,7 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
/* $Id: curspriv.h,v 1.101 2006/07/23 19:10:32 wmcbrine Exp $ */
/* $Id: curspriv.h,v 1.102 2006/07/28 09:24:40 wmcbrine Exp $ */
/* CURSPRIV.H
@@ -101,8 +101,6 @@ void PDC_init_atrtab(void);
WINDOW *PDC_makenew(int, int, int, int);
int PDC_mouse_in_slk(int, int);
void PDC_napms(int);
int PDC_putc(chtype, chtype);
int PDC_putctty(chtype, chtype);
int PDC_rawgetch(void);
int PDC_reset_prog_mode(void);
int PDC_reset_shell_mode(void);

View File

@@ -15,7 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
/* $Id: pdcdos.h,v 1.2 2006/07/15 15:00:57 wmcbrine Exp $ */
/* $Id: pdcdos.h,v 1.3 2006/07/28 09:24:40 wmcbrine Exp $ */
#define CURSES_LIBRARY 1
#include <curses.h>
@@ -117,3 +117,4 @@ void movedata(unsigned, unsigned, unsigned, unsigned, unsigned);
#endif
int PDC_set_80x25(void);
int PDC_putctty(chtype, chtype);

View File

@@ -19,7 +19,7 @@
#include <curses.h>
#include <string.h>
RCSID("$Id: pdcdisp.c,v 1.29 2006/07/23 19:10:32 wmcbrine Exp $");
RCSID("$Id: pdcdisp.c,v 1.30 2006/07/28 09:24:40 wmcbrine Exp $");
extern unsigned char atrtab[MAX_ATRTAB];
@@ -54,84 +54,6 @@ int PDC_gotoyx(int row, int col)
return OK;
}
/*man-start**************************************************************
PDC_putc() - Output a character in the current attribute.
PDCurses Description:
This is a private PDCurses routine.
Outputs character 'chr' to screen in tty fashion. If a colour
mode is active, the character is written with colour 'colour'.
PDCurses Return Value:
This function returns OK on success and ERR on error.
Portability:
PDCurses int PDC_putc(chtype character, chtype color);
**man-end****************************************************************/
int PDC_putc(chtype character, chtype color)
{
int curRow = 0, curCol = 0;
#ifdef EMXVIDEO
char Cell[2];
#endif
PDC_LOG(("PDC_putc() - called: char=%c attrib=0x%x color=0x%x\n",
character & A_CHARTEXT, character & A_ATTRIBUTES, color));
PDC_get_cursor_pos(&curRow, &curCol);
#ifdef EMXVIDEO
Cell[0] = (char)character;
Cell[1] = (char)color;
v_putline(Cell, curCol, curRow, 1);
#else
VioWrtTTY((PCH)&character, 1, 0);
VioWrtNAttr((PBYTE)&color, 1, (USHORT)curRow, (USHORT)curCol, 0);
PDC_gotoyx(curRow, curCol);
#endif
return OK;
}
/*man-start**************************************************************
PDC_putctty() - Output a character and attribute in TTY fashion.
PDCurses Description:
This is a private PDCurses routine.
Outputs character 'chr' to screen in tty fashion. If a colour
mode is active, the character is written with colour 'colour'.
This function moves the physical cursor after writing so the
screen will scroll if necessary.
PDCurses Return Value:
This function returns OK on success and ERR on error.
Portability:
PDCurses int PDC_putctty(chtype character, chtype color);
**man-end****************************************************************/
int PDC_putctty(chtype character, chtype color)
{
int curRow=0, curCol=0;
PDC_LOG(("PDC_putctty() - called\n"));
PDC_get_cursor_pos(&curRow, &curCol);
#ifdef EMXVIDEO
v_attrib(color);
v_putc(character);
#else
VioWrtTTY((PCH)&character, 1, 0);
VioWrtNAttr((PBYTE)&color, 1, (USHORT)curRow, (USHORT)curCol, 0);
#endif
return OK;
}
/*man-start**************************************************************
PDC_transform_line() - display a physical line of the screen

View File

@@ -285,8 +285,6 @@ EXPORTS PDC_get_key_modifiers
EXPORTS PDC_get_font
EXPORTS PDC_get_rows
EXPORTS PDC_makenew
EXPORTS PDC_putc
EXPORTS PDC_putctty
EXPORTS PDC_query_adapter_type
EXPORTS PDC_rawgetch
EXPORTS PDC_scr_close

View File

@@ -278,8 +278,6 @@ PDC_get_key_modifiers
PDC_get_font
PDC_get_rows
PDC_makenew
PDC_putc
PDC_putctty
PDC_query_adapter_type
PDC_rawgetch
PDC_scr_close

View File

@@ -24,7 +24,7 @@
extern HANDLE hConOut;
extern unsigned char atrtab[MAX_ATRTAB];
RCSID("$Id: pdcdisp.c,v 1.28 2006/07/23 19:10:32 wmcbrine Exp $");
RCSID("$Id: pdcdisp.c,v 1.29 2006/07/28 09:24:40 wmcbrine Exp $");
/*man-start**************************************************************
@@ -60,74 +60,6 @@ int PDC_gotoyx(int row, int col)
return OK;
}
/*man-start**************************************************************
PDC_putc() - Output a character in the current attribute.
PDCurses Description:
This is a private PDCurses routine.
Outputs character 'chr' to screen in tty fashion. If a colour
mode is active, the character is written with colour 'colour'.
PDCurses Return Value:
This function returns OK on success and ERR on error.
Portability:
PDCurses int PDC_putc(chtype character, chtype color);
**man-end****************************************************************/
int PDC_putc(chtype character, chtype color)
{
int curRow, curCol;
TCHAR buffer;
COORD coord;
DWORD written;
PDC_LOG(("PDC_putc() - called:char=%c attrib=0x%x color=0x%x\n",
character & A_CHARTEXT, character & A_ATTRIBUTES, color));
PDC_get_cursor_pos(&curRow, &curCol);
coord.X = curCol;
coord.Y = curRow;
#if 0
buffer = color;
WriteConsoleOutputAttribute(hConOut, &buffer, 1, coord, &written);
#endif
buffer = character;
WriteConsoleOutputCharacter(hConOut, &buffer, 1, coord, &written);
return OK;
}
/*man-start**************************************************************
PDC_putctty() - Output a character and attribute in TTY fashion.
PDCurses Description:
This is a private PDCurses routine.
Outputs character 'chr' to screen in tty fashion. If a colour
mode is active, the character is written with colour 'colour'.
This function moves the physical cursor after writing so the
screen will scroll if necessary.
PDCurses Return Value:
This function returns OK on success and ERR on error.
Portability:
PDCurses int PDC_putctty(chtype character, chtype color);
**man-end****************************************************************/
int PDC_putctty(chtype character, chtype color)
{
return PDC_putc(character, color);
}
/*man-start**************************************************************
PDC_transform_line() - display a physical line of the screen