delorie.com/djgpp/doc/libc/libc_691.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_set_screen_lines

Syntax

 
#include <conio.h>

void _set_screen_lines(int nlines);

Description

This function sets the text screen width to 80 and its height to the value given by nlines, which can be one of the following: 25, 28, 35, 40, 43 or 50. On a CGA, only 25-line screen is supported. On an EGA, you can use 25, 35 and 43. VGA, PGA and MCGA support all of the possible dimensions. The number of columns (i.e., screen width) is 80 for all of the above resolutions, because the standard EGA/VGA has no way of changing it. After this function returns, calls to gettextinfo() will return the actual screen dimensions as set by _set_screen_lines(). That is, you can e.g. test whether _set_screen_lines() succeeded by checking the screen height returned by gettextinfo() against the desired height. This function has a side effect of erasing the screen contents, so application programs which use it should make their own arrangements to redisplay it.

Portability

ANSI/ISO C No
POSIX No

Implementation Note

It's not safe to call this function inside static constructors, because conio needs to be initialized, and its initialization is done by a static constructor. Since you don't have any control on the order in which static constructors are called (it's entirely up to the linker), you could have problems.

If you can detect the situation when one of the conio functions is called for the very first time since program start, you could work around this problem by calling the gppconio_init function manually (this is the function called by a static constructor).


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004