diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-28 12:28:25 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-12-28 12:28:25 -0500 |
commit | 5a754bcdc0f5e432c1d7cd358c74dfb2d6f0f1ea (patch) | |
tree | a60ffaacdaa394f8a9772220b50a47d5f51bddc6 /src/manifest.c | |
parent | a267f8258162fdab350944676b2e71f858c3de51 (diff) | |
download | spmc-5a754bcdc0f5e432c1d7cd358c74dfb2d6f0f1ea.tar.gz |
Fixes:
* doxygen config
* doxygen @file directives
* corrected stupid strip() implemention
* corrected strip usage by config parser. wrong pointer.
Diffstat (limited to 'src/manifest.c')
-rw-r--r-- | src/manifest.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/manifest.c b/src/manifest.c index d917470..e527e69 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -1,10 +1,15 @@ -// -// Created by jhunk on 12/20/19. -// +/** + * @file manifest.c + */ #include "spm.h" #include <fnmatch.h> #define PACKAGE_MIN_DELIM 2 +/** + * + * @param package_dir + * @return + */ Manifest *manifest_from(const char *package_dir) { FSTree *fsdata = NULL; fsdata = fstree(package_dir); @@ -65,6 +70,10 @@ Manifest *manifest_from(const char *package_dir) { return info; } +/** + * + * @param info + */ void manifest_free(Manifest *info) { for (int i = 0; i < info->records; i++) { if (info->packages[i]->requirements) { @@ -79,6 +88,11 @@ void manifest_free(Manifest *info) { free(info); } +/** + * + * @param info + * @return + */ int manifest_write(Manifest *info) { const char *filename = "manifest.dat"; char path[PATH_MAX]; @@ -139,6 +153,10 @@ int manifest_write(Manifest *info) { return 0; } +/** + * + * @return + */ Manifest *manifest_read(void) { const char *filename = "manifest.dat"; char path[PATH_MAX]; @@ -190,6 +208,12 @@ Manifest *manifest_read(void) { return info; } +/** + * + * @param info + * @param _package + * @return + */ ManifestPackage *manifest_search(Manifest *info, const char *_package) { char package[PATH_MAX]; |