X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=blobdiff_plain;f=mymail.c;h=0fb694a5d7436137f4e8cf4473998d80bc11a72d;hp=e6a268710777a44d0a28b7bf123b2d626dde155a;hb=c7dd0337a78674576cbda563bc45c998e82bdbe0;hpb=21e7610626308bc90e09e71d7c845e83133b7aad 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; } }