]> diplodocus.org Git - nmh/blobdiff - uip/mhl.c
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / uip / mhl.c
index 6ef30fbf21c6b5169c25766360afa56addd2cb76..ea7a244ce55b0e55579d6c442feece7c29339432 100644 (file)
--- a/uip/mhl.c
+++ b/uip/mhl.c
@@ -1,32 +1,19 @@
-
-/*
- * mhl.c -- the nmh message listing program
+/* mhl.c -- the nmh message listing program
  *
- * $Id$
+ * 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/utils.h>
 
 
 int
 main (int argc, char **argv)
 {
-#ifdef LOCALE
-    setlocale(LC_ALL, "");
-#endif
-    return done (mhl (argc, argv));
-}
-
+    if (nmh_init(argv[0], 2)) { return 1; }
 
-/*
- * Cheat: we are loaded with adrparse, which wants a routine called
- * OfficialName().  We call adrparse:getm() with the correct arguments
- * to prevent OfficialName() from being called.  Hence, the following
- * is to keep the loader happy.
- */
-
-char *
-OfficialName(char *name)
-{
-    return name;
+    done (mhl (argc, argv));
+    return 1;
 }