The style inquisition was here again.

dev
Christoph Lohmann 2012-11-13 20:13:39 +01:00
parent 620e3bb39e
commit 7474a2fc37
3 changed files with 13 additions and 6 deletions

View File

@ -21,3 +21,4 @@ LDFLAGS += -g ${LIBS}
# compiler and linker # compiler and linker
CC ?= cc CC ?= cc

16
st.c
View File

@ -2700,17 +2700,21 @@ kmap(KeySym k, uint state) {
if(kp->k != k) if(kp->k != k)
continue; continue;
if((state & mask) != mask && if((state & mask) != mask &&
(mask == XK_NO_MOD && state)) (mask == XK_NO_MOD && state)) {
continue; continue;
}
if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) || if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) ||
(kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) (kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) {
continue; continue;
}
if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) || if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) ||
(kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) {
continue; continue;
}
if((kp->crlf < 0 && IS_SET(MODE_CRLF)) || if((kp->crlf < 0 && IS_SET(MODE_CRLF)) ||
(kp->crlf > 0 && !IS_SET(MODE_CRLF))) (kp->crlf > 0 && !IS_SET(MODE_CRLF))) {
continue; continue;
}
return kp->s; return kp->s;
} }
@ -2755,6 +2759,7 @@ kpress(XEvent *ev) {
memcpy(cp, xstr, len); memcpy(cp, xstr, len);
len = cp - buf + len; len = cp - buf + len;
} }
ttywrite(buf, len); ttywrite(buf, len);
if(IS_SET(MODE_ECHO)) if(IS_SET(MODE_ECHO))
techo(buf, len); techo(buf, len);
@ -2869,7 +2874,7 @@ main(int argc, char *argv[]) {
opt_class = argv[i]; opt_class = argv[i];
break; break;
case 'e': case 'e':
/* eat every remaining arguments */ /* eat all remaining arguments */
if(++i < argc) if(++i < argc)
opt_cmd = &argv[i]; opt_cmd = &argv[i];
goto run; goto run;
@ -2924,6 +2929,7 @@ run:
ttynew(); ttynew();
selinit(); selinit();
run(); run();
return 0; return 0;
} }