diff --git a/st.c b/st.c index df660ff..5cc5da7 100644 --- a/st.c +++ b/st.c @@ -132,7 +132,7 @@ enum term_mode { MODE_MOUSEMANY = 262144, MODE_BRCKTPASTE = 524288, MODE_PRINT = 1048576, - MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ + MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10 |MODE_MOUSEMANY, }; @@ -1698,8 +1698,8 @@ tsetattr(int *attr, int l) { for(i = 0; i < l; i++) { switch(attr[i]) { case 0: - term.c.attr.mode &= ~(ATTR_REVERSE | ATTR_UNDERLINE \ - | ATTR_BOLD | ATTR_ITALIC \ + term.c.attr.mode &= ~(ATTR_REVERSE | ATTR_UNDERLINE + | ATTR_BOLD | ATTR_ITALIC | ATTR_BLINK); term.c.attr.fg = defaultfg; term.c.attr.bg = defaultbg; @@ -2470,7 +2470,7 @@ tputc(char *c, int len) { if(term.esc & ESC_CSI) { csiescseq.buf[csiescseq.len++] = ascii; if(BETWEEN(ascii, 0x40, 0x7E) - || csiescseq.len >= \ + || csiescseq.len >= sizeof(csiescseq.buf)-1) { term.esc = 0; csiparse(); @@ -3036,7 +3036,7 @@ xinit(void) { | ButtonMotionMask | ButtonPressMask | ButtonReleaseMask; xw.attrs.colormap = xw.cmap; - parent = opt_embed ? strtol(opt_embed, NULL, 0) : \ + parent = opt_embed ? strtol(opt_embed, NULL, 0) : XRootWindow(xw.dpy, xw.scr); xw.win = XCreateWindow(xw.dpy, parent, xw.fx, xw.fy, xw.w, xw.h, 0, XDefaultDepth(xw.dpy, xw.scr), InputOutput, @@ -3397,7 +3397,7 @@ xdrawcursor(void) { } sl = utf8len(g.c); - width = (term.line[term.c.y][curx].mode & ATTR_WIDE)\ + width = (term.line[term.c.y][curx].mode & ATTR_WIDE) ? 2 : 1; xdraws(g.c, g, term.c.x, term.c.y, width, sl); } else { @@ -3802,12 +3802,12 @@ run(void) { xev--; if(!FD_ISSET(cmdfd, &rfd) && !FD_ISSET(xfd, &rfd)) { if(blinkset) { - if(TIMEDIFF(now, lastblink) \ + if(TIMEDIFF(now, lastblink) > blinktimeout) { drawtimeout.tv_usec = 1; } else { - drawtimeout.tv_usec = (1000 * \ - (blinktimeout - \ + drawtimeout.tv_usec = (1000 * + (blinktimeout - TIMEDIFF(now, lastblink))); } @@ -3821,8 +3821,8 @@ run(void) { void usage(void) { - die("%s " VERSION " (c) 2010-2013 st engineers\n" \ - "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" \ + die("%s " VERSION " (c) 2010-2013 st engineers\n" + "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" " [-t title] [-w windowid] [-e command ...]\n", argv0); }