Lines Matching refs:tok

972 static int extend_token(char **tok, char *buf, int size)  in extend_token()  argument
974 char *newtok = realloc(*tok, size); in extend_token()
977 free(*tok); in extend_token()
978 *tok = NULL; in extend_token()
982 if (!*tok) in extend_token()
986 *tok = newtok; in extend_token()
991 static enum tep_event_type force_token(const char *str, char **tok);
993 static enum tep_event_type __read_token(char **tok) in __read_token() argument
1001 *tok = NULL; in __read_token()
1017 if (asprintf(tok, "%c", ch) < 0) in __read_token()
1056 *tok = strdup(buf); in __read_token()
1077 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1119 if (extend_token(tok, buf, tok_size) < 0) in __read_token()
1129 if (extend_token(tok, buf, tok_size + i + 1) < 0) in __read_token()
1141 if (strcmp(*tok, "LOCAL_PR_FMT") == 0) { in __read_token()
1142 free(*tok); in __read_token()
1143 *tok = NULL; in __read_token()
1144 return force_token("\"%s\" ", tok); in __read_token()
1145 } else if (strcmp(*tok, "STA_PR_FMT") == 0) { in __read_token()
1146 free(*tok); in __read_token()
1147 *tok = NULL; in __read_token()
1148 return force_token("\" sta:%pM\" ", tok); in __read_token()
1149 } else if (strcmp(*tok, "VIF_PR_FMT") == 0) { in __read_token()
1150 free(*tok); in __read_token()
1151 *tok = NULL; in __read_token()
1152 return force_token("\" vif:%p(%d)\" ", tok); in __read_token()
1159 static enum tep_event_type force_token(const char *str, char **tok) in force_token() argument
1173 type = __read_token(tok); in force_token()
1187 __hidden void free_token(char *tok) in free_token() argument
1189 if (tok) in free_token()
1190 free(tok); in free_token()
1202 __hidden enum tep_event_type read_token(char **tok) in read_token() argument
1207 type = __read_token(tok); in read_token()
1211 free_token(*tok); in read_token()
1215 *tok = NULL; in read_token()
1220 static enum tep_event_type read_token_item(char **tok) in read_token_item() argument
1225 type = __read_token(tok); in read_token_item()
1228 free_token(*tok); in read_token_item()
1229 *tok = NULL; in read_token_item()
1233 *tok = NULL; in read_token_item()
1264 static int __read_expect_type(enum tep_event_type expect, char **tok, int newline_ok) in __read_expect_type() argument
1269 type = read_token(tok); in __read_expect_type()
1271 type = read_token_item(tok); in __read_expect_type()
1275 static int read_expect_type(enum tep_event_type expect, char **tok) in read_expect_type() argument
1277 return __read_expect_type(expect, tok, 1); in read_expect_type()
1763 char **tok, enum tep_event_type type);
1766 process_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_arg() argument
1772 *tok = token; in process_arg()
1774 return process_arg_token(event, arg, tok, type); in process_arg()
1778 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok);
1785 process_field_arg(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_field_arg() argument
1789 type = process_arg(event, arg, tok); in process_field_arg()
1792 type = process_op(event, arg, tok); in process_field_arg()
1799 process_cond(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_cond() argument
1821 *tok = NULL; in process_cond()
1843 *tok = token; in process_cond()
1855 process_array(struct tep_event *event, struct tep_print_arg *top, char **tok) in process_array() argument
1865 *tok = NULL; in process_array()
1869 *tok = NULL; in process_array()
1878 *tok = token; in process_array()
1957 process_op(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_op() argument
1964 token = *tok; in process_op()
1999 *tok = NULL; in process_op()
2000 type = process_arg(event, right, tok); in process_op()
2017 type = process_cond(event, arg, tok); in process_op()
2058 *tok = token; in process_op()
2084 type = process_arg_token(event, right, tok, type); in process_op()
2123 type = process_array(event, arg, tok); in process_op()
2132 if (type == TEP_EVENT_OP && strcmp(*tok, ":") != 0) { in process_op()
2136 prio = get_op_prio(*tok); in process_op()
2139 return process_op(event, arg, tok); in process_op()
2141 return process_op(event, right, tok); in process_op()
2150 *tok = NULL; in process_op()
2156 char **tok) in process_entry() argument
2183 *tok = token; in process_entry()
2190 *tok = NULL; in process_entry()
2529 process_fields(struct tep_event *event, struct tep_print_flag_sym **list, char **tok) in process_fields() argument
2534 char *token = *tok; in process_fields()
2596 *tok = token; in process_fields()
2604 *tok = NULL; in process_fields()
2610 process_flags(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_flags() argument
2651 type = read_token_item(tok); in process_flags()
2658 *tok = NULL; in process_flags()
2663 process_symbols(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_symbols() argument
2690 type = read_token_item(tok); in process_symbols()
2697 *tok = NULL; in process_symbols()
2703 char **tok, enum tep_print_arg_type type) in process_hex_common() argument
2714 return read_token_item(tok); in process_hex_common()
2720 *tok = NULL; in process_hex_common()
2725 process_hex(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_hex() argument
2727 return process_hex_common(event, arg, tok, TEP_PRINT_HEX); in process_hex()
2732 char **tok) in process_hex_str() argument
2734 return process_hex_common(event, arg, tok, TEP_PRINT_HEX_STR); in process_hex_str()
2738 process_int_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_int_array() argument
2752 return read_token_item(tok); in process_int_array()
2761 *tok = NULL; in process_int_array()
2766 process_dynamic_array(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_dynamic_array() argument
2780 *tok = token; in process_dynamic_array()
2798 *tok = token; in process_dynamic_array()
2806 *tok = NULL; in process_dynamic_array()
2818 type = read_token_item(tok); in process_dynamic_array()
2825 *tok = NULL; in process_dynamic_array()
2831 char **tok) in process_dynamic_array_len() argument
2855 *tok = token; in process_dynamic_array_len()
2862 *tok = NULL; in process_dynamic_array_len()
2867 process_paren(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_paren() argument
2919 *tok = token; in process_paren()
2924 *tok = NULL; in process_paren()
2931 char **tok) in process_str() argument
2947 *tok = token; in process_str()
2954 *tok = NULL; in process_str()
2960 char **tok) in process_bitmask() argument
2976 *tok = token; in process_bitmask()
2983 *tok = NULL; in process_bitmask()
3021 struct tep_print_arg *arg, char **tok) in process_func_handler() argument
3032 *tok = NULL; in process_func_handler()
3067 *tok = token; in process_func_handler()
3078 process_builtin_expect(struct tep_event *event, struct tep_print_arg *arg, char **tok) in process_builtin_expect() argument
3099 type = read_token_item(tok); in process_builtin_expect()
3104 *tok = NULL; in process_builtin_expect()
3110 char *token, char **tok) in process_function() argument
3117 return process_flags(event, arg, tok); in process_function()
3122 return process_symbols(event, arg, tok); in process_function()
3126 return process_hex(event, arg, tok); in process_function()
3130 return process_hex_str(event, arg, tok); in process_function()
3134 return process_int_array(event, arg, tok); in process_function()
3139 return process_str(event, arg, tok); in process_function()
3144 return process_bitmask(event, arg, tok); in process_function()
3149 return process_dynamic_array(event, arg, tok); in process_function()
3154 return process_dynamic_array_len(event, arg, tok); in process_function()
3158 return process_builtin_expect(event, arg, tok); in process_function()
3164 return process_func_handler(event, func, arg, tok); in process_function()
3174 char **tok, enum tep_event_type type) in process_arg_token() argument
3179 token = *tok; in process_arg_token()
3210 *tok = NULL; in process_arg_token()
3253 *tok = token; in process_arg_token()