From a261f61c5c047e2a233a54d2307524bd725cb213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 22 May 2018 16:18:28 +0200 Subject: [PATCH] fix commit --- gds-parser/gds-parser.h | 29 ++++++++++++++++++ gds-parser/gds-types.h | 60 +++++++++++++++++++++++++++++++++++++ latex-output/latex-output.h | 29 ++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 gds-parser/gds-parser.h create mode 100644 gds-parser/gds-types.h create mode 100644 latex-output/latex-output.h diff --git a/gds-parser/gds-parser.h b/gds-parser/gds-parser.h new file mode 100644 index 0000000..f5f571f --- /dev/null +++ b/gds-parser/gds-parser.h @@ -0,0 +1,29 @@ +/* + * GDSII-Converter + * Copyright (C) 2018 Mario Hüttel + * + * This file is part of GDSII-Converter. + * + * GDSII-Converter is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * GDSII-Converter is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GDSII-Converter. If not, see . + */ + +#ifndef __GDSPARSE_H__ +#define __GDSPARSE_H__ + +#include +#include "gds-types.h" + +int parse_gds_from_file(const char *filename, GList **library_array); +int clear_lib_list(GList **library_list); + +#endif /* __GDSPARSE_H__ */ diff --git a/gds-parser/gds-types.h b/gds-parser/gds-types.h new file mode 100644 index 0000000..9bb9753 --- /dev/null +++ b/gds-parser/gds-types.h @@ -0,0 +1,60 @@ +#ifndef __GDS_TYPES_H__ +#define __GDS_TYPES_H__ + +#include +#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; + GList *vertices; + unsigned int path_width; + int width_absolute; + int16_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; + GList *child_cells; + GList *graphic_objs; +}; + +struct gds_library { + char name[CELL_NAME_MAX]; + struct gds_time_field mod_time; + struct gds_time_field access_time; + double unit_to_meters; + GList *cells; + GList *cell_names; +}; + +#endif /* __GDS_TYPES_H__ */ diff --git a/latex-output/latex-output.h b/latex-output/latex-output.h new file mode 100644 index 0000000..ee21171 --- /dev/null +++ b/latex-output/latex-output.h @@ -0,0 +1,29 @@ +/* + * GDSII-Converter + * Copyright (C) 2018 Mario Hüttel + * + * This file is part of GDSII-Converter. + * + * GDSII-Converter is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * GDSII-Converter is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GDSII-Converter. If not, see . + */ + +#ifndef __LATEX_OUTPUT_H__ +#define __LATEX_OUTPUT_H__ + +#include "../gds-parser/gds-types.h" +#include +#include + +void render_cell_to_code(struct gds_cell *cell, GList *layer_infos, FILE *tex_file); + +#endif /* __LATEX_OUTPUT_H__ */