#include "machine.h"


Go to the source code of this file.
Functions | |
| int | scilines (int nl, int nc) |
| int | scilinesdefault (void) |
| int C2F() | scilines (int *nl, int *nc) |
| BOOL | setColumnsSize (int colums) |
| BOOL | setLinesSize (int lines_) |
| int | getColumnsSize (void) |
| int | getLinesSize (void) |
| int getColumnsSize | ( | void | ) |
get number of columns to display data
Definition at line 97 of file scilines.c.
References C2F().
Referenced by doCompletion(), sci_lines(), and sciprint_full().
00098 { 00099 return C2F(iop).lct[4]; 00100 }


| int getLinesSize | ( | void | ) |
get number of lines to display data
Definition at line 102 of file scilines.c.
References C2F().
Referenced by basout(), sci_lines(), and setScilabLines().
00103 { 00104 return C2F(iop).lct[1]; 00105 }


| int C2F() scilines | ( | int * | nl, | |
| int * | nc | |||
| ) |
set number of lines and columns to display data (C2F version)
| [in] | number | of lines |
| [in] | number | of columns |
Definition at line 74 of file scilines.c.
References scilines().
00075 { 00076 return scilines(*nblines,*nbcolumns); 00077 }

| int scilines | ( | int | nl, | |
| int | nc | |||
| ) |
set number of lines and columns to display data
| [in] | number | of lines |
| [in] | number | of columns |
Definition at line 31 of file scilines.c.
References setColumnsSize(), and setLinesSize().
Referenced by scilines(), and setScilabLines().
00032 { 00033 setLinesSize(nblines); 00034 setColumnsSize(nbcolumns); 00035 return 0; 00036 }


| int scilinesdefault | ( | void | ) |
set default number of lines and columns to display data
Definition at line 38 of file scilines.c.
References DEFAULT_NUMBERS_COLUMNS, DEFAULT_NUMBERS_LINES, getenv(), getScilabMode(), getXConsoleScreenSize(), getYConsoleScreenSize(), SCILAB_API, SCILAB_STD, setColumnsSize(), and setLinesSize().
Referenced by InitializeShell().
00039 { 00040 #ifndef _MSC_VER 00041 00042 char tc_buf[1024]; /* holds termcap buffer */ 00043 if(tgetent(tc_buf, getenv("TERM")) == 1) { 00044 setLinesSize(tgetnum("li")); /* retrieve from the term info the number 00045 of lines */ 00046 setColumnsSize(tgetnum("co")); /* And the number of columns */ 00047 }else{ 00048 /* Haven't been able to detect the terminal */ 00049 setLinesSize(DEFAULT_NUMBERS_LINES); 00050 setColumnsSize(DEFAULT_NUMBERS_COLUMNS); 00051 } 00052 00053 #else 00054 if ( (getScilabMode() != SCILAB_STD) && (getScilabMode() != SCILAB_API) ) 00055 { 00056 /* -NW or -NWNI mode */ 00057 int X = getXConsoleScreenSize(); 00058 int Y = getYConsoleScreenSize(); 00059 00060 if (X < DEFAULT_NUMBERS_LINES) X = DEFAULT_NUMBERS_LINES; 00061 if (Y < DEFAULT_NUMBERS_COLUMNS) X = DEFAULT_NUMBERS_COLUMNS; 00062 setColumnsSize(X); 00063 setLinesSize(Y); 00064 } 00065 else 00066 { 00067 setLinesSize(DEFAULT_NUMBERS_LINES); 00068 setColumnsSize(DEFAULT_NUMBERS_COLUMNS); 00069 } 00070 #endif 00071 return 0; 00072 }


| BOOL setColumnsSize | ( | int | colums | ) |
set number of columns to display data
| new | size of columns |
Definition at line 84 of file scilines.c.
References C2F(), Max, MIN_NUMBERS_COLUMNS, and TRUE.
Referenced by sci_lines(), scilines(), and scilinesdefault().
00085 { 00086 C2F(iop).lct[4] = Max(MIN_NUMBERS_COLUMNS,colums); 00087 return TRUE; 00088 }


| BOOL setLinesSize | ( | int | lines_ | ) |
set number of lines to display data
| new | size of lines |
Definition at line 90 of file scilines.c.
References C2F(), Max, MIN_NUMBERS_LINES, and TRUE.
Referenced by sci_lines(), scilines(), and scilinesdefault().
00091 { 00092 00093 C2F(iop).lct[1] = Max(MIN_NUMBERS_LINES,lines_); 00094 return TRUE; 00095 }


1.5.5