mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
Renamed a couple of functions to have proper php_ prefix.
This commit is contained in:
parent
3ee9dbea0c
commit
22fb5f281a
@ -566,9 +566,9 @@ static int _preg_do_eval(char *eval_str, char *subject, int *offsets,
|
||||
match = subject + offsets[backref<<1];
|
||||
match_len = offsets[(backref<<1)+1] - offsets[backref<<1];
|
||||
sprintf(backref_buf, "\\%d", backref);
|
||||
new_code = _php3_str_to_str(code, code_len,
|
||||
backref_buf, (backref > 9) ? 3 : 2,
|
||||
match, match_len, &new_code_len);
|
||||
new_code = php_str_to_str(code, code_len,
|
||||
backref_buf, (backref > 9) ? 3 : 2,
|
||||
match, match_len, &new_code_len);
|
||||
|
||||
/* Adjust the walk pointer */
|
||||
walk = new_code + (walk - code) + match_len;
|
||||
|
@ -94,12 +94,12 @@ extern PHPAPI void php_stripslashes(char *string, int *len);
|
||||
extern PHPAPI void php_stripcslashes(char *string, int *len);
|
||||
extern PHPAPI void _php3_dirname(char *str, int len);
|
||||
extern PHPAPI char *php3i_stristr(unsigned char *s, unsigned char *t);
|
||||
extern PHPAPI char *_php3_str_to_str(char *haystack, int length, char *needle,
|
||||
extern PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
|
||||
int needle_len, char *str, int str_len, int *_new_length);
|
||||
extern PHPAPI void _php3_trim(pval *str, pval *return_value, int mode);
|
||||
extern PHPAPI void _php3_strip_tags(char *rbuf, int len, int state, char *allow);
|
||||
|
||||
extern PHPAPI void _php3_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result);
|
||||
extern PHPAPI void php_char_to_str(char *str, uint len, char from, char *to, int to_len, pval *result);
|
||||
|
||||
extern PHPAPI void _php3_implode(pval *delim, pval *arr, pval *return_value);
|
||||
extern PHPAPI void _php3_explode(pval *delim, pval *str, pval *return_value);
|
||||
|
@ -1422,7 +1422,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
|
||||
#define _isblank(c) (((((unsigned char) c)==' ' || ((unsigned char) c)=='\t')) ? 1 : 0)
|
||||
#define _isnewline(c) (((((unsigned char) c)=='\n' || ((unsigned char) c)=='\r')) ? 1 : 0)
|
||||
|
||||
PHPAPI void _php3_char_to_str(char *str,uint len,char from,char *to,int to_len,pval *result)
|
||||
PHPAPI void php_char_to_str(char *str,uint len,char from,char *to,int to_len,pval *result)
|
||||
{
|
||||
int char_count=0;
|
||||
char *source,*target,*tmp,*source_end=str+len, *tmp_end=NULL;
|
||||
@ -1473,7 +1473,7 @@ _php3_memnstr(char *haystack, char *needle, int needle_len, char *end)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PHPAPI char *_php3_str_to_str(char *haystack, int length,
|
||||
PHPAPI char *php_str_to_str(char *haystack, int length,
|
||||
char *needle, int needle_len, char *str, int str_len, int *_new_length)
|
||||
{
|
||||
char *p, *q;
|
||||
@ -1546,12 +1546,12 @@ PHP_FUNCTION(str_replace)
|
||||
}
|
||||
|
||||
if((*needle)->value.str.len == 1) {
|
||||
_php3_char_to_str((*haystack)->value.str.val,
|
||||
(*haystack)->value.str.len,
|
||||
(*needle)->value.str.val[0],
|
||||
(*str)->value.str.val,
|
||||
(*str)->value.str.len,
|
||||
return_value);
|
||||
php_char_to_str((*haystack)->value.str.val,
|
||||
(*haystack)->value.str.len,
|
||||
(*needle)->value.str.val[0],
|
||||
(*str)->value.str.val,
|
||||
(*str)->value.str.len,
|
||||
return_value);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1560,9 +1560,9 @@ PHP_FUNCTION(str_replace)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
new = _php3_str_to_str((*haystack)->value.str.val, (*haystack)->value.str.len,
|
||||
(*needle)->value.str.val, (*needle)->value.str.len,
|
||||
(*str)->value.str.val, (*str)->value.str.len, &len);
|
||||
new = php_str_to_str((*haystack)->value.str.val, (*haystack)->value.str.len,
|
||||
(*needle)->value.str.val, (*needle)->value.str.len,
|
||||
(*str)->value.str.val, (*str)->value.str.len, &len);
|
||||
RETURN_STRINGL(new, len, 0);
|
||||
}
|
||||
/* }}} */
|
||||
@ -1724,7 +1724,7 @@ static void _php3_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines)
|
||||
efree(heb_str);
|
||||
|
||||
if (convert_newlines) {
|
||||
_php3_char_to_str(broken_str,(*str)->value.str.len,'\n',"<br>\n",5,return_value);
|
||||
php_char_to_str(broken_str,(*str)->value.str.len,'\n',"<br>\n",5,return_value);
|
||||
efree(broken_str);
|
||||
} else {
|
||||
return_value->value.str.val = broken_str;
|
||||
@ -1762,7 +1762,7 @@ PHP_FUNCTION(nl2br)
|
||||
|
||||
convert_to_string_ex(str);
|
||||
|
||||
_php3_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br>\n",5,return_value);
|
||||
php_char_to_str((*str)->value.str.val,(*str)->value.str.len,'\n',"<br>\n",5,return_value);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user