X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utf8.h;h=698c687c1cfc22eafc1ce599184b1fe13156c291;hb=52a043e6cc1df667f590107cf208184857a066bd;hp=f39e34042389f943a4151d9937a79f1487f76e41;hpb=a176fa2a176313dc1a9b9594d080f47292ff4070;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utf8.h b/utf8.h index f39e340..698c687 100644 --- a/utf8.h +++ b/utf8.h @@ -1,14 +1,16 @@ /* utf8.h * - * Copyright (c) 1998, Larry Wall + * Copyright (c) 1998-1999, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * */ +START_EXTERN_C + #ifdef DOINIT -EXTCONST unsigned char utf8skip[] = { +EXTCONST unsigned char PL_utf8skip[] = { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ascii */ @@ -19,9 +21,11 @@ EXTCONST unsigned char utf8skip[] = { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,7,8, /* cjk etc. */ }; #else -EXTCONST unsigned char utf8skip[]; +EXTCONST unsigned char PL_utf8skip[]; #endif -#define IN_UTF8 (curcop->op_private & HINT_UTF8) +END_EXTERN_C + +#define IN_UTF8 (PL_curcop->op_private & HINT_UTF8) -#define UTF8SKIP(s) utf8skip[*(U8*)s] +#define UTF8SKIP(s) PL_utf8skip[*(U8*)s]