]> gitweb.hhaalo.de Git - discspan.git/commitdiff
move header into src
authorBastian Dehn <hhaalo@arcor.de>
Sat, 30 Aug 2025 15:12:56 +0000 (17:12 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 30 Aug 2025 15:12:56 +0000 (17:12 +0200)
14 files changed:
CMakeLists.txt
libs/spandisc/CMakeLists.txt
libs/spandisc/include/config_spandisc.h.in [deleted file]
libs/spandisc/include/filehandler.h [deleted file]
libs/spandisc/include/libspandisc.h [deleted file]
libs/spandisc/include/logic.h [deleted file]
libs/spandisc/include/spandisc.h [deleted file]
libs/spandisc/include/splitter.h [deleted file]
libs/spandisc/src/config_spandisc.h.in [new file with mode: 0644]
libs/spandisc/src/filehandler.h [new file with mode: 0644]
libs/spandisc/src/libspandisc.h [new file with mode: 0644]
libs/spandisc/src/logic.h [new file with mode: 0644]
libs/spandisc/src/spandisc.h [new file with mode: 0644]
libs/spandisc/src/splitter.h [new file with mode: 0644]

index 208007606441be0d61da652f60bcd7eb6524476a..ec0a4a5549c7556cf8056acb277cd7e8bfca94e5 100644 (file)
@@ -33,7 +33,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
 
 # add headers from dependency library spandisc
 message(VERBOSE "Include directory: libs/spandisc/include")
-include_directories(libs/spandisc/include)
+include_directories(libs/spandisc/src)
 message(STATUS "Include subproject spandisc: libs/spandisc")
 add_subdirectory(libs/spandisc)
 
index bc719cc89a62cf4db0547a52e4593c183c7a7b33..de8179a9ecd3ca80f72c5e5e2fc8122180794711 100644 (file)
@@ -28,13 +28,13 @@ option(BUILD_SHARED_LIBS "build shared libs" ON)
 
 # configure file
 message(STATUS "Generating header: include/config_spandisc.h")
-configure_file(${CMAKE_CURRENT_LIST_DIR}/include/config_spandisc.h.in
-       ${CMAKE_CURRENT_BINARY_DIR}/include/config_spandisc.h)
+configure_file(${CMAKE_CURRENT_LIST_DIR}/src/config_spandisc.h.in
+       ${CMAKE_CURRENT_BINARY_DIR}/src/config_spandisc.h)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
 
 # add source files
 file(GLOB SOURCES src/*.c)
-file(GLOB PUBLIC_HEADER include/*.h)
+file(GLOB PUBLIC_HEADER src/*.h)
 message(VERBOSE "Include directory: include")
 include_directories(include)
 
diff --git a/libs/spandisc/include/config_spandisc.h.in b/libs/spandisc/include/config_spandisc.h.in
deleted file mode 100644 (file)
index c02de9a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef CONFIG_SPANDISC_IN_H
-#define CONFIG_SPANDISC_IN_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SPANDISC_VERSION "@PROJECT_VERSION@"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/include/filehandler.h b/libs/spandisc/include/filehandler.h
deleted file mode 100644 (file)
index 17688f0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _FILEHANDLER_H
-#define _FILEHANDLER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Read a text file with file pathes into medium_t struct
- *
- * @param input is the input file path
- * @param pointer to an empty medium_t struct
- */
-void read_input_file(const char *input, medium_t *srcdata);
-
-/**
- * Write a text file with file pathes from medium_t struct
- *
- * @param output is the file name
- * @param disc is the struct with file pathes
- */
-void write_output_file(const char *output, medium_t disc);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/include/libspandisc.h b/libs/spandisc/include/libspandisc.h
deleted file mode 100644 (file)
index 443ed1e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef _LIBSPANDISC_H
-#define _LIBSPANDISC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// contains struct types
-#include "spandisc.h"
-// contains spanning logic with read and write file
-#include "logic.h"
-// read and write a text file
-#include "filehandler.h"
-// contains splitting logic
-#include "splitter.h"
-
-#ifdef __cpluscplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/include/logic.h b/libs/spandisc/include/logic.h
deleted file mode 100644 (file)
index 7a91018..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef _LOGIC_H
-#define _LOGIC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-const char *get_version();
-
-/**
- * Event pointer to method execute by the writing file.
- * This Method is called by span
- *
- * @param output is the file name
- * @param disc is the disc struct
- */
-typedef void (*status_print_t)(const char *output, medium_t disc);
-extern status_print_t status_print;
-
-/**
- * Split file pathes from input file with split size into seperated
- * output files. Output files contains the pathes fit on a media. Output files
- * name generate with output prefix and four digit number.
- *
- * @param input path to the input text file
- * @param output prefix of output files
- * @param split size to split in bytes
- */
-void span(const char *input, const char *output, unsigned long long split);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/include/spandisc.h b/libs/spandisc/include/spandisc.h
deleted file mode 100644 (file)
index a074299..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef _SPANDISC_H
-#define _SPANDISC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
-       char name[255];
-       unsigned long long fsize;
-       unsigned int type;
-} file_size_t;
-
-typedef struct {
-       int nr;
-       unsigned long long freespace;
-       int length;
-       file_size_t *filearray;
-} medium_t;
-
-typedef struct {
-       int length;
-       medium_t *disc;
-} collection_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/include/splitter.h b/libs/spandisc/include/splitter.h
deleted file mode 100644 (file)
index 9e12460..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _SPLITTER_H
-#define _SPLITTER_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void free_medium(medium_t *medium);
-void free_collection(collection_t *col);
-
-/**
- * Calc a medium from srcdata and shrink srcdata struct.
- *
- * @param srcdata struct with all pathes
- *
- * @return one splitted medium
- */
-medium_t splitter(medium_t *srcdata);
-
-/**
- * Calc all files to big to split.
- *
- * @param srcdata struct with all pathes
- *
- * @return medium with pathes can not split
- */
-medium_t ignore(medium_t *srcdata);
-
-/**
- * Calc all file pathes and make a medium collection
- *
- * @param srcdata with all file pathes
- *
- * @return collection with many mediums
- */
-collection_t split_all(medium_t *srcdata);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libs/spandisc/src/config_spandisc.h.in b/libs/spandisc/src/config_spandisc.h.in
new file mode 100644 (file)
index 0000000..c02de9a
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef CONFIG_SPANDISC_IN_H
+#define CONFIG_SPANDISC_IN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define SPANDISC_VERSION "@PROJECT_VERSION@"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/spandisc/src/filehandler.h b/libs/spandisc/src/filehandler.h
new file mode 100644 (file)
index 0000000..17688f0
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef _FILEHANDLER_H
+#define _FILEHANDLER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Read a text file with file pathes into medium_t struct
+ *
+ * @param input is the input file path
+ * @param pointer to an empty medium_t struct
+ */
+void read_input_file(const char *input, medium_t *srcdata);
+
+/**
+ * Write a text file with file pathes from medium_t struct
+ *
+ * @param output is the file name
+ * @param disc is the struct with file pathes
+ */
+void write_output_file(const char *output, medium_t disc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/spandisc/src/libspandisc.h b/libs/spandisc/src/libspandisc.h
new file mode 100644 (file)
index 0000000..443ed1e
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _LIBSPANDISC_H
+#define _LIBSPANDISC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// contains struct types
+#include "spandisc.h"
+// contains spanning logic with read and write file
+#include "logic.h"
+// read and write a text file
+#include "filehandler.h"
+// contains splitting logic
+#include "splitter.h"
+
+#ifdef __cpluscplus
+}
+#endif
+
+#endif
diff --git a/libs/spandisc/src/logic.h b/libs/spandisc/src/logic.h
new file mode 100644 (file)
index 0000000..7a91018
--- /dev/null
@@ -0,0 +1,35 @@
+#ifndef _LOGIC_H
+#define _LOGIC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const char *get_version();
+
+/**
+ * Event pointer to method execute by the writing file.
+ * This Method is called by span
+ *
+ * @param output is the file name
+ * @param disc is the disc struct
+ */
+typedef void (*status_print_t)(const char *output, medium_t disc);
+extern status_print_t status_print;
+
+/**
+ * Split file pathes from input file with split size into seperated
+ * output files. Output files contains the pathes fit on a media. Output files
+ * name generate with output prefix and four digit number.
+ *
+ * @param input path to the input text file
+ * @param output prefix of output files
+ * @param split size to split in bytes
+ */
+void span(const char *input, const char *output, unsigned long long split);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/spandisc/src/spandisc.h b/libs/spandisc/src/spandisc.h
new file mode 100644 (file)
index 0000000..a074299
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef _SPANDISC_H
+#define _SPANDISC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+       char name[255];
+       unsigned long long fsize;
+       unsigned int type;
+} file_size_t;
+
+typedef struct {
+       int nr;
+       unsigned long long freespace;
+       int length;
+       file_size_t *filearray;
+} medium_t;
+
+typedef struct {
+       int length;
+       medium_t *disc;
+} collection_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/libs/spandisc/src/splitter.h b/libs/spandisc/src/splitter.h
new file mode 100644 (file)
index 0000000..9e12460
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef _SPLITTER_H
+#define _SPLITTER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void free_medium(medium_t *medium);
+void free_collection(collection_t *col);
+
+/**
+ * Calc a medium from srcdata and shrink srcdata struct.
+ *
+ * @param srcdata struct with all pathes
+ *
+ * @return one splitted medium
+ */
+medium_t splitter(medium_t *srcdata);
+
+/**
+ * Calc all files to big to split.
+ *
+ * @param srcdata struct with all pathes
+ *
+ * @return medium with pathes can not split
+ */
+medium_t ignore(medium_t *srcdata);
+
+/**
+ * Calc all file pathes and make a medium collection
+ *
+ * @param srcdata with all file pathes
+ *
+ * @return collection with many mediums
+ */
+collection_t split_all(medium_t *srcdata);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif