Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2003-03-31 Thread Jani Taskinen

Please, don't use that @ sign in commit messages...or
at least TRY to write something that really means something
after it. (Read the NEWS file sometime to see how these should
look like..)

--Jani


On Mon, 31 Mar 2003, Moshe Doron wrote:

momo   Mon Mar 31 13:56:41 2003 EDT

  Modified files:  
/php4/ext/standard string.c 
  Log:
  fix for 22904
  @ now addslashes() do it also on cybase magic mode(moshe).
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.365 php4/ext/standard/string.c:1.366
--- php4/ext/standard/string.c:1.365   Mon Mar 31 07:08:31 2003
+++ php4/ext/standard/string.c Mon Mar 31 13:56:41 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.365 2003/03/31 12:08:31 momo Exp $ */
+/* $Id: string.c,v 1.366 2003/03/31 18:56:41 momo Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2331,13 +2331,18 @@
   l--;
   }
   *s++ = *t++;
-  } else if (*t == '\\'  l  0  t[1] == '0') {
+  } else if (*t == '\\'  l  0) {
+  if(t[1] == '0') {
   *s++='\0';
-  t += 2;
-  if (len != NULL) {
-  (*len)--;
-  }
-  l--;
+  t++;
+  } else {
+  *s++=*(++t);
+  }
+  t++;
+  if (len != NULL) {
+  (*len)--;
+  }
+  l--;
   } else {
   *s++ = *t++;
   }
@@ -2627,6 +2632,10 @@
   case '\'':
   *target++ = '\'';
   *target++ = '\'';
+  break;
+  case '\\':
+  *target++ = '\\';
+  *target++ = '\\';
   break;
   default:
   *target++ = *source;





-- 
- For Sale! -


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



Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2003-03-31 Thread Derick Rethans
On Mon, 31 Mar 2003, Moshe Doron wrote:

 momo  Mon Mar 31 13:56:41 2003 EDT
 
   Modified files:  
 /php4/ext/standardstring.c 
   Log:
   fix for 22904
   @ now addslashes() do it also on cybase magic mode(moshe).

Please add tests for this too!

Derick

-- 
my other box is your windows PC
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-

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



Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2003-01-27 Thread Jani Taskinen

MFH??

--Jani


On Fri, 24 Jan 2003, Andrey Hristov wrote:

andrey Fri Jan 24 08:18:09 2003 EDT

  Modified files:  
/php4/ext/standard string.c 
  Log:
  Resolving problem on OSF1 and probably other
  64 bit platforms. Thanks for the feedback of Magnus (novell kiruna se).
  
  
Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.350 php4/ext/standard/string.c:1.351
--- php4/ext/standard/string.c:1.350   Fri Jan 24 07:19:59 2003
+++ php4/ext/standard/string.c Fri Jan 24 08:18:08 2003
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.350 2003/01/24 12:19:59 andrey Exp $ */
+/* $Id: string.c,v 1.351 2003/01/24 13:18:08 andrey Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -199,7 +199,7 @@
 static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior)
 {
   char *s11, *s22;
-  long len1, len2, start, len;
+  int len1, len2, start, len;
   
   start = 0;
   len = 0;





-- 
- For Sale! -


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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-12 Thread Marcus Börger
I do not get those so i do not fix them.

At 05:17 09.11.2002, Maxim Maletsky wrote:


Actually, i was just about to mention one thing - in math.c on line 779
(I think) it warn of an unasigned comparison compilation. I was about to
work out a patch and submit it as I got no karma for that part.

Why don't you take over it once you're there :)

--
Maxim Maletsky
[EMAIL PROTECTED]


On Thu, 24 Oct 2002 19:11:50 - Marcus Börger 
[EMAIL PROTECTED] wrote:

 helly Thu Oct 24 15:11:50 2002 EDT

   Modified files:
 /php4/ext/standardstring.c
   Log:
   fix compiler warning


 Index: php4/ext/standard/string.c
 diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328
 --- php4/ext/standard/string.c:1.327  Tue Oct 22 14:27:56 2002
 +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002
 @@ -18,7 +18,7 @@
 
+--+
   */

 -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */
 +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */

  /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

 @@ -915,6 +915,7 @@
   case 1:
   tok = args[0];
   break;
 + default:
   case 2:
   str = args[0];
   tok = args[1];
 @@ -1198,7 +1199,7 @@
  PHP_FUNCTION(pathinfo)
  {
   zval *tmp;
 - char *path, *ret;
 + char *path, *ret = NULL;
   int path_len;
   int opt = PHP_PATHINFO_ALL;

 @@ -3182,6 +3183,7 @@

   if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
   zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1]));
 + i=0; /* not needed in this case: only kill a compiler 
warning */
   } else {
   i=1;
   }



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



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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-12 Thread Maxim Maletsky

I get it if compile with VC++. line 779 unsigned mismatch

---
Maxim Maletsky
[EMAIL PROTECTED]


On Sat, 09 Nov 2002 11:05:15 +0100 [EMAIL PROTECTED] (Marcus Börger) wrote:

 I do not get those so i do not fix them.
 
 At 05:17 09.11.2002, Maxim Maletsky wrote:
 
 Actually, i was just about to mention one thing - in math.c on line 779
 (I think) it warn of an unasigned comparison compilation. I was about to
 work out a patch and submit it as I got no karma for that part.
 
 Why don't you take over it once you're there :)
 
 --
 Maxim Maletsky
 [EMAIL PROTECTED]
 
 
 On Thu, 24 Oct 2002 19:11:50 - Marcus Börger 
 [EMAIL PROTECTED] wrote:
 
   helly Thu Oct 24 15:11:50 2002 EDT
  
 Modified files:
   /php4/ext/standardstring.c
 Log:
 fix compiler warning
  
  
   Index: php4/ext/standard/string.c
   diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328
   --- php4/ext/standard/string.c:1.327  Tue Oct 22 14:27:56 2002
   +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002
   @@ -18,7 +18,7 @@
   
  +--+
 */
  
   -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */
   +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */
  
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
  
   @@ -915,6 +915,7 @@
 case 1:
 tok = args[0];
 break;
   + default:
 case 2:
 str = args[0];
 tok = args[1];
   @@ -1198,7 +1199,7 @@
PHP_FUNCTION(pathinfo)
{
 zval *tmp;
   - char *path, *ret;
   + char *path, *ret = NULL;
 int path_len;
 int opt = PHP_PATHINFO_ALL;
  
   @@ -3182,6 +3183,7 @@
  
 if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
 zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1]));
   + i=0; /* not needed in this case: only kill a compiler 
  warning */
 } else {
 i=1;
 }
  
  
  
   --
   PHP CVS Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-08 Thread Maxim Maletsky

Actually, i was just about to mention one thing - in math.c on line 779
(I think) it warn of an unasigned comparison compilation. I was about to
work out a patch and submit it as I got no karma for that part.

Why don't you take over it once you're there :)

-- 
Maxim Maletsky
[EMAIL PROTECTED]


On Thu, 24 Oct 2002 19:11:50 - Marcus Börger 
[EMAIL PROTECTED] wrote:

 helly Thu Oct 24 15:11:50 2002 EDT
 
   Modified files:  
 /php4/ext/standardstring.c 
   Log:
   fix compiler warning
   
   
 Index: php4/ext/standard/string.c
 diff -u php4/ext/standard/string.c:1.327 php4/ext/standard/string.c:1.328
 --- php4/ext/standard/string.c:1.327  Tue Oct 22 14:27:56 2002
 +++ php4/ext/standard/string.cThu Oct 24 15:11:49 2002
 @@ -18,7 +18,7 @@
 +--+
   */
  
 -/* $Id: string.c,v 1.327 2002/10/22 18:27:56 helly Exp $ */
 +/* $Id: string.c,v 1.328 2002/10/24 19:11:49 helly Exp $ */
  
  /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
  
 @@ -915,6 +915,7 @@
   case 1:
   tok = args[0];
   break;
 + default:
   case 2:
   str = args[0];
   tok = args[1];
 @@ -1198,7 +1199,7 @@
  PHP_FUNCTION(pathinfo)
  {
   zval *tmp;
 - char *path, *ret;
 + char *path, *ret = NULL;
   int path_len;
   int opt = PHP_PATHINFO_ALL;
  
 @@ -3182,6 +3183,7 @@
  
   if (Z_TYPE_PP(args[1]) == IS_ARRAY) {
   zend_hash_internal_pointer_reset(Z_ARRVAL_PP(args[1]));
 + i=0; /* not needed in this case: only kill a compiler warning */
   } else {
   i=1;
   }
 
 
 
 -- 
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-02 Thread Andi Gutmans
I know but in the fopen wrappers I normalize paths to the default slash. I 
think all of PHP should behave in the same way.
Andi

At 09:11 AM 11/1/2002 -0500, Ilia A. wrote:
Windows can interpret / as well as \, makes no difference to it. In fact when
we resolve paths on Windows, we already use / and not \.

Ilia

On November 1, 2002 03:01 am, Andi Gutmans wrote:
 I'm not sure this is the right thing to do. UNIX and Windows are diffferent
 and that's what DEFAULT_SLASH is for.
 Andi

 At 12:53 AM 11/1/2002 +, Ilia Alshanetsky wrote:
 iliaa   Thu Oct 31 19:53:28 2002 EDT
 
Modified files:
  /php4/ext/standard  string.c
Log:
Fixed bug #18710. dirname() now returns consistent output when dealing
  with \ directory separators on Windows.
 
 
 Index: php4/ext/standard/string.c
 diff -u php4/ext/standard/string.c:1.330 php4/ext/standard/string.c:1.331
 --- php4/ext/standard/string.c:1.330Wed Oct 30 06:42:51 2002
 +++ php4/ext/standard/string.c  Thu Oct 31 19:53:27 2002
  -18,7 +18,7 
 
  +--+
  */
 
 -/* $Id: string.c,v 1.330 2002/10/30 11:42:51 moriyoshi Exp $ */
 +/* $Id: string.c,v 1.331 2002/11/01 00:53:27 iliaa Exp $ */
 
   /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
  -1148,7 +1148,7 
  }
  if (end  path) {
  /* The path only contained slashes */
 -   path[0] = DEFAULT_SLASH;
 +   path[0] = '/';
  path[1] = '\0';
  return;
  }
  -1169,7 +1169,7 
  end--;
  }
  if (end  path) {
 -   path[0] = DEFAULT_SLASH;
 +   path[0] = '/';
  path[1] = '\0';
  return;
  }
 
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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



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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-02 Thread Ilia A.
Fair enough, I'll revert the patch. We are still left with a problem of pathes 
on windows not using / consistently however.

Ilia

On November 2, 2002 01:11 pm, Andi Gutmans wrote:
 I know but in the fopen wrappers I normalize paths to the default slash. I
 think all of PHP should behave in the same way.
 Andi

 At 09:11 AM 11/1/2002 -0500, Ilia A. wrote:
 Windows can interpret / as well as \, makes no difference to it. In fact
  when we resolve paths on Windows, we already use / and not \.
 
 Ilia
 
 On November 1, 2002 03:01 am, Andi Gutmans wrote:
   I'm not sure this is the right thing to do. UNIX and Windows are
   diffferent and that's what DEFAULT_SLASH is for.
   Andi
  
   At 12:53 AM 11/1/2002 +, Ilia Alshanetsky wrote:
   iliaa   Thu Oct 31 19:53:28 2002 EDT
   
  Modified files:
/php4/ext/standard  string.c
  Log:
  Fixed bug #18710. dirname() now returns consistent output when
dealing with \ directory separators on Windows.
   
   
   Index: php4/ext/standard/string.c
   diff -u php4/ext/standard/string.c:1.330
php4/ext/standard/string.c:1.331 --- php4/ext/standard/string.c:1.330
   Wed Oct 30 06:42:51 2002 +++ php4/ext/standard/string.c  Thu Oct
31 19:53:27 2002
-18,7 +18,7 
   
+
   --+ */
   
   -/* $Id: string.c,v 1.330 2002/10/30 11:42:51 moriyoshi Exp $ */
   +/* $Id: string.c,v 1.331 2002/11/01 00:53:27 iliaa Exp $ */
   
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
   
-1148,7 +1148,7 
}
if (end  path) {
/* The path only contained slashes */
   -   path[0] = DEFAULT_SLASH;
   +   path[0] = '/';
path[1] = '\0';
return;
}
-1169,7 +1169,7 
end--;
}
if (end  path) {
   -   path[0] = DEFAULT_SLASH;
   +   path[0] = '/';
path[1] = '\0';
return;
}
   
   
   
   --
   PHP CVS Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-01 Thread Andi Gutmans
I'm not sure this is the right thing to do. UNIX and Windows are diffferent 
and that's what DEFAULT_SLASH is for.
Andi

At 12:53 AM 11/1/2002 +, Ilia Alshanetsky wrote:
iliaa   Thu Oct 31 19:53:28 2002 EDT

  Modified files:
/php4/ext/standard  string.c
  Log:
  Fixed bug #18710. dirname() now returns consistent output when dealing with
  \ directory separators on Windows.


Index: php4/ext/standard/string.c
diff -u php4/ext/standard/string.c:1.330 php4/ext/standard/string.c:1.331
--- php4/ext/standard/string.c:1.330Wed Oct 30 06:42:51 2002
+++ php4/ext/standard/string.c  Thu Oct 31 19:53:27 2002
 -18,7 +18,7 
+--+
  */

-/* $Id: string.c,v 1.330 2002/10/30 11:42:51 moriyoshi Exp $ */
+/* $Id: string.c,v 1.331 2002/11/01 00:53:27 iliaa Exp $ */

 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */

 -1148,7 +1148,7 
}
if (end  path) {
/* The path only contained slashes */
-   path[0] = DEFAULT_SLASH;
+   path[0] = '/';
path[1] = '\0';
return;
}
 -1169,7 +1169,7 
end--;
}
if (end  path) {
-   path[0] = DEFAULT_SLASH;
+   path[0] = '/';
path[1] = '\0';
return;
}



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



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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-11-01 Thread Ilia A.
Windows can interpret / as well as \, makes no difference to it. In fact when 
we resolve paths on Windows, we already use / and not \.

Ilia

On November 1, 2002 03:01 am, Andi Gutmans wrote:
 I'm not sure this is the right thing to do. UNIX and Windows are diffferent
 and that's what DEFAULT_SLASH is for.
 Andi

 At 12:53 AM 11/1/2002 +, Ilia Alshanetsky wrote:
 iliaa   Thu Oct 31 19:53:28 2002 EDT
 
Modified files:
  /php4/ext/standard  string.c
Log:
Fixed bug #18710. dirname() now returns consistent output when dealing
  with \ directory separators on Windows.
 
 
 Index: php4/ext/standard/string.c
 diff -u php4/ext/standard/string.c:1.330 php4/ext/standard/string.c:1.331
 --- php4/ext/standard/string.c:1.330Wed Oct 30 06:42:51 2002
 +++ php4/ext/standard/string.c  Thu Oct 31 19:53:27 2002
  -18,7 +18,7 
 
  +--+
  */
 
 -/* $Id: string.c,v 1.330 2002/10/30 11:42:51 moriyoshi Exp $ */
 +/* $Id: string.c,v 1.331 2002/11/01 00:53:27 iliaa Exp $ */
 
   /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
  -1148,7 +1148,7 
  }
  if (end  path) {
  /* The path only contained slashes */
 -   path[0] = DEFAULT_SLASH;
 +   path[0] = '/';
  path[1] = '\0';
  return;
  }
  -1169,7 +1169,7 
  end--;
  }
  if (end  path) {
 -   path[0] = DEFAULT_SLASH;
 +   path[0] = '/';
  path[1] = '\0';
  return;
  }
 
 
 
 --
 PHP CVS Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-10-09 Thread Andrey Hristov

 I thought of that. If that is the desired behaviour I will do it.
So if I receive another +1 I will do it :)
Orto add additional parameter(with default to work on the original
string)
 to switch the behavior.

Andrey

- Original Message -
From: Sander Roobol [EMAIL PROTECTED]
To: Andrey Hristov [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 08, 2002 7:20 PM
Subject: Re: [PHP-CVS] cvs: php4 /ext/standard string.c


 On Tue, Oct 08, 2002 at 09:52:59AM -, Andrey Hristov wrote:
  andrey Tue Oct  8 05:52:59 2002 EDT
 
Modified files:
  /php4/ext/standard string.c
Log:
Now str_shuffle() has the randomization characteristics of shuffle().
str_shuffle() won't return anymore the randomized string and thus will
be
consistent with shuffle(). Since this function is new to 4.3.0 no BC
problems.

 Although it's not consistant with shuffle(), I'd rather see
 str_shuffle() returning the new string instead of modifying it in place.

 Sander

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



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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-10-08 Thread Sander Roobol

On Tue, Oct 08, 2002 at 09:52:59AM -, Andrey Hristov wrote:
 andreyTue Oct  8 05:52:59 2002 EDT
 
   Modified files:  
 /php4/ext/standardstring.c 
   Log:
   Now str_shuffle() has the randomization characteristics of shuffle().
   str_shuffle() won't return anymore the randomized string and thus will be
   consistent with shuffle(). Since this function is new to 4.3.0 no BC
   problems.

Although it's not consistant with shuffle(), I'd rather see
str_shuffle() returning the new string instead of modifying it in place.

Sander

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




Re: [PHP-CVS] cvs: php4 /ext/standard string.c

2002-10-08 Thread Derick Rethans

On Tue, 8 Oct 2002, Sander Roobol wrote:

 On Tue, Oct 08, 2002 at 09:52:59AM -, Andrey Hristov wrote:
  andrey  Tue Oct  8 05:52:59 2002 EDT
  
Modified files:  
  /php4/ext/standard  string.c 
Log:
Now str_shuffle() has the randomization characteristics of shuffle().
str_shuffle() won't return anymore the randomized string and thus will be
consistent with shuffle(). Since this function is new to 4.3.0 no BC
problems.
 
 Although it's not consistant with shuffle(), I'd rather see
 str_shuffle() returning the new string instead of modifying it in place.

I agree with that.

Derick

--

---
 Derick Rethans   http://derickrethans.nl/ 
 JDI Media Solutions
--[ if you hold a unix shell to your ear, do you hear the c? ]-


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