Re: cvs: php4 /main main.c

From: Date: Sun, 12 May 2002 15:46:26 +0000
Subject: Re: cvs: php4 /main main.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11871@lists.php.net to get a copy of this message
Hmm, that doesn't do what it's supposed to do at all, it turns series of spaces into a single   Or am I missing something? At 18:30 12/05/2002, Sascha Schumann wrote:
sas             Sun May 12 11:30:45 2002 EDT
Modified files:
    /php4/main  main.c
Log: Simplify even more Index: php4/main/main.c diff -u php4/main/main.c:1.454 php4/main/main.c:1.455
--- php4/main/main.c:1.454      Sun May 12 11:22:11 2002
+++ php4/main/main.c    Sun May 12 11:30:44 2002
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: main.c,v 1.454 2002/05/12 15:22:11 sas Exp $ */ +/* $Id: main.c,v 1.455 2002/05/12 15:30:44 sas Exp $ */ /* {{{ includes */ @@ -400,16 +400,11 @@
                        case '&':
                                smart_str_appendl(&s, "&", sizeof("&")-1);
                                break;
-                       case ' ': {
-                                       const char *nextchar = p;
+                       case ' ':
+                               while (++p < end && *p == ' ');
-                                       while (++nextchar < end && *nextchar == ' ');
-
-                                       p = nextchar;
-                                       smart_str_appends(&s, "&nbsp;");
-                                       continue;
-                               }
-                               break;
+                               smart_str_appends(&s, "&nbsp;");
+                               continue;
                        case '\t':
                                smart_str_appendl(&s, "&nbsp;&nbsp;&nbsp;&nbsp;", sizeof("&nbsp;&nbsp;&nbsp;&nbsp;")-1);
                                break;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.cvs (#11871) next »