37#include <glib/gi18n.h>
46 int total_unresolved_count = 0;
52 for (cell_iter = lib->
cells; cell_iter != NULL; cell_iter = g_list_next(cell_iter)) {
53 cell = (
struct gds_cell *)cell_iter->data;
57 fprintf(stderr, _(
"Broken cell list item found. Will continue.\n"));
65 for (instance_iter = cell->
child_cells; instance_iter != NULL;
66 instance_iter = g_list_next(instance_iter)) {
71 fprintf(stderr, _(
"Broken cell list item found in cell %s. Will continue.\n"),
78 total_unresolved_count++;
84 return total_unresolved_count;
97 for (iter = list; iter != NULL; iter = g_list_next(iter)) {
98 if ((
struct gds_cell *)iter->data == cell)
126 *visited_cells = g_list_append(*visited_cells, (gpointer)cell_to_check);
129 for (ref_iter = cell_to_check->
child_cells; ref_iter != NULL; ref_iter = g_list_next(ref_iter)) {
145 }
else if (res > 0) {
152 *visited_cells = g_list_remove(*visited_cells, cell_to_check);
164 GList *visited_cells = NULL;
170 for (cell_iter = lib->
cells; cell_iter != NULL; cell_iter = g_list_next(cell_iter)) {
171 cell_to_check = (
struct gds_cell *)cell_iter->data;
188 _(
"Visited cell list should be empty. This is a bug. Please report this.\n"));
189 g_list_free(visited_cells);
190 visited_cells = NULL;
196 }
else if (res > 0) {
200 }
else if (res == 0) {
Checking functions of a cell tree (Header)
static int gds_tree_check_list_contains_cell(GList *list, struct gds_cell *cell)
Check if list contains a cell.
int gds_tree_check_reference_loops(struct gds_library *lib)
gds_tree_check_reference_loops checks if the given library contains reference loops
int gds_tree_check_cell_references(struct gds_library *lib)
gds_tree_check_cell_references checks if all child cell references can be resolved in the given libra...
static int gds_tree_check_iterate_ref_and_check(struct gds_cell *cell_to_check, GList **visited_cells)
This function follows down the reference list of a cell and marks each visited subcell and detects lo...
int unresolved_child_count
Number of unresolved cell instances inside this cell. Default: GDS_CELL_CHECK_NOT_RUN.
int affected_by_reference_loop
1 if the cell is affected by a reference loop and therefore not renderable. Default: GDS_CELL_CHECK_N...
This represents an instanc of a cell inside another cell.
struct gds_cell * cell_ref
Referenced gds_cell structure.
A Cell inside a gds_library.
struct gds_cell_checks checks
Checking results.
GList * child_cells
List of gds_cell_instance elements.