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 70cedf36 authored by rswindell's avatar rswindell

Now that pause() can set a hot-spot, don't inject a Ctrl-C (abort) into the...

Now that pause() can set a hot-spot, don't inject a Ctrl-C (abort) into the keyboard buffer if it had.
parent 7c57cd21
......@@ -552,7 +552,6 @@ void sbbs_t::pause()
uint tempattrs=curatr; /* was lclatr(-1) */
long l=K_UPPER;
size_t len;
struct mouse_hotspot* hotspot_added = NULL;
if((sys_status&SS_ABORT) || pause_inside)
return;
......@@ -561,15 +560,17 @@ void sbbs_t::pause()
if(online==ON_REMOTE)
rioctl(IOFI);
if(mouse_hotspots.first == NULL)
hotspot_added = add_hotspot('\r');
pause_hotspot = add_hotspot('\r');
bputs(text[Pause]);
len = bstrlen(text[Pause]);
if(sys_status&SS_USERON && !(useron.misc&(HTML|WIP|NOPAUSESPIN))
&& !(cfg.node_misc&NM_NOPAUSESPIN))
l|=K_SPIN;
ch=getkey(l);
if(hotspot_added)
if(pause_hotspot) {
clear_hotspots();
pause_hotspot = NULL;
}
if(ch==text[YNQP][1] || ch==text[YNQP][2])
sys_status|=SS_ABORT;
else if(ch==LF) // down arrow == display one more line
......
......@@ -375,7 +375,7 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
}
#endif
ungetstr(spot->cmd);
if(pause_inside)
if(pause_inside && pause_hotspot == NULL)
return handle_ctrlkey(TERM_KEY_ABORT, mode);
return 0;
}
......
......@@ -3363,6 +3363,7 @@ sbbs_t::sbbs_t(ushort node_num, union xp_sockaddr *addr, size_t addr_len, const
mouse_mode = MOUSE_MODE_OFF;
hungry_hotspots = true;
pause_hotspot = NULL;
console = 0;
online = 0;
outchar_esc = 0;
......
......@@ -831,6 +831,7 @@ public:
uint hot_attr; // Auto-Mouse hot-spot attribute (when non-zero)
bool hungry_hotspots;
link_list_t mouse_hotspots; // Mouse hot-spots
struct mouse_hotspot* pause_hotspot;
struct mouse_hotspot* add_hotspot(struct mouse_hotspot*);
struct mouse_hotspot* add_hotspot(char cmd, bool hungry = true, long minx = -1, long maxx = -1, long y = -1);
struct mouse_hotspot* add_hotspot(ulong num, bool hungry = true, long minx = -1, long maxx = -1, long y = -1);
......
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