… | |
… | |
4038 | |
4038 | |
4039 | want_refresh = 1; |
4039 | want_refresh = 1; |
4040 | } |
4040 | } |
4041 | /*}}} */ |
4041 | /*}}} */ |
4042 | |
4042 | |
4043 | /* ------------------------------------------------------------------------- */ |
4043 | /* ---------------------------------------------------------------------- */ |
|
|
4044 | /* Write data to the pty as typed by the user, pasted with the mouse, |
|
|
4045 | * or generated by us in response to a query ESC sequence. |
|
|
4046 | */ |
4044 | |
4047 | |
4045 | /* |
4048 | /* |
4046 | * Send printf () formatted output to the command. |
4049 | * Send printf () formatted output to the command. |
4047 | * Only use for small amounts of data. |
4050 | * Only use for small amounts of data. |
4048 | */ |
4051 | */ |
… | |
… | |
4060 | |
4063 | |
4061 | /* Write data to the pty as typed by the user. */ |
4064 | /* Write data to the pty as typed by the user. */ |
4062 | void |
4065 | void |
4063 | rxvt_term::tt_write_user_input (const char *data, unsigned int len) |
4066 | rxvt_term::tt_write_user_input (const char *data, unsigned int len) |
4064 | { |
4067 | { |
|
|
4068 | if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) |
|
|
4069 | return; |
|
|
4070 | |
4065 | if (option (Opt_scrollTtyKeypress)) |
4071 | if (option (Opt_scrollTtyKeypress)) |
4066 | if (view_start) |
4072 | if (view_start) |
4067 | { |
4073 | { |
4068 | view_start = 0; |
4074 | view_start = 0; |
4069 | want_refresh = 1; |
4075 | want_refresh = 1; |
4070 | } |
4076 | } |
4071 | |
4077 | |
4072 | tt_write (data, len); |
4078 | tt_write_ (data, len); |
4073 | } |
4079 | } |
4074 | |
|
|
4075 | /* ---------------------------------------------------------------------- */ |
|
|
4076 | /* Write data to the pty as typed by the user, pasted with the mouse, |
|
|
4077 | * or generated by us in response to a query ESC sequence. |
|
|
4078 | */ |
|
|
4079 | static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT |
|
|
4080 | |
4080 | |
4081 | void |
4081 | void |
4082 | rxvt_term::tt_write (const char *data, unsigned int len) |
4082 | rxvt_term::tt_write (const char *data, unsigned int len) |
4083 | { |
4083 | { |
4084 | if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) |
4084 | if (HOOK_INVOKE ((this, HOOK_TT_WRITE, DT_STR_LEN, data, len, DT_END))) |
4085 | return; |
4085 | return; |
4086 | |
4086 | |
|
|
4087 | tt_write_ (data, len); |
|
|
4088 | } |
|
|
4089 | |
|
|
4090 | static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT |
|
|
4091 | |
|
|
4092 | void |
|
|
4093 | rxvt_term::tt_write_ (const char *data, unsigned int len) |
|
|
4094 | { |
4087 | if (pty->pty < 0) |
4095 | if (pty->pty < 0) |
4088 | return; |
4096 | return; |
4089 | |
4097 | |
4090 | if (v_buflen == 0) |
4098 | if (v_buflen == 0) |
4091 | { |
4099 | { |