2 Copyright (c) 2004 Joey Schulze <joey@infodrom.org>
4 This program 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 2 of the License, or
7 (at your option) any later version.
9 This program 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.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 From Elm 2.4pl25ME+43:
22 The output format is either:
25 >> New mail from <user> - <subject>
26 >> Priority mail from <user> - <subject>
28 >> <folder>: from <user> - <subject>
29 >> <folder>: Priority from <user> - <subject>
33 Priority: <user> - <subject>
35 <folder>: <user> - <subject>
36 <folder>: Priority: <user> - <subject>
43 #define MAIL_FROM "New mail from"
44 #define PRIO_FROM "Priority mail from"
45 #define PRIO_WIN "Priority"
47 void emit(char *prefix, char *realname, char *subject, int priority, int opt_flags)
49 if (opt_flags & OPT_WINDOW) {
51 printf("%s: ", prefix);
53 printf("%s: ", PRIO_WIN);
54 printf("%s - %s\n", realname, subject);
58 printf("%s: ", prefix);
61 printf("%s %s - %s\n", PRIO_FROM, realname, subject);
63 printf("%s %s - %s\n", MAIL_FROM, realname, subject);