diff options
Diffstat (limited to 'streamhtmlparser/jsparser.c')
-rwxr-xr-x[-rw-r--r--] | streamhtmlparser/jsparser.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/streamhtmlparser/jsparser.c b/streamhtmlparser/jsparser.c index 9d71c74..dc94cfc 100644..100755 --- a/streamhtmlparser/jsparser.c +++ b/streamhtmlparser/jsparser.c @@ -40,6 +40,8 @@ #include "statemachine.h" #include "jsparser.h" +#include "port.h" + /* So we can support both C and C++ compilers, we use the CAST() macro instead * of using C style casts or static_cast<>() directly. */ @@ -117,7 +119,7 @@ static const char *regexp_token_prefix[] = { /* Converts the internal state into the external superstate. */ -static inline int state_external(int state) +static INLINE int state_external(int state) { assert(state < JSPARSER_NUM_STATES); assert(state >= 0); @@ -129,7 +131,7 @@ static inline int state_external(int state) * with the exception of unicode space and line terminators: * http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf */ -static inline int js_is_whitespace(char c) +static INLINE int js_is_whitespace(char c) { return c == '\t' || /* Tab 0x09 */ c == '\v' || /* Vertical Tab 0x0B */ @@ -147,7 +149,7 @@ static inline int js_is_whitespace(char c) * For more detail on the limitations of having this relaxed set of characters * please see the comments in_state_js_text(). */ -static inline int js_is_identifier(char c) { +static INLINE int js_is_identifier(char c) { return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || @@ -202,7 +204,7 @@ void jsparser_buffer_append_str(jsparser_ctx *js, const char *str) /* Returns the position relative to the start of the buffer or -1 if past the * size of the buffer.. */ -static inline int jsparser_buffer_absolute_pos(jsparser_ctx *js, int pos) +static INLINE int jsparser_buffer_absolute_pos(jsparser_ctx *js, int pos) { int absolute_pos; int buffer_len; @@ -363,7 +365,7 @@ static int bsearch_strcmp(const void *a, const void *b) * precede a regular expression in the javascript grammar, and returns true if * the argument is found on that list. */ -static inline int is_regexp_token_prefix(char *token) +static INLINE int is_regexp_token_prefix(char *token) { assert(token != NULL); |