FreeBASIC  0.91.0
io_getsize.c
Go to the documentation of this file.
1 #include "../fb.h"
2 #include "fb_private_console.h"
3 
4 FBCALL void fb_ConsoleGetSize( int *cols, int *rows )
5 {
6  int nrows, ncols;
7 
9 
11  {
12  ncols = FB_SCRN_DEFAULT_WIDTH;
13  nrows = FB_SCRN_DEFAULT_HEIGHT;
14  }
15  else
16  {
17  fb_hConsoleGetWindow( NULL, NULL, &ncols, &nrows );
18  }
19 
20  if( cols != NULL )
21  *cols = ncols;
22  if( rows != NULL )
23  *rows = nrows;
24 }