Lines Matching defs:cursor
52 // Returns the character at |cursor| and increments it, unless the end is here
54 int NextChar(const uint8** cursor, const uint8* end) {
56 if (*cursor + sizeof(base::char16) > end)
59 int result = **cursor | (*(*cursor + 1) << 8);
60 *cursor += sizeof(base::char16);
65 bool ReadFieldBinary(const uint8** cursor,
72 const uint8* field_end = *cursor + size;
73 if (field_end <= *cursor || field_end > end)
75 std::copy(*cursor, field_end, data);
76 *cursor = field_end;
80 bool ReadField32(const uint8** cursor, const uint8* end, uint32* data) {
82 if (!ReadFieldBinary(cursor, end, sizeof(uint32),
91 bool ReadFieldString(const uint8** cursor,
95 while ((current = NextChar(cursor, end)) > 0x0000)
247 const uint8* cursor = mapped_file.data() + kHeaderSize;
250 if (cursor == end)
253 if (NextChar(&cursor, end) != kDelimBracketOpen)
263 if (!ReadFieldString(&cursor, end, &key_name))
266 int current = NextChar(&cursor, end);
268 if (!ReadFieldString(&cursor, end, &value))
270 current = NextChar(&cursor, end);
274 if (!ReadField32(&cursor, end, &type))
276 current = NextChar(&cursor, end);
280 if (!ReadField32(&cursor, end, &size))
282 current = NextChar(&cursor, end);
289 if (!ReadFieldBinary(&cursor, end, size, vector_as_array(&data)))
291 current = NextChar(&cursor, end);
303 << reinterpret_cast<const uint8*>(cursor - 1) - mapped_file.data();