h WHitespace

This commit is contained in:
Andi Gutmans 2002-11-30 11:20:25 +00:00
parent 3429e3313b
commit 671fff2fde
12 changed files with 31 additions and 31 deletions

View File

@ -225,7 +225,7 @@ ZEND_API void zend_print_zval_r(zval *expr, int indent)
ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int indent)
{
switch(expr->type) {
switch (expr->type) {
case IS_ARRAY:
ZEND_PUTS("Array\n");
if (++expr->value.ht->nApplyCount>1) {

View File

@ -1174,7 +1174,7 @@ int module_registry_request_startup(zend_module_entry *module TSRMLS_DC)
*/
int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
{
switch(module->type) {
switch (module->type) {
case MODULE_PERSISTENT:
if (module->request_shutdown_func) {
#if 0

View File

@ -433,7 +433,7 @@ ZEND_FUNCTION(define)
int case_sensitive;
zend_constant c;
switch(ZEND_NUM_ARGS()) {
switch (ZEND_NUM_ARGS()) {
case 2:
if (zend_get_parameters_ex(2, &var, &val)==FAILURE) {
RETURN_FALSE;
@ -456,7 +456,7 @@ ZEND_FUNCTION(define)
break;
}
switch((*val)->type) {
switch ((*val)->type) {
case IS_LONG:
case IS_DOUBLE:
case IS_STRING:
@ -897,7 +897,7 @@ ZEND_FUNCTION(trigger_error)
int error_type = E_USER_NOTICE;
zval **z_error_type, **z_error_message;
switch(ZEND_NUM_ARGS()) {
switch (ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &z_error_message)==FAILURE) {
ZEND_WRONG_PARAM_COUNT();

View File

@ -208,7 +208,7 @@ void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *o
if (last_op->opcode == ZEND_FETCH_OBJ_RW) {
switch(op) {
switch (op) {
case ZEND_ASSIGN_ADD:
opline->opcode = ZEND_ASSIGN_ADD_OBJ;
break;
@ -287,10 +287,10 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar
opline_ptr->op2.u.EA.type = ZEND_FETCH_LOCAL;
if (varname->op_type == IS_CONST && varname->u.constant.type == IS_STRING) {
if(zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
if (zend_hash_exists(CG(auto_globals), varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_GLOBAL;
} else {
if(CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
if (CG(active_op_array)->static_variables && zend_hash_exists(CG(active_op_array)->static_variables, varname->u.constant.value.str.val, varname->u.constant.value.str.len+1)) {
opline_ptr->op2.u.EA.type = ZEND_FETCH_STATIC;
}
}
@ -1304,7 +1304,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC)
}
if (original_op == ZEND_SEND_VAR) {
switch(op) {
switch (op) {
case ZEND_SEND_VAR_NO_REF:
zend_do_end_variable_parse(BP_VAR_R, 0 TSRMLS_CC);
break;
@ -2222,7 +2222,7 @@ void zend_do_fetch_property(znode *result, znode *object, znode *property TSRMLS
SET_UNUSED(opline_ptr->op1); /* this means $this for objects */
opline_ptr->op2 = *property;
/* if it was usual fetch, we change it to object fetch */
switch(opline_ptr->opcode) {
switch (opline_ptr->opcode) {
case ZEND_FETCH_W:
opline_ptr->opcode = ZEND_FETCH_OBJ_W;
break;
@ -2550,7 +2550,7 @@ void zend_do_list_end(znode *result, znode *expr TSRMLS_DC)
opline = get_next_op(CG(active_op_array) TSRMLS_CC);
if (dimension == tmp_dimension_llist->head) { /* first */
last_container = *expr;
switch(expr->op_type) {
switch (expr->op_type) {
case IS_VAR:
opline->opcode = ZEND_FETCH_DIM_R;
break;
@ -2606,7 +2606,7 @@ void zend_do_fetch_static_variable(znode *varname, znode *static_assignment, int
ALLOC_ZVAL(tmp);
convert_to_string(&varname->u.constant);
if(static_assignment) {
if (static_assignment) {
*tmp = static_assignment->u.constant;
} else {
INIT_ZVAL(*tmp);
@ -3090,7 +3090,7 @@ int zendlex(znode *zendlval TSRMLS_DC)
zendlval->u.constant.type = IS_LONG;
retval = lex_scan(&zendlval->u.constant TSRMLS_CC);
switch(retval) {
switch (retval) {
case T_COMMENT:
case T_OPEN_TAG:
case T_WHITESPACE:

View File

@ -52,7 +52,7 @@ static void zend_extension_fcall_end_handler(zend_extension *extension, zend_op_
static inline zval *_get_zval_ptr(znode *node, temp_variable *Ts, zval **should_free TSRMLS_DC)
{
switch(node->op_type) {
switch (node->op_type) {
case IS_CONST:
*should_free = 0;
return &node->u.constant;
@ -243,8 +243,8 @@ static inline void make_real_object(zval **object_ptr TSRMLS_DC)
static inline zval **get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, int type TSRMLS_DC)
{
if(op->op_type == IS_UNUSED) {
if(EG(This)) {
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
/* this should actually never be modified, _ptr_ptr is modified only when
the object is empty */
return &EG(This);
@ -257,8 +257,8 @@ static inline zval **get_obj_zval_ptr_ptr(znode *op, temp_variable *Ts, int type
static inline zval *get_obj_zval_ptr(znode *op, temp_variable *Ts, zval **freeop, int type TSRMLS_DC)
{
if(op->op_type == IS_UNUSED) {
if(EG(This)) {
if (op->op_type == IS_UNUSED) {
if (EG(This)) {
return EG(This);
} else {
zend_error(E_ERROR, "Using $this when not in object context");
@ -624,7 +624,7 @@ static inline HashTable *zend_get_target_symbol_table(zend_op *opline, temp_vari
return EG(active_op_array)->static_variables;
break;
case ZEND_FETCH_STATIC_MEMBER:
if(T(opline->op2.u.var).EA.class_entry->parent) {
if (T(opline->op2.u.var).EA.class_entry->parent) {
/* if inherited, try to look up */
return zend_find_inherited_static(T(opline->op2.u.var).EA.class_entry, variable);
} else {
@ -784,7 +784,7 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
zval ***retval = &T(result->u.var).var.ptr_ptr;
if (!container_ptr) {
if(T(op1->u.var).EA.type == IS_STRING_OFFSET) {
if (T(op1->u.var).EA.type == IS_STRING_OFFSET) {
zval *offset;
zend_error(E_WARNING, "Cannot use string offset as an array");
@ -1828,7 +1828,7 @@ int zend_make_var_handler(ZEND_OPCODE_HANDLER_ARGS)
zval *value, *value2;
value = get_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R);
switch(EX(opline)->op1.op_type) {
switch (EX(opline)->op1.op_type) {
case IS_TMP_VAR:
value2 = value;
ALLOC_ZVAL(value);
@ -3030,7 +3030,7 @@ inline int zend_init_add_array_helper(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (offset) {
switch(offset->type) {
switch (offset->type) {
case IS_DOUBLE:
zend_hash_index_update(array_ptr->value.ht, (long) offset->value.dval, &expr_ptr, sizeof(zval *), NULL);
break;

View File

@ -260,7 +260,7 @@ ZEND_API char *get_active_function_name(TSRMLS_D)
if (!zend_is_executing(TSRMLS_C)) {
return NULL;
}
switch(EG(function_state_ptr)->function->type) {
switch (EG(function_state_ptr)->function->type) {
case ZEND_USER_FUNCTION: {
char *function_name = ((zend_op_array *) EG(function_state_ptr)->function)->function_name;

View File

@ -80,7 +80,7 @@ ZEND_API void zend_indent()
default:
if (token.type==0) {
/* keyword */
switch(token_type) {
switch (token_type) {
case ',':
ZEND_PUTS(", ");
goto dflt_printout;

View File

@ -207,7 +207,7 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &variable_ptr) == SUCCESS) {
if(*variable_ptr == value) {
if (*variable_ptr == value) {
/* if we already have this value there, we don't actually need to do anything */
setter_done = 1;
} else {

View File

@ -339,7 +339,7 @@ int print_class(zend_class_entry *class_entry TSRMLS_DC)
ZEND_API unary_op_type get_unary_op(int opcode)
{
switch(opcode) {
switch (opcode) {
case ZEND_BW_NOT:
return (unary_op_type) bitwise_not_function;
break;

View File

@ -504,7 +504,7 @@ ZEND_API void convert_to_array(zval *op)
{
TSRMLS_FETCH();
switch(op->type) {
switch (op->type) {
case IS_ARRAY:
return;
break;
@ -538,7 +538,7 @@ ZEND_API void convert_to_array(zval *op)
ZEND_API void convert_to_object(zval *op)
{
switch(op->type) {
switch (op->type) {
case IS_ARRAY:
{
/* OBJECTS_OPTIMIZE */
@ -1540,7 +1540,7 @@ ZEND_API int decrement_function(zval *op1)
op1->type = IS_LONG;
break;
}
switch(is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
switch (is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) {
case IS_LONG:
STR_FREE(op1->value.str.val);
if (lval == LONG_MIN) {

View File

@ -109,7 +109,7 @@ static inline zend_bool is_numeric_string(char *str, int length, long *lval, dou
register char *ptr=str, *end=str+length;
while (ptr<end) {
switch(*ptr++) {
switch (*ptr++) {
case 'e':
case 'E':
/* scientific notation, not handled by the BC library */

View File

@ -37,7 +37,7 @@ ZEND_API void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
if (zvalue->type==IS_LONG) {
return;
}
switch(zvalue->type & ~IS_CONSTANT_INDEX) {
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
case IS_STRING:
case IS_CONSTANT:
CHECK_ZVAL_STRING_REL(zvalue);