aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/error_handler.h15
-rw-r--r--include/spm.h4
2 files changed, 6 insertions, 13 deletions
diff --git a/include/error_handler.h b/include/error_handler.h
index a731d28..92705fe 100644
--- a/include/error_handler.h
+++ b/include/error_handler.h
@@ -14,20 +14,13 @@
#define SPM_ERR_PKG_INVALID _SPM_ERR(4) // invalid package (wrong structure, missing data, etc)
#define SPM_ERR_PKG_CHECKSUM _SPM_ERR(5) // bad checksum
#define SPM_ERR_PKG_FETCH _SPM_ERR(6) // failed to download package
+#define SPM_ERR_MANIFEST_INVALID _SPM_ERR(7) // manifest file is invalid (no header)
+#define SPM_ERR_MANIFEST_EMPTY _SPM_ERR(8) // manifest file has no data
extern int spmerrno;
+extern const char *SPM_ERR_STRING[];
-static const char *SPM_ERR_STRING[] = {
- "Success",
- "No root record",
- "Dangerous root path",
- "Package not found",
- "Invalid package",
- "Bad package checksum",
- "Failed to fetch package",
- NULL,
-};
-
+void spmerrno_cause(const char *reason);
char *spm_strerror(int code);
void spm_perror(const char *msg);
diff --git a/include/spm.h b/include/spm.h
index b96554a..f9b2201 100644
--- a/include/spm.h
+++ b/include/spm.h
@@ -27,6 +27,8 @@
#include <utime.h>
#endif
+#include "conf.h"
+extern spm_vars SPM_GLOBAL;
#include "compat.h"
#include "error_handler.h"
#include "package.h"
@@ -44,7 +46,6 @@
#include "resolve.h"
#include "shell.h"
#include "relocation.h"
-#include "conf.h"
#include "archive.h"
#include "find.h"
#include "rpath.h"
@@ -96,7 +97,6 @@
_1________________________________________________"
// GLOBALS
-spm_vars SPM_GLOBAL;
#ifdef __APPLE__
extern char **environ;