From d69d4f3f7eb19f2ef6c6272b6627ca92bfe80ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 17 Nov 2019 14:44:21 +0100 Subject: [PATCH] plugins: python-renderer: Add gds-render-module --- .../python-renderer/gds-render-module.h | 38 +++++++++++++++++++ .../python-renderer/src/gds-render-module.c | 26 +++++++++++++ plugins/python-renderer/src/plugin-main.c | 8 ++++ 3 files changed, 72 insertions(+) create mode 100644 plugins/python-renderer/include/python-renderer/gds-render-module.h create mode 100644 plugins/python-renderer/src/gds-render-module.c diff --git a/plugins/python-renderer/include/python-renderer/gds-render-module.h b/plugins/python-renderer/include/python-renderer/gds-render-module.h new file mode 100644 index 0000000..efd8707 --- /dev/null +++ b/plugins/python-renderer/include/python-renderer/gds-render-module.h @@ -0,0 +1,38 @@ +/* + * GDSII-Converter Python Plugin + * Copyright (C) 2019 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 . + */ + +/** + * @file gds-render-module.h + * @brief Header file for the gds-render python module implementation + * @author Mario Hüttel + */ + +#ifndef __GDS_RENDER_MODULE_H__ +#define __GDS_RENDER_MODULE_H__ + +/** + * @addtogroup python-renderer + * @{ + */ + + + +/** @} */ + +#endif /* __GDS_RENDER_MODULE_H__ */ diff --git a/plugins/python-renderer/src/gds-render-module.c b/plugins/python-renderer/src/gds-render-module.c new file mode 100644 index 0000000..4749bc4 --- /dev/null +++ b/plugins/python-renderer/src/gds-render-module.c @@ -0,0 +1,26 @@ +/* + * GDSII-Converter Python Plugin + * Copyright (C) 2019 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 . + */ + +/** + * @file gds-render-module.c + * @brief Gds-render python module implementation + * @author Mario Hüttel + */ + +#include diff --git a/plugins/python-renderer/src/plugin-main.c b/plugins/python-renderer/src/plugin-main.c index 6c96604..5dc7bf1 100644 --- a/plugins/python-renderer/src/plugin-main.c +++ b/plugins/python-renderer/src/plugin-main.c @@ -17,6 +17,11 @@ * along with GDSII-Converter. If not, see . */ +/** + * @file python-renderer/plugin-main.c + * @author Mario + */ + /** * @defgroup python-plugin Python Plugin for External Renderer * @ingroup plugins @@ -33,6 +38,8 @@ #include #include +#include + /** * @brief Global variable for loaded module. This is not very nice. * @warning This has to be changed, if this api wants to be re-entrant. @@ -90,6 +97,7 @@ int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *ve Py_Initialize(); if (!getcwd(cwd, sizeof(cwd))) { + fprintf(stderr, "Error getting current working directory. Maybe the path is too long?\n"); return -2; }