add crappy filter. better than nothing.
--- a/espy.c Wed Feb 04 12:35:49 2015 +0000
+++ b/espy.c Wed Feb 04 18:36:58 2015 +0000
@@ -71,7 +71,7 @@
/*
* LUA interpreter delay
*/
-#define SHORTDELAY (200)
+#define SHORTDELAY (150)
#define LONGDELAY (2000)
/*******************************************************************************
@@ -515,22 +515,27 @@
int rc = readchar(fd, &buffer[ix], BUFLEN - ix, TIMEOUT);
if (rc <= 0)
return 0;
-
ix += rc;
char *cp;
while ((cp = strnchr(buffer, '\n', ix)) != NULL) {
-
int i = cp - buffer;
- assert(i < BUFLEN);
buffer[i++] = '\0';
ix -= i;
- assert(ix >= 0 && ix < BUFLEN);
#if 0
dump_hex(buffer, i);
#endif
- fprintf(stderr, "%s\n", buffer);
+ /*
+ * Prompt filter
+ *
+ * This is problematic of course, but what else can be done?
+ */
+ int j = 0;
+ while (buffer[j] == 0x3E || buffer[j] == 0x20)
+ j++;
+ if (buffer[j] != '\r')
+ fprintf(stderr, "%s\n", &buffer[j]);
memmove(buffer, &buffer[i], ix);
}