nkiss

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/nkiss
Log | Files | Refs

commit 897a6a99202257ab02f3144d0e285b58c9570c36
parent 3a1e451f6853433ad7282ef2491c1e58b5b97c01
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Sat, 20 Feb 2021 16:15:55 -0600

pkg.*: rename source_t.path to source_t.extr to avoid confusing myself

Diffstat:
Mpkg.c | 8++++----
Mpkg.h | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkg.c b/pkg.c @@ -32,8 +32,8 @@ pkg_retrieve(char *repo, char *name, struct source_t *sources, int count) strncpy(dup, sources[i].loc, URL_LEN); size = snprintf(path, PATH_LEN, "%s/sources/%s/%s%s%s", cachedir, name, - sources[i].path[0] ? sources[i].path : "", - sources[i].path[0] ? "/" : "", + sources[i].extr[0] ? sources[i].extr : "", + sources[i].extr[0] ? "/" : "", basename(dup)); if (size > PATH_LEN) @@ -78,8 +78,8 @@ pkg_sources(char *repo, char *name, struct source_t *sources) /* no NULL check needed, as we know its in the string */ p = strrchr(p, ' ') + 1; end = strrchr(p, '\n'); - strncpy(sources[i].path, p, end - p); - sources[i].path[end - p] = '\0'; + strncpy(sources[i].extr, p, end - p); + sources[i].extr[end - p] = '\0'; } else { end = strchr(p, '\n'); strncpy(sources[i].loc, p, end-p); diff --git a/pkg.h b/pkg.h @@ -10,7 +10,7 @@ struct source_t { char git; char local; char loc[URL_LEN]; - char path[PATH_LEN]; + char extr[PATH_LEN]; }; void pkg_retrieve(char *repo, char *name, struct source_t *sources, int count);