diff --git a/.gitattributes b/.gitattributes index 1dfbe24118..581c073f6f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -25,6 +25,7 @@ ChangeLog.txt ident *.ini text *.js text *.m text +*.md text *.mft text *.mk text *.nsi text diff --git a/ChangeLog.txt b/ChangeLog.txt index 022af2f1b4..78789f8db0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,15 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-17 10:21 UTC+0100 Viktor Szakats (harbour syenar.net) + * .gitattributes + + added .md + + * contrib/hbrun/hbrun.md + * utils/hbmk2/hbmk2.prg + * show 'hbrun' instead of 'hbmk2' when outputting + hbrun help + 2013-03-16 18:47 UTC+0100 Viktor Szakats (harbour syenar.net) * README.txt + added links to hbmk2 and hbrun help diff --git a/contrib/hbrun/hbrun.md b/contrib/hbrun/hbrun.md index a6109fcfb2..bb4f92b74d 100644 --- a/contrib/hbrun/hbrun.md +++ b/contrib/hbrun/hbrun.md @@ -5,12 +5,12 @@ Copyright \(c\) 2003\-2007, Przemysław Czerpak Syntax: - hbmk2 <file\[\.hb|\.prg|\.hrb|\.dbf\]>|<option> \[parameters\[s\]\] + hbrun <file\[\.hb|\.prg|\.hrb|\.dbf\]>|<option> \[parameters\[s\]\] Description: - hbmk2 is able to run Harbour scripts \(both source and precompiled\), and it also features an interactive shell prompt\. + hbrun is able to run Harbour scripts \(both source and precompiled\), and it also features an interactive shell prompt\. Options below are available on command\-line: @@ -25,7 +25,7 @@ Files: - **\*\.hb** Harbour script - **\*\.hrb** Harbour portable binary \(aka precompiled Harbour script\) - - **hbstart\.hb** startup Harbour script for interactive Harbour shell\. It gets executed automatically on shell startup, if present\. Possible locations \(in order of precedence\) \[\*\]: \.\\, %APPDATA%\\\.harbour, <hbmk2 directory> + - **hbstart\.hb** startup Harbour script for interactive Harbour shell\. It gets executed automatically on shell startup, if present\. Possible locations \(in order of precedence\) \[\*\]: \.\\, %APPDATA%\\\.harbour, <hbrun directory> - **shell plugins** \.hb and \.hrb plugins for interactive Harbour shell\. They may reside in \[\*\]: %APPDATA%\\\.harbour\\ - **\.hb\_history** stores command history for interactive Harbour shell\. You can disable history by making the first line 'no' \(without quotes and with newline\)\. Resides in \[\*\]: %APPDATA%\\\.harbour\\ - **hb\_extension** list of extensions to load in interactive Harbour shell\. One extension per line, part of line beyond a '\#' character is ignored\. Alternate filename on MS\-DOS: hb\_ext\.ini\. Resides in \[\*\]: %APPDATA%\\\.harbour\\ diff --git a/utils/hbmk2/hbmk2.prg b/utils/hbmk2/hbmk2.prg index de653e3e56..cf5b55ba32 100644 --- a/utils/hbmk2/hbmk2.prg +++ b/utils/hbmk2/hbmk2.prg @@ -10438,7 +10438,9 @@ STATIC FUNCTION EnvNotation( cEnvName ) RETURN "$" + cEnvName #endif -STATIC FUNCTION AutoConfPathList( lCWD, lForDocOutput ) +#define SELF_NAME() iif( hbmk[ _HBMK_lShellMode ], iif( hb_FNameName( hb_ProgName() ) == _SELF_NAME_, "hbrun", hb_FNameName( hb_ProgName() ) ), _SELF_NAME_ ) + +STATIC FUNCTION AutoConfPathList( hbmk, lCWD, lForDocOutput ) LOCAL aPath := {} @@ -10463,8 +10465,8 @@ STATIC FUNCTION AutoConfPathList( lCWD, lForDocOutput ) #if defined( __PLATFORM__UNIX ) AAdd( aPath, "/etc/harbour" ) IF lForDocOutput - AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), _SELF_NAME_ ) + hb_ps() + "../etc/harbour" ) - AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), _SELF_NAME_ ) + hb_ps() + "../etc" ) + AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), SELF_NAME() ) + hb_ps() + "../etc/harbour" ) + AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), SELF_NAME() ) + hb_ps() + "../etc" ) ELSE AAdd( aPath, hb_DirSepAdd( hb_DirBase() ) + "../etc/harbour" ) AAdd( aPath, hb_DirSepAdd( hb_DirBase() ) + "../etc" ) @@ -10472,7 +10474,7 @@ STATIC FUNCTION AutoConfPathList( lCWD, lForDocOutput ) #endif IF lForDocOutput - AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), _SELF_NAME_ ) ) + AAdd( aPath, hb_StrFormat( I_( "<%1$s directory>" ), SELF_NAME() ) ) ELSE AAdd( aPath, hb_DirBase() ) ENDIF @@ -10484,7 +10486,7 @@ STATIC PROCEDURE HBC_ProcessAuto( hbmk ) LOCAL cDir LOCAL cFileName - FOR EACH cDir IN AutoConfPathList( .F. ) + FOR EACH cDir IN AutoConfPathList( hbmk, .F. ) IF hb_FileExists( cFileName := ( hb_PathNormalize( hb_DirSepAdd( cDir ) ) + _HBMK_AUTOHBC_NAME ) ) IF ! hbmk[ _HBMK_lQuiet ] _hbmk_OutStd( hbmk, hb_StrFormat( I_( "Processing configuration: %1$s" ), cFileName ) ) @@ -14354,12 +14356,12 @@ STATIC PROCEDURE __hbshell_plugins_unload( plugins ) #define _HBMK_AUTOSHELL_NAME "hbstart.hb" -STATIC PROCEDURE __hbshell_ProcessStart() +STATIC PROCEDURE __hbshell_ProcessStart( hbmk ) LOCAL cDir LOCAL cFileName - FOR EACH cDir IN AutoConfPathList( .T. ) + FOR EACH cDir IN AutoConfPathList( hbmk, .T. ) IF hb_FileExists( cFileName := ( hb_PathNormalize( hb_DirSepAdd( cDir ) ) + _HBMK_AUTOSHELL_NAME ) ) __hbshell_Exec( hb_MemoRead( cFileName ) ) EXIT @@ -14413,7 +14415,7 @@ STATIC PROCEDURE __hbshell_prompt( aParams, aCommand ) __hbshell_Exec( "?? hb_Version()" ) - __hbshell_ProcessStart() + __hbshell_ProcessStart( hbsh[ _HBSH_hbmk ] ) IF HB_ISARRAY( aCommand ) FOR EACH cCommand IN aCommand @@ -15629,10 +15631,12 @@ STATIC PROCEDURE ShowHelp( hbmk, lMore, lLong ) "", ; hb_StrFormat( I_( " %1$s [options] [] " ), _SELF_NAME_ ) } + LOCAL cShell := iif( hb_FNameName( hb_ProgName() ) == _SELF_NAME_, "hbrun", hb_FNameName( hb_ProgName() ) ) + LOCAL aHdr_Syntax_Shell := { ; I_( "Syntax:" ), ; "", ; - hb_StrFormat( I_( " %1$s |