Mercurial > hg > mlmmj
changeset 102:713e9d076c26
Clean up and extend help everywhere.
Remove unused code from mlmmj-bounce.
author | mmj |
---|---|
date | Sat, 22 May 2004 23:57:12 +1000 |
parents | a19c8b8a8748 |
children | bf4390ecc30b |
files | src/mlmmj-bounce.c src/mlmmj-process.c src/mlmmj-recieve.c src/mlmmj-send.c src/mlmmj-sub.c src/mlmmj-unsub.c |
diffstat | 6 files changed, 63 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mlmmj-bounce.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-bounce.c Sat May 22 23:57:12 2004 +1000 @@ -24,15 +24,19 @@ static void print_help(const char *prg) { - printf("Usage: %s [-P] -L /path/to/chat-list\n" - " -a address\n" - " -n message-number\n", prg); + printf("Usage: %s -L /path/to/list -a john=doe.org -n 12\n" + " -a: Address string that bounces\n" + " -h: This help\n" + " -L: Full path to list directory\n" + " -n: Message number in the archive\n" + " -V: Print version\n", prg); + exit(EXIT_SUCCESS); } int main(int argc, char **argv) { - int opt, noprocess = 0; + int opt; char *listdir = NULL, *address = NULL, *number = NULL; char *filename, *bfilename, *a, *buf; size_t len; @@ -42,7 +46,7 @@ log_set_name(argv[0]); - while ((opt = getopt(argc, argv, "hVPL:a:n:")) != -1) { + while ((opt = getopt(argc, argv, "hVL:a:n:")) != -1) { switch(opt) { case 'L': listdir = optarg; @@ -56,9 +60,6 @@ case 'h': print_help(argv[0]); break; - case 'P': - noprocess = 1; - break; case 'V': print_version(argv[0]); exit(0);
--- a/src/mlmmj-process.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-process.c Sat May 22 23:57:12 2004 +1000 @@ -137,8 +137,13 @@ static void print_help(const char *prg) { - printf("Usage: %s [-P] -L /path/to/chat-list\n" - " -m mailfile\n", prg); + printf("Usage: %s -L /path/to/list -m /path/to/mail [-h] [-P] [-V]\n" + " -h: This help\n" + " -L: Full path to list directory\n" + " -m: Full path to mail file\n" + " -P: Don't execute mlmmj-send\n" + " -V: Print version\n", prg); + exit(EXIT_SUCCESS); }
--- a/src/mlmmj-recieve.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-recieve.c Sat May 22 23:57:12 2004 +1000 @@ -26,7 +26,12 @@ static void print_help(const char *prg) { - printf("Usage: %s -L /path/to/chat-list [-V] [-P] [-F]\n", prg); + printf("Usage: %s -L /path/to/listdir [-h] [-V] [-P] [-F]\n" + " -h: This help\n" + " -F: Don't fork in the background\n" + " -L: Full path to list directory\n" + " -P: Don't execute mlmmj-process\n" + " -V: Print version\n", prg); exit(EXIT_SUCCESS); }
--- a/src/mlmmj-send.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-send.c Sat May 22 23:57:12 2004 +1000 @@ -35,12 +35,6 @@ static int conncount = 0; /* Connection count */ -static void print_help(const char *prg) -{ - printf("Usage: %s -L /path/to/chat-list -m /path/to/mail\n", prg); - exit(EXIT_SUCCESS); -} - char *bounce_from_adr(const char *recipient, const char *listadr, const char *mailfilename) { @@ -271,6 +265,26 @@ conncount--; } +static void print_help(const char *prg) +{ + printf("Usage: %s [-L /path/to/list || -l listctrl] -m /path/to/mail " + "[-D] [-F] [-h]\n" + " [-r] [-R] [-T] [-V]\n" + " -D: Don't delete the mail after it's sent\n" + " -F: What to use as MAIL FROM:\n" + " -h: This help\n" + " -l: List control variable:\n" + " '1' means 'send a single mail'\n" + " '2' means 'mail to moderators'\n" + " -L: Full path to list directory\n" + " -m: Full path to mail file\n" + " -r: Relayhost (defaults to localhost)\n" + " -R: What to use as Reply-To: header\n" + " -T: What to use as RCPT TO:\n" + " -V: Print version\n", prg); + exit(EXIT_SUCCESS); +} + int main(int argc, char **argv) { size_t len = 0;
--- a/src/mlmmj-sub.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-sub.c Sat May 22 23:57:12 2004 +1000 @@ -191,12 +191,16 @@ static void print_help(const char *prg) { - printf("Usage: %s -L /path/to/chat-list\n" - " -a someguy@somewhere.ltd\n" - " -C request mail confirmation\n" - " -c send welcome mail\n" - " -h this help\n" - " -V print version\n", prg); + printf("Usage: %s -L /path/to/list -a john@doe.org " + "[-c] [-C] [-h] [-L] [-V]\n" + " -a: Email address to subscribe \n" + " -c: Send welcome mail\n" + " -C: Request mail confirmation\n" + " -h: This help\n" + " -L: Full path to list directory\n" + " -V: Print version\n" + "When no options are specified, subscription silently " + "happens\n", prg); exit(EXIT_SUCCESS); }
--- a/src/mlmmj-unsub.c Sat May 22 23:56:44 2004 +1000 +++ b/src/mlmmj-unsub.c Sat May 22 23:57:12 2004 +1000 @@ -227,12 +227,16 @@ static void print_help(const char *prg) { - printf("Usage: %s -L /path/to/chat-list\n" - " -a someguy@somewhere.tld\n" - " -C request mail confirmation\n" - " -c send goodbye mail\n" - " -h this help\n" - " -V print version\n", prg); + printf("Usage: %s -L /path/to/list -a john@doe.org " + "[-c] [-C] [-h] [-L] [-V]\n" + " -a: Email address to unsubscribe \n" + " -c: Send goodbye mail\n" + " -C: Request mail confirmation\n" + " -h: This help\n" + " -L: Full path to list directory\n" + " -V: Print version\n" + "When no options are specified, unsubscription silently " + "happens\n", prg); exit(EXIT_SUCCESS); }