diff --git a/f3probe.c b/f3probe.c index 3635bb0..cdd8b7c 100644 --- a/f3probe.c +++ b/f3probe.c @@ -4,8 +4,10 @@ #include #include +#include "version.h" + /* Argp's global variables. */ -const char *argp_program_version = "F3 Probe 1.0"; +const char *argp_program_version = "F3 Probe " F3_STR_VERSION; /* Arguments. */ static char adoc[] = ""; diff --git a/utils.c b/utils.c index 9e371fd..d4e733f 100644 --- a/utils.c +++ b/utils.c @@ -8,6 +8,7 @@ #include #include +#include "version.h" #include "utils.h" const char *adjust_unit(double *ptr_bytes) @@ -209,7 +210,7 @@ const long *ls_my_files(const char *path, long start_at, long end_at) void print_header(FILE *f, const char *name) { fprintf(f, - "F3 %s 4.0\n" + "F3 %s " F3_STR_VERSION "\n" "Copyright (C) 2010 Digirati Internet LTDA.\n" "This is free software; see the source for copying conditions.\n" "\n", name); diff --git a/version.h b/version.h new file mode 100644 index 0000000..108803d --- /dev/null +++ b/version.h @@ -0,0 +1,6 @@ +#ifndef HEADER_VERSION_H +#define HEADER_VERSION_H + +#define F3_STR_VERSION "4.0" + +#endif /* HEADER_VERSION_H */