From 43e1fd07c158efe656c5ba5d3c227a2858f69916 Mon Sep 17 00:00:00 2001 From: Seppia Date: Fri, 6 Jul 2018 11:39:39 +0200 Subject: Main header Created main source header file and moved appropriate declarations and function prototipes there. --- src/libluh.h | 13 ------------- src/onetimebluh.c | 6 +----- src/onetimebluh.h | 22 ++++++++++++++++++++++ 3 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 src/onetimebluh.h diff --git a/src/libluh.h b/src/libluh.h index ba3f450..ac24376 100644 --- a/src/libluh.h +++ b/src/libluh.h @@ -1,19 +1,6 @@ #ifndef LIBLUH #define LIBLUH -#define eprintf(...) fprintf(stderr, __VA_ARGS__) - -typedef struct opts { - int64_t comm; - int64_t nbytes; - int64_t quiet; - int64_t tear; - char* chars; - char* keyfile; - char* input; - char* output; -} Opts; - char* readInput (FILE* inputFile, uint64_t allocSize); char* cryptXor (char* inputStr, FILE* keyFile); char* fcryptXor (FILE* inputFile, FILE* keyFile); diff --git a/src/onetimebluh.c b/src/onetimebluh.c index 67cefef..2292827 100644 --- a/src/onetimebluh.c +++ b/src/onetimebluh.c @@ -6,13 +6,9 @@ #include #include #include +#include "onetimebluh.h" #include "libluh.h" -void xor (Opts* opzioni); -void keyrand (Opts* opzioni); -void bluh (Opts* opzioni); -void help (char* av[]); - int main (int argc, char* argv[]) { uint64_t opt = 1; diff --git a/src/onetimebluh.h b/src/onetimebluh.h new file mode 100644 index 0000000..3c32e1d --- /dev/null +++ b/src/onetimebluh.h @@ -0,0 +1,22 @@ +#ifndef ONETIMEBLUH +#define ONETIMEBLUH + +#define eprintf(...) fprintf(stderr, __VA_ARGS__) + +typedef struct opts { + int64_t comm; + int64_t nbytes; + int64_t quiet; + int64_t tear; + char* chars; + char* keyfile; + char* input; + char* output; +} Opts; + +void xor (Opts* opzioni); +void keyrand (Opts* opzioni); +void bluh (Opts* opzioni); +void help (char* av[]); + +#endif -- cgit v1.2.3