aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:20:47 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2023-11-20 00:20:47 -0500
commit49e929fa89d9ce348df5068845069392f69d8c86 (patch)
tree5102690ca2d6480b8402d4eca1fa0d67a5cbbfc2
parent776fa26053f7bf2f399279aaf77e9de9ab771c44 (diff)
downloadstasis-49e929fa89d9ce348df5068845069392f69d8c86.tar.gz
Rebrand for the last time
* Shorten OHMYCAL to OMC * Rename ohmycal.h to omc.h
-rw-r--r--CMakeLists.txt2
-rw-r--r--include/conda.h8
-rw-r--r--include/deliverable.h9
-rw-r--r--include/environment.h6
-rw-r--r--include/ini.h6
-rw-r--r--include/relocation.h6
-rw-r--r--include/system.h6
-rw-r--r--include/utils.h6
-rw-r--r--src/ini.c2
-rw-r--r--src/str.c8
-rw-r--r--src/system.c1
-rw-r--r--src/utils.c4
12 files changed, 35 insertions, 29 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcf028a..202ac5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.21)
-project(ohmycal C)
+project(OMC C)
set(CMAKE_C_STANDARD 99)
link_libraries(curl)
diff --git a/include/conda.h b/include/conda.h
index 325ca48..bc74b94 100644
--- a/include/conda.h
+++ b/include/conda.h
@@ -2,12 +2,12 @@
// Created by jhunk on 5/14/23.
//
-#ifndef OHMYCAL_CONDA_H
-#define OHMYCAL_CONDA_H
+#ifndef OMC_CONDA_H
+#define OMC_CONDA_H
#include <stdio.h>
#include <string.h>
-#include "ohmycal.h"
+#include "omc.h"
#define CONDA_INSTALL_PREFIX "conda"
@@ -21,4 +21,4 @@ void conda_env_create(char *name, char *python_version, char *packages);
void conda_env_remove(char *name);
void conda_env_export(char *name, char *output_dir, char *output_filename);
int conda_index(const char *path);
-#endif //OHMYCAL_CONDA_H
+#endif //OMC_CONDA_H
diff --git a/include/deliverable.h b/include/deliverable.h
index 918453a..02c13e1 100644
--- a/include/deliverable.h
+++ b/include/deliverable.h
@@ -1,7 +1,7 @@
/// @file deliverable.h
-#ifndef OHMYCAL_DELIVERABLE_H
-#define OHMYCAL_DELIVERABLE_H
+#ifndef OMC_DELIVERABLE_H
+#define OMC_DELIVERABLE_H
#include <string.h>
#include <stdbool.h>
@@ -276,4 +276,7 @@ void delivery_conda_enable(struct Delivery *ctx, char *conda_install_dir);
*/
void delivery_install_conda(char *install_script, char *conda_install_dir);
-#endif //OHMYCAL_DELIVERABLE_H
+// helper function
+void delivery_gather_tool_versions(struct Delivery *ctx);
+
+#endif //OMC_DELIVERABLE_H
diff --git a/include/environment.h b/include/environment.h
index ad53bf0..de59ed8 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -1,8 +1,8 @@
/**
* @file environment.h
*/
-#ifndef OHMYCAL_ENVIRONMENT_H
-#define OHMYCAL_ENVIRONMENT_H
+#ifndef OMC_ENVIRONMENT_H
+#define OMC_ENVIRONMENT_H
#include <stdio.h>
#include <stdlib.h>
@@ -20,4 +20,4 @@ char *runtime_expand_var(RuntimeEnv *env, char *input);
void runtime_export(RuntimeEnv *env, char **keys);
void runtime_apply(RuntimeEnv *env);
void runtime_free(RuntimeEnv *env);
-#endif //OHMYCAL_ENVIRONMENT_H
+#endif //OMC_ENVIRONMENT_H
diff --git a/include/ini.h b/include/ini.h
index f16142c..1391555 100644
--- a/include/ini.h
+++ b/include/ini.h
@@ -1,7 +1,7 @@
/// @file ini.h
-#ifndef OHMYCAL_INI_H
-#define OHMYCAL_INI_H
+#ifndef OMC_INI_H
+#define OMC_INI_H
#include <stddef.h>
#include <stdbool.h>
@@ -178,4 +178,4 @@ void ini_show(struct INIFILE *ini);
* @param ini
*/
void ini_free(struct INIFILE **ini);
-#endif //OHMYCAL_INI_H
+#endif //OMC_INI_H
diff --git a/include/relocation.h b/include/relocation.h
index ecbb38b..2ccf762 100644
--- a/include/relocation.h
+++ b/include/relocation.h
@@ -1,8 +1,8 @@
/**
* @file relocation.h
*/
-#ifndef OHMYCAL_RELOCATION_H
-#define OHMYCAL_RELOCATION_H
+#ifndef OMC_RELOCATION_H
+#define OMC_RELOCATION_H
#include <stdio.h>
#include <stdlib.h>
@@ -13,4 +13,4 @@
void replace_text(char *original, const char *target, const char *replacement);
void file_replace_text(const char* filename, const char* target, const char* replacement);
-#endif //OHMYCAL_RELOCATION_H
+#endif //OMC_RELOCATION_H
diff --git a/include/system.h b/include/system.h
index a922c69..81fe99a 100644
--- a/include/system.h
+++ b/include/system.h
@@ -2,8 +2,8 @@
// Created by jhunk on 10/4/23.
//
-#ifndef OHMYCAL_SYSTEM_H
-#define OHMYCAL_SYSTEM_H
+#ifndef OMC_SYSTEM_H
+#define OMC_SYSTEM_H
#include <stdio.h>
#include <stdlib.h>
@@ -25,4 +25,4 @@ int shell(struct Process *proc, char *args[]);
int shell2(struct Process *proc, char *args);
int shell_safe(struct Process *proc, char *args[]);
-#endif //OHMYCAL_SYSTEM_H
+#endif //OMC_SYSTEM_H
diff --git a/include/utils.h b/include/utils.h
index cdf4b4e..0c4e308 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -1,5 +1,5 @@
-#ifndef OHMYCAL_UTILS_H
-#define OHMYCAL_UTILS_H
+#ifndef OMC_UTILS_H
+#define OMC_UTILS_H
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
@@ -44,4 +44,4 @@ char *git_describe(const char *path);
void msg(unsigned type, char *fmt, ...);
void debug_shell();
-#endif //OHMYCAL_UTILS_H
+#endif //OMC_UTILS_H
diff --git a/src/ini.c b/src/ini.c
index 586ae60..6855b81 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include "ohmycal.h"
+#include "omc.h"
#include "ini.h"
struct INIFILE *ini_init() {
diff --git a/src/str.c b/src/str.c
index 8e52611..7188c96 100644
--- a/src/str.c
+++ b/src/str.c
@@ -488,13 +488,13 @@ void strsort(char **arr, unsigned int sort_mode) {
// Default mode is alphabetic sort
compar fn = _strsort_alpha_compare;
- if (sort_mode == OHMYCAL_SORT_LEN_DESCENDING) {
+ if (sort_mode == OMC_SORT_LEN_DESCENDING) {
fn = _strsort_dsc_compare;
- } else if (sort_mode == OHMYCAL_SORT_LEN_ASCENDING) {
+ } else if (sort_mode == OMC_SORT_LEN_ASCENDING) {
fn = _strsort_asc_compare;
- } else if (sort_mode == OHMYCAL_SORT_ALPHA) {
+ } else if (sort_mode == OMC_SORT_ALPHA) {
fn = _strsort_alpha_compare; // ^ still selectable though ^
- } else if (sort_mode == OHMYCAL_SORT_NUMERIC) {
+ } else if (sort_mode == OMC_SORT_NUMERIC) {
fn = _strsort_numeric_compare;
}
diff --git a/src/system.c b/src/system.c
index 8cd7303..94a96c0 100644
--- a/src/system.c
+++ b/src/system.c
@@ -3,6 +3,7 @@
//
#include "system.h"
+#include "omc.h"
int shell(struct Process *proc, char *args[]) {
FILE *fp_out, *fp_err;
diff --git a/src/utils.c b/src/utils.c
index 4e82a64..64166fe 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,5 +1,7 @@
#include <stdarg.h>
-#include "ohmycal.h"
+#include "omc.h"
+
+extern struct OMC_GLOBAL globals;
char *dirstack[1024];
const size_t dirstack_max = sizeof(dirstack) / sizeof(dirstack[0]);