projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved pluspath() and used it instead of path() where appropriate.
[mmh]
/
sbr
/
getfolder.c
diff --git
a/sbr/getfolder.c
b/sbr/getfolder.c
index
21db9a9
..
fc87e1e
100644
(file)
--- a/
sbr/getfolder.c
+++ b/
sbr/getfolder.c
@@
-1,32
+1,34
@@
-
/*
/*
- * getfolder.c -- get the current or default folder
- *
- * $Id$
- */
+** getfolder.c -- get the current or default folder
+**
+** This code is Copyright (c) 2002, by the authors of nmh. See the
+** COPYRIGHT file in the root directory of the nmh distribution for
+** complete copyright information.
+*/
#include <h/mh.h>
#include <h/mh.h>
+/*
+** Return the default (=inbox) or current folder.
+** E.g. `getfolder(FDEF)' usually returns ``inbox''.
+*/
char *
getfolder(int wantcurrent)
{
char *
getfolder(int wantcurrent)
{
- register char *folder;
+ char *folder;
- /*
- * If wantcurrent == 1, then try the current folder first
- */
- if (wantcurrent && (folder = context_find (pfolder)) && *folder != '\0')
- return folder;
+ if (wantcurrent &&
+ (folder = context_find(pfolder)) && *folder != '\0') {
+ /* If wantcurrent, then try the current folder first */
+ return folder;
- /*
- * Else try the Inbox profile entry
- */
- if ((folder = context_find (inbox)) && *folder != '\0')
- return folder;
+ } else if ((folder = context_find(inbox)) && *folder != '\0') {
+ /* try the Inbox profile entry */
+ return folder;
- /*
- * Else return compile time default.
- */
- return defaultfolder;
+ } else {
+ /* return the compile time default */
+ return defaultfolder;
+ }
}
}