Lines Matching refs:token_start
98 static inline bool is_zero_number(const char* token_start, const char* token_end) { in is_zero_number() argument
99 for (const char* char_ptr = token_start; char_ptr != token_end; char_ptr++) { in is_zero_number()
107 static inline bool is_space(const char* token_start, const char* token_end) { in is_space() argument
108 for (const char* char_ptr = token_start; char_ptr != token_end; char_ptr++) { in is_space()
116 static inline bool is_number(const char* token_start, const char* token_end) { in is_number() argument
117 for (const char* char_ptr = token_start; char_ptr != token_end; char_ptr++) { in is_number()
125 static inline bool is_model_number(const char* token_start, const char* token_end) { in is_model_number() argument
126 for (const char* char_ptr = token_start + 1; char_ptr < token_end; char_ptr++) { in is_model_number()
134 static inline bool is_frequency(const char* token_start, const char* token_end) { in is_frequency() argument
135 const size_t token_length = (size_t) (token_end - token_start); in is_frequency()
150 static inline char* move_token(const char* token_start, const char* token_end, char* output_ptr) { in move_token() argument
151 const size_t token_length = (size_t) (token_end - token_start); in move_token()
152 memmove(output_ptr, token_start, token_length); in move_token()
156 static bool transform_token(char* token_start, char* token_end, struct parser_state* state) { in transform_token() argument
160 size_t token_length = (size_t) (token_end - token_start); in transform_token()
163 if (token_start > state->frequency_separator) { in transform_token()
165 memset(token_start, ' ', token_length); in transform_token()
191 if (erase_matching(token_start, 4, "AMD-")) { in transform_token()
192 token_start += 4; in transform_token()
205 if (is_upper_letter(token_start[0])) { in transform_token()
206 state->context_upper_letter = token_start; in transform_token()
212 if (erase_matching(token_start, token_length, "w/")) { in transform_token()
221 if (token_start[0] == 'V' && is_digit(token_start[1])) { in transform_token()
222 token_start[0] = 'v'; in transform_token()
233 if (erase_matching(token_start, token_length, "CPU")) { in transform_token()
240 if (erase_matching(token_start, token_length, "SOC")) { in transform_token()
249 if (erase_matching(token_start, token_length, "AMD")) { in transform_token()
258 if (erase_matching(token_start, token_length, "VIA")) { in transform_token()
262 if (erase_matching(token_start, token_length, "IDT")) { in transform_token()
269 if (erase_matching(token_start, token_length, "MMX")) { in transform_token()
278 if (erase_matching(token_start, token_length, "APU")) { in transform_token()
285 if (memcmp(token_start, "Eng", token_length) == 0) { in transform_token()
286 state->context_engineering = token_start; in transform_token()
291 if (memcmp(token_start, "Dual", token_length) == 0) { in transform_token()
292 state->context_dual = token_start; in transform_token()
295 if (memcmp(token_start, "Xeon", token_length) == 0) { in transform_token()
300 if (memcmp(token_start, "Core", token_length) == 0) { in transform_token()
314 if (erase_matching(token_start, token_length, "Intel")) { in transform_token()
321 if (erase_matching(token_start, token_length, "Cyrix")) { in transform_token()
329 if (memcmp(token_start, "Geode", token_length) == 0) { in transform_token()
333 if (memcmp(token_start, "model", token_length) == 0) { in transform_token()
334 state->context_model = token_start; in transform_token()
346 …if (erase_matching(token_start, token_length, "Radeon") || erase_matching(token_start, token_lengt… in transform_token()
354 if (erase_matching(token_start, token_length, "Mobile")) { in transform_token()
359 if (erase_matching(token_start, token_length, "family")) { in transform_token()
364 if (memcmp(token_start, "Sample", token_length) == 0) { in transform_token()
377 if (erase_matching(token_start, token_length, "Genuine")) { in transform_token()
384 if (erase_matching(token_start, token_length, "12-Core")) { in transform_token()
391 if (erase_matching(token_start, token_length, "16-Core")) { in transform_token()
396 if (memcmp(token_start, "unknown", token_length) == 0) { in transform_token()
407 …if (memcmp(token_start, "Sample,", token_length) == 0 || memcmp(token_start, "Sample:", token_leng… in transform_token()
415 if (erase_matching(token_start, token_length, "QuadCore")) { in transform_token()
420 if (erase_matching(token_start, token_length, "Six-Core")) { in transform_token()
426 if (erase_matching(token_start, token_length, "Processor")) { in transform_token()
429 if (erase_matching(token_start, token_length, "processor")) { in transform_token()
433 if (erase_matching(token_start, token_length, "Dual-Core")) { in transform_token()
441 if (erase_matching(token_start, token_length, "Quad-Core")) { in transform_token()
449 if (erase_matching(token_start, token_length, "Transmeta")) { in transform_token()
458 if (erase_matching(token_start, token_length, "Eight-Core")) { in transform_token()
469 if (erase_matching(token_start, token_length, "Triple-Core")) { in transform_token()
477 if (memcmp(token_start, "Engineering", token_length) == 0) { in transform_token()
478 state->context_engineering = token_start; in transform_token()
483 if (is_zero_number(token_start, token_end)) { in transform_token()
484 memset(token_start, ' ', token_length); in transform_token()
501 if (is_number(token_start, token_end)) { in transform_token()
507 move_token(token_start, token_end, token_start - 1); in transform_token()
508 token_start -= 1; in transform_token()
518 if (is_model_number(token_start, token_end)) { in transform_token()
522 if (is_frequency(token_start, token_end)) { in transform_token()
584 char* token_start; in cpuinfo_x86_normalize_brand_string() local
589 if (!transform_token(token_start, char_ptr, &parser_state)) { in cpuinfo_x86_normalize_brand_string()
597 token_start = char_ptr; in cpuinfo_x86_normalize_brand_string()
602 transform_token(token_start, name_end, &parser_state); in cpuinfo_x86_normalize_brand_string()
622 char* token_start; in cpuinfo_x86_normalize_brand_string() local
636 output_ptr = move_token(token_start, char_ptr, output_ptr); in cpuinfo_x86_normalize_brand_string()
643 token_start = char_ptr; in cpuinfo_x86_normalize_brand_string()
653 output_ptr = move_token(token_start, name_end, output_ptr); in cpuinfo_x86_normalize_brand_string()