From 22913b96d35efdf1a58eddd0cfba7640c55fbcc7 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 15 Dec 2012 09:42:36 -0700 Subject: [PATCH] regexec.c: Move #defines to earlier in the file They will be used in a later commit earlier. This also changes the wording of the comment slightly to give more explanation, since the context they are now found in is different --- regexec.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/regexec.c b/regexec.c index c5ae04d..25e2d7e 100644 --- a/regexec.c +++ b/regexec.c @@ -327,6 +327,15 @@ static const char* const non_utf8_target_but_utf8_required } \ } STMT_END +/* These constants are for finding GCB=LV and GCB=LVT in the CLUMP regnode. + * These are for the pre-composed Hangul syllables, which are all in a + * contiguous block and arranged there in such a way so as to facilitate + * alorithmic determination of their characteristics. As such, they don't need + * a swash, but can be determined by simple arithmetic. Almost all are + * GCB=LVT, but every 28th one is a GCB=LV */ +#define SBASE 0xAC00 /* Start of block */ +#define SCount 11172 /* Length of block */ +#define TCount 28 static void restore_pos(pTHX_ void *arg); @@ -7732,16 +7741,6 @@ S_to_byte_substr(pTHX_ regexp *prog) return TRUE; } -/* These constants are for finding GCB=LV and GCB=LVT. These are for the - * pre-composed Hangul syllables, which are all in a contiguous block and - * arranged there in such a way so as to facilitate alorithmic determination of - * their characteristics. As such, they don't need a swash, but can be - * determined by simple arithmetic. Almost all are GCB=LVT, but every 28th one - * is a GCB=LV */ -#define SBASE 0xAC00 /* Start of block */ -#define SCount 11172 /* Length of block */ -#define TCount 28 - #if 0 /* This routine is not currently used */ PERL_STATIC_INLINE bool S_is_utf8_X_LV(pTHX_ const U8 *p) -- 2.7.4