2011-12-12 21:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/contrib/xhb/regexrpl.prg
! fixed hb_regexReplace()
* harbour/doc/locks.txt
! typo
* harbour/doc/Makefile
* added locks.txt
This commit is contained in:
@@ -16,6 +16,14 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-12-12 21:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/contrib/xhb/regexrpl.prg
|
||||
! fixed hb_regexReplace()
|
||||
* harbour/doc/locks.txt
|
||||
! typo
|
||||
* harbour/doc/Makefile
|
||||
* added locks.txt
|
||||
|
||||
2011-12-12 11:54 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/wvggenrc.prg
|
||||
* contrib/gtwvg/wvglistb.prg
|
||||
|
||||
@@ -64,24 +64,22 @@ FUNCTION hb_RegexReplace( cRegex, cString, cReplace, lCaseSensitive, lNewLine, n
|
||||
//LOCAL nEnd
|
||||
|
||||
aMatches := HB_RegExAll( cRegEx, cString, lCaseSensitive, lNewLine, nMaxMatches, nGetMatch, .F. )
|
||||
cReturn := cString
|
||||
|
||||
IF ! Empty( aMatches )
|
||||
cReturn := cString
|
||||
FOR EACH aMatch IN aMatches
|
||||
//TraceLog( "ValToPrg( aMatch ), cReturn", ValToPrg( aMatch ), cReturn )
|
||||
IF Len( aMatch ) == 3 // if regex matches I must have an array of 3 elements
|
||||
cSearch := aMatch[ MATCH_STRING ]
|
||||
nStart := aMatch[ MATCH_START ]
|
||||
//nEnd := aMatch[ MATCH_END ]
|
||||
nLenSearch := Len( cSearch ) //nEnd - nStart + 1
|
||||
nLenReplace := Len( cReplace )
|
||||
//TraceLog( "SubStr( cString, nStart, nLenSearch )", ;
|
||||
// SubStr( cString, nStart - nOffSet, nLenSearch ) )
|
||||
cReturn := Stuff( cReturn, nStart - nOffSet, nLenSearch, cReplace )
|
||||
nOffSet += nLenSearch - nLenReplace
|
||||
//TraceLog( "cSearch, nStart, nEnd, nLenSearch, nLenReplace, nOffSet, cReturn",;
|
||||
// cSearch, nStart, nEnd, nLenSearch, nLenReplace, nOffSet, cReturn )
|
||||
ENDIF
|
||||
IF ValType( aMatch ) == "A" .AND. Len( aMatch ) == 1 .AND. ;
|
||||
ValType( aMatch[1] ) == "A"
|
||||
aMatch := aMatch[1]
|
||||
ENDIF
|
||||
IF Len( aMatch ) == 3 // if regex matches I must have an array of 3 elements
|
||||
cSearch := aMatch[ MATCH_STRING ]
|
||||
nStart := aMatch[ MATCH_START ]
|
||||
nLenSearch := Len( cSearch )
|
||||
nLenReplace := Len( cReplace )
|
||||
cReturn := Stuff( cReturn, nStart - nOffSet, nLenSearch, cReplace )
|
||||
nOffSet += nLenSearch - nLenReplace
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
ENDIF
|
||||
|
||||
@@ -20,6 +20,7 @@ DOC_FILES := \
|
||||
howtorel.txt \
|
||||
howtosvn.txt \
|
||||
inet.txt \
|
||||
locks.txt \
|
||||
pcode.txt \
|
||||
pp.txt \
|
||||
pragma.txt \
|
||||
|
||||
@@ -48,7 +48,7 @@ Commands:
|
||||
SET LOCKSTYLE [TO] CLIPPER52 | FOXPRO | SIX
|
||||
or:
|
||||
SET( _SET_LOCKSTYLE, 1 )
|
||||
set this offset is to 0x10000000 keeping the same algorithm
|
||||
set this offset to 0x10000000 keeping the same algorithm
|
||||
for record locking what is incompatible with any other locking
|
||||
schemes known by me. For sure it's not compatible with [V]FP
|
||||
locking (see details about this locking scheme below).
|
||||
|
||||
Reference in New Issue
Block a user