From b872e8606e7880bf1d32e95271493dcd5d8394fa Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Sat, 28 Jan 2012 13:35:42 +0100 Subject: [PATCH] Removed the ATTVIBUG compile option. If you do have the bug, then workaround it like described in the FAQ: Subject: 06.01 What to do with "Problems with edit - draft removed". From: John Romine Date: Mon, 1 May 1995 00:00:00 -0800 If your users are using an AT&T version of "vi", it's exiting with non-zero status (supposedly a count of the "errors" during the edit). Move "vi" to "broken_vi" and put it its place : #! /bin/sh /usr/ucb/broken_vi "$@" exit 0 Alternatively, compile MH with the ATTVIBUG option. Then complain to your vendor that "vi" is broken, and they shouldfix it. btw: ex-vi does not have this bug. --- acconfig.h | 6 ------ uip/whatnowsbr.c | 9 --------- 2 files changed, 15 deletions(-) diff --git a/acconfig.h b/acconfig.h index f3d9ca3..e4361e0 100644 --- a/acconfig.h +++ b/acconfig.h @@ -78,12 +78,6 @@ */ #define BUILTIN_FTP 1 -/* - * Define to 1 if your vi has ATT bug, such that it returns - * non-zero exit codes on `pseudo-errors'. - */ -#undef ATTVIBUG - /***** END USER CONFIGURATION SECTION *****/ @TOP@ diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 3ed0ea4..79f75e5 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -688,12 +688,6 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, default: if ((status = pidwait(pid, NOTOK))) { -#ifdef ATTVIBUG - if ((cp = mhbasename(*ed)) && strcmp(cp, "vi") == 0 && - (status & 0x00ff) == 0) - status = 0; - else { -#endif if (((status & 0xff00) != 0xff00) && (!reedit || (status & 0x00ff))) { if (!use && (status & 0xff00) && (rename(file, cp = m_backup (file)) != NOTOK)) { @@ -704,9 +698,6 @@ editfile(char **ed, char **arg, char *file, int use, struct msgs *mp, } status = -2; /* maybe "reedit ? -2 : -1"? */ break; -#ifdef ATTVIBUG - } -#endif } reedit++; -- 1.7.10.4