X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=terminal.h;h=c3ee216f5c8d29c5210455a889ef26a04dfde673;hb=refs%2Fheads%2Fbranch-0.56;hp=647b55db70a5b83f2b7371e34c0821d41db76194;hpb=d36a4c3685f17057ba2c80ac471c1284b615469f;p=PuTTY.git 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)