View | Details | Raw Unified | Return to bug 39752 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-mailmsg2.c (+61 lines)
Added Link Here
1
--- src/mailmsg2.c.orig	Wed Mar 20 08:04:47 2002
2
+++ src/mailmsg2.c	Fri May 10 10:21:54 2002
3
@@ -259,6 +259,7 @@
4
 
5
     } else if (copy_msg && ! retransmit) {  /* if retransmit we have it! */
6
 	struct string * From_buffer = NULL;
7
+	struct string * Date_buffer = NULL;
8
 	struct addr_item *p;
9
 	    
10
 	if (current_header->from) {
11
@@ -277,7 +278,23 @@
12
 		}
13
 	    }
14
 	}
15
-	    
16
+
17
+	if (current_header->time_sent) {
18
+	    char date_buf[SLEN];
19
+
20
+	    Date_buffer = new_string(display_charset);
21
+	    add_ascii_to_string(Date_buffer,
22
+				s2us(elm_date_str(date_buf,
23
+						  current_header->time_sent +
24
+						  current_header->tz_offset,
25
+						  sizeof date_buf)));
26
+	    if (current_header->time_zone[0]) {
27
+		add_ascii_to_string(Date_buffer, s2us(" "));
28
+		add_ascii_to_string(Date_buffer,
29
+				    s2us(current_header->time_zone));
30
+	    }
31
+	}
32
+
33
 	if (!cur_editcharset)
34
 	    cur_editcharset = display_charset;
35
 
36
@@ -296,12 +313,14 @@
37
 				 current_header->env_from);
38
 		
39
 	    } else if (attribution[0] && current_header) {
40
+		char * date = us2s(stream_from_string(Date_buffer,1,NULL));
41
 		if (From_buffer) {
42
 		    char * str = us2s(stream_from_string(From_buffer,1,NULL));
43
-		    fprintf(reply, attribution, str);
44
+		    fprintf(reply, attribution, str, date);
45
 		    free(str);
46
 		} else
47
-		    fprintf(reply, attribution, current_header->env_from);
48
+		    fprintf(reply, attribution, current_header->env_from, date);
49
+		free(date);
50
 		fputc('\n', reply);
51
 	    }
52
 	    if (edit_message && current_folder) {
53
@@ -389,6 +408,8 @@
54
 	}
55
 	if (From_buffer)
56
 	    free_string(&From_buffer);
57
+	if (Date_buffer)
58
+	    free_string(&Date_buffer);
59
     }
60
     
61
     if (!cur_editcharset)

Return to bug 39752