From 89f9a638c60523a59abde619d7461d1970c4a247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Thu, 2 Apr 2020 00:47:43 +0200 Subject: [PATCH 1/5] Add license header to file --- .../external-renderer-interfaces.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/gds-render/output-renderers/external-renderer-interfaces.h b/include/gds-render/output-renderers/external-renderer-interfaces.h index f320c5c..f2b85cd 100644 --- a/include/gds-render/output-renderers/external-renderer-interfaces.h +++ b/include/gds-render/output-renderers/external-renderer-interfaces.h @@ -1,3 +1,22 @@ +/* + * 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 __EXTERNAL_RENDERER_INTERFACES_H__ #define __EXTERNAL_RENDERER_INTERFACES_H__ From 75e01b80c8ed06976516966242f99d0c323e552b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 3 Apr 2020 20:31:31 +0200 Subject: [PATCH 2/5] Issue #36: Fix memory leaks in set-property function of lib-cell-renderer --- cell-selector/lib-cell-renderer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cell-selector/lib-cell-renderer.c b/cell-selector/lib-cell-renderer.c index 0e53f48..e615efd 100644 --- a/cell-selector/lib-cell-renderer.c +++ b/cell-selector/lib-cell-renderer.c @@ -88,11 +88,13 @@ static void lib_cell_renderer_set_property(GObject *object, g_value_init(&val, G_TYPE_STRING); g_value_set_string(&val, ((struct gds_library *)g_value_get_pointer(value))->name); g_object_set_property(object, "text", &val); + g_value_unset(&val); break; case PROP_CELL: g_value_init(&val, G_TYPE_STRING); g_value_set_string(&val, ((struct gds_cell *)g_value_get_pointer(value))->name); g_object_set_property(object, "text", &val); + g_value_unset(&val); break; case PROP_ERROR_LEVEL: /* Set cell color according to error level */ @@ -100,6 +102,7 @@ static void lib_cell_renderer_set_property(GObject *object, convert_error_level_to_color(&color, g_value_get_uint(value)); g_value_set_boxed(&val, &color); g_object_set_property(object, "foreground-rgba", &val); + g_value_unset(&val); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, param_id, pspec); From 00d02b8291a2ac85983e9cee549d5858ea4ac246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Fri, 3 Apr 2020 20:53:32 +0200 Subject: [PATCH 3/5] Issue #36: Fix possible memory leak of async status message, if rendering finishes, before message could be displayed --- output-renderers/gds-output-renderer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/output-renderers/gds-output-renderer.c b/output-renderers/gds-output-renderer.c index 2b296ee..ce7fcb2 100644 --- a/output-renderers/gds-output-renderer.c +++ b/output-renderers/gds-output-renderer.c @@ -100,6 +100,11 @@ static void gds_output_renderer_dispose(GObject *self_obj) if (priv->output_file) g_free(priv->output_file); + if (priv->idle_function_parameters.status_message) { + g_free(priv->idle_function_parameters.status_message); + priv->idle_function_parameters.status_message = NULL; + } + g_clear_object(&priv->layer_settings); /* Chain up to parent class */ From f7d15c7267726659e9dcbf61880483428cfe7674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 7 Apr 2020 15:39:38 +0200 Subject: [PATCH 4/5] Fix comment style from // to /**/ --- include/gds-render/layer/layer-settings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gds-render/layer/layer-settings.h b/include/gds-render/layer/layer-settings.h index 6008e1d..672d961 100644 --- a/include/gds-render/layer/layer-settings.h +++ b/include/gds-render/layer/layer-settings.h @@ -41,7 +41,7 @@ struct layer_info { int layer; /**< @brief Layer number */ char *name; /**< @brief Layer name. */ - int stacked_position; ///< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top + int stacked_position; /**< @brief Position of layer in output @warning This parameter is not used by any renderer so far @note Lower is bottom, higher is top */ GdkRGBA color; /**< @brief RGBA color used to render this layer */ int render; /**< @brief true: Render to output */ }; From 24ae5e4d5bb1d63870e122ceff5a9182085c0ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Thu, 16 Apr 2020 22:43:29 +0200 Subject: [PATCH 5/5] Fix #37: Introduce new versioning scheme for AUR PKGBUILD --- AUR/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AUR/PKGBUILD b/AUR/PKGBUILD index 40ca2ba..63f1169 100644 --- a/AUR/PKGBUILD +++ b/AUR/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Mario Hüttel pkgname=gds-render -pkgver=20191020.403.448de30 +pkgver=v1.2_10_g00d02b8 pkgrel=1 pkgdesc="Conversion tool for converting GDS layout files into TikZ Code and PDF" arch=('i686' 'x86_64') @@ -15,8 +15,8 @@ sha1sums=('SKIP') pkgver () { _date=`date +"%Y%m%d"` - cd "${srcdir}/${pkgname}-git" - echo "$_date.$(git rev-list --count master).$(git rev-parse --short master)" + cd "${srcdir}/${pkgname}-git/version" + echo "$(echo "$(sh ./generate-version-string.sh)" | sed 's/-/_/g')" } build () {