com php-src: revert PHP_EOL changes: phpdbg.c phpdb g_bp.c phpdbg_cmd.c phpdbg_frame.c phpdbg_h elp.c phpdbg_prompt.c phpdbg_utils.c phpdbg_w atch.c

From: Date: Sun, 19 Oct 2014 18:09:39 +0000
Subject: com php-src: revert PHP_EOL changes: phpdbg.c phpdb g_bp.c phpdbg_cmd.c phpdbg_frame.c phpdbg_h elp.c phpdbg_prompt.c phpdbg_utils.c phpdbg_w atch.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82530@lists.php.net to get a copy of this message
Commit: 795cb98ac6a85e86ff0f1a955408cffba7eb5e2e Author: Anatol Belski <ab@php.net> Sun, 19 Oct 2014 20:09:39 +0200 Parents: 362c87f4b0aea6aa6b812259190f34259b592d80 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=795cb98ac6a85e86ff0f1a955408cffba7eb5e2e Log: revert PHP_EOL changes Changed paths: M phpdbg.c M phpdbg_bp.c M phpdbg_cmd.c M phpdbg_frame..c M phpdbg_help.c M phpdbg_prompt.c M phpdbg_utils.c M phpdbg_watch.c

diff --git a/phpdbg.c b/phpdbg.c index 2893aa3..72582ce 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -742,10 +742,10 @@ static void phpdbg_welcome(zend_bool cleaning TSRMLS_DC) /* {{{ */ } phpdbg_write("cleaninfo", "classes=\"%d\" functions=\"%d\" constants=\"%d\" includes=\"%d\"", - "Classes %d" PHP_EOL - "Functions %d" PHP_EOL - "Constants %d" PHP_EOL - "Includes %d" PHP_EOL, + "Classes %d\n" + "Functions %d\n" + "Constants %d\n" + "Includes %d\n", zend_hash_num_elements(EG(class_table)), zend_hash_num_elements(EG(function_table)), zend_hash_num_elements(EG(zend_constants)), @@ -1170,7 +1170,7 @@ phpdbg_main: sapi_startup(phpdbg); phpdbg->startup(phpdbg); printf( - "phpdbg %s (built: %s %s)" PHP_EOL "PHP %s, Copyright (c) 1997-2014 The PHP Group" PHP_EOL "%s", + "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2014 The PHP Group\n%s", PHPDBG_VERSION, __DATE__, __TIME__, diff --git a/phpdbg_bp.c b/phpdbg_bp.c index e7f313d..26e6ee2 100644 --- a/phpdbg_bp.c +++ b/phpdbg_bp.c @@ -1339,8 +1339,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position; phpdbg_breaksymbol_t *brake; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Function Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Function Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], &position); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], (void**) &brake, &position) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_SYM], &position)) { @@ -1357,8 +1357,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ zend_uint class_len = 0; zend_ulong class_idx = 0L; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Method Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Method Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], &position[0]); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], (void**) &class_table, &position[0]) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD], &position[0])) { @@ -1383,8 +1383,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *points; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("File Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("File Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], &position[0]); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], (void**) &points, &position[0]) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE], &position[0])) { @@ -1405,8 +1405,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position; phpdbg_breakline_t *brake; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Opline Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Opline Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], &position); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (void**) &brake, &position) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], &position)) { @@ -1436,8 +1436,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ zend_uint class_len = 0, method_len = 0; zend_ulong class_idx = 0L, method_idx = 0L; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Method opline Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Method opline Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OPLINE], &position[0]); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OPLINE], (void**) &class_table, &position[0]) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD_OPLINE], &position[0])) { @@ -1475,8 +1475,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ zend_uint function_len = 0; zend_ulong function_idx = 0L; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Function opline Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Function opline Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_OPLINE], &position[0]); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_OPLINE], (void**) &function_table, &position[0]) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FUNCTION_OPLINE], &position[0])) { @@ -1505,8 +1505,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ zend_uint file_len = 0; zend_ulong file_idx = 0L; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("File opline Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("File opline Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE], &position[0]); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE], (void**) &file_table, &position[0]) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE], &position[0])) { @@ -1531,8 +1531,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position; phpdbg_breakcond_t *brake; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Conditional Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Conditional Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], (void**) &brake, &position) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position)) { @@ -1607,8 +1607,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position; phpdbg_breakop_t *brake; - phpdbg_out(SEPARATE PHP_EOL); - phpdbg_out("Opcode Breakpoints:" PHP_EOL); + phpdbg_out(SEPARATE "\n"); + phpdbg_out("Opcode Breakpoints:\n"); for (zend_hash_internal_pointer_reset_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], &position); zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], (void**) &brake, &position) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], &position)) { diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c index 94e8e4c..ae4925c 100644 --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@ -417,43 +417,43 @@ PHPDBG_API void phpdbg_param_debug(const phpdbg_param_t *param, const char *msg) if (param && param->type) { switch (param->type) { case STR_PARAM: - fprintf(stderr, "%s STR_PARAM(%s=%lu)" PHP_EOL, msg, param->str, param->len); + fprintf(stderr, "%s STR_PARAM(%s=%lu)\n", msg, param->str, param->len); break; case ADDR_PARAM: - fprintf(stderr, "%s ADDR_PARAM(%lu)" PHP_EOL, msg, param->addr); + fprintf(stderr, "%s ADDR_PARAM(%lu)\n", msg, param->addr); break; case NUMERIC_FILE_PARAM: - fprintf(stderr, "%s NUMERIC_FILE_PARAM(%s:#%lu)" PHP_EOL, msg, param->file.name, param->file.line); + fprintf(stderr, "%s NUMERIC_FILE_PARAM(%s:#%lu)\n", msg, param->file.name, param->file.line); break; case FILE_PARAM: - fprintf(stderr, "%s FILE_PARAM(%s:%lu)" PHP_EOL, msg, param->file.name, param->file.line); + fprintf(stderr, "%s FILE_PARAM(%s:%lu)\n", msg, param->file.name, param->file.line); break; case METHOD_PARAM: - fprintf(stderr, "%s METHOD_PARAM(%s::%s)" PHP_EOL, msg, param->method.class, param->method.name); + fprintf(stderr, "%s METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); break; case NUMERIC_METHOD_PARAM: - fprintf(stderr, "%s NUMERIC_METHOD_PARAM(%s::%s)" PHP_EOL, msg, param->method.class, param->method.name); + fprintf(stderr, "%s NUMERIC_METHOD_PARAM(%s::%s)\n", msg, param->method.class, param->method.name); break; case NUMERIC_FUNCTION_PARAM: - fprintf(stderr, "%s NUMERIC_FUNCTION_PARAM(%s::%ld)" PHP_EOL, msg, param->str, param->num); + fprintf(stderr, "%s NUMERIC_FUNCTION_PARAM(%s::%ld)\n", msg, param->str, param->num); break; case NUMERIC_PARAM: - fprintf(stderr, "%s NUMERIC_PARAM(%ld)" PHP_EOL, msg, param->num); + fprintf(stderr, "%s NUMERIC_PARAM(%ld)\n", msg, param->num); break; case COND_PARAM: - fprintf(stderr, "%s COND_PARAM(%s=%lu)" PHP_EOL, msg, param->str, param->len); + fprintf(stderr, "%s COND_PARAM(%s=%lu)\n", msg, param->str, param->len); break; case OP_PARAM: - fprintf(stderr, "%s OP_PARAM(%s=%lu)" PHP_EOL, msg, param->str, param->len); + fprintf(stderr, "%s OP_PARAM(%s=%lu)\n", msg, param->str, param->len); break; default: { diff --git a/phpdbg_frame.c b/phpdbg_frame.c index f4ab923..8baaf77 100644 --- a/phpdbg_frame.c +++ b/phpdbg_frame.c @@ -228,16 +228,16 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ phpdbg_out("frame #%d: ", i++); phpdbg_xml("<frame %r id=\"%d\" file=\"%s\" line=\"%d\"", i, Z_STRVAL_PP(file), Z_LVAL_PP(line)); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_out(" at %s:%ld" PHP_EOL, Z_STRVAL_PP(file), Z_LVAL_PP(line)); + phpdbg_out(" at %s:%ld\n", Z_STRVAL_PP(file), Z_LVAL_PP(line)); } else { phpdbg_out(" => "); phpdbg_xml("<frame %r id=\"%d\" internal=\"internal\"", i); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_out(" (internal function)" PHP_EOL); + phpdbg_out(" (internal function)\n"); } } - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); phpdbg_xml("</backtrace>"); zval_dtor(&zbacktrace); diff --git a/phpdbg_help.c b/phpdbg_help.c index f2c6486..edb617f 100644 --- a/phpdbg_help.c +++ b/phpdbg_help.c @@ -136,7 +136,7 @@ void pretty_print(char *text TSRMLS_DC) phpdbg_error("help", "overrun=\"%lu\"", "Output overrun of %lu bytes", ((q - new) - size)); } - phpdbg_out("%s" PHP_EOL, new); + phpdbg_out("%s\n", new); efree(new); } /* }}} */ @@ -144,7 +144,7 @@ void pretty_print(char *text TSRMLS_DC) void summary_print(phpdbg_command_t const * const cmd TSRMLS_DC) { char *summary; - spprintf(&summary, 0, "Command: **%s** Alias: **%c** **%s**" PHP_EOL, cmd->name, cmd->alias, cmd->tip); + spprintf(&summary, 0, "Command: **%s** Alias: **%c** **%s**\n", cmd->name, cmd->alias, cmd->tip); pretty_print(summary TSRMLS_CC); efree(summary); } @@ -285,7 +285,7 @@ PHPDBG_HELP(aliases) /* {{{ */ /* Print out aliases for help as this one comes last, with the added text on how aliases are used */ get_command("h", 1, &c, phpdbg_prompt_commands TSRMLS_CC); - phpdbg_writeln("aliasinfo", "alias=\"%c\" name=\"%s\" tip=\"%s\"", " %c %-20s %s" PHP_EOL, c->alias, c->name, c->tip); + phpdbg_writeln("aliasinfo", "alias=\"%c\" name=\"%s\" tip=\"%s\"", " %c %-20s %s\n", c->alias, c->name, c->tip); phpdbg_xml("<helpaliases>"); @@ -319,7 +319,7 @@ PHPDBG_HELP(aliases) /* {{{ */ * Also note the convention that help text not directly referenceable as a help param * has a key ending in ! */ -#define CR PHP_EOL +#define CR "\n" phpdbg_help_text_t phpdbg_help_text[] = { /******************************** General Help Topics ********************************/ diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index cc2062b..194c890 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -190,7 +190,7 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack TSRMLS_DC) /* {{{ * if (fretval) { zend_print_zval_r(fretval, 0 TSRMLS_CC); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); } zval_dtor(&fname); @@ -551,7 +551,7 @@ static inline void phpdbg_handle_exception(TSRMLS_D) /* }}} */ zend_call_function(&fci, NULL TSRMLS_CC); if (trace) { - phpdbg_writeln("exception", "name=\"%s\" trace=\"%.*s\"", "Uncaught %s!" PHP_EOL "%.*s", Z_OBJCE(exception)->name, Z_STRLEN_P(trace), Z_STRVAL_P(trace)); + phpdbg_writeln("exception", "name=\"%s\" trace=\"%.*s\"", "Uncaught %s!\n%.*s", Z_OBJCE(exception)->name, Z_STRLEN_P(trace), Z_STRVAL_P(trace)); zval_ptr_dtor(&trace); } else { @@ -674,7 +674,7 @@ int phpdbg_output_ev_variable(char *name, size_t len, char *keyname, size_t keyl phpdbg_xml("<eval %r>"); zend_print_zval_r(*zv, 0 TSRMLS_CC); phpdbg_xml("</eval>"); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); efree(name); efree(keyname); @@ -707,7 +707,7 @@ PHPDBG_COMMAND(ev) /* {{{ */ phpdbg_xml("<eval %r>"); zend_print_zval_r(&retval, 0 TSRMLS_CC); phpdbg_xml("</eval>"); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); zval_dtor(&retval); } } zend_end_try(); @@ -741,7 +741,7 @@ PHPDBG_COMMAND(back) /* {{{ */ PHPDBG_COMMAND(print) /* {{{ */ { - phpdbg_out("Execution Context Information" PHP_EOL PHP_EOL); + phpdbg_out("Execution Context Information\n\n"); phpdbg_xml("<printinfo %r>"); #ifdef HAVE_LIBREADLINE phpdbg_writeln("print", "readline=\"yes\"", "Readline yes"); @@ -855,12 +855,12 @@ PHPDBG_COMMAND(sh) /* {{{ */ } /* }}} */ static int add_module_info(zend_module_entry *module TSRMLS_DC) { - phpdbg_write("module", "name=\"%s\"", "%s" PHP_EOL, module->name); + phpdbg_write("module", "name=\"%s\"", "%s\n", module->name); return 0; } static int add_zendext_info(zend_extension *ext TSRMLS_DC) { - phpdbg_write("extension", "name=\"%s\"", "%s" PHP_EOL, ext->name); + phpdbg_write("extension", "name=\"%s\"", "%s\n", ext->name); return 0; } @@ -1012,7 +1012,7 @@ PHPDBG_COMMAND(dl) /* {{{ */ if (!param || param->type == EMPTY_PARAM) { phpdbg_notice("dl", "extensiontype=\"Zend extension\"", "Zend extensions"); zend_llist_apply(&zend_extensions, (llist_apply_func_t) add_zendext_info TSRMLS_CC); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); phpdbg_notice("dl", "extensiontype=\"module\"", "Modules"); zend_hash_apply(&module_registry, (apply_func_t) add_module_info TSRMLS_CC); } else switch (param->type) { @@ -1109,7 +1109,7 @@ PHPDBG_COMMAND(clean) /* {{{ */ return SUCCESS; } - phpdbg_out("Cleaning Execution Environment" PHP_EOL); + phpdbg_out("Cleaning Execution Environment\n"); phpdbg_xml("<cleaninfo %r>"); phpdbg_writeln("clean", "classes=\"%d\"", "Classes %d", zend_hash_num_elements(EG(class_table))); @@ -1126,7 +1126,7 @@ PHPDBG_COMMAND(clean) /* {{{ */ PHPDBG_COMMAND(clear) /* {{{ */ { - phpdbg_out("Clearing Breakpoints" PHP_EOL); + phpdbg_out("Clearing Breakpoints\n"); phpdbg_xml("<clearinfo %r>"); phpdbg_writeln("clear", "files=\"%d\"", "File %d", zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE])); @@ -1479,7 +1479,7 @@ zend_vm_enter: if (PHPDBG_G(flags) & PHPDBG_IS_SIGNALED) { PHPDBG_G(flags) &= ~PHPDBG_IS_SIGNALED; - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); phpdbg_notice("signal", "type=\"SIGINT\"", "Program received signal SIGINT"); DO_INTERACTIVE(1); } diff --git a/phpdbg_utils.c b/phpdbg_utils.c index a3c1965..4a45642 100644 --- a/phpdbg_utils.c +++ b/phpdbg_utils.c @@ -1140,16 +1140,16 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m severity = "error"; if (!PHPDBG_G(last_was_newline)) { if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) { - phpdbg_mixed_write(fd, ZEND_STRL("<phpdbg>" PHP_EOL "</phpdbg>")); + phpdbg_mixed_write(fd, ZEND_STRL("<phpdbg>\n" "</phpdbg>")); } else { - phpdbg_mixed_write(fd, ZEND_STRL(PHP_EOL)); + phpdbg_mixed_write(fd, ZEND_STRL("\n")); } PHPDBG_G(last_was_newline) = 1; } if (PHPDBG_G(flags) & PHPDBG_IS_COLOURED) { - msgoutlen = spprintf(&msgout, 0, "\033[%sm[%.*s]\033[0m" PHP_EOL, PHPDBG_G(colors)[PHPDBG_COLOR_ERROR]->code, msglen, msg); + msgoutlen = spprintf(&msgout, 0, "\033[%sm[%.*s]\033[0m\n", PHPDBG_G(colors)[PHPDBG_COLOR_ERROR]->code, msglen, msg); } else { - msgoutlen = spprintf(&msgout, 0, "[%.*s]" PHP_EOL, msglen, msg); + msgoutlen = spprintf(&msgout, 0, "[%.*s]\n", msglen, msg); } break; @@ -1157,26 +1157,26 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m severity = "notice"; if (!PHPDBG_G(last_was_newline)) { if (PHPDBG_G(flags) & PHPDBG_WRITE_XML) { - phpdbg_mixed_write(fd, ZEND_STRL("<phpdbg>" PHP_EOL "</phpdbg>")); + phpdbg_mixed_write(fd, ZEND_STRL("<phpdbg>\n" "</phpdbg>")); } else { - phpdbg_mixed_write(fd, ZEND_STRL(PHP_EOL)); + phpdbg_mixed_write(fd, ZEND_STRL("\n")); } PHPDBG_G(last_was_newline) = 1; } if (PHPDBG_G(flags) & PHPDBG_IS_COLOURED) { - msgoutlen = spprintf(&msgout, 0, "\033[%sm[%.*s]\033[0m" PHP_EOL, PHPDBG_G(colors)[PHPDBG_COLOR_NOTICE]->code, msglen, msg); + msgoutlen = spprintf(&msgout, 0, "\033[%sm[%.*s]\033[0m\n", PHPDBG_G(colors)[PHPDBG_COLOR_NOTICE]->code, msglen, msg); } else { - msgoutlen = spprintf(&msgout, 0, "[%.*s]" PHP_EOL, msglen, msg); + msgoutlen = spprintf(&msgout, 0, "[%.*s]\n", msglen, msg); } break; case P_WRITELN: severity = "normal"; if (msg) { - msgoutlen = spprintf(&msgout, 0, "%.*s" PHP_EOL, msglen, msg); + msgoutlen = spprintf(&msgout, 0, "%.*s\n", msglen, msg); } else { msgoutlen = 1; - msgout = estrdup(PHP_EOL); + msgout = estrdup("\n"); } PHPDBG_G(last_was_newline) = 1; break; @@ -1222,7 +1222,7 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m if (msg) { struct timeval tp; if (gettimeofday(&tp, NULL) == SUCCESS) { - msgoutlen = spprintf(&msgout, 0, "[%ld %.8F]: %.*s" PHP_EOL, tp.tv_sec, tp.tv_usec / 1000000., msglen, msg); + msgoutlen = spprintf(&msgout, 0, "[%ld %.8F]: %.*s\n", tp.tv_sec, tp.tv_usec / 1000000., msglen, msg); } else { msgoutlen = FAILURE; } @@ -1459,7 +1459,7 @@ PHPDBG_API int phpdbg_rlog(int fd, const char *fmt, ...) { /* {{{ */ strftime(friendly, 100, "%a %b %d %T.%%04d %Y", localtime(&tt)); #endif spprintf(&buffer, 0, friendly, tp.tv_usec/1000); - spprintf(&format, 0, "[%s]: %s" PHP_EOL, buffer, fmt); + spprintf(&format, 0, "[%s]: %s\n", buffer, fmt); rc = vspprintf(&outbuf, 0, format, args); if (outbuf) { diff --git a/phpdbg_watch.c b/phpdbg_watch.c index 3f07b70..de6cddf 100644 --- a/phpdbg_watch.c +++ b/phpdbg_watch.c @@ -567,7 +567,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump TSRMLS_DC) { phpdbg_xml("<watchvalue %r type=\"old\">"); zend_print_flat_zval_r((zval *) oldPtr TSRMLS_CC); phpdbg_xml("</watchvalue>"); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); } } if (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS && (removed || show_ref)) { @@ -593,7 +593,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump TSRMLS_DC) { phpdbg_xml("<watchvalue %r type=\"new\">"); zend_print_flat_zval_r(watch->addr.zv TSRMLS_CC); phpdbg_xml("</watchvalue>"); - phpdbg_out(PHP_EOL); + phpdbg_out("\n"); } if (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS && show_ref) { phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\" isref=\"%d\"", "New refcount: %d; New is_ref: %d", watch->addr.zv->refcount__gc, watch->addr.zv->is_ref__gc);
« previous php.cvs (#82530) next »