vc++ vs gcc

From: Date: Tue, 22 Aug 2000 17:18:40 +0000
Subject: vc++ vs gcc
Groups: php.general 
Request: Send a blank email to php-general+get-12981@lists.php.net to get a copy of this message
i compiled function that called: split_tag_to_elements into php4.0.1pl2 in visual c++. its work fine on vc++ but on linux gcc i get errors: (unterminated character on php_string.h on line 28 where php_string.h contain the orginals page remarks. does some1 have any idea about? i add to the ext/standard/php_string.h: --------------------------------------------------------------------------------------------------------------------------------------------------- PHP_FUNCTION(split_tag_to_elements); PHPAPI void php_split_tag_to_elements(pval *str, pval *return_value); --------------------------------------------------------------------------------------------------------------------------------------------------- and those functions into the ext/standard/string.c : ---------------------------------------------------------------------------------------------------------------------------------------------------- PHPAPI void php_split_tag_to_elements(zval *str, zval *return_value) { char *p, *endp, *space, *lastp; int mfl = 0; endp = str->value.str.val + str->value.str.len; p = str->value.str.val; space = p; lastp = p; while (p<endp){ while((*p != '=')&&(p<endp)){ if (*p == ' '){ space = p; }else{ if (*p == '\') { if (!mfl){ mfl=1; }else{ mfl=0; } } } p++; } if(mfl){ continue; } if (space!=lastp){ add_next_index_stringl(return_value, lastp, space-lastp, 1); add_next_index_stringl(return_value, space, p-space, 1); }else{ continue; } space = lastp =p; p++; } add_next_index_stringl(return_value, lastp, p-lastp, 1); } /* {{{ proto array split_tag_to_elements(string separator, string str [, int limit]) Split a string on string separator and return array of components */ PHP_FUNCTION(split_tag_to_elements) { zval **str; switch (ZEND_NUM_ARGS()) { case 1: if (zend_get_parameters_ex(1, &str) == FAILURE) WRONG_PARAM_COUNT; break; default: WRONG_PARAM_COUNT; } convert_to_string_ex(str); if (array_init(return_value) == FAILURE) { RETURN_FALSE; } php_split_tag_to_elements(*str, return_value); } /* }}} */ -----------------------------------------------------------------------------------------------------------------------------

« previous php.general (#12981) next »