Removed the -width switch from send, spost and repl.
authormarkus schnalke <meillo@marmaro.de>
Sat, 28 Jan 2012 11:54:36 +0000 (12:54 +0100)
committermarkus schnalke <meillo@marmaro.de>
Sat, 28 Jan 2012 11:54:36 +0000 (12:54 +0100)
Adressee header fields will always be folded for OUTPUTLINELEN (=72) chars.

h/prototypes.h
man/mh-chart.man1
man/repl.man1
man/send.man1
uip/rcvdist.c
uip/repl.c
uip/replsbr.c
uip/send.c
uip/spost.c

index d80ab5a..699c8b8 100644 (file)
@@ -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 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 *,
                char *, char *, char *);
 int sendsbr(char **, int, char *, struct stat *, int);
 int what_now(char *, int, int, char *, char *, int, struct msgs *,
index 85ee909..178687d 100644 (file)
@@ -453,8 +453,6 @@ or
 .RB [ \-msgid " | " \-nomsgid ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-msgid " | " \-nomsgid ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
-.RB [ \-width
-.IR columns ]
 .I file
 .RB [ \-version ]
 .RB [ \-help ]
 .I file
 .RB [ \-version ]
 .RB [ \-help ]
@@ -561,8 +559,6 @@ all/to/cc/me]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-fcc
 .IR +folder ]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-fcc
 .IR +folder ]
-.RB [ \-width
-.IR columns ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
@@ -621,8 +617,6 @@ all/to/cc/me]
 .RB [ \-push " | " \-nopush ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-push " | " \-nopush ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
-.RB [ \-width
-.IR columns ]
 .RB [ file
 \&...]
 .RB [ \-version ]
 .RB [ file
 \&...]
 .RB [ \-version ]
index 9f8cc8f..a187483 100644 (file)
@@ -26,8 +26,6 @@ all/to/cc/me]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-fcc
 .IR +folder ]
 .RB [ \-mime " | " \-nomime ]
 .RB [ \-fcc
 .IR +folder ]
-.RB [ \-width
-.IR columns ]
 .RB [ \-editor
 .IR editor ]
 .RB [ \-noedit ]
 .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.
 .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)
 .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 ` \-inplace '
 .RB ` \-nomime '
 .RB ` \-noquery '
-.RB ` "\-width\ 72" '
 .fi
 
 .SH CONTEXT
 .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
 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
 If
 .I whatnowproc
 is
index 3cb64ab..e4ee40c 100644 (file)
@@ -18,8 +18,6 @@ send \- send a message
 .RB [ \-push " | " \-nopush ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
 .RB [ \-push " | " \-nopush ]
 .RB [ \-verbose " | " \-noverbose ]
 .RB [ \-watch " | " \-nowatch ]
-.RB [ \-width
-.IR columns ]
 .RB [ msg
 \&...]
 .RB [ \-version ]
 .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
 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
 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 ` \-nopush '
 .RB ` \-noverbose '
 .RB ` \-nowatch '
-.RB ` "\-width\ 72" '
 .fi
 
 .SH CONTEXT
 .fi
 
 .SH CONTEXT
index 077f912..898073f 100644 (file)
@@ -135,8 +135,6 @@ main(int argc, char **argv)
 
 #define SBUFSIZ 256
 
 
 #define SBUFSIZ 256
 
-static int outputlinelen = OUTPUTLINELEN;
-
 static struct format *fmt;
 
 static int ncomps = 0;
 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;
        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);
 
        fmt_scan(fmt, scanl, i, dat);
        fputs(scanl, out);
 
index 3b49004..6231d46 100644 (file)
@@ -53,17 +53,15 @@ static struct swit switches[] = {
        { "whatnowproc program", 0 },
 #define NWHATSW  20
        { "nowhatnowproc", 0 },
        { "whatnowproc program", 0 },
 #define NWHATSW  20
        { "nowhatnowproc", 0 },
-#define WIDTHSW  21
-       { "width columns", 0 },
-#define VERSIONSW  22
+#define VERSIONSW  21
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  23
+#define HELPSW  22
        { "help", 0 },
        { "help", 0 },
-#define FILESW  24
+#define FILESW  23
        { "file file", 4 },  /* interface from msh */
 
 #ifdef MHE
        { "file file", 4 },  /* interface from msh */
 
 #ifdef MHE
-#define BILDSW  25
+#define BILDSW  24
        { "build", 5 },  /* interface from mhe */
 #endif
 
        { "build", 5 },  /* interface from mhe */
 #endif
 
@@ -87,7 +85,6 @@ short cccc = -1;
 short ccme = -1;
 short querysw = 0;
 
 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 */
 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;
 
                                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 == '@') {
                        }
                }
                if (*cp == '+' || *cp == '@') {
@@ -358,7 +347,7 @@ main(int argc, char **argv)
                        form = etcpath(replcomps);
        }
 
                        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)
        fclose(in);
 
        if (nwhat)
index 2cdd847..907465e 100644 (file)
@@ -66,7 +66,7 @@ static void replfilter(FILE *, FILE *, char *);
 
 
 void
 
 
 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;
        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[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);
        dat[4] = 0;
        fmt_scan(fmt, scanl, i, dat);
        fputs(scanl, out);
index e77f2b1..c19cf4f 100644 (file)
@@ -45,11 +45,9 @@ static struct swit switches[] = {
        { "watch", 0 },
 #define NWATCSW  15
        { "nowatch", 0 },
        { "watch", 0 },
 #define NWATCSW  15
        { "nowatch", 0 },
-#define WIDTHSW  16
-       { "width columns", 0 },
-#define VERSIONSW  17
+#define VERSIONSW  16
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  18
+#define HELPSW  17
        { "help", 0 },
        { NULL, 0 }
 };
        { "help", 0 },
        { NULL, 0 }
 };
@@ -152,7 +150,6 @@ main(int argc, char **argv)
 
                        case ALIASW:
                        case FILTSW:
 
                        case ALIASW:
                        case FILTSW:
-                       case WIDTHSW:
                                vec[vecp++] = --cp;
                                if (!(cp = *argp++) || *cp == '-')
                                        adios(NULL, "missing argument to %s",
                                vec[vecp++] = --cp;
                                if (!(cp = *argp++) || *cp == '-')
                                        adios(NULL, "missing argument to %s",
index 8c55c06..947904e 100644 (file)
@@ -50,23 +50,21 @@ struct swit switches[] = {
        { "alias aliasfile", 0 },
 #define NALIASW  13
        { "noalias", 0 },
        { "alias aliasfile", 0 },
 #define NALIASW  13
        { "noalias", 0 },
-#define WIDTHSW  14
-       { "width columns", 0 },
-#define VERSIONSW  15
+#define VERSIONSW  14
        { "version", 0 },
        { "version", 0 },
-#define HELPSW  16
+#define HELPSW  15
        { "help", 0 },
        { "help", 0 },
-#define DEBUGSW  17
+#define DEBUGSW  16
        { "debug", -5 },
        { "debug", -5 },
-#define DISTSW  18
+#define DISTSW  17
        { "dist", -4 },  /* interface from dist */
        { "dist", -4 },  /* interface from dist */
-#define PUSHSW  19  /* fork to sendmail then exit */
+#define PUSHSW  18  /* fork to sendmail then exit */
        { "push", -4 },
        { "push", -4 },
-#define NPUSHSW  20  /* exec sendmail */
+#define NPUSHSW  19  /* exec sendmail */
        { "nopush", -6 },
        { "nopush", -6 },
-#define LIBSW  21
+#define LIBSW  20
        { "library directory", -7 },
        { "library directory", -7 },
-#define ANNOSW  22
+#define ANNOSW  21
        { "idanno number", -6 },
        { NULL, 0 }
 };
        { "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 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 */
 
 
 static unsigned msgflags = 0;  /* what we've seen */
 
@@ -295,15 +292,6 @@ main(int argc, char **argv)
                                aliasflg = 0;
                                continue;
 
                                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",
                        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;
        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;
                fprintf( out, ",\n%*s", indent, "");
                linepos = indent;
                pos += indent + 2;