]> Sergey Matveev's repositories - st.git/commitdiff
Optimisations master
authorSergey Matveev <stargrave@stargrave.org>
Sun, 18 Feb 2024 15:39:51 +0000 (18:39 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 7 May 2024 10:14:52 +0000 (13:14 +0300)
Makefile
config.def.h
st.c
x.c

index 15db421c0e7b56e9196353ffc5b75f8ef1ba7194..2dd11d6d2ae9118f573c1d86b02268172d447b9c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ config.h:
        cp config.def.h config.h
 
 .c.o:
-       $(CC) $(STCFLAGS) -c $<
+       $(CC) -O3 $(STCFLAGS) -c $<
 
 st.o: config.h st.h win.h
 x.o: arg.h config.h st.h win.h
@@ -21,7 +21,7 @@ x.o: arg.h config.h st.h win.h
 $(OBJ): config.h config.mk
 
 st: $(OBJ)
-       $(CC) -o $@ $(OBJ) $(STLDFLAGS)
+       $(CC) -s -o $@ $(OBJ) $(STLDFLAGS)
 
 clean:
        rm -f st $(OBJ) st-$(VERSION).tar.gz
index a5672a307c6e9a8f4642ec6db02615c88a490037..85b56c893a4c34aae555966f7d07ea00389919d4 100644 (file)
@@ -7,7 +7,7 @@
  *
  * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
  */
-static char *font = "Go Mono:size=14:antialias=true";
+static char *font = "Go Mono:size=15:antialias=true";
 static int borderpx = 0;
 
 /*
diff --git a/st.c b/st.c
index b9f66e71163f0707bb477f9fa5346f5dad27683d..57c6e962ac778da43795ed855035b4554ebd02cf 100644 (file)
--- a/st.c
+++ b/st.c
@@ -1132,6 +1132,7 @@ csiparse(void)
 {
        char *p = csiescseq.buf, *np;
        long int v;
+       int sep = ';'; /* colon or semi-colon, but not both */
 
        csiescseq.narg = 0;
        if (*p == '?') {
@@ -1149,7 +1150,9 @@ csiparse(void)
                        v = -1;
                csiescseq.arg[csiescseq.narg++] = v;
                p = np;
-               if (*p != ';' || csiescseq.narg == ESC_ARG_SIZ)
+               if (sep == ';' && *p == ':')
+                       sep = ':'; /* allow override to colon once */
+               if (*p != sep || csiescseq.narg == ESC_ARG_SIZ)
                        break;
                p++;
        }
diff --git a/x.c b/x.c
index b85161f0811cfe7166752e0ff13d5b1655faaa1a..6cf403dc755fa1d0c9abf28b923d021a67937e6a 100644 (file)
--- a/x.c
+++ b/x.c
@@ -1197,24 +1197,6 @@ xinit(int cols, int rows)
                                               ximinstantiate, NULL);
        }
 
-       /* white cursor, black outline */
-       cursor = XCreateFontCursor(xw.dpy, mouseshape);
-       XDefineCursor(xw.dpy, xw.win, cursor);
-
-       if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) {
-               xmousefg.red   = 0xffff;
-               xmousefg.green = 0xffff;
-               xmousefg.blue  = 0xffff;
-       }
-
-       if (XParseColor(xw.dpy, xw.cmap, colorname[mousebg], &xmousebg) == 0) {
-               xmousebg.red   = 0x0000;
-               xmousebg.green = 0x0000;
-               xmousebg.blue  = 0x0000;
-       }
-
-       XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg);
-
        xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False);
        xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False);
        xw.netwmname = XInternAtom(xw.dpy, "_NET_WM_NAME", False);