diff options
author | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> | 2023-07-06 09:46:26 +0200 |
---|---|---|
committer | IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org> | 2023-07-06 09:46:26 +0200 |
commit | c72280c740bb0f2f5e843b7280d78607031052b6 (patch) | |
tree | e870a5e044cc3b99d2cb3edd46ca6d6314e87fa6 | |
parent | 7cf45179eb1491ae044fb987ba15a5b89b5b1880 (diff) |
Add patch to use pd_error() instead of error()
-rw-r--r-- | debian/patches/pd_error.patch | 147 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 148 insertions, 0 deletions
diff --git a/debian/patches/pd_error.patch b/debian/patches/pd_error.patch new file mode 100644 index 0000000..f47c291 --- /dev/null +++ b/debian/patches/pd_error.patch @@ -0,0 +1,147 @@ +Description: Use pd_error() instead of error() +Author: IOhannes m zmölnig +Origin: Debian +Forwarded: no +Last-Update: 2023-07-06 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- pd-plugin.orig/plugin~.c ++++ pd-plugin/plugin~.c +@@ -120,7 +120,7 @@ + s_name->s_name, + x->plugin_library_filename, + (unsigned long)sys_getsr ())) { +- error("plugin~: Unable to open plugin '%s' in '%s'", s_name->s_name, x->plugin_library_filename); ++ pd_error(x, "plugin~: Unable to open plugin '%s' in '%s'", s_name->s_name, x->plugin_library_filename); + plugin_tilde_ladspa_close_plugin (x); + } else { + post("plugin~: \"%s\"", x->plugin.ladspa.type->Name); +@@ -379,9 +379,9 @@ + x->plugin_library_filename = NULL; + x->plugin_library_filename = plugin_tilde_search_plugin (x, plug_name->s_name); + if (x->plugin_library_filename == NULL) +- error("plugin~: plugin not found in any library"); ++ pd_error(x, "plugin~: plugin not found in any library"); + if (plugin_tilde_open_plugin (x, plug_name->s_name, x->plugin_library_filename,(unsigned long)sys_getsr ())) +- error("plugin~: Unable to open plugin"); ++ pd_error(x, "plugin~: Unable to open plugin"); + else { + post("plugin~: \"%s\"", x->plugin.ladspa.type->Name); + } +@@ -573,7 +573,7 @@ + { + /* error */ + plugin_tilde_poplocale(); +- error("plugin~: Unable to load LADSPA plugin library \"%s\"", ++ pd_error(x, "plugin~: Unable to load LADSPA plugin library \"%s\"", + lib_name); + return 1; + } +@@ -583,7 +583,7 @@ + plugin_tilde_poplocale(); + if (x->plugin.ladspa.type == NULL) + { +- error("plugin~: Unable to find LADSPA plugin \"%s\" within library \"%s\"", ++ pd_error(x, "plugin~: Unable to find LADSPA plugin \"%s\" within library \"%s\"", + name, lib_name); + return 1; + } +@@ -595,7 +595,7 @@ + if (x->plugin.ladspa.instance == NULL) + { + /* error */ +- error("plugin~: Unable to instantiate LADSPA plugin \"%s\"", ++ pd_error(x, "plugin~: Unable to instantiate LADSPA plugin \"%s\"", + x->plugin.ladspa.type->Name); + return 1; + } +@@ -607,7 +607,7 @@ + + /* Allocate memory for control values */ + if (plugin_tilde_ladspa_alloc_control_memory (x)) { +- error("plugin~: out of memory"); ++ pd_error(x, "plugin~: out of memory"); + return 1; /* error */ + } + +@@ -733,7 +733,7 @@ + + /* Allocate out-of-place memory if needed */ + if (plugin_tilde_ladspa_alloc_outofplace_memory (x, num_samples)) { +- error("plugin~: out of memory"); ++ pd_error(x, "plugin~: out of memory"); + return; + } + +@@ -787,7 +787,7 @@ + } + + if(NULL==x->plugin.ladspa.type) { +- error("plugin~: unable to determine LADSPA type"); ++ pd_error(x, "plugin~: unable to determine LADSPA type"); + return; + } + +@@ -820,7 +820,7 @@ + + if (!found_port) + { +- error("plugin~: plugin doesn't have a control input port named \"%s\"", ++ pd_error(x, "plugin~: plugin doesn't have a control input port named \"%s\"", + name); + return; + } +@@ -844,12 +844,12 @@ + /* assert (ctrl_input_index < x->num_control_inputs); */ + + if(NULL==x->plugin.ladspa.type) { +- error("plugin~: unable to determine LADSPA type"); ++ pd_error(x, "plugin~: unable to determine LADSPA type"); + return; + } + + if (ctrl_input_index >= x->num_control_inputs) { +- error("plugin~: control port number %d is out of range [1, %d]", ++ pd_error(x, "plugin~: control port number %d is out of range [1, %d]", + ctrl_input_index + 1, x->num_control_inputs); + return; + } +@@ -873,7 +873,7 @@ + } + } + if (!found_port) { +- error("plugin~: plugin doesn't have %ud control input ports", ++ pd_error(x, "plugin~: plugin doesn't have %ud control input ports", + ctrl_input_index + 1); + return; + } +@@ -1107,12 +1107,12 @@ + + static int plugin_tilde_have_ladspa_plugin(Pd_Plugin_Tilde* x) { + if(NULL==x->plugin.ladspa.instance) { +- error("plugin~: LADSPA instance not found"); ++ pd_error(x, "plugin~: LADSPA instance not found"); + return 0; + } + + if(NULL==x->plugin.ladspa.type) { +- error("plugin~: LADSPA type not found"); ++ pd_error(x, "plugin~: LADSPA type not found"); + return 0; + } + +@@ -1123,12 +1123,12 @@ + if(NULL==x)return 0; + + if (NULL==x->plugin_library || x->plugin_library_filename == NULL) { +- error("plugin~: plugin not found"); ++ pd_error(x, "plugin~: plugin not found"); + return 0; + } + + if(NULL==x->plugin.ladspa.type) { +- error("plugin~: unable to determine LADSPA type"); ++ pd_error(x, "plugin~: unable to determine LADSPA type"); + return 0; + } + diff --git a/debian/patches/series b/debian/patches/series index 9dc7fdd..6e69ae6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ pd-lib-builder.patch +pd_error.patch |