Messages in this thread |  | | Date | Fri, 14 Jun 1996 09:10:47 -0600 (CST) | From | Aaron Ucko <> | Subject | Re: Ideas for v2.1 |
| |
>>> > driver in full working order. So can't we just replace "Ok.\n" with >>> > "\r\e[K", which will wipe the message off the screen *if* the test >>> > is successful. >>> >>> But these escape sequences would also go to the log files, which >>> is probably not good... >> >>It would a simple matter to _NOT_ log escape sequences, since >>printk would already have to detect them in the first place. >>The escape code just shouldn't be put in the buffer. > >No, it would probably be quite tricky. I'm sure someone will jump on >me if I'm wrong, but as I see it the escape sequence is generated by >the compiler as a string literal and passed in the original call to >printk(). printk() sorts out logging and buffering as necessary, and >by default (with no klogd) will output the string verbatim to the >console device. The console device then interprets any escape >sequences as necessary. You really don't want to have to *interpret* >the sequences anywhere other than in the console code, and this is >basically what you have to do to figure out how many characters after >the initial escape code \033 need to be ignored. > >To strip it out you have to do one of the following: > > Write an intelligent log viewer that correctly detects and removes VT > escape sequences. Tricky.
Not _that_ tricky. Read file://cs.utk.edu/pub/shuford/terminals/how_to_emulate.txt and you'll see that the syntax is pretty regular.
-- Aaron Ucko (ucko@vax1.rockhurst.edu; finger for PGP public key) | httyp! "That's right," he said. "We're philosophers. We think, therefore we am." -- Terry Pratchett, _Small Gods_ | Geek Code 3.1 [for explanation, finger hayden@mankato.msus.edu]: GCS/M/S/C d- s: a18 C++(+++)>++++ UL++>++++ P++ L++>+++++ E- W(-) N++(+) o+ K- w--- O M@ V-(--) PS++(+++) PE- Y(+) PGP(+) t(+) !5 X-- R(-) tv-@ b++(+++) DI+ !D-- G++(+++) e->+++++(*) h!>+ r-(--)>+++ y?
|  |