how to get number of lines in terminal

Discussion in 'Mac Programming' started by wala, Dec 3, 2006.

  1. wala macrumors member

    Jun 3, 2005
    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?
  2. iMeowbot macrumors G3


    Aug 30, 2003
    The standard way to do this is to use curses. The variable LINES will be defined after a newterm() or initscr().

Share This Page