diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index 1cc962a1b2..c502dd4e07 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,29 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-02-21 23:31 UTC+0100 Viktor Szakats (harbour syenar.net) + * src/compiler/ppcomp.c + + '#pragma nostartproc=' / '#pragma -n' will now return + a permanent error. The compiler doesn't support (for + longer than I can remember) on the fly modifying this + option. Reading the option continues to be supported. + [INCOMPATIBLE] in that t now will generate an error + instead of being silently ignored. + + * doc/pragma.txt + * marked 'nostartproc' #pragma as read-only + * example to feature another pragma instead of 'nostartproc' + + * utils/hbmk2/hbmk2.prg + * FuncNameEncode(): minor code cleanup + + * doc/gtapi.txt + * doc/pragma.txt + * date formatting + + * ChangeLog + * closed two recent TOFIXes + 2013-02-21 17:52 UTC+0100 Viktor Szakats (harbour syenar.net) * utils/hbmk2/hbmk2.hbp * utils/hbmk2/hbmk2.prg @@ -97,6 +120,7 @@ This fixes: 'hbmk2 1.prg' ; TOFIX: ? hb_compGenCFunc() in src/compiler to encode the first character of a function if it's a digit. + [FINE AS IT IS] * doc/pragma.txt * src/pp/ppcore.c @@ -120,6 +144,7 @@ --- $ harbour test_n2 $ harbour test_n2 -n2 + [DONE] * README.txt * minor sync with hbmk2 help diff --git a/harbour/doc/gtapi.txt b/harbour/doc/gtapi.txt index fe2994ca78..f14fb9b1a8 100644 --- a/harbour/doc/gtapi.txt +++ b/harbour/doc/gtapi.txt @@ -4,7 +4,7 @@ GT API functions ================ -By Bil Simser (Fri, 14 May 1999) +By Bil Simser (1999.05.14) Using the gt API requires two steps. The gt API interface is kept in gtapi.c. This houses the gt API and diff --git a/harbour/doc/pragma.txt b/harbour/doc/pragma.txt index b548923a09..d8b1eda71f 100644 --- a/harbour/doc/pragma.txt +++ b/harbour/doc/pragma.txt @@ -50,7 +50,7 @@ This is the list of the supported commands and switches: * ESCAPEDSTRINGS = * EXITSEVERITY = -es * LINENUMBER = -l<+/-> - * NOSTARTPROC = -n + * NOSTARTPROC = -n (read-only) * PREPROCESSING = -p<+/-> * SHORTCUT = -z<+/-> * TEXTHIDDEN = @@ -76,18 +76,15 @@ preprocessor. EXAMPLES ======== -#pragma NoStartProc=0 -/* #pragma /N- */ +#pragma linenumber=off +/* #pragma -l */ -FUNCTION Test() - RETURN NIL - -This is the same as calling Harbour with the -n switch in the command line, +This is the same as calling Harbour with the -l switch in the command line, but with the great benefit that if you forgot to pass the switch, it will be used anyway because it is included inside the source. =========== -Dec 1, 1999 +1999.12.01 Regards, Jose Lalin diff --git a/harbour/src/compiler/ppcomp.c b/harbour/src/compiler/ppcomp.c index 17282fbc44..2702b2b7a3 100644 --- a/harbour/src/compiler/ppcomp.c +++ b/harbour/src/compiler/ppcomp.c @@ -168,12 +168,7 @@ static HB_BOOL hb_pp_CompilerSwitch( void * cargo, const char * szSwitch, case 'n': case 'N': if( fSet ) - { - if( iValue >= 0 && iValue <= 2 ) - HB_COMP_PARAM->iStartProc = iValue; - else - fError = HB_TRUE; - } + fError = HB_TRUE; else iValue = HB_COMP_PARAM->iStartProc; break; diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 5d1b6aebe5..819f0da5df 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -11442,8 +11442,10 @@ STATIC FUNCTION FuncNameEncode( cName ) cResult := "" FOR nPos := 1 TO hb_BLen( cName ) c := hb_BSubStr( cName, nPos, 1 ) - IF c == "_" .OR. hb_asciiIsAlpha( c ) .OR. ; - hb_asciiIsDigit( c ) /* synced to how Harbour compiler works (see hb_compGenCFunc()). In theory should be: ( ! cResult == "" .AND. hb_asciiIsDigit( c ) ) */ + /* synced to how Harbour compiler actually works (see hb_compGenCFunc()). + Theoretically, it should work like this: + iif( cResult == "", HB_ISFIRSTIDCHAR( c ), HB_ISNEXTIDCHAR( c ) ) */ + IF HB_ISNEXTIDCHAR( c ) cResult += c ELSE cResult += "x" + Lower( hb_NumToHex( Asc( c ), 2 ) )