aboutsummaryrefslogtreecommitdiff
path: root/src/unalf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unalf.c')
-rw-r--r--src/unalf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/unalf.c b/src/unalf.c
index af74af0..39685e7 100644
--- a/src/unalf.c
+++ b/src/unalf.c
@@ -7,10 +7,6 @@
#include <f65.h>
#include "unalf.h"
-#ifndef VERSION
-#define VERSION "0.0.0"
-#endif
-
FILE *in_file, *out_file;
char *in_filename, *self;
opts_t opts;
@@ -67,6 +63,11 @@ int main(int argc, char **argv) {
if(argc < 2 || !strcmp(argv[1], "--help") || !strcmp(argv[1], "-h")) usage();
+ if(!strcmp(argv[1], "--version")) {
+ puts(VERSION);
+ exit(0);
+ }
+
parse_opts(argc, argv);
if(!(in_file = fopen(in_filename, "rb"))) {