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

Fixes per Marcin Cieslak (Saper)

Thanks!
parent f9688d0e
No related branches found
No related tags found
No related merge requests found
OBJS = \ OBJS = \
$(MTOBJODIR)$(DIRSEP)comio$(OFILE) \ $(MTOBJODIR)$(DIRSEP)comio$(OFILE) \
$(MTOBJODIR)$(DIRSEP)dropfiles$(OFILE) \
$(MTOBJODIR)$(DIRSEP)telnet$(OFILE) \ $(MTOBJODIR)$(DIRSEP)telnet$(OFILE) \
$(MTOBJODIR)$(DIRSEP)xpdoor$(OFILE) $(MTOBJODIR)$(DIRSEP)xpdoor$(OFILE)
......
...@@ -57,12 +57,12 @@ static int xpd_ansi_readbyte_cb(void) ...@@ -57,12 +57,12 @@ static int xpd_ansi_readbyte_cb(void)
return(-2); return(-2);
} }
static int dummy_writebyte_cb(unsigned char ch) static int dummy_writebyte_cb(const unsigned char ch)
{ {
return(ch); return(ch);
} }
static int xpd_ansi_writebyte_cb(unsigned char ch) static int xpd_ansi_writebyte_cb(const unsigned char ch)
{ {
switch(xpd_info.io_type) { switch(xpd_info.io_type) {
case XPD_IO_STDIO: case XPD_IO_STDIO:
...@@ -116,7 +116,7 @@ static int xpd_ansi_initio_cb(void) ...@@ -116,7 +116,7 @@ static int xpd_ansi_initio_cb(void)
return(0); return(0);
} }
static int xpd_ansi_writestr_cb(unsigned char *str, size_t len) static int xpd_ansi_writestr_cb(const unsigned char *str, size_t len)
{ {
int i; int i;
...@@ -128,7 +128,7 @@ static int xpd_ansi_writestr_cb(unsigned char *str, size_t len) ...@@ -128,7 +128,7 @@ static int xpd_ansi_writestr_cb(unsigned char *str, size_t len)
case XPD_IO_SOCKET: case XPD_IO_SOCKET:
case XPD_IO_TELNET: case XPD_IO_TELNET:
for(i=0; i<len; i++) { for(i=0; i<len; i++) {
if(xpd_ansi_writebyte_cb((unsigned char)str[i])<0) if(xpd_ansi_writebyte_cb(str[i])<0)
return(-2); return(-2);
} }
} }
...@@ -166,7 +166,7 @@ void xpd_parse_cmdline(int argc, char **argv) ...@@ -166,7 +166,7 @@ void xpd_parse_cmdline(int argc, char **argv)
} }
} }
int xpd_exit() void xpd_exit()
{ {
if(xpd_info.doorway_mode) if(xpd_info.doorway_mode)
ansi_ciolib_setdoorway(0); ansi_ciolib_setdoorway(0);
...@@ -190,9 +190,10 @@ int xpd_init() ...@@ -190,9 +190,10 @@ int xpd_init()
} }
gettextinfo(&ti); gettextinfo(&ti);
cterm_init(ti.screenheight, ti.screenwidth, 1, 1, 0, NULL, CTERM_EMULATION_ANSI_BBS); cterm_init(ti.screenheight, ti.screenwidth, 1, 1, 0, NULL, CTERM_EMULATION_ANSI_BBS);
return 0;
} }
int xpd_doorway(int enable) void xpd_doorway(int enable)
{ {
xpd_info.doorway_mode=enable; xpd_info.doorway_mode=enable;
ansi_ciolib_setdoorway(enable); ansi_ciolib_setdoorway(enable);
...@@ -228,4 +229,5 @@ int xpd_rwrite(const char *data, int data_len) ...@@ -228,4 +229,5 @@ int xpd_rwrite(const char *data, int data_len)
/* Re-enable ciolib output */ /* Re-enable ciolib output */
ciolib_ansi_writebyte_cb=xpd_ansi_writebyte_cb; ciolib_ansi_writebyte_cb=xpd_ansi_writebyte_cb;
return 0;
} }
...@@ -114,12 +114,12 @@ void xpd_parse_cmdline(int argc, char **argv); ...@@ -114,12 +114,12 @@ void xpd_parse_cmdline(int argc, char **argv);
/* /*
* Initialize (turns on Doorway mode) * Initialize (turns on Doorway mode)
*/ */
int xpd_init(); int xpd_init(void);
/* /*
* Exit (turns off Doorway mode) * Exit (turns off Doorway mode)
*/ */
int xpd_exit(void); void xpd_exit(void);
/* /*
* Parse dropfile * Parse dropfile
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment