1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

compiles again

This commit is contained in:
tg(x) 2011-04-18 13:27:48 +02:00
parent 9db7dceee2
commit 501e7bc317
4 changed files with 11 additions and 10 deletions

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
.*
*~
\#*
*.o
*.a
src/tests/testParser

View file

@ -16,7 +16,8 @@ enum PSYC_ReturnCodes
PSYC_ROUTING, PSYC_ROUTING,
PSYC_ENTITY, PSYC_ENTITY,
PSYC_ENTITY_INCOMPLETE, PSYC_ENTITY_INCOMPLETE,
PSYC_HEADER_DONE, PSYC_HEADER_COMPLETE,
PSYC_COMPLETE,
}; };
@ -90,7 +91,4 @@ inline unsigned int PSYC_getValueRemaining (PSYC_State* s)
#endif #endif
int PSYC_parse(PSYC_State* state, int PSYC_parse(PSYC_State* state,
uint8_t* modifier, PSYC_Array* name, PSYC_Array* value, uint8_t* modifier, PSYC_Array* name, PSYC_Array* value);
unsigned long* bytesParsed, unsigned long *bytesExpected);

3
src/.gitignore vendored
View file

@ -1,3 +0,0 @@
*.o
*.a
tests/testParser

View file

@ -281,12 +281,12 @@ start:
if (value->ptr + state->contentLength + 3 > state->buffer.ptr + state->buffer.length) if (value->ptr + state->contentLength + 3 > state->buffer.ptr + state->buffer.length)
{ // no { // no
value->length = state->buffer.length - state->cursor; 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. else // yes, the packet is complete in the buffer.
{ {
value->length= state->buffer.length - state->cursor -3; value->length= state->buffer.length - state->cursor -3;
*expectedBytes = 0; //*expectedBytes = 0;
} }
} }
else // else search for the terminator else // else search for the terminator