update: better way to handle resolve list

This commit is contained in:
ngn
2024-08-11 01:42:47 +03:00
parent 70b760c0f8
commit e0f0dec222
6 changed files with 37 additions and 108 deletions

View File

@ -22,7 +22,7 @@
// clang-format on
#define LM_VERSION "24.01"
#define LM_VERSION "24.02"
#include "ctx.h"
#include "error.h"

View File

@ -23,10 +23,9 @@ typedef struct lm_ctx_list {
} lm_ctx_list_t;
typedef struct lm_ctx_resolve_list {
lm_pkg_t *resolving;
lm_pkg_t *packages;
lm_pkg_t *cur;
ssize_t count;
lm_pkg_t **packages;
lm_pkg_t *cur;
ssize_t count, index;
} lm_ctx_resolve_list_t;
typedef struct lm_ctx_update_list {

View File

@ -47,9 +47,3 @@ bool mkdir_ifnot(char *path);
int join_multiple(char *res, const char *base, const char *pth, const char *pth2);
int join(char *res, const char *base, const char *pth);
char *join_alloc(const char *base, const char *pth);
bool pkglist_contains(lm_pkg_t *list, lm_pkg_t *pkg);
lm_pkg_t *pkglist_del(lm_pkg_t *list, lm_pkg_t *pkg);
lm_pkg_t *pkglist_add_top(lm_pkg_t *list, lm_pkg_t *pkg);
lm_pkg_t *pkglist_add_end(lm_pkg_t *list, lm_pkg_t *pkg);
void pkglist_free(lm_pkg_t *list);