aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2012-11-13 20:13:39 +0100
committerChristoph Lohmann <20h@r-36.net>2012-11-13 20:13:39 +0100
commit7474a2fc3785eb1aad00f8cf2b50711bbe1fff0b (patch)
tree7a179ccfcfa9d93f0e9c3d9e9c9f40a9b2f7d274
parent620e3bb39ebe617b69b5cb1323b4f47c2f699527 (diff)
downloadst-7474a2fc3785eb1aad00f8cf2b50711bbe1fff0b.tar.gz
st-7474a2fc3785eb1aad00f8cf2b50711bbe1fff0b.tar.bz2
The style inquisition was here again.
-rw-r--r--config.def.h2
-rw-r--r--config.mk1
-rw-r--r--st.c16
3 files changed, 13 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h
index d6103b5..5d887fc 100644
--- a/config.def.h
+++ b/config.def.h
@@ -131,7 +131,7 @@ static Key key[] = {
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0, 0},
- { XK_Left, XK_NO_MOD, "\033[D", 0, -1, 0},
+ { XK_Left, XK_NO_MOD, "\033[D", 0, -1, 0},
{ XK_Left, XK_NO_MOD, "\033OD", 0, +1, 0},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0, 0},
diff --git a/config.mk b/config.mk
index 20e519f..f1757ed 100644
--- a/config.mk
+++ b/config.mk
@@ -21,3 +21,4 @@ LDFLAGS += -g ${LIBS}
# compiler and linker
CC ?= cc
+
diff --git a/st.c b/st.c
index 14408c5..dbbc1f6 100644
--- a/st.c
+++ b/st.c
@@ -2700,17 +2700,21 @@ kmap(KeySym k, uint state) {
if(kp->k != k)
continue;
if((state & mask) != mask &&
- (mask == XK_NO_MOD && state))
+ (mask == XK_NO_MOD && state)) {
continue;
+ }
if((kp->appkey < 0 && IS_SET(MODE_APPKEYPAD)) ||
- (kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD)))
+ (kp->appkey > 0 && !IS_SET(MODE_APPKEYPAD))) {
continue;
+ }
if((kp->appcursor < 0 && IS_SET(MODE_APPCURSOR)) ||
- (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR)))
+ (kp->appcursor > 0 && !IS_SET(MODE_APPCURSOR))) {
continue;
+ }
if((kp->crlf < 0 && IS_SET(MODE_CRLF)) ||
- (kp->crlf > 0 && !IS_SET(MODE_CRLF)))
+ (kp->crlf > 0 && !IS_SET(MODE_CRLF))) {
continue;
+ }
return kp->s;
}
@@ -2755,6 +2759,7 @@ kpress(XEvent *ev) {
memcpy(cp, xstr, len);
len = cp - buf + len;
}
+
ttywrite(buf, len);
if(IS_SET(MODE_ECHO))
techo(buf, len);
@@ -2869,7 +2874,7 @@ main(int argc, char *argv[]) {
opt_class = argv[i];
break;
case 'e':
- /* eat every remaining arguments */
+ /* eat all remaining arguments */
if(++i < argc)
opt_cmd = &argv[i];
goto run;
@@ -2924,6 +2929,7 @@ run:
ttynew();
selinit();
run();
+
return 0;
}