From c7dd0337a78674576cbda563bc45c998e82bdbe0 Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sun, 24 Mar 2013 22:50:56 +0100 Subject: [PATCH] Fixed enough bugs to deserve a new version number. --- mymail.1 | 2 +- mymail.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mymail.1 b/mymail.1 index 72c3907..5fe569e 100644 --- a/mymail.1 +++ b/mymail.1 @@ -1,4 +1,4 @@ -.TH "MYMAIL" "0.9.6" "March 2013" "Francois Fleuret" "User Commands" +.TH "MYMAIL" "0.9.7" "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 e6a2687..0fb694a 100644 --- a/mymail.c +++ b/mymail.c @@ -46,7 +46,7 @@ #include #define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file" -#define VERSION "0.9.6" +#define VERSION "0.9.7" #define MAX_NB_SEARCH_CONDITIONS 32 @@ -321,6 +321,8 @@ void extract_mail(const char *mail_filename, unsigned long int position_in_mail, char raw_mbox_line[BUFFER_SIZE]; FILE *mail_file; + /* printf("Extract\n"); */ + mail_file = safe_fopen(mail_filename, "r", "mbox for mail extraction"); fseek(mail_file, position_in_mail, SEEK_SET); @@ -395,6 +397,7 @@ void update_time(int db_key, const char *db_value, time_t *t) { if(db_key == ID_LEADING_LINE) { c = db_value; while(*c && *c != ' ') c++; while(*c && *c == ' ') c++; + /* printf("From %s", db_value); */ strptime(c, "%a %b %e %k:%M:%S %Y", &tm); *t = mktime(&tm); } else { @@ -402,6 +405,7 @@ void update_time(int db_key, const char *db_value, time_t *t) { if(db_key == ID_DATE) { if(strptime(db_value, "%a, %d %b %Y %k:%M:%S", &tm) || strptime(db_value, "%d %b %Y %k:%M:%S", &tm)) { + /* printf("Date: %s", db_value); */ *t = mktime(&tm); } } @@ -826,6 +830,7 @@ void init_condition(struct search_condition *condition, const char *full_string, condition->time_stop = 0; } } + break; } } -- 2.20.1