Commit 2e496442 2e496442356de1b25f4c929980ef9ef311ceb533 by Sergey Poznyakoff

(mh_argp_parse): Updated declaration.

1 parent 480b4f66
...@@ -147,7 +147,7 @@ main (int argc, char **argv) ...@@ -147,7 +147,7 @@ main (int argc, char **argv)
147 mh_format_t format; 147 mh_format_t format;
148 148
149 mh_argp_parse (argc, argv, options, mh_option, args_doc, doc, 149 mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
150 opt_handler, NULL); 150 opt_handler, NULL, NULL);
151 151
152 if (!quiet && mh_format_parse (format_str, &format)) 152 if (!quiet && mh_format_parse (format_str, &format))
153 { 153 {
......
...@@ -20,6 +20,6 @@ int mh_argp_parse (int argc, char **argv, ...@@ -20,6 +20,6 @@ int mh_argp_parse (int argc, char **argv,
20 struct argp_option *option, 20 struct argp_option *option,
21 struct mh_option *mh_option, 21 struct mh_option *mh_option,
22 char *argp_doc, char *doc, 22 char *argp_doc, char *doc,
23 int (*handler)(), void *closure); 23 int (*handler)(), void *closure, int *index);
24 void mh_help (struct mh_option *mh_option); 24 void mh_help (struct mh_option *mh_option);
25 void mh_license (const char *name); 25 void mh_license (const char *name);
......
...@@ -128,10 +128,8 @@ opt_handler (int key, char *arg, void *unused) ...@@ -128,10 +128,8 @@ opt_handler (int key, char *arg, void *unused)
128 int 128 int
129 main (int argc, char **argv) 129 main (int argc, char **argv)
130 { 130 {
131 mailbox_t mbox = NULL;
132
133 mh_argp_parse (argc, argv, options, mh_option, args_doc, doc, 131 mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
134 opt_handler, NULL); 132 opt_handler, NULL, NULL);
135 133
136 if (mh_format_parse (format_str, &format)) 134 if (mh_format_parse (format_str, &format))
137 { 135 {
...@@ -139,19 +137,7 @@ main (int argc, char **argv) ...@@ -139,19 +137,7 @@ main (int argc, char **argv)
139 exit (1); 137 exit (1);
140 } 138 }
141 139
142 if (mailbox_create_default (&mbox, current_folder)) 140 return scan (mh_open_folder ());
143 {
144 mh_error ("Can't create mailbox %s: %s", current_folder, strerror (errno));
145 exit (1);
146 }
147
148 if (mailbox_open (mbox, MU_STREAM_READ))
149 {
150 mh_error ("Can't open mailbox %s: %s", current_folder, strerror (errno));
151 exit (1);
152 }
153
154 return scan (mbox);
155 } 141 }
156 142
157 #ifdef HAVE_TERMCAP_H 143 #ifdef HAVE_TERMCAP_H
......