more self-recover prompting cleanup (tty)
This commit is contained in:
@@ -451,6 +451,7 @@ extern void FDECL(safe_status_enablefield,
|
||||
extern void FDECL(safe_status_update, (int, genericptr_t, int, int, int, unsigned long *));
|
||||
extern boolean NDECL(safe_can_suspend);
|
||||
extern void FDECL(stdio_raw_print, (const char *));
|
||||
extern void FDECL(stdio_nonl_raw_print, (const char *));
|
||||
extern void FDECL(stdio_raw_print_bold, (const char *));
|
||||
extern void NDECL(stdio_wait_synch);
|
||||
extern int NDECL(stdio_nhgetch);
|
||||
|
||||
@@ -1199,7 +1199,9 @@ tty_self_recover_prompt()
|
||||
c = 'n';
|
||||
ct = 0;
|
||||
saved_procs = windowprocs;
|
||||
safe_routines();
|
||||
if (!WINDOWPORT("safe-startup"))
|
||||
windowprocs = *get_safe_procs(2); /* arg 2 uses no-newline variant */
|
||||
windowprocs.win_nhgetch = windows_console_custom_nhgetch;
|
||||
raw_print("\n");
|
||||
raw_print("\n");
|
||||
raw_print("\n");
|
||||
|
||||
@@ -114,6 +114,8 @@ int optn;
|
||||
safe_procs.win_raw_print_bold = stdio_raw_print_bold;
|
||||
safe_procs.win_nhgetch = stdio_nhgetch;
|
||||
safe_procs.win_wait_synch = stdio_wait_synch;
|
||||
if (optn == 2)
|
||||
safe_procs.win_raw_print = stdio_nonl_raw_print;
|
||||
}
|
||||
return &safe_procs;
|
||||
}
|
||||
@@ -536,6 +538,17 @@ stdio_wait_synch()
|
||||
void
|
||||
stdio_raw_print(str)
|
||||
const char *str;
|
||||
{
|
||||
if (str)
|
||||
fprintf(stdout, "%s\n", str);
|
||||
return;
|
||||
}
|
||||
|
||||
/* no newline variation, add to your code:
|
||||
windowprocs.win_raw_print = stdio_nonl_raw_print; */
|
||||
void
|
||||
stdio_nonl_raw_print(str)
|
||||
const char *str;
|
||||
{
|
||||
if (str)
|
||||
fprintf(stdout, "%s", str);
|
||||
|
||||
Reference in New Issue
Block a user