diff --git a/.gitignore b/.gitignore index 0ef0814..eead08e 100644 --- a/.gitignore +++ b/.gitignore @@ -65,5 +65,7 @@ compile_commands.json CTestTestfile.cmake _deps CMakeUserPresets.json - build + +# clangd +.cache/ diff --git a/include/cosms-core/file.h b/include/cosms-core/file.h index 605a29d..4a0c4ae 100644 --- a/include/cosms-core/file.h +++ b/include/cosms-core/file.h @@ -9,7 +9,12 @@ #ifndef COSMS_CORE_FILE #define COSMS_CORE_FILE -void cosms_core_file_read(char *path); -void cosms_core_file_write(char *path); +typedef enum { + COSMS_FILE_OK = 0, + COSMS_FILE_NOT_FOUND = -1, +} CosmsFileError; + +CosmsFileError cosms_core_file_read(char *path); +CosmsFileError cosms_core_file_write(char *path); #endif diff --git a/src/file.c b/src/file.c index 23b3617..d7660d4 100644 --- a/src/file.c +++ b/src/file.c @@ -10,10 +10,12 @@ #include -void cosms_core_file_read(char *path) { +CosmsFileError cosms_core_file_read(char *path) { printf("Hello, World!"); + return COSMS_FILE_OK; } -void cosms_core_file_write(char *path) { +CosmsFileError cosms_core_file_write(char *path) { printf("Hello, World"); + return COSMS_FILE_OK; }