2014-03-04 00:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/vm/set.c
    ! added missing FXO_APPEND flag.
      It should fix #54.

  * src/vm/asort.c
    ! respect milliseconds part when timestamp values are compared in ASORT()
      Note: ASORT() does not use exact comparison so when mixed date and
      timestamp values are used only date is significant. Just like in:
         ASort( aValue, {|x, y| x < y } )

  * src/rtl/filebuf.c
    ! fixed C&P typo.
      It should fix problem with SET PRINTER TO reported by Rolf.

  * src/rtl/hbgtcore.c
    ! added missing break after HB_GTI_VERSION
This commit is contained in:
Przemysław Czerpak
2014-03-04 00:08:07 +01:00
parent 0e1377fd01
commit bb9d85f0fc
5 changed files with 30 additions and 3 deletions

View File

@@ -795,7 +795,7 @@ static HB_FOFFSET s_fileposSeek( PHB_FILE pFilePos, HB_FOFFSET nOffset,
HB_USHORT uiFlags )
{
if( uiFlags & FS_END )
nOffset += pFilePos->pFuncs->Size( _PHB_FILE );
nOffset += pFilePos->pFuncs->Size( pFilePos );
else if( uiFlags & FS_RELATIVE )
nOffset += _PHB_FILEPOS->seek_pos;
/* else FS_SET */
@@ -818,7 +818,7 @@ static HB_FOFFSET s_fileposSize( PHB_FILE pFilePos )
static HB_BOOL s_fileposEof( PHB_FILE pFilePos )
{
return _PHB_FILEPOS->seek_pos >= _PHB_FILE->pFuncs->Size( _PHB_FILE );
return _PHB_FILEPOS->seek_pos >= pFilePos->pFuncs->Size( pFilePos );
}
static void s_fileposFlush( PHB_FILE pFilePos, HB_BOOL fDirty )

View File

@@ -1972,6 +1972,7 @@ static HB_BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
case HB_GTI_VERSION:
pInfo->pResult = hb_itemPutC( pInfo->pResult,
HB_GTSELF_VERSION( pGT, hb_itemGetNI( pInfo->pNewVal ) ) );
break;
default:
return HB_FALSE;

View File

@@ -96,6 +96,14 @@ static HB_BOOL hb_itemIsLess( PHB_ITEM pItem1, PHB_ITEM pItem2, PHB_ITEM pBlock,
return hb_itemGetNInt( pItem1 ) < hb_itemGetNInt( pItem2 );
else if( HB_IS_NUMERIC( pItem1 ) && HB_IS_NUMERIC( pItem2 ) )
return hb_itemGetND( pItem1 ) < hb_itemGetND( pItem2 );
else if( HB_IS_TIMESTAMP( pItem1 ) && HB_IS_TIMESTAMP( pItem2 ) )
{
long lDate1, lTime1, lDate2, lTime2;
hb_itemGetTDT( pItem1, &lDate1, &lTime1 );
hb_itemGetTDT( pItem2, &lDate2, &lTime2 );
return lDate1 == lDate2 ? lTime1 < lTime2 : lDate1 < lDate2;
}
else if( HB_IS_DATETIME( pItem1 ) && HB_IS_DATETIME( pItem2 ) )
/* it's not exact comparison, compare only julian date */
return hb_itemGetDL( pItem1 ) < hb_itemGetDL( pItem2 );

View File

@@ -332,7 +332,7 @@ static void open_handle( PHB_SET_STRUCT pSet, const char * file_name,
handle = hb_fileExtOpen( szFileName,
hb_stackSetStruct()->HB_SET_DEFEXTENSIONS ? def_ext : NULL,
FO_READWRITE | FO_READWRITE | FXO_SHARELOCK |
( bAppend ? 0 : FXO_TRUNCATE ) |
( bAppend ? FXO_APPEND : FXO_TRUNCATE ) |
( szDevice ? 0 : FXO_DEFAULTS ),
NULL, pError );