2013-10-28 17:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rdd/wafunc.c
    * minor cleanup

  * src/rtl/gtos2/gtos2.c
  * src/rtl/gttrm/gttrm.c
    * added protection against wrong SetMode() parameters

  * src/rtl/gtxwc/gtxwc.h
    * changed minim console window size from 3 x 6 to 1 x 1
This commit is contained in:
Przemysław Czerpak
2013-10-28 17:18:11 +01:00
parent 41f154293e
commit f6a3c407e3
6 changed files with 41 additions and 25 deletions

View File

@@ -10,6 +10,17 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-10-28 17:18 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/wafunc.c
* minor cleanup
* src/rtl/gtos2/gtos2.c
* src/rtl/gttrm/gttrm.c
* added protection against wrong SetMode() parameters
* src/rtl/gtxwc/gtxwc.h
* changed minim console window size from 3 x 6 to 1 x 1
2013-10-25 12:10 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbfship/hbfship.hbx
! removed not longer used FieldDeci() reference

View File

@@ -25,6 +25,7 @@ DYNAMIC dbSetLocate
DYNAMIC dbSetLocateBlock
DYNAMIC ExecName
DYNAMIC ExecPIDNum
DYNAMIC FIELDDECI
DYNAMIC FieldGetArr
DYNAMIC FieldPutArr
DYNAMIC IndexCount

View File

@@ -1039,12 +1039,12 @@ HB_ERRCODE hb_dbTransStruct( AREAP lpaSource, AREAP lpaDest,
uiSize = 0;
break;
}
#endif
if( hb_itemGetNL( pSrcItm ) != hb_itemGetNL( pDstItm ) )
{
fAll = HB_FALSE;
break;
}
#endif
}
hb_itemRelease( pSrcItm );
hb_itemRelease( pDstItm );

View File

@@ -739,29 +739,32 @@ static HB_BOOL hb_gt_os2_Resize( PHB_GT pGT, int iRows, int iCols )
static HB_BOOL hb_gt_os2_SetMode( PHB_GT pGT, int iRows, int iCols )
{
HB_BOOL fResult;
HB_BOOL fResult = HB_FALSE;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_os2_SetMode(%p,%d,%d)", pGT, iRows, iCols ) );
s_vi.cb = sizeof( VIOMODEINFO );
VioGetMode( &s_vi, 0 ); /* fill structure with current settings */
s_vi.row = iRows;
s_vi.col = iCols;
fResult = VioSetMode( &s_vi, 0 ) == 0; /* 0 = Ok, other = Fail */
if( ! fResult )
if( iRows > 0 && iCols > 0 )
{
s_vi.cb = sizeof( VIOMODEINFO );
VioGetMode( &s_vi, 0 ); /* fill structure with current settings */
}
s_vi.row = iRows;
s_vi.col = iCols;
fResult = VioSetMode( &s_vi, 0 ) == 0; /* 0 = Ok, other = Fail */
hb_gt_os2_GetCursorPosition( &s_iCurRow, &s_iCurCol );
s_iCursorStyle = hb_gt_os2_GetCursorStyle();
HB_GTSELF_RESIZE( pGT, s_vi.row, s_vi.col );
HB_GTSELF_SETPOS( pGT, s_iCurRow, s_iCurCol );
if( s_iCursorStyle > 0 )
HB_GTSELF_SETCURSORSTYLE( pGT, s_iCursorStyle );
hb_gt_os2_GetScreenContents( pGT );
if( ! fResult )
{
s_vi.cb = sizeof( VIOMODEINFO );
VioGetMode( &s_vi, 0 ); /* fill structure with current settings */
}
hb_gt_os2_GetCursorPosition( &s_iCurRow, &s_iCurCol );
s_iCursorStyle = hb_gt_os2_GetCursorStyle();
HB_GTSELF_RESIZE( pGT, s_vi.row, s_vi.col );
HB_GTSELF_SETPOS( pGT, s_iCurRow, s_iCurCol );
if( s_iCursorStyle > 0 )
HB_GTSELF_SETCURSORSTYLE( pGT, s_iCursorStyle );
hb_gt_os2_GetScreenContents( pGT );
}
return fResult;
}

View File

@@ -3433,15 +3433,16 @@ static void hb_gt_trm_Scroll( PHB_GT pGT, int iTop, int iLeft, int iBottom, int
static HB_BOOL hb_gt_trm_SetMode( PHB_GT pGT, int iRows, int iCols )
{
PHB_GTTRM pTerm;
HB_TRACE( HB_TR_DEBUG, ( "hb_gt_trm_SetMode(%p,%d,%d)", pGT, iRows, iCols ) );
pTerm = HB_GTTRM_GET( pGT );
if( pTerm->SetMode( pTerm, &iRows, &iCols ) )
if( iRows > 0 && iCols > 0 )
{
HB_GTSELF_RESIZE( pGT, iRows, iCols );
return HB_TRUE;
PHB_GTTRM pTerm = HB_GTTRM_GET( pGT );
if( pTerm->SetMode( pTerm, &iRows, &iCols ) )
{
HB_GTSELF_RESIZE( pGT, iRows, iCols );
return HB_TRUE;
}
}
return HB_FALSE;
}

View File

@@ -84,8 +84,8 @@ typedef HB_USHORT HB_GT_CELLTYPE;
#define XWC_CHAR_QUEUE_SIZE 128
#define XWC_CHAR_BUFFER 1024
#define XWC_MIN_ROWS 3
#define XWC_MIN_COLS 6
#define XWC_MIN_ROWS 1
#define XWC_MIN_COLS 1
#define XWC_MAX_ROWS 256
#define XWC_MAX_COLS 256
#define XWC_DEFAULT_ROWS 25