On Mon, 8 Jul 2002 20:48:02 +0200, "Andreas Scherer"
>I want (have to) pass the envvar $LINES & $COLUMNS to a called
>program. The vars are only available in interactive shells, so
>does not work.
A couple of choices...
a) Run your program in a shell
b) Write a wrapper program that exec[l|v]e's your program, and set the
environment vars as part of the exec[l|v]e call
With either of these, getenv() will work.
>One way to do so, is to call the app with appname $LINES $COLUMNS
>but this is not the way I like to do it.
>Do anybody know a way to determine the number of lines and
>inside a c-program?
Use argc/argv, of course (or the getargs() package if you don't like
/path/to/myprogram -lines 32 -columns 99
of course, you still have to populate the values, so you might be back to
envvars. If so, then your best bet is the wrapper shell script or wrapper
Lew Pitcher, Information Technology Consultant, Toronto Dominion Bank Financial Group
(Opinions expressed are my own, not my employer's.)