worked around parse errors by an old gcc compiler(2.95.3)

This commit is contained in:
hyung-hwan 2020-12-03 14:11:11 +00:00
parent c44b3160f2
commit 3a5119504e
2 changed files with 22 additions and 22 deletions

View File

@ -958,9 +958,9 @@ static int fnc_split (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi, int use_array)
str.len = org_len - (p - str.ptr); str.len = org_len - (p - str.ptr);
} }
if (do_fld) hawk_rtx_freemem (rtx, str.ptr); if (do_fld) { hawk_rtx_freemem (rtx, str.ptr); }
else if (byte_str) hawk_rtx_freevalbcstr (rtx, a0, str.ptr); else if (byte_str) { hawk_rtx_freevalbcstr (rtx, a0, str.ptr); }
else hawk_rtx_freevaloocstr (rtx, a0, str.ptr); else { hawk_rtx_freevaloocstr (rtx, a0, str.ptr); }
if (fs_free) hawk_rtx_freevaloocstr (rtx, t0, fs_free); if (fs_free) hawk_rtx_freevaloocstr (rtx, t0, fs_free);
@ -981,9 +981,9 @@ static int fnc_split (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi, int use_array)
oops: oops:
if (str.ptr) if (str.ptr)
{ {
if (do_fld) hawk_rtx_freemem (rtx, str.ptr); if (do_fld) { hawk_rtx_freemem (rtx, str.ptr); }
else if (byte_str) hawk_rtx_freevalbcstr (rtx, a0, str.ptr); else if (byte_str) { hawk_rtx_freevalbcstr (rtx, a0, str.ptr); }
else hawk_rtx_freevaloocstr (rtx, a0, str.ptr); else { hawk_rtx_freevaloocstr (rtx, a0, str.ptr); }
} }
if (fs_free) hawk_rtx_freemem (rtx, fs_free); if (fs_free) hawk_rtx_freemem (rtx, fs_free);

View File

@ -1322,17 +1322,17 @@ typedef enum hawk_log_mask_t hawk_log_mask_t;
#define HAWK_BT(txt) (txt) #define HAWK_BT(txt) (txt)
#if (HAWK_SIZEOF_UCH_T == HAWK_SIZEOF_BCH_T) #if (HAWK_SIZEOF_UCH_T == HAWK_SIZEOF_BCH_T)
# define HAWK_UQ_I(val) (#val) # define HAWK_UQ_I(val) (#val)
# define HAWK_UQ(val) HAWK_UQ_I(val) # define HAWK_UQ(val) HAWK_UQ_I(val)
#elif defined(HAWK_USE_PREFIX_BIG_U) #elif defined(HAWK_USE_PREFIX_BIG_U)
# define HAWK_UQ_I(val) (U ## #val) # define HAWK_UQ_I(val) (U ## #val)
# define HAWK_UQ(val) HAWK_UQ_I(val) # define HAWK_UQ(val) HAWK_UQ_I(val)
#elif defined(HAWK_USE_PREFIX_SMALL_U) #elif defined(HAWK_USE_PREFIX_SMALL_U)
# define HAWK_UQ_I(val) (u ## #val) # define HAWK_UQ_I(val) (u ## #val)
# define HAWK_UQ(val) HAWK_UQ_I(val) # define HAWK_UQ(val) HAWK_UQ_I(val)
#else #else
# define HAWK_UQ_I(val) (L ## #val) # define HAWK_UQ_I(val) (L ## #val)
# define HAWK_UQ(val) HAWK_UQ_I(val) # define HAWK_UQ(val) HAWK_UQ_I(val)
#endif #endif
/** /**
@ -1340,13 +1340,13 @@ typedef enum hawk_log_mask_t hawk_log_mask_t;
* string by prefixing it with a supported prefix. * string by prefixing it with a supported prefix.
*/ */
#if (HAWK_SIZEOF_UCH_T == HAWK_SIZEOF_BCH_T) #if (HAWK_SIZEOF_UCH_T == HAWK_SIZEOF_BCH_T)
# define HAWK_UT(txt) (txt) # define HAWK_UT(txt) (txt)
#elif defined(HAWK_USE_PREFIX_BIG_U) #elif defined(HAWK_USE_PREFIX_BIG_U)
# define HAWK_UT(txt) (U ## txt) # define HAWK_UT(txt) (U ## txt)
#elif defined(HAWK_USE_PREFIX_SMALL_U) #elif defined(HAWK_USE_PREFIX_SMALL_U)
# define HAWK_UT(txt) (u ## txt) # define HAWK_UT(txt) (u ## txt)
#else #else
# define HAWK_UT(txt) (L ## txt) # define HAWK_UT(txt) (L ## txt)
/* if this assertion fails, you should check the compiler flags determining the size of wchar_t */ /* if this assertion fails, you should check the compiler flags determining the size of wchar_t */
HAWK_STATIC_ASSERT (sizeof(L'X') == HAWK_SIZEOF_UCH_T); HAWK_STATIC_ASSERT (sizeof(L'X') == HAWK_SIZEOF_UCH_T);
@ -1358,11 +1358,11 @@ typedef enum hawk_log_mask_t hawk_log_mask_t;
* #HAWK_UT if #HAWK_OOCH_IS_UCH is defined. * #HAWK_UT if #HAWK_OOCH_IS_UCH is defined.
*/ */
#if defined(HAWK_OOCH_IS_BCH) #if defined(HAWK_OOCH_IS_BCH)
# define HAWK_Q(val) HAWK_BQ(val) # define HAWK_Q(val) HAWK_BQ(val)
# define HAWK_T(txt) HAWK_BT(txt) # define HAWK_T(txt) HAWK_BT(txt)
#else #else
# define HAWK_Q(val) HAWK_UQ(val) # define HAWK_Q(val) HAWK_UQ(val)
# define HAWK_T(txt) HAWK_UT(txt) # define HAWK_T(txt) HAWK_UT(txt)
#endif #endif