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
5 #define PDL_clean_namespace
9 #define croak Perl_croak
13 /* various functions allocate static buffers, STILL. */
14 #define MAX_STRING 4096
16 /* Get pointer to structure of core shared C routines */
17 CoreSV = perl_get_sv("PDL::SHARE", FALSE);
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");
22 PDL = (Core*) SvIV(CoreSV);
25 PDL->converttype (p, PDL_B, PDL_PERM);
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));
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);
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);
40 static void pixel_rgn_pdl_delete_data (pdl *p, int param)
42 GimpDrawable *gdr = gimp_drawable_get (id);
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);
49 stash = gv_stashpv (PKG_GDRAWABLE, 1);
51 static GimpDrawable *old_gdrawable (SV *sv)
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);
57 /* the next line lacks any type of checking. */
58 return (GimpDrawable *)SvIV(SvRV(sv));
60 static GimpTile *old_tile (SV *sv)
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);
66 /* the next line lacks any type of checking. */
67 return (GimpTile *)SvIV(*(hv_fetch ((HV*)SvRV(sv), "_tile", 5, 0)));
69 || sv_derived_from (drawable, PKG_CHANNEL))
70 drawable = sv_2mortal (new_gdrawable (SvIV (SvRV (drawable))));
72 - croak (__("argument is not of type %s"), PKG_GDRAWABLE);
73 + Perl_croak (aTHX_ __("argument is not of type %s"), PKG_GDRAWABLE);
78 static GimpPixelRgn *old_pixelrgn (SV *sv)
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);
84 return (GimpPixelRgn *)SvPV_nolen(SvRV(sv));
87 count += 1 + !!is_array (SvIV (type));
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"));
96 sv = sv_bless (newRV_noinc (sv), stash);
98 if (stash && !SvOBJECT(SvRV(sv)))
100 + Perl_croak (aTHX_ "jupp\n");
105 r = unbless (sv, type, croak_str);
109 + Perl_croak (aTHX_ croak_str);
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!"));
123 case GIMP_PDB_STRINGARRAY: push_gimp_av (arg, d_stringarray, neuSVpv, array_as_ref); break;
126 - croak (__("dunno how to return param type %d"), arg->type);
127 + Perl_croak (aTHX_ __("dunno how to return param type %d"), arg->type);
131 @@ -1342,10 +1344,10 @@
135 - croak ("internal error (please report): too many arguments to main");
136 + Perl_croak (aTHX_ "internal error (please report): too many arguments to main");
139 - croak (__("arguments to main not yet supported!"));
140 + Perl_croak (aTHX_ __("arguments to main not yet supported!"));
142 gimp_is_initialized = 1;
143 RETVAL = gimp_main (argc, argv);
144 @@ -1403,7 +1405,7 @@
145 GimpParamDef *return_vals;
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);
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;
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");
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. */
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);
171 @@ -1609,10 +1611,10 @@
176 + Perl_croak (aTHX_ croak_str);
179 - croak (__("gimp procedure '%s' not found"), proc_name);
180 + Perl_croak (aTHX_ __("gimp procedure '%s' not found"), proc_name);
184 @@ -1655,7 +1657,7 @@
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)!"));
192 gimp_uninstall_temp_proc(name)
193 @@ -1803,7 +1805,7 @@
195 RETVAL = gimp_pixel_rgns_register (3, old_pixelrgn (ST (0)), old_pixelrgn (ST (1)), old_pixelrgn (ST (2)));
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"));
202 @@ -2144,7 +2146,7 @@
203 stride = pr->bpp * newdata->dims[newdata->ndims-2];
205 if ((int)pr->h != newdata->dims[newdata->ndims-1])
206 - croak (__("pdl height != region height"));
207 + Perl_croak (aTHX_ __("pdl height != region height"));
209 for (y = 0, src = newdata->data, dst = pr->data;
211 @@ -2184,7 +2186,7 @@
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);
220 @@ -2195,7 +2197,7 @@
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);
229 @@ -2217,7 +2219,7 @@
230 gimp_tile_get_data = 11
231 gimp_tile_set_data = 12
233 - croak (__("This module was built without support for PDL."));
234 + Perl_croak (aTHX_ __("This module was built without support for PDL."));
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
243 # include <pdlcore.h>
246 # define croak Perl_croak
250 /* hack, undocumented, argh! */
252 hv_delete (object_cache, (char *)&id, sizeof(id), G_DISCARD);
255 - croak ("Internal error: Gimp::Net #101, please report!");
256 + Perl_croak (aTHX_ "Internal error: Gimp::Net #101, please report!");
259 - croak ("Internal error: Gimp::Net #100, please report!");
260 + Perl_croak (aTHX_ "Internal error: Gimp::Net #100, please report!");
263 /* allocate this much as initial length */
265 else if (SvTYPE(rv) == SVt_PVMG)
266 sv2net (deobjectify, s, rv);
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!");
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!");
280 memcpy (str, s, ui); s += ui;
284 cv = hv_fetch (object_cache, (char *)(id=l,&id), sizeof(id), 0);
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!");
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]);