Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / local / linux / DIFFS.linux
1 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/support/pop ./conf/makefiles/support/pop
2 --- ../mh-6.8-dist/conf/makefiles/support/pop   Sat Dec 25 16:57:49 1993
3 +++ ./conf/makefiles/support/pop        Sat Jul 16 18:05:55 1994
4 @@ -110,7 +110,7 @@
5                 -@ls -l $@
6                 -@echo ""
7  
8 -popd:          xpopd
9 +popd:          xpopd;
10  
11  xpopd:         popd.o popser.o syslog.o \
12                         ../../uip/dropsbr.o \
13 @@ -146,7 +146,7 @@
14                 -@ls -l $@
15                 -@echo ""
16  
17 -popaka:                xpopaka
18 +popaka:                xpopaka;
19  
20  xpopaka:       popaka.o $(LIBES1)
21                 $(LD) $(LDFLAGS) -o $@ popaka.o $(LDLIBS1)
22 @@ -169,7 +169,7 @@
23                 -@ls -l $@
24                 -@echo ""
25  
26 -popauth:       xpopauth
27 +popauth:       xpopauth;
28  
29  xpopauth:      popauth.o $(LIBES1)
30                 $(LD) $(LDFLAGS) -o $@ popauth.o $(LDLIBS2)
31 @@ -193,7 +193,7 @@
32                 -@ls -l $@
33                 -@echo ""
34  
35 -popwrd:                xpopwrd
36 +popwrd:                xpopwrd;
37  
38  xpopwrd:       popwrd.o $(LIBES1)
39                 $(LD) $(LDFLAGS) -o $@ popwrd.o $(LDLIBS1)
40 @@ -214,7 +214,7 @@
41                 -@ls -l $@
42                 -@echo ""
43  
44 -smtpd:         xsmtpd
45 +smtpd:         xsmtpd;
46  
47  xsmtpd:                smtpd.o syslog.o
48                 $(LD) $(LDFLAGS) -o $@ smtpd.o syslog.o
49 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/conf/makefiles/uip ./conf/makefiles/uip
50 --- ../mh-6.8-dist/conf/makefiles/uip   Sat Dec 25 16:57:50 1993
51 +++ ./conf/makefiles/uip        Sat Jul 16 18:05:55 1994
52 @@ -267,7 +267,7 @@
53                 -@ls -l $@
54                 -@echo ""
55  
56 -ali:           xali
57 +ali:           xali;
58  
59  xali:          ali.o aliasbr.o $(LIBES)
60                 $(LD) $(LDFLAGS) -o $@ ali.o aliasbr.o $(LDLIBS)
61 @@ -284,7 +284,7 @@
62                 -@ls -l $@
63                 -@echo ""
64  
65 -anno:          xanno
66 +anno:          xanno;
67  
68  xanno:         anno.o annosbr.o $(LIBES)
69                 $(LD) $(LDFLAGS) -o $@ anno.o annosbr.o $(LDLIBS)
70 @@ -301,7 +301,7 @@
71                 -@ls -l $@
72                 -@echo ""
73  
74 -ap:            xap
75 +ap:            xap;
76  
77  xap:           ap.o trmsbr.o $(LIBES)
78                 $(LD) $(LDFLAGS) -o $@ ap.o trmsbr.o $(LDLIBS) $(LDCURSES)
79 @@ -325,7 +325,7 @@
80                 -@ls -l $(BINDIR)/bbc
81                 -@echo ""
82  
83 -bbc:           xbbc
84 +bbc:           xbbc;
85  
86  xbbc:          bbc.o $(PSHLIB) $(LIBES) 
87                 $(LD) $(LDFLAGS) -o $@ bbc.o $(PSHLIB) $(LDLIBS)
88 @@ -352,7 +352,7 @@
89                 -@ls -l $@
90                 -@echo ""
91  
92 -bbl:           xbbl
93 +bbl:           xbbl;
94  
95  xbbl:          bbl.o $(LIBES)
96                 $(LD) $(LDFLAGS) -o $@ bbl.o $(LDLIBS)
97 @@ -369,7 +369,7 @@
98                 -@ls -l $@
99                 -@echo ""
100  
101 -burst:         xburst
102 +burst:         xburst;
103  
104  xburst:                burst.o $(LIBES)
105                 $(LD) $(LDFLAGS) -o $@ burst.o $(LDLIBS)
106 @@ -386,7 +386,7 @@
107                 -@ls -l $@
108                 -@echo ""
109  
110 -cipher:                xcipher
111 +cipher:                xcipher;
112  
113  xcipher:       cipher.o $(TMALIB) $(LIBES)
114                 $(LD) $(LDFLAGS) -o $@ cipher.o $(TMALIB) $(LDLIBS)
115 @@ -403,7 +403,7 @@
116                 -@ls -l $(BINDIR)/comp
117                 -@echo ""
118  
119 -comp:          xcomp
120 +comp:          xcomp;
121  
122  xcomp:         comp.o whatnowproc.o \
123                         whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
124 @@ -423,7 +423,7 @@
125                 -@ls -l $@
126                 -@echo ""
127  
128 -conflict:      xconflict
129 +conflict:      xconflict;
130  
131  xconflict:     conflict.o aliasbr.o $(LIBES)
132                 $(LD) $(LDFLAGS) -o $@ conflict.o aliasbr.o $(LDLIBS)
133 @@ -440,7 +440,7 @@
134                 -@ls -l $@
135                 -@echo ""
136  
137 -decipher:              xdecipher
138 +decipher:              xdecipher;
139  
140  xdecipher:     decipher.o $(TMALIB) $(LIBES)
141                 $(LD) $(LDFLAGS) -o $@ decipher.o $(TMALIB) $(LDLIBS)
142 @@ -457,7 +457,7 @@
143                 -@ls -l $@
144                 -@echo ""
145  
146 -dist:          xdist
147 +dist:          xdist;
148  
149  xdist:         dist.o whatnowproc.o \
150                         whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
151 @@ -477,7 +477,7 @@
152                 -@ls -l $(ETCDIR)/dp
153                 -@echo ""
154  
155 -dp:            xdp
156 +dp:            xdp;
157  
158  xdp:           dp.o trmsbr.o $(LIBES) 
159                 $(LD) $(LDFLAGS) -o $@ dp.o trmsbr.o $(LDLIBS) $(LDCURSES)
160 @@ -494,7 +494,7 @@
161                 -@ls -l $@
162                 -@echo ""
163  
164 -fmtdump:               xfmtdump
165 +fmtdump:               xfmtdump;
166  
167  xfmtdump:              fmtdump.o trmsbr.o $(LIBES)
168                 $(LD) $(LDFLAGS) -o $@ fmtdump.o $(LDLIBS)
169 @@ -514,8 +514,8 @@
170                 -@ls -l $@
171                 -@echo ""
172  
173 -folders:       folder
174 -folder:                xfolder
175 +folders:       folder;
176 +folder:                xfolder;
177  
178  xfolder:       folder.o $(LIBES) 
179                 $(LD) $(LDFLAGS) -o $@ folder.o $(LDLIBS) 
180 @@ -532,7 +532,7 @@
181                 -@ls -l $@
182                 -@echo ""
183  
184 -forw:          xforw
185 +forw:          xforw;
186  
187  xforw:         forw.o whatnowproc.o \
188                         whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES) 
189 @@ -563,7 +563,7 @@
190                 -@ls -l $@
191                 -@echo ""
192  
193 -inc:           xinc
194 +inc:           xinc;
195  
196  xinc:          inc.o scansbr.o dropsbr.o trmsbr.o \
197                         $(POPLIB) $(TMALIB) $(LIBES)
198 @@ -584,7 +584,7 @@
199                 -@ls -l $@
200                 -@echo ""
201  
202 -install-mh:    xinstall-mh
203 +install-mh:    xinstall-mh;
204  
205  xinstall-mh:   install-mh.o $(LIBES) 
206                 $(LD) $(LDFLAGS) -o $@ install-mh.o $(LDLIBS) 
207 @@ -601,7 +601,7 @@
208                 -@ls -l $@
209                 -@echo ""
210  
211 -kdsc:          xkdsc
212 +kdsc:          xkdsc;
213  
214  xkdsc:         kdsc.o $(KDSLIB) $(LIBES)
215                 $(LD) $(LDFLAGS) -o $@ kdsc.o $(KDSLIB) $(LDLIBS)
216 @@ -618,7 +618,7 @@
217                 -@ls -l $@
218                 -@echo ""
219  
220 -mark:          xmark
221 +mark:          xmark;
222  
223  xmark:         mark.o $(LIBES) 
224                 $(LD) $(LDFLAGS) -o $@ mark.o $(LDLIBS) 
225 @@ -635,7 +635,7 @@
226                 -@ls -l $@
227                 -@echo ""
228  
229 -mhl:           xmhl
230 +mhl:           xmhl;
231  
232  xmhl:          mhl.o \
233                         mhlsbr.o trmsbr.o $(LIBES) 
234 @@ -655,7 +655,7 @@
235                 -@ls -l $@
236                 -@echo ""
237  
238 -mhmail:                xmhmail
239 +mhmail:                xmhmail;
240  
241  xmhmail:       mhmail.o $(LIBES) 
242                 $(LD) $(LDFLAGS) -o $@ mhmail.o $(LDLIBS)
243 @@ -672,7 +672,7 @@
244                 -@ls -l $@
245                 -@echo ""
246  
247 -mhn:           xmhn
248 +mhn:           xmhn;
249  
250  xmhn:                  mhn.o ftpsbr.o trmsbr.o $(LIBES) 
251                 $(LD) $(LDFLAGS) -o $@ mhn.o ftpsbr.o trmsbr.o \
252 @@ -690,7 +690,7 @@
253                 -@ls -l $@
254                 -@echo ""
255  
256 -mhparam:       xmhparam
257 +mhparam:       xmhparam;
258  
259  xmhparam:      mhparam.o trmsbr.o $(LIBES)
260                 $(LD) $(LDFLAGS) -o $@ mhparam.o $(LDLIBS) $(LDCURSES)
261 @@ -707,7 +707,7 @@
262                 -@ls -l $@
263                 -@echo ""
264  
265 -mhpath:                xmhpath
266 +mhpath:                xmhpath;
267  
268  xmhpath:       mhpath.o $(LIBES) 
269                 $(LD) $(LDFLAGS) -o $@ mhpath.o $(LDLIBS)
270 @@ -731,7 +731,7 @@
271                 -@ls -l $@
272                 -@echo ""
273  
274 -msgchk:                xmsgchk
275 +msgchk:                xmsgchk;
276  
277  xmsgchk:       msgchk.o $(POPLIB) $(LIBES)
278                 $(LD) $(LDFLAGS) -o $@ msgchk.o $(POPLIB) \
279 @@ -749,7 +749,7 @@
280                 -@ls -l $@
281                 -@echo ""
282  
283 -msh:           xmsh
284 +msh:           xmsh;
285  
286  xmsh:          msh.o mshcmds.o vmhsbr.o \
287                         picksbr.o scansbr.o dropsbr.o mhlsbr.o trmsbr.o \
288 @@ -772,7 +772,7 @@
289                 -@ls -l $@
290                 -@echo ""
291  
292 -packf:         xpackf
293 +packf:         xpackf;
294  
295  xpackf:                packf.o dropsbr.o $(LIBES)
296                 $(LD) $(LDFLAGS) -o $@ packf.o dropsbr.o $(LDLIBS)
297 @@ -789,7 +789,7 @@
298                 -@ls -l $@
299                 -@echo ""
300  
301 -pick:          xpick
302 +pick:          xpick;
303  
304  xpick:         pick.o picksbr.o $(LIBES)
305                 $(LD) $(LDFLAGS) -o $@ pick.o picksbr.o $(LDLIBS)
306 @@ -806,7 +806,7 @@
307                 -@ls -l $@
308                 -@echo ""
309  
310 -popi:          xpopi
311 +popi:          xpopi;
312  
313  xpopi:         popi.o $(POPLIB) trmsbr.o $(LIBES)
314                 $(LD) $(LDFLAGS) -o $@ popi.o $(POPLIB) trmsbr.o $(LDLIBS) \
315 @@ -831,7 +831,7 @@
316                 -@ls -l $@
317                 -@echo ""
318  
319 -post:          xpost
320 +post:          xpost;
321  
322  xpost:         post.o \
323                         aliasbr.o $(MTSBRS) $(TMALIB) $(LIBES)
324 @@ -851,7 +851,7 @@
325                 -@ls -l $@
326                 -@echo ""
327  
328 -prompter:      xprompter
329 +prompter:      xprompter;
330  
331  xprompter:     prompter.o $(LIBES) 
332                 $(LD) $(LDFLAGS) -o $@ prompter.o $(LDLIBS)
333 @@ -868,7 +868,7 @@
334                 -@ls -l $@
335                 -@echo ""
336  
337 -rcvdist:       xrcvdist
338 +rcvdist:       xrcvdist;
339  
340  xrcvdist:      rcvdist.o distsbr.o $(LIBES)
341                 $(LD) $(LDFLAGS) -o $@ rcvdist.o distsbr.o $(LDLIBS)
342 @@ -885,7 +885,7 @@
343                 -@ls -l $@
344                 -@echo ""
345  
346 -rcvpack:       xrcvpack
347 +rcvpack:       xrcvpack;
348  
349  xrcvpack:      rcvpack.o dropsbr.o $(LIBES)
350                 $(LD) $(LDFLAGS) -o $@ rcvpack.o dropsbr.o $(LDLIBS)
351 @@ -902,7 +902,7 @@
352                 -@ls -l $@
353                 -@echo ""
354  
355 -rcvstore:      xrcvstore
356 +rcvstore:      xrcvstore;
357  
358  xrcvstore:     rcvstore.o $(LIBES)
359                 $(LD) $(LDFLAGS) -o $@ rcvstore.o $(LDLIBS)
360 @@ -923,7 +923,7 @@
361                 -@ls -l $@
362                 -@echo ""
363  
364 -rcvtty:                xrcvtty
365 +rcvtty:                xrcvtty;
366  
367  xrcvtty:       rcvtty.o scansbr.o trmsbr.o \
368  @BEGIN: TTYD
369 @@ -952,7 +952,7 @@
370                 -@ls -l $@
371                 -@echo ""
372  
373 -refile:                xrefile
374 +refile:                xrefile;
375  
376  xrefile:       refile.o $(LIBES) 
377                 $(LD) $(LDFLAGS) -o $@ refile.o $(LDLIBS) 
378 @@ -969,7 +969,7 @@
379                 -@ls -l $@
380                 -@echo ""
381  
382 -repl:          xrepl
383 +repl:          xrepl;
384  
385  xrepl:         repl.o replsbr.o whatnowproc.o \
386                         whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
387 @@ -992,7 +992,7 @@
388                 -@ls -l $@
389                 -@echo ""
390  
391 -rmail:         xrmail
392 +rmail:         xrmail;
393  
394  xrmail:        rmail.o $(LIBES)
395                 $(LD) $(LDFLAGS) -o $@ rmail.o $(LDLIBS)
396 @@ -1009,7 +1009,7 @@
397                 -@ls -l $@
398                 -@echo ""
399  
400 -rmf:           xrmf
401 +rmf:           xrmf;
402  
403  xrmf:          rmf.o $(LIBES) 
404                 $(LD) $(LDFLAGS) -o $@ rmf.o $(LDLIBS)
405 @@ -1026,7 +1026,7 @@
406                 -@ls -l $@
407                 -@echo ""
408  
409 -rmm:           xrmm
410 +rmm:           xrmm;
411  
412  xrmm:          rmm.o $(LIBES) 
413                 $(LD) $(LDFLAGS) -o $@ rmm.o $(LDLIBS)
414 @@ -1043,7 +1043,7 @@
415                 -@ls -l $@
416                 -@echo ""
417  
418 -scan:          xscan
419 +scan:          xscan;
420  
421  xscan:         scan.o \
422                         scansbr.o trmsbr.o $(LIBES)
423 @@ -1063,7 +1063,7 @@
424                 -@ls -l $@
425                 -@echo ""
426  
427 -send:          xsend
428 +send:          xsend;
429  
430  xsend:         send.o \
431                         sendsbr.o annosbr.o distsbr.o $(LIBES) 
432 @@ -1089,9 +1089,9 @@
433                 -@ls -l $@
434                 -@echo ""
435  
436 -next:          show
437 -prev:          show
438 -show:          xshow
439 +next:          show;
440 +prev:          show;
441 +show:          xshow;
442  
443  xshow:         show.o \
444                         mhlsbr.o trmsbr.o $(LIBES) 
445 @@ -1118,7 +1118,7 @@
446                 -@ls -l $@
447                 -@echo ""
448  
449 -sbboards:      xsbboards
450 +sbboards:      xsbboards;
451  
452  xsbboards:     sbboards.o dropsbr.o $(LIBES)
453                 $(LD) $(LDFLAGS) -o $@ sbboards.o dropsbr.o $(LDLIBS)
454 @@ -1135,7 +1135,7 @@
455                 -@ls -l $@
456                 -@echo ""
457  
458 -slocal:                xslocal
459 +slocal:                xslocal;
460  
461  xslocal:       slocal.o aliasbr.o dropsbr.o $(LIBES)
462                 $(LD) $(LDFLAGS) -o $@ slocal.o aliasbr.o dropsbr.o $(LDLIBS)
463 @@ -1152,7 +1152,7 @@
464                 -@ls -l $@
465                 -@echo ""
466  
467 -sortm:         xsortm
468 +sortm:         xsortm;
469  
470  xsortm:        sortm.o $(LIBES) 
471                 $(LD) $(LDFLAGS) -o $@ sortm.o $(LDLIBS)
472 @@ -1172,7 +1172,7 @@
473                 -@ls -l $@
474                 -@echo ""
475  
476 -spop:          xspop
477 +spop:          xspop;
478  
479  xspop:         spop.o dropsbr.o $(LIBES)
480                 $(LD) $(LDFLAGS) -o $@ spop.o dropsbr.o $(LDLIBS)
481 @@ -1193,7 +1193,7 @@
482                 -@ls -l $@
483                 -@echo ""
484  
485 -spost:         xspost
486 +spost:         xspost;
487  
488  xspost:        spost.o aliasbr.o $(LIBES)
489                 $(LD) $(LDFLAGS) -o $@ spost.o aliasbr.o $(LDLIBS)
490 @@ -1213,7 +1213,7 @@
491                 -@echo "Don't forget to: ln -s /usr/lib/sendmail $@"
492                 -@echo ""
493                 
494 -sendmail:              xsendmail
495 +sendmail:              xsendmail;
496  
497  xsendmail:             sendmail.o $(LIBES)
498                 $(LD) $(LDFLAGS) -o $@ sendmail.o $(LDLIBS)
499 @@ -1230,7 +1230,7 @@
500                 -@ls -l $@
501                 -@echo ""
502  
503 -tma:           xtma
504 +tma:           xtma;
505  
506  xtma:          tma.o $(TMALIB) $(LIBES)
507                 $(LD) $(LDFLAGS) -o $@ tma.o $(TMALIB) $(LDLIBS)
508 @@ -1247,7 +1247,7 @@
509                 -@ls -l $@
510                 -@echo ""
511  
512 -umhook:                xumhook
513 +umhook:                xumhook;
514  
515  xumhook:       umhook.o $(LIBES) 
516                 $(LD) $(LDFLAGS) -o $@ umhook.o  $(LDLIBS) $(LDCURSES)
517 @@ -1264,7 +1264,7 @@
518                 -@ls -l $@
519                 -@echo ""
520  
521 -vmh:           xvmh
522 +vmh:           xvmh;
523  
524  xvmh:          vmh.o vmhsbr.o $(LIBES) 
525                 $(LD) $(LDFLAGS) -o $@ vmh.o vmhsbr.o $(LDCURSES) $(LDLIBS)
526 @@ -1285,7 +1285,7 @@
527                 -@ls -l $@
528                 -@echo ""
529  
530 -whatnow:       xwhatnow
531 +whatnow:       xwhatnow;
532  
533  xwhatnow:      whatnow.o \
534                         whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LIBES)
535 @@ -1305,7 +1305,7 @@
536                 -@ls -l $@
537                 -@echo ""
538  
539 -whom:          xwhom
540 +whom:          xwhom;
541  
542  xwhom:         whom.o distsbr.o $(LIBES)
543                 $(LD) $(LDFLAGS) -o $@ whom.o distsbr.o $(LDLIBS)
544 @@ -1322,7 +1322,7 @@
545                 -@ls -l $@
546                 -@echo ""
547  
548 -wmh:           xwmh
549 +wmh:           xwmh;
550  
551  xwmh:          wmh.o vmhsbr.o $(LIBES) 
552                 ${CC} $(LDFLAGS) -o $@ wmh.o vmhsbr.o $(LDLIBS) \
553 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/h/strings.h ./h/strings.h
554 --- ../mh-6.8-dist/h/strings.h  Sat Dec 25 16:57:50 1993
555 +++ ./h/strings.h       Sat Jul 16 18:05:55 1994
556 @@ -63,7 +63,9 @@
557  #ifdef SYS5
558  #include <memory.h>
559  #define bcmp(b1,b2,length)     memcmp(b1, b2, length)
560 +#if __GNUC__ != 2
561  #define        bcopy(b1,b2,length)     (void) memcpy (b2, b1, length)
562 +#endif
563  #define        bcpy(b1,b2,length)      memcmp (b1, b2, length)
564  #define        bzero(b,length)         (void) memset (b, 0, length)
565  #endif /* SYS5 */
566 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/discard.c ./sbr/discard.c
567 --- ../mh-6.8-dist/sbr/discard.c        Sat Dec 25 16:57:51 1993
568 +++ ./sbr/discard.c     Sat Jul 16 18:11:18 1994
569 @@ -49,7 +49,11 @@
570  #ifdef _FSTDIO
571      fpurge (io);
572  #else
573 +#ifdef _STDIO_USES_IOSTREAM
574 +    io -> _IO_write_ptr = io -> _IO_write_base;
575 +#else
576      if (io -> _ptr = io -> _base)
577         io -> _cnt = 0;
578  #endif
579 +#endif /* _STDIO_USES_IOSTREAM */
580  }
581 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/sbr/m_getfld.c ./sbr/m_getfld.c
582 --- ../mh-6.8-dist/sbr/m_getfld.c       Sat Dec 25 16:57:51 1993
583 +++ ./sbr/m_getfld.c    Sat Jul 16 18:10:23 1994
584 @@ -244,22 +244,40 @@
585              */
586             cp = name; i = NAMESZ - 1;
587             for (;;) {
588 +#ifdef _STDIO_USES_IOSTREAM
589 +               bp = sp = (unsigned char *) iob->_IO_read_ptr - 1;
590 +               j = (cnt = ((long) iob->_IO_read_end - (long) iob->_IO_read_ptr) + 1) < i?
591 +                   cnt: i;
592 +#else
593                 bp = sp = (unsigned char *) iob->_ptr - 1;
594                 j = (cnt = iob->_cnt+1) < i ? cnt : i;
595 +#endif
596                 while ((c = *bp++) != ':' && c != '\n' && --j >= 0)
597                     *cp++ = c;
598  
599                 j = bp - sp;
600                 if ((cnt -= j) <= 0) {
601 +#ifdef _STDIO_USES_IOSTREAM
602 +                   iob->_IO_read_ptr = iob->_IO_read_end;
603 +                   if (__underflow(iob) == EOF) {
604 +#else
605                     if (_filbuf(iob) == EOF) {
606 +#endif
607                         *cp = *buf = 0;
608                         advise (NULLCP, "eof encountered in field \"%s\"",
609                                 name);
610                         return FMTERR;
611                     }
612 +#ifdef _STDIO_USES_IOSTREAM
613 +                   iob->_IO_read_ptr++; /* NOT automatic in __underflow()! */
614 +#endif
615                 } else {
616 +#ifdef _STDIO_USES_IOSTREAM
617 +                   iob->_IO_read_ptr = bp + 1;
618 +#else
619                     iob->_ptr = bp + 1;
620                     iob->_cnt = cnt - 1;
621 +#endif
622                 }
623                 if (c == ':')
624                     break;
625 @@ -298,16 +316,27 @@
626              */
627             cp = buf; i = bufsz-1;
628             for (;;) {
629 +#ifdef _STDIO_USES_IOSTREAM
630 +               cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
631 +               bp = (unsigned char *) --iob->_IO_read_ptr;
632 +#else
633                 cnt = iob->_cnt++; bp = (unsigned char *) --iob->_ptr;
634 +#endif
635                 c = cnt < i ? cnt : i;
636                 while (ep = locc( c, bp, '\n' )) {
637                     /*
638                      * if we hit the end of this field, return.
639                      */
640                     if ((j = *++ep) != ' ' && j != '\t') {
641 +#ifdef _STDIO_USES_IOSTREAM
642 +                       j = ep - (unsigned char *) iob->_IO_read_ptr;
643 +                       (void) bcopy( iob->_IO_read_ptr, cp, j);
644 +                       iob->_IO_read_ptr = ep;
645 +#else
646                         j = ep - (unsigned char *) iob->_ptr;
647                         (void) bcopy( iob->_ptr, cp, j);
648                         iob->_ptr = ep; iob->_cnt -= j;
649 +#endif
650                         cp += j;
651                         state = FLD;
652                         goto finish;
653 @@ -317,12 +346,21 @@
654                 /*
655                  * end of input or dest buffer - copy what we've found.
656                  */
657 +#ifdef _STDIO_USES_IOSTREAM
658 +               c += bp - (unsigned char *) iob->_IO_read_ptr;
659 +               (void) bcopy( iob->_IO_read_ptr, cp, c);
660 +#else
661                 c += bp - (unsigned char *) iob->_ptr;
662                 (void) bcopy( iob->_ptr, cp, c);
663 +#endif
664                 i -= c; cp += c;
665                 if (i <= 0) {
666                     /* the dest buffer is full */
667 +#ifdef _STDIO_USES_IOSTREAM
668 +                   iob->_IO_read_ptr += c;
669 +#else
670                     iob->_cnt -= c; iob->_ptr += c;
671 +#endif
672                     state = FLDPLUS;
673                     break;
674                 }
675 @@ -333,11 +371,22 @@
676                  * this is the end of the field.  Otherwise loop.
677                  */
678                 --i;
679 +#ifdef _STDIO_USES_IOSTREAM
680 +               *cp++ = j = *(iob->_IO_read_ptr + c);
681 +               iob->_IO_read_ptr = iob->_IO_read_end;
682 +               c = __underflow(iob);
683 +               iob->_IO_read_ptr++;    /* NOT automatic! */
684 +#else
685                 *cp++ = j = *(iob->_ptr + c);
686                 c = _filbuf(iob);
687 +#endif
688                 if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') {
689                     if (c != EOF)
690 +#ifdef _STDIO_USES_IOSTREAM
691 +                       --iob->_IO_read_ptr;
692 +#else
693                         --iob->_ptr, ++iob->_cnt;
694 +#endif
695                     state = FLD;
696                     break;
697                 }
698 @@ -353,7 +402,12 @@
699              * the output buffer and we don't add an eos.
700              */
701             i = (bufsz < 0) ? -bufsz : bufsz-1;
702 +#ifdef _STDIO_USES_IOSTREAM
703 +           bp = (unsigned char *) --iob->_IO_read_ptr;
704 +           cnt = (long) iob->_IO_read_end - (long) iob->_IO_read_ptr;
705 +#else
706             bp = (unsigned char *) --iob->_ptr; cnt = ++iob->_cnt;
707 +#endif
708             c = (cnt < i ? cnt : i);
709             if (msg_style != MS_DEFAULT && c > 1) {
710                 /*
711 @@ -410,8 +464,12 @@
712                 }
713             }
714             (void) bcopy( bp, buf, c );
715 +#ifdef _STDIO_USES_IOSTREAM
716 +           iob->_IO_read_ptr += c;
717 +#else
718             iob->_cnt -= c;
719             iob->_ptr += c;
720 +#endif
721             if (bufsz < 0) {
722                 msg_count = c;
723                 return (state);
724 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/support/pop/popd.c ./support/pop/popd.c
725 --- ../mh-6.8-dist/support/pop/popd.c   Sat Dec 25 16:57:51 1993
726 +++ ./support/pop/popd.c        Sat Jul 16 18:05:56 1994
727 @@ -61,8 +61,10 @@
728  #ifndef        BSD44
729  extern int  sys_nerr;
730  extern char *sys_errlist[];
731 +#ifndef linux
732  extern char *sys_siglist[];
733  #endif
734 +#endif
735  
736  
737  int  debug = 0;
738 @@ -193,6 +195,10 @@
739  #ifdef SIGCHLD
740      (void) signal (SIGCHLD, chldser);
741  #endif /* SIGCHLD */
742 +#ifdef linux
743 +/* No limit on the number of connections? this seems wrong... */
744 +#define SOMAXCONN 5
745 +#endif
746      (void) listen (sd, SOMAXCONN);
747  #endif /* KPOP */
748  #ifdef FAST
749 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/inc.c ./uip/inc.c
750 --- ../mh-6.8-dist/uip/inc.c    Sat Dec 25 16:57:51 1993
751 +++ ./uip/inc.c Sat Jul 16 18:05:56 1994
752 @@ -384,17 +384,23 @@
753  
754  /* \f */
755  
756 -#ifdef MAILGROUP
757 -    return_gid = getegid();    /* Save effective gid, assuming we'll use it */
758 -    setgid(getgid());          /* Turn off extraordinary privileges */
759 -#endif /* MAILGROUP */
760 -
761  #ifdef POP
762      if (host && !*host)
763         host = NULL;
764      if (from || !host || rpop <= 0)
765         (void) setuid (getuid ());
766  #endif /* POP */
767 +
768 +/*
769 + * 93/12/17 bsa@kf8nh.wariat.org relocated: with MAILGROUP and POP both defined
770 + * the setgid() call ran as root, and saved gid would be lost.  If the setuid()
771 + * call above then ran, inc would be unable to reestablish its setgid state.
772 + */
773 +#ifdef MAILGROUP
774 +    return_gid = getegid();    /* Save effective gid, assuming we'll use it */
775 +    setgid(getgid());          /* Turn off extraordinary privileges */
776 +#endif /* MAILGROUP */
777 +
778      if (from) {
779         newmail = from;
780  #ifdef POP
781 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/popi.c ./uip/popi.c
782 --- ../mh-6.8-dist/uip/popi.c   Sat Dec 25 16:57:51 1993
783 +++ ./uip/popi.c        Sat Jul 16 18:05:57 1994
784 @@ -558,7 +558,11 @@
785  
786  
787  static int  dselect (d)
788 +#ifdef SYS5DIR
789 +register struct dirent *d;
790 +#else
791  register struct direct *d;
792 +#endif
793  {
794      int            i;
795  
796 @@ -571,8 +575,13 @@
797  
798  
799  static int  dcompar (d1, d2)
800 +#ifdef SYS5DIR
801 +struct dirent **d1,
802 +             **d2;
803 +#else
804  struct direct **d1,
805               **d2;
806 +#endif
807  {
808      struct stat s1,
809                 s2;
810 @@ -592,7 +601,11 @@
811      int            n,
812             retval,
813             sm;
814 +#ifdef SYS5DIR
815 +    struct dirent **namelist;
816 +#else
817      struct direct **namelist;
818 +#endif
819  
820      if (chdir (bulksw) == NOTOK)
821         adios (bulksw, "unable to change directory to");
822 @@ -602,7 +615,11 @@
823  
824      sm = NOTOK;
825      for (i = 0; i < n; i++) {
826 +#ifdef SYS5DIR
827 +       register struct dirent *d = namelist[i];
828 +#else
829         register struct direct *d = namelist[i];
830 +#endif
831  
832         if (sm == NOTOK) {
833             if (rp_isbad (retval = sm_init (NULLCP, host, 1, 1, snoop)))
834 @@ -630,13 +647,21 @@
835         register int j;
836         int     l,
837                 m;
838 +#ifdef SYS5DIR
839 +       struct dirent **newlist;
840 +#else
841         struct direct **newlist;
842 +#endif
843  
844         while ((l = scandir (".", &newlist, dselect, dcompar)) > OK) {
845             m = 0;
846  
847             for (j = 0; j < l; j++) {
848 +#ifdef SYS5DIR
849 +               register struct dirent *d = newlist[j];
850 +#else
851                 register struct direct *d = newlist[j];
852 +#endif
853  
854                 for (i = 0; i < n; i++)
855                     if (strcmp (d -> d_name, namelist[i] -> d_name) == 0)
856 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/sbboards.c ./uip/sbboards.c
857 --- ../mh-6.8-dist/uip/sbboards.c       Sat Dec 25 16:57:51 1993
858 +++ ./uip/sbboards.c    Sat Jul 16 18:05:57 1994
859 @@ -66,7 +66,10 @@
860  #ifdef LOCALE
861  #include       <locale.h>
862  #endif
863 -
864 +#ifdef linux
865 +/* FIXME - who should be doing this?  With what option? */
866 +#include <sys/types.h>
867 +#endif
868  
869  #define        NBB     100
870  
871 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/scansbr.c ./uip/scansbr.c
872 --- ../mh-6.8-dist/uip/scansbr.c        Sat Dec 25 16:57:51 1993
873 +++ ./uip/scansbr.c     Sat Jul 16 18:10:56 1994
874 @@ -238,14 +238,25 @@
875                  */
876         body:   ;
877                 while (state == BODY) {
878 +#ifdef _STDIO_USES_IOSTREAM
879 +                   if (scnout->_IO_write_ptr == scnout->_IO_write_end) {
880 +#else
881                     if (scnout->_cnt <= 0) {
882 +#endif
883                         if (fflush(scnout) == EOF)
884                             adios (scnmsg, "write error on");
885                     }
886 +#ifdef _STDIO_USES_IOSTREAM
887 +                   state = m_getfld(state, name, scnout->_IO_write_ptr,
888 +                                    (long)scnout->_IO_write_ptr-(long)scnout->_IO_write_end,
889 +                                    inb);
890 +                   scnout->_IO_write_ptr += msg_count;
891 +#else
892                     state = m_getfld( state, name, scnout->_ptr,
893                                       -(scnout->_cnt), inb );
894                     scnout->_cnt -= msg_count;
895                     scnout->_ptr += msg_count;
896 +#endif
897                 }
898                 goto finished;
899  
900 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/spop.c ./uip/spop.c
901 --- ../mh-6.8-dist/uip/spop.c   Sat Dec 25 16:57:51 1993
902 +++ ./uip/spop.c        Sat Jul 16 18:05:57 1994
903 @@ -66,6 +66,10 @@
904  #ifdef LOCALE
905  #include       <locale.h>
906  #endif
907 +#ifdef linux
908 +/* FIXME - who should be doing this?  With what option? */
909 +#include <sys/types.h>
910 +#endif
911  
912  
913  #define        NBB     100
914 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/uip/vmh.c ./uip/vmh.c
915 --- ../mh-6.8-dist/uip/vmh.c    Sat Dec 25 16:57:52 1993
916 +++ ./uip/vmh.c Sat Jul 16 18:05:57 1994
917 @@ -11,8 +11,10 @@
918   * means "AT&T line discipline" (termio, not sgttyb), whereas terminfo
919   * is quite a separate issue.
920   */
921 +#ifndef linux
922  #define        TERMINFO        1
923  #endif
924 +#endif
925  
926  /* TODO:
927         Pass signals to client during execution
928 @@ -175,6 +177,9 @@
929  #if !defined(SYS5) && !defined(BSD44)
930  int    _putchar ();
931  #endif /* not SYS5 */
932 +#ifdef linux
933 +static int _putchar (c) int c; { putchar (c); }
934 +#endif
935  #ifdef SIGTSTP
936  char   *tgoto ();
937  #endif /* SIGTSTP */
938 diff --unified --recursive --minimal --unidirectional-new-file ../mh-6.8-dist/zotnet/mts/lock.c ./zotnet/mts/lock.c
939 --- ../mh-6.8-dist/zotnet/mts/lock.c    Sat Dec 25 16:57:52 1993
940 +++ ./zotnet/mts/lock.c Sat Jul 16 18:05:57 1994
941 @@ -29,7 +29,9 @@
942  #include <sys/types.h>
943  #include <sys/stat.h>
944  #ifdef SVR4
945 +#ifndef linux
946  #define LOCKF
947 +#endif
948  #include <unistd.h>
949  #endif
950  #ifdef LOCKF