2012-10-19 21:21 UTC+0200 Viktor Szakats (harbour syenar.net)

* utils/hbmk2/hbmk2.prg
    * avoid splitting branching statements with #if branches
      to make it easy for hbformat to do its job.
      (patched hbformat still fails around line 3900)

  * contrib/xhb/htmutil.prg
    + TOFIX added for unicode incompatible Greek CP conversion 
      (from what to what it's not marked)
This commit is contained in:
Viktor Szakats
2012-10-19 19:23:36 +00:00
parent 6bfaa2d619
commit a81d08b044
3 changed files with 34 additions and 34 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-19 21:21 UTC+0200 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.prg
* avoid splitting branching statements with #if branches
to make it easy for hbformat to do its job.
(patched hbformat still fails around line 3900)
* contrib/xhb/htmutil.prg
+ TOFIX added for unicode incompatible Greek CP conversion
(from what to what it's not marked)
2012-10-19 15:18 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbct/ctchksum.c
* contrib/hbct/ctcrypt.c

View File

@@ -47,7 +47,7 @@
#include "html.ch"
#include "hbclass.ch"
STATIC s_aGreek := {}
THREAD STATIC t_aGreek := {}
/****
*
@@ -178,7 +178,7 @@ PROCEDURE htmlBrowse( oHtm, cAction, lUseLinks )
oHtm:TableHead( aFlds[ i, 1 ] )
NEXT
WHILE !( EOF() )
WHILE ! EOF()
// each row has a different color...
IF n == 0
@@ -733,10 +733,19 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ;
RETURN Self
//*** EOF ***//
/****
*
* InitGreek()
*
* Initializes the international languages support.
*
* Uses GREEK_ALPHABET array as a match pattern. Replace with your
* own character set.
*/
FUNCTION initGreek()
#define GREEK_ALPHABET {;
LOCAL aGreek := { ;
hb_BChar( 193 ), ;
hb_BChar( 194 ), ;
hb_BChar( 195 ), ;
@@ -806,22 +815,9 @@ METHOD ImageURL( cImage, cUrl, nHeight, nBorder, ;
hb_BChar( 219 ) ;
}
/****
*
* InitGreek()
*
* Initializes the international languages support.
*
* Uses GREEK_ALPHABET array as a match pattern. Replace with your
* own character set.
*/
FUNCTION initGreek()
LOCAL i
LOCAL n
LOCAL aGreek := GREEK_ALPHABET
LOCAL aArr := Array( 255 )
LOCAL aArr := Array( 255 )
FOR i := 1 TO 255
aArr[ i ] := hb_BChar( i )
@@ -855,11 +851,11 @@ FUNCTION Greek2Html( cText )
LOCAL i
LOCAL cStr := ""
IF Empty( s_aGreek )
s_aGreek := initGreek()
IF Empty( t_aGreek )
t_aGreek := initGreek()
ENDIF
FOR I := 1 TO Len( cText )
cStr += s_aGreek[ Asc( Substr( cText, i, 1 ) ) ]
cStr += t_aGreek[ Asc( Substr( cText, i, 1 ) ) ] /* TOFIX: for unicode */
NEXT
RETURN cStr

View File

@@ -1015,6 +1015,7 @@ STATIC FUNCTION hbmk_harbour_dirlayout_detect( hbmk, /* @ */ l_cHB_INSTALL_PREFI
/* This stage needs COMP and PLAT to be filled */
STATIC PROCEDURE hbmk_harbour_dirlayout_init( hbmk, l_cHB_INSTALL_PREFIX )
LOCAL tmp
LOCAL lDOSWinTokens
IF Empty( hbmk[ _HBMK_cHB_INSTALL_BIN ] )
/* Autodetect multi-compiler/platform bin structure (also .dlls are in bin dir on non-*nix platforms) */
@@ -1086,10 +1087,11 @@ STATIC PROCEDURE hbmk_harbour_dirlayout_init( hbmk, l_cHB_INSTALL_PREFIX )
#if defined( __PLATFORM__WINDOWS ) .OR. ;
defined( __PLATFORM__DOS ) .OR. ;
defined( __PLATFORM__OS2 )
FOR EACH tmp IN hb_ATokens( hbmk[ _HBMK_cHB_INSTALL_ADD ], hb_osPathListSeparator(), .T., .T. )
lDOSWinTokens := .T.
#else
FOR EACH tmp IN hb_ATokens( hbmk[ _HBMK_cHB_INSTALL_ADD ], hb_osPathListSeparator() )
lDOSWinTokens := NIL
#endif
FOR EACH tmp IN hb_ATokens( hbmk[ _HBMK_cHB_INSTALL_ADD ], hb_osPathListSeparator(), lDOSWinTokens, lDOSWinTokens )
IF ! Empty( tmp )
AAdd( hbmk[ _HBMK_aLIBPATH ], hb_PathNormalize( hb_DirSepAdd( PathSepToSelf( tmp ) ) ) + "%{hb_name}" )
ENDIF
@@ -10373,9 +10375,7 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem, cFileName )
LOCAL cChar
LOCAL lSkipQuote
LOCAL cRetVal
#ifndef USE_FOREACH_ON_STRINGS
LOCAL nPos
#endif
LOCAL cExpr := "hbmk_KEYW( hbmk, cFileName, '%1' )"
LOCAL cExprWithValue := "hbmk_KEYW( hbmk, cFileName, '%1', '%2', '%3' )"
@@ -10409,22 +10409,16 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem, cFileName )
cValue := NIL
cOperator := ""
lSkipQuote := .F.
#ifdef USE_FOREACH_ON_STRINGS
FOR EACH cChar IN cFilterSrc
#else
FOR nPos := 1 TO Len( cFilterSrc )
FOR nPos := 1 TO Len( cFilterSrc ) /* USE_FOREACH_ON_STRINGS */
cChar := SubStr( cFilterSrc, nPos, 1 )
#endif
IF cValue == NIL
IF iif( Empty( cKeyword ),;
HB_ISFIRSTIDCHAR( cChar ),;
HB_ISNEXTIDCHAR( cChar ) )
cKeyword += cChar
#ifdef USE_FOREACH_ON_STRINGS
ELSEIF cChar $ "=<>" .AND. SubStr( cFilterSrc, cChar:__enumIndex() + 1, 1 ) == "'"
#else
ELSEIF cChar $ "=<>" .AND. SubStr( cFilterSrc, nPos + 1, 1 ) == "'"
#endif
cOperator := cChar
cValue := ""
lSkipQuote := .T.