aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:29:58 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:29:58 -0500
commit62edbefaffeb2f9d3a52193c2e0d54c77acbcc40 (patch)
tree5e27986820bf2bf54c7e5c5b357ce0a27f971e95 /include
parent9e8edf8918c9e79386b4b07f7bc6b2528cea98fb (diff)
downloadstasis-62edbefaffeb2f9d3a52193c2e0d54c77acbcc40.tar.gz
Rebranding
Diffstat (limited to 'include')
-rw-r--r--include/download.h6
-rw-r--r--include/omc.h (renamed from include/ohmycal.h)20
-rw-r--r--include/recipe.h6
-rw-r--r--include/str.h16
-rw-r--r--include/wheel.h6
5 files changed, 33 insertions, 21 deletions
diff --git a/include/download.h b/include/download.h
index 0522aee..41eba98 100644
--- a/include/download.h
+++ b/include/download.h
@@ -2,12 +2,12 @@
// Created by jhunk on 10/5/23.
//
-#ifndef OHMYCAL_DOWNLOAD_H
-#define OHMYCAL_DOWNLOAD_H
+#ifndef OMC_DOWNLOAD_H
+#define OMC_DOWNLOAD_H
#include <curl/curl.h>
size_t download_writer(void *fp, size_t size, size_t nmemb, void *stream);
int download(char *url, const char *filename);
-#endif //OHMYCAL_DOWNLOAD_H
+#endif //OMC_DOWNLOAD_H
diff --git a/include/ohmycal.h b/include/omc.h
index d3e86ec..6c4821f 100644
--- a/include/ohmycal.h
+++ b/include/omc.h
@@ -1,5 +1,5 @@
-#ifndef OHMYCAL_OHMYCAL_H
-#define OHMYCAL_OHMYCAL_H
+#ifndef OMC_OMC_H
+#define OMC_OMC_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -7,7 +7,13 @@
#include <unistd.h>
#define SYSERROR stderr, "%s:%s:%d: %s\n", path_basename(__FILE__), __FUNCTION__, __LINE__, strerror(errno)
-#define OHMYCAL_BUFSIZ 8192
+#define OMC_BUFSIZ 8192
+
+struct OMC_GLOBAL {
+ unsigned char verbose;
+ unsigned char always_update_base_environment;
+ unsigned char continue_on_error;
+};
#include "utils.h"
#include "ini.h"
@@ -21,4 +27,10 @@
#include "recipe.h"
#include "relocation.h"
-#endif //OHMYCAL_OHMYCAL_H
+#define COE_CHECK_ABORT(COND, MSG) {\
+ if (COND) { \
+ msg(OMC_MSG_ERROR, MSG ": Aborting execution (--continue-on-error/-C is not enabled)\n"); \
+ exit(1); \
+ } \
+}
+#endif //OMC_OMC_H
diff --git a/include/recipe.h b/include/recipe.h
index 2a0fe4b..f4c63c1 100644
--- a/include/recipe.h
+++ b/include/recipe.h
@@ -2,8 +2,8 @@
// Created by jhunk on 10/7/23.
//
-#ifndef OHMYCAL_RECIPE_H
-#define OHMYCAL_RECIPE_H
+#ifndef OMC_RECIPE_H
+#define OMC_RECIPE_H
#include "str.h"
#include "utils.h"
@@ -17,4 +17,4 @@
int recipe_clone(char *recipe_dir, char *url, char *gitref, char **result);
int recipe_get_type(char *repopath);
-#endif //OHMYCAL_RECIPE_H
+#endif //OMC_RECIPE_H
diff --git a/include/str.h b/include/str.h
index d0fc819..8b8e71c 100644
--- a/include/str.h
+++ b/include/str.h
@@ -1,20 +1,20 @@
/**
* @file str.h
*/
-#ifndef OHMYCAL_STR_H
-#define OHMYCAL_STR_H
+#ifndef OMC_STR_H
+#define OMC_STR_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
-#include "ohmycal.h"
+#include "omc.h"
-#define OHMYCAL_SORT_ALPHA 1 << 0
-#define OHMYCAL_SORT_NUMERIC 1 << 1
-#define OHMYCAL_SORT_LEN_ASCENDING 1 << 2
-#define OHMYCAL_SORT_LEN_DESCENDING 1 << 3
+#define OMC_SORT_ALPHA 1 << 0
+#define OMC_SORT_NUMERIC 1 << 1
+#define OMC_SORT_LEN_ASCENDING 1 << 2
+#define OMC_SORT_LEN_DESCENDING 1 << 3
int num_chars(const char *sptr, int ch);
int startswith(const char *sptr, const char *pattern);
@@ -44,4 +44,4 @@ int isdigit_s(const char *s);
char *tolower_s(char *s);
char *to_short_version(const char *s);
-#endif //OHMYCAL_STR_H
+#endif //OMC_STR_H
diff --git a/include/wheel.h b/include/wheel.h
index 20ac641..cca15d4 100644
--- a/include/wheel.h
+++ b/include/wheel.h
@@ -1,5 +1,5 @@
-#ifndef OHMYCAL_WHEEL_H
-#define OHMYCAL_WHEEL_H
+#ifndef OMC_WHEEL_H
+#define OMC_WHEEL_H
#include <dirent.h>
#include <string.h>
@@ -18,4 +18,4 @@ struct Wheel {
};
struct Wheel *get_wheel_file(const char *basepath, const char *name, char *to_match[]);
-#endif //OHMYCAL_WHEEL_H
+#endif //OMC_WHEEL_H