#define PATFETCH(c) \
do {if (p == pend) return REG_EEND; \
c = (unsigned char) *p++; \
- if (translate) c = RE_TRANSLATE (translate, c); \
+ if (RE_TRANSLATE_P (translate)) c = RE_TRANSLATE (translate, c); \
} while (0)
#endif
when we use a character as a subscript we must make it unsigned. */
#ifndef TRANSLATE
#define TRANSLATE(d) \
- (translate ? (unsigned) RE_TRANSLATE (translate, (unsigned) (d)) : (d))
+ (RE_TRANSLATE_P (translate) \
+ ? (unsigned) RE_TRANSLATE (translate, (unsigned) (d)) : (d))
#endif
/* Written out as an if-else to avoid testing `translate'
inside the loop. */
- if (translate)
- {
+ if (RE_TRANSLATE_P (translate))
+{
if (multibyte)
while (range > lim)
{
: size1 - startpos);
buf_ch = STRING_CHAR (d, room);
- if (translate)
+ if (RE_TRANSLATE_P (translate))
buf_ch = RE_TRANSLATE (translate, buf_ch);
if (! (buf_ch >= 0400
/* This is written out as an if-else so we don't waste time
testing `translate' inside the loop. */
- if (translate)
+ if (RE_TRANSLATE_P (translate))
{
#ifdef emacs
if (multibyte)
/* Compare that many; failure if mismatch, else move
past them. */
- if (translate
+ if (RE_TRANSLATE_P (translate)
? bcmp_translate (d, d2, mcnt, translate)
: bcmp (d, d2, mcnt))
goto fail;