Clarity over optimization - dwm patches

This commit is contained in:
Ashish Kumar Yadav 2020-12-30 16:27:28 +05:30
parent 4dcb2a7310
commit 254e057a72
2 changed files with 6 additions and 6 deletions

View file

@ -43,7 +43,7 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
--- dwm-6.2-ori/dwm.c 2019-02-02 18:25:28.000000000 +0530 --- dwm-6.2-ori/dwm.c 2019-02-02 18:25:28.000000000 +0530
+++ dwm-6.2/dwm.c 2020-12-30 02:16:07.078564261 +0530 +++ dwm-6.2/dwm.c 2020-12-30 16:24:10.847012386 +0530
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -326,7 +326,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+ char *stp = stexts; + char *stp = stexts;
+ char tmp; + char tmp;
+ +
+ do { + while (*sts != '\0') {
+ if ((unsigned char)*sts >= ' ') { + if ((unsigned char)*sts >= ' ') {
+ sts++; + sts++;
+ continue; + continue;
@ -346,7 +346,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+ return; + return;
+ } + }
+ stp = ++sts; + stp = ++sts;
+ } while (*sts != '\0'); + }
+ if (selmon->statushandcursor) { + if (selmon->statushandcursor) {
+ selmon->statushandcursor = 0; + selmon->statushandcursor = 0;
+ XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor); + XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor);

View file

@ -43,7 +43,7 @@ diff -ruN dwm-6.2-ori/config.def.h dwm-6.2/config.def.h
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
--- dwm-6.2-ori/dwm.c 2020-08-17 23:51:19.057243495 +0530 --- dwm-6.2-ori/dwm.c 2020-08-17 23:51:19.057243495 +0530
+++ dwm-6.2/dwm.c 2020-12-30 02:16:17.865322278 +0530 +++ dwm-6.2/dwm.c 2020-12-30 16:26:04.168439847 +0530
@@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */ #endif /* XINERAMA */
@ -363,7 +363,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+ char *stp = stexts; + char *stp = stexts;
+ char tmp; + char tmp;
+ +
+ do { + while (*sts != '\0') {
+ if ((unsigned char)*sts >= ' ') { + if ((unsigned char)*sts >= ' ') {
+ sts++; + sts++;
+ continue; + continue;
@ -383,7 +383,7 @@ diff -ruN dwm-6.2-ori/dwm.c dwm-6.2/dwm.c
+ return; + return;
+ } + }
+ stp = ++sts; + stp = ++sts;
+ } while (*sts != '\0'); + }
+ if (selmon->statushandcursor) { + if (selmon->statushandcursor) {
+ selmon->statushandcursor = 0; + selmon->statushandcursor = 0;
+ XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor); + XDefineCursor(dpy, selmon->barwin, cursor[CurNormal]->cursor);