]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - tack/output.c
ncurses 5.4
[ncurses.git] / tack / output.c
index 3c419a8b48bc02ee7aa75c2730cb3631c9f949e5..208210a267d3b38e41ef4c99f97d4bcbe81a5acf 100644 (file)
@@ -23,7 +23,7 @@
 #include <tack.h>
 #include <time.h>
 
-MODULE_ID("$Id: output.c,v 1.4 1999/06/16 00:46:53 tom Exp $")
+MODULE_ID("$Id: output.c,v 1.8 2003/10/25 20:43:43 tom Exp $")
 
 /* globals */
 long char_sent;                        /* number of characters sent */
@@ -122,7 +122,7 @@ tc_putch(int c)
        }
        if (log_fp) {
                /* terminal output logging */
-               c &= 0xff;
+               c = UChar(c);
                if (c < 32) {
                        fprintf(log_fp, "<%s>", c0[c]);
                        log_count += 5;
@@ -186,9 +186,9 @@ tt_putp(const char *string)
 }
 
 /*
-**     tt_putparm(string, reps, arg1, arg2, ...)
+**     tt_putparm(string, reps, arg1, arg2)
 **
-**     Send tt_tputs(tparm(string, args...), reps)
+**     Send tt_tputs(tparm(string, args1, arg2), reps)
 **     Use this function inside timing tests.
 */
 void
@@ -409,8 +409,8 @@ put_columns(const char *s, int len, int w)
 **     ptext(string)
 **
 **     Output a string but do not assume the terminal will wrap to a
-**     new line.  Break the line at a word boundry then send a CR LF.
-**     This is more estetic on 40 column terminals.
+**     new line.  Break the line at a word boundary then send a CR LF.
+**     This is more esthetic on 40 column terminals.
 */
 void
 ptext(const char *s)
@@ -561,7 +561,7 @@ hex_expand_to(char *s, int l)
        char *t;
 
        for (t = buf; *s; s++) {
-               sprintf(t, "%02X ", *s & 0xff);
+               sprintf(t, "%02X ", UChar(*s));
                t += 3;
                if (t - buf > (int) sizeof(buf) - 4) {
                        break;
@@ -584,13 +584,13 @@ expand_command(const char *c)
        char *s;
 
        s = buf;
-       for (i = FALSE; (ch = (*c & 0xff)); c++) {
+       for (i = FALSE; (ch = UChar(*c)) != 0; c++) {
                if (i) {
                        *s++ = ' ';
                }
                i = TRUE;
                if (ch < 32) {
-                       j = c[1] & 0xff;
+                       j = UChar(c[1]);
                        if (ch == '\033' && j >= '@' && j <= '_') {
                                ch = j - '@';
                                c++;
@@ -599,7 +599,7 @@ expand_command(const char *c)
                                for (j = 0; (*s = c0[ch][j++]); s++);
                } else {
                        *s++ = ch;
-                       j = c[1] & 0xff;
+                       j = UChar(c[1]);
                        if (ch >= '0' && ch <= '9' &&
                                j >= '0' && j <= '9') {
                                i = FALSE;