[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/oniguruma regerror.c

2007-03-05 Thread Marcus Boerger
helly   Tue Mar  6 01:19:48 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring/oniguruma regerror.c 
  Log:
  - Revert last part and fix issue under windows
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.7&r2=1.3.4.8&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.7 
php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.8
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.7   Wed Feb 28 01:10:41 2007
+++ php-src/ext/mbstring/oniguruma/regerror.c   Tue Mar  6 01:19:47 2007
@@ -278,7 +278,7 @@
 
   va_init_list(args, fmt);
   n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
-  if (n >= bufsize) {
+  if (n < 0 || n >= bufsize) {
n = bufsize - 1;
   }
   va_end(args);
@@ -309,7 +309,7 @@
   int blen;
 
   while (len-- > 0) {
-snprintf((char* )bs, sizeof(bs), "\\%03o", *p++ & 0377);
+sprintf((char* )bs, "\\%03o", *p++ & 0377);
 blen = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
 bp = bs;
 while (blen-- > 0) *s++ = *bp++;
@@ -318,7 +318,7 @@
   }
   else if (!ONIGENC_IS_CODE_PRINT(enc, *p) &&
   !ONIGENC_IS_CODE_SPACE(enc, *p)) {
-   snprintf((char* )bs, sizeof(bs), "\\%03o", *p++ & 0377);
+   sprintf((char* )bs, "\\%03o", *p++ & 0377);
len = onigenc_str_bytelen_null(ONIG_ENCODING_ASCII, bs);
 bp = bs;
while (len-- > 0) *s++ = *bp++;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/oniguruma regerror.c

2007-02-27 Thread Ilia Alshanetsky
iliaa   Wed Feb 28 01:10:41 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring/oniguruma regerror.c 
  Log:
  
  Fixed typo
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.6&r2=1.3.4.7&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.6 
php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.7
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.6   Wed Feb 28 01:01:01 2007
+++ php-src/ext/mbstring/oniguruma/regerror.c   Wed Feb 28 01:10:41 2007
@@ -1,4 +1,4 @@
-
+/**
   regerror.c -  Oniguruma (regular expression library)
 **/
 /*-

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/oniguruma regerror.c

2007-02-27 Thread Marcus Boerger
Hello Ilia,

  isn't that simply: n = vslprintf() ?

  Oh, damn wait, it's an external library. :-(

best regards
marcus

Wednesday, February 28, 2007, 2:01:01 AM, you wrote:

> iliaa   Wed Feb 28 01:01:01 2007 UTC

>   Modified files:  (Branch: PHP_5_2)
> /php-src/ext/mbstring/oniguruma regerror.c 
>   Log:
>   Adjust vsnprintf() usage
>   
>   
> http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.5&r2=1.3.4.6&diff_format=u
> Index: php-src/ext/mbstring/oniguruma/regerror.c
> diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.5
> php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.6
> --- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.5   Tue Feb 27 03:28:16 
> 2007
> +++ php-src/ext/mbstring/oniguruma/regerror.c   Wed Feb 28 01:01:01 2007
> @@ -1,4 +1,4 @@
> -/**
> +
>regerror.c -  Oniguruma (regular expression library)
>  **/
>  /*-
> @@ -279,7 +279,7 @@
>va_init_list(args, fmt);
>n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
>if (n >= bufsize) {
> -   return;
> +   n = bufsize - 1;
>}
>va_end(args);
>  




Best regards,
 Marcus

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/oniguruma regerror.c

2007-02-27 Thread Ilia Alshanetsky
iliaa   Wed Feb 28 01:01:01 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring/oniguruma regerror.c 
  Log:
  Adjust vsnprintf() usage
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.5&r2=1.3.4.6&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.5 
php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.6
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.5   Tue Feb 27 03:28:16 2007
+++ php-src/ext/mbstring/oniguruma/regerror.c   Wed Feb 28 01:01:01 2007
@@ -1,4 +1,4 @@
-/**
+
   regerror.c -  Oniguruma (regular expression library)
 **/
 /*-
@@ -279,7 +279,7 @@
   va_init_list(args, fmt);
   n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
   if (n >= bufsize) {
-   return;
+   n = bufsize - 1;
   }
   va_end(args);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/mbstring/oniguruma regerror.c

2006-07-27 Thread Antony Dovgal
tony2001Thu Jul 27 07:39:31 2006 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/mbstring/oniguruma regerror.c 
  Log:
  fix build with Intel C Compiler
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/oniguruma/regerror.c?r1=1.3.4.1&r2=1.3.4.2&diff_format=u
Index: php-src/ext/mbstring/oniguruma/regerror.c
diff -u php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.1 
php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.2
--- php-src/ext/mbstring/oniguruma/regerror.c:1.3.4.1   Thu Jul 20 15:45:07 2006
+++ php-src/ext/mbstring/oniguruma/regerror.c   Thu Jul 27 07:39:30 2006
@@ -276,7 +276,7 @@
   UChar bs[6];
   va_list args;
 
-  va_init_list(args, (const char* )fmt);
+  va_init_list(args, fmt);
   n = vsnprintf((char* )buf, bufsize, (const char* )fmt, args);
   va_end(args);
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php