static FILE *cmitmsg, *patchfile, *filelist;
static char line[1000];
+static char date[1000];
static char name[1000];
static char email[1000];
static char subject[1000];
return 1;
}
+static void handle_date(char *line)
+{
+ strcpy(date, line);
+}
+
static void handle_subject(char *line)
{
strcpy(subject, line);
cont = 0;
return;
}
+ if (!memcmp(line, "Date:", 5) && isspace(line[5])) {
+ handle_date(line+6);
+ cont = 0;
+ return;
+ }
if (!memcmp(line, "Subject:", 8) && isspace(line[8])) {
handle_subject(line+9);
cont = 1;
if (isspace(*line)) {
switch (cont) {
case 0:
- fprintf(stderr, "I don't do 'From:' line continuations\n");
+ fprintf(stderr, "I don't do 'Date:' or 'From:' line continuations\n");
break;
case 1:
add_subject_line(line);
{
char *sub = cleanup_subject(subject);
cleanup_space(name);
+ cleanup_space(date);
cleanup_space(email);
cleanup_space(sub);
- printf("Author: %s\nEmail: %s\nSubject: %s\n\n", name, email, sub);
+ printf("Author: %s\nEmail: %s\nSubject: %s\nDate: %s\n\n", name, email, sub, date);
FILE *out = cmitmsg;
do {