mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Synchronize stdout and stderr (for the benefit of windows).
Copied from Perforce Change: 186519 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
e93033f289
commit
6e72fe4da3
4 changed files with 30 additions and 6 deletions
|
|
@ -409,6 +409,7 @@ static void error(const char *format, ...)
|
|||
if (error_handler) {
|
||||
longjmp(*error_handler, 1);
|
||||
} else {
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "Fatal error during initialization: %s\n",
|
||||
error_message);
|
||||
abort();
|
||||
|
|
@ -4003,6 +4004,7 @@ static mps_res_t obj_scan(mps_ss_t ss, mps_addr_t base, mps_addr_t limit)
|
|||
break;
|
||||
default:
|
||||
assert(0);
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "Unexpected object on the heap\n");
|
||||
abort();
|
||||
}
|
||||
|
|
@ -4073,6 +4075,7 @@ static mps_addr_t obj_skip(mps_addr_t base)
|
|||
break;
|
||||
default:
|
||||
assert(0);
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "Unexpected object on the heap\n");
|
||||
abort();
|
||||
}
|
||||
|
|
@ -4366,6 +4369,7 @@ static int start(int argc, char *argv[])
|
|||
make_operator(optab[i].name, optab[i].entry,
|
||||
obj_empty, obj_empty, env, op_env));
|
||||
} else {
|
||||
fflush(stdout);
|
||||
fprintf(stderr,
|
||||
"Fatal error during initialization: %s\n",
|
||||
error_message);
|
||||
|
|
@ -4375,7 +4379,9 @@ static int start(int argc, char *argv[])
|
|||
if(argc >= 2) {
|
||||
/* Non-interactive file execution */
|
||||
if(setjmp(*error_handler) != 0) {
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s\n", error_message);
|
||||
fflush(stderr);
|
||||
exit_code = EXIT_FAILURE;
|
||||
} else {
|
||||
load(env, op_env, make_string(strlen(argv[1]), argv[1]));
|
||||
|
|
@ -4394,14 +4400,15 @@ static int start(int argc, char *argv[])
|
|||
"If you recurse too much the interpreter may crash from using too much C stack.");
|
||||
for(;;) {
|
||||
if(setjmp(*error_handler) != 0) {
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "%s\n", error_message);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
mps_chat();
|
||||
printf("%lu, %lu> ", (unsigned long)total,
|
||||
(unsigned long)mps_collections(arena));
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
obj = read(input);
|
||||
if(obj == obj_eof) break;
|
||||
obj = eval(env, op_env, obj);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue