Factor out equivalent code from ttyread/ttysend
The echo-to-terminal portions of ttyread and ttysend were actually doing the same thing. New function twrite() now handles this. The parameter show_ctrl determines whether control characters are shown as "^A". This was the only difference between tputc and techo, and techo is now unused and removed. (This commit should not change st's behaviour.) Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
This commit is contained in:
parent
69e32a61df
commit
32d3b1d00f
2 changed files with 41 additions and 62 deletions
2
st.h
2
st.h
|
@ -209,7 +209,7 @@ void selnormalize(void);
|
|||
int selected(int, int);
|
||||
char *getsel(void);
|
||||
|
||||
size_t utf8decode(char *, Rune *, size_t);
|
||||
size_t utf8decode(const char *, Rune *, size_t);
|
||||
size_t utf8encode(Rune, char *);
|
||||
|
||||
void *xmalloc(size_t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue