From dec2109f1b7fd584bee3759e01441fce05a6df1e Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 27 Aug 2009 19:41:22 +0000 Subject: [PATCH] 2009-08-27 21:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/filebuf.c ! added missing static in declaration * harbour/source/rdd/dbffpt/dbffpt1.c ! fixed default memo extension in non workarea methods --- harbour/ChangeLog | 7 ++++++ harbour/source/rdd/dbffpt/dbffpt1.c | 4 ++-- harbour/source/rtl/filebuf.c | 34 ++++++++++++++--------------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fcb411c0a0..a77bad99b9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,13 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-27 21:41 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rtl/filebuf.c + ! added missing static in declaration + + * harbour/source/rdd/dbffpt/dbffpt1.c + ! fixed default memo extension in non workarea methods + 2009-08-27 21:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * external/libhpdf/Makefile ! Fixed typo in recent rework, causing embedded libpng diff --git a/harbour/source/rdd/dbffpt/dbffpt1.c b/harbour/source/rdd/dbffpt/dbffpt1.c index 301d8185db..bd95e6ec5f 100644 --- a/harbour/source/rdd/dbffpt/dbffpt1.c +++ b/harbour/source/rdd/dbffpt/dbffpt1.c @@ -5035,8 +5035,8 @@ static HB_ERRCODE hb_fptRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect ( szExt = hb_setGetMFileExt() ) != NULL && *szExt ) hb_itemPutC( pItem, szExt ); else - hb_itemPutC( pItem, hb_memoDefaultFileExt( pData->bMemoType, pRDD->rddID ) ); - + hb_itemPutC( pItem, hb_memoDefaultFileExt( pData->bMemoType ? + pData->bMemoType : DB_MEMO_FPT, pRDD->rddID ) ); if( szNewVal ) { hb_strncpy( pData->szMemoExt, szNewVal, sizeof( pData->szMemoExt ) - 1 ); diff --git a/harbour/source/rtl/filebuf.c b/harbour/source/rtl/filebuf.c index accdae7fdd..9be26a3c7b 100644 --- a/harbour/source/rtl/filebuf.c +++ b/harbour/source/rtl/filebuf.c @@ -542,25 +542,25 @@ static HB_FHANDLE s_fileHandle( PHB_FILE pFile ) return pFile ? pFile->hFile : FS_ERROR; } -/* methods table */ -const HB_FILE_FUNCS s_fileFuncs = -{ - s_fileAccept, - hb_spFileExists, - hb_fsDelete, - s_fileExtOpen, - s_fileClose, - s_fileLock, - s_fileReadAt, - s_fileWriteAt, - s_fileTruncAt, - s_fileSize, - s_fileCommit, - s_fileHandle -}; - static const HB_FILE_FUNCS * s_fileMethods( void ) { + /* methods table */ + static const HB_FILE_FUNCS s_fileFuncs = + { + s_fileAccept, + hb_spFileExists, + hb_fsDelete, + s_fileExtOpen, + s_fileClose, + s_fileLock, + s_fileReadAt, + s_fileWriteAt, + s_fileTruncAt, + s_fileSize, + s_fileCommit, + s_fileHandle + }; + return &s_fileFuncs; }