]> diplodocus.org Git - nmh/blob - sbr/getfolder.c
Added '-L' to the calls of 'ls' in configure.in -- I have seen multiple machines
[nmh] / sbr / getfolder.c
1
2 /*
3 * getfolder.c -- get the current or default folder
4 *
5 * $Id$
6 */
7
8 #include <h/mh.h>
9
10
11 char *
12 getfolder(int wantcurrent)
13 {
14 register char *folder;
15
16 /*
17 * If wantcurrent == 1, then try the current folder first
18 */
19 if (wantcurrent && (folder = context_find (pfolder)) && *folder != '\0')
20 return folder;
21
22 /*
23 * Else try the Inbox profile entry
24 */
25 if ((folder = context_find (inbox)) && *folder != '\0')
26 return folder;
27
28 /*
29 * Else return compile time default.
30 */
31 return defaultfolder;
32 }