Hello,
I am new to this list, and I am not completely sure that this
message doesn't belong on comp.lang.c.
I am trying to write a C program to operate a display on an xterm,
and as such I would like to read the environment variables COLUMNS and
LINES to know what size window I am dealing with. I am running Debian
Linux on my home PC, and hence I use the bash shell. The problem with
bash is that the COLUMNS and LINES environment variables are not
exported to the shell environment. Hence a call to getenv() does not
find them. I realize that perhaps using system("export COLUMNS") and
then searching the environment might work, but this seems like a hack,
and I am not sure I want my program to go around modifying its parent's
environment. Is there anyway to get at these local environment
variables without exporting them?
Thanks in advance,
Larry Gariepy