From b24f64d01e5d3e082f6c9482165ed9d4a493aa14 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 4 Aug 2008 21:46:08 +0000 Subject: [PATCH] 2008-08-04 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * utils/hbdot/hbdot.prg + hbdot is now able to run .hrb files too, by doing a check on the extension, similar to hbrun. --- harbour/ChangeLog | 5 +++++ harbour/utils/hbdot/hbdot.prg | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 69cff7597a..33787e1ca3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-08-04 22:28 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * utils/hbdot/hbdot.prg + + hbdot is now able to run .hrb files too, by doing a check + on the extension, similar to hbrun. + 2008-08-04 22:31 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/make_gcc.mak ! fixed SPACEs used instead of TAB in clean command diff --git a/harbour/utils/hbdot/hbdot.prg b/harbour/utils/hbdot/hbdot.prg index 0f5d4fc9c8..cafe7a3098 100644 --- a/harbour/utils/hbdot/hbdot.prg +++ b/harbour/utils/hbdot/hbdot.prg @@ -69,6 +69,7 @@ PROCEDURE _APPMAIN( cFile, ... ) LOCAL GetList, cLine, cCommand, cPath, nMaxRow, nMaxCol LOCAL aHistory, nHistIndex LOCAL bKeyUP, bKeyDown, bKeyIns + LOCAL cExt #ifdef _DEFAULT_INC_DIR AADD( s_aIncDir, "-I" + _DEFAULT_INC_DIR ) @@ -93,14 +94,21 @@ PROCEDURE _APPMAIN( cFile, ... ) HB_DotUsage() EXIT OTHERWISE - cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n", "-w", "-es2", "-q0", ; - s_aIncDir, cFile ) - IF cFile == NIL - ERRORLEVEL( 1 ) + + hb_FNameSplit( cFile, NIL, NIL, @cExt ) + + IF Lower( cExt ) == ".prg" + cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n", "-w", "-es2", "-q0", ; + s_aIncDir, cFile ) + IF cFile == NIL + ERRORLEVEL( 1 ) + ELSE + __hrbRun( cFile, ... ) + ENDIF ELSE __hrbRun( cFile, ... ) ENDIF - END + ENDSWITCH ELSE CLEAR SCREEN