summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniklas <niklas>2008-07-30 19:09:12 +0000
committerniklas <niklas>2008-07-30 19:09:12 +0000
commit91987af8683070dfe4bfecc5e140d733f551b8c1 (patch)
tree82371d3a8d10f18a14ac8d9801e723aecfb0c7bc
parentbe5c33441c1dc2adef915c26a90234786017eabf (diff)
downloadlrexlib-91987af8683070dfe4bfecc5e140d733f551b8c1.tar.gz
Remove a stray _cdecl.
Change stricmp (non-standard name) to strcasecmp (POSIX 2001 name). Change include path for oniguruma.h. If installed under /usr/include/oniguruma, an additional -I flag is needed; on Ubuntu (and hence presumably Debian) the include files are stored directly under /usr/include.
-rwxr-xr-xsrc/oniguruma/lonig.c6
-rwxr-xr-xsrc/oniguruma/lonig_f.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/oniguruma/lonig.c b/src/oniguruma/lonig.c
index c9f16b0..8538d5d 100755
--- a/src/oniguruma/lonig.c
+++ b/src/oniguruma/lonig.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <locale.h>
#include <ctype.h>
-#include <oniguruma/oniguruma.h>
+#include <oniguruma.h>
#include "lua.h"
#include "lauxlib.h"
@@ -170,8 +170,8 @@ static EncPair Syntaxes[] = {
{ "RUBY", ONIG_SYNTAX_RUBY },
};
-static int _cdecl fcmp(const void *p1, const void *p2) {
- return stricmp(((EncPair*)p1)->name, ((EncPair*)p2)->name);
+static int fcmp(const void *p1, const void *p2) {
+ return strcasecmp(((EncPair*)p1)->name, ((EncPair*)p2)->name);
}
static void optlocale (TArgComp *argC, lua_State *L, int pos) {
diff --git a/src/oniguruma/lonig_f.c b/src/oniguruma/lonig_f.c
index 1b3bbce..61247ed 100755
--- a/src/oniguruma/lonig_f.c
+++ b/src/oniguruma/lonig_f.c
@@ -1,7 +1,7 @@
/* lonig_f.c - Lua binding of Oniguruma library */
/* See Copyright Notice in the file LICENSE */
-#include <oniguruma/oniguruma.h>
+#include <oniguruma.h>
#include <lua.h>
#include <lauxlib.h>
#include "../common.h"
@@ -188,7 +188,9 @@ static flag_pair onig_error_flags[] = {
{ "ONIGERR_NEVER_ENDING_RECURSION", ONIGERR_NEVER_ENDING_RECURSION },
{ "ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY", ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY },
{ "ONIGERR_INVALID_CHAR_PROPERTY_NAME", ONIGERR_INVALID_CHAR_PROPERTY_NAME },
+#ifdef ONIGERR_INVALID_CODE_POINT_VALUE
{ "ONIGERR_INVALID_CODE_POINT_VALUE", ONIGERR_INVALID_CODE_POINT_VALUE },
+#endif
{ "ONIGERR_INVALID_WIDE_CHAR_VALUE", ONIGERR_INVALID_WIDE_CHAR_VALUE },
{ "ONIGERR_TOO_BIG_WIDE_CHAR_VALUE", ONIGERR_TOO_BIG_WIDE_CHAR_VALUE },
{ "ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION", ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION },