X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=handy.h;h=848cc0e9bbd8bfbb1b4958d95c441ecd87edab87;hb=def9adf2ff7ea35b82919070c285ab8f2ffe1641;hp=bd58bfed1a79c2c0b16eff1cd15a56722030ed41;hpb=334b0924e9cb80a0a1a60e44bb69faef523ef01c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/handy.h b/handy.h index bd58bfe..848cc0e 100644 --- a/handy.h +++ b/handy.h @@ -190,8 +190,13 @@ typedef U64TYPE U64; # define INT64_C(c) CAT2(c,L) # define UINT64_C(c) CAT2(c,UL) # else -# define INT64_C(c) ((I64TYPE)(c)) -# define UINT64_C(c) ((U64TYPE)(c)) +# if defined(_WIN64) && defined(_MSC_VER) +# define INT64_C(c) CAT2(c,I64) +# define UINT64_C(c) CAT2(c,UI64) +# else +# define INT64_C(c) ((I64TYPE)(c)) +# define UINT64_C(c) ((U64TYPE)(c)) +# endif # endif # endif # endif @@ -424,7 +429,7 @@ Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) alphanumeric character (including underscore) or digit. =for apidoc Am|bool|isALPHA|char ch -Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) +Returns a boolean indicating whether the C C is a US-ASCII (Basic Latin) alphabetic character. =for apidoc Am|bool|isSPACE|char ch @@ -474,7 +479,9 @@ US-ASCII (Basic Latin) range are viewed as not having any case. # define isPUNCT(c) ispunct(c) # define isXDIGIT(c) isxdigit(c) # define toUPPER(c) toupper(c) +# define toUPPER_LATIN1_MOD(c) UNI_TO_NATIVE(PL_mod_latin1_uc[(U8) NATIVE_TO_UNI(c)]) # define toLOWER(c) tolower(c) +# define toLOWER_LATIN1(c) UNI_TO_NATIVE(PL_latin1_lc[(U8) NATIVE_TO_UNI(c)]) #else # define isUPPER(c) ((c) >= 'A' && (c) <= 'Z') # define isLOWER(c) ((c) >= 'a' && (c) <= 'z') @@ -485,6 +492,15 @@ US-ASCII (Basic Latin) range are viewed as not having any case. # define isPRINT(c) (((c) >= 32 && (c) < 127)) # define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126)) # define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) + +/* Use table lookup for speed */ +# define toLOWER_LATIN1(c) (PL_latin1_lc[(U8) c]) + +/* Modified uc. Is correct uc except for three non-ascii chars which are + * all mapped to one of them, and these need special handling */ +# define toUPPER_LATIN1_MOD(c) (PL_mod_latin1_uc[(U8) c]) + +/* ASCII casing. */ # define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) # define toLOWER(c) (isUPPER(c) ? (c) + ('a' - 'A') : (c)) #endif @@ -902,6 +918,13 @@ void Perl_mem_log_del_sv(const SV *sv, const char *filename, const int linenumbe #define pTHX__VALUE #endif /* USE_ITHREADS */ +/* Perl_deprecate was not part of the public API, and did not have a deprecate() + shortcut macro defined without -DPERL_CORE. Neither codesearch.google.com nor + CPAN::Unpack show any users outside the core. */ +#ifdef PERL_CORE +# define deprecate(s) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), "Use of " s " is deprecated") +#endif + /* * Local variables: * c-indentation-style: bsd