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-22 20:33:22 +02:00
parent d278cbb0b7
commit 35342caced
7 changed files with 66 additions and 50 deletions

View file

@ -120,11 +120,14 @@ typedef struct
*
* @return An instance of the PSYC_Array struct.
*/
inline PSYC_Array PSYC_createArray (const char* memory, size_t length)
{
PSYC_Array arr = {length, memory};
return arr;
}
inline PSYC_Array PSYC_createArray (const char* memory, size_t length);
/**
* Initiates the state struct.
*
* @param state Pointer to the state struct that should be initiated.
*/
inline void PSYC_initParseState (PSYC_ParseState* state);
/**
* Initiates the state struct with flags.
@ -132,48 +135,20 @@ inline PSYC_Array PSYC_createArray (const char* memory, size_t length)
* @param state Pointer to the state struct that should be initiated.
* @param flags Flags to be set for the parser, see PSYC_ParseFlag.
*/
inline void PSYC_initParseState2 (PSYC_ParseState* state, uint8_t flags)
{
memset(state, 0, sizeof(PSYC_ParseState));
state->flags = flags;
}
/**
* Initiates the state struct.
*
* @param state Pointer to the state struct that should be initiated.
*/
inline void PSYC_initParseState (PSYC_ParseState* state)
{
memset(state, 0, sizeof(PSYC_ParseState));
}
inline void PSYC_initParseState2 (PSYC_ParseState* state, uint8_t flags);
/**
* Initiates the list state struct.
*
* @param state Pointer to the list state struct that should be initiated.
*/
inline void PSYC_initParseListState (PSYC_ParseListState* state)
{
memset(state, 0, sizeof(PSYC_ParseListState));
}
inline void PSYC_initParseListState (PSYC_ParseListState* state);
inline void PSYC_nextParseBuffer (PSYC_ParseState* state, PSYC_Array newBuf)
{
state->buffer = newBuf;
state->cursor = 0;
}
inline void PSYC_nextParseBuffer (PSYC_ParseState* state, PSYC_Array newBuf);
inline void PSYC_nextParseListBuffer (PSYC_ParseListState* state, PSYC_Array newBuf)
{
state->buffer = newBuf;
state->cursor = 0;
}
inline void PSYC_nextParseListBuffer (PSYC_ParseListState* state, PSYC_Array newBuf);
inline size_t PSYC_getContentLength (PSYC_ParseState* s)
{
return s->contentLength;
}
inline size_t PSYC_getContentLength (PSYC_ParseState* s);
/**
* Parse PSYC packets.

View file

@ -42,10 +42,7 @@ typedef struct
*
* @param state Pointer to the state struct that should be initiated.
*/
inline void PSYC_initRenderState (PSYC_RenderState* state)
{
memset(state, 0, sizeof(PSYC_RenderState));
}
inline void PSYC_initRenderState (PSYC_RenderState* state);
int PSYC_renderVar(PSYC_RenderState* render,
const char* name, size_t nlength,