Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/Transports/ka9q/addgroup
StarterPak/!Newsbase/Transports/ka9q/addgroup
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/addgroup |
Read OK: | ✔ |
File size: | 0FC9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >addgroup 20REM add group(s) to 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") 170DIM buf% 1024 180 190grpmax%=(HIMEM-END-1000)DIV40 200IFgrpmax%<200 THEN grpmax%=200 210DIMgrp$(grpmax%) 220 230REM eliminate any spaces from parameter 240g$=FNclean(N$) 250 260d1$="<NNTP$Dir>" 270SYS"XOS_File",17,d1$TOt%;F% 280IFt%=0OR(F%AND1)<>0 THEN 290 d1$="<TCPIP$Dir>":SYS"XOS_File",17,d1$TOt%;F% 300 IFt%=0OR(F%AND1)<>0 THENPROCexit(1,"!TCPIP not found") 310ENDIF 320 330next%=0:len%=-1:file$="":files%=0 340REM find longest xxxGroup file (ie, major server) 350REPEAT 360 SYS"XOS_GBPB",9,d1$,buf%,1,next%,1024,"*Group"TO,,,no%,next%;F% 370 IFno%>0AND(F%AND1)=0THEN 380 f$=FNstr(buf%) 390 l%=FNfilesize(d1$+"."+f$) 400 IFl%>len%THENlen%=l%:file$=f$ 410 ENDIF 420UNTILnext%<0 430IFfile$=""PROCexit(1,"No xxxGroup files! Please setup your newsfeed.") 440found%=FNaddgroup(d1$+"."+file$,g$) 450IFfiles%=0PROCexit(1,"Couldn't open xxxGroup - is !TCPIP online?") 460IFfound%=0PROCexit(1,"Group not found") 470PROCexit(0,"Group "+g$+" added") 480END 490 500DEFFNaddgroup(f$,g$) 510LOCALl%,found%,a$ 520SYS"XOS_Find",&4F,f$ TOfh%;F% 530IF(F%AND1) THENfh%=0:=0 540l%=0 550REPEAT 560 A$=GET$#fh% 570 WHILEA$>"" 580 grp$(l%)=FNgetpar(A$,","):l%+=1 590 ENDWHILE 600UNTILEOF#fh%ORl%=grpmax%-2 610CLOSE#fh%:fh%=0 620 630lastgroup%=l% 640 650found%=0 660FORa%=0TOlastgroup% 670 a$=FNclean(grp$(a%)):test%=FNmatch(g$,a$) 680 CASEtest%OF 690 WHEN0:REM leave l$=l$+g1$+"," 700 OTHERWISE:a$="":REM omit any kind of match 710 ENDCASE 720 grp$(a%)=a$ 730NEXT 740IFfound%=0THEN 750 grp$(lastgroup%+1)=g$ 760 found%=1 770ENDIF 780REM write out new version of file 790F%=FNrename(f$,f$+"~") 800SYS"XOS_Find",&8F,f$TOfh%;F% 810IF(F%AND1) THENfh%=0:PROCexit(1,"Couldn't open output file") 820files%+=1 830PROCfixuplist 840IFold%THEN 850 line$="" 860 FORl%=0TOlastgroup%+2 870 a$=grp$(l%) 880 IFa$>""THEN 890 IFLENline$+LENa$<220THEN 900 line$=line$+","+a$ 910 ELSE 920 IFLEFT$(line$,1)=","THENline$=MID$(line$,2) 930 BPUT#fh%,line$:line$=a$ 940 ENDIF 950 ENDIF 960 NEXTl% 970 IFline$>""THENBPUT#fh%,line$ 980 ELSE 990 FORl%=0TOlastgroup%+2 1000 IFgrp$(l%)>""THENBPUT#fh%,grp$(l%) 1010 NEXTl% 1020ENDIF 1030CLOSE#fh%:fh%=0 1040SYS"XOS_File",18,f$,&FFF 1050=found% 1060 1070DEFPROCfixuplist 1080REM move negated groups onto ends of appropriate wildcarded lines 1090LOCALl%,l2%,c%,A$,B$ 1100FORl%=0TOlastgroup%+2 1110 IFLEFT$(grp$(l%),1)="!"THEN 1120 A$=grp$(l%):grp$(l%)="" 1130 l2%=0:WHILEl2%<lastgroup%+2 1140 B$=grp$(l2%):c%=INSTR(B$,","):IFc%>0THENB$=LEFT$(B$,c%-1) 1150 IFRIGHT$(B$)="*"THEN 1160 REM test for match 1170 IFMID$(A$,2,LENB$-1)=LEFT$(B$)THEN 1180 IFLENgrp$(l2%)+LENA$<254THENgrp$(l2%)+=","+A$:l2%=lastgroup%+2 1190 ENDIF 1200 ENDIF 1210 l2%+=1:ENDWHILE 1220 ENDIF 1230NEXTl% 1240ENDPROC 1250 1260DEFFNgetgroup(RETURNA$) 1270n%=INSTR(A$,",") 1280IFn%>0THEN 1290 B$=LEFT$(A$,n%-1):A$=MID$(A$,n%+1) 1300 ELSE 1310 B$=A$:A$="" 1320ENDIF 1330=FNclean(B$) 1340 1350DEFFNmatch(g$,pat$) 1360REM does group encompass an element of current list? 1370REM returns 0 nomatch, 1 direct match, 2 wild match (-ive for negated match) 1380LOCALmatch%,neg%:match%=0:neg%=0 1390IFLEFT$(pat$,1)="!"THENneg%=1:pat$=MID$(pat$,2) 1400IFRIGHT$(g$,1)="*"ANDpat$<>g$THEN 1410 IFLEFT$(g$,LENg$-1)=LEFT$(pat$,LENg$-1)THENmatch%=2 1420 ELSE 1430 IFpat$=g$THENmatch%=1 1440ENDIF 1450IFneg%THENmatch%=-match% 1460=match% 1470 1480DEFFNfilesize(f$) 1490LOCALs%:SYS"XOS_File",17,f$TO,,,,s%;F% 1500IF(F%AND1)THENs%=-1 1510=s% 1520 1530DEFPROCexit(n%,a$) 1540IFfh%<>0 CLOSE#fh% 1550OSCLI("set NewsBase$ReturnCode "+STR$n%) 1560OSCLI("set NewsBase$ReturnInfo "+a$) 1570END 1580 1590DEFFNstr(a%) 1600LOCALa$:WHILE ?a%>31ANDLENa$<255:a$+=CHR$?a%:a%+=1:ENDWHILE 1610=a$ 1620 1630DEFFNrename(s$,d$) 1640LOCALF%:SYS"XOS_FSControl",25,s$,d$TOerr%;F% 1650IF(F%AND1) THEN 1660 F%=FNdelfile(d$) 1670 SYS"XOS_FSControl",25,s$,d$TOerr%;F% 1680ENDIF 1690=(F%AND1) 1700 1710DEFFNmovefile(s$,d$) 1720LOCALF%:F%=FNrename(s$,d$) 1730IFF%<>0SYS"XOS_FSControl",26,s$,d$,(1<<7) TO;F% 1740=(F%AND1) 1750 1760DEFFNdelfile(f$) 1770LOCALF%:SYS"XOS_File",6,f$TO;F% 1780=(F%AND1) 1790 1800DEFFNclean(B$) 1810WHILELEFT$(B$,1)=" ":B$=MID$(B$,2):ENDWHILE 1820WHILERIGHT$(B$,1)=" ":B$=LEFT$(B$,LENB$-1):ENDWHILE 1830=B$ 1840 1850DEFFNgetpar(RETURN A$,s$) 1860LOCALB$,l% 1870l%=INSTR(A$,s$) 1880IFl%>0THEN 1890 B$=LEFT$(A$,l%-1):A$=MID$(A$,l%+1) 1900 ELSE 1910 B$=A$:A$="" 1920ENDIF 1930=B$
� >addgroup !� add group(s) to 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% ,2 �t%=0�(F%�1)<>0 ��exit(1,"!TCPIP not found") 6� @ J%next%=0:len%=-1:file$="":files%=0 T3� find longest xxxGroup file (ie, major server) ^� hC ș"XOS_GBPB",9,d1$,buf%,1,next%,1024,"*Group"�,,,no%,next%;F% r �no%>0�(F%�1)=0� | f$=�str(buf%) �" l%=�filesize(d1$+"."+f$) �# �l%>len%�len%=l%:file$=f$ � � ��next%<0 �F�file$=""�exit(1,"No xxxGroup files! Please setup your newsfeed.") �&found%=�addgroup(d1$+"."+file$,g$) �B�files%=0�exit(1,"Couldn't open xxxGroup - is !TCPIP online?") �'�found%=0�exit(1,"Group not found") �!�exit(0,"Group "+g$+" added") �� � �ݤaddgroup(f$,g$) ��l%,found%,a$ ș"XOS_Find",&4F,f$ �fh%;F% �(F%�1) �fh%=0:=0 l%=0 &� 0 A$=�#fh% : ȕA$>"" D& grp$(l%)=�getpar(A$,","):l%+=1 N � X��#fh%�l%=grpmax%-2 b�#fh%:fh%=0 l vlastgroup%=l% � �found%=0 ��a%=0�lastgroup% �/ a$=�clean(grp$(a%)):test%=�match(g$,a$) � Ȏtest%� �" �0:� leave l$=l$+g1$+"," �* :a$="":� omit any kind of match � � � grp$(a%)=a$ �� ��found%=0� � grp$(lastgroup%+1)=g$ � found%=1 � #� write out new version of file F%=�rename(f$,f$+"~") ș"XOS_Find",&8F,f$�fh%;F% *7�(F%�1) �fh%=0:�exit(1,"Couldn't open output file") 4 files%+=1 >�fixuplist H �old%� R line$="" \ �l%=0�lastgroup%+2 f a$=grp$(l%) p �a$>""� z �line$+�a$<220� � line$=line$+","+a$ � � �* �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 ș"XOS_File",18,f$,&FFF =found% $ .��fixuplist 8C� move negated groups onto ends of appropriate wildcarded lines B�l%,l2%,c%,A$,B$ L�l%=0�lastgroup%+2 V �grp$(l%),1)="!"� ` A$=grp$(l%):grp$(l%)="" j l2%=0:ȕl2%<lastgroup%+2 t5 B$=grp$(l2%):c%=�B$,","):�c%>0�B$=�B$,c%-1) ~ ��B$)="*"� � � test for match � �A$,2,�B$-1)=�B$)� �D �grp$(l2%)+�A$<254�grp$(l2%)+=","+A$:l2%=lastgroup%+2 � � � � � l2%+=1:� � � ��l% �� � �ݤgetgroup(RETURNA$) �n%=�A$,",") �n%>0� B$=�A$,n%-1):A$=�A$,n%+1) � B$=A$:A$="" (� 2=�clean(B$) < Fݤmatch(g$,pat$) P6� does group encompass an element of current list? ZN� returns 0 nomatch, 1 direct match, 2 wild match (-ive for negated match) d �match%,neg%:match%=0:neg%=0 n&�pat$,1)="!"�neg%=1:pat$=�pat$,2) x��g$,1)="*"�pat$<>g$� �' �g$,�g$-1)=�pat$,�g$-1)�match%=2 � � � �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$) "� , 6 ݤstr(a%) @*�a$:ȕ ?a%>31��a$<255:a$+=�?a%:a%+=1:� J=a$ T ^ݤrename(s$,d$) h*�F%:ș"XOS_FSControl",25,s$,d$�err%;F% r �(F%�1) � | F%=�delfile(d$) �( ș"XOS_FSControl",25,s$,d$�err%;F% �� �=(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$ 0 :ݤgetpar(� A$,s$) D �B$,l% Nl%=�A$,s$) X �l%>0� b B$=�A$,l%-1):A$=�A$,l%+1) l � v B$=A$:A$="" �� �=B$ �
00000000 0d 00 0a 0f f4 20 3e 61 64 64 67 72 6f 75 70 0d |..... >addgroup.| 00000010 00 14 21 f4 20 61 64 64 20 67 72 6f 75 70 28 73 |..!. add group(s| 00000020 29 20 74 6f 20 73 65 72 76 65 72 20 6c 69 73 74 |) to server list| 00000030 0d 00 1e 2d f4 20 72 65 63 6f 64 65 64 20 74 6f |...-. recoded to| 00000040 20 6f 75 74 70 75 74 20 66 69 6c 65 73 20 66 6f | output files fo| 00000050 72 20 21 54 43 50 49 50 20 32 2e 30 32 0d 00 28 |r !TCPIP 2.02..(| 00000060 04 0d 00 32 09 66 68 25 3d 30 0d 00 3c 19 ee 85 |...2.fh%=0..<...| 00000070 20 f6 3a f1 22 20 61 74 20 6c 69 6e 65 20 22 3b | .:." at line ";| 00000080 9e 3a e0 0d 00 46 16 c8 99 22 4f 53 5f 47 65 74 |.:...F..."OS_Get| 00000090 45 6e 76 22 20 b8 20 41 24 0d 00 50 10 4e 24 3d |Env" . A$..P.N$=| 000000a0 22 22 3a 6f 6c 64 25 3d a3 0d 00 5a 05 f5 0d 00 |"":old%=...Z....| 000000b0 64 16 70 24 3d a4 67 65 74 70 61 72 28 41 24 2c |d.p$=.getpar(A$,| 000000c0 22 20 22 29 0d 00 6e 09 c8 8e 70 24 ca 0d 00 78 |" ")..n...p$...x| 000000d0 1c c9 22 2d 6e 22 3a 4e 24 3d a4 67 65 74 70 61 |.."-n":N$=.getpa| 000000e0 72 28 41 24 2c 22 20 22 29 0d 00 82 12 c9 22 2d |r(A$," ")....."-| 000000f0 6f 6c 64 22 3a 6f 6c 64 25 3d b9 0d 00 8c 05 cb |old":old%=......| 00000100 0d 00 96 0a fd 41 24 3d 22 22 0d 00 a0 28 e7 4e |.....A$=""...(.N| 00000110 24 3d 22 22 8c f2 65 78 69 74 28 31 2c 22 4e 6f |$=""..exit(1,"No| 00000120 20 67 72 6f 75 70 20 70 61 72 61 6d 65 74 65 72 | group parameter| 00000130 22 29 0d 00 aa 0f de 20 62 75 66 25 20 31 30 32 |")..... buf% 102| 00000140 34 0d 00 b4 04 0d 00 be 19 67 72 70 6d 61 78 25 |4........grpmax%| 00000150 3d 28 93 2d e0 2d 31 30 30 30 29 81 34 30 0d 00 |=(.-.-1000).40..| 00000160 c8 1e e7 67 72 70 6d 61 78 25 3c 32 30 30 20 8c |...grpmax%<200 .| 00000170 20 67 72 70 6d 61 78 25 3d 32 30 30 0d 00 d2 12 | grpmax%=200....| 00000180 de 67 72 70 24 28 67 72 70 6d 61 78 25 29 0d 00 |.grp$(grpmax%)..| 00000190 dc 04 0d 00 e6 29 f4 20 65 6c 69 6d 69 6e 61 74 |.....). eliminat| 000001a0 65 20 61 6e 79 20 73 70 61 63 65 73 20 66 72 6f |e any spaces fro| 000001b0 6d 20 70 61 72 61 6d 65 74 65 72 0d 00 f0 11 67 |m parameter....g| 000001c0 24 3d a4 63 6c 65 61 6e 28 4e 24 29 0d 00 fa 04 |$=.clean(N$)....| 000001d0 0d 01 04 14 64 31 24 3d 22 3c 4e 4e 54 50 24 44 |....d1$="<NNTP$D| 000001e0 69 72 3e 22 0d 01 0e 1d c8 99 22 58 4f 53 5f 46 |ir>"......"XOS_F| 000001f0 69 6c 65 22 2c 31 37 2c 64 31 24 b8 74 25 3b 46 |ile",17,d1$.t%;F| 00000200 25 0d 01 18 15 e7 74 25 3d 30 84 28 46 25 80 31 |%.....t%=0.(F%.1| 00000210 29 3c 3e 30 20 8c 0d 01 22 31 20 20 64 31 24 3d |)<>0 ..."1 d1$=| 00000220 22 3c 54 43 50 49 50 24 44 69 72 3e 22 3a c8 99 |"<TCPIP$Dir>":..| 00000230 22 58 4f 53 5f 46 69 6c 65 22 2c 31 37 2c 64 31 |"XOS_File",17,d1| 00000240 24 b8 74 25 3b 46 25 0d 01 2c 32 20 20 e7 74 25 |$.t%;F%..,2 .t%| 00000250 3d 30 84 28 46 25 80 31 29 3c 3e 30 20 8c f2 65 |=0.(F%.1)<>0 ..e| 00000260 78 69 74 28 31 2c 22 21 54 43 50 49 50 20 6e 6f |xit(1,"!TCPIP no| 00000270 74 20 66 6f 75 6e 64 22 29 0d 01 36 05 cd 0d 01 |t found")..6....| 00000280 40 04 0d 01 4a 25 6e 65 78 74 25 3d 30 3a 6c 65 |@...J%next%=0:le| 00000290 6e 25 3d 2d 31 3a 66 69 6c 65 24 3d 22 22 3a 66 |n%=-1:file$="":f| 000002a0 69 6c 65 73 25 3d 30 0d 01 54 33 f4 20 66 69 6e |iles%=0..T3. fin| 000002b0 64 20 6c 6f 6e 67 65 73 74 20 78 78 78 47 72 6f |d longest xxxGro| 000002c0 75 70 20 66 69 6c 65 20 28 69 65 2c 20 6d 61 6a |up file (ie, maj| 000002d0 6f 72 20 73 65 72 76 65 72 29 0d 01 5e 05 f5 0d |or server)..^...| 000002e0 01 68 43 20 20 c8 99 22 58 4f 53 5f 47 42 50 42 |.hC .."XOS_GBPB| 000002f0 22 2c 39 2c 64 31 24 2c 62 75 66 25 2c 31 2c 6e |",9,d1$,buf%,1,n| 00000300 65 78 74 25 2c 31 30 32 34 2c 22 2a 47 72 6f 75 |ext%,1024,"*Grou| 00000310 70 22 b8 2c 2c 2c 6e 6f 25 2c 6e 65 78 74 25 3b |p".,,,no%,next%;| 00000320 46 25 0d 01 72 16 20 20 e7 6e 6f 25 3e 30 80 28 |F%..r. .no%>0.(| 00000330 46 25 80 31 29 3d 30 8c 0d 01 7c 17 20 20 20 20 |F%.1)=0...|. | 00000340 20 20 66 24 3d a4 73 74 72 28 62 75 66 25 29 0d | f$=.str(buf%).| 00000350 01 86 22 20 20 20 20 20 20 6c 25 3d a4 66 69 6c |.." l%=.fil| 00000360 65 73 69 7a 65 28 64 31 24 2b 22 2e 22 2b 66 24 |esize(d1$+"."+f$| 00000370 29 0d 01 90 23 20 20 20 20 20 20 e7 6c 25 3e 6c |)...# .l%>l| 00000380 65 6e 25 8c 6c 65 6e 25 3d 6c 25 3a 66 69 6c 65 |en%.len%=l%:file| 00000390 24 3d 66 24 0d 01 9a 07 20 20 cd 0d 01 a4 0c fd |$=f$.... ......| 000003a0 6e 65 78 74 25 3c 30 0d 01 ae 46 e7 66 69 6c 65 |next%<0...F.file| 000003b0 24 3d 22 22 f2 65 78 69 74 28 31 2c 22 4e 6f 20 |$="".exit(1,"No | 000003c0 78 78 78 47 72 6f 75 70 20 66 69 6c 65 73 21 20 |xxxGroup files! | 000003d0 50 6c 65 61 73 65 20 73 65 74 75 70 20 79 6f 75 |Please setup you| 000003e0 72 20 6e 65 77 73 66 65 65 64 2e 22 29 0d 01 b8 |r newsfeed.")...| 000003f0 26 66 6f 75 6e 64 25 3d a4 61 64 64 67 72 6f 75 |&found%=.addgrou| 00000400 70 28 64 31 24 2b 22 2e 22 2b 66 69 6c 65 24 2c |p(d1$+"."+file$,| 00000410 67 24 29 0d 01 c2 42 e7 66 69 6c 65 73 25 3d 30 |g$)...B.files%=0| 00000420 f2 65 78 69 74 28 31 2c 22 43 6f 75 6c 64 6e 27 |.exit(1,"Couldn'| 00000430 74 20 6f 70 65 6e 20 78 78 78 47 72 6f 75 70 20 |t open xxxGroup | 00000440 2d 20 69 73 20 21 54 43 50 49 50 20 6f 6e 6c 69 |- is !TCPIP onli| 00000450 6e 65 3f 22 29 0d 01 cc 27 e7 66 6f 75 6e 64 25 |ne?")...'.found%| 00000460 3d 30 f2 65 78 69 74 28 31 2c 22 47 72 6f 75 70 |=0.exit(1,"Group| 00000470 20 6e 6f 74 20 66 6f 75 6e 64 22 29 0d 01 d6 21 | not found")...!| 00000480 f2 65 78 69 74 28 30 2c 22 47 72 6f 75 70 20 22 |.exit(0,"Group "| 00000490 2b 67 24 2b 22 20 61 64 64 65 64 22 29 0d 01 e0 |+g$+" added")...| 000004a0 05 e0 0d 01 ea 04 0d 01 f4 15 dd a4 61 64 64 67 |............addg| 000004b0 72 6f 75 70 28 66 24 2c 67 24 29 0d 01 fe 11 ea |roup(f$,g$).....| 000004c0 6c 25 2c 66 6f 75 6e 64 25 2c 61 24 0d 02 08 1f |l%,found%,a$....| 000004d0 c8 99 22 58 4f 53 5f 46 69 6e 64 22 2c 26 34 46 |.."XOS_Find",&4F| 000004e0 2c 66 24 20 b8 66 68 25 3b 46 25 0d 02 12 15 e7 |,f$ .fh%;F%.....| 000004f0 28 46 25 80 31 29 20 8c 66 68 25 3d 30 3a 3d 30 |(F%.1) .fh%=0:=0| 00000500 0d 02 1c 08 6c 25 3d 30 0d 02 26 05 f5 0d 02 30 |....l%=0..&....0| 00000510 0e 20 20 41 24 3d be 23 66 68 25 0d 02 3a 0d 20 |. A$=.#fh%..:. | 00000520 20 c8 95 41 24 3e 22 22 0d 02 44 26 20 20 20 20 | ..A$>""..D& | 00000530 67 72 70 24 28 6c 25 29 3d a4 67 65 74 70 61 72 |grp$(l%)=.getpar| 00000540 28 41 24 2c 22 2c 22 29 3a 6c 25 2b 3d 31 0d 02 |(A$,","):l%+=1..| 00000550 4e 07 20 20 ce 0d 02 58 17 fd c5 23 66 68 25 84 |N. ...X...#fh%.| 00000560 6c 25 3d 67 72 70 6d 61 78 25 2d 32 0d 02 62 0f |l%=grpmax%-2..b.| 00000570 d9 23 66 68 25 3a 66 68 25 3d 30 0d 02 6c 04 0d |.#fh%:fh%=0..l..| 00000580 02 76 11 6c 61 73 74 67 72 6f 75 70 25 3d 6c 25 |.v.lastgroup%=l%| 00000590 0d 02 80 04 0d 02 8a 0c 66 6f 75 6e 64 25 3d 30 |........found%=0| 000005a0 0d 02 94 14 e3 61 25 3d 30 b8 6c 61 73 74 67 72 |.....a%=0.lastgr| 000005b0 6f 75 70 25 0d 02 9e 2f 20 20 20 20 61 24 3d a4 |oup%.../ a$=.| 000005c0 63 6c 65 61 6e 28 67 72 70 24 28 61 25 29 29 3a |clean(grp$(a%)):| 000005d0 74 65 73 74 25 3d a4 6d 61 74 63 68 28 67 24 2c |test%=.match(g$,| 000005e0 61 24 29 0d 02 a8 10 20 20 20 20 c8 8e 74 65 73 |a$).... ..tes| 000005f0 74 25 ca 0d 02 b2 22 20 20 20 20 20 20 c9 30 3a |t%...." .0:| 00000600 f4 20 6c 65 61 76 65 20 6c 24 3d 6c 24 2b 67 31 |. leave l$=l$+g1| 00000610 24 2b 22 2c 22 0d 02 bc 2a 20 20 20 20 20 20 7f |$+","...* .| 00000620 3a 61 24 3d 22 22 3a f4 20 6f 6d 69 74 20 61 6e |:a$="":. omit an| 00000630 79 20 6b 69 6e 64 20 6f 66 20 6d 61 74 63 68 0d |y kind of match.| 00000640 02 c6 09 20 20 20 20 cb 0d 02 d0 11 20 20 67 72 |... ..... gr| 00000650 70 24 28 61 25 29 3d 61 24 0d 02 da 05 ed 0d 02 |p$(a%)=a$.......| 00000660 e4 0e e7 66 6f 75 6e 64 25 3d 30 8c 0d 02 ee 1b |...found%=0.....| 00000670 20 20 67 72 70 24 28 6c 61 73 74 67 72 6f 75 70 | grp$(lastgroup| 00000680 25 2b 31 29 3d 67 24 0d 02 f8 0e 20 20 66 6f 75 |%+1)=g$.... fou| 00000690 6e 64 25 3d 31 0d 03 02 05 cd 0d 03 0c 23 f4 20 |nd%=1........#. | 000006a0 77 72 69 74 65 20 6f 75 74 20 6e 65 77 20 76 65 |write out new ve| 000006b0 72 73 69 6f 6e 20 6f 66 20 66 69 6c 65 0d 03 16 |rsion of file...| 000006c0 19 46 25 3d a4 72 65 6e 61 6d 65 28 66 24 2c 66 |.F%=.rename(f$,f| 000006d0 24 2b 22 7e 22 29 0d 03 20 1e c8 99 22 58 4f 53 |$+"~").. ..."XOS| 000006e0 5f 46 69 6e 64 22 2c 26 38 46 2c 66 24 b8 66 68 |_Find",&8F,f$.fh| 000006f0 25 3b 46 25 0d 03 2a 37 e7 28 46 25 80 31 29 20 |%;F%..*7.(F%.1) | 00000700 8c 66 68 25 3d 30 3a f2 65 78 69 74 28 31 2c 22 |.fh%=0:.exit(1,"| 00000710 43 6f 75 6c 64 6e 27 74 20 6f 70 65 6e 20 6f 75 |Couldn't open ou| 00000720 74 70 75 74 20 66 69 6c 65 22 29 0d 03 34 0d 66 |tput file")..4.f| 00000730 69 6c 65 73 25 2b 3d 31 0d 03 3e 0e f2 66 69 78 |iles%+=1..>..fix| 00000740 75 70 6c 69 73 74 0d 03 48 0a e7 6f 6c 64 25 8c |uplist..H..old%.| 00000750 0d 03 52 0e 20 20 6c 69 6e 65 24 3d 22 22 0d 03 |..R. line$=""..| 00000760 5c 18 20 20 e3 6c 25 3d 30 b8 6c 61 73 74 67 72 |\. .l%=0.lastgr| 00000770 6f 75 70 25 2b 32 0d 03 66 13 20 20 20 20 61 24 |oup%+2..f. a$| 00000780 3d 67 72 70 24 28 6c 25 29 0d 03 70 0f 20 20 20 |=grp$(l%)..p. | 00000790 20 e7 61 24 3e 22 22 8c 0d 03 7a 1a 20 20 20 20 | .a$>""...z. | 000007a0 20 20 e7 a9 6c 69 6e 65 24 2b a9 61 24 3c 32 32 | ..line$+.a$<22| 000007b0 30 8c 0d 03 84 1e 20 20 20 20 20 20 20 20 6c 69 |0..... li| 000007c0 6e 65 24 3d 6c 69 6e 65 24 2b 22 2c 22 2b 61 24 |ne$=line$+","+a$| 000007d0 0d 03 8e 0d 20 20 20 20 20 20 20 20 cc 0d 03 98 |.... ....| 000007e0 2a 20 20 20 20 20 20 20 20 e7 c0 6c 69 6e 65 24 |* ..line$| 000007f0 2c 31 29 3d 22 2c 22 8c 6c 69 6e 65 24 3d c1 6c |,1)=",".line$=.l| 00000800 69 6e 65 24 2c 32 29 0d 03 a2 20 20 20 20 20 20 |ine$,2)... | 00000810 20 20 20 d5 23 66 68 25 2c 6c 69 6e 65 24 3a 6c | .#fh%,line$:l| 00000820 69 6e 65 24 3d 61 24 0d 03 ac 0b 20 20 20 20 20 |ine$=a$.... | 00000830 20 cd 0d 03 b6 09 20 20 20 20 cd 0d 03 c0 09 20 | ..... ..... | 00000840 20 ed 6c 25 0d 03 ca 1b 20 20 e7 6c 69 6e 65 24 | .l%.... .line$| 00000850 3e 22 22 8c d5 23 66 68 25 2c 6c 69 6e 65 24 0d |>""..#fh%,line$.| 00000860 03 d4 07 20 20 cc 0d 03 de 18 20 20 e3 6c 25 3d |... ..... .l%=| 00000870 30 b8 6c 61 73 74 67 72 6f 75 70 25 2b 32 0d 03 |0.lastgroup%+2..| 00000880 e8 23 20 20 20 20 e7 67 72 70 24 28 6c 25 29 3e |.# .grp$(l%)>| 00000890 22 22 8c d5 23 66 68 25 2c 67 72 70 24 28 6c 25 |""..#fh%,grp$(l%| 000008a0 29 0d 03 f2 09 20 20 ed 6c 25 0d 03 fc 05 cd 0d |).... .l%......| 000008b0 04 06 0f d9 23 66 68 25 3a 66 68 25 3d 30 0d 04 |....#fh%:fh%=0..| 000008c0 10 1b c8 99 22 58 4f 53 5f 46 69 6c 65 22 2c 31 |...."XOS_File",1| 000008d0 38 2c 66 24 2c 26 46 46 46 0d 04 1a 0b 3d 66 6f |8,f$,&FFF....=fo| 000008e0 75 6e 64 25 0d 04 24 04 0d 04 2e 0f dd f2 66 69 |und%..$.......fi| 000008f0 78 75 70 6c 69 73 74 0d 04 38 43 f4 20 6d 6f 76 |xuplist..8C. mov| 00000900 65 20 6e 65 67 61 74 65 64 20 67 72 6f 75 70 73 |e negated groups| 00000910 20 6f 6e 74 6f 20 65 6e 64 73 20 6f 66 20 61 70 | onto ends of ap| 00000920 70 72 6f 70 72 69 61 74 65 20 77 69 6c 64 63 61 |propriate wildca| 00000930 72 64 65 64 20 6c 69 6e 65 73 0d 04 42 14 ea 6c |rded lines..B..l| 00000940 25 2c 6c 32 25 2c 63 25 2c 41 24 2c 42 24 0d 04 |%,l2%,c%,A$,B$..| 00000950 4c 16 e3 6c 25 3d 30 b8 6c 61 73 74 67 72 6f 75 |L..l%=0.lastgrou| 00000960 70 25 2b 32 0d 04 56 18 20 20 e7 c0 67 72 70 24 |p%+2..V. ..grp$| 00000970 28 6c 25 29 2c 31 29 3d 22 21 22 8c 0d 04 60 1f |(l%),1)="!"...`.| 00000980 20 20 20 20 41 24 3d 67 72 70 24 28 6c 25 29 3a | A$=grp$(l%):| 00000990 67 72 70 24 28 6c 25 29 3d 22 22 0d 04 6a 20 20 |grp$(l%)=""..j | 000009a0 20 20 20 6c 32 25 3d 30 3a c8 95 6c 32 25 3c 6c | l2%=0:..l2%<l| 000009b0 61 73 74 67 72 6f 75 70 25 2b 32 0d 04 74 35 20 |astgroup%+2..t5 | 000009c0 20 20 20 20 20 42 24 3d 67 72 70 24 28 6c 32 25 | B$=grp$(l2%| 000009d0 29 3a 63 25 3d a7 42 24 2c 22 2c 22 29 3a e7 63 |):c%=.B$,","):.c| 000009e0 25 3e 30 8c 42 24 3d c0 42 24 2c 63 25 2d 31 29 |%>0.B$=.B$,c%-1)| 000009f0 0d 04 7e 14 20 20 20 20 20 20 e7 c2 42 24 29 3d |..~. ..B$)=| 00000a00 22 2a 22 8c 0d 04 88 1c 20 20 20 20 20 20 20 20 |"*"..... | 00000a10 f4 20 74 65 73 74 20 66 6f 72 20 6d 61 74 63 68 |. test for match| 00000a20 0d 04 92 1f 20 20 20 20 20 20 20 20 e7 c1 41 24 |.... ..A$| 00000a30 2c 32 2c a9 42 24 2d 31 29 3d c0 42 24 29 8c 0d |,2,.B$-1)=.B$)..| 00000a40 04 9c 44 20 20 20 20 20 20 20 20 20 20 e7 a9 67 |..D ..g| 00000a50 72 70 24 28 6c 32 25 29 2b a9 41 24 3c 32 35 34 |rp$(l2%)+.A$<254| 00000a60 8c 67 72 70 24 28 6c 32 25 29 2b 3d 22 2c 22 2b |.grp$(l2%)+=","+| 00000a70 41 24 3a 6c 32 25 3d 6c 61 73 74 67 72 6f 75 70 |A$:l2%=lastgroup| 00000a80 25 2b 32 0d 04 a6 0d 20 20 20 20 20 20 20 20 cd |%+2.... .| 00000a90 0d 04 b0 0b 20 20 20 20 20 20 cd 0d 04 ba 10 20 |.... ..... | 00000aa0 20 20 20 6c 32 25 2b 3d 31 3a ce 0d 04 c4 07 20 | l2%+=1:..... | 00000ab0 20 cd 0d 04 ce 07 ed 6c 25 0d 04 d8 05 e1 0d 04 | ......l%.......| 00000ac0 e2 04 0d 04 ec 18 dd a4 67 65 74 67 72 6f 75 70 |........getgroup| 00000ad0 28 52 45 54 55 52 4e 41 24 29 0d 04 f6 0f 6e 25 |(RETURNA$)....n%| 00000ae0 3d a7 41 24 2c 22 2c 22 29 0d 05 00 0a e7 6e 25 |=.A$,",").....n%| 00000af0 3e 30 8c 0d 05 0a 1f 20 20 42 24 3d c0 41 24 2c |>0..... B$=.A$,| 00000b00 6e 25 2d 31 29 3a 41 24 3d c1 41 24 2c 6e 25 2b |n%-1):A$=.A$,n%+| 00000b10 31 29 0d 05 14 07 20 20 cc 0d 05 1e 11 20 20 42 |1).... ..... B| 00000b20 24 3d 41 24 3a 41 24 3d 22 22 0d 05 28 05 cd 0d |$=A$:A$=""..(...| 00000b30 05 32 0f 3d a4 63 6c 65 61 6e 28 42 24 29 0d 05 |.2.=.clean(B$)..| 00000b40 3c 04 0d 05 46 14 dd a4 6d 61 74 63 68 28 67 24 |<...F...match(g$| 00000b50 2c 70 61 74 24 29 0d 05 50 36 f4 20 64 6f 65 73 |,pat$)..P6. does| 00000b60 20 67 72 6f 75 70 20 65 6e 63 6f 6d 70 61 73 73 | group encompass| 00000b70 20 61 6e 20 65 6c 65 6d 65 6e 74 20 6f 66 20 63 | an element of c| 00000b80 75 72 72 65 6e 74 20 6c 69 73 74 3f 0d 05 5a 4e |urrent list?..ZN| 00000b90 f4 20 72 65 74 75 72 6e 73 20 30 20 6e 6f 6d 61 |. returns 0 noma| 00000ba0 74 63 68 2c 20 31 20 64 69 72 65 63 74 20 6d 61 |tch, 1 direct ma| 00000bb0 74 63 68 2c 20 32 20 77 69 6c 64 20 6d 61 74 63 |tch, 2 wild matc| 00000bc0 68 20 28 2d 69 76 65 20 66 6f 72 20 6e 65 67 61 |h (-ive for nega| 00000bd0 74 65 64 20 6d 61 74 63 68 29 0d 05 64 20 ea 6d |ted match)..d .m| 00000be0 61 74 63 68 25 2c 6e 65 67 25 3a 6d 61 74 63 68 |atch%,neg%:match| 00000bf0 25 3d 30 3a 6e 65 67 25 3d 30 0d 05 6e 26 e7 c0 |%=0:neg%=0..n&..| 00000c00 70 61 74 24 2c 31 29 3d 22 21 22 8c 6e 65 67 25 |pat$,1)="!".neg%| 00000c10 3d 31 3a 70 61 74 24 3d c1 70 61 74 24 2c 32 29 |=1:pat$=.pat$,2)| 00000c20 0d 05 78 19 e7 c2 67 24 2c 31 29 3d 22 2a 22 80 |..x...g$,1)="*".| 00000c30 70 61 74 24 3c 3e 67 24 8c 0d 05 82 27 20 20 e7 |pat$<>g$....' .| 00000c40 c0 67 24 2c a9 67 24 2d 31 29 3d c0 70 61 74 24 |.g$,.g$-1)=.pat$| 00000c50 2c a9 67 24 2d 31 29 8c 6d 61 74 63 68 25 3d 32 |,.g$-1).match%=2| 00000c60 0d 05 8c 07 20 20 cc 0d 05 96 17 20 20 e7 70 61 |.... ..... .pa| 00000c70 74 24 3d 67 24 8c 6d 61 74 63 68 25 3d 31 0d 05 |t$=g$.match%=1..| 00000c80 a0 05 cd 0d 05 aa 18 e7 6e 65 67 25 8c 6d 61 74 |........neg%.mat| 00000c90 63 68 25 3d 2d 6d 61 74 63 68 25 0d 05 b4 0b 3d |ch%=-match%....=| 00000ca0 6d 61 74 63 68 25 0d 05 be 04 0d 05 c8 12 dd a4 |match%..........| 00000cb0 66 69 6c 65 73 69 7a 65 28 66 24 29 0d 05 d2 24 |filesize(f$)...$| 00000cc0 ea 73 25 3a c8 99 22 58 4f 53 5f 46 69 6c 65 22 |.s%:.."XOS_File"| 00000cd0 2c 31 37 2c 66 24 b8 2c 2c 2c 2c 73 25 3b 46 25 |,17,f$.,,,,s%;F%| 00000ce0 0d 05 dc 11 e7 28 46 25 80 31 29 8c 73 25 3d 2d |.....(F%.1).s%=-| 00000cf0 31 0d 05 e6 07 3d 73 25 0d 05 f0 04 0d 05 fa 11 |1....=s%........| 00000d00 dd f2 65 78 69 74 28 6e 25 2c 61 24 29 0d 06 04 |..exit(n%,a$)...| 00000d10 11 e7 66 68 25 3c 3e 30 20 d9 23 66 68 25 0d 06 |..fh%<>0 .#fh%..| 00000d20 0e 25 ff 28 22 73 65 74 20 4e 65 77 73 42 61 73 |.%.("set NewsBas| 00000d30 65 24 52 65 74 75 72 6e 43 6f 64 65 20 22 2b c3 |e$ReturnCode "+.| 00000d40 6e 25 29 0d 06 18 24 ff 28 22 73 65 74 20 4e 65 |n%)...$.("set Ne| 00000d50 77 73 42 61 73 65 24 52 65 74 75 72 6e 49 6e 66 |wsBase$ReturnInf| 00000d60 6f 20 22 2b 61 24 29 0d 06 22 05 e0 0d 06 2c 04 |o "+a$).."....,.| 00000d70 0d 06 36 0d dd a4 73 74 72 28 61 25 29 0d 06 40 |..6...str(a%)..@| 00000d80 2a ea 61 24 3a c8 95 20 3f 61 25 3e 33 31 80 a9 |*.a$:.. ?a%>31..| 00000d90 61 24 3c 32 35 35 3a 61 24 2b 3d bd 3f 61 25 3a |a$<255:a$+=.?a%:| 00000da0 61 25 2b 3d 31 3a ce 0d 06 4a 07 3d 61 24 0d 06 |a%+=1:...J.=a$..| 00000db0 54 04 0d 06 5e 13 dd a4 72 65 6e 61 6d 65 28 73 |T...^...rename(s| 00000dc0 24 2c 64 24 29 0d 06 68 2a ea 46 25 3a c8 99 22 |$,d$)..h*.F%:.."| 00000dd0 58 4f 53 5f 46 53 43 6f 6e 74 72 6f 6c 22 2c 32 |XOS_FSControl",2| 00000de0 35 2c 73 24 2c 64 24 b8 65 72 72 25 3b 46 25 0d |5,s$,d$.err%;F%.| 00000df0 06 72 0d e7 28 46 25 80 31 29 20 8c 0d 06 7c 15 |.r..(F%.1) ...|.| 00000e00 20 20 46 25 3d a4 64 65 6c 66 69 6c 65 28 64 24 | F%=.delfile(d$| 00000e10 29 0d 06 86 28 20 20 c8 99 22 58 4f 53 5f 46 53 |)...( .."XOS_FS| 00000e20 43 6f 6e 74 72 6f 6c 22 2c 32 35 2c 73 24 2c 64 |Control",25,s$,d| 00000e30 24 b8 65 72 72 25 3b 46 25 0d 06 90 05 cd 0d 06 |$.err%;F%.......| 00000e40 9a 0b 3d 28 46 25 80 31 29 0d 06 a4 04 0d 06 ae |..=(F%.1).......| 00000e50 15 dd a4 6d 6f 76 65 66 69 6c 65 28 73 24 2c 64 |...movefile(s$,d| 00000e60 24 29 0d 06 b8 19 ea 46 25 3a 46 25 3d a4 72 65 |$).....F%:F%=.re| 00000e70 6e 61 6d 65 28 73 24 2c 64 24 29 0d 06 c2 30 e7 |name(s$,d$)...0.| 00000e80 46 25 3c 3e 30 c8 99 22 58 4f 53 5f 46 53 43 6f |F%<>0.."XOS_FSCo| 00000e90 6e 74 72 6f 6c 22 2c 32 36 2c 73 24 2c 64 24 2c |ntrol",26,s$,d$,| 00000ea0 28 31 3c 3c 37 29 20 b8 3b 46 25 0d 06 cc 0b 3d |(1<<7) .;F%....=| 00000eb0 28 46 25 80 31 29 0d 06 d6 04 0d 06 e0 11 dd a4 |(F%.1)..........| 00000ec0 64 65 6c 66 69 6c 65 28 66 24 29 0d 06 ea 1d ea |delfile(f$).....| 00000ed0 46 25 3a c8 99 22 58 4f 53 5f 46 69 6c 65 22 2c |F%:.."XOS_File",| 00000ee0 36 2c 66 24 b8 3b 46 25 0d 06 f4 0b 3d 28 46 25 |6,f$.;F%....=(F%| 00000ef0 80 31 29 0d 06 fe 04 0d 07 08 0f dd a4 63 6c 65 |.1)..........cle| 00000f00 61 6e 28 42 24 29 0d 07 12 1c c8 95 c0 42 24 2c |an(B$).......B$,| 00000f10 31 29 3d 22 20 22 3a 42 24 3d c1 42 24 2c 32 29 |1)=" ":B$=.B$,2)| 00000f20 3a ce 0d 07 1c 20 c8 95 c2 42 24 2c 31 29 3d 22 |:.... ...B$,1)="| 00000f30 20 22 3a 42 24 3d c0 42 24 2c a9 42 24 2d 31 29 | ":B$=.B$,.B$-1)| 00000f40 3a ce 0d 07 26 07 3d 42 24 0d 07 30 04 0d 07 3a |:...&.=B$..0...:| 00000f50 15 dd a4 67 65 74 70 61 72 28 f8 20 41 24 2c 73 |...getpar(. A$,s| 00000f60 24 29 0d 07 44 0a ea 42 24 2c 6c 25 0d 07 4e 0e |$)..D..B$,l%..N.| 00000f70 6c 25 3d a7 41 24 2c 73 24 29 0d 07 58 0a e7 6c |l%=.A$,s$)..X..l| 00000f80 25 3e 30 8c 0d 07 62 1f 20 20 42 24 3d c0 41 24 |%>0...b. B$=.A$| 00000f90 2c 6c 25 2d 31 29 3a 41 24 3d c1 41 24 2c 6c 25 |,l%-1):A$=.A$,l%| 00000fa0 2b 31 29 0d 07 6c 07 20 20 cc 0d 07 76 11 20 20 |+1)..l. ...v. | 00000fb0 42 24 3d 41 24 3a 41 24 3d 22 22 0d 07 80 05 cd |B$=A$:A$="".....| 00000fc0 0d 07 8a 07 3d 42 24 0d ff |....=B$..| 00000fc9