mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
added function setParseFlags
This commit is contained in:
parent
ec23faa4ae
commit
51b3dc3a66
2 changed files with 38 additions and 2 deletions
|
@ -268,6 +268,25 @@ void psyc_initParseState2 (psycParseState *state, uint8_t flags)
|
|||
state->part = PSYC_PART_CONTENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change parse flags in state
|
||||
*
|
||||
* @param state Pointer to the state struct that should be initialized.
|
||||
* @param flags Flags to be set for the parser, see psycParseFlag.
|
||||
* @see psyc_initParseState
|
||||
* @see psycParseFlag
|
||||
*/
|
||||
static inline
|
||||
void psyc_setParseFlags (psycParseState *state, uint8_t flags)
|
||||
{
|
||||
state->flags = flags;
|
||||
|
||||
if (flags & PSYC_PARSE_START_AT_CONTENT)
|
||||
state->part = PSYC_PART_CONTENT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Sets a new buffer in the parser state struct with data to be parsed.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue