#ifndef CONFIG_SPANDISC_IN_H
#define CONFIG_SPANDISC_IN_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#define SPANDISC_VERSION "@PROJECT_VERSION@"
-#ifdef __cplusplus
-}
-#endif
-
#endif
#include <stdlib.h>
#include <stdio.h>
-#include "spandisc.h"
#include "filehandler.h"
#define MAX_PATH_LENGTH 255
#ifndef _FILEHANDLER_H
#define _FILEHANDLER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "spandisc.h"
-/**
- * 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
#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
#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
- */
+const char *get_version();
void span(const char *input, const char *output, unsigned long long split);
-#ifdef __cplusplus
-}
-#endif
-
#endif
#ifndef _SPANDISC_H
#define _SPANDISC_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct {
char* name;
unsigned long long fsize;
void free_medium(medium_t *medium);
void free_collection(collection_t *col);
-#ifdef __cplusplus
-}
-#endif
-
#endif
#include <stdlib.h>
#include <string.h>
-#include "spandisc.h"
+
#include "splitter.h"
#define S_IFREG 0100000 // bitmask for regular file; man inode
#ifndef _SPLITTER_H
#define _SPLITTER_H
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include "spandisc.h"
medium_t* splitter(medium_t *srcdata);
medium_t* ignore(medium_t *srcdata);
void split_all(medium_t *srcdata, collection_t* col);
-#ifdef __cplusplus
-}
-#endif
-
#endif
#include <unistd.h>
#include "config_discspan.h"
-#include "spandisc.h"
-#include "logic.h"
+#include "libspandisc.h"
#include "help.h"
typedef struct {