}
case IS_ARRAY:
zval_dtor(op);
- op->value.str.val = estrndup_rel("Array",sizeof("Array")-1);
+ op->value.str.val = estrndup_rel("Array", sizeof("Array")-1);
op->value.str.len = sizeof("Array")-1;
zend_error(E_NOTICE, "Array to string conversion");
break;
case IS_OBJECT:
zval_dtor(op);
- op->value.str.val = estrndup_rel("Object",sizeof("Object")-1);
+ op->value.str.val = estrndup_rel("Object", sizeof("Object")-1);
op->value.str.len = sizeof("Object")-1;
zend_error(E_NOTICE, "Object to string conversion");
break;
result->value.str.len = op1->value.str.len + op2->value.str.len;
result->value.str.val = (char *) emalloc(result->value.str.len + 1);
memcpy(result->value.str.val, op1->value.str.val, op1->value.str.len);
- memcpy(result->value.str.val+op1->value.str.len, op2->value.str.val,op2->value.str.len);
+ memcpy(result->value.str.val+op1->value.str.len, op2->value.str.val, op2->value.str.len);
result->value.str.val[result->value.str.len] = 0;
result->type = IS_STRING;
}
if (carry) {
t = (char *) emalloc(str->value.str.len+1+1);
- memcpy(t+1,str->value.str.val, str->value.str.len);
+ memcpy(t+1, str->value.str.val, str->value.str.len);
str->value.str.len++;
t[str->value.str.len] = '\0';
switch (last) {
ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2)
{
int len;
- int c1,c2;
+ int c1, c2;
len = MIN(len1, len2);
ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length)
{
int len;
- int c1,c2;
+ int c1, c2;
len = MIN(length, MIN(len1, len2));
ZEND_API void zendi_smart_strcmp(zval *result, zval *s1, zval *s2)
{
- int ret1,ret2;
+ int ret1, ret2;
long lval1, lval2;
double dval1, dval2;
/* use the BC math library to compare the numbers */
init_num(&first);
init_num(&second);
- str2num(&first,s1->value.str.val,100); /* this scale should do */
- str2num(&second,s2->value.str.val,100); /* ditto */
- result->value.lval = bc_compare(first,second);
+ str2num(&first, s1->value.str.val, 100); /* this scale should do */
+ str2num(&second, s2->value.str.val, 100); /* ditto */
+ result->value.lval = bc_compare(first, second);
result->value.lval = ZEND_NORMALIZE_BOOL(result->value.lval);
result->type = IS_LONG;
free_num(&first);
static inline int is_numeric_string(char *str, int length, long *lval, double *dval)
{
register char *p=str, *end=str+length;
- unsigned char had_period=0,had_exponent=0;
+ unsigned char had_period=0, had_exponent=0;
char *end_ptr;
if (!length) {