2012-09-13 10:06 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/include/hbpcode.h
! force PCODEs enumeration from zero - some compilers may
use different value what can cause problems with casting to bytes
* harbour/contrib/xhb/regexrpl.prg
! fixed hb_regexReplace() - hack for older HB_REGEXALL() code
could cause RTE
This commit is contained in:
@@ -16,6 +16,15 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-09-13 10:06 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* harbour/include/hbpcode.h
|
||||
! force PCODEs enumeration from zero - some compilers may
|
||||
use different value what can cause problems with casting to bytes
|
||||
|
||||
* harbour/contrib/xhb/regexrpl.prg
|
||||
! fixed hb_regexReplace() - hack for older HB_REGEXALL() code
|
||||
could cause RTE
|
||||
|
||||
2012-09-12 14:13 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/gtwvg/gtwvg.h
|
||||
! Fixed: casting.
|
||||
|
||||
@@ -65,17 +65,17 @@ FUNCTION hb_RegexReplace( cRegex, cString, cReplace, lCaseSensitive, lNewLine, n
|
||||
|
||||
IF ! Empty( aMatches )
|
||||
FOR EACH aMatch IN aMatches
|
||||
IF HB_ISARRAY( aMatch ) .AND. Len( aMatch ) == 1 .AND. ;
|
||||
IF HB_ISARRAY( aMatch ) .AND. Len( aMatch ) >= 1 .AND. ;
|
||||
HB_ISARRAY( aMatch[ 1 ] )
|
||||
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
|
||||
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
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
HB_P_AND, /* 0 performs the logical AND of two latest stack values, removes them and places result */
|
||||
HB_P_AND = 0, /* 0 performs the logical AND of two latest stack values, removes them and places result */
|
||||
HB_P_ARRAYPUSH, /* 1 places on the virtual machine stack an array element */
|
||||
HB_P_ARRAYPOP, /* 2 pops a value from the eval stack into an array element */
|
||||
HB_P_ARRAYDIM, /* 3 instructs the virtual machine to build an array with some specific dimensions */
|
||||
|
||||
Reference in New Issue
Block a user