APG
… an ABNF Parser Generator
|
A 32-bit integer version of the lines objects. More...
Go to the source code of this file.
Data Structures | |
struct | lines_u |
The lines object context. More... | |
Macros | |
Unicode Line Ending Characters | |
Macro definitions of the set of Unicode line ending characters. In addition to the below characters, the combined pair, | |
#define | LF 0x0A |
Line Feed. More... | |
#define | VT 0x0B |
Vertical Tab. More... | |
#define | FF 0x0C |
Form Feed. More... | |
#define | CR 0x0D |
Carriage Return. More... | |
#define | NEL 0x85 |
Next Line. More... | |
#define | LS 0x2028 |
Line Separator. More... | |
#define | PS 0x2029 |
Paragraph Separator. More... | |
Functions | |
void * | vpLinesuCtor (exception *spEx, const uint32_t *uipInput, aint uiLength) |
The linesu object constructor. More... | |
void | vLinesuDtor (void *vpCtx) |
The linesu object destructor. More... | |
abool | bLinesuFindLine (void *vpCtx, aint uiOffset, aint *uipLine, aint *uipRelOffset) |
Find the line that the given integer is in. More... | |
line_u * | spLinesuFirst (void *vpCtx) |
Initialize an iterator over the lines. More... | |
line_u * | spLinesuNext (void *vpCtx) |
Returns the next line from the iterator. More... | |
aint | uiLinesuCount (void *vpCtx) |
Returns the number of lines. More... | |
aint | uiLinesuLength (void *vpCtx) |
Returns the number of integers in the 32-bit integer array. More... | |
A 32-bit integer version of the lines objects.
This object works similarly to the `lines` object except that the data is 32-bit words rather that 8-bit ASCII characters. Line breaks are made on the Unicode line ending characters.
Other than the line breaks, the data is considered raw 32-bit data. It is given no other Unicode considerations.
Definition in file linesu.c.
Find the line that the given integer is in.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
uiOffset | The zero-based offset of the integer to find. |
uipLine | Pointer to an integer, set to the found line number on return. |
uipRelOffset | Pointer to an integer, set to the relative offset of the integer in the found line. |
line_u* spLinesuFirst | ( | void * | vpCtx | ) |
Initialize an iterator over the lines.
Sets up the iterator and returns the first line.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
line_u* spLinesuNext | ( | void * | vpCtx | ) |
Returns the next line from the iterator.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
aint uiLinesuCount | ( | void * | vpCtx | ) |
Returns the number of lines.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
aint uiLinesuLength | ( | void * | vpCtx | ) |
Returns the number of integers in the 32-bit integer array.
Count includes the line ending integers.
vpCtx | Pointer to a valid linesu context, previously returned from vpLinesuCtor() If not valid the application will silently exit with a BAD_CONTEXT exit code. |
void vLinesuDtor | ( | void * | vpCtx | ) |
The linesu
object destructor.
Releases all allocated memory and clears the context to prevent accidental reuse.
vpCtx | A pointer to a valid lines context previously return from vpLinesuCtor(). Silently ignored if NULL. However, if non-NULL it must be a valid lines context pointer. The application will silently exit with BAD_CONTEXT exit code if vpCtx is invalid. |
The linesu
object constructor.
Reads the 32-bint integer input and separates it into individual lines, generating a list of line_u structures, one for each line.
spEx | Pointer to a valid exception structure initialized with XCTOR(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
uipInput | Pointer to the array of integers |
uiLength | - the number of integers in the array |