commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Mailutils branch, master, updated. rel-2_1-16-g96dc9ab


From: Sergey Poznyakoff
Subject: [SCM] GNU Mailutils branch, master, updated. rel-2_1-16-g96dc9ab
Date: Tue, 15 Dec 2009 22:01:01 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Mailutils".

http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=96dc9ab99e9518f5f21a7710e396da8c3fd833b5

The branch, master has been updated
       via  96dc9ab99e9518f5f21a7710e396da8c3fd833b5 (commit)
      from  b66ffedcecf7506efc8631dfe1047c0a1d28af80 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 96dc9ab99e9518f5f21a7710e396da8c3fd833b5
Author: Sergey Poznyakoff <address@hidden>
Date:   Wed Dec 16 00:02:14 2009 +0200

    Add TLS to MH.  Handle --debug-level and --debug-line-info options.
    
    * mailbox/mbx_default.c (attach_auth_ticket): Do not
    proceed if auth is NULL.
    * mh/mh_getopt.h (struct mh_argp_data): Change return type
    and signature of handler.
    (mh_argp_parse): Likewise.
    * mh/mh_argp.c (parse_opt): Rewrite using new
    handler prototype.
    (mh_argp_parse): Use new hanlder type.
    Assign argp children.
    
    * mh/mh_init.c (mh_init): Call mu_init_tls_libs.
    
    * mh/ali.c: Update opt_handler
    * mh/anno.c: Update opt_handler
    * mh/burst.c: Update opt_handler
    * mh/comp.c: Update opt_handler
    * mh/fmtcheck.c: Update opt_handler
    * mh/folder.c: Update opt_handler
    * mh/forw.c: Update opt_handler
    * mh/inc.c: Update opt_handler
    * mh/install-mh.c: Update opt_handler
    * mh/mark.c: Update opt_handler
    * mh/mhl.c: Update opt_handler
    * mh/mhn.c: Update opt_handler
    * mh/mhparam.c: Update opt_handler
    * mh/mhpath.c: Update opt_handler
    * mh/pick.c: Update opt_handler
    * mh/refile.c: Update opt_handler
    * mh/repl.c: Update opt_handler
    * mh/rmf.c: Update opt_handler
    * mh/rmm.c: Update opt_handler
    * mh/scan.c: Update opt_handler
    * mh/send.c: Update opt_handler
    * mh/sortm.c: Update opt_handler
    * mh/whatnow.c: Update opt_handler
    * mh/whom.c: Update opt_handler

-----------------------------------------------------------------------

Summary of changes:
 mailbox/mbx_default.c |    3 +-
 mh/ali.c              |    6 ++--
 mh/anno.c             |    6 ++--
 mh/burst.c            |    6 ++--
 mh/comp.c             |    6 ++--
 mh/fmtcheck.c         |    6 ++--
 mh/folder.c           |    4 +-
 mh/forw.c             |    4 +-
 mh/inc.c              |    6 ++--
 mh/install-mh.c       |    6 ++--
 mh/mark.c             |    6 ++--
 mh/mh_argp.c          |   70 ++++++++++++++++++++++++++++++++++++++++--------
 mh/mh_getopt.h        |    5 ++-
 mh/mh_init.c          |    4 +++
 mh/mhl.c              |    6 ++--
 mh/mhn.c              |    6 ++--
 mh/mhparam.c          |    6 ++--
 mh/mhpath.c           |    6 ++--
 mh/pick.c             |    6 ++--
 mh/refile.c           |    4 +-
 mh/repl.c             |    6 ++--
 mh/rmf.c              |    6 ++--
 mh/rmm.c              |    6 ++--
 mh/scan.c             |    6 ++--
 mh/send.c             |    6 ++--
 mh/sortm.c            |    6 ++--
 mh/whatnow.c          |    6 ++--
 mh/whom.c             |    6 ++--
 28 files changed, 136 insertions(+), 84 deletions(-)

diff --git a/mailbox/mbx_default.c b/mailbox/mbx_default.c
index 50588f5..ef2089a 100644
--- a/mailbox/mbx_default.c
+++ b/mailbox/mbx_default.c
@@ -340,7 +340,8 @@ attach_auth_ticket (mu_mailbox_t mbox)
   mu_authority_t auth = NULL;
 
   if (mu_mailbox_get_folder (mbox, &folder) == 0
-      && mu_folder_get_authority (folder, &auth) == 0)
+      && mu_folder_get_authority (folder, &auth) == 0
+      && auth)
     {
       char *filename = mu_tilde_expansion (mu_ticket_file, "/", NULL);
       mu_wicket_t wicket;
diff --git a/mh/ali.c b/mh/ali.c
index ef8e81b..ed2709e 100644
--- a/mh/ali.c
+++ b/mh/ali.c
@@ -64,8 +64,8 @@ static int user_mode;
 static int normalize_mode;
 static int nolist_mode;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -94,7 +94,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/anno.c b/mh/anno.c
index 8d0b7ff..397c0e8 100644
--- a/mh/anno.c
+++ b/mh/anno.c
@@ -58,8 +58,8 @@ static int anno_date = 1; /* Add date to the annotation */
 static char *component;   /* header field */
 static char *anno_text;   /* header field value */
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -96,7 +96,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/burst.c b/mh/burst.c
index e78f55c..4f93ed1 100644
--- a/mh/burst.c
+++ b/mh/burst.c
@@ -69,8 +69,8 @@ int eb_min_length = 1;  /* Minimal length of encapsulation 
boundary */
 
 #define VERBOSE(c) do { if (verbose) { printf c; putchar ('\n'); } } while (0)
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -121,7 +121,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
       
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/comp.c b/mh/comp.c
index c5f526d..f0a58e0 100644
--- a/mh/comp.c
+++ b/mh/comp.c
@@ -83,8 +83,8 @@ static int build_only = 0; /* --build flag */
 static int use_draft = 0;  /* --use flag */
 static char *draftmessage = "new";
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -148,7 +148,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/fmtcheck.c b/mh/fmtcheck.c
index ae8ea53..2a01440 100644
--- a/mh/fmtcheck.c
+++ b/mh/fmtcheck.c
@@ -68,8 +68,8 @@ action_dump ()
 
 static action_fp action = action_dump;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -94,7 +94,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/folder.c b/mh/folder.c
index 1d51f52..a9fdf7a 100644
--- a/mh/folder.c
+++ b/mh/folder.c
@@ -136,7 +136,7 @@ size_t max_depth = 1;  /* Maximum recursion depth (0 means 
infinity) */
 #define OPTION_IS_SET(opt) ((opt) == -1 ? show_all : opt)
 
 static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -234,7 +234,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
       
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/forw.c b/mh/forw.c
index a33a8f0..7d5c395 100644
--- a/mh/forw.c
+++ b/mh/forw.c
@@ -117,7 +117,7 @@ static mh_msgset_t msgset;
 static mu_mailbox_t mbox;
 
 static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -214,7 +214,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/inc.c b/mh/inc.c
index d1c0c9e..841636c 100644
--- a/mh/inc.c
+++ b/mh/inc.c
@@ -79,8 +79,8 @@ static int truncate_source = -1;
 static int quiet = 0;
 static const char *append_folder;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -147,7 +147,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/install-mh.c b/mh/install-mh.c
index 0104ea0..68d3c72 100644
--- a/mh/install-mh.c
+++ b/mh/install-mh.c
@@ -40,8 +40,8 @@ struct mh_option mh_option[] = {
 
 int automode;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -57,7 +57,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/mark.c b/mh/mark.c
index 0f41020..5e2b3a8 100644
--- a/mh/mark.c
+++ b/mh/mark.c
@@ -75,8 +75,8 @@ add_sequence (char *name)
   mu_list_append (seq_list, name);
 }
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -121,7 +121,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/mh_argp.c b/mh/mh_argp.c
index 1144ed5..be989a2 100644
--- a/mh/mh_argp.c
+++ b/mh/mh_argp.c
@@ -1,6 +1,6 @@
 /* GNU Mailutils -- a suite of utilities for electronic mail
    Copyright (C) 1999, 2000, 2001, 2002, 2005,
-   2006, 2007 Free Software Foundation, Inc.
+   2006, 2007, 2009 Free Software Foundation, Inc.
 
    GNU Mailutils is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -33,26 +33,25 @@ static error_t
 parse_opt (int key, char *arg, struct argp_state *state)
 {
   struct mh_argp_data *data = state->input;
+  error_t ret = ARGP_ERR_UNKNOWN;
+  
   switch (key)
     {
     case ARGP_KEY_ARG:
       if (arg[0] == '+')
-       {
-         data->handler (ARG_FOLDER, arg + 1, data->closure);
-         break;
-       }
-      return ARGP_ERR_UNKNOWN;
-
+       ret = data->handler (ARG_FOLDER, arg + 1, state);
+      break;
+      
     default:
-      if (data->handler (key, arg, data->closure, state) == 0)
+      ret = data->handler (key, arg, state);
+      if (ret == 0)
        {
          if (key == ARGP_KEY_ERROR)
            data->errind = state->next;
-         break;
        }
-      return ARGP_ERR_UNKNOWN;
     }
-  return 0;
+
+  return ret;
 }
 
 static int
@@ -101,13 +100,59 @@ mh_argp_init (const char *vers)
   argp_program_bug_address =  "<" PACKAGE_BUGREPORT ">";
 }
 
+
+enum
+  {
+    OPT_DEBUG_LEVEL = 256,
+    OPT_DEBUG_LINE_INFO,
+  };
+
+static struct argp_option mu_debug_argp_options[] = 
+{
+  { "debug-level", OPT_DEBUG_LEVEL, N_("LEVEL"), 0,
+    N_("set Mailutils debugging level"), 0 },
+  { "debug-line-info", OPT_DEBUG_LINE_INFO, NULL, 0,
+    N_("show source info with debugging messages"), 0 },
+  { NULL }
+};
+
+static error_t
+mu_debug_argp_parser (int key, char *arg, struct argp_state *state)
+{
+  switch (key)
+    {
+    case OPT_DEBUG_LEVEL:
+      mu_global_debug_from_string (arg, "command line");
+      break;
+
+    case OPT_DEBUG_LINE_INFO:
+      mu_debug_line_info = 1;
+      break;
+      
+    default:
+      return ARGP_ERR_UNKNOWN;
+    }
+  return 0;
+}
+
+struct argp mu_debug_argp = {
+  mu_debug_argp_options,
+  mu_debug_argp_parser,
+};
+
+struct argp_child mh_argp_children[] = {
+  { &mu_debug_argp, 0, N_("Global debugging settings"), 0 },
+  { NULL }
+};
+
 int
 mh_argp_parse (int *pargc, char **pargv[],
               int flags,
               struct argp_option *option,
               struct mh_option *mh_option,
               char *argp_doc, char *doc,
-              int (*handler)(), void *closure, int *pindex)
+              argp_parser_t handler,
+              void *closure, int *pindex)
 {
   struct argp argp;
   struct mh_argp_data data;
@@ -123,6 +168,7 @@ mh_argp_parse (int *pargc, char **pargv[],
   argp.parser = parse_opt;
   argp.args_doc = argp_doc;
   argp.doc = doc;
+  argp.children = mh_argp_children;
   data.mh_option = mh_option;
   data.closure = closure;
   data.handler = handler;
diff --git a/mh/mh_getopt.h b/mh/mh_getopt.h
index eabf983..710da5b 100644
--- a/mh/mh_getopt.h
+++ b/mh/mh_getopt.h
@@ -34,7 +34,7 @@ struct mh_option
 struct mh_argp_data
 {
   struct mh_option *mh_option;
-  int (*handler)();
+  argp_parser_t handler;
   int errind;
   void *closure;
   char *doc;
@@ -190,7 +190,8 @@ int mh_argp_parse (int *argc, char **argv[],
                   struct argp_option *option,
                   struct mh_option *mh_option,
                   char *argp_doc, char *doc,
-                  int (*handler)(), void *closure, int *index);
+                  argp_parser_t handler,
+                  void *closure, int *index);
 
 void mh_help (struct mh_option *mh_option, const char *doc);
 void mh_license (const char *name);
diff --git a/mh/mh_init.c b/mh/mh_init.c
index 3cb48c8..3594374 100644
--- a/mh/mh_init.c
+++ b/mh/mh_init.c
@@ -21,6 +21,7 @@
 
 #include <mh.h>
 #include <mailutils/url.h>
+#include <mailutils/tls.h>
 #include <pwd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -46,6 +47,9 @@ mh_init ()
 {
   /* Register all mailbox and mailer formats */
   mu_register_all_formats ();
+#ifdef WITH_TLS
+  mu_init_tls_libs ();
+#endif
 
   /* Read user's profile */
   mh_read_profile ();
diff --git a/mh/mhl.c b/mh/mhl.c
index 8bc7bd5..5181c9c 100644
--- a/mh/mhl.c
+++ b/mh/mhl.c
@@ -75,8 +75,8 @@ static int nomoreproc;
 
 static mu_list_t format;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -137,7 +137,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/mhn.c b/mh/mhn.c
index 8f8f102..766b8fc 100644
--- a/mh/mhn.c
+++ b/mh/mhn.c
@@ -242,8 +242,8 @@ _get_content_encoding (mu_header_t hdr, char **value)
   return 0;
 }
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -398,7 +398,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/mhparam.c b/mh/mhparam.c
index ad56c43..ff444f1 100644
--- a/mh/mhparam.c
+++ b/mh/mhparam.c
@@ -46,8 +46,8 @@ struct mh_option mh_option[] = {
 static int display_all;
 static int display_comp_name = -1;
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -64,7 +64,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/mhpath.c b/mh/mhpath.c
index 13d5b1d..483da34 100644
--- a/mh/mhpath.c
+++ b/mh/mhpath.c
@@ -39,8 +39,8 @@ struct mh_option mh_option[] = {
   { 0 }
 };
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -53,7 +53,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/pick.c b/mh/pick.c
index dc1ce76..b145dec 100644
--- a/mh/pick.c
+++ b/mh/pick.c
@@ -143,8 +143,8 @@ add_sequence (char *name)
   mu_list_append (seq_list, name);
 }
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   char *s, *p;
   
@@ -291,7 +291,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
 
   return 0;
diff --git a/mh/refile.c b/mh/refile.c
index b6d12db..26b66a5 100644
--- a/mh/refile.c
+++ b/mh/refile.c
@@ -151,7 +151,7 @@ close_folders ()
 }
 
 static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -184,7 +184,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/repl.c b/mh/repl.c
index e501fef..712595f 100644
--- a/mh/repl.c
+++ b/mh/repl.c
@@ -138,8 +138,8 @@ decode_cc_flag (const char *opt, const char *arg)
   return rc;
 }
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   char *s;
   
@@ -271,7 +271,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
       
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/rmf.c b/mh/rmf.c
index fea2b16..ed1dc90 100644
--- a/mh/rmf.c
+++ b/mh/rmf.c
@@ -64,8 +64,8 @@ static char *cur_folder_path; /* Full pathname of the current 
folder */
 static char *folder_name;     /* Name of the (topmost) folder to be
                                 deleted */
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -95,7 +95,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/rmm.c b/mh/rmm.c
index ad39d9b..665dbbd 100644
--- a/mh/rmm.c
+++ b/mh/rmm.c
@@ -39,8 +39,8 @@ struct mh_option mh_option[] = {
   { 0 }
 };
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -53,7 +53,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/scan.c b/mh/scan.c
index 825956e..238149c 100644
--- a/mh/scan.c
+++ b/mh/scan.c
@@ -87,8 +87,8 @@ void list_message (mu_mailbox_t mbox, mu_message_t msg, 
size_t num, void *data);
 void print_header (mu_mailbox_t mbox);
 void clear_screen (void);
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -142,7 +142,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
       
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/send.c b/mh/send.c
index 3088cff..e3331fb 100644
--- a/mh/send.c
+++ b/mh/send.c
@@ -131,8 +131,8 @@ static int keep_files;           /* Keep draft files */
     watch_printf c;\
 } while (0)
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   char *p;
   
@@ -257,7 +257,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/sortm.c b/mh/sortm.c
index 7649e2e..8f5d467 100644
--- a/mh/sortm.c
+++ b/mh/sortm.c
@@ -116,8 +116,8 @@ static int comp_text (void *a, void *b);
 static int comp_date (void *a, void *b);
 static int comp_number (void *a, void *b);
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -196,7 +196,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/whatnow.c b/mh/whatnow.c
index aa3f07a..e45161d 100644
--- a/mh/whatnow.c
+++ b/mh/whatnow.c
@@ -57,8 +57,8 @@ struct mh_whatnow_env wh_env = { 0 };
 static int initial_edit = 1;
 static char *draftmessage = "cur";
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -96,7 +96,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }
diff --git a/mh/whom.c b/mh/whom.c
index 689e91a..eabe2fe 100644
--- a/mh/whom.c
+++ b/mh/whom.c
@@ -60,8 +60,8 @@ static int check_recipients;
 static int use_draft;            /* Use the prepared draft */
 static const char *draft_folder; /* Use this draft folder */
 
-static int
-opt_handler (int key, char *arg, void *unused, struct argp_state *state)
+static error_t
+opt_handler (int key, char *arg, struct argp_state *state)
 {
   switch (key)
     {
@@ -100,7 +100,7 @@ opt_handler (int key, char *arg, void *unused, struct 
argp_state *state)
       break;
 
     default:
-      return 1;
+      return ARGP_ERR_UNKNOWN;
     }
   return 0;
 }


hooks/post-receive
-- 
GNU Mailutils




reply via email to

[Prev in Thread] Current Thread [Next in Thread]