]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - tack/sync.c
ncurses 5.4
[ncurses.git] / tack / sync.c
index d8866a0e5ebbb3b38e70a2a84d5a26c1a5b07556..6eb91b256a75a37e94efd541e17f162a5876653c 100644 (file)
@@ -22,7 +22,7 @@
 #include <tack.h>
 #include <time.h>
 
-MODULE_ID("$Id: sync.c,v 1.1 1998/01/10 00:31:07 tom Exp $")
+MODULE_ID("$Id: sync.c,v 1.3 2001/06/16 17:55:48 tom Exp $")
 
 /* terminal-synchronization and performance tests */
 
@@ -143,7 +143,11 @@ probe_enq_ok(void)
        fflush(stdout);
        can_test("u8 u9", FLAG_TESTED);
 
+#ifdef user9
        tty_ENQ = user9 ? user9 : "\005";
+#else
+       tty_ENQ = "\005";
+#endif
        tc_putp(tty_ENQ);
        event_start(TIME_SYNC); /* start the timer */
        read_key(tty_ACK, TTY_ACK_SIZE - 1);
@@ -157,18 +161,24 @@ probe_enq_ok(void)
                ptextln(" the terminal is overrun with data.");
                ptext("\nENQ sequence from (u9): ");
                putln(expand(tty_ENQ));
-               ptext("ACK recieved: ");
+               ptext("ACK received: ");
                putln(expand(tty_ACK));
+#ifdef user8
                len = user8 ? strlen(user8) : 0;
+#else
+               len = 0;
+#endif
                sprintf(temp, "Length of ACK %d.  Expected length of ACK %d.",
                        (int) strlen(tty_ACK), len);
                ptextln(temp);
+#ifdef user8
                if (len) {
                        temp[0] = user8[len - 1];
                        temp[1] = '\0';
                        ptext("Terminating character found in (u8): ");
                        putln(expand(temp));
                }
+#endif
                return;
        }
 
@@ -180,6 +190,7 @@ probe_enq_ok(void)
                return;
        }
        tc = tty_ACK[len - 1];
+#ifdef user8
        if (user8) {
                ulen = strlen(user8);
                if (tc == user8[ulen - 1]) {
@@ -189,6 +200,7 @@ probe_enq_ok(void)
                        return;
                }
        }
+#endif
        /* fixed length acknowledge string */
        ACK_length = len;
        ACK_terminator = -2;
@@ -368,7 +380,7 @@ sync_clear(
 }
 
 /*
-**     sync_symmary(test_list, status, ch)
+**     sync_summary(test_list, status, ch)
 **
 **     Print out the test results.
 */