From: Francois Fleuret Date: Sun, 31 Mar 2013 21:51:27 +0000 (+0200) Subject: Now writes the format version in the first line of db files. Increased version number. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=b956ec62e047fc0cd39b88bc5ee4066982cd93e0;p=mymail.git Now writes the format version in the first line of db files. Increased version number. --- diff --git a/mymail.1 b/mymail.1 index 5fe569e..b76d07c 100644 --- a/mymail.1 +++ b/mymail.1 @@ -1,4 +1,4 @@ -.TH "MYMAIL" "0.9.7" "March 2013" "Francois Fleuret" "User Commands" +.TH "MYMAIL" "0.9.8" "March 2013" "Francois Fleuret" "User Commands" \" This man page was written by Francois Fleuret \" and is distributed under a Creative Commons Attribution-Share Alike diff --git a/mymail.c b/mymail.c index 0fb694a..a29fedb 100644 --- a/mymail.c +++ b/mymail.c @@ -46,7 +46,9 @@ #include #define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file" -#define VERSION "0.9.7" +#define MYMAIL_VERSION "0.9.8" + +#define MYMAIL_DB_FORMAT_VERSION 1 #define MAX_NB_SEARCH_CONDITIONS 32 @@ -199,7 +201,7 @@ FILE *safe_fopen(const char *path, const char *mode, const char *comment) { /*********************************************************************/ void print_version(FILE *out) { - fprintf(out, "mymail version %s (%s)\n", VERSION, UNAME); + fprintf(out, "mymail version %s (%s)\n", MYMAIL_VERSION, UNAME); } void print_usage(FILE *out) { @@ -1079,7 +1081,7 @@ int main(int argc, char **argv) { } } - fprintf(db_file, "%s version_%s raw\n", MYMAIL_DB_MAGIC_TOKEN, VERSION); + fprintf(db_file, "%s version_%s format_%d raw\n", MYMAIL_DB_MAGIC_TOKEN, MYMAIL_VERSION, MYMAIL_DB_FORMAT_VERSION); while(optind < argc) { recursive_index_mbox(db_file,