]> git.pld-linux.org Git - packages/gimp.git/blob - gimp-croak.patch
- argh, forgot: BuildRequires: mpeg_lib
[packages/gimp.git] / gimp-croak.patch
1 --- gimp-1.1.29/plug-ins/perl/Gimp/Lib.xs.wiget Mon Oct 30 02:34:17 2000
2 +++ gimp-1.1.29/plug-ins/perl/Gimp/Lib.xs       Sat Nov 25 03:38:54 2000
3 @@ -18,9 +18,11 @@
4  #if HAVE_PDL
5  #define PDL_clean_namespace
6  #include <pdlcore.h>
7 +#if 0
8  #undef croak
9  #define croak Perl_croak
10  #endif
11 +#endif
12  
13  /* various functions allocate static buffers, STILL.  */
14  #define MAX_STRING 4096
15 @@ -94,7 +96,7 @@
16        /* Get pointer to structure of core shared C routines */
17        CoreSV = perl_get_sv("PDL::SHARE", FALSE);
18        if (!CoreSV)
19 -        croak("gimp-perl-pixel functions require the PDL::Core module, which was not found");
20 +        Perl_croak(aTHX_ "gimp-perl-pixel functions require the PDL::Core module, which was not found");
21  
22        PDL = (Core*) SvIV(CoreSV);
23      }
24 @@ -123,13 +125,13 @@
25    PDL->converttype (p, PDL_B, PDL_PERM);
26  
27    if ((*p)->ndims < ndims + (dim0 > 1))
28 -    croak (__("dimension mismatch, pdl has dimension %d but at least %d dimensions required"), (*p)->ndims, ndims + (dim0 > 1));
29 +    Perl_croak (aTHX_ __("dimension mismatch, pdl has dimension %d but at least %d dimensions required"), (*p)->ndims, ndims + (dim0 > 1));
30  
31    if ((*p)->ndims > ndims + 1)
32 -    croak (__("dimension mismatch, pdl has dimension %d but at most %d dimensions allowed"), (*p)->ndims, ndims + 1);
33 +    Perl_croak (aTHX_ __("dimension mismatch, pdl has dimension %d but at most %d dimensions allowed"), (*p)->ndims, ndims + 1);
34  
35    if ((*p)->ndims > ndims && (*p)->dims[0] != dim0)
36 -    croak (__("pixel size mismatch, pdl has %d channel pixels but %d channels are required"), (*p)->dims[0], dim0);
37 +    Perl_croak (aTHX_ __("pixel size mismatch, pdl has %d channel pixels but %d channels are required"), (*p)->dims[0], dim0);
38  }
39  
40  static void pixel_rgn_pdl_delete_data (pdl *p, int param)
41 @@ -221,7 +223,7 @@
42         GimpDrawable *gdr = gimp_drawable_get (id);
43  
44         if (!gdr)
45 -         croak (__("unable to convert Gimp::Drawable into Gimp::GimpDrawable (id %d)"), id);
46 +         Perl_croak (aTHX_ __("unable to convert Gimp::Drawable into Gimp::GimpDrawable (id %d)"), id);
47  
48         if (!stash)
49           stash = gv_stashpv (PKG_GDRAWABLE, 1);
50 @@ -239,7 +241,7 @@
51  static GimpDrawable *old_gdrawable (SV *sv)
52  {
53    if (!(sv_derived_from (sv, PKG_GDRAWABLE)))
54 -    croak (__("argument is not of type %s"), PKG_GDRAWABLE);
55 +    Perl_croak (aTHX_ __("argument is not of type %s"), PKG_GDRAWABLE);
56  
57    /* the next line lacks any type of checking.  */
58    return (GimpDrawable *)SvIV(SvRV(sv));
59 @@ -262,7 +264,7 @@
60  static GimpTile *old_tile (SV *sv)
61  {
62    if (!sv_derived_from (sv, PKG_TILE))
63 -    croak (__("argument is not of type %s"), PKG_TILE);
64 +    Perl_croak (aTHX_ __("argument is not of type %s"), PKG_TILE);
65    
66    /* the next line lacks any type of checking.  */
67    return (GimpTile *)SvIV(*(hv_fetch ((HV*)SvRV(sv), "_tile", 5, 0)));
68 @@ -291,7 +293,7 @@
69            || sv_derived_from (drawable, PKG_CHANNEL))
70          drawable = sv_2mortal (new_gdrawable (SvIV (SvRV (drawable))));
71        else
72 -        croak (__("argument is not of type %s"), PKG_GDRAWABLE);
73 +        Perl_croak (aTHX_ __("argument is not of type %s"), PKG_GDRAWABLE);
74      }
75  
76    return drawable;
77 @@ -318,7 +320,7 @@
78  static GimpPixelRgn *old_pixelrgn (SV *sv)
79  {
80    if (!sv_derived_from (sv, PKG_PIXELRGN))
81 -    croak (__("argument is not of type %s"), PKG_PIXELRGN);
82 +    Perl_croak (aTHX_ __("argument is not of type %s"), PKG_PIXELRGN);
83    
84    return (GimpPixelRgn *)SvPV_nolen(SvRV(sv));
85  }
86 @@ -588,7 +590,7 @@
87                   count += 1 + !!is_array (SvIV (type));
88               }
89             else
90 -             croak (__("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE"));
91 +             Perl_croak (aTHX_ __("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE"));
92           }
93         
94         if (def)
95 @@ -656,7 +658,7 @@
96      sv = sv_bless (newRV_noinc (sv), stash);
97  
98    if (stash && !SvOBJECT(SvRV(sv)))
99 -    croak ("jupp\n");
100 +    Perl_croak (aTHX_ "jupp\n");
101    
102    return sv;
103  }
104 @@ -695,7 +697,7 @@
105     r = unbless (sv, type, croak_str);
106  
107     if (croak_str [0])
108 -      croak (croak_str);
109 +      Perl_croak (aTHX_ croak_str);
110     
111     return r;
112  }
113 @@ -713,7 +715,7 @@
114    PUTBACK;
115    
116    if (perl_call_pv ("Gimp::canonicalize_colour", G_SCALAR) != 1)
117 -    croak (__("FATAL: canonicalize_colour did not return a value!"));
118 +    Perl_croak (aTHX_ __("FATAL: canonicalize_colour did not return a value!"));
119    
120    SPAGAIN;
121    
122 @@ -886,7 +888,7 @@
123        case GIMP_PDB_STRINGARRAY:       push_gimp_av (arg, d_stringarray, neuSVpv, array_as_ref); break;
124         
125        default:
126 -       croak (__("dunno how to return param type %d"), arg->type);
127 +       Perl_croak (aTHX_ __("dunno how to return param type %d"), arg->type);
128      }
129    
130    if (sv)
131 @@ -1342,10 +1344,10 @@
132                               argc++;
133                           }
134                         else
135 -                         croak ("internal error (please report): too many arguments to main");
136 +                         Perl_croak (aTHX_ "internal error (please report): too many arguments to main");
137                       }
138                     else
139 -                     croak (__("arguments to main not yet supported!"));
140 +                     Perl_croak (aTHX_ __("arguments to main not yet supported!"));
141                     
142                     gimp_is_initialized = 1;
143                     RETVAL = gimp_main (argc, argv);
144 @@ -1403,7 +1405,7 @@
145                 GimpParamDef *return_vals;
146  
147                  if (!gimp_is_initialized)
148 -                  croak ("_gimp_procedure_available(%s) called without an active connection", proc_name);
149 +                  Perl_croak (aTHX_ "_gimp_procedure_available(%s) called without an active connection", proc_name);
150                 
151                 if (gimp_procedural_db_proc_info (proc_name, &proc_blurb, &proc_help, &proc_author,
152                     &proc_copyright, &proc_date, &proc_type, &nparams, &nreturn_vals,
153 @@ -1445,7 +1447,7 @@
154                 GimpParamDef *return_vals;
155                 
156                  if (!gimp_is_initialized)
157 -                  croak ("gimp_procedural_db_proc_info called without an active connection");
158 +                  Perl_croak (aTHX_ "gimp_procedural_db_proc_info called without an active connection");
159  
160                 if (gimp_procedural_db_proc_info (proc_name, &proc_blurb, &proc_help, &proc_author,
161                     &proc_copyright, &proc_date, &proc_type, &nparams, &nreturn_vals,
162 @@ -1487,7 +1489,7 @@
163                  int i=0, j=0; /* work around bogus warning.  */
164  
165                  if (!gimp_is_initialized)
166 -                  croak ("gimp_call_procedure(%s,...) called without an active connection", proc_name);
167 +                  Perl_croak (aTHX_ "gimp_call_procedure(%s,...) called without an active connection", proc_name);
168  
169                 if (trace)
170                   trace_init ();
171 @@ -1609,10 +1611,10 @@
172                      
173                 
174                      if (croak_str[0])
175 -                      croak (croak_str);
176 +                      Perl_croak (aTHX_ croak_str);
177                    }
178                  else
179 -                  croak (__("gimp procedure '%s' not found"), proc_name);
180 +                  Perl_croak (aTHX_ __("gimp procedure '%s' not found"), proc_name);
181         }
182  
183  void
184 @@ -1655,7 +1657,7 @@
185              g_free (apd);
186            }
187          else
188 -          croak (__("params and return_vals must be array refs (even if empty)!"));
189 +          Perl_croak (aTHX_ __("params and return_vals must be array refs (even if empty)!"));
190  
191  void
192  gimp_uninstall_temp_proc(name)
193 @@ -1803,7 +1805,7 @@
194          else if (items == 3)
195           RETVAL = gimp_pixel_rgns_register (3, old_pixelrgn (ST (0)), old_pixelrgn (ST (1)), old_pixelrgn (ST (2)));
196          else
197 -          croak (__("gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 and report this error"));
198 +          Perl_croak (aTHX_ __("gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 and report this error"));
199          OUTPUT:
200          RETVAL
201  
202 @@ -2144,7 +2146,7 @@
203              stride = pr->bpp * newdata->dims[newdata->ndims-2];
204  
205              if ((int)pr->h != newdata->dims[newdata->ndims-1])
206 -              croak (__("pdl height != region height"));
207 +              Perl_croak (aTHX_ __("pdl height != region height"));
208  
209              for (y   = 0, src = newdata->data, dst = pr->data;
210                   y < (int)pr->h;
211 @@ -2184,7 +2186,7 @@
212         GimpTile *      tile
213         CODE:
214          need_pdl ();
215 -        croak (__("gimp_tile_get_data is not yet implemented\n"));
216 +        Perl_croak (aTHX_ __("gimp_tile_get_data is not yet implemented\n"));
217         gimp_tile_ref (tile);
218         gimp_tile_unref (tile, 0);
219         OUTPUT:
220 @@ -2195,7 +2197,7 @@
221         GimpTile *      tile
222         SV *    data
223         CODE:
224 -        croak (__("gimp_tile_set_data is not yet implemented\n")); /*(void *)data;*/
225 +        Perl_croak (aTHX_ __("gimp_tile_set_data is not yet implemented\n")); /*(void *)data;*/
226         gimp_tile_ref_zero (tile);
227         gimp_tile_unref (tile, 1);
228  
229 @@ -2217,7 +2219,7 @@
230            gimp_tile_get_data           = 11
231            gimp_tile_set_data           = 12
232         CODE:
233 -        croak (__("This module was built without support for PDL."));
234 +        Perl_croak (aTHX_ __("This module was built without support for PDL."));
235   
236  #endif
237  
238 --- gimp-1.1.29/plug-ins/perl/Net/Net.xs.wiget  Sat Nov 25 03:55:51 2000
239 +++ gimp-1.1.29/plug-ins/perl/Net/Net.xs        Sat Nov 25 03:57:42 2000
240 @@ -26,8 +26,10 @@
241  #if HAVE_PDL
242  
243  # include <pdlcore.h>
244 +#if 0
245  # undef croak
246  # define croak Perl_croak
247 +#endif
248  
249  #if 0
250  /* hack, undocumented, argh! */
251 @@ -71,10 +73,10 @@
252            hv_delete (object_cache, (char *)&id, sizeof(id), G_DISCARD);
253          }
254        else
255 -        croak ("Internal error: Gimp::Net #101, please report!");
256 +        Perl_croak (aTHX_ "Internal error: Gimp::Net #101, please report!");
257      }
258    else
259 -    croak ("Internal error: Gimp::Net #100, please report!");
260 +    Perl_croak (aTHX_ "Internal error: Gimp::Net #100, please report!");
261  }
262  
263  /* allocate this much as initial length */
264 @@ -135,7 +137,7 @@
265        else if (SvTYPE(rv) == SVt_PVMG)
266          sv2net (deobjectify, s, rv);
267        else
268 -        croak ("Internal error: unable to convert reference in sv2net, please report!");
269 +        Perl_croak (aTHX_ "Internal error: unable to convert reference in sv2net, please report!");
270      }
271    else if (SvOK(sv))
272      {
273 @@ -190,7 +192,7 @@
274        case 'b':
275          sscanf (s, "%x:%n", &ui, &n); s += n;
276          if (ui >= sizeof str)
277 -          croak ("Internal error: stashname too long, please report!");
278 +          Perl_croak (aTHX_ "Internal error: stashname too long, please report!");
279  
280          memcpy (str, s, ui); s += ui;
281          str[ui] = 0;
282 @@ -204,7 +206,7 @@
283  
284              cv = hv_fetch (object_cache, (char *)(id=l,&id), sizeof(id), 0);
285              if (!cv)
286 -              croak ("Internal error: asked to deobjectify an object not in the cache, please report!");
287 +              Perl_croak (aTHX_ "Internal error: asked to deobjectify an object not in the cache, please report!");
288  
289              sv = *cv;
290              SvREFCNT_inc (sv);
291 @@ -225,7 +227,7 @@
292          break;
293  
294        default:
295 -        croak ("Internal error: unable to handle argtype '%c' in net2sv, please report!", s[-1]);
296 +        Perl_croak (aTHX_ "Internal error: unable to handle argtype '%c' in net2sv, please report!", s[-1]);
297      }
298  
299    *_s = s;
This page took 0.067314 seconds and 3 git commands to generate.