Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/ka9q/delgroup

StarterPak/!Newsbase/Transports/ka9q/delgroup

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet
Filename: StarterPak/!Newsbase/Transports/ka9q/delgroup
Read OK:
File size: 0F75 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >delgroup
   20REM remove group(s) from server list
   30REM recoded to output files for !TCPIP 2.02
   40
   50fh%=0
   60ONERROR REPORT:PRINT" at line ";ERL:END
   70SYS"OS_GetEnv" TO A$
   80N$="":old%=FALSE
   90REPEAT
  100p$=FNgetpar(A$," ")
  110CASEp$OF
  120WHEN"-n":N$=FNgetpar(A$," ")
  130WHEN"-old":old%=TRUE
  140ENDCASE
  150UNTILA$=""
  160IFN$=""THENPROCexit(1,"No group parameter")
  170
  180DIM buf% 1024
  190
  200grpmax%=(HIMEM-END-1000)DIV40
  210IFgrpmax%<200 THEN grpmax%=200
  220DIMgrp$(grpmax%)
  230
  240REM eliminate any spaces from parameter
  250g$=FNclean(N$)
  260
  270d1$="<NNTP$Dir>"
  280SYS"XOS_File",17,d1$TOt%;F%
  290IFt%=0OR(F%AND1)<>0 THEN
  300  d1$="<TCPIP$Dir>":SYS"XOS_File",17,d1$TOt%;F%
  310  IFt%=0OR(F%AND1)<>0 THENPROCexit(1,"!TCPIP not found")
  320ENDIF
  330
  340next%=0:files%=0:found%=0
  350REM loop through xxxGroup files
  360REPEAT
  370  SYS"XOS_GBPB",9,d1$,buf%,1,next%,1024,"*Group"TO,,,no%,next%;F%
  380  IFno%>0AND(F%AND1)=0THEN
  390    f$=FNstr(buf%)
  400    IFFNfilesize(d1$+"."+f$)>0THENfound%+=FNrmfile(d1$+"."+f$,g$):files%+=1
  410  ENDIF
  420UNTILnext%<0
  430IFfiles%=0PROCexit(1,"Couldn't open xxxGroup - is !TCPIP online?")
  440IFfound%=0PROCexit(1,"Group not found")
  450PROCexit(0,"Group "+g$+" removed")
  460END
  470
  480DEFFNrmfile(f$,g$)
  490LOCALfound%
  500SYS"XOS_Find",&4F,f$ TOfh%;F%
  510IF(F%AND1) THENfh%=0:=0
  520
  530l%=0
  540REPEAT
  550  A$=GET$#fh%
  560  WHILEA$>""
  570    grp$(l%)=FNgetpar(A$,","):l%+=1
  580  ENDWHILE
  590UNTILEOF#fh%ORl%=grpmax%-2
  600CLOSE#fh%:fh%=0
  610
  620lastgroup%=l%
  630
  640found%=0
  650FORa%=0TOlastgroup%
  660    a$=FNclean(grp$(a%))
  670    CASEFNmatch(g$,a$)OF
  680      WHEN0:REM leave l$=l$+g1$+","
  690      WHEN1:found%=1:a$=""
  700      WHEN2:found%=1:IFneg%=0THENgrp$(lastgroup%)="!"+g$:lastgroup%+=1:neg%=1
  710      WHEN-1:IFneg%=0THENgrp$(lastgroup%)="!"+g$:lastgroup%+=1:neg%=1
  720      WHEN-2:a$="":REM wild omit
  730    ENDCASE
  740  grp$(a%)=a$
  750NEXT
  760REM write out new version of file
  770F%=FNrename(f$,f$+"~")
  780SYS"XOS_Find",&8F,f$TOfh%;F%
  790IF(F%AND1) fh%=0:PROCexit(1,"Couldn't open output file")
  800files%+=1
  810PROCfixuplist
  820IFold%THEN
  830  line$=""
  840  FORl%=0TOlastgroup%+2
  850    a$=grp$(l%)
  860    IFa$>""THEN
  870      IFLENline$+LENa$<220THEN
  880        line$=line$+","+a$
  890        ELSE
  900        IFLEFT$(line$,1)=","THENline$=MID$(line$,2)
  910        BPUT#fh%,line$:line$=a$
  920      ENDIF
  930    ENDIF
  940  NEXTl%
  950  IFline$>""THENBPUT#fh%,line$
  960  ELSE
  970  FORl%=0TOlastgroup%+2
  980    IFgrp$(l%)>""THENBPUT#fh%,grp$(l%)
  990  NEXTl%
 1000ENDIF
 1010CLOSE#fh%:fh%=0:grp$()=""
 1020SYS"XOS_File",18,f$,&FFF
 1030=found%
 1040
 1050DEFPROCfixuplist
 1060REM move negated groups onto ends of appropriate wildcarded lines
 1070LOCALl%,l2%,c%,A$,B$
 1080FORl%=0TOlastgroup%+2
 1090  IFLEFT$(grp$(l%),1)="!"THEN
 1100    A$=grp$(l%):grp$(l%)=""
 1110    l2%=0:WHILEl2%<lastgroup%+2
 1120      B$=grp$(l2%):c%=INSTR(B$,","):IFc%>0THENB$=LEFT$(B$,c%-1)
 1130      IFRIGHT$(B$)="*"THEN
 1140        REM test for match
 1150        IFMID$(A$,2,LENB$-1)=LEFT$(B$)THEN
 1160          IFLENgrp$(l2%)+LENA$<254THENgrp$(l2%)+=","+A$:l2%=lastgroup%+2
 1170        ENDIF
 1180      ENDIF
 1190    l2%+=1:ENDWHILE
 1200  ENDIF
 1210NEXTl%
 1220ENDPROC
 1230
 1240DEFFNgetgroup(RETURN A$)
 1250n%=INSTR(A$,",")
 1260IFn%>0THEN
 1270  B$=LEFT$(A$,n%-1):A$=MID$(A$,n%+1)
 1280  ELSE
 1290  B$=A$:A$=""
 1300ENDIF
 1310=FNclean(B$)
 1320
 1330DEFFNmatch(g$,pat$)
 1340REM returns 0 nomatch, 1 direct match, 2 wild match (-ive for negated match)
 1350LOCALmatch%,neg%:match%=0:neg%=0
 1360IFLEFT$(pat$,1)="!"THENneg%=1:pat$=MID$(pat$,2)
 1370IFRIGHT$(pat$,1)="*"ANDpat$<>g$THEN
 1380  IFLEFT$(pat$,LENpat$-1)=LEFT$(g$,LENpat$-1)THENmatch%=2
 1390  ELSE
 1400  IFpat$=g$THENmatch%=1
 1410ENDIF
 1420IFneg%THENmatch%=-match%
 1430=match%
 1440
 1450DEFFNfilesize(f$)
 1460LOCALs%:SYS"XOS_File",17,f$TO,,,,s%;F%
 1470IF(F%AND1)THENs%=-1
 1480=s%
 1490
 1500DEFPROCexit(n%,a$)
 1510IFfh%<>0 CLOSE#fh%
 1520OSCLI("set NewsBase$ReturnCode "+STR$n%)
 1530OSCLI("set NewsBase$ReturnInfo "+a$)
 1540END
 1550
 1560DEFFNstr(a%)
 1570LOCALa$:WHILE ?a%>31ANDLENa$<255:a$+=CHR$?a%:a%+=1:ENDWHILE
 1580=a$
 1590
 1600DEFFNrename(s$,d$)
 1610LOCALF%:SYS"XOS_FSControl",25,s$,d$TOerr%;F%
 1620IF(F%AND1) THEN
 1630  F%=FNdelfile(d$)
 1640  SYS"XOS_FSControl",25,s$,d$TOerr%;F%
 1650ENDIF
 1660=(F%AND1)
 1670
 1680DEFFNmovefile(s$,d$)
 1690LOCALF%:F%=FNrename(s$,d$)
 1700IFF%<>0SYS"XOS_FSControl",26,s$,d$,(1<<7) TO;F%
 1710=(F%AND1)
 1720
 1730DEFFNdelfile(f$)
 1740LOCALF%:SYS"XOS_File",6,f$TO;F%
 1750=(F%AND1)
 1760
 1770DEFFNclean(B$)
 1780WHILELEFT$(B$,1)=" ":B$=MID$(B$,2):ENDWHILE
 1790WHILERIGHT$(B$,1)=" ":B$=LEFT$(B$,LENB$-1):ENDWHILE
 1800=B$
 1810
 1820DEFFNgetpar(RETURN A$,s$)
 1830LOCALB$,l%
 1840l%=INSTR(A$,s$)
 1850IFl%>0THEN
 1860  B$=LEFT$(A$,l%-1):A$=MID$(A$,l%+1)
 1870  ELSE
 1880  B$=A$:A$=""
 1890ENDIF
 1900=B$

� >delgroup
&� remove group(s) from server list
-� recoded to output files for !TCPIP 2.02
(
2	fh%=0
<� �:�" at line ";�:�
Fș"OS_GetEnv" � A$
PN$="":old%=�
Z�
dp$=�getpar(A$," ")
n	Ȏp$�
x�"-n":N$=�getpar(A$," ")
��"-old":old%=�
��
�
�A$=""
�(�N$=""��exit(1,"No group parameter")
�
�� buf% 1024
�
�grpmax%=(�-�-1000)�40
��grpmax%<200 � grpmax%=200
��grp$(grpmax%)
�
�)� eliminate any spaces from parameter
�g$=�clean(N$)

d1$="<NNTP$Dir>"
ș"XOS_File",17,d1$�t%;F%
"�t%=0�(F%�1)<>0 �
,1  d1$="<TCPIP$Dir>":ș"XOS_File",17,d1$�t%;F%
62  �t%=0�(F%�1)<>0 ��exit(1,"!TCPIP not found")
@�
J
Tnext%=0:files%=0:found%=0
^!� loop through xxxGroup files
h�
rC  ș"XOS_GBPB",9,d1$,buf%,1,next%,1024,"*Group"�,,,no%,next%;F%
|  �no%>0�(F%�1)=0�
�    f$=�str(buf%)
�I    �filesize(d1$+"."+f$)>0�found%+=�rmfile(d1$+"."+f$,g$):files%+=1
�  �
��next%<0
�B�files%=0�exit(1,"Couldn't open xxxGroup - is !TCPIP online?")
�'�found%=0�exit(1,"Group not found")
�#�exit(0,"Group "+g$+" removed")
��
�
�ݤrmfile(f$,g$)
��found%
�ș"XOS_Find",&4F,f$ �fh%;F%
��(F%�1) �fh%=0:=0

l%=0
�
&  A$=�#fh%
0
  ȕA$>""
:&    grp$(l%)=�getpar(A$,","):l%+=1
D  �
N��#fh%�l%=grpmax%-2
X�#fh%:fh%=0
b
llastgroup%=l%
v
�found%=0
��a%=0�lastgroup%
�    a$=�clean(grp$(a%))
�    Ȏ�match(g$,a$)�
�"      �0:� leave l$=l$+g1$+","
�      �1:found%=1:a$=""
�J      �2:found%=1:�neg%=0�grp$(lastgroup%)="!"+g$:lastgroup%+=1:neg%=1
�B      �-1:�neg%=0�grp$(lastgroup%)="!"+g$:lastgroup%+=1:neg%=1
�      �-2:a$="":� wild omit
�	    �
�  grp$(a%)=a$
��
�#� write out new version of file
F%=�rename(f$,f$+"~")
ș"XOS_Find",&8F,f$�fh%;F%
6�(F%�1) fh%=0:�exit(1,"Couldn't open output file")
 
files%+=1
*�fixuplist
4
�old%�
>  line$=""
H  �l%=0�lastgroup%+2
R    a$=grp$(l%)
\    �a$>""�
f      �line$+�a$<220�
p        line$=line$+","+a$
z
        �
�*        �line$,1)=","�line$=�line$,2)
�         �#fh%,line$:line$=a$
�      �
�	    �
�	  �l%
�  �line$>""��#fh%,line$
�  �
�  �l%=0�lastgroup%+2
�#    �grp$(l%)>""��#fh%,grp$(l%)
�	  �l%
��
��#fh%:fh%=0:grp$()=""
�ș"XOS_File",18,f$,&FFF
=found%

��fixuplist
$C� move negated groups onto ends of appropriate wildcarded lines
.�l%,l2%,c%,A$,B$
8�l%=0�lastgroup%+2
B  �grp$(l%),1)="!"�
L    A$=grp$(l%):grp$(l%)=""
V     l2%=0:ȕl2%<lastgroup%+2
`5      B$=grp$(l2%):c%=�B$,","):�c%>0�B$=�B$,c%-1)
j      ��B$)="*"�
t        � test for match
~        �A$,2,�B$-1)=�B$)�
�D          �grp$(l2%)+�A$<254�grp$(l2%)+=","+A$:l2%=lastgroup%+2
�
        �
�      �
�    l2%+=1:�
�  �
��l%
��
�
�ݤgetgroup(� A$)
�n%=�A$,",")
�
�n%>0�
�  B$=�A$,n%-1):A$=�A$,n%+1)
  �

  B$=A$:A$=""
�
=�clean(B$)
(
2ݤmatch(g$,pat$)
<N� returns 0 nomatch, 1 direct match, 2 wild match (-ive for negated match)
F �match%,neg%:match%=0:neg%=0
P&�pat$,1)="!"�neg%=1:pat$=�pat$,2)
Z��pat$,1)="*"�pat$<>g$�
d+  �pat$,�pat$-1)=�g$,�pat$-1)�match%=2
n  �
x  �pat$=g$�match%=1
��
��neg%�match%=-match%
�=match%
�
�ݤfilesize(f$)
�$�s%:ș"XOS_File",17,f$�,,,,s%;F%
��(F%�1)�s%=-1
�=s%
�
���exit(n%,a$)
��fh%<>0 �#fh%
�%�("set NewsBase$ReturnCode "+�n%)
�$�("set NewsBase$ReturnInfo "+a$)
�


ݤstr(a%)
"*�a$:ȕ ?a%>31��a$<255:a$+=�?a%:a%+=1:�
,=a$
6
@ݤrename(s$,d$)
J*�F%:ș"XOS_FSControl",25,s$,d$�err%;F%
T
�(F%�1) �
^  F%=�delfile(d$)
h(  ș"XOS_FSControl",25,s$,d$�err%;F%
r�
|=(F%�1)
�
�ݤmovefile(s$,d$)
��F%:F%=�rename(s$,d$)
�0�F%<>0ș"XOS_FSControl",26,s$,d$,(1<<7) �;F%
�=(F%�1)
�
�ݤdelfile(f$)
��F%:ș"XOS_File",6,f$�;F%
�=(F%�1)
�
�ݤclean(B$)
�ȕ�B$,1)=" ":B$=�B$,2):�
� ȕ�B$,1)=" ":B$=�B$,�B$-1):�
=B$

ݤgetpar(� A$,s$)
&
�B$,l%
0l%=�A$,s$)
:
�l%>0�
D  B$=�A$,l%-1):A$=�A$,l%+1)
N  �
X  B$=A$:A$=""
b�
l=B$
�
00000000  0d 00 0a 0f f4 20 3e 64  65 6c 67 72 6f 75 70 0d  |..... >delgroup.|
00000010  00 14 26 f4 20 72 65 6d  6f 76 65 20 67 72 6f 75  |..&. remove grou|
00000020  70 28 73 29 20 66 72 6f  6d 20 73 65 72 76 65 72  |p(s) from server|
00000030  20 6c 69 73 74 0d 00 1e  2d f4 20 72 65 63 6f 64  | list...-. recod|
00000040  65 64 20 74 6f 20 6f 75  74 70 75 74 20 66 69 6c  |ed to output fil|
00000050  65 73 20 66 6f 72 20 21  54 43 50 49 50 20 32 2e  |es for !TCPIP 2.|
00000060  30 32 0d 00 28 04 0d 00  32 09 66 68 25 3d 30 0d  |02..(...2.fh%=0.|
00000070  00 3c 19 ee 85 20 f6 3a  f1 22 20 61 74 20 6c 69  |.<... .:." at li|
00000080  6e 65 20 22 3b 9e 3a e0  0d 00 46 16 c8 99 22 4f  |ne ";.:...F..."O|
00000090  53 5f 47 65 74 45 6e 76  22 20 b8 20 41 24 0d 00  |S_GetEnv" . A$..|
000000a0  50 10 4e 24 3d 22 22 3a  6f 6c 64 25 3d a3 0d 00  |P.N$="":old%=...|
000000b0  5a 05 f5 0d 00 64 16 70  24 3d a4 67 65 74 70 61  |Z....d.p$=.getpa|
000000c0  72 28 41 24 2c 22 20 22  29 0d 00 6e 09 c8 8e 70  |r(A$," ")..n...p|
000000d0  24 ca 0d 00 78 1c c9 22  2d 6e 22 3a 4e 24 3d a4  |$...x.."-n":N$=.|
000000e0  67 65 74 70 61 72 28 41  24 2c 22 20 22 29 0d 00  |getpar(A$," ")..|
000000f0  82 12 c9 22 2d 6f 6c 64  22 3a 6f 6c 64 25 3d b9  |..."-old":old%=.|
00000100  0d 00 8c 05 cb 0d 00 96  0a fd 41 24 3d 22 22 0d  |..........A$="".|
00000110  00 a0 28 e7 4e 24 3d 22  22 8c f2 65 78 69 74 28  |..(.N$=""..exit(|
00000120  31 2c 22 4e 6f 20 67 72  6f 75 70 20 70 61 72 61  |1,"No group para|
00000130  6d 65 74 65 72 22 29 0d  00 aa 04 0d 00 b4 0f de  |meter").........|
00000140  20 62 75 66 25 20 31 30  32 34 0d 00 be 04 0d 00  | buf% 1024......|
00000150  c8 19 67 72 70 6d 61 78  25 3d 28 93 2d e0 2d 31  |..grpmax%=(.-.-1|
00000160  30 30 30 29 81 34 30 0d  00 d2 1e e7 67 72 70 6d  |000).40.....grpm|
00000170  61 78 25 3c 32 30 30 20  8c 20 67 72 70 6d 61 78  |ax%<200 . grpmax|
00000180  25 3d 32 30 30 0d 00 dc  12 de 67 72 70 24 28 67  |%=200.....grp$(g|
00000190  72 70 6d 61 78 25 29 0d  00 e6 04 0d 00 f0 29 f4  |rpmax%).......).|
000001a0  20 65 6c 69 6d 69 6e 61  74 65 20 61 6e 79 20 73  | eliminate any s|
000001b0  70 61 63 65 73 20 66 72  6f 6d 20 70 61 72 61 6d  |paces from param|
000001c0  65 74 65 72 0d 00 fa 11  67 24 3d a4 63 6c 65 61  |eter....g$=.clea|
000001d0  6e 28 4e 24 29 0d 01 04  04 0d 01 0e 14 64 31 24  |n(N$)........d1$|
000001e0  3d 22 3c 4e 4e 54 50 24  44 69 72 3e 22 0d 01 18  |="<NNTP$Dir>"...|
000001f0  1d c8 99 22 58 4f 53 5f  46 69 6c 65 22 2c 31 37  |..."XOS_File",17|
00000200  2c 64 31 24 b8 74 25 3b  46 25 0d 01 22 15 e7 74  |,d1$.t%;F%.."..t|
00000210  25 3d 30 84 28 46 25 80  31 29 3c 3e 30 20 8c 0d  |%=0.(F%.1)<>0 ..|
00000220  01 2c 31 20 20 64 31 24  3d 22 3c 54 43 50 49 50  |.,1  d1$="<TCPIP|
00000230  24 44 69 72 3e 22 3a c8  99 22 58 4f 53 5f 46 69  |$Dir>":.."XOS_Fi|
00000240  6c 65 22 2c 31 37 2c 64  31 24 b8 74 25 3b 46 25  |le",17,d1$.t%;F%|
00000250  0d 01 36 32 20 20 e7 74  25 3d 30 84 28 46 25 80  |..62  .t%=0.(F%.|
00000260  31 29 3c 3e 30 20 8c f2  65 78 69 74 28 31 2c 22  |1)<>0 ..exit(1,"|
00000270  21 54 43 50 49 50 20 6e  6f 74 20 66 6f 75 6e 64  |!TCPIP not found|
00000280  22 29 0d 01 40 05 cd 0d  01 4a 04 0d 01 54 1d 6e  |")..@....J...T.n|
00000290  65 78 74 25 3d 30 3a 66  69 6c 65 73 25 3d 30 3a  |ext%=0:files%=0:|
000002a0  66 6f 75 6e 64 25 3d 30  0d 01 5e 21 f4 20 6c 6f  |found%=0..^!. lo|
000002b0  6f 70 20 74 68 72 6f 75  67 68 20 78 78 78 47 72  |op through xxxGr|
000002c0  6f 75 70 20 66 69 6c 65  73 0d 01 68 05 f5 0d 01  |oup files..h....|
000002d0  72 43 20 20 c8 99 22 58  4f 53 5f 47 42 50 42 22  |rC  .."XOS_GBPB"|
000002e0  2c 39 2c 64 31 24 2c 62  75 66 25 2c 31 2c 6e 65  |,9,d1$,buf%,1,ne|
000002f0  78 74 25 2c 31 30 32 34  2c 22 2a 47 72 6f 75 70  |xt%,1024,"*Group|
00000300  22 b8 2c 2c 2c 6e 6f 25  2c 6e 65 78 74 25 3b 46  |".,,,no%,next%;F|
00000310  25 0d 01 7c 16 20 20 e7  6e 6f 25 3e 30 80 28 46  |%..|.  .no%>0.(F|
00000320  25 80 31 29 3d 30 8c 0d  01 86 15 20 20 20 20 66  |%.1)=0.....    f|
00000330  24 3d a4 73 74 72 28 62  75 66 25 29 0d 01 90 49  |$=.str(buf%)...I|
00000340  20 20 20 20 e7 a4 66 69  6c 65 73 69 7a 65 28 64  |    ..filesize(d|
00000350  31 24 2b 22 2e 22 2b 66  24 29 3e 30 8c 66 6f 75  |1$+"."+f$)>0.fou|
00000360  6e 64 25 2b 3d a4 72 6d  66 69 6c 65 28 64 31 24  |nd%+=.rmfile(d1$|
00000370  2b 22 2e 22 2b 66 24 2c  67 24 29 3a 66 69 6c 65  |+"."+f$,g$):file|
00000380  73 25 2b 3d 31 0d 01 9a  07 20 20 cd 0d 01 a4 0c  |s%+=1....  .....|
00000390  fd 6e 65 78 74 25 3c 30  0d 01 ae 42 e7 66 69 6c  |.next%<0...B.fil|
000003a0  65 73 25 3d 30 f2 65 78  69 74 28 31 2c 22 43 6f  |es%=0.exit(1,"Co|
000003b0  75 6c 64 6e 27 74 20 6f  70 65 6e 20 78 78 78 47  |uldn't open xxxG|
000003c0  72 6f 75 70 20 2d 20 69  73 20 21 54 43 50 49 50  |roup - is !TCPIP|
000003d0  20 6f 6e 6c 69 6e 65 3f  22 29 0d 01 b8 27 e7 66  | online?")...'.f|
000003e0  6f 75 6e 64 25 3d 30 f2  65 78 69 74 28 31 2c 22  |ound%=0.exit(1,"|
000003f0  47 72 6f 75 70 20 6e 6f  74 20 66 6f 75 6e 64 22  |Group not found"|
00000400  29 0d 01 c2 23 f2 65 78  69 74 28 30 2c 22 47 72  |)...#.exit(0,"Gr|
00000410  6f 75 70 20 22 2b 67 24  2b 22 20 72 65 6d 6f 76  |oup "+g$+" remov|
00000420  65 64 22 29 0d 01 cc 05  e0 0d 01 d6 04 0d 01 e0  |ed")............|
00000430  13 dd a4 72 6d 66 69 6c  65 28 66 24 2c 67 24 29  |...rmfile(f$,g$)|
00000440  0d 01 ea 0b ea 66 6f 75  6e 64 25 0d 01 f4 1f c8  |.....found%.....|
00000450  99 22 58 4f 53 5f 46 69  6e 64 22 2c 26 34 46 2c  |."XOS_Find",&4F,|
00000460  66 24 20 b8 66 68 25 3b  46 25 0d 01 fe 15 e7 28  |f$ .fh%;F%.....(|
00000470  46 25 80 31 29 20 8c 66  68 25 3d 30 3a 3d 30 0d  |F%.1) .fh%=0:=0.|
00000480  02 08 04 0d 02 12 08 6c  25 3d 30 0d 02 1c 05 f5  |.......l%=0.....|
00000490  0d 02 26 0e 20 20 41 24  3d be 23 66 68 25 0d 02  |..&.  A$=.#fh%..|
000004a0  30 0d 20 20 c8 95 41 24  3e 22 22 0d 02 3a 26 20  |0.  ..A$>""..:& |
000004b0  20 20 20 67 72 70 24 28  6c 25 29 3d a4 67 65 74  |   grp$(l%)=.get|
000004c0  70 61 72 28 41 24 2c 22  2c 22 29 3a 6c 25 2b 3d  |par(A$,","):l%+=|
000004d0  31 0d 02 44 07 20 20 ce  0d 02 4e 17 fd c5 23 66  |1..D.  ...N...#f|
000004e0  68 25 84 6c 25 3d 67 72  70 6d 61 78 25 2d 32 0d  |h%.l%=grpmax%-2.|
000004f0  02 58 0f d9 23 66 68 25  3a 66 68 25 3d 30 0d 02  |.X..#fh%:fh%=0..|
00000500  62 04 0d 02 6c 11 6c 61  73 74 67 72 6f 75 70 25  |b...l.lastgroup%|
00000510  3d 6c 25 0d 02 76 04 0d  02 80 0c 66 6f 75 6e 64  |=l%..v.....found|
00000520  25 3d 30 0d 02 8a 14 e3  61 25 3d 30 b8 6c 61 73  |%=0.....a%=0.las|
00000530  74 67 72 6f 75 70 25 0d  02 94 1b 20 20 20 20 61  |tgroup%....    a|
00000540  24 3d a4 63 6c 65 61 6e  28 67 72 70 24 28 61 25  |$=.clean(grp$(a%|
00000550  29 29 0d 02 9e 18 20 20  20 20 c8 8e a4 6d 61 74  |))....    ...mat|
00000560  63 68 28 67 24 2c 61 24  29 ca 0d 02 a8 22 20 20  |ch(g$,a$)...."  |
00000570  20 20 20 20 c9 30 3a f4  20 6c 65 61 76 65 20 6c  |    .0:. leave l|
00000580  24 3d 6c 24 2b 67 31 24  2b 22 2c 22 0d 02 b2 1b  |$=l$+g1$+","....|
00000590  20 20 20 20 20 20 c9 31  3a 66 6f 75 6e 64 25 3d  |      .1:found%=|
000005a0  31 3a 61 24 3d 22 22 0d  02 bc 4a 20 20 20 20 20  |1:a$=""...J     |
000005b0  20 c9 32 3a 66 6f 75 6e  64 25 3d 31 3a e7 6e 65  | .2:found%=1:.ne|
000005c0  67 25 3d 30 8c 67 72 70  24 28 6c 61 73 74 67 72  |g%=0.grp$(lastgr|
000005d0  6f 75 70 25 29 3d 22 21  22 2b 67 24 3a 6c 61 73  |oup%)="!"+g$:las|
000005e0  74 67 72 6f 75 70 25 2b  3d 31 3a 6e 65 67 25 3d  |tgroup%+=1:neg%=|
000005f0  31 0d 02 c6 42 20 20 20  20 20 20 c9 2d 31 3a e7  |1...B      .-1:.|
00000600  6e 65 67 25 3d 30 8c 67  72 70 24 28 6c 61 73 74  |neg%=0.grp$(last|
00000610  67 72 6f 75 70 25 29 3d  22 21 22 2b 67 24 3a 6c  |group%)="!"+g$:l|
00000620  61 73 74 67 72 6f 75 70  25 2b 3d 31 3a 6e 65 67  |astgroup%+=1:neg|
00000630  25 3d 31 0d 02 d0 1f 20  20 20 20 20 20 c9 2d 32  |%=1....      .-2|
00000640  3a 61 24 3d 22 22 3a f4  20 77 69 6c 64 20 6f 6d  |:a$="":. wild om|
00000650  69 74 0d 02 da 09 20 20  20 20 cb 0d 02 e4 11 20  |it....    ..... |
00000660  20 67 72 70 24 28 61 25  29 3d 61 24 0d 02 ee 05  | grp$(a%)=a$....|
00000670  ed 0d 02 f8 23 f4 20 77  72 69 74 65 20 6f 75 74  |....#. write out|
00000680  20 6e 65 77 20 76 65 72  73 69 6f 6e 20 6f 66 20  | new version of |
00000690  66 69 6c 65 0d 03 02 19  46 25 3d a4 72 65 6e 61  |file....F%=.rena|
000006a0  6d 65 28 66 24 2c 66 24  2b 22 7e 22 29 0d 03 0c  |me(f$,f$+"~")...|
000006b0  1e c8 99 22 58 4f 53 5f  46 69 6e 64 22 2c 26 38  |..."XOS_Find",&8|
000006c0  46 2c 66 24 b8 66 68 25  3b 46 25 0d 03 16 36 e7  |F,f$.fh%;F%...6.|
000006d0  28 46 25 80 31 29 20 66  68 25 3d 30 3a f2 65 78  |(F%.1) fh%=0:.ex|
000006e0  69 74 28 31 2c 22 43 6f  75 6c 64 6e 27 74 20 6f  |it(1,"Couldn't o|
000006f0  70 65 6e 20 6f 75 74 70  75 74 20 66 69 6c 65 22  |pen output file"|
00000700  29 0d 03 20 0d 66 69 6c  65 73 25 2b 3d 31 0d 03  |).. .files%+=1..|
00000710  2a 0e f2 66 69 78 75 70  6c 69 73 74 0d 03 34 0a  |*..fixuplist..4.|
00000720  e7 6f 6c 64 25 8c 0d 03  3e 0e 20 20 6c 69 6e 65  |.old%...>.  line|
00000730  24 3d 22 22 0d 03 48 18  20 20 e3 6c 25 3d 30 b8  |$=""..H.  .l%=0.|
00000740  6c 61 73 74 67 72 6f 75  70 25 2b 32 0d 03 52 13  |lastgroup%+2..R.|
00000750  20 20 20 20 61 24 3d 67  72 70 24 28 6c 25 29 0d  |    a$=grp$(l%).|
00000760  03 5c 0f 20 20 20 20 e7  61 24 3e 22 22 8c 0d 03  |.\.    .a$>""...|
00000770  66 1a 20 20 20 20 20 20  e7 a9 6c 69 6e 65 24 2b  |f.      ..line$+|
00000780  a9 61 24 3c 32 32 30 8c  0d 03 70 1e 20 20 20 20  |.a$<220...p.    |
00000790  20 20 20 20 6c 69 6e 65  24 3d 6c 69 6e 65 24 2b  |    line$=line$+|
000007a0  22 2c 22 2b 61 24 0d 03  7a 0d 20 20 20 20 20 20  |","+a$..z.      |
000007b0  20 20 cc 0d 03 84 2a 20  20 20 20 20 20 20 20 e7  |  ....*        .|
000007c0  c0 6c 69 6e 65 24 2c 31  29 3d 22 2c 22 8c 6c 69  |.line$,1)=",".li|
000007d0  6e 65 24 3d c1 6c 69 6e  65 24 2c 32 29 0d 03 8e  |ne$=.line$,2)...|
000007e0  20 20 20 20 20 20 20 20  20 d5 23 66 68 25 2c 6c  |         .#fh%,l|
000007f0  69 6e 65 24 3a 6c 69 6e  65 24 3d 61 24 0d 03 98  |ine$:line$=a$...|
00000800  0b 20 20 20 20 20 20 cd  0d 03 a2 09 20 20 20 20  |.      .....    |
00000810  cd 0d 03 ac 09 20 20 ed  6c 25 0d 03 b6 1b 20 20  |.....  .l%....  |
00000820  e7 6c 69 6e 65 24 3e 22  22 8c d5 23 66 68 25 2c  |.line$>""..#fh%,|
00000830  6c 69 6e 65 24 0d 03 c0  07 20 20 cc 0d 03 ca 18  |line$....  .....|
00000840  20 20 e3 6c 25 3d 30 b8  6c 61 73 74 67 72 6f 75  |  .l%=0.lastgrou|
00000850  70 25 2b 32 0d 03 d4 23  20 20 20 20 e7 67 72 70  |p%+2...#    .grp|
00000860  24 28 6c 25 29 3e 22 22  8c d5 23 66 68 25 2c 67  |$(l%)>""..#fh%,g|
00000870  72 70 24 28 6c 25 29 0d  03 de 09 20 20 ed 6c 25  |rp$(l%)....  .l%|
00000880  0d 03 e8 05 cd 0d 03 f2  19 d9 23 66 68 25 3a 66  |..........#fh%:f|
00000890  68 25 3d 30 3a 67 72 70  24 28 29 3d 22 22 0d 03  |h%=0:grp$()=""..|
000008a0  fc 1b c8 99 22 58 4f 53  5f 46 69 6c 65 22 2c 31  |...."XOS_File",1|
000008b0  38 2c 66 24 2c 26 46 46  46 0d 04 06 0b 3d 66 6f  |8,f$,&FFF....=fo|
000008c0  75 6e 64 25 0d 04 10 04  0d 04 1a 0f dd f2 66 69  |und%..........fi|
000008d0  78 75 70 6c 69 73 74 0d  04 24 43 f4 20 6d 6f 76  |xuplist..$C. mov|
000008e0  65 20 6e 65 67 61 74 65  64 20 67 72 6f 75 70 73  |e negated groups|
000008f0  20 6f 6e 74 6f 20 65 6e  64 73 20 6f 66 20 61 70  | onto ends of ap|
00000900  70 72 6f 70 72 69 61 74  65 20 77 69 6c 64 63 61  |propriate wildca|
00000910  72 64 65 64 20 6c 69 6e  65 73 0d 04 2e 14 ea 6c  |rded lines.....l|
00000920  25 2c 6c 32 25 2c 63 25  2c 41 24 2c 42 24 0d 04  |%,l2%,c%,A$,B$..|
00000930  38 16 e3 6c 25 3d 30 b8  6c 61 73 74 67 72 6f 75  |8..l%=0.lastgrou|
00000940  70 25 2b 32 0d 04 42 18  20 20 e7 c0 67 72 70 24  |p%+2..B.  ..grp$|
00000950  28 6c 25 29 2c 31 29 3d  22 21 22 8c 0d 04 4c 1f  |(l%),1)="!"...L.|
00000960  20 20 20 20 41 24 3d 67  72 70 24 28 6c 25 29 3a  |    A$=grp$(l%):|
00000970  67 72 70 24 28 6c 25 29  3d 22 22 0d 04 56 20 20  |grp$(l%)=""..V  |
00000980  20 20 20 6c 32 25 3d 30  3a c8 95 6c 32 25 3c 6c  |   l2%=0:..l2%<l|
00000990  61 73 74 67 72 6f 75 70  25 2b 32 0d 04 60 35 20  |astgroup%+2..`5 |
000009a0  20 20 20 20 20 42 24 3d  67 72 70 24 28 6c 32 25  |     B$=grp$(l2%|
000009b0  29 3a 63 25 3d a7 42 24  2c 22 2c 22 29 3a e7 63  |):c%=.B$,","):.c|
000009c0  25 3e 30 8c 42 24 3d c0  42 24 2c 63 25 2d 31 29  |%>0.B$=.B$,c%-1)|
000009d0  0d 04 6a 14 20 20 20 20  20 20 e7 c2 42 24 29 3d  |..j.      ..B$)=|
000009e0  22 2a 22 8c 0d 04 74 1c  20 20 20 20 20 20 20 20  |"*"...t.        |
000009f0  f4 20 74 65 73 74 20 66  6f 72 20 6d 61 74 63 68  |. test for match|
00000a00  0d 04 7e 1f 20 20 20 20  20 20 20 20 e7 c1 41 24  |..~.        ..A$|
00000a10  2c 32 2c a9 42 24 2d 31  29 3d c0 42 24 29 8c 0d  |,2,.B$-1)=.B$)..|
00000a20  04 88 44 20 20 20 20 20  20 20 20 20 20 e7 a9 67  |..D          ..g|
00000a30  72 70 24 28 6c 32 25 29  2b a9 41 24 3c 32 35 34  |rp$(l2%)+.A$<254|
00000a40  8c 67 72 70 24 28 6c 32  25 29 2b 3d 22 2c 22 2b  |.grp$(l2%)+=","+|
00000a50  41 24 3a 6c 32 25 3d 6c  61 73 74 67 72 6f 75 70  |A$:l2%=lastgroup|
00000a60  25 2b 32 0d 04 92 0d 20  20 20 20 20 20 20 20 cd  |%+2....        .|
00000a70  0d 04 9c 0b 20 20 20 20  20 20 cd 0d 04 a6 10 20  |....      ..... |
00000a80  20 20 20 6c 32 25 2b 3d  31 3a ce 0d 04 b0 07 20  |   l2%+=1:..... |
00000a90  20 cd 0d 04 ba 07 ed 6c  25 0d 04 c4 05 e1 0d 04  | ......l%.......|
00000aa0  ce 04 0d 04 d8 14 dd a4  67 65 74 67 72 6f 75 70  |........getgroup|
00000ab0  28 f8 20 41 24 29 0d 04  e2 0f 6e 25 3d a7 41 24  |(. A$)....n%=.A$|
00000ac0  2c 22 2c 22 29 0d 04 ec  0a e7 6e 25 3e 30 8c 0d  |,",").....n%>0..|
00000ad0  04 f6 1f 20 20 42 24 3d  c0 41 24 2c 6e 25 2d 31  |...  B$=.A$,n%-1|
00000ae0  29 3a 41 24 3d c1 41 24  2c 6e 25 2b 31 29 0d 05  |):A$=.A$,n%+1)..|
00000af0  00 07 20 20 cc 0d 05 0a  11 20 20 42 24 3d 41 24  |..  .....  B$=A$|
00000b00  3a 41 24 3d 22 22 0d 05  14 05 cd 0d 05 1e 0f 3d  |:A$="".........=|
00000b10  a4 63 6c 65 61 6e 28 42  24 29 0d 05 28 04 0d 05  |.clean(B$)..(...|
00000b20  32 14 dd a4 6d 61 74 63  68 28 67 24 2c 70 61 74  |2...match(g$,pat|
00000b30  24 29 0d 05 3c 4e f4 20  72 65 74 75 72 6e 73 20  |$)..<N. returns |
00000b40  30 20 6e 6f 6d 61 74 63  68 2c 20 31 20 64 69 72  |0 nomatch, 1 dir|
00000b50  65 63 74 20 6d 61 74 63  68 2c 20 32 20 77 69 6c  |ect match, 2 wil|
00000b60  64 20 6d 61 74 63 68 20  28 2d 69 76 65 20 66 6f  |d match (-ive fo|
00000b70  72 20 6e 65 67 61 74 65  64 20 6d 61 74 63 68 29  |r negated match)|
00000b80  0d 05 46 20 ea 6d 61 74  63 68 25 2c 6e 65 67 25  |..F .match%,neg%|
00000b90  3a 6d 61 74 63 68 25 3d  30 3a 6e 65 67 25 3d 30  |:match%=0:neg%=0|
00000ba0  0d 05 50 26 e7 c0 70 61  74 24 2c 31 29 3d 22 21  |..P&..pat$,1)="!|
00000bb0  22 8c 6e 65 67 25 3d 31  3a 70 61 74 24 3d c1 70  |".neg%=1:pat$=.p|
00000bc0  61 74 24 2c 32 29 0d 05  5a 1b e7 c2 70 61 74 24  |at$,2)..Z...pat$|
00000bd0  2c 31 29 3d 22 2a 22 80  70 61 74 24 3c 3e 67 24  |,1)="*".pat$<>g$|
00000be0  8c 0d 05 64 2b 20 20 e7  c0 70 61 74 24 2c a9 70  |...d+  ..pat$,.p|
00000bf0  61 74 24 2d 31 29 3d c0  67 24 2c a9 70 61 74 24  |at$-1)=.g$,.pat$|
00000c00  2d 31 29 8c 6d 61 74 63  68 25 3d 32 0d 05 6e 07  |-1).match%=2..n.|
00000c10  20 20 cc 0d 05 78 17 20  20 e7 70 61 74 24 3d 67  |  ...x.  .pat$=g|
00000c20  24 8c 6d 61 74 63 68 25  3d 31 0d 05 82 05 cd 0d  |$.match%=1......|
00000c30  05 8c 18 e7 6e 65 67 25  8c 6d 61 74 63 68 25 3d  |....neg%.match%=|
00000c40  2d 6d 61 74 63 68 25 0d  05 96 0b 3d 6d 61 74 63  |-match%....=matc|
00000c50  68 25 0d 05 a0 04 0d 05  aa 12 dd a4 66 69 6c 65  |h%..........file|
00000c60  73 69 7a 65 28 66 24 29  0d 05 b4 24 ea 73 25 3a  |size(f$)...$.s%:|
00000c70  c8 99 22 58 4f 53 5f 46  69 6c 65 22 2c 31 37 2c  |.."XOS_File",17,|
00000c80  66 24 b8 2c 2c 2c 2c 73  25 3b 46 25 0d 05 be 11  |f$.,,,,s%;F%....|
00000c90  e7 28 46 25 80 31 29 8c  73 25 3d 2d 31 0d 05 c8  |.(F%.1).s%=-1...|
00000ca0  07 3d 73 25 0d 05 d2 04  0d 05 dc 11 dd f2 65 78  |.=s%..........ex|
00000cb0  69 74 28 6e 25 2c 61 24  29 0d 05 e6 11 e7 66 68  |it(n%,a$).....fh|
00000cc0  25 3c 3e 30 20 d9 23 66  68 25 0d 05 f0 25 ff 28  |%<>0 .#fh%...%.(|
00000cd0  22 73 65 74 20 4e 65 77  73 42 61 73 65 24 52 65  |"set NewsBase$Re|
00000ce0  74 75 72 6e 43 6f 64 65  20 22 2b c3 6e 25 29 0d  |turnCode "+.n%).|
00000cf0  05 fa 24 ff 28 22 73 65  74 20 4e 65 77 73 42 61  |..$.("set NewsBa|
00000d00  73 65 24 52 65 74 75 72  6e 49 6e 66 6f 20 22 2b  |se$ReturnInfo "+|
00000d10  61 24 29 0d 06 04 05 e0  0d 06 0e 04 0d 06 18 0d  |a$).............|
00000d20  dd a4 73 74 72 28 61 25  29 0d 06 22 2a ea 61 24  |..str(a%).."*.a$|
00000d30  3a c8 95 20 3f 61 25 3e  33 31 80 a9 61 24 3c 32  |:.. ?a%>31..a$<2|
00000d40  35 35 3a 61 24 2b 3d bd  3f 61 25 3a 61 25 2b 3d  |55:a$+=.?a%:a%+=|
00000d50  31 3a ce 0d 06 2c 07 3d  61 24 0d 06 36 04 0d 06  |1:...,.=a$..6...|
00000d60  40 13 dd a4 72 65 6e 61  6d 65 28 73 24 2c 64 24  |@...rename(s$,d$|
00000d70  29 0d 06 4a 2a ea 46 25  3a c8 99 22 58 4f 53 5f  |)..J*.F%:.."XOS_|
00000d80  46 53 43 6f 6e 74 72 6f  6c 22 2c 32 35 2c 73 24  |FSControl",25,s$|
00000d90  2c 64 24 b8 65 72 72 25  3b 46 25 0d 06 54 0d e7  |,d$.err%;F%..T..|
00000da0  28 46 25 80 31 29 20 8c  0d 06 5e 15 20 20 46 25  |(F%.1) ...^.  F%|
00000db0  3d a4 64 65 6c 66 69 6c  65 28 64 24 29 0d 06 68  |=.delfile(d$)..h|
00000dc0  28 20 20 c8 99 22 58 4f  53 5f 46 53 43 6f 6e 74  |(  .."XOS_FSCont|
00000dd0  72 6f 6c 22 2c 32 35 2c  73 24 2c 64 24 b8 65 72  |rol",25,s$,d$.er|
00000de0  72 25 3b 46 25 0d 06 72  05 cd 0d 06 7c 0b 3d 28  |r%;F%..r....|.=(|
00000df0  46 25 80 31 29 0d 06 86  04 0d 06 90 15 dd a4 6d  |F%.1)..........m|
00000e00  6f 76 65 66 69 6c 65 28  73 24 2c 64 24 29 0d 06  |ovefile(s$,d$)..|
00000e10  9a 19 ea 46 25 3a 46 25  3d a4 72 65 6e 61 6d 65  |...F%:F%=.rename|
00000e20  28 73 24 2c 64 24 29 0d  06 a4 30 e7 46 25 3c 3e  |(s$,d$)...0.F%<>|
00000e30  30 c8 99 22 58 4f 53 5f  46 53 43 6f 6e 74 72 6f  |0.."XOS_FSContro|
00000e40  6c 22 2c 32 36 2c 73 24  2c 64 24 2c 28 31 3c 3c  |l",26,s$,d$,(1<<|
00000e50  37 29 20 b8 3b 46 25 0d  06 ae 0b 3d 28 46 25 80  |7) .;F%....=(F%.|
00000e60  31 29 0d 06 b8 04 0d 06  c2 11 dd a4 64 65 6c 66  |1)..........delf|
00000e70  69 6c 65 28 66 24 29 0d  06 cc 1d ea 46 25 3a c8  |ile(f$).....F%:.|
00000e80  99 22 58 4f 53 5f 46 69  6c 65 22 2c 36 2c 66 24  |."XOS_File",6,f$|
00000e90  b8 3b 46 25 0d 06 d6 0b  3d 28 46 25 80 31 29 0d  |.;F%....=(F%.1).|
00000ea0  06 e0 04 0d 06 ea 0f dd  a4 63 6c 65 61 6e 28 42  |.........clean(B|
00000eb0  24 29 0d 06 f4 1c c8 95  c0 42 24 2c 31 29 3d 22  |$).......B$,1)="|
00000ec0  20 22 3a 42 24 3d c1 42  24 2c 32 29 3a ce 0d 06  | ":B$=.B$,2):...|
00000ed0  fe 20 c8 95 c2 42 24 2c  31 29 3d 22 20 22 3a 42  |. ...B$,1)=" ":B|
00000ee0  24 3d c0 42 24 2c a9 42  24 2d 31 29 3a ce 0d 07  |$=.B$,.B$-1):...|
00000ef0  08 07 3d 42 24 0d 07 12  04 0d 07 1c 15 dd a4 67  |..=B$..........g|
00000f00  65 74 70 61 72 28 f8 20  41 24 2c 73 24 29 0d 07  |etpar(. A$,s$)..|
00000f10  26 0a ea 42 24 2c 6c 25  0d 07 30 0e 6c 25 3d a7  |&..B$,l%..0.l%=.|
00000f20  41 24 2c 73 24 29 0d 07  3a 0a e7 6c 25 3e 30 8c  |A$,s$)..:..l%>0.|
00000f30  0d 07 44 1f 20 20 42 24  3d c0 41 24 2c 6c 25 2d  |..D.  B$=.A$,l%-|
00000f40  31 29 3a 41 24 3d c1 41  24 2c 6c 25 2b 31 29 0d  |1):A$=.A$,l%+1).|
00000f50  07 4e 07 20 20 cc 0d 07  58 11 20 20 42 24 3d 41  |.N.  ...X.  B$=A|
00000f60  24 3a 41 24 3d 22 22 0d  07 62 05 cd 0d 07 6c 07  |$:A$=""..b....l.|
00000f70  3d 42 24 0d ff                                    |=B$..|
00000f75