home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / c / other / graphics / setrows.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-25  |  504 b   |  22 lines

  1. /* SETROWS.C illustrates
  2.  *      _settextrows
  3.  */
  4.  
  5. #include <graph.h>
  6. #include <stdlib.h>
  7.  
  8. main( int argc, char ** argv )
  9. {
  10.     struct videoconfig vc;
  11.     short rows = atoi( argv[1] );
  12.  
  13.     _getvideoconfig( &vc );
  14.  
  15.     /* Make sure new rows is valid and the same as requested rows. */
  16.     if( !rows || (_settextrows( rows ) != rows) )
  17.         _outtext( "\nSyntax: SETROWS [ 25 | 43 | 50 ]\n" );
  18.  
  19.     /* Always return old rows for batch file testing. */
  20.     exit( vc.numtextrows );
  21. }
  22.