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>
This commit is contained in:
parent
52d6fb1ab1
commit
33201ac65f
3 changed files with 240 additions and 221 deletions
6
x.c
6
x.c
|
@ -38,10 +38,9 @@ typedef struct {
|
|||
KeySym k;
|
||||
uint mask;
|
||||
char *s;
|
||||
/* three valued logic variables: 0 indifferent, 1 on, -1 off */
|
||||
/* three-valued logic variables: 0 indifferent, 1 on, -1 off */
|
||||
signed char appkey; /* application keypad */
|
||||
signed char appcursor; /* application cursor */
|
||||
signed char crlf; /* crlf mode */
|
||||
} Key;
|
||||
|
||||
/* X modifiers */
|
||||
|
@ -1680,9 +1679,6 @@ kmap(KeySym k, uint state)
|
|||
if (IS_SET(MODE_APPCURSOR) ? kp->appcursor < 0 : kp->appcursor > 0)
|
||||
continue;
|
||||
|
||||
if (IS_SET(MODE_CRLF) ? kp->crlf < 0 : kp->crlf > 0)
|
||||
continue;
|
||||
|
||||
return kp->s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue