[TUHS] INed/Rand Editor/Ned [was Re: My EuroBSDcon talk (preview for commentary)

Jon Steinhart jon at fourwinds.com
Tue Sep 17 06:47:27 AEST 2019


G. Branden Robinson writes:
>
> At 2019-09-16T17:16:12+0100, Warner Losh wrote:
> > I got to look at the source to a few other editors of the era. All has
> > the terminal codes hard coded into them... it was common to do that
> > before things like termcap...
>
> It's still common today.  Everything the developer cares to think about,
> let alone test on, interprets EMCA-48 SGR escape sequences.  My favorite
> recent example is "spectre-meltdown-checker", which has such edifying
> lines as:
>
>         _info_nol "> \033[46m\033[30mSTATUS:\033[0m "
>
> Why write something portable when you can be "close to the metal"?  :-/
>
> I gently steer people to better ways when the occasion presents itself.
>
> Regards,
> Branden

We can have an interesting discussion of the definition of "better ways".
I see termcap as a great solution for the days in which there was little
standardization.  But it's probably pretty hard to find a non-conforming
terminal nowadays so I think that it's better to avoid obfuscation.  Were
it me I would have a comment that referenced the page and section number
in the standard.

Since we like debating the merits of old technology, somebody can kick off
a termcap versus terminfo discussion :-)

Jon


More information about the TUHS mailing list