NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/40109: [dM] PARMRK bugs



The following reply was made to PR kern/40109; it has been noted by GNATS.

From: der Mouse <mouse%Rodents-Montreal.ORG@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/40109: [dM] PARMRK bugs
Date: Mon, 12 Jan 2009 18:15:39 -0500 (EST)

 Here's the patch I've been running with.  The line numbers are probably
 off (this is not the only patch I have to tty.c), and it may well not
 be a fully right fix, but it seems to work for me.
 
 --- base/sys/kern/tty.c        Sat Feb 19 19:56:26 2000
 +++ live/sys/kern/tty.c        Fri Dec  5 03:30:17 2008
 @@ -358,13 +360,6 @@
                                c = 0;
                }
        }
 -      else if (c == 0377 &&
 -          ISSET(iflag, ISTRIP|IGNPAR|INPCK|PARMRK) == (INPCK|PARMRK)) {
 -              /* "Escape" a valid character of '\377'. */
 -              (void)putc(0377 | TTY_QUOTE, &tp->t_rawq);
 -              (void)putc(0377 | TTY_QUOTE, &tp->t_rawq);
 -              goto endcase;
 -      }
  
        /*
         * In tandem mode, check high water mark.
 @@ -582,6 +577,11 @@
         * Put data char in q for user and
         * wakeup on seeing a line delimiter.
         */
 +      if ((c == 0377) && (ISSET(iflag,ISTRIP|IGNPAR|PARMRK) == PARMRK)) {
 +              /* "Escape" a valid character of '\377'. */
 +              (void)putc(0377 | TTY_QUOTE, &tp->t_rawq);
 +              c = 0377 | TTY_QUOTE;
 +      }
        if (putc(c, &tp->t_rawq) >= 0) {
                if (!ISSET(lflag, ICANON)) {
                        ttwakeup(tp);
 
 /~\ The ASCII                            Mouse
 \ / Ribbon Campaign
  X  Against HTML               mouse%rodents-montreal.org@localhost
 / \ Email!          7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
 


Home | Main Index | Thread Index | Old Index