3 ms·
Hardcoding the ANSI escape characters hurts portability. Try looking up the escape using termcap/terminfo.
by ok123456 2y ago
Hardcoding the ANSI escape characters hurts portability. Try looking up the escape using termcap/terminfo.
- deleted 2y ago[deleted]
- jstanley 2y agoHurts portability to what? Maybe it once did, but now it's akin to complaining that a program misbehaves on EBCDIC systems.
- ok123456 2y agoFor instance, if you detect that it's not going to a terminal, but rather a pipe, you probably don't want terminal escape codes and want the dumb terminal entry.