On Wed, Sep 28, 2011 at 12:26 AM, Bruce Dubbs <[email protected]> wrote: > xinglp wrote: >> On Tue, Sep 27, 2011 at 12:40 AM, Bruce Dubbs <[email protected]> wrote: >>> See if this works as well: >>> >>> sed -i -e 's/(ECHO)/ECHO/' term-utils/agetty.c >> It's "c_cflag --> c_lflag" . >> Maybe you need to see a oculist > > I generally don't use a utf-8 character encoding, so your patch looks > like the one below. > > The parens around the ECHO are what stood out for me. By the way, > literal tabs in source code suck. > > Try this sed: > > sed -i -e 's/cflag \& (ECHO)/lflag \& ECHO/' term-utils/agetty.c > > -- Bruce > >>>> Â term-utils/agetty.c | Â Â 6 +++--- >>>> Â 1 files changed, 3 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/term-utils/agetty.c b/term-utils/agetty.c >>>> index 8398015..75c2b14 100644 >>>> --- a/term-utils/agetty.c >>>> +++ b/term-utils/agetty.c >>>> @@ -1466,7 +1466,7 @@ static char *get_logname(struct options *op, >>>> struct termios *tp, struct chardata >>>> Â Â Â Â Â Â Â Â Â Â Â Â case '#': >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cp->erase = ascval; /* set >>>> erase character */ >>>:q> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if (bp > logname) { >>>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if >>>> ((tp->c_cflag & (ECHO)) == 0) >>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if >>>> ((tp->c_lflag & ECHO) == 0) >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â >>>> write_all(1, >>>> erase[cp->parity], 3); >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â bp--; >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â } >>>> @@ -1475,7 +1475,7 @@ static char *get_logname(struct options *op, >>>> struct termios *tp, struct chardata >>>> Â Â Â Â Â Â Â Â Â Â Â Â case '@': >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â cp->kill = ascval; Â Â Â >>>> Â Â Â Â /* set >>>> kill character */ >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â while (bp > logname) { >>>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if >>>> ((tp->c_cflag & (ECHO)) == 0) >>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if >>>> ((tp->c_lflag & ECHO) == 0) >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â >>>> write_all(1, >>>> erase[cp->parity], 3); >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â bp--; >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â } >>>> @@ -1487,7 +1487,7 @@ static char *get_logname(struct options *op, >>>> struct termios *tp, struct chardata >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if ((size_t)(bp - logname) >>>> >= >>>> sizeof(logname) - 1) >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â log_err(_("%s: >>>> input overrun"), op->tty); >>>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if ((tp->c_cflag & (ECHO)) >>>> == 0) >>>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â if ((tp->c_lflag & ECHO) == >>>> 0) >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â write_all(1, >>>> &c, 1); Â Â /* echo >>>> the character */ >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â *bp++ = ascval; Â Â Â Â >>>> Â Â Â Â /* and >>>> store it */ >>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â break; >>>> -- >>>> 1.7.6 >>> -- >>> http://linuxfromscratch.org/mailman/listinfo/lfs-dev >>> FAQ: http://www.linuxfromscratch.org/faq/ >>> Unsubscribe: See the above information page >>> > > -- > http://linuxfromscratch.org/mailman/listinfo/lfs-dev > FAQ: http://www.linuxfromscratch.org/faq/ > Unsubscribe: See the above information page >
shy -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
