X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/3d88e64dfcf5dc0fd361ce0c504c67a9196ce44c..8ac4ce9f63f23404c2ebf440352ba219d0452f54:/terminal.h diff --git a/terminal.h b/terminal.h index 647b55db..e2b06b19 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,24 @@ 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; + + /* + * These are buffers used by the bidi and Arabic shaping code. + */ + unsigned long *ltemp; + bidi_char *wcFrom, *wcTo; + unsigned long **pre_bidi_cache, **post_bidi_cache; + int bidi_cache_size; }; #define in_utf(term) ((term)->utf || (term)->ucsdata->line_codepage==CP_UTF8)