diff options
Diffstat (limited to 'lib/libalpm/graph.h')
-rw-r--r-- | lib/libalpm/graph.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/libalpm/graph.h b/lib/libalpm/graph.h index 22f0aa9d..75cec937 100644 --- a/lib/libalpm/graph.h +++ b/lib/libalpm/graph.h @@ -1,7 +1,7 @@ /* * graph.h - helpful graph structure and setup/teardown methods * - * Copyright (c) 2007-2016 Pacman Development Team <pacman-dev@archlinux.org> + * Copyright (c) 2007-2017 Pacman Development Team <pacman-dev@archlinux.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,13 +23,19 @@ #include "alpm_list.h" +enum __alpm_graph_vertex_state { + ALPM_GRAPH_STATE_UNPROCESSED, + ALPM_GRAPH_STATE_PROCESSING, + ALPM_GRAPH_STATE_PROCESSED +}; + typedef struct __alpm_graph_t { void *data; struct __alpm_graph_t *parent; /* where did we come from? */ alpm_list_t *children; - alpm_list_t *childptr; /* points to a child in children list */ + alpm_list_t *iterator; /* used for DFS without recursion */ off_t weight; /* weight of the node */ - signed char state; /* 0: untouched, -1: entered, other: leaving time */ + enum __alpm_graph_vertex_state state; } alpm_graph_t; alpm_graph_t *_alpm_graph_new(void); |