2009-01-31 12:35 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* utils/hbrun/hbrun.prg
    + If a .dbf file is passed on the command line, hbrun will
      open it.

  * contrib/examples/uhttpd/hbmk_vc.bat
    * Updated.

  * contrib/examples/uhttpd/hbmk_b32.bat
    % Minor opt.
This commit is contained in:
Viktor Szakats
2009-01-31 11:36:43 +00:00
parent 23ee7ce5f0
commit a97b596105
4 changed files with 106 additions and 84 deletions

View File

@@ -8,6 +8,17 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-01-31 12:35 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* utils/hbrun/hbrun.prg
+ If a .dbf file is passed on the command line, hbrun will
open it.
* contrib/examples/uhttpd/hbmk_vc.bat
* Updated.
* contrib/examples/uhttpd/hbmk_b32.bat
% Minor opt.
2009-01-30 20:19 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gcc.mak
! added additional rules to fix time conditions in parallel compilation

View File

@@ -46,11 +46,7 @@ if %UHTTP_INET_SUPPORT%.==no. SET UHTTP_INET_SOCKET=socket.c
if exist uhttpd.exe uhttpd -s
..\..\..\bin\harbour uhttpd /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
if errorlevel 1 goto DOERROR
..\..\..\bin\harbour cgifunc /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
if errorlevel 1 goto DOERROR
..\..\..\bin\harbour cookie /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
..\..\..\bin\harbour uhttpd cgifunc cookie /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
if errorlevel 1 goto DOERROR
bcc32 -O2 -tW -d -a8 -I..\..\..\include -L..\..\..\lib uhttpd.c cgifunc.c cookie.c uhttpdc.c %UHTTP_INET_SOCKET% hbdebug.lib hbvmmt.lib hbrtl.lib gtwvt.lib gtwin.lib gtgui.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbcpage.lib hbsix.lib hbcommon.lib hbpcre.lib hbhsx.lib hbzlib.lib xhb.lib hbct.lib cw32mt.lib %UHTTP_GD_LIBS%
if errorlevel 1 goto DOERROR

View File

@@ -46,9 +46,9 @@ if %UHTTP_INET_SUPPORT%.==no. SET UHTTP_INET_SOCKET=socket.c
if exist uhttpd.exe uhttpd -s
..\..\..\bin\harbour uhttpd /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
..\..\..\bin\harbour uhttpd cgifunc cookie /n /es2 /w3 /i..\..\..\include %UHTTP_GD_DEF% %UHTTP_INET_DEF%
if errorlevel 1 goto DOERROR
cl -nologo -O2 -W3 -I..\..\..\include uhttpd.c uhttpdc.c %UHTTP_INET_SOCKET% /link /subsystem:windows /libpath:..\..\..\lib hbcpage.lib hbdebug.lib hbvmmt.lib hbrtl.lib gtwin.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib wsock32.lib advapi32.lib hbct.lib gdi32.lib hbwin.lib hbhsx.lib gtwvt.lib %UHTTP_GD_LIBS% xhb.lib
cl -nologo -O2 -W3 -I..\..\..\include uhttpd.c cgifunc.c cookie.c uhttpdc.c %UHTTP_INET_SOCKET% /link /subsystem:windows /libpath:..\..\..\lib hbcpage.lib hbdebug.lib hbvmmt.lib hbrtl.lib gtwin.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib wsock32.lib advapi32.lib hbct.lib gdi32.lib hbwin.lib hbhsx.lib gtwvt.lib %UHTTP_GD_LIBS% xhb.lib
if errorlevel 1 goto DOERROR
:CLEAN

View File

@@ -77,11 +77,7 @@ STATIC s_aIncDir := {}
/* ********************************************************************** */
PROCEDURE _APPMAIN( cFile, ... )
LOCAL GetList
LOCAL cLine, cCommand, cPath, cExt
LOCAL nMaxRow, nMaxCol
LOCAL aHistory, nHistIndex
LOCAL bKeyUP, bKeyDown, bKeyIns
LOCAL cPath, cExt
#ifdef _DEFAULT_INC_DIR
AADD( s_aIncDir, "-I" + _DEFAULT_INC_DIR )
@@ -114,87 +110,106 @@ PROCEDURE _APPMAIN( cFile, ... )
ELSE
hb_hrbRun( cFile, ... )
ENDIF
ELSEIF Lower( cExt ) == ".dbf"
HB_DotPrompt( "USE " + cFile )
ELSE
hb_hrbRun( cFile, ... )
ENDIF
ENDSWITCH
ELSE
CLEAR SCREEN
SET SCOREBOARD OFF
GetList := {}
cCommand := ""
aHistory := { padr( "quit", HB_LINE_LEN ) }
nHistIndex := 2
DO WHILE .T.
IF cLine == NIL
cLine := Space( HB_LINE_LEN )
ENDIF
HB_DotInfo( cCommand )
nMaxRow := MaxRow()
nMaxCol := MaxCol()
@ nMaxRow, 0 SAY HB_PROMPT
@ nMaxRow, Col() GET cLine ;
PICTURE "@KS" + hb_NToS( nMaxCol - Col() + 1 )
SetCursor( IIF( ReadInsert(), SC_INSERT, SC_NORMAL ) )
bKeyIns := SetKey( K_INS, ;
{|| SetCursor( IIF( ReadInsert( !ReadInsert() ), ;
SC_NORMAL, SC_INSERT ) ) } )
bKeyUp := SetKey( K_UP, ;
{|| IIF( nHistIndex > 1, ;
cLine := aHistory[ --nHistIndex ], ) } )
bKeyDown := SetKey( K_DOWN, ;
{|| cLine := IIF( nHistIndex < LEN( aHistory ), ;
aHistory[ ++nHistIndex ], ;
( nHistIndex := LEN( aHistory ) + 1, Space( HB_LINE_LEN ) ) ) } )
READ
SetKey( K_DOWN, bKeyDown )
SetKey( K_UP, bKeyUp )
SetKey( K_INS, bKeyIns )
IF LastKey() == K_ESC .OR. EMPTY( cLine )
cLine := NIL
IF nMaxRow != MaxRow() .OR. nMaxCol != MaxCol()
@ nMaxRow, 0 CLEAR
ENDIF
LOOP
ENDIF
IF EMPTY( aHistory ) .OR. ! ATAIL( aHistory ) == cLine
IF LEN( aHistory ) < HB_HISTORY_LEN
AADD( aHistory, cLine )
ELSE
ADEL( aHistory, 1 )
aHistory[ LEN( aHistory ) ] := cLine
ENDIF
ENDIF
nHistIndex := LEN( aHistory ) + 1
cCommand := AllTrim( cLine, " " )
cLine := NIL
@ nMaxRow, 0 CLEAR
HB_DotInfo( cCommand )
HB_DotExec( cCommand )
IF s_nRow >= MaxRow()
Scroll( 2, 0, MaxRow(), MaxCol(), 1 )
s_nRow := MaxRow() - 1
ENDIF
ENDDO
HB_DotPrompt()
ENDIF
RETURN
STATIC PROCEDURE HB_DotPrompt( cCommand )
LOCAL GetList
LOCAL cLine
LOCAL nMaxRow, nMaxCol
LOCAL aHistory, nHistIndex
LOCAL bKeyUP, bKeyDown, bKeyIns
CLEAR SCREEN
SET SCOREBOARD OFF
GetList := {}
aHistory := { padr( "quit", HB_LINE_LEN ) }
nHistIndex := 2
IF ISCHARACTER( cCommand )
AADD( aHistory, PadR( cCommand, HB_LINE_LEN ) )
HB_DotInfo( cCommand )
HB_DotExec( cCommand )
ELSE
cCommand := ""
ENDIF
DO WHILE .T.
IF cLine == NIL
cLine := Space( HB_LINE_LEN )
ENDIF
HB_DotInfo( cCommand )
nMaxRow := MaxRow()
nMaxCol := MaxCol()
@ nMaxRow, 0 SAY HB_PROMPT
@ nMaxRow, Col() GET cLine ;
PICTURE "@KS" + hb_NToS( nMaxCol - Col() + 1 )
SetCursor( IIF( ReadInsert(), SC_INSERT, SC_NORMAL ) )
bKeyIns := SetKey( K_INS, ;
{|| SetCursor( IIF( ReadInsert( !ReadInsert() ), ;
SC_NORMAL, SC_INSERT ) ) } )
bKeyUp := SetKey( K_UP, ;
{|| IIF( nHistIndex > 1, ;
cLine := aHistory[ --nHistIndex ], ) } )
bKeyDown := SetKey( K_DOWN, ;
{|| cLine := IIF( nHistIndex < LEN( aHistory ), ;
aHistory[ ++nHistIndex ], ;
( nHistIndex := LEN( aHistory ) + 1, Space( HB_LINE_LEN ) ) ) } )
READ
SetKey( K_DOWN, bKeyDown )
SetKey( K_UP, bKeyUp )
SetKey( K_INS, bKeyIns )
IF LastKey() == K_ESC .OR. EMPTY( cLine )
cLine := NIL
IF nMaxRow != MaxRow() .OR. nMaxCol != MaxCol()
@ nMaxRow, 0 CLEAR
ENDIF
LOOP
ENDIF
IF EMPTY( aHistory ) .OR. ! ATAIL( aHistory ) == cLine
IF LEN( aHistory ) < HB_HISTORY_LEN
AADD( aHistory, cLine )
ELSE
ADEL( aHistory, 1 )
aHistory[ LEN( aHistory ) ] := cLine
ENDIF
ENDIF
nHistIndex := LEN( aHistory ) + 1
cCommand := AllTrim( cLine, " " )
cLine := NIL
@ nMaxRow, 0 CLEAR
HB_DotInfo( cCommand )
HB_DotExec( cCommand )
IF s_nRow >= MaxRow()
Scroll( 2, 0, MaxRow(), MaxCol(), 1 )
s_nRow := MaxRow() - 1
ENDIF
ENDDO
RETURN
/* ********************************************************************** */
STATIC PROCEDURE HB_DotUsage()