Skip to content

Commit

Permalink
refactor: remove util
Browse files Browse the repository at this point in the history
  • Loading branch information
xNaCly committed Apr 2, 2023
1 parent 82114dd commit 050ebb0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 39 deletions.
13 changes: 9 additions & 4 deletions fleck.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
#include <stdlib.h>

#include "fleck.h"
#include "util.h"

void die(char *msg) {
printf("err: %s\n", msg);
exit(EXIT_FAILURE);
}

int main(int argc, char **argv) {
util_print("fleck - " FLECK_VERSION);
printf("fleck - %s\n", FLECK_VERSION);
if (argc < 2) {
util_print_err("not enough arguments, exiting");
die("not enough arguments");
}

char *inFile = argv[1];
if (inFile == NULL) {
util_print_err("input file is null");
die("input file is null");
}

return EXIT_SUCCESS;
}
11 changes: 0 additions & 11 deletions util.c

This file was deleted.

24 changes: 0 additions & 24 deletions util.h

This file was deleted.

0 comments on commit 050ebb0

Please sign in to comment.