star-enclosures-2d

Extract enclosures from 2D geometry
git clone git://git.meso-star.fr/star-enclosures-2d.git
Log | Files | Refs | README | LICENSE

commit 695aac9ac1d10ae816767c31223df6c24cbb1789
parent 5b5efd746f4c6feb01ba5e837f4a0679108e5c30
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 27 Apr 2023 16:50:38 +0200

Merge branch 'release_0.5.5'

Diffstat:
MREADME.md | 7++++++-
Mcmake/CMakeLists.txt | 4++--
Msrc/senc2d.h | 2+-
Msrc/senc2d_descriptor.c | 2+-
Msrc/senc2d_device.c | 2+-
Msrc/senc2d_device_c.h | 2+-
Msrc/senc2d_enclosure.c | 2+-
Msrc/senc2d_enclosure_c.h | 2+-
Msrc/senc2d_enclosure_data.h | 2+-
Msrc/senc2d_internal_types.h | 2+-
Msrc/senc2d_sXd_helper.h | 2+-
Msrc/senc2d_scene.c | 7++++---
Msrc/senc2d_scene_analyze.c | 2+-
Msrc/senc2d_scene_analyze_c.h | 2+-
Msrc/senc2d_scene_c.h | 2+-
Msrc/senc2d_side_range.h | 2+-
Msrc/sencX2d.h | 2+-
Msrc/sencX2d_undefs.h | 2+-
Msrc/test_senc2d_device.c | 2+-
Msrc/test_senc2d_enclosure.c | 2+-
Msrc/test_senc2d_inconsistant_square.c | 2+-
Msrc/test_senc2d_sample_enclosure.c | 2+-
Msrc/test_senc2d_scene.c | 2+-
Msrc/test_senc2d_some_enclosures.c | 2+-
Msrc/test_senc2d_some_segments.c | 2+-
Msrc/test_senc2d_square_behind_square.c | 2+-
Msrc/test_senc2d_square_in_square.c | 2+-
Msrc/test_senc2d_square_on_square.c | 2+-
Msrc/test_senc2d_unspecified_medium.c | 2+-
Msrc/test_senc2d_utils.h | 2+-
Msrc/test_senc2d_utils2.h | 2+-
31 files changed, 40 insertions(+), 34 deletions(-)

diff --git a/README.md b/README.md @@ -42,6 +42,11 @@ in star-enclosures-3d but is still present in star-enclosures-2d. Release notes ------------- +### Version 0.5.5 + +Fixes the (rare) situation where temporary local variables could be used in a +unitialized way in the `senc2d_scene_create` function. + ### Version 0.5.4 Sets the required version of Star-SampPling to 0.12. This version fixes @@ -125,7 +130,7 @@ BugFix: needed data cleaning on computation canceling. License ------- -Copyright (C) 2018-2021 [|Meso|Star>](https://www.meso-star.com) +Copyright © 2018-2021, 2023 [|Meso|Star>](https://www.meso-star.com) (<contact@meso-star.com>). Star-enclosures-2d is free software released under the GPLv3+ license: GNU GPL version 3 or later. You are welcome to redistribute it under certain diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -57,7 +57,7 @@ endif() ################################################################################ set(VERSION_MAJOR 0) set(VERSION_MINOR 5) -set(VERSION_PATCH 4) +set(VERSION_PATCH 5) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set(SENC2D_FILES_SRC diff --git a/src/senc2d.h b/src/senc2d.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_descriptor.c b/src/senc2d_descriptor.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_device.c b/src/senc2d_device.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_device_c.h b/src/senc2d_device_c.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_enclosure.c b/src/senc2d_enclosure.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_enclosure_c.h b/src/senc2d_enclosure_c.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_enclosure_data.h b/src/senc2d_enclosure_data.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_internal_types.h b/src/senc2d_internal_types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_sXd_helper.h b/src/senc2d_sXd_helper.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_scene.c b/src/senc2d_scene.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -88,6 +88,9 @@ senc2d_scene_create || !(conv & (SENC2D_CONVENTION_NORMAL_INSIDE | SENC2D_CONVENTION_NORMAL_OUTSIDE))) return RES_BAD_ARG; + htable_vrtx_init(dev->allocator, &unique_vertices); + htable_seg_init(dev->allocator, &unique_segments); + scn = MEM_CALLOC(dev->allocator, 1, sizeof(struct senc2d_scene)); if(!scn) { log_err(dev, LIB_NAME":%s: could not allocate the star-enclosures-2d scene.\n", @@ -104,8 +107,6 @@ senc2d_scene_create scn->nverts = nverts; darray_segment_in_init(dev->allocator, &scn->segments_in); darray_position_init(dev->allocator, &scn->vertices); - htable_vrtx_init(dev->allocator, &unique_vertices); - htable_seg_init(dev->allocator, &unique_segments); darray_side_range_init(dev->allocator, &scn->media_use); darray_segment_enc_init(scn->dev->allocator, &scn->analyze.segments_enc); diff --git a/src/senc2d_scene_analyze.c b/src/senc2d_scene_analyze.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_scene_analyze_c.h b/src/senc2d_scene_analyze_c.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_scene_c.h b/src/senc2d_scene_c.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/senc2d_side_range.h b/src/senc2d_side_range.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/sencX2d.h b/src/sencX2d.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/sencX2d_undefs.h b/src/sencX2d_undefs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_device.c b/src/test_senc2d_device.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_enclosure.c b/src/test_senc2d_enclosure.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_inconsistant_square.c b/src/test_senc2d_inconsistant_square.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_sample_enclosure.c b/src/test_senc2d_sample_enclosure.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_scene.c b/src/test_senc2d_scene.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_some_enclosures.c b/src/test_senc2d_some_enclosures.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_some_segments.c b/src/test_senc2d_some_segments.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_square_behind_square.c b/src/test_senc2d_square_behind_square.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_square_in_square.c b/src/test_senc2d_square_in_square.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_square_on_square.c b/src/test_senc2d_square_on_square.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_unspecified_medium.c b/src/test_senc2d_unspecified_medium.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_utils.h b/src/test_senc2d_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/test_senc2d_utils2.h b/src/test_senc2d_utils2.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2018-2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2018-2021, 2023 |Méso|Star> (contact@meso-star.com) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by