1 /* GNU Mailutils -- a suite of utilities for electronic mail
2    Copyright (C) 1999-2021 Free Software Foundation, Inc.
3 
4    GNU Mailutils is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3, or (at your option)
7    any later version.
8 
9    GNU Mailutils is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13 
14    You should have received a copy of the GNU General Public License
15    along with GNU Mailutils.  If not, see <http://www.gnu.org/licenses/>. */
16 
17 #include <mh.h>
18 
19 static char mh_scan_format_str[] =
20   "%4(msg)"
21   "%<(cur)+%| %>"
22   "%<{replied}-%?{encrypted}E%| %>"
23   "%02(mon{date})/%02(mday{date})"
24   "%<{date} %|*%>"
25   "%<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>"
26   "%<(zero)%17(decode(friendly{from}))%>"
27   "  %(decode{subject})%<{body}<<%{body}>>%>";
28 
29 mh_format_t
mh_scan_format(void)30 mh_scan_format (void)
31 {
32   mh_format_t fmt;
33 
34   if (mh_format_string_parse (&fmt, mh_scan_format_str,
35 			      NULL, MH_FMT_PARSE_DEFAULT))
36     {
37       mu_error (_("INTERNAL ERROR: bad built-in format; please report"));
38       exit (1);
39     }
40   return fmt;
41 }
42 
43