Skip to content
Snippets Groups Projects
Commit 14141455 authored by deuce's avatar deuce
Browse files

"Fix" xpdoor for new cterm stuff.

parent 3d0eaf05
Branches
Tags
No related merge requests found
......@@ -11,6 +11,7 @@
struct xpd_info xpd_info;
static BOOL raw_write=FALSE;
static struct cterminal *cterm;
static int xpd_ansi_readbyte_cb(void)
{
......@@ -189,7 +190,7 @@ int xpd_init()
return(-1);
}
gettextinfo(&ti);
cterm_init(ti.screenheight, ti.screenwidth, 1, 1, 0, NULL, CTERM_EMULATION_ANSI_BBS);
cterm = cterm_init(ti.screenheight, ti.screenwidth, 1, 1, 0, NULL, NULL, NULL, CTERM_EMULATION_ANSI_BBS);
return 0;
}
......@@ -208,24 +209,24 @@ int xpd_rwrite(const char *data, int data_len)
/* Set up cterm to match conio */
gettextinfo(&ti);
cterm.xpos=ti.winleft+ti.curx-1;
cterm.ypos=ti.wintop+ti.cury-1;
cterm.attr=ti.attribute;
cterm.quiet=TRUE;
cterm.doorway_mode=xpd_info.doorway_mode;
cterm->xpos=ti.winleft+ti.curx-1;
cterm->ypos=ti.wintop+ti.cury-1;
cterm->attr=ti.attribute;
cterm->quiet=TRUE;
cterm->doorway_mode=xpd_info.doorway_mode;
/* Disable ciolib output for ANSI */
ciolib_ansi_writebyte_cb=dummy_writebyte_cb;
/* Send data to cterm */
cterm_write((char *)data, data_len, NULL, 0, NULL);
cterm_write(cterm, (char *)data, data_len, NULL, 0, NULL);
/* Send data to remote */
xpd_ansi_writestr_cb((char *)data,data_len);
/* Set conio to match cterm */
gotoxy(cterm.xpos-ti.winleft+1, cterm.ypos-ti.winright+1);
textattr(cterm.attr);
gotoxy(cterm->xpos-ti.winleft+1, cterm->ypos-ti.winright+1);
textattr(cterm->attr);
/* Re-enable ciolib output */
ciolib_ansi_writebyte_cb=xpd_ansi_writebyte_cb;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment