From 501e7bc317eb9329af4596ef070e80a26b9bf92f Mon Sep 17 00:00:00 2001 From: "tg(x)" <*@tg-x.net> Date: Mon, 18 Apr 2011 13:27:48 +0200 Subject: [PATCH] compiles again --- .gitignore | 6 ++++++ include/psyc/parser.h | 8 +++----- src/.gitignore | 3 --- src/parser.c | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 .gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2042c95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.* +*~ +\#* +*.o +*.a +src/tests/testParser diff --git a/include/psyc/parser.h b/include/psyc/parser.h index a419107..c1b9435 100644 --- a/include/psyc/parser.h +++ b/include/psyc/parser.h @@ -16,7 +16,8 @@ enum PSYC_ReturnCodes PSYC_ROUTING, PSYC_ENTITY, PSYC_ENTITY_INCOMPLETE, - PSYC_HEADER_DONE, + PSYC_HEADER_COMPLETE, + PSYC_COMPLETE, }; @@ -90,7 +91,4 @@ inline unsigned int PSYC_getValueRemaining (PSYC_State* s) #endif int PSYC_parse(PSYC_State* state, - uint8_t* modifier, PSYC_Array* name, PSYC_Array* value, - unsigned long* bytesParsed, unsigned long *bytesExpected); - - + uint8_t* modifier, PSYC_Array* name, PSYC_Array* value); diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index b96ae54..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.o -*.a -tests/testParser diff --git a/src/parser.c b/src/parser.c index 4eaa233..ba7c209 100644 --- a/src/parser.c +++ b/src/parser.c @@ -281,12 +281,12 @@ start: if (value->ptr + state->contentLength + 3 > state->buffer.ptr + state->buffer.length) { // no value->length = state->buffer.length - state->cursor; - *expectedBytes = state->contentLength - value->length; + //*expectedBytes = state->contentLength - value->length; } else // yes, the packet is complete in the buffer. { value->length= state->buffer.length - state->cursor -3; - *expectedBytes = 0; + //*expectedBytes = 0; } } else // else search for the terminator