cvs: php4 /ext/standard/ string.c

From: Date: Thu, 01 Jun 2000 14:18:45 +0000
Subject: cvs: php4 /ext/standard/ string.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-16028@lists.php.net to get a copy of this message
andrei Thu Jun 1 07:18:45 2000 EDT Modified files: /php4/ext/standard string.c Log: Some tweaks. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.119 php4/ext/standard/string.c:1.120 --- php4/ext/standard/string.c:1.119 Thu Jun 1 06:38:23 2000 +++ php4/ext/standard/string.c Thu Jun 1 07:18:45 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.119 2000/06/01 13:38:23 jah Exp $ */ +/* $Id: string.c,v 1.120 2000/06/01 14:18:45 andrei Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1138,14 +1138,14 @@ PHP_FUNCTION(ucwords) { zval **str; - register char *r,*r_end; + register char *r, *r_end; if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) { WRONG_PARAM_COUNT; } convert_to_string_ex(str); - if (!(*str)->value.str.len) { + if (!Z_STRLEN_PP(str)) { RETURN_FALSE; } *return_value=**str; @@ -1153,8 +1153,8 @@ r=return_value->value.str.val; *r=toupper((unsigned char)*r); - for(r_end = r + return_value->value.str.len -1 ; r < r_end ; ) { - if(isspace(*r)) { + for(r_end = r + return_value->value.str.len - 1 ; r < r_end ; ) { + if(isspace((int)*r)) { *r=toupper((unsigned char)*++r); } else { r++;

« previous php.version4 (#16028) next »