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

Comparing CV/CV.xs (file contents):
Revision 1.17 by root, Wed Jul 20 06:20:36 2005 UTC vs.
Revision 1.18 by root, Wed Jul 20 09:06:37 2005 UTC

1#include "EXTERN.h" 1#include "EXTERN.h"
2#include "perl.h" 2#include "perl.h"
3#include "XSUB.h" 3#include "XSUB.h"
4 4
5#include <string.h>
5#include <setjmp.h> 6#include <setjmp.h>
6 7
7#include <jpeglib.h> 8#include <jpeglib.h>
8#include <gdk-pixbuf/gdk-pixbuf.h> 9#include <gdk-pixbuf/gdk-pixbuf.h>
9 10
268 269
269############################################################################# 270#############################################################################
270 271
271MODULE = Gtk2::CV PACKAGE = Gtk2::CV::Schnauzer 272MODULE = Gtk2::CV PACKAGE = Gtk2::CV::Schnauzer
272 273
274SV *
275foldcase (SV *pathsv)
276 PROTOTYPE: $
277 CODE:
278{
279 STRLEN plen;
280 U8 *path = SvPVutf8 (pathsv, plen);
281 U8 *pend = path + plen;
282 U8 dst [plen * 6 * 3], *dstp = dst;
283
284 while (path < pend)
285 {
286 if (*path >= '0' && *path <= '9')
287 {
288 STRLEN el, nl = 0;
289 while (*path >= '0' && *path <= '9')
290 path++, nl++;
291
292 for (el = nl; el < 6; el++)
293 *dstp++ = '0';
294
295 memcpy (dstp, path - nl, nl);
296 dstp += nl;
297 }
298 else
299 {
300 STRLEN cl;
301 to_utf8_fold (path, dstp, &cl);
302 dstp += cl;
303 path += is_utf8_char (path);
304 }
305 }
306
307 RETVAL = newSVpvn (dst, dstp - dst);
308}
309 OUTPUT:
310 RETVAL
311
273GdkPixbuf_noinc * 312GdkPixbuf_noinc *
274p7_to_pb (int w, int h, guchar *src) 313p7_to_pb (int w, int h, guchar *src)
275 CODE: 314 CODE:
276{ 315{
277 int x, y; 316 int x, y;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines