Commit f333a7c9 f333a7c9189a3eb2f2b6538b203b593f97b6942b by Sergey Poznyakoff

Fixed use of OPTION_DOC options.

1 parent 594e5f5c
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
22 #include <sys/stat.h> 22 #include <sys/stat.h>
23 23
24 const char *argp_program_version = "comp (" PACKAGE_STRING ")"; 24 const char *argp_program_version = "comp (" PACKAGE_STRING ")";
25 static char doc[] = "GNU MH comp"; 25 static char doc[] = N_("GNU MH comp\v"
26 "Use -help to obtain the list of traditional MH options.");
26 static char args_doc[] = "[msg]"; 27 static char args_doc[] = "[msg]";
27 28
28 #define ARG_NOEDIT 1 29 #define ARG_NOEDIT 1
...@@ -49,7 +50,6 @@ static struct argp_option options[] = { ...@@ -49,7 +50,6 @@ static struct argp_option options[] = {
49 {"whatnowproc", ARG_WHATNOWPROC, N_("PROG"), 0, 50 {"whatnowproc", ARG_WHATNOWPROC, N_("PROG"), 0,
50 N_("Set the replacement for whatnow program")}, 51 N_("Set the replacement for whatnow program")},
51 {"use", 'u', N_("BOOL"), OPTION_ARG_OPTIONAL, N_("Use draft file preserved after the last session") }, 52 {"use", 'u', N_("BOOL"), OPTION_ARG_OPTIONAL, N_("Use draft file preserved after the last session") },
52 { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
53 { 0 } 53 { 0 }
54 }; 54 };
55 55
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
20 #include <mh.h> 20 #include <mh.h>
21 21
22 const char *argp_program_version = "fmtcheck (" PACKAGE_STRING ")"; 22 const char *argp_program_version = "fmtcheck (" PACKAGE_STRING ")";
23 static char doc[] = "GNU MH fmtcheck"; 23 static char doc[] = N_("GNU MH fmtcheck\v"
24 "Use -help to obtain the list of traditional MH options.");
24 static char args_doc[] = ""; 25 static char args_doc[] = "";
25 26
26 /* GNU options */ 27 /* GNU options */
...@@ -28,7 +29,6 @@ static struct argp_option options[] = { ...@@ -28,7 +29,6 @@ static struct argp_option options[] = {
28 {"form", 'F', N_("FILE"), 0, N_("Read format from given file")}, 29 {"form", 'F', N_("FILE"), 0, N_("Read format from given file")},
29 {"format", 't', N_("FORMAT"), 0, N_("Use this format string")}, 30 {"format", 't', N_("FORMAT"), 0, N_("Use this format string")},
30 {"dump", 'd', NULL, 0, N_("Dump the listing of compiled format code")}, 31 {"dump", 'd', NULL, 0, N_("Dump the listing of compiled format code")},
31 { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
32 32
33 { 0 } 33 { 0 }
34 }; 34 };
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
20 #include <mh.h> 20 #include <mh.h>
21 21
22 const char *argp_program_version = "inc (" PACKAGE_STRING ")"; 22 const char *argp_program_version = "inc (" PACKAGE_STRING ")";
23 static char doc[] = "GNU MH inc"; 23 static char doc[] = N_("GNU MH inc\v"
24 "Use -help to obtain the list of traditional MH options.");
24 static char args_doc[] = N_("[+folder]"); 25 static char args_doc[] = N_("[+folder]");
25 26
26 /* GNU options */ 27 /* GNU options */
...@@ -38,9 +39,6 @@ static struct argp_option options[] = { ...@@ -38,9 +39,6 @@ static struct argp_option options[] = {
38 {"width", 'w', N_("NUMBER"), 0, N_("Set output width")}, 39 {"width", 'w', N_("NUMBER"), 0, N_("Set output width")},
39 {"quiet", 'q', 0, 0, N_("Be quiet")}, 40 {"quiet", 'q', 0, 0, N_("Be quiet")},
40 {"license", 'l', 0, 0, N_("Display software license"), -1}, 41 {"license", 'l', 0, 0, N_("Display software license"), -1},
41
42 { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
43
44 { 0 } 42 { 0 }
45 }; 43 };
46 44
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
20 #include <mh.h> 20 #include <mh.h>
21 21
22 const char *argp_program_version = "mhpath (" PACKAGE_STRING ")"; 22 const char *argp_program_version = "mhpath (" PACKAGE_STRING ")";
23 static char doc[] = "GNU MH mhpath"; 23 static char doc[] = N_("GNU MH mhpath\v"
24 "Use -help to obtain the list of traditional MH options.");
24 static char args_doc[] = N_("[+folder] [msgs]"); 25 static char args_doc[] = N_("[+folder] [msgs]");
25 26
26 /* GNU options */ 27 /* GNU options */
27 static struct argp_option options[] = { 28 static struct argp_option options[] = {
28 {"folder", 'f', N_("FOLDER"), 0, N_("Specify folder to operate upon")}, 29 {"folder", 'f', N_("FOLDER"), 0, N_("Specify folder to operate upon")},
29 { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
30 { 0 } 30 { 0 }
31 }; 31 };
32 32
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
29 #include <dirent.h> 29 #include <dirent.h>
30 30
31 const char *argp_program_version = "rmf (" PACKAGE_STRING ")"; 31 const char *argp_program_version = "rmf (" PACKAGE_STRING ")";
32 static char doc[] = "GNU MH rmf"; 32 static char doc[] = N_("GNU MH rmf\v"
33 "Use -help to obtain the list of traditional MH options.");
33 static char args_doc[] = N_("[+folder]"); 34 static char args_doc[] = N_("[+folder]");
34 35
35 /* GNU options */ 36 /* GNU options */
...@@ -38,7 +39,6 @@ static struct argp_option options[] = { ...@@ -38,7 +39,6 @@ static struct argp_option options[] = {
38 {"interactive", 'i', N_("BOOL"), OPTION_ARG_OPTIONAL, 39 {"interactive", 'i', N_("BOOL"), OPTION_ARG_OPTIONAL,
39 N_("Interactive mode: ask for confirmation before removing each folder")}, 40 N_("Interactive mode: ask for confirmation before removing each folder")},
40 {"recursive", 'r', NULL, 0, N_("Recursively delete all subfolders")}, 41 {"recursive", 'r', NULL, 0, N_("Recursively delete all subfolders")},
41 { N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
42 { 0 } 42 { 0 }
43 }; 43 };
44 44
......
...@@ -361,13 +361,13 @@ main (int argc, char *argv[]) ...@@ -361,13 +361,13 @@ main (int argc, char *argv[])
361 { 361 {
362 if ((rc = wicket_create (&wicket, opts.tickets)) != 0) 362 if ((rc = wicket_create (&wicket, opts.tickets)) != 0)
363 { 363 {
364 mu_error (_("wicket create <%s> failed: %s\n"), 364 mu_error (_("wicket_create <%s> failed: %s"),
365 opts.tickets, mu_strerror (rc)); 365 opts.tickets, mu_strerror (rc));
366 goto cleanup; 366 goto cleanup;
367 } 367 }
368 if ((rc = wicket_get_ticket (wicket, &ticket, 0, 0)) != 0) 368 if ((rc = wicket_get_ticket (wicket, &ticket, 0, 0)) != 0)
369 { 369 {
370 mu_error (_("ticket get failed: %s\n"), mu_strerror (rc)); 370 mu_error (_("ticket_get failed: %s"), mu_strerror (rc));
371 goto cleanup; 371 goto cleanup;
372 } 372 }
373 sieve_set_ticket (mach, ticket); 373 sieve_set_ticket (mach, ticket);
...@@ -378,18 +378,18 @@ main (int argc, char *argv[]) ...@@ -378,18 +378,18 @@ main (int argc, char *argv[])
378 { 378 {
379 if ((rc = mu_debug_create (&debug, mach))) 379 if ((rc = mu_debug_create (&debug, mach)))
380 { 380 {
381 mu_error (_("mu_debug_create failed: %s\n"), mu_strerror (rc)); 381 mu_error (_("mu_debug_create failed: %s"), mu_strerror (rc));
382 goto cleanup; 382 goto cleanup;
383 } 383 }
384 if ((rc = mu_debug_set_level (debug, opts.debug_level))) 384 if ((rc = mu_debug_set_level (debug, opts.debug_level)))
385 { 385 {
386 mu_error (_("mu_debug_set_level failed: %s\n"), 386 mu_error (_("mu_debug_set_level failed: %s"),
387 mu_strerror (rc)); 387 mu_strerror (rc));
388 goto cleanup; 388 goto cleanup;
389 } 389 }
390 if ((rc = mu_debug_set_print (debug, debugfp, mach))) 390 if ((rc = mu_debug_set_print (debug, debugfp, mach)))
391 { 391 {
392 mu_error (_("mu_debug_set_print failed: %s\n"), 392 mu_error (_("mu_debug_set_print failed: %s"),
393 mu_strerror (rc)); 393 mu_strerror (rc));
394 goto cleanup; 394 goto cleanup;
395 } 395 }
...@@ -400,14 +400,14 @@ main (int argc, char *argv[]) ...@@ -400,14 +400,14 @@ main (int argc, char *argv[])
400 /* Create, give a ticket to, and open the mailbox. */ 400 /* Create, give a ticket to, and open the mailbox. */
401 if ((rc = mailbox_create_default (&mbox, opts.mbox)) != 0) 401 if ((rc = mailbox_create_default (&mbox, opts.mbox)) != 0)
402 { 402 {
403 mu_error (_("mailbox create <%s> failed: %s\n"), 403 mu_error (_("mailbox_create <%s> failed: %s"),
404 opts.mbox ? opts.mbox : _("default"), mu_strerror (rc)); 404 opts.mbox ? opts.mbox : _("default"), mu_strerror (rc));
405 goto cleanup; 405 goto cleanup;
406 } 406 }
407 407
408 if (debug && (rc = mailbox_set_debug (mbox, debug))) 408 if (debug && (rc = mailbox_set_debug (mbox, debug)))
409 { 409 {
410 mu_error (_("mailbox_set_debug failed: %s\n"), mu_strerror (rc)); 410 mu_error (_("mailbox_set_debug failed: %s"), mu_strerror (rc));
411 goto cleanup; 411 goto cleanup;
412 } 412 }
413 413
...@@ -447,7 +447,7 @@ main (int argc, char *argv[]) ...@@ -447,7 +447,7 @@ main (int argc, char *argv[])
447 447
448 if (rc != 0) 448 if (rc != 0)
449 { 449 {
450 mu_error (_("open on %s failed: %s\n"), 450 mu_error (_("open on %s failed: %s"),
451 opts.mbox ? opts.mbox : _("default"), mu_strerror (rc)); 451 opts.mbox ? opts.mbox : _("default"), mu_strerror (rc));
452 goto cleanup; 452 goto cleanup;
453 } 453 }
...@@ -465,7 +465,7 @@ cleanup: ...@@ -465,7 +465,7 @@ cleanup:
465 any messages that were marked DELETED even if execution failed 465 any messages that were marked DELETED even if execution failed
466 on a later message. */ 466 on a later message. */
467 if ((e = mailbox_expunge (mbox)) != 0) 467 if ((e = mailbox_expunge (mbox)) != 0)
468 mu_error (_("expunge on %s failed: %s\n"), 468 mu_error (_("expunge on %s failed: %s"),
469 opts.mbox ? opts.mbox : _("default"), mu_strerror (e)); 469 opts.mbox ? opts.mbox : _("default"), mu_strerror (e));
470 470
471 if (e && !rc) 471 if (e && !rc)
......