mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-28 10:34:58 +00:00
riverctl patch: fix incorrect arg num for string array
This commit is contained in:
parent
89880aeefa
commit
e1e1a74342
@ -1,4 +1,4 @@
|
|||||||
From 184aa237dc5d9c6a142183f8e25f4149d7904bf4 Mon Sep 17 00:00:00 2001
|
From 8b1fa82ce202ff302e76e8e6e7e5f9083da5f4d1 Mon Sep 17 00:00:00 2001
|
||||||
From: Zuki Air <zukirust@gmail.com>
|
From: Zuki Air <zukirust@gmail.com>
|
||||||
Date: Sun, 27 Jul 2025 11:30:32 +0100
|
Date: Sun, 27 Jul 2025 11:30:32 +0100
|
||||||
Subject: [PATCH] river-ctl patch
|
Subject: [PATCH] river-ctl patch
|
||||||
@ -6,6 +6,8 @@ Subject: [PATCH] river-ctl patch
|
|||||||
remove func argument and use the root argument instead
|
remove func argument and use the root argument instead
|
||||||
|
|
||||||
improve uint error handling
|
improve uint error handling
|
||||||
|
|
||||||
|
fix bug
|
||||||
---
|
---
|
||||||
.gitignore | 1 +
|
.gitignore | 1 +
|
||||||
Makefile | 22 +-
|
Makefile | 22 +-
|
||||||
@ -13,8 +15,8 @@ improve uint error handling
|
|||||||
dwl.c | 20 +-
|
dwl.c | 20 +-
|
||||||
dwlctl.c | 132 +++++
|
dwlctl.c | 132 +++++
|
||||||
protocols/river-control-unstable-v1.xml | 85 +++
|
protocols/river-control-unstable-v1.xml | 85 +++
|
||||||
river-control.h | 743 ++++++++++++++++++++++++
|
river-control.h | 742 ++++++++++++++++++++++++
|
||||||
7 files changed, 1023 insertions(+), 16 deletions(-)
|
7 files changed, 1022 insertions(+), 16 deletions(-)
|
||||||
create mode 100644 dwlctl.c
|
create mode 100644 dwlctl.c
|
||||||
create mode 100644 protocols/river-control-unstable-v1.xml
|
create mode 100644 protocols/river-control-unstable-v1.xml
|
||||||
create mode 100644 river-control.h
|
create mode 100644 river-control.h
|
||||||
@ -448,10 +450,10 @@ index 0000000..aa5fc4d
|
|||||||
+</protocol>
|
+</protocol>
|
||||||
diff --git a/river-control.h b/river-control.h
|
diff --git a/river-control.h b/river-control.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..c59399b
|
index 0000000..6c6fbea
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/river-control.h
|
+++ b/river-control.h
|
||||||
@@ -0,0 +1,743 @@
|
@@ -0,0 +1,742 @@
|
||||||
+#include "river-control-unstable-v1-private-protocol.c"
|
+#include "river-control-unstable-v1-private-protocol.c"
|
||||||
+#include "river-control-unstable-v1-protocol.h"
|
+#include "river-control-unstable-v1-protocol.h"
|
||||||
+#ifdef KEYS_USED
|
+#ifdef KEYS_USED
|
||||||
@ -887,7 +889,6 @@ index 0000000..c59399b
|
|||||||
+ args->error = true;
|
+ args->error = true;
|
||||||
+ args->error_msg = zriver_error_alloc;
|
+ args->error_msg = zriver_error_alloc;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ args->str_link = add_arg_str_store(argument);
|
|
||||||
+ args->p.fa->func = fst->func;
|
+ args->p.fa->func = fst->func;
|
||||||
+ args->key_arg_type = fst->arg_type;
|
+ args->key_arg_type = fst->arg_type;
|
||||||
+ }
|
+ }
|
||||||
@ -966,7 +967,7 @@ index 0000000..c59399b
|
|||||||
+ arg_filter = true;
|
+ arg_filter = true;
|
||||||
+ arg = &args->p.fa->arg;
|
+ arg = &args->p.fa->arg;
|
||||||
+ } else if (args->argc > 1 && args->argc < STR_LINK_ARRAY_SIZE && args->key_arg_type == FUNC_STR_ARG_TYPE_STRING_ARRAY && args->p.kl->key->arg.v != NULL) {
|
+ } else if (args->argc > 1 && args->argc < STR_LINK_ARRAY_SIZE && args->key_arg_type == FUNC_STR_ARG_TYPE_STRING_ARRAY && args->p.kl->key->arg.v != NULL) {
|
||||||
+ append_str_store((char**)args->p.fa->arg.v,argument,args->argc-2);
|
+ append_str_store((char**)args->p.fa->arg.v,argument,args->argc-1);
|
||||||
+ }
|
+ }
|
||||||
+ } else if (args->type == ZRIVER_ARG_TYPE_KEY) {
|
+ } else if (args->type == ZRIVER_ARG_TYPE_KEY) {
|
||||||
+ if (args->argc == 1) {
|
+ if (args->argc == 1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user