See changelog

This commit is contained in:
Eddie Runia
1999-05-14 19:15:43 +00:00
parent 362ee10c20
commit 3136a1030b
2 changed files with 37 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
19990514-20:15 CET Eddie Runia
* source/rtl/gtapi.c
A lot of #ifdef #endif added or else it couldn't build out of the box.
19990514-19:50 CET Eddie Runia
* source/rtl/codebloc.c
Codeblock patch from Ryszard applied

View File

@@ -13,24 +13,29 @@ static WORD suiDispCount = 0;
static WORD suiMaxRow = 24;
static WORD suiMaxCol = 79;
static BYTE *sfpScreenBuffer;
static WORD suiAttribs[ 4 ] = { 0x07, 0x70, 0x00, 0x00, 0x07 };
static WORD suiAttribs[ 5 ] = { 0x07, 0x70, 0x00, 0x00, 0x07 };
static WORD suiAttrIndex = 0;
HARBOUR TERMINIT( void )
{
#ifdef __DOS__
WORD uiRectSize;
_gtRectSize( 0, 0, suiMaxRow, suiMaxCol, &uiRectSize );
sfpScreenBuffer = ( BYTE * )_xgrab( uiRectSize );
#endif
}
HARBOUR TERMDONE( void )
{
#ifdef __DOS__
_xfree( sfpScreenBuffer );
#endif
}
ERRORCODE _gtBox( WORD uiTop, WORD uiLeft, WORD uiBottom, WORD uiRight, BYTE *fpBoxString )
{
#ifdef __DOS__
int iCount;
if ( uiTop > _gtMaxRow() || uiBottom > _gtMaxRow() ||
@@ -73,6 +78,7 @@ ERRORCODE _gtBox( WORD uiTop, WORD uiLeft, WORD uiBottom, WORD uiRight, BYTE *fp
_gtWrite( &fpBoxString[ 7 ], 1 );
_gtDispEnd();
#endif
return 0;
}
@@ -88,16 +94,20 @@ ERRORCODE _gtBoxS( WORD uiTop, WORD uiLeft, WORD uiBottom, WORD uiRight )
ERRORCODE _gtColorSelect( WORD uiColorIndex )
{
#ifdef __DOS__
if ( uiColorIndex > 4 )
return 1;
suiAttrIndex = uiColorIndex;
#endif
return 0;
}
ERRORCODE _gtDispBegin( void )
{
#ifdef __DOS__
suiDispCount ++;
#endif
return 0;
}
@@ -108,6 +118,7 @@ ERRORCODE _gtDispCount( void )
ERRORCODE _gtDispEnd( void )
{
#ifdef __DOS__
suiDispCount --;
if ( !suiDispCount )
@@ -116,15 +127,18 @@ ERRORCODE _gtDispEnd( void )
_gtUpdateCursor();
}
#endif
return 0;
}
ERRORCODE _gtFlush( void )
{
#ifdef __DOS__
BYTE *fpVideoMemory;
/* get address of video memory */
#endif
return 0;
}
@@ -140,9 +154,11 @@ ERRORCODE _gtGetCursor( WORD *uipCursorShape )
ERRORCODE _gtGetPos( WORD *uipRow, WORD *uipCol )
{
#ifdef __DOS__
*uipRow = suiRow;
*uipCol = suiCol;
#endif
return 0;
}
@@ -171,23 +187,27 @@ void _gtPreExt( void )
ERRORCODE _gtRectSize( WORD uiTop, WORD uiLeft, WORD uiBottom, WORD uiRight, WORD *uipBuffSize )
{
#ifdef __DOS__
if ( uiTop > _gtMaxRow() || uiBottom > _gtMaxRow() ||
uiLeft > _gtMaxCol() || uiRight > _gtMaxCol() ||
uiTop > uiBottom || uiLeft > uiRight )
return 1;
*uipBuffSize = ( uiBottom - uiTop + 1 ) * ( uiRight - uiLeft + 1 ) * 2;
#endif
return 0;
}
ERRORCODE _gtRepChar( WORD uiRow, WORD uiCol, WORD uiChar, WORD uiCount )
{
#ifdef __DOS__
char buff[ 255 ];
memset( buff, uiChar, uiCount );
buff[ uiCount ] = 0x0;
_gtSetPos( uiRow, uiCol );
_gtWrite( buff, uiCount );
#endif
return 0;
}
@@ -203,8 +223,10 @@ ERRORCODE _gtSave( WORD uiTop, WORD uiLeft, WORD uiBottom, WORD uiRight, BYTE *f
ERRORCODE _gtScrDim( WORD *uipHeight, WORD *uipWidth )
{
#ifdef __DOS__
*uipHeight = suiMaxRow;
*uipWidth = suiMaxCol;
#endif
return 0;
}
@@ -230,6 +252,7 @@ ERRORCODE _gtSetCursor( WORD uiCursorShape )
ERRORCODE _gtSetMode( WORD uiRows, WORD uiCols )
{
#ifdef __DOS__
if ( suiMaxRow != uiRows || suiMaxCol != uiCols )
{
suiMaxRow = uiRows;
@@ -238,11 +261,13 @@ ERRORCODE _gtSetMode( WORD uiRows, WORD uiCols )
/* change buffer */
}
#endif
return 0;
}
ERRORCODE _gtSetPos( WORD uiRow, WORD uiCol )
{
#ifdef __DOS__
if ( uiRow > _gtMaxRow() || uiCol > _gtMaxCol() )
return 1;
@@ -250,6 +275,7 @@ ERRORCODE _gtSetPos( WORD uiRow, WORD uiCol )
suiCol = uiCol;
_gtUpdateCursor();
#endif
return 0;
}
@@ -260,6 +286,7 @@ ERRORCODE _gtSetSnowFlag( BOOL bNoSnow )
ERRORCODE _gtUpdateCursor( void )
{
#ifdef __DOS__
union REGS regs;
regs.h.ah = 2; /* set cursor position */
@@ -269,11 +296,13 @@ ERRORCODE _gtUpdateCursor( void )
int86( VIDEO_INT, &regs, &regs );
#endif
return 0;
}
ERRORCODE _gtWrite( BYTE *fpStr, WORD uiLen )
{
#ifdef __DOS__
int iOffset = suiRow * suiMaxRow + suiCol;
int iCount;
@@ -286,14 +315,17 @@ ERRORCODE _gtWrite( BYTE *fpStr, WORD uiLen )
if ( !suiDispCount )
_gtFlush();
#endif
return 0;
}
ERRORCODE _gtWriteAt( WORD uiRow, WORD uiCol, BYTE *fpStr, WORD uiLen )
{
#ifdef __DOS__
if ( !_gtSetPos( uiRow, uiCol ) )
return _gtWrite( fpStr, uiLen );
#endif
return 1;
}