On Thu, Apr 21, 2016 at 02:04:43PM -0400, Greg Reagle wrote: > Please excuse me if these questions are rudimentary. I am using Debian > Stable. > > Why is watch linked with the crypt library? > cc -s -o watch watch.o libutil.a -lcrypt > It does not seem to need it.
watch does not use anything from libcrypt but other tools in ubase do. It is just a convenience to be able to specify the libs once and not per tool. > watch uses "\x1b[2J\x1b[H" to clear the screen, which are the two control > codes Erase Screen and Cursor Home. These seem to be ANSI escape control > codes. > > Is it appropriate to use ANSI escape codes in the program rather than using > something like tput or terminfo, or to just execute the "clear" command? > Are the escape codes portable? They are portable for ansi terminals.