@@ -1414,7 +1414,7 @@ or casts
14141414 *
14151415 * NOT suitable for void*
14161416 */
1417- #define ASSERT_IS_PTR (x ) (__ASSERT_ (sizeof(*(x))) (x))
1417+ #define ASSERT_IS_PTR (x ) (assert (sizeof(*(x))), (x))
14181418
14191419/* FITS_IN_8_BITS(c) returns true if c doesn't have a bit set other than in
14201420 * the lower 8. It is designed to be hopefully bomb-proof, making sure that no
@@ -1439,8 +1439,8 @@ or casts
14391439 * needed. (The NV casts stop any warnings about comparison always being true
14401440 * if called with an unsigned. The cast preserves the sign, which is all we
14411441 * care about.) */
1442- #define withinCOUNT (c , l , n ) (__ASSERT_ ((NV) (l) >= 0) \
1443- __ASSERT_ ((NV) (n) >= 0) \
1442+ #define withinCOUNT (c , l , n ) (assert ((NV) (l) >= 0), \
1443+ assert ((NV) (n) >= 0), \
14441444 withinCOUNT_KNOWN_VALID_((c), (l), (n)))
14451445
14461446/* For internal use only, this can be used in places where it is known that the
@@ -1455,11 +1455,11 @@ or casts
14551455/* Returns true if c is in the range l..u, where 'l' is non-negative
14561456 * Written this way so that after optimization, only one conditional test is
14571457 * needed. */
1458- #define inRANGE (c , l , u ) (__ASSERT_ ((NV) (l) >= 0) __ASSERT_ ((u) >= (l)) \
1458+ #define inRANGE (c , l , u ) (assert ((NV) (l) >= 0), assert ((u) >= (l)), \
14591459 ( (sizeof(c) == sizeof(U8)) ? inRANGE_helper_(U8, (c), (l), ((u))) \
14601460 : (sizeof(c) == sizeof(U16)) ? inRANGE_helper_(U16,(c), (l), ((u))) \
14611461 : (sizeof(c) == sizeof(U32)) ? inRANGE_helper_(U32,(c), (l), ((u))) \
1462- : (__ASSERT_ (sizeof(c) == sizeof(WIDEST_UTYPE)) \
1462+ : (assert (sizeof(c) == sizeof(WIDEST_UTYPE)), \
14631463 inRANGE_helper_(WIDEST_UTYPE,(c), (l), ((u))))))
14641464
14651465/* For internal use, this is used by machine-generated code which generates
@@ -2098,7 +2098,7 @@ END_EXTERN_C
20982098 : ((UNLIKELY(((U8) (c)) == LATIN_SMALL_LETTER_Y_WITH_DIAERESIS) \
20992099 ? LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS \
21002100 : (UNLIKELY(((U8)(c)) == LATIN_SMALL_LETTER_SHARP_S) \
2101- ? (__ASSERT_ (0) (c)) /* Fail on Sharp S in DEBUGGING */ \
2101+ ? (assert (0), (c)) /* Fail on Sharp S in DEBUGGING */ \
21022102 : PL_mod_latin1_uc [ (U8) (c) ]))))))
21032103
21042104/* In this macro, note that the result can be larger than a byte in a UTF-8
@@ -2110,8 +2110,8 @@ END_EXTERN_C
21102110# define toFOLD_LC (c ) \
21112111 ((UNLIKELY((c) == MICRO_SIGN) && IN_UTF8_CTYPE_LOCALE) \
21122112 ? GREEK_SMALL_LETTER_MU \
2113- : (__ASSERT_ ( ! IN_UTF8_CTYPE_LOCALE \
2114- || LIKELY((c) != LATIN_SMALL_LETTER_SHARP_S)) \
2113+ : (assert ( ! IN_UTF8_CTYPE_LOCALE \
2114+ || LIKELY((c) != LATIN_SMALL_LETTER_SHARP_S)), \
21152115 toLOWER_LC(c)))
21162116#endif
21172117
@@ -2286,7 +2286,7 @@ END_EXTERN_C
22862286 * class is TRUE for. Hence it can skip the tests for this range.
22872287 * 'above_latin1' should include its arguments */
22882288#define generic_utf8_safe_no_upper_latin1_ (classnum , p , e , above_latin1 ) \
2289- (__ASSERT_ (utf8_safe_assert_(p, e)) \
2289+ (assert (utf8_safe_assert_(p, e)), \
22902290 (isASCII(*(p))) \
22912291 ? generic_isCC_(*(p), classnum) \
22922292 : (UTF8_IS_DOWNGRADEABLE_START(*(p))) \
@@ -2504,9 +2504,9 @@ END_EXTERN_C
25042504 * The conversion works both ways, so toCTRL('D') is 4, and toCTRL(4) is D,
25052505 * etc. */
25062506#ifndef EBCDIC
2507- # define toCTRL (c ) (__ASSERT_ (FITS_IN_8_BITS(c)) toUPPER(((U8)(c))) ^ 64)
2507+ # define toCTRL (c ) (assert (FITS_IN_8_BITS(c)), toUPPER(((U8)(c))) ^ 64)
25082508#else
2509- # define toCTRL (c ) (__ASSERT_ (FITS_IN_8_BITS(c)) \
2509+ # define toCTRL (c ) (assert (FITS_IN_8_BITS(c)), \
25102510 ((isPRINT_A(c)) \
25112511 ? (UNLIKELY((c) == '?') \
25122512 ? QUESTION_MARK_CTRL \
@@ -2550,7 +2550,7 @@ typedef U32 line_t;
25502550 * position, and then to the eights position. Both are added together to form
25512551 * 0 if the input is '0'-'9' and to form 9 if alpha. This is added to the
25522552 * final four bits of the input to form the correct value. */
2553- #define XDIGIT_VALUE (c ) (__ASSERT_ (isXDIGIT(c)) \
2553+ #define XDIGIT_VALUE (c ) (assert (isXDIGIT(c)), \
25542554 ((NATIVE_TO_LATIN1(c) >> 6) & 1) /* 1 if alpha; 0 if not */ \
25552555 + ((NATIVE_TO_LATIN1 (c ) >> 3 ) & 8 ) /* 8 if alpha; 0 if not */ \
25562556 + ((c ) & 0xF )) /* 0-9 if input valid hex digit */
@@ -2561,7 +2561,7 @@ typedef U32 line_t;
25612561/* Converts a character known to represent an octal digit (0-7) to its numeric
25622562 * value. The input is validated only by an assert() in DEBUGGING builds. In
25632563 * both ASCII and EBCDIC the last 3 bits of the octal digits range from 0-7. */
2564- #define OCTAL_VALUE (c ) (__ASSERT_ (isOCTAL(c)) (7 & (c)))
2564+ #define OCTAL_VALUE (c ) (assert (isOCTAL(c)), (7 & (c)))
25652565
25662566/* Efficiently returns a boolean as to if two native characters are equivalent
25672567 * case-insensitively. At least one of the characters must be one of [A-Za-z];
@@ -2578,7 +2578,7 @@ typedef U32 line_t;
25782578 * just a single 0, in the bit position where the upper- and lowercase differ.
25792579 * */
25802580#define isALPHA_FOLD_EQ (c1 , c2 ) \
2581- (__ASSERT_ (isALPHA_A(c1) || isALPHA_A(c2)) \
2581+ (assert (isALPHA_A(c1) || isALPHA_A(c2)), \
25822582 ((c1) & ~('A' ^ 'a')) == ((c2) & ~('A' ^ 'a')))
25832583#define isALPHA_FOLD_NE (c1 , c2 ) (! isALPHA_FOLD_EQ((c1), (c2)))
25842584
0 commit comments