diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-06 18:06:58 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-06 18:10:39 +0530 |
commit | 59831e558edccc86338d0fb24d28025ec6159cc1 (patch) | |
tree | ddb02a0514c173233d5970be23126c676dfb4cdf | |
parent | 53a9bd75b4935cecd25edae72ad2f028013d8648 (diff) |
meson: split ./include
-rw-r--r-- | include/libnpass/gpg.h (renamed from include/gpg.h) | 0 | ||||
-rw-r--r-- | include/libnpass/libnpass.h (renamed from include/libnpass.h) | 0 | ||||
-rw-r--r-- | include/libnpass/util.h | 5 | ||||
-rw-r--r-- | include/util.h | 10 | ||||
-rw-r--r-- | src/libnpass/gpg.c | 4 | ||||
-rw-r--r-- | src/libnpass/libnpass.c | 6 | ||||
-rw-r--r-- | src/libnpass/util.c | 1 | ||||
-rw-r--r-- | src/npass/npass.c | 2 |
8 files changed, 13 insertions, 15 deletions
diff --git a/include/gpg.h b/include/libnpass/gpg.h index f5053bf..f5053bf 100644 --- a/include/gpg.h +++ b/include/libnpass/gpg.h diff --git a/include/libnpass.h b/include/libnpass/libnpass.h index d4b7fb4..d4b7fb4 100644 --- a/include/libnpass.h +++ b/include/libnpass/libnpass.h diff --git a/include/libnpass/util.h b/include/libnpass/util.h new file mode 100644 index 0000000..ebe97b1 --- /dev/null +++ b/include/libnpass/util.h @@ -0,0 +1,5 @@ +#include <stdlib.h> + +int r_mkdir(const char *path, mode_t mode); +int r_rmdir(const char *prefix_path, char *rm_path); +void util_strtrim(char *s); diff --git a/include/util.h b/include/util.h index f36965a..b6c64e0 100644 --- a/include/util.h +++ b/include/util.h @@ -1,7 +1,4 @@ -#ifndef UTIL_H - #include <stdio.h> -#include <stdlib.h> #define err_die(r, ...) {\ fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \ @@ -9,10 +6,3 @@ fputc('\n', stderr); \ return r; \ } - -int r_mkdir(const char *path, mode_t mode); -int r_rmdir(const char *prefix_path, char *rm_path); -void util_strtrim(char *s); - -#define UTIL_H -#endif diff --git a/src/libnpass/gpg.c b/src/libnpass/gpg.c index 574a492..0b90b33 100644 --- a/src/libnpass/gpg.c +++ b/src/libnpass/gpg.c @@ -4,8 +4,8 @@ #include <gpgme.h> -#include "gpg.h" -#include "util.h" +#include "libnpass/gpg.h" +#include "libnpass/util.h" #define fail_if_err(err) \ if (err) { \ diff --git a/src/libnpass/libnpass.c b/src/libnpass/libnpass.c index 72e51df..14f4737 100644 --- a/src/libnpass/libnpass.c +++ b/src/libnpass/libnpass.c @@ -8,9 +8,11 @@ #include <termios.h> #include <stdio.h> -#include "libnpass.h" +#include "libnpass/libnpass.h" +#include "libnpass/gpg.h" +#include "libnpass/util.h" + #include "util.h" -#include "gpg.h" #define DEF_PASS_DIR "pass" #define FPR_MAX 256 diff --git a/src/libnpass/util.c b/src/libnpass/util.c index 8e3a108..9164354 100644 --- a/src/libnpass/util.c +++ b/src/libnpass/util.c @@ -6,6 +6,7 @@ #include <unistd.h> #include <libgen.h> +#include "libnpass/util.h" #include "util.h" int r_mkdir(const char *path, mode_t mode) diff --git a/src/npass/npass.c b/src/npass/npass.c index 8aacc14..bde34de 100644 --- a/src/npass/npass.c +++ b/src/npass/npass.c @@ -4,7 +4,7 @@ #include <stdlib.h> #include <errno.h> -#include "libnpass.h" +#include "libnpass/libnpass.h" #include "util.h" void print_usage(void); |