diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/error_handler.h | 2 | ||||
-rw-r--r-- | include/fs.h | 3 | ||||
-rw-r--r-- | include/mirrors.h | 1 | ||||
-rw-r--r-- | include/strlist.h | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/include/error_handler.h b/include/error_handler.h index eaf6420..5e1639b 100644 --- a/include/error_handler.h +++ b/include/error_handler.h @@ -18,6 +18,7 @@ #define SPM_ERR_MANIFEST_EMPTY _SPM_ERR(8) // manifest file has no data #define SPM_ERR_PARSE _SPM_ERR(9) // general parsing error #define SPM_ERR_NOT_IMPLEMENTED _SPM_ERR(10) // not implemented (does exist on this platform) +#define SPM_ERR_FETCH _SPM_ERR(11) // failed to download data (non-package) extern int spmerrno; extern const char *SPM_ERR_STRING[]; @@ -25,5 +26,6 @@ extern const char *SPM_ERR_STRING[]; void spmerrno_cause(const char *reason); char *spm_strerror(int code); void spm_perror(const char *msg); +void spm_die(void); #endif //SPM_ERROR_HANDLER_H diff --git a/include/fs.h b/include/fs.h index c41b649..81acd92 100644 --- a/include/fs.h +++ b/include/fs.h @@ -41,6 +41,5 @@ char *human_readable_size(uint64_t n); char *expandpath(const char *_path); char *spm_mkdtemp(const char *base, const char *name, const char *extended_path); int touch(const char *path); - - +char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn *readerFn); #endif //SPM_FSTREE_H diff --git a/include/mirrors.h b/include/mirrors.h index c9c5c23..dd4b256 100644 --- a/include/mirrors.h +++ b/include/mirrors.h @@ -7,7 +7,6 @@ #define SPM_MIRROR_MAX 0xff #define SPM_MIRROR_FILENAME "mirrorlist" -char **file_readlines(const char *filename, size_t start, size_t limit, ReaderFn *readerFn); char **mirror_list(const char *filename); void mirror_list_free(char **m); void mirror_clone(Manifest *info, char *dest); diff --git a/include/strlist.h b/include/strlist.h index 76b6d5f..55a784f 100644 --- a/include/strlist.h +++ b/include/strlist.h @@ -4,6 +4,7 @@ */ #ifndef SPM_STRLIST_H #define SPM_STRLIST_H +#include "metadata.h" typedef struct { size_t num_alloc; @@ -26,13 +27,13 @@ unsigned short strlist_item_as_ushort(StrList *pStrList, size_t index); short strlist_item_as_short(StrList *pStrList, size_t index); unsigned char strlist_item_as_uchar(StrList *pStrList, size_t index); char strlist_item_as_char(StrList *pStrList, size_t index); -unsigned char strlist_item_as_uchar(StrList *pStrList, size_t index); char *strlist_item_as_str(StrList *pStrList, size_t index); char *strlist_item(StrList *pStrList, size_t index); void strlist_set(StrList *pStrList, size_t index, char *value); size_t strlist_count(StrList *pStrList); void strlist_reverse(StrList *pStrList); void strlist_sort(StrList *pStrList, unsigned int mode); +int strlist_append_file(StrList *pStrList, char *path, ReaderFn *readerFn); void strlist_append_strlist(StrList *pStrList1, StrList *pStrList2); void strlist_append(StrList *pStrList, char *str); StrList *strlist_copy(StrList *pStrList); |