#ifndef __GDSPARSE_H__ #define __GDSPARSE_H__ #include #define CELL_NAME_MAX (100) enum graphics_type {GRAPHIC_PATH = 0, GRAPHIC_POLYGON = 1}; struct gds_time_field { uint16_t year; uint16_t month; uint16_t day; uint16_t hour; uint16_t minute; uint16_t second; }; struct gds_point { int x; int y; }; struct gds_graphics { enum graphics_type type; struct gds_point *vertices; int vertices_count; unsigned int path_width; int width_absolute; uint16_t layer; uint16_t datatype; }; struct gds_cell_instance { char ref_name[CELL_NAME_MAX]; struct gds_cell *cell_ref; struct gds_point origin; int flipped; double angle; double magnification; }; struct gds_cell { char name[CELL_NAME_MAX]; struct gds_time_field mod_time; struct gds_time_field access_time; struct gds_cell_instance *child_cells; int child_cells_count; struct gds_graphics *graphic_objs; int graphic_objs_count; }; struct gds_library { char name[CELL_NAME_MAX]; struct gds_time_field time; double unit_to_meters; struct gds_cell *cells; int cells_count; }; int parse_gds_from_file(const char *filename, struct gds_library **library_array, unsigned int *count); #endif /* __GDSPARSE_H__ */