18 const char *s =
entry;
19 struct rb_node *rc = NULL;
20 struct strlist *
strlist = container_of(rblist,
struct strlist, rblist);
50 struct strlist *slist = container_of(rblist,
struct strlist, rblist);
61 return strcmp(snode->
s, str);
73 FILE *fp = fopen(filename,
"r");
78 while (fgets(entry,
sizeof(entry), fp) != NULL) {
79 const size_t len = strlen(entry);
83 entry[len - 1] =
'\0';
107 snode = container_of(rb_node,
struct str_node, rb_node);
113 const char *subst_dir)
118 if (strncmp(s,
"file://", 7) == 0)
123 if (asprintf(&subst,
"%s/%s", subst_dir, s) < 0)
126 if (access(subst, F_OK) == 0) {
148 while ((sep = strchr(s,
',')) != NULL) {
167 const char *dirname = NULL;
202 struct rb_node *rb_node;
206 snode = container_of(rb_node,
struct str_node, rb_node);
int strlist__add(struct strlist *slist, const char *new_entry)
void rblist__delete(struct rblist *rblist)
static void str_node__delete(struct str_node *snode, bool dupstr)
int(* node_cmp)(struct rb_node *rbn, const void *entry)
static int strlist__node_cmp(struct rb_node *rb_node, const void *entry)
int strlist__load(struct strlist *slist, const char *filename)
static int strlist__parse_list_entry(struct strlist *slist, const char *s, const char *subst_dir)
void(* node_delete)(struct rblist *rblist, struct rb_node *rb_node)
struct str_node * strlist__find(struct strlist *slist, const char *entry)
struct rb_node * rblist__find(struct rblist *rblist, const void *entry)
struct rb_node * rblist__entry(const struct rblist *rblist, unsigned int idx)
static int entry(u64 ip, struct unwind_info *ui)
struct str_node * strlist__entry(const struct strlist *slist, unsigned int idx)
static int str(yyscan_t scanner, int token)
static int strlist__parse_list(struct strlist *slist, const char *s, const char *subst_dir)
static struct rb_node * strlist__node_new(struct rblist *rblist, const void *entry)
struct rb_node *(* node_new)(struct rblist *rlist, const void *new_entry)
void rblist__init(struct rblist *rblist)
int rblist__add_node(struct rblist *rblist, const void *new_entry)
void strlist__remove(struct strlist *slist, struct str_node *snode)
void strlist__delete(struct strlist *slist)
static void strlist__node_delete(struct rblist *rblist, struct rb_node *rb_node)
void rblist__remove_node(struct rblist *rblist, struct rb_node *rb_node)
struct strlist * strlist__new(const char *list, const struct strlist_config *config)