summaryrefslogtreecommitdiff
path: root/debian/patches/error.patch
blob: ff9f601fbf27b0ad77f5262a8d416239b271f7ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Description: replace error() with pd_error()
 error() has been removed and -Werror=implicit-function-declaration leads to
 FTBFS
Author: IOhannes m zmölnig
Origin: upstream
Applied-Upstream: cbddc9a4c9018a1e853dd6b116ebdd0339fcdd30
Last-Update: 2024-03-16 
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- pd-tclpd.orig/tcl_class.c
+++ pd-tclpd/tcl_class.c
@@ -105,13 +105,13 @@
         qlass = class_table_get(name);
     }
     if(!qlass) {
-        error("tclpd: class not found: %s", name);
+        pd_error(0, "tclpd: class not found: %s", name);
         return NULL;
     }
 
     t_tcl *x = (t_tcl *)pd_new(qlass);
     if(!x) {
-        error("tclpd: failed to create object of class %s", name);
+        pd_error(x, "tclpd: failed to create object of class %s", name);
         return NULL;
     }
 
--- pd-tclpd.orig/tcl_loader.c
+++ pd-tclpd/tcl_loader.c
@@ -77,7 +77,7 @@
         source_table_add(classname, filename);
         verbose(0, "tclpd loader: loaded %s", filename);
     } else {
-        error("tclpd loader: error trying to load %s", filename);
+        pd_error(0, "tclpd loader: error trying to load %s", filename);
         tclpd_interp_error(NULL, result);
         return 0;
     }
@@ -92,7 +92,7 @@
     result = Tcl_Eval(tclpd_interp, cmd);
     if(result == TCL_OK) {
     } else {
-        error("tclpd loader: error in %s %s::setup", filename, classname);
+        pd_error(0, "tclpd loader: error in %s %s::setup", filename, classname);
         tclpd_interp_error(NULL, result);
         return 0;
     }
--- pd-tclpd.orig/tcl_proxyinlet.c
+++ pd-tclpd/tcl_proxyinlet.c
@@ -23,7 +23,7 @@
 
     if(!(x->argv = (t_atom *)getbytes((argc+PROXYINLET_SEL_TO_LIST) * sizeof(*x->argv)))) {
         x->argc = 0;
-        error("proxyinlet: getbytes: out of memory");
+        pd_error(x, "proxyinlet: getbytes: out of memory");
         return;
     }
 
@@ -56,7 +56,7 @@
     y->argc = x->argc;
     if(!(y->argv = (t_atom *)getbytes(y->argc * sizeof(*y->argv)))) {
         y->argc = 0;
-        error("proxyinlet: getbytes: out of memory");
+        pd_error(x, "proxyinlet: getbytes: out of memory");
         return;
     }
 
--- pd-tclpd.orig/tclpd.c
+++ pd-tclpd/tclpd.c
@@ -29,14 +29,14 @@
     int result = Tcl_EvalFile(tclpd_interp, buf);
     switch(result) {
     case TCL_ERROR:
-        error("tclpd: error loading %s", buf);
+        pd_error(0, "tclpd: error loading %s", buf);
         break;
     case TCL_RETURN:
-        error("tclpd: warning: %s exited with code return", buf);
+        pd_error(0, "tclpd: warning: %s exited with code return", buf);
         break;
     case TCL_BREAK:
     case TCL_CONTINUE:
-        error("tclpd: warning: %s exited with code break/continue", buf);
+        pd_error(0, "tclpd: warning: %s exited with code break/continue", buf);
         break;
     }
     verbose(-1, "tclpd: loaded %s", buf);
@@ -45,7 +45,7 @@
 }
 
 void tclpd_interp_error(t_tcl *x, int result) {
-    error("tclpd error: %s", Tcl_GetStringResult(tclpd_interp));
+    pd_error(x, "tclpd error: %s", Tcl_GetStringResult(tclpd_interp));
 
     logpost(x, 3, "------------------- Tcl error: -------------------");