Commit 0c01b564 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

change alarm bell kludge used to separate messages to the GUI to a "unit...

change alarm bell kludge used to separate messages to the GUI to a "unit separator" kludge. Still bad, but a little less bad
parent c364eb0b
......@@ -1032,7 +1032,8 @@ function init_socket_events () {
len = data.length;
for (i = 0; i < len; i++) {
// check for end of command:
if (data[i] === 7) { // alarm bell
if (data[i] === 31) { // unit separator
post("got a datum");
// decode next_command
try {
// This should work for all utf-8 content
......
......@@ -716,7 +716,7 @@ void sys_vvgui(const char *fmt, va_list ap) {
if (sys_debuglevel & DEBUG_MESSUP) {
//blargh();
//int begin = lastend=='\n' || lastend=='\r' || lastend==-1;
int begin = lastend=='\a' || lastend==-1;
int begin = lastend=='\x1f' || lastend==-1;
if (stderr_isatty)
fprintf(stderr, "%s\e[0;1;35m%s\e[0m",
begin ? "\n-> " : "", sys_guibuf + sys_guibufhead);
......@@ -783,7 +783,7 @@ char *escape_double_quotes(const char *src) {
void gui_end_vmess(void)
{
sys_gui("\a");
sys_gui("\x1f"); /* unit separator */
}
......
Supports Markdown
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