-.TH MH-MAIL %manext5% "March 3, 2013" "%nmhversion%"
+.TH MH-MAIL %manext5% "March 5, 2013" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
.B nmh
folder corresponds to directory. There are no limits on folder
names beyond those of the host filesystem.
-.I Is that right?
.RE
.PP
.B one message per file
.PP
The filename for a new
message is one greater than the highest numbered message in
-the folder; its full path can be accessed by the pseudo\-sequence
+the folder; its full path can be accessed by the pseudo\-sequence
.I new
(e.g.,
.B mhpath
that accesses these files must be sure to lock them using the same
locking method. The locking method is selected when
.B nmh
-is configured. By default, kernel-level locking is used if
-appropriate for the platform, and it is for popular platforms. That
-default should also be the same as used by the
+is configured and can be accessed as a string using
+.BR "mhparam lockmethod" .
+By default, kernel-level locking is used if appropriate for the
+platform, and it is for popular platforms. That default should also
+be the same as used by the
.B mail
program, if provided on the platform.
-.I Should we add a lockmethod component to mhparam so users can easily detect it?
.SH FILES
.fc ^ ~
.nf
.SH "SEE ALSO"
.I
.IR mail (1),
+.IR mh\-param (1),
.IR mh\-path (1),
.IR mh\-profile (5),
.IR mh\-sequence (5)
.I etcdir
and
.I libdir
-install directories and all
+install directories, all
.I proc
-settings. The
+settings, and the locking method with which the
+.B nmh
+installation was configured. The
.B \-debug
switch displays all such other information available from
.BR mhparam .
% mhparam libdir
%libdir%
+
+% mhparam lockmethod
+fcntl
.fi
.RE
.PP
#include <h/mh.h>
-extern char *mhlibdir;
-extern char *mhetcdir;
-
-char *sbackup = BACKUP_PREFIX;
-
#define MHPARAM_SWITCHES \
X("components", 0, COMPSW) \
X("nocomponents", 0, NCOMPSW) \
DEFINE_SWITCH_ARRAY(MHPARAM, switches);
#undef X
+extern char *mhlibdir;
+extern char *mhetcdir;
+
+char *sbackup = BACKUP_PREFIX;
+
+char *lockmethod =
+#if defined FCNTL_LOCKING
+ "fcntl"
+#elif defined FLOCK_LOCKING
+ "flock"
+#elif defined LOCKF_LOCKING
+ "lockf"
+#elif defined DOT_LOCKING
+ "dot"
+#else
+ "none"
+#endif
+ ;
+
struct proc {
char *p_name;
char **p_field;
{ "etcdir", &mhetcdir },
{ "libdir", &mhlibdir },
{ "sbackup", &sbackup },
+ { "lockmethod", &lockmethod },
{ NULL, NULL },
};