IterPos
Description
Pointer to the current read position, or NULL_ITER_DATA(mi) when the iterator is exhausted.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
StrIter.h:285:
/// TAGS: StrIter, Position, Alias
///
#define StrIterPos(mi) IterPos(mi)
///
- In
Io.c:827:
// a short buffer is a soft parse failure (rewind + false),
// not an abort -- this is how magic bytes are checked inline.
if (IterRemainingLength(iter) < 1 || *(const u8 *)IterPos(iter) != (u8)fc) {
*iter = start;
return false;- In
Io.c:839:
char esc = 0;
if (StrIterPeek(&fsi, &esc) && esc == '{') {
if (IterRemainingLength(iter) < 1 || *(const u8 *)IterPos(iter) != (u8)'{') {
*iter = start;
return false;- In
Io.c:883:
// Read the raw bytes into a u64 with the spec's endianness.
Zstr in = (Zstr)IterPos(iter);
u64 x = 0;
Zstr next = NULL;- In
Iter.c:377:
const u8 buf[2] = {40, 50};
BufIter it = BufIterFromMemory(buf, 2);
if (IterPos(&it) != &buf[0] || *IterPos(&it) != 40) {
return false;
}- In
Iter.c:381:
}
IterMove(&it, 2); // exhaust
return IterPos(&it) == NULL_ITER_DATA(&it);
}
Last updated on