… | |
… | |
243 | RETVAL = magic_file (cookie, path); |
243 | RETVAL = magic_file (cookie, path); |
244 | } |
244 | } |
245 | OUTPUT: |
245 | OUTPUT: |
246 | RETVAL |
246 | RETVAL |
247 | |
247 | |
248 | # missing in Gtk2 perl module |
248 | # missing/broken in Gtk2 perl module |
|
|
249 | |
|
|
250 | void |
|
|
251 | gdk_window_clear_hints (GdkWindow *window) |
|
|
252 | CODE: |
|
|
253 | gdk_window_set_geometry_hints (window, 0, 0); |
249 | |
254 | |
250 | gboolean |
255 | gboolean |
251 | gdk_net_wm_supports (GdkAtom property) |
256 | gdk_net_wm_supports (GdkAtom property) |
252 | CODE: |
257 | CODE: |
253 | #if defined(GDK_WINDOWING_X11) && !defined(GDK_MULTIHEAD_SAFE) |
258 | #if defined(GDK_WINDOWING_X11) && !defined(GDK_MULTIHEAD_SAFE) |
… | |
… | |
435 | |
440 | |
436 | ############################################################################# |
441 | ############################################################################# |
437 | |
442 | |
438 | MODULE = Gtk2::CV PACKAGE = Gtk2::CV::Schnauzer |
443 | MODULE = Gtk2::CV PACKAGE = Gtk2::CV::Schnauzer |
439 | |
444 | |
|
|
445 | # currently only works for filenames (octet strings) |
|
|
446 | |
440 | SV * |
447 | SV * |
441 | foldcase (SV *pathsv) |
448 | foldcase (SV *pathsv) |
442 | PROTOTYPE: $ |
449 | PROTOTYPE: $ |
443 | CODE: |
450 | CODE: |
444 | { |
451 | { |
445 | STRLEN plen; |
452 | STRLEN plen; |
446 | U8 *path = (U8 *)SvPVutf8 (pathsv, plen); |
453 | U8 *path = (U8 *)SvPV (pathsv, plen); |
447 | U8 *pend = path + plen; |
454 | U8 *pend = path + plen; |
448 | U8 dst [plen * 6 * 3], *dstp = dst; |
455 | U8 dst [plen * 6 * 3], *dstp = dst; |
449 | |
456 | |
450 | while (path < pend) |
457 | while (path < pend) |
451 | { |
458 | { |
452 | U8 ch = *path; |
459 | U8 ch = *path; |
453 | |
460 | |
454 | if (ch >= 'a' && ch <= 'z') |
461 | if (ch >= 'a' && ch <= 'z') |
455 | *dstp++ = *path++; |
462 | *dstp++ = *path++; |
|
|
463 | else if (ch >= 'A' && ch <= 'Z') |
|
|
464 | *dstp++ = *path++ + ('a' - 'A'); |
456 | else if (ch >= '0' && ch <= '9') |
465 | else if (ch >= '0' && ch <= '9') |
457 | { |
466 | { |
458 | STRLEN el, nl = 0; |
467 | STRLEN el, nl = 0; |
459 | while (*path >= '0' && *path <= '9' && path < pend) |
468 | while (*path >= '0' && *path <= '9' && path < pend) |
460 | path++, nl++; |
469 | path++, nl++; |
… | |
… | |
463 | *dstp++ = '0'; |
472 | *dstp++ = '0'; |
464 | |
473 | |
465 | memcpy (dstp, path - nl, nl); |
474 | memcpy (dstp, path - nl, nl); |
466 | dstp += nl; |
475 | dstp += nl; |
467 | } |
476 | } |
|
|
477 | else |
|
|
478 | *dstp++ = *path++; |
|
|
479 | #if 0 |
468 | else |
480 | else |
469 | { |
481 | { |
470 | STRLEN cl; |
482 | STRLEN cl; |
471 | to_utf8_fold (path, dstp, &cl); |
483 | to_utf8_fold (path, dstp, &cl); |
472 | dstp += cl; |
484 | dstp += cl; |
473 | path += is_utf8_char (path); |
485 | path += is_utf8_char (path); |
474 | } |
486 | } |
|
|
487 | #endif |
475 | } |
488 | } |
476 | |
489 | |
477 | RETVAL = newSVpvn ((const char *)dst, dstp - dst); |
490 | RETVAL = newSVpvn ((const char *)dst, dstp - dst); |
478 | } |
491 | } |
479 | OUTPUT: |
492 | OUTPUT: |