c_strbeg, PDC_backchar(), PDC_chg_attr_pair() not used.

This commit is contained in:
William McBrine
2006-01-22 20:34:30 +00:00
parent bd460a11fb
commit de468bd940
3 changed files with 3 additions and 212 deletions

View File

@@ -18,7 +18,7 @@
***************************************************************************
*/
/*
$Id: curspriv.h,v 1.19 2006/01/22 20:28:05 wmcbrine Exp $
$Id: curspriv.h,v 1.20 2006/01/22 20:34:30 wmcbrine Exp $
*/
/*
*
@@ -230,9 +230,6 @@ extern char c_printscanbuf[]; /* buffer used during I/O */
/* tracing flag */
extern bool trace_on;
/* Strget stuff */
extern char* c_strbeg;
/* Monitor (terminal) type information */
#define _NONE 0x00
@@ -267,7 +264,6 @@ extern char* c_strbeg;
#endif
void PDC_beep Args(( void ));
int PDC_backchar Args(( WINDOW*, char*, int* ));
bool PDC_breakout Args(( void ));
int PDC_chadd Args(( WINDOW*, chtype, bool, bool ));
bool PDC_check_bios_key Args(( void ));

View File

@@ -48,7 +48,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_initscr = "$Id: initscr.c,v 1.18 2006/01/15 11:21:40 wmcbrine Exp $";
char *rcsid_initscr = "$Id: initscr.c,v 1.19 2006/01/22 20:34:30 wmcbrine Exp $";
#else
char *_curses_notice = "PDCurses 2.7b - Public Domain 2006";
#endif
@@ -92,11 +92,6 @@ struct cttyset c_save_trm = {0};
*/
char c_printscanbuf[513]; /* buffer used during I/O */
/*
* Global definitions for strget routines
*/
char *c_strbeg;
#if EMALLOC
# ifdef HAVE_PROTO
extern void *emalloc( size_t );

View File

@@ -34,7 +34,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.13 2006/01/13 01:17:59 wmcbrine Exp $";
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.14 2006/01/22 20:34:30 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -320,206 +320,6 @@ WINDOW *win;
wsyncup(win);
}
/*man-start*********************************************************************
PDC_backchar() - Visually erase character in window
PDCurses Description:
This is a private PDCurses function
This routine will visually erase a character. It is called by
the PDCurses character I/O routines.
PDCurses Return Value:
This routine will return OK upon success and otherwise ERR will
be returned.
PDCurses Errors:
It is an error to pass a NULL WINDOW pointer.
Portability:
PDCurses int PDC_backchar(WINDOW *w, char *ch, int *len);
**man-end**********************************************************************/
#ifdef THESE_FUNCTIONS_ARENT_USED
/***********************************************************************/
#ifdef HAVE_PROTO
int PDC_backchar(WINDOW *w, char *ch, int *len)
#else
int PDC_backchar(w, ch, len)
WINDOW *w;
char *ch;
int *len;
#endif
/***********************************************************************/
{
int nbs = 0;
int x = w->_curx;
int ts = w->_tabsize;
chtype s = (w->_y[w->_cury][x - 1] & CHR_MSK);
char *p = c_strbeg;
bool save_raw_out = SP->raw_out;
PDC_LOG(("PDC_backchar() - called\n"));
if (w == (WINDOW *)NULL)
return ERR;
(*len)--; /* Now we are zero relative */
(*len)--; /* Now we are looking at the previous character */
if (*len >= 0)
{
nbs++;
/* Determine number of characters to erase */
/* ctrl-char has size 2 */
if ((ch[*len] < ' ') || (s == 0x7f))
{
nbs++;
(*len)--;
}
/* tabs are very special */
if ((*len >= 0) && (ch[*len] == '\t'))
{
for (; p < ch; p++)
{
if (*p == '\t')
x = ((x / ts) + 1) * ts;
else
{
if ((*p < ' ') || (*p == 0x7f))
x += 2;
else
x++;
}
/* go to next line? */
if (x >= w->_maxx)
x = 0;
}
if (!(w->_curx))
nbs = w->_maxx - x;
else
nbs = w->_curx - x;
}
}
if (*len < 0)
{
beep();
*len = 0;
}
/* Erase the characters and update */
SP->raw_out = FALSE; /* ensure backspace handled in xlat mode */
while (nbs-- > 0)
{
if (w->_curx > 0)
{
/* waddstr(w, "\b \b"); */
mvwaddch(w, w->_cury, w->_curx - 1, ' ');
wmove(w, w->_cury, w->_curx - 1);
}
else if (w->_cury)
{
mvwaddch(w, w->_cury - 1, w->_maxx - 1, ' ');
wmove(w, w->_cury - 1, w->_maxx - 1);
}
}
ch[*len] = '\0';
SP->raw_out = save_raw_out;
wrefresh(w);
return OK;
}
/*man-start*********************************************************************
PDC_chg_attr_pair() - Writes character and attribute to physical screen
PDCurses Description:
This is a private PDCurses function.
Writes a single character 'chr' with attribute 'attr' to the
current cursor location.
NOTE: Though passed as 16 bit quantities, only the lower 8 bits
will be used to create a character/attribute pair.
PDCurses Return Value:
This function returns OK on success and ERR on error.
PDCurses Errors:
No errors are defined for this function under DOS.
Portability:
PDCurses int PDC_chg_attr_pair(chtype chr, chtype attr);
**man-end**********************************************************************/
/***********************************************************************/
#ifdef HAVE_PROTO
int PDC_chg_attr_pair(chtype chr, chtype attr)
#else
int PDC_chg_attr_pair(chr, attr)
chtype chr;
chtype attr;
#endif
/***********************************************************************/
{
extern unsigned char atrtab[MAX_ATRTAB];
int phys_attr = chtype_attr(attr);
#ifdef OS2
# ifdef EMXVIDEO
int curCol, curRow,cell;
# else
USHORT curCol, curRow, cell;
# endif
#endif
PDC_LOG(("PDC_chg_attr_pair() - called\n"));
#if defined(DOS)
regs.h.ah = 0x09;
regs.h.al = chr & A_CHARTEXT;
regs.h.bh = SP->video_page;
regs.h.bl = (char)(phys_attr >> 8);
# ifdef WATCOMC
regs.w.cx = 0x01;
# else
regs.x.cx = 0x01;
# endif
int86(0x10, &regs, &regs);
#elif defined(OS2)
/* find the current cursor position */
# ifdef EMXVIDEO
cell = (int)((chr & A_CHARTEXT) | phys_attr);
v_getxy (&curCol, &curRow);
v_putline ((char*)&cell, curCol, curRow, 1);
# else
cell = (USHORT)((chr & A_CHARTEXT) | phys_attr);
VioGetCurPos((PUSHORT) &curRow, (PUSHORT) &curCol, 0);
VioWrtNCell((PBYTE)&cell, 1, curRow, curCol, 0);
# endif
#endif
return OK;
}
#endif /* THESE_FUNCTIONS_ARENT_USED */
/*man-start*********************************************************************
PDC_chadd() - Low level; Put a character to a window