### Eclipse Workspace Patch 1.0 #P Xdebug Index: xdebug.c =================================================================== RCS file: /repository/xdebug/xdebug.c,v retrieving revision 1.449 diff -u -r1.449 xdebug.c --- xdebug.c 11 Jun 2009 08:10:34 -0000 1.449 +++ xdebug.c 20 Jun 2009 23:13:05 -0000 @@ -2121,26 +2121,34 @@ xdebug_str str = {0, 0, NULL}; char *tmp_value; - if (XG(trace_format) != 0) { + if (XG(trace_format) == 0) { // Human-readable + xdebug_str_addl(&str, " ", 20, 0); + if (XG(show_mem_delta)) { + xdebug_str_addl(&str, " ", 8, 0); + } + for (j = 0; j < i->level; j++) { + xdebug_str_addl(&str, " ", 2, 0); + } + xdebug_str_addl(&str, " >=> ", 7, 0); + + tmp_value = xdebug_get_zval_value(retval, 0, NULL); + if (tmp_value) { + xdebug_str_add(&str, tmp_value, 1); + } + xdebug_str_addl(&str, "\n", 2, 0); + + return str.d; + } else if (XG(trace_format) == 1) { // Computerized + xdebug_str_addl(&str, "\t", 1, 0); + tmp_value = xdebug_get_zval_value(retval, 0, NULL); + if (tmp_value) { + xdebug_str_add(&str, tmp_value, 1); + } + xdebug_str_addl(&str, "\n", 2, 0); + return str.d; + } else { return xdstrdup(""); } - - xdebug_str_addl(&str, " ", 20, 0); - if (XG(show_mem_delta)) { - xdebug_str_addl(&str, " ", 8, 0); - } - for (j = 0; j < i->level; j++) { - xdebug_str_addl(&str, " ", 2, 0); - } - xdebug_str_addl(&str, " >=> ", 7, 0); - - tmp_value = xdebug_get_zval_value(retval, 0, NULL); - if (tmp_value) { - xdebug_str_add(&str, tmp_value, 1); - } - xdebug_str_addl(&str, "\n", 2, 0); - - return str.d; } static char* return_trace_stack_frame_begin_normal(function_stack_entry* i TSRMLS_DC) @@ -2279,10 +2287,11 @@ xdebug_str_add(&str, "1\t", 0); xdebug_str_add(&str, xdebug_sprintf("%f\t", xdebug_get_utime() - XG(start_time)), 1); #if HAVE_PHP_MEMORY_USAGE - xdebug_str_add(&str, xdebug_sprintf("%lu\n", XG_MEMORY_USAGE()), 1); -#else - xdebug_str_add(&str, "\n", 0); + xdebug_str_add(&str, xdebug_sprintf("%lu", XG_MEMORY_USAGE()), 1); #endif + if (XG(collect_params) == 0) { + xdebug_str_add(&str, "\n", 0); + } } return str.d;