From b44223b903e7fedb85c4493491ac47280d733215 Mon Sep 17 00:00:00 2001 From: Teo Fonrouge Date: Sun, 7 Oct 2007 02:28:40 +0000 Subject: [PATCH] 2007-10-06 21:28 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com) * contrib/tip/thtml.prg * contrib/tip/cgi.prg * contrib/tip/httpcln.prg * removed HB_HSetAutoAdd, now Harbour hashes by default have AUTOADD on assign. --- harbour/ChangeLog | 6 ++++++ harbour/contrib/tip/cgi.prg | 12 ++++++------ harbour/contrib/tip/httpcln.prg | 12 ++++++------ harbour/contrib/tip/thtml.prg | 8 ++++---- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b68b74b743..73e602fc35 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-06 21:28 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com) + * contrib/tip/thtml.prg + * contrib/tip/cgi.prg + * contrib/tip/httpcln.prg + * removed HB_HSetAutoAdd, now Harbour hashes by default have AUTOADD on assign. + 2007-10-06 13:55 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/vm/hashes.c * set AUTOADD for assign operation by default in new arrays diff --git a/harbour/contrib/tip/cgi.prg b/harbour/contrib/tip/cgi.prg index ad0ea8dcc1..d1dc648ad9 100644 --- a/harbour/contrib/tip/cgi.prg +++ b/harbour/contrib/tip/cgi.prg @@ -81,10 +81,10 @@ CLASS TIpCgi DATA cCgiHeader DATA cHtmlPage - DATA hGets INIT HB_HSetAutoAdd( {=>}, .T. ) - DATA hPosts INIT HB_HSetAutoAdd( {=>}, .T. ) - DATA hCookies INIT HB_HSetAutoAdd( {=>}, .T. ) - DATA hSession INIT HB_HSetAutoAdd( {=>}, .T. ) + DATA hGets INIT {=>} + DATA hPosts INIT {=>} + DATA hCookies INIT {=>} + DATA hSession INIT {=>} DATA bSavedErrHandler DATA cSessionSavePath DATA cSID @@ -268,7 +268,7 @@ METHOD DestroySession( cID ) CLASS TIpCgi if !empty( cSID ) - ::hSession := HB_HSetAutoAdd( {=>}, .T. ) + ::hSession := {=>} cFile := ::cSessionSavePath + "SESSIONID_" + cSID @@ -432,7 +432,7 @@ METHOD StartSession( cSID ) CLASS TIpCgi else ::CreateSID() - ::hSession := HB_HSetAutoAdd( {=>}, .T. ) + ::hSession := {=>} endif diff --git a/harbour/contrib/tip/httpcln.prg b/harbour/contrib/tip/httpcln.prg index 4e69dc09a5..8359168c25 100644 --- a/harbour/contrib/tip/httpcln.prg +++ b/harbour/contrib/tip/httpcln.prg @@ -66,9 +66,9 @@ CLASS tIPClientHTTP FROM tIPClient DATA nVersion INIT 1 DATA nSubversion INIT 0 DATA bChunked - DATA hHeaders INIT HB_HSetAutoAdd( {=>}, .T. ) - DATA hCookies INIT HB_HSetAutoAdd( {=>}, .T. ) - DATA hFields INIT HB_HSetAutoAdd( {=>}, .T. ) + DATA hHeaders INIT {=>} + DATA hCookies INIT {=>} + DATA hFields INIT {=>} DATA cUserAgent INIT "Mozilla/3.0 compatible" DATA cAuthMode INIT "" DATA cBoundary @@ -249,7 +249,7 @@ METHOD ReadHeaders(lClear) CLASS tIPClientHTTP ::bChunked := .F. cLine := ::InetRecvLine( ::SocketCon, @nPos, 500 ) IF !lClear=.f. .AND. !empty(::hHeaders) - ::hHeaders:=HB_HSetAutoAdd( {=>}, .T. ) + ::hHeaders:={=>} ENDIF DO WHILE ::InetErrorCode( ::SocketCon ) == 0 .and. .not. Empty( cLine ) aHead := HB_RegexSplit( ":", cLine,,, 1 ) @@ -413,10 +413,10 @@ METHOD setCookie(cLine) CLASS tIPClientHTTP //cookies are stored in hashes as host.path.name //check if we have a host hash yet if !HHASKEY(::hCookies,cHost) - ::hCookies[cHost]:=HB_HSetAutoAdd( {=>}, .T. ) + ::hCookies[cHost]:={=>} endif if !HHASKEY(::hCookies[cHost],cPath) - ::hCookies[cHost][cPath]:=HB_HSetAutoAdd( {=>}, .T. ) + ::hCookies[cHost][cPath]:={=>} endif ::hCookies[cHost][cPath][cName]:=cValue ENDIF diff --git a/harbour/contrib/tip/thtml.prg b/harbour/contrib/tip/thtml.prg index a3272579c0..ca1f041b51 100644 --- a/harbour/contrib/tip/thtml.prg +++ b/harbour/contrib/tip/thtml.prg @@ -1245,12 +1245,12 @@ METHOD getAttributes() CLASS THtmlNode RETURN ::htmlAttributes ELSEIF ::htmlAttributes == NIL - ::htmlAttributes := HB_HSetAutoAdd( {=>}, .T. ) + ::htmlAttributes := {=>} hb_hCaseMatch( ::htmlAttributes, .F. ) ELSEIF Valtype( ::htmlAttributes ) == "C" IF ::htmlAttributes == "/" - ::htmlAttributes := HB_HSetAutoAdd( {=>}, .T. ) + ::htmlAttributes := {=>} hb_hCaseMatch( ::htmlAttributes, .F. ) ELSE ::htmlAttributes := __ParseAttr( P_PARSER( Alltrim(::htmlAttributes) ) ) @@ -1263,7 +1263,7 @@ RETURN ::htmlAttributes STATIC FUNCTION __ParseAttr( parser ) LOCAL cChr, nMode := 1 // 1=name, 2=value LOCAL aAttr := { "", "" } - LOCAL hHash := HB_HSetAutoAdd( {=>}, .T. ) + LOCAL hHash := {=>} LOCAL nStart, nEnd LOCAL lIsQuoted := .F. @@ -1649,7 +1649,7 @@ RETURN lRet HTML Tag data are adopted for xHarbour from Tidy.exe (www.sourceforge.net/tidy) */ STATIC PROCEDURE _Init_Html_TagTypes - shTagTypes := HB_HSetAutoAdd( {=>}, .T. ) + shTagTypes := {=>} hb_HSetCaseMatch( shTagTypes, .F. )