From: utzoo!decvax!harpo!duke!mcnc!idis!mi-cec!dvk Newsgroups: net.news.b Title: Enhancement to readr.c Article-I.D.: mi-cec.122 Posted: Fri Jul 30 11:18:54 1982 Received: Sat Jul 31 03:00:34 1982 I think this is the correct newsgroup... Anyway, we use Rand's MH editor, and I know we are not the only ones. I find it very frustrating to use the reply option, only to be dumped into the old (translate - garbage) Unix mail, which accepts text, and then sends it: no editin', no nuthin'. I checked the code, and the MAILER environment variable allows you to be marginally clever (like if you define it to be "mail -subj %s" instead of the default "mail", it puts the subject in place of your "%s". Semi- cute, at best), but this just isn't enough. So I hacked (literally; I make no claims as to speed or elegance) the code so that if MAILER == "mh", it sets up a formfile in $HOME/Mail/net.$$, calls "comp -form $HOME/Mail/net.$$", and then deletes the formfile. The formfile contains the filled in fields for To:, and Subject: , so you are never prompted for them, but instead they get done automatically. You are now in MH, and you get all the neat features that it supplies. (You might want to add a "Cc:" field to the formfile, but you can aways edit your text, too...). Anyway, a diff listing follows for those who would desire this interface. I know its ugly, so if you have complaints, don't say I didn't warn you. Daniel Klein, Mellon Institute, Pittsburgh 492,495c492,493 < if (strcmp(MAILER,"mh")) { < fprintf(ofp, "To: %s\n", rcbuf); < fflush(ofp); < } --- > fprintf(ofp, "To: %s\n", rcbuf); > fflush(ofp); 502,512c500,501 < if (strcmp(MAILER,"mh")) { < sprintf(rcbuf, MAILER, hptr->title); < sprintf(bfr, "%s %s", rcbuf, address); < } else { < sprintf(bfr,"cat >%s%s\nTo: %s\nSubject: %s\n%s\nETX\n%s%s%s", < userhome,"/Mail/net.$$ << ETX", < address,hptr->title, < "----------", < "comp -form net.$$;rm ", < userhome,"/Mail/net.$$"); < } --- > sprintf(rcbuf, MAILER, hptr->title); > sprintf(bfr, "%s %s", rcbuf, address);