Commit b02eb9b0 b02eb9b062494d2ed77ca1f52cd7733486df0bef by Sergey Poznyakoff

Remove the --license option.

It is not needed because the --version option shows a terse info about the
license, as well as a link to its full text.
1 parent 89bdc373
...@@ -87,7 +87,6 @@ static const char *comsat_argp_capa[] = { ...@@ -87,7 +87,6 @@ static const char *comsat_argp_capa[] = {
87 "logging", 87 "logging",
88 "mailbox", 88 "mailbox",
89 "locking", 89 "locking",
90 "license",
91 NULL 90 NULL
92 }; 91 };
93 92
......
...@@ -134,7 +134,6 @@ struct mu_cfg_param dotlock_cfg_param[] = { ...@@ -134,7 +134,6 @@ struct mu_cfg_param dotlock_cfg_param[] = {
134 134
135 135
136 const char *dotlock_capa[] = { 136 const char *dotlock_capa[] = {
137 "license",
138 "common", 137 "common",
139 "debug", 138 "debug",
140 NULL 139 NULL
......
...@@ -31,7 +31,6 @@ static char args_doc[] = "key"; ...@@ -31,7 +31,6 @@ static char args_doc[] = "key";
31 31
32 static const char *capa[] = { 32 static const char *capa[] = {
33 "auth", 33 "auth",
34 "license",
35 "common", 34 "common",
36 "debug", 35 "debug",
37 NULL 36 NULL
......
...@@ -203,7 +203,6 @@ static struct argp argp = { ...@@ -203,7 +203,6 @@ static struct argp argp = {
203 static const char *frm_argp_capa[] = { 203 static const char *frm_argp_capa[] = {
204 "common", 204 "common",
205 "debug", 205 "debug",
206 "license",
207 "mailbox", 206 "mailbox",
208 "locking", 207 "locking",
209 NULL 208 NULL
......
...@@ -70,7 +70,6 @@ static struct argp argp = { ...@@ -70,7 +70,6 @@ static struct argp argp = {
70 static const char *capa[] = { 70 static const char *capa[] = {
71 "common", 71 "common",
72 "debug", 72 "debug",
73 "license",
74 "mailbox", 73 "mailbox",
75 "locking", 74 "locking",
76 NULL 75 NULL
......
...@@ -139,7 +139,6 @@ static const char *guimb_argp_capa[] = { ...@@ -139,7 +139,6 @@ static const char *guimb_argp_capa[] = {
139 "debug", 139 "debug",
140 "mailbox", 140 "mailbox",
141 "locking", 141 "locking",
142 "license",
143 NULL 142 NULL
144 }; 143 };
145 144
......
...@@ -90,7 +90,6 @@ static const char *imap4d_capa[] = { ...@@ -90,7 +90,6 @@ static const char *imap4d_capa[] = {
90 "mailbox", 90 "mailbox",
91 "locking", 91 "locking",
92 "logging", 92 "logging",
93 "license",
94 NULL 93 NULL
95 }; 94 };
96 95
......
...@@ -47,7 +47,6 @@ extern int (*mu_app_cfg_verifier) (void); ...@@ -47,7 +47,6 @@ extern int (*mu_app_cfg_verifier) (void);
47 47
48 extern struct mu_cmdline_capa mu_common_cmdline; 48 extern struct mu_cmdline_capa mu_common_cmdline;
49 extern struct mu_cmdline_capa mu_logging_cmdline; 49 extern struct mu_cmdline_capa mu_logging_cmdline;
50 extern struct mu_cmdline_capa mu_license_cmdline;
51 extern struct mu_cmdline_capa mu_mailbox_cmdline; 50 extern struct mu_cmdline_capa mu_mailbox_cmdline;
52 extern struct mu_cmdline_capa mu_locking_cmdline; 51 extern struct mu_cmdline_capa mu_locking_cmdline;
53 extern struct mu_cmdline_capa mu_address_cmdline; 52 extern struct mu_cmdline_capa mu_address_cmdline;
......
...@@ -30,7 +30,6 @@ struct mu_conf_option ...@@ -30,7 +30,6 @@ struct mu_conf_option
30 char *descr; 30 char *descr;
31 }; 31 };
32 32
33 extern char *mu_license_text;
34 extern void mu_print_options (void); 33 extern void mu_print_options (void);
35 extern void mu_fprint_options (FILE *fp, int verbose); 34 extern void mu_fprint_options (FILE *fp, int verbose);
36 extern void mu_fprint_conf_option (FILE *fp, const struct mu_conf_option *opt, 35 extern void mu_fprint_conf_option (FILE *fp, const struct mu_conf_option *opt,
......
...@@ -27,23 +27,6 @@ ...@@ -27,23 +27,6 @@
27 27
28 #include <confpaths.h> 28 #include <confpaths.h>
29 29
30 char *mu_license_text =
31 N_(" GNU Mailutils is free software; you can redistribute it and/or modify\n"
32 " it under the terms of the GNU General Public License as published by\n"
33 " the Free Software Foundation; either version 3 of the License, or\n"
34 " (at your option) any later version.\n"
35 "\n"
36 " GNU Mailutils is distributed in the hope that it will be useful,\n"
37 " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
38 " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
39 " GNU General Public License for more details.\n"
40 "\n"
41 " You should have received a copy of the GNU General Public License along\n"
42 " with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.\n"
43 "\n"
44 "\n"
45 );
46
47 static struct mu_conf_option mu_conf_option[] = { 30 static struct mu_conf_option mu_conf_option[] = {
48 { "VERSION=" VERSION, N_("Version of this package") }, 31 { "VERSION=" VERSION, N_("Version of this package") },
49 { "SYSCONFDIR=" SYSCONFDIR, N_("System configuration directory") }, 32 { "SYSCONFDIR=" SYSCONFDIR, N_("System configuration directory") },
......
...@@ -299,7 +299,6 @@ find_init_function (struct mu_gocs_entry *tab, const char *capa) ...@@ -299,7 +299,6 @@ find_init_function (struct mu_gocs_entry *tab, const char *capa)
299 299
300 static struct mu_gocs_entry std_gocs_table[] = { 300 static struct mu_gocs_entry std_gocs_table[] = {
301 { "common", mu_gocs_dummy }, 301 { "common", mu_gocs_dummy },
302 { "license", mu_gocs_dummy },
303 { "mailbox", mu_gocs_mailbox_init }, 302 { "mailbox", mu_gocs_mailbox_init },
304 { "locking", mu_gocs_locking_init }, 303 { "locking", mu_gocs_locking_init },
305 { "address", mu_gocs_source_email_init }, 304 { "address", mu_gocs_source_email_init },
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
24 static struct mu_cmdline_capa *all_cmdline_capa[] = { 24 static struct mu_cmdline_capa *all_cmdline_capa[] = {
25 &mu_common_cmdline, 25 &mu_common_cmdline,
26 &mu_logging_cmdline, 26 &mu_logging_cmdline,
27 &mu_license_cmdline,
28 &mu_mailer_cmdline, 27 &mu_mailer_cmdline,
29 &mu_debug_cmdline, 28 &mu_debug_cmdline,
30 &mu_tls_cmdline, 29 &mu_tls_cmdline,
......
...@@ -197,49 +197,6 @@ struct mu_cmdline_capa mu_logging_cmdline = { ...@@ -197,49 +197,6 @@ struct mu_cmdline_capa mu_logging_cmdline = {
197 197
198 198
199 /* ************************************************************************* */ 199 /* ************************************************************************* */
200 /* License */
201 /* ************************************************************************* */
202
203 /* Option to print the license. */
204 static struct argp_option mu_license_argp_option[] = {
205 { "license", OPT_LICENSE, NULL, 0, N_("print license and exit"), -2 },
206 { NULL, 0, NULL, 0, NULL, 0 }
207 };
208
209 static error_t
210 mu_license_argp_parser (int key, char *arg, struct argp_state *state)
211 {
212 switch (key)
213 {
214 case OPT_LICENSE:
215 printf (_("License for %s:\n\n"), argp_program_version);
216 printf ("%s", mu_license_text);
217 exit (0);
218
219 default:
220 return ARGP_ERR_UNKNOWN;
221 }
222 return 0;
223 }
224
225 struct argp mu_license_argp = {
226 mu_license_argp_option,
227 mu_license_argp_parser,
228 };
229
230 struct argp_child mu_license_argp_child = {
231 &mu_license_argp,
232 0,
233 NULL,
234 0
235 };
236
237 struct mu_cmdline_capa mu_license_cmdline = {
238 "license", &mu_license_argp_child
239 };
240
241
242 /* ************************************************************************* */
243 /* Mailer */ 200 /* Mailer */
244 /* ************************************************************************* */ 201 /* ************************************************************************* */
245 202
......
...@@ -57,7 +57,7 @@ find_cfg_capa (const char *name) ...@@ -57,7 +57,7 @@ find_cfg_capa (const char *name)
57 static int 57 static int
58 reserved_name (const char *name) 58 reserved_name (const char *name)
59 { 59 {
60 static char *reserved[] = { "common", "license", NULL }; 60 static char *reserved[] = { "common", NULL };
61 char **p; 61 char **p;
62 for (p = reserved; *p; p++) 62 for (p = reserved; *p; p++)
63 if (strcmp (name, *p) == 0) 63 if (strcmp (name, *p) == 0)
......
...@@ -131,7 +131,6 @@ static const char *maidag_argp_capa[] = { ...@@ -131,7 +131,6 @@ static const char *maidag_argp_capa[] = {
131 "auth", 131 "auth",
132 "common", 132 "common",
133 "debug", 133 "debug",
134 "license",
135 "logging", 134 "logging",
136 "mailbox", 135 "mailbox",
137 "locking", 136 "locking",
......
...@@ -203,7 +203,6 @@ static struct argp argp = { ...@@ -203,7 +203,6 @@ static struct argp argp = {
203 static const char *mail_capa[] = { 203 static const char *mail_capa[] = {
204 "common", 204 "common",
205 "debug", 205 "debug",
206 "license",
207 "mailbox", 206 "mailbox",
208 "locking", 207 "locking",
209 NULL 208 NULL
......
...@@ -44,7 +44,6 @@ static struct argp_option options[] = { ...@@ -44,7 +44,6 @@ static struct argp_option options[] = {
44 static const char *argp_capa[] = { 44 static const char *argp_capa[] = {
45 "common", 45 "common",
46 "debug", 46 "debug",
47 "license",
48 "mailbox", 47 "mailbox",
49 "locking", 48 "locking",
50 NULL 49 NULL
......
...@@ -178,7 +178,6 @@ struct mu_cfg_param mimeview_cfg_param[] = { ...@@ -178,7 +178,6 @@ struct mu_cfg_param mimeview_cfg_param[] = {
178 static const char *capa[] = { 178 static const char *capa[] = {
179 "common", 179 "common",
180 "debug", 180 "debug",
181 "license",
182 NULL 181 NULL
183 }; 182 };
184 183
......
...@@ -330,7 +330,6 @@ struct mu_cfg_param movemail_cfg_param[] = { ...@@ -330,7 +330,6 @@ struct mu_cfg_param movemail_cfg_param[] = {
330 static const char *movemail_capa[] = { 330 static const char *movemail_capa[] = {
331 "common", 331 "common",
332 "debug", 332 "debug",
333 "license",
334 "locking", 333 "locking",
335 "mailbox", 334 "mailbox",
336 "auth", 335 "auth",
......
...@@ -73,7 +73,6 @@ static struct argp argp = { ...@@ -73,7 +73,6 @@ static struct argp argp = {
73 static const char *mu_tool_capa[] = { 73 static const char *mu_tool_capa[] = {
74 "common", 74 "common",
75 "debug", 75 "debug",
76 "license",
77 "locking", 76 "locking",
78 "mailbox", 77 "mailbox",
79 "auth", 78 "auth",
......
...@@ -139,7 +139,6 @@ static const char *pop3d_argp_capa[] = { ...@@ -139,7 +139,6 @@ static const char *pop3d_argp_capa[] = {
139 "mailbox", 139 "mailbox",
140 "locking", 140 "locking",
141 "logging", 141 "logging",
142 "license",
143 NULL 142 NULL
144 }; 143 };
145 144
......
...@@ -98,7 +98,6 @@ static struct argp argp = { ...@@ -98,7 +98,6 @@ static struct argp argp = {
98 98
99 static const char *popauth_argp_capa[] = { 99 static const char *popauth_argp_capa[] = {
100 "common", 100 "common",
101 "license",
102 NULL 101 NULL
103 }; 102 };
104 103
......
...@@ -307,7 +307,6 @@ static const char *sieve_argp_capa[] = ...@@ -307,7 +307,6 @@ static const char *sieve_argp_capa[] =
307 "debug", 307 "debug",
308 "mailbox", 308 "mailbox",
309 "locking", 309 "locking",
310 "license",
311 "logging", 310 "logging",
312 "mailer", 311 "mailer",
313 NULL 312 NULL
......