Hi,
Warnings are gone now... but can't see if it still works :)
Derick
On Fri, 22 Mar 2002, Marcus B�rger wrote:
> At 10:09 22.03.2002, you wrote:
> >Hello,
> >
> >can somebody have a look at this?
> >
> >/var/system/src/php4/ext/mbstring/mbregex.c:1570: warning:
> >suggest parentheses around arithmetic in operand of |
> >
> >/var/system/src/php4/ext/mbstring/mbregex.c:1596: warning:
> >suggest parentheses around && within ||
> >
> >/var/system/src/php4/ext/mbstring/mbregex.c:1665: warning:
> >suggest parentheses around arithmetic in operand of |
> >
> >
> >
> >Derick
>
> try attached patch. for me mbstring does not work - all tests fail but
> i should be correct.
>
> marcus
>
> diff -u -w -r1.2 mbregex.c
> --- ext/mbstring/mbregex.c 14 Jan 2002 03:08:40 -0000 1.2
> +++ ext/mbstring/mbregex.c 22 Mar 2002 10:30:40 -0000
> @@ -562,7 +562,7 @@
> int n = mbclen(c) - 1; \
> c &= (1<<(MBRE_BYTEWIDTH-2-n)) -
> 1; \
> while (n--) { \
> - c = c << 6 | *p++ & ((1<<6)-1); \
> + c = (c << 6) | ((*p++) &
> ((1<<6)-1)); \
> }
> \
> } \
> else { \
> @@ -1592,8 +1592,8 @@
> case 'W':
> for (c = 0; c < (1 << MBRE_BYTEWIDTH); c++) {
> if (SYNTAX(c) != Sword &&
> - (current_mbctype && !re_mbctab[c] ||
> - !current_mbctype && SYNTAX(c) != Sword2))
> + ((current_mbctype && !re_mbctab[c]) ||
> + (!current_mbctype && (SYNTAX(c) != Sword2))))
> SET_LIST_BIT(c);
> }
> had_char_class = 1;
>
>
>
>
> >--
> >PHP Development Mailing List <http://www.php.net/>
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
Derick Rethans
---------------------------------------------------------------------
PHP: Scripting the Web - www.php.net - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---------------------------------------------------------------------
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php