File: error.patch

package info (click to toggle)
pd-ggee 0.28-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 868 kB
  • sloc: ansic: 6,134; cpp: 239; makefile: 73
file content (188 lines) | stat: -rw-r--r-- 6,479 bytes parent folder | download
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
From: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Date: Sun, 4 Aug 2024 22:33:20 +0200
Subject: replace error() with pd_error()

Origin: upstream
Applied-Upstream: 8d5d69819f50a79dfea773ebd326f605595368cc
Last-Update: 2024-03-16 

error() has been removed and -Werror=implicit-function-declaration leads to
FTBFS
Last-Update: 2024-03-16
---
 control/qread.c          | 2 +-
 control/shell.c          | 6 +++---
 control/unwonk.c         | 4 ++--
 experimental/fofsynth~.c | 8 ++++----
 experimental/stk.cpp     | 2 +-
 gui/gcanvas.c            | 8 ++++----
 signal/sfwrite~.c        | 2 +-
 signal/streamin~.c       | 2 +-
 8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/control/qread.c b/control/qread.c
index e869350..f52e215 100644
--- a/control/qread.c
+++ b/control/qread.c
@@ -45,7 +45,7 @@ static void qread_open(t_qread *x,t_symbol *filename)
 
      if (!(x->x_file = fopen(fname,"r")))
      {
-	  error("can't open %s",fname);
+	  pd_error(x, "can't open %s",fname);
 	  return;
      }
 
diff --git a/control/shell.c b/control/shell.c
index b05eff6..5d5f7d5 100644
--- a/control/shell.c
+++ b/control/shell.c
@@ -148,7 +148,7 @@ void shell_read(t_shell *x, int fd)
        if (buf[i] == '\n') buf[i] = ';';
      if (ret < 0)
        {
-	 error("shell: pipe read error");
+	 pd_error(x, "shell: pipe read error");
 	 sys_rmpollfn(fd);
 	 x->fdpipe[0] = -1;
 	 close(fd);
@@ -217,12 +217,12 @@ static void shell_anything(t_shell *x, t_symbol *s, int ac, t_atom *at)
 
 
      if (pipe(x->fdpipe) < 0) {
-	  error("unable to create pipe");
+	  pd_error(x, "unable to create pipe");
 	  return;
      }
 
      if (pipe(x->fdinpipe) < 0) {
-	  error("unable to create input pipe");
+	  pd_error(x, "unable to create input pipe");
 	  return;
      }
 
diff --git a/control/unwonk.c b/control/unwonk.c
index 798bcbd..940eb12 100644
--- a/control/unwonk.c
+++ b/control/unwonk.c
@@ -56,7 +56,7 @@ static void *unwonk_new(t_symbol *s, int argc, t_atom *argv)
     	    }
     	    else
     	    {
-    	    	if (c != 'f') error("unwonk: %s: bad type",
+    	    	if (c != 'f') pd_error(x, "unwonk: %s: bad type",
     	    	    ap->a_w.w_symbol->s_name);
     	    	u->u_type = A_FLOAT;
     	    	u->u_outlet = outlet_new(&x->x_obj, &s_float);
@@ -95,7 +95,7 @@ static void unwonk_list(t_unwonk *x, t_symbol *s, int argc, t_atom *argv)
     {
     	t_atomtype type = u->u_type;
     	if (type != ap->a_type)
-    	    error("unwonk: type mismatch");
+    	    pd_error(x, "unwonk: type mismatch");
     	else if (type == A_FLOAT)
     	    outlet_float(u->u_outlet, ap->a_w.w_float);
     	else if (type == A_SYMBOL)
diff --git a/experimental/fofsynth~.c b/experimental/fofsynth~.c
index a7466c1..e14eff1 100644
--- a/experimental/fofsynth~.c
+++ b/experimental/fofsynth~.c
@@ -254,13 +254,13 @@ static t_int *fofsynth_perform(t_int *w)
      return (w+5);
 }
 
-void fofsynth_usearray(t_symbol* s,int* points,t_word** vec)
+void fofsynth_usearray(t_fofsynth *x, t_symbol* s,int* points,t_word** vec)
 {
      t_garray *a;
      if (!(a = (t_garray *)pd_findbyclass(s, garray_class)))
-	  error("%s: no such array", s->s_name);
+	  pd_error(x, "%s: no such array", s->s_name);
      else if (!garray_getfloatwords(a,points,vec))
-	  error("%s: bad template for fof~", s->s_name);
+	  pd_error(x, "%s: bad template for fof~", s->s_name);
      else
 	  garray_usedindsp(a);
 }
@@ -269,7 +269,7 @@ static void fofsynth_dsp(t_fofsynth *x, t_signal **sp)
 {
 
      if (x->x_arrayname)
-	  fofsynth_usearray(x->x_arrayname,&x->x_npoints, &x->x_vec);
+	  fofsynth_usearray(x, x->x_arrayname,&x->x_npoints, &x->x_vec);
      else {
 	  x->x_npoints=COSTABSIZE;
 	  x->x_vec = fofcos_table;
diff --git a/experimental/stk.cpp b/experimental/stk.cpp
index e89f690..ec11015 100644
--- a/experimental/stk.cpp
+++ b/experimental/stk.cpp
@@ -76,7 +76,7 @@ static void stk_set_instrument(t_stk* x,t_symbol* s)
   DI(Whistle);
 
   if (!x->instrument)
-       error("No such instrument %s",s->s_name);
+       pd_error(x, "No such instrument %s",s->s_name);
 
   stk_instruments[i] = "LastInst";
 }
diff --git a/gui/gcanvas.c b/gui/gcanvas.c
index 4b7bb67..0961559 100644
--- a/gui/gcanvas.c
+++ b/gui/gcanvas.c
@@ -407,12 +407,12 @@ static void *gcanvas_new(t_symbol* s,t_int ac,t_atom* at)
     x->x_width = DEFAULTSIZE;
     if (ac-- > 0) {
          if (at->a_type != A_FLOAT)
-              error("gcanvas: wrong argument type");
+              pd_error(x, "gcanvas: wrong argument type");
          else
               x->x_width = atom_getfloat(at++);
 
          if (x->x_width < 0 || x->x_width > 2000) {
-              error("gcanvas: unallowed width %f",x->x_width);
+              pd_error(x, "gcanvas: unallowed width %f",x->x_width);
               x->x_width = DEFAULTSIZE;
          }
     }
@@ -422,12 +422,12 @@ static void *gcanvas_new(t_symbol* s,t_int ac,t_atom* at)
     x->x_height = DEFAULTSIZE;
     if (ac-- > 0) {
          if (at->a_type != A_FLOAT)
-              error("gcanvas: wrong argument type");
+              pd_error(x, "gcanvas: wrong argument type");
          else
               x->x_height = atom_getfloat(at++);
 
          if (x->x_height < 0 || x->x_height > 2000) {
-              error("gcanvas: unallowed height %f",x->x_height);
+              pd_error(x, "gcanvas: unallowed height %f",x->x_height);
               x->x_width = DEFAULTSIZE;
          }
     }
diff --git a/signal/sfwrite~.c b/signal/sfwrite~.c
index ff6f6cd..ebace6a 100644
--- a/signal/sfwrite~.c
+++ b/signal/sfwrite~.c
@@ -125,7 +125,7 @@ static void sfwrite_open(t_sfwrite *x,t_symbol *filename)
 
      if ((x->x_file = open(fname,OPENPARAMS,0664)) < 0)
      {
-	  error("can't create %s",fname);
+	  pd_error(x, "can't create %s",fname);
 	  return;
      }
 
diff --git a/signal/streamin~.c b/signal/streamin~.c
index a3aa6e1..50b9e82 100644
--- a/signal/streamin~.c
+++ b/signal/streamin~.c
@@ -156,7 +156,7 @@ static void streamin_datapoll(t_streamin *x)
 	  ret = recv(x->x_socket, (char*) &x->frames[x->framein].tag,sizeof(t_tag),0);
 
 	  if ((x->frames[x->framein].tag.framesize - sizeof(t_tag)) > MAXFRAMESIZE) {
-	   error("streamin~: got an invalid frame size of %d, maximum is %d\n",
+	   pd_error(x, "streamin~: got an invalid frame size of %d, maximum is %d\n",
 	           x->frames[x->framein].tag.framesize, MAXFRAMESIZE);
 	   x->frames[x->framein].tag.framesize = MAXFRAMESIZE + sizeof(t_tag);
 	  }