Removed confusing print_help() function.
Showing
1 changed file
with
5 additions
and
35 deletions
... | @@ -28,9 +28,6 @@ int lock_timeout = 300; | ... | @@ -28,9 +28,6 @@ int lock_timeout = 300; |
28 | #define MAXFD 64 | 28 | #define MAXFD 64 |
29 | #define EX_QUOTA() (ex_quota_tempfail ? EX_TEMPFAIL : EX_UNAVAILABLE) | 29 | #define EX_QUOTA() (ex_quota_tempfail ? EX_TEMPFAIL : EX_UNAVAILABLE) |
30 | 30 | ||
31 | static void print_help (void); | ||
32 | static void print_license (void); | ||
33 | static void print_version (void); | ||
34 | void close_fds (); | 31 | void close_fds (); |
35 | int switch_user_id (uid_t uid); | 32 | int switch_user_id (uid_t uid); |
36 | FILE *make_tmp (const char *from, char **tempfile); | 33 | FILE *make_tmp (const char *from, char **tempfile); |
... | @@ -183,7 +180,10 @@ main (int argc, char *argv[]) | ... | @@ -183,7 +180,10 @@ main (int argc, char *argv[]) |
183 | argv += arg_index; | 180 | argv += arg_index; |
184 | 181 | ||
185 | if (!argc) | 182 | if (!argc) |
186 | print_help (); | 183 | { |
184 | mu_error ("Missing arguments. Try --help for more info"); | ||
185 | return EX_USAGE; | ||
186 | } | ||
187 | 187 | ||
188 | maildir = mu_normalize_maildir (maildir); | 188 | maildir = mu_normalize_maildir (maildir); |
189 | if (!maildir) | 189 | if (!maildir) |
... | @@ -730,37 +730,7 @@ guess_retval (int ec) | ... | @@ -730,37 +730,7 @@ guess_retval (int ec) |
730 | exit_code = EX_UNAVAILABLE; | 730 | exit_code = EX_UNAVAILABLE; |
731 | } | 731 | } |
732 | 732 | ||
733 | void | 733 | |
734 | print_help () | ||
735 | { | ||
736 | static char help_message[] = | ||
737 | "Usage: mail.local [OPTIONS] recipient [recipient...]\n" | ||
738 | "Options are:\n" | ||
739 | " -f, --from ADDR Specify the sender's name\n" | ||
740 | " -h, --help Display this help and exit\n" | ||
741 | " -L, --license Display GNU General Public License\n" | ||
742 | " -m, --maildir PATH Specify path to mailspool directory\n" | ||
743 | #ifdef USE_DBM | ||
744 | " -q, --quota-db FILE Specify path to quota database.\n" | ||
745 | #endif | ||
746 | #ifdef WITH_GUILE | ||
747 | " -s, --source PATTERN Set name pattern for user-defined mail filters.\n" | ||
748 | #endif | ||
749 | " -t, --timeout NUMBER Set timeout for acquiring the lockfile\n" | ||
750 | #ifdef WITH_GUILE | ||
751 | " -x, --debug guile Start with guile debugging evaluator and backtraces\n" | ||
752 | #endif | ||
753 | " -x, --debug NUMBER Set debugging level\n" | ||
754 | " -v, --version Display program version and exit.\n" | ||
755 | " --ex-multiple-delivery-success Don't return errors when delivering to\n" | ||
756 | " multiple recipients\n" | ||
757 | " --ex-quota-tempfail Return temporary failure if disk or mailbox quota\n" | ||
758 | " is exceeded\n" | ||
759 | "\nReport bugs to bug-mailutils@gnu.org\n"; | ||
760 | |||
761 | printf ("%s", help_message); | ||
762 | exit (0); | ||
763 | } | ||
764 | 734 | ||
765 | 735 | ||
766 | 736 | ... | ... |
-
Please register or sign in to post a comment