ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/CV/CV.xs
(Generate patch)

Comparing CV/CV.xs (file contents):
Revision 1.24 by root, Wed Aug 17 05:25:28 2005 UTC vs.
Revision 1.25 by root, Fri Aug 19 00:34:54 2005 UTC

296foldcase (SV *pathsv) 296foldcase (SV *pathsv)
297 PROTOTYPE: $ 297 PROTOTYPE: $
298 CODE: 298 CODE:
299{ 299{
300 STRLEN plen; 300 STRLEN plen;
301 U8 *path = SvPVutf8 (pathsv, plen); 301 U8 *path = (U8 *)SvPVutf8 (pathsv, plen);
302 U8 *pend = path + plen; 302 U8 *pend = path + plen;
303 U8 dst [plen * 6 * 3], *dstp = dst; 303 U8 dst [plen * 6 * 3], *dstp = dst;
304 304
305 while (path < pend) 305 while (path < pend)
306 { 306 {
327 dstp += cl; 327 dstp += cl;
328 path += is_utf8_char (path); 328 path += is_utf8_char (path);
329 } 329 }
330 } 330 }
331 331
332 RETVAL = newSVpvn (dst, dstp - dst); 332 RETVAL = newSVpvn ((const char *)dst, dstp - dst);
333} 333}
334 OUTPUT: 334 OUTPUT:
335 RETVAL 335 RETVAL
336 336
337GdkPixbuf_noinc * 337GdkPixbuf_noinc *
340 CODE: 340 CODE:
341{ 341{
342 int x, y; 342 int x, y;
343 guchar *dst, *d; 343 guchar *dst, *d;
344 int dstr; 344 int dstr;
345 guchar *src = SvPVbyte_nolen (src_sv); 345 guchar *src = (guchar *)SvPVbyte_nolen (src_sv);
346 346
347 RETVAL = gdk_pixbuf_new (GDK_COLORSPACE_RGB, 0, 8, w, h); 347 RETVAL = gdk_pixbuf_new (GDK_COLORSPACE_RGB, 0, 8, w, h);
348 dst = gdk_pixbuf_get_pixels (RETVAL); 348 dst = gdk_pixbuf_get_pixels (RETVAL);
349 dstr = gdk_pixbuf_get_rowstride (RETVAL); 349 dstr = gdk_pixbuf_get_rowstride (RETVAL);
350 350
377 377
378 RETVAL = newSV (w * h); 378 RETVAL = newSV (w * h);
379 SvPOK_only (RETVAL); 379 SvPOK_only (RETVAL);
380 SvCUR_set (RETVAL, w * h); 380 SvCUR_set (RETVAL, w * h);
381 381
382 dst = SvPVX (RETVAL); 382 dst = (guchar *)SvPVX (RETVAL);
383 383
384 memset (Er, 0, sizeof (int) * IW); 384 memset (Er, 0, sizeof (int) * IW);
385 memset (Eg, 0, sizeof (int) * IW); 385 memset (Eg, 0, sizeof (int) * IW);
386 memset (Eb, 0, sizeof (int) * IW); 386 memset (Eb, 0, sizeof (int) * IW);
387 387
481 481
482 RETVAL = newSV (6 * 8 * 12 / 8); 482 RETVAL = newSV (6 * 8 * 12 / 8);
483 SvPOK_only (RETVAL); 483 SvPOK_only (RETVAL);
484 SvCUR_set (RETVAL, 6 * 8 * 12 / 8); 484 SvCUR_set (RETVAL, 6 * 8 * 12 / 8);
485 485
486 dst = SvPVX (RETVAL); 486 dst = (guchar *)SvPVX (RETVAL);
487 487
488 /* some primitive error distribution + random dithering */ 488 /* some primitive error distribution + random dithering */
489 489
490 for (y = 0; y < h; y++) 490 for (y = 0; y < h; y++)
491 { 491 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines