Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 9748a701 authored by rswindell's avatar rswindell

ansi_getxy() now returns bool instead of void (false on timeout).

parent 1bd21619
......@@ -107,7 +107,7 @@ void sbbs_t::ansi_getlines()
}
}
void sbbs_t::ansi_getxy(int* x, int* y)
bool sbbs_t::ansi_getxy(int* x, int* y)
{
int rsp=0, ch;
......@@ -129,8 +129,10 @@ void sbbs_t::ansi_getxy(int* x, int* y)
start=time(NULL);
}
else if(isdigit(ch) && rsp==2) {
(*y)*=10;
(*y)+=(ch&0xf);
if(y!=NULL) {
(*y)*=10;
(*y)+=(ch&0xf);
}
start=time(NULL);
}
else if(ch==';' && rsp>=2) {
......@@ -138,8 +140,10 @@ void sbbs_t::ansi_getxy(int* x, int* y)
start=time(NULL);
}
else if(isdigit(ch) && rsp==3) {
(*x)*=10;
(*x)+=(ch&0xf);
if(x!=NULL) {
(*x)*=10;
(*x)+=(ch&0xf);
}
start=time(NULL);
}
else if(ch=='R' && rsp)
......@@ -149,7 +153,9 @@ void sbbs_t::ansi_getxy(int* x, int* y)
}
if(time(NULL)-start>TIMEOUT_ANSI_GETXY) {
lprintf("Node %d !TIMEOUT in ansi_getxy", cfg.node_num);
break;
return(false);
}
}
return(true);
}
......@@ -338,7 +338,7 @@ public:
/* ansi_term.cpp */
char * ansi(int atr); /* Returns ansi escape sequence for atr */
void ansi_getxy(int* x, int* y);
bool ansi_getxy(int* x, int* y);
void ansi_getlines(void);
/* Command Shell Methods */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment