X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=d954288508f8432fae0efd78749e467931973bea;hb=190b94c7a2a7bb2f5d55cbb6eb1779fd042c6467;hp=60c07d02c0bf98c26aa9c18613e297427df0401f;hpb=7ab6c92e18d468968811256e808b02309c160a22;p=st.git diff --git a/st.c b/st.c index 60c07d0..d954288 100644 --- a/st.c +++ b/st.c @@ -855,12 +855,11 @@ mousereport(XEvent *e) { } if(!IS_SET(MODE_MOUSEX10)) { - button += (state & ShiftMask ? 4 : 0) - + (state & Mod4Mask ? 8 : 0) - + (state & ControlMask ? 16 : 0); + button += ((state & ShiftMask ) ? 4 : 0) + + ((state & Mod4Mask ) ? 8 : 0) + + ((state & ControlMask) ? 16 : 0); } - len = 0; if(IS_SET(MODE_MOUSESGR)) { len = snprintf(buf, sizeof(buf), "\033[<%d;%d;%d%c", button, x+1, y+1, @@ -1744,7 +1743,7 @@ tdefcolor(int *attr, int *npar, int l) { b = attr[*npar + 4]; *npar += 4; if(!BETWEEN(r, 0, 255) || !BETWEEN(g, 0, 255) || !BETWEEN(b, 0, 255)) - fprintf(stderr, "erresc: bad rgb color (%d,%d,%d)\n", + fprintf(stderr, "erresc: bad rgb color (%u,%u,%u)\n", r, g, b); else idx = TRUECOLOR(r, g, b);