From: maqiyuan Date: Sun, 7 Sep 2014 16:58:37 +0000 (+0800) Subject: updated wake_up_terminal(). X-Git-Url: http://git.osdn.net/view?p=putex%2Fputex.git;a=commitdiff_plain;h=9300ecd1f1294448fa68bd0ea2da26895d727d3d updated wake_up_terminal(). --- diff --git a/src/texsourc/itex.c b/src/texsourc/itex.c index edeada4..6887b49 100644 --- a/src/texsourc/itex.c +++ b/src/texsourc/itex.c @@ -1879,6 +1879,7 @@ boolean load_fmt_file (void) return true; bad_fmt: + wake_up_terminal(); puts("(Fatal format file error; I'm stymied)"); return false; diff --git a/src/texsourc/tex0.c b/src/texsourc/tex0.c index 533a684..7436584 100644 --- a/src/texsourc/tex0.c +++ b/src/texsourc/tex0.c @@ -699,6 +699,7 @@ boolean init_terminal (void) // failed to find input file name while (true) { + wake_up_terminal(); fputs("**", stdout); update_terminal(); flag = input_ln(stdin, true); diff --git a/src/texsourc/tex2.c b/src/texsourc/tex2.c index 0782db5..be0ac25 100644 --- a/src/texsourc/tex2.c +++ b/src/texsourc/tex2.c @@ -706,7 +706,7 @@ void firm_up_the_line (void) if (pausing > 0) if (interaction > nonstop_mode) { - ; + wake_up_terminal(); print_ln(); if (start < limit) diff --git a/src/texsourc/tex3.c b/src/texsourc/tex3.c index 3d6f7af..bb2b733 100644 --- a/src/texsourc/tex3.c +++ b/src/texsourc/tex3.c @@ -972,6 +972,7 @@ void read_toks (integer n, pointer r) prompt_input(""); else { + wake_up_terminal(); print_ln(); sprint_cs(r); prompt_input("="); @@ -1656,7 +1657,7 @@ void prompt_file_name_(const char * s, str_number e) integer k; if (interaction == scroll_mode) - do_nothing(); + wake_up_terminal(); if (!strcmp("input file name", s)) print_err("I can't find file `"); diff --git a/src/texsourc/tex8.c b/src/texsourc/tex8.c index 2c2ca40..58405e9 100644 --- a/src/texsourc/tex8.c +++ b/src/texsourc/tex8.c @@ -1059,7 +1059,7 @@ void show_whatever (void) get_token(); if (interaction == error_stop_mode) - do_nothing(); + wake_up_terminal(); print_nl("> "); @@ -1079,7 +1079,7 @@ void show_whatever (void) p = the_toks(); if (interaction == error_stop_mode) - do_nothing(); + wake_up_terminal(); print_nl("> "); token_show(temp_head); diff --git a/src/texsourc/tex9.c b/src/texsourc/tex9.c index e6fab3a..2ddd3ce 100644 --- a/src/texsourc/tex9.c +++ b/src/texsourc/tex9.c @@ -49,7 +49,10 @@ boolean open_fmt_file (void) goto found; if (knuth_flag) + { + wake_up_terminal(); printf("%s;%s\n", "Sorry, I can't find that format", " will try the default."); + } else { name_of_file[name_length + 1] = '\0'; @@ -68,7 +71,10 @@ boolean open_fmt_file (void) if (!w_open_in(fmt_file)) { if (knuth_flag) + { + wake_up_terminal(); printf("%s!\n", "I can't find the default format file"); + } else { name_of_file[name_length + 1] = '\0'; @@ -249,6 +255,8 @@ void close_files_and_terminate (void) } } #endif + + wake_up_terminal(); { if (total_pages == 0) diff --git a/src/texsourc/utils.c b/src/texsourc/utils.c index d509f1c..165661c 100644 --- a/src/texsourc/utils.c +++ b/src/texsourc/utils.c @@ -26,6 +26,10 @@ void do_nothing(void) { /* todo */ } +void wake_up_terminal (void) +{ + /* todo */ +} /* sec 0034 */ void update_terminal(void) { @@ -70,7 +74,7 @@ void append_lc_hex (ASCII_code c) void print_err (const char * s) { if (interaction == error_stop_mode) - do_nothing(); + wake_up_terminal(); print_nl("! "); prints(s); @@ -78,6 +82,7 @@ void print_err (const char * s) /* sec 0071 */ void prompt_input(const char * s) { + wake_up_terminal(); prints(s); term_input(); } diff --git a/src/texsourc/yandytex.h b/src/texsourc/yandytex.h index 0bc133b..aadf27c 100644 --- a/src/texsourc/yandytex.h +++ b/src/texsourc/yandytex.h @@ -821,6 +821,7 @@ extern char * unixify (char * t); /* sec 79 */ extern void node_list_display (integer p); extern void do_nothing (void); +extern void wake_up_terminal (void); extern void update_terminal (void); extern void check_full_save_stack (void); extern void push_input (void);