aboutsummaryrefslogtreecommitdiff
path: root/src/linked-list.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-11-12 14:09:49 +0200
committerSergey Poznyakoff <gray@gnu.org>2016-11-14 23:34:33 +0200
commit614eabb225a9f62d1dbfe50fe44e7b9db9c0467d (patch)
treeed0ae264afb6e4dc4b7bc3f3f908281ebd50f220 /src/linked-list.c
parentb92047ed10c4da784c296dfcf09da250b7b637c7 (diff)
downloadcflow-614eabb225a9f62d1dbfe50fe44e7b9db9c0467d.tar.gz
cflow-614eabb225a9f62d1dbfe50fe44e7b9db9c0467d.tar.bz2
Include static symbols as root points in inverted graphs.
* src/cflow.h (linked_list_size): New function. * src/linked-list.c (linked_list_size): New function. * src/symbol.c (collect_symbols): Include static symbols, if allowed by sel. * src/main.c (parse_opt): Exclude static symbols for --xref
Diffstat (limited to 'src/linked-list.c')
-rw-r--r--src/linked-list.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/linked-list.c b/src/linked-list.c
index 095b63e..3c57bf0 100644
--- a/src/linked-list.c
+++ b/src/linked-list.c
@@ -17,7 +17,7 @@
17#include <cflow.h> 17#include <cflow.h>
18 18
19static struct linked_list * 19static struct linked_list *
20deref_linked_list (struct linked_list **plist) 20deref_linked_list(struct linked_list **plist)
21{ 21{
22 if (!*plist) { 22 if (!*plist) {
23 struct linked_list *list = xmalloc(sizeof(*list)); 23 struct linked_list *list = xmalloc(sizeof(*list));
@@ -144,3 +144,16 @@ data_in_list(void *data, struct linked_list *list)
144 return 1; 144 return 1;
145 return 0; 145 return 0;
146} 146}
147
148size_t
149linked_list_size(struct linked_list *list)
150{
151 size_t size = 0;
152 if (list) {
153 struct linked_list_entry *p;
154 for (p = linked_list_head(list); p; p = p->next)
155 size++;
156 }
157 return size;
158}
159

Return to:

Send suggestions and report system problems to the System administrator.