From 0c38ab1529f922cd1d559edf586a1603321c08eb Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 22 Nov 2011 23:09:03 +0000 Subject: [PATCH] 2011-11-23 00:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/hbini.prg ! fixed HB_HKEEPORDER() usage in prev patch. Thx for input to Qatan and Mindaugas. --- harbour/ChangeLog | 5 +++++ harbour/src/rtl/hbini.prg | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 84a983077a..de57b26038 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2011-11-23 00:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbini.prg + ! fixed HB_HKEEPORDER() usage in prev patch. + Thx for input to Qatan and Mindaugas. + 2011-11-22 18:15 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/hbini.prg + keep order of ini items. diff --git a/harbour/src/rtl/hbini.prg b/harbour/src/rtl/hbini.prg index 0036769e99..05f6057686 100644 --- a/harbour/src/rtl/hbini.prg +++ b/harbour/src/rtl/hbini.prg @@ -95,14 +95,17 @@ PROCEDURE hb_IniSetComment( cLc, cHlc ) RETURN FUNCTION HB_IniNew( lAutoMain ) - LOCAL hIni := hb_HKeepOrder( { => }, .T. ) + LOCAL hIni := { => } + + hb_HKeepOrder( hIni, .T. ) IF ! ISLOGICAL( lAutoMain ) lAutoMain := .T. ENDIF IF lAutoMain - hIni[ "MAIN" ] := hb_HKeepOrder( { => }, .T. ) + hIni[ "MAIN" ] := { => } + hb_HKeepOrder( hIni[ "MAIN" ], .T. ) ENDIF RETURN hIni @@ -111,7 +114,9 @@ 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_HKeepOrder( { => }, .T. ) + LOCAL hIni := { => } + + hb_HKeepOrder( hIni, .T. ) /* Default case sensitiveness for keys */ IF ! ISLOGICAL( lKeyCaseSens ) @@ -130,7 +135,8 @@ FUNCTION hb_IniReadStr( cData, lKeyCaseSens, cSplitters, lAutoMain ) hb_HCaseMatch( hIni, lKeyCaseSens ) IF lAutoMain - hIni[ "MAIN" ] := hb_HKeepOrder( { => }, .T. ) + hIni[ "MAIN" ] := { => } + hb_HKeepOrder( hIni[ "MAIN" ], .T. ) ENDIF RETURN hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMain ) @@ -254,7 +260,8 @@ STATIC FUNCTION hb_IniStringLow( hIni, cData, lKeyCaseSens, cSplitters, lAutoMai IF ! Empty( aKeyVal ) cLine := AllTrim( aKeyVal[ 2 ] ) IF Len( cLine ) != 0 - hCurrentSection := hb_HKeepOrder( { => }, .T. ) + hCurrentSection := { => } + hb_HKeepOrder( hCurrentSection, .T. ) IF ! lKeyCaseSens cLine := Upper( cLine ) ENDIF