From: markus schnalke Date: Sat, 28 Jan 2012 11:54:36 +0000 (+0100) Subject: Removed the -width switch from send, spost and repl. X-Git-Tag: mmh-thesis-end~401 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=869aa60129811d7b160f353892dc5956a8aaac22 Removed the -width switch from send, spost and repl. Adressee header fields will always be folded for OUTPUTLINELEN (=72) chars. --- diff --git a/h/prototypes.h b/h/prototypes.h index d80ab5a..699c8b8 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -150,7 +150,7 @@ int annotate(char *, char *, char *, int, int, int, int); void annolist(char *, char *, char *, int); void annopreserve(int); int distout(char *, char *, char *); -void replout(FILE *, char *, char *, struct msgs *, int, int, +void replout(FILE *, char *, char *, struct msgs *, int, char *, char *, char *); int sendsbr(char **, int, char *, struct stat *, int); int what_now(char *, int, int, char *, char *, int, struct msgs *, diff --git a/man/mh-chart.man1 b/man/mh-chart.man1 index 85ee909..178687d 100644 --- a/man/mh-chart.man1 +++ b/man/mh-chart.man1 @@ -453,8 +453,6 @@ or .RB [ \-msgid " | " \-nomsgid ] .RB [ \-verbose " | " \-noverbose ] .RB [ \-watch " | " \-nowatch ] -.RB [ \-width -.IR columns ] .I file .RB [ \-version ] .RB [ \-help ] @@ -561,8 +559,6 @@ all/to/cc/me] .RB [ \-mime " | " \-nomime ] .RB [ \-fcc .IR +folder ] -.RB [ \-width -.IR columns ] .RB [ \-editor .IR editor ] .RB [ \-noedit ] @@ -621,8 +617,6 @@ all/to/cc/me] .RB [ \-push " | " \-nopush ] .RB [ \-verbose " | " \-noverbose ] .RB [ \-watch " | " \-nowatch ] -.RB [ \-width -.IR columns ] .RB [ file \&...] .RB [ \-version ] diff --git a/man/repl.man1 b/man/repl.man1 index 9f8cc8f..a187483 100644 --- a/man/repl.man1 +++ b/man/repl.man1 @@ -26,8 +26,6 @@ all/to/cc/me] .RB [ \-mime " | " \-nomime ] .RB [ \-fcc .IR +folder ] -.RB [ \-width -.IR columns ] .RB [ \-editor .IR editor ] .RB [ \-noedit ] @@ -178,12 +176,7 @@ positive and negative form, is important. .PP Lines beginning with the fields \*(lqTo:\*(rq, \*(lqCc:\*(rq, and \*(rqBcc:\*(rq will be standardized and have duplicate addresses removed. -In addition, the -.B \-width -.I columns -switch will guide -.BR repl 's -formatting of these fields. +In addition, these fields will be wrapped at a reasonable length. .PP See .BR comp (1) @@ -449,7 +442,6 @@ mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5) .RB ` \-inplace ' .RB ` \-nomime ' .RB ` \-noquery ' -.RB ` "\-width\ 72" ' .fi .SH CONTEXT @@ -465,12 +457,6 @@ uses the sender's host. Moral of the story: if you're going to include addresses in a reply template, include the host portion of the address. .PP -The -.B \-width -.I columns -switch is only used to do address-folding; other -headers are not line\-wrapped. -.PP If .I whatnowproc is diff --git a/man/send.man1 b/man/send.man1 index 3cb64ab..e4ee40c 100644 --- a/man/send.man1 +++ b/man/send.man1 @@ -18,8 +18,6 @@ send \- send a message .RB [ \-push " | " \-nopush ] .RB [ \-verbose " | " \-noverbose ] .RB [ \-watch " | " \-nowatch ] -.RB [ \-width -.IR columns ] .RB [ msg \&...] .RB [ \-version ] @@ -199,13 +197,6 @@ appear to any non\-Bcc receivers of the message. That is, it will have the appended fields and field reformatting. The \*(lqFcc:\*(rq fields will be removed from all outgoing copies of the message. .PP -By using the -.B \-width -.I columns -switch, the user can direct -.B send -as to how long it should make header lines containing addresses. -.PP The files specified by the profile entry \*(lqAliasfile:\*(rq and any additional alias files given by the .B \-alias @@ -252,7 +243,6 @@ comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8) .RB ` \-nopush ' .RB ` \-noverbose ' .RB ` \-nowatch ' -.RB ` "\-width\ 72" ' .fi .SH CONTEXT diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 077f912..898073f 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -135,8 +135,6 @@ main(int argc, char **argv) #define SBUFSIZ 256 -static int outputlinelen = OUTPUTLINELEN; - static struct format *fmt; static int ncomps = 0; @@ -254,7 +252,7 @@ finished: ; i = format_len + char_read + 256; scanl = mh_xmalloc((size_t) i + 2); dat[0] = dat[1] = dat[2] = dat[4] = 0; - dat[3] = outputlinelen; + dat[3] = OUTPUTLINELEN; fmt_scan(fmt, scanl, i, dat); fputs(scanl, out); diff --git a/uip/repl.c b/uip/repl.c index 3b49004..6231d46 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -53,17 +53,15 @@ static struct swit switches[] = { { "whatnowproc program", 0 }, #define NWHATSW 20 { "nowhatnowproc", 0 }, -#define WIDTHSW 21 - { "width columns", 0 }, -#define VERSIONSW 22 +#define VERSIONSW 21 { "version", 0 }, -#define HELPSW 23 +#define HELPSW 22 { "help", 0 }, -#define FILESW 24 +#define FILESW 23 { "file file", 4 }, /* interface from msh */ #ifdef MHE -#define BILDSW 25 +#define BILDSW 24 { "build", 5 }, /* interface from mhe */ #endif @@ -87,7 +85,6 @@ short cccc = -1; short ccme = -1; short querysw = 0; -short outputlinelen = OUTPUTLINELEN; short groupreply = 0; /* Is this a group reply? */ int mime = 0; /* include original as MIME part */ @@ -263,14 +260,6 @@ main(int argc, char **argv) querysw = 0; continue; - case WIDTHSW: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", - argp[-2]); - if ((outputlinelen = atoi(cp)) < 10) - adios(NULL, "impossible width %d", - outputlinelen); - continue; } } if (*cp == '+' || *cp == '@') { @@ -358,7 +347,7 @@ main(int argc, char **argv) form = etcpath(replcomps); } - replout(in, msg, drft, mp, outputlinelen, mime, form, filter, fcc); + replout(in, msg, drft, mp, mime, form, filter, fcc); fclose(in); if (nwhat) diff --git a/uip/replsbr.c b/uip/replsbr.c index 2cdd847..907465e 100644 --- a/uip/replsbr.c +++ b/uip/replsbr.c @@ -66,7 +66,7 @@ static void replfilter(FILE *, FILE *, char *); void -replout(FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen, +replout(FILE *inb, char *msg, char *drft, struct msgs *mp, int mime, char *form, char *filter, char *fcc) { register int state, i; @@ -236,7 +236,7 @@ finished: dat[0] = 0; dat[1] = 0; dat[2] = 0; - dat[3] = outputlinelen; + dat[3] = OUTPUTLINELEN; dat[4] = 0; fmt_scan(fmt, scanl, i, dat); fputs(scanl, out); diff --git a/uip/send.c b/uip/send.c index e77f2b1..c19cf4f 100644 --- a/uip/send.c +++ b/uip/send.c @@ -45,11 +45,9 @@ static struct swit switches[] = { { "watch", 0 }, #define NWATCSW 15 { "nowatch", 0 }, -#define WIDTHSW 16 - { "width columns", 0 }, -#define VERSIONSW 17 +#define VERSIONSW 16 { "version", 0 }, -#define HELPSW 18 +#define HELPSW 17 { "help", 0 }, { NULL, 0 } }; @@ -152,7 +150,6 @@ main(int argc, char **argv) case ALIASW: case FILTSW: - case WIDTHSW: vec[vecp++] = --cp; if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", diff --git a/uip/spost.c b/uip/spost.c index 8c55c06..947904e 100644 --- a/uip/spost.c +++ b/uip/spost.c @@ -50,23 +50,21 @@ struct swit switches[] = { { "alias aliasfile", 0 }, #define NALIASW 13 { "noalias", 0 }, -#define WIDTHSW 14 - { "width columns", 0 }, -#define VERSIONSW 15 +#define VERSIONSW 14 { "version", 0 }, -#define HELPSW 16 +#define HELPSW 15 { "help", 0 }, -#define DEBUGSW 17 +#define DEBUGSW 16 { "debug", -5 }, -#define DISTSW 18 +#define DISTSW 17 { "dist", -4 }, /* interface from dist */ -#define PUSHSW 19 /* fork to sendmail then exit */ +#define PUSHSW 18 /* fork to sendmail then exit */ { "push", -4 }, -#define NPUSHSW 20 /* exec sendmail */ +#define NPUSHSW 19 /* exec sendmail */ { "nopush", -6 }, -#define LIBSW 21 +#define LIBSW 20 { "library directory", -7 }, -#define ANNOSW 22 +#define ANNOSW 21 { "idanno number", -6 }, { NULL, 0 } }; @@ -143,7 +141,6 @@ static int watch = 0; /* watch the delivery process */ static int backflg = 0; /* rename input file as *.bak when done */ static int pushflg = 0; /* if going to fork to sendmail */ static int aliasflg = 0; /* if going to process aliases */ -static int outputlinelen=72; static unsigned msgflags = 0; /* what we've seen */ @@ -295,15 +292,6 @@ main(int argc, char **argv) aliasflg = 0; continue; - case WIDTHSW: - if (!(cp = *argp++) || *cp == '-') - adios(NULL, "missing argument to %s", - argp[-2]); - outputlinelen = atoi(cp); - if (outputlinelen <= 10) - outputlinelen = 72; - continue; - case LIBSW: if (!(cp = *argp++) || *cp == '-') adios(NULL, "missing argument to %s", @@ -713,7 +701,7 @@ putone(char *adr, int pos, int indent) len = strlen( adr ); if (pos == indent) linepos = pos; - else if (linepos+len > outputlinelen) { + else if (linepos+len > OUTPUTLINELEN) { fprintf( out, ",\n%*s", indent, ""); linepos = indent; pos += indent + 2;