summaryrefslogtreecommitdiff
path: root/streamhtmlparser/statemachine.h
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-08-12 10:40:23 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-08-12 10:40:23 +0200
commitfe4e07657381e7db947630981a1d34410e4753e3 (patch)
tree7daf065a73ab29fd954f81e40dfde9f6e66a022a /streamhtmlparser/statemachine.h
parentb2f35389b68fb1e58ea13dc273fdebaf534a325c (diff)
downloadcrawler-fe4e07657381e7db947630981a1d34410e4753e3.tar.gz
crawler-fe4e07657381e7db947630981a1d34410e4753e3.tar.bz2
streamhtmlparser works on Windows
Diffstat (limited to 'streamhtmlparser/statemachine.h')
-rwxr-xr-x[-rw-r--r--]streamhtmlparser/statemachine.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/streamhtmlparser/statemachine.h b/streamhtmlparser/statemachine.h
index a05ffe7..e586d35 100644..100755
--- a/streamhtmlparser/statemachine.h
+++ b/streamhtmlparser/statemachine.h
@@ -34,6 +34,8 @@
#ifndef STREAMHTMLPARSER_STATEMACHINE_H
#define STREAMHTMLPARSER_STATEMACHINE_H
+#include "port.h"
+
/* TODO(falmeida): I'm not sure about these limits, but since right now we only
* have 24 states it should be fine */
@@ -127,28 +129,28 @@ const char *statemachine_record_buffer(statemachine_ctx *ctx);
/* Returns the the number of characters currently stored in the record buffer.
*/
-static inline size_t statemachine_record_length(statemachine_ctx *ctx) {
+static INLINE size_t statemachine_record_length(statemachine_ctx *ctx) {
return ctx->record_pos + 1;
}
/* Return the current line number. */
-static inline int statemachine_get_line_number(statemachine_ctx *ctx) {
+static INLINE int statemachine_get_line_number(statemachine_ctx *ctx) {
return ctx->line_number;
}
/* Set the current line number. */
-static inline void statemachine_set_line_number(statemachine_ctx *ctx,
+static INLINE void statemachine_set_line_number(statemachine_ctx *ctx,
int line) {
ctx->line_number = line;
}
/* Return the current column number. */
-static inline int statemachine_get_column_number(statemachine_ctx *ctx) {
+static INLINE int statemachine_get_column_number(statemachine_ctx *ctx) {
return ctx->column_number;
}
/* Set the current column number. */
-static inline void statemachine_set_column_number(statemachine_ctx *ctx,
+static INLINE void statemachine_set_column_number(statemachine_ctx *ctx,
int column) {
ctx->column_number = column;
}
@@ -158,7 +160,7 @@ static inline void statemachine_set_column_number(statemachine_ctx *ctx,
*
* NULL is returned if the parser didn't encounter an error.
*/
-static inline const char *statemachine_get_error_msg(statemachine_ctx *ctx) {
+static INLINE const char *statemachine_get_error_msg(statemachine_ctx *ctx) {
if (ctx->next_state == STATEMACHINE_ERROR) {
return ctx->error_msg;
} else {