Article View: comp.mail.mh
Article #1916Re: mhl and repl
From: Craig Leres
Date: Thu, 08 Jun 1989 20:08
Date: Thu, 08 Jun 1989 20:08
90 lines
3128 bytes
3128 bytes
Jeffrey C Honig writes:
> Also, in relation to the included text, mhl frequently sticks "> "
> charaters in the middle of lines in addition to at the beginning of the
> lines of the included text. Has anybody seen this and/or fixed it?
>
> I'm running MH 6.6 on a Sun 3 under SunOS 4.0.1.
Ah yes, I fixed that one last February. The problem was a boundry
condition that occured when a read() split a line in the middle. A
context diff for uip/mhlsbr.c (mh 6.5) is appended.
Craig
------
RCS file: RCS/mhlsbr.c,v
retrieving revision 1.2
diff -c -r1.2 mhlsbr.c
*** /tmp/,RCSt1a03292 Thu Jun 8 12:53:35 1989
--- mhlsbr.c Thu Feb 2 20:57:25 1989
***************
*** 1074,1079 ****
--- 1074,1080 ----
int count,
cchdr;
register char *cp;
+ static int lastterm = '\n'; /* initial state */
cchdr = 0;
lm = 0;
***************
*** 1113,1119 ****
for (cp = (c1 -> c_text ? c1 -> c_text : c1 -> c_name); *cp; cp++)
if (islower (*cp))
*cp = toupper (*cp);
! putstr (c1 -> c_text ? c1 -> c_text : c1 -> c_name);
if (flag != BODYCOMP) {
putstr (": ");
c1 -> c_flags |= HDROUTPUT;
--- 1114,1121 ----
for (cp = (c1 -> c_text ? c1 -> c_text : c1 -> c_name); *cp; cp++)
if (islower (*cp))
*cp = toupper (*cp);
! if (flag != BODYCOMP || lastterm == '\n')
! putstr (c1 -> c_text ? c1 -> c_text : c1 -> c_name);
if (flag != BODYCOMP) {
putstr (": ");
c1 -> c_flags |= HDROUTPUT;
***************
*** 1151,1170 ****
putstr (oneline (c2 -> c_text, c1 -> c_flags));
if (term == '\n')
putstr ("\n");
! while (cp = oneline (c2 -> c_text, c1 -> c_flags))
if (*cp) {
lm = count;
- if (flag == BODYCOMP
- && !(c1 -> c_flags & HDROUTPUT)
- && !(c1 -> c_flags & NOCOMPONENT))
- putstr (c1 -> c_text ? c1 -> c_text : c1 -> c_name);
putstr (cp);
- if (term == '\n')
- putstr ("\n");
}
! else
! if (term == '\n')
! putstr ("\n");
}
/* */
--- 1153,1173 ----
putstr (oneline (c2 -> c_text, c1 -> c_flags));
if (term == '\n')
putstr ("\n");
! lastterm = term;
! while (cp = oneline (c2 -> c_text, c1 -> c_flags)) {
! if (flag == BODYCOMP
! && lastterm == '\n'
! && !(c1 -> c_flags & HDROUTPUT)
! && !(c1 -> c_flags & NOCOMPONENT))
! putstr (c1 -> c_text ? c1 -> c_text : c1 -> c_name);
if (*cp) {
lm = count;
putstr (cp);
}
! if (term == '\n')
! putstr ("\n");
! lastterm = term;
! }
}
/* */
Technical Details
Message-ID:
<2797@helios.ee.lbl.gov>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ace.ee.lbl.gov!leresReferences:
<8147@batcomputer.tn.cornell.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ace.ee.lbl.gov!leres From: leres@ace.ee.lbl.gov (Craig Leres) Newsgroups: comp.mail.mh Subject: Re: mhl and repl Message-ID: <2797@helios.ee.lbl.gov> Date: 8 Jun 89 20:08:53 GMT References: <8147@batcomputer.tn.cornell.edu> Sender: usenet@helios.ee.lbl.gov Reply-To: leres@helios.ee.lbl.gov (Craig Leres) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 90