Re: [dev] a few questions about watch in ubase

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Thu, 21 Apr 2016 20:40:50 +0100

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.
Received on Thu Apr 21 2016 - 21:40:50 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 21 2016 - 21:48:11 CEST