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.
This commit is contained in:
Teo Fonrouge
2007-10-07 02:28:40 +00:00
parent dafaea3cbe
commit b44223b903
4 changed files with 22 additions and 16 deletions

View File

@@ -8,6 +8,12 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
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

View File

@@ -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

View File

@@ -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

View File

@@ -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. )