-
Notifications
You must be signed in to change notification settings - Fork 0
/
modnotes
1237 lines (1170 loc) · 32.2 KB
/
modnotes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From: genrad!mit-eddie!mirror!rs (Rich Salz)
Subject: changes to notes
Newsgroups: mod.sources
Approved: jpn@panda.UUCP
Mod.sources: Volume 2, Issue 36
Submitted by: genrad!mit-eddie!mirror!rs (Rich Salz)
This note contains modifications to the latest version of notes, 1.7.
The diffs listed below will modify notes (version 1.7, at least) to
understand moderated newsgroups, as well as "local" notesfiles.
In a MODERATED notesfile, any attempt to write a note or send mail
is turned into a call that sends mail to the moderator. For example,
is the MODERATED flag is on for net.announce, any attempt to post
their will instead be sent as mail to mark@cbosgd.att (or whatever).
Note that it is still possible to "Copy" a note into a MODERATED
notesfile. This can be prohibited by (a) turning off write permission
on the all MODERATED notesfiles, or (b) added some trivial code to
adnote.c. I did (a); if anyone wants the code for (b), let me know.
The mapping of notesfile names to moderators is done in a file
named "moderators" in the notesfile utility directory (default is
/usr/spool/notes/.utilities). This file contains lines like:
notesfile_name <spaces_or_tabs> mail_address
Blank lines, or lines starting with '#', are ignored. Here are
a couple of lines from my "moderators" file:
Here are a couple of lines from my .utilties/moderator file:
# This comes from the posting by Gene Spafford
# Correct addresses for mirror systems by R$, 19aug85.
mod.map wjh12!ihnp4!cbosgd!mark
mod.map.uucp wjh12!ihnp4!cbosgd!uucpmap
# Here's handling an ARPA gateway'd list
fa.laser-lover furuta%washington@cca
# Here's one that we gateway ourselves
ms.loops loops-users%berkeley@cca
# Any valid address is ok
ms.prisoner inmet!masscomp!allegra!sjuvax!ianucci
Enough talk, here are the diffs.
NOTE: THE RCS REVISIONS SHOW ARE WRONG. I BLEW IT!
===============================CUT HERE===============================
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by mirror!rs on Tue Aug 20 12:22:27 EDT 1985
# Contents: DIFFS
echo x - DIFFS
sed 's/^XX//' > "DIFFS" <<'@//E*O*F DIFFS//'
XXRCS file: RCS/dropt.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 dropt.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:16:53 1985
XX--- dropt.c Tue Aug 20 11:53:19 1985
XX***************
XX*** 2,8
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: dropt.c,v 1.1 85/08/19 15:50:25 rs Exp $";
XX #endif RCSIDENT
XX
XX #define BUFSZ 128
XX--- 2,8 -----
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: dropt.c,v 1.6 85/08/20 11:52:58 rs Exp $";
XX #endif RCSIDENT
XX
XX #define BUFSZ 128
XX***************
XX*** 24,29
XX * -4 if the user hit cntrl d ( to total exit)
XX *
XX * original author/outliner : Ray Essick may 29, 1981
XX *
XX */
XX
XX--- 24,31 -----
XX * -4 if the user hit cntrl d ( to total exit)
XX *
XX * original author/outliner : Ray Essick may 29, 1981
XX+ * added the "moderated" flag:Rich $alz aug 19, 1985
XX+ * added "local" flag, toggle, YorN: Rich $alz aug 19, 1985
XX *
XX */
XX
XX***************
XX*** 35,41
XX netrow, /* networked */
XX expirerow, /* expire age */
XX longrow, /* longest ok text */
XX! worksetrow; /* working set */
XX static int lastrow;
XX
XX direct (io) struct io_f *io;
XX--- 37,45 -----
XX netrow, /* networked */
XX expirerow, /* expire age */
XX longrow, /* longest ok text */
XX! worksetrow, /* working set */
XX! modrow, /* moderated flag */
XX! localrow; /* local flag */
XX static int lastrow;
XX
XX #define YorN(c) ((c) != 0 ? YES : NO)
XX***************
XX*** 38,43
XX worksetrow; /* working set */
XX static int lastrow;
XX
XX direct (io) struct io_f *io;
XX {
XX int i; /* scratch */
XX--- 42,51 -----
XX localrow; /* local flag */
XX static int lastrow;
XX
XX+ #define YorN(c) ((c) != 0 ? YES : NO)
XX+ static char YES[] = "YES";
XX+ static char NO[] = "NO ";
XX+
XX direct (io) struct io_f *io;
XX {
XX int i; /* scratch */
XX***************
XX*** 113,129
XX break; /* skipt out of the loop */
XX
XX case 'a': /* toggle anonymous option */
XX! locknf (io, DSCRLOCK); /* lock the thing for a minute */
XX! getdscr (io, &io -> descr); /* get up to date descriptor */
XX! if (io -> descr.d_stat & ANONOK)
XX! io -> descr.d_stat &= NOT ANONOK;
XX! else
XX! io -> descr.d_stat |= ANONOK;
XX! putdscr (io, &io -> descr);
XX! unlocknf (io, DSCRLOCK);
XX! at (anonrow, 18);
XX! printf (io -> descr.d_stat & ANONOK ? "ON " : "OFF");
XX! redraw = 0;
XX break;
XX
XX case 'A': /* Archive option */
XX--- 121,127 -----
XX break; /* skipt out of the loop */
XX
XX case 'a': /* toggle anonymous option */
XX! toggle(io, ANONOK, anonrow);
XX break;
XX
XX case 'A': /* Archive option */
XX***************
XX*** 127,143
XX break;
XX
XX case 'A': /* Archive option */
XX! locknf (io, DSCRLOCK); /* lock the thing for a minute */
XX! getdscr (io, &io -> descr); /* get up to date descriptor */
XX! if (io -> descr.d_stat & ISARCH)
XX! io -> descr.d_stat &= NOT ISARCH;
XX! else
XX! io -> descr.d_stat |= ISARCH;
XX! putdscr (io, &io -> descr);
XX! unlocknf (io, DSCRLOCK);
XX! at (archrow, 18);
XX! printf (io -> descr.d_stat & ISARCH ? "YES" : "NO ");
XX! redraw = 0;
XX break;
XX
XX case 'l': /* message length */
XX--- 125,131 -----
XX break;
XX
XX case 'A': /* Archive option */
XX! toggle(io, ISARCH, archrow);
XX break;
XX
XX case 'l': /* message length */
XX***************
XX*** 173,179
XX unlocknf (io, DSCRLOCK); /* all done ... */
XX at (longrow, 27);
XX printf ("%ld bytes ", io -> descr.d_longnote);
XX- redraw = 0;
XX break;
XX
XX case 'c': /* compress the notefile */
XX--- 161,166 -----
XX unlocknf (io, DSCRLOCK); /* all done ... */
XX at (longrow, 27);
XX printf ("%ld bytes ", io -> descr.d_longnote);
XX break;
XX
XX case 'c': /* compress the notefile */
XX***************
XX*** 177,183
XX break;
XX
XX case 'c': /* compress the notefile */
XX- redraw = 0;
XX if (io -> descr.d_stat & OPEN)
XX {
XX at (lastrow, 10);
XX--- 164,169 -----
XX break;
XX
XX case 'c': /* compress the notefile */
XX if (io -> descr.d_stat & OPEN)
XX {
XX at (lastrow, 10);
XX***************
XX*** 265,271
XX printf ("%ld days ", io -> descr.d_archtime);
XX break;
XX }
XX- redraw = 0;
XX break;
XX
XX case 'W': /* working Set size */
XX--- 251,256 -----
XX printf ("%ld days ", io -> descr.d_archtime);
XX break;
XX }
XX break;
XX
XX case 'W': /* working Set size */
XX***************
XX*** 311,317
XX default:
XX printf ("%ld Notes ", io -> descr.d_workset);
XX }
XX- redraw = 0;
XX break;
XX
XX case 'E': /* keep/delete/default */
XX--- 296,301 -----
XX default:
XX printf ("%ld Notes ", io -> descr.d_workset);
XX }
XX break;
XX
XX case 'E': /* keep/delete/default */
XX***************
XX*** 348,354
XX printf ("UNKNOWN");
XX break;
XX }
XX- redraw = 0;
XX break;
XX
XX case 'D': /* Archive dirmsg */
XX--- 332,337 -----
XX printf ("UNKNOWN");
XX break;
XX }
XX break;
XX
XX case 'D': /* Archive dirmsg */
XX***************
XX*** 391,397
XX printf ("UNKNOWN ");
XX break;
XX }
XX- redraw = 0;
XX break;
XX
XX case 'o': /* toggle open status */
XX--- 374,379 -----
XX printf ("UNKNOWN ");
XX break;
XX }
XX break;
XX
XX case 'o': /* toggle open status */
XX***************
XX*** 395,411
XX break;
XX
XX case 'o': /* toggle open status */
XX! locknf (io, DSCRLOCK);
XX! getdscr (io, &io -> descr);
XX! if (io -> descr.d_stat & OPEN)
XX! io -> descr.d_stat &= NOT OPEN;
XX! else
XX! io -> descr.d_stat |= OPEN;
XX! putdscr (io, &io -> descr);
XX! unlocknf (io, DSCRLOCK);
XX! at (openrow, 18);
XX! printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED");
XX! redraw = 0;
XX break;
XX
XX case 'n': /* toggle network status */
XX--- 377,383 -----
XX break;
XX
XX case 'o': /* toggle open status */
XX! toggle (io, OPEN, openrow);
XX break;
XX
XX case 'M': /* toggle moderated status */
XX***************
XX*** 408,413
XX redraw = 0;
XX break;
XX
XX case 'n': /* toggle network status */
XX locknf (io, DSCRLOCK);
XX getdscr (io, &io -> descr);
XX--- 380,393 -----
XX toggle (io, OPEN, openrow);
XX break;
XX
XX+ case 'M': /* toggle moderated status */
XX+ toggle (io, MODERATED, modrow);
XX+ break;
XX+
XX+ case 'L': /* toggle local status */
XX+ toggle(io, LOCAL, localrow);
XX+ break;
XX+
XX case 'n': /* toggle network status */
XX toggle(io, NETWRKD, netrow);
XX break;
XX***************
XX*** 409,429
XX break;
XX
XX case 'n': /* toggle network status */
XX! locknf (io, DSCRLOCK);
XX! getdscr (io, &io -> descr);
XX! if (io -> descr.d_stat & NETWRKD)
XX! {
XX! io -> descr.d_stat &= NOT NETWRKD;
XX! }
XX! else
XX! {
XX! io -> descr.d_stat |= NETWRKD;
XX! }
XX! putdscr (io, &io -> descr);
XX! unlocknf (io, DSCRLOCK);
XX! at (netrow, 18);
XX! printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO ");
XX! redraw = 0;
XX break;
XX
XX
XX--- 389,395 -----
XX break;
XX
XX case 'n': /* toggle network status */
XX! toggle(io, NETWRKD, netrow);
XX break;
XX
XX
XX***************
XX*** 524,530
XX
XX default:
XX printf ("\07");
XX- redraw = 0;
XX goto getkey; /* hit a bad key */
XX
XX }
XX--- 490,495 -----
XX
XX default:
XX printf ("\07");
XX goto getkey; /* hit a bad key */
XX
XX }
XX***************
XX*** 553,559
XX printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED");
XX at (netrow = atrow++, atcol);
XX printf ("(n) Networked: "); /* at(5,18); */
XX! printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO ");
XX at (archrow = atrow++, atcol);
XX printf ("(A) Is Archive: "); /* at(6,18); */
XX printf (io -> descr.d_stat & ISARCH ? "YES" : "NO");
XX--- 518,524 -----
XX printf (io -> descr.d_stat & OPEN ? "OPEN " : "CLOSED");
XX at (netrow = atrow++, atcol);
XX printf ("(n) Networked: "); /* at(5,18); */
XX! printf (YorN(io -> descr.d_stat & NETWRKD));
XX at (archrow = atrow++, atcol);
XX printf ("(A) Is Archive: "); /* at(6,18); */
XX printf (YorN(io -> descr.d_stat & ISARCH));
XX***************
XX*** 556,562
XX printf (io -> descr.d_stat & NETWRKD ? "YES" : "NO ");
XX at (archrow = atrow++, atcol);
XX printf ("(A) Is Archive: "); /* at(6,18); */
XX! printf (io -> descr.d_stat & ISARCH ? "YES" : "NO");
XX at (expirerow = atrow++, atcol);
XX printf ("(e) Expiration Threshold: "); /* at (6,27); */
XX switch ((int) (io -> descr.d_archtime))
XX--- 521,533 -----
XX printf (YorN(io -> descr.d_stat & NETWRKD));
XX at (archrow = atrow++, atcol);
XX printf ("(A) Is Archive: "); /* at(6,18); */
XX! printf (YorN(io -> descr.d_stat & ISARCH));
XX! at (modrow = atrow++, atcol);
XX! printf ("(M) Moderated: ");
XX! printf (YorN(io -> descr.d_stat & MODERATED));
XX! at (localrow = atrow++, atcol);
XX! printf ("(L) Local: ");
XX! printf (YorN(io -> descr.d_stat & LOCAL));
XX at (expirerow = atrow++, atcol);
XX printf ("(e) Expiration Threshold: "); /* at (6,27); */
XX switch ((int) (io -> descr.d_archtime))
XX***************
XX*** 631,637
XX atrow = 4;
XX atcol = 40;
XX at (atrow++, atcol);
XX! printf ("Policy Note Exists: %s", io -> descr.d_plcy ? "YES" : "NO");
XX at (atrow++, atcol);
XX printf ("Next note in slot: %d", io -> descr.d_nnote + 1);
XX at (atrow++, atcol);
XX--- 602,608 -----
XX atrow = 4;
XX atcol = 40;
XX at (atrow++, atcol);
XX! printf ("Policy Note Exists: %s", YorN(io -> descr.d_plcy));
XX at (atrow++, atcol);
XX printf ("Next note in slot: %d", io -> descr.d_nnote + 1);
XX at (atrow++, atcol);
XX***************
XX*** 646,649
XX if (atrow > lastrow)
XX lastrow = atrow;
XX lastrow++;
XX }
XX--- 617,637 -----
XX if (atrow > lastrow)
XX lastrow = atrow;
XX lastrow++;
XX+ }
XX+
XX+ toggle(io, flag, row)
XX+ struct io_f *io;
XX+ int flag;
XX+ int row;
XX+ {
XX+ locknf (io, DSCRLOCK);
XX+ getdscr (io, &io -> descr);
XX+ if (io -> descr.d_stat & flag)
XX+ io -> descr.d_stat &= NOT flag;
XX+ else
XX+ io -> descr.d_stat |= flag;
XX+ putdscr (io, &io -> descr);
XX+ unlocknf (io, DSCRLOCK);
XX+ at (row, 18);
XX+ printf (YorN(io -> descr.d_stat & flag));
XX }
XX===================================================================
XXRCS file: RCS/gtext.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 gtext.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:05 1985
XX--- gtext.c Tue Aug 20 12:10:09 1985
XX***************
XX*** 2,8
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: gtext.c,v 1.1 85/08/19 19:50:41 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX--- 2,8 -----
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: gtext.c,v 1.4 85/08/20 12:09:38 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX***************
XX*** 17,22
XX * modified again: rbe 12 nov 81 fix to version 7 and general shtuff
XX * modified a third time to add insert-text for user
XX * Ray Essick December 1981
XX */
XX
XX long gettext (io, where, preface, editflag)
XX--- 17,26 -----
XX * modified again: rbe 12 nov 81 fix to version 7 and general shtuff
XX * modified a third time to add insert-text for user
XX * Ray Essick December 1981
XX+ * modified to add non-portable way of appending a signature file.
XX+ * Rich $alz July, 1985
XX+ * did signatures the "right" way (better, at least) - LOCAL flag
XX+ * Rich $alz August, 1985
XX */
XX
XX extern char hissig[];
XX***************
XX*** 19,24
XX * Ray Essick December 1981
XX */
XX
XX long gettext (io, where, preface, editflag)
XX struct io_f *io;
XX struct daddr_f *where; /* where we left it */
XX--- 23,29 -----
XX * Rich $alz August, 1985
XX */
XX
XX+ extern char hissig[];
XX long gettext (io, where, preface, editflag)
XX struct io_f *io;
XX struct daddr_f *where; /* where we left it */
XX***************
XX*** 58,63
XX {
XX unlink (fn); /* might just be protections */
XX return ((long) 0);
XX }
XX
XX count = pagein (io, scr, where); /* move text in */
XX--- 63,91 -----
XX {
XX unlink (fn); /* might just be protections */
XX return ((long) 0);
XX+ }
XX+
XX+ if (hissig[0] && io -> descr.d_stat & NETWRKD
XX+ && !(io -> descr.d_stat & LOCAL))
XX+ {
XX+ c = askyn ("Add signature (y/n): ");
XX+ printf ("\r \r");
XX+ if (c == 'y')
XX+ {
XX+ FILE * siggy;
XX+
XX+ if ((siggy = fopen (hissig, "r")) == NULL)
XX+ printf ("Can't find %s", hissig);
XX+ else
XX+ {
XX+ /* Flop to append mode, append, flip back to read */
XX+ freopen (fn, "a", scr);
XX+ while ((c = getc (siggy)) != EOF)
XX+ putc (c, scr);
XX+ fclose (siggy);
XX+ freopen (fn, "r", scr);
XX+ }
XX+ }
XX }
XX
XX count = pagein (io, scr, where); /* move text in */
XX===================================================================
XXRCS file: RCS/index.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 index.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:12 1985
XX--- index.c Tue Aug 20 10:12:39 1985
XX***************
XX*** 2,8
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: index.c,v 1.1 85/08/19 17:42:07 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX--- 2,8 -----
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: index.c,v 1.3 85/08/20 10:10:23 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX***************
XX*** 20,25
XX *
XX * Original Coding: Rob Kolstad Winter 1980
XX * modifications: Ray Essick December 1981
XX */
XX
XX indx (io, firstdis, lastdis, respnum)
XX--- 20,27 -----
XX *
XX * Original Coding: Rob Kolstad Winter 1980
XX * modifications: Ray Essick December 1981
XX+ * added MODERATED code: Rich $alz August 1985
XX+ * added LOCAL flag: Rich $alz August 1985
XX */
XX
XX static char YES[] = "YES";
XX***************
XX*** 22,27
XX * modifications: Ray Essick December 1981
XX */
XX
XX indx (io, firstdis, lastdis, respnum)
XX struct io_f *io;
XX int *firstdis,
XX--- 24,33 -----
XX * added LOCAL flag: Rich $alz August 1985
XX */
XX
XX+ static char YES[] = "YES";
XX+ static char NO[] = "NO ";
XX+ #define YorN(c) ((c) != 0 ? YES : NO)
XX+
XX indx (io, firstdis, lastdis, respnum)
XX struct io_f *io;
XX int *firstdis,
XX***************
XX*** 58,65
XX
XX case 'W': /* this too shall write a note */
XX case 'w': /* write a note */
XX! return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT);
XX! /* do it */
XX
XX case 'B': /* bitch, bitch, bitch */
XX if (init (&io2, GRIPES) < 0) /* no gripe file */
XX--- 64,80 -----
XX
XX case 'W': /* this too shall write a note */
XX case 'w': /* write a note */
XX! if ( ! (io -> descr.d_stat & MODERATED ) )
XX! return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT);
XX! if (askyn ("Moderated; send mail to moderator? ") == 'y')
XX! {
XX! at (0, 1);
XX! printf ("Subject: ");
XX! if (gline (nfname, WDLEN) > 1)
XX! mailit(io, (struct daddr_f *)0, (struct auth_f *)0,
XX! (struct when_f *)0, nfname, 0, 0);
XX! }
XX! return (-1);
XX
XX
XX case 'B': /* bitch, bitch, bitch */
XX***************
XX*** 61,66
XX return addnote (io, NULL, "Edit Note text:", "Note Title: ", NULL, EDIT);
XX /* do it */
XX
XX case 'B': /* bitch, bitch, bitch */
XX if (init (&io2, GRIPES) < 0) /* no gripe file */
XX {
XX--- 76,82 -----
XX }
XX return (-1);
XX
XX+
XX case 'B': /* bitch, bitch, bitch */
XX if (init (&io2, GRIPES) < 0) /* no gripe file */
XX {
XX***************
XX*** 168,176
XX else
XX {
XX at (0, 10);
XX! printf (" Anonymous: %s Networked: %s",
XX! (io -> descr.d_stat & ANONOK) ? "YES" : "NO",
XX! (io -> descr.d_stat & NETWRKD) ? "YES" : "NO");
XX continue;
XX }
XX
XX--- 184,196 -----
XX else
XX {
XX at (0, 10);
XX! printf (
XX! "Anonymous: %s Networked: %s Moderated: %s Local: %s",
XX! YorN (io -> descr.d_stat & ANONOK),
XX! YorN (io -> descr.d_stat & NETWRKD),
XX! YorN (io -> descr.d_stat & MODERATED),
XX! YorN (io -> descr.d_stat & LOCAL));
XX!
XX continue;
XX }
XX
XX===================================================================
XXRCS file: RCS/mailit.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 mailit.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:19 1985
XX--- mailit.c Mon Aug 19 19:32:00 1985
XX***************
XX*** 2,8
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: mailit.c,v 1.1 85/08/19 16:34:03 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX--- 2,8 -----
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: mailit.c,v 1.2 85/08/19 19:31:29 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX***************
XX*** 20,25
XX * modified: Ray Essick December 1981.
XX * modified again: Thanks to Malcolm Slaney of Purdue EE dept.
XX * added the SUPERMAILER processing. May 25, 1982
XX *
XX */
XX
XX--- 20,27 -----
XX * modified: Ray Essick December 1981.
XX * modified again: Thanks to Malcolm Slaney of Purdue EE dept.
XX * added the SUPERMAILER processing. May 25, 1982
XX+ * added code to handle the MODERATED flag.
XX+ * rich $alz, mirror systems, august 19, 1985
XX *
XX */
XX
XX***************
XX*** 41,47
XX #ifdef SUPERMAILER
XX char subject[TITLEN + 20]; /* subject line for super mailer */
XX #endif
XX- int i;
XX FILE * txtfile;
XX
XX if (toauth)
XX--- 43,48 -----
XX #ifdef SUPERMAILER
XX char subject[TITLEN + 20]; /* subject line for super mailer */
XX #endif
XX FILE * txtfile;
XX
XX if (io -> descr.d_stat & MODERATED)
XX***************
XX*** 44,50
XX int i;
XX FILE * txtfile;
XX
XX! if (toauth)
XX {
XX if (strcmp (author -> aname, "Anonymous") == 0)
XX {
XX--- 45,51 -----
XX #endif
XX FILE * txtfile;
XX
XX! if (io -> descr.d_stat & MODERATED)
XX {
XX if (modaddress (io -> nf, whoto) == 1)
XX {
XX***************
XX*** 46,51
XX
XX if (toauth)
XX {
XX if (strcmp (author -> aname, "Anonymous") == 0)
XX {
XX printf ("Can't send to Anonymous\n");
XX--- 47,63 -----
XX
XX if (io -> descr.d_stat & MODERATED)
XX {
XX+ if (modaddress (io -> nf, whoto) == 1)
XX+ {
XX+ at (0, 1);
XX+ printf ("\nComplain to a guru; can't find moderator!\007\n");
XX+ fflush (stdout);
XX+ sleep (1);
XX+ return (-1); /* no letter sent */
XX+ }
XX+ }
XX+ else if (toauth)
XX+ {
XX if (strcmp (author -> aname, "Anonymous") == 0)
XX {
XX printf ("Can't send to Anonymous\n");
XX***************
XX*** 53,62
XX sleep (1);
XX return (-1);
XX }
XX- }
XX-
XX- if (toauth)
XX- {
XX if (strcmp (System, author -> asystem) != 0)
XX {
XX #ifdef USERHOST
XX--- 65,70 -----
XX sleep (1);
XX return (-1);
XX }
XX if (strcmp (System, author -> asystem) != 0)
XX {
XX #ifdef USERHOST
XX***************
XX*** 169,172
XX #endif SUPERMAILER
XX
XX return 0;
XX }
XX--- 177,219 -----
XX #endif SUPERMAILER
XX
XX return 0;
XX+ }
XX+
XX+ modaddress (notesname, address)
XX+ char *notesname;
XX+ char *address;
XX+ {
XX+ char buff[WDLEN];
XX+ register FILE *mods;
XX+ register char *p;
XX+
XX+ sprintf (buff, "%s/%s/moderators", MSTDIR, UTILITY);
XX+
XX+ if ((mods = fopen (buff, "r")) == NULL)
XX+ {
XX+ printf ("Can't open moderators file!\n");
XX+ return 1;
XX+ }
XX+
XX+ while (fgets ( buff, sizeof buff, mods))
XX+ {
XX+ /* read lines of the form <name><whitespace>path; blanks and lines */
XX+ /* starting with "#" are comments. */
XX+ if (buff[0] == '\0' || buff[0] == '#'
XX+ || (((p=index(buff, ' ')) == NULL) && (p=index(buff, '\t')) == NULL))
XX+ continue;
XX+ *p++ = '\0'; /* split into halves */
XX+ while (*p == ' ' || *p == '\t')
XX+ p++; /* skip whitespace */
XX+ if (!strcmp (notesname, buff))
XX+ {
XX+ strcpy (address, p);
XX+ address[strlen(address) - 1] = '\0'; /* kill the \n */
XX+ fclose (mods);
XX+ return 0;
XX+ }
XX+ }
XX+
XX+ fclose (mods);
XX+ return 1;
XX }
XX===================================================================
XXRCS file: RCS/main.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 main.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:27 1985
XX--- main.c Mon Aug 19 19:57:27 1985
XX***************
XX*** 3,9
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: main.c,v 1.1 85/08/19 19:54:09 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX--- 3,9 -----
XX #include "structs.h"
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: main.c,v 1.2 85/08/19 19:57:11 rs Exp $";
XX #endif RCSIDENT
XX
XX /*
XX***************
XX*** 16,21
XX * Original author: Rob Kolstad Winter, 1980.
XX * Modifications: Ray Essick June, 1981.
XX * Modified more: Ray Essick May, 1982.
XX *
XX *
XX */
XX--- 16,23 -----
XX * Original author: Rob Kolstad Winter, 1980.
XX * Modifications: Ray Essick June, 1981.
XX * Modified more: Ray Essick May, 1982.
XX+ * modified: Rich $alz July, 1985
XX+ * To add the hissig (signature file) variable.
XX *
XX */
XX
XX***************
XX*** 17,23
XX * Modifications: Ray Essick June, 1981.
XX * Modified more: Ray Essick May, 1982.
XX *
XX- *
XX */
XX
XX
XX--- 19,24 -----
XX * modified: Rich $alz July, 1985
XX * To add the hissig (signature file) variable.
XX *
XX */
XX
XX
XX***************
XX*** 22,27
XX
XX
XX static int seqon = NOSEQ; /* sequencer mode */
XX
XX main (argc, argv)
XX char **argv;
XX--- 23,29 -----
XX
XX
XX static int seqon = NOSEQ; /* sequencer mode */
XX+ char hissig[WDLEN]; /* signature file */
XX
XX main (argc, argv)
XX char **argv;
XX***************
XX*** 60,65
XX /*
XX * grab some variables from the environment
XX */
XX if ((p = getenv ("SHELL")) != 0)
XX hisshell = p; /* his shell */
XX if ((p = getenv ("NFED")) != 0)
XX--- 62,69 -----
XX /*
XX * grab some variables from the environment
XX */
XX+ if ((p = getenv ("NFSIG")) != 0 && access (p, 04) >= 0)
XX+ strcpy(hissig, p); /* his signature file */
XX if ((p = getenv ("SHELL")) != 0)
XX hisshell = p; /* his shell */
XX if ((p = getenv ("NFED")) != 0)
XX===================================================================
XXRCS file: RCS/readem.c,v
XXretrieving revision 1.1
XXdiff -c -r1.1 readem.c
XX*** /tmp/,RCSt1001754 Tue Aug 20 12:17:55 1985
XX--- readem.c Tue Aug 20 10:22:09 1985
XX***************
XX*** 4,10
XX #include <sys/stat.h>
XX
XX #ifdef RCSIDENT
XX! static char rcsid[] = "$Header: readem.c,v 1.1 85/08/19 16:33:49 rs Exp $";