X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=st.c;h=9733a9be4368b0c66c46047dea4574c358df9eee;hb=587bc939f63b49c6155c4f1fdf97e73380207446;hp=b63d865f5613c5a1ff7a66a94144a845a8312128;hpb=86c03ddc82d2f9f84f22f79741e13ade0e0b8cd1;p=st.git diff --git a/st.c b/st.c index b63d865..9733a9b 100644 --- a/st.c +++ b/st.c @@ -362,7 +362,7 @@ static void tsetdirtattr(int); static void tsetmode(bool, bool, int *, int); static void tfulldirt(void); static void techo(char *, int); -static ulong tdefcolor(int *, int *, int); +static long tdefcolor(int *, int *, int); static inline bool match(uint, uint); static void ttynew(void); static void ttyread(void); @@ -1626,7 +1626,7 @@ tdeleteline(int n) { tscrollup(term.c.y, n); } -ulong +long tdefcolor(int *attr, int *npar, int l) { long idx = -1; uint r, g, b; @@ -1677,7 +1677,7 @@ tdefcolor(int *attr, int *npar, int l) { void tsetattr(int *attr, int l) { int i; - ulong idx; + long idx; for(i = 0; i < l; i++) { switch(attr[i]) { @@ -3258,6 +3258,7 @@ xsettitle(char *p) { Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle, &prop); XSetWMName(xw.dpy, xw.win, &prop); + XFree(prop.value); } void @@ -3713,7 +3714,7 @@ main(int argc, char *argv[]) { xw.fh = (int)hr; if(bitm & XNegative && xw.fx == 0) xw.fx = -1; - if(bitm & XNegative && xw.fy == 0) + if(bitm & YNegative && xw.fy == 0) xw.fy = -1; if(xw.fh != 0 && xw.fw != 0)