screen size in the environment

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

 



If anyone has any ideas about this one, I would appreciate hearing them:

My environment seems to have two variables called "COLUMNS" and "LINES"
that give the size of the text console screen. I can display them from a
prompt with

echo $COLUMNS

and

echo $LINES

and their values seem correct. I don't have the foggiest notion of who
set them, it wasn't me.

However, in a C program which could really benefit from knowing those
values, the "getenv" function cannot find them. It returns NULL for each
variable, caps and quotes are correctly given, and the same function
"getenv" retrieves other environment variables just fine.

How come my program can't locate COLUMNS and LINES in the environment?

Chuck


-- 
The Moon is Waxing Crescent (16% 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