commit b1797cccc1dad708f757cddf4462deaf54c97f95
parent a8cf024b73630b562b5788f02bd8f3f6fe79024a
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Mon, 4 Oct 2021 23:55:56 -0500
remove util.*
it contained only one function which was unused
Diffstat:
4 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/Makefile b/Makefile
@@ -2,7 +2,7 @@
.PHONY: all clean install
PREFIX = /usr/local
-SRC = npm-core.c npm-agent.c npmc.c util.c monocypher.c
+SRC = npm-core.c npm-agent.c npmc.c monocypher.c
OBJ = $(SRC:%.c=%.o)
EXE = npm-agent npm-core npmc
NPM_CORE = "npm-core"
@@ -11,8 +11,8 @@ CFLAGS = '-DNPM_CORE=$(NPM_CORE)'
all: npm-core npm-agent npmc
-npm-core: $(LIBS) npm-core.o util.o monocypher.o
- $(CC) -static npm-core.o util.o monocypher.o -o $@
+npm-core: $(LIBS) npm-core.o monocypher.o
+ $(CC) -static npm-core.o monocypher.o -o $@
npm-agent: npm-agent.o
$(CC) -static npm-agent.o -o $@
diff --git a/npm-core.c b/npm-core.c
@@ -10,7 +10,6 @@
#include "common.h"
#include "monocypher.h"
-#include "util.h"
char *argv0;
diff --git a/util.c b/util.c
@@ -1,25 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "util.h"
-
-void
-die(const char *fmt, ...) {
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-
- if (fmt[0] && fmt[strlen(fmt)-1] == ':') {
- fputc(' ', stderr);
- perror(NULL);
- } else {
- fputc('\n', stderr);
- }
-
- exit(1);
-}
diff --git a/util.h b/util.h
@@ -1,7 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-#define MAX(A, B) ((A) > (B) ? (A) : (B))
-#define MIN(A, B) ((A) < (B) ? (A) : (B))
-#define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B))
-
-void die(const char *fmt, ...);