diff options
author | shmuz <shmuz> | 2008-07-30 17:40:04 +0000 |
---|---|---|
committer | shmuz <shmuz> | 2008-07-30 17:40:04 +0000 |
commit | de14e217536363827c9b24551c36d4205630ce02 (patch) | |
tree | 74eaf70d0680910be37185b25f5a1ba9d1761583 /src | |
parent | 357e3817481bba56eca4c5e7e844b515f6605c49 (diff) | |
download | lrexlib-de14e217536363827c9b24551c36d4205630ce02.tar.gz |
Changes related to Oniguruma addition and directory layout change.
Diffstat (limited to 'src')
-rwxr-xr-x | src/algo.h | 8 | ||||
-rwxr-xr-x | src/common.h | 15 |
2 files changed, 16 insertions, 7 deletions
@@ -16,6 +16,10 @@ static int generate_error (lua_State *L, const TUserdata *ud, int errcode); # define ALG_OPTLOCALE(a,b,c) #endif +#ifndef ALG_OPTSYNTAX +# define ALG_OPTSYNTAX(a,b,c) +#endif + #ifndef DO_NAMED_SUBPATTERNS #define DO_NAMED_SUBPATTERNS(a,b,c) #endif @@ -113,6 +117,7 @@ static void checkarg_new (lua_State *L, TArgComp *argC) { argC->pattern = luaL_checklstring (L, 1, &argC->patlen); argC->cflags = ALG_GETCFLAGS (L, 2); ALG_OPTLOCALE (argC, L, 3); + ALG_OPTSYNTAX (argC, L, 4); } @@ -132,6 +137,7 @@ static void checkarg_gsub (lua_State *L, TArgComp *argC, TArgExec *argE) { argC->cflags = ALG_GETCFLAGS (L, 5); argE->eflags = luaL_optint (L, 6, ALG_EFLAGS_DFLT); ALG_OPTLOCALE (argC, L, 7); + ALG_OPTSYNTAX (argC, L, 8); } @@ -144,6 +150,7 @@ static void checkarg_find_func (lua_State *L, TArgComp *argC, TArgExec *argE) { argC->cflags = ALG_GETCFLAGS (L, 4); argE->eflags = luaL_optint (L, 5, ALG_EFLAGS_DFLT); ALG_OPTLOCALE (argC, L, 6); + ALG_OPTSYNTAX (argC, L, 7); } @@ -155,6 +162,7 @@ static void checkarg_gmatch_split (lua_State *L, TArgComp *argC, TArgExec *argE) argC->cflags = ALG_GETCFLAGS (L, 3); argE->eflags = luaL_optint (L, 4, ALG_EFLAGS_DFLT); ALG_OPTLOCALE (argC, L, 5); + ALG_OPTSYNTAX (argC, L, 6); } diff --git a/src/common.h b/src/common.h index 6f25ec3..06d9856 100755 --- a/src/common.h +++ b/src/common.h @@ -27,9 +27,10 @@ typedef struct { /* compile arguments */ size_t patlen; void * ud; int cflags; - const char * locale; - const unsigned char * tables; - int tablespos; + const char * locale; /* PCRE, Oniguruma */ + const unsigned char * tables; /* PCRE */ + int tablespos; /* PCRE */ + void * syntax; /* Oniguruma */ } TArgComp; typedef struct { /* exec arguments */ @@ -39,10 +40,10 @@ typedef struct { /* exec arguments */ int eflags; int funcpos; int maxmatch; - int funcpos2; /* used with gsub */ - int reptype; /* used with gsub */ - size_t ovecsize; /* used with dfa_exec */ - size_t wscount; /* used with dfa_exec */ + int funcpos2; /* used with gsub */ + int reptype; /* used with gsub */ + size_t ovecsize; /* PCRE: dfa_exec */ + size_t wscount; /* PCRE: dfa_exec */ } TArgExec; struct tagFreeList; /* forward declaration */ |