From 5ee6af4c381ab0ec7dc33510aaa1f04c81e792ef Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 22 Nov 2011 17:19:20 +0000 Subject: [PATCH] 2011-11-22 18:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/hbini.prg + keep order of ini items. Patch by Qatan. * modified to use HB_HKEEPORDER() instead of HB_HSETORDER() to be consistent along the patch and because former is the native, faster synonym. --- harbour/ChangeLog | 8 ++++++++ harbour/src/rtl/hbini.prg | 10 +++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a1dc7452fa..84a983077a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,14 @@ The license applies to all entries newer than 2009-04-28. */ +2011-11-22 18:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbini.prg + + keep order of ini items. + Patch by Qatan. + * modified to use HB_HKEEPORDER() instead of HB_HSETORDER() + to be consistent along the patch and because former is the + native, faster synonym. + 2011-11-17 10:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtcore/qth/QLibraryInfo.qth - Deleted: QLibraryInfo::buildDate() method call. diff --git a/harbour/src/rtl/hbini.prg b/harbour/src/rtl/hbini.prg index e9fbfa150a..0036769e99 100644 --- a/harbour/src/rtl/hbini.prg +++ b/harbour/src/rtl/hbini.prg @@ -95,14 +95,14 @@ PROCEDURE hb_IniSetComment( cLc, cHlc ) RETURN FUNCTION HB_IniNew( lAutoMain ) - LOCAL hIni := hb_Hash() + LOCAL hIni := hb_HKeepOrder( { => }, .T. ) IF ! ISLOGICAL( lAutoMain ) lAutoMain := .T. ENDIF IF lAutoMain - hIni[ "MAIN" ] := hb_Hash() + hIni[ "MAIN" ] := hb_HKeepOrder( { => }, .T. ) ENDIF RETURN hIni @@ -111,7 +111,7 @@ FUNCTION hb_IniRead( cFileSpec, lKeyCaseSens, cSplitters, lAutoMain ) RETURN hb_IniReadStr( iif( ISCHARACTER( cFileSpec ), hb_IniFileLow( cFileSpec ), "" ), lKeyCaseSens, cSplitters, lAutoMain ) FUNCTION hb_IniReadStr( cData, lKeyCaseSens, cSplitters, lAutoMain ) - LOCAL hIni := hb_Hash() + LOCAL hIni := hb_HKeepOrder( { => }, .T. ) /* Default case sensitiveness for keys */ IF ! ISLOGICAL( lKeyCaseSens ) @@ -130,7 +130,7 @@ FUNCTION hb_IniReadStr( cData, lKeyCaseSens, cSplitters, lAutoMain ) hb_HCaseMatch( hIni, lKeyCaseSens ) IF lAutoMain - hIni[ "MAIN" ] := hb_Hash() + hIni[ "MAIN" ] := hb_HKeepOrder( { => }, .T. ) ENDIF RETURN hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMain ) @@ -254,7 +254,7 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai IF ! Empty( aKeyVal ) cLine := AllTrim( aKeyVal[ 2 ] ) IF Len( cLine ) != 0 - hCurrentSection := hb_Hash() + hCurrentSection := hb_HKeepOrder( { => }, .T. ) IF ! lKeyCaseSens cLine := Upper( cLine ) ENDIF