summaryrefslogtreecommitdiff
path: root/net/omnitty/files/patch-machmgr.c
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-08-09 12:25:08 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-08-09 12:25:08 +0000
commitf0f35ca44f95bfb48032f7495144d3514f7b33ec (patch)
treef55124bed3b8f0fbb87b82e17a2337c31ab89f14 /net/omnitty/files/patch-machmgr.c
parentsysutils/xbatt: (diff)
net/omnitty: Add abililty to "toggle" tagged machines
We often need to do "something" to about half the machines, then do "something else" to the other half. So add a hack to toggle the "tagged" status of the machines. This is implemented by means of the F1 menu; the command characters "o" and "O" can toggle the "tagged" status of the machines. PR: 211682 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=476742
Diffstat (limited to 'net/omnitty/files/patch-machmgr.c')
-rw-r--r--net/omnitty/files/patch-machmgr.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/omnitty/files/patch-machmgr.c b/net/omnitty/files/patch-machmgr.c
new file mode 100644
index 000000000000..7700dfa97f08
--- /dev/null
+++ b/net/omnitty/files/patch-machmgr.c
@@ -0,0 +1,25 @@
+--- machmgr.c.orig 2005-10-25 22:04:01 UTC
++++ machmgr.c
+@@ -26,7 +26,7 @@
+ #include "machine.h"
+ #include "minibuf.h"
+ #include <string.h>
+-#include <alloca.h>
++#include <stdlib.h>
+
+ #define MACHINE_MAX 256
+
+@@ -261,5 +261,13 @@ void machmgr_delete_dead() {
+ int i;
+ for (i = machcount - 1; i >= 0; i--)
+ if (!machs[i]->alive) machmgr_delete(i);
++}
++
++void machmgr_toggle_tag_all(bool ignore_dead) {
++ int i;
++ for (i = 0; i < machcount; i++) {
++ if (!ignore_dead || machs[i]->alive)
++ machs[i]->tag = !machs[i]->tag;
++ }
+ }
+