From c89046c5551c9d22af39898dd39354fd4f5cae44 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 15 Feb 1995 19:41:38 +0000 Subject: Various nitpicking from Stephen. Reviewed by: phk Submitted by: Stephen McKay --- usr.sbin/ctm/ctm_rmail/ctm_rmail.1 | 4 ++-- usr.sbin/ctm/ctm_rmail/ctm_rmail.c | 6 ++---- usr.sbin/ctm/ctm_rmail/options.h | 3 +-- usr.sbin/ctm/ctm_smail/ctm_smail.c | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) (limited to 'usr.sbin/ctm') diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 b/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 index 8cca132..24b90ac 100644 --- a/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 +++ b/usr.sbin/ctm/ctm_rmail/ctm_rmail.1 @@ -135,7 +135,7 @@ and processed with a single command. .Sh FILE FORMAT Following are the important parts of an actual (very small) delta piece: .Bd -literal -From: src-cur-owner +From: owner-src-cur To: src-cur Subject: ctm-mail src-cur.0003.gz 1/4 @@ -160,7 +160,7 @@ If the delta exceeds .Ar maxctmsize , then a message like this will be received instead: .Bd -literal -From: src-cur-owner +From: owner-src-cur To: src-cur Subject: ctm-notice src-cur.0999.gz diff --git a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c index e4be5a4..0f45d6b 100644 --- a/usr.sbin/ctm/ctm_rmail/ctm_rmail.c +++ b/usr.sbin/ctm/ctm_rmail/ctm_rmail.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -47,7 +46,6 @@ int decode_line(char *line, char *out_buf); * reflected in the exit status. In this case, the delta is left in * 'deltadir'. */ - int main(int argc, char **argv) { @@ -67,7 +65,7 @@ main(int argc, char **argv) if (delta_dir == NULL) usage(); - if (piece_dir == NULL && (base_dir == NULL || argc>1)) + if (piece_dir == NULL && (base_dir == NULL || argc > 1)) usage(); if (log_file != NULL) @@ -234,7 +232,7 @@ read_piece(char *input_file) { char *s; - if (sscanf(line, "CTM_MAIL BEGIN %s %d %d %c", + if (sscanf(line, "CTM_MAIL BEGIN %s %d %d %c", delta, &pce, &npieces, junk) != 3) continue; diff --git a/usr.sbin/ctm/ctm_rmail/options.h b/usr.sbin/ctm/ctm_rmail/options.h index 2106199..f0d96c8 100644 --- a/usr.sbin/ctm/ctm_rmail/options.h +++ b/usr.sbin/ctm/ctm_rmail/options.h @@ -88,6 +88,7 @@ pusage() while (O_cont) \ switch (*++*argv) \ { \ + default: \ case '-': \ usage(); \ case '\0': \ @@ -130,8 +131,6 @@ pusage() #define ENDOPTS \ break; \ - default: \ - usage(); \ } \ } \ *--argv = O_name; \ diff --git a/usr.sbin/ctm/ctm_smail/ctm_smail.c b/usr.sbin/ctm/ctm_smail/ctm_smail.c index 28fd8d9..df09070 100644 --- a/usr.sbin/ctm/ctm_smail/ctm_smail.c +++ b/usr.sbin/ctm/ctm_smail/ctm_smail.c @@ -36,6 +36,7 @@ void apologise(char *delta, off_t ctm_size, long max_ctm_size, FILE *open_sendmail(void); int close_sendmail(FILE *fp); + int main(int argc, char **argv) { @@ -236,7 +237,7 @@ write_header(FILE *sfp, char *mail_alias, char *delta, int pce, int npieces) else sn++; - fprintf(sfp, "From: %s-owner\n", mail_alias); + fprintf(sfp, "From: owner-%s\n", mail_alias); fprintf(sfp, "To: %s\n", mail_alias); fprintf(sfp, "Subject: ctm-mail %s %d/%d\n\n", sn, pce, npieces); -- cgit v1.1