]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blobdiff - zephyr/zwgc/tty_filter.c
This commit was manufactured by cvs2svn to create branch
[1ts-debian.git] / zephyr / zwgc / tty_filter.c
index f90c143576e9f988b0d4c9695ce540879ba75199..27dc57bb082bea9b566fb2aa760fbc2a68ae69e2 100644 (file)
@@ -36,8 +36,10 @@ static const char rcsid_tty_filter_c[] = "$Id: tty_filter.c,v 1.18 1999/08/13 00
 
 extern int tgetent();
 extern char *tgetstr(),*getenv();
+#if 0
 short ospeed;
 char PC;
+#endif
 
 /* Dictionary naming convention:
 
@@ -91,6 +93,7 @@ char **argv;
     int ex;
     string_dictionary_binding *b;
     int isrealtty = string_Eq(drivername, "tty");
+#if 0
 #ifdef HAVE_TERMIOS_H
     struct termios tbuf;
 
@@ -99,6 +102,7 @@ char **argv;
     struct sgttyb sgttyb;
 
     ospeed = (ioctl(0, TIOCGETP, &sgttyb) == 0) ? sgttyb.sg_ospeed : 2400;
+#endif
 #endif
 
     if (termcap_dict == (string_dictionary) NULL)
@@ -129,8 +133,10 @@ char **argv;
        /* We cheat here, and ignore the padding (if any) specified for
           the mode-change strings (it's a real pain to do "right") */
 
+#if 0
        tmp = tgetstr("pc", &p);
        PC = (tmp) ? *tmp : 0;
+#endif
        if (tmp = tgetstr("md",&p)) {   /* bold ? */
            EXPAND("B.bold");
            tmp = tgetstr("me",&p);
@@ -321,6 +327,7 @@ static tty_str_info *convert_desc_to_tty_str_info(desc)
 
        /* Add new block (call it temp) to result: */
        temp = (tty_str_info *)malloc(sizeof(struct _tty_str_info));
+       *temp = current_mode;
        if (last_result_block) {
            last_result_block->next = temp;
            last_result_block = temp;
@@ -344,13 +351,13 @@ static tty_str_info *convert_desc_to_tty_str_info(desc)
        }
        if (desc->code == DT_STR) {
            /* just combine string info with current mode: */
-           *temp = current_mode;
            temp->str = desc->str;
            temp->len = desc->len;
        } else if (desc->code == DT_NL) {
            /* make the new block a ' ' alignment block with an empty string */
            temp->alignment = ' ';
            temp->len = 0;
+           temp->ignore = 0;
        }
     }