From: markus schnalke Date: Sat, 28 Jan 2012 11:26:36 +0000 (+0100) Subject: Removed options to deactivate dashstuffing. Always dashstuff. X-Git-Tag: mmh-thesis-end~402 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=4d4f3e6367922ac4237d87ccfb070dbbcb6ff6be Removed options to deactivate dashstuffing. Always dashstuff. Maybe there are few RFC 934 messages around, but dashstuffing is IMO more useful than bad. --- diff --git a/docs/COMPLETION-BASH b/docs/COMPLETION-BASH index 806c934..73f5efc 100644 --- a/docs/COMPLETION-BASH +++ b/docs/COMPLETION-BASH @@ -60,7 +60,7 @@ _nmh() options=(-annotate -noannotate -form -format -noformat -filter -inplace -noinplace -mime -nomime -editor -noedit -whatnowproc - -nowhatnowproc -dashstuffing -nodashstuffing -build -file + -nowhatnowproc -build -file -version -help) ;; inc ) diff --git a/man/forw.man1 b/man/forw.man1 index 5f99bfa..4ed1f42 100644 --- a/man/forw.man1 +++ b/man/forw.man1 @@ -24,7 +24,6 @@ forw \- forward messages .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] -.RB [ \-dashstuffing " | " \-nodashstuffing ] .RB [ \-build ] .RB [ \-file .IR msgfile ] @@ -164,10 +163,7 @@ By default, any dashes in the first column of the forwarded messages will be prepended with `\-\ ' so that when received, the message is suitable for bursting by .BR burst . -This follows the Internet RFC\-934 guidelines. You may use the flag -.B \-nodashstuffing -in order -to suppress this form of quoting to the forwarded messages. +This follows the Internet RFC\-934 guidelines. .PP For users of .BR prompter , @@ -319,7 +315,6 @@ mhbuild(1), comp(1), repl(1), send(1), whatnow(1), mh\-format(5), .RB ` \-noannotate ' .RB ` \-noformat ' .RB ` \-inplace ' -.RB ` \-dashstuffing ' .RB ` \-nomime ' .fi diff --git a/man/mh-chart.man1 b/man/mh-chart.man1 index 94000d7..85ee909 100644 --- a/man/mh-chart.man1 +++ b/man/mh-chart.man1 @@ -188,7 +188,6 @@ is equivalent to .RB [ \-whatnowproc .IR program ] .RB [ \-nowhatnowproc ] -.RB [ \-dashstuffing " | " \-nodashstuffing ] .RB [ \-build ] .RB [ \-file .IR msgfile ] diff --git a/uip/forw.c b/uip/forw.c index b0d4601..9cdb793 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -51,15 +51,11 @@ static struct swit switches[] = { { "whatnowproc program", 0 }, #define NWHATSW 16 { "nowhatnowproc", 0 }, -#define BITSTUFFSW 17 - { "dashstuffing", 0 }, /* interface to mhl */ -#define NBITSTUFFSW 18 - { "nodashstuffing", 0 }, -#define VERSIONSW 19 +#define VERSIONSW 17 { "version", 0 }, -#define HELPSW 20 +#define HELPSW 18 { "help", 0 }, -#define FILESW 21 +#define FILESW 19 { "file file", 4 }, /* interface from msh */ #ifdef MHE @@ -83,8 +79,8 @@ static struct msgs *mp = NULL; /* used a lot */ /* ** static prototypes */ -static void mhl_draft(int, char *, int, int, char *, char *, int); -static void copy_draft(int, char *, char *, int, int, int); +static void mhl_draft(int, char *, int, int, char *, char *); +static void copy_draft(int, char *, char *, int, int); static void add_forw_hdr(char *); static int build_form(char *, char *, int, int); @@ -93,7 +89,7 @@ int main(int argc, char **argv) { int msgp = 0, anot = 0, inplace = 1, mime = 0; - int issue = 0, volume = 0, dashstuff = 0; + int issue = 0, volume = 0; int nedit = 0, nwhat = 0, in; int out, msgnum; char *cp, *cwd, *maildir; @@ -231,13 +227,6 @@ main(int argc, char **argv) adios(NULL, "bad argument %s %s", argp[-2], cp); continue; - - case BITSTUFFSW: - dashstuff = 1; /* trinary logic */ - continue; - case NBITSTUFFSW: - dashstuff = -1; /* trinary logic */ - continue; } } if (*cp == '+' || *cp == '@') { @@ -342,15 +331,13 @@ main(int argc, char **argv) ** messages into the draft using mhlproc. */ if (filter) { - mhl_draft(out, digest, volume, issue, drft, filter, - dashstuff); + mhl_draft(out, digest, volume, issue, drft, filter); close(out); } else if (mime) { close(out); add_forw_hdr(drft); } else { - copy_draft(out, digest, drft, volume, issue, - dashstuff); + copy_draft(out, digest, drft, volume, issue); close(out); } @@ -385,7 +372,7 @@ main(int argc, char **argv) */ static void mhl_draft(int out, char *digest, int volume, int issue, - char *file, char *filter, int dashstuff) + char *file, char *filter) { pid_t child_id; int i, msgnum, pd[2]; @@ -425,16 +412,6 @@ mhl_draft(int out, char *digest, int volume, int issue, vec[i++] = buf2; } - /* - ** Are we dashstuffing (quoting) the lines that begin - ** with `-'. We use the mhl default (don't add any - ** flag) unless the user has specified a specific flag. - */ - if (dashstuff > 0) - vec[i++] = "-dashstuffing"; - else if (dashstuff < 0) - vec[i++] = "-nodashstuffing"; - if (mp->numsel >= MAXARGS - i) adios(NULL, "more than %d messages for %s exec", MAXARGS - i, vec[0]); @@ -468,12 +445,10 @@ mhl_draft(int out, char *digest, int volume, int issue, /* ** Copy the messages into the draft. The messages are -** not filtered through the mhlproc. Do dashstuffing if -** necessary. +** not filtered through the mhlproc. Do dashstuffing. */ static void -copy_draft(int out, char *digest, char *file, int volume, int issue, - int dashstuff) +copy_draft(int out, char *digest, char *file, int volume, int issue) { int fd,i, msgcnt, msgnum; int len, buflen; @@ -517,12 +492,8 @@ copy_draft(int out, char *digest, char *file, int volume, int issue, /* ** Copy the message. Add RFC934 quoting (dashstuffing) - ** unless given the -nodashstuffing flag. */ - if (dashstuff >= 0) - cpydgst(fd, out, msgnam, file); - else - cpydata(fd, out, msgnam, file); + cpydgst(fd, out, msgnam, file); close(fd); msgcnt++; diff --git a/uip/mhlsbr.c b/uip/mhlsbr.c index 1764aa5..786178d 100644 --- a/uip/mhlsbr.c +++ b/uip/mhlsbr.c @@ -63,25 +63,21 @@ static struct swit mhlswitches[] = { { "width columns", 0 }, #define SLEEPSW 10 { "sleep seconds", 0 }, -#define BITSTUFFSW 11 - { "dashstuffing", -12 }, /* interface from forw */ -#define NBITSTUFFSW 12 - { "nodashstuffing", -14 }, /* interface from forw */ -#define VERSIONSW 13 +#define VERSIONSW 11 { "version", 0 }, -#define HELPSW 14 +#define HELPSW 12 { "help", 0 }, -#define FORW1SW 15 +#define FORW1SW 13 { "forward", -7 }, /* interface from forw */ -#define FORW2SW 16 +#define FORW2SW 14 { "forwall", -7 }, /* interface from forw */ -#define DGSTSW 17 +#define DGSTSW 15 { "digest list", -6 }, -#define VOLUMSW 18 +#define VOLUMSW 16 { "volume number", -6 }, -#define ISSUESW 19 +#define ISSUESW 17 { "issue number", -5 }, -#define NBODYSW 20 +#define NBODYSW 18 { "nobody", -6 }, { NULL, 0 } }; @@ -189,7 +185,6 @@ static struct triple triples[] = { static int bellflg = 0; static int clearflg = 0; -static int dashstuff = 0; static int dobody = 1; static int forwflg = 0; static int forwall = 0; @@ -406,13 +401,6 @@ mhl(int argc, char **argv) clearflg = -1;/* XXX */ continue; - case BITSTUFFSW: - dashstuff = 1; /* trinary logic */ - continue; - case NBITSTUFFSW: - dashstuff = -1; /* trinary logic */ - continue; - case NBODYSW: dobody = 0; continue; @@ -696,8 +684,6 @@ evalvar(struct mcomp *c1) return ptoi(name, &c1->c_cwidth); if (!mh_strcasecmp(name, "length")) return ptoi(name, &c1->c_length); - if (!mh_strcasecmp(name, "nodashstuffing")) - return (dashstuff = -1); for (ap = triples; ap->t_name; ap++) if (!mh_strcasecmp(ap->t_name, name)) { @@ -1379,7 +1365,7 @@ putch(char ch) ** If we are forwarding this message, and the first ** column contains a dash, then add a dash and a space. */ - if (column == 0 && forwflg && (dashstuff >= 0) && ch == '-') { + if (column == 0 && forwflg && ch == '-') { putchar('-'); putchar(' '); }