From 6ce5417c707bc29380ae7d404c037b6659ec7c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Tue, 17 Sep 2024 17:53:08 +0200 Subject: [PATCH] Rename global.h to util.h The functionality has changed since we no longer need a place for global variables. --- Makefile | 2 +- src/arg_parse.c | 3 +++ src/arg_parse.h | 5 ----- src/{global.h => util.h} | 0 4 files changed, 4 insertions(+), 6 deletions(-) rename src/{global.h => util.h} (100%) diff --git a/Makefile b/Makefile index 7a28887..0504333 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ INCFLAGS= LDFLAGS=-lsqlite3 DEFS= CFLAGS=$(INCFLAGS) -std=c99 -Wall -Wextra -Wfatal-errors -Werror -HDRS=src/arg_parse.h +HDRS=src/arg_parse.h src/util.h OBJS=src/main.o src/arg_parse.o VERSION=1.0 diff --git a/src/arg_parse.c b/src/arg_parse.c index 32d76e7..038c7b7 100644 --- a/src/arg_parse.c +++ b/src/arg_parse.c @@ -17,6 +17,9 @@ */ #include "arg_parse.h" +#include "util.h" +#include + enum cmd_id parse_args(const char *cmd) { for(int i = 0; i < (int)ARRAY_LEN(commands); ++i) { for(int j = 0; j < (int)ARRAY_LEN(commands[i].str); ++j) { diff --git a/src/arg_parse.h b/src/arg_parse.h index aec632b..b7f0fbf 100644 --- a/src/arg_parse.h +++ b/src/arg_parse.h @@ -17,11 +17,6 @@ */ #pragma once -#include -#include - -#include "global.h" - enum cmd_id { CMD_UNKNOWN = 0, CMD_HELP, diff --git a/src/global.h b/src/util.h similarity index 100% rename from src/global.h rename to src/util.h