/* IMPORTANT NOTE: Everything whose name begins with an underscore is for
* internal core Perl use only. */
-#ifndef HANDY_H /* Guard against nested #inclusion */
-#define HANDY_H
+#ifndef PERL_HANDY_H_ /* Guard against nested #inclusion */
+#define PERL_HANDY_H_
#if !defined(__STDC__)
#ifdef NULL
#define strnNE(s1,s2,l) (strncmp(s1,s2,l))
#define strnEQ(s1,s2,l) (!strncmp(s1,s2,l))
+/* These names are controversial, so guarding against their being used in more
+ * places than they already are. strBEGs and StrStartsWith are potential
+ * candidates */
+#if defined(PERL_IN_DOIO_C) || defined(PERL_IN_GV_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_LOCALE_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_TOKE_C) || defined(PERL_EXT)
#define strNEs(s1,s2) (strncmp(s1,"" s2 "", sizeof(s2)-1))
#define strEQs(s1,s2) (!strncmp(s1,"" s2 "", sizeof(s2)-1))
+#endif
#ifdef HAS_MEMCMP
# define memNE(s1,s2,l) (memcmp(s1,s2,l))
with no suffix C<"_A">. This variant is used to emphasize by its name that
only ASCII-range characters can return TRUE.
-Variant C<isI<FOO>_L1> imposes the Latin-1 (or EBCDIC equivlalent) character set
+Variant C<isI<FOO>_L1> imposes the Latin-1 (or EBCDIC equivalent) character set
onto the platform. That is, the code points that are ASCII are unaffected,
since ASCII is a subset of Latin-1. But the non-ASCII code points are treated
as if they are Latin-1 characters. For example, C<isWORDCHAR_L1()> will return
/* Because all controls are UTF-8 invariants in EBCDIC, we can use this
* more efficient macro instead of the more general one */
# define isCNTRL_utf8_safe(p, e) \
- (__ASSERT_(_utf8_safe_assert(p, e)) isCNTRL_L1(*(p))
+ (__ASSERT_(_utf8_safe_assert(p, e)) isCNTRL_L1(*(p)))
#else
# define isCNTRL_utf8_safe(p, e) _generic_utf8_safe(_CC_CNTRL, p, e, 0)
#endif
#ifdef PERL_CORE
# define deprecate(s) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \
"Use of " s " is deprecated")
+# define deprecate_disappears_in(when,message) \
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \
+ message ", and will disappear in Perl " when)
+# define deprecate_fatal_in(when,message) \
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), \
+ message ". Its use will be fatal in Perl " when)
#endif
/* Internal macros to deal with gids and uids */
#endif
-#endif /* HANDY_H */
+#endif /* PERL_HANDY_H_ */
/*
* ex: set ts=8 sts=4 sw=4 et: