X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3d88e64dfcf5dc0fd361ce0c504c67a9196ce44c..2d8cd396ba55fad14d7e03ae904d9fe8fdf1b60d:/terminal.h diff --git a/terminal.h b/terminal.h index 647b55db..c3ee216f 100644 --- a/terminal.h +++ b/terminal.h @@ -63,7 +63,7 @@ struct terminal_tag { struct scrollregion *scrollhead, *scrolltail; #endif /* OPTIMISE_SCROLL */ - unsigned long curr_attr, save_attr; + unsigned long default_attr, curr_attr, save_attr; unsigned long erase_char; bufchain inbuf; /* terminal input buffer */ @@ -198,6 +198,16 @@ struct terminal_tag { * than only the default. */ Config cfg; + + /* + * from_backend calls term_out, but it can also be called from + * the ldisc if the ldisc is called _within_ term_out. So we + * have to guard against re-entrancy - if from_backend is + * called recursively like this, it will simply add data to the + * end of the buffer term_out is in the process of working + * through. + */ + int in_term_out; }; #define in_utf(term) ((term)->utf || (term)->ucsdata->line_codepage==CP_UTF8)