diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 286e893aa7..e2b587cdd1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,18 +16,28 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-27 20:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * config/global.mk + ! HB_INSTALL_PREFIX now defaults to /opt/harbour (instead of /usr/local) + on darwin systems. (not tested) + /opt/local is for MacPorts, plus /opt/harbour is the location + hardcoded into hbmk2 for .hbc autofind, so I opted for the latter. + + * contrib/hbhttpd/core.prg + * Formatting. + 2010-11-27 11:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbhttpd/core.prg * contrib/hbhttpd/tests/webapp.prg * contrib/hbhttpd/readme.txt * contrib/hbhttpd/widgets.prg - ! Fixed RTE when trying to open an directory which + ! Fixed RTE when trying to open a directory which is not a mount point. * Renamed server:aMount -> hMount * Formatting. * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp - * HB_TR_ALWAYS -> HB_TR_DEBUG + ! HB_TR_ALWAYS -> HB_TR_DEBUG 2010-11-26 13:44 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * include/hbapi.h diff --git a/harbour/config/global.mk b/harbour/config/global.mk index f3ee30855e..6f220a5d9e 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -1543,7 +1543,11 @@ else else ifneq ($(HB_HOST_PLAT_UNIX),) # Stick to *nix customs. I do not like it, it needs admin. - HB_INSTALL_PREFIX := /usr/local + ifeq ($(HB_HOST_PLAT),darwin) + HB_INSTALL_PREFIX := /opt/harbour + else + HB_INSTALL_PREFIX := /usr/local + endif # Add postfix for cross builds ifneq ($(HB_HOST_PLAT),$(HB_PLATFORM)) HB_INSTALL_PREFIX := $(HB_INSTALL_PREFIX)/harbour-$(HB_PLATFORM)-$(HB_COMPILER) diff --git a/harbour/contrib/hbhttpd/core.prg b/harbour/contrib/hbhttpd/core.prg index d314212d14..1ee9901ad4 100644 --- a/harbour/contrib/hbhttpd/core.prg +++ b/harbour/contrib/hbhttpd/core.prg @@ -113,7 +113,8 @@ METHOD RUN() CLASS UHttpd IF Empty( hSocket := hb_socketAccept( Self:hListen,, 1000 ) ) IF hb_socketGetError() == HB_SOCKET_ERR_TIMEOUT Eval( Self:bIdle, Self ) - IF Self:lStop; EXIT + IF Self:lStop + EXIT ENDIF ELSE Self:LogError( "[error] Accept error " + hb_ntos( hb_socketGetError() ) ) @@ -269,7 +270,8 @@ STATIC FUNCTION ProcessConnection( oServer ) UAddHeader( "Connection", "keep-alive" ) ENDIF ENDIF - IF ! ProcessRequest( oServer, hSocket ); BREAK + IF ! ProcessRequest( oServer, hSocket ) + BREAK ENDIF ENDIF ELSE /* We do not support another protocols */ @@ -754,7 +756,7 @@ STATIC FUNCTION ErrDescCode( nCode ) "BADALIAS", "DUPALIAS" , NIL , "CREATE" , "OPEN" , "CLOSE" , "READ" , "WRITE" , ; // 17, 18, 19, 20, 21, 22, 23, 24 "PRINT" , NIL , NIL , NIL , NIL , "UNSUPPORTED", "LIMIT" , "CORRUPTION" , ; // 25, 26 - 29, 30, 31, 32 "DATATYPE", "DATAWIDTH", "NOTABLE" , "NOORDER" , "SHARED" , "UNLOCKED" , "READONLY", "APPENDLOCK" , ; // 33, 34, 35, 36, 37, 38, 39, 40 - "LOCK" }[nCode] // 41 + "LOCK" }[ nCode ] // 41 ENDIF RETURN iif( cI == NIL, "", "EG_" + cI ) @@ -794,7 +796,8 @@ PROCEDURE UAddHeader( cType, cValue ) PROCEDURE URedirect( cURL, nCode ) - IF nCode == NIL; nCode := 303 + IF nCode == NIL + nCode := 303 ENDIF USetStatusCode( nCode ) UAddHeader( "Location", cURL ) @@ -867,10 +870,11 @@ FUNCTION UUrlDecode( cString ) nI := 1 DO WHILE nI <= Len( cString ) nI := HB_AT( "%", cString, nI ) - IF nI == 0; EXIT + IF nI == 0 + EXIT ENDIF IF Upper( SubStr( cString, nI + 1, 1 ) ) $ "0123456789ABCDEF" .AND. ; - Upper( SubStr( cString, nI + 2, 1 ) ) $ "0123456789ABCDEF" + Upper( SubStr( cString, nI + 2, 1 ) ) $ "0123456789ABCDEF" cString := Stuff( cString, nI, 3, HB_HexToStr( SubStr(cString, nI + 1, 2 ) ) ) ENDIF nI++ @@ -1027,27 +1031,27 @@ PROCEDURE UProcInfo() UWrite( '

Capabilities

' ) UWrite( '' ) - UWrite( '' ) + UWrite( '' ) UWrite( '
RDD' + UHtmlEncode( uhttpd_join(", ", rddList() ) ) + '
RDD' + UHtmlEncode( uhttpd_join( ", ", rddList() ) ) + '
' ) UWrite( '

Variables

' ) UWrite( '

server

' ) UWrite( '' ) - HB_HEval( server, {|k, v| UWrite( '' ) } ) + HB_HEval( server, {|k, v| UWrite( '' ) } ) UWrite( '
' + k + '' + UHtmlEncode(HB_CStr(v ) ) + '
' + k + '' + UHtmlEncode( HB_CStr(v ) ) + '
' ) IF !Empty( get ) UWrite( '

get

' ) UWrite( '' ) - HB_HEval( get, {|k, v| UWrite( '' ) } ) + HB_HEval( get, {|k, v| UWrite( '' ) } ) UWrite( '
' + k + '' + UHtmlEncode(HB_CStr(v ) ) + '
' + k + '' + UHtmlEncode( HB_CStr(v ) ) + '
' ) ENDIF IF !Empty( post ) UWrite( '

post

' ) UWrite( '' ) - HB_HEval( post, {|k, v| UWrite( '' ) } ) + HB_HEval( post, {|k, v| UWrite( '' ) } ) UWrite( '
' + k + '' + UHtmlEncode(HB_CStr(v ) ) + '
' + k + '' + UHtmlEncode( HB_CStr(v ) ) + '
' ) ENDIF