From 2fe0443d7073e59b1e4d75f49f0a5a417678f4cd Mon Sep 17 00:00:00 2001 From: dacctal Date: Thu, 2 Jul 2026 03:54:29 +0000 Subject: ezntek: checkpoint! --- include/globs.h | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'include/globs.h') diff --git a/include/globs.h b/include/globs.h index 4611216..bec1dc9 100644 --- a/include/globs.h +++ b/include/globs.h @@ -1,28 +1,28 @@ /* - pkgit - package it! - + Copyright (C) 2026 dacctal + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . - */ #ifndef PKGIT_GLOBALS_H #define PKGIT_GLOBALS_H +#include + #include "str.h" -#include #define VERSION "1.4.0_INDEV" #define RED "\x1b[0;31m" @@ -58,6 +58,8 @@ #define ITALIC "\x1b[3m" #define COLOR_RESET "\x1b[0m" +#define LENGTH(lst) (sizeof(lst) / sizeof(*(lst))) + #define eprintf(...) fprintf(stderr, __VA_ARGS__); #define check_alloc(ptr) \ @@ -66,7 +68,6 @@ panic("allocation of `%s` failed", #ptr); \ } while (0) -#include #define panic(...) \ do { \ eprintf(BOLD RED "panic:" COLOR_RESET " line %d, func \"%s\" in file " \ @@ -104,11 +105,6 @@ #define MAX_DIRS 100 #define MAX_PATH_LEN 1024 -typedef struct { - str name, url, version, target, src; - bool is_local; -} package_t; - typedef struct { bool verbose, force; } cli_flags_t; -- cgit v1.2.3