aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Lohmann <20h@r-36.net>2013-01-27 13:26:06 +0100
committerChristoph Lohmann <20h@r-36.net>2013-01-27 13:26:06 +0100
commit26c101b70671d1adbdd4e31af70502605fe3ebbf (patch)
treeeb2c99db330b17208af227eaa202261c6f529313
parent384fabdb5b2ac6c700a974a7fac539c8c14107f6 (diff)
downloadst-patched-26c101b70671d1adbdd4e31af70502605fe3ebbf.tar.bz2
st-patched-26c101b70671d1adbdd4e31af70502605fe3ebbf.tar.xz
st-patched-26c101b70671d1adbdd4e31af70502605fe3ebbf.zip
Fixing the black remaining lines in mc and dialog.
This also applies some style fixes and handles some old blink codes.
-rw-r--r--st.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/st.c b/st.c
index 38cec50..fa4136a 100644
--- a/st.c
+++ b/st.c
@@ -1421,7 +1421,8 @@ tsetattr(int *attr, int l) {
1421 case 4: 1421 case 4:
1422 term.c.attr.mode |= ATTR_UNDERLINE; 1422 term.c.attr.mode |= ATTR_UNDERLINE;
1423 break; 1423 break;
1424 case 5: 1424 case 5: /* slow blink */
1425 case 6: /* rapid blink */
1425 term.c.attr.mode |= ATTR_BLINK; 1426 term.c.attr.mode |= ATTR_BLINK;
1426 break; 1427 break;
1427 case 7: 1428 case 7:
@@ -1438,6 +1439,7 @@ tsetattr(int *attr, int l) {
1438 term.c.attr.mode &= ~ATTR_UNDERLINE; 1439 term.c.attr.mode &= ~ATTR_UNDERLINE;
1439 break; 1440 break;
1440 case 25: 1441 case 25:
1442 case 26:
1441 term.c.attr.mode &= ~ATTR_BLINK; 1443 term.c.attr.mode &= ~ATTR_BLINK;
1442 break; 1444 break;
1443 case 27: 1445 case 27:
@@ -1744,7 +1746,7 @@ csihandle(void) {
1744 case 'X': /* ECH -- Erase <n> char */ 1746 case 'X': /* ECH -- Erase <n> char */
1745 DEFAULT(csiescseq.arg[0], 1); 1747 DEFAULT(csiescseq.arg[0], 1);
1746 tclearregion(term.c.x, term.c.y, term.c.x + csiescseq.arg[0], 1748 tclearregion(term.c.x, term.c.y, term.c.x + csiescseq.arg[0],
1747 term.c.y, 0); 1749 term.c.y, 1);
1748 break; 1750 break;
1749 case 'P': /* DCH -- Delete <n> char */ 1751 case 'P': /* DCH -- Delete <n> char */
1750 DEFAULT(csiescseq.arg[0], 1); 1752 DEFAULT(csiescseq.arg[0], 1);
@@ -2206,9 +2208,11 @@ tresize(int col, int row) {
2206 /* free unneeded rows */ 2208 /* free unneeded rows */
2207 i = 0; 2209 i = 0;
2208 if(slide > 0) { 2210 if(slide > 0) {
2209 /* slide screen to keep cursor where we expect it - 2211 /*
2212 * slide screen to keep cursor where we expect it -
2210 * tscrollup would work here, but we can optimize to 2213 * tscrollup would work here, but we can optimize to
2211 * memmove because we're freeing the earlier lines */ 2214 * memmove because we're freeing the earlier lines
2215 */
2212 for(/* i = 0 */; i < slide; i++) { 2216 for(/* i = 0 */; i < slide; i++) {
2213 free(term.line[i]); 2217 free(term.line[i]);
2214 free(term.alt[i]); 2218 free(term.alt[i]);
@@ -2456,8 +2460,7 @@ xloadfonts(char *fontstr, int fontsize) {
2456} 2460}
2457 2461
2458void 2462void
2459xunloadfonts(void) 2463xunloadfonts(void) {
2460{
2461 int i, ip; 2464 int i, ip;
2462 2465
2463 /* 2466 /*
@@ -2487,8 +2490,7 @@ xunloadfonts(void)
2487} 2490}
2488 2491
2489void 2492void
2490xzoom(const Arg *arg) 2493xzoom(const Arg *arg) {
2491{
2492 xunloadfonts(); 2494 xunloadfonts();
2493 xloadfonts(usedfont, usedfontsize + arg->i); 2495 xloadfonts(usedfont, usedfontsize + arg->i);
2494 cresize(0, 0); 2496 cresize(0, 0);
@@ -3109,8 +3111,10 @@ kpress(XEvent *ev) {
3109 3111
3110void 3112void
3111cmessage(XEvent *e) { 3113cmessage(XEvent *e) {
3112 /* See xembed specs 3114 /*
3113 http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html */ 3115 * See xembed specs
3116 * http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html
3117 */
3114 if(e->xclient.message_type == xw.xembed && e->xclient.format == 32) { 3118 if(e->xclient.message_type == xw.xembed && e->xclient.format == 32) {
3115 if(e->xclient.data.l[1] == XEMBED_FOCUS_IN) { 3119 if(e->xclient.data.l[1] == XEMBED_FOCUS_IN) {
3116 xw.state |= WIN_FOCUSED; 3120 xw.state |= WIN_FOCUSED;
@@ -3126,8 +3130,7 @@ cmessage(XEvent *e) {
3126} 3130}
3127 3131
3128void 3132void
3129cresize(int width, int height) 3133cresize(int width, int height) {
3130{
3131 int col, row; 3134 int col, row;
3132 3135
3133 if(width != 0) 3136 if(width != 0)