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

added flag for parsing header only

This commit is contained in:
Marenz 2011-04-17 12:56:24 +02:00
parent e197d7ee1d
commit 69ca100ed0
2 changed files with 23 additions and 6 deletions

View file

@ -1,13 +1,20 @@
#include <stdint.h>
#include <string.h>
enum
enum PSYC_Flags
{
PSYC_HEADER_ONLY = 1
};
enum PSYC_ReturnCodes
{
PSYC_SUCCESS = 0,
PSYC_INSUFFICIENT = 1,
PSYC_ROUTING = 2,
PSYC_ENTITY = 3,
PSYC_COMPLETE = 4,
PSYC_HEADER_COMPLETE = 5,
};
@ -36,6 +43,12 @@ inline PSYC_Array PSYC_CreateArray (uint8_t* const memory, unsigned int length)
return arr;
}
inline void PSYC_initState2 (PSYC_State* state, uint8_t flags )
{
memset(state, 0, sizeof(PSYC_State));
state->flags = flags;
}
inline void PSYC_initState (PSYC_State* state)
{
memset(state, 0, sizeof(PSYC_State));