[cs631apue] Fwd: Some questions on midterm....

Tejas Nadkarni tnadkarn at stevens.edu
Sat Oct 5 17:31:24 EDT 2013


Great, last question. Is the environment variable COLUMNS the # of columns
or the width of the terminal window? My terminal doesn't set that env
variable so I can set it manually to test but not sure what the usage
normally is.


On Sat, Oct 5, 2013 at 5:18 PM, Jan Schaumann <jschauma at stevens.edu> wrote:

> Tejas Nadkarni <tnadkarn at stevens.edu> wrote:
> > Ok I'm currently reading the terminal window size so it changes as the
> user
> > modifies the window size. Should I change that to only read the
> environment
> > variable?
>
> The environment variable should change when your terminal window
> changes, so using the variable would work in both cases.  Using the
> terminal window size as a fallback in case the environment variable is
> bogus or unset would be a good idea.
>
> -Jan
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20131005/a2b777d4/attachment-0001.html>


More information about the cs631apue mailing list