Lines Matching refs:buf
433 #define __check_comment(buf) (((buf)[0] == '/') && ((buf)[1] == '/'))
474 static int get_input_format(char *buf, struct ps_entry_type *format)
483 if (strstr(buf, "[") != buf)
486 ptr = strstr(buf, "]");
490 if (get_ps_type(buf, ptr - buf, &type, &sub_type) < 0)
512 static unsigned int read_data_in_section(char *buf, struct ps_entry_type type)
514 char *ptr = buf;
516 if (!buf)
519 if (buf == strstr(buf, "[")) {
520 ptr = strstr(buf, "]");
538 char buf[3];
540 buf[2] = '\0';
542 strlcpy(buf, &ptr[info->char_cnt],sizeof(buf));
543 tag->data[info->byte_count] = strtol(buf, NULL, 16);
547 strlcpy(buf, &ptr[info->char_cnt], sizeof(buf));
548 tag->data[info->byte_count] = strtol(buf, NULL, 16);
553 static inline int update_char_count(const char *buf)
557 if (strstr(buf, "[") == buf) {
558 end_ptr = strstr(buf, "]");
562 return(end_ptr - buf) + 1;
573 char buf[LINE_SIZE_MAX + 1];
584 ptr = fgets(buf, LINE_SIZE_MAX, stream);