Lines Matching refs:tok

983 static int extend_token(char **tok, char *buf, int size)  in extend_token()  argument
985 char *newtok = realloc(*tok, size); in extend_token()
988 free(*tok); in extend_token()
989 *tok = NULL; in extend_token()
993 if (!*tok) in extend_token()
997 *tok = newtok; in extend_token()
1002 static enum tep_event_type force_token(const char *str, char **tok);
1004 static enum tep_event_type __read_token(char **tok) in __read_token() argument
1012 *tok = NULL; in __read_token()
1028 if (asprintf(tok, "%c", ch) < 0) in __read_token()
1067 *tok = strdup(buf); in __read_token()
1088 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1130 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1140 if (extend_token(tok, buf, tok_size + i + 1) < 0) in __read_token()
1152 if (strcmp(*tok, "LOCAL_PR_FMT") == 0) { in __read_token()
1153 free(*tok); in __read_token()
1154 *tok = NULL; in __read_token()
1155 return force_token("\"%s\" ", tok); in __read_token()
1156 } else if (strcmp(*tok, "STA_PR_FMT") == 0) { in __read_token()
1157 free(*tok); in __read_token()
1158 *tok = NULL; in __read_token()
1159 return force_token("\" sta:%pM\" ", tok); in __read_token()
1160 } else if (strcmp(*tok, "VIF_PR_FMT") == 0) { in __read_token()
1161 free(*tok); in __read_token()
1162 *tok = NULL; in __read_token()
1163 return force_token("\" vif:%p(%d)\" ", tok); in __read_token()
1170 static enum tep_event_type force_token(const char *str, char **tok) in force_token() argument
1184 type = __read_token(tok); in force_token()
1194 static void free_token(char *tok) in free_token() argument
1196 if (tok) in free_token()
1197 free(tok); in free_token()
1200 static enum tep_event_type read_token(char **tok) in read_token() argument
1205 type = __read_token(tok); in read_token()
1209 free_token(*tok); in read_token()
1213 *tok = NULL; in read_token()
1226 enum tep_event_type tep_read_token(char **tok) in tep_read_token() argument
1228 return read_token(tok); in tep_read_token()
1241 static enum tep_event_type read_token_item(char **tok) in read_token_item() argument
1246 type = __read_token(tok); in read_token_item()
1249 free_token(*tok); in read_token_item()
1250 *tok = NULL; in read_token_item()
1254 *tok = NULL; in read_token_item()
1285 static int __read_expect_type(enum tep_event_type expect, char **tok, int newline_ok) in __read_expect_type() argument
1290 type = read_token(tok); in __read_expect_type()
1292 type = read_token_item(tok); in __read_expect_type()
1296 static int read_expect_type(enum tep_event_type expect, char **tok) in read_expect_type() argument
1298 return __read_expect_type(expect, tok, 1); in read_expect_type()
1749 char **tok, enum tep_event_type type);
1752 process_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_arg() argument
1758 *tok = token; in process_arg()
1760 return process_arg_token(event, arg, tok, type); in process_arg()
1764 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok);
1771 process_field_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_field_arg() argument
1775 type = process_arg(event, arg, tok); in process_field_arg()
1778 type = process_op(event, arg, tok); in process_field_arg()
1785 process_cond(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_cond() argument
1807 *tok = NULL; in process_cond()
1829 *tok = token; in process_cond()
1841 process_array(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_array() argument
1851 *tok = NULL; in process_array()
1855 *tok = NULL; in process_array()
1864 *tok = token; in process_array()
1943 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_op() argument
1950 token = *tok; in process_op()
1985 *tok = NULL; in process_op()
1986 type = process_arg(event, right, tok); in process_op()
2003 type = process_cond(event, arg, tok); in process_op()
2044 *tok = token; in process_op()
2073 type = process_arg_token(event, right, tok, type); in process_op()
2112 type = process_array(event, arg, tok); in process_op()
2121 if (type == TEP_EVENT_OP && strcmp(*tok, ":") != 0) { in process_op()
2125 prio = get_op_prio(*tok); in process_op()
2128 return process_op(event, arg, tok); in process_op()
2130 return process_op(event, right, tok); in process_op()
2139 *tok = NULL; in process_op()
2145 char **tok) in process_entry() argument
2172 *tok = token; in process_entry()
2179 *tok = NULL; in process_entry()
2518 process_fields(struct tep_event *event, struct tep_print_flag_sym **list, char **tok) in process_fields() argument
2523 char *token = *tok; in process_fields()
2585 *tok = token; in process_fields()
2593 *tok = NULL; in process_fields()
2599 process_flags(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_flags() argument
2640 type = read_token_item(tok); in process_flags()
2647 *tok = NULL; in process_flags()
2652 process_symbols(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_symbols() argument
2679 type = read_token_item(tok); in process_symbols()
2686 *tok = NULL; in process_symbols()
2692 char **tok, enum tep_print_arg_type type) in process_hex_common() argument
2703 return read_token_item(tok); in process_hex_common()
2709 *tok = NULL; in process_hex_common()
2714 process_hex(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_hex() argument
2716 return process_hex_common(event, arg, tok, TEP_PRINT_HEX); in process_hex()
2721 char **tok) in process_hex_str() argument
2723 return process_hex_common(event, arg, tok, TEP_PRINT_HEX_STR); in process_hex_str()
2727 process_int_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_int_array() argument
2741 return read_token_item(tok); in process_int_array()
2750 *tok = NULL; in process_int_array()
2755 process_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_dynamic_array() argument
2769 *tok = token; in process_dynamic_array()
2787 *tok = token; in process_dynamic_array()
2795 *tok = NULL; in process_dynamic_array()
2807 type = read_token_item(tok); in process_dynamic_array()
2814 *tok = NULL; in process_dynamic_array()
2820 char **tok) in process_dynamic_array_len() argument
2843 *tok = token; in process_dynamic_array_len()
2850 *tok = NULL; in process_dynamic_array_len()
2855 process_paren(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_paren() argument
2907 *tok = token; in process_paren()
2912 *tok = NULL; in process_paren()
2919 char **tok) in process_str() argument
2935 *tok = token; in process_str()
2942 *tok = NULL; in process_str()
2948 char **tok) in process_bitmask() argument
2964 *tok = token; in process_bitmask()
2971 *tok = NULL; in process_bitmask()
3009 struct tep_print_arg *arg, char **tok) in process_func_handler() argument
3020 *tok = NULL; in process_func_handler()
3055 *tok = token; in process_func_handler()
3067 char *token, char **tok) in process_function() argument
3074 return process_flags(event, arg, tok); in process_function()
3079 return process_symbols(event, arg, tok); in process_function()
3083 return process_hex(event, arg, tok); in process_function()
3087 return process_hex_str(event, arg, tok); in process_function()
3091 return process_int_array(event, arg, tok); in process_function()
3095 return process_str(event, arg, tok); in process_function()
3099 return process_bitmask(event, arg, tok); in process_function()
3103 return process_dynamic_array(event, arg, tok); in process_function()
3107 return process_dynamic_array_len(event, arg, tok); in process_function()
3113 return process_func_handler(event, func, arg, tok); in process_function()
3123 char **tok, enum tep_event_type type) in process_arg_token() argument
3128 token = *tok; in process_arg_token()
3159 *tok = NULL; in process_arg_token()
3205 *tok = token; in process_arg_token()