30 #ifndef CLIENT_LINUX_MINIDUMP_WRITER_PROC_CPUINFO_READER_H_ 31 #define CLIENT_LINUX_MINIDUMP_WRITER_PROC_CPUINFO_READER_H_ 48 : line_reader_(fd), pop_count_(-1) {
60 if (pop_count_ >= 0) {
61 line_reader_.
PopLine(pop_count_);
68 pop_count_ =
static_cast<int>(line_len);
70 const char* line_end = line + line_len;
77 char* sep =
static_cast<char*
>(
my_memchr(line,
':', line_len));
83 const char* val = sep+1;
88 value_len_ =
static_cast<size_t>(line_end - val);
117 *length = value_len_;
130 #endif // CLIENT_LINUX_MINIDUMP_WRITER_PROC_CPUINFO_READER_H_ bool GetNextLine(const char **line, unsigned *len)
void PopLine(unsigned len)
bool GetNextField(const char **field)
ProcCpuInfoReader(int fd)
void * my_memchr(const void *src, int c, size_t len)
const char * GetValueAndLen(size_t *length)