aboutsummaryrefslogtreecommitdiff
path: root/x.c
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2018-02-22 01:05:12 -0600
committerDevin J. Pohly <djpohly@gmail.com>2018-02-25 21:53:24 -0600
commit33201ac65f74e45b4fa60822ba9a538c3cfa9b25 (patch)
treed14efba42f31bc0f4900a9af90988093464ad781 /x.c
parent52d6fb1ab1f7d41839edebb63c3408578cd44e3c (diff)
downloadst-33201ac65f74e45b4fa60822ba9a538c3cfa9b25.tar.gz
st-33201ac65f74e45b4fa60822ba9a538c3cfa9b25.zip
Move CRLF input processing into ttywrite
This also allows us to remove the crlf field from the Key struct, since the only difference it made was converting "\r" to "\r\n" (which is now done automatically in ttywrite). In addition, MODE_CRLF is no longer referenced from x.c. Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Diffstat (limited to 'x.c')
-rw-r--r--x.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/x.c b/x.c
index 49a22e4..76fb910 100644
--- a/x.c
+++ b/x.c
@@ -38,10 +38,9 @@ typedef struct {
38 KeySym k; 38 KeySym k;
39 uint mask; 39 uint mask;
40 char *s; 40 char *s;
41 /* three valued logic variables: 0 indifferent, 1 on, -1 off */ 41 /* three-valued logic variables: 0 indifferent, 1 on, -1 off */
42 signed char appkey; /* application keypad */ 42 signed char appkey; /* application keypad */
43 signed char appcursor; /* application cursor */ 43 signed char appcursor; /* application cursor */
44 signed char crlf; /* crlf mode */
45} Key; 44} Key;
46 45
47/* X modifiers */ 46/* X modifiers */
@@ -1680,9 +1679,6 @@ kmap(KeySym k, uint state)
1680 if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0) 1679 if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0)
1681 continue; 1680 continue;
1682 1681
1683 if (IS_SET(MODE_CRLF) ? kp->crlf < 0 : kp->crlf > 0)
1684 continue;
1685
1686 return kp->s; 1682 return kp->s;
1687 } 1683 }
1688 1684