screen size in the environment

Chuck Hallenbeck chuckh at sent.com
Sat Sep 18 05:15:07 EDT 2004


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




More information about the Speakup mailing list