commit e4f5b61e79897e910f30265d8989f65c634699e5
Author: David Phillips <[email protected]>
Date:   Wed Oct 12 01:31:46 2016 +1300

    Update slock control-clear patch to HEAD

diff --git a/tools.suckless.org/slock/patches/control-clear.md 
b/tools.suckless.org/slock/patches/control-clear.md
index 26cf69e..33604e6 100644
--- a/tools.suckless.org/slock/patches/control-clear.md
+++ b/tools.suckless.org/slock/patches/control-clear.md
@@ -12,7 +12,7 @@ failed unlocking attempts.
 Download
 --------
 
-* 
[slock-git-20160406-control-clear.diff](slock-git-20160406-control-clear.diff)
+* 
[slock-git-20161012-control-clear.diff](slock-git-20161012-control-clear.diff)
 
 Author
 ------
diff --git 
a/tools.suckless.org/slock/patches/slock-git-20160406-control-clear.diff 
b/tools.suckless.org/slock/patches/slock-git-20160406-control-clear.diff
deleted file mode 100644
index 248dc87..0000000
--- a/tools.suckless.org/slock/patches/slock-git-20160406-control-clear.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/config.def.h b/config.def.h
-index eae2d9a..c81908a 100644
---- a/config.def.h
-+++ b/config.def.h
-@@ -6,3 +6,6 @@ static const char *colorname[NUMCOLS] = {
- 
- /* treat a cleared input like a wrong password */
- static const int failonclear = 1;
-+
-+/* allow control key to trigger fail on clear */
-+static const int controlkeyclear = 0;
-diff --git a/slock.c b/slock.c
-index c9cdee2..43f6e97 100644
---- a/slock.c
-+++ b/slock.c
-@@ -171,7 +171,9 @@ readpw(Display *dpy, const char *pws)
-                                       --len;
-                               break;
-                       default:
--                              if (num && !iscntrl((int)buf[0]) && (len + num 
< sizeof(passwd))) {
-+                              if (controlkeyclear && iscntrl((int)buf[0]))
-+                                      continue;
-+                              if (num && (len + num < sizeof(passwd))) {
-                                       memcpy(passwd + len, buf, num);
-                                       len += num;
-                               }
diff --git 
a/tools.suckless.org/slock/patches/slock-git-20161012-control-clear.diff 
b/tools.suckless.org/slock/patches/slock-git-20161012-control-clear.diff
new file mode 100644
index 0000000..b9634cd
--- /dev/null
+++ b/tools.suckless.org/slock/patches/slock-git-20161012-control-clear.diff
@@ -0,0 +1,27 @@
+diff --git a/config.def.h b/config.def.h
+index 6fba2b6..933152b 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -10,3 +10,6 @@ static const char *colorname[NUMCOLS] = {
+ 
+ /* treat a cleared input like a wrong password */
+ static const int failonclear = 1;
++
++/* allow control key to trigger fail on clear */
++static const int controlkeyclear = 0;
+diff --git a/slock.c b/slock.c
+index 4d7f06f..15552ef 100644
+--- a/slock.c
++++ b/slock.c
+@@ -180,8 +180,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock 
**locks, int nscreens,
+                                       passwd[len--] = '

Reply via email to