Date: Mon, 21 Oct 2002 11:26:56 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Ruslan Ermilov <ru@FreeBSD.ORG> Cc: "Andrey A. Chernov" <ache@nagual.pp.ru>, "M. Warner Losh" <imp@bsdimp.com>, arch@FreeBSD.ORG Subject: Re: color, again, in grotty Message-ID: <3DB446F0.486F9CAC@mindspring.com> References: <20021017.101833.110719994.imp@bsdimp.com> <20021018095026.GA3386@sunbay.com> <20021018.094801.123456703.imp@bsdimp.com> <3DB06A8B.E40B3004@mindspring.com> <20021018201919.GA15100@nagual.pp.ru> <20021021065156.GB14584@sunbay.com> <3DB3A962.9F26FCA0@mindspring.com> <20021021074056.GE14584@sunbay.com> <20021021105047.GA22255@nagual.pp.ru> <20021021114758.GB66084@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov wrote: > > From it you can see how grotty _can_ use libtermcap without isatty, if > > final device is known beforehead. > > But it isn't. For a manpage, man(1) compresses and stores the output > from grotty(1) in /usr/share/man/cat? cache, and later displays it on > this or that terminal (which are unknown beforehand and may differ). Then you don't get color. Try delaying rendering, instead. > Most of you (including me) seem to agree that there is no crime in > "backspace" sequences representing boldness and underlining, yet you > call them device-independent (DI) -- only because they're natural for > a matrix printer and because classical filters like ul(1) and more(1) > were capable of translating them to the right escapes. That's not the reason; ul(1) is completely bogus, IMO, since it can not be combined with a pager, unless you pipe the pager output through it; this assumes certain explicit flushing behaviour by the pager, which is not normally present in stdio. The real reason is that ASCII defines the <BS> character, and, unlike almost all other characters, the ASCII <BS> character has a well known behaviour which can be exploited to imply trigraphs between a back end application and a front end pager, over a pipe. > But these "backspace" sequences do not provide a way to manipulate a > color, yet they are not nearly DI if you pass them directly to some > terminals (outputting the character at the 80th position followed by > a backspace won't necessarily return a cursor to a previous line). This is a bogus argument. Specifically, it relies on the idea that a DI rendering facility would ever use column 80 in the first place, because it was ignorant of the behaviour of column 80 not being DI. > AT&T nroff(1) wasn't producing the device independent output, as the > colcrt(1) and col(1) manpages may hint you. So please stop calling > "nroff" output device-independent. This bears repeating. Over and over, if necessary. It is an important point. > I'm sorry, but I really fail to see why do you think that backspace > sequences are safer/better than ANSI SGR? I think the best answer to this question is that pagers are not terminal emulators, and therefore their imput can not be escape sequences, if you expect their output to be visually similar on very different terminals. > Ancient backspace Modern ANSI SGR > escapes escapes > ----------------------- ----------------------- --------------- > raw TTY printing no no > require filtering yes yes no yes (by an emulator) > attribute support yes yes > color support no yes > require s/w mods no yes -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB446F0.486F9CAC>