~ubuntu-branches/ubuntu/lucid/perl-tk/lucid

« back to all changes in this revision

Viewing changes to encGlue.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Tuckley
  • Date: 2008-02-15 13:56:59 UTC
  • mfrom: (1.1.3 upstream) (4.1.1 hardy)
  • Revision ID: james.westby@ubuntu.com-20080215135659-ru2oqlykuju20fav
Tags: 1:804.028-1
* New Upstream Release (Closes: #463080).
* Update to Debhelper v5.
* Build with XFT=1 (Closes: #411129).

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
}
72
72
 
73
73
int
 
74
Tcl_UniCharIsWordChar(int ch)
 
75
{
 
76
 dTHX;
 
77
 /* FIXME XXX what about CONNECTOR_BITS like in th Tcl original? */
 
78
 return Perl_is_uni_alpha(aTHX_ ch) || Perl_is_uni_digit(aTHX_ ch);
 
79
}
 
80
 
 
81
int
74
82
Tcl_UniCharIsSpace(int ch)
75
83
{
76
84
 dTHX;
606
614
 else
607
615
  {
608
616
   if (SvOK(sv))
609
 
    warn("Strange encoding %_",sv);
 
617
    warn("Strange encoding %"SVf,sv);
610
618
  }
611
619
 return NULL;
612
620
}
720
728
    {
721
729
     sv_setpvn(stmp,s,len);
722
730
    }
 
731
   SPAGAIN;
723
732
   PUSHMARK(sp);
724
733
   XPUSHs(PerlEncObj(encoding));
725
734
   XPUSHs(stmp);
735
744
      }
736
745
     else
737
746
      {
738
 
       warn("%_",ERRSV);
 
747
       warn("%"SVf,ERRSV);
739
748
      }
740
749
     break;
741
750
    }
742
751
   SPAGAIN;
743
752
   dtmp = POPs;
744
753
   PUTBACK;
 
754
#if 0
 
755
   /* XXX This code seems to be wrong since Encode 2.10, when LEAVE_SRC was
 
756
    * default (is this true?).
 
757
    * This would fix the "selection conversion left too many bytes unconverted"
 
758
    * aborts.
 
759
    */
745
760
   if (SvCUR(stmp))
746
761
    {
747
762
     /* This could also be TCL_CONVERT_MULTIBYTE - how do we tell ? */
748
763
     code = TCL_CONVERT_UNKNOWN;
749
764
     break;
750
765
    }
 
766
#endif
751
767
   td = SvPV(dtmp,dbytes);
752
768
   if (!dbytes)
753
769
    {
827
843
 if (srcLen)
828
844
  {
829
845
   int count;
 
846
   SPAGAIN;
830
847
   ENTER;
831
848
   SAVETMPS;
832
849
   PUSHMARK(sp);
877
894
 STRLEN len;
878
895
 if (!encoding)
879
896
  encoding = GetSystemEncoding();
 
897
 SPAGAIN;
880
898
 ENTER;
881
899
 SAVETMPS;
882
900
 if (!src)
892
910
#endif
893
911
   srcLen = strlen(src);
894
912
 }
 
913
 SPAGAIN;
895
914
 PUSHMARK(sp);
896
915
 XPUSHs(PerlEncObj(encoding));
897
916
 sv = newSV(srcLen);
910
929
 return Tcl_DStringValue(dsPtr);
911
930
}
912
931
 
913
 
 
914
 
 
915
932
#if defined(WIN32) || (defined(__WIN32__) && defined(__CYGWIN__))
916
933
/*
917
934
 *---------------------------------------------------------------------------