X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=utfebcdic.h;h=8659b19c1d85df529c5468c1afe1f1f3cd79b120;hb=aaf9c2b26697492a8234a7efe890beef8868ea9b;hp=aa643fb3c862dd1ea212a3605b77ce1ee71c3cec;hpb=4c79ee7a1e7564ef83d0ac25d6677fdebb3ec7aa;p=p5sagit%2Fp5-mst-13.2.git diff --git a/utfebcdic.h b/utfebcdic.h index aa643fb..8659b19 100644 --- a/utfebcdic.h +++ b/utfebcdic.h @@ -1,6 +1,7 @@ /* utfebcdic.h * - * Copyright (c) 2001-2003, Larry Wall, Nick Ing-Simmons + * Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007, by Larry Wall, Nick + * Ing-Simmons, and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -337,9 +338,9 @@ EXTCONST unsigned char PL_a2e[]; END_EXTERN_C -#define UTF8SKIP(s) PL_utf8skip[*(U8*)s] +#define UTF8SKIP(s) PL_utf8skip[*(const U8*)(s)] -/* EBCDIC-happy ways of converting native code to UTF8 */ +/* EBCDIC-happy ways of converting native code to UTF-8 */ /* Native to iso-8859-1 */ #define NATIVE_TO_ASCII(ch) PL_e2a[(U8)(ch)] @@ -357,16 +358,16 @@ END_EXTERN_C /* * Note: we should try and be careful never to call the isXXX_utf8() functions * unless we're pretty sure we've seen the beginning of a UTF-EBCDIC character - * Otherwise we risk loading in the heavy-duty SWASHINIT and SWASHGET routines - * unnecessarily. + * Otherwise we risk loading in the heavy-duty swash_init and swash_fetch + * routines unnecessarily. */ #define isIDFIRST_lazy_if(p,c) ((IN_BYTES || (!c || UTF8_IS_INVARIANT(*p))) \ ? isIDFIRST(*(p)) \ - : isIDFIRST_utf8((U8*)p)) + : isIDFIRST_utf8((const U8*)p)) #define isALNUM_lazy_if(p,c) ((IN_BYTES || (!c || UTF8_IS_INVARIANT(*p))) \ ? isALNUM(*(p)) \ - : isALNUM_utf8((U8*)p)) + : isALNUM_utf8((const U8*)p)) /* The following table is adapted from tr16, it shows UTF-8-mod encoding of Unicode code points. @@ -417,4 +418,12 @@ END_EXTERN_C #define UTF8_EIGHT_BIT_HI(c) UTF_TO_NATIVE((((U8)(c))>>UTF_ACCUMULATION_SHIFT)|UTF_START_MARK(2)) #define UTF8_EIGHT_BIT_LO(c) UTF_TO_NATIVE(((((U8)(c)))&UTF_CONTINUATION_MASK)|UTF_CONTINUATION_MARK) - +/* + * Local variables: + * c-indentation-style: bsd + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * + * ex: set ts=8 sts=4 sw=4 noet: + */