2009-06-15 18:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
- Deleted hb_DirBase() DJGPP hack after Przemek's fix.
- Deleted gcc compiler command line hack after Przemek's fix.
* contrib/hbxbp/xbp.ch
+ Added extra protection for Windows-only debug line.
* contrib/hbxbp/apig.ch
* Minor in comment.
* contrib/rddado/adordd.prg
* Minor formatting.
* Changed it to use non-legacy OLE interface.
PLEASE REVIEW & TEST.
* contrib/hbwin/legacy.prg
+ Added support for TOleAuto():cClassName var.
+ Added RTE generation in case the OLE object cannot be created.
PLEASE REVIEW & TEST.
+ contrib/rddado/tests/test.mdb
+ Added. It's generated by access2.prg to avoid any problems.
* contrib/rddado/tests/access1.prg
* Minor formatting.
; TOFIX: Does't work:
---
Error BASE/3012 Argument error: OPEN
Called from WIN_OLEAUTO:OPEN(0)
Called from ADO_OPEN(0)
Called from DBUSEAREA(0)
Called from MAIN(11)
---
- examples/uhttpd
+ examples/httpsrv
- examples/httpsrv/uhttpd.ini
+ examples/httpsrv/httpsrv.ini
- examples/httpsrv/uhttpdgd.hbp
+ examples/httpsrv/httpsrvg.hbp
- examples/httpsrv/uhttpdc.c
+ examples/httpsrv/httpsrvc.c
- examples/httpsrv/uhttpd.prg
+ examples/httpsrv/httpsrv.prg
* examples/httpsrv/cookie.prg
* examples/httpsrv/cgifunc.prg
* examples/httpsrv/session.prg
* examples/httpsrv/readme.txt
* Renamed uhttpd to httpsrv.
NOTE: If there are better names proposed I can rename
it to anything else. Mindaugas's new uhttpd will
be name uhttpd2 to avoid any ambiguity.
This commit is contained in:
@@ -17,6 +17,60 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-06-15 18:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
- Deleted hb_DirBase() DJGPP hack after Przemek's fix.
|
||||
- Deleted gcc compiler command line hack after Przemek's fix.
|
||||
|
||||
* contrib/hbxbp/xbp.ch
|
||||
+ Added extra protection for Windows-only debug line.
|
||||
|
||||
* contrib/hbxbp/apig.ch
|
||||
* Minor in comment.
|
||||
|
||||
* contrib/rddado/adordd.prg
|
||||
* Minor formatting.
|
||||
* Changed it to use non-legacy OLE interface.
|
||||
PLEASE REVIEW & TEST.
|
||||
|
||||
* contrib/hbwin/legacy.prg
|
||||
+ Added support for TOleAuto():cClassName var.
|
||||
+ Added RTE generation in case the OLE object cannot be created.
|
||||
PLEASE REVIEW & TEST.
|
||||
|
||||
+ contrib/rddado/tests/test.mdb
|
||||
+ Added. It's generated by access2.prg to avoid any problems.
|
||||
|
||||
* contrib/rddado/tests/access1.prg
|
||||
* Minor formatting.
|
||||
; TOFIX: Does't work:
|
||||
---
|
||||
Error BASE/3012 Argument error: OPEN
|
||||
Called from WIN_OLEAUTO:OPEN(0)
|
||||
Called from ADO_OPEN(0)
|
||||
Called from DBUSEAREA(0)
|
||||
Called from MAIN(11)
|
||||
---
|
||||
|
||||
- examples/uhttpd
|
||||
+ examples/httpsrv
|
||||
- examples/httpsrv/uhttpd.ini
|
||||
+ examples/httpsrv/httpsrv.ini
|
||||
- examples/httpsrv/uhttpdgd.hbp
|
||||
+ examples/httpsrv/httpsrvg.hbp
|
||||
- examples/httpsrv/uhttpdc.c
|
||||
+ examples/httpsrv/httpsrvc.c
|
||||
- examples/httpsrv/uhttpd.prg
|
||||
+ examples/httpsrv/httpsrv.prg
|
||||
* examples/httpsrv/cookie.prg
|
||||
* examples/httpsrv/cgifunc.prg
|
||||
* examples/httpsrv/session.prg
|
||||
* examples/httpsrv/readme.txt
|
||||
* Renamed uhttpd to httpsrv.
|
||||
NOTE: If there are better names proposed I can rename
|
||||
it to anything else. Mindaugas's new uhttpd will
|
||||
be name uhttpd2 to avoid any ambiguity.
|
||||
|
||||
2009-06-15 18:39 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rtl/fstemp.c
|
||||
* harbour/source/rtl/filesys.c
|
||||
|
||||
@@ -55,30 +55,31 @@
|
||||
#include "hbclass.ch"
|
||||
|
||||
#include "common.ch"
|
||||
#include "error.ch"
|
||||
|
||||
#define EG_OLEEXCEPTION 1001
|
||||
|
||||
#xcommand TRY => BEGIN SEQUENCE WITH s_bBreak
|
||||
#xcommand CATCH [<!oError!>] => RECOVER [USING <oError>] <-oError->
|
||||
#xcommand FINALLY => ALWAYS
|
||||
|
||||
STATIC s_bBreak := { | oError | Break( oError ) }
|
||||
|
||||
STATIC PROCEDURE Throw( oError )
|
||||
LOCAL lError := Eval( ErrorBlock(), oError )
|
||||
IF ! ISLOGICAL( lError ) .OR. lError
|
||||
__ErrInHandler()
|
||||
ENDIF
|
||||
Break( oError )
|
||||
RETURN
|
||||
|
||||
CREATE CLASS TOLEAUTO FROM WIN_OLEAUTO
|
||||
/* TODO: Implement compatibility to the required extent */
|
||||
VAR cClassName
|
||||
METHOD New( xOle, cIID )
|
||||
METHOD hObj( xOle )
|
||||
ENDCLASS
|
||||
|
||||
METHOD New( xOle, cIID ) CLASS TOLEAUTO
|
||||
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
ENDIF
|
||||
|
||||
IF hb_isPointer( xOle )
|
||||
::__hObj := xOle
|
||||
ELSEIF ISCHARACTER( xOle )
|
||||
xOle := __OleCreateObject( xOle, cIID )
|
||||
IF ! Empty( xOle )
|
||||
::__hObj := xOle
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
METHOD hObj( xOle ) CLASS TOLEAUTO
|
||||
|
||||
IF PCount() > 0 .AND. xOle != NIL
|
||||
@@ -92,11 +93,52 @@ METHOD hObj( xOle ) CLASS TOLEAUTO
|
||||
|
||||
RETURN ::__hObj
|
||||
|
||||
FUNCTION CreateObject( xOle, cIID )
|
||||
RETURN TOleAuto():New( xOle, cIID )
|
||||
METHOD New( xOle, cClass ) CLASS TOLEAUTO
|
||||
LOCAL hOle
|
||||
LOCAL oError
|
||||
|
||||
FUNCTION GetActiveObject( xOle, cIID )
|
||||
LOCAL o := TOleAuto():New( xOle, cIID )
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
ENDIF
|
||||
|
||||
IF hb_isPointer( xOle )
|
||||
::__hObj := xOle
|
||||
IF ISCHARACTER( cClass )
|
||||
::cClassName := cClass
|
||||
ELSE
|
||||
::cClassName := hb_ntos( win_P2N( xOle ) )
|
||||
ENDIF
|
||||
ELSEIF ISCHARACTER( xOle )
|
||||
hOle := __OleCreateObject( xOle )
|
||||
IF Empty( hOle )
|
||||
::__hObj := hOle
|
||||
::cClassName := xOle
|
||||
ELSE
|
||||
oError := ErrorNew()
|
||||
oError:Args := hb_AParams()
|
||||
oError:CanDefault := .F.
|
||||
oError:CanRetry := .F.
|
||||
oError:CanSubstitute := .T.
|
||||
oError:Description := win_OleErrorText()
|
||||
oError:GenCode := EG_OLEEXCEPTION
|
||||
oError:Operation := ProcName()
|
||||
oError:Severity := ES_ERROR
|
||||
oError:SubCode := -1
|
||||
oError:SubSystem := "TOleAuto"
|
||||
|
||||
RETURN Throw( oError )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
FUNCTION CreateObject( xOle, cClass )
|
||||
RETURN TOleAuto():New( xOle, cClass )
|
||||
|
||||
FUNCTION GetActiveObject( xOle, cClass )
|
||||
LOCAL o := TOleAuto():New()
|
||||
LOCAL hOle
|
||||
LOCAL oError
|
||||
|
||||
IF ISNUMBER( xOle )
|
||||
xOle := win_N2P( xOle )
|
||||
@@ -104,10 +146,30 @@ FUNCTION GetActiveObject( xOle, cIID )
|
||||
|
||||
IF hb_isPointer( xOle )
|
||||
o:__hObj := xOle
|
||||
IF ISCHARACTER( cClass )
|
||||
o:cClassName := cClass
|
||||
ELSE
|
||||
o:cClassName := hb_ntos( win_P2N( xOle ) )
|
||||
ENDIF
|
||||
ELSEIF ISCHARACTER( xOle )
|
||||
xOle := __OleGetActiveObject( xOle, cIID )
|
||||
IF ! Empty( xOle )
|
||||
o:__hObj := xOle
|
||||
hOle := __OleGetActiveObject( xOle )
|
||||
IF ! Empty( hOle )
|
||||
o:__hObj := hOle
|
||||
o:cClassName := xOle
|
||||
ELSE
|
||||
oError := ErrorNew()
|
||||
oError:Args := hb_AParams()
|
||||
oError:CanDefault := .F.
|
||||
oError:CanRetry := .F.
|
||||
oError:CanSubstitute := .T.
|
||||
oError:Description := win_OleErrorText()
|
||||
oError:GenCode := EG_OLEEXCEPTION
|
||||
oError:Operation := ProcName()
|
||||
oError:Severity := ES_ERROR
|
||||
oError:SubCode := -1
|
||||
oError:SubSystem := "TOleAuto"
|
||||
|
||||
RETURN Throw( oError )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Source file for the Wvg*Classes
|
||||
* Source file for the Xbp*Classes
|
||||
*
|
||||
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
|
||||
* http://www.harbour-project.org
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _XBP_CH
|
||||
|
||||
#ifndef _XBP_CH
|
||||
|
||||
#if defined( __HB_OUTDEBUG__ )
|
||||
#if defined( __HB_OUTDEBUG__ ) .AND. defined( __PLATFORM__WINDOWS )
|
||||
#xtranslate HB_OUTDEBUG( [<x>] ) => WAPI_OUTPUTDEBUGSTRING( <x> )
|
||||
#else
|
||||
#xtranslate HB_OUTDEBUG( [<x>] ) =>
|
||||
@@ -170,6 +169,6 @@
|
||||
|
||||
|
||||
#define _XBP_CH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -168,8 +168,8 @@ STATIC FUNCTION ADO_CREATE( nWA, aOpenInfo )
|
||||
LOCAL cServer := HB_TokenGet( aOpenInfo[ UR_OI_NAME ], 4, ";" )
|
||||
LOCAL cUserName := HB_TokenGet( aOpenInfo[ UR_OI_NAME ], 5, ";" )
|
||||
LOCAL cPassword := HB_TokenGet( aOpenInfo[ UR_OI_NAME ], 6, ";" )
|
||||
LOCAL oConnection := TOleAuto():New( "ADODB.Connection" )
|
||||
LOCAL oCatalog := TOleAuto():New( "ADOX.Catalog" )
|
||||
LOCAL oConnection := win_OleCreateObject( "ADODB.Connection" )
|
||||
LOCAL oCatalog := win_OleCreateObject( "ADOX.Catalog" )
|
||||
LOCAL aWAData := USRRDD_AREADATA( nWA )
|
||||
LOCAL oError, n
|
||||
|
||||
@@ -316,7 +316,7 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
|
||||
ENDIF
|
||||
|
||||
IF Empty( aOpenInfo[ UR_OI_CONNECT ] )
|
||||
aWAData[ WA_CONNECTION ] := TOleAuto():New( "ADODB.Connection" )
|
||||
aWAData[ WA_CONNECTION ] := win_OleCreateObject( "ADODB.Connection" )
|
||||
aWAData[ WA_TABLENAME ] := t_cTableName
|
||||
aWAData[ WA_QUERY ] := t_cQuery
|
||||
aWAData[ WA_USERNAME ] := t_cUserName
|
||||
@@ -371,7 +371,8 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
|
||||
";DbName=" + aOpenInfo[ UR_OI_NAME ] )
|
||||
ENDCASE
|
||||
ELSE
|
||||
aWAData[ WA_CONNECTION ] := TOleAuto():New( aOpenInfo[ UR_OI_CONNECT ], "ADODB.Connection" )
|
||||
aWAData[ WA_CONNECTION ] := win_OleAuto()
|
||||
aWAData[ WA_CONNECTION ]:__hObj := aOpenInfo[ UR_OI_CONNECT ] /* "ADODB.Connection" */
|
||||
aWAData[ WA_TABLENAME ] := t_cTableName
|
||||
aWAData[ WA_QUERY ] := t_cQuery
|
||||
aWAData[ WA_USERNAME ] := t_cUserName
|
||||
@@ -388,7 +389,7 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
|
||||
aWAData[ WA_QUERY ] := "SELECT * FROM "
|
||||
ENDIF
|
||||
|
||||
oRecordSet := TOleAuto():New( "ADODB.Recordset" )
|
||||
oRecordSet := win_OleCreateObject( "ADODB.Recordset" )
|
||||
|
||||
IF oRecordSet == NIL
|
||||
oError := ErrorNew()
|
||||
@@ -412,7 +413,7 @@ STATIC FUNCTION ADO_OPEN( nWA, aOpenInfo )
|
||||
ENDIF
|
||||
|
||||
TRY
|
||||
aWAData[ WA_CATALOG ] := TOleAuto():New( "ADOX.Catalog" )
|
||||
aWAData[ WA_CATALOG ] := win_OleCreateObject( "ADOX.Catalog" )
|
||||
aWAData[ WA_CATALOG ]:ActiveConnection := aWAData[ WA_CONNECTION ]
|
||||
CATCH
|
||||
END TRY
|
||||
@@ -716,9 +717,9 @@ STATIC FUNCTION ADO_APPEND( nWA, lUnLockAll )
|
||||
|
||||
oRecordSet:AddNew()
|
||||
|
||||
TRY
|
||||
TRY
|
||||
oRecordSet:Update()
|
||||
CATCH
|
||||
CATCH
|
||||
END
|
||||
|
||||
RETURN HB_SUCCESS
|
||||
@@ -854,75 +855,75 @@ STATIC FUNCTION ADO_FIELDINFO( nWA, nField, nInfoType, uInfo )
|
||||
|
||||
DO CASE
|
||||
CASE nInfoType == DBS_NAME
|
||||
uInfo := oRecordSet:Fields( nField - 1 ):Name
|
||||
uInfo := oRecordSet:Fields( nField - 1 ):Name
|
||||
|
||||
CASE nInfoType == DBS_TYPE
|
||||
nType := ADO_GETFIELDTYPE( oRecordSet:Fields( nField - 1 ):Type )
|
||||
DO CASE
|
||||
CASE nType == HB_FT_STRING
|
||||
uInfo := "C"
|
||||
CASE nType == HB_FT_LOGICAL
|
||||
uInfo := "L"
|
||||
CASE nType == HB_FT_MEMO
|
||||
uInfo := "M"
|
||||
CASE nType == HB_FT_OLE
|
||||
uInfo := "G"
|
||||
nType := ADO_GETFIELDTYPE( oRecordSet:Fields( nField - 1 ):Type )
|
||||
DO CASE
|
||||
CASE nType == HB_FT_STRING
|
||||
uInfo := "C"
|
||||
CASE nType == HB_FT_LOGICAL
|
||||
uInfo := "L"
|
||||
CASE nType == HB_FT_MEMO
|
||||
uInfo := "M"
|
||||
CASE nType == HB_FT_OLE
|
||||
uInfo := "G"
|
||||
#ifdef HB_FT_PICTURE
|
||||
CASE nType == HB_FT_PICTURE
|
||||
uInfo := "P"
|
||||
CASE nType == HB_FT_PICTURE
|
||||
uInfo := "P"
|
||||
#endif
|
||||
CASE nType == HB_FT_ANY
|
||||
uInfo := "V"
|
||||
CASE nType == HB_FT_DATE
|
||||
uInfo := "D"
|
||||
CASE nType == HB_FT_ANY
|
||||
uInfo := "V"
|
||||
CASE nType == HB_FT_DATE
|
||||
uInfo := "D"
|
||||
#ifdef HB_FT_DATETIME
|
||||
CASE nType == HB_FT_DATETIME
|
||||
uInfo := "T"
|
||||
CASE nType == HB_FT_DATETIME
|
||||
uInfo := "T"
|
||||
#endif
|
||||
#ifdef HB_FT_TIMESTAMP
|
||||
CASE nType == HB_FT_TIMESTAMP
|
||||
uInfo := "@"
|
||||
CASE nType == HB_FT_TIMESTAMP
|
||||
uInfo := "@"
|
||||
#endif
|
||||
CASE nType == HB_FT_LONG
|
||||
uInfo := "N"
|
||||
CASE nType == HB_FT_INTEGER
|
||||
uInfo := "I"
|
||||
CASE nType == HB_FT_DOUBLE
|
||||
uInfo := "B"
|
||||
OTHERWISE
|
||||
uInfo := "U"
|
||||
ENDCASE
|
||||
CASE nType == HB_FT_LONG
|
||||
uInfo := "N"
|
||||
CASE nType == HB_FT_INTEGER
|
||||
uInfo := "I"
|
||||
CASE nType == HB_FT_DOUBLE
|
||||
uInfo := "B"
|
||||
OTHERWISE
|
||||
uInfo := "U"
|
||||
ENDCASE
|
||||
|
||||
CASE nInfoType == DBS_LEN
|
||||
ADO_FIELDINFO( nWA, nField, DBS_TYPE, @nType )
|
||||
IF nType == 'N'
|
||||
nLen := oRecordSet:Fields( nField - 1 ):Precision
|
||||
ELSE
|
||||
nLen := oRecordSet:Fields( nField - 1 ):DefinedSize
|
||||
ENDIF
|
||||
// Un campo mayor de 1024 lo consideramos un campo memo
|
||||
uInfo := iif( nLen > 1024, 10, nLen )
|
||||
ADO_FIELDINFO( nWA, nField, DBS_TYPE, @nType )
|
||||
IF nType == 'N'
|
||||
nLen := oRecordSet:Fields( nField - 1 ):Precision
|
||||
ELSE
|
||||
nLen := oRecordSet:Fields( nField - 1 ):DefinedSize
|
||||
ENDIF
|
||||
// Un campo mayor de 1024 lo consideramos un campo memo
|
||||
uInfo := iif( nLen > 1024, 10, nLen )
|
||||
|
||||
CASE nInfoType == DBS_DEC
|
||||
ADO_FIELDINFO( nWA, nField, DBS_LEN, @nLen )
|
||||
ADO_FIELDINFO( nWA, nField, DBS_TYPE, @nType )
|
||||
IF oRecordSet:Fields( nField - 1 ):Type == adInteger
|
||||
uInfo := 0
|
||||
ELSEIF nType == 'N'
|
||||
uInfo := Min( Max( 0, nLen - 1 - oRecordSet:Fields( nField - 1 ):DefinedSize ), 15 )
|
||||
ELSE
|
||||
uInfo := 0
|
||||
ENDIF
|
||||
ADO_FIELDINFO( nWA, nField, DBS_LEN, @nLen )
|
||||
ADO_FIELDINFO( nWA, nField, DBS_TYPE, @nType )
|
||||
IF oRecordSet:Fields( nField - 1 ):Type == adInteger
|
||||
uInfo := 0
|
||||
ELSEIF nType == 'N'
|
||||
uInfo := Min( Max( 0, nLen - 1 - oRecordSet:Fields( nField - 1 ):DefinedSize ), 15 )
|
||||
ELSE
|
||||
uInfo := 0
|
||||
ENDIF
|
||||
#ifdef DBS_FLAG
|
||||
CASE nInfoType == DBS_FLAG
|
||||
uInfo := 0
|
||||
uInfo := 0
|
||||
#endif
|
||||
#ifdef DBS_STEP
|
||||
CASE nInfoType == DBS_STEP
|
||||
uInfo := 0
|
||||
uInfo := 0
|
||||
#endif
|
||||
OTHERWISE
|
||||
RETURN HB_FAILURE
|
||||
RETURN HB_FAILURE
|
||||
ENDCASE
|
||||
|
||||
RETURN HB_SUCCESS
|
||||
@@ -1198,7 +1199,7 @@ STATIC FUNCTION ADO_ORDCREATE( nWA, aOrderCreateInfo )
|
||||
|
||||
TRY
|
||||
IF aWAData[ WA_CATALOG ]:Tables( aWAData[ WA_TABLENAME ] ):Indexes == nil .OR. ! lFound
|
||||
oIndex := TOleAuto():New( "ADOX.Index" )
|
||||
oIndex := win_OleCreateObject( "ADOX.Index" )
|
||||
oIndex:Name := iif( ! Empty( aOrderCreateInfo[ UR_ORCR_TAGNAME ] ), aOrderCreateInfo[ UR_ORCR_TAGNAME ], aOrderCreateInfo[ UR_ORCR_CKEY ] )
|
||||
oIndex:PrimaryKey := .F.
|
||||
oIndex:Unique := aOrderCreateInfo[ UR_ORCR_UNIQUE ]
|
||||
|
||||
@@ -8,7 +8,7 @@ REQUEST ADORDD
|
||||
|
||||
function Main()
|
||||
|
||||
USE Test.mdb VIA "ADORDD" TABLE "Tabla1"
|
||||
USE test.mdb VIA "ADORDD" TABLE "Tabla1"
|
||||
|
||||
Browse()
|
||||
|
||||
|
||||
BIN
harbour/contrib/rddado/tests/test.mdb
Normal file
BIN
harbour/contrib/rddado/tests/test.mdb
Normal file
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* uHTTPD (Micro HTTP server) cgi functions
|
||||
* HTTPSRV (Micro HTTP server) cgi functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
@@ -862,4 +862,3 @@ FUNCTION uhttpd_HGetValue( hHash, cKey )
|
||||
ENDIF
|
||||
//RETURN IIF( cKey IN hHash:Keys, hHash[ cKey ], NIL )
|
||||
RETURN xVal
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* uHTTPD (Micro HTTP server) cookie functions
|
||||
* HTTPSRV (Micro HTTP server) cookie functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -3,13 +3,13 @@
|
||||
#
|
||||
# ------------------------------------
|
||||
# Harbour Project source code:
|
||||
# uHTTPD (Micro HTTP server) ini file
|
||||
# HTTPSRV (Micro HTTP server) ini file
|
||||
#
|
||||
# Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
# www - http://www.harbour-project.org
|
||||
# ------------------------------------
|
||||
#
|
||||
# uHTTPD ini file (defaults are commented)
|
||||
# HTTPSRV ini file (defaults are commented)
|
||||
#
|
||||
# ------------------------------------
|
||||
|
||||
@@ -73,4 +73,3 @@ start_num = 10
|
||||
#/images = $(APP_DIR)/images
|
||||
|
||||
# end
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* uHTTPD (Micro HTTP server)
|
||||
* HTTPSRV (Micro HTTP server)
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* Copyright 2008 Mindaugas Kavaliauskas (dbtopas at dbtopas.lt)
|
||||
@@ -134,7 +134,7 @@
|
||||
#stdout "Dynamic # of threads"
|
||||
#endif
|
||||
|
||||
#define APP_NAME "uhttpd"
|
||||
#define APP_NAME "httpsrv"
|
||||
#define APP_VER_NUM "0.4.4"
|
||||
#define APP_VERSION APP_VER_NUM + APP_GD_SUPPORT + APP_INET_SUPPORT + APP_DT_SUPPORT
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
|
||||
#define LISTEN_PORT 8082 // differs from standard 80 port for tests in case
|
||||
// anyone has a apache/IIS installed
|
||||
#define FILE_STOP ".uhttpd.stop"
|
||||
#define FILE_STOP ".httpsrv.stop"
|
||||
#define FILE_ACCESS_LOG "logs" + HB_OSPathSeparator() + "access.log"
|
||||
#define FILE_ERROR_LOG "logs" + HB_OSPathSeparator() + "error.log"
|
||||
#define DIRECTORYINDEX_ARRAY { "index.html", "index.htm" }
|
||||
@@ -1348,7 +1348,7 @@ STATIC FUNCTION ParseRequest( cRequest )
|
||||
|
||||
// After defined all SERVER vars we can define a session
|
||||
// SESSION - sessions ID is stored as a cookie value, normally as SESSIONID var name (this can be user defined)
|
||||
t_oSession := uhttpd_SessionNew( "UHTTPD-SESSION", s_cSessionPath )
|
||||
t_oSession := uhttpd_SessionNew( "HTTPSRV-SESSION", s_cSessionPath )
|
||||
t_oSession:Start()
|
||||
|
||||
RETURN .T.
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* uHTTPD (Micro HTTP server) [C helper functions]
|
||||
* HTTPSRV (Micro HTTP server) [C helper functions]
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* Copyright 2008 Mindaugas Kavaliauskas (dbtopas at dbtopas.lt)
|
||||
@@ -2,7 +2,9 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
@uhttpd.hbp
|
||||
# httpsrv with GD support
|
||||
|
||||
@httpd.hbp
|
||||
-DGD_SUPPORT
|
||||
-lhbgd -lhbct
|
||||
-lbgd{win}
|
||||
@@ -2,22 +2,22 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
uHTTPD micro web server
|
||||
HTTPSRV micro web server
|
||||
|
||||
Build it without GD: hbmk2 uhttpd.hbp
|
||||
Build it with GD: hbmk2 uhttpdgd.hbp
|
||||
Build it without GD: hbmk2 httpsrv.hbp
|
||||
Build it with GD: hbmk2 httpsrvd.hbp
|
||||
[ This one needs bgd.dll. Please download it from:
|
||||
http://www.libgd.org/releases/gd-latest-win32.zip ]
|
||||
|
||||
Add -DUSE_HB_INET to command line if you want to use Harbour's
|
||||
built-in socket functions.
|
||||
|
||||
To see accepted parameters run: uhttpd -?
|
||||
Parameters can also be defined using uhttpd.ini file.
|
||||
To see accepted parameters run: httpsrv -?
|
||||
Parameters can also be defined using httpsrv.ini file.
|
||||
|
||||
Before starting please build modules using: hbmk2 modules.hbp
|
||||
|
||||
Once started connect to uhttpd using:
|
||||
Once started connect to httpsrv using:
|
||||
http://localhost:8082
|
||||
to see default index page.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* uHTTPD (Micro HTTP server) session functions
|
||||
* HTTPSRV (Micro HTTP server) session functions
|
||||
*
|
||||
* Copyright 2009 Francesco Saverio Giudice <info / at / fsgiudice.com>
|
||||
* www - http://www.harbour-project.org
|
||||
@@ -187,13 +187,6 @@ REQUEST hbmk_KEYW
|
||||
#define HB_ISFIRSTIDCHAR( c ) ( HB_ISALPHA( c ) .OR. ( c ) == '_' )
|
||||
#define HB_ISNEXTIDCHAR( c ) ( HB_ISFIRSTIDCHAR(c) .OR. IsDigit( c ) )
|
||||
|
||||
/* Workaround for dos/djgpp bug */
|
||||
#if defined( __PLATFORM__DOS )
|
||||
#define HB_DIRBASE() StrTran( hb_DirBase(), "/", "\" )
|
||||
#else
|
||||
#define HB_DIRBASE() hb_DirBase()
|
||||
#endif
|
||||
|
||||
/* This requires Set( _SET_EXACT, .F. ) */
|
||||
#define LEFTEQUAL( l, r ) ( l = r )
|
||||
|
||||
@@ -981,10 +974,10 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
IF hbmk[ _HBMK_nHBMODE ] != _HBMODE_RAW_C
|
||||
|
||||
/* Detect system locations to enable shared library option by default */
|
||||
lSysLoc := HB_DIRBASE() == "/usr/local/bin/" .OR. ;
|
||||
HB_DIRBASE() == "/usr/bin/" .OR. ;
|
||||
HB_DIRBASE() == "/opt/harbour/" .OR. ;
|
||||
HB_DIRBASE() == "/opt/bin/"
|
||||
lSysLoc := hb_DirBase() == "/usr/local/bin/" .OR. ;
|
||||
hb_DirBase() == "/usr/bin/" .OR. ;
|
||||
hb_DirBase() == "/opt/harbour/" .OR. ;
|
||||
hb_DirBase() == "/opt/bin/"
|
||||
|
||||
l_cHB_BIN_INSTALL := PathSepToSelf( GetEnv( "HB_BIN_INSTALL" ) )
|
||||
l_cHB_LIB_INSTALL := PathSepToSelf( GetEnv( "HB_LIB_INSTALL" ) )
|
||||
@@ -993,14 +986,14 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
l_cHB_INSTALL_PREFIX := PathSepToSelf( GetEnv( "HB_INSTALL_PREFIX" ) )
|
||||
IF Empty( l_cHB_INSTALL_PREFIX )
|
||||
DO CASE
|
||||
CASE hb_FileExists( DirAddPathSep( HB_DIRBASE() ) + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( HB_DIRBASE() ) + ".."
|
||||
CASE hb_FileExists( DirAddPathSep( HB_DIRBASE() ) + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( HB_DIRBASE() )
|
||||
CASE hb_FileExists( DirAddPathSep( HB_DIRBASE() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( HB_DIRBASE() ) + ".." + hb_osPathSeparator() + ".."
|
||||
CASE hb_FileExists( DirAddPathSep( HB_DIRBASE() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( HB_DIRBASE() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + ".."
|
||||
CASE hb_FileExists( DirAddPathSep( hb_DirBase() ) + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( hb_DirBase() ) + ".."
|
||||
CASE hb_FileExists( DirAddPathSep( hb_DirBase() ) + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( hb_DirBase() )
|
||||
CASE hb_FileExists( DirAddPathSep( hb_DirBase() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( hb_DirBase() ) + ".." + hb_osPathSeparator() + ".."
|
||||
CASE hb_FileExists( DirAddPathSep( hb_DirBase() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + "bin" + hb_osPathSeparator() + cBin_CompPRG + cBinExt )
|
||||
l_cHB_INSTALL_PREFIX := DirAddPathSep( hb_DirBase() ) + ".." + hb_osPathSeparator() + ".." + hb_osPathSeparator() + ".."
|
||||
OTHERWISE
|
||||
hbmk_OutErr( hbmk, I_( "Error: HB_INSTALL_PREFIX not set, failed to autodetect." ) )
|
||||
RETURN 3
|
||||
@@ -2254,25 +2247,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
IF hbmk[ _HBMK_lINC ] .AND. ! Empty( cWorkDir )
|
||||
cOpt_CompC += " {IC} -o {OO}"
|
||||
ELSE
|
||||
/* NOTE: For some reason DJGPP gcc launched from Windows builds
|
||||
(win/dos cross-build scenario using -arch=dos switch)
|
||||
won't work when external script usage is attempted:
|
||||
---
|
||||
gcc.exe: @c:/devl/djgpp/tmp\lxwp3x.cpl: No such file or directory (ENOENT)
|
||||
gcc.exe: no input files
|
||||
---
|
||||
I have no idea why, tried to execute using hb_run(),
|
||||
tried with the same filename parameter as the DOS build
|
||||
generated, to no avail. Interestingly same *gcc in link mode*
|
||||
doesn't suffer from this problem on equal conditions.
|
||||
This hack will introduce command line size limitations,
|
||||
which can be overcome by using -inc hbmk2 switch.
|
||||
[vszakats] */
|
||||
#if defined( __PLATFORM__DOS )
|
||||
cOpt_CompC += " {LC}{SCRIPT}"
|
||||
#else
|
||||
cOpt_CompC += " {LC}"
|
||||
#endif
|
||||
cOpt_CompC += " {LC}"
|
||||
ENDIF
|
||||
cBin_Link := cBin_CompC
|
||||
cOpt_Link := "{LO} {LA} {FL} {DL}{SCRIPT}"
|
||||
@@ -4247,8 +4222,8 @@ STATIC FUNCTION FindInPath( cFileName, cPath )
|
||||
ENDIF
|
||||
|
||||
/* Check in the dir of this executable. */
|
||||
IF ! Empty( HB_DIRBASE() )
|
||||
IF hb_FileExists( cFileName := hb_FNameMerge( HB_DIRBASE(), cName, cExt ) )
|
||||
IF ! Empty( hb_DirBase() )
|
||||
IF hb_FileExists( cFileName := hb_FNameMerge( hb_DirBase(), cName, cExt ) )
|
||||
RETURN cFileName
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -4709,11 +4684,11 @@ STATIC PROCEDURE HBC_ProcessAll( hbmk, lConfigOnly )
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
aCFGDirs := { GetEnv( "HOME" ) + "/.harbour/",;
|
||||
"/etc/harbour",;
|
||||
DirAddPathSep( HB_DIRBASE() ) + "../etc/harbour",;
|
||||
DirAddPathSep( HB_DIRBASE() ) + "../etc",;
|
||||
HB_DIRBASE() }
|
||||
DirAddPathSep( hb_DirBase() ) + "../etc/harbour",;
|
||||
DirAddPathSep( hb_DirBase() ) + "../etc",;
|
||||
hb_DirBase() }
|
||||
#else
|
||||
aCFGDirs := { HB_DIRBASE() }
|
||||
aCFGDirs := { hb_DirBase() }
|
||||
#endif
|
||||
|
||||
FOR EACH cDir IN aCFGDirs
|
||||
@@ -5217,7 +5192,7 @@ STATIC FUNCTION MacroProc( hbmk, cString, cDirParent )
|
||||
|
||||
DO CASE
|
||||
CASE cMacro == "HB_ROOT"
|
||||
cMacro := PathSepToSelf( DirAddPathSep( HB_DIRBASE() ) )
|
||||
cMacro := PathSepToSelf( DirAddPathSep( hb_DirBase() ) )
|
||||
CASE cMacro == "HB_SELF"
|
||||
IF Empty( cDirParent )
|
||||
cMacro := ""
|
||||
@@ -6125,7 +6100,7 @@ STATIC PROCEDURE SetUILang( hbmk )
|
||||
hb_i18n_set( NIL )
|
||||
ELSE
|
||||
tmp := "${hb_root}hbmk2.${lng}.hbl"
|
||||
tmp := StrTran( tmp, "${hb_root}", PathSepToSelf( DirAddPathSep( HB_DIRBASE() ) ) )
|
||||
tmp := StrTran( tmp, "${hb_root}", PathSepToSelf( DirAddPathSep( hb_DirBase() ) ) )
|
||||
tmp := StrTran( tmp, "${lng}", StrTran( hbmk[ _HBMK_cUILNG ], "-", "_" ) )
|
||||
hb_i18n_set( iif( hb_i18n_check( tmp := hb_MemoRead( tmp ) ), hb_i18n_restoretable( tmp ), NIL ) )
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user