MH 6.7 Updates - part 07/14
John Romine
mh at beanie.ICS.UCI.EDU
Sun Apr 15 04:14:25 AEST 1990
These are patches for MH 6.6 to bring it up to the current release MH
6.7. If you can FTP, you should instead retrieve the current release
(from ics.uci.edu [128.195.1.1] in pub/mh). See the announcement in
comp.mail.mh for all the details. A document descibing the changes
from MH 6.6 can also be found in comp.mail.mh.
There are fourteen parts to these patches; you *must* have all the
parts to compile MH. It will not work if you try to compile an
intermediate version.
Save this message, extract the file below and apply it with "patch -p"
from the top of your MH source tree:
cd mh-6.6/
patch -p < MH.6.6.n
If you have modified your source tree, you'll have to merge your local
changes in after you apply these patches to the original sources.
/JLR
: This is a shar archive. Extract with sh, not csh.
: This archive ends with exit, so do not worry about trailing junk.
echo 'Extracting MH.6.6.6'
sed 's/^X//' > MH.6.6.6 << '+ END-OF-FILE MH.6.6.6'
XPrereq: patch.5
X*** Patchlevel.orig Thu Apr 12 15:57:28 1990
X--- Patchlevel Thu Apr 12 15:57:35 1990
X***************
X*** 1 ****
X! MH.6.6 patch.5
X--- 1 ----
X! MH.6.6 patch.6
X*** ../mh-6.6.0/./papers/tutorial/Makefile Thu Oct 29 15:00:03 1987
X--- ./papers/tutorial/Makefile Tue Mar 6 14:49:47 1990
X***************
X*** 10,12 ****
X
X! .tex.dvi:; sh -c 'if phdtex \\nonstopmode\\input $<\\bye; \
X then exit 0; else rm $@; exit 1; fi'
X--- 10,13 ----
X
X! .tex.dvi:; sh -c 'if TEXINPUTS=../doclib:.:${TEXINPUTS} tex82 \
X! \\nonstopmode\\input $<\\bye; \
X then exit 0; else rm $@; exit 1; fi'
X*** /dev/null Thu Apr 12 15:37:43 1990
X--- ./papers/doclib/READ-ME Tue Mar 6 14:50:39 1990
X***************
X*** 0 ****
X--- 1,40 ----
X+ [ doclib/READ-ME - 31Jan90/JLR ]
X+
X+ This directory contains the TeX style and macro files necessary to
X+ typset the following documents:
X+
X+ mh4 Changes to The Rand MH Message Handling System: MH.4
X+ mh5 Changes to The Rand MH Message Handling System: MH.5
X+ realwork MH.5: How to process 200 messages a day ...
X+ bboards The Rand MH Message Handling System: The UCI BBoards Facility
X+ tutorial The Rand MH Message Handling System: Tutorial
X+ multifarious MH: A Multifarious User Agent
X+ trusted Design of the TTI Prototype Trusted Mail Agent
X+
X+ These documents were originally designed to be typset with the AM font
X+ family using UCI PhDTeX, which was AmSTeX with the UCI diss.sty style
X+ preloaded. Since (not surprisingly) few sites had UCI PhDTeX, diss.sty
X+ was included with the documents.
X+
X+ In the intervening years, AmSTeX has evolved and few sites are still
X+ using the AM font family. Although some of these documents are
X+ now outdated, some sites may still want to generate and print them.
X+ For this reason, this directory contains all files necessary to typeset
X+ these documents using plain TeX (as of Version 2.991). The Makefiles
X+ call TeX as "tex82".
X+
X+ The following newer documents are typset using LaTeX; the needed style
X+ and macro files are present in each directory:
X+
X+ beginners MH for Beginners
X+ mh4mm MH for MM Users
X+ mh6 Changes to The Rand MH Message Handling System: MH.6
X+ mh6.5 Changes to The Rand MH
X+ Message Handling System: MH #6.5 for 4.3BSD UNIX
X+ mznet MZnet: Mail Service for Personal Micro-Computer Systems
X+
X+ Updating the older documents to use LaTeX would be possible but tedious,
X+ especially considering how outdated most of the documents are.
X+
X+
X+ John Romine 1/31/90
X*** ../mh-6.6.0/./papers/doclib/diss.sty Thu Apr 12 15:48:04 1990
X--- ./papers/doclib/diss.sty Thu Apr 5 16:05:45 1990
X***************
X*** 1,2 ****
X--- 1,3 ----
X % UCI Dissertation Style for AmSTeX.
X+ % @(#)$Id: diss.sty,v 1.3 90/04/05 15:20:23 sources Exp $
X
X***************
X*** 85,116 ****
X
X! \font\sixrm=amr6 \font\sixbf=ambx6
X! \font\sixi=ammi6 \skewchar\sixi='177
X! \font\sixsy=amsy6 \skewchar\sixsy='60
X
X! \font\eightrm=amr8 \font\eightsl=amsl8 \font\eightit=amti8
X! \font\eightsy=amsy8 \skewchar\eightsy='60
X! \skewchar\eightsy='60 \font\eightbf=ambx8
X! \font\eightex=amex10 at 8\p@
X! \font\eighti=ammi8 \skewchar\eighti='177
X
X! \font\ninerm=amr9 \font\nineit=amti9
X! \font\ninei=ammi9 \skewchar\ninei='177
X! \font\ninesy=amsy9 \skewchar\ninesy='60
X! \font\ninesl=amsl9 \font\ninebf=ambx9
X
X! \font\twelvecsc=amcsc10 scaled \magstep1
X! \font\tencsc=amcsc10
X! \font\eightcsc=amcsc10 at 8\p@
X! \font\elevencsc=amcsc10 scaled \magstephalf
X! \font\ninecsc=amcsc10 at 9\p@
X
X! \font\tencscod=amcscod10
X! \font\eightcscod=amcscod10 at 8\p@
X
X! \font\eightsf=amss10 at 8\p@
X! \font\tensf=amss10
X! \font\twelvesf=amss10 at 12\p@
X
X! \font\twelvett=amtt10 scaled \magstep1
X! \font\eighttt=amtt10 at 8\p@ % \tentt is predefined in plain.tex
X
X--- 86,117 ----
X
X! \font\sixrm=cmr6 \font\sixbf=cmbx6
X! \font\sixi=cmmi6 \skewchar\sixi='177
X! \font\sixsy=cmsy6 \skewchar\sixsy='60
X
X! \font\eightrm=cmr8 \font\eightsl=cmsl8 \font\eightit=cmti8
X! \font\eightsy=cmsy8 \skewchar\eightsy='60
X! \skewchar\eightsy='60 \font\eightbf=cmbx8
X! \font\eightex=cmex10 at 8\p@
X! \font\eighti=cmmi8 \skewchar\eighti='177
X
X! \font\ninerm=cmr9 \font\nineit=cmti9
X! \font\ninei=cmmi9 \skewchar\ninei='177
X! \font\ninesy=cmsy9 \skewchar\ninesy='60
X! \font\ninesl=cmsl9 \font\ninebf=cmbx9
X
X! \font\twelvecsc=cmcsc10 scaled \magstep1
X! \font\tencsc=cmcsc10
X! \font\eightcsc=cmcsc10 at 8\p@
X! \font\elevencsc=cmcsc10 scaled \magstephalf
X! \font\ninecsc=cmcsc10 at 9\p@
X
X! \let\tencscod=\tencsc
X! \let\eightcscod=\eightcsc
X
X! \font\eightsf=cmss10 at 8\p@
X! \font\tensf=cmss10
X! \font\twelvesf=cmss10 at 12\p@
X
X! \font\twelvett=cmtt10 scaled \magstep1
X! \font\eighttt=cmtt10 at 8\p@ % \tentt is predefined in plain.tex
X
X***************
X*** 120,138 ****
X
X! \font\twelveex=amex10 scaled \magstep1 \font\twelverm=amr10 scaled \magstep1
X! \font\twelvesl=amsl10 scaled \magstep1 \font\twelvebf=ambx10 scaled \magstep1
X! \font\twelvei=ammi10 scaled \magstep1 \skewchar\twelvei='177
X! \font\twelvesy=amsy10 scaled \magstep1 \skewchar\twelvesy='60
X! \font\twelveit=amti10 scaled \magstep1
X
X! \font\twelvechap at font=amssbx10 at 14\p@
X! \font\twelvesec at font=amss10 at 13\p@
X! \font\twelvesubsec at font=amssi10 scaled \magstep1
X
X! \font\tenchap at font=amssbx10 scaled \magstep1
X! \font\tensec at font=amssbx10 scaled \magstephalf
X! \font\tensubsec at font=amssi10
X
X! \font\eightchap at font=amssbx10
X! \font\eightsec at font=amss10 at 9\p@
X! \font\eightsubsec at font=amssqi8
X
X--- 121,139 ----
X
X! \font\twelveex=cmex10 scaled \magstep1 \font\twelverm=cmr10 scaled \magstep1
X! \font\twelvesl=cmsl10 scaled \magstep1 \font\twelvebf=cmbx10 scaled \magstep1
X! \font\twelvei=cmmi10 scaled \magstep1 \skewchar\twelvei='177
X! \font\twelvesy=cmsy10 scaled \magstep1 \skewchar\twelvesy='60
X! \font\twelveit=cmti10 scaled \magstep1
X
X! \font\twelvechap at font=cmssbx10 at 14\p@
X! \font\twelvesec at font=cmss10 at 13\p@
X! \font\twelvesubsec at font=cmssi10 scaled \magstep1
X
X! \font\tenchap at font=cmssbx10 scaled \magstep1
X! \font\tensec at font=cmssbx10 scaled \magstephalf
X! \font\tensubsec at font=cmssi10
X
X! \font\eightchap at font=cmssbx10
X! \font\eightsec at font=cmss10 at 9\p@
X! \font\eightsubsec at font=cmssqi8
X
X*** /dev/null Thu Apr 12 15:37:43 1990
X--- ./papers/doclib/sfwmac.tex Tue Mar 6 14:50:46 1990
X***************
X*** 0 ****
X--- 1,120 ----
X+ % Support for writing UNIX-style documentation (based on webmac.tex)
X+
X+
X+ \catcode`\@=11 % for a little while
X+
X+
X+ % More fonts
X+
X+ \font\sixteentex=cmtex10 scaled\magstep2
X+ \font\twelvetex=cmtex10 scaled\magstep1
X+ \font\tentex=cmtex10
X+ \font\eighttex=cmtex10
X+
X+ \def\curfont{%
X+ \ifcase\font at no
X+ \rm\or
X+ \it\or
X+ \sl\or
X+ \bf\or
X+ \tt\or
X+ \sc\or
X+ \sf\or
X+ \tx
X+ \else \errmessage{font madness}\fi
X+ }
X+
X+ \chardef\AM=`\& % ampersand
X+ \chardef\BS=`\\ % backslash
X+ \chardef\LB=`\{ % left brace
X+ \chardef\RB=`\} % right brace
X+ \def\LQ{{\tt\char'22}} % left quote
X+ \def\RQ{{\tt\char'23}} % right quote
X+ \def\SP{{\tt\char`\ }} % space
X+ \chardef\TL=`\~ % tilde
X+ \chardef\UL=`\_ % underline
X+
X+ \def\everypointsize#1#2{%
X+ \def\tx{%
X+ \font at no=8
X+ \csname#1tex\endcsname
X+ \let\&=\AM \let\\=\BS \let\{=\LB \let\`=\LQ
X+ \let\}=\RB \let\'=\RQ \let\ =\SP \let\~=\TL
X+ \let\_=\UL
X+ }%
X+ }
X+
X+ \curtype
X+
X+
X+ % Standard Characters
X+
X+ \def\#{\hbox{\tt\char`\#}} % parameter sign
X+ \def\${\hbox{\tt\char`\$}} % dollar sign
X+ \def\%{\hbox{\tt\char`\%}} % percent sign
X+ \def\^{\ifmmode\mathchar"222 \else\char`^ \fi} % pointer or hat
X+
X+
X+ % Examples
X+
X+ \def\eg#1{\hbox{\tx``#1''}} % in-line
X+
X+ \def\example#1\endexample{% % multi-line
X+ $$%
X+ \displayindent=\leftskip
X+ \advance\displayindent by1.5\parindent
X+ \let\\=\cr
X+ \tabskip=0pt
X+ \halign{%
X+ \leftline{\tx\ignorespaces##\unskip}\cr
X+ #1\cr
X+ }$$%
X+ }
X+
X+
X+ % Miscellany
X+
X+ \def\pgm#1{{\it#1}} % UNIX programs
X+ \def\man#1(#2){\pgm{#1\/}(#2)} % manual entries
X+ \def\arg#1{\hbox{\tx`{}#1'{}}} % arguments to programs
X+ \def\switch#1{\hbox{\tx`{}-#1'{}}} % switches to programs
X+ \def\file#1{\hbox{\sl#1}} % filename
X+ \def\bq#1{`{}#1`{}} % back-quoted command
X+
X+
X+ % Commonly used software systems
X+
X+ \def\EMACS/{{\sf EMACS}}
X+ \def\INFO/{{\sf INFO}}
X+ \def\MLisp/{{\sf MLisp}}
X+
X+ \def\MH/{{\sf MH}}
X+ \def\UUCP/{{\sf UUCP}}
X+ \def\SendMail/{{\sf SendMail}}
X+ \def\Mail/{{\sf Mail}}
X+ \def\sequences/{{sequences}}
X+ \def\mh#1{{\sf mh.#1}}
X+ \def\context/{\file{context}}
X+ \def\profile/{\file{.mh\_profile}}
X+ \def\whatnow/{{\tx What now?\/}}
X+
X+ \def\MMDF/{{\sf MMDF}}
X+ \def\MMDFII/{{\sf MMDF-II}}
X+
X+ \def\AMSPPT.STY/{{\tt amsppt.sty}}
X+ \ifundefined{AmsTeX}
X+ \def\AmSTeX{%
X+ $\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}\kern-.125em
X+ $\cal S$-\TeX
X+ }%
X+ \fi
X+
X+ \def\DISS.STY/{{\tt diss.sty}}
X+ \def\PhDTeX{PhD-\TeX}
X+
X+ \def\ROFF/{{\sf ROFF}}
X+
X+ \def\TTYD/{{\sf TTYD}}
X+
X+
X+ \catcode`\@=12 % back to normal
X*** ../mh-6.6.0/./sbr/m_getfld.c Thu Oct 29 15:00:17 1987
X--- ./sbr/m_getfld.c Mon Apr 2 14:39:49 1990
X***************
X*** 135,144 ****
X (((c) == *msg_delim && m_Eom(c,iob)) ||\
X (eom_action && (*eom_action)(c))))
X
X! static char *matchc();
X! static char *locc();
X
X! static char **pat_map;
X
X int msg_count = 0; /* disgusting hack for "inc" so it can
X * know how many characters were stuffed
X--- 135,144 ----
X (((c) == *msg_delim && m_Eom(c,iob)) ||\
X (eom_action && (*eom_action)(c))))
X
X! static unsigned char *matchc();
X! static unsigned char *locc();
X
X! static unsigned char **pat_map;
X
X int msg_count = 0; /* disgusting hack for "inc" so it can
X * know how many characters were stuffed
X***************
X*** 159,168 ****
X * has been read and matched before m_Eom is called.
X */
X char *msg_delim = "";
X! static char *fdelim;
X! static char *delimend;
X static int fdelimlen;
X! static char *edelim;
X static int edelimlen;
X
X static int (*eom_action) () = NULL;
X--- 159,168 ----
X * has been read and matched before m_Eom is called.
X */
X char *msg_delim = "";
X! static unsigned char *fdelim;
X! static unsigned char *delimend;
X static int fdelimlen;
X! static unsigned char *edelim;
X static int edelimlen;
X
X static int (*eom_action) () = NULL;
X***************
X*** 172,191 ****
X m_getfld (state, name, buf, bufsz, iob)
X int state;
X int bufsz;
X! char *name,
X *buf;
X register FILE *iob;
X {
X! register char *cp;
X! #ifndef SYS5
X! register char *bp;
X! register char *ep;
X! register char *sp;
X! #else SYS5
X register unsigned char *bp;
X register unsigned char *ep;
X register unsigned char *sp;
X- #endif SYS5
X register int cnt;
X register int c;
X register int i;
X--- 172,185 ----
X m_getfld (state, name, buf, bufsz, iob)
X int state;
X int bufsz;
X! unsigned char *name,
X *buf;
X register FILE *iob;
X {
X! register unsigned char *cp;
X register unsigned char *bp;
X register unsigned char *ep;
X register unsigned char *sp;
X register int cnt;
X register int c;
X register int i;
X***************
X*** 240,246 ****
X */
X cp = name; i = NAMESZ - 1;
X for (;;) {
X! bp = sp = iob->_ptr - 1;
X j = (cnt = iob->_cnt+1) < i ? cnt : i;
X while ((c = *bp++) != ':' && c != '\n' && --j >= 0)
X *cp++ = c;
X--- 234,240 ----
X */
X cp = name; i = NAMESZ - 1;
X for (;;) {
X! bp = sp = (unsigned char *) iob->_ptr - 1;
X j = (cnt = iob->_cnt+1) < i ? cnt : i;
X while ((c = *bp++) != ':' && c != '\n' && --j >= 0)
X *cp++ = c;
X***************
X*** 294,300 ****
X */
X cp = buf; i = bufsz-1;
X for (;;) {
X! cnt = iob->_cnt++; bp = --iob->_ptr;
X c = cnt < i ? cnt : i;
X while (ep = locc( c, bp, '\n' )) {
X /*
X--- 288,294 ----
X */
X cp = buf; i = bufsz-1;
X for (;;) {
X! cnt = iob->_cnt++; bp = (unsigned char *) --iob->_ptr;
X c = cnt < i ? cnt : i;
X while (ep = locc( c, bp, '\n' )) {
X /*
X***************
X*** 301,307 ****
X * if we hit the end of this field, return.
X */
X if ((j = *++ep) != ' ' && j != '\t') {
X! j = ep - iob->_ptr;
X (void) bcopy( iob->_ptr, cp, j);
X iob->_ptr = ep; iob->_cnt -= j;
X cp += j;
X--- 295,301 ----
X * if we hit the end of this field, return.
X */
X if ((j = *++ep) != ' ' && j != '\t') {
X! j = ep - (unsigned char *) iob->_ptr;
X (void) bcopy( iob->_ptr, cp, j);
X iob->_ptr = ep; iob->_cnt -= j;
X cp += j;
X***************
X*** 313,319 ****
X /*
X * end of input or dest buffer - copy what we've found.
X */
X! c += bp - iob->_ptr;
X (void) bcopy( iob->_ptr, cp, c);
X i -= c; cp += c;
X if (i <= 0) {
X--- 307,313 ----
X /*
X * end of input or dest buffer - copy what we've found.
X */
X! c += bp - (unsigned char *) iob->_ptr;
X (void) bcopy( iob->_ptr, cp, c);
X i -= c; cp += c;
X if (i <= 0) {
X***************
X*** 349,355 ****
X * the output buffer and we don't add an eos.
X */
X i = (bufsz < 0) ? -bufsz : bufsz-1;
X! bp = --iob->_ptr; cnt = ++iob->_cnt;
X c = (cnt < i ? cnt : i);
X if (msg_style != MS_DEFAULT && c > 1) {
X /*
X--- 343,349 ----
X * the output buffer and we don't add an eos.
X */
X i = (bufsz < 0) ? -bufsz : bufsz-1;
X! bp = (unsigned char *) --iob->_ptr; cnt = ++iob->_cnt;
X c = (cnt < i ? cnt : i);
X if (msg_style != MS_DEFAULT && c > 1) {
X /*
X***************
X*** 372,378 ****
X * a partial one at the end. If so, we want to leave
X * it so the "eom" check on the next call picks it up.
X * Use a modified Boyer-Moore matcher to make this
X! * check relatively cheap. The first "while" figures
X * out what position in the pattern matches the last
X * character in the buffer. The inner "while" matches
X * the pattern against the buffer, backwards starting
X--- 366,372 ----
X * a partial one at the end. If so, we want to leave
X * it so the "eom" check on the next call picks it up.
X * Use a modified Boyer-Moore matcher to make this
X! * check relatively cheap. The first "if" figures
X * out what position in the pattern matches the last
X * character in the buffer. The inner "while" matches
X * the pattern against the buffer, backwards starting
X***************
X*** 380,396 ****
X * ends with one of the characters in the pattern
X * (excluding the first and last), we do only one test.
X */
X- sp = delimend;
X ep = bp + c - 1;
X! while ((cp = pat_map[*ep]) < sp) {
X! ep = bp + c - 1; sp = cp;
X! while (*--ep == *--cp && cp > fdelim)
X ;
X! if (cp == fdelim) {
X! if (*ep == *cp && ep > bp)
X! c = (ep - bp) + 1;
X break;
X }
X }
X }
X }
X--- 374,401 ----
X * ends with one of the characters in the pattern
X * (excluding the first and last), we do only one test.
X */
X ep = bp + c - 1;
X! if (sp = pat_map[*ep]) {
X! do {
X! cp = sp;
X! while (*--ep == *--cp)
X ;
X! if (cp < fdelim) {
X! if (ep >= bp)
X! /*
X! * ep < bp means that all the buffer
X! * contains is a prefix of delim.
X! * If this prefix is really a delim, the
X! * m_eom call at entry should have found
X! * it. Thus it's not a delim and we can
X! * take all of it.
X! */
X! c = (ep - bp) + 2;
X break;
X }
X+ /* try matching one less char of delim string */
X+ ep = bp + c - 1;
X+ } while (--sp > fdelim);
X }
X }
X }
X***************
X*** 419,431 ****
X static char unixbuf[BUFSIZ] = "";
X #endif RPATHS
X
X! void m_unknown (iob)
X! register FILE *iob;
X {
X register int c;
X register long pos;
X char text[10];
X register char *cp;
X
X msg_style = MS_UNKNOWN;
X
X--- 424,438 ----
X static char unixbuf[BUFSIZ] = "";
X #endif RPATHS
X
X! void
X! m_unknown(iob)
X! register FILE *iob;
X {
X register int c;
X register long pos;
X char text[10];
X register char *cp;
X+ register char *delimstr;
X
X msg_style = MS_UNKNOWN;
X
X***************
X*** 444,450 ****
X if (fread (text, sizeof *text, 5, iob) == 5
X && strncmp (text, "From ", 5) == 0) {
X msg_style = MS_UUCP;
X! fdelim = "\n\nFrom ";
X #ifndef RPATHS
X while ((c = getc (iob)) != '\n' && c >= 0)
X ;
X--- 451,457 ----
X if (fread (text, sizeof *text, 5, iob) == 5
X && strncmp (text, "From ", 5) == 0) {
X msg_style = MS_UUCP;
X! delimstr = "\nFrom ";
X #ifndef RPATHS
X while ((c = getc (iob)) != '\n' && c >= 0)
X ;
X***************
X*** 459,474 ****
X (void) fseek (iob, pos, 0);
X if (mmdlm2 == NULLCP || *mmdlm2 == NULL)
X mmdlm2 = "\001\001\001\001\n";
X! fdelim = (char *)malloc((unsigned)strlen(mmdlm2)+2);
X! *fdelim = '\n';
X! (void)strcpy(fdelim+1, mmdlm2);
X msg_style = MS_MMDF;
X }
X! fdelimlen = strlen(fdelim);
X! msg_delim = fdelim+1;
X! edelim = msg_delim+1;
X! edelimlen = fdelimlen-2;
X! delimend = msg_delim + edelimlen;
X if (edelimlen <= 1)
X adios (NULLCP, "maildrop delimiter must be at least 2 bytes");
X /*
X--- 466,484 ----
X (void) fseek (iob, pos, 0);
X if (mmdlm2 == NULLCP || *mmdlm2 == NULL)
X mmdlm2 = "\001\001\001\001\n";
X! delimstr = mmdlm2;
X msg_style = MS_MMDF;
X }
X! c = strlen (delimstr);
X! fdelim = (unsigned char *)malloc((unsigned)c + 3);
X! *fdelim++ = '\0';
X! *fdelim = '\n';
X! msg_delim = (char *)fdelim+1;
X! edelim = (unsigned char *)msg_delim+1;
X! fdelimlen = c + 1;
X! edelimlen = c - 1;
X! (void)strcpy(msg_delim, delimstr);
X! delimend = (unsigned char *)msg_delim + edelimlen;
X if (edelimlen <= 1)
X adios (NULLCP, "maildrop delimiter must be at least 2 bytes");
X /*
X***************
X*** 477,488 ****
X * separator) or the last char (since the matchc would have found it
X * if it was a real delim).
X */
X! pat_map = (char **) malloc( 256 * sizeof (char *));
X! for (c = 256; c--; )
X! pat_map[c] = delimend + 1;
X
X! for (cp = fdelim + 1; cp < delimend; cp++ )
X! pat_map[*cp] = cp;
X
X if (msg_style == MS_MMDF) {
X /* flush extra msg hdrs */
X--- 487,496 ----
X * separator) or the last char (since the matchc would have found it
X * if it was a real delim).
X */
X! pat_map = (unsigned char **) calloc (256, sizeof (unsigned char *));
X
X! for (cp = (char *)fdelim + 1; cp < (char *)delimend; cp++ )
X! pat_map[*cp] = (unsigned char *)cp;
X
X if (msg_style == MS_MMDF) {
X /* flush extra msg hdrs */
X***************
X*** 504,512 ****
X delimend = fdelim;
X } else {
X msg_style = MS_MMDF;
X! msg_delim = fdelim + 1;
X! fdelimlen = strlen (fdelim);
X! delimend = msg_delim + edelimlen;
X }
X }
X
X--- 512,520 ----
X delimend = fdelim;
X } else {
X msg_style = MS_MMDF;
X! msg_delim = (char *)fdelim + 1;
X! fdelimlen = strlen(fdelim);
X! delimend = (unsigned char *)(msg_delim + edelimlen);
X }
X }
X
X***************
X*** 534,540 ****
X */
X return 1;
X
X! (void) fseek (iob, pos, 0);
X return 0;
X }
X
X--- 542,550 ----
X */
X return 1;
X
X! (void) fseek (iob, (long)(pos-1), 0);
X! if (iob->_cnt <= 0)
X! _filbuf(iob);
X return 0;
X }
X
X***************
X*** 597,603 ****
X asm("1: subl3 4(ap),r3,r0");
X asm(" ret");
X #else
X! static char *
X matchc( patln, pat, strln, str )
X int patln;
X char *pat;
X--- 607,613 ----
X asm("1: subl3 4(ap),r3,r0");
X asm(" ret");
X #else
X! static unsigned char *
X matchc( patln, pat, strln, str )
X int patln;
X char *pat;
X***************
X*** 616,625 ****
X return 0;
X
X sp = str; pp = pat;
X! while (pp < ep && *sp++ == *pp++)
X! ;
X if (pp >= ep)
X! return (--str);
X }
X }
X #endif
X--- 626,635 ----
X return 0;
X
X sp = str; pp = pat;
X! while (pp < ep && *sp++ == *pp)
X! pp++;
X if (pp >= ep)
X! return ((unsigned char *)--str);
X }
X }
X #endif
X***************
X*** 639,653 ****
X asm(" movl r1,r0");
X asm("1: ret");
X #else
X! static char *
X locc( cnt, src, term )
X register int cnt;
X! register char *src;
X! register char term;
X {
X while (*src++ != term && --cnt > 0);
X
X! return (cnt > 0 ? --src : NULLCP);
X }
X #endif
X
X--- 649,663 ----
X asm(" movl r1,r0");
X asm("1: ret");
X #else
X! static unsigned char *
X locc( cnt, src, term )
X register int cnt;
X! register unsigned char *src;
X! register unsigned char term;
X {
X while (*src++ != term && --cnt > 0);
X
X! return (cnt > 0 ? --src : (unsigned char *)0);
X }
X #endif
X
X***************
X*** 684,687 ****
X while (length-- > 0)
X *b++ = NULL;
X }
X! #endif not BSD42 or SYS5
X--- 694,697 ----
X while (length-- > 0)
X *b++ = NULL;
X }
X! #endif not BSD42
X*** ../mh-6.6.0/./sbr/formatsbr.c Thu Oct 29 15:00:22 1987
X--- ./sbr/formatsbr.c Fri Mar 23 15:16:35 1990
X***************
X*** 18,24 ****
X--- 18,29 ----
X
X static char *formats = 0;
X extern char *formataddr (); /* hook for custom address formatting */
X+ #ifdef VAN
X+ struct msgs *fmt_current_folder; /* current folder (set by main program) */
X+ #endif
X
X+ static normalize();
X+
X int fmt_norm = AD_NAME;
X struct mailname fmt_mnull;
X
X***************
X*** 78,89 ****
X *dp++ = *cp;
X else
X switch (*++cp) {
X! #define grot(x) case 'x': *dp++ = '\x'; break;
X! grot (b);
X! grot (f);
X! grot (n);
X! grot (r);
X! grot (t);
X
X case '\n':
X break;
X--- 83,94 ----
X *dp++ = *cp;
X else
X switch (*++cp) {
X! #define grot(y,z) case y: *dp++ = z; break;
X! grot ('b', '\b');
X! grot ('f', '\f');
X! grot ('n', '\n');
X! grot ('r', '\r');
X! grot ('t', '\t');
X
X case '\n':
X break;
X***************
X*** 132,138 ****
X
X #define PUTDF(cp, num, wid, fill) if (cp + wid < ep){\
X if((i = (num))<0) i = -(num);\
X! sp = cp + wid;\
X do {\
X *--sp = (i % 10) + '0';\
X i /= 10;\
X--- 137,144 ----
X
X #define PUTDF(cp, num, wid, fill) if (cp + wid < ep){\
X if((i = (num))<0) i = -(num);\
X! if((c = (wid))<0) c = -c;\
X! sp = cp + c;\
X do {\
X *--sp = (i % 10) + '0';\
X i /= 10;\
X***************
X*** 143,149 ****
X *--sp = '-';\
X while (sp > cp)\
X *--sp = fill;\
X! cp += wid;\
X }
X #define PUTD(cp, num) if (cp < ep){\
X if((i = (num))==0) *cp++ = '0';\
X--- 149,155 ----
X *--sp = '-';\
X while (sp > cp)\
X *--sp = fill;\
X! cp += c;\
X }
X #define PUTD(cp, num) if (cp < ep){\
X if((i = (num))==0) *cp++ = '0';\
X***************
X*** 161,179 ****
X }\
X }
X #define PUTSF(cp, str, wid, fill) {\
X! i = (wid);\
X if (sp = (str)) {\
X while ((c = *sp) && c <= 32)\
X sp++;\
X! while( (c = *sp++) && --i >= 0 && cp < ep)\
X! if ( c > 32 ) \
X *cp++ = c;\
X else {\
X! while ( (c = *sp) && c <= 32 )\
X sp++;\
X *cp++ = ' ';\
X }\
X }\
X while( --i >= 0 && cp < ep)\
X *cp++ = fill;\
X }
X--- 167,201 ----
X }\
X }
X #define PUTSF(cp, str, wid, fill) {\
X! ljust = 0;\
X! if ((i = (wid)) < 0) {\
X! i = -i;\
X! ljust++;\
X! }\
X if (sp = (str)) {\
X+ if (ljust) {\
X+ c = strlen(sp);\
X+ if (c > i)\
X+ sp += c - i;\
X+ else {\
X+ while( --i >= c && cp < ep)\
X+ *cp++ = fill;\
X+ i++;\
X+ }\
X+ } else {\
X while ((c = *sp) && c <= 32)\
X sp++;\
X! }\
X! while ((c = *sp++) && --i >= 0 && cp < ep)\
X! if (c > 32) \
X *cp++ = c;\
X else {\
X! while ((c = *sp) && c <= 32)\
X sp++;\
X *cp++ = ' ';\
X }\
X }\
X+ if (!ljust)\
X while( --i >= 0 && cp < ep)\
X *cp++ = fill;\
X }
X***************
X*** 215,224 ****
X register struct comp *comp;
X register struct tws *tws;
X register struct mailname *mn;
X char *savestr;
X char buffer[BUFSIZ];
X
X! for (;;) {
X switch (fmt->f_type) {
X
X case FT_COMP:
X--- 237,248 ----
X register struct comp *comp;
X register struct tws *tws;
X register struct mailname *mn;
X+ int ljust;
X+ long l;
X char *savestr;
X char buffer[BUFSIZ];
X
X! while (cp < ep) {
X switch (fmt->f_type) {
X
X case FT_COMP:
X***************
X*** 234,240 ****
X *cp++ = c;
X break;
X case FT_LITF:
X! sp = fmt->f_text; i = fmt->f_width;
X while( (c = *sp++) && --i >= 0 && cp < ep)
X *cp++ = c;
X while( --i >= 0 && cp < ep)
X--- 258,270 ----
X *cp++ = c;
X break;
X case FT_LITF:
X! sp = fmt->f_text;
X! ljust = 0;
X! i = fmt->f_width;
X! if (i < 0) {
X! i = -i;
X! ljust++; /* XXX should do something with this */
X! }
X while( (c = *sp++) && --i >= 0 && cp < ep)
X *cp++ = c;
X while( --i >= 0 && cp < ep)
X***************
X*** 300,306 ****
X break;
X
X case FT_IF_MATCH:
X! if (! match (str, fmt->f_text)) {
X fmt += fmt->f_skip;
X continue;
X }
X--- 330,336 ----
X break;
X
X case FT_IF_MATCH:
X! if (!str || !match (str, fmt->f_text)) {
X fmt += fmt->f_skip;
X continue;
X }
X***************
X*** 307,317 ****
X break;
X
X case FT_V_MATCH:
X value = match (str, fmt->f_text);
X break;
X
X case FT_IF_AMATCH:
X! if (! uprf (str, fmt->f_text)) {
X fmt += fmt->f_skip;
X continue;
X }
X--- 337,350 ----
X break;
X
X case FT_V_MATCH:
X+ if (str)
X value = match (str, fmt->f_text);
X+ else
X+ value = 0;
X break;
X
X case FT_IF_AMATCH:
X! if (!str || !uprf (str, fmt->f_text)) {
X fmt += fmt->f_skip;
X continue;
X }
X***************
X*** 354,360 ****
X--- 387,415 ----
X case FT_LS_LIT:
X str = fmt->f_text;
X break;
X+ case FT_LS_TRIM:
X+ if (str) {
X+ register char *xp;
X
X+ (void) strcpy(buffer, str);
X+ str = buffer;
X+ while (isspace(*str))
X+ str++;
X+ ljust = 0;
X+ if ((i = fmt->f_width) < 0) {
X+ i = -i;
X+ ljust++; /* XXX should do something with this */
X+ }
X+
X+ if (i > 0 && strlen(str) > i)
X+ str[i] = '\0';
X+ xp = str;
X+ xp += strlen(str) - 1;
X+ while (xp > str && isspace(*xp))
X+ *xp-- = '\0';
X+ }
X+ break;
X+
X case FT_LV_COMPFLAG:
X value = fmt->f_comp->c_flags;
X break;
X***************
X*** 379,384 ****
X--- 434,445 ----
X case FT_LV_MINUS_L:
X value = fmt->f_value - value;
X break;
X+ case FT_LV_DIVIDE_L:
X+ if (fmt->f_value)
X+ value = value / fmt->f_value;
X+ else
X+ value = 0;
X+ break;
X case FT_SAVESTR:
X savestr = str;
X break;
X***************
X*** 451,458 ****
X default:
X value = -1; break;
X }
X break;
X! case FT_LV_TZONEF:
X value = fmt->f_comp->c_tws->tw_flags & TW_DST;
X break;
X case FT_LS_822DATE:
X--- 512,524 ----
X default:
X value = -1; break;
X }
X+ case FT_LV_ZONEF:
X+ if ((fmt->f_comp->c_tws->tw_flags & TW_SZONE) == TW_SZEXP)
X+ value = 1;
X+ else
X+ value = -1;
X break;
X! case FT_LV_DST:
X value = fmt->f_comp->c_tws->tw_flags & TW_DST;
X break;
X case FT_LS_822DATE:
X***************
X*** 496,503 ****
X #ifdef BERK
X str = fmt->f_comp->c_mn->m_mbox;
X #else not BERK
X! mn = fmt -> f_comp -> c_mn;
X if ((str = mn -> m_pers) == NULL)
X switch (mn -> m_type) {
X case LOCALHOST:
X str = mn -> m_mbox;
X--- 562,587 ----
X #ifdef BERK
X str = fmt->f_comp->c_mn->m_mbox;
X #else not BERK
X! if ((mn = fmt -> f_comp -> c_mn) == &fmt_mnull) {
X! str = fmt -> f_comp -> c_text;
X! break;
X! }
X if ((str = mn -> m_pers) == NULL)
X+ if ((str = mn -> m_note)) {
X+ (void) strcpy (buffer, str);
X+ str = buffer;
X+ if (*str == '(')
X+ str++;
X+ sp = str + strlen(str) - 1;
X+ if (*sp == ')') {
X+ *sp-- = '\0';
X+ while (sp >= str)
X+ if (*sp == ' ')
X+ *sp-- = '\0';
X+ else
X+ break;
X+ }
X+ } else
X switch (mn -> m_type) {
X case LOCALHOST:
X str = mn -> m_mbox;
X***************
X*** 520,525 ****
X--- 604,625 ----
X #endif BERK
X break;
X
X+ case FT_LOCALDATE:
X+ comp = fmt->f_comp;
X+ if ((l = comp->c_tws->tw_clock) == 0)
X+ l = twclock(comp->c_tws);
X+ tws = dlocaltime(&l);
X+ *comp->c_tws = *tws;
X+ break;
X+
X+ case FT_GMTDATE:
X+ comp = fmt->f_comp;
X+ if ((l = comp->c_tws->tw_clock) == 0)
X+ l = twclock(comp->c_tws);
X+ tws = dgmtime(&l);
X+ *comp->c_tws = *tws;
X+ break;
X+
X case FT_PARSEDATE:
X comp = fmt->f_comp;
X if ((sp = comp->c_text) && (tws = dparsetime(sp))) {
X***************
X*** 589,596 ****
X comp->c_mn = mn;
X while (getname(""))
X ;
X! } else
X comp->c_mn = &fmt_mnull;
X break;
X
X case FT_MYMBOX:
X--- 689,699 ----
X comp->c_mn = mn;
X while (getname(""))
X ;
X! } else {
X! while (getname("")) /* XXX */
X! ;
X comp->c_mn = &fmt_mnull;
X+ }
X break;
X
X case FT_MYMBOX:
X***************
X*** 606,618 ****
X (mn = getm (sp, NULLCP, 0, AD_NAME, NULLCP))) {
X comp->c_mn = mn;
X comp->c_flags = ismymbox(mn);
X! while (getname(""))
X! ;
X } else {
X comp->c_flags = (comp->c_text == 0);
X comp->c_mn = &fmt_mnull;
X }
X break;
X }
X fmt++;
X }
X--- 709,736 ----
X (mn = getm (sp, NULLCP, 0, AD_NAME, NULLCP))) {
X comp->c_mn = mn;
X comp->c_flags = ismymbox(mn);
X! while (sp = getname(sp))
X! if (comp->c_flags == 0 &&
X! (mn = getm (sp, NULLCP, 0, AD_NAME, NULLCP)))
X! comp->c_flags |= ismymbox(mn);
X } else {
X+ while (getname("")) /* XXX */
X+ ;
X comp->c_flags = (comp->c_text == 0);
X comp->c_mn = &fmt_mnull;
X }
X break;
X+
X+ #ifdef VAN
X+ case FT_ADDTOSEQ:
X+ /* If we're working on a folder (as opposed to a file), add the
X+ * current msg to sequence given in literal field. Don't
X+ * disturb string or value registers.
X+ */
X+ if (fmt_current_folder)
X+ (void)m_seqadd(fmt_current_folder, fmt->f_text, dat[0], -1);
X+ break;
X+ #endif
X }
X fmt++;
X }
X*** ../mh-6.6.0/./sbr/addrsbr.c Wed May 4 17:31:36 1988
X--- ./sbr/addrsbr.c Mon Mar 12 14:02:37 1990
X***************
X*** 103,108 ****
X--- 103,117 ----
X
X char *getusr ();
X
X+
X+ #ifdef WP
X+ int do_wp = 0;
X+
X+ #ifdef BERK
X+ char *wp_expand ();
X+ #endif
X+ #endif
X+
X /* */
X
X char *getname (addrs)
X***************
X*** 127,133 ****
X * two things: split multiple addr on a line into separate addresses and
X * locate the "mailbox" portion of an address. The parse uses rfc-822
X * metacharacters and quoting but is much less restrictive that rfc-822.
X! * In detail, `,' or newline terminate addresses. "Empty" addresses
X * (e.g., `,,') are ignored. Double quote ("), backslash, left & right
X * paren and left and right angle brackets are metacharacters. Left &
X * right parens must balance as must left & right angle brackets. Any
X--- 136,142 ----
X * two things: split multiple addr on a line into separate addresses and
X * locate the "mailbox" portion of an address. The parse uses rfc-822
X * metacharacters and quoting but is much less restrictive that rfc-822.
X! * In detail, `,' or eos terminate addresses. "Empty" addresses
X * (e.g., `,,') are ignored. Double quote ("), backslash, left & right
X * paren and left and right angle brackets are metacharacters. Left &
X * right parens must balance as must left & right angle brackets. Any
X***************
X*** 138,145 ****
X * `\' are metacharacters following a `"'). The `mailbox' portion
X * of an address is the non-comment text between angle-brackets if
X * the address contains any angle brackets. Otherwise, it is all the
X! * non-comment text. Blanks & tabs will not be included in the mailbox
X! * portion of an address unless they are escaped.
X */
X
X /* Scanner states */
X--- 147,154 ----
X * `\' are metacharacters following a `"'). The `mailbox' portion
X * of an address is the non-comment text between angle-brackets if
X * the address contains any angle brackets. Otherwise, it is all the
X! * non-comment text. Blanks, tabs & newlines will not be included
X! * in the mailbox portion of an address unless they are escaped.
X */
X
X /* Scanner states */
X***************
X*** 162,167 ****
X--- 171,180 ----
X register int lpcnt = 0; /* number of unmatched "<" */
X
X err = NULL;
X+ if (! addrs) {
X+ adr_ptr = NULL;
X+ return NULL;
X+ }
X if (adr_ptr)
X addrs = adr_ptr;
X else
X***************
X*** 171,176 ****
X--- 184,218 ----
X while ( (c = *addrs++) == ',' || isspace(c))
X ;
X
X+ #ifdef WP
X+ if (do_wp && c == '<' && *addrs == '<') {
X+ register char *cp,
X+ *dp,
X+ *ep;
X+
X+ if (cp = index (++addrs, '>')) {
X+ *++cp = NULL;
X+ if (dp = wp_expand (addrs, NULLCP)) {
X+ *(addrs - 1) = NULL;
X+ ep = concat (saved_addr, dp, cp, NULLCP);
X+ addrs = ep + strlen (saved_addr);
X+ while ((c = *addrs++) == ',' || isspace (c))
X+ continue;
X+ free (saved_addr);
X+ saved_addr = ep;
X+ free (dp);
X+ }
X+ else {
X+ err = "unable to expand WhitePages query";
X+ (void) strcpy (adrtext, addrs);
X+ addrs = cp;
X+ goto out;
X+ }
X+
X+ }
X+ }
X+ #endif
X+
X *nxtout = *adrcopy = '\0';
X while (state != EOA) {
X *adrcopy++ = c;
X***************
X*** 178,183 ****
X--- 220,233 ----
X *nxtout++ = isupper (c) ? tolower (c) : c;
X switch (state+c) {
X
X+ case NORMAL+'\n': /* discard newlines */
X+ case QS+'\n':
X+ case COM+'\n':
X+ case ERR+'\n':
X+ --nxtout;
X+ --adrcopy;
X+ break;
X+
X case NORMAL+' ': /* skip unquoted whitespace */
X case NORMAL+'\t':
X --nxtout;
X***************
X*** 232,240 ****
X *nxtout++ = isupper (c) ? tolower (c) : c;
X break;
X
X- case NORMAL+'\n':
X case NORMAL+',':
X- case ERR+'\n':
X case ERR+',':
X case NORMAL+'\0':
X case ERR+'\0':
X--- 282,288 ----
X***************
X*** 243,249 ****
X err = "missing >";
X break;
X
X- case COM+'\n':
X case COM+'\0':
X state = EOA;
X err = "missing )";
X--- 291,296 ----
X***************
X*** 251,257 ****
X nxtout++;
X break;
X
X- case QS+'\n':
X case QS+'\0':
X state = EOA;
X err = "missing \"";
X--- 298,303 ----
X***************
X*** 267,280 ****
X--- 313,336 ----
X * addr points to where we should start scanning next time.
X */
X *(nxtout-1) = *(adrcopy-1) = '\0';
X+ #ifdef WP
X+ out: ;
X+ #endif
X if (*adr && !err) {
X adr_ptr = addrs-1;
X+ #ifndef WP
X return adrtext;
X+ #endif
X } else {
X free (saved_addr);
X adr_ptr = NULL;
X+ #ifndef WP
X return NULL;
X+ #endif
X }
X+ #ifdef WP
X+ return adrtext;
X+ #endif
X #else not BERK
X register struct adrx *ap;
X
X***************
X*** 825,827 ****
X--- 881,1029 ----
X
X return 0;
X }
X+
X+ /* */
X+
X+ #ifdef WP
X+ #include <signal.h>
X+
X+
X+ static char *fredproc = NULL;
X+
X+
X+ char *wp_expand (query, error)
X+ char *query,
X+ *error;
X+ {
X+ register int cc,
X+ i,
X+ vecp;
X+ TYPESIG (*istat) (), (*qstat) (), (*pstat) ();
X+ register char *bp,
X+ *cp;
X+ char *ep,
X+ buffer[BUFSIZ],
X+ fds[10],
X+ *vec[10];
X+ static int child_id = NOTOK,
X+ pdi[2],
X+ pdo[2];
X+
X+ if (error)
X+ (void) strcpy (error, "unable to expand WhitePages query: ");
X+
X+ if (child_id == NOTOK || kill (child_id, 0) == NOTOK) {
X+ if (!isatty (fileno (stdout))) {
X+ if (error)
X+ (void) strcat (error, "not a tty");
X+ return NULLCP;
X+ }
X+
X+ if (fredproc == NULL && (fredproc = m_find ("fredproc")) == NULL)
X+ fredproc = "fred";
X+
X+ if (pipe (pdi) == NOTOK) {
X+ if (error)
X+ (void) strcat (error, "unable to pipe");
X+
X+ return NULLCP;
X+ }
X+
X+ if (pipe (pdo) == NOTOK) {
X+ if (error)
X+ (void) strcat (error, "unable to pipe");
X+
X+ losing: ;
X+ (void) close (pdi[0]);
X+ (void) close (pdi[1]);
X+ return NULLCP;
X+ }
X+
X+ for (i = 0; (child_id = vfork ()) == NOTOK && i < 5; i++)
X+ sleep (5);
X+
X+ switch (child_id) {
X+ case NOTOK:
X+ if (error)
X+ (void) strcat (error, "unable to fork");
X+
X+ (void) close (pdo[0]);
X+ (void) close (pdo[1]);
X+ goto losing;
X+
X+ case OK:
X+ (void) close (pdi[0]);
X+ (void) close (pdo[1]);
X+ (void) sprintf (fds, "%d %d", pdo[0], pdi[1]);
X+ vecp = 0;
X+ vec[vecp++] = r1bindex (fredproc, '/');
X+ vec[vecp++] = "-q";
X+ vec[vecp++] = fds;
X+ vec[vecp] = NULL;
X+ execvp (fredproc, vec);
X+ _exit (-1); /* NOTREACHED */
X+
X+ default:
X+ (void) close (pdi[1]);
X+ (void) close (pdo[0]);
X+ break;
X+ }
X+ }
X+
X+ istat = signal (SIGINT, SIG_IGN);
X+ qstat = signal (SIGQUIT, SIG_IGN);
X+
X+ pstat = signal (SIGPIPE, SIG_IGN);
X+
X+ (void) sprintf (buffer, "%s\n", query);
X+ cc = write (pdo[1], buffer, i = strlen (buffer));
X+
X+ (void) signal (SIGPIPE, pstat);
X+
X+ if (cc != i) {
X+ if (error)
X+ (void) strcat (error, "write to pipe failed");
X+
X+ lost_child: ;
X+ (void) kill (child_id, SIGTERM);
X+ (void) close (pdi[0]);
X+ (void) close (pdo[1]);
X+
X+ child_id = NOTOK;
X+ return NULLCP;
X+ }
X+
X+ for (ep = (bp = buffer) + sizeof buffer - 1;
X+ (i = read (pdi[0], bp, ep - bp)) > 0; ) {
X+ for (cp = bp + i; bp < cp; bp++)
X+ if (*bp == '\n')
X+ break;
X+ if (bp < cp)
X+ break;
X+ }
X+
X+ (void) signal (SIGINT, istat);
X+ (void) signal (SIGQUIT, qstat);
X+
X+ if (i == NOTOK) {
X+ if (error)
X+ (void) strcat (error, "read from pipe failed");
X+ goto lost_child;
X+ }
X+ if (i == 0) {
X+ if (error)
X+ (void) sprintf (error + strlen (error), "%s exited prematurely",
X+ fredproc);
X+ goto lost_child;
X+ }
X+ *bp = NULL;
X+
X+ if (error)
X+ if (bp != buffer)
X+ error[0] = NULL;
X+ else
X+ (void) strcpy (error, "unable to expand WhitePages query");
X+
X+ return (*buffer ? getcpy (buffer) : NULLCP);
X+ }
X+ #endif
X*** ../mh-6.6.0/./sbr/pwd.c Thu Oct 29 15:00:48 1987
X--- ./sbr/pwd.c Mon Feb 5 14:38:32 1990
X***************
X*** 1,9 ****
X /* pwd.c - return the current working directory */
X
X #include "../h/mh.h"
X! #ifndef BSD42
X #include "../h/local.h"
X! #endif not BSD42
X #include <stdio.h>
X
X #define MAXPATHLEN 1024
X--- 1,9 ----
X /* pwd.c - return the current working directory */
X
X #include "../h/mh.h"
X! #if !defined (BSD42) && !defined (SYS5DIR)
X #include "../h/local.h"
X! #endif not BSD42 and not SYS5DIR
X #include <stdio.h>
X
X #define MAXPATHLEN 1024
X***************
X*** 16,23 ****
X--- 16,28 ----
X register char *cp;
X
X #ifndef BSD42
X+ #ifndef SYS5DIR
X if (getwd (curwd) == NOTOK) {
X admonish (NULL, "unable to determine working directory");
X+ #else SYS5DIR
X+ if (getcwd (curwd, MAXPATHLEN) == NULL) {
X+ admonish (NULL, "unable to determine working directory");
X+ #endif SYS5DIR
X #else BSD42
X if (getwd (curwd) == NULL) {
X admonish (NULLCP, "unable to determine working directory: %s", curwd);
X***************
X*** 39,45 ****
X
X /* */
X
X! #ifndef BSD42
X /* getwd() - get the current working directory */
X
X /* Algorithm from several sources, -ljobs, pwd.c, etc., etc. */
X--- 44,50 ----
X
X /* */
X
X! #if !defined (BSD42) && !defined (SYS5DIR)
X /* getwd() - get the current working directory */
X
X /* Algorithm from several sources, -ljobs, pwd.c, etc., etc. */
X***************
X*** 115,118 ****
X closedir (dd);
X return NOTOK;
X }
X! #endif not BSD42
X--- 120,123 ----
X closedir (dd);
X return NOTOK;
X }
X! #endif not BSD42 and not SYS5DIR
X*** ../mh-6.6.0/./sbr/strindex.c Fri Nov 17 15:44:28 1989
X--- ./sbr/strindex.c Fri Nov 17 16:04:08 1989
X***************
X*** 7,12 ****
X--- 7,14 ----
X {
X register char *p;
X
X+ if (p1 == 0 || p2 == 0) return(-1); /* XXX */
X+
X for (p = p2; *p; p++)
X if (uprf (p, p1))
X return (p - p2);
X*** ../mh-6.6.0/./sbr/formataddr.c Thu Oct 29 15:00:30 1987
X--- ./sbr/formataddr.c Mon Mar 12 10:49:13 1990
X***************
X*** 59,64 ****
X--- 59,65 ----
X buf = malloc (BUFINCR);
X if (! buf)
X adios (NULLCP, "formataddr: couldn't allocate buffer space");
X+ last_dst = buf; /* XXX */
X bufsiz = BUFINCR - 6; /* leave some slop */
X bufend = buf + bufsiz;
X }
X***************
X*** 72,77 ****
X--- 73,79 ----
X dst = buf;
X *dst = '\0';
X } else {
X+ dst = last_dst; /* XXX */
X CHECKMEM (orig);
X CPY (orig);
X }
X*** ../mh-6.6.0/./sbr/m_remsg.c Thu Oct 29 15:00:39 1987
X--- ./sbr/m_remsg.c Tue Mar 27 16:49:27 1990
X***************
X*** 33,39 ****
X adios (NULLCP, "unable to re-allocate messages storage");
X
X pp = sp - lo;
X! if (pp < 0)
X adios (NULLCP, "m_remsg() botch -- you lose big[1]");
X for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
X pp[msgnum] = mp -> msgstats[msgnum];
X--- 33,39 ----
X adios (NULLCP, "unable to re-allocate messages storage");
X
X pp = sp - lo;
X! if (pp < (short *)0)
X adios (NULLCP, "m_remsg() botch -- you lose big[1]");
X for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
X pp[msgnum] = mp -> msgstats[msgnum];
X***************
X*** 44,50 ****
X mp -> hghoff = hi;
X #ifdef MTR
X mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
X! if (mp -> msgstats < 0)
X adios (NULLCP, "m_remsg() botch -- you lose big[2]");
X #endif MTR
X for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
X--- 44,50 ----
X mp -> hghoff = hi;
X #ifdef MTR
X mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
X! if (mp -> msgstats < (short *)0)
X adios (NULLCP, "m_remsg() botch -- you lose big[2]");
X #endif MTR
X for (msgnum = mp -> lowmsg - 1; msgnum >= lo; msgnum--)
X*** ../mh-6.6.0/./sbr/getans.c Thu Oct 29 15:00:24 1987
X--- ./sbr/getans.c Tue Feb 6 13:03:44 1990
X***************
X*** 14,20 ****
X #else BSD42
X static jmp_buf sigenv;
X #endif BSD42
X! int intrser ();
X
X char **getans (prompt, ansp)
X char *prompt;
X--- 14,20 ----
X #else BSD42
X static jmp_buf sigenv;
X #endif BSD42
X! static int intrser ();
X
X char **getans (prompt, ansp)
X char *prompt;
X***************
X*** 21,27 ****
X struct swit *ansp;
X {
X int i;
X! int (*istat) ();
X char *cp,
X **cpp;
X
X--- 21,27 ----
X struct swit *ansp;
X {
X int i;
X! TYPESIG (*istat) ();
X char *cp,
X **cpp;
X
X*** ../mh-6.6.0/./sbr/uleq.c Thu Oct 29 15:00:52 1987
X--- ./sbr/uleq.c Mon Apr 2 15:07:21 1990
X***************
X*** 1,11 ****
X /* uleq.c - "unsigned" lexical compare */
X
X
X uleq (c1, c2)
X register char *c1,
X *c2;
X {
X! register int c;
X
X if (!c1)
X c1 = "";
X--- 1,15 ----
X /* uleq.c - "unsigned" lexical compare */
X
X+ #define TO_LOWER 040
X+ #define NO_MASK 000
X+ #include <ctype.h>
X
X uleq (c1, c2)
X register char *c1,
X *c2;
X {
X! register int c,
X! mask;
X
X if (!c1)
X c1 = "";
X***************
X*** 13,21 ****
X c2 = "";
X
X while (c = *c1++)
X! if ((c | 040) != (*c2 | 040))
X return 0;
X else
X c2++;
X return (*c2 == 0);
X }
X--- 17,28 ----
X c2 = "";
X
X while (c = *c1++)
X! {
X! mask = (isalpha(c) && isalpha(*c2)) ? TO_LOWER : NO_MASK;
X! if ((c | mask) != (*c2 | mask))
X return 0;
X else
X c2++;
X+ }
X return (*c2 == 0);
X }
X*** ../mh-6.6.0/./sbr/m_gmsg.c Wed May 4 17:36:04 1988
X--- ./sbr/m_gmsg.c Tue Mar 20 15:57:39 1990
X***************
X*** 15,20 ****
X--- 15,22 ----
X static int len=0;
X static struct info *head;
X
X+ static m_getatr();
X+ static int m_setatr();
X /* */
X
X struct msgs *m_gmsg (name)
X***************
X*** 33,40 ****
X--- 35,47 ----
X char buffer[BUFSIZ];
X #endif COMPAT
X register struct msgs *mp;
X+ #ifdef SYS5DIR
X+ register struct dirent *dp;
X+ DIR * dd;
X+ #else SYS5DIR
X register struct direct *dp;
X register DIR * dd;
X+ #endif SYS5DIR
X struct stat st;
X
X if ((dd = opendir (name = m_mailpath (name))) == NULL) {
X***************
X*** 179,185 ****
X if (mp -> msgstats == NULL)
X adios (NULLCP, "unable to allocate messages storage");
X mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
X! if (mp -> msgstats < 0)
X adios (NULLCP, "m_gmsg() botch -- you lose big");
X #endif MTR
X for (tail = head; tail < rover; tail++)
X--- 186,192 ----
X if (mp -> msgstats == NULL)
X adios (NULLCP, "unable to allocate messages storage");
X mp -> msgstats = (mp -> msgbase = mp -> msgstats) - mp -> lowoff;
X! if (mp -> msgstats < (short *)0) /* non portable */
X adios (NULLCP, "m_gmsg() botch -- you lose big");
X #endif MTR
X for (tail = head; tail < rover; tail++)
X***************
X*** 202,208 ****
X state;
X register char *cp;
X char name[NAMESZ],
X! field[BUFSIZ];
X register struct node *np;
X register FILE * fp;
X
X--- 209,215 ----
X state;
X register char *cp;
X char name[NAMESZ],
X! field[BUFSIZ * 2];
X register struct node *np;
X register FILE * fp;
X
X*** ../mh-6.6.0/./sbr/m_convert.c Thu Oct 29 15:00:33 1987
X--- ./sbr/m_convert.c Tue Feb 6 13:05:18 1990
X***************
X*** 18,23 ****
X--- 18,24 ----
X static int convdir;
X static char *delimp;
X
X+ static m_conv(), attr();
X /* */
X
X m_convert (mp, name)
X*** ../mh-6.6.0/./sbr/brkstring.c Thu Oct 29 15:00:25 1987
X--- ./sbr/brkstring.c Tue Feb 6 12:59:17 1990
X***************
X*** 4,9 ****
X--- 4,10 ----
X
X
X static char *broken[MAXARGS+1]; /* array of substring start addresses */
X+ static brkany();
X
X char **brkstring (strg, brksep, brkterm)
X register char *strg;
X*** ../mh-6.6.0/./sbr/discard.c Thu Oct 29 15:00:28 1987
X--- ./sbr/discard.c Mon Feb 5 15:01:23 1990
X***************
X*** 7,13 ****
X--- 7,15 ----
X #else SYS5
X #include <sys/types.h>
X #include <termio.h>
X+ #ifndef NOIOCTLH
X #include <sys/ioctl.h>
X+ #endif NOIOCTLH
X #endif SYS5
X
X
+ END-OF-FILE MH.6.6.6
chmod 'u=rw,g=r,o=r' 'MH.6.6.6'
echo ' -rw-r--r-- 1 mh 46338 Apr 13 13:53 MH.6.6.6 (as sent)'
echo -n ' '
/bin/ls -l MH.6.6.6
exit 0
More information about the Comp.sources.bugs
mailing list