commit 8b22ce94b0c23100006ffff1a25ec132ef8b92ed
parent 78550d4bf7830c8c1db643f79b393c8334be39ea
Author: Eduardo Fontana Lazzari <edufonlaz@gmail.com>
Date: Sat, 17 Jan 2026 14:47:45 +0100
Move sphor_config function prototypes to a separate header file
Ensure that each .c file has its exported symbols declared in a
corresponding header file. sphor_c.h, which previously contained
symbols from sphor_config.c, now contains only those corresponding
to sphor.c.
Diffstat:
5 files changed, 51 insertions(+), 18 deletions(-)
diff --git a/src/sphor.c b/src/sphor.c
@@ -24,6 +24,7 @@
#include "sphor.h"
#include "sphor_c.h"
+#include "sphor_config.h"
#include "sphor_compute_mvrea.h"
#include <star/sphin.h>
diff --git a/src/sphor_c.h b/src/sphor_c.h
@@ -78,24 +78,6 @@ struct sphor {
ref_T ref;
};
-extern LOCAL_SYM res_T
-setup_config
- (struct sphor* sphor,
- const struct sphor_create_args* args);
-
-extern LOCAL_SYM void
-setup_triangle
- (const struct sphin_geometry_descriptor* geom_desc,
- const size_t itri,
- struct suniq_triangle* tri);
-
-extern LOCAL_SYM res_T
-setup_geometry_accel_struct
- (struct sphor* sphor,
- struct suniq* suniq,
- const int view_mask, /* Combination of s3d_scene_view flags */
- struct s3d_scene_view** out_view);
-
extern LOCAL_SYM FILE* /* Returns NULL if an error occurs */
open_output_stream
(const struct sphor_create_args* args,
diff --git a/src/sphor_config.c b/src/sphor_config.c
@@ -24,6 +24,7 @@
#include "sphor.h"
#include "sphor_c.h"
+#include "sphor_config.h"
#include "sphor_interface.h"
#include "sphor_sources.h"
diff --git a/src/sphor_config.h b/src/sphor_config.h
@@ -0,0 +1,48 @@
+/* Copyright (C) 2024-2025 Centre National de la Recherche Scientifique
+ * Copyright (C) 2024-2025 Clermont Auvergne INP
+ * Copyright (C) 2024-2025 INSA Lyon
+ * Copyright (C) 2024-2025 Institut Mines Télécom Albi-Carmaux
+ * Copyright (C) 2024-2025 Institut National Polytechnique de Toulouse
+ * Copyright (C) 2024-2025 |Méso|Star> (contact@meso-star.com)
+ * Copyright (C) 2024-2025 PhotonLyX (info@photonlyx.com)
+ * Copyright (C) 2024-2025 Université de Lorraine
+ * Copyright (C) 2024-2025 Université Paul Sabatier
+ * Copyright (C) 2024-2025 Université Toulouse - Jean Jaurès
+ *
+ * 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
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef SPHOR_CONFIG_H
+#define SPHOR_CONFIG_H
+
+#include <rsys/rsys.h>
+
+extern LOCAL_SYM res_T
+setup_config
+ (struct sphor* sphor,
+ const struct sphor_create_args* args);
+
+extern LOCAL_SYM void
+setup_triangle
+ (const struct sphin_geometry_descriptor* geom_desc,
+ const size_t itri,
+ struct suniq_triangle* tri);
+
+extern LOCAL_SYM res_T
+setup_geometry_accel_struct
+ (struct sphor* sphor,
+ struct suniq* suniq,
+ const int view_mask, /* Combination of s3d_scene_view flags */
+ struct s3d_scene_view** out_view);
+
+#endif /* SPHOR_CONFIG_H */
diff --git a/src/sphor_sources.c b/src/sphor_sources.c
@@ -23,6 +23,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "sphor_c.h"
+#include "sphor_config.h"
#include "sphor_sources.h"
#include <rsys/double3.h>