Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wala

macrumors member
Original poster
Jun 3, 2005
46
0
Is there any standard, cross-shell, and cross-platform way, in C, to get the number of lines one's terminal currently has?
I know the variable LINES is found in many shells, but is there a function which can be used to retrieve shell (not environment) variables?
 
The standard way to do this is to use curses. The variable LINES will be defined after a newterm() or initscr().
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.