Make all applications share the same version

This commit is contained in:
Michel Machado 2014-08-12 13:53:37 -04:00
parent b7790256f0
commit 99dab5ca08
3 changed files with 11 additions and 2 deletions

View File

@ -4,8 +4,10 @@
#include <argp.h>
#include <stdbool.h>
#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[] = "<BLOCK_DEV>";

View File

@ -8,6 +8,7 @@
#include <errno.h>
#include <err.h>
#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);

6
version.h Normal file
View File

@ -0,0 +1,6 @@
#ifndef HEADER_VERSION_H
#define HEADER_VERSION_H
#define F3_STR_VERSION "4.0"
#endif /* HEADER_VERSION_H */