@@ -1412,7 +1412,7 @@ or casts
14121412 *
14131413 * NOT suitable for void*
14141414 */
1415- #define ASSERT_IS_PTR (x ) (__ASSERT_ (sizeof(*(x))) (x))
1415+ #define ASSERT_IS_PTR (x ) (assert_ (sizeof(*(x))) (x))
14161416
14171417/* FITS_IN_8_BITS(c) returns true if c doesn't have a bit set other than in
14181418 * the lower 8. It is designed to be hopefully bomb-proof, making sure that no
@@ -1437,8 +1437,8 @@ or casts
14371437 * needed. (The NV casts stop any warnings about comparison always being true
14381438 * if called with an unsigned. The cast preserves the sign, which is all we
14391439 * care about.) */
1440- #define withinCOUNT (c , l , n ) (__ASSERT_ ((NV) (l) >= 0) \
1441- __ASSERT_ ((NV) (n) >= 0) \
1440+ #define withinCOUNT (c , l , n ) (assert_ ((NV) (l) >= 0) \
1441+ assert_ ((NV) (n) >= 0) \
14421442 withinCOUNT_KNOWN_VALID_((c), (l), (n)))
14431443
14441444/* For internal use only, this can be used in places where it is known that the
@@ -1453,11 +1453,11 @@ or casts
14531453/* Returns true if c is in the range l..u, where 'l' is non-negative
14541454 * Written this way so that after optimization, only one conditional test is
14551455 * needed. */
1456- #define inRANGE (c , l , u ) (__ASSERT_ ((NV) (l) >= 0) __ASSERT_ ((u) >= (l)) \
1456+ #define inRANGE (c , l , u ) (assert_ ((NV) (l) >= 0) assert_ ((u) >= (l)) \
14571457 ( (sizeof(c) == sizeof(U8)) ? inRANGE_helper_(U8, (c), (l), ((u))) \
14581458 : (sizeof(c) == sizeof(U16)) ? inRANGE_helper_(U16,(c), (l), ((u))) \
14591459 : (sizeof(c) == sizeof(U32)) ? inRANGE_helper_(U32,(c), (l), ((u))) \
1460- : (__ASSERT_ (sizeof(c) == sizeof(WIDEST_UTYPE)) \
1460+ : (assert_ (sizeof(c) == sizeof(WIDEST_UTYPE)) \
14611461 inRANGE_helper_(WIDEST_UTYPE,(c), (l), ((u))))))
14621462
14631463/* For internal use, this is used by machine-generated code which generates
@@ -2096,7 +2096,7 @@ END_EXTERN_C
20962096 : ((UNLIKELY(((U8) (c)) == LATIN_SMALL_LETTER_Y_WITH_DIAERESIS) \
20972097 ? LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS \
20982098 : (UNLIKELY(((U8)(c)) == LATIN_SMALL_LETTER_SHARP_S) \
2099- ? (__ASSERT_ (0) (c)) /* Fail on Sharp S in DEBUGGING */ \
2099+ ? (assert_ (0) (c)) /* Fail on Sharp S in DEBUGGING */ \
21002100 : PL_mod_latin1_uc [ (U8) (c) ]))))))
21012101
21022102/* In this macro, note that the result can be larger than a byte in a UTF-8
@@ -2108,7 +2108,7 @@ END_EXTERN_C
21082108# define toFOLD_LC (c ) \
21092109 ((UNLIKELY((c) == MICRO_SIGN) && IN_UTF8_CTYPE_LOCALE) \
21102110 ? GREEK_SMALL_LETTER_MU \
2111- : (__ASSERT_ ( ! IN_UTF8_CTYPE_LOCALE \
2111+ : (assert_ ( ! IN_UTF8_CTYPE_LOCALE \
21122112 || LIKELY((c) != LATIN_SMALL_LETTER_SHARP_S)) \
21132113 toLOWER_LC(c)))
21142114#endif
@@ -2284,7 +2284,7 @@ END_EXTERN_C
22842284 * class is TRUE for. Hence it can skip the tests for this range.
22852285 * 'above_latin1' should include its arguments */
22862286#define generic_utf8_safe_no_upper_latin1_ (classnum , p , e , above_latin1 ) \
2287- (__ASSERT_ (_utf8_safe_assert(p, e)) \
2287+ (assert_ (_utf8_safe_assert(p, e)) \
22882288 (isASCII(*(p))) \
22892289 ? generic_isCC_(*(p), classnum) \
22902290 : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \
@@ -2317,15 +2317,15 @@ END_EXTERN_C
23172317#define isASCII_utf8_safe (p , e ) \
23182318 /* Because ASCII is invariant under utf8, the non-utf8 macro \
23192319 * works */ \
2320- (__ASSERT_ (_utf8_safe_assert(p, e)) isASCII(*(p)))
2320+ (assert_ (_utf8_safe_assert(p, e)) isASCII(*(p)))
23212321#define isBLANK_utf8_safe (p , e ) \
23222322 generic_non_invlist_utf8_safe_(CC_BLANK_, is_HORIZWS_high, p, e)
23232323
23242324#ifdef EBCDIC
23252325 /* Because all controls are UTF-8 invariants in EBCDIC, we can use this
23262326 * more efficient macro instead of the more general one */
23272327# define isCNTRL_utf8_safe (p , e ) \
2328- (__ASSERT_ (_utf8_safe_assert(p, e)) isCNTRL_L1(*(p)))
2328+ (assert_ (_utf8_safe_assert(p, e)) isCNTRL_L1(*(p)))
23292329#else
23302330# define isCNTRL_utf8_safe (p , e ) generic_utf8_safe_(CC_CNTRL_, p, e, 0)
23312331#endif
@@ -2404,7 +2404,7 @@ END_EXTERN_C
24042404 * point in 'p' is within the 0-255 range, it uses locale rules from the
24052405 * passed-in 'macro' parameter */
24062406#define generic_LC_utf8_safe_ (macro , p , e , above_latin1 ) \
2407- (__ASSERT_ (_utf8_safe_assert(p, e)) \
2407+ (assert_ (_utf8_safe_assert(p, e)) \
24082408 (UTF8_IS_INVARIANT(*(p))) \
24092409 ? macro(*(p)) \
24102410 : (UTF8_IS_DOWNGRADEABLE_START(*(p)) \
@@ -2434,7 +2434,7 @@ END_EXTERN_C
24342434#define isALPHA_LC_utf8_safe (p , e ) \
24352435 generic_LC_invlist_utf8_safe_(isALPHA_LC, CC_ALPHA_, p, e)
24362436#define isASCII_LC_utf8_safe (p , e ) \
2437- (__ASSERT_ (_utf8_safe_assert(p, e)) isASCII_LC(*(p)))
2437+ (assert_ (_utf8_safe_assert(p, e)) isASCII_LC(*(p)))
24382438#define isBLANK_LC_utf8_safe (p , e ) \
24392439 generic_LC_non_invlist_utf8_safe_(isBLANK_LC, is_HORIZWS_high, p, e)
24402440#define isCNTRL_LC_utf8_safe (p , e ) \
@@ -2502,9 +2502,9 @@ END_EXTERN_C
25022502 * The conversion works both ways, so toCTRL('D') is 4, and toCTRL(4) is D,
25032503 * etc. */
25042504#ifndef EBCDIC
2505- # define toCTRL (c ) (__ASSERT_ (FITS_IN_8_BITS(c)) toUPPER(((U8)(c))) ^ 64)
2505+ # define toCTRL (c ) (assert_ (FITS_IN_8_BITS(c)) toUPPER(((U8)(c))) ^ 64)
25062506#else
2507- # define toCTRL (c ) (__ASSERT_ (FITS_IN_8_BITS(c)) \
2507+ # define toCTRL (c ) (assert_ (FITS_IN_8_BITS(c)) \
25082508 ((isPRINT_A(c)) \
25092509 ? (UNLIKELY((c) == '?') \
25102510 ? QUESTION_MARK_CTRL \
@@ -2548,7 +2548,7 @@ typedef U32 line_t;
25482548 * position, and then to the eights position. Both are added together to form
25492549 * 0 if the input is '0'-'9' and to form 9 if alpha. This is added to the
25502550 * final four bits of the input to form the correct value. */
2551- #define XDIGIT_VALUE (c ) (__ASSERT_ (isXDIGIT(c)) \
2551+ #define XDIGIT_VALUE (c ) (assert_ (isXDIGIT(c)) \
25522552 ((NATIVE_TO_LATIN1(c) >> 6) & 1) /* 1 if alpha; 0 if not */ \
25532553 + ((NATIVE_TO_LATIN1 (c ) >> 3 ) & 8 ) /* 8 if alpha; 0 if not */ \
25542554 + ((c ) & 0xF )) /* 0-9 if input valid hex digit */
@@ -2559,7 +2559,7 @@ typedef U32 line_t;
25592559/* Converts a character known to represent an octal digit (0-7) to its numeric
25602560 * value. The input is validated only by an assert() in DEBUGGING builds. In
25612561 * both ASCII and EBCDIC the last 3 bits of the octal digits range from 0-7. */
2562- #define OCTAL_VALUE (c ) (__ASSERT_ (isOCTAL(c)) (7 & (c)))
2562+ #define OCTAL_VALUE (c ) (assert_ (isOCTAL(c)) (7 & (c)))
25632563
25642564/* Efficiently returns a boolean as to if two native characters are equivalent
25652565 * case-insensitively. At least one of the characters must be one of [A-Za-z];
@@ -2576,7 +2576,7 @@ typedef U32 line_t;
25762576 * just a single 0, in the bit position where the upper- and lowercase differ.
25772577 * */
25782578#define isALPHA_FOLD_EQ (c1 , c2 ) \
2579- (__ASSERT_ (isALPHA_A(c1) || isALPHA_A(c2)) \
2579+ (assert_ (isALPHA_A(c1) || isALPHA_A(c2)) \
25802580 ((c1) & ~('A' ^ 'a')) == ((c2) & ~('A' ^ 'a')))
25812581#define isALPHA_FOLD_NE (c1 , c2 ) (! isALPHA_FOLD_EQ((c1), (c2)))
25822582
0 commit comments