2010-07-26 12:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbqt/tests/wvtqt.hbp
* contrib/hbxbp/tests/wvtqt.hbp
! Added missing SVN header.
% Cleanup.
* INSTALL
* contrib/hbpost.hbm
* config/global.mk
* Changed HB_BUILD_IMPLIB to HB_INSTALL_IMPLIB to reflect
new meaning after recent changes. With new build system
the implibs are always created in lib working dir, and
this setting only controls whether to copy it to final
install directory. The default is still 'no'. Setting it
to yes is only recommended if the installation will be
used in local environment (3rd party .dlls) only. IOW
never set this to yes when creating a build for other
users (f.e. for distribution).
INCOMPATIBLE if you used this setting, pls change it now.
* INSTALL
+ Documented HB_STATIC_* options.
* contrib/make.hbs
* Updated TODO list.
* src/debug/debugger.prg
* src/rtl/dirscan.prg
* tests/wcecon.prg
* contrib/xhb/traceprg.prg
* contrib/hbqt/tests/wvtqt.hbp
* contrib/hbqt/generator2/hbqtgen2.prg
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbxbp/tests/dialogqt.prg
* contrib/hbxbp/tests/wvtqt.hbp
* contrib/hbhpdf/tests/harupdf.prg
* contrib/gtwvg/tests/wvgtbrowser.prg
* contrib/gtwvg/tests/wvgwvtclasses.prg
* contrib/hbtip/tests/dbtohtml.prg
* contrib/hbtip/mail.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idetools.prg
* contrib/hbide/idesources.prg
* contrib/hbide/hbide.prg
* examples/uhttpd2/umain.prg
* examples/hbvpdf/tests/pdf_demo.prg
* examples/httpsrv/uhttpd.prg
* examples/httpsrv/cgifunc.prg
* examples/httpsrv/modules/tableservletdb.prg
* examples/httpsrv/session.prg
* HB_OSPATHSEPARATOR() -> HB_PS()
% Delete temp vars along the way.
* utils/hbmk2/hbmk2.prg
+ Generalized internals for support for older Harbour and
xhb versions.
+ Added -hb20 option. (thanks for asking for it so nicely ;)
This commit is contained in:
@@ -707,7 +707,7 @@ RETURN aRetVal
|
||||
PROCEDURE uhttpd_WriteToLogFile( cString, cLog, lCreate )
|
||||
LOCAL nHandle, cSep
|
||||
|
||||
cSep := HB_OsPathSeparator()
|
||||
cSep := hb_ps()
|
||||
|
||||
//DEFAULT cLog TO AppFullPath() + cSep + "logfile.log"
|
||||
DEFAULT cLog TO cSep + "tmp" + cSep + "logfile.log"
|
||||
@@ -751,7 +751,7 @@ FUNCTION uhttpd_SplitFileName( cFile )
|
||||
"UNC" => NIL ;
|
||||
}
|
||||
|
||||
cSep := HB_OsPathSeparator()
|
||||
cSep := hb_ps()
|
||||
|
||||
WITH OBJECT hFile
|
||||
:FULLPATH := IIF( !Empty( :PATH ), IIF( !( Right( :PATH, Len( cSep ) ) == cSep ), :PATH + cSep, :PATH ), "" )
|
||||
@@ -765,7 +765,7 @@ FUNCTION uhttpd_AppFullPath()
|
||||
LOCAL cPrgFullPath := hExeFile:FULLPATH
|
||||
LOCAL cPath, cSep
|
||||
|
||||
cSep := HB_OsPathSeparator()
|
||||
cSep := hb_ps()
|
||||
|
||||
IF Right( cPrgFullPath, Len( cSep ) ) == cSep
|
||||
cPath := SubStr( cPrgFullPath, 1, Len( cPrgFullPath ) - Len( cSep ) )
|
||||
|
||||
@@ -157,7 +157,7 @@ RETURN Self
|
||||
METHOD Open() CLASS TableManager
|
||||
LOCAL cDBF := ::cTable
|
||||
|
||||
//hb_ToOutDebug( "CurPath = %s", hb_CurDrive() + hb_osDriveSeparator() + HB_OSPathSeparator() + CurDir() )
|
||||
//hb_ToOutDebug( "CurPath = %s", hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir() )
|
||||
|
||||
//hb_ToOutDebug( "before: cDBF = %s, Used() = %s\n", cDBF, Used() )
|
||||
|
||||
|
||||
@@ -594,7 +594,7 @@ METHOD SessionRead( cID ) CLASS uhttpd_Session
|
||||
LOCAL nRetry := 0
|
||||
|
||||
DEFAULT cID TO ::cSID
|
||||
cFile := ::cSavePath + HB_OSPathSeparator() + ::cName + "_" + cID
|
||||
cFile := ::cSavePath + hb_ps() + ::cName + "_" + cID
|
||||
//TraceLog( "SessionRead: cFile", cFile )
|
||||
IF File( cFile )
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
@@ -638,7 +638,7 @@ METHOD SessionWrite( cID, cData ) CLASS uhttpd_Session
|
||||
|
||||
nFileSize := Len( cData )
|
||||
|
||||
cFile := ::cSavePath + HB_OSPathSeparator() + ::cName + "_" + cID
|
||||
cFile := ::cSavePath + hb_ps() + ::cName + "_" + cID
|
||||
//TraceLog( "SessionWrite() - cFile", cFile )
|
||||
IF nFileSize > 0
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
@@ -678,7 +678,7 @@ METHOD SessionDestroy( cID ) CLASS uhttpd_Session
|
||||
::oCookie:DeleteCookie( ::cName )
|
||||
|
||||
//TraceLog( "SessionDestroy() - cID, oCGI:h_Session", cID, DumpValue( oCGI:h_Session ) )
|
||||
cFile := ::cSavePath + HB_OSPathSeparator() + ::cName + "_" + cID
|
||||
cFile := ::cSavePath + hb_ps() + ::cName + "_" + cID
|
||||
|
||||
lOk := FALSE
|
||||
DO WHILE nRetry++ <= ::nFileRetry
|
||||
@@ -708,7 +708,7 @@ METHOD SessionGC( nMaxLifeTime ) CLASS uhttpd_Session
|
||||
LOCAL aDir, aFile
|
||||
|
||||
DEFAULT nMaxLifeTime TO ::nGc_MaxLifeTime
|
||||
aDir := Directory( ::cSavePath + HB_OSPathSeparator() + ::cName + "_*.*" )
|
||||
aDir := Directory( ::cSavePath + hb_ps() + ::cName + "_*.*" )
|
||||
|
||||
FOR EACH aFile IN aDir
|
||||
nSecs := TimeDiffAsSeconds( aFile[ F_DATE ], Date(), aFile[ F_TIME ], Time() )
|
||||
@@ -716,7 +716,7 @@ METHOD SessionGC( nMaxLifeTime ) CLASS uhttpd_Session
|
||||
// aFile[ F_NAME ], aFile[ F_DATE ], Date(), aFile[ F_TIME ], Time(), nSecs, nMaxLifeTime )
|
||||
IF nSecs > nMaxLifeTime
|
||||
// No error checking here, because if I cannot delete file now I will find it again on next loop
|
||||
FErase( ::cSavePath + HB_OSPathSeparator() + aFile[ F_NAME ] )
|
||||
FErase( ::cSavePath + hb_ps() + aFile[ F_NAME ] )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
#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_ACCESS_LOG "logs" + HB_OSPathSeparator() + "access.log"
|
||||
#define FILE_ERROR_LOG "logs" + HB_OSPathSeparator() + "error.log"
|
||||
#define FILE_ACCESS_LOG "logs" + hb_ps() + "access.log"
|
||||
#define FILE_ERROR_LOG "logs" + hb_ps() + "error.log"
|
||||
#define DIRECTORYINDEX_ARRAY { "index.html", "index.htm" }
|
||||
|
||||
#define PAGE_STATUS_REFRESH 5
|
||||
@@ -235,7 +235,7 @@ FUNCTION MAIN( ... )
|
||||
|
||||
// defaults not changeble via ini file
|
||||
lStop := FALSE
|
||||
cConfig := EXE_Path() + hb_OSPathSeparator() + APP_NAME + ".ini"
|
||||
cConfig := EXE_Path() + hb_ps() + APP_NAME + ".ini"
|
||||
lConsole := TRUE
|
||||
nStartServiceThreads := START_SERVICE_THREADS
|
||||
|
||||
@@ -1474,21 +1474,21 @@ STATIC FUNCTION CGIExec( cProc, /*@*/ cOutPut )
|
||||
// No hIn, hErr == hOut
|
||||
|
||||
// save current directory
|
||||
cCurPath := hb_CurDrive() + hb_osDriveSeparator() + HB_OSPathSeparator() + CurDir()
|
||||
cCurPath := hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir()
|
||||
|
||||
//hb_toOutDebug( "cCurPath: %s\n\r", cCurPath )
|
||||
|
||||
// Change dir to document root
|
||||
DirChange( s_cDocumentRoot )
|
||||
|
||||
//hb_toOutDebug( "New Path: %s\n\r", hb_CurDrive() + hb_osDriveSeparator() + HB_OSPathSeparator() + CurDir() )
|
||||
//hb_toOutDebug( "New Path: %s\n\r", hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir() )
|
||||
|
||||
hProc := hb_processOpen( cProc, @hIn, @hOut, @hOut, .T. ) // .T. = Detached Process (Hide Window)
|
||||
|
||||
// return to original folder
|
||||
DirChange( cCurPath )
|
||||
|
||||
//hb_toOutDebug( "New 2 Path: %s\n\r", hb_CurDrive() + hb_osDriveSeparator() + HB_OSPathSeparator() + CurDir() )
|
||||
//hb_toOutDebug( "New 2 Path: %s\n\r", hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir() )
|
||||
|
||||
IF hProc > -1
|
||||
//hb_toOutDebug( "Process handler: %s\n\r", hProc )
|
||||
@@ -1619,8 +1619,8 @@ STATIC FUNCTION CGIKill( hProc, hmtxCGIKill )
|
||||
********************************************************************/
|
||||
|
||||
FUNCTION uhttpd_OSFileName( cFileName )
|
||||
IF HB_OSPathSeparator() != "/"
|
||||
RETURN STRTRAN( cFileName, "/", HB_OSPathSeparator() )
|
||||
IF hb_ps() != "/"
|
||||
RETURN STRTRAN( cFileName, "/", hb_ps() )
|
||||
ENDIF
|
||||
RETURN cFileName
|
||||
|
||||
@@ -2164,7 +2164,7 @@ STATIC PROCEDURE SysSettings()
|
||||
|
||||
STATIC FUNCTION Exe_Path()
|
||||
LOCAL cPath := hb_argv( 0 )
|
||||
LOCAL nPos := RAt( HB_OSPathSeparator(), cPath )
|
||||
LOCAL nPos := RAt( hb_ps(), cPath )
|
||||
IF nPos == 0
|
||||
cPath := ""
|
||||
ELSE
|
||||
@@ -2174,7 +2174,7 @@ STATIC FUNCTION Exe_Path()
|
||||
|
||||
STATIC FUNCTION Exe_Name()
|
||||
LOCAL cPrg := hb_argv( 0 )
|
||||
LOCAL nPos := RAt( HB_OSPathSeparator(), cPrg )
|
||||
LOCAL nPos := RAt( hb_ps(), cPrg )
|
||||
IF nPos > 0
|
||||
cPrg := SubStr( cPrg, nPos+1 )
|
||||
ENDIF
|
||||
@@ -2248,10 +2248,10 @@ STATIC FUNCTION ParseIni( cConfig )
|
||||
"MAIN" => { ;
|
||||
"PORT" => LISTEN_PORT ,;
|
||||
"APPLICATION_ROOT" => EXE_Path() ,;
|
||||
"DOCUMENT_ROOT" => EXE_Path() + HB_OSPathSeparator() + "home" ,;
|
||||
"DOCUMENT_ROOT" => EXE_Path() + hb_ps() + "home" ,;
|
||||
"SHOW_INDEXES" => FALSE ,;
|
||||
"SCRIPTALIASMIXEDCASE" => TRUE ,;
|
||||
"SESSIONPATH" => EXE_Path() + HB_OSPathSeparator() + "sessions" ,;
|
||||
"SESSIONPATH" => EXE_Path() + hb_ps() + "sessions" ,;
|
||||
"DIRECTORYINDEX" => DIRECTORYINDEX_ARRAY ,;
|
||||
"CONSOLE-ROWS" => MaxRow() + 1 ,;
|
||||
"CONSOLE-COLS" => MaxCol() + 1 ;
|
||||
@@ -2673,7 +2673,7 @@ STATIC FUNCTION Handler_HrbScript( cFileName )
|
||||
IF !EMPTY( pHRB := HB_HRBLOAD( cHRBBody ) )
|
||||
|
||||
// save current directory
|
||||
cCurPath := hb_CurDrive() + hb_osDriveSeparator() + HB_OSPathSeparator() + CurDir()
|
||||
cCurPath := hb_CurDrive() + hb_osDriveSeparator() + hb_ps() + CurDir()
|
||||
// Change dir to document root
|
||||
DirChange( s_cDocumentRoot )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user