]> granicus.if.org Git - php/commitdiff
h WHitespace
authorAndi Gutmans <andi@php.net>
Sat, 30 Nov 2002 11:20:25 +0000 (11:20 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 30 Nov 2002 11:20:25 +0000 (11:20 +0000)
12 files changed:
Zend/zend.c
Zend/zend_API.c
Zend/zend_builtin_functions.c
Zend/zend_compile.c
Zend/zend_execute.c
Zend/zend_execute_API.c
Zend/zend_indent.c
Zend/zend_object_handlers.c
Zend/zend_opcode.c
Zend/zend_operators.c
Zend/zend_operators.h
Zend/zend_variables.c

index f44321b386d2df79ee619dc2a72a6bf3fdccd48a..2ae7f1b643b42313559366ed9ec65f1deb1ce261 100644 (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) {
index 548bfe41327e42eb4e83b0a7fc6e844784de3f84..47636708868e34c02a162ac85488d12f413c9352 100644 (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
index f41b5ee7b8099898001b70beb97046744a89428d..5e803057d7893eb2f74d22dc51ce46e109ca6f4b 100644 (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();
index aea3399293cb9bc9ce6623d57b21558798ec30cb..d50c424f338041b6225a9b02098d681faaa74202 100644 (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:
index e4570e9b36a6ff681e3dbc2b68c033de0c544d64..97cdcb05feeecb35a7c4f05b65a9f08f9af1b0d4 100644 (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;
index 933751168f8475fc6490fc0104e5f4466aba69da..41012d4e82a174123b9116076ceca412262e9a8e 100644 (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;
                        
index 71f1fb70775fe43323e79917dc1db1c8891a27c2..5477ca04acdc47ef14f0a30571165fe158bf14ee 100644 (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;
index 04ba0bd1bf09966dd6415d385204f14c7779194f..c86eac465c420792f9ffd26bf92d7ef628d183b8 100644 (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 {
index 5feb70599695c3f21550befa0c587bd8084b199a..ad48482f17d33f1231f3e40d3e31e5e23756f9cb 100644 (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;
index d4e1a5a5b05e6a8617666f5011e0d8b17d9d40d2..a6c4e05fcc78901a90a4fa1dac7eb1a90e7fd31d 100644 (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) {
index 74b71e1b12f2167776ccea56d5f124a0261807ab..2a7db38cac8dab4d9e18c8a9491322f756ea1079 100644 (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 */
index b9eafec78f1529e2d020f9187824deb994d65d79..02dfb233eeb73c467c6af6dc6d04cd1a89aa1a94 100644 (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);