From 0b17c25ecc4f089449dfdfb4919eeb5b47d779fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 5 Mar 2019 20:08:10 +0100 Subject: [PATCH] Add defualt value for check results --- gds-parser/gds-parser.c | 2 ++ gds-parser/gds-types.h | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gds-parser/gds-parser.c b/gds-parser/gds-parser.c index 8fe475c..1cba95f 100644 --- a/gds-parser/gds-parser.c +++ b/gds-parser/gds-parser.c @@ -299,6 +299,8 @@ static GList *append_cell(GList *curr_list, struct gds_cell **cell_ptr) cell->graphic_objs = NULL; cell->name[0] = 0; cell->parent_library = NULL; + cell->checks.unresolved_child_count = GDS_CELL_CHECK_NOT_RUN; + cell->checks.affected_by_reference_loop = GDS_CELL_CHECK_NOT_RUN; } else return NULL; /* return cell */ diff --git a/gds-parser/gds-types.h b/gds-parser/gds-types.h index 29b0a95..1be507c 100644 --- a/gds-parser/gds-types.h +++ b/gds-parser/gds-types.h @@ -40,6 +40,10 @@ #define MIN(a,b) (((a) < (b)) ? (a) : (b)) /**< @brief Return smaller number */ #define MAX(a,b) (((a) > (b)) ? (a) : (b)) /**< @brief Return bigger number */ +/** @brief Defintion of check counter default value + * that indicates that the corresponding check has not yet been executed */ +enum {GDS_CELL_CHECK_NOT_RUN = -1}; + /** @brief Types of graphic objects */ enum graphics_type { @@ -65,8 +69,8 @@ struct gds_point { * @brief Stores the result of the cell checks. */ struct gds_cell_checks { - int unresolved_child_count; /**< @brief Number of unresolved cell instances inside this cell */ - int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable */ + int unresolved_child_count; /**< @brief Number of unresolved cell instances inside this cell. Default: GDS_CELL_CHECK_NOT_RUN */ + int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable. Default: GDS_CELL_CHECK_NOT_RUN*/ /** * @brief For the internal use of the checker. * @warning Do not use this structure and its contents!