svn commit: r225634 - user/gabor/tre-integration/contrib/tre/lib
Gabor Kovesdan
gabor at FreeBSD.org
Sat Sep 17 05:36:00 UTC 2011
Author: gabor
Date: Sat Sep 17 05:35:59 2011
New Revision: 225634
URL: http://svn.freebsd.org/changeset/base/225634
Log:
- Portability fix for format strings
Modified:
user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c
user/gabor/tre-integration/contrib/tre/lib/tre-internal.h
Modified: user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c
==============================================================================
--- user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c Sat Sep 17 04:31:43 2011 (r225633)
+++ user/gabor/tre-integration/contrib/tre/lib/tre-fastmatch.c Sat Sep 17 05:35:59 2011 (r225634)
@@ -156,7 +156,7 @@ static int fastcmp(const void *, const b
gs = fg->bmGs[mismatch]; \
} \
bc = (r == HASH_OK) ? bc : fg->defBc; \
- DPRINT(("tre_fast_match: mismatch on character %lc, " \
+ DPRINT(("tre_fast_match: mismatch on character" CHF ", " \
"BC %d, GS %d\n", \
((const tre_char_t *)startptr)[mismatch + 1], \
bc, gs)); \
@@ -299,7 +299,7 @@ static int fastcmp(const void *, const b
r = hashtable_put(fg->qsBc_table, &fg->wpattern[i], &k); \
if ((r == HASH_FAIL) || (r == HASH_FULL)) \
FAIL_COMP(REG_ESPACE); \
- DPRINT(("BC shift for wide char %lc is %d\n", fg->wpattern[i], \
+ DPRINT(("BC shift for wide char " CHF " is %d\n", fg->wpattern[i],\
k)); \
if (fg->icase) \
{ \
@@ -308,7 +308,7 @@ static int fastcmp(const void *, const b
r = hashtable_put(fg->qsBc_table, &wc, &k); \
if ((r == HASH_FAIL) || (r == HASH_FULL)) \
FAIL_COMP(REG_ESPACE); \
- DPRINT(("BC shift for wide char %lc is %d\n", wc, k)); \
+ DPRINT(("BC shift for wide char " CHF " is %d\n", wc, k)); \
} \
}
@@ -329,7 +329,7 @@ static int fastcmp(const void *, const b
r = hashtable_put(fg->qsBc_table, &fg->wpattern[i], &k); \
if ((r == HASH_FAIL) || (r == HASH_FULL)) \
FAIL_COMP(REG_ESPACE); \
- DPRINT(("Reverse BC shift for wide char %lc is %d\n", \
+ DPRINT(("Reverse BC shift for wide char " CHF " is %d\n", \
fg->wpattern[i], k)); \
if (fg->icase) \
{ \
@@ -338,7 +338,8 @@ static int fastcmp(const void *, const b
r = hashtable_put(fg->qsBc_table, &wc, &k); \
if ((r == HASH_FAIL) || (r == HASH_FULL)) \
FAIL_COMP(REG_ESPACE); \
- DPRINT(("Reverse BC shift for wide char %lc is %d\n", wc, k));\
+ DPRINT(("Reverse BC shift for wide char " CHF " is %d\n", wc, \
+ k)); \
} \
}
Modified: user/gabor/tre-integration/contrib/tre/lib/tre-internal.h
==============================================================================
--- user/gabor/tre-integration/contrib/tre/lib/tre-internal.h Sat Sep 17 04:31:43 2011 (r225633)
+++ user/gabor/tre-integration/contrib/tre/lib/tre-internal.h Sat Sep 17 05:35:59 2011 (r225634)
@@ -146,8 +146,10 @@ typedef enum { STR_WIDE, STR_BYTE, STR_M
/* Define STRF to the correct printf formatter for strings. */
#ifdef TRE_WCHAR
#define STRF "ls"
+#define CHF "lc"
#else /* !TRE_WCHAR */
#define STRF "s"
+#define CHF "c"
#endif /* !TRE_WCHAR */
/* TNFA transition type. A TNFA state is an array of transitions,
More information about the svn-src-user
mailing list