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 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?

Reply via email to