/[mailutils]/mailutils/mh/mh_init.c
ViewVC logotype

Diff of /mailutils/mh/mh_init.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by gray, Mon Feb 10 01:04:04 2003 UTC revision 1.28 by gray, Mon Feb 10 11:59:33 2003 UTC
# Line 818  mh_install (char *name, int automode) Line 818  mh_install (char *name, int automode)
818        exit (1);        exit (1);
819      }      }
820  }  }
821                  
822    void
823    mh_annotate (message_t msg, char *field, char *text, int date)
824    {
825      header_t hdr;
826      attribute_t attr;
827        
828      if (message_get_header (msg, &hdr))
829        return;
830    
831      if (date)
832        {
833          time_t t;
834          struct tm *tm;
835          char datebuf[80];
836          t = time (NULL);
837          tm = localtime (&t);
838          strftime (datebuf, sizeof datebuf, "%a, %d %b %Y %H:%M:%S %Z", tm);
839    
840          header_set_value (hdr, field, datebuf, 0);
841        }
842    
843      if (text)
844        header_set_value (hdr, field, text, 0);
845      message_get_attribute (msg, &attr);
846      attribute_set_modified (attr);
847    }
848    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26