Permalink
Browse files

Whitespace

  • Loading branch information...
1 parent adf8982 commit 4f6c95d17abdd3aa983b36117f8a9c67405540e6 @zsuraski zsuraski committed Aug 11, 2001
View
@@ -103,7 +103,7 @@ static void print_hash(HashTable *ht, int indent)
ZEND_PUTS(string_key);
break;
case HASH_KEY_IS_LONG:
- zend_printf("%ld",num_key);
+ zend_printf("%ld", num_key);
break;
}
ZEND_PUTS("] => ");
@@ -183,7 +183,7 @@ ZEND_API int zend_print_zval_ex(zend_write_func_t write_func, zval *expr, int in
}
return 0;
}
- write_func(expr->value.str.val,expr->value.str.len);
+ write_func(expr->value.str.val, expr->value.str.len);
if (use_copy) {
zval_dtor(expr);
}
@@ -207,7 +207,7 @@ ZEND_API void zend_print_zval_r_ex(zend_write_func_t write_func, zval *expr, int
expr->value.ht->nApplyCount=0;
return;
}
- print_hash(expr->value.ht,indent);
+ print_hash(expr->value.ht, indent);
expr->value.ht->nApplyCount--;
break;
case IS_OBJECT:
View
@@ -292,8 +292,8 @@ typedef int (*zend_write_func_t)(const char *str, uint str_length);
#undef MIN
#undef MAX
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a, b) (((a)>(b))?(a):(b))
+#define MIN(a, b) (((a)<(b))?(a):(b))
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
@@ -490,15 +490,15 @@ ZEND_API int zend_get_configuration_directive(char *name, uint name_length, zval
} \
INIT_PZVAL(&(zv));
-#define REPLACE_ZVAL_VALUE(ppzv_dest,pzv_src,copy) { \
- int is_ref,refcount; \
+#define REPLACE_ZVAL_VALUE(ppzv_dest, pzv_src, copy) { \
+ int is_ref, refcount; \
\
SEPARATE_ZVAL_IF_NOT_REF(ppzv_dest); \
is_ref = (*ppzv_dest)->is_ref; \
refcount = (*ppzv_dest)->refcount; \
zval_dtor(*ppzv_dest); \
**ppzv_dest = *pzv_src; \
- if (copy) { \
+ if (copy) { \
zval_copy_ctor(*ppzv_dest); \
} \
(*ppzv_dest)->is_ref = is_ref; \
View
@@ -593,7 +593,7 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC)
}
-ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
+ZEND_API int add_assoc_function(zval *arg, char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS))
{
zend_error(E_WARNING, "add_assoc_function() is no longer supported");
return FAILURE;
@@ -686,7 +686,7 @@ ZEND_API int add_index_long(zval *arg, uint index, long n)
MAKE_STD_ZVAL(tmp);
ZVAL_LONG(tmp, n);
- return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
+ return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -707,7 +707,7 @@ ZEND_API int add_index_bool(zval *arg, uint index, int b)
MAKE_STD_ZVAL(tmp);
ZVAL_BOOL(tmp, b);
- return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
+ return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -718,7 +718,7 @@ ZEND_API int add_index_resource(zval *arg, uint index, int r)
MAKE_STD_ZVAL(tmp);
ZVAL_RESOURCE(tmp, r);
- return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
+ return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -729,7 +729,7 @@ ZEND_API int add_index_double(zval *arg, uint index, double d)
MAKE_STD_ZVAL(tmp);
ZVAL_DOUBLE(tmp, d);
- return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),NULL);
+ return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), NULL);
}
@@ -823,7 +823,7 @@ ZEND_API int add_next_index_string(zval *arg, char *str, int duplicate)
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
- return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
+ return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}
@@ -834,7 +834,7 @@ ZEND_API int add_next_index_stringl(zval *arg, char *str, uint length, int dupli
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate);
- return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *),NULL);
+ return zend_hash_next_index_insert(Z_ARRVAL_P(arg), &tmp, sizeof(zval *), NULL);
}
@@ -895,7 +895,7 @@ ZEND_API int add_get_index_string(zval *arg, uint index, char *str, void **dest,
MAKE_STD_ZVAL(tmp);
ZVAL_STRING(tmp, str, duplicate);
- return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *),dest);
+ return zend_hash_index_update(Z_ARRVAL_P(arg), index, (void *) &tmp, sizeof(zval *), dest);
}
@@ -995,7 +995,7 @@ ZEND_API int zend_startup_module(zend_module_entry *module)
TSRMLS_FETCH();
if (module->module_startup_func(MODULE_PERSISTENT, module->module_number TSRMLS_CC)==FAILURE) {
- zend_error(E_CORE_ERROR,"Unable to start %s module",module->name);
+ zend_error(E_CORE_ERROR,"Unable to start %s module", module->name);
return FAILURE;
}
}
@@ -1012,7 +1012,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
zend_function_entry *ptr = functions;
zend_function function;
zend_internal_function *internal_function = (zend_internal_function *)&function;
- int count=0,unload=0;
+ int count=0, unload=0;
HashTable *target_function_table = function_table;
int error_type;
@@ -1046,7 +1046,7 @@ int zend_register_functions(zend_function_entry *functions, HashTable *function_
if (unload) { /* before unloading, display all remaining bad function in the module */
while (ptr->fname) {
if (zend_hash_exists(target_function_table, ptr->fname, strlen(ptr->fname)+1)) {
- zend_error(error_type, "Function registration failed - duplicate name - %s",ptr->fname);
+ zend_error(error_type, "Function registration failed - duplicate name - %s", ptr->fname);
}
ptr++;
}
@@ -1087,14 +1087,14 @@ ZEND_API int zend_register_module(zend_module_entry *module)
TSRMLS_FETCH();
#if 0
- zend_printf("%s: Registering module %d\n",module->name, module->module_number);
+ zend_printf("%s: Registering module %d\n", module->name, module->module_number);
#endif
if (module->functions && zend_register_functions(module->functions, NULL, module->type TSRMLS_CC)==FAILURE) {
- zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load",module->name);
+ zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
return FAILURE;
}
module->module_started=1;
- return zend_hash_add(&module_registry, module->name,strlen(module->name)+1,(void *)module,sizeof(zend_module_entry),NULL);
+ return zend_hash_add(&module_registry, module->name, strlen(module->name)+1, (void *)module, sizeof(zend_module_entry), NULL);
}
@@ -1111,7 +1111,7 @@ void module_destructor(zend_module_entry *module)
if (module->module_started && module->module_shutdown_func) {
#if 0
- zend_printf("%s: Module shutdown\n",module->name);
+ zend_printf("%s: Module shutdown\n", module->name);
#endif
module->module_shutdown_func(module->type, module->module_number TSRMLS_CC);
}
@@ -1133,7 +1133,7 @@ int module_registry_request_startup(zend_module_entry *module TSRMLS_DC)
{
if (module->request_startup_func) {
#if 0
- zend_printf("%s: Request startup\n",module->name);
+ zend_printf("%s: Request startup\n", module->name);
#endif
if (module->request_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) {
zend_error(E_WARNING, "request_startup() for %s module failed", module->name);
@@ -1153,7 +1153,7 @@ int module_registry_cleanup(zend_module_entry *module TSRMLS_DC)
case MODULE_PERSISTENT:
if (module->request_shutdown_func) {
#if 0
- zend_printf("%s: Request shutdown\n",module->name);
+ zend_printf("%s: Request shutdown\n", module->name);
#endif
module->request_shutdown_func(module->type, module->module_number TSRMLS_CC);
}
View
@@ -161,7 +161,7 @@ ZEND_API int _object_init(zval *arg ZEND_FILE_LINE_DC TSRMLS_DC);
ZEND_API int _object_init_ex(zval *arg, zend_class_entry *ce ZEND_FILE_LINE_DC TSRMLS_DC);
/* no longer supported */
-ZEND_API int add_assoc_function(zval *arg, char *key,void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
+ZEND_API int add_assoc_function(zval *arg, char *key, void (*function_ptr)(INTERNAL_FUNCTION_PARAMETERS));
ZEND_API int add_assoc_long_ex(zval *arg, char *key, uint key_len, long n);
ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
@@ -240,7 +240,7 @@ ZEND_API int call_user_function_ex(HashTable *function_table, zval **object_pp,
ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
int is_ref, int num_symbol_tables, ...);
-#define add_method(arg,key,method) add_assoc_function((arg),(key),(method))
+#define add_method(arg, key, method) add_assoc_function((arg), (key), (method))
#if ZEND_DEBUG
#define CHECK_ZVAL_STRING(z) \
@@ -252,12 +252,12 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
#define CHECK_ZVAL_STRING_REL(z)
#endif
-#define ZVAL_RESOURCE(z,l) { \
+#define ZVAL_RESOURCE(z, l) { \
(z)->type = IS_RESOURCE; \
(z)->value.lval = l; \
}
-#define ZVAL_BOOL(z,b) { \
+#define ZVAL_BOOL(z, b) { \
(z)->type = IS_BOOL; \
(z)->value.lval = b; \
}
@@ -266,27 +266,27 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
(z)->type = IS_NULL; \
}
-#define ZVAL_LONG(z,l) { \
+#define ZVAL_LONG(z, l) { \
(z)->type = IS_LONG; \
(z)->value.lval = l; \
}
-#define ZVAL_DOUBLE(z,d) { \
+#define ZVAL_DOUBLE(z, d) { \
(z)->type = IS_DOUBLE; \
(z)->value.dval = d; \
}
-#define ZVAL_STRING(z,s,duplicate) { \
+#define ZVAL_STRING(z, s, duplicate) { \
char *__s=(s); \
(z)->value.str.len = strlen(__s); \
- (z)->value.str.val = (duplicate?estrndup(__s,(z)->value.str.len):__s); \
+ (z)->value.str.val = (duplicate?estrndup(__s, (z)->value.str.len):__s); \
(z)->type = IS_STRING; \
}
-#define ZVAL_STRINGL(z,s,l,duplicate) { \
+#define ZVAL_STRINGL(z, s, l, duplicate) { \
char *__s=(s); int __l=l; \
(z)->value.str.len = __l; \
- (z)->value.str.val = (duplicate?estrndup(__s,__l):__s); \
+ (z)->value.str.val = (duplicate?estrndup(__s, __l):__s); \
(z)->type = IS_STRING; \
}
@@ -296,63 +296,63 @@ ZEND_API int zend_set_hash_symbol(zval *symbol, char *name, int name_length,
(z)->type = IS_STRING; \
}
-#define ZVAL_FALSE(z) ZVAL_BOOL(z,0)
-#define ZVAL_TRUE(z) ZVAL_BOOL(z,1)
+#define ZVAL_FALSE(z) ZVAL_BOOL(z, 0)
+#define ZVAL_TRUE(z) ZVAL_BOOL(z, 1)
-#define RETVAL_RESOURCE(l) ZVAL_RESOURCE(return_value,l)
-#define RETVAL_BOOL(b) ZVAL_BOOL(return_value,b)
+#define RETVAL_RESOURCE(l) ZVAL_RESOURCE(return_value, l)
+#define RETVAL_BOOL(b) ZVAL_BOOL(return_value, b)
#define RETVAL_NULL() ZVAL_NULL(return_value)
-#define RETVAL_LONG(l) ZVAL_LONG(return_value,l)
-#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value,d)
-#define RETVAL_STRING(s,duplicate) ZVAL_STRING(return_value,s,duplicate)
-#define RETVAL_STRINGL(s,l,duplicate) ZVAL_STRINGL(return_value,s,l,duplicate)
+#define RETVAL_LONG(l) ZVAL_LONG(return_value, l)
+#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d)
+#define RETVAL_STRING(s, duplicate) ZVAL_STRING(return_value, s, duplicate)
+#define RETVAL_STRINGL(s, l, duplicate) ZVAL_STRINGL(return_value, s, l, duplicate)
#define RETVAL_EMPTY_STRING() ZVAL_EMPTY_STRING(return_value)
-#define RETVAL_FALSE ZVAL_BOOL(return_value,0)
-#define RETVAL_TRUE ZVAL_BOOL(return_value,1)
+#define RETVAL_FALSE ZVAL_BOOL(return_value, 0)
+#define RETVAL_TRUE ZVAL_BOOL(return_value, 1)
#define RETURN_RESOURCE(l) { RETVAL_RESOURCE(l); return; }
#define RETURN_BOOL(b) { RETVAL_BOOL(b); return; }
#define RETURN_NULL() { RETVAL_NULL(); return;}
#define RETURN_LONG(l) { RETVAL_LONG(l); return; }
#define RETURN_DOUBLE(d) { RETVAL_DOUBLE(d); return; }
-#define RETURN_STRING(s,duplicate) { RETVAL_STRING(s,duplicate); return; }
-#define RETURN_STRINGL(s,l,duplicate) { RETVAL_STRINGL(s,l,duplicate); return; }
+#define RETURN_STRING(s, duplicate) { RETVAL_STRING(s, duplicate); return; }
+#define RETURN_STRINGL(s, l, duplicate) { RETVAL_STRINGL(s, l, duplicate); return; }
#define RETURN_EMPTY_STRING() { RETVAL_EMPTY_STRING(); return; }
#define RETURN_FALSE { RETVAL_FALSE; return; }
#define RETURN_TRUE { RETVAL_TRUE; return; }
-#define SET_VAR_STRING(n,v) { \
+#define SET_VAR_STRING(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
- ZVAL_STRING(var,v,0); \
+ ZVAL_STRING(var, v, 0); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
-#define SET_VAR_STRINGL(n,v,l) { \
+#define SET_VAR_STRINGL(n, v, l) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
- ZVAL_STRINGL(var,v,l,0); \
+ ZVAL_STRINGL(var, v, l, 0); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
-#define SET_VAR_LONG(n,v) { \
+#define SET_VAR_LONG(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
- ZVAL_LONG(var,v); \
+ ZVAL_LONG(var, v); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
-#define SET_VAR_DOUBLE(n,v) { \
+#define SET_VAR_DOUBLE(n, v) { \
{ \
zval *var; \
ALLOC_ZVAL(var); \
- ZVAL_DOUBLE(var,v); \
+ ZVAL_DOUBLE(var, v); \
ZEND_SET_GLOBAL_VAR(n, var); \
} \
}
View
@@ -61,7 +61,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
# if ZEND_DEBUG
#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, __zend_filename, __zend_lineno)
# else
-#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL,0)
+#define CHECK_MEMORY_LIMIT(s, rs) _CHECK_MEMORY_LIMIT(s, rs, NULL, 0)
# endif
#define _CHECK_MEMORY_LIMIT(s, rs, file, lineno) { AG(allocated_memory) += rs;\
@@ -72,7 +72,7 @@ static long mem_block_end_magic = MEM_BLOCK_END_MAGIC;
} \
if (!AG(memory_exhausted)) { \
if (!file) { \
- zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit),s); \
+ zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted (tried to allocate %d bytes)", AG(memory_limit), s); \
} else { \
zend_error(E_ERROR,"Allowed memory size of %d bytes exhausted at %s:%d (tried to allocate %d bytes)", AG(memory_limit), file, lineno, s); \
} \
@@ -295,7 +295,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LIN
HANDLE_BLOCK_INTERRUPTIONS();
REMOVE_POINTER_FROM_LIST(p);
- p = (zend_mem_header *) ZEND_DO_REALLOC(p,sizeof(zend_mem_header)+MEM_HEADER_PADDING+SIZE+END_MAGIC_SIZE);
+ p = (zend_mem_header *) ZEND_DO_REALLOC(p, sizeof(zend_mem_header)+MEM_HEADER_PADDING+SIZE+END_MAGIC_SIZE);
if (!p) {
if (!allow_failure) {
fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size);
Oops, something went wrong.

0 comments on commit 4f6c95d

Please sign in to comment.