screen size in the environment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, Thomas,

That did the trick. I added an export statement to /etc/profile which
exported COLUMNS and LINES, and now my C programs can access those
values in the environment with getenv.

Chuck


On Sat, 18 Sep 2004, Thomas Stivers wrote:

> I believe that these are set by your shell probably bash, but don't know
> if they are exported. If you are using ncurses in your programs you can
> use getmaxyx() to get the maximum screen size. It is a macro and just
> puts the maximum y and x coordinates in two parameters. If this won't
> work for your purposes, then maybe you can export LINES and COLUMNS
> before running your program.

-- 
The Moon is Waxing Crescent (17% of Full)
Home page at http://www.mhcable.com/~chuckh
Speakfreely address 24.105.197.112:2074




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux