Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199508.adf » !Internet » StarterPak/!Newsbase/!RunimageS

StarterPak/!Newsbase/!RunimageS

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/!RunimageS
Read OK:
File size: 209F4 bytes
Load address: 0000
Exec address: 0000
File contents
   10ONERRORREPORT:PRINT" at ";ERL:END
   20PROCinit
   30IFFNduptask>0THENEND
   40PROCcreatedirs
   50PROCloadcode
   60PROCstartmsgtrans
   70PROCstartwimp
   80REM claim all free memory, bar 64k, up to a maximum of 320k (free space)
   90END=HIMEM+FNfreemem(-64)
  100IF(HIMEM-END)>320*1024THENEND=END+320*1024
  110PROCloadsysconf
  120PROCchecknewsdir
  130PROCgettransports
  140PROClocknewsdir
  150PROCinitgrpdata
  160PROCinitfilters
  170END=(END+&4000)
  180PROCreadconfig
  190PROCinituserdata
  200PROCstarttransport
  210PROCautoconfigure
  220FORl1%=1TO3:PROCpoll(0):NEXTl1%
  230END=(END+&4000)
  240startupok%=1:PROCnbstartup(0,0,0)
  250PROCcheckoutfiles
  260PROCinitconf(initconf%)
  270END=HIMEM+FNcheckslot
  280ONERRORPROCerrorbox(TRUE)
  290PROCstartupcheckexpire
  300REPEAT
  310  IFcheckfiles%THEN
  320    REPEAT
  330      start%=0
  340      file$=FNcheckforfiles(start%)
  350      END=HIMEM+FNcheckslot
  360      IFfile$>""THENPROCcheckdisk:PROCdobatch(file$,start%)
  370    UNTILfile$=""
  380    checkfiles%=autodebatch%
  390  ENDIF
  400  PROCsleep
  410UNTIL0
  420END
  430
  440DEFPROCinitconf(i%)
  450IFi%>0ANDrw%THEN
  460  IFi%=2THENPROCmessage0("Sinfo2",1)
  470  PROCfront(msetup%):PROCprint(FNmsg0("Setup"),FNmsg0("Swait"),"","")
  480  REPEAT:PROCpoll(50):UNTILconfopen%=FALSE:PROCsaveconfig
  490ENDIF
  500ENDPROC
  510
  520DEFPROCcron
  530IFABS(time%-cron0%)>600THENcron0%=time%:PROCcheckoutfiles
  540IFABS(time%-cron1%)>1200THENcron1%=time%:PROCchecktosend
  550IFABS(time%-cron2%)>6000THENcron2%=time%:PROCchecklock:PROClog("")
  560IFABS(time%-cron3%)>400ANDinfoopen%THENPROCcredits:cron3%=time%
  570IFABS(time%-cron4%)>30000THENcron4%=time%:IFblockexpire%=0THENPROCcheckexpire
  580ENDPROC
  590
  600DEFPROCsleep
  610LOCALm$
  620m$="Idle2":IFrw%THENm$="Idle"
  630PROCprint(FNmsg0(m$)," "," "," "):sleep%=time%
  640REPEATPROCpoll(200):UNTILforcebatch%ORABS(time%-sleep%)>=chktime%
  650forcebatch%=0
  660ENDPROC
  670
  680DEFPROCchecknewsdir
  690WHILEnewsroot$=""
  700  IFrw%THENPROCmessage0("Snewsdir",1)ELSEPROCmessage0("Sronewsdir",1)
  710  PROCcreatedirs:IFnewsroot$=""ANDrw%PROCcfront(savend%,0,0)
  720  REPEATPROCpoll(200):UNTILndopen%=0:PROCcreatedirs
  730ENDWHILE
  740IFVALFNvarval("NewsDir$Version")<1ANDrw%THEN
  750  PROCmessage0("Supdate",0):PROCpoll(0)
  760  PROCmakenewsdir("<NewsDir$Dir>"):PROCmessage("",0)
  770ENDIF
  780ENDPROC
  790
  800DEFFNcheckforfiles(RETURN start%)
  810LOCALt1%,l%,f$,pat$
  820IFrw%ANDFNfreemem(0)>32*1024THEN
  830  PROCprint(FNmsg0("Idle"),FNmsg0("Fcheck")," "," ")
  840  REM first check for recovery record...
  850  f$=FNcheck_recfile(start%)
  860  IFf$=""THEN
  870    start%=0:t1%=0
  880    IFtransi$(transport%,0)=""THENl%=FNruntransportfile(13,"","","")
  890    REPEAT
  900      l%=0
  910      REPEATpat$=transi$(t1%,l%)
  920        IFpat$>""THENf$=FNcheckinfiles(pat$):l%+=1
  930      UNTILf$>""ORpat$=""ORl%=10
  940      t1%+=transport%
  950    UNTILf$>""ORt1%>transport%ORtransport%=0
  960  ENDIF
  970ENDIF
  980=f$
  990
 1000DEFPROCstartupcheckexpire
 1010IFFNcheckexpiretime(FNtime)THEN
 1020  REM check if expiry is wanted; mark as done if not.
 1030  IFFNconfirm2(FNmsg0("Econfirm"))=2THENPROCstamp(newsroot$+".news")
 1040ENDIF
 1050IFrw%THENblockexpire%=0:cron4%=0
 1060ENDPROC
 1070
 1080DEFPROCcheckexpire
 1090LOCALt%,g%,t$,now%
 1100now%=FNtime
 1110IFFNcheckexpiretime(now%)THEN
 1120  PROCnbupdate(10,"",0,"","")
 1130  PROClog("Starting automatic expiry")
 1140  PROCprint("",FNmsg0("Echeck")," "," ")
 1150  PROCstamp(newsroot$+".news")
 1160  g%=0:REPEATg%+=1
 1170    t%=FNfiletime(FNpath(grp$(g%)))
 1180    IFt%<now%THENPROCexpiregroup(g%,0,autoexp%)
 1190    IFg%MOD10=0THENPROCpoll(slice%*2)
 1200    IFcancel%THEN
 1210      IFFNconfirm(FNmsg1("Ccancexp",g$))=2THENcancel%=0ELSEcancel%=TRUE
 1220    ENDIF
 1230  UNTILg%=groups%ORcancel%<>0
 1240  PROClog("Finished expiry")
 1250  PROCrunsupport("Trimlist "+STR$ngexp%):PROCexpmiscdir(tmpdir$,1)
 1260ENDIF
 1270ENDPROC
 1280
 1290DEFFNcheckexpiretime(now%)
 1300LOCALyes%,last%,now$,test$,etime%
 1310yes%=0
 1320IFrw%THEN
 1330  last%=FNfiletime(newsroot$+".news")
 1340  REM test$ is expiry trigger time as string, format CEYRMNDYHRMI
 1350  REM FNfiletime returns file timestamp in same format
 1360  IFpostfetchready%<>0THEN
 1370    postfetchready%=0
 1380    t%=FNruntransportfile(5,"","",""):REM postfetch...
 1390  ENDIF
 1400  etime%=exptime%:IFexpany%THENetime%=0
 1410  IFautoexp%ANDindebatch%=0THEN
 1420    test$=STR$now%+RIGHT$("0000"+STR$etime%,4)
 1430    now$=FNfulltime
 1440    yes%=(now$>test$)
 1450    IFyes%THEN
 1460      REM also check last expiry was yesterday...
 1470      IFlast%>now%-1THENyes%=0
 1480      REM and check transport not active... don't want expiry while online.
 1490      IFyes%THENIFFNruntransportfile(15,"","","")<>0THENyes%=0
 1500    ENDIF
 1510  ENDIF
 1520ENDIF
 1530=yes%
 1540
 1550DEFPROCcheckoutfiles
 1560LOCALl%,t%,f$,d$,p$,n%:l%=0
 1570REPEAT
 1580  f$=transo$(transport%,l%):l%+=1
 1590  d$=FNdir(f$):p$=FNleaf(f$)
 1600  SYS"XOS_GBPB",9,d$,tmp%,1,0,255,p$ TO,,,n%;err%
 1610  IF(err%AND1)=0ANDn%>0THENt%+=1
 1620UNTILf$=""ORl%=11
 1630d$=defic$:IFt%=0THENdefic$="newsbase1"ELSEdefic$="newsbase2"
 1640IFd$<>defic$THENPROCchangeic(defic$)
 1650ENDPROC
 1660
 1670DEFFNcheckinfiles(A$)
 1680LOCALresult$,n%,next%,f$,ff$,f%,F%,l%,source$,pat$,dirbuf%,dbr%
 1690next%=0
 1700dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
 1710source$=FNdir(A$):pat$=FNleaf(A$)
 1720REPEAT
 1730  SYS"XOS_GBPB",9,source$,dirbuf%,1,next%,dbsize%,pat$ TO,,,n%,next%;F%
 1740  IF(F%AND1)=0ANDn%>0THEN
 1750    f$=FNstr(dirbuf%):ff$=source$+"."+f$
 1760    REM attempt deletion of any empty files...
 1770    IFFNfilesize(ff$)=0THENF%=FNdelfile(ff$)
 1780    REM see if file can be opened for read access...
 1790    F%=0:f1%=FNopenin(ff$)
 1800    IFf1%<>0THEN
 1810      PROCcf(f1%)
 1820      IFsource$<>workdir$THEN
 1830        F%=FNruntransportfile(4,ff$,"","")
 1840          IFF%=0THEN
 1850          F%=FNmovefile(ff$,workdir$+"."+f$)
 1860          ELSE
 1870          PROCmessage1("Dnoprefetch",FNvarval("Newsbase$ReturnInfo"),1)
 1880        ENDIF
 1890      ENDIF
 1900      IFF%=0THENresult$=workdir$+"."+f$
 1910    ENDIF
 1920    ELSE
 1930    PROCpoll(slice%*2)
 1940  ENDIF
 1950UNTILresult$>""ORnext%<0OR(F%AND1)<>0
 1960PROCrelease(dbr%)
 1970=result$
 1980
 1990DEFPROCchecktosend
 2000LOCALn%,next%,f$,d$,F%,dirbuf%,dbr%,info$,u$,ty%
 2010IFrw%THEN
 2020  nf%=0:dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
 2030  FORty%=0TO1:n%=transm%(transport%,ty%+1)
 2040    IFFNfreemem(0)>=n%*1024THEN
 2050      next%=0:REPEAT
 2060        SYS"XOS_GBPB",9,outdir$(ty%),dirbuf%,1,next%,dbsize%,"*"TO,,,n%,next%;F%
 2070        IF(F%AND1)=0ANDn%>0THEN
 2080          f$=outdir$(ty%)+"."+FNstr(dirbuf%):PROCsettype(f$,&FFF)
 2090          d$=FNtmpfile:F%=FNmovefile(f$,d$)
 2100          IF(F%AND1)=0THEN
 2110          next%-=1:info$=FNkeepfile(ty%,d$,u$)
 2120          CASEty%OF
 2130            WHEN0:r$=FNsendmail(d$,u$)
 2140            WHEN1:r$=FNsendnews(d$,info$,u$)
 2150          ENDCASE
 2160          IFr$>""PROCmessage1("Qsendfail",d$,1)
 2170          PROCpoll(slice%*2)
 2180          ENDIF
 2190        ENDIF
 2200      UNTILnext%<0OR(F%AND1)<>0
 2210    ENDIF
 2220  NEXTty%
 2230  PROCrelease(dbr%)
 2240ENDIF
 2250ENDPROC
 2260
 2270DEFFNdir(f$)
 2280LOCALl%
 2290l%=LENf$:REPEATl%-=1:UNTILMID$(f$,l%,1)="."ORl%<1
 2300=LEFT$(f$,l%-1)
 2310
 2320DEFFNleaf(f$)
 2330LOCALl%
 2340l%=LENf$:REPEATl%-=1:UNTILMID$(f$,l%,1)="."ORl%<1
 2350=MID$(f$,l%+1)
 2360
 2370DEFPROCdobatch(fullbf$,bstart%)
 2380LOCALbf$,ty$,F%
 2390bf$=FNleaf(fullbf$)
 2400PROCdecompress(fullbf$)
 2410IFFNfiletype(fullbf$)=&FCA THEN
 2420  PROCmessage0("CompFail4",1):PROClog("Batch decompression failed for "+bf$)
 2430  IFFNmovetodebug(fullbf$)<>0THENF%=FNforcedelfile(fullbf$)
 2440  ELSE
 2450  PROCstartmemmgr:indebatch%=TRUE
 2460  inbuf%=base%:PROCextend(inbufsize%):artbase%=base%+inbufsize%
 2470  PROCprint(FNmsg0("Dstart")," "," "," ")
 2480  PROCopenbatch(fullbf$,bstart%)
 2490  cancel%=FALSE
 2500  done%=0:del%=TRUE:off%=0:ptr%=0:recpos%=0:lastpos%=0:batartlen%=0
 2510  type%=FNidentifyfile(fullbf$,bstart%)
 2520  IFtype%=0THENty$=FNmsg0("Mail")ELSEty$=FNmsg0("News")
 2530  start%=TRUE:total%=0:dstime%=time%
 2540  WHILEeof%=FALSE
 2550    cancel%=FALSE:PROCdoarticle:PROCsavelist
 2560    PROCprint(FNmsg1("Dtype",ty$),"","","")
 2570    IFcancel%THENPROCcancelbatch
 2580  ENDWHILE
 2590  PROCextend(0):indebatch%=0
 2600  PROCendbatch(fullbf$)
 2610ENDIF
 2620ENDPROC
 2630
 2640DEFPROCcancelbatch
 2650eof%=TRUE:del%=FALSE:PROCcf(f00%):PROCwrite_recfile:indebatch%=0
 2660PROCmessage0("Dcancel",0):PROCpause
 2670ENDPROC
 2680
 2690DEFPROCendbatch(batchf$)
 2700LOCALF%,n%,t%,debdir$,rate$:rate$=""
 2710PROCwriteindexbuf
 2720REM write debatch stats to logfile
 2730t%=ABS(dstime%-time%)DIV100:IFt%>0THENrate$=STR$((len%-bstart%)DIVt%)+"cps"
 2740PROClog("Finished batch "+bf$+" "+STR$done%+" arts "+STR$len%+" bytes "+rate$)
 2750PROCcf(f00%):REM batch file should be closed already, but this ensures.
 2760PROCchangeic(defic$)
 2770IFcancel%=0THEN
 2780  PROCsavegrpdata
 2790  PROCdel_recfile
 2800  IFkeepb%<>0ORdel%=0THEN
 2810    IFFNmovetodebug(batchf$)<>0THENF%=FNforcedelfile(batchf$)
 2820    ELSE
 2830    F%=FNforcedelfile(batchf$)
 2840  ENDIF
 2850  IFF%<>0THENPROCmessage1("Ddelfail",bf$,1)
 2860  postfetchready%=1
 2870  PROCexpmiscdir(baddir$,dbg_exptime%)
 2880ENDIF
 2890PROCarrive
 2900ENDPROC
 2910
 2920DEFFNmovetodebug(f$)
 2930LOCALF%,n%,d$,bf$,b%
 2940bf$=FNleaf(f$)
 2950d$=baddir$+"."+bf$:PROCensuredir(d$)
 2960IFFNobjtype(d$)<2THENd$=baddir$
 2970n%=1:REPEAT
 2980  ?tmp%=3:SYS"OS_Word",14,tmp%
 2990  SYS"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%MN%DY%24%MI%SE"TOb%
 3000  n%+=1:F%=FNrename(f$,d$+"."+FNstr(b%))
 3010UNTILn%>9ORF%=0
 3020=F%
 3030
 3040DEFPROCarrive
 3050LOCALa$,a%
 3060CASEarrart%OF
 3070  WHEN0:a$=FNmsg0("Nonews")
 3080  WHEN1:a$=FNmsg0("Newnews1")
 3090  OTHERWISE:a$=FNmsg1("Newnews",STR$arrart%)
 3100ENDCASE
 3110PROCupdateiconstring(arrive%,1,a$)
 3120IFarrmail$>""THENa$=FNmsg1("Newmail",MID$(arrmail$,2))ELSEa$=FNmsg0("Nomail")
 3130PROCupdateiconstring(arrive%,2,LEFT$(a$,36))
 3140IFalert%THEN
 3150  IFarrmail$>""OR(arrart%>0ANDalertnews%<>0)THEN
 3160    IFarropen%=0PROCcfront(arrive%,0,0)ELSEPROCfront(arrive%)
 3170    a%=1:IFdefclient$>""ANDFNobjtype(defclient$)>0THENa%=0
 3180    PROCsetshaded(arrive%,3,a%)
 3190    IFalertbeep%VDU7
 3200  ENDIF
 3210ENDIF
 3220ENDPROC
 3230
 3240DEFPROCsavegrpdata
 3250IFstartupok%<>0THEN
 3260  PROCwritegrpdata
 3270  PROCwriteindexbuf
 3280ENDIF
 3290PROCadddelbuf(0,0)
 3300ENDPROC
 3310
 3320DEFPROCdoarticle
 3330PROCextend(inbufsize%+defartbuf%)
 3340PROCclearheader
 3350outg%()=0:ptr%=0:inhdr%=TRUE:out$="":foundid%=0
 3360nextartpos%=pos%+thisartlen%:thisartpos%=pos%
 3370REPEAT
 3380  IFinhdr%THEN
 3390    PROCheaderline(line$):start%=0:PROCpoll(slice%*2)
 3400    IFdiscard%=0PROCaddtobuffer(line$):ELSEPROCdiscard
 3410    IFline$=""THENinhdr%=FALSE:IFthisartlen%>0THENPROCblockmove:PROCbatchpoll
 3420    ELSE
 3430    PROCaddtobuffer(line$):PROCbatchpoll
 3440  ENDIF
 3450  line$=FNgetline
 3460  IFinhdr%=0ANDpos%>nextartpos%-100THENIFLEFT$(line$,seplen%)=sep$THENstart%=TRUE
 3470UNTILstart%<>0 OReof%<>0
 3480IFLEFT$(line$,4)="#! r"THENthisartlen%=VALMID$(line$,10):ELSEthisartlen%=0
 3490done%+=1:total%+=1:IFtype%=1THENarrart%+=1
 3500ENDPROC
 3510
 3520DEFPROCdiscard
 3530LOCALtmp$:tmp$=line$
 3540WHILElong%:tmp$=FNgetline:ENDWHILE
 3550ENDPROC
 3560
 3570DEFPROCbatchpoll
 3580PROCpoll(slice%):IFABS(time%-stime%)>200THENPROCupdatepos:stime%=time%
 3590ENDPROC
 3600
 3610DEFPROCblockmove
 3620LOCALl%,F%,m%,a0%,a1%,a2%,a3%
 3630l%=thisartlen%-pos%+thisartpos%
 3640IFbufptr%+l%+4>inbufsize%THENENDPROC
 3650m%=inbuf%+bufptr%+l%:a0%=?m%:a1%=m%?1:a2%=m%?2:a3%=m%?3
 3660REM check for "#! r" without reading string (buffer overrun-possible data abort)
 3670IFa0%=35ANDa1%=33ANDa2%=32ANDa3%=114THEN
 3680  IFptr%+l%>bufsize%THENPROCextend(inbufsize%+bufsize%+l%+1024)
 3690  SYS"XWimp_TransferBlock",task%,inbuf%+bufptr%,task%,artbase%+ptr%,l%TO;F%
 3700  IF(F%AND1)=0THENpos%+=l%:ptr%+=l%:bufptr%+=l%
 3710ENDIF
 3720ENDPROC
 3730
 3740DEFPROCclearheader
 3750to$="<blank>":from$="(no sender)":subject$="(no subject)":cc$="":origto$=""
 3760messid$="<0>":newsgroup$="":expires%=0:artdate%=0:supersede$="":control$=""
 3770receipt$="":lasth%=0:precedence$="":replyto$="":approved$="":reference$=""
 3780ENDPROC
 3790
 3800DEFFNidentifyfile(file$,offset%)
 3810LOCALt%,lc%,clue%,a$:t%=-1:clue%=-1
 3820REPEAT
 3830  line$=FNgetline
 3840  lc%+=1:line$=FNclean(line$):a$=FNlower(line$)
 3850  IFASC(line$)=1THENt%=0:sep$=CHR$1:ident$=""
 3860  IFLEFT$(line$,5)="From "THENt%=0:sep$="From ":ident$=""
 3870  IFLEFT$(line$,8)="#! rmail"THENt%=0:sep$="#! rmail":ident$="":thisartlen%=VALMID$(line$,10)
 3880  IFLEFT$(line$,8)="#! rnews"THENt%=1:sep$="#! rnews":ident$="Newsgroups:":thisartlen%=VALMID$(line$,10)
 3890  IFLEFT$(a$,11)="newsgroups:"ORLEFT$(a$,5)="xref:"ORLEFT$(a$,5)="path:"THENclue%=1
 3900  IFLEFT$(a$,4)="to: "ORLEFT$(a$,14)="apparently-to:"THENclue%=0
 3910UNTILt%>=0OReof%<>0
 3920IFt%<0THEN
 3930  t%=1:sep$="#! rnews":ident$="Newsgroups:"
 3940  IFclue%=0THENt%=0:sep$="From ":ident$=""
 3950ENDIF
 3960IFlc%>1THENPROCrestartbatch(file$,t%,offset%)
 3970seplen%=LENsep$
 3980=t%
 3990
 4000DEFPROCheaderline(line$)
 4010LOCALA$
 4020IFsep$<>"From "ANDLEFT$(line$,seplen%)=sep$THENdiscard%=TRUE:ENDPROC
 4030PROCsetheadervar(line$)
 4040IFtype%=1ANDLEFT$(line$,5)="Path:"THENPROCaddustopath(line$):ENDPROC
 4050IFfoundid%>0THENENDPROC
 4060IFtype%=0ORlasth%=11THEN
 4070  IFtype%=0THEN
 4080    A$="Email."+bf$:IFFNuserok(bf$)=0THENA$="Email.postmaster"
 4090    ELSE
 4100    A$=newsgroup$:outg%()=0
 4110  ENDIF
 4120  PROCaddheadertobuffer(line$):PROCgroupsline(A$):discard%=TRUE:foundid%=1
 4130  IFtype%=1THENPROCdoxref
 4140ENDIF
 4150ENDPROC
 4160
 4170DEFPROCsetheadervar(A$)
 4180LOCALno%:IFA$=""THENENDPROC
 4190CALLheaderno%,A$,no%
 4200CASEno%OF
 4210  WHEN1:subject$=FNclean(MID$(A$,9))
 4220  WHEN2:from$=FNclean(MID$(A$,6))
 4230  WHEN3:messid$=FNclean(MID$(A$,12))
 4240  WHEN4:supersede$=FNclean(MID$(A$,12))
 4250  WHEN5:expires%=FNdecodedate(MID$(A$,9))
 4260  WHEN6:control$=FNclean(MID$(A$,9))
 4270  WHEN7:artdate%=FNdecodedate(MID$(A$,7))
 4280  WHEN8:discard%=TRUE
 4290  WHEN9:IFto$=""THENto$=FNclean(MID$(A$,15))
 4300  WHEN10:to$=FNclean(MID$(A$,4))
 4310  WHEN11:newsgroup$=FNclean(MID$(A$,12))
 4320  WHEN12:receipt$=FNclean(MID$(A$,20))
 4330  WHEN13:precedence$=FNclean(MID$(A$,12))
 4340  WHEN14:replyto$=FNclean(MID$(A$,10))
 4350  WHEN15:approved$=FNclean(MID$(A$,10))
 4360  WHEN16:PROCaddtobuffer(A$):discard%=TRUE:line$="":REM "Message:" header
 4370  WHEN17:reference$=FNclean(MID$(A$,12))
 4380  WHEN18:cc$=FNclean(MID$(A$,5))
 4390  WHEN19:origto$=FNclean(MID$(A$,19))
 4400  WHEN20:REM Errors-To:
 4410  OTHERWISE:IFLEFT$(A$,1)=" "THENPROCconthline(A$,lasth%)ELSElashh%=0
 4420ENDCASE
 4430IFno%>0THENlasth%=no%
 4440ENDPROC
 4450
 4460DEFPROCconthline(a$,t%)
 4470CASEt%OF
 4480  WHEN10:IFLENto$+LENa$<250THENto$+=a$
 4490  WHEN17:IFLENreference$+LENa$<250THENreference$+=a$
 4500  WHEN18:IFLENcc$+LENa$<250THENcc$+=a$
 4510ENDCASE
 4520ENDPROC
 4530
 4540DEFFNdecodedate(A$)
 4550LOCALres%,d$,m$,y$,l%,m%:REM attempt to decode header date...
 4560l%=INSTR(A$,","):IFl%>0THENA$=MID$(A$,l%+1)
 4570  A$=FNclean(A$):A$=FNlower(A$):l%=INSTR(A$," ")
 4580  d$=LEFT$(A$,l%-1):IFl%=2THENd$="0"+d$
 4590  m%=INSTR("janfebmaraprmayjunjulaugsepoctnovdec",MID$(A$,l%+1,3))DIV3+1
 4600  m$=RIGHT$("0"+STR$m%,2)
 4610  y$=MID$(A$,l%+5,4):l%=INSTR(y$," ")
 4620  IFl%>0THENy$=STR$((FNtime)DIV1E6)+LEFT$(y$,2)
 4630  IFVALd$*VALm$*VALy$>0THENres%=VAL(y$+m$+d$)
 4640=res%
 4650
 4660DEFPROCdeleteid(g%,id$)
 4670LOCALa%,f$,id1$
 4680REPEATid1$=FNgetpar(id$," ")
 4690  PROCprint("",FNmsg1("Acancel",id1$),"",""):a%=FNfindartid(g%,id1$)
 4700  IFa%>0THEN
 4710    PROCdelart(g%,a%):PROClog("Cancelled "+id1$+" in "+grp$(g%))
 4720    ELSE
 4730    PROCprint("",FNmsg0("Afail"),"","")
 4740  ENDIF
 4750UNTILid$=""
 4760ENDPROC
 4770
 4780DEFPROCdocontrol(g%,a$)
 4790LOCALc$
 4800c$=FNclean(FNgetpar(a$," "))
 4810IFc$="cancel"ANDdocanc%<>0THEN
 4820  a$=FNclean(a$):IFLEFT$(a$,1)="<"ANDRIGHT$(a$)=">"THENPROCdeleteid(g%,a$)
 4830ENDIF
 4840ENDPROC
 4850
 4860DEFPROCdoxref
 4870LOCALxref$,c%,t%
 4880IFoutg%(0)>0THEN
 4890  xref$="Xref: "+hostname$
 4900  c%=0:REPEAT
 4910  IFLENxref$+LENgrp$(outg%(c%))<200 THENxref$=xref$+" "+grp$(outg%(c%))+":"+STR$outs%(c%)
 4920  c%+=1
 4930  UNTILoutg%(c%)=0ORc%=maxsave%
 4940  t%=long%:long%=0:PROCaddtobuffer(xref$):long%=t%
 4950ENDIF
 4960ENDPROC
 4970
 4980DEFPROCaddustopath(a$)
 4990LOCALtemp%,l%:l%=0
 5000IFhostname$>""ANDINSTR(a$,hostname$)<1THEN
 5010  temp%=long%:long%=TRUE
 5020  PROCaddheadertobuffer("Path: "+hostname$+"!"):long%=temp%
 5030  l%=INSTR(a$,":")
 5040ENDIF
 5050PROCaddtobuffer(FNclean(MID$(a$,l%+1))):discard%=TRUE
 5060ENDPROC
 5070
 5080DEFFNgetline
 5090REM if line incomplete, long% is set to TRUE.
 5100LOCALC%,P%,l%,loc%,A$
 5110long%=FALSE:P%=0:discard%=0:lastpos%=pos%
 5120REM first try fast line fetch
 5130IFpos%+254<len%ANDbufptr%+254<inbufsize%THEN
 5140  loc%=bufptr%+inbuf%:CALLgetline%,long%,loc%,A$
 5150  P%=LENA$-(long%=0):bufptr%+=P%:pos%+=P%:=A$
 5160ENDIF
 5170REM if that fails, use the slower smarter one
 5180P%=0:REPEAT
 5190  C%=bufptr%?inbuf%:bufptr%+=1:P%+=1
 5200  IFP%<250THENtmp%?P%=C% ELSEC%=10:long%=TRUE
 5210  IFpos%>=len% THENeof%=TRUE ELSEIFbufptr%=inbufsize% PROCfill
 5220UNTILC%=10 ORC%=13 OReof%<>0:pos%+=P%
 5230IFtmp%?P%<32 ANDtmp%?P%<>1 THENtmp%?P%=13 ELSEtmp%?(P%+1)=13
 5240=$(tmp%+1)
 5250
 5260DEFPROCupdatepos
 5270LOCALstat$,t%
 5280IFlen%>0 THEN
 5290  stat$=STR$pos%+"/"+STR$len%+" bytes ("+STR$(INT(100*(pos%/len%)))+"%) "
 5300  t%=ABS(dstime%-time%)DIV100:IFt%>0THENstat$+=STR$((pos%-bstart%)DIVt%)+"cps"
 5310  PROCprint("","",stat$,FNmsg1("Newnews",STR$total%))
 5320  IFbaric$=defic$THENPROCchangeic("newsbased")ELSEPROCchangeic(defic$)
 5330ENDIF
 5340ENDPROC
 5350
 5360DEFPROCaddtobuffer(A$)
 5370REM this automatically adds continuation lines to the buffer.
 5380IFptr%>cbufsize% PROCextend(inbufsize%+bufsize%+defartbuf%)
 5390$(artbase%+ptr%)=A$:ptr%+=LENA$:IFlong%THENPROCaddlong
 5400artbase%?ptr%=10:ptr%+=1
 5410ENDPROC
 5420
 5430DEFPROCaddlong
 5440WHILElong%
 5450  A$=FNgetline
 5460  IFptr%>cbufsize%THENPROCextend(inbufsize%+bufsize%+defartbuf%)
 5470  $(artbase%+ptr%)=A$:ptr%+=LENA$
 5480ENDWHILE
 5490ENDPROC
 5500
 5510DEFPROCaddheadertobuffer(A$)
 5520IFptr%>cbufsize% PROCextend(inbufsize%+bufsize%+defartbuf%)
 5530$(artbase%+ptr%)=A$:ptr%+=LENA$:IFlong%=0THENartbase%?ptr%=10:ptr%+=1
 5540ENDPROC
 5550:
 5560DEFPROCextend(mem%)
 5570REPEAT
 5580  SYS"Wimp_SlotSize",min_mem%+mem%,-1TOnew%
 5590  IF(min_mem%+mem%)>new%THENPROCmessage0("Needmem1",1)
 5600UNTIL(min_mem%+mem%)<=new%
 5610bufsize%=new%-min_mem%-inbufsize%:cbufsize%=bufsize%-300
 5620ENDPROC
 5630
 5640DEFPROCcheckdisk
 5650LOCALf%,F%
 5660REPEAT
 5670f%=FNdiskspace(basedir$)
 5680IFf%<(mindsk%*1024)THENPROCmessage0("Needdisk",1)
 5690UNTILf%>=(mindsk%*1024)
 5700ENDPROC
 5710
 5720DEFFNdiskspace(a$)
 5730LOCALF%,f%
 5740SYS"XOS_FSControl",49,basedir$TOf%;F%:IF(F%AND1)<>0THENf%=0
 5750=f%
 5760
 5770DEFFNclean(A$)
 5780REM strips leading & trailing spaces
 5790LOCALB$:IFA$>""THENCALLtrimstr%,A$,B$
 5800=B$
 5810
 5820DEFPROCopenbatch(f$,offset%)
 5830f00%=FNopenin(f$)
 5840bufptr%=0:eof%=FALSE:len%=0:pos%=offset%
 5850IFf00%<>0THENlen%=EXT#f00%:PTR#f00%=offset%
 5860PROCfill
 5870ENDPROC
 5880
 5890DEFPROCrestartbatch(f$,t%,offset%)
 5900LOCALa$:a$=FNmsg0("Mail"):IFt%>0THENa$=FNmsg0("News")
 5910PROCmessage1("Dbadhead",a$,0)
 5920PROCcf(f00%):line$="":del%=FALSE:PROCopenbatch(f$,offset%)
 5930ENDPROC
 5940
 5950DEFPROCfill
 5960LOCALr3%,F%
 5970IFf00%<>0THEN
 5980  SYS"XOS_GBPB",4,f00%,inbuf%,inbufsize%TO,,,r3%;F%
 5990  IF(F%AND1)<>0ORr3%>0THENPROCcf(f00%)
 6000ENDIF
 6010bufptr%=0
 6020ENDPROC
 6030
 6040DEFFNaddtosavelist(g$,c%)
 6050LOCALg%
 6060g%=FNnametono(FNclean(g$),TRUE)
 6070IFg%>0ANDc%<=maxsave%THENoutg%(c%)=g%:outs%(c%)=FNseq(g%):c%+=1
 6080=c%
 6090
 6100DEFPROCdefaultsavelist
 6110LOCALg%
 6120CASEtype%OF
 6130WHEN0:g%=FNnametono("Email.postmaster",TRUE)
 6140OTHERWISE:g%=FNnametono("junk",TRUE)
 6150ENDCASE
 6160IFg%>0THENoutg%()=0:outg%(0)=g%:outs%(0)=FNseq(g%)
 6170ENDPROC
 6180
 6190DEFPROCgroupsline(list$)
 6200LOCALng%:ng%=0
 6210IFINSTR(list$,",")=0THENng%=FNaddtosavelist(list$,ng%):ENDPROC
 6220IFlong%THENPROClonggroupsline(list$):ENDPROC
 6230REPEAT
 6240  ng%=FNaddtosavelist(FNgetpar(list$,","),ng%)
 6250UNTILlist$=""
 6260ENDPROC
 6270
 6280DEFPROClonggroupsline(list$)
 6290LOCALg$,p%,frag$,gfrag$,ng%,end%:ng%=0:end%=0
 6300REPEAT
 6310frag$=""
 6320IFlong%=0THEN
 6330  end%=TRUE
 6340  ELSE
 6350  p%=LENlist$:REPEATp%-=1:UNTILp%=1ORMID$(list$,p%,1)=","
 6360  IFMID$(list$,p%,1)=","THENfrag$=MID$(list$,p%+1):list$=LEFT$(list$,p%-1)
 6370ENDIF
 6380REPEAT
 6390  g$=FNgetpar(list$,","):IFgfrag$>""THENg$=gfrag$+g$:gfrag$=""
 6400  ng%=FNaddtosavelist(g$,ng%)
 6410UNTILg$=""ANDlist$=""
 6420gfrag$=frag$
 6430IFlong%THENlist$=FNgetline:PROCaddheadertobuffer(list$)
 6440UNTILend%
 6450ENDPROC
 6460
 6470DEFPROCsavelist
 6480LOCALc%,u$,g$
 6490IFoutg%(0)=0THENPROCdefaultsavelist
 6500IFfilt%(type%)>0THENPROCcheckfilters
 6510IFtype%=0THEN
 6520  g$=grp$(outg%(0)):u$=FNgtou(g$)
 6530  PROClog("New mail for "+u$+" from "+from$)
 6540  IFreceipt$>""PROCreturnreceipt(receipt$)
 6550  IFFNcheckforward(g$,u$)=1THENENDPROC
 6560ENDIF
 6570recpos%=lastpos%
 6580c%=0:WHILEoutg%(c%)>0ANDc%<maxsave%
 6590  PROCartsave(outg%(c%),outs%(c%)):c%+=1
 6600ENDWHILE
 6610ENDPROC
 6620
 6630DEFPROCcheckfilters
 6640LOCALl%,t%:l%=0
 6650WHILEl%<=nfilt%:t%=flt%(l%)
 6660IFt%=3OR(t%=2ANDtype%=0)OR(t%=1ANDtype%=1)THENIFFNdofilter(l%)<>0THENl%=nfilt%
 6670l%+=1
 6680ENDWHILE
 6690ENDPROC
 6700
 6710DEFFNdofilter(n%)
 6720LOCALn$,a$,l1%,ok%,last%
 6730ok%=0
 6740FORl1%=0TO2:fl_ok%(l1%)=FALSE
 6750  a$="*"+flc$(n%,l1%)+"*"
 6760  CASEflc%(n%,l1%)OF
 6770    WHEN1:IFFNsmatch(a$,from$)>0THENfl_ok%(l1%)=TRUE
 6780    WHEN2:IFFNsmatch(a$,to$)>0ORFNsmatch(a$,cc$)>0ORFNsmatch(a$,origto$)>0THENfl_ok%(l1%)=TRUE
 6790    WHEN3:IFFNsmatch(a$,subject$)>0THENfl_ok%(l1%)=TRUE
 6800    WHEN4:IFFNsmatch(a$,newsgroup$)>0THENfl_ok%(l1%)=TRUE
 6810    WHEN5:IFFNsmatch(a$,replyto$)>0THENfl_ok%(l1%)=TRUE
 6820    WHEN6:IFFNsmatch(a$,precedence$)>0THENfl_ok%(l1%)=TRUE
 6830    WHEN7:IFFNsmatch(a$,bf$)>0THENfl_ok%(l1%)=TRUE
 6840  ENDCASE
 6850  IFfln%(n%,l1%)>0THENfl_ok%(l1%)=(fl_ok%(l1%)=FALSE)
 6860NEXTl1%
 6870ok%=fl_ok%(0)
 6880IFflc%(n%,1)>0THEN
 6890  IFflj%(n%,1)=0THENok%=ok%*fl_ok%(1)ELSEok%=ok%+fl_ok%(1)
 6900  IFflc%(n%,2)>0THEN
 6910    IFflj%(n%,2)=0THENok%=ok%*fl_ok%(2)ELSEok%=ok%+fl_ok%(2)
 6920  ENDIF
 6930ENDIF
 6940IFok%THEN
 6950  PROCprint("",FNmsg1("Fapply",STR$(n%+1)),"","")
 6960  a$=FNfsubst(fla$(n%))
 6970  CASEfla%(n%)OF
 6980    WHEN1:PROCnosave:PROCdefaultsavelist
 6990    WHEN2:PROCnosave
 7000    WHEN3:IFLEFT$(a$,1)="+"THENn$=FNgetpar(a$," "):ELSEPROCnosave
 7010      PROClog("Filter redirection to "+a$)
 7020      ok%=0:WHILEoutg%(ok%)>0ANDok%<maxsave%:ok%+=1:ENDWHILE
 7030      WHILEa$>""
 7040        last%=ok%:n$=FNgetpar(a$," ")
 7050        ok%=FNaddtosavelist(FNclean(n$),ok%)
 7060        IFok%=last%ANDn$>""THENPROClog("Invalid redirection to "+n$)
 7070      ENDWHILE
 7080    WHEN4:PROCsubmit(a$)
 7090  ENDCASE
 7100ENDIF
 7110=ok%
 7120
 7130DEFFNfsubst(a$)
 7140LOCALb$,l%
 7150l%=INSTR(a$,"%")
 7160WHILEl%>0:b$=""
 7170CASEMID$(a$,l%+1,1)OF
 7180  WHEN"u":IFtype%=1THENb$="news"ELSEb$=FNgtou(grp$(outg%(0)))
 7190  WHEN"f":b$=from$
 7200  WHEN"t":b$=to$
 7210  WHEN"c":b$=cc$
 7220  WHEN"r":b$=replyto$
 7230  WHEN"%":b$="%"
 7240ENDCASE
 7250a$=LEFT$(a$,l%-1)+b$+MID$(a$,l%+2):l%+=LENb$-1
 7260l%=INSTR(a$,"%",l%)
 7270ENDWHILE
 7280=a$
 7290
 7300DEFPROCnosave
 7310LOCALn%,g%:n%=0:REPEATg%=outg%(n%):IFg%>0THENoutg%(n%)=0:IFgrpseq%(g%)>0THENgrpseq%(g%)-=1
 7320n%+=1:UNTILg%=0ORn%>maxsave%
 7330ENDPROC
 7340
 7350DEFPROCsubmit(a$)
 7360LOCALf$,b$,F%,m%,d%:f$=FNtmpfile
 7370SYS"XOS_File",10,f$,&FFF,,artbase%,artbase%+ptr%TO;F%
 7380IF(F%AND1)=0THEN
 7390  WHILELEFT$(FNclean(a$),1)="-"
 7400  b$=FNgetpar(a$," ")
 7410  CASELEFT$(b$,2)OF
 7420    WHEN"-M":m%=1024*VALMID$(b$,3)
 7430    WHEN"-K":PROCnosave
 7440    WHEN"-D":d%=TRUE
 7450    WHEN"-J":PROCnosave:PROCdefaultsavelist
 7460  ENDCASE
 7470  ENDWHILE
 7480  IFFNfreemem(0)<m%THENPROCmessage0("Fmem1",1)
 7490  IFFNfreemem(0)>=m%THEN
 7500  PROClog("Submitting filter job: "+a$):PROChgon
 7510  SYS"XWimp_StartTask",a$+" "+f$:PROChgoff:IFd%THENPROCpoll(0):F%=FNdelfile(f$)
 7520  ELSE
 7530  PROCmessage0("Fmem2",0)
 7540  ENDIF
 7550ENDIF
 7560ENDPROC
 7570
 7580DEFFNcheckforward(g$,u$)
 7590LOCALu%,f$,F%,fto$,ret%
 7600u%=FNuserno(u$):IFu%>0THEN
 7610  f$=FNupath(u$)+".vacation"
 7620  IFFNobjtype(f$)=1THEN
 7630    IFprecedence$<>"bulk"ANDprecedence$<>"junk"ANDfrom$>""THEN
 7640      IFFNfilesize(f$)>0THENPROCvacation(u$,f$)
 7650    ENDIF
 7660  ENDIF
 7670  IFuserf$(u%)>""THEN
 7680    fto$=userf$(u%):WHILELEFT$(fto$,1)="+":fto$=MID$(fto$,2):ENDWHILE
 7690    PROClog("Forwarding mail for "+u$+" to "+fto$)
 7700    f$=FNtmpfile:SYS"XOS_File",10,f$,&FFF,,artbase%,artbase%+ptr% TOerr%;F%
 7710    IF(F%AND1)=0THEN
 7720      f$=FNremail(fto$,f$,u$)
 7730      IFf$=""ANDLEFT$(userf$(u%),1)<>"+"THENret%=1
 7740    ENDIF
 7750  ENDIF
 7760ENDIF
 7770IFret%=0ANDINSTR(arrmail$,u$)=0THENarrmail$+=","+u$
 7780=ret%
 7790
 7800DEFFNgtou(g$)
 7810LOCALu$,u%:u$=g$
 7820IFLEFT$(FNlower(g$),6)="email."THEN
 7830  u$=MID$(g$,7):u%=INSTR(u$,"."):IFu%>0THENu$=LEFT$(u$,u%-1)
 7840ENDIF
 7850=u$
 7860
 7870DEFPROCvacation(u$,f2$)
 7880LOCALf$,d$,s$,F%
 7890f$=FNtmpfile:d$=from$:IFreplyto$>""THENd$=replyto$
 7900s$=subject$:IFLEFT$(FNlower(subject$),4)<>"re: "THENs$="Re: "+s$
 7910f1%=FNopenout(f$)
 7920IFf1%>0ANDd$>""THEN
 7930  f2%=FNopenin(f2$)
 7940  IFf2%>0THEN
 7950    BPUT#f1%,"To: "+d$
 7960    BPUT#f1%,"From: "+u$+"@"+mailname$
 7970    BPUT#f1%,"Subject: "+s$
 7980    PROCautoheaders(f1%):PROCfcopy(f2%,f1%)
 7990    PROCcf(f1%):PROCcf(f2%):PROCsettype(f$,&FFF)
 8000    a$=FNsendmail(f$,u$)
 8010    ELSE
 8020    PROCcf(f1%)
 8030  ENDIF
 8040ENDIF
 8050F%=FNdelfile(f$)
 8060ENDPROC
 8070
 8080DEFPROCreturnreceipt(d$)
 8090LOCALf$,a$,s$,F%
 8100IFdoreceipt%<>0ANDprecedence$<>"bulk"ANDprecedence$<>"junk"THEN
 8110  f$=FNtmpfile
 8120  s$=subject$:IFLEFT$(FNlower(s$),4)<>"re: "ANDs$>""THENs$="Re: "+s$
 8130  f1%=FNopenout(f$)
 8140  IFf1%>0THEN
 8150    BPUT#f1%,"To: "+d$
 8160    BPUT#f1%,"From: mailer-daemon@"+mailname$
 8170    BPUT#f1%,"Subject: Acknowledgement of receipt "+s$
 8180    PROCautoheaders(f1%)
 8190    BPUT#f1%,"Your message "+messid$
 8200    IFsubject$>""THENBPUT#f1%,"concerning "+subject$
 8210    BPUT#f1%,"to "+to$
 8220    BPUT#f1%,"was received at "+hostname$
 8230    PROCcf(f1%):PROCsettype(f$,&FFF)
 8240    a$=FNsendmail(f$,"mailer-daemon"):F%=FNdelfile(f$)
 8250  ENDIF
 8260ENDIF
 8270ENDPROC
 8280
 8290DEFPROCautoheaders(out%)
 8300BPUT#out%,"Message-ID: <"+FNid_date+"@"+hostname$+">"
 8310BPUT#out%,"Date: "+FNrfc_date
 8320BPUT#out%,"Precedence: bulk"
 8330BPUT#out%,"X-Mailer: RISC OS Newsbase "+ver$
 8340BPUT#out%,""
 8350ENDPROC
 8360
 8370DEFPROCartsave(g%,s%)
 8380LOCALg$,s$,outd$,outf$
 8390IFsupersede$>""ANDapproved$>""PROCdeleteid(g%,supersede$)
 8400IFcontrol$>""ANDapproved$>""PROCdocontrol(g%,control$)
 8410g$=grp$(g%):s$=FNseqstr(s%):outf$=FNarticleop(g%,s$,0,"",0)
 8420IFoutf$>""THEN
 8430  PROCnbupdate(2,g$,s%,from$,subject$):PROCaddtoindex(g%,s%)
 8440  IFexpires%>0ANDigexp%=0THENPROCsetfileexp(outf$,expires%)
 8450  PROCprint("",g$+"."+s$,"",""):PROCpoll(slice%)
 8460  IFtotal%MOD30=0ANDfast%=0THENPROCwrite_recfile
 8470  ELSE
 8480  PROCmessage(FNmsg2("Dsavefail",STR$s%,g$),1)
 8490  PROClog("Debatch save failure: "+g$+" #"+STR$s%)
 8500ENDIF
 8510ENDPROC
 8520
 8530DEFPROCwrite_recfile
 8540IFrecpos%=0ORFNdiskspace(basedir$)<200THENENDPROC
 8550f0%=FNopenout(basedir$+".recover")
 8560IFf0%>0THEN
 8570  BPUT#f0%,bf$
 8580  BPUT#f0%,STR$len%
 8590  BPUT#f0%,STR$recpos%
 8600  PROCcf(f0%):PROCsettype(basedir$+".recover",&FFF)
 8610  PROCwritegrpdata
 8620ENDIF
 8630ENDPROC
 8640
 8650DEFPROCdel_recfile
 8660LOCALF%:F%=FNdelfile(basedir$+".recover")
 8670ENDPROC
 8680
 8690DEFFNcheck_recfile(RETURN p%)
 8700LOCALf$,f2$,l%,m$
 8710f0%=FNopenin(basedir$+".recover")
 8720IFf0%>0THEN
 8730  f$=GET$#f0%
 8740  l%=VALGET$#f0%
 8750  p%=VALGET$#f0%
 8760  PROCcf(f0%)
 8770  f2$=workdir$+"."+f$
 8780  IFFNobjtype(f2$)=1ANDFNfilesize(f2$)=l%ANDp%<l%THEN
 8790    m$=FNmsg2("Drecover",f$,STR$p%)
 8800    PROCmessage(m$,0):PROCpoll(0):PROClog(m$)
 8810    l%=FNdelfile(basedir$+".recover"):PROCpoll(100):PROCmessage("",0)
 8820    ELSE
 8830    f2$="":p%=0
 8840  ENDIF
 8850ENDIF
 8860=f2$
 8870
 8880DEFPROCsetfileexp(f$,d%)
 8890LOCALF%,e%,l%
 8900SYS"XOS_File",2,f$,&FFFFFFFF TO;F%
 8910SYS"XOS_File",3,f$,,d% TO;F%
 8920IF(F%AND1)THEN
 8930  SYS"XOS_File",9,f$
 8940  ELSE
 8950  SYS"XOS_File",17,f$TO,,l%,e%;F%
 8960  IF(F%AND1)=0THENIFl%<>&FFFFFFFF ORe%<>d% THENSYS"XOS_File",9,f$
 8970ENDIF
 8980ENDPROC
 8990
 9000DEFFNartcopy(g%,s%,source$)
 9010LOCALdest$
 9020IFg%>0THEN
 9030  dest$=FNarticleop(g%,FNseqstr(s%),1,source$,0)
 9040  IFdest$>""THEN
 9050    PROCnbupdate(2,grp$(g%),s%,from$,subject$)
 9060    PROCaddtoindex(g%,s%)
 9070  ENDIF
 9080ENDIF
 9090=(dest$>"")
 9100
 9110DEFFNarticleop(g%,dest$,mode%,source$,pack%)
 9120REM save or move a file to a group.
 9130REM mode% = 0 to save from mem, 1 to copy, 2 to rename
 9140REM source$ = file to copy/rename
 9150REM returns resulting filename or null for fail
 9160LOCALp$,outd$,outf$,oldd$,a$,F%,try%,dfail%,err%
 9170try%=0:dfail%=0:p$=FNpath(grp$(g%))
 9180IFg%>0ANDp$>""THEN
 9190  oldd$=p$+".~x":a$="~x":IFpack%=0THENa$=FNartdir(VALdest$)
 9200  outd$=oldd$+"."+a$:outf$=outd$+"."+dest$
 9210  REPEAT
 9220    F%=0
 9230    CASEmode%OF
 9240      WHEN0:SYS"XOS_File",10,outf$,&FFF,,artbase%,artbase%+ptr%TOerr%;F%
 9250      WHEN1:SYS"XOS_FSControl",26,source$,outf$TOerr%;F%
 9260      WHEN2:IFsource$<>outf$THENSYS"XOS_FSControl",25,source$,outf$TOerr%;F%
 9270    ENDCASE
 9280    IF(F%AND1)THEN
 9290      err%=(!err%AND&FF)
 9300      CASEerr%OF
 9310        WHEN&B3:PROCcheckdisk:PROCfulldir(outd$)
 9320        WHEN&D6:IFdfail%=0THEN
 9330          dfail%=1
 9340          IFFNensurenewstruct(oldd$)=0THENF%=FNensuredir(outd$):ELSEoutd$=oldd$
 9350          ELSE
 9360          outd$=oldd$
 9370          ENDIF
 9380        OTHERWISE:PROCcheckdisk
 9390      ENDCASE
 9400      try%+=1
 9410      ELSE
 9420      err%=0
 9430    ENDIF
 9440  UNTILtry%>3 ORerr%=0
 9450ENDIF
 9460IFerr%>0THENoutf$=""
 9470=outf$
 9480
 9490DEFFNensurenewstruct(d$)
 9500LOCALr3%,F%:SYS"XOS_GBPB",11,d$,tmp%,1,0,250,"*"TO,,,r3%;F%
 9510IF(F%AND1)=0ANDr3%>0THENt%=tmp%!16:IFt%=1THENF%=FNinsertdir(d$)
 9520=0
 9530
 9540DEFFNartdir(n%)
 9550="~x"+STR$(((n%)DIV75)MOD75)
 9560
 9570DEFPROCfulldir(p$)
 9580IFLEFT$(FNleaf(p$),2)="~x"THENF%=FNinsertdir(p$)ELSEPROCmessage1("Fulldir",p$,1)
 9590ENDPROC
 9600
 9610DEFFNinsertdir(p$)
 9620LOCALex%,l$:l$=FNleaf(p$)
 9630ex%=FNrename(p$,workdir$+"."+l$)
 9640PROCensuredir(p$)
 9650IFex%=0THENex%=FNrename(workdir$+"."+l$,p$+"."+l$)
 9660=(ex%AND1)
 9670
 9680DEFFNseq(g%)
 9690IFgrpseq%(g%)<>0 THEN
 9700  grpseq%(g%)=ABS(grpseq%(g%))+1
 9710  ELSE
 9720  grpseq%(g%)=FNfindhighest(FNpath(grp$(g%)),0)
 9730  IFgrpseq%(g%)=0THENgrpseq%(g%)=1
 9740ENDIF
 9750=ABSgrpseq%(g%)
 9760
 9770DEFFNseqstr(s%)
 9780=RIGHT$("00000000"+STR$(ABSs%),8)
 9790
 9800DEFFNensuredir(path$)
 9810LOCALp$,l%,lp$,F%,t%,ok%
 9820t%=FNobjtype(path$):ok%=t%
 9830IFt%<2 THEN
 9840  path$=FNcanon(path$):l%=INSTR(path$,"$"):ok%=1
 9850  REPEAT
 9860    l%=INSTR(path$+".",".",l%+1)
 9870    p$=LEFT$(path$,l%-1):t%=FNobjtype(p$)
 9880    CASEt%OF
 9890      WHEN0:PROCprint("",FNmsg1("Dmakepath",p$),"","")
 9900        SYS"XOS_File",8,p$TOerr%;F%:IF(F%AND1)THENok%=0
 9910      WHEN1:ok%=0
 9920      OTHERWISE:lp$=p$
 9930    ENDCASE
 9940    IFok%=0:PROCmessage1("Dpathfail",p$,1)
 9950  UNTILl%>=LENpath$ORok%=0
 9960ENDIF
 9970=ok%
 9980
 9990DEFFNnametono(g$,add%)
10000LOCALlow%,high%,mid%,found%,g1$,no%
10010g1$=FNlower(g$)
10020IFg1$=lgrp$THEN
10030  no%=lgrp%
10040  ELSE
10050  IFg$>""ANDINSTR(g$,"*")<1THEN
10060    low%=1:high%=groups%:found%=0
10070    WHILElow%<=high%
10080    mid%=(low%+high%)DIV2:tg$=FNlower(grp$(mid%))
10090    IFg1$<tg$THEN
10100      high%=mid%-1
10110      ELSE
10120      IFg1$>tg$THENlow%=mid%+1ELSEfound%=mid%:low%=high%+1
10130    ENDIF
10140    ENDWHILE
10150    IFfound%>0THEN
10160      lgrp$=g1$:lgrp%=found%:no%=found%
10170      ELSE
10180      IFadd%THEN
10190        found%=0:IFFNactive(g$)ANDFNisachef(g$)=0THENfound%=FNaddnewgroup(g$)
10200        IFfound%>0THENlgrp$=g1$:lgrp%=found%:no%=found%
10210      ENDIF
10220    ENDIF
10230  ENDIF
10240ENDIF
10250=no%
10260
10270DEFFNnotopath(g%)
10280=FNpath(grp$(g%))
10290
10300DEFFNcheckcase(g$)
10310LOCALg1$:g1$=FNlower(g$)
10320IFLEFT$(g1$,6)="email."THEN:="Email."+MID$(g$,7)
10330IFLEFT$(g1$,7)="folder."THEN:="Folder."+MID$(g$,8)
10340=g1$
10350
10360DEFFNaddnewgroup(g$)
10370LOCALp$,no%:g$=FNcheckcase(g$)
10380p$=FNpath(g$):no%=0
10390IFp$>""ANDgroups%<maxgroup%THEN
10400  PROCwriteindexbuf:PROCadddelbuf(0,0)
10410  IFFNensuredir(p$)<>0THEN
10420    PROCnbupdate(0,g$,0,"",""):PROCprint("",FNmsg1("Gcreate",g$),"","")
10430    no%=FNaddgrptolist(g$,TRUE):IFno%>0THEN
10440    PROClog(FNmsg1("Lcrgrp",g$))
10450    SYS"XOS_File",11,p$+".~index",&FFD,0,0
10460    SYS"XOS_File",8,p$+".~x",0
10470    ENDIF
10480  ENDIF
10490ENDIF
10500=no%
10510
10520DEFFNaddgrptolist(g$,cmod%)
10530LOCALl%,l1%,w%,g1$,low%,high%,mid%:g$=FNcheckcase(g$):g1$=FNlower(g$)
10540IFg1$<FNlower(grp$(groups%))THEN
10550l%=1:WHILEg1$>FNlower(grp$(l%))ANDl%<=groups%:l%+=1:ENDWHILE
10560ELSE
10570l%=groups%+1
10580ENDIF
10590IFl%<maxgroup%THEN
10600  FORw%=groups%TOl%STEP-1
10610  grp$(w%+1)=grp$(w%):grpf%(w%+1)=grpf%(w%):grpseq%(w%+1)=grpseq%(w%)
10620  grpexp%(w%+1)=grpexp%(w%)
10630  grpmod%(w%+1)=grpmod%(w%)
10640  NEXTw%
10650  grp$(l%)=g$:grpf%(l%)=-1:grpseq%(l%)=0
10660  grpexp%(l%)=0:grpmod%(l%)=0
10670  IFcmod%<>0THEN
10680    IFFNspecialgrp(g$)=0THENgrpmod%(l%)=FNisgrpmod(g$)
10690    IFFNspecialgrp(g$)>1THENgrpexp%(l%)=1E6
10700  ENDIF
10710  groups%+=1
10720  REM now fix up the save list, to allow for group insertions...
10730  FORl1%=0TOmaxsave%
10740    IFoutg%(l1%)>l%THENoutg%(l1%)+=1
10750  NEXTl1%
10760  ELSE
10770  l%=0:PROCtoomanyg
10780ENDIF
10790=l%
10800
10810DEFPROCtoomanyg
10820PROCmessage0("Gfull",1)
10830ENDPROC
10840
10850DEFPROCrmgrplist(g$)
10860LOCALl%,w%:WHILEgrp$(l%)<>g$ANDl%<=groups%:l%+=1:ENDWHILE
10870IFgrp$(l%)=g$THEN
10880  PROCwriteindexbuf:PROCadddelbuf(0,0)
10890  FORw%=l%+1TOgroups%
10900    grp$(w%-1)=grp$(w%):grpf%(w%-1)=grpf%(w%)
10910    grpseq%(w%-1)=grpseq%(w%):grpmod%(w%-1)=grpmod%(w%):
10920    grpexp%(w%-1)=grpexp%(w%)
10930  NEXTw%
10940  grp$(groups%)="":groups%-=1:lgrp$="BLANK"
10950ENDIF
10960ENDPROC
10970
10980DEFFNobjtype(f$)
10990LOCALF%,t%
11000SYS"XOS_File",17,f$TOt%;F%
11010IF(F%AND1)THEN=-1
11020=t%
11030
11040DEFFNfiletype(f$)
11050LOCALF%
11060SYS"XOS_File",23,f$TO,,,,,,t%;F%
11070IF(F%AND1)THEN=-1
11080=t%
11090
11100DEFPROCexpiregroup(ng%,pto%,exp%)
11110REM pto% is a modifier to expiry time.
11120LOCALgdir%,n$,cnt%,prot%:prot%=0
11130pt%=grpexp%(ng%):IFpt%=0THENpt%=defexp%
11140IFpt%>1E4THENprot%=TRUE
11150IFgrp$(ng%)>""THEN
11160  pt%+=pto%:IFpt%<0THENpt%=0
11170  gdir$=FNpath(grp$(ng%))
11180  IFexpmail%=0ANDFNspecialgrp(grp$(ng%))>1THENprot%=TRUE
11190  IFexp%<>0THENcnt%=FNexpiredir(gdir$,ng%,pt%,FALSE,prot%):PROCstamp(gdir$)
11200  PROCnbupdate(12,grp$(ng%),0,"","")
11210ENDIF
11220ENDPROC
11230
11240DEFFNexpiredir(p$,g%,pt%,force%,protect%)
11250LOCALcnt%:cnt%=0
11260IFprotect%THEN
11270PROCprint(FNmsg1("Gcomp",grp$(g%))," "," "," ")
11280ELSE
11290PROCprint(FNmsg1("Gexp",grp$(g%)),FNmsg1("Glast",""),FNmsg1("Gtime",STR$pt%)," ")
11300ENDIF
11310IFFNobjtype(p$)>1THEN
11320  cnt%=FNdelfile(p$+".~seq"):cnt%=FNensurenewstruct(p$+".~x")
11330  cancel%=FALSE:cnt%=FNexpiresubdir(p$,g%,pt%,force%,protect%)
11340  PROCadddelbuf(0,0):PROCprint(FNmsg0("Done")," "," "," ")
11350ENDIF
11360PROCgact("")
11370=cnt%
11380
11390DEFFNexpiresubdir(p$,expg%,pt%,force%,protect%)
11400LOCALdirptr%,f%,f$,now%,t$,t%,r3%,nread%,v%,attr%,ft%,cnt%,move$,testtime%
11410LOCALdeltest%,dirbuf%,dbr%,addr%,floop%,trymove%,canmove%,mustmove%,date%
11420LOCALg$,pack%,flen%,nfiles%
11430g$=grp$(expg%)
11440IFforce%THEN
11450  PROCgact(FNmsg1("Gdel",g$))
11460  ELSE
11470  IFprotect%THENPROCgact(FNmsg1("Gcomp",g$))ELSEPROCgact(FNmsg1("Gexp",g$))
11480ENDIF
11490mustmove%=(RIGHT$(p$,6)=".~x.~x")
11500f$=FNleaf(p$):canmove%=(RIGHT$(FNdir(p$),LENf$)=f$)
11510nfiles%=0:dirptr%=0
11520now%=FNday(FNtime):testtime%=pt%:dbr%=FNclaim(dirbuf%,dbsize%,"expire")
11530REPEAT
11540addr%=dirbuf%
11550SYS"XOS_GBPB",11,p$,dirbuf%,20,dirptr%,dbsize%,"*"TO,,,r3%,dirptr%;F%:nread%=dirptr%
11560IFr3%>0AND(F%AND1)=0THEN
11570  nfiles%+=r3%:REM number of files in directory
11580  FORfloop%=1TOr3%
11590  t%=addr%!16:attr%=addr%!12:f$=FNstr(addr%+29):date%=addr%+24:flen%=addr%!8
11600  v%=VALf$:deltest%=0:trymove%=mustmove%:pack%=((attr%AND8)AND(mustmove%=FALSE))
11610  CASEt%OF
11620    WHEN1:
11630      IFv%>0THEN
11640        IF(addr%?28)<>&FF ORforce%<>0THEN
11650          REM standard article
11660          SYS"Territory_ConvertDateAndTime",1,date%,tmp%,128,"%CE%YR%MN%DY"TOb%
11670          ft%=VALFNstr(b%)
11680          IFFNday(ft%)<=now%-testtime%THENdeltest%=TRUE
11690          ELSE
11700          REM has expiry time
11710          ft%=(addr%!24)
11720          IFft%<=FNtime THEN
11730            deltest%=TRUE
11740            ELSE
11750            REM pack all non-clarinet articles with expiry headers
11760            IFtesttime%=0THENtrymove%=TRUE
11770            IFFNsmatch("clari*",g$)=0ANDmustmove%=0ANDnfiles%<6THENpack%=TRUE
11780          ENDIF
11790        ENDIF
11800        IFprotect%=0AND(deltest%ORforce%)THEN
11810          IFforce%THENPROCsetattr(p$+"."+f$,"R")
11820          IFFNdelfile(p$+"."+f$)=0 THEN
11830            dirptr%-=1:cnt%+=1:PROCartdeleted(expg%,VALf$):trymove%=0
11840            ELSE
11850            IFFNobjtype(p$+"."+f$)=0THEN
11860              PROCartdeleted(expg%,VALf$):trymove%=0
11870              ELSE
11880              trymove%=canmove%
11890            ENDIF
11900          ENDIF
11910          ELSE
11920          IFcompress%THENPROCcompress(p$+"."+f$,flen%)
11930        ENDIF
11940        REM don't pack files if >5 files in the directory...
11950        REM ... just want to avoid scattered almost-single articles.
11960        IFnfiles%>6THENpack%=0
11970        IFtrymove%ORpack%THEN
11980          PROCsetattr(p$+"."+f$,"R")
11990          move$=FNarticleop(expg%,f$,2,p$+"."+f$,pack%)
12000          SYS"XOS_File",4,move$,,,,attr%:SYS"XOS_File",4,p$+"."+f$,,,,attr%
12010          IFmove$>""THENdirptr%-=1
12020        ENDIF
12030      ENDIF
12040    WHEN2,3:IFLEFT$(f$,2)="~x"THENcnt%=cnt%+FNexpiresubdir(p$+"."+f$,expg%,pt%,force%,protect%)
12050      F%=FNdelfile(p$+"."+f$)
12060  ENDCASE
12070  IFcancel%THENfloop%=r3%
12080  PROCpoll(slice%*2):addr%=addr%+(33+LENf$)ANDNOT3
12090  NEXTfloop%
12100ENDIF
12110UNTILnread%=-1ORcancel%
12120PROCrelease(dbr%)
12130=cnt%
12140
12150DEFPROCsetattr(f$,a$)
12160SYS"XOS_FSControl",24,f$,a$
12170ENDPROC
12180
12190DEFPROCartdeleted(g%,n%)
12200PROCadddelbuf(g%,n%):PROCnbupdate(3,grp$(g%),n%,"","")
12210PROCprint("","","",FNmsg1("Adel",STR$n%))
12220ENDPROC
12230
12240DEFPROCexpmiscdir(p$,etime%)
12250LOCALn%,f$,now%,t%,t$,r3%,nread%,a%,d%,ft%,dirbuf%,dbr%,floop%,addr%
12260n%=0:now%=FNday(FNtime):dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
12270REPEAT
12280addr%=dirbuf%
12290SYS"XOS_GBPB",11,p$,dirbuf%,20,n%,dbsize%,"*"TO,,,r3%,n%;F%:nread%=n%
12300IFr3%>0AND(F%AND1)=0THEN
12310  FORfloop%=1TOr3%
12320  t%=addr%!16:a%=addr%!12:f$=FNstr(addr%+29)
12330  CASEt%OF
12340    WHEN1:
12350    IF(a%AND8)=0THEN
12360      SYS"Territory_ConvertDateAndTime",1,addr%+24,tmp%,128,"%CE%YR%MN%DY"TOb%
12370      ft%=VALFNstr(b%):IFFNday(ft%)<=now%-etime%THENIFFNdelfile(p$+"."+f$)=0n%=n%-1
12380    ENDIF
12390    WHEN2,3:PROCexpmiscdir(p$+"."+f$,etime%):F%=FNdelfile(p$+"."+f$)
12400  ENDCASE
12410  PROCpoll(slice%*2):addr%=addr%+(33+LENf$)ANDNOT3
12420  NEXTfloop%
12430ENDIF
12440UNTILnread%=-1
12450PROCrelease(dbr%)
12460ENDPROC
12470
12480DEFFNtime
12490LOCALb%
12500?tmp%=3:SYS"OS_Word",14,tmp%
12510SYS"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY"TOb%
12520=VALFNstr(b%)
12530
12540DEFFNfulltime
12550LOCALb%
12560?tmp%=3:SYS"OS_Word",14,tmp%
12570SYS"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY%24%MI"TOb%
12580=FNstr(b%)
12590
12600DEFFNfiletime(f$)
12610LOCALl%,e%,o%,r%
12620SYS"XOS_File",23,f$TOo%,,l%,e%
12630IFo%>0THEN
12640  !tmp%=e%:tmp%!4=l%
12650  SYS"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY"TOb%
12660  r%=VALFNstr(b%)
12670ENDIF
12680=r%
12690
12700DEFFNday(t%)
12710REM convert date to no.of days since start of century.
12720LOCALday%,month%,year%,m%,d%
12730day%=t%MOD100
12740month%=(t%DIV100)MOD100
12750year%=(t%DIV10000)
12760d%=365*year%+day%
12770CASEmonth%OF
12780WHEN1:m%=0
12790WHEN2:m%=31
12800WHEN3:m%=59
12810WHEN4:m%=90
12820WHEN5:m%=120
12830WHEN6:m%=151
12840WHEN7:m%=180
12850WHEN8:m%=211
12860WHEN9:m%=242
12870WHEN10:m%=272
12880WHEN11:m%=303
12890WHEN12:m%=333
12900ENDCASE
12910=d%+m%
12920
12930DEFPROClog(A$)
12940LOCALl%
12950IFrw%THEN
12960  IFA$>""ANDlogptr%<20THEN
12970    log$(logptr%)=FNctime("# %YR%MN%DY %24%MI%SE ")+A$:logptr%+=1
12980    ELSE
12990    IFlogptr%>0THEN
13000      f1%=FNopenup(basedir$+".log")
13010      IFf1%<>0THEN
13020        PTR#f1%=EXT#f1%
13030        FORl%=0TOlogptr%
13040          IFlog$(l%)>""THENBPUT#f1%,log$(l%)
13050        NEXT
13060        log$()="":logptr%=0:PROCcf(f1%):PROCsettype(basedir$+".log",&FFF)
13070      ENDIF
13080    ENDIF
13090  ENDIF
13100ENDIF
13110ENDPROC
13120
13130DEFPROCsettype(f$,t%)
13140SYS"XOS_File",18,f$,t%
13150ENDPROC
13160
13170DEFPROCstamp(f$)
13180SYS"XOS_File",9,f$
13190ENDPROC
13200
13210DEFFNduptask
13220LOCALfound%,r0%,b%,a$:r0%=0
13230REPEAT
13240tmp%!4=0:SYS"TaskManager_EnumerateTasks",r0%,tmp%,20TOr0%
13250IFr0%>=0ANDtmp%!4>0THEN
13260  b%=tmp%!4:a$="":WHILE?b%>31ANDLENa$<255:a$+=CHR$?b%:b%+=1:ENDWHILE
13270  IFLEFT$(a$,8)=myname$THENfound%=1
13280ENDIF
13290UNTILr0%<0ORfound%<>0
13300=found%
13310
13320DEFPROCinit
13330myname$="Newsbase"
13340SYS"OS_Byte",129,0,&FF TO,osver%:dynarea%=(osver%>&A4)
13350PROCenvironment
13360msgdesc%=0:defic$="":credit$="":transport%=0
13370groups%=0:initgroups%=0:dragref%=0:autodebatch%=0
13380thisartlen%=0:nextartpos%=0:logfile%=0
13390postfetchready%=0:startupok%=0:indebatch%=0:blockexpire%=TRUE
13400null$=STRING$(200," ")
13410maxactive%=0:cancel%=0:nclient%=0:sleep%=0:forcebatch%=0
13420inbufsize%=16*1024:defartbuf%=8192:dbsize%=512
13430DIM tmp% 256
13440ibufsize%=8000:delbufsize%=2048
13450DIM ibuf% ibufsize%
13460DIM delbuf% delbufsize%
13470maxsave%=10:maxactive%=100
13480DIM outp$(maxsave%),outs%(maxsave%),outg%(maxsave%)
13490DIM log$(20),outdir$(1)
13500delbufptr%=0:delbufg%=0:logptr%=0
13510ibufptr%=0:ibufg%=0
13520type%=0:line$="":bf$=""
13530len%=0:pos%=0:bstart%=0:recpos%=0:bf$=""
13540total%=0:pause%=FALSE:checkfiles%=1
13550T%=0::T1%=0:T2%=-1:open%=FALSE
13560f00%=0:f0%=0:f1%=0:f2%=0:f3%=0:f4%=0:f5%=0:f6%=0
13570lgrp%=0:lgrp$="BLANK"
13580nopoll%=0:ngtime%=0:nglast%=0
13590findg%=0:findp$="":long%=0
13600busy$="":sep$="":seplen%=0
13610slice%=-15
13620nbcom%=&FEED10
13630nbrep%=&FEED11
13640nbupd%=&FEED12
13650srflag%=0
13660arrart%=0:arrmail$="":grpq%=0:ynchoice%=0
13670artdate%=0:modgw$="moderators.uu.net"
13680REM now all config file variables...
13690logfile%=1:keepoutg%=1:fast%=1:alert%=1:alertbeep%=0:userctrl%=0
13700alertnews%=1:defclient$="":autoexp%=1:defexp%=7:delok%=0
13710listtype%=0:remotehost$="":expmail%=0:autodebatch%=1:igexp%=0
13720keepb%=1:docanc%=1:killc%=1:doreceipt%=1:cver%=0:ngexp%=7:thread%=1
13730modgw$="":mngw$="":mngw%=0:userlist$="":initconf%=0
13740compress%=0:complimit%=2048:exptime%=0:expany%=0:mindsk%=1024
13750hostname$="":org$="":mailname$="":timezone$=""
13760ENDPROC
13770
13780DEFPROCenvironment
13790LOCALp$,A$
13800rw%=TRUE:REM read-write access
13810SYS"OS_GetEnv"TOA$
13820REPEAT
13830  p$=FNgetpar(A$," ")
13840  CASEp$OF
13850    WHEN"-ro":rw%=FALSE:REM read-only access to !NewsDir
13860  ENDCASE
13870UNTILA$=""
13880ENDPROC
13890
13900DEFPROCstartmemmgr
13910base%=HIMEM
13920SYS "Wimp_SlotSize",-1,-1 TO min_mem%
13930ENDPROC
13940
13950DEFFNcheckslot
13960LOCALm%,f%,minfre%
13970minfre%=&4000
13980REM if more than 2Mbytes free, insist on 32k space in wimpslot (otherwise 16k)
13990SYS"Wimp_SlotSize",-1,-1TO,,f%:IFf%>&200000 THENminfre%=&8000
14000IF(HIMEM-END)<minfre% THEN
14010  m%=minfre%:REPEATSYS"Wimp_SlotSize",-1,-1TO,,f%
14020    IFf%<m% PROCmessage0("Needmem1",1)
14030  UNTILf%>=m%
14040  ELSE
14050  m%=0
14060ENDIF
14070=m%
14080
14090DEFPROCstartwimp
14100DIM taskid%4,wmsgs%30:$taskid%="TASK"
14110!wmsgs%=3:wmsgs%!4=&400C2:wmsgs%!8=&400C3:wmsgs%!12=nbcom%
14120wmsgs%!16=2:wmsgs%!20=&400C9:wmsgs%!24=&502:wmsgs%!28=0
14130SYS "Wimp_Initialise",310,!taskid%,myname$,wmsgs% TO version%,task%
14140ONERRORPROCerrorbox(FALSE)
14150SYS"Territory_Exists",1TO;F%:IF(F%AND4)=0THENERROR0,"UK Territory module not present!"
14160DIMq% &200,ibar% &100
14170menudata%=0:indmenubuf%=0:menudataref%=0:indmenuref%=0
14180SYS"OS_ReadModeVariable",-1,5TO,,A%
14190IFA%<2THENPROCmergesprites("sprites22")ELSEPROCmergesprites("sprites")
14200SYS"Wimp_OpenTemplate",,FNresfile("Templates")
14210status%=FNloadtemp("status")
14220msgw%=FNloadtemp("message")
14230gsetup%=FNloadtemp("gensetup")
14240gwin%=FNloadtemp("groups")
14250yesno%=FNloadtemp("confirm")
14260info%=FNloadtemp("info")
14270arrive%=FNloadtemp("arrive")
14280uwin%=FNloadtemp("users")
14290sitewin%=FNloadtemp("site")
14300fwin%=FNloadtemp("filters")
14310savend%=FNloadtemp("newsdir")
14320msetup%=FNloadtemp("setup")
14330trwin%=FNloadtemp("transports")
14340ngwin%=FNloadtemp("newgroups")
14350SYS"Wimp_CloseTemplate"
14360PROCsettime
14370lastpoll%=0:lastupd%=0:stime%=time%
14380cron0%=0:cron1%=0:cron2%=0:cron3%=0:cron4%=0
14390confopen%=0:statopen%=0:msgopen%=0:ndopen%=0:ngopen%=0:arropen%=0:infoopen%=0
14400baric$="newsbase1":baricon%=FNic(baric$)
14410ver$="0.53":rev$="c":ver%=100*VALver$:groupver%=47
14420PROCupdateiconstring(info%,4,ver$+rev$+" (23-Feb-95)"):PROCcredits
14430PROCprint(FNmsg1("Sinfo1",ver$)," "," "," "):PROCgact("")
14440ENDPROC
14450
14460DEFFNloadtemp(A$)
14470LOCALb%,i%,s%,scr%,icon%,h%
14480SYS"Wimp_LoadTemplate",,-1,0,0,-1,A$,0TO,b%,i%
14490s%=FNclaim(scr%,b%,"template"):DIMicon% i%
14500SYS"Wimp_LoadTemplate",,scr%,icon%,icon%+i%,-1,A$,0
14510scr%!64=sprites%:SYS"Wimp_CreateWindow",,scr% TOh%:PROCrelease(s%)
14520=h%
14530
14540DEFPROCmergesprites(A$)
14550LOCALs%,f%,n%:A$=resdir$+"."+A$
14560IFFNobjtype(A$)=1THEN
14570s%=FNfilesize(A$)+20
14580DIMsprites% s%:!sprites%=s%:sprites%!8=0
14590SYS "OS_SpriteOp",&109,sprites%
14600SYS"XOS_SpriteOp",&108,sprites%TO,,s%,n%,,f%
14610SYS"XOS_SpriteOp",&10B+(n%=0),sprites%,A$TO;F%
14620ELSE
14630ERROR1,A$+" not found"
14640ENDIF
14650ENDPROC
14660
14670DEFFNic(A$)
14680SYS"OS_SpriteOp",&100+40,sprites%,A$TO,,,w%,h%:!ibar%=-1
14690ibar%!4=0:ibar%!8=0:ibar%!12=w%*2:ibar%!16=100:ibar%!20=&3102
14700DIMibarname%12:$ibarname%=A$:ibar%!24=ibarname%
14710ibar%!28=sprites%:ibar%!32=11
14720SYS "Wimp_CreateIcon",0,ibar%TOic%
14730=ic%
14740
14750DEFPROCchangeic(new$)
14760LOCALw%,F%
14770IFnew$<>baric$THEN
14780  SYS "XOS_SpriteOp",&118,sprites%,new$TO,,src%;F%
14790  IF(F%AND1)=0THEN
14800    $ibarname%=new$:!q%=-1:q%!4=baricon%:q%!8=0:q%!12=0
14810    SYS"Wimp_SetIconState",,q%
14820  ENDIF
14830  baric$=new$
14840ENDIF
14850ENDPROC
14860
14870DEFPROCpoll(idle%)
14880LOCALpol_ret%:REM idle%>0 is pollidle time, <0 is time between polls.
14890PROCsettime:IFnopoll%THENENDPROC
14900IFidle%>=0ORlastpoll%-time%<idle%THEN
14910  lastpoll%=time%
14920  REPEAT
14930    SYS "Wimp_PollIdle",6194,q%,time%+idle% TOpol_ret%
14940    CASE pol_ret% OF
14950    WHEN 0:IFstartupok%<>0THENPROCcron
14960    WHEN 2:PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
14970    WHEN 3:PROCclosew(!q%)
14980    WHEN 6:PROCclick(q%!8,q%!12,q%!16)
14990    WHEN 7:PROCdrag
15000    WHEN 8:PROCkeypress(!q%,q%!24)
15010    WHEN 9:PROCgetpointer:PROCmenuselect(q%)
15020    WHEN 17,18:PROCreceive(q%)
15030    ENDCASE
15040  UNTILpol_ret%=0
15050ENDIF
15060ENDPROC
15070
15080DEFPROCsettime
15090SYS"OS_ReadMonotonicTime"TOtime%
15100ENDPROC
15110
15120DEFPROCcredits
15130IFcredit$=""THENcredit$=FNmsg0("Credit")
15140PROCupdateiconstring(info%,9,LEFT$(FNgetpar(credit$,";"),28))
15150ENDPROC
15160
15170DEFPROCdrag
15180PROCgetpointer
15190!q%=52+8:q%!12=0:q%!16=1:q%!20=handle%:q%!24=icon%:q%!28=mx%:q%!32=my%
15200q%!36=0:q%!40=&1000:$(q%+44)="!NewsDir"+CHR$0
15210SYS"Wimp_SendMessage",17,q%,handle%,icon%:dragref%=q%!8
15220ENDPROC
15230
15240DEFPROCpolloff:nopoll%=TRUE:ENDPROC
15250DEFPROCpollon:nopoll%=0:ENDPROC
15260
15270DEFPROCkeypress(h%,k%)
15280LOCALc%
15290IFk%=13THEN
15300CASEh%OF
15310  WHENgsetup%,sitewin%,gwin%:c%=TRUE
15320  WHENfwin%:PROCsetfilt(cfilt%):PROCclosew(h%)
15330  WHENuwin%:PROCgetuserinfo:PROCsaveuserinfo:c%=TRUE
15340  OTHERWISE:SYS"Wimp_ProcessKey",k%
15350ENDCASE
15360IFc%THENPROCsaveconfig:PROCclosew(h%)
15370ELSE
15380SYS"Wimp_ProcessKey",k%
15390ENDIF
15400ENDPROC
15410
15420DEFFNbusyon(d$)
15430REM returns TRUE if already busy
15440IFbusy$<>""THENPROCmessage1("Busy",busy$,0):=TRUE
15450busy$=FNmsg0(d$):=FALSE
15460
15470DEFPROCbusyoff
15480busy$=""
15490ENDPROC
15500
15510DEFPROCfinish
15520PROCtidyup
15530ONERROROFF
15540IFlogfile%<>0PROClog("")
15550IFstartupok%<>0THEN
15560  IFindebatch%THENPROCwrite_recfile
15570  IFgroups%>0PROCsavegrpdata
15580  PROCsavefilters
15590ENDIF
15600PROCunlocknewsdir
15610PROCnbreply(0,0,10,0,0,"","")
15620PROCendmsgtrans
15630PROCrelease(menudataref%):PROCrelease(indmenuref%)
15640PROCtidydynareas
15650SYS"Wimp_CloseDown":END
15660ENDPROC
15670
15680DEFPROCtidyup
15690PROCcf(f00%)
15700PROCcf(f0%)
15710PROCcf(f1%)
15720PROCcf(f2%)
15730PROCcf(f3%)
15740PROCcf(f4%)
15750PROCcf(f5%)
15760PROCcf(f6%)
15770ENDPROC
15780
15790DEFPROCclick(b%,w%,i%)
15800LOCALg$,u$,s%,l%
15810CASEw% OF
15820WHEN-2:
15830  IFb%=4ANDi%=baricon%PROCfront(status%)
15840  IFb%=1ANDi%=baricon%ANDstartupok%=1ANDrw%THENPROCfront(msetup%)
15850  IFb%=2ANDi%=baricon%THEN
15860    SYS"OS_Byte",121,(2EOR&80)TO,A%:IFA%=&FF THEN
15870    g$="Debug on,Debug off"
15880    ELSE
15890    g$="|>Info,":IFrw%=0THENg$+="<"
15900    g$+="Setup...,Queues...,":IFautodebatch%<>0ORrw%=0THENg$+="<"
15910    g$+="Debatch,|":IFautoexp%<>0ORrw%=0THENg$+="<"
15920    g$+="Expire,Quit"
15930    ENDIF
15940    PROCdomenu(101,g$,myname$,1):infoopen%=TRUE
15950  ENDIF
15960WHENstatus%:
15970  IFb%=2THEN
15980  CASEpause%OF
15990    WHEN0:PROCdomenu(106,"|>Info,Pause,Cancel",myname$,0)
16000    OTHERWISE:PROCdomenu(106,"|>Info,Resume,Cancel",myname$,0)
16010  ENDCASE
16020  infoopen%=TRUE
16030  ENDIF
16040WHENuwin%:u$=FNic_str(uwin%,20)
16050  IF(b%=1ORb%=4)THEN
16060    CASEi%OF
16070      WHEN1:PROCumenu
16080      WHEN6:PROCsetuwin(u$):IFb%=4PROCclosew(uwin%)
16090      WHEN7:PROCgetuserinfo:PROCsaveuserinfo:PROCsaveconfig:IFb%=4PROCclosew(uwin%)
16100      WHEN10:s%=(FNrdinv(w%,i%)=0):PROCsetshaded(w%,3,s%):PROCsetshaded(w%,4,s%)
16110      WHEN15:PROCugmenu
16120      WHEN16,17:PROCmessage1("Hvac",u$,0)
16130      WHEN18:PROCeditvac(u$)
16140      WHEN19:PROCcancvac(u$)
16150    ENDCASE
16160  ELSE
16170  IFi%=0PROCumenu
16180  IFi%=2PROCugmenu
16190  ENDIF
16200WHENgwin%:
16210  IF(b%=1ORb%=4)THEN
16220    g$=FNic_str(gwin%,25)
16230    CASEi%OF
16240    WHEN5:IFb%=4PROCgwin(-1)ELSEPROCgwin(1)
16250    WHEN6:IFb%=4PROCgwin(1)ELSEPROCgwin(-1)
16260    WHEN7:r$=""
16270      IFFNaddgrp(g$,r$)<>0THENPROCgwin(0)ELSEPROCmessage(r$,0)
16280    WHEN8:IFFNconfirm(FNmsg1("Crem",g$))=1THEN
16290      r$=""
16300      IFFNdelgrp(g$,r$)=0THENPROCmessage(r$,0)ELSEPROCgwin(0)
16310      ENDIF
16320    WHEN17:IFFNconfirm(FNmsg1("Cdel",g$))=1PROCdelgrp(g$):PROCgwin(0)
16330    WHEN9:PROCreindex(g$)
16340    WHEN18:
16350      IFFNconfirm(FNmsg0("Cscan"))=1THENPROCfindallgroups
16360    WHEN11:PROCexpgroup(g$,0)
16370    WHEN12:IFb%=1THEN
16380      listtype%=ABS(listtype%=0)
16390      IFlisttype%=0THENg$="CList"ELSEg$="AList"
16400      PROCupdateiconstring(w%,i%,FNmsg0(g$)):PROCgwin(0)
16410      ENDIF
16420    WHEN14:PROCnummenu(0)
16430    WHEN15:PROCnummenu(1)
16440    WHEN24:PROCnummenu(2)
16450    WHEN19:PROCgrpmenu(110)
16460    WHEN26:IFngopen%=0PROCngwin
16470    WHEN16:PROCdoaltergrp(g$,ABSFNrdinv(w%,16))
16480    WHEN10:IFFNbusyon("Bmod")=0THEN
16490      PROChgon:s%=(FNcheckmoderation(g$,1)>""):PROCbusyoff:PROChgoff
16500      PROCsetinv(w%,16,s%):PROCaltergrp(g$):IFs%THENu$="Myes"ELSEu$="Mno"
16510      PROCmessage1(u$,g$,0)
16520      ENDIF
16530    WHEN29:s%=(FNrdinv(w%,i%)=0):PROCsetshaded(w%,30,s%):PROCsetshaded(w%,31,s%)
16540    FORl%=35TO41:PROCsetshaded(gwin%,l%,s%):NEXTl%:REM expiry schedule
16550    WHEN31:PROCmessage0("Cexpmail",0)
16560    WHEN32:PROCsaveconfig:IFb%=4PROCclosew(w%)
16570    WHEN37:PROCmodexp(-1,0)
16580    WHEN38:PROCmodexp(1,0)
16590    WHEN39:PROCmodexp(0,-1)
16600    WHEN40:PROCmodexp(0,1)
16610    ENDCASE
16620  ELSE
16630    CASEi%OF
16640    WHEN25:PROCgrpmenu(110)
16650    WHEN1:PROCnummenu(1)
16660    WHEN2:PROCnummenu(0)
16670    WHEN22:PROCnummenu(2)
16680    WHEN12:PROCdomenu(111,"Current list,Active list","List type",0)
16690    ENDCASE
16700  ENDIF
16710WHENmsgw%:IF(b%=1ORb%=4)ANDi%=2THENPROCclosew(msgw%)
16720WHENgsetup%:
16730  IFb%=1ORb%=4THEN
16740    CASEi%OF
16750    WHEN2:PROCmodgwmenu
16760    WHEN4:PROCsaveconfig:IFb%=4PROCclosew(w%):REM OK
16770    WHEN5:PROCsetconfig:IFb%=4PROCclosew(w%):REM cancel
16780    WHEN10:s%=(FNrdinv(w%,i%)=0):FORl%=12TO14:PROCsetshaded(w%,l%,s%):NEXTl%
16790    WHEN19:PROCmngwmenu
16800    WHEN21:PROCrdmenu
16810    ENDCASE
16820  ELSE
16830    CASEi%OF
16840    WHEN1:PROCmodgwmenu
16850    WHEN18:PROCmngwmenu
16860    WHEN16:PROCrdmenu
16870    ENDCASE
16880  ENDIF
16890WHENsitewin%:
16900  IFb%<>2THEN
16910    CASEi%OF
16920    WHEN4:PROCtransportmenu(102)
16930    WHEN5:PROCinittransport
16940    WHEN6:PROCsaveconfig:IFb%=4PROCclosew(w%):REM OK
16950    WHEN15:PROCtzmenu
16960    WHEN16:PROCsetconfig:IFb%=4PROCclosew(w%):REM cancel
16970    ENDCASE
16980  ELSE
16990    IFi%=11THENPROCtransportmenu(102)
17000    IFi%=14THENPROCtzmenu
17010  ENDIF
17020WHENarrive%:IF(b%=1ORb%=4)ANDi%=3THENPROCstartreader
17030WHENyesno%:IF(b%=1ORb%=4)AND(i%=1ORi%=2)THENynchoice%=i%:PROCclosew(yesno%)
17040WHENngwin%:
17050  CASEi%OF
17060    WHEN1:PROCnextng
17070    WHEN2:r$="":IFFNaddgrp(FNic_str(ngwin%,6),r$)=0THENPROCmessage(r$,0)
17080      PROCnextng
17090    WHEN4:PROCcatchupng
17100  ENDCASE
17110WHENsavend%:
17120  IFi%=0THEN
17130    PROCgetpointer
17140    !q%=savend%:q%!4=5:q%!24=0:q%!28=0
17150    q%!32=FNmoderight:q%!36=FNmodetop
17160    q%!8=mx%-35:q%!12=my%-35
17170    q%!16=mx%+35:q%!20=my%+35
17180    SYS"Wimp_DragBox",,q%:dragflag%=savend%
17190  ENDIF
17200WHENmsetup%:
17210  IF(b%=1ORb%=4)THEN
17220  CASE(i%DIV5)OF
17230    WHEN0:PROCcfront(sitewin%,0,100)
17240    WHEN1:PROCsetconfig:PROCcfront(gsetup%,0,0)
17250    WHEN2:PROCcfront(trwin%,0,100)
17260    WHEN3:PROCcfront(gwin%,0,100)
17270    WHEN4:PROCcfront(uwin%,0,100)
17280    WHEN5:PROCcfront(fwin%,0,100)
17290  ENDCASE
17300  IFi%>-1ANDb%=1THENPROCclosew(msetup%)
17310  ENDIF
17320WHENfwin%
17330  IFb%=2THEN
17340    CASEi%OF
17350      WHEN1:PROCdomenu(130,"Unset,News,Mail,Any","Type",0)
17360      WHEN2,3,4:PROCdomenu(130+i%,"None,To,From,Subject,Group,Reply To,Precedence,Envelope","Condition",0)
17370      WHEN15:PROCdomenu(131,"Junk,Kill,Redirect,Submit","Action",0)
17380    ENDCASE
17390    ELSE
17400    CASEi%OF
17410      WHEN18:IFcfilt%>0THENcfilt%-=1:PROCsetfiltwin(cfilt%)
17420      WHEN19:IFcfilt%<nfilt%THENcfilt%+=1:PROCsetfiltwin(cfilt%)
17430      WHEN20:PROCsetfilt(cfilt%):IFb%=4PROCclosew(w%)
17440      WHEN21:PROCdelfilt(cfilt%)
17450      WHEN22:PROCaddfilt
17460    ENDCASE
17470  ENDIF
17480WHENtrwin%:
17490  IF(b%=1ORb%=4)THEN
17500    CASEi%OF
17510    WHEN1:PROCtransportmenu(112)
17520    WHEN3:PROCdeltrans(FNic_str(w%,0))
17530    WHEN4:IFFNruntransportfile(17,"","","")=-3THENPROCmessage0("Tnosetup",0)
17540    ENDCASE
17550  ENDIF
17560  IFb%=2ANDi%=0THENPROCtransportmenu(112)
17570ENDCASE
17580ENDPROC
17590
17600DEFFNmodetop
17610SYS"OS_ReadModeVariable",-1,5 TO,,Yeig%:Yeig%=2^Yeig%
17620SYS"OS_ReadModeVariable",-1,12 TO,,top%
17630=top%*Yeig%
17640
17650DEFFNmoderight
17660SYS"OS_ReadModeVariable",-1,4 TO,,Xeig%:Xeig%=2^Xeig%
17670SYS"OS_ReadModeVariable",-1,11 TO,,right%
17680=right%*Xeig%
17690
17700DEFPROCstartreader
17710LOCALw%
17720srflag%=1:PROCnbreply(0,0,900,0,0,"",""):PROCclosew(arrive%)
17730FORw%=1TO5:PROCpoll(0):NEXTw%
17740IFsrflag%<>0THEN
17750  IFFNobjtype(defclient$)>0THEN
17760    SYS"Wimp_StartTask",defclient$
17770    ELSE
17780    PROCmessage1("Clfail",defclient$,0)
17790  ENDIF
17800ENDIF
17810ENDPROC
17820
17830DEFPROCdeltrans(t$)
17840LOCALt%:t%=FNtransno(t$)
17850CASEt%OF
17860WHEN0:VDU7:PROCmessage0("Tdel1",0)
17870WHENtransport%:VDU7:PROCmessage0("Tdel2",0)
17880OTHERWISE:
17890  IFFNconfirm(FNmsg1("Ctransdel",t$))=1THEN
17900    PROChgon:PROCwipe(transdir$+"."+t$):PROCwipe(nbdir$+".support."+t$)
17910    PROChgoff:trans$(t%)="":PROCsettrans2(transport%)
17920  ENDIF
17930ENDCASE
17940ENDPROC
17950
17960DEFPROCaltergrp(g$)
17970LOCALg%,l1%
17980FORl1%=1TOgroups%
17990  IFFNgmatch(g$,l1%)THENg%=l1%:l1%=groups%
18000NEXTl1%
18010REMl1%=0:IFFNspecialgrp(g$)>0THENl1%=1
18020PROCupdateiconstring(gwin%,25,g$)
18030IFg%>0THENg%=grpmod%(g%)ELSEg%=0
18040PROCsetinv(gwin%,16,g%)
18050ENDPROC
18060
18070DEFPROCdoaltergrp(g$,m%)
18080LOCALl1%
18090FORl1%=1TOgroups%
18100  IFFNgmatch(g$,l1%)THENgrpmod%(l1%)=m%
18110NEXTl1%
18120ENDPROC
18130
18140DEFPROCnummenu(c%)
18150CASEc%OF
18160WHEN0:PROCdomenu(103,"3,5,7,10,14,21,30,\---","Default",0)
18170WHEN1:PROCdomenu(104,"Default,3,7,14,21,30,Never,\---","Expiry",0)
18180WHEN2:PROCdomenu(105,"3,5,7,10,14,21,30,\---","Days",0)
18190ENDCASE
18200ENDPROC
18210
18220DEFPROCtzmenu
18230LOCALl%,a$:a$=""
18240FORl%=-12TO14:b$=RIGHT$("0000"+STR$ABS(l%*100),4):IFl%<0THENb$="-"+b$ELSEb$="+"+b$
18250a$+=","+b$:NEXTl%:a$=MID$(a$,2)
18260PROCdomenu(121,a$,"Timezone",0)
18270ENDPROC
18280
18290DEFPROCtransportmenu(m%)
18300LOCALA$,l%
18310FORl%=0TOntrans%:IFtrans$(l%)>""THEN
18320  A$=A$+trans$(l%)+","
18330ENDIF
18340NEXTl%
18350PROCdomenu(m%,LEFT$(A$),"Transport",0)
18360ENDPROC
18370
18380DEFPROCinittransport
18390timezone$=FNtimezone
18400IFFNruntransportfile(14,"","","")=0THENPROCreadnewsrc
18410IFFNruntransportfile(11,"","","")=0THEN
18420  a$=FNvarval("Newsbase$ReturnInfo")
18430  IFa$>""THENhostname$=a$ ELSEPROCmessage0("Nohost",0)
18440ENDIF
18450mailname$=hostname$
18460IFFNruntransportfile(12,"","","")=0THEN
18470  a$=FNvarval("Newsbase$ReturnInfo"):IFa$>""THENremotehost$=a$
18480ENDIF
18490PROCsethost
18500ENDPROC
18510
18520DEFFNruntransportfile(c%,fi$,us$,nu$)
18530LOCALF%,f$,a$,b$,n%,mem%
18540REM special return codes:
18550REM -1 not enough memory
18560REM -2 command failed
18570REM -3 command not found
18580a$=transc$(transport%,c%):mem%=transm%(transport%,c%):IFmem%=0THENmem%=32
18590SYS"OS_CLI","unset Newsbase$ReturnCode"
18600SYS"OS_CLI","unset Newsbase$ReturnInfo"
18610IFa$>""THEN
18620  REM substitute parameters %0...%2
18630  n%=INSTR(a$,"%")
18640  WHILEn%>0:b$=""
18650    CASEMID$(a$,n%+1,1)OF
18660      WHEN"f":b$=fi$
18670      WHEN"u","g":b$=us$
18680      WHEN"n":b$=nu$:IFb$=""THENb$="0"
18690      WHEN"h":b$=hostname$
18700      WHEN"m":b$=mailname$
18710      WHEN"r":b$=remotehost$
18720      WHEN"%":b$="%"
18730    ENDCASE
18740    a$=LEFT$(a$,n%-1)+b$+MID$(a$,n%+2):n%+=LENb$-1
18750    n%=INSTR(a$,"%",n%)
18760  ENDWHILE
18770  IFFNfreemem(0)<mem%*1024 THEN
18780    PROCmessage1("Needmem2",m$,0)
18790    SYS"OS_CLI","set Newsbase$ReturnCode -1"
18800    ELSE
18810    f$=FNtransportfile(a$)
18820    IFf$>""THEN
18830      PROChgon
18840      SYS"XWimp_SlotSize",-1,-1TO,n%:SYS"XWimp_SlotSize",-1,mem%*1024
18850      SYS"XWimp_StartTask",f$TO;F%
18860      SYS"XWimp_SlotSize",-1,n%
18870      PROChgoff
18880      IF(F%AND1) THEN
18890        SYS"OS_CLI","set Newsbase$ReturnInfo "+FNmsg0("Tfail3")
18900        SYS"OS_CLI","set Newsbase$ReturnCode -2"
18910      ENDIF
18920      ELSE
18930      SYS"OS_CLI","set Newsbase$ReturnInfo "+FNmsg1("Tfail4",a$)
18940      SYS"OS_CLI","set Newsbase$ReturnCode -3"
18950    ENDIF
18960  ENDIF
18970ENDIF
18980n%=VALFNvarval("Newsbase$ReturnCode")
18990f$=FNvarval("Newsbase$ReturnInfo"):IFn%<>0ANDf$>""THENPROClog(a$+" -> "+f$)
19000=n%
19010
19020DEFPROCrunsupport(f$)
19030IFFNfreemem(0)<64*1024THEN
19040  PROCmessage1("Needmem2",f$,0)
19050  ELSE
19060  SYS"XWimp_StartTask",support$+"."+f$
19070ENDIF
19080ENDPROC
19090
19100DEFFNfreemem(c%)
19110LOCALf%:SYS"Wimp_SlotSize",-1,-1TO,,f%
19120IF(f%+(c%*1024))>0THENf%+=(c%*1024)
19130=f%
19140
19150DEFFNtransportfile(f$)
19160IFLEFT$(f$,1)="*"THEN
19170  f$=MID$(f$,2)
19180  ELSE
19190  f$="<newsbase$dir>.transports."+trans$(transport%)+"."+f$
19200  IFFNobjtype(f$)=0THENf$=""
19210ENDIF
19220=f$
19230
19240DEFPROCgwin(n%)
19250LOCALt%,e$,max%,cur$,new$
19260CASElisttype%OF
19270  WHEN0:max%=groups%+1:cur$=grp$(gwin_g%)
19280  OTHERWISE:max%=maxactive%:cur$=active$(gwin_g%)
19290ENDCASE
19300IFcur$=""ANDn%>0THENENDPROC
19310t%=gwin_g%+n%
19320IFt%>max%THENt%=max%
19330IFt%<1THENt%=1
19340IFlisttype%=0THEN
19350  new$=grp$(t%)
19360  ELSE
19370  new$=active$(t%)
19380ENDIF
19390gwin_g%=t%:PROCupdateiconstring(gwin%,25,new$)
19400SYS"XWimp_SetCaretPosition",gwin%,25,,,-1,LENnew$
19410IFlisttype%=0THEN
19420  PROCsetexpicon(t%):PROCsetinv(gwin%,16,grpmod%(t%)):PROCsetshaded(gwin%,16,0)
19430  ELSE
19440  PROCupdateiconstring(gwin%,1,"--"):PROCsetshaded(gwin%,16,1)
19450ENDIF
19460ENDPROC
19470
19480DEFPROCgact(A$)
19490PROCupdateiconstring(gwin%,21,LEFT$(A$,55))
19500ENDPROC
19510
19520DEFPROCerrorbox(R%)
19530LOCAL ERROR
19540ON ERROR LOCAL PROCerrorerror:END
19550!tmp%=ERR:$(tmp%+4)="An error has occurred: "+REPORT$+" (code "+STR$ERL+")."+CHR$0
19560SYS"Wimp_ReportError",tmp%,1,myname$
19570REM try to write error to logfile
19580PROClog(ver$+rev$+" error: "+REPORT$+" at "+STR$ERL):PROClog("")
19590CASER%OF
19600  WHEN0:PROCerrorerror
19610  OTHERWISE:!tmp%=ERR:$(tmp%+4)="Press OK to continue or Cancel to quit"+CHR$0
19620            SYS "Wimp_ReportError",tmp%,3,myname$TO,R%
19630            IFR%=2THENPROCerrorerror
19640ENDCASE
19650RESTORE ERROR
19660PROCtidyup
19670ENDPROC
19680
19690DEFPROCerrorerror
19700ONERROROFF
19710PROCfinish:END
19720ENDPROC
19730
19740DEFPROCopwinvar(h%)
19750CASEh%OF
19760WHENmsetup%:confopen%=TRUE
19770WHENmsgw%:msgopen%=TRUE
19780WHENstatus%:statopen%=TRUE
19790WHENsavend%:ndopen%=TRUE
19800WHENngwin%:ngopen%=TRUE
19810WHENarrive%:arropen%=TRUE
19820ENDCASE
19830ENDPROC
19840
19850DEFPROCfront(h%)
19860!q%=h%:SYS"Wimp_GetWindowState",,q%
19870q%!20=0:q%!24=0:q%!28=-1:SYS"Wimp_OpenWindow",,q%
19880PROCopwinvar(h%)
19890ENDPROC
19900
19910DEFPROCcfront(h%,xoff%,yoff%)
19920LOCALx%,y%,wx%,wy%
19930PROCopwinvar(h%)
19940!q%=h%:SYS"Wimp_GetWindowState",,q%
19950x%=FNmoderight:y%=FNmodetop:wx%=q%!12-q%!4:wy%=q%!16-q%!8
19960q%!4=(x%-wx%)DIV2-xoff%:q%!12=q%!4+wx%:q%!8=(y%-wy%)DIV2-yoff%:q%!16=q%!8+wy%
19970q%!20=0:q%!24=0:q%!28=-1:SYS"Wimp_OpenWindow",,q%
19980ENDPROC
19990
20000DEFFNic_str(H%,I%)
20010!q%=H%:q%!4=I%:SYS"XWimp_GetIconState",,q%TO;F%
20020=FNstr(q%!28)
20030
20040DEFPROCseticonstring(H%,I%,A$)
20050!q%=H%:q%!4=I%:SYS"XWimp_GetIconState",,q%TO;F%
20060$(q%!28)=A$+CHR$0
20070ENDPROC
20080:
20090DEFPROCupdateiconstring(H%,I%,A$)
20100PROCseticonstring(H%,I%,A$):!q%=H%:q%!4=I%:q%!8=0:q%!12=0
20110SYS"XWimp_SetIconState",,q%TO;F%
20120ENDPROC
20130
20140DEFPROCsetinv(H%,I%,S%)
20150S%=ABS(S%=0):!q%=H%:q%!4=I%:q%!8=((1)<<21)*ABS(S%=0):q%!12=(1<<21)
20160SYS"XWimp_SetIconState",,q%TO;F%
20170ENDPROC
20180
20190DEFPROCsetshaded(H%,I%,S%)
20200!q%=H%:q%!4=I%:q%!8=((1)<<22)*ABSS%:q%!12=(1<<22)
20210SYS"Wimp_SetIconState",,q%
20220ENDPROC
20230
20240DEFFNrdinv(H%,I%)
20250!q%=H%:q%!4=I%:SYS"Wimp_GetIconState",,q%
20260=-(((q%!24)AND(1<<21))DIV2097152<>0)
20270
20280DEFPROCmodgwmenu
20290LOCALA$,l%
20300FORl%=0TO20:IFmodgw$(l%)>""ANDLEN(A$+modgw$(l%))<253THENA$=A$+modgw$(l%)+","
20310NEXTl%
20320IFA$>""PROCdomenu(120,LEFT$(A$),"Modpaths",0)
20330ENDPROC
20340
20350DEFPROCmngwmenu
20360LOCALA$,l%
20370FORl%=0TO10:IFmngw$(l%)>""ANDLEN(A$+mngw$(l%))<253THENA$=A$+mngw$(l%)+","
20380NEXTl%
20390IFA$>""PROCdomenu(122,LEFT$(A$),"Gateways",0)
20400ENDPROC
20410
20420DEFPROCrdmenu
20430LOCALA$,a$,c%,l%,t%,F%:c%=0
20440REPEATSYS"XOS_ReadVarVal","Newsbase$Client*",tmp%,255,c%TO,,l%,c%,t%;F%
20450IFt%=0AND(F%AND1)=0THENtmp%?l%=13:a$=FNstr(tmp%):IFLENA$+LENa$<255THENA$+=a$+","
20460UNTIL(F%AND1)<>0:IFA$>""THENPROCdomenu(123,LEFT$(A$),"Readers",0)
20470ENDPROC
20480
20490DEFPROCgrpmenu(handle%)
20500LOCALmbuf%,tbuf%,tbufp%,w%,wp%,msiz%,tsiz%,no%
20510PROCrelease(menudataref%):PROCrelease(indmenuref%)
20520REMIFlisttype%=1ANDactive$(1)=""THENVDU7:ENDPROC
20530PROChgon
20540CASElisttype%OF
20550  WHEN0:msiz%=28+24*(groups%+1):tsiz%=groups%*2
20560  FORw%=1TOgroups%:tsiz%+=LENgrp$(w%):NEXTw%
20570  OTHERWISE:msiz%=28+24*(maxactive%+1):tsiz%=maxactive%*3
20580  FORw%=1TOmaxactive%:tsiz%+=LENactive$(w%):NEXTw%
20590ENDCASE
20600menudataref%=FNclaim(menudata%,msiz%,"menu")
20610indmenuref%=FNclaim(indmenubuf%,tsiz%,"menudata")
20620IFmenudata%>0ANDindmenubuf%>0THEN
20630  mbuf%=menudata%:tbuf%=indmenubuf%
20640  tbufp%=tbuf%
20650  menuhandle%=handle%
20660  menuptr%=mbuf%
20670  menuptr%!20=44
20680  $menuptr%="Groups":w%=6
20690  menuptr%!12=&70207
20700  wp%=menuptr%+16:menuptr%!24=0
20710  menuptr%+=28:no%=1
20720  REPEAT
20730  IFlisttype%=0THEN
20740    item$=grp$(no%)
20750    ELSE
20760    item$=active$(no%)
20770  ENDIF
20780  IFLENitem$>w% THENw%=LENitem$
20790  IFitem$>""THEN
20800  !menuptr%=0:menuptr%!4=0
20810  menuptr%!8=&07000121
20820  menuptr%!12=tbufp%:menuptr%!16=0:menuptr%!20=LENitem$+1
20830  $tbufp%=item$+CHR$0:tbufp%+=(LENitem$+1)
20840  menuptr%+=24
20850  ENDIF
20860  no%+=1:UNTILitem$=""
20870  !wp%=w%*16+32:menuptr%!-24=(menuptr%!-24)OR&80
20880  IFno%>2PROCgetpointer:menux%=mx%-64:menuy%=my%:SYS"Wimp_CreateMenu",,mbuf%,menux%,my%
20890ENDIF
20900PROChgoff
20910ENDPROC
20920
20930DEFPROCumenu
20940LOCALA$,l%
20950l%=0:WHILEl%<maxusr%ANDuser$(l%)>"":A$+=user$(l%)+",":l%+=1:ENDWHILE
20960IFLENA$>1THENA$=LEFT$(A$):PROCdomenu(107,A$,"Users",0)
20970ENDPROC
20980
20990DEFPROCugmenu
21000PROCdomenu(108,"0,1,2,3,10,11,12,13,14,15,\---","Groups",0):ENDPROC
21010
21020DEFPROCdomenu(handle%,menu$,menutitle$,I%)
21030LOCALw%,wp%,l%,a$,item$,fudge%,tbufp%,ilen%
21040PROCrelease(menudataref%):PROCrelease(indmenuref%)
21050menudataref%=FNclaim(menudata%,&400,"menu")
21060indmenuref%=FNclaim(indmenubuf%,&400,"menudata")
21070IFmenu$=""THENENDPROC
21080menuItems%=0:fudge%=0
21090menuhandle%=handle%
21100menuptr%=menudata%
21110menuptr%!20=44
21120$menuptr%=menutitle$:w%=LENmenutitle$
21130menuptr%!12=&70207
21140wp%=menuptr%+16:menuptr%!24=0
21150menuptr%+=28:tbufp%=indmenubuf%
21160REPEAT
21170  l%=INSTR(menu$,",")
21180  IFl%>0THEN
21190    item$=LEFT$(menu$,l%-1):menu$=MID$(menu$,l%+1)
21200    ELSE
21210    item$=menu$:menu$=""
21220  ENDIF
21230  IFLENitem$>w% THENw%=LENitem$
21240  IFitem$>""THEN
21250    !menuptr%=0
21260    IFLEFT$(item$,1)="|"THENitem$=MID$(item$,2):!menuptr%=2:fudge%+=1
21270    IFLEFT$(item$,1)="!"THENitem$=MID$(item$,2):!menuptr%=!menuptr%+1
21280    menuptr%!4=-1:menuptr%!8=&07000121:ilen%=1+LENitem$
21290    CASELEFT$(item$,1)OF
21300    WHEN">":menuptr%!4=info%:item$=MID$(item$,2)
21310    WHEN"<":menuptr%!8=menuptr%!8 OR(1<<22):item$=MID$(item$,2)
21320    WHEN"\":menuptr%!8=menuptr%!8 OR(1<<8):!menuptr%=!menuptr%OR4:item$=""
21330    ENDCASE
21340    menuptr%!12=tbufp%:menuptr%!16=0:menuptr%!20=ilen%
21350    $tbufp%=item$+CHR$0:tbufp%+=ilen%
21360  ENDIF
21370  menuptr%+=24:menuItems%+=1
21380UNTILmenu$=""
21390menuptr%!-24=(menuptr%!-24)OR&80
21400!wp%=w%*16+32:PROCgetpointer
21410menux%=mx%-64:IFI%<>0THENmenuy%=96+menuItems%*44+fudge%*24ELSEmenuy%=my%
21420SYS "Wimp_CreateMenu",,menudata%,menux%,menuy%
21430ENDPROC
21440
21450DEFPROCmenuselect(menus%)
21460LOCALl%,g$:SYS"Wimp_DecodeMenu",,menudata%,menus%,tmp%
21470A$=FNstr(tmp%)
21480IFb%AND1THEN
21490  SYS"Wimp_CreateMenu",,menudata%,menux%,menuy%
21500  ELSE
21510  PROCrelease(menudataref%):PROCrelease(indmenuref%)
21520ENDIF
21530CASEmenuhandle%OF
21540  WHEN101:
21550    CASE A$ OF
21560      WHEN"Setup...":IFstartupok%THENPROCfront(msetup%)ELSEPROCstillstart
21570      WHEN"Debatch":IFstartupok%THENcheckfiles%=1:forcebatch%=TRUE
21580      WHEN"Expire":IFstartupok%THENPROCexpgroup("*",0)
21590      WHEN"Queues...":IFstartupok%THENl%=FNruntransportfile(3,"","","")
21600      WHEN"Quit":IFFNcheckquit PROCfinish:END
21610    ENDCASE
21620  WHEN102:PROCsettrans(FNtransno(A$))
21630  WHEN112:PROCsettrans2(FNtransno(A$))
21640  WHEN103:IFVALA$>0PROCupdateiconstring(gwin%,2,A$):defexp%=VALA$
21650  WHEN104:
21660    g$=FNic_str(gwin%,25):CASEA$OF
21670      WHEN"Default":PROCsetexpiry(g$,0)
21680      WHEN"Never":PROCsetexpiry(g$,1E6)
21690      OTHERWISE:IFVALA$>0PROCsetexpiry(g$,VALA$)
21700    ENDCASE
21710    PROCupdateiconstring(gwin%,1,A$)
21720  WHEN105:IFVALA$>0PROCupdateiconstring(gwin%,22,A$):ngexp%=VALA$
21730  WHEN106:CASEA$OF
21740      WHEN"Pause":PROCpause
21750      WHEN"Resume":pause%=0:PROCprint("",""," ","")
21760      WHEN"Cancel":cancel%=TRUE
21770    ENDCASE
21780  WHEN107:PROCgetuserinfo:PROCsaveuserinfo:PROCsetuwin(A$)
21790  WHEN108:CASEA$OF
21800      WHEN"0":PROCupdateiconstring(uwin%,2,A$)
21810      OTHERWISE:IFVALA$>0THENPROCupdateiconstring(uwin%,2,A$)
21820    ENDCASE
21830  WHEN110:IFlisttype%=0THEN
21840    gwin_g%=FNnametono(A$,FALSE):PROCgwin(0)
21850    ELSE
21860    gwin_g%=0:REPEATgwin_g%+=1:UNTILactive$(gwin_g%)=A$ORgwin_g%>maxactive%:PROCgwin(0)
21870    ENDIF
21880  WHEN111:PROCupdateiconstring(gwin%,12,A$):listtype%=ABS(LEFT$(A$,1)="A"):PROCgwin(0)
21890  WHEN120:modgw$=A$:PROCsetmodgw(A$)
21900  WHEN121:timezone$=A$:PROCsethost
21910  WHEN122:mngw$=A$:PROCsetmngw(A$)
21920  WHEN123:PROCupdateiconstring(gsetup%,16,A$)
21930  WHEN130:PROCupdateiconstring(fwin%,1,A$)
21940  WHEN131:PROCupdateiconstring(fwin%,15,A$):PROCsetcaret(fwin%,16,0)
21950  WHEN132,133,134:PROCupdateiconstring(fwin%,menuhandle%-130,A$)
21960    PROCsetcaret(fwin%,menuhandle%-127,0)
21970ENDCASE
21980ENDPROC
21990
22000DEFPROCstillstart:PROCmessage0("Bstart",0):ENDPROC
22010
22020DEFPROCpause
22030pause%=1:REPEATPROCprint("","",FNmsg0("Paused"),""):PROCpoll(200):UNTILpause%=0
22040ENDPROC
22050
22060DEFPROCsetexpiry(g$,a%)
22070LOCALl%:IFg$=""ENDPROC
22080FORl%=1TOgroups%
22090  IFFNsmatch(g$,grp$(l%))<>0THENgrpexp%(l%)=a%
22100NEXTl%
22110ENDPROC
22120
22130DEFPROCprint(A$,B$,C$,D$)
22140IFA$>""PROCupdateiconstring(status%,1,LEFT$(A$,36))
22150IFB$>""PROCupdateiconstring(status%,2,LEFT$(B$,36))
22160IFC$>""PROCupdateiconstring(status%,3,LEFT$(C$,36))
22170IFD$>""PROCupdateiconstring(status%,4,LEFT$(D$,36))
22180ENDPROC
22190
22200DEFPROCopen_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
22210IFhandle%=-1THENENDPROC
22220q%!0=handle%:q%!28=bhandle%
22230q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
22240q%!20=scx%:q%!24=scy%
22250SYS "Wimp_OpenWindow",,q%
22260ENDPROC
22270:
22280DEFPROCgetpointer
22290SYS "Wimp_GetPointerInfo",,tmp%
22300mx%=!tmp%:my%=tmp%!4:b%=tmp%!8:handle%=tmp%!12:icon%=tmp%!16
22310ENDPROC
22320
22330DEFPROCclosew(h%)
22340PROCgetpointer
22350CASEh%OF
22360WHENmsetup%:confopen%=FALSE
22370WHENmsgw%:msgopen%=FALSE
22380WHENstatus%:statopen%=FALSE
22390WHENngwin%:ngopen%=FALSE:PROCcloseng
22400WHENarrive%:IFarropen%THENarropen%=FALSE:arrart%=0:arrmail$=""
22410WHENsavend%:ndopen%=FALSE
22420WHENyesno%,info%:REM dummys for otherwise clause...
22430OTHERWISE:IFb%=1THENPROCfront(msetup%)
22440ENDCASE
22450!q%=h%:SYS"Wimp_CloseWindow",,q%
22460ENDPROC
22470
22480DEFFNvarval(A$)
22490LOCALL%,F%
22500SYS"XOS_ReadVarVal",A$,tmp%,256,0,3 TO,,L%;F%
22510IF(F%AND1) ORL%>256 THEN:=""
22520tmp%?L%=13:=$tmp%
22530
22540DEFPROCngwin
22550REM handle f4% is reserved for use by newgroups handler
22560nglast%=0:ngtime%=0
22570f1%=FNopenin(lastng$)
22580IFf1%>0THENngtime%=VALGET$#f1%:PROCcf(f1%)
22590f4%=FNopenin(newgrp$)
22600IFf4%>0THEN
22610  PROCcfront(ngwin%,0,-100):PROCnextng
22620  ELSE
22630  PROCmessage0("NGnone",0)
22640ENDIF
22650ENDPROC
22660
22670DEFPROCnextng
22680LOCALa$,b$,ok%:IFf4%=0THENPROCclosew(ngwin%):ENDPROC
22690REPEATa$=GET$#f4%:IFEOF#f4%THENPROCcf(f4%):ok%=2
22700  IFLEFT$(a$,1)="#"THEN
22710    nglast%=VAL(MID$(a$,3,6)+MID$(a$,10,2))
22720    IFnglast%>ngtime%THENf1%=FNopenout(lastng$):IFf1%>0THENBPUT#f1%,STR$nglast%:PROCcf(f1%):PROCsettype(lastng$,&FFF):ngtime%=nglast%
22730    ELSE
22740    IFnglast%>=ngtime%THENb$=FNgetpar(a$," "):a$=b$:IFFNactive(a$)=0ANDFNisachef(a$)=0THENok%=1
22750  ENDIF
22760UNTILok%<>0
22770IFok%=1THEN
22780  b$=STR$nglast%:b$=MID$(b$,5,2)+"-"+MID$(b$,3,2)+"-"+LEFT$(b$,2)
22790  PROCupdateiconstring(ngwin%,5,"Created "+b$)
22800  PROCupdateiconstring(ngwin%,6,LEFT$(a$,45))
22810  ELSE
22820  PROCclosew(ngwin%):PROCmessage0("NGend",0)
22830ENDIF
22840ENDPROC
22850
22860DEFPROCcatchupng
22870f1%=FNopenout(lastng$)
22880IFf1%>0THENBPUT#f1%,FNctime("%YR%MN%DY%24"):PROCcf(f1%):PROCsettype(lastng$,&FFF)
22890PROCclosew(ngwin%)
22900ENDPROC
22910
22920DEFPROCcloseng
22930PROCcf(f4%)
22940ENDPROC
22950
22960DEFPROCgettransports
22970LOCALl%,r3%,t%,dirbuf%,dbr%,a$,b$,F%
22980dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
22990ntrans%=1:REPEAT
23000  SYS"XOS_GBPB",10,transdir$,dirbuf%,1,n%,dbsize%,"*"TO,,,r3%,n%;F%
23010  IFr3%>0AND(dirbuf%!16)=2THENntrans%+=1
23020UNTILn%=-1OR(F%AND1)>0
23030DIMtrans$(ntrans%),transd$(ntrans%),transc$(ntrans%,20),transm%(ntrans%,20)
23040DIMtransi$(ntrans%,10),transo$(ntrans%,10)
23050trans$(0)="none":transi$(0,0)=workdir$+".*":transi$(0,1)=lindir$+".*"
23060l%=1:n%=0
23070REPEAT
23080  SYS"XOS_GBPB",10,transdir$,dirbuf%,1,n%,dbsize%,"*"TO,,,r3%,n%,F%
23090  IFr3%>0AND(dirbuf%!16)=2THEN
23100    a$=FNlower(FNstr(dirbuf%+20)):b$=transdir$+"."+a$
23110    IFFNobjtype(b$+".params")=1THEN
23120      trans$(l%)=a$
23130      PROCreadtrans(b$+".params",l%)
23140      IFFNruntransportfile(18,"","","")=0ANDtransport%=0THENtransport%=l%
23150      l%+=1
23160    ENDIF
23170  ENDIF
23180UNTILn%=-1OR(F%AND1)>0
23190PROCsettrans2(transport%)
23200PROCrelease(dbr%)
23210ENDPROC
23220
23230DEFPROCreadtrans(f$,n%)
23240LOCALa$,b$,c$,i%,o%,l%,p%,dm%:dm%=32
23250f1%=FNopenin(f$):IFf1%<>0THEN
23260  REPEATa$=GET$#f1%:b$=FNgetpar(a$," ")
23270    CASEb$OF
23280      WHEN"in":IFi%<11THENtransi$(n%,i%)=a$:i%+=1
23290      WHEN"out":IFo%<11THENtranso$(n%,o%)=a$:o%+=1
23300      WHEN"dir":PROCensuredir(a$)
23310      WHEN"info":transd$(n%)=a$
23320      WHEN"defmem":dm%=VALa$:IFdm%<0THENdm%=0ELSEIFdm%>2048THENdm%=2048
23330      OTHERWISE:
23340      p%=0:c$=FNgetpar(a$," ")
23350      l%=VALFNclean(c$):IFl%<=0THENl%=dm%ELSEIFl%>2048THENl%=2048
23360      CASELEFT$(b$,5)OF
23370        WHEN"sendm":p%=1
23380        WHEN"sendn":p%=2
23390        WHEN"showq":p%=3
23400        WHEN"prefe":p%=4
23410        WHEN"postf":p%=5
23420        WHEN"addus":p%=6
23430        WHEN"delus":p%=7
23440        WHEN"modus":p%=8
23450        WHEN"addgr":p%=9
23460        WHEN"delgr":p%=10
23470        WHEN"getho","setho":p%=11
23480        WHEN"getre","setre":p%=12
23490        WHEN"getin":p%=13
23500        WHEN"mkgro":p%=14
23510        WHEN"statu":p%=15
23520        WHEN"start":p%=16
23530        WHEN"setup":p%=17
23540        WHEN"detec":p%=18
23550      ENDCASE
23560      IFp%>0THENtransc$(n%,p%)=a$:transm%(n%,p%)=l%
23570    ENDCASE
23580  UNTIL(EOF#f1%):PROCcf(f1%)
23590ENDIF
23600ENDPROC
23610
23620DEFPROCreadnewsrc
23630LOCALcount%
23640active$()="":active$(0)="junk*"
23650f1%=FNopenin(confdir$+"."+trans$(transport%)+".groups")
23660IFf1%<>0THEN
23670  count%=1
23680  REPEATA$=FNlower(FNsget(f1%))
23690    active$(count%)=A$:count%+=1
23700  UNTILEOF#f1%ORcount%>maxactive%
23710  PROCcf(f1%)
23720ENDIF
23730maxactive%=count%
23740ENDPROC
23750
23760DEFFNactive(group$)
23770LOCALg$,flag%,count%,neg%
23780IFgroup$=""THEN:=FALSE
23790IFFNspecialgrp(group$)>0THEN:=TRUE
23800group$=FNlower(group$)
23810flag%=0:count%=0
23820REPEAT
23830  g$=FNlower(active$(count%)):neg%=0
23840  IFASCg$=33THENg$=MID$(g$,2):neg%=1
23850  IFFNsmatch(g$,group$)<>0 THENflag%=1+3*neg%
23860  count%+=1:IFflag%=1THENflag%+=1
23870UNTILg$=""ORflag%>3
23880IFneg%=1THENflag%=0
23890=flag%
23900
23910DEFFNisachef(g$)
23920LOCALyes%,a1$,a2$,a3$,a4$,a5$,a6$:yes%=0
23930IFkillc%<>0THEN
23940a1$=FNgetpar(g$,".")
23950IFa1$="alt"THEN
23960  a2$=FNgetpar(g$,"."):a3$=FNgetpar(g$,".")
23970  a4$=FNgetpar(g$,"."):a5$=FNgetpar(g$,".")
23980  IFa3$=a4$ANDa4$=a5$ANDa5$>""ORa5$=a6$ANDa4$=a5$ANDa6$>""THENyes%=TRUE
23990ENDIF
24000ENDIF
24010=yes%
24020
24030DEFPROCmessage0(A$,w%)
24040PROCmessage(FNmsg0(A$),w%)
24050ENDPROC
24060
24070DEFPROCmessage1(A$,B$,w%)
24080PROCmessage(FNmsg1(A$,B$),w%)
24090ENDPROC
24100
24110DEFPROCmessage2(A$,B$,C$,w%)
24120PROCmessage(FNmsg2(A$,B$,C$),w%)
24130ENDPROC
24140
24150DEFPROCmessage(A$,wait%)
24160IFA$=""PROCclosew(msgw%):ENDPROC
24170PROCupdateiconstring(msgw%,0,LEFT$(A$,127))
24180IFwait%=0THENPROCupdateiconstring(msgw%,2,"Dismiss")ELSEPROCupdateiconstring(msgw%,2,"Continue")
24190IFmsgopen%=0THENPROCcfront(msgw%,0,-110)ELSEPROCfront(msgw%)
24200msgopen%=1
24210IFwait%THEN
24220  REPEATPROCpoll(200):UNTILmsgopen%=FALSE
24230ENDIF
24240ENDPROC
24250
24260DEFPROCreadconfig
24270LOCALcver%
24280f1%=FNopenin(confdir$+".!nbconfig")
24290IFf1%<>0THEN
24300  cver%=100*VALGET$#f1%
24310  IFcver%>46THEN
24320    hostname$=GET$#f1%
24330    remotehost$=GET$#f1%:IFLENremotehost$<2THENremotehost$=""
24340    transport%=FNtransno(FNlower(GET$#f1%))
24350    org$=GET$#f1%
24360    defclient$=GET$#f1%
24370    modgw$=GET$#f1%
24380    timezone$=GET$#f1%:IFtimezone$=""THENtimezone$=FNtimezone
24390    mailname$=GET$#f1%:IFmailname$=""THENmailname$=hostname$
24400    mngw$=GET$#f1%
24410    A$=GET$#f1%
24420    A$=GET$#f1%
24430    A$=GET$#f1%
24440    A$=GET$#f1%
24450    logfile%=VALGET$#f1%
24460    autoexp%=VALGET$#f1%
24470    keepoutg%=VALGET$#f1%
24480    defexp%=VALGET$#f1%
24490    keepb%=VALGET$#f1%
24500    delok%=VALGET$#f1%
24510    fast%=VALGET$#f1%
24520    alert%=VALGET$#f1%
24530    alertbeep%=VALGET$#f1%
24540    alertnews%=VALGET$#f1%
24550    userctrl%=VALGET$#f1%
24560    expmail%=VALGET$#f1%
24570    autodebatch%=VALGET$#f1%
24580    mngw%=VALGET$#f1%
24590    ngexp%=VALGET$#f1%:IFngexp%=0THENngexp%=7
24600    IFcver%>49THEN
24610      docanc%=VALGET$#f1%
24620      killc%=VALGET$#f1%
24630      doreceipt%=VALGET$#f1%
24640      igexp%=VALGET$#f1%
24650      IFcver%>51THEN
24660        thread%=VALGET$#f1%
24670        compress%=VALGET$#f1%
24680        complimit%=VALGET$#f1%:IFcomplimit%=0THENcomplimit%=2048
24690        expany%=VALGET$#f1%
24700        exptime%=VALGET$#f1%
24710        mindsk%=VALGET$#f1%:IFmindsk%=0THENmindsk%=1024
24720      ENDIF
24730    ENDIF
24740  ENDIF
24750  PROCcf(f1%)
24760ENDIF
24770PROCsetconfig:PROCsetsysvars
24780SYS"OS_Byte",121,(2EOR&80)TO,A%
24790IFcver%<ver%ANDrw%THENPROCnewuser(cver%)
24800IFA%=&FF THENinitconf%=1
24810IFcver%<47ANDrw%THENPROCinittransport:initconf%=2
24820ENDPROC
24830
24840DEFPROCnewuser(t%)
24850LOCALF%,t$:IFt%>0ANDt%<47THENt%=1
24860PROCnucp(t%):t$=FNmsg1("Swelcome1",ver$)
24870CASEt%OF
24880WHEN0:PROCmessage1("Swelcome2",t$,0)
24890WHEN1:PROCmessage1("Swelcome3",t$,1)
24900OTHERWISE:PROCmessage1("Swelcome4",t$,1):PROCsaveconfig
24910ENDCASE
24920PROCpoll(0)
24930ENDPROC
24940
24950DEFPROCnucp(t%)
24960LOCALf1$,F%
24970REM copy newuser/update messages to work dir
24980REM but delete them if decompression fails...!
24990IFt%=0THENs$=".welcome.new_"ELSEs$=".welcome.upd_"
25000f1$=workdir$+".postmaster"
25010F%=FNcopyfile(support$+s$+"mail",f1$)
25020f1$=workdir$+".localnews"
25030F%=FNcopyfile(support$+s$+"news",f1$)
25040ENDPROC
25050
25060DEFPROCsetconfig
25070LOCALl%
25080PROCsetinv(gwin%,27,docanc%)
25090PROCsetinv(gwin%,28,killc%)
25100PROCsetinv(gwin%,29,autoexp%)
25110PROCsetinv(gwin%,33,igexp%)
25120PROCsetinv(gwin%,34,thread%)
25130PROCsetinv(gwin%,31,expmail%):PROCsetinv(gwin%,30,-(expmail%=0))
25140PROCsetinv(gwin%,36,expany%):PROCsetinv(gwin%,35,-(expany%=0))
25150PROCupdateiconstring(gwin%,2,STR$defexp%)
25160PROCupdateiconstring(gwin%,22,STR$ngexp%)
25170PROCsetinv(uwin%,10,keepoutg%)
25180PROCsetinv(uwin%,11,userctrl%)
25190PROCsetinv(uwin%,12,delok%)
25200PROCsetinv(gsetup%,3,fast%)
25210PROCsetinv(gsetup%,6,logfile%)
25220PROCsetinv(gsetup%,7,doreceipt%)
25230PROCsetinv(gsetup%,8,compress%)
25240PROCsetinv(gsetup%,9,keepb%)
25250PROCsetinv(gsetup%,10,alert%)
25260PROCsetinv(gsetup%,11,autodebatch%):checkfiles%=autodebatch%
25270PROCsetinv(gsetup%,12,alertbeep%)
25280PROCsetinv(gsetup%,14,alertnews%):PROCsetinv(gsetup%,13,-(alertnews%=0))
25290PROCsetinv(gsetup%,20,mngw%)
25300PROCupdateiconstring(gsetup%,23,STR$complimit%)
25310PROCupdateiconstring(gsetup%,26,STR$mindsk%)
25320PROCseticonstring(gwin%,12,"Current list")
25330FORl%=3TO4:PROCsetshaded(uwin%,l%,(keepoutg%=0)):NEXTl%:REM keep outgoing m/n
25340FORl%=30TO31:PROCsetshaded(gwin%,l%,(autoexp%=0)):NEXTl%:REM mail/news expiry
25350FORl%=35TO41:PROCsetshaded(gwin%,l%,(autoexp%=0)):NEXTl%:REM expiry schedule
25360FORl%=12TO14:PROCsetshaded(gsetup%,l%,(alert%=0)):NEXTl%:REM new mail/news
25370PROCsettrans(transport%)
25380IFmodgw$=""THENmodgw$=modgw$(0)
25390PROCsetmodgw(modgw$)
25400PROCsetmngw(mngw$)
25410PROCdispexptime
25420PROCupdateiconstring(sitewin%,3,org$)
25430PROCsethost:PROCsetclient
25440slice%=FNcpu(fast%)
25450ENDPROC
25460
25470DEFPROCmodexp(ch%,cm%)
25480LOCALh%,m%
25490h%=exptime%DIV100:m%=exptime%MOD100
25500m%+=cm%
25510IFm%>59THENch%=1:m%=0
25520IFm%<0THENch%=-1:m%=59
25530h%+=ch%
25540IFh%<0THENh%=23
25550IFh%>23THENh%=0
25560exptime%=h%*100+m%:PROCdispexptime
25570ENDPROC
25580
25590DEFPROCdispexptime
25600LOCALa$,h$,m$
25610h$=RIGHT$("0"+STR$(exptime%DIV100),2):m$=RIGHT$("0"+STR$(exptime%MOD100),2)
25620IFh$="00"THENh$="12"
25630a$=h$+":"+m$
25640IFexptime%>1159THENa$+=" pm"ELSEa$+=" am"
25650PROCupdateiconstring(gwin%,41,a$)
25660ENDPROC
25670
25680DEFPROCsetmodgw(g$)
25690PROCupdateiconstring(gsetup%,1,LEFT$(g$,41))
25700ENDPROC
25710
25720DEFPROCsetmngw(g$)
25730PROCupdateiconstring(gsetup%,18,LEFT$(g$,41))
25740ENDPROC
25750
25760DEFPROCsettrans(t%)
25770IFt%<0THENt%=0
25780PROCupdateiconstring(sitewin%,11,LEFT$(trans$(t%)+" - "+transd$(t%),40))
25790ENDPROC
25800
25810DEFPROCsettrans2(t%)
25820IFt%<0THENt%=0
25830PROCupdateiconstring(trwin%,0,trans$(t%))
25840PROCupdateiconstring(trwin%,2,LEFT$(transd$(t%),38))
25850ENDPROC
25860
25870DEFFNtransno(t$)
25880LOCALt%
25890t%=0:WHILEt%<ntrans%ANDt$<>trans$(t%):t%+=1:ENDWHILE
25900IFt$<>trans$(t%)THENt%=0
25910=t%
25920
25930DEFPROCsetclient
25940PROCupdateiconstring(gsetup%,16,defclient$)
25950ENDPROC
25960
25970DEFPROCsethost
25980PROCupdateiconstring(sitewin%,0,hostname$)
25990PROCupdateiconstring(sitewin%,1,mailname$)
26000PROCupdateiconstring(sitewin%,2,remotehost$)
26010PROCupdateiconstring(sitewin%,14,timezone$)
26020ENDPROC
26030
26040DEFPROCgetconfig
26050LOCALt$,l%
26060docanc%=FNrdinv(gwin%,27)
26070killc%=FNrdinv(gwin%,28)
26080autoexp%=FNrdinv(gwin%,29)
26090igexp%=FNrdinv(gwin%,33)
26100thread%=FNrdinv(gwin%,34)
26110defexp%=VALFNic_str(gwin%,2)
26120ngexp%=VALFNic_str(gwin%,22)
26130expmail%=FNrdinv(gwin%,31)
26140expany%=FNrdinv(gwin%,36)
26150logfile%=FNrdinv(gsetup%,6)
26160doreceipt%=FNrdinv(gsetup%,7)
26170fast%=FNrdinv(gsetup%,3)
26180autodebatch%=FNrdinv(gsetup%,11):checkfiles%=autodebatch%
26190compress%=FNrdinv(gsetup%,8)
26200keepb%=FNrdinv(gsetup%,9)
26210alert%=FNrdinv(gsetup%,10)
26220alertbeep%=FNrdinv(gsetup%,12)
26230alertnews%=FNrdinv(gsetup%,14)
26240mngw%=FNrdinv(gsetup%,20)
26250modgw$=FNic_str(gsetup%,1)
26260mngw$=FNic_str(gsetup%,18)
26270defclient$=FNic_str(gsetup%,16)
26280complimit%=VALFNic_str(gsetup%,23)
26290mindsk%=VALFNic_str(gsetup%,26)
26300keepoutg%=FNrdinv(uwin%,10)
26310userctrl%=FNrdinv(uwin%,11)
26320delok%=FNrdinv(uwin%,12)
26330hostname$=FNic_str(sitewin%,0)
26340t$=FNic_str(sitewin%,11):l%=INSTR(t$," "):IFl%>0THENt$=LEFT$(t$,l%-1)
26350IFtransport%<>FNtransno(t$)THENtransport%=FNtransno(t$):PROCstarttransport
26360org$=FNic_str(sitewin%,3)
26370remotehost$=FNic_str(sitewin%,2)
26380mailname$=FNic_str(sitewin%,1)
26390timezone$=FNic_str(sitewin%,14)
26400slice%=FNcpu(fast%)
26410PROCsetsysvars
26420FORl%=0TO6:PROCnbsiteinfo(30,0,0,l%):ENDPROC
26430ENDPROC
26440
26450DEFPROCsetsysvars
26460PROCsetvar("Newsbase$HostName",hostname$)
26470PROCsetvar("Newsbase$MailName",mailname$)
26480PROCsetvar("Newsbase$RemoteHost",remotehost$)
26490PROCsetvar("Newsbase$Transport",trans$(transport%))
26500ENDPROC
26510
26520DEFPROCsetvar(A$,B$)
26530SYS"XOS_CLI","set "+A$+" "+B$
26540ENDPROC
26550
26560DEFPROCsaveconfig
26570PROCgetconfig
26580IFrw%THEN
26590  f1%=FNopenout(confdir$+".!nbconfig"):IFf1%<>0THEN
26600    BPUT#f1%,STR$(ver%/100)
26610    BPUT#f1%,hostname$
26620    BPUT#f1%,remotehost$
26630    BPUT#f1%,trans$(transport%)
26640    BPUT#f1%,org$
26650    BPUT#f1%,defclient$
26660    BPUT#f1%,modgw$
26670    BPUT#f1%,timezone$
26680    BPUT#f1%,mailname$
26690    BPUT#f1%,mngw$
26700    BPUT#f1%,""
26710    BPUT#f1%,""
26720    BPUT#f1%,""
26730    BPUT#f1%,""
26740    BPUT#f1%,STR$logfile%
26750    BPUT#f1%,STR$autoexp%
26760    BPUT#f1%,STR$keepoutg%
26770    BPUT#f1%,STR$defexp%
26780    BPUT#f1%,STR$keepb%
26790    BPUT#f1%,STR$delok%
26800    BPUT#f1%,STR$fast%
26810    BPUT#f1%,STR$alert%
26820    BPUT#f1%,STR$alertbeep%
26830    BPUT#f1%,STR$alertnews%
26840    BPUT#f1%,STR$userctrl%
26850    BPUT#f1%,STR$expmail%
26860    BPUT#f1%,STR$autodebatch%
26870    BPUT#f1%,STR$mngw%
26880    BPUT#f1%,STR$ngexp%
26890    BPUT#f1%,STR$docanc%
26900    BPUT#f1%,STR$killc%
26910    BPUT#f1%,STR$doreceipt%
26920    BPUT#f1%,STR$igexp%
26930    BPUT#f1%,STR$thread%
26940    BPUT#f1%,STR$compress%
26950    BPUT#f1%,STR$complimit%
26960    BPUT#f1%,STR$expany%
26970    BPUT#f1%,STR$exptime%
26980    BPUT#f1%,STR$mindsk%
26990    BPUT#f1%,"0"
27000    BPUT#f1%,"0"
27010    BPUT#f1%,"0"
27020    BPUT#f1%,"0"
27030    PROCcf(f1%):PROCsettype(confdir$+".!nbconfig",&FFF)
27040  ENDIF
27050ENDIF
27060ENDPROC
27070
27080DEFFNtimezone
27090LOCALb%,m%,b$
27100SYS"Territory_ReadCurrentTimeZone"TO,b%
27110m%=(b%MOD360000)DIV6000:b%=b%DIV360000
27120b$=LEFT$(STR$ABSm%+"00",2):b$=STR$ABSb%+b$
27130IFLENb$=3THENb$="0"+b$
27140IFb%<0THENb$="-"+b$ELSEb$="+"+b$
27150=b$
27160
27170DEFPROCstarttransport
27180LOCALf$,l%,a$,b$,t$
27190t$=trans$(transport%)
27200l%=FNruntransportfile(16,"","","")
27210IFl%<>0ANDtransport%>0THEN
27220  PROCmessage1("Tfail1",t$,1):l%=FNruntransportfile(16,"","","")
27230  IFl%<>0PROCmessage0("Tfail2",1):transport%=0
27240ENDIF
27250PROCreadnewsrc
27260ENDPROC
27270
27280DEFFNopenin(f$)
27290=FNfopen(f$,&4F)
27300
27310DEFFNopenout(f$)
27320=FNfopen(f$,&8F)
27330
27340DEFFNopenup(f$)
27350LOCALh%
27360h%=FNfopen(f$,&CF)
27370IFh%=0THENh%=FNfopen(f$,&8F)
27380=h%
27390
27400DEFFNfopen(f$,r%)
27410LOCALh%,F%
27420SYS"XOS_Find",r%,f$TOh%;F%
27430IF(F%AND1)THENh%=0
27440=h%
27450
27460DEFFNcanon(A$)
27470LOCALr%,F%
27480IFA$>""THENSYS"XOS_FSControl",37,A$,tmp%,,,256 TO,,,,,r%;F%
27490IFr%>0AND(F%AND1)=0THEN:=FNstr(tmp%)
27500=""
27510
27520DEFPROCcf(RETURN h%)
27530IFh%<>0 SYS"XOS_Find",0,h%:h%=0
27540ENDPROC
27550
27560DEFFNcountgroups(total%,d$)
27570LOCALf$,t%,r3%,nread%,f%,dirbuf%,dbr%,addr%,floop%
27580dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
27590REPEATPROCpoll(slice%)
27600addr%=dirbuf%:SYS"OS_GBPB",10,d$,dirbuf%,20,nread%,dbsize%,"*"TO,,,r3%,nread%
27610IFr3%>0THEN
27620  FORfloop%=1TOr3%
27630  t%=addr%!16:f$=FNstr(addr%+20)
27640  CASEt%OF
27650    WHEN1:IFf%=0AND(VALf$>0ORf$="~index")THENtotal%+=1:f%=1:PROCprint("","",FNmsg1("Gfound",STR$total%),""):IFtotal%=1THENPROCmessage0("Gcount",0)
27660    WHEN2,3:IFINSTR(RIGHT$(d$,3),"~")<1THENtotal%=FNcountgroups(total%,d$+"."+f$)
27670  ENDCASE
27680  addr%=addr%+(LENf$+24)ANDNOT3:NEXTfloop%
27690ENDIF
27700UNTILnread%=-1
27710PROCrelease(dbr%)
27720=total%
27730
27740DEFFNfindhighest(d$,high%)
27750LOCALf$,t%,r3%,dptr%,f%,dirbuf%,dbr%,addr%,F%
27760dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
27770dptr%=0
27780REPEATPROCpoll(slice%*3)
27790  SYS"XOS_GBPB",10,d$,dirbuf%,1,dptr%,dbsize%,"*"TO,,,r3%,dptr%;F%
27800  IFr3%>0AND(F%AND1)=0THEN
27810    addr%=dirbuf%
27820    t%=addr%!16:f$=FNstr(addr%+20):addr%=addr%+(25+LENf$)ANDNOT3
27830    CASEt%OF
27840      WHEN1:IFVALf$>high%THENhigh%=VALf$
27850      WHEN2,3:IFLEFT$(f$,1)="~"THENhigh%=FNfindhighest(d$+"."+f$,high%)
27860    ENDCASE
27870  ENDIF
27880UNTILdptr%=-1OR(F%AND1)<>0
27890PROCrelease(dbr%)
27900=high%
27910
27920DEFPROCfindallgroups
27930LOCALg1%,l%
27940IFFNbusyon("Bscan")=0 THEN
27950PROCprint(FNmsg0("Gsearch")," "," "," ")
27960PROCfindgroups(newsroot$+".News")
27970IFgroups%>1THEN
27980  IFstartupok%=0PROCmessage0("Gcheck",0)
27990  FORg1%=1TOgroups%
28000    IFgrpseq%(g1%)=0ANDgrp$(g1%)>""THEN
28010      PROCprint(FNmsg0("Gcheck"),FNmsg1("Glast",grp$(g1%))," "," ")
28020      grpseq%(g1%)=FNseq(g1%):l%=FNfirstart(g1%)
28030    ENDIF
28040  NEXTg1%
28050ENDIF
28060PROCseticonstring(gwin%,25,grp$(1)):gwin_g%=1:PROCsetexpicon(1)
28070PROCbusyoff
28080PROCwritegrpdata
28090ENDIF
28100PROCgact("")
28110ENDPROC
28120
28130DEFPROCfindgroups(d$)
28140LOCALn%,f$,t%,r3%,nread%,gf$,l%,dirbuf%,dbr%,addr%,floop%,F%
28150dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
28160PROCgact("Scanning for groups")
28170REPEAT
28180SYS"XOS_GBPB",10,d$,dirbuf%,10,n%,dbsize%,"*"TO,,,r3%,n%;F%:nread%=n%
28190PROCpoll(slice%):addr%=dirbuf%
28200IFr3%>0AND(F%AND1)=0THEN
28210  FORfloop%=1TOr3%
28220  t%=addr%!16:f$=FNstr(addr%+20):addr%=addr%+(24+LENf$)ANDNOT3
28230  CASEt%OF
28240    WHEN1:IFgf$=""AND(VALf$>0ORf$="~index")THEN
28250     gf$=FNpathtogroup(d$):PROCaddifnotinlist(gf$):PROCscanmsg
28260    ENDIF
28270    WHEN2,3:IFLEFT$(f$,1)="~"THEN
28280      IFgf$=""THENgf$=FNpathtogroup(d$):PROCaddifnotinlist(gf$):PROCscanmsg
28290      ELSE
28300      PROCfindgroups(d$+"."+f$)
28310    ENDIF
28320  ENDCASE
28330  NEXTfloop%
28340ENDIF
28350UNTILnread%=-1OR(F%AND1)<>0
28360PROCrelease(dbr%)
28370ENDPROC
28380
28390DEFPROCconvrn(d$)
28400REM convert a readnews group by moving all files to ~x subdirectory
28410LOCALn%,f$,t%,r3%,nread%,f1$,l%,dirbuf%,dbr%,addr%,floop%,F%,mk%
28420dbr%=FNclaim(dirbuf%,dbsize%,"dbuf"):PROCprint("","",FNmsg0("Gconvert"),"")
28430REPEAT
28440SYS"XOS_GBPB",10,d$,dirbuf%,10,n%,dbsize%,"*"TO,,,r3%,n%;F%:nread%=n%
28450PROCpoll(slice%):addr%=dirbuf%
28460IFr3%>0AND(F%AND1)=0THEN
28470  FORfloop%=1TOr3%
28480  t%=addr%!16:f$=FNstr(addr%+20):addr%=addr%+(24+LENf$)ANDNOT3
28490  CASEt%OF
28500    WHEN1:IFVALf$<>0THEN
28510      IFmk%THEN
28520        F%=FNmovefile(d$+"."+f$,d$+".~x.~x."+f$):IFF%=0THENn%-=1
28530        ELSE
28540        f1$=FNtmpfile:F%=FNmovefile(d$+"."+f$,f1$):IFF%=0THEN
28550        IFFNensuredir(d$+".~x.~x")>1ANDFNmovefile(f1$,d$+".~x.~x."+f$)=0THENmk%=TRUE:n%-=1
28560        ENDIF
28570      ENDIF
28580    ENDIF
28590  ENDCASE
28600  NEXTfloop%
28610ENDIF
28620UNTILnread%=-1OR(F%AND1)<>0
28630PROCrelease(dbr%)
28640ENDPROC
28650
28660DEFPROCscanmsg
28670IFstartupok%=0ANDgrp$(1)=""PROCmessage0("Gscan",0)
28680ENDPROC
28690
28700DEFPROCaddifnotinlist(g$)
28710LOCALl%
28720IFg$>""THEN
28730  PROCprint("",FNmsg1("Gfound",g$),FNmsg1("Gtotal",STR$groups%),"")
28740  IFFNnametono(g$,0)=0THENl%=FNaddgrptolist(g$,TRUE):IFl%=0THENPROCtoomanyg
28750  IFl%>0PROCprint("","","","("+g$+" added)")
28760ENDIF
28770ENDPROC
28780
28790DEFFNpathtogroup(p$)
28800LOCALl%:p$=MID$(p$,LENdpath$+1)
28810REPEATl%=INSTR(p$,"~.")
28820  IFl%>0THENp$=LEFT$(p$,l%-1)+MID$(p$,l%+2)
28830UNTILl%=0
28840=p$
28850
28860DEFPROCinitfilters
28870nfilt%=0:cfilt%=0
28880maxfilt%+=FNflines(confdir$+".filters")
28890DIMflt%(maxfilt%),fla$(maxfilt%),fla%(maxfilt%),filt%(1)
28900DIMflc%(maxfilt%,2),flc$(maxfilt%,2),fln%(maxfilt%,2),flj%(maxfilt%,2),fl_ok%(2)
28910f1%=FNopenin(confdir$+".filters")
28920IFf1%<>0THEN
28930  REPEATa$=GET$#f1%
28940  flt%(nfilt%)=VALFNgetpar(a$,";")
28950  FORl%=0TO2
28960  flj%(nfilt%,l%)=VALFNgetpar(a$,";")
28970  flc%(nfilt%,l%)=VALFNgetpar(a$,";")
28980  flc$(nfilt%,l%)=FNgetpar(a$,";")
28990  fln%(nfilt%,l%)=VALFNgetpar(a$,";")
29000  NEXTl%
29010  fla%(nfilt%)=VALFNgetpar(a$,";")
29020  fla$(nfilt%)=FNgetpar(a$,";")
29030  IFflc$(nfilt%,0)>""ANDfla%(nfilt%)>0THENnfilt%+=1:ELSEflt%(nfilt%)=0
29040  UNTILEOF#f1%:PROCcf(f1%):IFnfilt%>0THENnfilt%-=1
29050ENDIF
29060PROCsetfiltwin(0)
29070ENDPROC
29080
29090DEFPROCsavefilters
29100LOCALl%,l1%
29110IFrw%THEN
29120  f1%=FNopenout(confdir$+".filters")
29130  IFf1%>0THEN
29140    FORl%=0TOmaxfilt%
29150    IFflt%(l%)>0THEN
29160      A$=STR$flt%(l%)+";"
29170      FORl1%=0TO2:A$+=STR$flj%(l%,l1%)+";"+STR$flc%(l%,l1%)+";"+flc$(l%,l1%)+";"+STR$fln%(l%,l1%)+";":NEXTl1%
29180      A$+=STR$fla%(l%)+";"+fla$(l%)
29190      BPUT#f1%,A$
29200      ENDIF
29210    NEXTl%:PROCcf(f1%):PROCsettype(confdir$+".filters",&FFF)
29220  ENDIF
29230ENDIF
29240ENDPROC
29250
29260DEFPROCsetfiltwin(n%)
29270LOCALa$,g$,l%,l1%
29280CASEflt%(n%)OF
29290  WHEN1:g$="News"
29300  WHEN2:g$="Mail"
29310  WHEN3:g$="Any"
29320  OTHERWISE:g$="Unset"
29330ENDCASE
29340PROCupdateiconstring(fwin%,1,g$)
29350FORl1%=0TO2
29360  CASEflc%(n%,l1%)OF
29370    WHEN1:g$="From"
29380    WHEN2:g$="To"
29390    WHEN3:g$="Subject"
29400    WHEN4:g$="Group"
29410    WHEN5:g$="Reply To"
29420    WHEN6:g$="Precedence"
29430    WHEN7:g$="Envelope"
29440    OTHERWISE:g$="None":flc$(n%,l1%)=""
29450  ENDCASE
29460  PROCupdateiconstring(fwin%,2+l1%,g$)
29470  PROCupdateiconstring(fwin%,5+l1%,LEFT$(flc$(n%,l1%),18))
29480  PROCsetinv(fwin%,8+l1%,fln%(n%,l1%))
29490NEXTl1%
29500FORl1%=11TO14:PROCsetinv(fwin%,l1%,0):NEXT
29510IFflc%(n%,1)>0THEN
29520  IFflj%(n%,1)=0THENPROCsetinv(fwin%,11,1)ELSEPROCsetinv(fwin%,12,1)
29530  IFflc%(n%,2)>0THEN
29540    IFflj%(n%,2)=0THENPROCsetinv(fwin%,13,1)ELSEPROCsetinv(fwin%,14,1)
29550  ENDIF
29560ENDIF
29570CASEfla%(n%)OF
29580  WHEN1:g$="Junk"
29590  WHEN2:g$="Kill"
29600  WHEN3:g$="Redirect"
29610  WHEN4:g$="Submit"
29620  OTHERWISE:g$="":fla$(n%)=""
29630ENDCASE
29640PROCupdateiconstring(fwin%,15,g$)
29650PROCupdateiconstring(fwin%,16,LEFT$(fla$(n%),98))
29660PROCupdateiconstring(fwin%,17,"Filter "+STR$(n%+1))
29670PROClosecaret
29680filt%()=0:FORl%=0TOnfilt%
29690  CASEflt%(l%)OF
29700    WHEN1:filt%(1)+=1
29710    WHEN2:filt%(0)+=1
29720    WHEN3:filt%(0)+=1:filt%(1)+=1
29730  ENDCASE
29740NEXTl%
29750ENDPROC
29760
29770DEFPROCdelfilt(n%)
29780LOCALl%,l1%:FORl%=n%TOnfilt%-1
29790  flt%(l%)=flt%(l%+1):fla%(l%)=fla%(l%+1):fla$(l%)=fla$(l%+1)
29800  FORl1%=0TO2:flc%(l%,l1%)=flc%(l%+1,l1%):flc$(l%,l1%)=flc$(l%+1,l1%):fln%(l%,l1%)=fln%(l%+1,l1%):NEXTl1%
29810NEXTl%
29820flt%(nfilt%)=0:fla%(nfilt%)=0:fla$(nfilt%)=""
29830FORl1%=0TO2:flc%(nfilt%,l1%)=0:flc$(nfilt%,l1%)="":fln%(nfilt%,l1%)=0:flj%(nfilt%,l1%)=0:NEXTl1%
29840IFnfilt%>0THENnfilt%-=1
29850IFcfilt%>nfilt%THENcfilt%-=1
29860PROCsetfiltwin(cfilt%):PROCsavefilters
29870ENDPROC
29880
29890DEFPROCaddfilt
29900IFnfilt%=maxfilt%THEN
29910  PROCmessage0("Ffull",0)
29920  ELSE
29930  IFflt%(nfilt%)>0THENnfilt%+=1
29940  flt%(nfilt%)=0:cfilt%=nfilt%:PROCsetfiltwin(cfilt%)
29950  PROCupdateiconstring(fwin%,17,"Edit Filter "+STR$(nfilt%+1))
29960ENDIF
29970ENDPROC
29980
29990DEFPROCsetfilt(n%)
30000LOCALa%,l1%,t$,a$,b$,A$
30010a%=INSTR("NMA",LEFT$(FNic_str(fwin%,1),1))
30020flt%(n%)=a%:IFa%<1THENPROCdelfilt(n%):PROCmessage0("Fbadt",0):ENDPROC
30030FORl1%=0TO2
30040  a%=INSTR("FTSGRPE",LEFT$(FNic_str(fwin%,2+l1%),1))
30050  flc%(n%,l1%)=a%:IFa%>0THEN
30060    flc$(n%,l1%)=FNic_str(fwin%,5+l1%):fln%(n%,l1%)=FNrdinv(fwin%,8+l1%)
30070    ELSE
30080    flc$(n%,l1%)="":fln%(n%,l1%)=0
30090  ENDIF
30100NEXTl1%
30110IFFNrdinv(fwin%,12)THENflj%(n%,1)=1ELSEflj%(n%,1)=0
30120IFFNrdinv(fwin%,14)THENflj%(n%,2)=1ELSEflj%(n%,2)=0
30130fla%(n%)=INSTR("JKRS",LEFT$(FNic_str(fwin%,15),1))
30140fla$(n%)=FNic_str(fwin%,16)
30150PROCsetfiltwin(n%):PROCsavefilters
30160ENDPROC
30170
30180DEFPROCinitgrpdata
30190LOCALl%,add%,ok%
30200l%=0:l%=FNflines(grpinfo$)
30210IFl%=0THEN
30220  PROCprint(FNmsg0("Gcount")," "," "," ")
30230  l%=FNcountgroups(0,newsroot$+".News")
30240  ENDIF
30250PROCdimgrp(l%)
30260DIMuser$(maxusr%),userf$(maxusr%)
30270DIMupost%(maxusr%),ukm%(maxusr%),ukn%(maxusr%),ugrp%(maxusr%)
30280PROCgetmodgw
30290PROCreadgrpdata
30300ENDPROC
30310
30320DEFFNflines(f$)
30330LOCALa$,l%
30340f1%=FNopenin(f$)
30350IFf1%<>0THEN
30360  REPEATa$=GET$#f1%:l%+=1:UNTILEOF#f1%:PROCcf(f1%)
30370ENDIF
30380=l%
30390
30400DEFPROCdimgrp(n%)
30410maxgroup%=n%+addgrp%:IFmaxgroup%<mingrp%THENmaxgroup%=mingrp%
30420groups%=n%:n%=maxgroup%:maxactive%=n%*2
30430DIMactive$(maxactive%)
30440DIMgrpexp%(n%),grpmod%(n%)
30450DIMgrp$(n%),grpf%(n%):grp$()=STRING$(40," "):grp$()="":grpf%()=-1
30460DIMgrpseq%(n%),grpa%(n%):grpa%()=-1
30470ENDPROC
30480
30490DEFPROCgetmodgw
30500LOCALl%
30510DIMmodgw$(20),mngw$(10):modgw$(0)="moderators.uu.net"
30520f1%=FNopenin(support$+".modpaths")
30530IFf1%>0THEN
30540  l%=0:REPEAT:l%+=1:modgw$(l%)=GET$#f1%:UNTILl%=20OREOF#f1%:PROCcf(f1%)
30550ENDIF
30560f1%=FNopenin(support$+".mail2news")
30570IFf1%>0THEN
30580  l%=0:REPEAT:l%+=1:mngw$(l%)=GET$#f1%:UNTILl%=10OREOF#f1%:PROCcf(f1%)
30590ENDIF
30600ENDPROC
30610
30620DEFPROCsetuwin(u$)
30630LOCALu%,f$:u%=FNuserno(u$)
30640IFu%>-1THEN
30650  PROCupdateiconstring(uwin%,20,u$)
30660  PROCupdateiconstring(uwin%,2,STR$ugrp%(u%))
30670  PROCupdateiconstring(uwin%,13,LEFT$(userf$(u%),32))
30680  PROCsetinv(uwin%,3,ukm%(u%))
30690  PROCsetinv(uwin%,4,ukn%(u%))
30700  PROCsetinv(uwin%,5,upost%(u%))
30710  f$=FNupath(u$)+".vacation":PROCupdateiconstring(uwin%,21,FNmsg0("Inactive"))
30720  IFFNobjtype(f$)=1ANDFNfilesize(f$)>0PROCupdateiconstring(uwin%,21,FNmsg0("Active"))
30730ENDIF
30740ENDPROC
30750
30760DEFPROCeditvac(u$):IFFNbadvac(u$)THENENDPROC
30770LOCALf$:f$=FNupath(u$)+".vacation"
30780IFFNobjtype(f$)=0THENf2%=FNopenout(f$):IFf2%>0THENBPUT#f2%,u$+" is away":PROCcf(f2%):PROCvacset(u$)
30790PROCsettype(f$,&FFF):SYS"XWimp_StartTask","Filer_Run "+f$:PROCupdateiconstring(uwin%,21,"Active")
30800ENDPROC
30810
30820DEFPROCnewvac(u$,s$):IFFNbadvac(u$)THENENDPROC
30830LOCALf$,F%:f$=FNupath(u$)+".vacation"
30840F%=FNdelfile(f$):F%=FNcopyfile(s$,f$)
30850IFF%=0THENPROCupdateiconstring(uwin%,21,FNmsg0("Active")):PROCvacset(u$)
30860ENDPROC
30870
30880DEFPROCvacset(u$)
30890PROCmessage1("Uvacset",u$,0)
30900ENDPROC
30910
30920DEFPROCcancvac(u$)
30930LOCALF%:F%=FNdelfile(FNupath(u$)+".vacation")
30940IFF%=0PROCupdateiconstring(uwin%,21,FNmsg0("Inactive"))
30950ENDPROC
30960
30970DEFFNbadvac(u$)
30980LOCALf%:f%=0:u$=FNlower(u$)
30990f%=(u$="root"ORu$="postmaster"ORu$="default")
31000IFf%THENVDU7:PROCmessage0("Ubadvac",0)
31010=f%
31020
31030DEFFNuserno(u$)
31040LOCALl%,r%:r%=0:l%=0
31050WHILEl%<maxusr%ANDu$<>user$(l%):l%+=1:ENDWHILE
31060IFu$=user$(l%)ANDu$>""THENr%=l%
31070=r%
31080
31090DEFPROCinituserdata
31100LOCALok%,next%,n%,u%,uc%,err%,u$,p$
31110WHILEFNvarval("UserHome$Dir")=""
31120  ok%=FNconfirm(FNmsg0("Unohome"))
31130  IFok%=1THENSYS"OS_CLI","set UserHome$Dir "+newsroot$+".UserHome"
31140ENDWHILE
31150userhome$=FNvarval("UserHome$Dir")
31160user$(0)="default":ugrp%(0)=10:ukm%(0)=1:ukn%(0)=1:upost%(0)=1
31170IFFNobjtype(userhome$)<2THEN
31180  PROCensuredir(userhome$):PROCfindallusers
31190  ELSE
31200  next%=0:uc%=1:REPEAT
31210  SYS"XOS_GBPB",9,userhome$,tmp%,1,next%,255,"*"TO ,,,n%,next%;err%
31220  u$=FNstr(tmp%):IFFNlower(u$)="default"THENu%=0ELSEu%=uc%:uc%+=1
31230  IF(err%AND1)=0ANDn%>0ANDu%<maxusr%THEN
31240    user$(u%)=u$:p$=FNupath(u$)
31250    f0%=FNopenin(p$+".userinfo")
31260    IFf0%>0THEN
31270      ugrp%(u%)=VALGET$#f0%:upost%(u%)=VALGET$#f0%
31280      ukm%(u%)=VALGET$#f0%:ukn%(u%)=VALGET$#f0%:PROCcf(f0%)
31290      ELSE
31300      PROCcpdefusr(u%)
31310    ENDIF
31320    f0%=FNopenin(p$+".forward")
31330    IFf0%>0THENuserf$(u%)=GET$#f0%:PROCcf(f0%)ELSEuserf$(u%)=""
31340  ENDIF
31350  UNTILnext%<0OR(err%AND1)<>0
31360ENDIF
31370PROCsetuwin("default")
31380ENDPROC
31390
31400DEFPROCcpdefusr(u%)
31410IFu%>0THEN
31420ugrp%(u%)=ugrp%(0):ukm%(u%)=ukm%(0):ukn%(u%)=ukn%(0):upost%(u%)=upost%(0)
31430CASEuser$(u%)OF
31440  WHEN"root":ugrp%(u%)=0
31450  WHEN"postmaster":ugrp%(u%)=1
31460ENDCASE
31470ENDIF
31480PROCsaveuserinfobyno(u%)
31490ENDPROC
31500
31510DEFPROCgetuserinfo
31520LOCALu%:u%=FNuserno(FNic_str(uwin%,20))
31530IFu%>-1THEN
31540  ugrp%(u%)=VALFNic_str(uwin%,2)
31550  ukm%(u%)=FNrdinv(uwin%,3)
31560  ukn%(u%)=FNrdinv(uwin%,4)
31570  upost%(u%)=FNrdinv(uwin%,5)
31580  userf$(u%)=FNic_str(uwin%,13)
31590ENDIF
31600ENDPROC
31610
31620DEFPROCsaveuserinfo
31630LOCALu%:u%=FNuserno(FNic_str(uwin%,20))
31640PROCsaveuserinfobyno(u%)
31650ENDPROC
31660
31670DEFPROCsaveuserinfobyno(u%)
31680LOCALf$,l%
31690IFu%>-1THEN
31700  f$=FNupath(user$(u%)):PROCensuredir(f$):f$+=".userinfo"
31710  f0%=FNopenout(f$)
31720  IFf0%>0THEN
31730    BPUT#f0%,STR$ugrp%(u%):BPUT#f0%,STR$upost%(u%)
31740    BPUT#f0%,STR$ukm%(u%):BPUT#f0%,STR$ukn%(u%)
31750    PROCcf(f0%):PROCsettype(f$,&FFF)
31760  ENDIF
31770  f$=FNupath(user$(u%))+".forward"
31780  f0%=FNopenout(f$)
31790  IFf0%>0THENBPUT#f0%,userf$(u%):PROCcf(f0%):PROCsettype(f$,&FFF)
31800  l%=FNruntransportfile(8,"",user$(u%),STR$ugrp%(u%))
31810ENDIF
31820ENDPROC
31830
31840DEFFNconfirm(A$)
31850LOCALynchoice%:REM 1=yes, no=2
31860PROCsetconfirm(FNmsg0("Yes"),FNmsg0("No"))
31870PROCupdateiconstring(yesno%,0,LEFT$(A$,78)):PROCcfront(yesno%,0,0)
31880ynchoice%=0:REPEATPROCpoll(100):UNTILynchoice%>0
31890=ynchoice%
31900
31910DEFFNconfirm2(A$)
31920LOCALynchoice%:REM 1=continue, 2=defer
31930PROCsetconfirm(FNmsg0("Continue"),FNmsg0("Skip"))
31940PROCupdateiconstring(yesno%,0,LEFT$(A$,78)):PROCcfront(yesno%,0,0)
31950ynchoice%=0:REPEATPROCpoll(100):UNTILynchoice%>0
31960=ynchoice%
31970
31980DEFPROCsetconfirm(A$,B$)
31990PROCupdateiconstring(yesno%,1,A$):PROCupdateiconstring(yesno%,2,B$)
32000ENDPROC
32010
32020DEFPROCautoconfigure
32030IFgrp$(1)=""PROCfindallgroups:PROCmessage("",0)
32040IFuser$(3)=""PROCfindallusers:PROCmessage("",0)
32050ENDPROC
32060
32070DEFPROCfindallusers
32080LOCALn%,l%,g$:n%=0
32090l%=FNadduser("default"):l%=FNadduser("root"):l%=FNadduser("postmaster")
32100REPEATg$=grp$(n%)
32110IFLEFT$(g$,6)="Email."ANDINSTR(g$,".",7)<1THENl%=FNadduser(MID$(g$,7))
32120n%+=1:UNTILn%>groups%
32130ENDPROC
32140
32150DEFFNadduser(A$)
32160LOCALn%,ok%
32170IFrw%THEN
32180  WHILEuser$(n%)<>A$ANDuser$(n%)>""ANDn%<maxusr%:n%+=1:ENDWHILE
32190  IFuser$(n%)=""THEN
32200    user$(n%)=A$:PROCensuredir(FNupath(A$))
32210    PROClog("Added user: "+A$):ok%=TRUE
32220    PROCcpdefusr(n%)
32230    PROCnbupdate(4,A$,0,"","")
32240    n%=FNruntransportfile(6,"",A$,STR$ugrp%(n%))
32250  ENDIF
32260ENDIF
32270=ok%
32280
32290DEFFNupath(u$)
32300=userhome$+"."+u$
32310
32320DEFFNdeluser(A$)
32330LOCALp$,n%,ok%,l%
32340IFrw%THEN
32350  WHILEcl_user$(n%)<>A$ANDn%<maxcl%:n%+=1:ENDWHILE
32360  IFcl_user$(n%)=A$ORA$="root"ORA$="postmaster"THEN=0
32370  p$=FNupath(A$)
32380  IFFNobjtype(p$)>1THEN
32390    PROCwipe(p$):IFFNobjtype(p$)=0THENok%=TRUE
32400  ENDIF
32410  IFok%THEN
32420    PROCnbupdate(5,A$,0,"",""):PROClog("Removed user: "+A$)
32430    n%=FNruntransportfile(7,"",A$,"")
32440    n%=0:WHILEuser$(n%)<>A$ANDuser$(n%)<>"":n%+=1:ENDWHILE
32450    IFuser$(n%)=A$THENFORl%=n%+1TOmaxusr%:user$(l%-1)=user$(l%):NEXTl%
32460    user$(maxusr%)=""
32470  ENDIF
32480ENDIF
32490=ok%
32500
32510DEFFNuserok(A$)
32520LOCALn%:A$=FNlower(A$)
32530WHILEFNlower(user$(n%))<>A$ANDuser$(n%)>"":n%+=1:ENDWHILE
32540IFuser$(n%)=""THEN=0
32550=TRUE
32560
32570DEFPROCreadgrpdata
32580LOCALa$,b$,g$,lg$,ty%,no%,resave%
32590PROChgon:grpexp%()=0:grpmod%()=0:resave%=0:groups%=0
32600f1%=FNopenin(grpinfo$)
32610v%=0:IFf1%>0THENv%=VALGET$#f1%
32620IF(v%>=groupver%ORv%=13)ANDf1%<>0 THEN
32630  WHILEEOF#f1%=FALSE ANDgroups%<maxgroup%
32640    a$=GET$#f1%:g$=FNcheckcase(FNgetpar(a$," "))
32650    IFg$>""ANDINSTR(g$,"*")<1THEN
32660      REM discard duplicates...
32670      IFg$<>lg$THEN
32680        IFg$>lg$THEN
32690          groups%+=1:no%=groups%:lg$=g$
32700          ELSE
32710          no%=FNaddgrptolist(g$,FALSE)
32720        ENDIF
32730        grp$(no%)=g$:ty%=FNspecialgrp(g$)
32740        grpseq%(no%)=-VALFNgetpar(a$," ")
32750        A%=VALFNgetpar(a$," ")
32760        grpexp%(no%)=VALFNgetpar(a$," ")
32770        b$=FNgetpar(a$," "):grpmod%(no%)=VALb$
32780        IFb$=""ANDty%=0THENPROCmessage1("Mcheck",g$,0):grpmod%(no%)=FNisgrpmod(g$):resave%=TRUE:PROCpoll(4*slice%)
32790        IFty%>1ANDv%<groupver%THENgrpexp%(no%)=1E6:resave%=TRUE
32800      ENDIF
32810    ENDIF
32820  ENDWHILE
32830  PROCcf(f1%):PROCmessage("",0)
32840ENDIF
32850IFresave%THENPROCwritegrpdata
32860PROCseticonstring(gwin%,25,grp$(1)):gwin_g%=1:PROCsetexpicon(1):PROChgoff
32870ENDPROC
32880
32890DEFFNisgrpmod(g$)
32900g$=FNcheckmoderation(g$,1)
32910=ABS(g$>"")
32920
32930DEFFNgetpar(RETURN A$,s$)
32940LOCALB$,l%
32950l%=INSTR(A$,s$)
32960IFl%>0THEN
32970  B$=LEFT$(A$,l%-1):A$=MID$(A$,l%+1)
32980  ELSE
32990  B$=A$:A$=""
33000ENDIF
33010=B$
33020
33030DEFPROCsetexpicon(g%)
33040LOCALn%,a$:n%=grpexp%(g%)
33050IFn%>10000THEN
33060  a$="Never"
33070  ELSE
33080  IFn%=0THENa$="Default"ELSEa$=STR$n%
33090ENDIF
33100PROCupdateiconstring(gwin%,1,a$)
33110ENDPROC
33120
33130DEFPROCwritegrpdata
33140LOCALA$,F%,l%
33150IFrw%THEN
33160  F%=FNdelfile(grpinfo$+"~")
33170  F%=FNrename(grpinfo$,grpinfo$+"~")
33180  f1%=FNopenout(grpinfo$)
33190  IFf1%=0THENPROCclosefilebyname(grpinfo$):f1%=FNopenout(grpinfo$)
33200  IFf1%<>0THEN
33210    BPUT#f1%,STR$groupver%
33220    FORl%=1TOgroups%
33230      IFgrp$(l%)>""THEN
33240        BPUT#f1%,grp$(l%)+" "+STR$(ABSgrpseq%(l%))+" 0 "+STR$grpexp%(l%)+" "+STR$grpmod%(l%)
33250      ENDIF
33260    NEXTl%
33270    PROCcf(f1%):PROCsettype(grpinfo$,&FFF)
33280    ELSE
33290    VDU7:PROCmessage0("Grpinfo",1)
33300  ENDIF
33310ENDIF
33320ENDPROC
33330
33340DEFPROCcreatedirs
33350PROChgon
33360newsroot$=FNvarval("Newsdir$dir")
33370IFFNobjtype(newsroot$)<2THENnewsroot$=""
33380nbdir$=FNvarval("Newsbase$dir")
33390transdir$=nbdir$+".transports"
33400support$=nbdir$+".support.newsbase"
33410resdir$=nbdir$+".resources"
33420dpath$=newsroot$+".news."
33430basedir$=newsroot$+".newsbase"
33440workdir$=basedir$+".work"
33450confdir$=basedir$+".config"
33460baddir$=basedir$+".debug"
33470tmpdir$=basedir$+".scratch"
33480outdir$=basedir$+".spool"
33490lindir$=outdir$+".local"
33500outdir$(0)=outdir$+".mail"
33510outdir$(1)=outdir$+".news"
33520IFnewsroot$>""THEN
33530PROCensuredir(basedir$)
33540PROCensuredir(confdir$)
33550PROCensuredir(baddir$)
33560PROCensuredir(workdir$)
33570PROCensuredir(LEFT$(dpath$))
33580PROCensuredir(tmpdir$)
33590PROCensuredir(outdir$)
33600PROCensuredir(lindir$)
33610PROCensuredir(outdir$(0))
33620PROCensuredir(outdir$(1))
33630ENDIF
33640SYS"XOS_CLI","set Newsbase$Support "+nbdir$+".support"
33650SYS"XOS_CLI","set Newsbase$Data "+basedir$
33660SYS"XOS_CLI","set Newsbase$Config "+confdir$
33670SYS"XOS_CLI","set Newsbase$Local "+lindir$
33680grpinfo$=basedir$+".grpinfo"
33690newgrp$=basedir$+".newgroups"
33700lastng$=confdir$+".ngtime"
33710lockfile$=basedir$+".lock"
33720PROChgoff
33730ENDPROC
33740
33750DEFPROCensuredir(f$)
33760LOCALt%:IFf$>""THEN
33770  t%=FNobjtype(f$):IFt%<2ORt%>3THENIFrw%THENSYS"XOS_File",8,f$TO;t%
33780ENDIF
33790ENDPROC
33800
33810DEFFNrename(s$,d$)
33820LOCALF%:SYS"XOS_FSControl",25,s$,d$TOerr%;F%
33830IF(F%AND1) AND(!err%MOD&FF)=&C4 THEN
33840  F%=FNdelfile(d$)
33850  SYS"XOS_FSControl",25,s$,d$TOerr%;F%
33860ENDIF
33870=(F%AND1)
33880
33890DEFFNcopyfile(s$,d$)
33900LOCALF%
33910SYS"XOS_FSControl",26,s$,d$ TO;F%
33920=(F%AND1)
33930
33940DEFFNmovefile(s$,d$)
33950LOCALF%:F%=FNrename(s$,d$)
33960IFF%<>0SYS"XOS_FSControl",26,s$,d$,(1<<7) TO;F%
33970=(F%AND1)
33980
33990DEFFNdelfile(f$)
34000LOCALF%:SYS"XOS_File",6,f$TO;F%
34010=(F%AND1)
34020
34030DEFFNforcedelfile(f$)
34040LOCALF%:F%=FNdelfile(f$)
34050IFF%<>0PROCclosefilebyname(f$):F%=FNdelfile(f$)
34060=F%
34070
34080DEFPROCwipe(f$)
34090SYS"XOS_FSControl",27,f$,,3
34100ENDPROC
34110
34120DEFFNfilesize(f$)
34130LOCALs%,F%:SYS"XOS_File",17,f$TO,,,,s%;F%
34140IF(F%AND1)THENs%=-1
34150=s%
34160
34170DEFFNfileattr(f$)
34180LOCALs%:SYS"XOS_File",17,f$TO,,,,,s%;F%
34190IF(F%AND1)THENs%=-1
34200=s%
34210
34220DEFPROCclosefilebyname(f$)
34230LOCALa$,l%,r%,F%
34240IFFNobjtype(f$)<>1THENENDPROC
34250f$=FNcanon(f$)
34260FORl%=1TO255:SYS"XOS_Args",7,l%,tmp%,,,256TO,,,,,r%;F%
34270IF(F%AND1)=0THENa$=FNstr(tmp%):IFa$=f$THENCLOSE#l%
34280NEXTl%
34290ENDPROC
34300
34310DEFPROCaddtoindex(g%,n%)
34320LOCALp%,p1%,lm%,lf%,ls%,lr%
34330IFg%<>ibufg%ORibufptr%>=ibufsize%THENPROCwriteindexbuf
34340IFgrpa%(g%)>=0THENgrpa%(g%)+=1:REM increment article total
34350p%=ibuf%+ibufptr%:$p%=null$
34360!p%=n%:p%!8=artdate%
34370p%!12=0:p%!16=0:p1%=p%+20
34380REM 3 cases:
34390REM 1 is, all of messid, from, subj, refs fit in 176 bytes (-> type 1)
34400REM 2 is, all of messid, from, subj fit; refs go separately (-> type 0+2)
34410REM 3 is, from & subj need truncating to fit; refs go separately (-> type 0+2)
34420IFmessid$=""THENmessid$="<0>"
34430IFsubject$=""THENsubject$="(no subject)"
34440IFfrom$=""THENfrom$="(no sender)"
34450lm%=LENmessid$:lf%=LENfrom$:ls%=LENsubject$:lr%=LENreference$
34460IF(lm%+lf%+ls%+lr%)<176THEN
34470  $p1%=messid$:$(p1%+lm%+1)=from$:$(p1%+lm%+lf%+2)=subject$
34480  $(p1%+lm%+lf%+ls%+3)=reference$:p%!4=1
34490  ibufptr%+=200:ibufg%=g%
34500  ELSE
34510  p%!4=0
34520  IF(lm%+lf%+ls%)<177THEN
34530    $p1%=messid$:$(p1%+lm%+1)=from$:$(p1%+lm%+lf%+2)=subject$
34540    ELSE
34550    messid$=LEFT$(messid$,60):$p1%=messid$:p1%=p1%+LENmessid$+1
34560    from$=LEFT$(from$,40):$p1%=from$:p1%=p1%+LENfrom$+1
34570    $p1%=LEFT$(subject$,176-(p%+20-p1%))
34580    p1%?199=13
34590  ENDIF
34600  ibufptr%+=200:ibufg%=g%
34610  IFthread%<>0ANDreference$>""THEN
34620    IFibufptr%>=ibufsize%THENPROCwriteindexbuf
34630    p%=ibuf%+ibufptr%:$p%=null$:!p%=n%:p%!4=2:p%!8=0
34640    p%!12=0:p%!16=0:p%+=20:$p%=LEFT$(reference$,176):p%?199=13
34650    ibufptr%+=200
34660  ENDIF
34670ENDIF
34680ENDPROC
34690
34700DEFPROCwriteindexbuf
34710LOCALp%,err%,F%
34720IFibufptr%=0ORibufg%=0THENENDPROC
34730REPEAT
34740  f1%=FNopenup(FNnotopath(ibufg%)+".~index")
34750  IFf1%=0THENf1%=FNmakeindexfile(ibufg%)
34760  IFf1%<>0THEN
34770    p%=EXT#f1%
34780    SYS"XOS_GBPB",1,f1%,ibuf%,ibufptr%,p%TOerr%;F%
34790    PROCcf(f1%)
34800  ENDIF
34810  IF(F%AND1)THEN
34820    IF(!err%AND&FF)=&C6THENPROCcheckdisk:ELSESYS"OS_GenerateError",err%
34830  ENDIF
34840UNTIL(F%AND1)=0
34850ibufptr%=0
34860ENDPROC
34870
34880DEFFNifile(g%)
34890=FNnotopath(g%)+".~index"
34900
34910DEFFNfindartid(g%,a$)
34920LOCALg$,f%,f$,A$,r3%:f%=0
34930IFg%>0THEN
34940  a$=FNlower(a$):a$=FNclean(a$)
34950  f$=FNifile(g%)
34960  f1%=FNopenin(f$)
34970  IFf1%<>0THEN
34980  p%=0:PROChgon
34990  REPEAT
35000    SYS"OS_GBPB",3,f1%,tmp%,200,p%TO,,,r3%,p%
35010    A$=FNlower(FNstr(tmp%+20)):IFA$=a$THENf%=!tmp%
35020  UNTILr3%>0ORf%<>0
35030  PROCcf(f1%):PROChgoff
35040  ENDIF
35050ENDIF
35060=f%
35070
35080DEFFNmakeindexfile(g%)
35090LOCALp$,f$:p$=FNnotopath(g%):f$=FNifile(g%)
35100PROCcheckdisk
35110IFFNobjtype(p$+".~x")<2THENPROCconvrn(p$)
35120f1%=FNopenout(f$)
35130IFf1%=0THENPROCmessage1("Ifail",p$,1)
35140=f1%
35150
35160DEFFNfindfile(g%,n%,expand%)
35170LOCALf$,d$,a$,o%,l$
35180f$="":a$=RIGHT$("00000000"+STR$n%,8)
35190IFg%=findg%ANDfindp$>""THEN
35200  IFFNobjtype(findp$+"."+a$)=1THENf$=findp$+"."+a$
35210ENDIF
35220IFf$=""THEN
35230  l$=FNartdir(n%)
35240  d$=FNnotopath(g%)+".~x."+l$
35250  REPEAT
35260    o%=FNobjtype(d$+"."+a$)
35270    IFo%=1THENf$=d$+"."+a$
35280    IFo%=0THENo%=FNobjtype(d$+"."+l$):IFo%=2 d$=d$+"."+l$
35290  UNTILf$>""ORo%<2
35300  IFf$=""THEN
35310    d$=FNnotopath(g%)
35320    REPEAT
35330      o%=FNobjtype(d$+"."+a$)
35340      IFo%=1THENf$=d$+"."+a$
35350      IFo%=0THENo%=FNobjtype(d$+".~x"):IFo%=2 d$=d$+".~x"
35360    UNTILf$>""ORo%<2
35370  ENDIF
35380  IFf$>""THENfindp$=d$:findg%=g%
35390ENDIF
35400IFf$>""ANDexpand%THENPROCdecompress(f$)
35410=f$
35420
35430DEFFNdecompheader(ib%,ibs%,ob%,obs%)
35440LOCALws%,curslot%,n%,f%,size%
35450SYS"Squash_Decompress",8,ibs% TOws%
35460SYS"Wimp_SlotSize",-1,-1TOcurslot%,n%,f%
35470IFn%+f%>ws%THEN
35480  REM take workspace in top of wimpslot
35490  SYS"Wimp_SlotSize",curslot%+ws%,-1
35500  SYS"Squash_Decompress",0,curslot%+&8000,ib%,ibs%,ob%,obs%TO,,,,,size%
35510  size%=obs%-size%
35520  SYS"Wimp_SlotSize",curslot%,-1
35530ENDIF
35540REM return size of data in output buffer
35550=size%
35560
35570DEFPROCdecompress(RETURN f$)
35580LOCALr4%,s%,ns%,attr%,t$,F%
35590IFFNfiletype(f$)=&FCA THEN
35600  PROChgon
35610  IFrw%=0THEN
35620    F%=FNcopyfile(f$,"<Wimp$Scrap>"):IFF%=0THENf$="<Wimp$Scrap>"
35630  ENDIF
35640  REM get file attributes & set to RW access
35650  SYS"XOS_File",17,f$TO,,,,s%,attr%:SYS"XOS_File",4,f$,,,,3
35660  f1%=FNopenin(f$):r4%=0
35670  IFf1%<>0THENSYS"XOS_GBPB",4,f1%,tmp%,8TO,,,,r4%:PROCcf(f1%)
35680  IFr4%>0THEN
35690    ns%=tmp%!4
35700    IFFNdecompressfile(f$,s%,ns%)=0THEN
35710      t$=FNtmpfile
35720      PROCrunsupport("squash "+f$+" "+t$):s%=FNfilesize(t$)
35730      REM test that the size is right...
35740      IFs%=ns%THEN
35750        PROCprint("",FNmsg0("CompArt1"),"","")
35760        F%=FNdelfile(f$):F%=FNrename(t$,f$)
35770        ELSE
35780        PROCmessage0("CompFail2",0):F%=FNdelfile(t$)
35790      ENDIF
35800    ENDIF
35810    ELSE
35820    PROCmessage0("CompFail1",0)
35830  ENDIF
35840  REM reset original file attributes
35850  SYS"XOS_File",4,f$,,,,attr%
35860  PROChgoff
35870ENDIF
35880ENDPROC
35890
35900DEFPROCcompress(f$,os%)
35910LOCALr4%,ns%,t$,attr%,F%,art$
35920IFos%<0THENos%=FNfilesize(f$)
35930IFos%>complimit%THEN
35940  art$=STR$VAL(FNleaf(f$)):IFart$="0"THENart$="..."
35950  IFFNfiletype(f$)=&FFF THEN
35960    PROChgon
35970    REM get file attributes & set to RW access
35980    SYS"XOS_File",17,f$TO,,,,,attr%:SYS"XOS_File",4,f$,,,,3
35990    REM first try built-in routine...
36000    IFFNcompressfile(f$)=0THEN
36010      IFFNobjtype(support$+".squash")=1THEN
36020        t$=FNtmpfile:PROCrunsupport("squash "+f$+" "+t$)
36030        f1%=FNopenin(t$):r4%=0
36040        IFf1%<>0THENSYS"XOS_GBPB",4,f1%,tmp%,8TO,,,,r4%:PROCcf(f1%)
36050        IFr4%>0THEN
36060          ns%=tmp%!4
36070          IFos%=ns%THEN
36080            F%=FNdelfile(f$):F%=FNrename(t$,f$)
36090            PROCprint("",FNmsg1("CompArt2",art$),"","")
36100            ELSE
36110            F%=FNdelfile(t$)
36120          ENDIF
36130          ELSE
36140          F%=FNdelfile(t$)
36150        ENDIF
36160      ENDIF
36170      ELSE
36180      PROCprint("",FNmsg1("CompArt3",art$),"","")
36190    ENDIF
36200    REM reset original file attributes
36210    SYS"XOS_File",4,f$,,,,attr%
36220    PROChgoff
36230  ENDIF
36240ENDIF
36250ENDPROC
36260
36270DEFFNcompressfile(RETURN f$)
36280LOCALws%,wss%,curslot%,f%,size%,out%,last%,ok%,buf%
36290LOCALibuf%,ibufs%,obuf%,obufs%,left%,r1%,r2%,r3%,r4%,r5%,F%
36300LOCALo%,l%,e%,s%,attr%,avail%,fast%,F%:fast%=TRUE
36310LOCALf2$
36320REM get file attributes
36330SYS"XOS_File",17,f$TOo%,,l%,e%,s%
36340SYS"Squash_Compress",8,s%TOwss%
36350SYS"Wimp_SlotSize",-1,-1TOcurslot%,,f%
36360ibufs%=20+(s%DIV4*4+4):obufs%=ibufs%:avail%=f%-wss%
36370IFavail%>&4000 THEN
36380  REM calc available & needed memory...
36390  IF(ibufs%+obufs%)>avail%THEN
36400    ibufs%=avail%DIV2:obufs%=avail%DIV2:fast%=FALSE
36410  ENDIF
36420  REM now get the RAM...
36430  SYS"Wimp_SlotSize",curslot%+ibufs%+obufs%+wss%,-1
36440  ws%=&8000+curslot%:ibuf%=ws%+wss%:obuf%=ibuf%+ibufs%
36450  IFfast%THEN
36460    SYS"XOS_File",16,f$,ibuf%,0TO;F%
36470    IF(F%AND1)=0THEN
36480      SYS"XSquash_Compress",0,ws%,ibuf%,s%,obuf%+20,obufs%-20TOok%,,,,last%;F%
36490      $obuf%="SQSH":obuf%!4=s%:obuf%!8=l%:obuf%!12=e%:obuf%!16=0:ok%=(ok%=0)
36500      IF(F%AND1)THENok%=0:REM there was an error
36510      IFok%THENSYS"OS_File",0,f$,l%,e%,obuf%,last%
36520    ENDIF
36530    ELSE
36540    REM slow procedure...
36550    f1%=FNopenin(f$):ok%=0
36560    IFf1%>0THEN
36570      f2$=FNtmpfile:f2%=FNopenout(f2$):ptr1%=0:started%=0
36580      IFf2%>0THEN
36590        REM first write out squashfile header
36600        $obuf%="SQSH":obuf%!4=s%:obuf%!8=l%:obuf%!12=e%:obuf%!16=0
36610        SYS"OS_GBPB",2,f2%,obuf%,20
36620        REPEAT
36630          SYS"XOS_GBPB",3,f1%,ibuf%,ibufs%,ptr1%TO,,,left%,ptr1%;F%
36640          r1%=ws%:r2%=ibuf%:r3%=ibufs%-left%:r4%=obuf%:r5%=obufs%
36650          IFr3%>0AND(F%AND1)=0THEN
36660            REPEAT
36670              r0%=started%-2*(left%=0):started%=1
36680              SYS"XSquash_Compress",r0%,ws%,r2%,r3%,obuf%,obufs%TOok%,,r2%,r3%,r4%,r5%;F%
36690              IF(F%AND1)=0THENSYS"XOS_GBPB",2,f2%,obuf%,r4%-obuf%TO;F%
36700            UNTILok%<2OR(F%AND1)>0
36710            ptr1%-=r3%:REM rewind unused data
36720          ENDIF
36730        UNTIL(left%>0ANDok%=0)OR(F%AND1)>0
36740        ok%=(ok%=0):IF(F%AND1)>0THENok%=0:REM not okay if error
36750        PROCcf(f2%)
36760      ENDIF
36770      PROCcf(f1%)
36780      IFok%THEN
36790        F%=FNdelfile(f$):F%=FNrename(f2$,f$)
36800        SYS"OS_File",1,f$,l%,e%,attr%
36810      ENDIF
36820    ENDIF
36830  ENDIF
36840  SYS"Wimp_SlotSize",curslot%,-1
36850  IFok%THENPROCsettype(f$,&FCA)
36860ENDIF
36870REM return success status
36880=ok%
36890
36900DEFFNdecompressfile(f$,cs%,ds%)
36910REM cs% is comp size%, ds% is decomp size
36920LOCALws%,wss%,curslot%,f%,size%,out%,last%,ok%,buf%
36930LOCALo%,l%,e%,s%,attr%,avail%,fast%,F%:fast%=TRUE
36940LOCALibuf%,ibufs%,obuf%,obufs%,left%,r1%,r2%,r3%,r4%,r5%
36950LOCALf2$
36960REM variables are:
36970REM ws%,wss%                  are workspace base & size
36980REM ibuf%,ibufs%,obuf%,obufs% are input/output base & size
36990REM get file attributes
37000SYS"XOS_File",17,f$TOo%,,l%,e%,s%,attr%
37010SYS"Wimp_SlotSize",-1,-1TOcurslot%,,f%
37020SYS"Squash_Decompress",8,cs%-20TOwss%
37030avail%=f%-wss%:ibufs%=(cs%DIV4*4+4):obufs%=(ds%DIV4*4+4)
37040REM need at least workspace+16k to work, ok?
37050IFavail%>&4000 THEN
37060  REM calc available & needed memory...
37070  IF(ibufs%+obufs%)>avail%THEN
37080    ibufs%=avail%DIV2:obufs%=avail%DIV2:fast%=FALSE
37090  ENDIF
37100  REM now get the RAM...
37110  SYS"Wimp_SlotSize",curslot%+wss%+ibufs%+obufs%,-1,-1
37120  ws%=curslot%+&8000:ibuf%=ws%+wss%:obuf%=ibuf%+ibufs%
37130  IFfast%THEN
37140    REM fast case (enough RAM)
37150    SYS"XOS_File",16,f$,ibuf%,0TO;F%
37160    IF(F%AND1)=0THEN
37170      SYS"XSquash_Decompress",0,ws%,ibuf%+20,cs%-20,obuf%,obufs%TOok%,,,,last%;F%
37180      ok%=(ok%=0)
37190      IFok%AND(F%AND1)=0THENSYS"XOS_File",0,f$,l%,e%,obuf%,last%
37200    ENDIF
37210    ELSE
37220    REM slow case...
37230    f1%=FNopenin(f$):ok%=0
37240    IFf1%>0THEN
37250      f2$=FNtmpfile:f2%=FNopenout(f2$):ptr1%=20:started%=0
37260      IFf2%>0THEN
37270        REPEAT
37280          SYS"XOS_GBPB",3,f1%,ibuf%,ibufs%,ptr1%TO,,,left%,ptr1%;F%
37290          r1%=ws%:r2%=ibuf%:r3%=ibufs%-left%:r4%=obuf%:r5%=obufs%
37300          IFr3%>0AND(F%AND1)=0THEN
37310            REPEAT
37320              r0%=started%-2*(left%=0):started%=1
37330              SYS"XSquash_Decompress",r0%,ws%,r2%,r3%,obuf%,obufs%TOok%,,r2%,r3%,r4%,r5%;F%
37340              IF(F%AND1)=0THENSYS"XOS_GBPB",2,f2%,obuf%,r4%-obuf%TO;F%
37350            UNTILok%<2OR(F%AND1)>0
37360            ptr1%-=r3%:REM rewind unused data
37370          ENDIF
37380        UNTIL(left%>0ANDok%=0)OR(F%AND1)>0
37390        PROCcf(f2%):IF(F%AND1)>0THENok%=1:REM not okay if error
37400        ok%=(ok%=0):IFFNfilesize(f2$)<>ds%THENok%=0
37410      ENDIF
37420      PROCcf(f1%)
37430      IFok%THEN
37440        F%=FNdelfile(f$):F%=FNrename(f2$,f$)
37450        SYS"OS_File",1,f$,l%,e%,attr%
37460      ENDIF
37470    ENDIF
37480  ENDIF
37490  SYS"Wimp_SlotSize",curslot%,-1,-1
37500  IFok%THENPROCsettype(f$,&FFF):PROCprint("",FNmsg0("CompArt4"),"","")
37510ENDIF
37520REM return success status
37530=ok%
37540
37550DEFFNfirstart(g%)
37560LOCALf1%,rebuild%,p$,f$,s%,a%,F%
37570rebuild%=0
37580IFgrpf%(g%)<0ORgrpf%(g%)>ABSgrpseq%(g%)THEN
37590  grpf%(g%)=0:p$=FNnotopath(g%):f$=p$+".~index"
37600  f1%=FNopenin(f$)
37610  IFf1%<>0THEN
37620    !tmp%=0:SYS"XOS_GBPB",3,f1%,tmp%,8,0TO;F%
37630    IF(F%AND1)=0THENgrpf%(g%)=!tmp%
37640    PROCcf(f1%):IFABSgrpf%(g%)>ABSgrpseq%(g%)THENrebuild%=1
37650    ELSE
37660    rebuild%=1
37670  ENDIF
37680  IFrebuild%>0THEN
37690    IFFNobjtype(p$+".~x.~x*")>1THENPROCmessage1("Irebuild",grp$(g%),0):PROCreindex(grp$(g%)):PROCmessage("",0)
37700  ENDIF
37710  REM now estimate number of articles in group...
37720  SYS"XOS_File",17,f$TO,,,,s%;F%:IF(F%AND1)=0THENs%=s%DIV200ELSEs%=0
37730  a%=0:IFgrpf%(g%)>0THENa%=ABSgrpseq%(l1%)-grpf%(g%)+1
37740  IFs%<a%THENa%=s%
37750  grpa%(g%)=a%
37760ENDIF
37770=ABSgrpf%(g%)
37780
37790DEFFNcheckmoderation(g$,force%)
37800LOCALg1$,l$,m$,mg$,out$,l%,f%:f%=0:out$=""
37810REM force% forces check in the actual file...
37820REM first check internal list, if not force%
37830g$=FNlower(g$):PROCprint("",FNmsg0("Bmod"),g$,"")
37840IFforce%=1ANDINSTR(g$,",")=0THEN:=FNfastcheckmod(FNclean(g$))
37850IFforce%=0THEN
37860  l$=g$:REPEATg1$=FNgetpar(l$,",")
37870    IFg1$>""THENl%=FNnametono(g1$,0):IFl%>0THENf%=1:IFgrpmod%(l%)<>0 out$=g1$
37880  UNTILl$=""ORout$>""
37890ENDIF
37900REM otherwise check the file
37910IFout$=""ORINSTR(g$,",")>0THEN
37920  f3%=FNopenin(support$+".modgroups")
37930  IFf3%>0THEN
37940    REPEATm$=GET$#f3%
37950      l$=g$:REPEAT
37960        g1$=FNclean(FNgetpar(l$,","))
37970        IFg1$>""ANDFNsmatch(m$,g1$)>0THENout$=g1$
37980      UNTILl$=""ORout$>"":PROCpoll(slice%*4)
37990    UNTILEOF#f3%ORout$>""
38000    PROCcf(f3%)
38010  ENDIF
38020ENDIF
38030=out$
38040
38050DEFFNfastcheckmod(g$)
38060REMIFLEFT$(g$,6)="clari."THEN:=g$
38070f3%=FNopenin(support$+".modgroups")
38080IFf3%>0THEN
38090  out$=""
38100  REPEATm$=GET$#f3%
38110    IFFNsmatch(m$,g$)>0THENout$=g$
38120  UNTILEOF#f3%ORout$>""
38130  PROCcf(f3%)
38140ENDIF
38150=out$
38160
38170DEFPROCadddelbuf(g%,n%)
38180IFrw%THEN
38190  IFdelbufptr%+4>delbufsize%ORg%<>delbufg%THENPROCdodelindex(delbufg%)
38200  IFg%>0 THEN
38210    delbuf%!delbufptr%=n%:delbufptr%+=4:delbufg%=g%
38220    IFgrpa%(g%)>0THENgrpa%(g%)-=1
38230  ENDIF
38240ENDIF
38250ENDPROC
38260
38270DEFPROCdodelindex(g%)
38280LOCALF$,T$,F%,p1%,p2%,r3%,addr%,s1%,l%,dbuf%,artno%,flag%
38290LOCALcurslot%,f%,ibsize%
38300IFdelbufptr%=0 ORg%=0 ORrw%=0THENENDPROC
38310IFdelbufptr%>0 THEN
38320  delbuf%!delbufptr%=0
38330  PROCprint("",FNmsg0("Iupdate"),"",""):PROCcheckdisk
38340  F$=FNifile(g%):T$=basedir$+".~index":F%=FNdelfile(T$)
38350  SYS"Wimp_SlotSize",-1,-1TOcurslot%,,f%
38360  ibsize%=(f%DIV200)*200:IFibsize%>&19000 THENibsize%=&19000
38370  SYS"Wimp_SlotSize",curslot%+ibsize%,-1TOl%:dbuf%=curslot%+&8000
38380  IFl%<curslot%+ibsize%THEN
38390    PROCmessage0("Ibuffer",1)
38400    ELSE
38410    f1%=FNopenin(F$)
38420    IFf1%=0THEN
38430      PROCmessage1("Iopen",F$,1)
38440      ELSE
38450      f2%=FNopenout(T$)
38460      IFf2%=0THEN
38470        PROCcf(f1%):PROCmessage0("Itmp",1)
38480        ELSE
38490        F%=0:p1%=0:p2%=0:r3%=0:s1%=EXT#f1%:PROChgon
38500        WHILEr3%=0AND(F%AND1)=0
38510          !dbuf%=0:SYS"XOS_GBPB",3,f1%,dbuf%,ibsize%,p1%TO,,,r3%,p1%;F%
38520          IFr3%<ibsize%AND(F%AND1)=0THEN
38530          addr%=dbuf%
38540          FORl%=1TO(ibsize%-r3%)DIV200
38550            artno%=!addr%:flag%=0:CALLchkdelart%,artno%,delbuf%,flag%
38560            IFflag%=0AND!addr%>0THENSYS"OS_GBPB",1,f2%,addr%,200,p2%TO,,,,p2%
38570            addr%+=200
38580            IFl%MOD10=0ANDs1%>0THENSYS"Hourglass_Percentage",((p1%+addr%-dbuf%)*100)DIVs1%
38590          NEXTl%
38600          ENDIF
38610        ENDWHILE
38620        PROChgoff:PROCcf(f1%):PROCcf(f2%)
38630        grpf%(g%)=-1
38640        F%=FNdelfile(F$):F%=FNmovefile(T$,F$)
38650        delbufptr%=0
38660      ENDIF
38670    ENDIF
38680  ENDIF
38690  SYS"Wimp_SlotSize",curslot%,-1
38700ENDIF
38710ENDPROC
38720
38730DEFPROCexpgroup(g$,pto%)
38740LOCALl1%:l1%=0
38750REPEATl1%+=1
38760  IFFNsmatch(g$,grp$(l1%))<>0THENPROCexpiregroup(l1%,pto%,1)
38770  IFcancel%ANDINSTR(g$,"*")>0THEN
38780    IFFNconfirm(FNmsg1("Ccancexp",g$))=2THENcancel%=0ELSEcancel%=TRUE
38790  ENDIF
38800UNTILl1%=groups%ORcancel%<>0
38810ENDPROC
38820
38830DEFPROCreindex(g$)
38840LOCALw%,l1%:w%=0
38850IFrw%ANDFNbusyon("Bindex")=0THEN
38860  PROClog("Rebuilding index for "+g$)
38870  FORl1%=1TOgroups%
38880    IFFNsmatch(g$,grp$(l1%))<>0THENPROCgenindex(l1%)
38890  NEXTl1%
38900  PROCbusyoff
38910ENDIF
38920ENDPROC
38930
38940DEFPROCgenindex(ng%)
38950LOCALaC%,f$,A$,p$,a%,loc%,nobuf%,nobufsize%,nobufptr%,nbr%,pc%,lpc%:lpc%=-1
38960IFFNactive(grp$(ng%))=0 ENDPROC
38970PROCcheckdisk:PROCadddelbuf(0,0)
38980nobufsize%=12*1024:nbr%=FNclaim(nobuf%,nobufsize%,"index")
38990IFnbr%=0THENPROCmessage0("Greindex",0):ENDPROC
39000nobufptr%=0:p$=FNpath(grp$(ng%)):F%=FNdelfile(p$+".~index")
39010PROCprint(FNmsg0("Ibuild"),FNmsg1("Glast",grp$(ng%))," "," ")
39020f$=FNnotopath(g%)".~index"
39030F%=FNdelfile(f$):SYS"XOS_File",11,f$,&FFD
39040PROCgenindexdir(p$,ng%)
39050SYS"OS_HeapSort",nobufptr%DIV4,nobuf%,1
39060IFnobufptr%>4 THEN
39070  grpf%(ng%)=!nobuf%
39080  grpseq%(ng%)=ABS(nobuf%!(nobufptr%-4))
39090  grpa%(ng%)=nobufptr%DIV4
39100  ELSE
39110  grpf%(ng%)=0:grpa%(ng%)=0
39120ENDIF
39130pc%=0
39140FORloc%=0TO(nobufptr%-4)STEP4
39150  IFnobufptr%>0 THENpc%=(loc%*100)DIVnobufptr%
39160  IFpc%<>lpc%THENPROCprint("",FNmsg0("Iread"),FNmsg3("Idone",STR$(loc%DIV4),STR$(nobufptr%DIV4),STR$pc%),""):PROCgact(FNmsg1("Iper",STR$pc%)):lpc%=pc%
39170  a%=nobuf%!loc%
39180  f$=FNfindfile(ng%,a%,FALSE)
39190  IFf$>""PROCprocessheader(f$,ng%,a%)
39200  PROCpoll(slice%*2)
39210NEXTloc%
39220PROCrelease(nbr%):PROCwriteindexbuf
39230PROCgact(""):PROCprint(FNmsg0("Done")," "," "," ")
39240ENDPROC
39250
39260DEFPROCprocessheader(f$,ng%,a%)
39270IFFNgetheaderinfo(f$)<>0THEN
39280  IFFNspecialgrp(grp$(ng%))ANDINSTR(grp$(ng%),"outgoing")>0THEN
39290    from$=to$:IFRIGHT$(grp$(ng%),4)="news"THENfrom$=newsgroup$
39300  ENDIF
39310  PROCaddtoindex(ng%,a%):a%=0
39320ENDIF
39330ENDPROC
39340
39350DEFFNgetheaderinfo(f$)
39360LOCALr4%,A$,pos%,ok%,mem%,mbr%,len%,t%:ok%=0
39370PROCclearheader
39380t%=FNfiletype(f$)
39390len%=2048
39400CASEt%OF
39410  WHEN&FCA:mbr%=FNclaim(mem%,len%*2,"header")
39420  WHEN&FFF:mbr%=FNclaim(mem%,len%,"header")
39430  OTHERWISE:mem%=0
39440ENDCASE
39450IFmem%>0THEN
39460  f1%=FNopenin(f$):IFf1%>0THEN
39470    IFt%=&FCA THEN
39480      SYS"OS_GBPB",3,f1%,mem%+len%,len%,20 TO,,,,r4%
39490      IFr4%>20THEN
39500        PROCprint("",FNmsg0("CompHead"),"","")
39510        r4%=FNdecompheader(mem%+len%,r4%-20,mem%,len%)
39520      ENDIF
39530      ELSE
39540      SYS"OS_GBPB",4,f1%,mem%,len% TO,,,,r4%
39550    ENDIF
39560    PROCcf(f1%)
39570    IFr4%>0THEN
39580      pos%=0:ok%=1
39590      REPEATA$="":REM next line was < len%
39600        IFpos%+254<len%THEN
39610          A$=FNstr(mem%+pos%):pos%+=LENA$+1
39620        ENDIF
39630        PROCsetheadervar(A$)
39640      UNTILA$=""
39650    ENDIF
39660  ENDIF
39670  PROCrelease(mbr%)
39680ENDIF
39690=ok%
39700
39710DEFPROCgenindexdir(p$,g%)
39720LOCALdloop%,n%,f%,f$,t%,r3%,addr%,v%,g$,dirbuf%,dbr%
39730n%=0:g$=grp$(g%):dbr%=FNclaim(dirbuf%,dbsize%,"dbuf")
39740PROCpoll(slice%*4):PROCgact(FNmsg1("Glast",grp$(g%)))
39750REPEAT
39760SYS"XOS_GBPB",10,p$,dirbuf%,20,n%,dbsize%,"*"TO,,,r3%,n%;F%
39770IF(F%AND1)THENr3%=0:n%=-1
39780IFr3%>0THEN
39790  addr%=dirbuf%
39800  FORdloop%=1TOr3%
39810  t%=addr%!16:f$=FNstr(addr%+20)
39820  v%=VALf$
39830  CASEt%OF
39840    WHEN1:
39850        IFv%>0THEN
39860        IFnobufptr%<(nobufsize%-4)THENnobuf%!nobufptr%=v%:nobufptr%+=4 ELSEn%=-1
39870        ENDIF
39880    WHEN2,3:IFLEFT$(f$,1)="~"PROCgenindexdir(p$+"."+f$,g%)
39890  ENDCASE
39900  addr%=addr%+(24+LENf$)ANDNOT3:NEXTdloop%
39910ENDIF
39920UNTILn%=-1
39930PROCrelease(dbr%)
39940ENDPROC
39950
39960DEFPROChgon
39970SYS"Hourglass_On"
39980ENDPROC
39990
40000DEFPROChgoff
40010SYS"Hourglass_Off"
40020ENDPROC
40030
40040DEFPROCreceive(q%)
40050LOCALs1$,s2$,w%,i%,to%,ref%
40060w%=q%!20:i%=q%!24
40070CASEq%!16 OF
40080  WHEN0:IFFNcheckquit THENPROCfinish:END
40090  WHEN2:IFq%!12=dragref%ANDq%!36<>-1THENPROCmakenewsdir(FNstr(q%+44)):dragref%=0:PROCclosew(savend%)
40100  WHEN3:s1$=FNstr(q%+44):
40110    IFw%=gsetup%ANDi%=16ANDq%!40=&2000THEN
40120    IFLENs1$<100PROCupdateiconstring(gsetup%,16,s1$):PROCsetcaret(gsetup%,16,LENs1$):ELSEVDU7
40130    ENDIF
40140    IFw%=uwin%AND(i%=16ORi%=17)THEN
40150    PROCnewvac(FNic_str(w%,0),s1$)
40160    ENDIF
40170  WHEN&502:to%=q%!4:ref%=q%!8:s1$=FNhelp(q%!32,q%!36)
40180  IFs1$>""THEN
40190    q%!16=&503:q%!12=ref%:$(q%+20)=s1$:q%?(20+LENs1$)=0:!q%=((25+LENs1$)DIV4)*4
40200    SYS"XWimp_SendMessage",17,q%,to%
40210  ENDIF
40220  WHEN&400C2:s1$=FNstr(q%+28):IFs1$=myname$ANDq%!4<>task% THEN
40230    !q%=20:q%!16=0:q%!12=0:SYS"Wimp_SendMessage",17,q%,q%!4
40240    ENDIF
40250  WHEN&400C3:PROCrmcl(q%!4)
40260  WHEN&400C9:PROCrelease(menudataref%):PROCrelease(indmenuref%):infoopen%=FALSE
40270  WHENnbcom%:
40280    s1$=FNstr(q%+&20):s2$=FNstr(q%+&21+LENs1$)
40290    PROCnbcommand(q%!4,q%!8,q%!&14,q%!&18,q%!&1C,s1$,s2$)
40300ENDCASE
40310ENDPROC
40320
40330DEFFNhelp(w%,i%)
40340LOCALA$,P$
40350CASEw%OF
40360  WHEN-2:A$="Hbar"
40370  WHENmsetup%:
40380    CASE(i%DIV5)OF
40390      WHEN0:A$="Hsite"
40400      WHEN1:A$="Hgen"
40410      WHEN2:A$="Htrans"
40420      WHEN3:A$="Hgrps"
40430      WHEN4:A$="Husers"
40440      WHEN5:A$="Hfilt"
40450    ENDCASE
40460  WHENsitewin%:
40470    CASEi%OF
40480      WHEN0:A$="HShost"
40490      WHEN1:A$="HSmail"
40500      WHEN2:A$="HSrem"
40510      WHEN3:A$="HSorg"
40520      WHEN4,11:A$="HStr"
40530      WHEN14,15:A$="HStz"
40540      WHEN5:A$="HSinit"
40550      WHEN16:A$="Hcancel"
40560      WHEN6:A$="Hsave"
40570      OTHERWISE:A$="HSgen"
40580    ENDCASE
40590  WHENgsetup%:
40600    CASEi%OF
40610      WHEN11:A$="HMauto"
40620      WHEN3:A$="HMfast"
40630      WHEN9:A$="HMkeep"
40640      WHEN7:A$="HMrr"
40650      WHEN6:A$="HMlog"
40660      WHEN8:A$="HMcomp"
40670      WHEN23:A$="HMcomp2"
40680      WHEN1,2:A$="HMmodp"
40690      WHEN20:A$="HMgate1"
40700      WHEN18,19:A$="HMgate2"
40710      WHEN10,12,13,14:A$="HMann"
40720      WHEN16.21:A$="HMdef"
40730      WHEN25,26:A$="HMmindsk"
40740      OTHERWISE:A$="HMgen"
40750    ENDCASE
40760  WHENtrwin%:
40770    CASEi%OF
40780      WHEN0,1:A$="HTname"
40790      WHEN3:A$="HTrem"
40800      WHEN4:A$="HTset"
40810      OTHERWISE:A$="HTgen"
40820    ENDCASE
40830  WHENgwin%:P$=FNic_str(w%,25)
40840    CASEi%OF
40850      WHEN2,14:A$="HGdef"
40860      WHEN22,24:A$="HGhist"
40870      WHEN18:A$="HGscan"
40880      WHEN26:A$="HGnew"
40890      WHEN33:A$="HGexph"
40900      WHEN27:A$="HGcanc"
40910      WHEN28:A$="HGchef"
40920      WHEN34:A$="HGthread"
40930      WHEN29:A$="HGauto"
40940      WHEN30:A$="HGexpn"
40950      WHEN31:A$="HGexpb"
40960      WHEN36,35,41:A$="HGexpt"
40970      WHEN19,25:A$="HGname"
40980      WHEN1,15:A$="HGtime"
40990      WHEN16:A$="HGmod"
41000      WHEN5,6,12:A$="HGtype"
41010      WHEN7:A$="HGadd"
41020      WHEN8:A$="HGrem"
41030      WHEN17:A$="HGdel"
41040      WHEN10:A$="HGinfo"
41050      WHEN9:A$="HGind"
41060      WHEN11:A$="HGdoexp"
41070      WHEN32:A$="Hsave"
41080      OTHERWISE:A$="HGgen"
41090    ENDCASE
41100  WHENuwin%:
41110    CASEi%OF
41120      WHEN1,20:A$="HUname"
41130      WHEN2,15:A$="HUgrp"
41140      WHEN21:A$="HUvac"
41150      WHEN17:A$="HUvset"
41160      WHEN18:A$="HUedit"
41170      WHEN19:A$="HUclear"
41180      WHEN13:A$="HUfwd"
41190      WHEN6:A$="Hcancel"
41200      WHEN7:A$="Hsave"
41210      OTHERWISE:A$="HUgen"
41220    ENDCASE
41230  WHENfwin%:
41240    CASEi%OF
41250      WHEN22:A$="HFnew"
41260      WHEN21:A$="HFdel"
41270      WHEN20:A$="HFset"
41280      WHEN1:A$="HFtype"
41290      WHEN2,3,4,5,6,7,8,9,10:A$="HFcond"
41300      WHEN15,16:A$="HFact"
41310      OTHERWISE:A$="HFgen"
41320    ENDCASE
41330  WHENstatus%:A$="Hstatus"
41340  OTHERWISE:A$="Hany"
41350ENDCASE
41360IFA$>""THEN
41370  A$=FNmsg1(A$,P$)
41380ENDIF
41390=A$
41400
41410DEFPROCsetcaret(w%,i%,n%)
41420SYS"XWimp_SetCaretPosition",w%,i%,,,-1,n%
41430ENDPROC
41440
41450DEFPROClosecaret
41460SYS"XWimp_SetCaretPosition",-1
41470ENDPROC
41480
41490DEFPROCmakenewsdir(f$)
41500LOCALf1$,d$,n%,next%,err%
41510PROCensuredir(f$)
41520IFFNobjtype(f$)>1THEN
41530  d$=support$+".newsdir.*"
41540  SYS"OS_FSControl",26,d$,f$+".*",3
41550  SYS"XWimp_StartTask",f$+".!boot"
41560  PROCcreatedirs
41570  ELSE
41580  PROCmessage0("Mdirfail",1)
41590ENDIF
41600ENDPROC
41610
41620DEFPROCnbupdate(type%,g$,n%,f$,s$)
41630IFnclient%>0ORtype%=11THEN
41640  CASEtype%OF
41650    WHEN0:f$="L1":IFFNdelok(g$)THENf$="L0"
41660          PROCnbupd(type%,0,g$,f$,"")
41670    WHEN1,5:PROCnbupd(type%,0,g$,"","")
41680    WHEN4:PROCnbupd(type%,n%,g$,"","")
41690    WHEN2,3:PROCnbupd(type%,n%,g$,f$,s$)
41700    WHEN10:PROCnbupd(type%,0,"","","")
41710    WHEN11:PROCnbupd(type%,n%,trans$(transport%),"","")
41720  ENDCASE
41730ENDIF
41740ENDPROC
41750
41760DEFFNcheckquit
41770LOCALok%
41780IFindebatch%=0THEN
41790  ok%=TRUE
41800  ELSE
41810  ok%=(FNconfirm(FNmsg0("Cquit"))=1)
41820ENDIF
41830=ok%
41840
41850DEFPROCnbcommand(nbfrom%,nbref%,com%,p1%,p2%,str$,str2$)
41860IFstartupok%THEN
41870  IFbusy$=""THEN
41880    IFFNfindcl(nbfrom%)<0PROCaddcl(nbfrom%)
41890    IFcom%<500ANDarropen%THENPROCclosew(arrive%)
41900    PROCwriteindexbuf:REM ensure up-to-date...
41910    CASEcom%MOD65536OF
41920      WHEN0:PROCnbstartup(com%,nbfrom%,nbref%)
41930      WHEN10:PROCnbreply(nbfrom%,nbref%,com%,0,0,"",""):PROCrmcl(nbfrom%)
41940      WHEN20:PROCsetuser(com%,nbfrom%,nbref%,str$)
41950      WHEN30:PROCnbsiteinfo(com%,nbfrom%,nbref%,p1%)
41960      WHEN100:PROCadddelbuf(0,0):PROCsendgrouplist(com%,nbfrom%,nbref%,str$)
41970      WHEN110:PROCnewgrouplist(com%,nbfrom%,nbref%,p1%,p2%)
41980      WHEN120:PROCaddgroupcom(com%,nbfrom%,nbref%,str$)
41990      WHEN130:PROCdelgroupcom(com%,nbfrom%,nbref%,str$)
42000      WHEN140:PROCexpgrpcom(com%,nbfrom%,nbref%,str$,p1%)
42010      WHEN200,210:PROCsendindexlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
42020      WHEN220:PROCsendartname(com%,nbfrom%,nbref%,str$,p1%)
42030      WHEN230,240:PROClockartlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
42040      WHEN250:PROCdelartlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
42050      WHEN260,270:PROCfolderop(com%,nbfrom%,nbref%,str$,str2$,p1%,p2%)
42060      WHEN280:PROCcancelart(com%,nbfrom%,nbref%,str$,str2$)
42070      WHEN300,310:PROCclientsendfile(com%,nbfrom%,nbref%,str$)
42080      WHEN400:PROClistusers(com%,nbfrom%,nbref%,str$)
42090      WHEN410:PROCadduser(com%,nbfrom%,nbref%,str$)
42100      WHEN420:PROCdeluser(com%,nbfrom%,nbref%,str$)
42110      WHEN450:IFrw%THENPROCsetforward(com%,nbfrom%,nbref%,str$,str2$,p1%)
42120      WHEN460:IFrw%THENPROCsetvacation(com%,nbfrom%,nbref%,str$,str2$,p1%)
42130      WHEN900:srflag%=0
42140      OTHERWISE:PROCnbcomfail(nbfrom%,nbref%,com%,9,FNmsg0("Badcom"))
42150    ENDCASE
42160    ELSE
42170    PROCnbcomfail(nbfrom%,nbref%,com%,2,FNmsg1("Busy",busy$))
42180  ENDIF
42190ENDIF
42200ENDPROC
42210
42220DEFPROCsetforward(com%,nbfrom%,nbref%,u$,f$,a%)
42230LOCALu%,a$:u%=FNuserno(u$)
42240IFu%>0THEN
42250  CASEa%OF
42260    WHEN0:a$=userf$(u%)
42270    WHEN1:userf$(u%)=f$:PROCsetuwin(u$):PROCsaveuserinfobyno(u%)
42280    WHEN2:userf$(u%)="":PROCsetuwin(u$):PROCsaveuserinfobyno(u%)
42290  ENDCASE
42300  PROCnbreply(nbfrom%,nbref%,com%,a%,0,u$,a$)
42310  ELSE
42320  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Ufail"))
42330ENDIF
42340ENDPROC
42350
42360DEFPROCsetvacation(com%,nbfrom%,nbref%,u$,p$,a%)
42370LOCALu%,a$,f$:u%=FNuserno(u$):f$=FNupath(u$)+".vacation"
42380IFu%>0THEN
42390  CASEa%OF
42400    WHEN0:IFFNobjtype(f$)=1THENa$=f$ELSEa$=""
42410    WHEN1:IFFNobjtype(p$)=1THENF%=FNdelfile(f$):F%=FNcopyfile(p$,f$):a$=f$
42420    WHEN2:F%=FNdelfile(f$):a$=""
42430  ENDCASE
42440  PROCnbreply(nbfrom%,nbref%,com%,a%,0,u$,a$)
42450  ELSE
42460  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Ufail"))
42470ENDIF
42480ENDPROC
42490
42500DEFPROCnbstartup(com%,nbfrom%,nbref%)
42510PROCnbreply(nbfrom%,nbref%,com%,100*VALver$,userctrl%,"","")
42520ENDPROC
42530
42540DEFPROCsetuser(com%,id%,nbref%,a$)
42550LOCALl%
42560IFFNuserok(a$)=0PROCnbcomfail(id%,nbref%,20,1,FNmsg0("Ufail")):ENDPROC
42570l%=FNfindcl(id%)
42580IFl%>-1THEN
42590  cl_user$(l%)=a$:PROCnbreply(id%,nbref%,com%,0,0,a$,"")
42600  ELSE
42610  PROCnbcomfail(id%,nbref%,com%,1,FNmsg0("Clunreg"))
42620ENDIF
42630ENDPROC
42640
42650DEFPROCaddcl(id%)
42660LOCALl%
42670WHILEcl_id%(l%)<>0ANDl%<maxcl%:l%+=1:ENDWHILE
42680IFcl_id%(l%)=0THENcl_id%(l%)=id%:nclient%+=1:ELSEPROCmessage0("Clfull",0)
42690ENDPROC
42700
42710DEFFNfindcl(id%)
42720LOCALl%
42730WHILEcl_id%(l%)<>id%ANDl%<maxcl%:l%+=1:ENDWHILE
42740IFcl_id%(l%)<>id%THENl%=-1
42750=l%
42760
42770DEFPROCrmcl(id%)
42780LOCALl%:l%=FNfindcl(id%)
42790IFl%>=0THENcl_id%(l%)=0:IFnclient%>0THENnclient%-=1
42800ENDPROC
42810
42820DEFPROCnbreply(fid%,ref%,code%,p1%,p2%,s1$,s2$)
42830q%!12=ref%:q%!16=nbrep%
42840q%!&14=code%:q%!&18=p1%:q%!&1C=p2%
42850$(q%+&20)=s1$+CHR$0:$(q%+&21+LENs1$)=s2$+CHR$0
42860!q%=4+(&22+LENs1$+LENs2$)DIV4*4
42870SYS"Wimp_SendMessage",17,q%,fid%
42880ENDPROC
42890
42900DEFPROCnblongreply(fid%,ref%,code%,p1%,p2%,p3%,s1$,s2$)
42910q%!12=ref%:q%!16=nbrep%
42920q%!&14=code%:q%!&18=p1%:q%!&1C=p2%:q%!&20=p3%
42930$(q%+&24)=s1$+CHR$0:$(q%+&25+LENs1$)=s2$+CHR$0
42940!q%=4+(&26+LENs1$+LENs2$)DIV4*4
42950SYS"Wimp_SendMessage",17,q%,fid%
42960ENDPROC
42970
42980DEFPROCnblongreply2(fid%,ref%,code%,p1%,p2%,s1$,s2$,s3$)
42990q%!12=ref%:q%!16=nbrep%
43000q%!&14=code%:q%!&18=p1%:q%!&1C=p2%
43010$(q%+&20)=s1$+CHR$0:$(q%+&21+LENs1$)=s2$+CHR$0:$(q%+&22+LENs1$+LENs2$)=s3$+CHR$0
43020!q%=4+(&23+LENs1$+LENs2$+LENs3$)DIV4*4
43030SYS"Wimp_SendMessage",17,q%,fid%
43040ENDPROC
43050
43060DEFPROCnbupd(code%,p1%,s1$,s2$,s3$)
43070q%!12=0:q%!16=nbupd%
43080q%!&14=code%:q%!&18=p1%
43090$(q%+&20)=s1$+CHR$0
43100$(q%+&21+LENs1$)=s2$+CHR$0
43110$(q%+&22+LENs1$+LENs2$)=s3$+CHR$0
43120!q%=256
43130SYS"Wimp_SendMessage",17,q%,0
43140ENDPROC
43150
43160DEFPROCnbcomfail(nbfrom%,nbref%,c%,c1%,A$)
43170c%=(c%DIV10)*10+c1%:PROCnbreply(nbfrom%,nbref%,c%,0,0,A$,"")
43180ENDPROC
43190
43200DEFPROCnbsiteinfo(com%,nbfrom%,nbref%,p1%)
43210LOCALa$
43220CASEp1%OF
43230  WHEN0:a$=hostname$
43240  WHEN1:a$=org$
43250  WHEN2:a$=trans$(transport%)
43260  WHEN3:a$=FNvarval("Newsbase$TransportType"):IFa$=""THENa$="batch"
43270  WHEN4:a$=timezone$
43280  WHEN5:a$=remotehost$
43290  WHEN6:a$=mailname$
43300  WHEN100:a$=STR$userctrl%
43310  WHEN101:a$=STR$defexp%
43320ENDCASE
43330PROCnbreply(nbfrom%,nbref%,com%,p1%,0,a$,"")
43340ENDPROC
43350
43360DEFPROCsendgrouplist(com%,nbfrom%,nbref%,g1$)
43370LOCALl1%,g2$,cnt%,arts%,arts2%,flg$,F%,t%,s%,first%
43380PROCprint("",FNmsg0("Glist")," "," ")
43390FORl1%=1TOgroups%
43400  IFFNgmatch(g1$,l1%) THEN
43410    g2$=grp$(l1%):arts%=0:first%=FNfirstart(l1%)
43420    flg$="L1":IFFNdelok(g2$)THENflg$="L0"
43430    PROCnblongreply(nbfrom%,nbref%,com%,first%,ABSgrpseq%(l1%),ABSgrpa%(l1%),g2$,flg$)
43440    cnt%+=1:IFcnt%MOD6=0 PROCpoll(slice%*2)
43450  ENDIF
43460NEXTl1%
43470PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
43480ENDPROC
43490
43500DEFPROCnewgrouplist(com%,nbfrom%,nbref%,p1%,p2%)
43510LOCALlastd%,lastt%,a$,c%
43520PROCprint("",FNmsg0("Glist")," "," ")
43530f1%=FNopenin(newgrp$)
43540IFf1%=0THEN
43550  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("NGnone"))
43560  ELSE
43570  lastd%=0:lastt%=0:c%=0
43580  REPEATa$=GET$#f1%
43590    IFLEFT$(a$,1)="#"THEN
43600      lastd%=VALMID$(a$,3,6):lastt%=VALMID$(a$,10,6)
43610      ELSE
43620      IFlastd%>p1%ANDlastt%>p2%THENPROCnbreply(nbfrom%,nbref%,com%,0,0,a$,"")
43630      c%+=1:IFc%MOD10=0THENPROCpoll(slice%)
43640    ENDIF
43650  UNTILEOF#f1%
43660PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
43670ENDIF
43680ENDPROC
43690
43700DEFPROCaddgroupcom(com%,nbfrom%,nbref%,g1$)
43710LOCALr$
43720IFFNaddgrp(g1$,r$)THEN
43730  PROCnbreply(nbfrom%,nbref%,com%,0,0,r$,"")
43740  ELSE
43750  PROCnbcomfail(nbfrom%,nbref%,com%,1,r$)
43760ENDIF
43770ENDPROC
43780
43790DEFFNaddgrp(g$,RETURN r$)
43800LOCALr%
43810g$=FNclean(g$)
43820r$=FNmsg0("Readonly"):IFrw%=0THEN:=0
43830r$=FNmsg0("Gbad"):IFINSTR(g$,",")>0ORINSTR(g$," ")>0THEN=0
43840r$=FNmsg0("Gneg"):IFLEFT$(g$,1)="!"THEN=0
43850r$=FNmsg0("Gact"):IFFNactive(g$)<>0THEN=0
43860r%=FNruntransportfile(9,"",g$,"")
43870r$=FNvarval("Newsbase$ReturnInfo")
43880CASEr%OF
43890  WHEN0:IFFNruntransportfile(14,"","","")=0THENPROCreadnewsrc:PROClog(FNmsg1("Laddgrp",g$))
43900ENDCASE
43910=(r%=0)
43920
43930DEFPROCdelgroupcom(com%,nbfrom%,nbref%,g1$)
43940LOCALr$
43950IFFNdelgrp(g1$,r$)THEN
43960  PROCnbreply(nbfrom%,nbref%,com%,0,0,r$,"")
43970  ELSE
43980  PROCnbcomfail(nbfrom%,nbref%,com%,1,r$)
43990ENDIF
44000ENDPROC
44010
44020DEFFNdelgrp(g$,RETURN r$)
44030LOCALgrpdel%,l1%,F%,p$,g1$
44040g$=FNclean(g$)
44050r$=FNmsg0("Readonly"):IFrw%=0THEN:=0
44060r$=FNmsg0("Gbad"):IFINSTR(g$,",")>0ORINSTR(g$," ")>0THEN=0
44070r$=FNmsg0("Gneg"):IFLEFT$(g$,1)="!"THEN=0
44080r$=FNmsg0("Gnotact"):IFFNactive(g$)=0THEN=0
44090r$=FNmsg0("Gspecial"):IFFNspecialgrp(g$)>0THEN=0
44100grpdel%=FNruntransportfile(10,"",g$,"")
44110r$=FNvarval("Newsbase$ReturnInfo")
44120IFgrpdel%=0THEN
44130  PROClog(FNmsg1("Lrmgrp",g$))
44140  IFFNruntransportfile(14,"","","")=0THENPROCreadnewsrc
44150  IFFNconfirm(FNmsg0("Gremove"))=1THENPROCdelgrp(g$)
44160ENDIF
44170=(grpdel%=0)
44180
44190DEFPROCdelgrp(g$)
44200LOCALl1%,F%,g1$,p$
44210IFFNbusyon("Bdel")=0THEN
44220  l1%=0:WHILEl1%<groups%:l1%+=1
44230    IFFNgmatch(g$,l1%) THEN
44240      g1$=grp$(l1%):p$=FNpath(g1$)
44250      F%=FNexpiredir(p$,l1%,0,TRUE,0)
44260      IFFNobjtype(p$+".~x")=0ORFNobjtype(p$+".~index")=0THEN
44270        F%=FNdelfile(p$+".~index"):F%=FNdelfile(p$+".~seq")
44280        F%=FNdelfile(p$)
44290        F%=0:WHILEF%=0:p$=FNdir(p$):F%=FNdelfile(p$):ENDWHILE
44300        l1%-=1:PROCrmgrplist(g1$):PROCnbupdate(1,g1$,0,"","")
44310        PROClog(FNmsg1("Ldelgrp",g1$))
44320      ENDIF
44330    ENDIF
44340  ENDWHILE
44350  PROCbusyoff
44360ENDIF
44370ENDPROC
44380
44390DEFPROCexpgrpcom(com%,nbfrom%,nbref%,g1$,p%)
44400PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
44410IFrw%THENPROCexpgroup(g1$,0)
44420ENDPROC
44430
44440DEFPROCsendindexlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
44450LOCALfptr%,imem%,ibr%,r3%,u%,u$,art%,imp%,aloop%,endl%,rectype%,total%
44460LOCALrcom%,route%,ifile$
44470REM local f6% filehandle not really desirable but permits re-entrancy.
44480LOCALf6%
44490LOCALA$,B$,C$,D$
44500PROCadddelbuf(0,0):IFn2%=0THENn2%=1E6
44510rcom%=com%MOD65536:route%=65536*(com%DIV65536)
44520IFuserctrl%<>0ANDFNspecialgrp(g1$)=2THEN
44530  u%=FNfindcl(nbfrom%):IFu%>=0THENu%=FNuserno(cl_user$(u%))
44540  IFu%>0THEN
44550    u$="email."+FNlower(user$(u%))
44560    IFu$<>LEFT$(FNlower(g1$),LENu$)ANDugrp%(u%)>9THENPROCnbcomfail(nbfrom%,nbref%,c%,1,FNmsg0("Gdeny")):ENDPROC
44570  ENDIF
44580ENDIF
44590ifile$=FNpath(g1$)+".~index"
44600f6%=FNopenin(ifile$)
44610IFf6%=0THEN
44620  IFFNobjtype(ifile$)=1THEN
44630  PROCmessage1("Ireadfail",g1$,1)
44640  ELSE
44650  PROCmessage1("Irebuild",g1$,0):PROCreindex(g1$)
44660  PROCmessage("",0)
44670  f6%=FNopenin(ifile$)
44680  ENDIF
44690ENDIF
44700IFf6%<>0THEN
44710  fptr%=0
44720  IFrcom%=200THENA$="Alist1"ELSEA$="Alist2"
44730  PROCprint("",FNmsg0(A$)," "," ")
44740  ibr%=FNclaim(imem%,4000,"list"):IFibr%>0THEN
44750  REPEAT
44760    !imem%=0:SYS"XOS_GBPB",3,f6%,imem%,4000,fptr%TO,,,r3%,fptr%;F%
44770    IF(F%AND1)THEN
44780      PROCmessage1("Ireadfail",g1$,1):r3%=1
44790      ELSE
44800      imp%=imem%:endl%=(4000-r3%)DIV200
44810      FORaloop%=1TOendl%:art%=!imp%
44820      IF(art%>=n1%ANDart%<=n2%)ANDart%>0THEN
44830        imp%?199=0:A$=FNstr(imp%+20):rectype%=imp%!4
44840        CASErectype%OF
44850        WHEN1:B$=FNstr(imp%+21+LENA$):C$=FNstr(imp%+22+LENA$+LENB$)
44860          D$=FNstr(imp%+23+LENA$+LENB$+LENC$):total%+=1
44870          PROCnblongreply2(nbfrom%,nbref%,200+route%,art%,imp%!8,B$,C$,A$)
44880          IFrcom%=210THENPROCnbreply(nbfrom%,nbref%,com%,art%,0,D$,"")
44890        WHEN2:IFrcom%=210THENPROCnbreply(nbfrom%,nbref%,com%,art%,0,A$,"")
44900        OTHERWISE:B$=FNstr(imp%+21+LENA$)
44910          C$=FNstr(imp%+22+LENA$+LENB$):total%+=1
44920          PROCnblongreply2(nbfrom%,nbref%,200+route%,art%,imp%!8,B$,C$,A$)
44930        ENDCASE
44940      ENDIF
44950      imp%+=200:NEXTaloop%:PROCpoll(slice%)
44960    ENDIF
44970  UNTILr3%>0ORart%>n2%
44980  PROCrelease(ibr%):grpa%(FNnametono(g1$,0))=total%
44990  ENDIF
45000  PROCcf(f6%)
45010  PROCnbreply(nbfrom%,nbref%,200+route%,0,0,"","")
45020  ELSE
45030  REM no articles available...
45040  REM used to use PROCnbcomfail(nbfrom%,nbref%,200+route%,2,FNmsg0("Anone"))
45050  PROCnbreply(nbfrom%,nbref%,200+route%,0,0,"","")
45060ENDIF
45070ENDPROC
45080
45090DEFPROCsendartname(com%,nbfrom%,nbref%,g$,a%)
45100LOCALf$,s%,f%,t%,info$:info$="L"
45110g%=FNnametono(g$,0)
45120IFg%>0ANDa%>0 THEN
45130  f$=FNfindfile(g%,a%,TRUE):t%=FNfiletype(f$)
45140  IFt%=&FCA THEN
45150    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("CompFail3"))
45160    ELSE
45170    IFf$>""THEN
45180      s%=FNfilesize(f$):f%=FNfileattr(f$)
45190      IF(f%AND8)<>0THENinfo$+="1"ELSEinfo$+="0"
45200      PROCnbreply(nbfrom%,nbref%,com%,a%,s%,f$,info$)
45210      ELSE
45220      PROCadddelbuf(g%,a%):PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Afail"))
45230    ENDIF
45240  ENDIF
45250  ELSE
45260  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Afail2"))
45270ENDIF
45280ENDPROC
45290
45300DEFPROClockartlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
45310LOCALl%,g%,a$,f$,act$
45320IFrw%THEN
45330  g%=FNnametono(g1$,0):a$="R":act$="":n2%=FNuplim(g%,n2%)
45340  IFcom%MOD65536=230a$+="L"ELSEact$="un"
45350  IFg%>0THEN
45360    FORl%=n1%TOn2%
45370      f$=FNfindfile(g%,l%,FALSE):IFf$>""SYS"XOS_FSControl",24,f$,a$
45380    NEXTl%
45390    PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
45400    ELSE
45410    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Gfail"))
45420  ENDIF
45430  ELSE
45440  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Readonly"))
45450ENDIF
45460ENDPROC
45470
45480DEFPROCdelartlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
45490LOCALl%,g%,f%
45500IFFNdelok(g1$)THEN
45510  g%=FNnametono(g1$,0)
45520  IFg%>0THEN
45530    f%=FNfirstart(g%):IFn1%<f%THENn1%=f%
45540    n2%=FNuplim(g%,n2%):PROChgon
45550    FORl%=n1%TOn2%:PROCdelart(g%,l%):IFl%MOD10=0PROCpoll(slice%)
45560    NEXTl%:PROChgoff
45570    PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
45580    ELSE
45590    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Gfail"))
45600  ENDIF
45610  ELSE
45620  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Anodel"))
45630ENDIF
45640ENDPROC
45650
45660DEFPROCdelart(g%,n%)
45670LOCALf$
45680f$=FNfindfile(g%,n%,FALSE)
45690F%=FNdelfile(f$)
45700IFF%=0THENPROCartdeleted(g%,n%)
45710ENDPROC
45720
45730DEFPROCfolderop(com%,nbfrom%,nbref%,g1$,g2$,n1%,n2%)
45740LOCALg1%,g2%,a%,f%,p$,F%,f$
45750LOCALto$,from$,subject$,messid$,newsgroup$,expires%,artdate%,supersede$,receipt$,lasth%,control$,precedence$,replyto$,approved$,reference$,cc$,origto$
45760IFrw%THEN
45770  IFFNspecialgrp(g2$)<2THEN
45780    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Gbad"))
45790    ELSE
45800    g1%=FNnametono(g1$,0):g2%=FNnametono(g2$,TRUE):PROCpolloff
45810    IFg1%=0ORg2%=0THEN
45820      PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Gfail"))
45830      ELSE
45840      PROChgon
45850      f%=FNfirstart(g1%):IFn1%<f%THENn1%=f%
45860      n2%=FNuplim(g1%,n2%):p$=FNnotopath(g2%)
45870      IFp$>""THEN
45880        s%=FNseq(g2%)
45890        FORa%=n1%TOn2%
45900          f$=FNfindfile(g1%,a%,TRUE):IFf$>""THEN
45910            IFFNgetheaderinfo(f$)<>0THEN
45920              F%=FNartcopy(g2%,s%,f$):IFa%MOD5=0THENPROCpoll(slice%)
45930              IFF%=0ANDcom%MOD65536=260ANDFNdelok(g1$)<>0THENPROCdelart(g1%,a%)
45940            ENDIF
45950          ENDIF
45960        NEXTa%
45970        PROChgoff
45980      ENDIF
45990      PROCnbreply(nbfrom%,nbref%,com%,0,0,FNmsg0("Amove"),"")
46000    ENDIF
46010    PROCpollon
46020  ENDIF
46030  ELSE
46040  PROCnbreply(nbfrom%,nbref%,com%,0,0,FNmsg0("Readonly"),"")
46050ENDIF
46060ENDPROC
46070
46080DEFPROCcancelart(com%,nbfrom%,nbref%,g$,m$)
46090LOCALr%,r$,u$,f$
46100r%=FNfindcl(nbfrom%):IFr%<0THENu$="news"ELSEu$=cl_user$(r%)
46110r%=INSTR(m$,"@"):r$=LEFT$(MID$(m$,r%+1)):IFu$=""THENu$="news"
46120PROClog("Cancel request for "+m$+" from user "+u$)
46130IFrw%ANDr$=hostname$THEN
46140  f$=FNtmpfile:f1%=FNopenout(f$):IFf1%>0THEN
46150    BPUT#f1%,"Control: cancel "+m$
46160    BPUT#f1%,"Newsgroups: "+g$
46170    BPUT#f1%,"Path: "+hostname$+"!not-for-mail"
46180    BPUT#f1%,"From: "+u$+"@"+mailname$
46190    BPUT#f1%,"Subject: cmsg cancel "+m$
46200    BPUT#f1%,"Message-ID: <"+FNid_date+"@"+hostname$+">"
46210    BPUT#f1%,"Sender: news@"+hostname$+" (RISC OS Newsbase "+ver$+")"
46220    IForg$>""BPUT#f1%,"Organization: "+org$
46230    BPUT#f1%,"Date: "+FNrfc_date
46240    BPUT#f1%,"Approved: news@"+hostname$
46250    BPUT#f1%,"Lines: 1":BPUT#f1%,"":BPUT#f1%,"cancel "+m$
46260    PROCcf(f1%):PROCsettype(f$,&FFF)
46270    r$=FNsendnews(f$,"",u$)
46280    CASEr$OF
46290      WHEN"":PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
46300      OTHERWISE:PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Anocancel"))
46310    ENDCASE
46320    ELSE
46330    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Scrap"))
46340  ENDIF
46350  SYS"XOS_CLI","remove "+f$
46360  ELSE
46370  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Anocancel"))
46380ENDIF
46390ENDPROC
46400
46410DEFFNrfc_date
46420=FNctime("%W3, %DY %M3 %CE%YR %24:%MI:%SE")+" "+timezone$
46430
46440DEFFNid_date
46450=FNctime("%CE%YR%MN%DY.%24%MI%SE.%CS")
46460
46470DEFFNctime(a$)
46480LOCALb%:?tmp%=3:SYS"OS_Word",14,tmp%
46490SYS"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,a$TOb%
46500=FNstr(b%)
46510
46520DEFPROCclientsendfile(com%,nbfrom%,nbref%,f$)
46530LOCALr%,r$,d$,u%,u$,F%,info$,m%,rcom%
46540u%=FNfindcl(nbfrom%):rcom%=com%MOD65536
46550IFu%>=0THENu%=FNuserno(cl_user$(u%))
46560IFu%<0THENu%=0
46570u$=user$(u%):PROCsettype(f$,&FFF)
46580IFrw%AND(upost%(u%)<>0ORrcom%=310)THEN
46590  IFFNobjtype(f$)=1 THEN
46600    m%=transm%(transport%,1):IFrcom%=300THENm%=transm%(transport%,1)
46610    IFFNfreemem(0)<m%*1024THEN
46620      REM spool file for later processing
46630      r$=outdir$(0):IFrcom%=300THENr$=outdir$(1)
46640      REPEATd$=r$+".nb"+STR$RND(99999):UNTILFNobjtype(d$)=0
46650      r$="":F%=FNmovefile(f$,d$):IFF%<>0THENr$=FNmsg0("Qfail")
46660      ELSE
46670      d$=FNtmpfile:F%=FNmovefile(f$,d$)
46680      IFF%<>0THENd$=f$
46690      CASErcom%OF
46700        WHEN300:info$=FNkeepfile(1,d$,u$):r$=FNsendnews(d$,info$,u$)
46710        WHEN310:info$=FNkeepfile(0,d$,u$):r$=FNsendmail(d$,u$)
46720      ENDCASE
46730    ENDIF
46740    CASEr$OF
46750      WHEN"":PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
46760      OTHERWISE:PROCnbcomfail(nbfrom%,nbref%,com%,1,r$)
46770    ENDCASE
46780    ELSE
46790    PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg1("NoFile",f$))
46800  ENDIF
46810  ELSE
46820  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Qnopost"))
46830ENDIF
46840ENDPROC
46850
46860DEFFNsendnews(d$,g$,u$)
46870LOCALr%,r$,local%,m$,approved%:local%=0:approved%=0
46880IFLEFT$(g$)="!"THENapproved%=TRUE:g$=MID$(g$,2)
46890r$=FNcheckgrpsline(g$,local%):IFr$>""THEN=r$
46900IFINSTR(FNclean(g$)," ")>1THENd$=FNrepost(d$)
46910PROCprint("",FNmsg0("Qpost")," "," ")
46920IFg$>""ANDlocal%=0ANDapproved%=0THENm$=FNcheckmoderation(g$,0)
46930r%=0
46940IFm$>""ANDlocal%=0THEN
46950  r$=FNremail(FNmoddest(m$),d$,u$)
46960  ELSE
46970  IFlocal%THEN
46980    r$=FNlocalnews(d$)
46990    ELSE
47000    IFmngw%<>0ANDmngw$>""THEN
47010      r$=FNgateway(g$)
47020      r$=FNremail(r$,d$,u$)
47030      ELSE
47040      PROClog("Queuing article sent by "+u$)
47050      r%=FNruntransportfile(2,d$,u$,"")
47060      IFr%=0THENPROCnbupdate(11,"",1,"",""):F%=FNdelfile(d$)
47070    ENDIF
47080  ENDIF
47090ENDIF
47100IFr%<>0THENr$=FNvarval("Newsbase$ReturnInfo")
47110=r$
47120
47130DEFFNgateway(g$)
47140LOCALn%,a$,b$,g1$
47150a$=mngw$:g1$=FNlower(FNgetpar(g$,","))
47160n%=INSTR(a$,"%")
47170WHILEn%>0:b$=""
47180  CASEMID$(a$,n%+1,1)OF
47190    WHEN"g":b$=g1$
47200    WHEN"G":b$="":REPEATb$=b$+FNgetpar(g1$,"."):IFg1$>""THENb$+="-"
47210      UNTILg1$=""
47220    WHEN"%":b$="%"
47230  ENDCASE
47240  a$=LEFT$(a$,n%-1)+b$+MID$(a$,n%+2):n%+=LENb$-1
47250  n%=INSTR(a$,"%",n%)
47260ENDWHILE
47270=a$
47280
47290DEFFNsendmail(d$,u$)
47300LOCALr%,r$:PROCprint("",FNmsg0("Qsend")," "," ")
47310PROClog("Queuing mail sent by "+u$)
47320r%=FNruntransportfile(1,d$,u$,"")
47330IFr%<>0THENr$=FNvarval("Newsbase$ReturnInfo")ELSEPROCnbupdate(11,"",0,"",""):F%=FNdelfile(d$)
47340=r$
47350
47360DEFFNcheckgrpsline(g$,RETURN l%)
47370LOCALg1$,r$,w%:g$=FNlower(g$)
47380REPEATg1$=FNclean(FNgetpar(g$,","))
47390IFLEFT$(g1$,9)="newsbase."THENl%+=1ELSEw%+=1:REM l%=local groups, w%=worldwide
47400IFl%>0ANDw%>0THENr$=FNmsg0("Qxpost")
47410IFLEFT$(g1$,6)="email."ORLEFT$(g1$,7)="folder."ORLEFT$(g1$,4)="junk"ORLEFT$(g1$,7)="control"THENr$=FNmsg1("Qbadg",g1$)
47420UNTILg$=""ORr$>""
47430=r$
47440
47450DEFFNlocalnews(f$)
47460LOCALr$,d$
47470d$=lindir$+".localnews"
47480f1%=FNopenout(d$):f2%=FNopenin(f$)
47490IFf1%>0ANDf2%>0THEN
47500  BPUT#f1%,"#! rnews "+STR$FNfilesize(f$)
47510  PROCfcopy(f2%,f1%):PROCsettype(d$,&FFF)
47520  ELSE
47530  r$=FNmsg0("Qbatch")
47540ENDIF
47550PROCcf(f1%):PROCcf(f2%)
47560=r$
47570
47580DEFFNtmpfile
47590LOCALf$
47600IFrw%THEN
47610  REPEATf$=tmpdir$+".tmp"+STR$RND(9999):UNTILFNobjtype(f$)=0
47620  ELSE
47630  f$="<Wimp$Scrap>"
47640ENDIF
47650=f$
47660
47670DEFFNmoddest(g$)
47680LOCALg1$
47690REPEATg1$=g1$+FNgetpar(g$,"."):IFg$>""THENg1$+="-"
47700UNTILg$="":g1$+="@"+modgw$
47710PROCprint("","",FNmsg0("Qmod1"),g1$)
47720=g1$
47730
47740DEFFNremail(to$,d$,u$)
47750LOCALA$,f$,a$:f$=FNtmpfile
47760f1%=FNopenin(d$)
47770IFf1%>0THEN
47780  f2%=FNopenout(f$)
47790  IFf2%>0THEN
47800    BPUT#f2%,"To: "+to$
47810    REPEATA$=FNsget(f1%)
47820      IFLEFT$(A$,4)="To: "THENBPUT#f2%,"X-Originally-";
47830      IFLEFT$(A$,5)<>"From "THENBPUT#f2%,A$
47840    UNTILA$=""OREOF#f1%
47850    PROCfcopy(f1%,f2%):PROCcf(f2%):PROCsettype(f$,&FFF)
47860    ELSE
47870    PROCmessage0("Scrap",0)
47880  ENDIF
47890  PROCcf(f1%):F%=FNdelfile(d$)
47900ENDIF
47910=FNsendmail(f$,u$)
47920
47930DEFFNrepost(d$)
47940LOCALA$,B$,C$,f$,a$:f$=FNtmpfile
47950f1%=FNopenin(d$)
47960IFf1%>0THEN
47970  f2%=FNopenout(f$)
47980  IFf2%>0THEN
47990    REPEATA$=FNsget(f1%)
48000      IFLEFT$(A$,12)="Newsgroups: "THEN
48010        B$="Newsgroups: ":FORr3%=13TOLENA$:C$=MID$(A$,r3%,1):IFC$<>" "THENB$+=C$
48020        NEXTr3%:A$=B$
48030       ENDIF
48040      BPUT#f2%,A$
48050    UNTILA$=""OREOF#f1%
48060    PROCfcopy(f1%,f2%):PROCcf(f2%):PROCsettype(f$,&FFF)
48070    ELSE
48080    f$=d$:REM couldn't open scratchfile
48090  ENDIF
48100  PROCcf(f1%):F%=FNdelfile(d$)
48110  ELSE
48120  f$=d$:REM couldn't open input file
48130ENDIF
48140=f$
48150
48160DEFPROCfcopy(in%,out%)
48170LOCALnbuf%,nbr%,r3%,F%:IFEOF#in%THENENDPROC
48180nbr%=FNclaim(nbuf%,4096,"fcopy"):r3%=0
48190IFnbuf%>0THEN
48200  WHILEr3%=0AND(F%AND1)=0:SYS"XOS_GBPB",4,in%,nbuf%,4096TO,,,r3%;F%
48210    IFr3%<4096AND(F%AND1)=0THENSYS"XOS_GBPB",2,out%,nbuf%,4096-r3%TO;F%
48220  ENDWHILE
48230  ELSE
48240  WHILENOTEOF#in%:BPUT#out%,(BGET#in%):ENDWHILE
48250ENDIF
48260PROCrelease(nbr%)
48270ENDPROC
48280
48290DEFFNkeepfile(ty%,f$,RETURN u$)
48300LOCALp$,g$,g%,ret$,m$:m$=FNmsg0("Qkeep0")
48310LOCALto$,from$,subject$,messid$,newsgroup$,expires%,artdate%,supersede$,receipt$,lasth%,control$,precedence$,replyto$,approved$,reference$,cc$,origto$
48320IFFNgetheaderinfo(f$)<>0ANDkeepoutg%<>0THEN
48330  from$=FNclean(from$):g$=from$:g%=INSTR(g$,"@"):IFg%>0THENg$=LEFT$(g$,g%-1)
48340  u$=g$:u%=FNuserno(g$):IFu%=0THENu%=0:g$="postmaster"
48350  IFapproved$>""THENnewsgroup$="!"+newsgroup$:REM flag approved arts for posting
48360  IF(ukn%(u%)<>0ANDty%=1)OR(ukm%(u%)<>0ANDty%=0)THEN
48370    IFg$>""THEN
48380      CASEty%OF
48390        WHEN0:g$="Email."+g$+".outgoing.mail":from$=to$
48400        OTHERWISE:g$="Email."+g$+".outgoing.news":from$=newsgroup$
48410      ENDCASE
48420      g%=FNnametono(g$,TRUE):IFg%>0THEN
48430        p$=FNnotopath(g%)
48440        IFp$>""THEN
48450          s%=FNseq(g%):F%=FNartcopy(g%,s%,f$)
48460          IFF%<>0PROCwriteindexbuf:ELSEPROCmessage(m$+FNmsg0("Qkeep1"),1)
48470          ELSE
48480          PROCmessage(m$+FNmsg0("Qkeep2"),1)
48490        ENDIF
48500        ELSE
48510        PROCmessage(m$+FNmsg0("Qkeep3"),1)
48520      ENDIF
48530      ELSE
48540      PROCmessage(m$+FNmsg0("Qkeep4"),1)
48550    ENDIF
48560  ENDIF
48570  ELSE
48580  IFkeepoutg%<>0THENPROCmessage(m$+FNmsg1("NoFile",f$),1)
48590ENDIF
48600IFty%=0THEN
48610  ret$=to$
48620  PROClog("Sending mail from "+u$+" to "+LEFT$(ret$,200))
48630  ELSE
48640  ret$=newsgroup$
48650  PROClog("Posting news from "+u$+" to "+LEFT$(ret$,200))
48660ENDIF
48670=ret$
48680
48690DEFFNsget(h%)
48700REM return line from file without error if too long...
48710LOCALa$,C%
48720WHILEC%<>10ANDEOF#h%=0:C%=BGET#h%:IFLENa$<253ANDC%<>10ANDC%<>13:a$+=CHR$C%
48730ENDWHILE
48740=a$
48750
48760DEFPROClistusers(com%,nbfrom%,nbref%,str$)
48770LOCALn%:n%=1
48780WHILEuser$(n%)>""
48790  PROCnbreply(nbfrom%,nbref%,com%,ugrp%(n%),0,user$(n%),FNupath(user$(n%))):n%+=1
48800ENDWHILE
48810PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
48820ENDPROC
48830
48840DEFPROCadduser(com%,nbfrom%,nbref%,str$)
48850IFFNadduser(str$)THEN
48860  PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
48870ELSE
48880  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Unoadd"))
48890ENDIF
48900ENDPROC
48910
48920DEFPROCdeluser(com%,nbfrom%,nbref%,str$)
48930IFFNdeluser(str$)THEN
48940  PROCnbreply(nbfrom%,nbref%,com%,0,0,"","")
48950ELSE
48960  PROCnbcomfail(nbfrom%,nbref%,com%,1,FNmsg0("Unodel"))
48970ENDIF
48980ENDPROC
48990
49000DEFFNuplim(g%,n%)
49010IFn%=0ORn%>ABSgrpseq%(g%):=ABSgrpseq%(g%)
49020=n%
49030
49040DEFFNgmatch(g$,g%)
49050IFg%>maxgroup%THEN=0
49060=FNsmatch(g$,grp$(g%))
49070
49080DEFFNdelok(g$)
49090IFrw%THENIFdelok%<>0ORFNspecialgrp(g$)>1THEN=TRUE
49100=FALSE
49110
49120DEFFNspecialgrp(g$)
49130g$=FNclean(g$):g$=FNlower(g$)
49140IFg$="junk"ORLEFT$(g$,7)="control"THEN=1
49150IFLEFT$(g$,6)="email."THEN=2
49160IFLEFT$(g$,7)="folder."THEN=3
49170IFLEFT$(g$,9)="newsbase."THEN=1
49180=0
49190
49200DEFFNpath(A$)
49210LOCALB$:B$=""
49220IFA$>""THENCALLgetpath%,A$,B$
49230=dpath$+B$
49240
49250DEFFNlower(A$)
49260IFA$>""CALLmklcase%,A$
49270=A$
49280
49290DEFFNstr(a%)
49300LOCALdummy%,B$
49310CALLgetline%,dummy%,a%,B$
49320=B$
49330
49340DEFFNsmatch(A$,B$)
49350REM wild string match (case insensitive): pattern, string
49360LOCALok%
49370IFA$>""ANDB$>""THENCALLsmatch%,A$,B$,ok%
49380=ABSok%
49390
49400DEFPROCloadcode
49410LOCALl%,F%
49420l%=FNfilesize(resdir$+".code")
49430IFl%>0THEN
49440  DIMmcode% l%
49450  cpylcase%=mcode%+4:getpath%=mcode%+8:getline%=mcode%+12
49460  getlinez%=mcode%+16:getstr%=mcode%+20:mklcase%=mcode%+24
49470  trimstr%=mcode%+28:chkdelart%=mcode%+32:headerno%=mcode%+36
49480  smatch%=mcode%+40
49490  SYS"XOS_File",16,resdir$+".code",mcode%,0TO;F%
49500  IF(F%AND1)THENERROR0,"Code file not found!"
49510  ELSE
49520  ERROR0,"Code file not found!"
49530ENDIF
49540ENDPROC
49550
49560DEFPROCloadsysconf
49570LOCALt$,p$,v$,m%,v%
49580addgrp%=20:mingrp%=40:maxusr%=20:maxfilt%=10
49590maxcl%=15:mincpu%=7:maxcpu%=15:minrma%=0:inbufsize%=16*1024:dbg_exptime%=3
49600chktime%=1000
49610f1%=FNopenin(support$+".!nbsys"):IFf1%<>0THEN
49620  REPEATt$=GET$#f1%:p$=""
49630  m%=INSTR(t$," ")
49640  IFm%>0THENp$=FNlower(LEFT$(t$,m%-1)):v$=MID$(t$,m%+1):v%=VALv$
49650  CASEp$OF
49660    WHEN"add_grp":IFv%>10THENaddgrp%=v%
49670    WHEN"min_grp":IFv%>10THENmingrp%=v%
49680    WHEN"max_usr":IFv%>5THENmaxusr%=v%
49690    WHEN"max_rdr":IFv%>4THENmaxcl%=v%
49700    WHEN"min_cpu":IFv%>5ANDv%<20THENmincpu%=v%
49710    WHEN"max_cpu":IFv%>5ANDv%<60THENmaxcpu%=v%
49720    WHEN"deb_buf":IFv%>3ANDv%<256THENinbufsize%=v%*1024
49730    WHEN"dbg_exp":IFv%>0THENdbg_exptime%=v%
49740    WHEN"min_flt":IFv%>10THENmaxfilt%=v%
49750    WHEN"chk_tim":IFv%>5THENchktime%=v%*100
49760  ENDCASE
49770  UNTILEOF#f1%:PROCcf(f1%)
49780ENDIF
49790DIM cl_id%(maxcl%),cl_user$(maxcl%)
49800ENDPROC
49810
49820DEFFNcpu(f%)
49830IFf%=0THEN=-mincpu%
49840=-maxcpu%
49850
49860DEFFNclaim(RETURN var%,size%,A$)
49870LOCALF%,ret%
49880IFdynarea% THEN
49890  REM changed size_limit (r5), and flag bit 7 set (non-draggable)
49900  SYS&20066,0,-1,size%,-1,128,size%,0,0,myname$+"_"+A$TO,ret%,,var%;F%
49910  IF(F%AND1)THENvar%=0:ret%=0
49920  ELSE
49930  SYS"XOS_Module",6,,,size%TO,,var%;F%
49940  IF(F%AND1)THENvar%=0
49950  ret%=var%
49960ENDIF
49970=ret%
49980
49990DEFPROCrelease(RETURN var%)
50000LOCALF%,s%
50010IFvar%>0THEN
50020  IFdynarea% THEN
50030  SYS&20066,2,var%TO,,s%;F%
50040  IFs%>0AND(F%AND1)=0THENSYS&20066,1,var%TO;F%:var%=0
50050  ELSE
50060  SYS"XOS_Module",7,,var%TO;F%:var%=0
50070  SYS"XOS_ChangeDynamicArea",1,(-16*1024*1024)
50080  ENDIF
50090ENDIF
50100ENDPROC
50110
50120DEFPROCtidydynareas
50130LOCALA%,N%,P%
50140IFdynarea% THEN
50150  SYS&66,3,-1TO,A%
50160  WHILEA%<>-1
50170    SYS&66,2,A%TO,,,,,,,,P%
50180    SYS&66,3,A%TO,N%
50190    IFLEFT$(FNstr(P%),1+LENmyname$)=myname$+"_"THENSYS&66,1,A%
50200    A%=N%
50210  ENDWHILE
50220ENDIF
50230ENDPROC
50240
50250DEFPROCstartmsgtrans
50260LOCALf$:f$=FNresfile("Messages")
50270SYS"XMessageTrans_FileInfo",,f$TO,,buf%;F%
50280IF(F%AND1)THENERROR0,"Couldn't find Messages file!"
50290DIMmsgdesc%16,msgbuf% buf%
50300SYS"MessageTrans_OpenFile",msgdesc%,f$,msgbuf%
50310ENDPROC
50320
50330DEFPROCendmsgtrans
50340IFmsgdesc%>0THENSYS"MessageTrans_CloseFile",msgdesc%
50350ENDPROC
50360
50370DEFFNmsg0(t$)
50380LOCALs%,F%
50390SYS"XMessageTrans_Lookup",msgdesc%,t$TO,,s%;F%
50400IF(F%AND1)THENs%=FNmsgfail(t$)
50410=FNstr(s%)
50420DEFFNmsg1(t$,a$)
50430LOCALs%,F%
50440SYS"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$TO,,s%;F%
50450IF(F%AND1)THENs%=FNmsgfail(t$)
50460=FNstr(s%)
50470DEFFNmsg2(t$,a$,b$)
50480LOCALs%,F%
50490SYS"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$,b$TO,,s%;F%
50500IF(F%AND1)THENs%=FNmsgfail(t$)
50510=FNstr(s%)
50520DEFFNmsg3(t$,a$,b$,c$)
50530LOCALs%,F%
50540SYS"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$,b$,c$TO,,s%;F%
50550IF(F%AND1)THENs%=FNmsgfail(t$)
50560=FNstr(s%)
50570
50580DEFFNmsgfail(t$)
50590PROCmessage("Failed to look up message token: "+t$,1)
50600$tmp%="notoken"
50610=tmp%
50620
50630DEFPROClocknewsdir
50640LOCALt%
50650IFrw%THEN
50660  t%=FNlockval
50670  IFt%>0THEN
50680    IFFNtaskexists(t%)THEN
50690      ERROR0,FNmsg1("LockFail1",STR$~t%)
50700      ELSE
50710      IFFNconfirm(FNmsg1("LockFail3",STR$~t%))=1THEN
50720        IFFNforcedelfile(lockfile$)=0THENt%=0ELSEERROR0,FNmsg0("LockFail4")
50730        ELSE
50740        PROCfinish:END
50750      ENDIF
50760    ENDIF
50770  ENDIF
50780  IFt%=0THEN
50790    IFFNdiskspace(basedir$)<1000THENERROR0,"No disk space!"
50800    f5%=FNopenout(lockfile$)
50810    IFf5%>0THEN
50820      BPUT#f5%,STR$task%:PROCcf(f5%)
50830      ELSE
50840      ERROR0,FNmsg0("LockFail2")
50850    ENDIF
50860  ENDIF
50870ENDIF
50880ENDPROC
50890
50900DEFFNlockval
50910LOCALr%:r%=0
50920f1%=FNopenin(lockfile$):IFf1%>0THENr%=VALGET$#f1%:PROCcf(f1%)
50930=r%
50940
50950DEFPROCchecklock
50960IFrw%THEN
50970  IFFNlockval<>task%THEN
50980    PROCmessage0("LockFail0",1):startupok%=0:PROCfinish:END
50990  ENDIF
51000ENDIF
51010ENDPROC
51020
51030DEFPROCunlocknewsdir
51040IFrw%THEN
51050  IFFNlockval=task%THENF%=FNforcedelfile(lockfile$)
51060ENDIF
51070ENDPROC
51080
51090DEFFNtaskexists(t%)
51100LOCALr%:r%=0
51110REPEAT
51120SYS"TaskManager_EnumerateTasks",r%,tmp%,255TOr%
51130UNTILr%<0OR!tmp%=t%
51140=(!tmp%=t%)
51150
51160DEFFNresfile(f$)
51170LOCALt%,t$,d$,r$
51180SYS"Territory_Number"TOt%
51190SYS"Territory_NumberToName",t%,tmp%,250TO,tmp%
51200t$=FNstr(tmp%):d$=resdir$+"."+t$+"."+f$
51210IFFNobjtype(d$)=1 THEN
51220  r$=d$
51230  ELSE
51240  d$=resdir$+"."+t$
51250  IFFNobjtype(d$)=1THEN
51260    f1%=FNopenin(d$):IFf1%<>0THENt$=GET$#f1%:PROCcf(f1%)
51270    r$=d$=resdir$+"."+t$+"."+f$
51280    ELSE
51290    r$=d$=resdir$+".UK."+f$
51300  ENDIF
51310ENDIF
51320IFFNobjtype(r$)=0THENERROR0,"Resource file "+f$+" for "+t$+" not found"
51330=r$

�:�" at ";�:�
	�init
�duptask>0��
(�createdirs
2
�loadcode
<�startmsgtrans
F�startwimp
PJ� claim all free memory, bar 64k, up to a maximum of 320k (free space)
Z�=�+�freemem(-64)
d �(�-�)>320*1024��=�+320*1024
n�loadsysconf
x�checknewsdir
��gettransports
��locknewsdir
��initgrpdata
��initfilters
��=(�+&4000)
��readconfig
��inituserdata
��starttransport
��autoconfigure
��l1%=1�3:�poll(0):�l1%
��=(�+&4000)
�"startupok%=1:�nbstartup(0,0,0)
��checkoutfiles
�initconf(initconf%)
�=�+�checkslot
��errorbox(�)
"�startupcheckexpire
,�
6  �checkfiles%�
@	    �
J      start%=0
T&      file$=�checkforfiles(start%)
^      �=�+�checkslot
h5      �file$>""��checkdisk:�dobatch(file$,start%)
r    �file$=""
|     checkfiles%=autodebatch%
�  �
�  �sleep
��0
��
�
���initconf(i%)
��i%>0�rw%�
�!  �i%=2��message0("Sinfo2",1)
�A  �front(msetup%):�print(�msg0("Setup"),�msg0("Swait"),"","")
�*  �:�poll(50):�confopen%=�:�saveconfig
��
��
�

��cron
4�(time%-cron0%)>600�cron0%=time%:�checkoutfiles
3�(time%-cron1%)>1200�cron1%=time%:�checktosend
&:�(time%-cron2%)>6000�cron2%=time%:�checklock:�log("")
08�(time%-cron3%)>400�infoopen%��credits:cron3%=time%
:D�(time%-cron4%)>30000�cron4%=time%:�blockexpire%=0��checkexpire
D�
N
X��sleep
b�m$
lm$="Idle2":�rw%�m$="Idle"
v.�print(�msg0(m$)," "," "," "):sleep%=time%
�6��poll(200):�forcebatch%��(time%-sleep%)>=chktime%
�forcebatch%=0
��
�
���checknewsdir
�ȕnewsroot$=""
�<  �rw%��message0("Snewsdir",1)��message0("Sronewsdir",1)
�7  �createdirs:�newsroot$=""�rw%�cfront(savend%,0,0)
�(  ��poll(200):�ndopen%=0:�createdirs
��
�'绤varval("NewsDir$Version")<1�rw%�
�%  �message0("Supdate",0):�poll(0)
�2  �makenewsdir("<NewsDir$Dir>"):�message("",0)
�
�

 ݤcheckforfiles(� start%)
*�t1%,l%,f$,pat$
4�rw%��freemem(0)>32*1024�
>3  �print(�msg0("Idle"),�msg0("Fcheck")," "," ")
H*  � first check for recovery record...
R  f$=�check_recfile(start%)
\
  �f$=""�
f    start%=0:t1%=0
pC    �transi$(transport%,0)=""�l%=�runtransportfile(13,"","","")
z	    �
�      l%=0
�      �pat$=transi$(t1%,l%)
�1        �pat$>""�f$=�checkinfiles(pat$):l%+=1
�      �f$>""�pat$=""�l%=10
�      t1%+=transport%
�*    �f$>""�t1%>transport%�transport%=0
�  �
��
�=f$
�
���startupcheckexpire
��checkexpiretime(�time)�
�7  � check if expiry is wanted; mark as done if not.
?  �confirm2(�msg0("Econfirm"))=2��stamp(newsroot$+".news")
�
 �rw%�blockexpire%=0:cron4%=0
$�
.
8��checkexpire
B�t%,g%,t$,now%
Lnow%=�time
V�checkexpiretime(now%)�
`  �nbupdate(10,"",0,"","")
j'  �log("Starting automatic expiry")
t(  �print("",�msg0("Echeck")," "," ")
~  �stamp(newsroot$+".news")
�  g%=0:�g%+=1
�%    t%=�filetime(�path(grp$(g%)))
�,    �t%<now%��expiregroup(g%,0,autoexp%)
�     �g%�10=0��poll(slice%*2)
�    �cancel%�
�?      �confirm(�msg1("Ccancexp",g$))=2�cancel%=0�cancel%=�
�	    �
�  �g%=groups%�cancel%<>0
�  �log("Finished expiry")
�=  �runsupport("Trimlist "+�ngexp%):�expmiscdir(tmpdir$,1)
��
��


ݤcheckexpiretime(now%)
!�yes%,last%,now$,test$,etime%

yes%=0
(	�rw%�
2(  last%=�filetime(newsroot$+".news")
<C  � test$ is expiry trigger time as string, format CEYRMNDYHRMI
F8  � FNfiletime returns file timestamp in same format
P  �postfetchready%<>0�
Z    postfetchready%=0
d7    t%=�runtransportfile(5,"","",""):� postfetch...
n  �
x'  etime%=exptime%:�expany%�etime%=0
�  �autoexp%�indebatch%=0�
�&    test$=�now%+�"0000"+�etime%,4)
�    now$=�fulltime
�    yes%=(now$>test$)
�    �yes%�
�3      � also check last expiry was yesterday...
�      �last%>now%-1�yes%=0
�M      � and check transport not active... don't want expiry while online.
�9      �yes%��runtransportfile(15,"","","")<>0�yes%=0
�	    �
�  �
��
�	=yes%

��checkoutfiles
�l%,t%,f$,d$,p$,n%:l%=0
"�
,%  f$=transo$(transport%,l%):l%+=1
6  d$=�dir(f$):p$=�leaf(f$)
@3  ș"XOS_GBPB",9,d$,tmp%,1,0,255,p$ �,,,n%;err%
J  �(err%�1)=0�n%>0�t%+=1
T�f$=""�l%=11
^9d$=defic$:�t%=0�defic$="newsbase1"�defic$="newsbase2"
h!�d$<>defic$��changeic(defic$)
r�
|
�ݤcheckinfiles(A$)
�?�result$,n%,next%,f$,ff$,f%,F%,l%,source$,pat$,dirbuf%,dbr%
�next%=0
�'dbr%=�claim(dirbuf%,dbsize%,"dbuf")
�#source$=�dir(A$):pat$=�leaf(A$)
��
�I  ș"XOS_GBPB",9,source$,dirbuf%,1,next%,dbsize%,pat$ �,,,n%,next%;F%
�  �(F%�1)=0�n%>0�
�+    f$=�str(dirbuf%):ff$=source$+"."+f$
�0    � attempt deletion of any empty files...
�*    �filesize(ff$)=0�F%=�delfile(ff$)
�6    � see if file can be opened for read access...
�    F%=0:f1%=�openin(ff$)
    �f1%<>0�
      �cf(f1%)
      �source$<>workdir$�
&-        F%=�runtransportfile(4,ff$,"","")
0          �F%=0�
:/          F%=�movefile(ff$,workdir$+"."+f$)
D          �
NG          �message1("Dnoprefetch",�varval("Newsbase$ReturnInfo"),1)
X
        �
b      �
l'      �F%=0�result$=workdir$+"."+f$
v	    �
�	    �
�    �poll(slice%*2)
�  �
�!�result$>""�next%<0�(F%�1)<>0
��release(dbr%)
�=result$
�
���checktosend
�0�n%,next%,f$,d$,F%,dirbuf%,dbr%,info$,u$,ty%
�	�rw%�
�/  nf%=0:dbr%=�claim(dirbuf%,dbsize%,"dbuf")
�+  �ty%=0�1:n%=transm%(transport%,ty%+1)
�    �freemem(0)>=n%*1024�
      next%=0:�
R        ș"XOS_GBPB",9,outdir$(ty%),dirbuf%,1,next%,dbsize%,"*"�,,,n%,next%;F%
        �(F%�1)=0�n%>0�
 A          f$=outdir$(ty%)+"."+�str(dirbuf%):�settype(f$,&FFF)
*-          d$=�tmpfile:F%=�movefile(f$,d$)
4          �(F%�1)=0�
>1          next%-=1:info$=�keepfile(ty%,d$,u$)
H          Ȏty%�
R&            �0:r$=�sendmail(d$,u$)
\,            �1:r$=�sendnews(d$,info$,u$)
f          �
p/          �r$>""�message1("Qsendfail",d$,1)
z          �poll(slice%*2)
�          �
�
        �
�      �next%<0�(F%�1)<>0
�	    �
�
  �ty%
�  �release(dbr%)
��
��
�
�
ݤdir(f$)
��l%
�%l%=�f$:�l%-=1:��f$,l%,1)="."�l%<1
�=�f$,l%-1)
	
	ݤleaf(f$)
	�l%
	$%l%=�f$:�l%-=1:��f$,l%,1)="."�l%<1
	.=�f$,l%+1)
	8
	B��dobatch(fullbf$,bstart%)
	L�bf$,ty$,F%
	Vbf$=�leaf(fullbf$)
	`�decompress(fullbf$)
	j�filetype(fullbf$)=&FCA �
	tJ  �message0("CompFail4",1):�log("Batch decompression failed for "+bf$)
	~9  �movetodebug(fullbf$)<>0�F%=�forcedelfile(fullbf$)
	�  �
	�  �startmemmgr:indebatch%=�
	�@  inbuf%=base%:�extend(inbufsize%):artbase%=base%+inbufsize%
	�)  �print(�msg0("Dstart")," "," "," ")
	�!  �openbatch(fullbf$,bstart%)
	�  cancel%=�
	�D  done%=0:del%=�:off%=0:ptr%=0:recpos%=0:lastpos%=0:batartlen%=0
	�*  type%=�identifyfile(fullbf$,bstart%)
	�2  �type%=0�ty$=�msg0("Mail")�ty$=�msg0("News")
	�%  start%=�:total%=0:dstime%=time%
	�  ȕeof%=�
	�&    cancel%=�:�doarticle:�savelist
+    �print(�msg1("Dtype",ty$),"","","")

    �cancel%��cancelbatch
  �
  �extend(0):indebatch%=0
(  �endbatch(fullbf$)
2�
<�
F
P��cancelbatch
Z7eof%=�:del%=�:�cf(f00%):�write_recfile:indebatch%=0
d!�message0("Dcancel",0):�pause
n�
x
���endbatch(batchf$)
�$�F%,n%,t%,debdir$,rate$:rate$=""
��writeindexbuf
�$� write debatch stats to logfile
�Bt%=�(dstime%-time%)�100:�t%>0�rate$=�((len%-bstart%)�t%)+"cps"
�I�log("Finished batch "+bf$+" "+�done%+" arts "+�len%+" bytes "+rate$)
�F�cf(f00%):� batch file should be closed already, but this ensures.
��changeic(defic$)
��cancel%=0�
�  �savegrpdata
�  �del_recfile
�  �keepb%<>0�del%=0�
�;    �movetodebug(batchf$)<>0�F%=�forcedelfile(batchf$)
	    �
!    F%=�forcedelfile(batchf$)
  �
"(  �F%<>0��message1("Ddelfail",bf$,1)
,  postfetchready%=1
6'  �expmiscdir(baddir$,dbg_exptime%)
@�
J�arrive
T�
^
hݤmovetodebug(f$)
r�F%,n%,d$,bf$,b%
|bf$=�leaf(f$)
�%d$=baddir$+"."+bf$:�ensuredir(d$)
��objtype(d$)<2�d$=baddir$
�
n%=1:�
�!  ?tmp%=3:ș"OS_Word",14,tmp%
�O  ș"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%MN%DY%24%MI%SE"�b%
�*  n%+=1:F%=�rename(f$,d$+"."+�str(b%))
��n%>9�F%=0
�=F%
�
���arrive
�
�a$,a%
�Ȏarrart%�
�  �0:a$=�msg0("Nonews")
  �1:a$=�msg0("Newnews1")
$  :a$=�msg1("Newnews",�arrart%)
�
&#�updateiconstring(arrive%,1,a$)
0D�arrmail$>""�a$=�msg1("Newmail",�arrmail$,2))�a$=�msg0("Nomail")
:(�updateiconstring(arrive%,2,�a$,36))
D�alert%�
N-  �arrmail$>""�(arrart%>0�alertnews%<>0)�
X7    �arropen%=0�cfront(arrive%,0,0)��front(arrive%)
b7    a%=1:�defclient$>""��objtype(defclient$)>0�a%=0
l     �setshaded(arrive%,3,a%)
v    �alertbeep%�7
�  �
��
��
�
���savegrpdata
��startupok%<>0�
�  �writegrpdata
�  �writeindexbuf
��
��adddelbuf(0,0)
��
�
���doarticle

"�extend(inbufsize%+defartbuf%)

�clearheader

0outg%()=0:ptr%=0:inhdr%=�:out$="":foundid%=0

 1nextartpos%=pos%+thisartlen%:thisartpos%=pos%

*�

4  �inhdr%�

>3    �headerline(line$):start%=0:�poll(slice%*2)

H0    �discard%=0�addtobuffer(line$):��discard

R?    �line$=""�inhdr%=�:�thisartlen%>0��blockmove:�batchpoll

\	    �

f&    �addtobuffer(line$):�batchpoll

p  �

z  line$=�getline

�C  �inhdr%=0�pos%>nextartpos%-100��line$,seplen%)=sep$�start%=�

��start%<>0 �eof%<>0

�<�line$,4)="#! r"�thisartlen%=��line$,10):�thisartlen%=0

�*done%+=1:total%+=1:�type%=1�arrart%+=1

��

�

�
��discard

��tmp$:tmp$=line$

�ȕlong%:tmp$=�getline:�

��

�

���batchpoll

�>�poll(slice%):�(time%-stime%)>200��updatepos:stime%=time%
�

��blockmove
$�l%,F%,m%,a0%,a1%,a2%,a3%
.#l%=thisartlen%-pos%+thisartpos%
8�bufptr%+l%+4>inbufsize%��
B;m%=inbuf%+bufptr%+l%:a0%=?m%:a1%=m%?1:a2%=m%?2:a3%=m%?3
LR� check for "#! r" without reading string (buffer overrun-possible data abort)
V"�a0%=35�a1%=33�a2%=32�a3%=114�
`<  �ptr%+l%>bufsize%��extend(inbufsize%+bufsize%+l%+1024)
jM  ș"XWimp_TransferBlock",task%,inbuf%+bufptr%,task%,artbase%+ptr%,l%�;F%
t-  �(F%�1)=0�pos%+=l%:ptr%+=l%:bufptr%+=l%
~�
��
�
���clearheader
�Oto$="<blank>":from$="(no sender)":subject$="(no subject)":cc$="":origto$=""
�Omessid$="<0>":newsgroup$="":expires%=0:artdate%=0:supersede$="":control$=""
�Nreceipt$="":lasth%=0:precedence$="":replyto$="":approved$="":reference$=""
��
�
�!ݤidentifyfile(file$,offset%)
�#�t%,lc%,clue%,a$:t%=-1:clue%=-1
��
�  line$=�getline
1  lc%+=1:line$=�clean(line$):a$=�lower(line$)

(  �(line$)=1�t%=0:sep$=�1:ident$=""
4  �line$,5)="From "�t%=0:sep$="From ":ident$=""
R  �line$,8)="#! rmail"�t%=0:sep$="#! rmail":ident$="":thisartlen%=��line$,10)
(]  �line$,8)="#! rnews"�t%=1:sep$="#! rnews":ident$="Newsgroups:":thisartlen%=��line$,10)
2B  �a$,11)="newsgroups:"��a$,5)="xref:"��a$,5)="path:"�clue%=1
<5  �a$,4)="to: "��a$,14)="apparently-to:"�clue%=0
F�t%>=0�eof%<>0
P
�t%<0�
Z/  t%=1:sep$="#! rnews":ident$="Newsgroups:"
d*  �clue%=0�t%=0:sep$="From ":ident$=""
n�
x*�lc%>1��restartbatch(file$,t%,offset%)
�seplen%=�sep$
�=t%
�
���headerline(line$)
��A$
�4�sep$<>"From "��line$,seplen%)=sep$�discard%=�:�
��setheadervar(line$)
�4�type%=1��line$,5)="Path:"��addustopath(line$):�
��foundid%>0��
��type%=0�lasth%=11�
�  �type%=0�
�=    A$="Email."+bf$:�userok(bf$)=0�A$="Email.postmaster"
�	    �
    A$=newsgroup$:outg%()=0
  �
E  �addheadertobuffer(line$):�groupsline(A$):discard%=�:foundid%=1
"  �type%=1��doxref
,�
6�
@
J��setheadervar(A$)
T�no%:�A$=""��
^�headerno%,A$,no%
h
Ȏno%�
r   �1:subject$=�clean(�A$,9))
|  �2:from$=�clean(�A$,6))
�   �3:messid$=�clean(�A$,12))
�#  �4:supersede$=�clean(�A$,12))
�%  �5:expires%=�decodedate(�A$,9))
�   �6:control$=�clean(�A$,9))
�%  �7:artdate%=�decodedate(�A$,7))
�  �8:discard%=�
�$  �9:�to$=""�to$=�clean(�A$,15))
�  �10:to$=�clean(�A$,4))
�$  �11:newsgroup$=�clean(�A$,12))
�"  �12:receipt$=�clean(�A$,20))
�%  �13:precedence$=�clean(�A$,12))
�"  �14:replyto$=�clean(�A$,10))
�#  �15:approved$=�clean(�A$,10))
B  �16:�addtobuffer(A$):discard%=�:line$="":� "Message:" header
$  �17:reference$=�clean(�A$,12))
  �18:cc$=�clean(�A$,5))
&!  �19:origto$=�clean(�A$,19))
0  �20:� Errors-To:
:2  :�A$,1)=" "��conthline(A$,lasth%)�lashh%=0
D�
N�no%>0�lasth%=no%
X�
b
l��conthline(a$,t%)
v	Ȏt%�
�  �10:�to$+�a$<250�to$+=a$
�-  �17:�reference$+�a$<250�reference$+=a$
�  �18:�cc$+�a$<250�cc$+=a$
��
��
�
�ݤdecodedate(A$)
�;�res%,d$,m$,y$,l%,m%:� attempt to decode header date...
�"l%=�A$,","):�l%>0�A$=�A$,l%+1)
�-  A$=�clean(A$):A$=�lower(A$):l%=�A$," ")
�"  d$=�A$,l%-1):�l%=2�d$="0"+d$
�A  m%=�"janfebmaraprmayjunjulaugsepoctnovdec",�A$,l%+1,3))�3+1
�  m$=�"0"+�m%,2)
   y$=�A$,l%+5,4):l%=�y$," ")
$  �l%>0�y$=�((�time)�1E6)+�y$,2)
%  �d$*�m$*�y$>0�res%=�(y$+m$+d$)
 	=res%
*
4��deleteid(g%,id$)
>�a%,f$,id1$
H�id1$=�getpar(id$," ")
RC  �print("",�msg1("Acancel",id1$),"",""):a%=�findartid(g%,id1$)
\  �a%>0�
f>    �delart(g%,a%):�log("Cancelled "+id1$+" in "+grp$(g%))
p	    �
z'    �print("",�msg0("Afail"),"","")
�  �
��id$=""
��
�
���docontrol(g%,a$)
��c$
�c$=�clean(�getpar(a$," "))
��c$="cancel"�docanc%<>0�
�9  a$=�clean(a$):�a$,1)="<"��a$)=">"��deleteid(g%,a$)
��
��
�
���doxref
�xref$,c%,t%
�outg%(0)>0�
  xref$="Xref: "+hostname$
$  c%=0:�
.R  �xref$+�grp$(outg%(c%))<200 �xref$=xref$+" "+grp$(outg%(c%))+":"+�outs%(c%)
8  c%+=1
B  �outg%(c%)=0�c%=maxsave%
L3  t%=long%:long%=0:�addtobuffer(xref$):long%=t%
V�
`�
j
t��addustopath(a$)
~�temp%,l%:l%=0
�#�hostname$>""��a$,hostname$)<1�
�  temp%=long%:long%=�
�<  �addheadertobuffer("Path: "+hostname$+"!"):long%=temp%
�  l%=�a$,":")
��
�.�addtobuffer(�clean(�a$,l%+1))):discard%=�
��
�
�
ݤgetline
�/� if line incomplete, long% is set to TRUE.
��C%,P%,l%,loc%,A$
�)long%=�:P%=0:discard%=0:lastpos%=pos%
� first try fast line fetch

*�pos%+254<len%�bufptr%+254<inbufsize%�
1  loc%=bufptr%+inbuf%:�getline%,long%,loc%,A$
/  P%=�A$-(long%=0):bufptr%+=P%:pos%+=P%:=A$
(�
2/� if that fails, use the slower smarter one
<
P%=0:�
F(  C%=bufptr%?inbuf%:bufptr%+=1:P%+=1
P'  �P%<250�tmp%?P%=C% �C%=10:long%=�
Z4  �pos%>=len% �eof%=� ��bufptr%=inbufsize% �fill
d#�C%=10 �C%=13 �eof%<>0:pos%+=P%
n7�tmp%?P%<32 �tmp%?P%<>1 �tmp%?P%=13 �tmp%?(P%+1)=13
x=$(tmp%+1)
�
���updatepos
�
�stat$,t%
�
�len%>0 �
�B  stat$=�pos%+"/"+�len%+" bytes ("+�(�(100*(pos%/len%)))+"%) "
�E  t%=�(dstime%-time%)�100:�t%>0�stat$+=�((pos%-bstart%)�t%)+"cps"
�2  �print("","",stat$,�msg1("Newnews",�total%))
�=  �baric$=defic$��changeic("newsbased")��changeic(defic$)
��
��
�
���addtobuffer(A$)
�?� this automatically adds continuation lines to the buffer.
;�ptr%>cbufsize% �extend(inbufsize%+bufsize%+defartbuf%)
1$(artbase%+ptr%)=A$:ptr%+=�A$:�long%��addlong
artbase%?ptr%=10:ptr%+=1
"�
,
6
��addlong
@ȕlong%
J  A$=�getline
T=  �ptr%>cbufsize%��extend(inbufsize%+bufsize%+defartbuf%)
^#  $(artbase%+ptr%)=A$:ptr%+=�A$
h�
r�
|
���addheadertobuffer(A$)
�;�ptr%>cbufsize% �extend(inbufsize%+bufsize%+defartbuf%)
�C$(artbase%+ptr%)=A$:ptr%+=�A$:�long%=0�artbase%?ptr%=10:ptr%+=1
��
�:
���extend(mem%)
��
�-  ș"Wimp_SlotSize",min_mem%+mem%,-1�new%
�3  �(min_mem%+mem%)>new%��message0("Needmem1",1)
��(min_mem%+mem%)<=new%
�<bufsize%=new%-min_mem%-inbufsize%:cbufsize%=bufsize%-300
��
�
��checkdisk

�f%,F%
�
&f%=�diskspace(basedir$)
0.�f%<(mindsk%*1024)��message0("Needdisk",1)
:�f%>=(mindsk%*1024)
D�
N
Xݤdiskspace(a$)
b
�F%,f%
l7ș"XOS_FSControl",49,basedir$�f%;F%:�(F%�1)<>0�f%=0
v=f%
�
�ݤclean(A$)
�&� strips leading & trailing spaces
��B$:�A$>""��trimstr%,A$,B$
�=B$
�
���openbatch(f$,offset%)
�f00%=�openin(f$)
�(bufptr%=0:eof%=�:len%=0:pos%=offset%
�'�f00%<>0�len%=�#f00%:�#f00%=offset%
�	�fill
��
�
!��restartbatch(f$,t%,offset%)
/�a$:a$=�msg0("Mail"):�t%>0�a$=�msg0("News")
�message1("Dbadhead",a$,0)
 4�cf(f00%):line$="":del%=�:�openbatch(f$,offset%)
*�
4
>
��fill
H�r3%,F%
R
�f00%<>0�
\5  ș"XOS_GBPB",4,f00%,inbuf%,inbufsize%�,,,r3%;F%
f   �(F%�1)<>0�r3%>0��cf(f00%)
p�
z
bufptr%=0
��
�
�ݤaddtosavelist(g$,c%)
��g%
�g%=�nametono(�clean(g$),�)
�<�g%>0�c%<=maxsave%�outg%(c%)=g%:outs%(c%)=�seq(g%):c%+=1
�=c%
�
���defaultsavelist
��g%
�Ȏtype%�
�)�0:g%=�nametono("Email.postmaster",�)
�:g%=�nametono("junk",�)
�
1�g%>0�outg%()=0:outg%(0)=g%:outs%(0)=�seq(g%)
�
$
.��groupsline(list$)
8�ng%:ng%=0
B2�list$,",")=0�ng%=�addtosavelist(list$,ng%):�
L#�long%��longgroupsline(list$):�
V�
`0  ng%=�addtosavelist(�getpar(list$,","),ng%)
j
�list$=""
t�
~
���longgroupsline(list$)
�-�g$,p%,frag$,gfrag$,ng%,end%:ng%=0:end%=0
��
�frag$=""
�
�long%=0�
�  end%=�
�  �
�-  p%=�list$:�p%-=1:�p%=1��list$,p%,1)=","
�=  �list$,p%,1)=","�frag$=�list$,p%+1):list$=�list$,p%-1)
��
��
�=  g$=�getpar(list$,","):�gfrag$>""�g$=gfrag$+g$:gfrag$=""
   ng%=�addtosavelist(g$,ng%)

�g$=""�list$=""
gfrag$=frag$
3�long%�list$=�getline:�addheadertobuffer(list$)
(	�end%
2�
<
F��savelist
P
�c%,u$,g$
Z �outg%(0)=0��defaultsavelist
d!�filt%(type%)>0��checkfilters
n
�type%=0�
x$  g$=grp$(outg%(0)):u$=�gtou(g$)
�-  �log("New mail for "+u$+" from "+from$)
�*  �receipt$>""�returnreceipt(receipt$)
�  �checkforward(g$,u$)=1��
��
�recpos%=lastpos%
�"c%=0:ȕoutg%(c%)>0�c%<maxsave%
�)  �artsave(outg%(c%),outs%(c%)):c%+=1
��
��
�
���checkfilters
��l%,t%:l%=0
�ȕl%<=nfilt%:t%=flt%(l%)
C�t%=3�(t%=2�type%=0)�(t%=1�type%=1)��dofilter(l%)<>0�l%=nfilt%
	l%+=1
�
"�
,
6ݤdofilter(n%)
@�n$,a$,l1%,ok%,last%
J	ok%=0
T�l1%=0�2:fl_ok%(l1%)=�
^  a$="*"+flc$(n%,l1%)+"*"
h  Ȏflc%(n%,l1%)�
r-    �1:�smatch(a$,from$)>0�fl_ok%(l1%)=�
|S    �2:�smatch(a$,to$)>0��smatch(a$,cc$)>0��smatch(a$,origto$)>0�fl_ok%(l1%)=�
�0    �3:�smatch(a$,subject$)>0�fl_ok%(l1%)=�
�2    �4:�smatch(a$,newsgroup$)>0�fl_ok%(l1%)=�
�0    �5:�smatch(a$,replyto$)>0�fl_ok%(l1%)=�
�3    �6:�smatch(a$,precedence$)>0�fl_ok%(l1%)=�
�+    �7:�smatch(a$,bf$)>0�fl_ok%(l1%)=�
�  �
�1  �fln%(n%,l1%)>0�fl_ok%(l1%)=(fl_ok%(l1%)=�)
��l1%
�ok%=fl_ok%(0)
��flc%(n%,1)>0�
�7  �flj%(n%,1)=0�ok%=ok%*fl_ok%(1)�ok%=ok%+fl_ok%(1)
�  �flc%(n%,2)>0�
�9    �flj%(n%,2)=0�ok%=ok%*fl_ok%(2)�ok%=ok%+fl_ok%(2)
  �
�
	�ok%�
&.  �print("",�msg1("Fapply",�(n%+1)),"","")
0  a$=�fsubst(fla$(n%))
:  Ȏfla%(n%)�
D#    �1:�nosave:�defaultsavelist
N    �2:�nosave
X2    �3:�a$,1)="+"�n$=�getpar(a$," "):��nosave
b+      �log("Filter redirection to "+a$)
l4      ok%=0:ȕoutg%(ok%)>0�ok%<maxsave%:ok%+=1:�
v      ȕa$>""
�(        last%=ok%:n$=�getpar(a$," ")
�.        ok%=�addtosavelist(�clean(n$),ok%)
�?        �ok%=last%�n$>""��log("Invalid redirection to "+n$)
�      �
�    �4:�submit(a$)
�  �
��
�=ok%
�
�ݤfsubst(a$)
�
�b$,l%
�l%=�a$,"%")
�ȕl%>0:b$=""
Ȏ�a$,l%+1,1)�
6  �"u":�type%=1�b$="news"�b$=�gtou(grp$(outg%(0)))
  �"f":b$=from$
   �"t":b$=to$
*  �"c":b$=cc$
4  �"r":b$=replyto$
>  �"%":b$="%"
H�
R'a$=�a$,l%-1)+b$+�a$,l%+2):l%+=�b$-1
\l%=�a$,"%",l%)
f�
p=a$
z
���nosave
�M�n%,g%:n%=0:�g%=outg%(n%):�g%>0�outg%(n%)=0:�grpseq%(g%)>0�grpseq%(g%)-=1
�n%+=1:�g%=0�n%>maxsave%
��
�
���submit(a$)
��f$,b$,F%,m%,d%:f$=�tmpfile
�7ș"XOS_File",10,f$,&FFF,,artbase%,artbase%+ptr%�;F%
��(F%�1)=0�
�  ȕ��clean(a$),1)="-"
�  b$=�getpar(a$," ")
�  Ȏ�b$,2)�
�    �"-M":m%=1024*��b$,3)
    �"-K":�nosave
    �"-D":d%=�
&    �"-J":�nosave:�defaultsavelist
$  �
.  �
8*  �freemem(0)<m%��message0("Fmem1",1)
B  �freemem(0)>=m%�
L.  �log("Submitting filter job: "+a$):�hgon
VG  ș"XWimp_StartTask",a$+" "+f$:�hgoff:�d%��poll(0):F%=�delfile(f$)
`  �
j  �message0("Fmem2",0)
t  �
~�
��
�
�ݤcheckforward(g$,u$)
��u%,f$,F%,fto$,ret%
�u%=�userno(u$):�u%>0�
�  f$=�upath(u$)+".vacation"
�  �objtype(f$)=1�
�:    �precedence$<>"bulk"�precedence$<>"junk"�from$>""�
�+      �filesize(f$)>0��vacation(u$,f$)
�	    �
�  �
�  �userf$(u%)>""�
6    fto$=userf$(u%):ȕ�fto$,1)="+":fto$=�fto$,2):�

3    �log("Forwarding mail for "+u$+" to "+fto$)
L    f$=�tmpfile:ș"XOS_File",10,f$,&FFF,,artbase%,artbase%+ptr% �err%;F%
    �(F%�1)=0�
(       f$=�remail(fto$,f$,u$)
2+      �f$=""��userf$(u%),1)<>"+"�ret%=1
<	    �
F  �
P�
Z,�ret%=0��arrmail$,u$)=0�arrmail$+=","+u$
d	=ret%
n
xݤgtou(g$)
��u$,u%:u$=g$
��lower(g$),6)="email."�
�.  u$=�g$,7):u%=�u$,"."):�u%>0�u$=�u$,u%-1)
��
�=u$
�
���vacation(u$,f2$)
��f$,d$,s$,F%
�1f$=�tmpfile:d$=from$:�replyto$>""�d$=replyto$
�:s$=subject$:�lower(subject$),4)<>"re: "�s$="Re: "+s$
�f1%=�openout(f$)
��f1%>0�d$>""�
�  f2%=�openin(f2$)

  �f2%>0�
    �#f1%,"To: "+d$
'    �#f1%,"From: "+u$+"@"+mailname$
"    �#f1%,"Subject: "+s$
,)    �autoheaders(f1%):�fcopy(f2%,f1%)
6+    �cf(f1%):�cf(f2%):�settype(f$,&FFF)
@    a$=�sendmail(f$,u$)
J	    �
T    �cf(f1%)
^  �
h�
rF%=�delfile(f$)
|�
�
���returnreceipt(d$)
��f$,a$,s$,F%
�;�doreceipt%<>0�precedence$<>"bulk"�precedence$<>"junk"�
�  f$=�tmpfile
�<  s$=subject$:�lower(s$),4)<>"re: "�s$>""�s$="Re: "+s$
�  f1%=�openout(f$)
�
  �f1%>0�
�    �#f1%,"To: "+d$
�.    �#f1%,"From: mailer-daemon@"+mailname$
�7    �#f1%,"Subject: Acknowledgement of receipt "+s$
�    �autoheaders(f1%)
�%    �#f1%,"Your message "+messid$
 1    �subject$>""��#f1%,"concerning "+subject$
     �#f1%,"to "+to$
 *    �#f1%,"was received at "+hostname$
 &"    �cf(f1%):�settype(f$,&FFF)
 08    a$=�sendmail(f$,"mailer-daemon"):F%=�delfile(f$)
 :  �
 D�
 N�
 X
 b��autoheaders(out%)
 l5�#out%,"Message-ID: <"+�id_date+"@"+hostname$+">"
 v�#out%,"Date: "+�rfc_date
 ��#out%,"Precedence: bulk"
 �-�#out%,"X-Mailer: RISC OS Newsbase "+ver$
 �
�#out%,""
 ��
 �
 ���artsave(g%,s%)
 ��g$,s$,outd$,outf$
 �7�supersede$>""�approved$>""�deleteid(g%,supersede$)
 �4�control$>""�approved$>""�docontrol(g%,control$)
 �=g$=grp$(g%):s$=�seqstr(s%):outf$=�articleop(g%,s$,0,"",0)
 ��outf$>""�
 �:  �nbupdate(2,g$,s%,from$,subject$):�addtoindex(g%,s%)
 �6  �expires%>0�igexp%=0��setfileexp(outf$,expires%)
!.  �print("",g$+"."+s$,"",""):�poll(slice%)
!)  �total%�30=0�fast%=0��write_recfile
!  �
! +  �message(�msg2("Dsavefail",�s%,g$),1)
!*0  �log("Debatch save failure: "+g$+" #"+�s%)
!4�
!>�
!H
!R��write_recfile
!\)�recpos%=0��diskspace(basedir$)<200��
!f%f0%=�openout(basedir$+".recover")
!p�f0%>0�
!z  �#f0%,bf$
!�  �#f0%,�len%
!�  �#f0%,�recpos%
!�1  �cf(f0%):�settype(basedir$+".recover",&FFF)
!�  �writegrpdata
!��
!��
!�
!���del_recfile
!�(�F%:F%=�delfile(basedir$+".recover")
!��
!�
!�ݤcheck_recfile(� p%)
!��f$,f2$,l%,m$
"$f0%=�openin(basedir$+".recover")
"�f0%>0�
"  f$=�#f0%
"$  l%=��#f0%
".  p%=��#f0%
"8  �cf(f0%)
"B  f2$=workdir$+"."+f$
"L/  �objtype(f2$)=1��filesize(f2$)=l%�p%<l%�
"V#    m$=�msg2("Drecover",f$,�p%)
"`(    �message(m$,0):�poll(0):�log(m$)
"jB    l%=�delfile(basedir$+".recover"):�poll(100):�message("",0)
"t	    �
"~    f2$="":p%=0
"�  �
"��
"�=f2$
"�
"���setfileexp(f$,d%)
"�
�F%,e%,l%
"�$ș"XOS_File",2,f$,&FFFFFFFF �;F%
"�ș"XOS_File",3,f$,,d% �;F%
"��(F%�1)�
"�  ș"XOS_File",9,f$
"�  �
"�#  ș"XOS_File",17,f$�,,l%,e%;F%
#9  �(F%�1)=0��l%<>&FFFFFFFF �e%<>d% �ș"XOS_File",9,f$
#
�
#�
#
#(ݤartcopy(g%,s%,source$)
#2
�dest$
#<
�g%>0�
#F2  dest$=�articleop(g%,�seqstr(s%),1,source$,0)
#P  �dest$>""�
#Z/    �nbupdate(2,grp$(g%),s%,from$,subject$)
#d    �addtoindex(g%,s%)
#n  �
#x�
#�=(dest$>"")
#�
#�-ݤarticleop(g%,dest$,mode%,source$,pack%)
#�%� save or move a file to a group.
#�8� mode% = 0 to save from mem, 1 to copy, 2 to rename
#�#� source$ = file to copy/rename
#�1� returns resulting filename or null for fail
#�0�p$,outd$,outf$,oldd$,a$,F%,try%,dfail%,err%
#�&try%=0:dfail%=0:p$=�path(grp$(g%))
#��g%>0�p$>""�
#�8  oldd$=p$+".~x":a$="~x":�pack%=0�a$=�artdir(�dest$)
#�.  outd$=oldd$+"."+a$:outf$=outd$+"."+dest$
#�  �
$    F%=0
$    Ȏmode%�
$G      �0:ș"XOS_File",10,outf$,&FFF,,artbase%,artbase%+ptr%�err%;F%
$"7      �1:ș"XOS_FSControl",26,source$,outf$�err%;F%
$,G      �2:�source$<>outf$�ș"XOS_FSControl",25,source$,outf$�err%;F%
$6	    �
$@    �(F%�1)�
$J      err%=(!err%�&FF)
$T      Ȏerr%�
$^+        �&B3:�checkdisk:�fulldir(outd$)
$h        �&D6:�dfail%=0�
$r          dfail%=1
$|J          �ensurenewstruct(oldd$)=0�F%=�ensuredir(outd$):�outd$=oldd$
$�          �
$�          outd$=oldd$
$�          �
$�        :�checkdisk
$�      �
$�      try%+=1
$�      �
$�      err%=0
$�	    �
$�  �try%>3 �err%=0
$��
$��err%>0�outf$=""
$�
=outf$
%
%ݤensurenewstruct(d$)
%9�r3%,F%:ș"XOS_GBPB",11,d$,tmp%,1,0,250,"*"�,,,r3%;F%
%&6�(F%�1)=0�r3%>0�t%=tmp%!16:�t%=1�F%=�insertdir(d$)
%0=0
%:
%Dݤartdir(n%)
%N="~x"+�(((n%)�75)�75)
%X
%b��fulldir(p$)
%lC�leaf(p$),2)="~x"�F%=�insertdir(p$)��message1("Fulldir",p$,1)
%v�
%�
%�ݤinsertdir(p$)
%��ex%,l$:l$=�leaf(p$)
%�#ex%=�rename(p$,workdir$+"."+l$)
%��ensuredir(p$)
%�1�ex%=0�ex%=�rename(workdir$+"."+l$,p$+"."+l$)
%�=(ex%�1)
%�
%�
ݤseq(g%)
%��grpseq%(g%)<>0 �
%�"  grpseq%(g%)=�(grpseq%(g%))+1
%�  �
%�1  grpseq%(g%)=�findhighest(�path(grp$(g%)),0)
&"  �grpseq%(g%)=0�grpseq%(g%)=1
&�
&=�grpseq%(g%)
& 
&*ݤseqstr(s%)
&4=�"00000000"+�(�s%),8)
&>
&Hݤensuredir(path$)
&R�p$,l%,lp$,F%,t%,ok%
&\t%=�objtype(path$):ok%=t%
&f�t%<2 �
&p.  path$=�canon(path$):l%=�path$,"$"):ok%=1
&z  �
&�    l%=�path$+".",".",l%+1)
&�'    p$=�path$,l%-1):t%=�objtype(p$)
&�
    Ȏt%�
&�3      �0:�print("",�msg1("Dmakepath",p$),"","")
&�3        ș"XOS_File",8,p$�err%;F%:�(F%�1)�ok%=0
&�      �1:ok%=0
&�      :lp$=p$
&�	    �
&�*    �ok%=0:�message1("Dpathfail",p$,1)
&�  �l%>=�path$�ok%=0
&��
&�=ok%
&�
'ݤnametono(g$,add%)
'#�low%,high%,mid%,found%,g1$,no%
'g1$=�lower(g$)
'$�g1$=lgrp$�
'.  no%=lgrp%
'8  �
'B  �g$>""��g$,"*")<1�
'L%    low%=1:high%=groups%:found%=0
'V    ȕlow%<=high%
'`2    mid%=(low%+high%)�2:tg$=�lower(grp$(mid%))
'j    �g1$<tg$�
't      high%=mid%-1
'~      �
'�7      �g1$>tg$�low%=mid%+1�found%=mid%:low%=high%+1
'�	    �
'�	    �
'�    �found%>0�
'�+      lgrp$=g1$:lgrp%=found%:no%=found%
'�      �
'�      �add%�
'�H        found%=0:�active(g$)��isachef(g$)=0�found%=�addnewgroup(g$)
'�7        �found%>0�lgrp$=g1$:lgrp%=found%:no%=found%
'�      �
'�	    �
'�  �
(�
(
=no%
(
(ݤnotopath(g%)
((=�path(grp$(g%))
(2
(<ݤcheckcase(g$)
(F�g1$:g1$=�lower(g$)
(P'�g1$,6)="email."�:="Email."+�g$,7)
(Z)�g1$,7)="folder."�:="Folder."+�g$,8)
(d=g1$
(n
(xݤaddnewgroup(g$)
(��p$,no%:g$=�checkcase(g$)
(�p$=�path(g$):no%=0
(��p$>""�groups%<maxgroup%�
(�$  �writeindexbuf:�adddelbuf(0,0)
(�  �ensuredir(p$)<>0�
(�D    �nbupdate(0,g$,0,"",""):�print("",�msg1("Gcreate",g$),"","")
(�'    no%=�addgrptolist(g$,�):�no%>0�
(�     �log(�msg1("Lcrgrp",g$))
(�-    ș"XOS_File",11,p$+".~index",&FFD,0,0
(�!    ș"XOS_File",8,p$+".~x",0
(�	    �
(�  �
(��
)=no%
)
)ݤaddgrptolist(g$,cmod%)
)"C�l%,l1%,w%,g1$,low%,high%,mid%:g$=�checkcase(g$):g1$=�lower(g$)
),�g1$<�lower(grp$(groups%))�
)63l%=1:ȕg1$>�lower(grp$(l%))�l%<=groups%:l%+=1:�
)@�
)Jl%=groups%+1
)T�
)^�l%<maxgroup%�
)h  �w%=groups%�l%�-1
)rI  grp$(w%+1)=grp$(w%):grpf%(w%+1)=grpf%(w%):grpseq%(w%+1)=grpseq%(w%)
)|  grpexp%(w%+1)=grpexp%(w%)
)�  grpmod%(w%+1)=grpmod%(w%)
)�	  �w%
)�,  grp$(l%)=g$:grpf%(l%)=-1:grpseq%(l%)=0
)�!  grpexp%(l%)=0:grpmod%(l%)=0
)�  �cmod%<>0�
)�4    �specialgrp(g$)=0�grpmod%(l%)=�isgrpmod(g$)
)�*    �specialgrp(g$)>1�grpexp%(l%)=1E6
)�  �
)�  groups%+=1
)�B  � now fix up the save list, to allow for group insertions...
)�  �l1%=0�maxsave%
)�$    �outg%(l1%)>l%�outg%(l1%)+=1
)�
  �l1%
*  �
*  l%=0:�toomanyg
*�
*&=l%
*0
*:��toomanyg
*D�message0("Gfull",1)
*N�
*X
*b��rmgrplist(g$)
*l-�l%,w%:ȕgrp$(l%)<>g$�l%<=groups%:l%+=1:�
*v�grp$(l%)=g$�
*�$  �writeindexbuf:�adddelbuf(0,0)
*�  �w%=l%+1�groups%
*�1    grp$(w%-1)=grp$(w%):grpf%(w%-1)=grpf%(w%)
*�<    grpseq%(w%-1)=grpseq%(w%):grpmod%(w%-1)=grpmod%(w%):
*�!    grpexp%(w%-1)=grpexp%(w%)
*�	  �w%
*�/  grp$(groups%)="":groups%-=1:lgrp$="BLANK"
*��
*��
*�
*�ݤobjtype(f$)
*�
�F%,t%
*�ș"XOS_File",17,f$�t%;F%
+�(F%�1)�=-1
+=t%
+
+ ݤfiletype(f$)
+*�F%
+4"ș"XOS_File",23,f$�,,,,,,t%;F%
+>�(F%�1)�=-1
+H=t%
+R
+\ ��expiregroup(ng%,pto%,exp%)
+f(� pto% is a modifier to expiry time.
+p �gdir%,n$,cnt%,prot%:prot%=0
+z'pt%=grpexp%(ng%):�pt%=0�pt%=defexp%
+��pt%>1E4THENprot%=�
+��grp$(ng%)>""�
+�  pt%+=pto%:�pt%<0�pt%=0
+�  gdir$=�path(grp$(ng%))
+�2  �expmail%=0��specialgrp(grp$(ng%))>1�prot%=�
+�C  �exp%<>0�cnt%=�expiredir(gdir$,ng%,pt%,�,prot%):�stamp(gdir$)
+�%  �nbupdate(12,grp$(ng%),0,"","")
+��
+��
+�
+�*ݤexpiredir(p$,g%,pt%,force%,protect%)
+��cnt%:cnt%=0
+��protect%�
,/�print(�msg1("Gcomp",grp$(g%))," "," "," ")
,�
,L�print(�msg1("Gexp",grp$(g%)),�msg1("Glast",""),�msg1("Gtime",�pt%)," ")
,$�
,.�objtype(p$)>1�
,8?  cnt%=�delfile(p$+".~seq"):cnt%=�ensurenewstruct(p$+".~x")
,B=  cancel%=�:cnt%=�expiresubdir(p$,g%,pt%,force%,protect%)
,L7  �adddelbuf(0,0):�print(�msg0("Done")," "," "," ")
,V�
,`
�gact("")
,j	=cnt%
,t
,~0ݤexpiresubdir(p$,expg%,pt%,force%,protect%)
,�J�dirptr%,f%,f$,now%,t$,t%,r3%,nread%,v%,attr%,ft%,cnt%,move$,testtime%
,�I�deltest%,dirbuf%,dbr%,addr%,floop%,trymove%,canmove%,mustmove%,date%
,��g$,pack%,flen%,nfiles%
,�g$=grp$(expg%)
,��force%�
,�  �gact(�msg1("Gdel",g$))
,�  �
,�@  �protect%��gact(�msg1("Gcomp",g$))��gact(�msg1("Gexp",g$))
,��
,�mustmove%=(�p$,6)=".~x.~x")
,�-f$=�leaf(p$):canmove%=(¤dir(p$),�f$)=f$)
,�nfiles%=0:dirptr%=0
-Hnow%=�day(�time):testtime%=pt%:dbr%=�claim(dirbuf%,dbsize%,"expire")
-
�
-addr%=dirbuf%
-Vș"XOS_GBPB",11,p$,dirbuf%,20,dirptr%,dbsize%,"*"�,,,r3%,dirptr%;F%:nread%=dirptr%
-(�r3%>0�(F%�1)=0�
-21  nfiles%+=r3%:� number of files in directory
-<  �floop%=1�r3%
-FO  t%=addr%!16:attr%=addr%!12:f$=�str(addr%+29):date%=addr%+24:flen%=addr%!8
-PJ  v%=�f$:deltest%=0:trymove%=mustmove%:pack%=((attr%�8)�(mustmove%=�))
-Z  Ȏt%�
-d    �1:
-n      �v%>0�
-x(        �(addr%?28)<>&FF �force%<>0�
-�           � standard article
-�Q          ș"Territory_ConvertDateAndTime",1,date%,tmp%,128,"%CE%YR%MN%DY"�b%
-�          ft%=��str(b%)
-�3          �day(ft%)<=now%-testtime%�deltest%=�
-�          �
-�          � has expiry time
-�          ft%=(addr%!24)
-�          �ft%<=�time �
-�            deltest%=�
-�            �
-�D            � pack all non-clarinet articles with expiry headers
-�'            �testtime%=0�trymove%=�
-�E            �smatch("clari*",g$)=0�mustmove%=0�nfiles%<6�pack%=�
.          �
.
        �
.*        �protect%=0�(deltest%�force%)�
."-          �force%��setattr(p$+"."+f$,"R")
.,&          �delfile(p$+"."+f$)=0 �
.6D            dirptr%-=1:cnt%+=1:�artdeleted(expg%,�f$):trymove%=0
.@            �
.J'            �objtype(p$+"."+f$)=0�
.T3              �artdeleted(expg%,�f$):trymove%=0
.^              �
.h#              trymove%=canmove%
.r            �
.|          �
.�          �
.�3          �compress%��compress(p$+"."+f$,flen%)
.�
        �
.�>        � don't pack files if >5 files in the directory...
.�F        � ... just want to avoid scattered almost-single articles.
.�        �nfiles%>6�pack%=0
.�        �trymove%�pack%�
.�%          �setattr(p$+"."+f$,"R")
.�:          move$=�articleop(expg%,f$,2,p$+"."+f$,pack%)
.�M          ș"XOS_File",4,move$,,,,attr%:ș"XOS_File",4,p$+"."+f$,,,,attr%
.�"          �move$>""�dirptr%-=1
.�
        �
.�      �
/V    �2,3:�f$,2)="~x"�cnt%=cnt%+�expiresubdir(p$+"."+f$,expg%,pt%,force%,protect%)
/       F%=�delfile(p$+"."+f$)
/  �
/&  �cancel%�floop%=r3%
/0-  �poll(slice%*2):addr%=addr%+(33+�f$)��3
/:
  �floop%
/D�
/N�nread%=-1�cancel%
/X�release(dbr%)
/b	=cnt%
/l
/v��setattr(f$,a$)
/�ș"XOS_FSControl",24,f$,a$
/��
/�
/���artdeleted(g%,n%)
/�4�adddelbuf(g%,n%):�nbupdate(3,grp$(g%),n%,"","")
/�&�print("","","",�msg1("Adel",�n%))
/��
/�
/���expmiscdir(p$,etime%)
/�D�n%,f$,now%,t%,t$,r3%,nread%,a%,d%,ft%,dirbuf%,dbr%,floop%,addr%
/�=n%=0:now%=�day(�time):dbr%=�claim(dirbuf%,dbsize%,"dbuf")
/��
/�addr%=dirbuf%
0Gș"XOS_GBPB",11,p$,dirbuf%,20,n%,dbsize%,"*"�,,,r3%,n%;F%:nread%=n%
0�r3%>0�(F%�1)=0�
0  �floop%=1�r3%
0 /  t%=addr%!16:a%=addr%!12:f$=�str(addr%+29)
0*  Ȏt%�
04    �1:
0>    �(a%�8)=0�
0HP      ș"Territory_ConvertDateAndTime",1,addr%+24,tmp%,128,"%CE%YR%MN%DY"�b%
0RM      ft%=��str(b%):�day(ft%)<=now%-etime%��delfile(p$+"."+f$)=0n%=n%-1
0\	    �
0fA    �2,3:�expmiscdir(p$+"."+f$,etime%):F%=�delfile(p$+"."+f$)
0p  �
0z-  �poll(slice%*2):addr%=addr%+(33+�f$)��3
0�
  �floop%
0��
0��nread%=-1
0��release(dbr%)
0��
0�
0�
ݤtime
0��b%
0�?tmp%=3:ș"OS_Word",14,tmp%
0�Jș"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY"�b%
0�=��str(b%)
0�
0�ݤfulltime
1�b%
1?tmp%=3:ș"OS_Word",14,tmp%
1Pș"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY%24%MI"�b%
1$
=�str(b%)
1.
18ݤfiletime(f$)
1B�l%,e%,o%,r%
1L ș"XOS_File",23,f$�o%,,l%,e%
1V
�o%>0�
1`  !tmp%=e%:tmp%!4=l%
1jL  ș"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,"%CE%YR%MN%DY"�b%
1t  r%=��str(b%)
1~�
1�=r%
1�
1�
ݤday(t%)
1�8� convert date to no.of days since start of century.
1��day%,month%,year%,m%,d%
1�day%=t%�100
1�month%=(t%�100)�100
1�year%=(t%�10000)
1�d%=365*year%+day%
1�
Ȏmonth%�
1��1:m%=0
1��2:m%=31
2�3:m%=59
2
�4:m%=90
2
�5:m%=120
2
�6:m%=151
2(
�7:m%=180
22
�8:m%=211
2<
�9:m%=242
2F�10:m%=272
2P�11:m%=303
2Z�12:m%=333
2d�
2n
=d%+m%
2x
2�
��log(A$)
2��l%
2�	�rw%�
2�  �A$>""�logptr%<20�
2�D    log$(logptr%)=�ctime("# %YR%MN%DY %24%MI%SE ")+A$:logptr%+=1
2�	    �
2�    �logptr%>0�
2�&      f1%=�openup(basedir$+".log")
2�      �f1%<>0�
2�        �#f1%=�#f1%
2�        �l%=0�logptr%
2�)          �log$(l%)>""��#f1%,log$(l%)
2�
        �
3G        log$()="":logptr%=0:�cf(f1%):�settype(basedir$+".log",&FFF)
3      �
3	    �
3"  �
3,�
36�
3@
3J��settype(f$,t%)
3Tș"XOS_File",18,f$,t%
3^�
3h
3r��stamp(f$)
3|ș"XOS_File",9,f$
3��
3�
3�
ݤduptask
3��found%,r0%,b%,a$:r0%=0
3��
3�;tmp%!4=0:ș"TaskManager_EnumerateTasks",r0%,tmp%,20�r0%
3��r0%>=0�tmp%!4>0�
3�7  b%=tmp%!4:a$="":ȕ?b%>31��a$<255:a$+=�?b%:b%+=1:�
3�  �a$,8)=myname$�found%=1
3��
3��r0%<0�found%<>0
3�=found%
3�
4
��init
4myname$="Newsbase"
48ș"OS_Byte",129,0,&FF �,osver%:dynarea%=(osver%>&A4)
4&�environment
400msgdesc%=0:defic$="":credit$="":transport%=0
4:5groups%=0:initgroups%=0:dragref%=0:autodebatch%=0
4D*thisartlen%=0:nextartpos%=0:logfile%=0
4N>postfetchready%=0:startupok%=0:indebatch%=0:blockexpire%=�
4Xnull$=�200," ")
4b<maxactive%=0:cancel%=0:nclient%=0:sleep%=0:forcebatch%=0
4l2inbufsize%=16*1024:defartbuf%=8192:dbsize%=512
4v� tmp% 256
4�#ibufsize%=8000:delbufsize%=2048
4�� ibuf% ibufsize%
4�� delbuf% delbufsize%
4�maxsave%=10:maxactive%=100
4�5� outp$(maxsave%),outs%(maxsave%),outg%(maxsave%)
4�� log$(20),outdir$(1)
4�%delbufptr%=0:delbufg%=0:logptr%=0
4�ibufptr%=0:ibufg%=0
4�type%=0:line$="":bf$=""
4�,len%=0:pos%=0:bstart%=0:recpos%=0:bf$=""
4�#total%=0:pause%=�:checkfiles%=1
4�T%=0::T1%=0:T2%=-1:open%=�
4�4f00%=0:f0%=0:f1%=0:f2%=0:f3%=0:f4%=0:f5%=0:f6%=0
5lgrp%=0:lgrp$="BLANK"
5!nopoll%=0:ngtime%=0:nglast%=0
5findg%=0:findp$="":long%=0
5 busy$="":sep$="":seplen%=0
5*slice%=-15
54nbcom%=&FEED10
5>nbrep%=&FEED11
5Hnbupd%=&FEED12
5R
srflag%=0
5\-arrart%=0:arrmail$="":grpq%=0:ynchoice%=0
5f)artdate%=0:modgw$="moderators.uu.net"
5p&� now all config file variables...
5zDlogfile%=1:keepoutg%=1:fast%=1:alert%=1:alertbeep%=0:userctrl%=0
5�<alertnews%=1:defclient$="":autoexp%=1:defexp%=7:delok%=0
5�Alisttype%=0:remotehost$="":expmail%=0:autodebatch%=1:igexp%=0
5�Gkeepb%=1:docanc%=1:killc%=1:doreceipt%=1:cver%=0:ngexp%=7:thread%=1
5�7modgw$="":mngw$="":mngw%=0:userlist$="":initconf%=0
5�Acompress%=0:complimit%=2048:exptime%=0:expany%=0:mindsk%=1024
5�2hostname$="":org$="":mailname$="":timezone$=""
5��
5�
5���environment
5�
�p$,A$
5�rw%=�:� read-write access
5�ș"OS_GetEnv"�A$
5��
6  p$=�getpar(A$," ")
6  Ȏp$�
63    �"-ro":rw%=�:� read-only access to !NewsDir
6$  �
6.
�A$=""
68�
6B
6L��startmemmgr
6Vbase%=�
6`'ș "Wimp_SlotSize",-1,-1 � min_mem%
6j�
6t
6~ݤcheckslot
6��m%,f%,minfre%
6�minfre%=&4000
6�P� if more than 2Mbytes free, insist on 32k space in wimpslot (otherwise 16k)
6�;ș"Wimp_SlotSize",-1,-1�,,f%:�f%>&200000 �minfre%=&8000
6��(�-�)<minfre% �
6�.  m%=minfre%:�ș"Wimp_SlotSize",-1,-1�,,f%
6�&    �f%<m% �message0("Needmem1",1)
6�
  �f%>=m%
6�  �
6�
  m%=0
6��
6�=m%
7
7
��startwimp
7'� taskid%4,wmsgs%30:$taskid%="TASK"
7>!wmsgs%=3:wmsgs%!4=&400C2:wmsgs%!8=&400C3:wmsgs%!12=nbcom%
7(;wmsgs%!16=2:wmsgs%!20=&400C9:wmsgs%!24=&502:wmsgs%!28=0
72Eș "Wimp_Initialise",310,!taskid%,myname$,wmsgs% � version%,task%
7<��errorbox(�)
7FNș"Territory_Exists",1�;F%:�(F%�4)=0��0,"UK Territory module not present!"
7P�q% &200,ibar% &100
7Z:menudata%=0:indmenubuf%=0:menudataref%=0:indmenuref%=0
7d%ș"OS_ReadModeVariable",-1,5�,,A%
7n=�A%<2��mergesprites("sprites22")��mergesprites("sprites")
7x0ș"Wimp_OpenTemplate",,�resfile("Templates")
7�status%=�loadtemp("status")
7�msgw%=�loadtemp("message")
7�!gsetup%=�loadtemp("gensetup")
7�gwin%=�loadtemp("groups")
7�yesno%=�loadtemp("confirm")
7�info%=�loadtemp("info")
7�arrive%=�loadtemp("arrive")
7�uwin%=�loadtemp("users")
7�sitewin%=�loadtemp("site")
7�fwin%=�loadtemp("filters")
7� savend%=�loadtemp("newsdir")
7�msetup%=�loadtemp("setup")
7�"trwin%=�loadtemp("transports")
8!ngwin%=�loadtemp("newgroups")
8ș"Wimp_CloseTemplate"
8�settime
8"'lastpoll%=0:lastupd%=0:stime%=time%
8,0cron0%=0:cron1%=0:cron2%=0:cron3%=0:cron4%=0
86Qconfopen%=0:statopen%=0:msgopen%=0:ndopen%=0:ngopen%=0:arropen%=0:infoopen%=0
8@+baric$="newsbase1":baricon%=�ic(baric$)
8J4ver$="0.53":rev$="c":ver%=100*�ver$:groupver%=47
8T@�updateiconstring(info%,4,ver$+rev$+" (23-Feb-95)"):�credits
8^6�print(�msg1("Sinfo1",ver$)," "," "," "):�gact("")
8h�
8r
8|ݤloadtemp(A$)
8��b%,i%,s%,scr%,icon%,h%
8�0ș"Wimp_LoadTemplate",,-1,0,0,-1,A$,0�,b%,i%
8�+s%=�claim(scr%,b%,"template"):�icon% i%
8�6ș"Wimp_LoadTemplate",,scr%,icon%,icon%+i%,-1,A$,0
8�Ascr%!64=sprites%:ș"Wimp_CreateWindow",,scr% �h%:�release(s%)
8�=h%
8�
8���mergesprites(A$)
8��s%,f%,n%:A$=resdir$+"."+A$
8��objtype(A$)=1�
8�s%=�filesize(A$)+20
8�*�sprites% s%:!sprites%=s%:sprites%!8=0
8�"ș "OS_SpriteOp",&109,sprites%
9.ș"XOS_SpriteOp",&108,sprites%�,,s%,n%,,f%
90ș"XOS_SpriteOp",&10B+(n%=0),sprites%,A$�;F%
9�
9&�1,A$+" not found"
90�
9:�
9D
9Nݤic(A$)
9X:ș"OS_SpriteOp",&100+40,sprites%,A$�,,,w%,h%:!ibar%=-1
9bAibar%!4=0:ibar%!8=0:ibar%!12=w%*2:ibar%!16=100:ibar%!20=&3102
9l1�ibarname%12:$ibarname%=A$:ibar%!24=ibarname%
9v!ibar%!28=sprites%:ibar%!32=11
9�$ș "Wimp_CreateIcon",0,ibar%�ic%
9�=ic%
9�
9���changeic(new$)
9�
�w%,F%
9��new$<>baric$�
9�4  ș "XOS_SpriteOp",&118,sprites%,new$�,,src%;F%
9�  �(F%�1)=0�
9�;    $ibarname%=new$:!q%=-1:q%!4=baricon%:q%!8=0:q%!12=0
9�!    ș"Wimp_SetIconState",,q%
9�  �
9�  baric$=new$
9��
:�
:
:��poll(idle%)
: C�pol_ret%:� idle%>0 is pollidle time, <0 is time between polls.
:*�settime:�nopoll%��
:4$�idle%>=0�lastpoll%-time%<idle%�
:>  lastpoll%=time%
:H  �
:R8    ș "Wimp_PollIdle",6194,q%,time%+idle% �pol_ret%
:\    Ȏ pol_ret% �
:f     � 0:�startupok%<>0��cron
:pE    � 2:�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
:z    � 3:�closew(!q%)
:�$    � 6:�click(q%!8,q%!12,q%!16)
:�    � 7:�drag
:�     � 8:�keypress(!q%,q%!24)
:�'    � 9:�getpointer:�menuselect(q%)
:�    � 17,18:�receive(q%)
:�	    �
:�  �pol_ret%=0
:��
:��
:�
:�
��settime
:�"ș"OS_ReadMonotonicTime"�time%
:��
;
;
��credits
;'�credit$=""�credit$=�msg0("Credit")
;$8�updateiconstring(info%,9,��getpar(credit$,";"),28))
;.�
;8
;B
��drag
;L�getpointer
;VJ!q%=52+8:q%!12=0:q%!16=1:q%!20=handle%:q%!24=icon%:q%!28=mx%:q%!32=my%
;`.q%!36=0:q%!40=&1000:$(q%+44)="!NewsDir"+�0
;j:ș"Wimp_SendMessage",17,q%,handle%,icon%:dragref%=q%!8
;t�
;~
;���polloff:nopoll%=�:�
;���pollon:nopoll%=0:�
;�
;���keypress(h%,k%)
;��c%
;��k%=13�
;�	Ȏh%�
;�"  �gsetup%,sitewin%,gwin%:c%=�
;�)  �fwin%:�setfilt(cfilt%):�closew(h%)
;�,  �uwin%:�getuserinfo:�saveuserinfo:c%=�
;�  :ș"Wimp_ProcessKey",k%
;��
<�c%��saveconfig:�closew(h%)
<
�
<ș"Wimp_ProcessKey",k%
<�
<(�
<2
<<ݤbusyon(d$)
<F"� returns TRUE if already busy
<P+�busy$<>""��message1("Busy",busy$,0):=�
<Zbusy$=�msg0(d$):=�
<d
<n
��busyoff
<xbusy$=""
<��
<�
<���finish
<��tidyup
<�
<��logfile%<>0�log("")
<��startupok%<>0�
<�   �indebatch%��write_recfile
<�  �groups%>0�savegrpdata
<�  �savefilters
<��
<��unlocknewsdir
<��nbreply(0,0,10,0,0,"","")
=�endmsgtrans
=0�release(menudataref%):�release(indmenuref%)
=�tidydynareas
="ș"Wimp_CloseDown":�
=,�
=6
=@��tidyup
=J
�cf(f00%)
=T�cf(f0%)
=^�cf(f1%)
=h�cf(f2%)
=r�cf(f3%)
=|�cf(f4%)
=��cf(f5%)
=��cf(f6%)
=��
=�
=���click(b%,w%,i%)
=��g$,u$,s%,l%
=�
Ȏw% �
=��-2:
=�&  �b%=4�i%=baricon%�front(status%)
=�8  �b%=1�i%=baricon%�startupok%=1�rw%��front(msetup%)
=�  �b%=2�i%=baricon%�
=�-    ș"OS_Byte",121,(2�&80)�,A%:�A%=&FF �
=�    g$="Debug on,Debug off"
>	    �
>#    g$="|>Info,":�rw%=0�g$+="<"
>@    g$+="Setup...,Queues...,":�autodebatch%<>0�rw%=0�g$+="<"
>&2    g$+="Debatch,|":�autoexp%<>0�rw%=0�g$+="<"
>0    g$+="Expire,Quit"
>:	    �
>D-    �domenu(101,g$,myname$,1):infoopen%=�
>N  �
>X
�status%:
>b  �b%=2�
>l  Ȏpause%�
>v7    �0:�domenu(106,"|>Info,Pause,Cancel",myname$,0)
>�7    :�domenu(106,"|>Info,Resume,Cancel",myname$,0)
>�  �
>�  infoopen%=�
>�  �
>��uwin%:u$=�ic_str(uwin%,20)
>�  �(b%=1�b%=4)�
>�
    Ȏi%�
>�      �1:�umenu
>�-      �6:�setuwin(u$):�b%=4�closew(uwin%)
>�G      �7:�getuserinfo:�saveuserinfo:�saveconfig:�b%=4�closew(uwin%)
>�J      �10:s%=(�rdinv(w%,i%)=0):�setshaded(w%,3,s%):�setshaded(w%,4,s%)
>�      �15:�ugmenu
>�'      �16,17:�message1("Hvac",u$,0)
?      �18:�editvac(u$)
?      �19:�cancvac(u$)
?	    �
?   �
?*  �i%=0�umenu
?4  �i%=2�ugmenu
?>  �
?H�gwin%:
?R  �(b%=1�b%=4)�
?\    g$=�ic_str(gwin%,25)
?f
    Ȏi%�
?p"    �5:�b%=4�gwin(-1)��gwin(1)
?z"    �6:�b%=4�gwin(1)��gwin(-1)
?�    �7:r$=""
?�4      �addgrp(g$,r$)<>0��gwin(0)��message(r$,0)
?�)    �8:�confirm(�msg1("Crem",g$))=1�
?�      r$=""
?�3      �delgrp(g$,r$)=0��message(r$,0)��gwin(0)
?�      �
?�=    �17:�confirm(�msg1("Cdel",g$))=1�delgrp(g$):�gwin(0)
?�    �9:�reindex(g$)
?�    �18:
?�4      �confirm(�msg0("Cscan"))=1��findallgroups
?�    �11:�expgroup(g$,0)
?�    �12:�b%=1�
?�"      listtype%=�(listtype%=0)
@,      �listtype%=0�g$="CList"�g$="AList"
@5      �updateiconstring(w%,i%,�msg0(g$)):�gwin(0)
@      �
@$    �14:�nummenu(0)
@.    �15:�nummenu(1)
@8    �24:�nummenu(2)
@B    �19:�grpmenu(110)
@L    �26:�ngopen%=0�ngwin
@V*    �16:�doaltergrp(g$,��rdinv(w%,16))
@`    �10:�busyon("Bmod")=0�
@j>      �hgon:s%=(�checkmoderation(g$,1)>""):�busyoff:�hgoff
@t@      �setinv(w%,16,s%):�altergrp(g$):�s%�u$="Myes"�u$="Mno"
@~      �message1(u$,g$,0)
@�      �
@�J    �29:s%=(�rdinv(w%,i%)=0):�setshaded(w%,30,s%):�setshaded(w%,31,s%)
@�?    �l%=35�41:�setshaded(gwin%,l%,s%):�l%:� expiry schedule
@�#    �31:�message0("Cexpmail",0)
@�(    �32:�saveconfig:�b%=4�closew(w%)
@�    �37:�modexp(-1,0)
@�    �38:�modexp(1,0)
@�    �39:�modexp(0,-1)
@�    �40:�modexp(0,1)
@�	    �
@�  �
@�
    Ȏi%�
A    �25:�grpmenu(110)
A
    �1:�nummenu(1)
A    �2:�nummenu(0)
A    �22:�nummenu(2)
A(A    �12:�domenu(111,"Current list,Active list","List type",0)
A2	    �
A<  �
AF+�msgw%:�(b%=1�b%=4)�i%=2��closew(msgw%)
AP
�gsetup%:
AZ  �b%=1�b%=4�
Ad
    Ȏi%�
An    �2:�modgwmenu
Ax,    �4:�saveconfig:�b%=4�closew(w%):� OK
A�/    �5:�setconfig:�b%=4�closew(w%):� cancel
A�C    �10:s%=(�rdinv(w%,i%)=0):�l%=12�14:�setshaded(w%,l%,s%):�l%
A�    �19:�mngwmenu
A�    �21:�rdmenu
A�	    �
A�  �
A�
    Ȏi%�
A�    �1:�modgwmenu
A�    �18:�mngwmenu
A�    �16:�rdmenu
A�	    �
A�  �
A��sitewin%:
B
  �b%<>2�
B
    Ȏi%�
B    �4:�transportmenu(102)
B"    �5:�inittransport
B,,    �6:�saveconfig:�b%=4�closew(w%):� OK
B6    �15:�tzmenu
B@0    �16:�setconfig:�b%=4�closew(w%):� cancel
BJ	    �
BT  �
B^"    �i%=11��transportmenu(102)
Bh    �i%=14��tzmenu
Br  �
B|+�arrive%:�(b%=1�b%=4)�i%=3��startreader
B�A�yesno%:�(b%=1�b%=4)�(i%=1�i%=2)�ynchoice%=i%:�closew(yesno%)
B��ngwin%:
B�  Ȏi%�
B�    �1:�nextng
B�@    �2:r$="":�addgrp(�ic_str(ngwin%,6),r$)=0��message(r$,0)
B�      �nextng
B�    �4:�catchupng
B�  �
B�
�savend%:
B�  �i%=0�
B�    �getpointer
B�*    !q%=savend%:q%!4=5:q%!24=0:q%!28=0
B�'    q%!32=�moderight:q%!36=�modetop
C     q%!8=mx%-35:q%!12=my%-35
C!    q%!16=mx%+35:q%!20=my%+35
C.    ș"Wimp_DragBox",,q%:dragflag%=savend%
C&  �
C0
�msetup%:
C:  �(b%=1�b%=4)�
CD  Ȏ(i%�5)�
CN"    �0:�cfront(sitewin%,0,100)
CX*    �1:�setconfig:�cfront(gsetup%,0,0)
Cb     �2:�cfront(trwin%,0,100)
Cl    �3:�cfront(gwin%,0,100)
Cv    �4:�cfront(uwin%,0,100)
C�    �5:�cfront(fwin%,0,100)
C�  �
C�"  �i%>-1�b%=1��closew(msetup%)
C�  �
C�
�fwin%
C�  �b%=2�
C�
    Ȏi%�
C�8      �1:�domenu(130,"Unset,News,Mail,Any","Type",0)
C�h      �2,3,4:�domenu(130+i%,"None,To,From,Subject,Group,Reply To,Precedence,Envelope","Condition",0)
C�A      �15:�domenu(131,"Junk,Kill,Redirect,Submit","Action",0)
C�	    �
C�	    �
C�
    Ȏi%�
D5      �18:�cfilt%>0�cfilt%-=1:�setfiltwin(cfilt%)
D:      �19:�cfilt%<nfilt%�cfilt%+=1:�setfiltwin(cfilt%)
D/      �20:�setfilt(cfilt%):�b%=4�closew(w%)
D       �21:�delfilt(cfilt%)
D*      �22:�addfilt
D4	    �
D>  �
DH�trwin%:
DR  �(b%=1�b%=4)�
D\
    Ȏi%�
Df    �1:�transportmenu(112)
Dp#    �3:�deltrans(�ic_str(w%,0))
DzE    �4:�runtransportfile(17,"","","")=-3��message0("Tnosetup",0)
D�	    �
D�  �
D�$  �b%=2�i%=0��transportmenu(112)
D��
D��
D�
D�
ݤmodetop
D�7ș"OS_ReadModeVariable",-1,5 �,,Yeig%:Yeig%=2^Yeig%
D�)ș"OS_ReadModeVariable",-1,12 �,,top%
D�=top%*Yeig%
D�
D�ݤmoderight
D�7ș"OS_ReadModeVariable",-1,4 �,,Xeig%:Xeig%=2^Xeig%
E+ș"OS_ReadModeVariable",-1,11 �,,right%
E=right%*Xeig%
E
E$��startreader
E.�w%
E8:srflag%=1:�nbreply(0,0,900,0,0,"",""):�closew(arrive%)
EB�w%=1�5:�poll(0):�w%
EL�srflag%<>0�
EV  �objtype(defclient$)>0�
E`%    ș"Wimp_StartTask",defclient$
Ej	    �
Et(    �message1("Clfail",defclient$,0)
E~  �
E��
E��
E�
E���deltrans(t$)
E��t%:t%=�transno(t$)
E�	Ȏt%�
E��0:�7:�message0("Tdel1",0)
E�'�transport%:�7:�message0("Tdel2",0)
E�:
E�)  �confirm(�msg1("Ctransdel",t$))=1�
E�B    �hgon:�wipe(transdir$+"."+t$):�wipe(nbdir$+".support."+t$)
E�3    �hgoff:trans$(t%)="":�settrans2(transport%)
F  �
F
�
F�
F
F(��altergrp(g$)
F2�g%,l1%
F<�l1%=1�groups%
FF)  �gmatch(g$,l1%)�g%=l1%:l1%=groups%
FP�l1%
FZ(�l1%=0:IFFNspecialgrp(g$)>0THENl1%=1
Fd"�updateiconstring(gwin%,25,g$)
Fn�g%>0�g%=grpmod%(g%)�g%=0
Fx�setinv(gwin%,16,g%)
F��
F�
F���doaltergrp(g$,m%)
F��l1%
F��l1%=1�groups%
F�&  �gmatch(g$,l1%)�grpmod%(l1%)=m%
F��l1%
F��
F�
F���nummenu(c%)
F�	Ȏc%�
F�8�0:�domenu(103,"3,5,7,10,14,21,30,\---","Default",0)
F�@�1:�domenu(104,"Default,3,7,14,21,30,Never,\---","Expiry",0)
G5�2:�domenu(105,"3,5,7,10,14,21,30,\---","Days",0)
G�
G�
G"
G,��tzmenu
G6�l%,a$:a$=""
G@A�l%=-12�14:b$=�"0000"+Ô(l%*100),4):�l%<0�b$="-"+b$�b$="+"+b$
GJa$+=","+b$:�l%:a$=�a$,2)
GT �domenu(121,a$,"Timezone",0)
G^�
Gh
Gr��transportmenu(m%)
G|
�A$,l%
G�!�l%=0�ntrans%:�trans$(l%)>""�
G�  A$=A$+trans$(l%)+","
G��
G��l%
G�"�domenu(m%,�A$),"Transport",0)
G��
G�
G���inittransport
G�timezone$=�timezone
G�1�runtransportfile(14,"","","")=0��readnewsrc
G�&�runtransportfile(11,"","","")=0�
G�'  a$=�varval("Newsbase$ReturnInfo")
G�0  �a$>""�hostname$=a$ ��message0("Nohost",0)
H�
Hmailname$=hostname$
H&�runtransportfile(12,"","","")=0�
H&=  a$=�varval("Newsbase$ReturnInfo"):�a$>""�remotehost$=a$
H0�
H:�sethost
HD�
HN
HX&ݤruntransportfile(c%,fi$,us$,nu$)
Hb�F%,f$,a$,b$,n%,mem%
Hl� special return codes:
Hv� -1 not enough memory
H�� -2 command failed
H�� -3 command not found
H�Ia$=transc$(transport%,c%):mem%=transm%(transport%,c%):�mem%=0�mem%=32
H�*ș"OS_CLI","unset Newsbase$ReturnCode"
H�*ș"OS_CLI","unset Newsbase$ReturnInfo"
H��a$>""�
H�%  � substitute parameters %0...%2
H�  n%=�a$,"%")
H�  ȕn%>0:b$=""
H�    Ȏ�a$,n%+1,1)�
H�      �"f":b$=fi$
H�      �"u","g":b$=us$
H�#      �"n":b$=nu$:�b$=""�b$="0"
I      �"h":b$=hostname$
I      �"m":b$=mailname$
I      �"r":b$=remotehost$
I       �"%":b$="%"
I*	    �
I4+    a$=�a$,n%-1)+b$+�a$,n%+2):n%+=�b$-1
I>    n%=�a$,"%",n%)
IH  �
IR  �freemem(0)<mem%*1024 �
I\"    �message1("Needmem2",m$,0)
If/    ș"OS_CLI","set Newsbase$ReturnCode -1"
Ip	    �
Iz    f$=�transportfile(a$)
I�    �f$>""�
I�      �hgon
I�F      ș"XWimp_SlotSize",-1,-1�,n%:ș"XWimp_SlotSize",-1,mem%*1024
I�$      ș"XWimp_StartTask",f$�;F%
I�"      ș"XWimp_SlotSize",-1,n%
I�      �hgoff
I�      �(F%�1) �
I�A        ș"OS_CLI","set Newsbase$ReturnInfo "+�msg0("Tfail3")
I�3        ș"OS_CLI","set Newsbase$ReturnCode -2"
I�      �
I�      �
I�B      ș"OS_CLI","set Newsbase$ReturnInfo "+�msg1("Tfail4",a$)
I�1      ș"OS_CLI","set Newsbase$ReturnCode -3"
J	    �
J  �
J�
J$&n%=��varval("Newsbase$ReturnCode")
J.Ef$=�varval("Newsbase$ReturnInfo"):�n%<>0�f$>""��log(a$+" -> "+f$)
J8=n%
JB
JL��runsupport(f$)
JV�freemem(0)<64*1024�
J`   �message1("Needmem2",f$,0)
Jj  �
Jt)  ș"XWimp_StartTask",support$+"."+f$
J~�
J��
J�
J�ݤfreemem(c%)
J�$�f%:ș"Wimp_SlotSize",-1,-1�,,f%
J�#�(f%+(c%*1024))>0�f%+=(c%*1024)
J�=f%
J�
J�ݤtransportfile(f$)
J��f$,1)="*"�
J�  f$=�f$,2)
J�  �
J�?  f$="<newsbase$dir>.transports."+trans$(transport%)+"."+f$
K  �objtype(f$)=0�f$=""
K
�
K=f$
K
K(��gwin(n%)
K2�t%,e$,max%,cur$,new$
K<Ȏlisttype%�
KF*  �0:max%=groups%+1:cur$=grp$(gwin_g%)
KP-  :max%=maxactive%:cur$=active$(gwin_g%)
KZ�
Kd�cur$=""�n%>0��
Knt%=gwin_g%+n%
Kx�t%>max%�t%=max%
K��t%<1�t%=1
K��listtype%=0�
K�  new$=grp$(t%)
K�  �
K�  new$=active$(t%)
K��
K�/gwin_g%=t%:�updateiconstring(gwin%,25,new$)
K�2ș"XWimp_SetCaretPosition",gwin%,25,,,-1,�new$
K��listtype%=0�
K�J  �setexpicon(t%):�setinv(gwin%,16,grpmod%(t%)):�setshaded(gwin%,16,0)
K�  �
K�<  �updateiconstring(gwin%,1,"--"):�setshaded(gwin%,16,1)
K��
L�
L
L��gact(A$)
L"'�updateiconstring(gwin%,21,�A$,55))
L,�
L6
L@��errorbox(R%)
LJ� �
LT� � � �errorerror:�
L^G!tmp%=�:$(tmp%+4)="An error has occurred: "+�$+" (code "+Þ+")."+�0
Lh'ș"Wimp_ReportError",tmp%,1,myname$
Lr#� try to write error to logfile
L|4�log(ver$+rev$+" error: "+�$+" at "+Þ):�log("")
L�	ȎR%�
L�  �0:�errorerror
L�E  :!tmp%=�:$(tmp%+4)="Press OK to continue or Cancel to quit"+�0
L�8            ș "Wimp_ReportError",tmp%,3,myname$�,R%
L�!            �R%=2��errorerror
L��
L�� �
L��tidyup
L��
L�
L���errorerror
L�
L�
�finish:�
M�
M
M��opwinvar(h%)
M&	Ȏh%�
M0�msetup%:confopen%=�
M:�msgw%:msgopen%=�
MD�status%:statopen%=�
MN�savend%:ndopen%=�
MX�ngwin%:ngopen%=�
Mb�arrive%:arropen%=�
Ml�
Mv�
M�
M���front(h%)
M�&!q%=h%:ș"Wimp_GetWindowState",,q%
M�4q%!20=0:q%!24=0:q%!28=-1:ș"Wimp_OpenWindow",,q%
M��opwinvar(h%)
M��
M�
M���cfront(h%,xoff%,yoff%)
M��x%,y%,wx%,wy%
M��opwinvar(h%)
M�&!q%=h%:ș"Wimp_GetWindowState",,q%
M�;x%=�moderight:y%=�modetop:wx%=q%!12-q%!4:wy%=q%!16-q%!8
M�Mq%!4=(x%-wx%)�2-xoff%:q%!12=q%!4+wx%:q%!8=(y%-wy%)�2-yoff%:q%!16=q%!8+wy%
N4q%!20=0:q%!24=0:q%!28=-1:ș"Wimp_OpenWindow",,q%
N�
N
N ݤic_str(H%,I%)
N*1!q%=H%:q%!4=I%:ș"XWimp_GetIconState",,q%�;F%
N4=�str(q%!28)
N>
NH��seticonstring(H%,I%,A$)
NR1!q%=H%:q%!4=I%:ș"XWimp_GetIconState",,q%�;F%
N\$(q%!28)=A$+�0
Nf�
Np:
Nz ��updateiconstring(H%,I%,A$)
N�:�seticonstring(H%,I%,A$):!q%=H%:q%!4=I%:q%!8=0:q%!12=0
N�"ș"XWimp_SetIconState",,q%�;F%
N��
N�
N���setinv(H%,I%,S%)
N�BS%=�(S%=0):!q%=H%:q%!4=I%:q%!8=((1)<<21)*�(S%=0):q%!12=(1<<21)
N�"ș"XWimp_SetIconState",,q%�;F%
N��
N�
N���setshaded(H%,I%,S%)
N�3!q%=H%:q%!4=I%:q%!8=((1)<<22)*�S%:q%!12=(1<<22)
N�ș"Wimp_SetIconState",,q%
N��
O
Oݤrdinv(H%,I%)
O,!q%=H%:q%!4=I%:ș"Wimp_GetIconState",,q%
O$$=-(((q%!24)�(1<<21))�2097152<>0)
O.
O8��modgwmenu
OB
�A$,l%
OLE�l%=0�20:�modgw$(l%)>""��(A$+modgw$(l%))<253�A$=A$+modgw$(l%)+","
OV�l%
O`(�A$>""�domenu(120,�A$),"Modpaths",0)
Oj�
Ot
O~��mngwmenu
O�
�A$,l%
O�B�l%=0�10:�mngw$(l%)>""��(A$+mngw$(l%))<253�A$=A$+mngw$(l%)+","
O��l%
O�(�A$>""�domenu(122,�A$),"Gateways",0)
O��
O�
O���rdmenu
O��A$,a$,c%,l%,t%,F%:c%=0
O�D�ș"XOS_ReadVarVal","Newsbase$Client*",tmp%,255,c%�,,l%,c%,t%;F%
O�C�t%=0�(F%�1)=0�tmp%?l%=13:a$=�str(tmp%):�A$+�a$<255�A$+=a$+","
O�3�(F%�1)<>0:�A$>""��domenu(123,�A$),"Readers",0)
O��
P
P
��grpmenu(handle%)
P.�mbuf%,tbuf%,tbufp%,w%,wp%,msiz%,tsiz%,no%
P0�release(menudataref%):�release(indmenuref%)
P(2�IFlisttype%=1ANDactive$(1)=""THENVDU7:ENDPROC
P2	�hgon
P<Ȏlisttype%�
PF0  �0:msiz%=28+24*(groups%+1):tsiz%=groups%*2
PP(  �w%=1�groups%:tsiz%+=�grp$(w%):�w%
PZ5  :msiz%=28+24*(maxactive%+1):tsiz%=maxactive%*3
Pd.  �w%=1�maxactive%:tsiz%+=�active$(w%):�w%
Pn�
Px/menudataref%=�claim(menudata%,msiz%,"menu")
P�4indmenuref%=�claim(indmenubuf%,tsiz%,"menudata")
P��menudata%>0�indmenubuf%>0�
P�'  mbuf%=menudata%:tbuf%=indmenubuf%
P�  tbufp%=tbuf%
P�  menuhandle%=handle%
P�  menuptr%=mbuf%
P�  menuptr%!20=44
P�  $menuptr%="Groups":w%=6
P�  menuptr%!12=&70207
P�#  wp%=menuptr%+16:menuptr%!24=0
P�  menuptr%+=28:no%=1
P�  �
P�  �listtype%=0�
Q    item$=grp$(no%)
Q	    �
Q    item$=active$(no%)
Q"  �
Q,  �item$>w% �w%=�item$
Q6  �item$>""�
Q@  !menuptr%=0:menuptr%!4=0
QJ  menuptr%!8=&07000121
QT;  menuptr%!12=tbufp%:menuptr%!16=0:menuptr%!20=�item$+1
Q^)  $tbufp%=item$+�0:tbufp%+=(�item$+1)
Qh  menuptr%+=24
Qr  �
Q|  no%+=1:�item$=""
Q�3  !wp%=w%*16+32:menuptr%!-24=(menuptr%!-24)�&80
Q�V  �no%>2�getpointer:menux%=mx%-64:menuy%=my%:ș"Wimp_CreateMenu",,mbuf%,menux%,my%
Q��
Q�
�hgoff
Q��
Q�
Q���umenu
Q�
�A$,l%
Q�<l%=0:ȕl%<maxusr%�user$(l%)>"":A$+=user$(l%)+",":l%+=1:�
Q�,�A$>1�A$=�A$):�domenu(107,A$,"Users",0)
Q��
Q�
Q���ugmenu
R>�domenu(108,"0,1,2,3,10,11,12,13,14,15,\---","Groups",0):�
R
R)��domenu(handle%,menu$,menutitle$,I%)
R&+�w%,wp%,l%,a$,item$,fudge%,tbufp%,ilen%
R00�release(menudataref%):�release(indmenuref%)
R:.menudataref%=�claim(menudata%,&400,"menu")
RD3indmenuref%=�claim(indmenubuf%,&400,"menudata")
RN�menu$=""��
RXmenuItems%=0:fudge%=0
Rbmenuhandle%=handle%
Rlmenuptr%=menudata%
Rvmenuptr%!20=44
R�'$menuptr%=menutitle$:w%=�menutitle$
R�menuptr%!12=&70207
R�!wp%=menuptr%+16:menuptr%!24=0
R�#menuptr%+=28:tbufp%=indmenubuf%
R��
R�  l%=�menu$,",")
R�  �l%>0�
R�-    item$=�menu$,l%-1):menu$=�menu$,l%+1)
R�	    �
R�    item$=menu$:menu$=""
R�  �
R�  �item$>w% �w%=�item$
R�  �item$>""�
S    !menuptr%=0
S<    �item$,1)="|"�item$=�item$,2):!menuptr%=2:fudge%+=1
S<    �item$,1)="!"�item$=�item$,2):!menuptr%=!menuptr%+1
S 9    menuptr%!4=-1:menuptr%!8=&07000121:ilen%=1+�item$
S*    Ȏ�item$,1)�
S4-    �">":menuptr%!4=info%:item$=�item$,2)
S>;    �"<":menuptr%!8=menuptr%!8 �(1<<22):item$=�item$,2)
SHI    �"\":menuptr%!8=menuptr%!8 �(1<<8):!menuptr%=!menuptr%�4:item$=""
SR	    �
S\:    menuptr%!12=tbufp%:menuptr%!16=0:menuptr%!20=ilen%
Sf&    $tbufp%=item$+�0:tbufp%+=ilen%
Sp  �
Sz   menuptr%+=24:menuItems%+=1
S�
�menu$=""
S�#menuptr%!-24=(menuptr%!-24)�&80
S�!wp%=w%*16+32:�getpointer
S�Emenux%=mx%-64:�I%<>0�menuy%=96+menuItems%*44+fudge%*24�menuy%=my%
S�1ș "Wimp_CreateMenu",,menudata%,menux%,menuy%
S��
S�
S���menuselect(menus%)
S�5�l%,g$:ș"Wimp_DecodeMenu",,menudata%,menus%,tmp%
S�A$=�str(tmp%)
S�
�b%�1�
S�2  ș"Wimp_CreateMenu",,menudata%,menux%,menuy%
S�  �
T2  �release(menudataref%):�release(indmenuref%)
T�
TȎmenuhandle%�
T$  �101:
T.    Ȏ A$ �
T8=      �"Setup...":�startupok%��front(msetup%)��stillstart
TB<      �"Debatch":�startupok%�checkfiles%=1:forcebatch%=�
TL0      �"Expire":�startupok%��expgroup("*",0)
TVC      �"Queues...":�startupok%�l%=�runtransportfile(3,"","","")
T`'      �"Quit":�checkquit �finish:�
Tj	    �
Tt"  �102:�settrans(�transno(A$))
T~#  �112:�settrans2(�transno(A$))
T�:  �103:�A$>0�updateiconstring(gwin%,2,A$):defexp%=�A$
T�  �104:
T�"    g$=�ic_str(gwin%,25):ȎA$�
T�%      �"Default":�setexpiry(g$,0)
T�%      �"Never":�setexpiry(g$,1E6)
T�$      :�A$>0�setexpiry(g$,�A$)
T�	    �
T�%    �updateiconstring(gwin%,1,A$)
T�:  �105:�A$>0�updateiconstring(gwin%,22,A$):ngexp%=�A$
T�  �106:ȎA$�
T�      �"Pause":�pause
T�1      �"Resume":pause%=0:�print("",""," ","")
U      �"Cancel":cancel%=�
U
	    �
U2  �107:�getuserinfo:�saveuserinfo:�setuwin(A$)
U  �108:ȎA$�
U(,      �"0":�updateiconstring(uwin%,2,A$)
U20      :�A$>0��updateiconstring(uwin%,2,A$)
U<	    �
UF  �110:�listtype%=0�
UP(    gwin_g%=�nametono(A$,�):�gwin(0)
UZ	    �
UdN    gwin_g%=0:�gwin_g%+=1:�active$(gwin_g%)=A$�gwin_g%>maxactive%:�gwin(0)
Un	    �
UxJ  �111:�updateiconstring(gwin%,12,A$):listtype%=�(�A$,1)="A"):�gwin(0)
U�"  �120:modgw$=A$:�setmodgw(A$)
U�   �121:timezone$=A$:�sethost
U�   �122:mngw$=A$:�setmngw(A$)
U�+  �123:�updateiconstring(gsetup%,16,A$)
U�(  �130:�updateiconstring(fwin%,1,A$)
U�?  �131:�updateiconstring(fwin%,15,A$):�setcaret(fwin%,16,0)
U�>  �132,133,134:�updateiconstring(fwin%,menuhandle%-130,A$)
U�*    �setcaret(fwin%,menuhandle%-127,0)
U��
U��
U�
U�(��stillstart:�message0("Bstart",0):�
U�
V��pause
VCpause%=1:��print("","",�msg0("Paused"),""):�poll(200):�pause%=0
V�
V"
V,��setexpiry(g$,a%)
V6�l%:�g$=""�
V@�l%=1�groups%
VJ-  �smatch(g$,grp$(l%))<>0�grpexp%(l%)=a%
VT�l%
V^�
Vh
Vr��print(A$,B$,C$,D$)
V|.�A$>""�updateiconstring(status%,1,�A$,36))
V�.�B$>""�updateiconstring(status%,2,�B$,36))
V�.�C$>""�updateiconstring(status%,3,�C$,36))
V�.�D$>""�updateiconstring(status%,4,�D$,36))
V��
V�
V�=��open_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
V��handle%=-1��
V�q%!0=handle%:q%!28=bhandle%
V�)q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
V�q%!20=scx%:q%!24=scy%
V�ș "Wimp_OpenWindow",,q%
V��
V�:
W��getpointer
W"ș "Wimp_GetPointerInfo",,tmp%
W@mx%=!tmp%:my%=tmp%!4:b%=tmp%!8:handle%=tmp%!12:icon%=tmp%!16
W&�
W0
W:��closew(h%)
WD�getpointer
WN	Ȏh%�
WX�msetup%:confopen%=�
Wb�msgw%:msgopen%=�
Wl�status%:statopen%=�
Wv�ngwin%:ngopen%=�:�closeng
W�7�arrive%:�arropen%�arropen%=�:arrart%=0:arrmail$=""
W��savend%:ndopen%=�
W�2�yesno%,info%:� dummys for otherwise clause...
W�:�b%=1��front(msetup%)
W��
W�#!q%=h%:ș"Wimp_CloseWindow",,q%
W��
W�
W�ݤvarval(A$)
W�
�L%,F%
W�/ș"XOS_ReadVarVal",A$,tmp%,256,0,3 �,,L%;F%
W��(F%�1) �L%>256 �:=""
W�tmp%?L%=13:=$tmp%
X
X��ngwin
X9� handle f4% is reserved for use by newgroups handler
X nglast%=0:ngtime%=0
X*f1%=�openin(lastng$)
X4"�f1%>0�ngtime%=��#f1%:�cf(f1%)
X>f4%=�openin(newgrp$)
XH�f4%>0�
XR$  �cfront(ngwin%,0,-100):�nextng
X\  �
Xf  �message0("NGnone",0)
Xp�
Xz�
X�
X���nextng
X�'�a$,b$,ok%:�f4%=0��closew(ngwin%):�
X�#�a$=�#f4%:��#f4%��cf(f4%):ok%=2
X�  �a$,1)="#"�
X�%    nglast%=�(�a$,3,6)+�a$,10,2))
X�t    �nglast%>ngtime%�f1%=�openout(lastng$):�f1%>0��#f1%,�nglast%:�cf(f1%):�settype(lastng$,&FFF):ngtime%=nglast%
X�	    �
X�V    �nglast%>=ngtime%�b$=�getpar(a$," "):a$=b$:�active(a$)=0��isachef(a$)=0�ok%=1
X�  �
X��ok%<>0
X��ok%=1�
X�5  b$=�nglast%:b$=�b$,5,2)+"-"+�b$,3,2)+"-"+�b$,2)
Y/  �updateiconstring(ngwin%,5,"Created "+b$)
Y)  �updateiconstring(ngwin%,6,�a$,45))
Y  �
Y$*  �closew(ngwin%):�message0("NGend",0)
Y.�
Y8�
YB
YL��catchupng
YVf1%=�openout(lastng$)
Y`G�f1%>0��#f1%,�ctime("%YR%MN%DY%24"):�cf(f1%):�settype(lastng$,&FFF)
Yj�closew(ngwin%)
Yt�
Y~
Y�
��closeng
Y��cf(f4%)
Y��
Y�
Y���gettransports
Y�$�l%,r3%,t%,dirbuf%,dbr%,a$,b$,F%
Y�'dbr%=�claim(dirbuf%,dbsize%,"dbuf")
Y�ntrans%=1:�
Y�E  ș"XOS_GBPB",10,transdir$,dirbuf%,1,n%,dbsize%,"*"�,,,r3%,n%;F%
Y�&  �r3%>0�(dirbuf%!16)=2�ntrans%+=1
Y��n%=-1�(F%�1)>0
Y�M�trans$(ntrans%),transd$(ntrans%),transc$(ntrans%,20),transm%(ntrans%,20)
Z,�transi$(ntrans%,10),transo$(ntrans%,10)
Z
Itrans$(0)="none":transi$(0,0)=workdir$+".*":transi$(0,1)=lindir$+".*"
Z
l%=1:n%=0
Z�
Z(E  ș"XOS_GBPB",10,transdir$,dirbuf%,1,n%,dbsize%,"*"�,,,r3%,n%,F%
Z2  �r3%>0�(dirbuf%!16)=2�
Z<7    a$=�lower(�str(dirbuf%+20)):b$=transdir$+"."+a$
ZF"    �objtype(b$+".params")=1�
ZP      trans$(l%)=a$
ZZ%      �readtrans(b$+".params",l%)
ZdF      �runtransportfile(18,"","","")=0�transport%=0�transport%=l%
Zn      l%+=1
Zx	    �
Z�  �
Z��n%=-1�(F%�1)>0
Z��settrans2(transport%)
Z��release(dbr%)
Z��
Z�
Z���readtrans(f$,n%)
Z�$�a$,b$,c$,i%,o%,l%,p%,dm%:dm%=32
Z�f1%=�openin(f$):�f1%<>0�
Z�"  �a$=�#f1%:b$=�getpar(a$," ")
Z�
    Ȏb$�
Z�.      �"in":�i%<11�transi$(n%,i%)=a$:i%+=1
Z�/      �"out":�o%<11�transo$(n%,o%)=a$:o%+=1
[      �"dir":�ensuredir(a$)
[       �"info":transd$(n%)=a$
[;      �"defmem":dm%=�a$:�dm%<0�dm%=0��dm%>2048�dm%=2048
["      :
[,!      p%=0:c$=�getpar(a$," ")
[67      l%=��clean(c$):�l%<=0�l%=dm%��l%>2048�l%=2048
[@      Ȏ�b$,5)�
[J        �"sendm":p%=1
[T        �"sendn":p%=2
[^        �"showq":p%=3
[h        �"prefe":p%=4
[r        �"postf":p%=5
[|        �"addus":p%=6
[�        �"delus":p%=7
[�        �"modus":p%=8
[�        �"addgr":p%=9
[�        �"delgr":p%=10
[�"        �"getho","setho":p%=11
[�"        �"getre","setre":p%=12
[�        �"getin":p%=13
[�        �"mkgro":p%=14
[�        �"statu":p%=15
[�        �"start":p%=16
[�        �"setup":p%=17
[�        �"detec":p%=18
[�      �
\3      �p%>0�transc$(n%,p%)=a$:transm%(n%,p%)=l%
\	    �
\  �(�#f1%):�cf(f1%)
\&�
\0�
\:
\D��readnewsrc
\N�count%
\X#active$()="":active$(0)="junk*"
\b:f1%=�openin(confdir$+"."+trans$(transport%)+".groups")
\l�f1%<>0�
\v  count%=1
\�  �A$=�lower(�sget(f1%))
\�$    active$(count%)=A$:count%+=1
\�  ��#f1%�count%>maxactive%
\�  �cf(f1%)
\��
\�maxactive%=count%
\��
\�
\�ݤactive(group$)
\��g$,flag%,count%,neg%
\��group$=""�:=�
\��specialgrp(group$)>0�:=�
\�group$=�lower(group$)
]flag%=0:count%=0
]�
]'  g$=�lower(active$(count%)):neg%=0
]   �g$=33�g$=�g$,2):neg%=1
]*,  �smatch(g$,group$)<>0 �flag%=1+3*neg%
]4!  count%+=1:�flag%=1�flag%+=1
]>�g$=""�flag%>3
]H�neg%=1�flag%=0
]R
=flag%
]\
]fݤisachef(g$)
]p(�yes%,a1$,a2$,a3$,a4$,a5$,a6$:yes%=0
]z�killc%<>0�
]�a1$=�getpar(g$,".")
]��a1$="alt"�
]�-  a2$=�getpar(g$,"."):a3$=�getpar(g$,".")
]�-  a4$=�getpar(g$,"."):a5$=�getpar(g$,".")
]�;  �a3$=a4$�a4$=a5$�a5$>""�a5$=a6$�a4$=a5$�a6$>""�yes%=�
]��
]��
]�	=yes%
]�
]���message0(A$,w%)
]��message(�msg0(A$),w%)
]��
]�
^��message1(A$,B$,w%)
^�message(�msg1(A$,B$),w%)
^�
^$
^.��message2(A$,B$,C$,w%)
^8 �message(�msg2(A$,B$,C$),w%)
^B�
^L
^V��message(A$,wait%)
^`�A$=""�closew(msgw%):�
^j'�updateiconstring(msgw%,0,�A$,127))
^tW�wait%=0��updateiconstring(msgw%,2,"Dismiss")��updateiconstring(msgw%,2,"Continue")
^~3�msgopen%=0��cfront(msgw%,0,-110)��front(msgw%)
^�msgopen%=1
^��wait%�
^�  ��poll(200):�msgopen%=�
^��
^��
^�
^���readconfig
^�
�cver%
^�&f1%=�openin(confdir$+".!nbconfig")
^��f1%<>0�
^�  cver%=100*��#f1%
^�  �cver%>46�
_    hostname$=�#f1%
_
8    remotehost$=�#f1%:�remotehost$<2�remotehost$=""
_*    transport%=�transno(�lower(�#f1%))
_    org$=�#f1%
_(    defclient$=�#f1%
_2    modgw$=�#f1%
_<9    timezone$=�#f1%:�timezone$=""�timezone$=�timezone
_F9    mailname$=�#f1%:�mailname$=""�mailname$=hostname$
_P    mngw$=�#f1%
_Z    A$=�#f1%
_d    A$=�#f1%
_n    A$=�#f1%
_x    A$=�#f1%
_�    logfile%=��#f1%
_�    autoexp%=��#f1%
_�    keepoutg%=��#f1%
_�    defexp%=��#f1%
_�    keepb%=��#f1%
_�    delok%=��#f1%
_�    fast%=��#f1%
_�    alert%=��#f1%
_�    alertbeep%=��#f1%
_�    alertnews%=��#f1%
_�    userctrl%=��#f1%
_�    expmail%=��#f1%
_�    autodebatch%=��#f1%
`    mngw%=��#f1%
`(    ngexp%=��#f1%:�ngexp%=0�ngexp%=7
`    �cver%>49�
`"      docanc%=��#f1%
`,      killc%=��#f1%
`6      doreceipt%=��#f1%
`@      igexp%=��#f1%
`J      �cver%>51�
`T        thread%=��#f1%
`^        compress%=��#f1%
`h;        complimit%=��#f1%:�complimit%=0�complimit%=2048
`r        expany%=��#f1%
`|        exptime%=��#f1%
`�2        mindsk%=��#f1%:�mindsk%=0�mindsk%=1024
`�      �
`�	    �
`�  �
`�  �cf(f1%)
`��
`��setconfig:�setsysvars
`�ș"OS_Byte",121,(2�&80)�,A%
`�#�cver%<ver%�rw%��newuser(cver%)
`��A%=&FF �initconf%=1
`�,�cver%<47�rw%��inittransport:initconf%=2
`��
`�
a��newuser(t%)
a�F%,t$:�t%>0�t%<47�t%=1
a(�nucp(t%):t$=�msg1("Swelcome1",ver$)
a&	Ȏt%�
a0"�0:�message1("Swelcome2",t$,0)
a:"�1:�message1("Swelcome3",t$,1)
aD-:�message1("Swelcome4",t$,1):�saveconfig
aN�
aX�poll(0)
ab�
al
av��nucp(t%)
a��f1$,F%
a�.� copy newuser/update messages to work dir
a�0� but delete them if decompression fails...!
a�/�t%=0�s$=".welcome.new_"�s$=".welcome.upd_"
a�f1$=workdir$+".postmaster"
a�(F%=�copyfile(support$+s$+"mail",f1$)
a�f1$=workdir$+".localnews"
a�(F%=�copyfile(support$+s$+"news",f1$)
a��
a�
a���setconfig
a��l%
a��setinv(gwin%,27,docanc%)
b�setinv(gwin%,28,killc%)
b�setinv(gwin%,29,autoexp%)
b�setinv(gwin%,33,igexp%)
b �setinv(gwin%,34,thread%)
b*>�setinv(gwin%,31,expmail%):�setinv(gwin%,30,-(expmail%=0))
b4<�setinv(gwin%,36,expany%):�setinv(gwin%,35,-(expany%=0))
b>'�updateiconstring(gwin%,2,�defexp%)
bH'�updateiconstring(gwin%,22,�ngexp%)
bR�setinv(uwin%,10,keepoutg%)
b\�setinv(uwin%,11,userctrl%)
bf�setinv(uwin%,12,delok%)
bp�setinv(gsetup%,3,fast%)
bz�setinv(gsetup%,6,logfile%)
b�!�setinv(gsetup%,7,doreceipt%)
b� �setinv(gsetup%,8,compress%)
b��setinv(gsetup%,9,keepb%)
b��setinv(gsetup%,10,alert%)
b�=�setinv(gsetup%,11,autodebatch%):checkfiles%=autodebatch%
b�"�setinv(gsetup%,12,alertbeep%)
b�F�setinv(gsetup%,14,alertnews%):�setinv(gsetup%,13,-(alertnews%=0))
b��setinv(gsetup%,20,mngw%)
b�-�updateiconstring(gsetup%,23,�complimit%)
b�*�updateiconstring(gsetup%,26,�mindsk%)
b�+�seticonstring(gwin%,12,"Current list")
b�F�l%=3�4:�setshaded(uwin%,l%,(keepoutg%=0)):�l%:� keep outgoing m/n
b�F�l%=30�31:�setshaded(gwin%,l%,(autoexp%=0)):�l%:� mail/news expiry
cE�l%=35�41:�setshaded(gwin%,l%,(autoexp%=0)):�l%:� expiry schedule
cC�l%=12�14:�setshaded(gsetup%,l%,(alert%=0)):�l%:� new mail/news
c�settrans(transport%)
c$�modgw$=""�modgw$=modgw$(0)
c.�setmodgw(modgw$)
c8�setmngw(mngw$)
cB�dispexptime
cL&�updateiconstring(sitewin%,3,org$)
cV�sethost:�setclient
c`slice%=�cpu(fast%)
cj�
ct
c~��modexp(ch%,cm%)
c�
�h%,m%
c�#h%=exptime%�100:m%=exptime%�100
c�m%+=cm%
c��m%>59�ch%=1:m%=0
c��m%<0�ch%=-1:m%=59
c�h%+=ch%
c��h%<0�h%=23
c��h%>23�h%=0
c�#exptime%=h%*100+m%:�dispexptime
c��
c�
c���dispexptime
d
�a$,h$,m$
d
9h$=�"0"+�(exptime%�100),2):m$=�"0"+�(exptime%�100),2)
d�h$="00"�h$="12"
da$=h$+":"+m$
d(&�exptime%>1159�a$+=" pm"�a$+=" am"
d2"�updateiconstring(gwin%,41,a$)
d<�
dF
dP��setmodgw(g$)
dZ(�updateiconstring(gsetup%,1,�g$,41))
dd�
dn
dx��setmngw(g$)
d�)�updateiconstring(gsetup%,18,�g$,41))
d��
d�
d���settrans(t%)
d��t%<0�t%=0
d�D�updateiconstring(sitewin%,11,�trans$(t%)+" - "+transd$(t%),40))
d��
d�
d���settrans2(t%)
d��t%<0�t%=0
d�*�updateiconstring(trwin%,0,trans$(t%))
d�0�updateiconstring(trwin%,2,�transd$(t%),38))
d��
e
eݤtransno(t$)
e�t%
e",t%=0:ȕt%<ntrans%�t$<>trans$(t%):t%+=1:�
e,�t$<>trans$(t%)�t%=0
e6=t%
e@
eJ��setclient
eT,�updateiconstring(gsetup%,16,defclient$)
e^�
eh
er
��sethost
e|+�updateiconstring(sitewin%,0,hostname$)
e�+�updateiconstring(sitewin%,1,mailname$)
e�-�updateiconstring(sitewin%,2,remotehost$)
e�,�updateiconstring(sitewin%,14,timezone$)
e��
e�
e���getconfig
e�
�t$,l%
e�docanc%=�rdinv(gwin%,27)
e�killc%=�rdinv(gwin%,28)
e�autoexp%=�rdinv(gwin%,29)
e�igexp%=�rdinv(gwin%,33)
e�thread%=�rdinv(gwin%,34)
e�defexp%=��ic_str(gwin%,2)
fngexp%=��ic_str(gwin%,22)
fexpmail%=�rdinv(gwin%,31)
fexpany%=�rdinv(gwin%,36)
f&logfile%=�rdinv(gsetup%,6)
f0 doreceipt%=�rdinv(gsetup%,7)
f:fast%=�rdinv(gsetup%,3)
fD<autodebatch%=�rdinv(gsetup%,11):checkfiles%=autodebatch%
fNcompress%=�rdinv(gsetup%,8)
fXkeepb%=�rdinv(gsetup%,9)
fbalert%=�rdinv(gsetup%,10)
fl!alertbeep%=�rdinv(gsetup%,12)
fv!alertnews%=�rdinv(gsetup%,14)
f�mngw%=�rdinv(gsetup%,20)
f�modgw$=�ic_str(gsetup%,1)
f�mngw$=�ic_str(gsetup%,18)
f�"defclient$=�ic_str(gsetup%,16)
f�#complimit%=��ic_str(gsetup%,23)
f� mindsk%=��ic_str(gsetup%,26)
f�keepoutg%=�rdinv(uwin%,10)
f�userctrl%=�rdinv(uwin%,11)
f�delok%=�rdinv(uwin%,12)
f�!hostname$=�ic_str(sitewin%,0)
f�:t$=�ic_str(sitewin%,11):l%=�t$," "):�l%>0�t$=�t$,l%-1)
f�E�transport%<>�transno(t$)�transport%=�transno(t$):�starttransport
f�org$=�ic_str(sitewin%,3)
g#remotehost$=�ic_str(sitewin%,2)
g!mailname$=�ic_str(sitewin%,1)
g"timezone$=�ic_str(sitewin%,14)
g slice%=�cpu(fast%)
g*�setsysvars
g4$�l%=0�6:�nbsiteinfo(30,0,0,l%):�
g>�
gH
gR��setsysvars
g\*�setvar("Newsbase$HostName",hostname$)
gf*�setvar("Newsbase$MailName",mailname$)
gp.�setvar("Newsbase$RemoteHost",remotehost$)
gz4�setvar("Newsbase$Transport",trans$(transport%))
g��
g�
g���setvar(A$,B$)
g� ș"XOS_CLI","set "+A$+" "+B$
g��
g�
g���saveconfig
g��getconfig
g�	�rw%�
g�2  f1%=�openout(confdir$+".!nbconfig"):�f1%<>0�
g�    �#f1%,�(ver%/100)
g�    �#f1%,hostname$
g�    �#f1%,remotehost$
h     �#f1%,trans$(transport%)
h    �#f1%,org$
h    �#f1%,defclient$
h$    �#f1%,modgw$
h.    �#f1%,timezone$
h8    �#f1%,mailname$
hB    �#f1%,mngw$
hL    �#f1%,""
hV    �#f1%,""
h`    �#f1%,""
hj    �#f1%,""
ht    �#f1%,�logfile%
h~    �#f1%,�autoexp%
h�    �#f1%,�keepoutg%
h�    �#f1%,�defexp%
h�    �#f1%,�keepb%
h�    �#f1%,�delok%
h�    �#f1%,�fast%
h�    �#f1%,�alert%
h�    �#f1%,�alertbeep%
h�    �#f1%,�alertnews%
h�    �#f1%,�userctrl%
h�    �#f1%,�expmail%
h�    �#f1%,�autodebatch%
h�    �#f1%,�mngw%
i    �#f1%,�ngexp%
i
    �#f1%,�docanc%
i    �#f1%,�killc%
i    �#f1%,�doreceipt%
i(    �#f1%,�igexp%
i2    �#f1%,�thread%
i<    �#f1%,�compress%
iF    �#f1%,�complimit%
iP    �#f1%,�expany%
iZ    �#f1%,�exptime%
id    �#f1%,�mindsk%
in    �#f1%,"0"
ix    �#f1%,"0"
i�    �#f1%,"0"
i�    �#f1%,"0"
i�5    �cf(f1%):�settype(confdir$+".!nbconfig",&FFF)
i�  �
i��
i��
i�
i�ݤtimezone
i�
�b%,m%,b$
i�)ș"Territory_ReadCurrentTimeZone"�,b%
i�$m%=(b%�360000)�6000:b%=b%�360000
i�b$=�Ôm%+"00",2):b$=Ôb%+b$
i��b$=3�b$="0"+b$
j�b%<0�b$="-"+b$�b$="+"+b$
j=b$
j
j"��starttransport
j,�f$,l%,a$,b$,t$
j6t$=trans$(transport%)
j@%l%=�runtransportfile(16,"","","")
jJ�l%<>0�transport%>0�
jT@  �message1("Tfail1",t$,1):l%=�runtransportfile(16,"","","")
j^.  �l%<>0�message0("Tfail2",1):transport%=0
jh�
jr�readnewsrc
j|�
j�
j�ݤopenin(f$)
j�=�fopen(f$,&4F)
j�
j�ݤopenout(f$)
j�=�fopen(f$,&8F)
j�
j�ݤopenup(f$)
j��h%
j�h%=�fopen(f$,&CF)
j��h%=0�h%=�fopen(f$,&8F)
j�=h%
j�
kݤfopen(f$,r%)
k
�h%,F%
kș"XOS_Find",r%,f$�h%;F%
k&�(F%�1)�h%=0
k0=h%
k:
kDݤcanon(A$)
kN
�r%,F%
kX9�A$>""�ș"XOS_FSControl",37,A$,tmp%,,,256 �,,,,,r%;F%
kb�r%>0�(F%�1)=0�:=�str(tmp%)
kl=""
kv
k���cf(� h%)
k�!�h%<>0 ș"XOS_Find",0,h%:h%=0
k��
k�
k�ݤcountgroups(total%,d$)
k�2�f$,t%,r3%,nread%,f%,dirbuf%,dbr%,addr%,floop%
k�'dbr%=�claim(dirbuf%,dbsize%,"dbuf")
k���poll(slice%)
k�Oaddr%=dirbuf%:ș"OS_GBPB",10,d$,dirbuf%,20,nread%,dbsize%,"*"�,,,r3%,nread%
k��r3%>0�
k�  �floop%=1�r3%
k�#  t%=addr%!16:f$=�str(addr%+20)
k�  Ȏt%�
l|    �1:�f%=0�(�f$>0�f$="~index")�total%+=1:f%=1:�print("","",�msg1("Gfound",�total%),""):�total%=1��message0("Gcount",0)
lB    �2,3:��d$,3),"~")<1�total%=�countgroups(total%,d$+"."+f$)
l  �
l %  addr%=addr%+(�f$+24)��3:�floop%
l*�
l4�nread%=-1
l>�release(dbr%)
lH=total%
lR
l\ݤfindhighest(d$,high%)
lf-�f$,t%,r3%,dptr%,f%,dirbuf%,dbr%,addr%,F%
lp'dbr%=�claim(dirbuf%,dbsize%,"dbuf")
lzdptr%=0
l���poll(slice%*3)
l�D  ș"XOS_GBPB",10,d$,dirbuf%,1,dptr%,dbsize%,"*"�,,,r3%,dptr%;F%
l�  �r3%>0�(F%�1)=0�
l�    addr%=dirbuf%
l�=    t%=addr%!16:f$=�str(addr%+20):addr%=addr%+(25+�f$)��3
l�
    Ȏt%�
l�!      �1:�f$>high%�high%=�f$
l�>      �2,3:�f$,1)="~"�high%=�findhighest(d$+"."+f$,high%)
l�	    �
l�  �
l��dptr%=-1�(F%�1)<>0
l��release(dbr%)
l�
=high%
m
m��findallgroups
m�g1%,l%
m$�busyon("Bscan")=0 �
m.(�print(�msg0("Gsearch")," "," "," ")
m8"�findgroups(newsroot$+".News")
mB�groups%>1�
mL(  �startupok%=0�message0("Gcheck",0)
mV  �g1%=1�groups%
m`%    �grpseq%(g1%)=0�grp$(g1%)>""�
mjB      �print(�msg0("Gcheck"),�msg1("Glast",grp$(g1%))," "," ")
mt2      grpseq%(g1%)=�seq(g1%):l%=�firstart(g1%)
m~	    �
m�
  �g1%
m��
m�=�seticonstring(gwin%,25,grp$(1)):gwin_g%=1:�setexpicon(1)
m��busyoff
m��writegrpdata
m��
m�
�gact("")
m��
m�
m���findgroups(d$)
m�<�n%,f$,t%,r3%,nread%,gf$,l%,dirbuf%,dbr%,addr%,floop%,F%
m�'dbr%=�claim(dirbuf%,dbsize%,"dbuf")
n �gact("Scanning for groups")
n
�
nGș"XOS_GBPB",10,d$,dirbuf%,10,n%,dbsize%,"*"�,,,r3%,n%;F%:nread%=n%
n�poll(slice%):addr%=dirbuf%
n(�r3%>0�(F%�1)=0�
n2  �floop%=1�r3%
n<;  t%=addr%!16:f$=�str(addr%+20):addr%=addr%+(24+�f$)��3
nF  Ȏt%�
nP'    �1:�gf$=""�(�f$>0�f$="~index")�
nZ;     gf$=�pathtogroup(d$):�addifnotinlist(gf$):�scanmsg
nd	    �
nn    �2,3:�f$,1)="~"�
nxD      �gf$=""�gf$=�pathtogroup(d$):�addifnotinlist(gf$):�scanmsg
n�      �
n�       �findgroups(d$+"."+f$)
n�	    �
n�  �
n�
  �floop%
n��
n��nread%=-1�(F%�1)<>0
n��release(dbr%)
n��
n�
n���convrn(d$)
n�E� convert a readnews group by moving all files to ~x subdirectory
n�@�n%,f$,t%,r3%,nread%,f1$,l%,dirbuf%,dbr%,addr%,floop%,F%,mk%
oJdbr%=�claim(dirbuf%,dbsize%,"dbuf"):�print("","",�msg0("Gconvert"),"")
o�
oGș"XOS_GBPB",10,d$,dirbuf%,10,n%,dbsize%,"*"�,,,r3%,n%;F%:nread%=n%
o"�poll(slice%):addr%=dirbuf%
o,�r3%>0�(F%�1)=0�
o6  �floop%=1�r3%
o@;  t%=addr%!16:f$=�str(addr%+20):addr%=addr%+(24+�f$)��3
oJ  Ȏt%�
oT    �1:�f$<>0�
o^      �mk%�
oh?        F%=�movefile(d$+"."+f$,d$+".~x.~x."+f$):�F%=0�n%-=1
or
        �
o|;        f1$=�tmpfile:F%=�movefile(d$+"."+f$,f1$):�F%=0�
o�S        �ensuredir(d$+".~x.~x")>1��movefile(f1$,d$+".~x.~x."+f$)=0�mk%=�:n%-=1
o�
        �
o�      �
o�	    �
o�  �
o�
  �floop%
o��
o��nread%=-1�(F%�1)<>0
o��release(dbr%)
o��
o�
o�
��scanmsg
o�0�startupok%=0�grp$(1)=""�message0("Gscan",0)
p�
p
p��addifnotinlist(g$)
p&�l%
p0�g$>""�
p:?  �print("",�msg1("Gfound",g$),�msg1("Gtotal",�groups%),"")
pD?  �nametono(g$,0)=0�l%=�addgrptolist(g$,�):�l%=0��toomanyg
pN,  �l%>0�print("","","","("+g$+" added)")
pX�
pb�
pl
pvݤpathtogroup(p$)
p��l%:p$=�p$,�dpath$+1)
p��l%=�p$,"~.")
p�"  �l%>0�p$=�p$,l%-1)+�p$,l%+2)
p�	�l%=0
p�=p$
p�
p���initfilters
p�nfilt%=0:cfilt%=0
p�*maxfilt%+=�flines(confdir$+".filters")
p�:�flt%(maxfilt%),fla$(maxfilt%),fla%(maxfilt%),filt%(1)
p�R�flc%(maxfilt%,2),flc$(maxfilt%,2),fln%(maxfilt%,2),flj%(maxfilt%,2),fl_ok%(2)
p�$f1%=�openin(confdir$+".filters")
p��f1%<>0�
q  �a$=�#f1%
q#  flt%(nfilt%)=��getpar(a$,";")
q
  �l%=0�2
q &  flj%(nfilt%,l%)=��getpar(a$,";")
q*&  flc%(nfilt%,l%)=��getpar(a$,";")
q4%  flc$(nfilt%,l%)=�getpar(a$,";")
q>&  fln%(nfilt%,l%)=��getpar(a$,";")
qH	  �l%
qR#  fla%(nfilt%)=��getpar(a$,";")
q\"  fla$(nfilt%)=�getpar(a$,";")
qfA  �flc$(nfilt%,0)>""�fla%(nfilt%)>0�nfilt%+=1:�flt%(nfilt%)=0
qp)  ��#f1%:�cf(f1%):�nfilt%>0�nfilt%-=1
qz�
q��setfiltwin(0)
q��
q�
q���savefilters
q��l%,l1%
q�	�rw%�
q�'  f1%=�openout(confdir$+".filters")
q�
  �f1%>0�
q�    �l%=0�maxfilt%
q�    �flt%(l%)>0�
q�      A$=�flt%(l%)+";"
q�b      �l1%=0�2:A$+=�flj%(l%,l1%)+";"+�flc%(l%,l1%)+";"+flc$(l%,l1%)+";"+�fln%(l%,l1%)+";":�l1%
q�$      A$+=�fla%(l%)+";"+fla$(l%)
r      �#f1%,A$
r      �
r7    �l%:�cf(f1%):�settype(confdir$+".filters",&FFF)
r$  �
r.�
r8�
rB
rL��setfiltwin(n%)
rV�a$,g$,l%,l1%
r`Ȏflt%(n%)�
rj  �1:g$="News"
rt  �2:g$="Mail"
r~  �3:g$="Any"
r�  :g$="Unset"
r��
r�!�updateiconstring(fwin%,1,g$)
r��l1%=0�2
r�  Ȏflc%(n%,l1%)�
r�    �1:g$="From"
r�    �2:g$="To"
r�    �3:g$="Subject"
r�    �4:g$="Group"
r�    �5:g$="Reply To"
r�    �6:g$="Precedence"
r�    �7:g$="Envelope"
s#    :g$="None":flc$(n%,l1%)=""
s
  �
s'  �updateiconstring(fwin%,2+l1%,g$)
s6  �updateiconstring(fwin%,5+l1%,�flc$(n%,l1%),18))
s('  �setinv(fwin%,8+l1%,fln%(n%,l1%))
s2�l1%
s<%�l1%=11�14:�setinv(fwin%,l1%,0):�
sF�flc%(n%,1)>0�
sP;  �flj%(n%,1)=0��setinv(fwin%,11,1)��setinv(fwin%,12,1)
sZ  �flc%(n%,2)>0�
sd=    �flj%(n%,2)=0��setinv(fwin%,13,1)��setinv(fwin%,14,1)
sn  �
sx�
s�Ȏfla%(n%)�
s�  �1:g$="Junk"
s�  �2:g$="Kill"
s�  �3:g$="Redirect"
s�  �4:g$="Submit"
s�  :g$="":fla$(n%)=""
s��
s�"�updateiconstring(fwin%,15,g$)
s�-�updateiconstring(fwin%,16,�fla$(n%),98))
s�1�updateiconstring(fwin%,17,"Filter "+�(n%+1))
s��losecaret
s�filt%()=0:�l%=0�nfilt%
s�  Ȏflt%(l%)�
t    �1:filt%(1)+=1
t    �2:filt%(0)+=1
t"    �3:filt%(0)+=1:filt%(1)+=1
t"  �
t,�l%
t6�
t@
tJ��delfilt(n%)
tT�l%,l1%:�l%=n%�nfilt%-1
t^A  flt%(l%)=flt%(l%+1):fla%(l%)=fla%(l%+1):fla$(l%)=fla$(l%+1)
thg  �l1%=0�2:flc%(l%,l1%)=flc%(l%+1,l1%):flc$(l%,l1%)=flc$(l%+1,l1%):fln%(l%,l1%)=fln%(l%+1,l1%):�l1%
tr�l%
t|1flt%(nfilt%)=0:fla%(nfilt%)=0:fla$(nfilt%)=""
t�^�l1%=0�2:flc%(nfilt%,l1%)=0:flc$(nfilt%,l1%)="":fln%(nfilt%,l1%)=0:flj%(nfilt%,l1%)=0:�l1%
t��nfilt%>0�nfilt%-=1
t��cfilt%>nfilt%�cfilt%-=1
t�$�setfiltwin(cfilt%):�savefilters
t��
t�
t�
��addfilt
t��nfilt%=maxfilt%�
t�  �message0("Ffull",0)
t�  �
t�  �flt%(nfilt%)>0�nfilt%+=1
t�6  flt%(nfilt%)=0:cfilt%=nfilt%:�setfiltwin(cfilt%)
t�<  �updateiconstring(fwin%,17,"Edit Filter "+�(nfilt%+1))
u�
u�
u
u&��setfilt(n%)
u0�a%,l1%,t$,a$,b$,A$
u:#a%=�"NMA",��ic_str(fwin%,1),1))
uD9flt%(n%)=a%:�a%<1��delfilt(n%):�message0("Fbadt",0):�
uN�l1%=0�2
uX-  a%=�"FTSGRPE",��ic_str(fwin%,2+l1%),1))
ub  flc%(n%,l1%)=a%:�a%>0�
ulJ    flc$(n%,l1%)=�ic_str(fwin%,5+l1%):fln%(n%,l1%)=�rdinv(fwin%,8+l1%)
uv	    �
u�&    flc$(n%,l1%)="":fln%(n%,l1%)=0
u�  �
u��l1%
u�/�rdinv(fwin%,12)�flj%(n%,1)=1�flj%(n%,1)=0
u�/�rdinv(fwin%,14)�flj%(n%,2)=1�flj%(n%,2)=0
u�+fla%(n%)=�"JKRS",��ic_str(fwin%,15),1))
u�fla$(n%)=�ic_str(fwin%,16)
u� �setfiltwin(n%):�savefilters
u��
u�
u���initgrpdata
u��l%,add%,ok%
u�l%=0:l%=�flines(grpinfo$)
v
�l%=0�
v)  �print(�msg0("Gcount")," "," "," ")
v*  l%=�countgroups(0,newsroot$+".News")
v   �
v*�dimgrp(l%)
v4#�user$(maxusr%),userf$(maxusr%)
v>?�upost%(maxusr%),ukm%(maxusr%),ukn%(maxusr%),ugrp%(maxusr%)
vH
�getmodgw
vR�readgrpdata
v\�
vf
vpݤflines(f$)
vz
�a$,l%
v�f1%=�openin(f$)
v��f1%<>0�
v�%  �a$=�#f1%:l%+=1:��#f1%:�cf(f1%)
v��
v�=l%
v�
v���dimgrp(n%)
v�=maxgroup%=n%+addgrp%:�maxgroup%<mingrp%�maxgroup%=mingrp%
v�+groups%=n%:n%=maxgroup%:maxactive%=n%*2
v��active$(maxactive%)
v��grpexp%(n%),grpmod%(n%)
v�<�grp$(n%),grpf%(n%):grp$()=�40," "):grp$()="":grpf%()=-1
v�%�grpseq%(n%),grpa%(n%):grpa%()=-1
w�
w
w��getmodgw
w$�l%
w.7�modgw$(20),mngw$(10):modgw$(0)="moderators.uu.net"
w8%f1%=�openin(support$+".modpaths")
wB�f1%>0�
wL9  l%=0:�:l%+=1:modgw$(l%)=�#f1%:�l%=20��#f1%:�cf(f1%)
wV�
w`&f1%=�openin(support$+".mail2news")
wj�f1%>0�
wt8  l%=0:�:l%+=1:mngw$(l%)=�#f1%:�l%=10��#f1%:�cf(f1%)
w~�
w��
w�
w���setuwin(u$)
w��u%,f$:u%=�userno(u$)
w��u%>-1�
w�$  �updateiconstring(uwin%,20,u$)
w�+  �updateiconstring(uwin%,2,�ugrp%(u%))
w�1  �updateiconstring(uwin%,13,�userf$(u%),32))
w�  �setinv(uwin%,3,ukm%(u%))
w�  �setinv(uwin%,4,ukn%(u%))
w�!  �setinv(uwin%,5,upost%(u%))
w�M  f$=�upath(u$)+".vacation":�updateiconstring(uwin%,21,�msg0("Inactive"))
xP  �objtype(f$)=1��filesize(f$)>0�updateiconstring(uwin%,21,�msg0("Active"))
x
�
x�
x
x( ��editvac(u$):�badvac(u$)��
x2!�f$:f$=�upath(u$)+".vacation"
x<T�objtype(f$)=0�f2%=�openout(f$):�f2%>0��#f2%,u$+" is away":�cf(f2%):�vacset(u$)
xF^�settype(f$,&FFF):ș"XWimp_StartTask","Filer_Run "+f$:�updateiconstring(uwin%,21,"Active")
xP�
xZ
xd"��newvac(u$,s$):�badvac(u$)��
xn$�f$,F%:f$=�upath(u$)+".vacation"
xx'F%=�delfile(f$):F%=�copyfile(s$,f$)
x�A�F%=0��updateiconstring(uwin%,21,�msg0("Active")):�vacset(u$)
x��
x�
x���vacset(u$)
x��message1("Uvacset",u$,0)
x��
x�
x���cancvac(u$)
x�+�F%:F%=�delfile(�upath(u$)+".vacation")
x�6�F%=0�updateiconstring(uwin%,21,�msg0("Inactive"))
x��
x�
x�ݤbadvac(u$)
y�f%:f%=0:u$=�lower(u$)
y/f%=(u$="root"�u$="postmaster"�u$="default")
y!�f%��7:�message0("Ubadvac",0)
y"=f%
y,
y6ݤuserno(u$)
y@�l%,r%:r%=0:l%=0
yJ&ȕl%<maxusr%�u$<>user$(l%):l%+=1:�
yT�u$=user$(l%)�u$>""�r%=l%
y^=r%
yh
yr��inituserdata
y|#�ok%,next%,n%,u%,uc%,err%,u$,p$
y� ȕ�varval("UserHome$Dir")=""
y�$  ok%=�confirm(�msg0("Unohome"))
y�A  �ok%=1�ș"OS_CLI","set UserHome$Dir "+newsroot$+".UserHome"
y��
y�%userhome$=�varval("UserHome$Dir")
y�Buser$(0)="default":ugrp%(0)=10:ukm%(0)=1:ukn%(0)=1:upost%(0)=1
y��objtype(userhome$)<2�
y�)  �ensuredir(userhome$):�findallusers
y�  �
y�  next%=0:uc%=1:�
y�E  ș"XOS_GBPB",9,userhome$,tmp%,1,next%,255,"*"� ,,,n%,next%;err%
y�<  u$=�str(tmp%):�lower(u$)="default"�u%=0�u%=uc%:uc%+=1
y�"  �(err%�1)=0�n%>0�u%<maxusr%�
z"    user$(u%)=u$:p$=�upath(u$)
z#    f0%=�openin(p$+".userinfo")
z    �f0%>0�
z&,      ugrp%(u%)=��#f0%:upost%(u%)=��#f0%
z02      ukm%(u%)=��#f0%:ukn%(u%)=��#f0%:�cf(f0%)
z:      �
zD      �cpdefusr(u%)
zN	    �
zX"    f0%=�openin(p$+".forward")
zb6    �f0%>0�userf$(u%)=�#f0%:�cf(f0%)�userf$(u%)=""
zl  �
zv  �next%<0�(err%�1)<>0
z��
z��setuwin("default")
z��
z�
z���cpdefusr(u%)
z�
�u%>0�
z�Mugrp%(u%)=ugrp%(0):ukm%(u%)=ukm%(0):ukn%(u%)=ukn%(0):upost%(u%)=upost%(0)
z�Ȏuser$(u%)�
z�  �"root":ugrp%(u%)=0
z�  �"postmaster":ugrp%(u%)=1
z��
z��
z��saveuserinfobyno(u%)
{�
{
{��getuserinfo
{ %�u%:u%=�userno(�ic_str(uwin%,20))
{*�u%>-1�
{4!  ugrp%(u%)=��ic_str(uwin%,2)
{>  ukm%(u%)=�rdinv(uwin%,3)
{H  ukn%(u%)=�rdinv(uwin%,4)
{R   upost%(u%)=�rdinv(uwin%,5)
{\"  userf$(u%)=�ic_str(uwin%,13)
{f�
{p�
{z
{���saveuserinfo
{�%�u%:u%=�userno(�ic_str(uwin%,20))
{��saveuserinfobyno(u%)
{��
{�
{���saveuserinfobyno(u%)
{�
�f$,l%
{��u%>-1�
{�9  f$=�upath(user$(u%)):�ensuredir(f$):f$+=".userinfo"
{�  f0%=�openout(f$)
{�
  �f0%>0�
{�*    �#f0%,�ugrp%(u%):�#f0%,�upost%(u%)
{�'    �#f0%,�ukm%(u%):�#f0%,�ukn%(u%)
|"    �cf(f0%):�settype(f$,&FFF)
|  �
|%  f$=�upath(user$(u%))+".forward"
|$  f0%=�openout(f$)
|.8  �f0%>0��#f0%,userf$(u%):�cf(f0%):�settype(f$,&FFF)
|85  l%=�runtransportfile(8,"",user$(u%),�ugrp%(u%))
|B�
|L�
|V
|`ݤconfirm(A$)
|j�ynchoice%:� 1=yes, no=2
|t)�setconfirm(�msg0("Yes"),�msg0("No"))
|~;�updateiconstring(yesno%,0,�A$,78)):�cfront(yesno%,0,0)
|�(ynchoice%=0:��poll(100):�ynchoice%>0
|�=ynchoice%
|�
|�ݤconfirm2(A$)
|�$�ynchoice%:� 1=continue, 2=defer
|�0�setconfirm(�msg0("Continue"),�msg0("Skip"))
|�;�updateiconstring(yesno%,0,�A$,78)):�cfront(yesno%,0,0)
|�(ynchoice%=0:��poll(100):�ynchoice%>0
|�=ynchoice%
|�
|���setconfirm(A$,B$)
|�A�updateiconstring(yesno%,1,A$):�updateiconstring(yesno%,2,B$)
}�
}

}��autoconfigure
},�grp$(1)=""�findallgroups:�message("",0)
}(,�user$(3)=""�findallusers:�message("",0)
}2�
}<
}F��findallusers
}P�n%,l%,g$:n%=0
}ZHl%=�adduser("default"):l%=�adduser("root"):l%=�adduser("postmaster")
}d�g$=grp$(n%)
}n5�g$,6)="Email."��g$,".",7)<1�l%=�adduser(�g$,7))
}xn%+=1:�n%>groups%
}��
}�
}�ݤadduser(A$)
}��n%,ok%
}�	�rw%�
}�5  ȕuser$(n%)<>A$�user$(n%)>""�n%<maxusr%:n%+=1:�
}�  �user$(n%)=""�
}�+    user$(n%)=A$:�ensuredir(�upath(A$))
}�%    �log("Added user: "+A$):ok%=�
}�    �cpdefusr(n%)
}�    �nbupdate(4,A$,0,"","")
}�0    n%=�runtransportfile(6,"",A$,�ugrp%(n%))
}�  �
~�
~=ok%
~
~"ݤupath(u$)
~,=userhome$+"."+u$
~6
~@ݤdeluser(A$)
~J�p$,n%,ok%,l%
~T	�rw%�
~^*  ȕcl_user$(n%)<>A$�n%<maxcl%:n%+=1:�
~h3  �cl_user$(n%)=A$�A$="root"�A$="postmaster"�=0
~r  p$=�upath(A$)
~|  �objtype(p$)>1�
~�'    �wipe(p$):�objtype(p$)=0�ok%=�
~�  �
~�  �ok%�
~�9    �nbupdate(5,A$,0,"",""):�log("Removed user: "+A$)
~�(    n%=�runtransportfile(7,"",A$,"")
~�2    n%=0:ȕuser$(n%)<>A$�user$(n%)<>"":n%+=1:�
~�@    �user$(n%)=A$��l%=n%+1�maxusr%:user$(l%-1)=user$(l%):�l%
~�    user$(maxusr%)=""
~�  �
~��
~�=ok%
~�
~�ݤuserok(A$)
�n%:A$=�lower(A$)
0ȕ�lower(user$(n%))<>A$�user$(n%)>"":n%+=1:�
�user$(n%)=""�=0
&=�
0
:��readgrpdata
D!�a$,b$,g$,lg$,ty%,no%,resave%
N5�hgon:grpexp%()=0:grpmod%()=0:resave%=0:groups%=0
Xf1%=�openin(grpinfo$)
bv%=0:�f1%>0�v%=��#f1%
l#�(v%>=groupver%�v%=13)�f1%<>0 �
v"  ȕ�#f1%=� �groups%<maxgroup%
�/    a$=�#f1%:g$=�checkcase(�getpar(a$," "))
�    �g$>""��g$,"*")<1�
�!      � discard duplicates...
�      �g$<>lg$�
�        �g$>lg$�
�+          groups%+=1:no%=groups%:lg$=g$
�          �
�%          no%=�addgrptolist(g$,�)
�
        �
�,        grp$(no%)=g$:ty%=�specialgrp(g$)
�*        grpseq%(no%)=-��getpar(a$," ")
�        A%=��getpar(a$," ")
�)        grpexp%(no%)=��getpar(a$," ")
�/        b$=�getpar(a$," "):grpmod%(no%)=�b$
�f        �b$=""�ty%=0��message1("Mcheck",g$,0):grpmod%(no%)=�isgrpmod(g$):resave%=�:�poll(4*slice%)
�:        �ty%>1�v%<groupver%�grpexp%(no%)=1E6:resave%=�
�       �
�*	    �
�4  �
�>  �cf(f1%):�message("",0)
�H�
�R�resave%��writegrpdata
�\D�seticonstring(gwin%,25,grp$(1)):gwin_g%=1:�setexpicon(1):�hgoff
�f�
�p
�zݤisgrpmod(g$)
��g$=�checkmoderation(g$,1)
��
=�(g$>"")
��
��ݤgetpar(� A$,s$)
��
�B$,l%
��l%=�A$,s$)
��
�l%>0�
��  B$=�A$,l%-1):A$=�A$,l%+1)
��  �
��  B$=A$:A$=""
���
��=B$
��
���setexpicon(g%)
��n%,a$:n%=grpexp%(g%)
��n%>10000�
�$  a$="Never"
�.  �
�8  �n%=0�a$="Default"�a$=�n%
�B�
�L!�updateiconstring(gwin%,1,a$)
�V�
�`
�j��writegrpdata
�t
�A$,F%,l%
�~	�rw%�
��  F%=�delfile(grpinfo$+"~")
��'  F%=�rename(grpinfo$,grpinfo$+"~")
��  f1%=�openout(grpinfo$)
��>  �f1%=0��closefilebyname(grpinfo$):f1%=�openout(grpinfo$)
��  �f1%<>0�
��    �#f1%,�groupver%
��    �l%=1�groups%
��      �grp$(l%)>""�
��R        �#f1%,grp$(l%)+" "+�(�grpseq%(l%))+" 0 "+�grpexp%(l%)+" "+�grpmod%(l%)
��      �
��    �l%
��(    �cf(f1%):�settype(grpinfo$,&FFF)
�	    �
�
!    �7:�message0("Grpinfo",1)
�  �
��
�(�
�2
�<��createdirs
�F	�hgon
�P$newsroot$=�varval("Newsdir$dir")
�Z'�objtype(newsroot$)<2�newsroot$=""
�d"nbdir$=�varval("Newsbase$dir")
�n"transdir$=nbdir$+".transports"
�x'support$=nbdir$+".support.newsbase"
��resdir$=nbdir$+".resources"
��dpath$=newsroot$+".news."
��"basedir$=newsroot$+".newsbase"
��workdir$=basedir$+".work"
��confdir$=basedir$+".config"
��baddir$=basedir$+".debug"
��tmpdir$=basedir$+".scratch"
��outdir$=basedir$+".spool"
��lindir$=outdir$+".local"
��outdir$(0)=outdir$+".mail"
��outdir$(1)=outdir$+".news"
���newsroot$>""�
���ensuredir(basedir$)
��ensuredir(confdir$)
��ensuredir(baddir$)
��ensuredir(workdir$)
�"�ensuredir(�dpath$))
�,�ensuredir(tmpdir$)
�6�ensuredir(outdir$)
�@�ensuredir(lindir$)
�J�ensuredir(outdir$(0))
�T�ensuredir(outdir$(1))
�^�
�h9ș"XOS_CLI","set Newsbase$Support "+nbdir$+".support"
�r-ș"XOS_CLI","set Newsbase$Data "+basedir$
�|/ș"XOS_CLI","set Newsbase$Config "+confdir$
��-ș"XOS_CLI","set Newsbase$Local "+lindir$
�� grpinfo$=basedir$+".grpinfo"
��!newgrp$=basedir$+".newgroups"
��lastng$=confdir$+".ngtime"
��lockfile$=basedir$+".lock"
��
�hgoff
���
��
����ensuredir(f$)
���t%:�f$>""�
��;  t%=�objtype(f$):�t%<2�t%>3��rw%�ș"XOS_File",8,f$�;t%
���
���
�
�ݤrename(s$,d$)
�*�F%:ș"XOS_FSControl",25,s$,d$�err%;F%
�&�(F%�1) �(!err%�&FF)=&C4 �
�0  F%=�delfile(d$)
�:(  ș"XOS_FSControl",25,s$,d$�err%;F%
�D�
�N=(F%�1)
�X
�bݤcopyfile(s$,d$)
�l�F%
�v#ș"XOS_FSControl",26,s$,d$ �;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)
��
��ݤforcedelfile(f$)
���F%:F%=�delfile(f$)
�.�F%<>0�closefilebyname(f$):F%=�delfile(f$)
�=F%
�
� ��wipe(f$)
�*ș"XOS_FSControl",27,f$,,3
�4�
�>
�Hݤfilesize(f$)
�R'�s%,F%:ș"XOS_File",17,f$�,,,,s%;F%
�\�(F%�1)�s%=-1
�f=s%
�p
�zݤfileattr(f$)
��%�s%:ș"XOS_File",17,f$�,,,,,s%;F%
���(F%�1)�s%=-1
��=s%
��
����closefilebyname(f$)
���a$,l%,r%,F%
���objtype(f$)<>1��
��f$=�canon(f$)
��5�l%=1�255:ș"XOS_Args",7,l%,tmp%,,,256�,,,,,r%;F%
��'�(F%�1)=0�a$=�str(tmp%):�a$=f$��#l%
���l%
���
��
���addtoindex(g%,n%)
��p%,p1%,lm%,lf%,ls%,lr%
�2�g%<>ibufg%�ibufptr%>=ibufsize%��writeindexbuf
�$8�grpa%(g%)>=0�grpa%(g%)+=1:� increment article total
�.p%=ibuf%+ibufptr%:$p%=null$
�8!p%=n%:p%!8=artdate%
�Bp%!12=0:p%!16=0:p1%=p%+20
�L� 3 cases:
�VH� 1 is, all of messid, from, subj, refs fit in 176 bytes (-> type 1)
�`K� 2 is, all of messid, from, subj fit; refs go separately (-> type 0+2)
�jP� 3 is, from & subj need truncating to fit; refs go separately (-> type 0+2)
�t�messid$=""�messid$="<0>"
�~(�subject$=""�subject$="(no subject)"
��!�from$=""�from$="(no sender)"
��9lm%=�messid$:lf%=�from$:ls%=�subject$:lr%=�reference$
���(lm%+lf%+ls%+lr%)<176�
��?  $p1%=messid$:$(p1%+lm%+1)=from$:$(p1%+lm%+lf%+2)=subject$
��,  $(p1%+lm%+lf%+ls%+3)=reference$:p%!4=1
��  ibufptr%+=200:ibufg%=g%
��  �
��  p%!4=0
��  �(lm%+lf%+ls%)<177�
��A    $p1%=messid$:$(p1%+lm%+1)=from$:$(p1%+lm%+lf%+2)=subject$
��	    �
��<    messid$=�messid$,60):$p1%=messid$:p1%=p1%+�messid$+1
�4    from$=�from$,40):$p1%=from$:p1%=p1%+�from$+1
�
'    $p1%=�subject$,176-(p%+20-p1%))
�    p1%?199=13
�  �
�(  ibufptr%+=200:ibufg%=g%
�2   �thread%<>0�reference$>""�
�<+    �ibufptr%>=ibufsize%��writeindexbuf
�F8    p%=ibuf%+ibufptr%:$p%=null$:!p%=n%:p%!4=2:p%!8=0
�P=    p%!12=0:p%!16=0:p%+=20:$p%=�reference$,176):p%?199=13
�Z    ibufptr%+=200
�d  �
�n�
�x�
��
����writeindexbuf
���p%,err%,F%
���ibufptr%=0�ibufg%=0��
���
��.  f1%=�openup(�notopath(ibufg%)+".~index")
��'  �f1%=0�f1%=�makeindexfile(ibufg%)
��  �f1%<>0�
��    p%=�#f1%
��4    ș"XOS_GBPB",1,f1%,ibuf%,ibufptr%,p%�err%;F%
��    �cf(f1%)
��  �
��  �(F%�1)�
�>    �(!err%�&FF)=&C6��checkdisk:�ș"OS_GenerateError",err%
�  �
�
�(F%�1)=0
�"ibufptr%=0
�,�
�6
�@ݤifile(g%)
�J=�notopath(g%)+".~index"
�T
�^ݤfindartid(g%,a$)
�h�g$,f%,f$,A$,r3%:f%=0
�r
�g%>0�
�|!  a$=�lower(a$):a$=�clean(a$)
��  f$=�ifile(g%)
��  f1%=�openin(f$)
��  �f1%<>0�
��  p%=0:�hgon
��  �
��/    ș"OS_GBPB",3,f1%,tmp%,200,p%�,,,r3%,p%
��0    A$=�lower(�str(tmp%+20)):�A$=a$�f%=!tmp%
��  �r3%>0�f%<>0
��  �cf(f1%):�hgoff
��  �
���
��=f%
��
�ݤmakeindexfile(g%)
�)�p$,f$:p$=�notopath(g%):f$=�ifile(g%)
��checkdisk
�&%�objtype(p$+".~x")<2��convrn(p$)
�0f1%=�openout(f$)
�:"�f1%=0��message1("Ifail",p$,1)
�D=f1%
�N
�Xݤfindfile(g%,n%,expand%)
�b�f$,d$,a$,o%,l$
�lf$="":a$=�"00000000"+�n%,8)
�v�g%=findg%�findp$>""�
��1  �objtype(findp$+"."+a$)=1�f$=findp$+"."+a$
���
���f$=""�
��  l$=�artdir(n%)
��   d$=�notopath(g%)+".~x."+l$
��  �
��    o%=�objtype(d$+"."+a$)
��    �o%=1�f$=d$+"."+a$
��7    �o%=0�o%=�objtype(d$+"."+l$):�o%=2 d$=d$+"."+l$
��  �f$>""�o%<2
��
  �f$=""�
��    d$=�notopath(g%)
��	    �
�       o%=�objtype(d$+"."+a$)
�      �o%=1�f$=d$+"."+a$
�7      �o%=0�o%=�objtype(d$+".~x"):�o%=2 d$=d$+".~x"
�     �f$>""�o%<2
�*  �
�4   �f$>""�findp$=d$:findg%=g%
�>�
�H"�f$>""�expand%��decompress(f$)
�R=f$
�\
�f%ݤdecompheader(ib%,ibs%,ob%,obs%)
�p�ws%,curslot%,n%,f%,size%
�z%ș"Squash_Decompress",8,ibs% �ws%
��*ș"Wimp_SlotSize",-1,-1�curslot%,n%,f%
���n%+f%>ws%�
��)  � take workspace in top of wimpslot
��'  ș"Wimp_SlotSize",curslot%+ws%,-1
��I  ș"Squash_Decompress",0,curslot%+&8000,ib%,ibs%,ob%,obs%�,,,,,size%
��  size%=obs%-size%
��#  ș"Wimp_SlotSize",curslot%,-1
���
��*� return size of data in output buffer
��
=size%
��
����decompress(� f$)
���r4%,s%,ns%,attr%,t$,F%
��filetype(f$)=&FCA �
�  �hgon
�
  �rw%=0�
�$?    F%=�copyfile(f$,"<Wimp$Scrap>"):�F%=0�f$="<Wimp$Scrap>"
�.  �
�8.  � get file attributes & set to RW access
�B<  ș"XOS_File",17,f$�,,,,s%,attr%:ș"XOS_File",4,f$,,,,3
�L  f1%=�openin(f$):r4%=0
�V8  �f1%<>0�ș"XOS_GBPB",4,f1%,tmp%,8�,,,,r4%:�cf(f1%)
�`
  �r4%>0�
�j    ns%=tmp%!4
�t&    �decompressfile(f$,s%,ns%)=0�
�~      t$=�tmpfile
��;      �runsupport("squash "+f$+" "+t$):s%=�filesize(t$)
��*      � test that the size is right...
��      �s%=ns%�
��.        �print("",�msg0("CompArt1"),"","")
��-        F%=�delfile(f$):F%=�rename(t$,f$)
��
        �
��4        �message0("CompFail2",0):F%=�delfile(t$)
��      �
��	    �
��	    �
��     �message0("CompFail1",0)
��  �
�&  � reset original file attributes
�
   ș"XOS_File",4,f$,,,,attr%
�  �hgoff
��
�(�
�2
�<��compress(f$,os%)
�F�r4%,ns%,t$,attr%,F%,art$
�P�os%<0�os%=�filesize(f$)
�Z�os%>complimit%�
�d-  art$=û(�leaf(f$)):�art$="0"�art$="..."
�n  �filetype(f$)=&FFF �
�x
    �hgon
��0    � get file attributes & set to RW access
��<    ș"XOS_File",17,f$�,,,,,attr%:ș"XOS_File",4,f$,,,,3
��'    � first try built-in routine...
��    �compressfile(f$)=0�
��*      �objtype(support$+".squash")=1�
��8        t$=�tmpfile:�runsupport("squash "+f$+" "+t$)
��!        f1%=�openin(t$):r4%=0
��>        �f1%<>0�ș"XOS_GBPB",4,f1%,tmp%,8�,,,,r4%:�cf(f1%)
��        �r4%>0�
��          ns%=tmp%!4
��          �os%=ns%�
��1            F%=�delfile(f$):F%=�rename(t$,f$)
��7            �print("",�msg1("CompArt2",art$),"","")
�            �
�            F%=�delfile(t$)
�          �
�"          �
�,          F%=�delfile(t$)
�6
        �
�@      �
�J      �
�T1      �print("",�msg1("CompArt3",art$),"","")
�^	    �
�h(    � reset original file attributes
�r"    ș"XOS_File",4,f$,,,,attr%
�|    �hgoff
��  �
���
���
��
��ݤcompressfile(� f$)
��3�ws%,wss%,curslot%,f%,size%,out%,last%,ok%,buf%
��;�ibuf%,ibufs%,obuf%,obufs%,left%,r1%,r2%,r3%,r4%,r5%,F%
��.�o%,l%,e%,s%,attr%,avail%,fast%,F%:fast%=�
���f2$
��� get file attributes
��#ș"XOS_File",17,f$�o%,,l%,e%,s%
��!ș"Squash_Compress",8,s%�wss%
��(ș"Wimp_SlotSize",-1,-1�curslot%,,f%
�5ibufs%=20+(s%�4*4+4):obufs%=ibufs%:avail%=f%-wss%
��avail%>&4000 �
�)  � calc available & needed memory...
�&  �(ibufs%+obufs%)>avail%�
�0/    ibufs%=avail%�2:obufs%=avail%�2:fast%=�
�:  �
�D  � now get the RAM...
�N6  ș"Wimp_SlotSize",curslot%+ibufs%+obufs%+wss%,-1
�X:  ws%=&8000+curslot%:ibuf%=ws%+wss%:obuf%=ibuf%+ibufs%
�b
  �fast%�
�l&    ș"XOS_File",16,f$,ibuf%,0�;F%
�v    �(F%�1)=0�
��P      ș"XSquash_Compress",0,ws%,ibuf%,s%,obuf%+20,obufs%-20�ok%,,,,last%;F%
��P      $obuf%="SQSH":obuf%!4=s%:obuf%!8=l%:obuf%!12=e%:obuf%!16=0:ok%=(ok%=0)
��,      �(F%�1)�ok%=0:� there was an error
��1      �ok%�ș"OS_File",0,f$,l%,e%,obuf%,last%
��	    �
��	    �
��    � slow procedure...
��    f1%=�openin(f$):ok%=0
��    �f1%>0�
��;      f2$=�tmpfile:f2%=�openout(f2$):ptr1%=0:started%=0
��      �f2%>0�
��/        � first write out squashfile header
��F        $obuf%="SQSH":obuf%!4=s%:obuf%!8=l%:obuf%!12=e%:obuf%!16=0
�&        ș"OS_GBPB",2,f2%,obuf%,20
�
        �
�E          ș"XOS_GBPB",3,f1%,ibuf%,ibufs%,ptr1%�,,,left%,ptr1%;F%
� E          r1%=ws%:r2%=ibuf%:r3%=ibufs%-left%:r4%=obuf%:r5%=obufs%
�*          �r3%>0�(F%�1)=0�
�4            �
�>5              r0%=started%-2*(left%=0):started%=1
�H[              ș"XSquash_Compress",r0%,ws%,r2%,r3%,obuf%,obufs%�ok%,,r2%,r3%,r4%,r5%;F%
�RB              �(F%�1)=0�ș"XOS_GBPB",2,f2%,obuf%,r4%-obuf%�;F%
�\            �ok%<2�(F%�1)>0
�f/            ptr1%-=r3%:� rewind unused data
�p          �
�z%        �(left%>0�ok%=0)�(F%�1)>0
��;        ok%=(ok%=0):�(F%�1)>0�ok%=0:� not okay if error
��        �cf(f2%)
��      �
��      �cf(f1%)
��      �ok%�
��.        F%=�delfile(f$):F%=�rename(f2$,f$)
��(        ș"OS_File",1,f$,l%,e%,attr%
��      �
��	    �
��  �
��#  ș"Wimp_SlotSize",curslot%,-1
��  �ok%��settype(f$,&FCA)
���
�� return success status
�=ok%
�
�$ ݤdecompressfile(f$,cs%,ds%)
�.+� cs% is comp size%, ds% is decomp size
�83�ws%,wss%,curslot%,f%,size%,out%,last%,ok%,buf%
�B.�o%,l%,e%,s%,attr%,avail%,fast%,F%:fast%=�
�L8�ibuf%,ibufs%,obuf%,obufs%,left%,r1%,r2%,r3%,r4%,r5%
�V�f2$
�`� variables are:
�j9� ws%,wss%                  are workspace base & size
�t<� ibuf%,ibufs%,obuf%,obufs% are input/output base & size
�~� get file attributes
��)ș"XOS_File",17,f$�o%,,l%,e%,s%,attr%
��(ș"Wimp_SlotSize",-1,-1�curslot%,,f%
��'ș"Squash_Decompress",8,cs%-20�wss%
��8avail%=f%-wss%:ibufs%=(cs%�4*4+4):obufs%=(ds%�4*4+4)
��.� need at least workspace+16k to work, ok?
���avail%>&4000 �
��)  � calc available & needed memory...
��  �(ibufs%+obufs%)>avail%�
��/    ibufs%=avail%�2:obufs%=avail%�2:fast%=�
��  �
��  � now get the RAM...
��9  ș"Wimp_SlotSize",curslot%+wss%+ibufs%+obufs%,-1,-1
�:  ws%=curslot%+&8000:ibuf%=ws%+wss%:obuf%=ibuf%+ibufs%
�

  �fast%�
�     � fast case (enough RAM)
�&    ș"XOS_File",16,f$,ibuf%,0�;F%
�(    �(F%�1)=0�
�2S      ș"XSquash_Decompress",0,ws%,ibuf%+20,cs%-20,obuf%,obufs%�ok%,,,,last%;F%
�<      ok%=(ok%=0)
�F;      �ok%�(F%�1)=0�ș"XOS_File",0,f$,l%,e%,obuf%,last%
�P	    �
�Z	    �
�d    � slow case...
�n    f1%=�openin(f$):ok%=0
�x    �f1%>0�
��<      f2$=�tmpfile:f2%=�openout(f2$):ptr1%=20:started%=0
��      �f2%>0�
��
        �
��E          ș"XOS_GBPB",3,f1%,ibuf%,ibufs%,ptr1%�,,,left%,ptr1%;F%
��E          r1%=ws%:r2%=ibuf%:r3%=ibufs%-left%:r4%=obuf%:r5%=obufs%
��          �r3%>0�(F%�1)=0�
��            �
��5              r0%=started%-2*(left%=0):started%=1
��]              ș"XSquash_Decompress",r0%,ws%,r2%,r3%,obuf%,obufs%�ok%,,r2%,r3%,r4%,r5%;F%
��B              �(F%�1)=0�ș"XOS_GBPB",2,f2%,obuf%,r4%-obuf%�;F%
��            �ok%<2�(F%�1)>0
��/            ptr1%-=r3%:� rewind unused data
��          �
�%        �(left%>0�ok%=0)�(F%�1)>0
�8        �cf(f2%):�(F%�1)>0�ok%=1:� not okay if error
�2        ok%=(ok%=0):�filesize(f2$)<>ds%�ok%=0
�"      �
�,      �cf(f1%)
�6      �ok%�
�@.        F%=�delfile(f$):F%=�rename(f2$,f$)
�J(        ș"OS_File",1,f$,l%,e%,attr%
�T      �
�^	    �
�h  �
�r&  ș"Wimp_SlotSize",curslot%,-1,-1
�|?  �ok%��settype(f$,&FFF):�print("",�msg0("CompArt4"),"","")
���
��� return success status
��=ok%
��
��ݤfirstart(g%)
�� �f1%,rebuild%,p$,f$,s%,a%,F%
��rebuild%=0
��(�grpf%(g%)<0�grpf%(g%)>�grpseq%(g%)�
��2  grpf%(g%)=0:p$=�notopath(g%):f$=p$+".~index"
��  f1%=�openin(f$)
��  �f1%<>0�
��/    !tmp%=0:ș"XOS_GBPB",3,f1%,tmp%,8,0�;F%
��!    �(F%�1)=0�grpf%(g%)=!tmp%
�4    �cf(f1%):�grpf%(g%)>�grpseq%(g%)�rebuild%=1
�	    �
�    rebuild%=1
�&  �
�0  �rebuild%>0�
�:d    �objtype(p$+".~x.~x*")>1��message1("Irebuild",grp$(g%),0):�reindex(grp$(g%)):�message("",0)
�D  �
�N3  � now estimate number of articles in group...
�X;  ș"XOS_File",17,f$�,,,,s%;F%:�(F%�1)=0�s%=s%�200�s%=0
�b4  a%=0:�grpf%(g%)>0�a%=�grpseq%(l1%)-grpf%(g%)+1
�l  �s%<a%�a%=s%
�v  grpa%(g%)=a%
���
��=�grpf%(g%)
��
�� ݤcheckmoderation(g$,force%)
��*�g1$,l$,m$,mg$,out$,l%,f%:f%=0:out$=""
��/� force% forces check in the actual file...
��.� first check internal list, if not force%
��0g$=�lower(g$):�print("",�msg0("Bmod"),g$,"")
��4�force%=1��g$,",")=0�:=�fastcheckmod(�clean(g$))
���force%=0�
��   l$=g$:�g1$=�getpar(l$,",")
��G    �g1$>""�l%=�nametono(g1$,0):�l%>0�f%=1:�grpmod%(l%)<>0 out$=g1$
��  �l$=""�out$>""
��
�� otherwise check the file
��out$=""��g$,",")>0�
� (  f3%=�openin(support$+".modgroups")
�*
  �f3%>0�
�4    �m$=�#f3%
�>      l$=g$:�
�H'        g1$=�clean(�getpar(l$,","))
�R.        �g1$>""��smatch(m$,g1$)>0�out$=g1$
�\(      �l$=""�out$>"":�poll(slice%*4)
�f    ��#f3%�out$>""
�p    �cf(f3%)
�z  �
���
��	=out$
��
��ݤfastcheckmod(g$)
��#�IFLEFT$(g$,6)="clari."THEN:=g$
��&f3%=�openin(support$+".modgroups")
���f3%>0�
��
  out$=""
��  �m$=�#f3%
��!    �smatch(m$,g$)>0�out$=g$
��  ��#f3%�out$>""
��  �cf(f3%)
���
�	=out$
�
���adddelbuf(g%,n%)
�$	�rw%�
�.B  �delbufptr%+4>delbufsize%�g%<>delbufg%��dodelindex(delbufg%)
�8
  �g%>0 �
�B7    delbuf%!delbufptr%=n%:delbufptr%+=4:delbufg%=g%
�L!    �grpa%(g%)>0�grpa%(g%)-=1
�V  �
�`�
�j�
�t
�~��dodelindex(g%)
��9�F$,T$,F%,p1%,p2%,r3%,addr%,s1%,l%,dbuf%,artno%,flag%
���curslot%,f%,ibsize%
�� �delbufptr%=0 �g%=0 �rw%=0��
���delbufptr%>0 �
��  delbuf%!delbufptr%=0
��2  �print("",�msg0("Iupdate"),"",""):�checkdisk
��9  F$=�ifile(g%):T$=basedir$+".~index":F%=�delfile(T$)
��*  ș"Wimp_SlotSize",-1,-1�curslot%,,f%
��:  ibsize%=(f%�200)*200:�ibsize%>&19000 �ibsize%=&19000
��C  ș"Wimp_SlotSize",curslot%+ibsize%,-1�l%:dbuf%=curslot%+&8000
��  �l%<curslot%+ibsize%�
��    �message0("Ibuffer",1)
�	    �
�
    f1%=�openin(F$)
�    �f1%=0�
�!      �message1("Iopen",F$,1)
�(      �
�2      f2%=�openout(T$)
�<      �f2%=0�
�F(        �cf(f1%):�message0("Itmp",1)
�P
        �
�Z2        F%=0:p1%=0:p2%=0:r3%=0:s1%=�#f1%:�hgon
�d        ȕr3%=0�(F%�1)=0
�nI          !dbuf%=0:ș"XOS_GBPB",3,f1%,dbuf%,ibsize%,p1%�,,,r3%,p1%;F%
�x$          �r3%<ibsize%�(F%�1)=0�
��          addr%=dbuf%
��%          �l%=1�(ibsize%-r3%)�200
��F            artno%=!addr%:flag%=0:�chkdelart%,artno%,delbuf%,flag%
��I            �flag%=0�!addr%>0�ș"OS_GBPB",1,f2%,addr%,200,p2%�,,,,p2%
��            addr%+=200
��S            �l%�10=0�s1%>0�ș"Hourglass_Percentage",((p1%+addr%-dbuf%)*100)�s1%
��          �l%
��          �
��
        �
��$        �hgoff:�cf(f1%):�cf(f2%)
��        grpf%(g%)=-1
��/        F%=�delfile(F$):F%=�movefile(T$,F$)
��        delbufptr%=0
�      �
�	    �
�  �
�"#  ș"Wimp_SlotSize",curslot%,-1
�,�
�6�
�@
�J��expgroup(g$,pto%)
�T�l1%:l1%=0
�^�l1%+=1
�h8  �smatch(g$,grp$(l1%))<>0��expiregroup(l1%,pto%,1)
�r  �cancel%��g$,"*")>0�
�|=    �confirm(�msg1("Ccancexp",g$))=2�cancel%=0�cancel%=�
��  �
���l1%=groups%�cancel%<>0
���
��
����reindex(g$)
���w%,l1%:w%=0
���rw%��busyon("Bindex")=0�
��&  �log("Rebuilding index for "+g$)
��  �l1%=1�groups%
��0    �smatch(g$,grp$(l1%))<>0��genindex(l1%)
��
  �l1%
��  �busyoff
���
��
�
���genindex(ng%)
�&K�aC%,f$,A$,p$,a%,loc%,nobuf%,nobufsize%,nobufptr%,nbr%,pc%,lpc%:lpc%=-1
�0�active(grp$(ng%))=0 �
�:�checkdisk:�adddelbuf(0,0)
�D=nobufsize%=12*1024:nbr%=�claim(nobuf%,nobufsize%,"index")
�N%�nbr%=0��message0("Greindex",0):�
�X=nobufptr%=0:p$=�path(grp$(ng%)):F%=�delfile(p$+".~index")
�b<�print(�msg0("Ibuild"),�msg1("Glast",grp$(ng%))," "," ")
�lf$=�notopath(g%)".~index"
�v+F%=�delfile(f$):ș"XOS_File",11,f$,&FFD
���genindexdir(p$,ng%)
��(ș"OS_HeapSort",nobufptr%�4,nobuf%,1
���nobufptr%>4 �
��  grpf%(ng%)=!nobuf%
��*  grpseq%(ng%)=�(nobuf%!(nobufptr%-4))
��  grpa%(ng%)=nobufptr%�4
��  �
��  grpf%(ng%)=0:grpa%(ng%)=0
���
��	pc%=0
���loc%=0�(nobufptr%-4)�4
��,  �nobufptr%>0 �pc%=(loc%*100)�nobufptr%
��}  �pc%<>lpc%��print("",�msg0("Iread"),�msg3("Idone",�(loc%�4),�(nobufptr%�4),�pc%),""):�gact(�msg1("Iper",�pc%)):lpc%=pc%
�  a%=nobuf%!loc%
�  f$=�findfile(ng%,a%,�)
�%  �f$>""�processheader(f$,ng%,a%)
�   �poll(slice%*2)
�*	�loc%
�4!�release(nbr%):�writeindexbuf
�>/�gact(""):�print(�msg0("Done")," "," "," ")
�H�
�R
�\��processheader(f$,ng%,a%)
�f�getheaderinfo(f$)<>0�
�p7  �specialgrp(grp$(ng%))��grp$(ng%),"outgoing")>0�
�z8    from$=to$:��grp$(ng%),4)="news"�from$=newsgroup$
��  �
��  �addtoindex(ng%,a%):a%=0
���
���
��
��ݤgetheaderinfo(f$)
��,�r4%,A$,pos%,ok%,mem%,mbr%,len%,t%:ok%=0
���clearheader
��t%=�filetype(f$)
��
len%=2048
��	Ȏt%�
��-  �&FCA:mbr%=�claim(mem%,len%*2,"header")
��+  �&FFF:mbr%=�claim(mem%,len%,"header")
�  :mem%=0
��
��mem%>0�
�$  f1%=�openin(f$):�f1%>0�
�.    �t%=&FCA �
�86      ș"OS_GBPB",3,f1%,mem%+len%,len%,20 �,,,,r4%
�B      �r4%>20�
�L.        �print("",�msg0("CompHead"),"","")
�V9        r4%=�decompheader(mem%+len%,r4%-20,mem%,len%)
�`      �
�j      �
�t.      ș"OS_GBPB",4,f1%,mem%,len% �,,,,r4%
�~	    �
��    �cf(f1%)
��    �r4%>0�
��      pos%=0:ok%=1
��'      �A$="":� next line was < len%
��        �pos%+254<len%�
��,          A$=�str(mem%+pos%):pos%+=�A$+1
��
        �
��        �setheadervar(A$)
��      �A$=""
��	    �
��  �
��  �release(mbr%)
��
�
=ok%
�
���genindexdir(p$,g%)
�(4�dloop%,n%,f%,f$,t%,r3%,addr%,v%,g$,dirbuf%,dbr%
�28n%=0:g$=grp$(g%):dbr%=�claim(dirbuf%,dbsize%,"dbuf")
�<2�poll(slice%*4):�gact(�msg1("Glast",grp$(g%)))
�F�
�P=ș"XOS_GBPB",10,p$,dirbuf%,20,n%,dbsize%,"*"�,,,r3%,n%;F%
�Z�(F%�1)�r3%=0:n%=-1
�d�r3%>0�
�n  addr%=dirbuf%
�x  �dloop%=1�r3%
��#  t%=addr%!16:f$=�str(addr%+20)
��  v%=�f$
��  Ȏt%�
��    �1:
��        �v%>0�
��M        �nobufptr%<(nobufsize%-4)�nobuf%!nobufptr%=v%:nobufptr%+=4 �n%=-1
��
        �
��2    �2,3:�f$,1)="~"�genindexdir(p$+"."+f$,g%)
��  �
��%  addr%=addr%+(24+�f$)��3:�dloop%
���
��
�n%=-1
���release(dbr%)
��
�
�
��hgon
�"ș"Hourglass_On"
�,�
�6
�@��hgoff
�Jș"Hourglass_Off"
�T�
�^
�h��receive(q%)
�r�s1$,s2$,w%,i%,to%,ref%
�|w%=q%!20:i%=q%!24
��
Ȏq%!16 �
��  �0:�checkquit ��finish:�
��X  �2:�q%!12=dragref%�q%!36<>-1��makenewsdir(�str(q%+44)):dragref%=0:�closew(savend%)
��  �3:s1$=�str(q%+44):
��&    �w%=gsetup%�i%=16�q%!40=&2000�
��Q    �s1$<100�updateiconstring(gsetup%,16,s1$):�setcaret(gsetup%,16,�s1$):��7
��	    �
��     �w%=uwin%�(i%=16�i%=17)�
��"    �newvac(�ic_str(w%,0),s1$)
��	    �
��5  �&502:to%=q%!4:ref%=q%!8:s1$=�help(q%!32,q%!36)
��  �s1$>""�
��M    q%!16=&503:q%!12=ref%:$(q%+20)=s1$:q%?(20+�s1$)=0:!q%=((25+�s1$)�4)*4
�'    ș"XWimp_SendMessage",17,q%,to%
�  �
�8  �&400C2:s1$=�str(q%+28):�s1$=myname$�q%!4<>task% �
�&>    !q%=20:q%!16=0:q%!12=0:ș"Wimp_SendMessage",17,q%,q%!4
�0	    �
�:  �&400C3:�rmcl(q%!4)
�DF  �&400C9:�release(menudataref%):�release(indmenuref%):infoopen%=�
�N  �nbcom%:
�X.    s1$=�str(q%+&20):s2$=�str(q%+&21+�s1$)
�b:    �nbcommand(q%!4,q%!8,q%!&14,q%!&18,q%!&1C,s1$,s2$)
�l�
�v�
��
��ݤhelp(w%,i%)
��
�A$,P$
��	Ȏw%�
��  �-2:A$="Hbar"
��  �msetup%:
��    Ȏ(i%�5)�
��      �0:A$="Hsite"
��      �1:A$="Hgen"
��      �2:A$="Htrans"
��      �3:A$="Hgrps"
��      �4:A$="Husers"
��      �5:A$="Hfilt"
�	    �
�  �sitewin%:
�
    Ȏi%�
�       �0:A$="HShost"
�*      �1:A$="HSmail"
�4      �2:A$="HSrem"
�>      �3:A$="HSorg"
�H      �4,11:A$="HStr"
�R      �14,15:A$="HStz"
�\      �5:A$="HSinit"
�f      �16:A$="Hcancel"
�p      �6:A$="Hsave"
�z      :A$="HSgen"
��	    �
��  �gsetup%:
��
    Ȏi%�
��      �11:A$="HMauto"
��      �3:A$="HMfast"
��      �9:A$="HMkeep"
��      �7:A$="HMrr"
��      �6:A$="HMlog"
��      �8:A$="HMcomp"
��      �23:A$="HMcomp2"
��      �1,2:A$="HMmodp"
��      �20:A$="HMgate1"
��      �18,19:A$="HMgate2"
�!      �10,12,13,14:A$="HMann"
�      �16.21:A$="HMdef"
�      �25,26:A$="HMmindsk"
�$      :A$="HMgen"
�.	    �
�8  �trwin%:
�B
    Ȏi%�
�L      �0,1:A$="HTname"
�V      �3:A$="HTrem"
�`      �4:A$="HTset"
�j      :A$="HTgen"
�t	    �
�~  �gwin%:P$=�ic_str(w%,25)
��
    Ȏi%�
��      �2,14:A$="HGdef"
��      �22,24:A$="HGhist"
��      �18:A$="HGscan"
��      �26:A$="HGnew"
��      �33:A$="HGexph"
��      �27:A$="HGcanc"
��      �28:A$="HGchef"
��      �34:A$="HGthread"
��      �29:A$="HGauto"
��      �30:A$="HGexpn"
��      �31:A$="HGexpb"
�      �36,35,41:A$="HGexpt"
�
      �19,25:A$="HGname"
�      �1,15:A$="HGtime"
�      �16:A$="HGmod"
�(      �5,6,12:A$="HGtype"
�2      �7:A$="HGadd"
�<      �8:A$="HGrem"
�F      �17:A$="HGdel"
�P      �10:A$="HGinfo"
�Z      �9:A$="HGind"
�d      �11:A$="HGdoexp"
�n      �32:A$="Hsave"
�x      :A$="HGgen"
��	    �
��
  �uwin%:
��
    Ȏi%�
��      �1,20:A$="HUname"
��      �2,15:A$="HUgrp"
��      �21:A$="HUvac"
��      �17:A$="HUvset"
��      �18:A$="HUedit"
��      �19:A$="HUclear"
��      �13:A$="HUfwd"
��      �6:A$="Hcancel"
��      �7:A$="Hsave"
��      :A$="HUgen"
�	    �
�
  �fwin%:
�
    Ȏi%�
�"      �22:A$="HFnew"
�,      �21:A$="HFdel"
�6      �20:A$="HFset"
�@      �1:A$="HFtype"
�J)      �2,3,4,5,6,7,8,9,10:A$="HFcond"
�T      �15,16:A$="HFact"
�^      :A$="HFgen"
�h	    �
�r  �status%:A$="Hstatus"
�|  :A$="Hany"
���
���A$>""�
��  A$=�msg1(A$,P$)
���
��=A$
��
����setcaret(w%,i%,n%)
��,ș"XWimp_SetCaretPosition",w%,i%,,,-1,n%
���
��
����losecaret
��!ș"XWimp_SetCaretPosition",-1
���
�
���makenewsdir(f$)
��f1$,d$,n%,next%,err%
�&�ensuredir(f$)
�0�objtype(f$)>1�
�:  d$=support$+".newsdir.*"
�D&  ș"OS_FSControl",26,d$,f$+".*",3
�N%  ș"XWimp_StartTask",f$+".!boot"
�X  �createdirs
�b  �
�l  �message0("Mdirfail",1)
�v�
���
��
��!��nbupdate(type%,g$,n%,f$,s$)
���nclient%>0�type%=11�
��  Ȏtype%�
��&    �0:f$="L1":�delok(g$)�f$="L0"
��&          �nbupd(type%,0,g$,f$,"")
��%    �1,5:�nbupd(type%,0,g$,"","")
��$    �4:�nbupd(type%,n%,g$,"","")
��&    �2,3:�nbupd(type%,n%,g$,f$,s$)
��$    �10:�nbupd(type%,0,"","","")
��5    �11:�nbupd(type%,n%,trans$(transport%),"","")
��  �
��
��
�
� ݤcheckquit
�*�ok%
�4�indebatch%=0�
�>  ok%=�
�H  �
�R&  ok%=(�confirm(�msg0("Cquit"))=1)
�\�
�f=ok%
�p
�z7��nbcommand(nbfrom%,nbref%,com%,p1%,p2%,str$,str2$)
���startupok%�
��  �busy$=""�
��*    �findcl(nbfrom%)<0�addcl(nbfrom%)
��+    �com%<500�arropen%��closew(arrive%)
��-    �writeindexbuf:� ensure up-to-date...
��    Ȏcom%�65536�
��,      �0:�nbstartup(com%,nbfrom%,nbref%)
��D      �10:�nbreply(nbfrom%,nbref%,com%,0,0,"",""):�rmcl(nbfrom%)
��0      �20:�setuser(com%,nbfrom%,nbref%,str$)
��2      �30:�nbsiteinfo(com%,nbfrom%,nbref%,p1%)
��G      �100:�adddelbuf(0,0):�sendgrouplist(com%,nbfrom%,nbref%,str$)
��9      �110:�newgrouplist(com%,nbfrom%,nbref%,p1%,p2%)
��5      �120:�addgroupcom(com%,nbfrom%,nbref%,str$)
�5      �130:�delgroupcom(com%,nbfrom%,nbref%,str$)
�7      �140:�expgrpcom(com%,nbfrom%,nbref%,str$,p1%)
�C      �200,210:�sendindexlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
�$9      �220:�sendartname(com%,nbfrom%,nbref%,str$,p1%)
�.A      �230,240:�lockartlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
�8<      �250:�delartlist(com%,nbfrom%,nbref%,str$,p1%,p2%)
�BD      �260,270:�folderop(com%,nbfrom%,nbref%,str$,str2$,p1%,p2%)
�L9      �280:�cancelart(com%,nbfrom%,nbref%,str$,str2$)
�V<      �300,310:�clientsendfile(com%,nbfrom%,nbref%,str$)
�`3      �400:�listusers(com%,nbfrom%,nbref%,str$)
�j1      �410:�adduser(com%,nbfrom%,nbref%,str$)
�t1      �420:�deluser(com%,nbfrom%,nbref%,str$)
�~C      �450:�rw%��setforward(com%,nbfrom%,nbref%,str$,str2$,p1%)
��D      �460:�rw%��setvacation(com%,nbfrom%,nbref%,str$,str2$,p1%)
��      �900:srflag%=0
��=      :�nbcomfail(nbfrom%,nbref%,com%,9,�msg0("Badcom"))
��	    �
��	    �
��=    �nbcomfail(nbfrom%,nbref%,com%,2,�msg1("Busy",busy$))
��  �
���
���
��
��.��setforward(com%,nbfrom%,nbref%,u$,f$,a%)
���u%,a$:u%=�userno(u$)
�
�u%>0�
�
  Ȏa%�
�    �0:a$=userf$(u%)
�;    �1:userf$(u%)=f$:�setuwin(u$):�saveuserinfobyno(u%)
�(;    �2:userf$(u%)="":�setuwin(u$):�saveuserinfobyno(u%)
�2  �
�<.  �nbreply(nbfrom%,nbref%,com%,a%,0,u$,a$)
�F  �
�P6  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Ufail"))
�Z�
�d�
�n
�x/��setvacation(com%,nbfrom%,nbref%,u$,p$,a%)
��6�u%,a$,f$:u%=�userno(u$):f$=�upath(u$)+".vacation"
��
�u%>0�
��  Ȏa%�
��&    �0:�objtype(f$)=1�a$=f$�a$=""
��D    �1:�objtype(p$)=1�F%=�delfile(f$):F%=�copyfile(p$,f$):a$=f$
��     �2:F%=�delfile(f$):a$=""
��  �
��.  �nbreply(nbfrom%,nbref%,com%,a%,0,u$,a$)
��  �
��6  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Ufail"))
���
���
��
�$��nbstartup(com%,nbfrom%,nbref%)
�;�nbreply(nbfrom%,nbref%,com%,100*�ver$,userctrl%,"","")
��
�"
�,!��setuser(com%,id%,nbref%,a$)
�6�l%
�@>�userok(a$)=0�nbcomfail(id%,nbref%,20,1,�msg0("Ufail")):�
�Jl%=�findcl(id%)
�T�l%>-1�
�^9  cl_user$(l%)=a$:�nbreply(id%,nbref%,com%,0,0,a$,"")
�h  �
�r4  �nbcomfail(id%,nbref%,com%,1,�msg0("Clunreg"))
�|�
���
��
����addcl(id%)
���l%
��%ȕcl_id%(l%)<>0�l%<maxcl%:l%+=1:�
��C�cl_id%(l%)=0�cl_id%(l%)=id%:nclient%+=1:��message0("Clfull",0)
���
��
��ݤfindcl(id%)
���l%
��'ȕcl_id%(l%)<>id%�l%<maxcl%:l%+=1:�
���cl_id%(l%)<>id%�l%=-1
��=l%
�
���rmcl(id%)
��l%:l%=�findcl(id%)
�&/�l%>=0�cl_id%(l%)=0:�nclient%>0�nclient%-=1
�0�
�:
�D.��nbreply(fid%,ref%,code%,p1%,p2%,s1$,s2$)
�Nq%!12=ref%:q%!16=nbrep%
�X&q%!&14=code%:q%!&18=p1%:q%!&1C=p2%
�b*$(q%+&20)=s1$+�0:$(q%+&21+�s1$)=s2$+�0
�l!q%=4+(&22+�s1$+�s2$)�4*4
�v#ș"Wimp_SendMessage",17,q%,fid%
���
��
��6��nblongreply(fid%,ref%,code%,p1%,p2%,p3%,s1$,s2$)
��q%!12=ref%:q%!16=nbrep%
��1q%!&14=code%:q%!&18=p1%:q%!&1C=p2%:q%!&20=p3%
��*$(q%+&24)=s1$+�0:$(q%+&25+�s1$)=s2$+�0
��!q%=4+(&26+�s1$+�s2$)�4*4
��#ș"Wimp_SendMessage",17,q%,fid%
���
��
��7��nblongreply2(fid%,ref%,code%,p1%,p2%,s1$,s2$,s3$)
��q%!12=ref%:q%!16=nbrep%
��&q%!&14=code%:q%!&18=p1%:q%!&1C=p2%
�E$(q%+&20)=s1$+�0:$(q%+&21+�s1$)=s2$+�0:$(q%+&22+�s1$+�s2$)=s3$+�0
�"!q%=4+(&23+�s1$+�s2$+�s3$)�4*4
�#ș"Wimp_SendMessage",17,q%,fid%
� �
�*
�4"��nbupd(code%,p1%,s1$,s2$,s3$)
�>q%!12=0:q%!16=nbupd%
�Hq%!&14=code%:q%!&18=p1%
�R$(q%+&20)=s1$+�0
�\$(q%+&21+�s1$)=s2$+�0
�f$(q%+&22+�s1$+�s2$)=s3$+�0
�p!q%=256
�z ș"Wimp_SendMessage",17,q%,0
���
��
��)��nbcomfail(nbfrom%,nbref%,c%,c1%,A$)
��;c%=(c%�10)*10+c1%:�nbreply(nbfrom%,nbref%,c%,0,0,A$,"")
���
��
��)��nbsiteinfo(com%,nbfrom%,nbref%,p1%)
���a$
��
Ȏp1%�
��  �0:a$=hostname$
��  �1:a$=org$
��  �2:a$=trans$(transport%)
��?  �3:a$=�varval("Newsbase$TransportType"):�a$=""�a$="batch"
�  �4:a$=timezone$
�  �5:a$=remotehost$
�  �6:a$=mailname$
�$  �100:a$=�userctrl%
�.  �101:a$=�defexp%
�8�
�B-�nbreply(nbfrom%,nbref%,com%,p1%,0,a$,"")
�L�
�V
�`,��sendgrouplist(com%,nbfrom%,nbref%,g1$)
�j3�l1%,g2$,cnt%,arts%,arts2%,flg$,F%,t%,s%,first%
�t%�print("",�msg0("Glist")," "," ")
�~�l1%=1�groups%
��  �gmatch(g1$,l1%) �
��3    g2$=grp$(l1%):arts%=0:first%=�firstart(l1%)
��(    flg$="L1":�delok(g2$)�flg$="L0"
��S    �nblongreply(nbfrom%,nbref%,com%,first%,�grpseq%(l1%),�grpa%(l1%),g2$,flg$)
��)    cnt%+=1:�cnt%�6=0 �poll(slice%*2)
��  �
���l1%
��+�nbreply(nbfrom%,nbref%,com%,0,0,"","")
���
��
��/��newgrouplist(com%,nbfrom%,nbref%,p1%,p2%)
���lastd%,lastt%,a$,c%
�%�print("",�msg0("Glist")," "," ")
�
f1%=�openin(newgrp$)
��f1%=0�
�7  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("NGnone"))
�(  �
�2  lastd%=0:lastt%=0:c%=0
�<  �a$=�#f1%
�F    �a$,1)="#"�
�P,      lastd%=��a$,3,6):lastt%=��a$,10,6)
�Z      �
�dH      �lastd%>p1%�lastt%>p2%��nbreply(nbfrom%,nbref%,com%,0,0,a$,"")
�n&      c%+=1:�c%�10=0��poll(slice%)
�x	    �
��  ��#f1%
��+�nbreply(nbfrom%,nbref%,com%,0,0,"","")
���
���
��
��*��addgroupcom(com%,nbfrom%,nbref%,g1$)
���r$
���addgrp(g1$,r$)�
��-  �nbreply(nbfrom%,nbref%,com%,0,0,r$,"")
��  �
��*  �nbcomfail(nbfrom%,nbref%,com%,1,r$)
���
���
�
�ݤaddgrp(g$,� r$)
��r%
�"g$=�clean(g$)
�,#r$=�msg0("Readonly"):�rw%=0�:=0
�6.r$=�msg0("Gbad"):�g$,",")>0��g$," ")>0�=0
�@#r$=�msg0("Gneg"):�g$,1)="!"�=0
�J'r$=�msg0("Gact"):�active(g$)<>0�=0
�T$r%=�runtransportfile(9,"",g$,"")
�^%r$=�varval("Newsbase$ReturnInfo")
�h	Ȏr%�
�rP  �0:�runtransportfile(14,"","","")=0��readnewsrc:�log(�msg1("Laddgrp",g$))
�|�
��=(r%=0)
��
��*��delgroupcom(com%,nbfrom%,nbref%,g1$)
���r$
���delgrp(g1$,r$)�
��-  �nbreply(nbfrom%,nbref%,com%,0,0,r$,"")
��  �
��*  �nbcomfail(nbfrom%,nbref%,com%,1,r$)
���
���
��
��ݤdelgrp(g$,� r$)
���grpdel%,l1%,F%,p$,g1$
�g$=�clean(g$)
�#r$=�msg0("Readonly"):�rw%=0�:=0
�.r$=�msg0("Gbad"):�g$,",")>0��g$," ")>0�=0
�&#r$=�msg0("Gneg"):�g$,1)="!"�=0
�0)r$=�msg0("Gnotact"):�active(g$)=0�=0
�:.r$=�msg0("Gspecial"):�specialgrp(g$)>0�=0
�D*grpdel%=�runtransportfile(10,"",g$,"")
�N%r$=�varval("Newsbase$ReturnInfo")
�X�grpdel%=0�
�b  �log(�msg1("Lrmgrp",g$))
�l3  �runtransportfile(14,"","","")=0��readnewsrc
�v/  �confirm(�msg0("Gremove"))=1��delgrp(g$)
���
��=(grpdel%=0)
��
����delgrp(g$)
���l1%,F%,g1$,p$
���busyon("Bdel")=0�
��   l1%=0:ȕl1%<groups%:l1%+=1
��    �gmatch(g$,l1%) �
��%      g1$=grp$(l1%):p$=�path(g1$)
��%      F%=�expiredir(p$,l1%,0,�,0)
��9      �objtype(p$+".~x")=0��objtype(p$+".~index")=0�
��=        F%=�delfile(p$+".~index"):F%=�delfile(p$+".~seq")
��        F%=�delfile(p$)
�5        F%=0:ȕF%=0:p$=�dir(p$):F%=�delfile(p$):�
�;        l1%-=1:�rmgrplist(g1$):�nbupdate(1,g1$,0,"","")
�&        �log(�msg1("Ldelgrp",g1$))
�       �
�*	    �
�4  �
�>  �busyoff
�H�
�R�
�\
�f+��expgrpcom(com%,nbfrom%,nbref%,g1$,p%)
�p+�nbreply(nbfrom%,nbref%,com%,0,0,"","")
�z�rw%��expgroup(g1$,0)
���
��
��4��sendindexlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
��F�fptr%,imem%,ibr%,r3%,u%,u$,art%,imp%,aloop%,endl%,rectype%,total%
���rcom%,route%,ifile$
��H� local f6% filehandle not really desirable but permits re-entrancy.
���f6%
���A$,B$,C$,D$
��"�adddelbuf(0,0):�n2%=0�n2%=1E6
��.rcom%=com%�65536:route%=65536*(com%�65536)
��%�userctrl%<>0��specialgrp(g1$)=2�
��9  u%=�findcl(nbfrom%):�u%>=0�u%=�userno(cl_user$(u%))
��  �u%>0�
�%    u$="email."+�lower(user$(u%))
�[    �u$<>��lower(g1$),�u$)�ugrp%(u%)>9��nbcomfail(nbfrom%,nbref%,c%,1,�msg0("Gdeny")):�
�  �
�$�
�.ifile$=�path(g1$)+".~index"
�8f6%=�openin(ifile$)
�B�f6%=0�
�L  �objtype(ifile$)=1�
�V"  �message1("Ireadfail",g1$,1)
�`  �
�j/  �message1("Irebuild",g1$,0):�reindex(g1$)
�t  �message("",0)
�~  f6%=�openin(ifile$)
��  �
���
���f6%<>0�
��
  fptr%=0
��(  �rcom%=200�A$="Alist1"�A$="Alist2"
��"  �print("",�msg0(A$)," "," ")
��-  ibr%=�claim(imem%,4000,"list"):�ibr%>0�
��  �
��D    !imem%=0:ș"XOS_GBPB",3,f6%,imem%,4000,fptr%�,,,r3%,fptr%;F%
��    �(F%�1)�
��,      �message1("Ireadfail",g1$,1):r3%=1
��      �
�)      imp%=imem%:endl%=(4000-r3%)�200
�
$      �aloop%=1�endl%:art%=!imp%
�(      �(art%>=n1%�art%<=n2%)�art%>0�
�7        imp%?199=0:A$=�str(imp%+20):rectype%=imp%!4
�(        Ȏrectype%�
�2<        �1:B$=�str(imp%+21+�A$):C$=�str(imp%+22+�A$+�B$)
�<4          D$=�str(imp%+23+�A$+�B$+�C$):total%+=1
�FK          �nblongreply2(nbfrom%,nbref%,200+route%,art%,imp%!8,B$,C$,A$)
�PC          �rcom%=210��nbreply(nbfrom%,nbref%,com%,art%,0,D$,"")
�ZD        �2:�rcom%=210��nbreply(nbfrom%,nbref%,com%,art%,0,A$,"")
�d"        :B$=�str(imp%+21+�A$)
�n0          C$=�str(imp%+22+�A$+�B$):total%+=1
�xK          �nblongreply2(nbfrom%,nbref%,200+route%,art%,imp%!8,B$,C$,A$)
��
        �
��      �
��)      imp%+=200:�aloop%:�poll(slice%)
��	    �
��  �r3%>0�art%>n2%
��3  �release(ibr%):grpa%(�nametono(g1$,0))=total%
��  �
��  �cf(f6%)
��3  �nbreply(nbfrom%,nbref%,200+route%,0,0,"","")
��  �
��   � no articles available...
��N  � used to use PROCnbcomfail(nbfrom%,nbref%,200+route%,2,FNmsg0("Anone"))
��3  �nbreply(nbfrom%,nbref%,200+route%,0,0,"","")
��
��
�
�",��sendartname(com%,nbfrom%,nbref%,g$,a%)
�, �f$,s%,f%,t%,info$:info$="L"
�6g%=�nametono(g$,0)
�@�g%>0�a%>0 �
�J,  f$=�findfile(g%,a%,�):t%=�filetype(f$)
�T  �t%=&FCA �
�^<    �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("CompFail3"))
�h	    �
�r    �f$>""�
�|+      s%=�filesize(f$):f%=�fileattr(f$)
��*      �(f%�8)<>0�info$+="1"�info$+="0"
��6      �nbreply(nbfrom%,nbref%,com%,a%,s%,f$,info$)
��      �
��L      �adddelbuf(g%,a%):�nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Afail"))
��	    �
��  �
��  �
��7  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Afail2"))
���
���
��
��2��lockartlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
���l%,g%,a$,f$,act$
�	�rw%�
�;  g%=�nametono(g1$,0):a$="R":act$="":n2%=�uplim(g%,n2%)
�&  �com%�65536=230a$+="L"�act$="un"
�&  �g%>0�
�0    �l%=n1%�n2%
�:@      f$=�findfile(g%,l%,�):�f$>""ș"XOS_FSControl",24,f$,a$
�D    �l%
�N/    �nbreply(nbfrom%,nbref%,com%,0,0,"","")
�X	    �
�b8    �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Gfail"))
�l  �
�v  �
��9  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Readonly"))
���
���
��
��1��delartlist(com%,nbfrom%,nbref%,g1$,n1%,n2%)
��
�l%,g%,f%
���delok(g1$)�
��  g%=�nametono(g1$,0)
��  �g%>0�
��'    f%=�firstart(g%):�n1%<f%�n1%=f%
��     n2%=�uplim(g%,n2%):�hgon
��8    �l%=n1%�n2%:�delart(g%,l%):�l%�10=0�poll(slice%)
��    �l%:�hgoff
�/    �nbreply(nbfrom%,nbref%,com%,0,0,"","")
�	    �
�8    �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Gfail"))
�   �
�*  �
�47  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Anodel"))
�>�
�H�
�R
�\��delart(g%,n%)
�f�f$
�pf$=�findfile(g%,n%,�)
�zF%=�delfile(f$)
���F%=0��artdeleted(g%,n%)
���
��
��3��folderop(com%,nbfrom%,nbref%,g1$,g2$,n1%,n2%)
���g1%,g2%,a%,f%,p$,F%,f$
����to$,from$,subject$,messid$,newsgroup$,expires%,artdate%,supersede$,receipt$,lasth%,control$,precedence$,replyto$,approved$,reference$,cc$,origto$
��	�rw%�
��  �specialgrp(g2$)<2�
��7    �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Gbad"))
��	    �
��:    g1%=�nametono(g1$,0):g2%=�nametono(g2$,�):�polloff
��    �g1%=0�g2%=0�
��:      �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Gfail"))
�      �
�      �hgon
�*      f%=�firstart(g1%):�n1%<f%�n1%=f%
�$/      n2%=�uplim(g1%,n2%):p$=�notopath(g2%)
�.      �p$>""�
�8        s%=�seq(g2%)
�B        �a%=n1%�n2%
�L,          f$=�findfile(g1%,a%,�):�f$>""�
�V'            �getheaderinfo(f$)<>0�
�`>              F%=�artcopy(g2%,s%,f$):�a%�5=0��poll(slice%)
�jE              �F%=0�com%�65536=260��delok(g1$)<>0��delart(g1%,a%)
�t            �
�~          �
��        �a%
��        �hgoff
��      �
��=      �nbreply(nbfrom%,nbref%,com%,0,0,�msg0("Amove"),"")
��	    �
��    �pollon
��  �
��  �
��<  �nbreply(nbfrom%,nbref%,com%,0,0,�msg0("Readonly"),"")
���
���
��
�*��cancelart(com%,nbfrom%,nbref%,g$,m$)
�
�r%,r$,u$,f$
�7r%=�findcl(nbfrom%):�r%<0�u$="news"�u$=cl_user$(r%)
�/r%=�m$,"@"):r$=��m$,r%+1)):�u$=""�u$="news"
�(3�log("Cancel request for "+m$+" from user "+u$)
�2�rw%�r$=hostname$�
�<*  f$=�tmpfile:f1%=�openout(f$):�f1%>0�
�F#    �#f1%,"Control: cancel "+m$
�P    �#f1%,"Newsgroups: "+g$
�Z0    �#f1%,"Path: "+hostname$+"!not-for-mail"
�d'    �#f1%,"From: "+u$+"@"+mailname$
�n(    �#f1%,"Subject: cmsg cancel "+m$
�x8    �#f1%,"Message-ID: <"+�id_date+"@"+hostname$+">"
��F    �#f1%,"Sender: news@"+hostname$+" (RISC OS Newsbase "+ver$+")"
��+    �org$>""�#f1%,"Organization: "+org$
��     �#f1%,"Date: "+�rfc_date
��)    �#f1%,"Approved: news@"+hostname$
��4    �#f1%,"Lines: 1":�#f1%,"":�#f1%,"cancel "+m$
��"    �cf(f1%):�settype(f$,&FFF)
��    r$=�sendnews(f$,"",u$)
��
    Ȏr$�
��5      �"":�nbreply(nbfrom%,nbref%,com%,0,0,"","")
��@      :�nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Anocancel"))
��	    �
��	    �
��8    �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Scrap"))
�  �
�  ș"XOS_CLI","remove "+f$
�  �
�":  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Anocancel"))
�,�
�6�
�@
�Jݤrfc_date
�T<=�ctime("%W3, %DY %M3 %CE%YR %24:%MI:%SE")+" "+timezone$
�^
�h
ݤid_date
�r)=�ctime("%CE%YR%MN%DY.%24%MI%SE.%CS")
�|
��ݤctime(a$)
��#�b%:?tmp%=3:ș"OS_Word",14,tmp%
��>ș"Territory_ConvertDateAndTime",1,tmp%,tmp%+128,128,a$�b%
��
=�str(b%)
��
��,��clientsendfile(com%,nbfrom%,nbref%,f$)
��%�r%,r$,d$,u%,u$,F%,info$,m%,rcom%
��(u%=�findcl(nbfrom%):rcom%=com%�65536
��#�u%>=0�u%=�userno(cl_user$(u%))
���u%<0�u%=0
��"u$=user$(u%):�settype(f$,&FFF)
��#�rw%�(upost%(u%)<>0�rcom%=310)�
��  �objtype(f$)=1 �
�D    m%=transm%(transport%,1):�rcom%=300�m%=transm%(transport%,1)
�    �freemem(0)<m%*1024�
�+      � spool file for later processing
�&0      r$=outdir$(0):�rcom%=300�r$=outdir$(1)
�00      �d$=r$+".nb"+ó(99999):��objtype(d$)=0
�:<      r$="":F%=�movefile(f$,d$):�F%<>0�r$=�msg0("Qfail")
�D      �
�N)      d$=�tmpfile:F%=�movefile(f$,d$)
�X      �F%<>0�d$=f$
�b      Ȏrcom%�
�lC        �300:info$=�keepfile(1,d$,u$):r$=�sendnews(d$,info$,u$)
�v=        �310:info$=�keepfile(0,d$,u$):r$=�sendmail(d$,u$)
��      �
��	    �
��
    Ȏr$�
��5      �"":�nbreply(nbfrom%,nbref%,com%,0,0,"","")
��0      :�nbcomfail(nbfrom%,nbref%,com%,1,r$)
��	    �
��	    �
��<    �nbcomfail(nbfrom%,nbref%,com%,1,�msg1("NoFile",f$))
��  �
��  �
��8  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Qnopost"))
���
���
�
�ݤsendnews(d$,g$,u$)
�3�r%,r$,local%,m$,approved%:local%=0:approved%=0
� #�g$)="!"�approved%=�:g$=�g$,2)
�*+r$=�checkgrpsline(g$,local%):�r$>""�=r$
�4&秤clean(g$)," ")>1�d$=�repost(d$)
�>%�print("",�msg0("Qpost")," "," ")
�H9�g$>""�local%=0�approved%=0�m$=�checkmoderation(g$,0)
�Rr%=0
�\�m$>""�local%=0�
�f$  r$=�remail(�moddest(m$),d$,u$)
�p  �
�z  �local%�
��    r$=�localnews(d$)
��	    �
��    �mngw%<>0�mngw$>""�
��      r$=�gateway(g$)
��      r$=�remail(r$,d$,u$)
��      �
��-      �log("Queuing article sent by "+u$)
��*      r%=�runtransportfile(2,d$,u$,"")
��8      �r%=0��nbupdate(11,"",1,"",""):F%=�delfile(d$)
��	    �
��  �
���
��,�r%<>0�r$=�varval("Newsbase$ReturnInfo")
�=r$
�
�ݤgateway(g$)
�$�n%,a$,b$,g1$
�.(a$=mngw$:g1$=�lower(�getpar(g$,","))
�8n%=�a$,"%")
�Bȕn%>0:b$=""
�L  Ȏ�a$,n%+1,1)�
�V    �"g":b$=g1$
�`:    �"G":b$="":�b$=b$+�getpar(g1$,"."):�g1$>""�b$+="-"
�j      �g1$=""
�t    �"%":b$="%"
�~  �
��)  a$=�a$,n%-1)+b$+�a$,n%+2):n%+=�b$-1
��  n%=�a$,"%",n%)
���
��=a$
��
��ݤsendmail(d$,u$)
��,�r%,r$:�print("",�msg0("Qsend")," "," ")
��$�log("Queuing mail sent by "+u$)
��$r%=�runtransportfile(1,d$,u$,"")
��U�r%<>0�r$=�varval("Newsbase$ReturnInfo")��nbupdate(11,"",0,"",""):F%=�delfile(d$)
��=r$
��
�ݤcheckgrpsline(g$,� l%)
�
�g1$,r$,w%:g$=�lower(g$)
� �g1$=�clean(�getpar(g$,","))
�D�g1$,9)="newsbase."�l%+=1�w%+=1:� l%=local groups, w%=worldwide
�(!�l%>0�w%>0�r$=�msg0("Qxpost")
�2^�g1$,6)="email."��g1$,7)="folder."��g1$,4)="junk"��g1$,7)="control"�r$=�msg1("Qbadg",g1$)
�<�g$=""�r$>""
�F=r$
�P
�Zݤlocalnews(f$)
�d
�r$,d$
�nd$=lindir$+".localnews"
�x$f1%=�openout(d$):f2%=�openin(f$)
���f1%>0�f2%>0�
��&  �#f1%,"#! rnews "+äfilesize(f$)
��'  �fcopy(f2%,f1%):�settype(d$,&FFF)
��  �
��  r$=�msg0("Qbatch")
���
���cf(f1%):�cf(f2%)
��=r$
��
��
ݤtmpfile
���f$
��	�rw%�
��1  �f$=tmpdir$+".tmp"+ó(9999):��objtype(f$)=0
�  �
�  f$="<Wimp$Scrap>"
��
�"=f$
�,
�6ݤmoddest(g$)
�@�g1$
�J,�g1$=g1$+�getpar(g$,"."):�g$>""�g1$+="-"
�T�g$="":g1$+="@"+modgw$
�^$�print("","",�msg0("Qmod1"),g1$)
�h=g1$
�r
�|ݤremail(to$,d$,u$)
���A$,f$,a$:f$=�tmpfile
��f1%=�openin(d$)
���f1%>0�
��  f2%=�openout(f$)
��
  �f2%>0�
��    �#f2%,"To: "+to$
��    �A$=�sget(f1%)
��/      �A$,4)="To: "��#f2%,"X-Originally-";
��#      �A$,5)<>"From "��#f2%,A$
��    �A$=""��#f1%
��2    �fcopy(f1%,f2%):�cf(f2%):�settype(f$,&FFF)
��	    �
��    �message0("Scrap",0)
�  �
�  �cf(f1%):F%=�delfile(d$)
��
�&=�sendmail(f$,u$)
�0
�:ݤrepost(d$)
�D�A$,B$,C$,f$,a$:f$=�tmpfile
�Nf1%=�openin(d$)
�X�f1%>0�
�b  f2%=�openout(f$)
�l
  �f2%>0�
�v    �A$=�sget(f1%)
��"      �A$,12)="Newsgroups: "�
��G        B$="Newsgroups: ":�r3%=13��A$:C$=�A$,r3%,1):�C$<>" "�B$+=C$
��        �r3%:A$=B$
��       �
��      �#f2%,A$
��    �A$=""��#f1%
��2    �fcopy(f1%,f2%):�cf(f2%):�settype(f$,&FFF)
��	    �
��)    f$=d$:� couldn't open scratchfile
��  �
��  �cf(f1%):F%=�delfile(d$)
��  �
��&  f$=d$:� couldn't open input file
��
�=f$
�
� ��fcopy(in%,out%)
�*�nbuf%,nbr%,r3%,F%:��#in%��
�4)nbr%=�claim(nbuf%,4096,"fcopy"):r3%=0
�>
�nbuf%>0�
�H>  ȕr3%=0�(F%�1)=0:ș"XOS_GBPB",4,in%,nbuf%,4096�,,,r3%;F%
�RA    �r3%<4096�(F%�1)=0�ș"XOS_GBPB",2,out%,nbuf%,4096-r3%�;F%
�\  �
�f  �
�p  ȕ��#in%:�#out%,(�#in%):�
�z�
���release(nbr%)
���
��
��ݤkeepfile(ty%,f$,� u$)
��(�p$,g$,g%,ret$,m$:m$=�msg0("Qkeep0")
����to$,from$,subject$,messid$,newsgroup$,expires%,artdate%,supersede$,receipt$,lasth%,control$,precedence$,replyto$,approved$,reference$,cc$,origto$
��(�getheaderinfo(f$)<>0�keepoutg%<>0�
��A  from$=�clean(from$):g$=from$:g%=�g$,"@"):�g%>0�g$=�g$,g%-1)
��5  u$=g$:u%=�userno(g$):�u%=0�u%=0:g$="postmaster"
��N  �approved$>""�newsgroup$="!"+newsgroup$:� flag approved arts for posting
��/  �(ukn%(u%)<>0�ty%=1)�(ukm%(u%)<>0�ty%=0)�
��    �g$>""�
��      Ȏty%�
�8        �0:g$="Email."+g$+".outgoing.mail":from$=to$
�>        :g$="Email."+g$+".outgoing.news":from$=newsgroup$
�      �
�$#      g%=�nametono(g$,�):�g%>0�
�.        p$=�notopath(g%)
�8        �p$>""�
�B/          s%=�seq(g%):F%=�artcopy(g%,s%,f$)
�LB          �F%<>0�writeindexbuf:��message(m$+�msg0("Qkeep1"),1)
�V          �
�`,          �message(m$+�msg0("Qkeep2"),1)
�j
        �
�t
        �
�~*        �message(m$+�msg0("Qkeep3"),1)
��      �
��      �
��(      �message(m$+�msg0("Qkeep4"),1)
��	    �
��  �
��  �
��5  �keepoutg%<>0��message(m$+�msg1("NoFile",f$),1)
���
���ty%=0�
��  ret$=to$
��5  �log("Sending mail from "+u$+" to "+�ret$,200))
��  �
�  ret$=newsgroup$
�
5  �log("Posting news from "+u$+" to "+�ret$,200))
��
�	=ret$
�(
�2ݤsget(h%)
�<8� return line from file without error if too long...
�F
�a$,C%
�P:ȕC%<>10��#h%=0:C%=�#h%:�a$<253�C%<>10�C%<>13:a$+=�C%
�Z�
�d=a$
�n
�x)��listusers(com%,nbfrom%,nbref%,str$)
���n%:n%=1
��ȕuser$(n%)>""
��Q  �nbreply(nbfrom%,nbref%,com%,ugrp%(n%),0,user$(n%),�upath(user$(n%))):n%+=1
���
��+�nbreply(nbfrom%,nbref%,com%,0,0,"","")
���
��
��'��adduser(com%,nbfrom%,nbref%,str$)
���adduser(str$)�
��-  �nbreply(nbfrom%,nbref%,com%,0,0,"","")
���
��7  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Unoadd"))
���
��
�
�'��deluser(com%,nbfrom%,nbref%,str$)
�"�deluser(str$)�
�,-  �nbreply(nbfrom%,nbref%,com%,0,0,"","")
�6�
�@7  �nbcomfail(nbfrom%,nbref%,com%,1,�msg0("Unodel"))
�J�
�T�
�^
�hݤuplim(g%,n%)
�r'�n%=0�n%>�grpseq%(g%):=�grpseq%(g%)
�|=n%
��
��ݤgmatch(g$,g%)
���g%>maxgroup%�=0
��=�smatch(g$,grp$(g%))
��
��ݤdelok(g$)
��(�rw%��delok%<>0��specialgrp(g$)>1�=�
��=�
��
��ݤspecialgrp(g$)
��g$=�clean(g$):g$=�lower(g$)
��"�g$="junk"��g$,7)="control"�=1
���g$,6)="email."�=2
��g$,7)="folder."�=3
��g$,9)="newsbase."�=1
�=0
�&
�0ݤpath(A$)
�:
�B$:B$=""
�D�A$>""��getpath%,A$,B$
�N=dpath$+B$
�X
�bݤlower(A$)
�l�A$>""�mklcase%,A$
�v=A$
��
��
ݤstr(a%)
���dummy%,B$
���getline%,dummy%,a%,B$
��=B$
��
��ݤsmatch(A$,B$)
��;� wild string match (case insensitive): pattern, string
���ok%
��#�A$>""�B$>""��smatch%,A$,B$,ok%
��	=�ok%
��
����loadcode
�
�l%,F%
�!l%=�filesize(resdir$+".code")
�
�l%>0�
�   �mcode% l%
�*=  cpylcase%=mcode%+4:getpath%=mcode%+8:getline%=mcode%+12
�4>  getlinez%=mcode%+16:getstr%=mcode%+20:mklcase%=mcode%+24
�>A  trimstr%=mcode%+28:chkdelart%=mcode%+32:headerno%=mcode%+36
�H  smatch%=mcode%+40
�R2  ș"XOS_File",16,resdir$+".code",mcode%,0�;F%
�\'  �(F%�1)��0,"Code file not found!"
�f  �
�p  �0,"Code file not found!"
�z�
���
��
����loadsysconf
���t$,p$,v$,m%,v%
��0addgrp%=20:mingrp%=40:maxusr%=20:maxfilt%=10
��Nmaxcl%=15:mincpu%=7:maxcpu%=15:minrma%=0:inbufsize%=16*1024:dbg_exptime%=3
��chktime%=1000
��,f1%=�openin(support$+".!nbsys"):�f1%<>0�
��  �t$=�#f1%:p$=""
��  m%=�t$," ")
��4  �m%>0�p$=�lower(�t$,m%-1)):v$=�t$,m%+1):v%=�v$
��  Ȏp$�
��$    �"add_grp":�v%>10�addgrp%=v%
�$    �"min_grp":�v%>10�mingrp%=v%
�#    �"max_usr":�v%>5�maxusr%=v%
�"    �"max_rdr":�v%>4�maxcl%=v%
�$)    �"min_cpu":�v%>5�v%<20�mincpu%=v%
�.)    �"max_cpu":�v%>5�v%<60�maxcpu%=v%
�82    �"deb_buf":�v%>3�v%<256�inbufsize%=v%*1024
�B(    �"dbg_exp":�v%>0�dbg_exptime%=v%
�L%    �"min_flt":�v%>10�maxfilt%=v%
�V(    �"chk_tim":�v%>5�chktime%=v%*100
�`  �
�j  ��#f1%:�cf(f1%)
�t�
�~%� cl_id%(maxcl%),cl_user$(maxcl%)
ˆ�
’
œ
ݤcpu(f%)
¦�f%=0�=-mincpu%
°
=-maxcpu%
º
��ݤclaim(� var%,size%,A$)
���F%,ret%
���dynarea% �
��C  � changed size_limit (r5), and flag bit 7 set (non-draggable)
��H  ș&20066,0,-1,size%,-1,128,size%,0,0,myname$+"_"+A$�,ret%,,var%;F%
�  �(F%�1)�var%=0:ret%=0
�  �
�
(  ș"XOS_Module",6,,,size%�,,var%;F%
�  �(F%�1)�var%=0
�  ret%=var%
�(�
�2	=ret%
�<
�F��release(� var%)
�P
�F%,s%
�Z�var%>0�
�d  �dynarea% �
�n  ș&20066,2,var%�,,s%;F%
�x/  �s%>0�(F%�1)=0�ș&20066,1,var%�;F%:var%=0
  �
Ì'  ș"XOS_Module",7,,var%�;F%:var%=0
Ö1  ș"XOS_ChangeDynamicArea",1,(-16*1024*1024)
à  �
ê�
ô�
þ
����tidydynareas
��
�A%,N%,P%
���dynarea% �
��  ș&66,3,-1�,A%
��  ȕA%<>-1
�    ș&66,2,A%�,,,,,,,,P%
�    ș&66,3,A%�,N%
�5    �str(P%),1+�myname$)=myname$+"_"�ș&66,1,A%
�
    A%=N%
�"  �
�,�
�6�
�@
�J��startmsgtrans
�T�f$:f$=�resfile("Messages")
�^,ș"XMessageTrans_FileInfo",,f$�,,buf%;F%
�h-�(F%�1)��0,"Couldn't find Messages file!"
�r�msgdesc%16,msgbuf% buf%
�|1ș"MessageTrans_OpenFile",msgdesc%,f$,msgbuf%
�
Đ
��endmsgtrans
Ĥ3�msgdesc%>0�ș"MessageTrans_CloseFile",msgdesc%
Į�
ĸ
��ݤmsg0(t$)
��
�s%,F%
��0ș"XMessageTrans_Lookup",msgdesc%,t$�,,s%;F%
���(F%�1)�s%=�msgfail(t$)
��
=�str(s%)
��ݤmsg1(t$,a$)
�
�s%,F%
�<ș"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$�,,s%;F%
��(F%�1)�s%=�msgfail(t$)
�
=�str(s%)
�&ݤmsg2(t$,a$,b$)
�0
�s%,F%
�:?ș"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$,b$�,,s%;F%
�D�(F%�1)�s%=�msgfail(t$)
�N
=�str(s%)
�Xݤmsg3(t$,a$,b$,c$)
�b
�s%,F%
�lBș"XMessageTrans_Lookup",msgdesc%,t$,tmp%,255,a$,b$,c$�,,s%;F%
�v�(F%�1)�s%=�msgfail(t$)
ŀ
=�str(s%)
Ŋ
Ŕݤmsgfail(t$)
Ş6�message("Failed to look up message token: "+t$,1)
Ũ$tmp%="notoken"
Ų	=tmp%
ż
����locknewsdir
���t%
��	�rw%�
��  t%=�lockval
��  �t%>0�
�    �taskexists(t%)�
�$      �0,�msg1("LockFail1",�~t%)
�      �
�/      �confirm(�msg1("LockFail3",�~t%))=1�
� B        �forcedelfile(lockfile$)=0�t%=0��0,�msg0("LockFail4")
�*
        �
�4        �finish:�
�>      �
�H	    �
�R  �
�\  �t%=0�
�f6    �diskspace(basedir$)<1000��0,"No disk space!"
�p    f5%=�openout(lockfile$)
�z    �f5%>0�
Ƅ      �#f5%,�task%:�cf(f5%)
Ǝ      �
Ƙ      �0,�msg0("LockFail2")
Ƣ	    �
Ƭ  �
ƶ�
��
��
��
ݤlockval
���r%:r%=0
��4f1%=�openin(lockfile$):�f1%>0�r%=��#f1%:�cf(f1%)
��=r%
�
���checklock
�	�rw%�
�  �lockval<>task%�
�$7    �message0("LockFail0",1):startupok%=0:�finish:�
�.  �
�8�
�B�
�L
�V��unlocknewsdir
�`	�rw%�
�j1  �lockval=task%�F%=�forcedelfile(lockfile$)
�t�
�~�
Lj
ǒݤtaskexists(t%)
ǜ�r%:r%=0
Ǧ�
ǰ1ș"TaskManager_EnumerateTasks",r%,tmp%,255�r%
Ǻ�r%<0�!tmp%=t%
��=(!tmp%=t%)
��
��ݤresfile(f$)
���t%,t$,d$,r$
��ș"Territory_Number"�t%
�0ș"Territory_NumberToName",t%,tmp%,250�,tmp%
�*t$=�str(tmp%):d$=resdir$+"."+t$+"."+f$
�
�objtype(d$)=1 �
�  r$=d$
�  �
�(  d$=resdir$+"."+t$
�2  �objtype(d$)=1�
�<1    f1%=�openin(d$):�f1%<>0�t$=�#f1%:�cf(f1%)
�F#    r$=d$=resdir$+"."+t$+"."+f$
�P	    �
�Z    r$=d$=resdir$+".UK."+f$
�d  �
�n�
�xB�objtype(r$)=0��0,"Resource file "+f$+" for "+t$+" not found"
Ȃ=r$
�
00000000  0d 00 0a 13 ee 85 f6 3a  f1 22 20 61 74 20 22 3b  |.......:." at ";|
00000010  9e 3a e0 0d 00 14 09 f2  69 6e 69 74 0d 00 1e 11  |.:......init....|
00000020  e7 a4 64 75 70 74 61 73  6b 3e 30 8c e0 0d 00 28  |..duptask>0....(|
00000030  0f f2 63 72 65 61 74 65  64 69 72 73 0d 00 32 0d  |..createdirs..2.|
00000040  f2 6c 6f 61 64 63 6f 64  65 0d 00 3c 12 f2 73 74  |.loadcode..<..st|
00000050  61 72 74 6d 73 67 74 72  61 6e 73 0d 00 46 0e f2  |artmsgtrans..F..|
00000060  73 74 61 72 74 77 69 6d  70 0d 00 50 4a f4 20 63  |startwimp..PJ. c|
00000070  6c 61 69 6d 20 61 6c 6c  20 66 72 65 65 20 6d 65  |laim all free me|
00000080  6d 6f 72 79 2c 20 62 61  72 20 36 34 6b 2c 20 75  |mory, bar 64k, u|
00000090  70 20 74 6f 20 61 20 6d  61 78 69 6d 75 6d 20 6f  |p to a maximum o|
000000a0  66 20 33 32 30 6b 20 28  66 72 65 65 20 73 70 61  |f 320k (free spa|
000000b0  63 65 29 0d 00 5a 15 e0  3d 93 2b a4 66 72 65 65  |ce)..Z..=.+.free|
000000c0  6d 65 6d 28 2d 36 34 29  0d 00 64 20 e7 28 93 2d  |mem(-64)..d .(.-|
000000d0  e0 29 3e 33 32 30 2a 31  30 32 34 8c e0 3d e0 2b  |.)>320*1024..=.+|
000000e0  33 32 30 2a 31 30 32 34  0d 00 6e 10 f2 6c 6f 61  |320*1024..n..loa|
000000f0  64 73 79 73 63 6f 6e 66  0d 00 78 11 f2 63 68 65  |dsysconf..x..che|
00000100  63 6b 6e 65 77 73 64 69  72 0d 00 82 12 f2 67 65  |cknewsdir.....ge|
00000110  74 74 72 61 6e 73 70 6f  72 74 73 0d 00 8c 10 f2  |ttransports.....|
00000120  6c 6f 63 6b 6e 65 77 73  64 69 72 0d 00 96 10 f2  |locknewsdir.....|
00000130  69 6e 69 74 67 72 70 64  61 74 61 0d 00 a0 10 f2  |initgrpdata.....|
00000140  69 6e 69 74 66 69 6c 74  65 72 73 0d 00 aa 0f e0  |initfilters.....|
00000150  3d 28 e0 2b 26 34 30 30  30 29 0d 00 b4 0f f2 72  |=(.+&4000).....r|
00000160  65 61 64 63 6f 6e 66 69  67 0d 00 be 11 f2 69 6e  |eadconfig.....in|
00000170  69 74 75 73 65 72 64 61  74 61 0d 00 c8 13 f2 73  |ituserdata.....s|
00000180  74 61 72 74 74 72 61 6e  73 70 6f 72 74 0d 00 d2  |tarttransport...|
00000190  12 f2 61 75 74 6f 63 6f  6e 66 69 67 75 72 65 0d  |..autoconfigure.|
000001a0  00 dc 1a e3 6c 31 25 3d  31 b8 33 3a f2 70 6f 6c  |....l1%=1.3:.pol|
000001b0  6c 28 30 29 3a ed 6c 31  25 0d 00 e6 0f e0 3d 28  |l(0):.l1%.....=(|
000001c0  e0 2b 26 34 30 30 30 29  0d 00 f0 22 73 74 61 72  |.+&4000)..."star|
000001d0  74 75 70 6f 6b 25 3d 31  3a f2 6e 62 73 74 61 72  |tupok%=1:.nbstar|
000001e0  74 75 70 28 30 2c 30 2c  30 29 0d 00 fa 12 f2 63  |tup(0,0,0).....c|
000001f0  68 65 63 6b 6f 75 74 66  69 6c 65 73 0d 01 04 18  |heckoutfiles....|
00000200  f2 69 6e 69 74 63 6f 6e  66 28 69 6e 69 74 63 6f  |.initconf(initco|
00000210  6e 66 25 29 0d 01 0e 12  e0 3d 93 2b a4 63 68 65  |nf%).....=.+.che|
00000220  63 6b 73 6c 6f 74 0d 01  18 12 ee 85 f2 65 72 72  |ckslot.......err|
00000230  6f 72 62 6f 78 28 b9 29  0d 01 22 17 f2 73 74 61  |orbox(.).."..sta|
00000240  72 74 75 70 63 68 65 63  6b 65 78 70 69 72 65 0d  |rtupcheckexpire.|
00000250  01 2c 05 f5 0d 01 36 13  20 20 e7 63 68 65 63 6b  |.,....6.  .check|
00000260  66 69 6c 65 73 25 8c 0d  01 40 09 20 20 20 20 f5  |files%...@.    .|
00000270  0d 01 4a 12 20 20 20 20  20 20 73 74 61 72 74 25  |..J.      start%|
00000280  3d 30 0d 01 54 26 20 20  20 20 20 20 66 69 6c 65  |=0..T&      file|
00000290  24 3d a4 63 68 65 63 6b  66 6f 72 66 69 6c 65 73  |$=.checkforfiles|
000002a0  28 73 74 61 72 74 25 29  0d 01 5e 18 20 20 20 20  |(start%)..^.    |
000002b0  20 20 e0 3d 93 2b a4 63  68 65 63 6b 73 6c 6f 74  |  .=.+.checkslot|
000002c0  0d 01 68 35 20 20 20 20  20 20 e7 66 69 6c 65 24  |..h5      .file$|
000002d0  3e 22 22 8c f2 63 68 65  63 6b 64 69 73 6b 3a f2  |>""..checkdisk:.|
000002e0  64 6f 62 61 74 63 68 28  66 69 6c 65 24 2c 73 74  |dobatch(file$,st|
000002f0  61 72 74 25 29 0d 01 72  11 20 20 20 20 fd 66 69  |art%)..r.    .fi|
00000300  6c 65 24 3d 22 22 0d 01  7c 20 20 20 20 20 63 68  |le$=""..|     ch|
00000310  65 63 6b 66 69 6c 65 73  25 3d 61 75 74 6f 64 65  |eckfiles%=autode|
00000320  62 61 74 63 68 25 0d 01  86 07 20 20 cd 0d 01 90  |batch%....  ....|
00000330  0c 20 20 f2 73 6c 65 65  70 0d 01 9a 06 fd 30 0d  |.  .sleep.....0.|
00000340  01 a4 05 e0 0d 01 ae 04  0d 01 b8 12 dd f2 69 6e  |..............in|
00000350  69 74 63 6f 6e 66 28 69  25 29 0d 01 c2 0e e7 69  |itconf(i%).....i|
00000360  25 3e 30 80 72 77 25 8c  0d 01 cc 21 20 20 e7 69  |%>0.rw%....!  .i|
00000370  25 3d 32 8c f2 6d 65 73  73 61 67 65 30 28 22 53  |%=2..message0("S|
00000380  69 6e 66 6f 32 22 2c 31  29 0d 01 d6 41 20 20 f2  |info2",1)...A  .|
00000390  66 72 6f 6e 74 28 6d 73  65 74 75 70 25 29 3a f2  |front(msetup%):.|
000003a0  70 72 69 6e 74 28 a4 6d  73 67 30 28 22 53 65 74  |print(.msg0("Set|
000003b0  75 70 22 29 2c a4 6d 73  67 30 28 22 53 77 61 69  |up"),.msg0("Swai|
000003c0  74 22 29 2c 22 22 2c 22  22 29 0d 01 e0 2a 20 20  |t"),"","")...*  |
000003d0  f5 3a f2 70 6f 6c 6c 28  35 30 29 3a fd 63 6f 6e  |.:.poll(50):.con|
000003e0  66 6f 70 65 6e 25 3d a3  3a f2 73 61 76 65 63 6f  |fopen%=.:.saveco|
000003f0  6e 66 69 67 0d 01 ea 05  cd 0d 01 f4 05 e1 0d 01  |nfig............|
00000400  fe 04 0d 02 08 0a dd f2  63 72 6f 6e 0d 02 12 34  |........cron...4|
00000410  e7 94 28 74 69 6d 65 25  2d 63 72 6f 6e 30 25 29  |..(time%-cron0%)|
00000420  3e 36 30 30 8c 63 72 6f  6e 30 25 3d 74 69 6d 65  |>600.cron0%=time|
00000430  25 3a f2 63 68 65 63 6b  6f 75 74 66 69 6c 65 73  |%:.checkoutfiles|
00000440  0d 02 1c 33 e7 94 28 74  69 6d 65 25 2d 63 72 6f  |...3..(time%-cro|
00000450  6e 31 25 29 3e 31 32 30  30 8c 63 72 6f 6e 31 25  |n1%)>1200.cron1%|
00000460  3d 74 69 6d 65 25 3a f2  63 68 65 63 6b 74 6f 73  |=time%:.checktos|
00000470  65 6e 64 0d 02 26 3a e7  94 28 74 69 6d 65 25 2d  |end..&:..(time%-|
00000480  63 72 6f 6e 32 25 29 3e  36 30 30 30 8c 63 72 6f  |cron2%)>6000.cro|
00000490  6e 32 25 3d 74 69 6d 65  25 3a f2 63 68 65 63 6b  |n2%=time%:.check|
000004a0  6c 6f 63 6b 3a f2 6c 6f  67 28 22 22 29 0d 02 30  |lock:.log("")..0|
000004b0  38 e7 94 28 74 69 6d 65  25 2d 63 72 6f 6e 33 25  |8..(time%-cron3%|
000004c0  29 3e 34 30 30 80 69 6e  66 6f 6f 70 65 6e 25 8c  |)>400.infoopen%.|
000004d0  f2 63 72 65 64 69 74 73  3a 63 72 6f 6e 33 25 3d  |.credits:cron3%=|
000004e0  74 69 6d 65 25 0d 02 3a  44 e7 94 28 74 69 6d 65  |time%..:D..(time|
000004f0  25 2d 63 72 6f 6e 34 25  29 3e 33 30 30 30 30 8c  |%-cron4%)>30000.|
00000500  63 72 6f 6e 34 25 3d 74  69 6d 65 25 3a e7 62 6c  |cron4%=time%:.bl|
00000510  6f 63 6b 65 78 70 69 72  65 25 3d 30 8c f2 63 68  |ockexpire%=0..ch|
00000520  65 63 6b 65 78 70 69 72  65 0d 02 44 05 e1 0d 02  |eckexpire..D....|
00000530  4e 04 0d 02 58 0b dd f2  73 6c 65 65 70 0d 02 62  |N...X...sleep..b|
00000540  07 ea 6d 24 0d 02 6c 1d  6d 24 3d 22 49 64 6c 65  |..m$..l.m$="Idle|
00000550  32 22 3a e7 72 77 25 8c  6d 24 3d 22 49 64 6c 65  |2":.rw%.m$="Idle|
00000560  22 0d 02 76 2e f2 70 72  69 6e 74 28 a4 6d 73 67  |"..v..print(.msg|
00000570  30 28 6d 24 29 2c 22 20  22 2c 22 20 22 2c 22 20  |0(m$)," "," "," |
00000580  22 29 3a 73 6c 65 65 70  25 3d 74 69 6d 65 25 0d  |"):sleep%=time%.|
00000590  02 80 36 f5 f2 70 6f 6c  6c 28 32 30 30 29 3a fd  |..6..poll(200):.|
000005a0  66 6f 72 63 65 62 61 74  63 68 25 84 94 28 74 69  |forcebatch%..(ti|
000005b0  6d 65 25 2d 73 6c 65 65  70 25 29 3e 3d 63 68 6b  |me%-sleep%)>=chk|
000005c0  74 69 6d 65 25 0d 02 8a  11 66 6f 72 63 65 62 61  |time%....forceba|
000005d0  74 63 68 25 3d 30 0d 02  94 05 e1 0d 02 9e 04 0d  |tch%=0..........|
000005e0  02 a8 12 dd f2 63 68 65  63 6b 6e 65 77 73 64 69  |.....checknewsdi|
000005f0  72 0d 02 b2 12 c8 95 6e  65 77 73 72 6f 6f 74 24  |r......newsroot$|
00000600  3d 22 22 0d 02 bc 3c 20  20 e7 72 77 25 8c f2 6d  |=""...<  .rw%..m|
00000610  65 73 73 61 67 65 30 28  22 53 6e 65 77 73 64 69  |essage0("Snewsdi|
00000620  72 22 2c 31 29 8b f2 6d  65 73 73 61 67 65 30 28  |r",1)..message0(|
00000630  22 53 72 6f 6e 65 77 73  64 69 72 22 2c 31 29 0d  |"Sronewsdir",1).|
00000640  02 c6 37 20 20 f2 63 72  65 61 74 65 64 69 72 73  |..7  .createdirs|
00000650  3a e7 6e 65 77 73 72 6f  6f 74 24 3d 22 22 80 72  |:.newsroot$="".r|
00000660  77 25 f2 63 66 72 6f 6e  74 28 73 61 76 65 6e 64  |w%.cfront(savend|
00000670  25 2c 30 2c 30 29 0d 02  d0 28 20 20 f5 f2 70 6f  |%,0,0)...(  ..po|
00000680  6c 6c 28 32 30 30 29 3a  fd 6e 64 6f 70 65 6e 25  |ll(200):.ndopen%|
00000690  3d 30 3a f2 63 72 65 61  74 65 64 69 72 73 0d 02  |=0:.createdirs..|
000006a0  da 05 ce 0d 02 e4 27 e7  bb a4 76 61 72 76 61 6c  |......'...varval|
000006b0  28 22 4e 65 77 73 44 69  72 24 56 65 72 73 69 6f  |("NewsDir$Versio|
000006c0  6e 22 29 3c 31 80 72 77  25 8c 0d 02 ee 25 20 20  |n")<1.rw%....%  |
000006d0  f2 6d 65 73 73 61 67 65  30 28 22 53 75 70 64 61  |.message0("Supda|
000006e0  74 65 22 2c 30 29 3a f2  70 6f 6c 6c 28 30 29 0d  |te",0):.poll(0).|
000006f0  02 f8 32 20 20 f2 6d 61  6b 65 6e 65 77 73 64 69  |..2  .makenewsdi|
00000700  72 28 22 3c 4e 65 77 73  44 69 72 24 44 69 72 3e  |r("<NewsDir$Dir>|
00000710  22 29 3a f2 6d 65 73 73  61 67 65 28 22 22 2c 30  |"):.message("",0|
00000720  29 0d 03 02 05 cd 0d 03  0c 05 e1 0d 03 16 04 0d  |)...............|
00000730  03 20 1d dd a4 63 68 65  63 6b 66 6f 72 66 69 6c  |. ...checkforfil|
00000740  65 73 28 f8 20 73 74 61  72 74 25 29 0d 03 2a 13  |es(. start%)..*.|
00000750  ea 74 31 25 2c 6c 25 2c  66 24 2c 70 61 74 24 0d  |.t1%,l%,f$,pat$.|
00000760  03 34 1d e7 72 77 25 80  a4 66 72 65 65 6d 65 6d  |.4..rw%..freemem|
00000770  28 30 29 3e 33 32 2a 31  30 32 34 8c 0d 03 3e 33  |(0)>32*1024...>3|
00000780  20 20 f2 70 72 69 6e 74  28 a4 6d 73 67 30 28 22  |  .print(.msg0("|
00000790  49 64 6c 65 22 29 2c a4  6d 73 67 30 28 22 46 63  |Idle"),.msg0("Fc|
000007a0  68 65 63 6b 22 29 2c 22  20 22 2c 22 20 22 29 0d  |heck")," "," ").|
000007b0  03 48 2a 20 20 f4 20 66  69 72 73 74 20 63 68 65  |.H*  . first che|
000007c0  63 6b 20 66 6f 72 20 72  65 63 6f 76 65 72 79 20  |ck for recovery |
000007d0  72 65 63 6f 72 64 2e 2e  2e 0d 03 52 1f 20 20 66  |record.....R.  f|
000007e0  24 3d a4 63 68 65 63 6b  5f 72 65 63 66 69 6c 65  |$=.check_recfile|
000007f0  28 73 74 61 72 74 25 29  0d 03 5c 0d 20 20 e7 66  |(start%)..\.  .f|
00000800  24 3d 22 22 8c 0d 03 66  16 20 20 20 20 73 74 61  |$=""...f.    sta|
00000810  72 74 25 3d 30 3a 74 31  25 3d 30 0d 03 70 43 20  |rt%=0:t1%=0..pC |
00000820  20 20 20 e7 74 72 61 6e  73 69 24 28 74 72 61 6e  |   .transi$(tran|
00000830  73 70 6f 72 74 25 2c 30  29 3d 22 22 8c 6c 25 3d  |sport%,0)="".l%=|
00000840  a4 72 75 6e 74 72 61 6e  73 70 6f 72 74 66 69 6c  |.runtransportfil|
00000850  65 28 31 33 2c 22 22 2c  22 22 2c 22 22 29 0d 03  |e(13,"","","")..|
00000860  7a 09 20 20 20 20 f5 0d  03 84 0e 20 20 20 20 20  |z.    .....     |
00000870  20 6c 25 3d 30 0d 03 8e  1f 20 20 20 20 20 20 f5  | l%=0....      .|
00000880  70 61 74 24 3d 74 72 61  6e 73 69 24 28 74 31 25  |pat$=transi$(t1%|
00000890  2c 6c 25 29 0d 03 98 31  20 20 20 20 20 20 20 20  |,l%)...1        |
000008a0  e7 70 61 74 24 3e 22 22  8c 66 24 3d a4 63 68 65  |.pat$>"".f$=.che|
000008b0  63 6b 69 6e 66 69 6c 65  73 28 70 61 74 24 29 3a  |ckinfiles(pat$):|
000008c0  6c 25 2b 3d 31 0d 03 a2  1e 20 20 20 20 20 20 fd  |l%+=1....      .|
000008d0  66 24 3e 22 22 84 70 61  74 24 3d 22 22 84 6c 25  |f$>"".pat$="".l%|
000008e0  3d 31 30 0d 03 ac 19 20  20 20 20 20 20 74 31 25  |=10....      t1%|
000008f0  2b 3d 74 72 61 6e 73 70  6f 72 74 25 0d 03 b6 2a  |+=transport%...*|
00000900  20 20 20 20 fd 66 24 3e  22 22 84 74 31 25 3e 74  |    .f$>"".t1%>t|
00000910  72 61 6e 73 70 6f 72 74  25 84 74 72 61 6e 73 70  |ransport%.transp|
00000920  6f 72 74 25 3d 30 0d 03  c0 07 20 20 cd 0d 03 ca  |ort%=0....  ....|
00000930  05 cd 0d 03 d4 07 3d 66  24 0d 03 de 04 0d 03 e8  |......=f$.......|
00000940  18 dd f2 73 74 61 72 74  75 70 63 68 65 63 6b 65  |...startupchecke|
00000950  78 70 69 72 65 0d 03 f2  1d e7 a4 63 68 65 63 6b  |xpire......check|
00000960  65 78 70 69 72 65 74 69  6d 65 28 a4 74 69 6d 65  |expiretime(.time|
00000970  29 8c 0d 03 fc 37 20 20  f4 20 63 68 65 63 6b 20  |)....7  . check |
00000980  69 66 20 65 78 70 69 72  79 20 69 73 20 77 61 6e  |if expiry is wan|
00000990  74 65 64 3b 20 6d 61 72  6b 20 61 73 20 64 6f 6e  |ted; mark as don|
000009a0  65 20 69 66 20 6e 6f 74  2e 0d 04 06 3f 20 20 e7  |e if not....?  .|
000009b0  a4 63 6f 6e 66 69 72 6d  32 28 a4 6d 73 67 30 28  |.confirm2(.msg0(|
000009c0  22 45 63 6f 6e 66 69 72  6d 22 29 29 3d 32 8c f2  |"Econfirm"))=2..|
000009d0  73 74 61 6d 70 28 6e 65  77 73 72 6f 6f 74 24 2b  |stamp(newsroot$+|
000009e0  22 2e 6e 65 77 73 22 29  0d 04 10 05 cd 0d 04 1a  |".news")........|
000009f0  20 e7 72 77 25 8c 62 6c  6f 63 6b 65 78 70 69 72  | .rw%.blockexpir|
00000a00  65 25 3d 30 3a 63 72 6f  6e 34 25 3d 30 0d 04 24  |e%=0:cron4%=0..$|
00000a10  05 e1 0d 04 2e 04 0d 04  38 11 dd f2 63 68 65 63  |........8...chec|
00000a20  6b 65 78 70 69 72 65 0d  04 42 12 ea 74 25 2c 67  |kexpire..B..t%,g|
00000a30  25 2c 74 24 2c 6e 6f 77  25 0d 04 4c 0e 6e 6f 77  |%,t$,now%..L.now|
00000a40  25 3d a4 74 69 6d 65 0d  04 56 1c e7 a4 63 68 65  |%=.time..V...che|
00000a50  63 6b 65 78 70 69 72 65  74 69 6d 65 28 6e 6f 77  |ckexpiretime(now|
00000a60  25 29 8c 0d 04 60 1e 20  20 f2 6e 62 75 70 64 61  |%)...`.  .nbupda|
00000a70  74 65 28 31 30 2c 22 22  2c 30 2c 22 22 2c 22 22  |te(10,"",0,"",""|
00000a80  29 0d 04 6a 27 20 20 f2  6c 6f 67 28 22 53 74 61  |)..j'  .log("Sta|
00000a90  72 74 69 6e 67 20 61 75  74 6f 6d 61 74 69 63 20  |rting automatic |
00000aa0  65 78 70 69 72 79 22 29  0d 04 74 28 20 20 f2 70  |expiry")..t(  .p|
00000ab0  72 69 6e 74 28 22 22 2c  a4 6d 73 67 30 28 22 45  |rint("",.msg0("E|
00000ac0  63 68 65 63 6b 22 29 2c  22 20 22 2c 22 20 22 29  |check")," "," ")|
00000ad0  0d 04 7e 1f 20 20 f2 73  74 61 6d 70 28 6e 65 77  |..~.  .stamp(new|
00000ae0  73 72 6f 6f 74 24 2b 22  2e 6e 65 77 73 22 29 0d  |sroot$+".news").|
00000af0  04 88 11 20 20 67 25 3d  30 3a f5 67 25 2b 3d 31  |...  g%=0:.g%+=1|
00000b00  0d 04 92 25 20 20 20 20  74 25 3d a4 66 69 6c 65  |...%    t%=.file|
00000b10  74 69 6d 65 28 a4 70 61  74 68 28 67 72 70 24 28  |time(.path(grp$(|
00000b20  67 25 29 29 29 0d 04 9c  2c 20 20 20 20 e7 74 25  |g%)))...,    .t%|
00000b30  3c 6e 6f 77 25 8c f2 65  78 70 69 72 65 67 72 6f  |<now%..expiregro|
00000b40  75 70 28 67 25 2c 30 2c  61 75 74 6f 65 78 70 25  |up(g%,0,autoexp%|
00000b50  29 0d 04 a6 20 20 20 20  20 e7 67 25 83 31 30 3d  |)...     .g%.10=|
00000b60  30 8c f2 70 6f 6c 6c 28  73 6c 69 63 65 25 2a 32  |0..poll(slice%*2|
00000b70  29 0d 04 b0 11 20 20 20  20 e7 63 61 6e 63 65 6c  |)....    .cancel|
00000b80  25 8c 0d 04 ba 3f 20 20  20 20 20 20 e7 a4 63 6f  |%....?      ..co|
00000b90  6e 66 69 72 6d 28 a4 6d  73 67 31 28 22 43 63 61  |nfirm(.msg1("Cca|
00000ba0  6e 63 65 78 70 22 2c 67  24 29 29 3d 32 8c 63 61  |ncexp",g$))=2.ca|
00000bb0  6e 63 65 6c 25 3d 30 8b  63 61 6e 63 65 6c 25 3d  |ncel%=0.cancel%=|
00000bc0  b9 0d 04 c4 09 20 20 20  20 cd 0d 04 ce 1c 20 20  |.....    .....  |
00000bd0  fd 67 25 3d 67 72 6f 75  70 73 25 84 63 61 6e 63  |.g%=groups%.canc|
00000be0  65 6c 25 3c 3e 30 0d 04  d8 1d 20 20 f2 6c 6f 67  |el%<>0....  .log|
00000bf0  28 22 46 69 6e 69 73 68  65 64 20 65 78 70 69 72  |("Finished expir|
00000c00  79 22 29 0d 04 e2 3d 20  20 f2 72 75 6e 73 75 70  |y")...=  .runsup|
00000c10  70 6f 72 74 28 22 54 72  69 6d 6c 69 73 74 20 22  |port("Trimlist "|
00000c20  2b c3 6e 67 65 78 70 25  29 3a f2 65 78 70 6d 69  |+.ngexp%):.expmi|
00000c30  73 63 64 69 72 28 74 6d  70 64 69 72 24 2c 31 29  |scdir(tmpdir$,1)|
00000c40  0d 04 ec 05 cd 0d 04 f6  05 e1 0d 05 00 04 0d 05  |................|
00000c50  0a 1b dd a4 63 68 65 63  6b 65 78 70 69 72 65 74  |....checkexpiret|
00000c60  69 6d 65 28 6e 6f 77 25  29 0d 05 14 21 ea 79 65  |ime(now%)...!.ye|
00000c70  73 25 2c 6c 61 73 74 25  2c 6e 6f 77 24 2c 74 65  |s%,last%,now$,te|
00000c80  73 74 24 2c 65 74 69 6d  65 25 0d 05 1e 0a 79 65  |st$,etime%....ye|
00000c90  73 25 3d 30 0d 05 28 09  e7 72 77 25 8c 0d 05 32  |s%=0..(..rw%...2|
00000ca0  28 20 20 6c 61 73 74 25  3d a4 66 69 6c 65 74 69  |(  last%=.fileti|
00000cb0  6d 65 28 6e 65 77 73 72  6f 6f 74 24 2b 22 2e 6e  |me(newsroot$+".n|
00000cc0  65 77 73 22 29 0d 05 3c  43 20 20 f4 20 74 65 73  |ews")..<C  . tes|
00000cd0  74 24 20 69 73 20 65 78  70 69 72 79 20 74 72 69  |t$ is expiry tri|
00000ce0  67 67 65 72 20 74 69 6d  65 20 61 73 20 73 74 72  |gger time as str|
00000cf0  69 6e 67 2c 20 66 6f 72  6d 61 74 20 43 45 59 52  |ing, format CEYR|
00000d00  4d 4e 44 59 48 52 4d 49  0d 05 46 38 20 20 f4 20  |MNDYHRMI..F8  . |
00000d10  46 4e 66 69 6c 65 74 69  6d 65 20 72 65 74 75 72  |FNfiletime retur|
00000d20  6e 73 20 66 69 6c 65 20  74 69 6d 65 73 74 61 6d  |ns file timestam|
00000d30  70 20 69 6e 20 73 61 6d  65 20 66 6f 72 6d 61 74  |p in same format|
00000d40  0d 05 50 1a 20 20 e7 70  6f 73 74 66 65 74 63 68  |..P.  .postfetch|
00000d50  72 65 61 64 79 25 3c 3e  30 8c 0d 05 5a 19 20 20  |ready%<>0...Z.  |
00000d60  20 20 70 6f 73 74 66 65  74 63 68 72 65 61 64 79  |  postfetchready|
00000d70  25 3d 30 0d 05 64 37 20  20 20 20 74 25 3d a4 72  |%=0..d7    t%=.r|
00000d80  75 6e 74 72 61 6e 73 70  6f 72 74 66 69 6c 65 28  |untransportfile(|
00000d90  35 2c 22 22 2c 22 22 2c  22 22 29 3a f4 20 70 6f  |5,"","",""):. po|
00000da0  73 74 66 65 74 63 68 2e  2e 2e 0d 05 6e 07 20 20  |stfetch.....n.  |
00000db0  cd 0d 05 78 27 20 20 65  74 69 6d 65 25 3d 65 78  |...x'  etime%=ex|
00000dc0  70 74 69 6d 65 25 3a e7  65 78 70 61 6e 79 25 8c  |ptime%:.expany%.|
00000dd0  65 74 69 6d 65 25 3d 30  0d 05 82 1d 20 20 e7 61  |etime%=0....  .a|
00000de0  75 74 6f 65 78 70 25 80  69 6e 64 65 62 61 74 63  |utoexp%.indebatc|
00000df0  68 25 3d 30 8c 0d 05 8c  26 20 20 20 20 74 65 73  |h%=0....&    tes|
00000e00  74 24 3d c3 6e 6f 77 25  2b c2 22 30 30 30 30 22  |t$=.now%+."0000"|
00000e10  2b c3 65 74 69 6d 65 25  2c 34 29 0d 05 96 16 20  |+.etime%,4).... |
00000e20  20 20 20 6e 6f 77 24 3d  a4 66 75 6c 6c 74 69 6d  |   now$=.fulltim|
00000e30  65 0d 05 a0 19 20 20 20  20 79 65 73 25 3d 28 6e  |e....    yes%=(n|
00000e40  6f 77 24 3e 74 65 73 74  24 29 0d 05 aa 0e 20 20  |ow$>test$)....  |
00000e50  20 20 e7 79 65 73 25 8c  0d 05 b4 33 20 20 20 20  |  .yes%....3    |
00000e60  20 20 f4 20 61 6c 73 6f  20 63 68 65 63 6b 20 6c  |  . also check l|
00000e70  61 73 74 20 65 78 70 69  72 79 20 77 61 73 20 79  |ast expiry was y|
00000e80  65 73 74 65 72 64 61 79  2e 2e 2e 0d 05 be 1e 20  |esterday....... |
00000e90  20 20 20 20 20 e7 6c 61  73 74 25 3e 6e 6f 77 25  |     .last%>now%|
00000ea0  2d 31 8c 79 65 73 25 3d  30 0d 05 c8 4d 20 20 20  |-1.yes%=0...M   |
00000eb0  20 20 20 f4 20 61 6e 64  20 63 68 65 63 6b 20 74  |   . and check t|
00000ec0  72 61 6e 73 70 6f 72 74  20 6e 6f 74 20 61 63 74  |ransport not act|
00000ed0  69 76 65 2e 2e 2e 20 64  6f 6e 27 74 20 77 61 6e  |ive... don't wan|
00000ee0  74 20 65 78 70 69 72 79  20 77 68 69 6c 65 20 6f  |t expiry while o|
00000ef0  6e 6c 69 6e 65 2e 0d 05  d2 39 20 20 20 20 20 20  |nline....9      |
00000f00  e7 79 65 73 25 8c e7 a4  72 75 6e 74 72 61 6e 73  |.yes%...runtrans|
00000f10  70 6f 72 74 66 69 6c 65  28 31 35 2c 22 22 2c 22  |portfile(15,"","|
00000f20  22 2c 22 22 29 3c 3e 30  8c 79 65 73 25 3d 30 0d  |","")<>0.yes%=0.|
00000f30  05 dc 09 20 20 20 20 cd  0d 05 e6 07 20 20 cd 0d  |...    .....  ..|
00000f40  05 f0 05 cd 0d 05 fa 09  3d 79 65 73 25 0d 06 04  |........=yes%...|
00000f50  04 0d 06 0e 13 dd f2 63  68 65 63 6b 6f 75 74 66  |.......checkoutf|
00000f60  69 6c 65 73 0d 06 18 1b  ea 6c 25 2c 74 25 2c 66  |iles.....l%,t%,f|
00000f70  24 2c 64 24 2c 70 24 2c  6e 25 3a 6c 25 3d 30 0d  |$,d$,p$,n%:l%=0.|
00000f80  06 22 05 f5 0d 06 2c 25  20 20 66 24 3d 74 72 61  |."....,%  f$=tra|
00000f90  6e 73 6f 24 28 74 72 61  6e 73 70 6f 72 74 25 2c  |nso$(transport%,|
00000fa0  6c 25 29 3a 6c 25 2b 3d  31 0d 06 36 1e 20 20 64  |l%):l%+=1..6.  d|
00000fb0  24 3d a4 64 69 72 28 66  24 29 3a 70 24 3d a4 6c  |$=.dir(f$):p$=.l|
00000fc0  65 61 66 28 66 24 29 0d  06 40 33 20 20 c8 99 22  |eaf(f$)..@3  .."|
00000fd0  58 4f 53 5f 47 42 50 42  22 2c 39 2c 64 24 2c 74  |XOS_GBPB",9,d$,t|
00000fe0  6d 70 25 2c 31 2c 30 2c  32 35 35 2c 70 24 20 b8  |mp%,1,0,255,p$ .|
00000ff0  2c 2c 2c 6e 25 3b 65 72  72 25 0d 06 4a 1c 20 20  |,,,n%;err%..J.  |
00001000  e7 28 65 72 72 25 80 31  29 3d 30 80 6e 25 3e 30  |.(err%.1)=0.n%>0|
00001010  8c 74 25 2b 3d 31 0d 06  54 10 fd 66 24 3d 22 22  |.t%+=1..T..f$=""|
00001020  84 6c 25 3d 31 31 0d 06  5e 39 64 24 3d 64 65 66  |.l%=11..^9d$=def|
00001030  69 63 24 3a e7 74 25 3d  30 8c 64 65 66 69 63 24  |ic$:.t%=0.defic$|
00001040  3d 22 6e 65 77 73 62 61  73 65 31 22 8b 64 65 66  |="newsbase1".def|
00001050  69 63 24 3d 22 6e 65 77  73 62 61 73 65 32 22 0d  |ic$="newsbase2".|
00001060  06 68 21 e7 64 24 3c 3e  64 65 66 69 63 24 8c f2  |.h!.d$<>defic$..|
00001070  63 68 61 6e 67 65 69 63  28 64 65 66 69 63 24 29  |changeic(defic$)|
00001080  0d 06 72 05 e1 0d 06 7c  04 0d 06 86 16 dd a4 63  |..r....|.......c|
00001090  68 65 63 6b 69 6e 66 69  6c 65 73 28 41 24 29 0d  |heckinfiles(A$).|
000010a0  06 90 3f ea 72 65 73 75  6c 74 24 2c 6e 25 2c 6e  |..?.result$,n%,n|
000010b0  65 78 74 25 2c 66 24 2c  66 66 24 2c 66 25 2c 46  |ext%,f$,ff$,f%,F|
000010c0  25 2c 6c 25 2c 73 6f 75  72 63 65 24 2c 70 61 74  |%,l%,source$,pat|
000010d0  24 2c 64 69 72 62 75 66  25 2c 64 62 72 25 0d 06  |$,dirbuf%,dbr%..|
000010e0  9a 0b 6e 65 78 74 25 3d  30 0d 06 a4 27 64 62 72  |..next%=0...'dbr|
000010f0  25 3d a4 63 6c 61 69 6d  28 64 69 72 62 75 66 25  |%=.claim(dirbuf%|
00001100  2c 64 62 73 69 7a 65 25  2c 22 64 62 75 66 22 29  |,dbsize%,"dbuf")|
00001110  0d 06 ae 23 73 6f 75 72  63 65 24 3d a4 64 69 72  |...#source$=.dir|
00001120  28 41 24 29 3a 70 61 74  24 3d a4 6c 65 61 66 28  |(A$):pat$=.leaf(|
00001130  41 24 29 0d 06 b8 05 f5  0d 06 c2 49 20 20 c8 99  |A$)........I  ..|
00001140  22 58 4f 53 5f 47 42 50  42 22 2c 39 2c 73 6f 75  |"XOS_GBPB",9,sou|
00001150  72 63 65 24 2c 64 69 72  62 75 66 25 2c 31 2c 6e  |rce$,dirbuf%,1,n|
00001160  65 78 74 25 2c 64 62 73  69 7a 65 25 2c 70 61 74  |ext%,dbsize%,pat|
00001170  24 20 b8 2c 2c 2c 6e 25  2c 6e 65 78 74 25 3b 46  |$ .,,,n%,next%;F|
00001180  25 0d 06 cc 15 20 20 e7  28 46 25 80 31 29 3d 30  |%....  .(F%.1)=0|
00001190  80 6e 25 3e 30 8c 0d 06  d6 2b 20 20 20 20 66 24  |.n%>0....+    f$|
000011a0  3d a4 73 74 72 28 64 69  72 62 75 66 25 29 3a 66  |=.str(dirbuf%):f|
000011b0  66 24 3d 73 6f 75 72 63  65 24 2b 22 2e 22 2b 66  |f$=source$+"."+f|
000011c0  24 0d 06 e0 30 20 20 20  20 f4 20 61 74 74 65 6d  |$...0    . attem|
000011d0  70 74 20 64 65 6c 65 74  69 6f 6e 20 6f 66 20 61  |pt deletion of a|
000011e0  6e 79 20 65 6d 70 74 79  20 66 69 6c 65 73 2e 2e  |ny empty files..|
000011f0  2e 0d 06 ea 2a 20 20 20  20 e7 a4 66 69 6c 65 73  |....*    ..files|
00001200  69 7a 65 28 66 66 24 29  3d 30 8c 46 25 3d a4 64  |ize(ff$)=0.F%=.d|
00001210  65 6c 66 69 6c 65 28 66  66 24 29 0d 06 f4 36 20  |elfile(ff$)...6 |
00001220  20 20 20 f4 20 73 65 65  20 69 66 20 66 69 6c 65  |   . see if file|
00001230  20 63 61 6e 20 62 65 20  6f 70 65 6e 65 64 20 66  | can be opened f|
00001240  6f 72 20 72 65 61 64 20  61 63 63 65 73 73 2e 2e  |or read access..|
00001250  2e 0d 06 fe 1d 20 20 20  20 46 25 3d 30 3a 66 31  |.....    F%=0:f1|
00001260  25 3d a4 6f 70 65 6e 69  6e 28 66 66 24 29 0d 07  |%=.openin(ff$)..|
00001270  08 10 20 20 20 20 e7 66  31 25 3c 3e 30 8c 0d 07  |..    .f1%<>0...|
00001280  12 12 20 20 20 20 20 20  f2 63 66 28 66 31 25 29  |..      .cf(f1%)|
00001290  0d 07 1c 1d 20 20 20 20  20 20 e7 73 6f 75 72 63  |....      .sourc|
000012a0  65 24 3c 3e 77 6f 72 6b  64 69 72 24 8c 0d 07 26  |e$<>workdir$...&|
000012b0  2d 20 20 20 20 20 20 20  20 46 25 3d a4 72 75 6e  |-        F%=.run|
000012c0  74 72 61 6e 73 70 6f 72  74 66 69 6c 65 28 34 2c  |transportfile(4,|
000012d0  66 66 24 2c 22 22 2c 22  22 29 0d 07 30 14 20 20  |ff$,"","")..0.  |
000012e0  20 20 20 20 20 20 20 20  e7 46 25 3d 30 8c 0d 07  |        .F%=0...|
000012f0  3a 2f 20 20 20 20 20 20  20 20 20 20 46 25 3d a4  |:/          F%=.|
00001300  6d 6f 76 65 66 69 6c 65  28 66 66 24 2c 77 6f 72  |movefile(ff$,wor|
00001310  6b 64 69 72 24 2b 22 2e  22 2b 66 24 29 0d 07 44  |kdir$+"."+f$)..D|
00001320  0f 20 20 20 20 20 20 20  20 20 20 cc 0d 07 4e 47  |.          ...NG|
00001330  20 20 20 20 20 20 20 20  20 20 f2 6d 65 73 73 61  |          .messa|
00001340  67 65 31 28 22 44 6e 6f  70 72 65 66 65 74 63 68  |ge1("Dnoprefetch|
00001350  22 2c a4 76 61 72 76 61  6c 28 22 4e 65 77 73 62  |",.varval("Newsb|
00001360  61 73 65 24 52 65 74 75  72 6e 49 6e 66 6f 22 29  |ase$ReturnInfo")|
00001370  2c 31 29 0d 07 58 0d 20  20 20 20 20 20 20 20 cd  |,1)..X.        .|
00001380  0d 07 62 0b 20 20 20 20  20 20 cd 0d 07 6c 27 20  |..b.      ...l' |
00001390  20 20 20 20 20 e7 46 25  3d 30 8c 72 65 73 75 6c  |     .F%=0.resul|
000013a0  74 24 3d 77 6f 72 6b 64  69 72 24 2b 22 2e 22 2b  |t$=workdir$+"."+|
000013b0  66 24 0d 07 76 09 20 20  20 20 cd 0d 07 80 09 20  |f$..v.    ..... |
000013c0  20 20 20 cc 0d 07 8a 17  20 20 20 20 f2 70 6f 6c  |   .....    .pol|
000013d0  6c 28 73 6c 69 63 65 25  2a 32 29 0d 07 94 07 20  |l(slice%*2).... |
000013e0  20 cd 0d 07 9e 21 fd 72  65 73 75 6c 74 24 3e 22  | ....!.result$>"|
000013f0  22 84 6e 65 78 74 25 3c  30 84 28 46 25 80 31 29  |".next%<0.(F%.1)|
00001400  3c 3e 30 0d 07 a8 12 f2  72 65 6c 65 61 73 65 28  |<>0.....release(|
00001410  64 62 72 25 29 0d 07 b2  0c 3d 72 65 73 75 6c 74  |dbr%)....=result|
00001420  24 0d 07 bc 04 0d 07 c6  11 dd f2 63 68 65 63 6b  |$..........check|
00001430  74 6f 73 65 6e 64 0d 07  d0 30 ea 6e 25 2c 6e 65  |tosend...0.n%,ne|
00001440  78 74 25 2c 66 24 2c 64  24 2c 46 25 2c 64 69 72  |xt%,f$,d$,F%,dir|
00001450  62 75 66 25 2c 64 62 72  25 2c 69 6e 66 6f 24 2c  |buf%,dbr%,info$,|
00001460  75 24 2c 74 79 25 0d 07  da 09 e7 72 77 25 8c 0d  |u$,ty%.....rw%..|
00001470  07 e4 2f 20 20 6e 66 25  3d 30 3a 64 62 72 25 3d  |../  nf%=0:dbr%=|
00001480  a4 63 6c 61 69 6d 28 64  69 72 62 75 66 25 2c 64  |.claim(dirbuf%,d|
00001490  62 73 69 7a 65 25 2c 22  64 62 75 66 22 29 0d 07  |bsize%,"dbuf")..|
000014a0  ee 2b 20 20 e3 74 79 25  3d 30 b8 31 3a 6e 25 3d  |.+  .ty%=0.1:n%=|
000014b0  74 72 61 6e 73 6d 25 28  74 72 61 6e 73 70 6f 72  |transm%(transpor|
000014c0  74 25 2c 74 79 25 2b 31  29 0d 07 f8 1e 20 20 20  |t%,ty%+1)....   |
000014d0  20 e7 a4 66 72 65 65 6d  65 6d 28 30 29 3e 3d 6e  | ..freemem(0)>=n|
000014e0  25 2a 31 30 32 34 8c 0d  08 02 13 20 20 20 20 20  |%*1024.....     |
000014f0  20 6e 65 78 74 25 3d 30  3a f5 0d 08 0c 52 20 20  | next%=0:....R  |
00001500  20 20 20 20 20 20 c8 99  22 58 4f 53 5f 47 42 50  |      .."XOS_GBP|
00001510  42 22 2c 39 2c 6f 75 74  64 69 72 24 28 74 79 25  |B",9,outdir$(ty%|
00001520  29 2c 64 69 72 62 75 66  25 2c 31 2c 6e 65 78 74  |),dirbuf%,1,next|
00001530  25 2c 64 62 73 69 7a 65  25 2c 22 2a 22 b8 2c 2c  |%,dbsize%,"*".,,|
00001540  2c 6e 25 2c 6e 65 78 74  25 3b 46 25 0d 08 16 1b  |,n%,next%;F%....|
00001550  20 20 20 20 20 20 20 20  e7 28 46 25 80 31 29 3d  |        .(F%.1)=|
00001560  30 80 6e 25 3e 30 8c 0d  08 20 41 20 20 20 20 20  |0.n%>0... A     |
00001570  20 20 20 20 20 66 24 3d  6f 75 74 64 69 72 24 28  |     f$=outdir$(|
00001580  74 79 25 29 2b 22 2e 22  2b a4 73 74 72 28 64 69  |ty%)+"."+.str(di|
00001590  72 62 75 66 25 29 3a f2  73 65 74 74 79 70 65 28  |rbuf%):.settype(|
000015a0  66 24 2c 26 46 46 46 29  0d 08 2a 2d 20 20 20 20  |f$,&FFF)..*-    |
000015b0  20 20 20 20 20 20 64 24  3d a4 74 6d 70 66 69 6c  |      d$=.tmpfil|
000015c0  65 3a 46 25 3d a4 6d 6f  76 65 66 69 6c 65 28 66  |e:F%=.movefile(f|
000015d0  24 2c 64 24 29 0d 08 34  18 20 20 20 20 20 20 20  |$,d$)..4.       |
000015e0  20 20 20 e7 28 46 25 80  31 29 3d 30 8c 0d 08 3e  |   .(F%.1)=0...>|
000015f0  31 20 20 20 20 20 20 20  20 20 20 6e 65 78 74 25  |1          next%|
00001600  2d 3d 31 3a 69 6e 66 6f  24 3d a4 6b 65 65 70 66  |-=1:info$=.keepf|
00001610  69 6c 65 28 74 79 25 2c  64 24 2c 75 24 29 0d 08  |ile(ty%,d$,u$)..|
00001620  48 14 20 20 20 20 20 20  20 20 20 20 c8 8e 74 79  |H.          ..ty|
00001630  25 ca 0d 08 52 26 20 20  20 20 20 20 20 20 20 20  |%...R&          |
00001640  20 20 c9 30 3a 72 24 3d  a4 73 65 6e 64 6d 61 69  |  .0:r$=.sendmai|
00001650  6c 28 64 24 2c 75 24 29  0d 08 5c 2c 20 20 20 20  |l(d$,u$)..\,    |
00001660  20 20 20 20 20 20 20 20  c9 31 3a 72 24 3d a4 73  |        .1:r$=.s|
00001670  65 6e 64 6e 65 77 73 28  64 24 2c 69 6e 66 6f 24  |endnews(d$,info$|
00001680  2c 75 24 29 0d 08 66 0f  20 20 20 20 20 20 20 20  |,u$)..f.        |
00001690  20 20 cb 0d 08 70 2f 20  20 20 20 20 20 20 20 20  |  ...p/         |
000016a0  20 e7 72 24 3e 22 22 f2  6d 65 73 73 61 67 65 31  | .r$>"".message1|
000016b0  28 22 51 73 65 6e 64 66  61 69 6c 22 2c 64 24 2c  |("Qsendfail",d$,|
000016c0  31 29 0d 08 7a 1d 20 20  20 20 20 20 20 20 20 20  |1)..z.          |
000016d0  f2 70 6f 6c 6c 28 73 6c  69 63 65 25 2a 32 29 0d  |.poll(slice%*2).|
000016e0  08 84 0f 20 20 20 20 20  20 20 20 20 20 cd 0d 08  |...          ...|
000016f0  8e 0d 20 20 20 20 20 20  20 20 cd 0d 08 98 1c 20  |..        ..... |
00001700  20 20 20 20 20 fd 6e 65  78 74 25 3c 30 84 28 46  |     .next%<0.(F|
00001710  25 80 31 29 3c 3e 30 0d  08 a2 09 20 20 20 20 cd  |%.1)<>0....    .|
00001720  0d 08 ac 0a 20 20 ed 74  79 25 0d 08 b6 14 20 20  |....  .ty%....  |
00001730  f2 72 65 6c 65 61 73 65  28 64 62 72 25 29 0d 08  |.release(dbr%)..|
00001740  c0 05 cd 0d 08 ca 05 e1  0d 08 d4 04 0d 08 de 0d  |................|
00001750  dd a4 64 69 72 28 66 24  29 0d 08 e8 07 ea 6c 25  |..dir(f$).....l%|
00001760  0d 08 f2 25 6c 25 3d a9  66 24 3a f5 6c 25 2d 3d  |...%l%=.f$:.l%-=|
00001770  31 3a fd c1 66 24 2c 6c  25 2c 31 29 3d 22 2e 22  |1:..f$,l%,1)="."|
00001780  84 6c 25 3c 31 0d 08 fc  0e 3d c0 66 24 2c 6c 25  |.l%<1....=.f$,l%|
00001790  2d 31 29 0d 09 06 04 0d  09 10 0e dd a4 6c 65 61  |-1)..........lea|
000017a0  66 28 66 24 29 0d 09 1a  07 ea 6c 25 0d 09 24 25  |f(f$).....l%..$%|
000017b0  6c 25 3d a9 66 24 3a f5  6c 25 2d 3d 31 3a fd c1  |l%=.f$:.l%-=1:..|
000017c0  66 24 2c 6c 25 2c 31 29  3d 22 2e 22 84 6c 25 3c  |f$,l%,1)=".".l%<|
000017d0  31 0d 09 2e 0e 3d c1 66  24 2c 6c 25 2b 31 29 0d  |1....=.f$,l%+1).|
000017e0  09 38 04 0d 09 42 1e dd  f2 64 6f 62 61 74 63 68  |.8...B...dobatch|
000017f0  28 66 75 6c 6c 62 66 24  2c 62 73 74 61 72 74 25  |(fullbf$,bstart%|
00001800  29 0d 09 4c 0f ea 62 66  24 2c 74 79 24 2c 46 25  |)..L..bf$,ty$,F%|
00001810  0d 09 56 16 62 66 24 3d  a4 6c 65 61 66 28 66 75  |..V.bf$=.leaf(fu|
00001820  6c 6c 62 66 24 29 0d 09  60 18 f2 64 65 63 6f 6d  |llbf$)..`..decom|
00001830  70 72 65 73 73 28 66 75  6c 6c 62 66 24 29 0d 09  |press(fullbf$)..|
00001840  6a 1e e7 a4 66 69 6c 65  74 79 70 65 28 66 75 6c  |j...filetype(ful|
00001850  6c 62 66 24 29 3d 26 46  43 41 20 8c 0d 09 74 4a  |lbf$)=&FCA ...tJ|
00001860  20 20 f2 6d 65 73 73 61  67 65 30 28 22 43 6f 6d  |  .message0("Com|
00001870  70 46 61 69 6c 34 22 2c  31 29 3a f2 6c 6f 67 28  |pFail4",1):.log(|
00001880  22 42 61 74 63 68 20 64  65 63 6f 6d 70 72 65 73  |"Batch decompres|
00001890  73 69 6f 6e 20 66 61 69  6c 65 64 20 66 6f 72 20  |sion failed for |
000018a0  22 2b 62 66 24 29 0d 09  7e 39 20 20 e7 a4 6d 6f  |"+bf$)..~9  ..mo|
000018b0  76 65 74 6f 64 65 62 75  67 28 66 75 6c 6c 62 66  |vetodebug(fullbf|
000018c0  24 29 3c 3e 30 8c 46 25  3d a4 66 6f 72 63 65 64  |$)<>0.F%=.forced|
000018d0  65 6c 66 69 6c 65 28 66  75 6c 6c 62 66 24 29 0d  |elfile(fullbf$).|
000018e0  09 88 07 20 20 cc 0d 09  92 1f 20 20 f2 73 74 61  |...  .....  .sta|
000018f0  72 74 6d 65 6d 6d 67 72  3a 69 6e 64 65 62 61 74  |rtmemmgr:indebat|
00001900  63 68 25 3d b9 0d 09 9c  40 20 20 69 6e 62 75 66  |ch%=....@  inbuf|
00001910  25 3d 62 61 73 65 25 3a  f2 65 78 74 65 6e 64 28  |%=base%:.extend(|
00001920  69 6e 62 75 66 73 69 7a  65 25 29 3a 61 72 74 62  |inbufsize%):artb|
00001930  61 73 65 25 3d 62 61 73  65 25 2b 69 6e 62 75 66  |ase%=base%+inbuf|
00001940  73 69 7a 65 25 0d 09 a6  29 20 20 f2 70 72 69 6e  |size%...)  .prin|
00001950  74 28 a4 6d 73 67 30 28  22 44 73 74 61 72 74 22  |t(.msg0("Dstart"|
00001960  29 2c 22 20 22 2c 22 20  22 2c 22 20 22 29 0d 09  |)," "," "," ")..|
00001970  b0 21 20 20 f2 6f 70 65  6e 62 61 74 63 68 28 66  |.!  .openbatch(f|
00001980  75 6c 6c 62 66 24 2c 62  73 74 61 72 74 25 29 0d  |ullbf$,bstart%).|
00001990  09 ba 0f 20 20 63 61 6e  63 65 6c 25 3d a3 0d 09  |...  cancel%=...|
000019a0  c4 44 20 20 64 6f 6e 65  25 3d 30 3a 64 65 6c 25  |.D  done%=0:del%|
000019b0  3d b9 3a 6f 66 66 25 3d  30 3a 70 74 72 25 3d 30  |=.:off%=0:ptr%=0|
000019c0  3a 72 65 63 70 6f 73 25  3d 30 3a 6c 61 73 74 70  |:recpos%=0:lastp|
000019d0  6f 73 25 3d 30 3a 62 61  74 61 72 74 6c 65 6e 25  |os%=0:batartlen%|
000019e0  3d 30 0d 09 ce 2a 20 20  74 79 70 65 25 3d a4 69  |=0...*  type%=.i|
000019f0  64 65 6e 74 69 66 79 66  69 6c 65 28 66 75 6c 6c  |dentifyfile(full|
00001a00  62 66 24 2c 62 73 74 61  72 74 25 29 0d 09 d8 32  |bf$,bstart%)...2|
00001a10  20 20 e7 74 79 70 65 25  3d 30 8c 74 79 24 3d a4  |  .type%=0.ty$=.|
00001a20  6d 73 67 30 28 22 4d 61  69 6c 22 29 8b 74 79 24  |msg0("Mail").ty$|
00001a30  3d a4 6d 73 67 30 28 22  4e 65 77 73 22 29 0d 09  |=.msg0("News")..|
00001a40  e2 25 20 20 73 74 61 72  74 25 3d b9 3a 74 6f 74  |.%  start%=.:tot|
00001a50  61 6c 25 3d 30 3a 64 73  74 69 6d 65 25 3d 74 69  |al%=0:dstime%=ti|
00001a60  6d 65 25 0d 09 ec 0e 20  20 c8 95 65 6f 66 25 3d  |me%....  ..eof%=|
00001a70  a3 0d 09 f6 26 20 20 20  20 63 61 6e 63 65 6c 25  |....&    cancel%|
00001a80  3d a3 3a f2 64 6f 61 72  74 69 63 6c 65 3a f2 73  |=.:.doarticle:.s|
00001a90  61 76 65 6c 69 73 74 0d  0a 00 2b 20 20 20 20 f2  |avelist...+    .|
00001aa0  70 72 69 6e 74 28 a4 6d  73 67 31 28 22 44 74 79  |print(.msg1("Dty|
00001ab0  70 65 22 2c 74 79 24 29  2c 22 22 2c 22 22 2c 22  |pe",ty$),"","","|
00001ac0  22 29 0d 0a 0a 1d 20 20  20 20 e7 63 61 6e 63 65  |")....    .cance|
00001ad0  6c 25 8c f2 63 61 6e 63  65 6c 62 61 74 63 68 0d  |l%..cancelbatch.|
00001ae0  0a 14 07 20 20 ce 0d 0a  1e 1d 20 20 f2 65 78 74  |...  .....  .ext|
00001af0  65 6e 64 28 30 29 3a 69  6e 64 65 62 61 74 63 68  |end(0):indebatch|
00001b00  25 3d 30 0d 0a 28 18 20  20 f2 65 6e 64 62 61 74  |%=0..(.  .endbat|
00001b10  63 68 28 66 75 6c 6c 62  66 24 29 0d 0a 32 05 cd  |ch(fullbf$)..2..|
00001b20  0d 0a 3c 05 e1 0d 0a 46  04 0d 0a 50 11 dd f2 63  |..<....F...P...c|
00001b30  61 6e 63 65 6c 62 61 74  63 68 0d 0a 5a 37 65 6f  |ancelbatch..Z7eo|
00001b40  66 25 3d b9 3a 64 65 6c  25 3d a3 3a f2 63 66 28  |f%=.:del%=.:.cf(|
00001b50  66 30 30 25 29 3a f2 77  72 69 74 65 5f 72 65 63  |f00%):.write_rec|
00001b60  66 69 6c 65 3a 69 6e 64  65 62 61 74 63 68 25 3d  |file:indebatch%=|
00001b70  30 0d 0a 64 21 f2 6d 65  73 73 61 67 65 30 28 22  |0..d!.message0("|
00001b80  44 63 61 6e 63 65 6c 22  2c 30 29 3a f2 70 61 75  |Dcancel",0):.pau|
00001b90  73 65 0d 0a 6e 05 e1 0d  0a 78 04 0d 0a 82 17 dd  |se..n....x......|
00001ba0  f2 65 6e 64 62 61 74 63  68 28 62 61 74 63 68 66  |.endbatch(batchf|
00001bb0  24 29 0d 0a 8c 24 ea 46  25 2c 6e 25 2c 74 25 2c  |$)...$.F%,n%,t%,|
00001bc0  64 65 62 64 69 72 24 2c  72 61 74 65 24 3a 72 61  |debdir$,rate$:ra|
00001bd0  74 65 24 3d 22 22 0d 0a  96 12 f2 77 72 69 74 65  |te$="".....write|
00001be0  69 6e 64 65 78 62 75 66  0d 0a a0 24 f4 20 77 72  |indexbuf...$. wr|
00001bf0  69 74 65 20 64 65 62 61  74 63 68 20 73 74 61 74  |ite debatch stat|
00001c00  73 20 74 6f 20 6c 6f 67  66 69 6c 65 0d 0a aa 42  |s to logfile...B|
00001c10  74 25 3d 94 28 64 73 74  69 6d 65 25 2d 74 69 6d  |t%=.(dstime%-tim|
00001c20  65 25 29 81 31 30 30 3a  e7 74 25 3e 30 8c 72 61  |e%).100:.t%>0.ra|
00001c30  74 65 24 3d c3 28 28 6c  65 6e 25 2d 62 73 74 61  |te$=.((len%-bsta|
00001c40  72 74 25 29 81 74 25 29  2b 22 63 70 73 22 0d 0a  |rt%).t%)+"cps"..|
00001c50  b4 49 f2 6c 6f 67 28 22  46 69 6e 69 73 68 65 64  |.I.log("Finished|
00001c60  20 62 61 74 63 68 20 22  2b 62 66 24 2b 22 20 22  | batch "+bf$+" "|
00001c70  2b c3 64 6f 6e 65 25 2b  22 20 61 72 74 73 20 22  |+.done%+" arts "|
00001c80  2b c3 6c 65 6e 25 2b 22  20 62 79 74 65 73 20 22  |+.len%+" bytes "|
00001c90  2b 72 61 74 65 24 29 0d  0a be 46 f2 63 66 28 66  |+rate$)...F.cf(f|
00001ca0  30 30 25 29 3a f4 20 62  61 74 63 68 20 66 69 6c  |00%):. batch fil|
00001cb0  65 20 73 68 6f 75 6c 64  20 62 65 20 63 6c 6f 73  |e should be clos|
00001cc0  65 64 20 61 6c 72 65 61  64 79 2c 20 62 75 74 20  |ed already, but |
00001cd0  74 68 69 73 20 65 6e 73  75 72 65 73 2e 0d 0a c8  |this ensures....|
00001ce0  15 f2 63 68 61 6e 67 65  69 63 28 64 65 66 69 63  |..changeic(defic|
00001cf0  24 29 0d 0a d2 0f e7 63  61 6e 63 65 6c 25 3d 30  |$).....cancel%=0|
00001d00  8c 0d 0a dc 12 20 20 f2  73 61 76 65 67 72 70 64  |.....  .savegrpd|
00001d10  61 74 61 0d 0a e6 12 20  20 f2 64 65 6c 5f 72 65  |ata....  .del_re|
00001d20  63 66 69 6c 65 0d 0a f0  18 20 20 e7 6b 65 65 70  |cfile....  .keep|
00001d30  62 25 3c 3e 30 84 64 65  6c 25 3d 30 8c 0d 0a fa  |b%<>0.del%=0....|
00001d40  3b 20 20 20 20 e7 a4 6d  6f 76 65 74 6f 64 65 62  |;    ..movetodeb|
00001d50  75 67 28 62 61 74 63 68  66 24 29 3c 3e 30 8c 46  |ug(batchf$)<>0.F|
00001d60  25 3d a4 66 6f 72 63 65  64 65 6c 66 69 6c 65 28  |%=.forcedelfile(|
00001d70  62 61 74 63 68 66 24 29  0d 0b 04 09 20 20 20 20  |batchf$)....    |
00001d80  cc 0d 0b 0e 21 20 20 20  20 46 25 3d a4 66 6f 72  |....!    F%=.for|
00001d90  63 65 64 65 6c 66 69 6c  65 28 62 61 74 63 68 66  |cedelfile(batchf|
00001da0  24 29 0d 0b 18 07 20 20  cd 0d 0b 22 28 20 20 e7  |$)....  ..."(  .|
00001db0  46 25 3c 3e 30 8c f2 6d  65 73 73 61 67 65 31 28  |F%<>0..message1(|
00001dc0  22 44 64 65 6c 66 61 69  6c 22 2c 62 66 24 2c 31  |"Ddelfail",bf$,1|
00001dd0  29 0d 0b 2c 17 20 20 70  6f 73 74 66 65 74 63 68  |)..,.  postfetch|
00001de0  72 65 61 64 79 25 3d 31  0d 0b 36 27 20 20 f2 65  |ready%=1..6'  .e|
00001df0  78 70 6d 69 73 63 64 69  72 28 62 61 64 64 69 72  |xpmiscdir(baddir|
00001e00  24 2c 64 62 67 5f 65 78  70 74 69 6d 65 25 29 0d  |$,dbg_exptime%).|
00001e10  0b 40 05 cd 0d 0b 4a 0b  f2 61 72 72 69 76 65 0d  |.@....J..arrive.|
00001e20  0b 54 05 e1 0d 0b 5e 04  0d 0b 68 15 dd a4 6d 6f  |.T....^...h...mo|
00001e30  76 65 74 6f 64 65 62 75  67 28 66 24 29 0d 0b 72  |vetodebug(f$)..r|
00001e40  14 ea 46 25 2c 6e 25 2c  64 24 2c 62 66 24 2c 62  |..F%,n%,d$,bf$,b|
00001e50  25 0d 0b 7c 11 62 66 24  3d a4 6c 65 61 66 28 66  |%..|.bf$=.leaf(f|
00001e60  24 29 0d 0b 86 25 64 24  3d 62 61 64 64 69 72 24  |$)...%d$=baddir$|
00001e70  2b 22 2e 22 2b 62 66 24  3a f2 65 6e 73 75 72 65  |+"."+bf$:.ensure|
00001e80  64 69 72 28 64 24 29 0d  0b 90 1e e7 a4 6f 62 6a  |dir(d$)......obj|
00001e90  74 79 70 65 28 64 24 29  3c 32 8c 64 24 3d 62 61  |type(d$)<2.d$=ba|
00001ea0  64 64 69 72 24 0d 0b 9a  0a 6e 25 3d 31 3a f5 0d  |ddir$....n%=1:..|
00001eb0  0b a4 21 20 20 3f 74 6d  70 25 3d 33 3a c8 99 22  |..!  ?tmp%=3:.."|
00001ec0  4f 53 5f 57 6f 72 64 22  2c 31 34 2c 74 6d 70 25  |OS_Word",14,tmp%|
00001ed0  0d 0b ae 4f 20 20 c8 99  22 54 65 72 72 69 74 6f  |...O  .."Territo|
00001ee0  72 79 5f 43 6f 6e 76 65  72 74 44 61 74 65 41 6e  |ry_ConvertDateAn|
00001ef0  64 54 69 6d 65 22 2c 31  2c 74 6d 70 25 2c 74 6d  |dTime",1,tmp%,tm|
00001f00  70 25 2b 31 32 38 2c 31  32 38 2c 22 25 4d 4e 25  |p%+128,128,"%MN%|
00001f10  44 59 25 32 34 25 4d 49  25 53 45 22 b8 62 25 0d  |DY%24%MI%SE".b%.|
00001f20  0b b8 2a 20 20 6e 25 2b  3d 31 3a 46 25 3d a4 72  |..*  n%+=1:F%=.r|
00001f30  65 6e 61 6d 65 28 66 24  2c 64 24 2b 22 2e 22 2b  |ename(f$,d$+"."+|
00001f40  a4 73 74 72 28 62 25 29  29 0d 0b c2 0e fd 6e 25  |.str(b%)).....n%|
00001f50  3e 39 84 46 25 3d 30 0d  0b cc 07 3d 46 25 0d 0b  |>9.F%=0....=F%..|
00001f60  d6 04 0d 0b e0 0c dd f2  61 72 72 69 76 65 0d 0b  |........arrive..|
00001f70  ea 0a ea 61 24 2c 61 25  0d 0b f4 0e c8 8e 61 72  |...a$,a%......ar|
00001f80  72 61 72 74 25 ca 0d 0b  fe 1b 20 20 c9 30 3a 61  |rart%.....  .0:a|
00001f90  24 3d a4 6d 73 67 30 28  22 4e 6f 6e 65 77 73 22  |$=.msg0("Nonews"|
00001fa0  29 0d 0c 08 1d 20 20 c9  31 3a 61 24 3d a4 6d 73  |)....  .1:a$=.ms|
00001fb0  67 30 28 22 4e 65 77 6e  65 77 73 31 22 29 0d 0c  |g0("Newnews1")..|
00001fc0  12 24 20 20 7f 3a 61 24  3d a4 6d 73 67 31 28 22  |.$  .:a$=.msg1("|
00001fd0  4e 65 77 6e 65 77 73 22  2c c3 61 72 72 61 72 74  |Newnews",.arrart|
00001fe0  25 29 0d 0c 1c 05 cb 0d  0c 26 23 f2 75 70 64 61  |%).......&#.upda|
00001ff0  74 65 69 63 6f 6e 73 74  72 69 6e 67 28 61 72 72  |teiconstring(arr|
00002000  69 76 65 25 2c 31 2c 61  24 29 0d 0c 30 44 e7 61  |ive%,1,a$)..0D.a|
00002010  72 72 6d 61 69 6c 24 3e  22 22 8c 61 24 3d a4 6d  |rrmail$>"".a$=.m|
00002020  73 67 31 28 22 4e 65 77  6d 61 69 6c 22 2c c1 61  |sg1("Newmail",.a|
00002030  72 72 6d 61 69 6c 24 2c  32 29 29 8b 61 24 3d a4  |rrmail$,2)).a$=.|
00002040  6d 73 67 30 28 22 4e 6f  6d 61 69 6c 22 29 0d 0c  |msg0("Nomail")..|
00002050  3a 28 f2 75 70 64 61 74  65 69 63 6f 6e 73 74 72  |:(.updateiconstr|
00002060  69 6e 67 28 61 72 72 69  76 65 25 2c 32 2c c0 61  |ing(arrive%,2,.a|
00002070  24 2c 33 36 29 29 0d 0c  44 0c e7 61 6c 65 72 74  |$,36))..D..alert|
00002080  25 8c 0d 0c 4e 2d 20 20  e7 61 72 72 6d 61 69 6c  |%...N-  .arrmail|
00002090  24 3e 22 22 84 28 61 72  72 61 72 74 25 3e 30 80  |$>"".(arrart%>0.|
000020a0  61 6c 65 72 74 6e 65 77  73 25 3c 3e 30 29 8c 0d  |alertnews%<>0)..|
000020b0  0c 58 37 20 20 20 20 e7  61 72 72 6f 70 65 6e 25  |.X7    .arropen%|
000020c0  3d 30 f2 63 66 72 6f 6e  74 28 61 72 72 69 76 65  |=0.cfront(arrive|
000020d0  25 2c 30 2c 30 29 8b f2  66 72 6f 6e 74 28 61 72  |%,0,0)..front(ar|
000020e0  72 69 76 65 25 29 0d 0c  62 37 20 20 20 20 61 25  |rive%)..b7    a%|
000020f0  3d 31 3a e7 64 65 66 63  6c 69 65 6e 74 24 3e 22  |=1:.defclient$>"|
00002100  22 80 a4 6f 62 6a 74 79  70 65 28 64 65 66 63 6c  |"..objtype(defcl|
00002110  69 65 6e 74 24 29 3e 30  8c 61 25 3d 30 0d 0c 6c  |ient$)>0.a%=0..l|
00002120  20 20 20 20 20 f2 73 65  74 73 68 61 64 65 64 28  |     .setshaded(|
00002130  61 72 72 69 76 65 25 2c  33 2c 61 25 29 0d 0c 76  |arrive%,3,a%)..v|
00002140  15 20 20 20 20 e7 61 6c  65 72 74 62 65 65 70 25  |.    .alertbeep%|
00002150  ef 37 0d 0c 80 07 20 20  cd 0d 0c 8a 05 cd 0d 0c  |.7....  ........|
00002160  94 05 e1 0d 0c 9e 04 0d  0c a8 11 dd f2 73 61 76  |.............sav|
00002170  65 67 72 70 64 61 74 61  0d 0c b2 13 e7 73 74 61  |egrpdata.....sta|
00002180  72 74 75 70 6f 6b 25 3c  3e 30 8c 0d 0c bc 13 20  |rtupok%<>0..... |
00002190  20 f2 77 72 69 74 65 67  72 70 64 61 74 61 0d 0c  | .writegrpdata..|
000021a0  c6 14 20 20 f2 77 72 69  74 65 69 6e 64 65 78 62  |..  .writeindexb|
000021b0  75 66 0d 0c d0 05 cd 0d  0c da 13 f2 61 64 64 64  |uf..........addd|
000021c0  65 6c 62 75 66 28 30 2c  30 29 0d 0c e4 05 e1 0d  |elbuf(0,0)......|
000021d0  0c ee 04 0d 0c f8 0f dd  f2 64 6f 61 72 74 69 63  |.........doartic|
000021e0  6c 65 0d 0d 02 22 f2 65  78 74 65 6e 64 28 69 6e  |le...".extend(in|
000021f0  62 75 66 73 69 7a 65 25  2b 64 65 66 61 72 74 62  |bufsize%+defartb|
00002200  75 66 25 29 0d 0d 0c 10  f2 63 6c 65 61 72 68 65  |uf%).....clearhe|
00002210  61 64 65 72 0d 0d 16 30  6f 75 74 67 25 28 29 3d  |ader...0outg%()=|
00002220  30 3a 70 74 72 25 3d 30  3a 69 6e 68 64 72 25 3d  |0:ptr%=0:inhdr%=|
00002230  b9 3a 6f 75 74 24 3d 22  22 3a 66 6f 75 6e 64 69  |.:out$="":foundi|
00002240  64 25 3d 30 0d 0d 20 31  6e 65 78 74 61 72 74 70  |d%=0.. 1nextartp|
00002250  6f 73 25 3d 70 6f 73 25  2b 74 68 69 73 61 72 74  |os%=pos%+thisart|
00002260  6c 65 6e 25 3a 74 68 69  73 61 72 74 70 6f 73 25  |len%:thisartpos%|
00002270  3d 70 6f 73 25 0d 0d 2a  05 f5 0d 0d 34 0e 20 20  |=pos%..*....4.  |
00002280  e7 69 6e 68 64 72 25 8c  0d 0d 3e 33 20 20 20 20  |.inhdr%...>3    |
00002290  f2 68 65 61 64 65 72 6c  69 6e 65 28 6c 69 6e 65  |.headerline(line|
000022a0  24 29 3a 73 74 61 72 74  25 3d 30 3a f2 70 6f 6c  |$):start%=0:.pol|
000022b0  6c 28 73 6c 69 63 65 25  2a 32 29 0d 0d 48 30 20  |l(slice%*2)..H0 |
000022c0  20 20 20 e7 64 69 73 63  61 72 64 25 3d 30 f2 61  |   .discard%=0.a|
000022d0  64 64 74 6f 62 75 66 66  65 72 28 6c 69 6e 65 24  |ddtobuffer(line$|
000022e0  29 3a 8b f2 64 69 73 63  61 72 64 0d 0d 52 3f 20  |):..discard..R? |
000022f0  20 20 20 e7 6c 69 6e 65  24 3d 22 22 8c 69 6e 68  |   .line$="".inh|
00002300  64 72 25 3d a3 3a e7 74  68 69 73 61 72 74 6c 65  |dr%=.:.thisartle|
00002310  6e 25 3e 30 8c f2 62 6c  6f 63 6b 6d 6f 76 65 3a  |n%>0..blockmove:|
00002320  f2 62 61 74 63 68 70 6f  6c 6c 0d 0d 5c 09 20 20  |.batchpoll..\.  |
00002330  20 20 cc 0d 0d 66 26 20  20 20 20 f2 61 64 64 74  |  ...f&    .addt|
00002340  6f 62 75 66 66 65 72 28  6c 69 6e 65 24 29 3a f2  |obuffer(line$):.|
00002350  62 61 74 63 68 70 6f 6c  6c 0d 0d 70 07 20 20 cd  |batchpoll..p.  .|
00002360  0d 0d 7a 14 20 20 6c 69  6e 65 24 3d a4 67 65 74  |..z.  line$=.get|
00002370  6c 69 6e 65 0d 0d 84 43  20 20 e7 69 6e 68 64 72  |line...C  .inhdr|
00002380  25 3d 30 80 70 6f 73 25  3e 6e 65 78 74 61 72 74  |%=0.pos%>nextart|
00002390  70 6f 73 25 2d 31 30 30  8c e7 c0 6c 69 6e 65 24  |pos%-100...line$|
000023a0  2c 73 65 70 6c 65 6e 25  29 3d 73 65 70 24 8c 73  |,seplen%)=sep$.s|
000023b0  74 61 72 74 25 3d b9 0d  0d 8e 17 fd 73 74 61 72  |tart%=......star|
000023c0  74 25 3c 3e 30 20 84 65  6f 66 25 3c 3e 30 0d 0d  |t%<>0 .eof%<>0..|
000023d0  98 3c e7 c0 6c 69 6e 65  24 2c 34 29 3d 22 23 21  |.<..line$,4)="#!|
000023e0  20 72 22 8c 74 68 69 73  61 72 74 6c 65 6e 25 3d  | r".thisartlen%=|
000023f0  bb c1 6c 69 6e 65 24 2c  31 30 29 3a 8b 74 68 69  |..line$,10):.thi|
00002400  73 61 72 74 6c 65 6e 25  3d 30 0d 0d a2 2a 64 6f  |sartlen%=0...*do|
00002410  6e 65 25 2b 3d 31 3a 74  6f 74 61 6c 25 2b 3d 31  |ne%+=1:total%+=1|
00002420  3a e7 74 79 70 65 25 3d  31 8c 61 72 72 61 72 74  |:.type%=1.arrart|
00002430  25 2b 3d 31 0d 0d ac 05  e1 0d 0d b6 04 0d 0d c0  |%+=1............|
00002440  0d dd f2 64 69 73 63 61  72 64 0d 0d ca 14 ea 74  |...discard.....t|
00002450  6d 70 24 3a 74 6d 70 24  3d 6c 69 6e 65 24 0d 0d  |mp$:tmp$=line$..|
00002460  d4 1b c8 95 6c 6f 6e 67  25 3a 74 6d 70 24 3d a4  |....long%:tmp$=.|
00002470  67 65 74 6c 69 6e 65 3a  ce 0d 0d de 05 e1 0d 0d  |getline:........|
00002480  e8 04 0d 0d f2 0f dd f2  62 61 74 63 68 70 6f 6c  |........batchpol|
00002490  6c 0d 0d fc 3e f2 70 6f  6c 6c 28 73 6c 69 63 65  |l...>.poll(slice|
000024a0  25 29 3a e7 94 28 74 69  6d 65 25 2d 73 74 69 6d  |%):..(time%-stim|
000024b0  65 25 29 3e 32 30 30 8c  f2 75 70 64 61 74 65 70  |e%)>200..updatep|
000024c0  6f 73 3a 73 74 69 6d 65  25 3d 74 69 6d 65 25 0d  |os:stime%=time%.|
000024d0  0e 06 05 e1 0d 0e 10 04  0d 0e 1a 0f dd f2 62 6c  |..............bl|
000024e0  6f 63 6b 6d 6f 76 65 0d  0e 24 1d ea 6c 25 2c 46  |ockmove..$..l%,F|
000024f0  25 2c 6d 25 2c 61 30 25  2c 61 31 25 2c 61 32 25  |%,m%,a0%,a1%,a2%|
00002500  2c 61 33 25 0d 0e 2e 23  6c 25 3d 74 68 69 73 61  |,a3%...#l%=thisa|
00002510  72 74 6c 65 6e 25 2d 70  6f 73 25 2b 74 68 69 73  |rtlen%-pos%+this|
00002520  61 72 74 70 6f 73 25 0d  0e 38 1e e7 62 75 66 70  |artpos%..8..bufp|
00002530  74 72 25 2b 6c 25 2b 34  3e 69 6e 62 75 66 73 69  |tr%+l%+4>inbufsi|
00002540  7a 65 25 8c e1 0d 0e 42  3b 6d 25 3d 69 6e 62 75  |ze%....B;m%=inbu|
00002550  66 25 2b 62 75 66 70 74  72 25 2b 6c 25 3a 61 30  |f%+bufptr%+l%:a0|
00002560  25 3d 3f 6d 25 3a 61 31  25 3d 6d 25 3f 31 3a 61  |%=?m%:a1%=m%?1:a|
00002570  32 25 3d 6d 25 3f 32 3a  61 33 25 3d 6d 25 3f 33  |2%=m%?2:a3%=m%?3|
00002580  0d 0e 4c 52 f4 20 63 68  65 63 6b 20 66 6f 72 20  |..LR. check for |
00002590  22 23 21 20 72 22 20 77  69 74 68 6f 75 74 20 72  |"#! r" without r|
000025a0  65 61 64 69 6e 67 20 73  74 72 69 6e 67 20 28 62  |eading string (b|
000025b0  75 66 66 65 72 20 6f 76  65 72 72 75 6e 2d 70 6f  |uffer overrun-po|
000025c0  73 73 69 62 6c 65 20 64  61 74 61 20 61 62 6f 72  |ssible data abor|
000025d0  74 29 0d 0e 56 22 e7 61  30 25 3d 33 35 80 61 31  |t)..V".a0%=35.a1|
000025e0  25 3d 33 33 80 61 32 25  3d 33 32 80 61 33 25 3d  |%=33.a2%=32.a3%=|
000025f0  31 31 34 8c 0d 0e 60 3c  20 20 e7 70 74 72 25 2b  |114...`<  .ptr%+|
00002600  6c 25 3e 62 75 66 73 69  7a 65 25 8c f2 65 78 74  |l%>bufsize%..ext|
00002610  65 6e 64 28 69 6e 62 75  66 73 69 7a 65 25 2b 62  |end(inbufsize%+b|
00002620  75 66 73 69 7a 65 25 2b  6c 25 2b 31 30 32 34 29  |ufsize%+l%+1024)|
00002630  0d 0e 6a 4d 20 20 c8 99  22 58 57 69 6d 70 5f 54  |..jM  .."XWimp_T|
00002640  72 61 6e 73 66 65 72 42  6c 6f 63 6b 22 2c 74 61  |ransferBlock",ta|
00002650  73 6b 25 2c 69 6e 62 75  66 25 2b 62 75 66 70 74  |sk%,inbuf%+bufpt|
00002660  72 25 2c 74 61 73 6b 25  2c 61 72 74 62 61 73 65  |r%,task%,artbase|
00002670  25 2b 70 74 72 25 2c 6c  25 b8 3b 46 25 0d 0e 74  |%+ptr%,l%.;F%..t|
00002680  2d 20 20 e7 28 46 25 80  31 29 3d 30 8c 70 6f 73  |-  .(F%.1)=0.pos|
00002690  25 2b 3d 6c 25 3a 70 74  72 25 2b 3d 6c 25 3a 62  |%+=l%:ptr%+=l%:b|
000026a0  75 66 70 74 72 25 2b 3d  6c 25 0d 0e 7e 05 cd 0d  |ufptr%+=l%..~...|
000026b0  0e 88 05 e1 0d 0e 92 04  0d 0e 9c 11 dd f2 63 6c  |..............cl|
000026c0  65 61 72 68 65 61 64 65  72 0d 0e a6 4f 74 6f 24  |earheader...Oto$|
000026d0  3d 22 3c 62 6c 61 6e 6b  3e 22 3a 66 72 6f 6d 24  |="<blank>":from$|
000026e0  3d 22 28 6e 6f 20 73 65  6e 64 65 72 29 22 3a 73  |="(no sender)":s|
000026f0  75 62 6a 65 63 74 24 3d  22 28 6e 6f 20 73 75 62  |ubject$="(no sub|
00002700  6a 65 63 74 29 22 3a 63  63 24 3d 22 22 3a 6f 72  |ject)":cc$="":or|
00002710  69 67 74 6f 24 3d 22 22  0d 0e b0 4f 6d 65 73 73  |igto$=""...Omess|
00002720  69 64 24 3d 22 3c 30 3e  22 3a 6e 65 77 73 67 72  |id$="<0>":newsgr|
00002730  6f 75 70 24 3d 22 22 3a  65 78 70 69 72 65 73 25  |oup$="":expires%|
00002740  3d 30 3a 61 72 74 64 61  74 65 25 3d 30 3a 73 75  |=0:artdate%=0:su|
00002750  70 65 72 73 65 64 65 24  3d 22 22 3a 63 6f 6e 74  |persede$="":cont|
00002760  72 6f 6c 24 3d 22 22 0d  0e ba 4e 72 65 63 65 69  |rol$=""...Nrecei|
00002770  70 74 24 3d 22 22 3a 6c  61 73 74 68 25 3d 30 3a  |pt$="":lasth%=0:|
00002780  70 72 65 63 65 64 65 6e  63 65 24 3d 22 22 3a 72  |precedence$="":r|
00002790  65 70 6c 79 74 6f 24 3d  22 22 3a 61 70 70 72 6f  |eplyto$="":appro|
000027a0  76 65 64 24 3d 22 22 3a  72 65 66 65 72 65 6e 63  |ved$="":referenc|
000027b0  65 24 3d 22 22 0d 0e c4  05 e1 0d 0e ce 04 0d 0e  |e$=""...........|
000027c0  d8 21 dd a4 69 64 65 6e  74 69 66 79 66 69 6c 65  |.!..identifyfile|
000027d0  28 66 69 6c 65 24 2c 6f  66 66 73 65 74 25 29 0d  |(file$,offset%).|
000027e0  0e e2 23 ea 74 25 2c 6c  63 25 2c 63 6c 75 65 25  |..#.t%,lc%,clue%|
000027f0  2c 61 24 3a 74 25 3d 2d  31 3a 63 6c 75 65 25 3d  |,a$:t%=-1:clue%=|
00002800  2d 31 0d 0e ec 05 f5 0d  0e f6 14 20 20 6c 69 6e  |-1.........  lin|
00002810  65 24 3d a4 67 65 74 6c  69 6e 65 0d 0f 00 31 20  |e$=.getline...1 |
00002820  20 6c 63 25 2b 3d 31 3a  6c 69 6e 65 24 3d a4 63  | lc%+=1:line$=.c|
00002830  6c 65 61 6e 28 6c 69 6e  65 24 29 3a 61 24 3d a4  |lean(line$):a$=.|
00002840  6c 6f 77 65 72 28 6c 69  6e 65 24 29 0d 0f 0a 28  |lower(line$)...(|
00002850  20 20 e7 97 28 6c 69 6e  65 24 29 3d 31 8c 74 25  |  ..(line$)=1.t%|
00002860  3d 30 3a 73 65 70 24 3d  bd 31 3a 69 64 65 6e 74  |=0:sep$=.1:ident|
00002870  24 3d 22 22 0d 0f 14 34  20 20 e7 c0 6c 69 6e 65  |$=""...4  ..line|
00002880  24 2c 35 29 3d 22 46 72  6f 6d 20 22 8c 74 25 3d  |$,5)="From ".t%=|
00002890  30 3a 73 65 70 24 3d 22  46 72 6f 6d 20 22 3a 69  |0:sep$="From ":i|
000028a0  64 65 6e 74 24 3d 22 22  0d 0f 1e 52 20 20 e7 c0  |dent$=""...R  ..|
000028b0  6c 69 6e 65 24 2c 38 29  3d 22 23 21 20 72 6d 61  |line$,8)="#! rma|
000028c0  69 6c 22 8c 74 25 3d 30  3a 73 65 70 24 3d 22 23  |il".t%=0:sep$="#|
000028d0  21 20 72 6d 61 69 6c 22  3a 69 64 65 6e 74 24 3d  |! rmail":ident$=|
000028e0  22 22 3a 74 68 69 73 61  72 74 6c 65 6e 25 3d bb  |"":thisartlen%=.|
000028f0  c1 6c 69 6e 65 24 2c 31  30 29 0d 0f 28 5d 20 20  |.line$,10)..(]  |
00002900  e7 c0 6c 69 6e 65 24 2c  38 29 3d 22 23 21 20 72  |..line$,8)="#! r|
00002910  6e 65 77 73 22 8c 74 25  3d 31 3a 73 65 70 24 3d  |news".t%=1:sep$=|
00002920  22 23 21 20 72 6e 65 77  73 22 3a 69 64 65 6e 74  |"#! rnews":ident|
00002930  24 3d 22 4e 65 77 73 67  72 6f 75 70 73 3a 22 3a  |$="Newsgroups:":|
00002940  74 68 69 73 61 72 74 6c  65 6e 25 3d bb c1 6c 69  |thisartlen%=..li|
00002950  6e 65 24 2c 31 30 29 0d  0f 32 42 20 20 e7 c0 61  |ne$,10)..2B  ..a|
00002960  24 2c 31 31 29 3d 22 6e  65 77 73 67 72 6f 75 70  |$,11)="newsgroup|
00002970  73 3a 22 84 c0 61 24 2c  35 29 3d 22 78 72 65 66  |s:"..a$,5)="xref|
00002980  3a 22 84 c0 61 24 2c 35  29 3d 22 70 61 74 68 3a  |:"..a$,5)="path:|
00002990  22 8c 63 6c 75 65 25 3d  31 0d 0f 3c 35 20 20 e7  |".clue%=1..<5  .|
000029a0  c0 61 24 2c 34 29 3d 22  74 6f 3a 20 22 84 c0 61  |.a$,4)="to: "..a|
000029b0  24 2c 31 34 29 3d 22 61  70 70 61 72 65 6e 74 6c  |$,14)="apparentl|
000029c0  79 2d 74 6f 3a 22 8c 63  6c 75 65 25 3d 30 0d 0f  |y-to:".clue%=0..|
000029d0  46 12 fd 74 25 3e 3d 30  84 65 6f 66 25 3c 3e 30  |F..t%>=0.eof%<>0|
000029e0  0d 0f 50 0a e7 74 25 3c  30 8c 0d 0f 5a 2f 20 20  |..P..t%<0...Z/  |
000029f0  74 25 3d 31 3a 73 65 70  24 3d 22 23 21 20 72 6e  |t%=1:sep$="#! rn|
00002a00  65 77 73 22 3a 69 64 65  6e 74 24 3d 22 4e 65 77  |ews":ident$="New|
00002a10  73 67 72 6f 75 70 73 3a  22 0d 0f 64 2a 20 20 e7  |sgroups:"..d*  .|
00002a20  63 6c 75 65 25 3d 30 8c  74 25 3d 30 3a 73 65 70  |clue%=0.t%=0:sep|
00002a30  24 3d 22 46 72 6f 6d 20  22 3a 69 64 65 6e 74 24  |$="From ":ident$|
00002a40  3d 22 22 0d 0f 6e 05 cd  0d 0f 78 2a e7 6c 63 25  |=""..n....x*.lc%|
00002a50  3e 31 8c f2 72 65 73 74  61 72 74 62 61 74 63 68  |>1..restartbatch|
00002a60  28 66 69 6c 65 24 2c 74  25 2c 6f 66 66 73 65 74  |(file$,t%,offset|
00002a70  25 29 0d 0f 82 11 73 65  70 6c 65 6e 25 3d a9 73  |%)....seplen%=.s|
00002a80  65 70 24 0d 0f 8c 07 3d  74 25 0d 0f 96 04 0d 0f  |ep$....=t%......|
00002a90  a0 17 dd f2 68 65 61 64  65 72 6c 69 6e 65 28 6c  |....headerline(l|
00002aa0  69 6e 65 24 29 0d 0f aa  07 ea 41 24 0d 0f b4 34  |ine$).....A$...4|
00002ab0  e7 73 65 70 24 3c 3e 22  46 72 6f 6d 20 22 80 c0  |.sep$<>"From "..|
00002ac0  6c 69 6e 65 24 2c 73 65  70 6c 65 6e 25 29 3d 73  |line$,seplen%)=s|
00002ad0  65 70 24 8c 64 69 73 63  61 72 64 25 3d b9 3a e1  |ep$.discard%=.:.|
00002ae0  0d 0f be 18 f2 73 65 74  68 65 61 64 65 72 76 61  |.....setheaderva|
00002af0  72 28 6c 69 6e 65 24 29  0d 0f c8 34 e7 74 79 70  |r(line$)...4.typ|
00002b00  65 25 3d 31 80 c0 6c 69  6e 65 24 2c 35 29 3d 22  |e%=1..line$,5)="|
00002b10  50 61 74 68 3a 22 8c f2  61 64 64 75 73 74 6f 70  |Path:"..addustop|
00002b20  61 74 68 28 6c 69 6e 65  24 29 3a e1 0d 0f d2 11  |ath(line$):.....|
00002b30  e7 66 6f 75 6e 64 69 64  25 3e 30 8c e1 0d 0f dc  |.foundid%>0.....|
00002b40  17 e7 74 79 70 65 25 3d  30 84 6c 61 73 74 68 25  |..type%=0.lasth%|
00002b50  3d 31 31 8c 0d 0f e6 0f  20 20 e7 74 79 70 65 25  |=11.....  .type%|
00002b60  3d 30 8c 0d 0f f0 3d 20  20 20 20 41 24 3d 22 45  |=0....=    A$="E|
00002b70  6d 61 69 6c 2e 22 2b 62  66 24 3a e7 a4 75 73 65  |mail."+bf$:..use|
00002b80  72 6f 6b 28 62 66 24 29  3d 30 8c 41 24 3d 22 45  |rok(bf$)=0.A$="E|
00002b90  6d 61 69 6c 2e 70 6f 73  74 6d 61 73 74 65 72 22  |mail.postmaster"|
00002ba0  0d 0f fa 09 20 20 20 20  cc 0d 10 04 1f 20 20 20  |....    .....   |
00002bb0  20 41 24 3d 6e 65 77 73  67 72 6f 75 70 24 3a 6f  | A$=newsgroup$:o|
00002bc0  75 74 67 25 28 29 3d 30  0d 10 0e 07 20 20 cd 0d  |utg%()=0....  ..|
00002bd0  10 18 45 20 20 f2 61 64  64 68 65 61 64 65 72 74  |..E  .addheadert|
00002be0  6f 62 75 66 66 65 72 28  6c 69 6e 65 24 29 3a f2  |obuffer(line$):.|
00002bf0  67 72 6f 75 70 73 6c 69  6e 65 28 41 24 29 3a 64  |groupsline(A$):d|
00002c00  69 73 63 61 72 64 25 3d  b9 3a 66 6f 75 6e 64 69  |iscard%=.:foundi|
00002c10  64 25 3d 31 0d 10 22 16  20 20 e7 74 79 70 65 25  |d%=1..".  .type%|
00002c20  3d 31 8c f2 64 6f 78 72  65 66 0d 10 2c 05 cd 0d  |=1..doxref..,...|
00002c30  10 36 05 e1 0d 10 40 04  0d 10 4a 16 dd f2 73 65  |.6....@...J...se|
00002c40  74 68 65 61 64 65 72 76  61 72 28 41 24 29 0d 10  |theadervar(A$)..|
00002c50  54 11 ea 6e 6f 25 3a e7  41 24 3d 22 22 8c e1 0d  |T..no%:.A$=""...|
00002c60  10 5e 15 d6 68 65 61 64  65 72 6e 6f 25 2c 41 24  |.^..headerno%,A$|
00002c70  2c 6e 6f 25 0d 10 68 0a  c8 8e 6e 6f 25 ca 0d 10  |,no%..h...no%...|
00002c80  72 20 20 20 c9 31 3a 73  75 62 6a 65 63 74 24 3d  |r   .1:subject$=|
00002c90  a4 63 6c 65 61 6e 28 c1  41 24 2c 39 29 29 0d 10  |.clean(.A$,9))..|
00002ca0  7c 1d 20 20 c9 32 3a 66  72 6f 6d 24 3d a4 63 6c  ||.  .2:from$=.cl|
00002cb0  65 61 6e 28 c1 41 24 2c  36 29 29 0d 10 86 20 20  |ean(.A$,6))...  |
00002cc0  20 c9 33 3a 6d 65 73 73  69 64 24 3d a4 63 6c 65  | .3:messid$=.cle|
00002cd0  61 6e 28 c1 41 24 2c 31  32 29 29 0d 10 90 23 20  |an(.A$,12))...# |
00002ce0  20 c9 34 3a 73 75 70 65  72 73 65 64 65 24 3d a4  | .4:supersede$=.|
00002cf0  63 6c 65 61 6e 28 c1 41  24 2c 31 32 29 29 0d 10  |clean(.A$,12))..|
00002d00  9a 25 20 20 c9 35 3a 65  78 70 69 72 65 73 25 3d  |.%  .5:expires%=|
00002d10  a4 64 65 63 6f 64 65 64  61 74 65 28 c1 41 24 2c  |.decodedate(.A$,|
00002d20  39 29 29 0d 10 a4 20 20  20 c9 36 3a 63 6f 6e 74  |9))...   .6:cont|
00002d30  72 6f 6c 24 3d a4 63 6c  65 61 6e 28 c1 41 24 2c  |rol$=.clean(.A$,|
00002d40  39 29 29 0d 10 ae 25 20  20 c9 37 3a 61 72 74 64  |9))...%  .7:artd|
00002d50  61 74 65 25 3d a4 64 65  63 6f 64 65 64 61 74 65  |ate%=.decodedate|
00002d60  28 c1 41 24 2c 37 29 29  0d 10 b8 13 20 20 c9 38  |(.A$,7))....  .8|
00002d70  3a 64 69 73 63 61 72 64  25 3d b9 0d 10 c2 24 20  |:discard%=....$ |
00002d80  20 c9 39 3a e7 74 6f 24  3d 22 22 8c 74 6f 24 3d  | .9:.to$="".to$=|
00002d90  a4 63 6c 65 61 6e 28 c1  41 24 2c 31 35 29 29 0d  |.clean(.A$,15)).|
00002da0  10 cc 1c 20 20 c9 31 30  3a 74 6f 24 3d a4 63 6c  |...  .10:to$=.cl|
00002db0  65 61 6e 28 c1 41 24 2c  34 29 29 0d 10 d6 24 20  |ean(.A$,4))...$ |
00002dc0  20 c9 31 31 3a 6e 65 77  73 67 72 6f 75 70 24 3d  | .11:newsgroup$=|
00002dd0  a4 63 6c 65 61 6e 28 c1  41 24 2c 31 32 29 29 0d  |.clean(.A$,12)).|
00002de0  10 e0 22 20 20 c9 31 32  3a 72 65 63 65 69 70 74  |.."  .12:receipt|
00002df0  24 3d a4 63 6c 65 61 6e  28 c1 41 24 2c 32 30 29  |$=.clean(.A$,20)|
00002e00  29 0d 10 ea 25 20 20 c9  31 33 3a 70 72 65 63 65  |)...%  .13:prece|
00002e10  64 65 6e 63 65 24 3d a4  63 6c 65 61 6e 28 c1 41  |dence$=.clean(.A|
00002e20  24 2c 31 32 29 29 0d 10  f4 22 20 20 c9 31 34 3a  |$,12))..."  .14:|
00002e30  72 65 70 6c 79 74 6f 24  3d a4 63 6c 65 61 6e 28  |replyto$=.clean(|
00002e40  c1 41 24 2c 31 30 29 29  0d 10 fe 23 20 20 c9 31  |.A$,10))...#  .1|
00002e50  35 3a 61 70 70 72 6f 76  65 64 24 3d a4 63 6c 65  |5:approved$=.cle|
00002e60  61 6e 28 c1 41 24 2c 31  30 29 29 0d 11 08 42 20  |an(.A$,10))...B |
00002e70  20 c9 31 36 3a f2 61 64  64 74 6f 62 75 66 66 65  | .16:.addtobuffe|
00002e80  72 28 41 24 29 3a 64 69  73 63 61 72 64 25 3d b9  |r(A$):discard%=.|
00002e90  3a 6c 69 6e 65 24 3d 22  22 3a f4 20 22 4d 65 73  |:line$="":. "Mes|
00002ea0  73 61 67 65 3a 22 20 68  65 61 64 65 72 0d 11 12  |sage:" header...|
00002eb0  24 20 20 c9 31 37 3a 72  65 66 65 72 65 6e 63 65  |$  .17:reference|
00002ec0  24 3d a4 63 6c 65 61 6e  28 c1 41 24 2c 31 32 29  |$=.clean(.A$,12)|
00002ed0  29 0d 11 1c 1c 20 20 c9  31 38 3a 63 63 24 3d a4  |)....  .18:cc$=.|
00002ee0  63 6c 65 61 6e 28 c1 41  24 2c 35 29 29 0d 11 26  |clean(.A$,5))..&|
00002ef0  21 20 20 c9 31 39 3a 6f  72 69 67 74 6f 24 3d a4  |!  .19:origto$=.|
00002f00  63 6c 65 61 6e 28 c1 41  24 2c 31 39 29 29 0d 11  |clean(.A$,19))..|
00002f10  30 16 20 20 c9 32 30 3a  f4 20 45 72 72 6f 72 73  |0.  .20:. Errors|
00002f20  2d 54 6f 3a 0d 11 3a 32  20 20 7f 3a e7 c0 41 24  |-To:..:2  .:..A$|
00002f30  2c 31 29 3d 22 20 22 8c  f2 63 6f 6e 74 68 6c 69  |,1)=" "..conthli|
00002f40  6e 65 28 41 24 2c 6c 61  73 74 68 25 29 8b 6c 61  |ne(A$,lasth%).la|
00002f50  73 68 68 25 3d 30 0d 11  44 05 cb 0d 11 4e 15 e7  |shh%=0..D....N..|
00002f60  6e 6f 25 3e 30 8c 6c 61  73 74 68 25 3d 6e 6f 25  |no%>0.lasth%=no%|
00002f70  0d 11 58 05 e1 0d 11 62  04 0d 11 6c 16 dd f2 63  |..X....b...l...c|
00002f80  6f 6e 74 68 6c 69 6e 65  28 61 24 2c 74 25 29 0d  |onthline(a$,t%).|
00002f90  11 76 09 c8 8e 74 25 ca  0d 11 80 1f 20 20 c9 31  |.v...t%.....  .1|
00002fa0  30 3a e7 a9 74 6f 24 2b  a9 61 24 3c 32 35 30 8c  |0:..to$+.a$<250.|
00002fb0  74 6f 24 2b 3d 61 24 0d  11 8a 2d 20 20 c9 31 37  |to$+=a$...-  .17|
00002fc0  3a e7 a9 72 65 66 65 72  65 6e 63 65 24 2b a9 61  |:..reference$+.a|
00002fd0  24 3c 32 35 30 8c 72 65  66 65 72 65 6e 63 65 24  |$<250.reference$|
00002fe0  2b 3d 61 24 0d 11 94 1f  20 20 c9 31 38 3a e7 a9  |+=a$....  .18:..|
00002ff0  63 63 24 2b a9 61 24 3c  32 35 30 8c 63 63 24 2b  |cc$+.a$<250.cc$+|
00003000  3d 61 24 0d 11 9e 05 cb  0d 11 a8 05 e1 0d 11 b2  |=a$.............|
00003010  04 0d 11 bc 14 dd a4 64  65 63 6f 64 65 64 61 74  |.......decodedat|
00003020  65 28 41 24 29 0d 11 c6  3b ea 72 65 73 25 2c 64  |e(A$)...;.res%,d|
00003030  24 2c 6d 24 2c 79 24 2c  6c 25 2c 6d 25 3a f4 20  |$,m$,y$,l%,m%:. |
00003040  61 74 74 65 6d 70 74 20  74 6f 20 64 65 63 6f 64  |attempt to decod|
00003050  65 20 68 65 61 64 65 72  20 64 61 74 65 2e 2e 2e  |e header date...|
00003060  0d 11 d0 22 6c 25 3d a7  41 24 2c 22 2c 22 29 3a  |..."l%=.A$,","):|
00003070  e7 6c 25 3e 30 8c 41 24  3d c1 41 24 2c 6c 25 2b  |.l%>0.A$=.A$,l%+|
00003080  31 29 0d 11 da 2d 20 20  41 24 3d a4 63 6c 65 61  |1)...-  A$=.clea|
00003090  6e 28 41 24 29 3a 41 24  3d a4 6c 6f 77 65 72 28  |n(A$):A$=.lower(|
000030a0  41 24 29 3a 6c 25 3d a7  41 24 2c 22 20 22 29 0d  |A$):l%=.A$," ").|
000030b0  11 e4 22 20 20 64 24 3d  c0 41 24 2c 6c 25 2d 31  |.."  d$=.A$,l%-1|
000030c0  29 3a e7 6c 25 3d 32 8c  64 24 3d 22 30 22 2b 64  |):.l%=2.d$="0"+d|
000030d0  24 0d 11 ee 41 20 20 6d  25 3d a7 22 6a 61 6e 66  |$...A  m%=."janf|
000030e0  65 62 6d 61 72 61 70 72  6d 61 79 6a 75 6e 6a 75  |ebmaraprmayjunju|
000030f0  6c 61 75 67 73 65 70 6f  63 74 6e 6f 76 64 65 63  |laugsepoctnovdec|
00003100  22 2c c1 41 24 2c 6c 25  2b 31 2c 33 29 29 81 33  |",.A$,l%+1,3)).3|
00003110  2b 31 0d 11 f8 14 20 20  6d 24 3d c2 22 30 22 2b  |+1....  m$=."0"+|
00003120  c3 6d 25 2c 32 29 0d 12  02 20 20 20 79 24 3d c1  |.m%,2)...   y$=.|
00003130  41 24 2c 6c 25 2b 35 2c  34 29 3a 6c 25 3d a7 79  |A$,l%+5,4):l%=.y|
00003140  24 2c 22 20 22 29 0d 12  0c 24 20 20 e7 6c 25 3e  |$," ")...$  .l%>|
00003150  30 8c 79 24 3d c3 28 28  a4 74 69 6d 65 29 81 31  |0.y$=.((.time).1|
00003160  45 36 29 2b c0 79 24 2c  32 29 0d 12 16 25 20 20  |E6)+.y$,2)...%  |
00003170  e7 bb 64 24 2a bb 6d 24  2a bb 79 24 3e 30 8c 72  |..d$*.m$*.y$>0.r|
00003180  65 73 25 3d bb 28 79 24  2b 6d 24 2b 64 24 29 0d  |es%=.(y$+m$+d$).|
00003190  12 20 09 3d 72 65 73 25  0d 12 2a 04 0d 12 34 16  |. .=res%..*...4.|
000031a0  dd f2 64 65 6c 65 74 65  69 64 28 67 25 2c 69 64  |..deleteid(g%,id|
000031b0  24 29 0d 12 3e 0f ea 61  25 2c 66 24 2c 69 64 31  |$)..>..a%,f$,id1|
000031c0  24 0d 12 48 1a f5 69 64  31 24 3d a4 67 65 74 70  |$..H..id1$=.getp|
000031d0  61 72 28 69 64 24 2c 22  20 22 29 0d 12 52 43 20  |ar(id$," ")..RC |
000031e0  20 f2 70 72 69 6e 74 28  22 22 2c a4 6d 73 67 31  | .print("",.msg1|
000031f0  28 22 41 63 61 6e 63 65  6c 22 2c 69 64 31 24 29  |("Acancel",id1$)|
00003200  2c 22 22 2c 22 22 29 3a  61 25 3d a4 66 69 6e 64  |,"",""):a%=.find|
00003210  61 72 74 69 64 28 67 25  2c 69 64 31 24 29 0d 12  |artid(g%,id1$)..|
00003220  5c 0c 20 20 e7 61 25 3e  30 8c 0d 12 66 3e 20 20  |\.  .a%>0...f>  |
00003230  20 20 f2 64 65 6c 61 72  74 28 67 25 2c 61 25 29  |  .delart(g%,a%)|
00003240  3a f2 6c 6f 67 28 22 43  61 6e 63 65 6c 6c 65 64  |:.log("Cancelled|
00003250  20 22 2b 69 64 31 24 2b  22 20 69 6e 20 22 2b 67  | "+id1$+" in "+g|
00003260  72 70 24 28 67 25 29 29  0d 12 70 09 20 20 20 20  |rp$(g%))..p.    |
00003270  cc 0d 12 7a 27 20 20 20  20 f2 70 72 69 6e 74 28  |...z'    .print(|
00003280  22 22 2c a4 6d 73 67 30  28 22 41 66 61 69 6c 22  |"",.msg0("Afail"|
00003290  29 2c 22 22 2c 22 22 29  0d 12 84 07 20 20 cd 0d  |),"","")....  ..|
000032a0  12 8e 0b fd 69 64 24 3d  22 22 0d 12 98 05 e1 0d  |....id$=""......|
000032b0  12 a2 04 0d 12 ac 16 dd  f2 64 6f 63 6f 6e 74 72  |.........docontr|
000032c0  6f 6c 28 67 25 2c 61 24  29 0d 12 b6 07 ea 63 24  |ol(g%,a$).....c$|
000032d0  0d 12 c0 1e 63 24 3d a4  63 6c 65 61 6e 28 a4 67  |....c$=.clean(.g|
000032e0  65 74 70 61 72 28 61 24  2c 22 20 22 29 29 0d 12  |etpar(a$," "))..|
000032f0  ca 1c e7 63 24 3d 22 63  61 6e 63 65 6c 22 80 64  |...c$="cancel".d|
00003300  6f 63 61 6e 63 25 3c 3e  30 8c 0d 12 d4 39 20 20  |ocanc%<>0....9  |
00003310  61 24 3d a4 63 6c 65 61  6e 28 61 24 29 3a e7 c0  |a$=.clean(a$):..|
00003320  61 24 2c 31 29 3d 22 3c  22 80 c2 61 24 29 3d 22  |a$,1)="<"..a$)="|
00003330  3e 22 8c f2 64 65 6c 65  74 65 69 64 28 67 25 2c  |>"..deleteid(g%,|
00003340  61 24 29 0d 12 de 05 cd  0d 12 e8 05 e1 0d 12 f2  |a$).............|
00003350  04 0d 12 fc 0c dd f2 64  6f 78 72 65 66 0d 13 06  |.......doxref...|
00003360  10 ea 78 72 65 66 24 2c  63 25 2c 74 25 0d 13 10  |..xref$,c%,t%...|
00003370  10 e7 6f 75 74 67 25 28  30 29 3e 30 8c 0d 13 1a  |..outg%(0)>0....|
00003380  1e 20 20 78 72 65 66 24  3d 22 58 72 65 66 3a 20  |.  xref$="Xref: |
00003390  22 2b 68 6f 73 74 6e 61  6d 65 24 0d 13 24 0c 20  |"+hostname$..$. |
000033a0  20 63 25 3d 30 3a f5 0d  13 2e 52 20 20 e7 a9 78  | c%=0:....R  ..x|
000033b0  72 65 66 24 2b a9 67 72  70 24 28 6f 75 74 67 25  |ref$+.grp$(outg%|
000033c0  28 63 25 29 29 3c 32 30  30 20 8c 78 72 65 66 24  |(c%))<200 .xref$|
000033d0  3d 78 72 65 66 24 2b 22  20 22 2b 67 72 70 24 28  |=xref$+" "+grp$(|
000033e0  6f 75 74 67 25 28 63 25  29 29 2b 22 3a 22 2b c3  |outg%(c%))+":"+.|
000033f0  6f 75 74 73 25 28 63 25  29 0d 13 38 0b 20 20 63  |outs%(c%)..8.  c|
00003400  25 2b 3d 31 0d 13 42 1e  20 20 fd 6f 75 74 67 25  |%+=1..B.  .outg%|
00003410  28 63 25 29 3d 30 84 63  25 3d 6d 61 78 73 61 76  |(c%)=0.c%=maxsav|
00003420  65 25 0d 13 4c 33 20 20  74 25 3d 6c 6f 6e 67 25  |e%..L3  t%=long%|
00003430  3a 6c 6f 6e 67 25 3d 30  3a f2 61 64 64 74 6f 62  |:long%=0:.addtob|
00003440  75 66 66 65 72 28 78 72  65 66 24 29 3a 6c 6f 6e  |uffer(xref$):lon|
00003450  67 25 3d 74 25 0d 13 56  05 cd 0d 13 60 05 e1 0d  |g%=t%..V....`...|
00003460  13 6a 04 0d 13 74 15 dd  f2 61 64 64 75 73 74 6f  |.j...t...addusto|
00003470  70 61 74 68 28 61 24 29  0d 13 7e 12 ea 74 65 6d  |path(a$)..~..tem|
00003480  70 25 2c 6c 25 3a 6c 25  3d 30 0d 13 88 23 e7 68  |p%,l%:l%=0...#.h|
00003490  6f 73 74 6e 61 6d 65 24  3e 22 22 80 a7 61 24 2c  |ostname$>""..a$,|
000034a0  68 6f 73 74 6e 61 6d 65  24 29 3c 31 8c 0d 13 92  |hostname$)<1....|
000034b0  19 20 20 74 65 6d 70 25  3d 6c 6f 6e 67 25 3a 6c  |.  temp%=long%:l|
000034c0  6f 6e 67 25 3d b9 0d 13  9c 3c 20 20 f2 61 64 64  |ong%=....<  .add|
000034d0  68 65 61 64 65 72 74 6f  62 75 66 66 65 72 28 22  |headertobuffer("|
000034e0  50 61 74 68 3a 20 22 2b  68 6f 73 74 6e 61 6d 65  |Path: "+hostname|
000034f0  24 2b 22 21 22 29 3a 6c  6f 6e 67 25 3d 74 65 6d  |$+"!"):long%=tem|
00003500  70 25 0d 13 a6 11 20 20  6c 25 3d a7 61 24 2c 22  |p%....  l%=.a$,"|
00003510  3a 22 29 0d 13 b0 05 cd  0d 13 ba 2e f2 61 64 64  |:")..........add|
00003520  74 6f 62 75 66 66 65 72  28 a4 63 6c 65 61 6e 28  |tobuffer(.clean(|
00003530  c1 61 24 2c 6c 25 2b 31  29 29 29 3a 64 69 73 63  |.a$,l%+1))):disc|
00003540  61 72 64 25 3d b9 0d 13  c4 05 e1 0d 13 ce 04 0d  |ard%=...........|
00003550  13 d8 0d dd a4 67 65 74  6c 69 6e 65 0d 13 e2 2f  |.....getline.../|
00003560  f4 20 69 66 20 6c 69 6e  65 20 69 6e 63 6f 6d 70  |. if line incomp|
00003570  6c 65 74 65 2c 20 6c 6f  6e 67 25 20 69 73 20 73  |lete, long% is s|
00003580  65 74 20 74 6f 20 54 52  55 45 2e 0d 13 ec 15 ea  |et to TRUE......|
00003590  43 25 2c 50 25 2c 6c 25  2c 6c 6f 63 25 2c 41 24  |C%,P%,l%,loc%,A$|
000035a0  0d 13 f6 29 6c 6f 6e 67  25 3d a3 3a 50 25 3d 30  |...)long%=.:P%=0|
000035b0  3a 64 69 73 63 61 72 64  25 3d 30 3a 6c 61 73 74  |:discard%=0:last|
000035c0  70 6f 73 25 3d 70 6f 73  25 0d 14 00 1f f4 20 66  |pos%=pos%..... f|
000035d0  69 72 73 74 20 74 72 79  20 66 61 73 74 20 6c 69  |irst try fast li|
000035e0  6e 65 20 66 65 74 63 68  0d 14 0a 2a e7 70 6f 73  |ne fetch...*.pos|
000035f0  25 2b 32 35 34 3c 6c 65  6e 25 80 62 75 66 70 74  |%+254<len%.bufpt|
00003600  72 25 2b 32 35 34 3c 69  6e 62 75 66 73 69 7a 65  |r%+254<inbufsize|
00003610  25 8c 0d 14 14 31 20 20  6c 6f 63 25 3d 62 75 66  |%....1  loc%=buf|
00003620  70 74 72 25 2b 69 6e 62  75 66 25 3a d6 67 65 74  |ptr%+inbuf%:.get|
00003630  6c 69 6e 65 25 2c 6c 6f  6e 67 25 2c 6c 6f 63 25  |line%,long%,loc%|
00003640  2c 41 24 0d 14 1e 2f 20  20 50 25 3d a9 41 24 2d  |,A$.../  P%=.A$-|
00003650  28 6c 6f 6e 67 25 3d 30  29 3a 62 75 66 70 74 72  |(long%=0):bufptr|
00003660  25 2b 3d 50 25 3a 70 6f  73 25 2b 3d 50 25 3a 3d  |%+=P%:pos%+=P%:=|
00003670  41 24 0d 14 28 05 cd 0d  14 32 2f f4 20 69 66 20  |A$..(....2/. if |
00003680  74 68 61 74 20 66 61 69  6c 73 2c 20 75 73 65 20  |that fails, use |
00003690  74 68 65 20 73 6c 6f 77  65 72 20 73 6d 61 72 74  |the slower smart|
000036a0  65 72 20 6f 6e 65 0d 14  3c 0a 50 25 3d 30 3a f5  |er one..<.P%=0:.|
000036b0  0d 14 46 28 20 20 43 25  3d 62 75 66 70 74 72 25  |..F(  C%=bufptr%|
000036c0  3f 69 6e 62 75 66 25 3a  62 75 66 70 74 72 25 2b  |?inbuf%:bufptr%+|
000036d0  3d 31 3a 50 25 2b 3d 31  0d 14 50 27 20 20 e7 50  |=1:P%+=1..P'  .P|
000036e0  25 3c 32 35 30 8c 74 6d  70 25 3f 50 25 3d 43 25  |%<250.tmp%?P%=C%|
000036f0  20 8b 43 25 3d 31 30 3a  6c 6f 6e 67 25 3d b9 0d  | .C%=10:long%=..|
00003700  14 5a 34 20 20 e7 70 6f  73 25 3e 3d 6c 65 6e 25  |.Z4  .pos%>=len%|
00003710  20 8c 65 6f 66 25 3d b9  20 8b e7 62 75 66 70 74  | .eof%=. ..bufpt|
00003720  72 25 3d 69 6e 62 75 66  73 69 7a 65 25 20 f2 66  |r%=inbufsize% .f|
00003730  69 6c 6c 0d 14 64 23 fd  43 25 3d 31 30 20 84 43  |ill..d#.C%=10 .C|
00003740  25 3d 31 33 20 84 65 6f  66 25 3c 3e 30 3a 70 6f  |%=13 .eof%<>0:po|
00003750  73 25 2b 3d 50 25 0d 14  6e 37 e7 74 6d 70 25 3f  |s%+=P%..n7.tmp%?|
00003760  50 25 3c 33 32 20 80 74  6d 70 25 3f 50 25 3c 3e  |P%<32 .tmp%?P%<>|
00003770  31 20 8c 74 6d 70 25 3f  50 25 3d 31 33 20 8b 74  |1 .tmp%?P%=13 .t|
00003780  6d 70 25 3f 28 50 25 2b  31 29 3d 31 33 0d 14 78  |mp%?(P%+1)=13..x|
00003790  0e 3d 24 28 74 6d 70 25  2b 31 29 0d 14 82 04 0d  |.=$(tmp%+1).....|
000037a0  14 8c 0f dd f2 75 70 64  61 74 65 70 6f 73 0d 14  |.....updatepos..|
000037b0  96 0d ea 73 74 61 74 24  2c 74 25 0d 14 a0 0d e7  |...stat$,t%.....|
000037c0  6c 65 6e 25 3e 30 20 8c  0d 14 aa 42 20 20 73 74  |len%>0 ....B  st|
000037d0  61 74 24 3d c3 70 6f 73  25 2b 22 2f 22 2b c3 6c  |at$=.pos%+"/"+.l|
000037e0  65 6e 25 2b 22 20 62 79  74 65 73 20 28 22 2b c3  |en%+" bytes ("+.|
000037f0  28 a8 28 31 30 30 2a 28  70 6f 73 25 2f 6c 65 6e  |(.(100*(pos%/len|
00003800  25 29 29 29 2b 22 25 29  20 22 0d 14 b4 45 20 20  |%)))+"%) "...E  |
00003810  74 25 3d 94 28 64 73 74  69 6d 65 25 2d 74 69 6d  |t%=.(dstime%-tim|
00003820  65 25 29 81 31 30 30 3a  e7 74 25 3e 30 8c 73 74  |e%).100:.t%>0.st|
00003830  61 74 24 2b 3d c3 28 28  70 6f 73 25 2d 62 73 74  |at$+=.((pos%-bst|
00003840  61 72 74 25 29 81 74 25  29 2b 22 63 70 73 22 0d  |art%).t%)+"cps".|
00003850  14 be 32 20 20 f2 70 72  69 6e 74 28 22 22 2c 22  |..2  .print("","|
00003860  22 2c 73 74 61 74 24 2c  a4 6d 73 67 31 28 22 4e  |",stat$,.msg1("N|
00003870  65 77 6e 65 77 73 22 2c  c3 74 6f 74 61 6c 25 29  |ewnews",.total%)|
00003880  29 0d 14 c8 3d 20 20 e7  62 61 72 69 63 24 3d 64  |)...=  .baric$=d|
00003890  65 66 69 63 24 8c f2 63  68 61 6e 67 65 69 63 28  |efic$..changeic(|
000038a0  22 6e 65 77 73 62 61 73  65 64 22 29 8b f2 63 68  |"newsbased")..ch|
000038b0  61 6e 67 65 69 63 28 64  65 66 69 63 24 29 0d 14  |angeic(defic$)..|
000038c0  d2 05 cd 0d 14 dc 05 e1  0d 14 e6 04 0d 14 f0 15  |................|
000038d0  dd f2 61 64 64 74 6f 62  75 66 66 65 72 28 41 24  |..addtobuffer(A$|
000038e0  29 0d 14 fa 3f f4 20 74  68 69 73 20 61 75 74 6f  |)...?. this auto|
000038f0  6d 61 74 69 63 61 6c 6c  79 20 61 64 64 73 20 63  |matically adds c|
00003900  6f 6e 74 69 6e 75 61 74  69 6f 6e 20 6c 69 6e 65  |ontinuation line|
00003910  73 20 74 6f 20 74 68 65  20 62 75 66 66 65 72 2e  |s to the buffer.|
00003920  0d 15 04 3b e7 70 74 72  25 3e 63 62 75 66 73 69  |...;.ptr%>cbufsi|
00003930  7a 65 25 20 f2 65 78 74  65 6e 64 28 69 6e 62 75  |ze% .extend(inbu|
00003940  66 73 69 7a 65 25 2b 62  75 66 73 69 7a 65 25 2b  |fsize%+bufsize%+|
00003950  64 65 66 61 72 74 62 75  66 25 29 0d 15 0e 31 24  |defartbuf%)...1$|
00003960  28 61 72 74 62 61 73 65  25 2b 70 74 72 25 29 3d  |(artbase%+ptr%)=|
00003970  41 24 3a 70 74 72 25 2b  3d a9 41 24 3a e7 6c 6f  |A$:ptr%+=.A$:.lo|
00003980  6e 67 25 8c f2 61 64 64  6c 6f 6e 67 0d 15 18 1c  |ng%..addlong....|
00003990  61 72 74 62 61 73 65 25  3f 70 74 72 25 3d 31 30  |artbase%?ptr%=10|
000039a0  3a 70 74 72 25 2b 3d 31  0d 15 22 05 e1 0d 15 2c  |:ptr%+=1.."....,|
000039b0  04 0d 15 36 0d dd f2 61  64 64 6c 6f 6e 67 0d 15  |...6...addlong..|
000039c0  40 0b c8 95 6c 6f 6e 67  25 0d 15 4a 11 20 20 41  |@...long%..J.  A|
000039d0  24 3d a4 67 65 74 6c 69  6e 65 0d 15 54 3d 20 20  |$=.getline..T=  |
000039e0  e7 70 74 72 25 3e 63 62  75 66 73 69 7a 65 25 8c  |.ptr%>cbufsize%.|
000039f0  f2 65 78 74 65 6e 64 28  69 6e 62 75 66 73 69 7a  |.extend(inbufsiz|
00003a00  65 25 2b 62 75 66 73 69  7a 65 25 2b 64 65 66 61  |e%+bufsize%+defa|
00003a10  72 74 62 75 66 25 29 0d  15 5e 23 20 20 24 28 61  |rtbuf%)..^#  $(a|
00003a20  72 74 62 61 73 65 25 2b  70 74 72 25 29 3d 41 24  |rtbase%+ptr%)=A$|
00003a30  3a 70 74 72 25 2b 3d a9  41 24 0d 15 68 05 ce 0d  |:ptr%+=.A$..h...|
00003a40  15 72 05 e1 0d 15 7c 04  0d 15 86 1b dd f2 61 64  |.r....|.......ad|
00003a50  64 68 65 61 64 65 72 74  6f 62 75 66 66 65 72 28  |dheadertobuffer(|
00003a60  41 24 29 0d 15 90 3b e7  70 74 72 25 3e 63 62 75  |A$)...;.ptr%>cbu|
00003a70  66 73 69 7a 65 25 20 f2  65 78 74 65 6e 64 28 69  |fsize% .extend(i|
00003a80  6e 62 75 66 73 69 7a 65  25 2b 62 75 66 73 69 7a  |nbufsize%+bufsiz|
00003a90  65 25 2b 64 65 66 61 72  74 62 75 66 25 29 0d 15  |e%+defartbuf%)..|
00003aa0  9a 43 24 28 61 72 74 62  61 73 65 25 2b 70 74 72  |.C$(artbase%+ptr|
00003ab0  25 29 3d 41 24 3a 70 74  72 25 2b 3d a9 41 24 3a  |%)=A$:ptr%+=.A$:|
00003ac0  e7 6c 6f 6e 67 25 3d 30  8c 61 72 74 62 61 73 65  |.long%=0.artbase|
00003ad0  25 3f 70 74 72 25 3d 31  30 3a 70 74 72 25 2b 3d  |%?ptr%=10:ptr%+=|
00003ae0  31 0d 15 a4 05 e1 0d 15  ae 05 3a 0d 15 b8 12 dd  |1.........:.....|
00003af0  f2 65 78 74 65 6e 64 28  6d 65 6d 25 29 0d 15 c2  |.extend(mem%)...|
00003b00  05 f5 0d 15 cc 2d 20 20  c8 99 22 57 69 6d 70 5f  |.....-  .."Wimp_|
00003b10  53 6c 6f 74 53 69 7a 65  22 2c 6d 69 6e 5f 6d 65  |SlotSize",min_me|
00003b20  6d 25 2b 6d 65 6d 25 2c  2d 31 b8 6e 65 77 25 0d  |m%+mem%,-1.new%.|
00003b30  15 d6 33 20 20 e7 28 6d  69 6e 5f 6d 65 6d 25 2b  |..3  .(min_mem%+|
00003b40  6d 65 6d 25 29 3e 6e 65  77 25 8c f2 6d 65 73 73  |mem%)>new%..mess|
00003b50  61 67 65 30 28 22 4e 65  65 64 6d 65 6d 31 22 2c  |age0("Needmem1",|
00003b60  31 29 0d 15 e0 1a fd 28  6d 69 6e 5f 6d 65 6d 25  |1).....(min_mem%|
00003b70  2b 6d 65 6d 25 29 3c 3d  6e 65 77 25 0d 15 ea 3c  |+mem%)<=new%...<|
00003b80  62 75 66 73 69 7a 65 25  3d 6e 65 77 25 2d 6d 69  |bufsize%=new%-mi|
00003b90  6e 5f 6d 65 6d 25 2d 69  6e 62 75 66 73 69 7a 65  |n_mem%-inbufsize|
00003ba0  25 3a 63 62 75 66 73 69  7a 65 25 3d 62 75 66 73  |%:cbufsize%=bufs|
00003bb0  69 7a 65 25 2d 33 30 30  0d 15 f4 05 e1 0d 15 fe  |ize%-300........|
00003bc0  04 0d 16 08 0f dd f2 63  68 65 63 6b 64 69 73 6b  |.......checkdisk|
00003bd0  0d 16 12 0a ea 66 25 2c  46 25 0d 16 1c 05 f5 0d  |.....f%,F%......|
00003be0  16 26 1b 66 25 3d a4 64  69 73 6b 73 70 61 63 65  |.&.f%=.diskspace|
00003bf0  28 62 61 73 65 64 69 72  24 29 0d 16 30 2e e7 66  |(basedir$)..0..f|
00003c00  25 3c 28 6d 69 6e 64 73  6b 25 2a 31 30 32 34 29  |%<(mindsk%*1024)|
00003c10  8c f2 6d 65 73 73 61 67  65 30 28 22 4e 65 65 64  |..message0("Need|
00003c20  64 69 73 6b 22 2c 31 29  0d 16 3a 17 fd 66 25 3e  |disk",1)..:..f%>|
00003c30  3d 28 6d 69 6e 64 73 6b  25 2a 31 30 32 34 29 0d  |=(mindsk%*1024).|
00003c40  16 44 05 e1 0d 16 4e 04  0d 16 58 13 dd a4 64 69  |.D....N...X...di|
00003c50  73 6b 73 70 61 63 65 28  61 24 29 0d 16 62 0a ea  |skspace(a$)..b..|
00003c60  46 25 2c 66 25 0d 16 6c  37 c8 99 22 58 4f 53 5f  |F%,f%..l7.."XOS_|
00003c70  46 53 43 6f 6e 74 72 6f  6c 22 2c 34 39 2c 62 61  |FSControl",49,ba|
00003c80  73 65 64 69 72 24 b8 66  25 3b 46 25 3a e7 28 46  |sedir$.f%;F%:.(F|
00003c90  25 80 31 29 3c 3e 30 8c  66 25 3d 30 0d 16 76 07  |%.1)<>0.f%=0..v.|
00003ca0  3d 66 25 0d 16 80 04 0d  16 8a 0f dd a4 63 6c 65  |=f%..........cle|
00003cb0  61 6e 28 41 24 29 0d 16  94 26 f4 20 73 74 72 69  |an(A$)...&. stri|
00003cc0  70 73 20 6c 65 61 64 69  6e 67 20 26 20 74 72 61  |ps leading & tra|
00003cd0  69 6c 69 6e 67 20 73 70  61 63 65 73 0d 16 9e 1e  |iling spaces....|
00003ce0  ea 42 24 3a e7 41 24 3e  22 22 8c d6 74 72 69 6d  |.B$:.A$>""..trim|
00003cf0  73 74 72 25 2c 41 24 2c  42 24 0d 16 a8 07 3d 42  |str%,A$,B$....=B|
00003d00  24 0d 16 b2 04 0d 16 bc  1b dd f2 6f 70 65 6e 62  |$..........openb|
00003d10  61 74 63 68 28 66 24 2c  6f 66 66 73 65 74 25 29  |atch(f$,offset%)|
00003d20  0d 16 c6 14 66 30 30 25  3d a4 6f 70 65 6e 69 6e  |....f00%=.openin|
00003d30  28 66 24 29 0d 16 d0 28  62 75 66 70 74 72 25 3d  |(f$)...(bufptr%=|
00003d40  30 3a 65 6f 66 25 3d a3  3a 6c 65 6e 25 3d 30 3a  |0:eof%=.:len%=0:|
00003d50  70 6f 73 25 3d 6f 66 66  73 65 74 25 0d 16 da 27  |pos%=offset%...'|
00003d60  e7 66 30 30 25 3c 3e 30  8c 6c 65 6e 25 3d a2 23  |.f00%<>0.len%=.#|
00003d70  66 30 30 25 3a cf 23 66  30 30 25 3d 6f 66 66 73  |f00%:.#f00%=offs|
00003d80  65 74 25 0d 16 e4 09 f2  66 69 6c 6c 0d 16 ee 05  |et%.....fill....|
00003d90  e1 0d 16 f8 04 0d 17 02  21 dd f2 72 65 73 74 61  |........!..resta|
00003da0  72 74 62 61 74 63 68 28  66 24 2c 74 25 2c 6f 66  |rtbatch(f$,t%,of|
00003db0  66 73 65 74 25 29 0d 17  0c 2f ea 61 24 3a 61 24  |fset%).../.a$:a$|
00003dc0  3d a4 6d 73 67 30 28 22  4d 61 69 6c 22 29 3a e7  |=.msg0("Mail"):.|
00003dd0  74 25 3e 30 8c 61 24 3d  a4 6d 73 67 30 28 22 4e  |t%>0.a$=.msg0("N|
00003de0  65 77 73 22 29 0d 17 16  1e f2 6d 65 73 73 61 67  |ews").....messag|
00003df0  65 31 28 22 44 62 61 64  68 65 61 64 22 2c 61 24  |e1("Dbadhead",a$|
00003e00  2c 30 29 0d 17 20 34 f2  63 66 28 66 30 30 25 29  |,0).. 4.cf(f00%)|
00003e10  3a 6c 69 6e 65 24 3d 22  22 3a 64 65 6c 25 3d a3  |:line$="":del%=.|
00003e20  3a f2 6f 70 65 6e 62 61  74 63 68 28 66 24 2c 6f  |:.openbatch(f$,o|
00003e30  66 66 73 65 74 25 29 0d  17 2a 05 e1 0d 17 34 04  |ffset%)..*....4.|
00003e40  0d 17 3e 0a dd f2 66 69  6c 6c 0d 17 48 0b ea 72  |..>...fill..H..r|
00003e50  33 25 2c 46 25 0d 17 52  0d e7 66 30 30 25 3c 3e  |3%,F%..R..f00%<>|
00003e60  30 8c 0d 17 5c 35 20 20  c8 99 22 58 4f 53 5f 47  |0...\5  .."XOS_G|
00003e70  42 50 42 22 2c 34 2c 66  30 30 25 2c 69 6e 62 75  |BPB",4,f00%,inbu|
00003e80  66 25 2c 69 6e 62 75 66  73 69 7a 65 25 b8 2c 2c  |f%,inbufsize%.,,|
00003e90  2c 72 33 25 3b 46 25 0d  17 66 20 20 20 e7 28 46  |,r3%;F%..f   .(F|
00003ea0  25 80 31 29 3c 3e 30 84  72 33 25 3e 30 8c f2 63  |%.1)<>0.r3%>0..c|
00003eb0  66 28 66 30 30 25 29 0d  17 70 05 cd 0d 17 7a 0d  |f(f00%)..p....z.|
00003ec0  62 75 66 70 74 72 25 3d  30 0d 17 84 05 e1 0d 17  |bufptr%=0.......|
00003ed0  8e 04 0d 17 98 1a dd a4  61 64 64 74 6f 73 61 76  |........addtosav|
00003ee0  65 6c 69 73 74 28 67 24  2c 63 25 29 0d 17 a2 07  |elist(g$,c%)....|
00003ef0  ea 67 25 0d 17 ac 1e 67  25 3d a4 6e 61 6d 65 74  |.g%....g%=.namet|
00003f00  6f 6e 6f 28 a4 63 6c 65  61 6e 28 67 24 29 2c b9  |ono(.clean(g$),.|
00003f10  29 0d 17 b6 3c e7 67 25  3e 30 80 63 25 3c 3d 6d  |)...<.g%>0.c%<=m|
00003f20  61 78 73 61 76 65 25 8c  6f 75 74 67 25 28 63 25  |axsave%.outg%(c%|
00003f30  29 3d 67 25 3a 6f 75 74  73 25 28 63 25 29 3d a4  |)=g%:outs%(c%)=.|
00003f40  73 65 71 28 67 25 29 3a  63 25 2b 3d 31 0d 17 c0  |seq(g%):c%+=1...|
00003f50  07 3d 63 25 0d 17 ca 04  0d 17 d4 15 dd f2 64 65  |.=c%..........de|
00003f60  66 61 75 6c 74 73 61 76  65 6c 69 73 74 0d 17 de  |faultsavelist...|
00003f70  07 ea 67 25 0d 17 e8 0c  c8 8e 74 79 70 65 25 ca  |..g%......type%.|
00003f80  0d 17 f2 29 c9 30 3a 67  25 3d a4 6e 61 6d 65 74  |...).0:g%=.namet|
00003f90  6f 6e 6f 28 22 45 6d 61  69 6c 2e 70 6f 73 74 6d  |ono("Email.postm|
00003fa0  61 73 74 65 72 22 2c b9  29 0d 17 fc 1c 7f 3a 67  |aster",.).....:g|
00003fb0  25 3d a4 6e 61 6d 65 74  6f 6e 6f 28 22 6a 75 6e  |%=.nametono("jun|
00003fc0  6b 22 2c b9 29 0d 18 06  05 cb 0d 18 10 31 e7 67  |k",.)........1.g|
00003fd0  25 3e 30 8c 6f 75 74 67  25 28 29 3d 30 3a 6f 75  |%>0.outg%()=0:ou|
00003fe0  74 67 25 28 30 29 3d 67  25 3a 6f 75 74 73 25 28  |tg%(0)=g%:outs%(|
00003ff0  30 29 3d a4 73 65 71 28  67 25 29 0d 18 1a 05 e1  |0)=.seq(g%).....|
00004000  0d 18 24 04 0d 18 2e 17  dd f2 67 72 6f 75 70 73  |..$.......groups|
00004010  6c 69 6e 65 28 6c 69 73  74 24 29 0d 18 38 0e ea  |line(list$)..8..|
00004020  6e 67 25 3a 6e 67 25 3d  30 0d 18 42 32 e7 a7 6c  |ng%:ng%=0..B2..l|
00004030  69 73 74 24 2c 22 2c 22  29 3d 30 8c 6e 67 25 3d  |ist$,",")=0.ng%=|
00004040  a4 61 64 64 74 6f 73 61  76 65 6c 69 73 74 28 6c  |.addtosavelist(l|
00004050  69 73 74 24 2c 6e 67 25  29 3a e1 0d 18 4c 23 e7  |ist$,ng%):...L#.|
00004060  6c 6f 6e 67 25 8c f2 6c  6f 6e 67 67 72 6f 75 70  |long%..longgroup|
00004070  73 6c 69 6e 65 28 6c 69  73 74 24 29 3a e1 0d 18  |sline(list$):...|
00004080  56 05 f5 0d 18 60 30 20  20 6e 67 25 3d a4 61 64  |V....`0  ng%=.ad|
00004090  64 74 6f 73 61 76 65 6c  69 73 74 28 a4 67 65 74  |dtosavelist(.get|
000040a0  70 61 72 28 6c 69 73 74  24 2c 22 2c 22 29 2c 6e  |par(list$,","),n|
000040b0  67 25 29 0d 18 6a 0d fd  6c 69 73 74 24 3d 22 22  |g%)..j..list$=""|
000040c0  0d 18 74 05 e1 0d 18 7e  04 0d 18 88 1b dd f2 6c  |..t....~.......l|
000040d0  6f 6e 67 67 72 6f 75 70  73 6c 69 6e 65 28 6c 69  |onggroupsline(li|
000040e0  73 74 24 29 0d 18 92 2d  ea 67 24 2c 70 25 2c 66  |st$)...-.g$,p%,f|
000040f0  72 61 67 24 2c 67 66 72  61 67 24 2c 6e 67 25 2c  |rag$,gfrag$,ng%,|
00004100  65 6e 64 25 3a 6e 67 25  3d 30 3a 65 6e 64 25 3d  |end%:ng%=0:end%=|
00004110  30 0d 18 9c 05 f5 0d 18  a6 0c 66 72 61 67 24 3d  |0.........frag$=|
00004120  22 22 0d 18 b0 0d e7 6c  6f 6e 67 25 3d 30 8c 0d  |"".....long%=0..|
00004130  18 ba 0c 20 20 65 6e 64  25 3d b9 0d 18 c4 07 20  |...  end%=..... |
00004140  20 cc 0d 18 ce 2d 20 20  70 25 3d a9 6c 69 73 74  | ....-  p%=.list|
00004150  24 3a f5 70 25 2d 3d 31  3a fd 70 25 3d 31 84 c1  |$:.p%-=1:.p%=1..|
00004160  6c 69 73 74 24 2c 70 25  2c 31 29 3d 22 2c 22 0d  |list$,p%,1)=",".|
00004170  18 d8 3d 20 20 e7 c1 6c  69 73 74 24 2c 70 25 2c  |..=  ..list$,p%,|
00004180  31 29 3d 22 2c 22 8c 66  72 61 67 24 3d c1 6c 69  |1)=",".frag$=.li|
00004190  73 74 24 2c 70 25 2b 31  29 3a 6c 69 73 74 24 3d  |st$,p%+1):list$=|
000041a0  c0 6c 69 73 74 24 2c 70  25 2d 31 29 0d 18 e2 05  |.list$,p%-1)....|
000041b0  cd 0d 18 ec 05 f5 0d 18  f6 3d 20 20 67 24 3d a4  |.........=  g$=.|
000041c0  67 65 74 70 61 72 28 6c  69 73 74 24 2c 22 2c 22  |getpar(list$,","|
000041d0  29 3a e7 67 66 72 61 67  24 3e 22 22 8c 67 24 3d  |):.gfrag$>"".g$=|
000041e0  67 66 72 61 67 24 2b 67  24 3a 67 66 72 61 67 24  |gfrag$+g$:gfrag$|
000041f0  3d 22 22 0d 19 00 20 20  20 6e 67 25 3d a4 61 64  |=""...   ng%=.ad|
00004200  64 74 6f 73 61 76 65 6c  69 73 74 28 67 24 2c 6e  |dtosavelist(g$,n|
00004210  67 25 29 0d 19 0a 13 fd  67 24 3d 22 22 80 6c 69  |g%).....g$="".li|
00004220  73 74 24 3d 22 22 0d 19  14 10 67 66 72 61 67 24  |st$=""....gfrag$|
00004230  3d 66 72 61 67 24 0d 19  1e 33 e7 6c 6f 6e 67 25  |=frag$...3.long%|
00004240  8c 6c 69 73 74 24 3d a4  67 65 74 6c 69 6e 65 3a  |.list$=.getline:|
00004250  f2 61 64 64 68 65 61 64  65 72 74 6f 62 75 66 66  |.addheadertobuff|
00004260  65 72 28 6c 69 73 74 24  29 0d 19 28 09 fd 65 6e  |er(list$)..(..en|
00004270  64 25 0d 19 32 05 e1 0d  19 3c 04 0d 19 46 0e dd  |d%..2....<...F..|
00004280  f2 73 61 76 65 6c 69 73  74 0d 19 50 0d ea 63 25  |.savelist..P..c%|
00004290  2c 75 24 2c 67 24 0d 19  5a 20 e7 6f 75 74 67 25  |,u$,g$..Z .outg%|
000042a0  28 30 29 3d 30 8c f2 64  65 66 61 75 6c 74 73 61  |(0)=0..defaultsa|
000042b0  76 65 6c 69 73 74 0d 19  64 21 e7 66 69 6c 74 25  |velist..d!.filt%|
000042c0  28 74 79 70 65 25 29 3e  30 8c f2 63 68 65 63 6b  |(type%)>0..check|
000042d0  66 69 6c 74 65 72 73 0d  19 6e 0d e7 74 79 70 65  |filters..n..type|
000042e0  25 3d 30 8c 0d 19 78 24  20 20 67 24 3d 67 72 70  |%=0...x$  g$=grp|
000042f0  24 28 6f 75 74 67 25 28  30 29 29 3a 75 24 3d a4  |$(outg%(0)):u$=.|
00004300  67 74 6f 75 28 67 24 29  0d 19 82 2d 20 20 f2 6c  |gtou(g$)...-  .l|
00004310  6f 67 28 22 4e 65 77 20  6d 61 69 6c 20 66 6f 72  |og("New mail for|
00004320  20 22 2b 75 24 2b 22 20  66 72 6f 6d 20 22 2b 66  | "+u$+" from "+f|
00004330  72 6f 6d 24 29 0d 19 8c  2a 20 20 e7 72 65 63 65  |rom$)...*  .rece|
00004340  69 70 74 24 3e 22 22 f2  72 65 74 75 72 6e 72 65  |ipt$>"".returnre|
00004350  63 65 69 70 74 28 72 65  63 65 69 70 74 24 29 0d  |ceipt(receipt$).|
00004360  19 96 1f 20 20 e7 a4 63  68 65 63 6b 66 6f 72 77  |...  ..checkforw|
00004370  61 72 64 28 67 24 2c 75  24 29 3d 31 8c e1 0d 19  |ard(g$,u$)=1....|
00004380  a0 05 cd 0d 19 aa 14 72  65 63 70 6f 73 25 3d 6c  |.......recpos%=l|
00004390  61 73 74 70 6f 73 25 0d  19 b4 22 63 25 3d 30 3a  |astpos%..."c%=0:|
000043a0  c8 95 6f 75 74 67 25 28  63 25 29 3e 30 80 63 25  |..outg%(c%)>0.c%|
000043b0  3c 6d 61 78 73 61 76 65  25 0d 19 be 29 20 20 f2  |<maxsave%...)  .|
000043c0  61 72 74 73 61 76 65 28  6f 75 74 67 25 28 63 25  |artsave(outg%(c%|
000043d0  29 2c 6f 75 74 73 25 28  63 25 29 29 3a 63 25 2b  |),outs%(c%)):c%+|
000043e0  3d 31 0d 19 c8 05 ce 0d  19 d2 05 e1 0d 19 dc 04  |=1..............|
000043f0  0d 19 e6 12 dd f2 63 68  65 63 6b 66 69 6c 74 65  |......checkfilte|
00004400  72 73 0d 19 f0 0f ea 6c  25 2c 74 25 3a 6c 25 3d  |rs.....l%,t%:l%=|
00004410  30 0d 19 fa 1c c8 95 6c  25 3c 3d 6e 66 69 6c 74  |0......l%<=nfilt|
00004420  25 3a 74 25 3d 66 6c 74  25 28 6c 25 29 0d 1a 04  |%:t%=flt%(l%)...|
00004430  43 e7 74 25 3d 33 84 28  74 25 3d 32 80 74 79 70  |C.t%=3.(t%=2.typ|
00004440  65 25 3d 30 29 84 28 74  25 3d 31 80 74 79 70 65  |e%=0).(t%=1.type|
00004450  25 3d 31 29 8c e7 a4 64  6f 66 69 6c 74 65 72 28  |%=1)...dofilter(|
00004460  6c 25 29 3c 3e 30 8c 6c  25 3d 6e 66 69 6c 74 25  |l%)<>0.l%=nfilt%|
00004470  0d 1a 0e 09 6c 25 2b 3d  31 0d 1a 18 05 ce 0d 1a  |....l%+=1.......|
00004480  22 05 e1 0d 1a 2c 04 0d  1a 36 12 dd a4 64 6f 66  |"....,...6...dof|
00004490  69 6c 74 65 72 28 6e 25  29 0d 1a 40 18 ea 6e 24  |ilter(n%)..@..n$|
000044a0  2c 61 24 2c 6c 31 25 2c  6f 6b 25 2c 6c 61 73 74  |,a$,l1%,ok%,last|
000044b0  25 0d 1a 4a 09 6f 6b 25  3d 30 0d 1a 54 1a e3 6c  |%..J.ok%=0..T..l|
000044c0  31 25 3d 30 b8 32 3a 66  6c 5f 6f 6b 25 28 6c 31  |1%=0.2:fl_ok%(l1|
000044d0  25 29 3d a3 0d 1a 5e 1d  20 20 61 24 3d 22 2a 22  |%)=...^.  a$="*"|
000044e0  2b 66 6c 63 24 28 6e 25  2c 6c 31 25 29 2b 22 2a  |+flc$(n%,l1%)+"*|
000044f0  22 0d 1a 68 15 20 20 c8  8e 66 6c 63 25 28 6e 25  |"..h.  ..flc%(n%|
00004500  2c 6c 31 25 29 ca 0d 1a  72 2d 20 20 20 20 c9 31  |,l1%)...r-    .1|
00004510  3a e7 a4 73 6d 61 74 63  68 28 61 24 2c 66 72 6f  |:..smatch(a$,fro|
00004520  6d 24 29 3e 30 8c 66 6c  5f 6f 6b 25 28 6c 31 25  |m$)>0.fl_ok%(l1%|
00004530  29 3d b9 0d 1a 7c 53 20  20 20 20 c9 32 3a e7 a4  |)=...|S    .2:..|
00004540  73 6d 61 74 63 68 28 61  24 2c 74 6f 24 29 3e 30  |smatch(a$,to$)>0|
00004550  84 a4 73 6d 61 74 63 68  28 61 24 2c 63 63 24 29  |..smatch(a$,cc$)|
00004560  3e 30 84 a4 73 6d 61 74  63 68 28 61 24 2c 6f 72  |>0..smatch(a$,or|
00004570  69 67 74 6f 24 29 3e 30  8c 66 6c 5f 6f 6b 25 28  |igto$)>0.fl_ok%(|
00004580  6c 31 25 29 3d b9 0d 1a  86 30 20 20 20 20 c9 33  |l1%)=....0    .3|
00004590  3a e7 a4 73 6d 61 74 63  68 28 61 24 2c 73 75 62  |:..smatch(a$,sub|
000045a0  6a 65 63 74 24 29 3e 30  8c 66 6c 5f 6f 6b 25 28  |ject$)>0.fl_ok%(|
000045b0  6c 31 25 29 3d b9 0d 1a  90 32 20 20 20 20 c9 34  |l1%)=....2    .4|
000045c0  3a e7 a4 73 6d 61 74 63  68 28 61 24 2c 6e 65 77  |:..smatch(a$,new|
000045d0  73 67 72 6f 75 70 24 29  3e 30 8c 66 6c 5f 6f 6b  |sgroup$)>0.fl_ok|
000045e0  25 28 6c 31 25 29 3d b9  0d 1a 9a 30 20 20 20 20  |%(l1%)=....0    |
000045f0  c9 35 3a e7 a4 73 6d 61  74 63 68 28 61 24 2c 72  |.5:..smatch(a$,r|
00004600  65 70 6c 79 74 6f 24 29  3e 30 8c 66 6c 5f 6f 6b  |eplyto$)>0.fl_ok|
00004610  25 28 6c 31 25 29 3d b9  0d 1a a4 33 20 20 20 20  |%(l1%)=....3    |
00004620  c9 36 3a e7 a4 73 6d 61  74 63 68 28 61 24 2c 70  |.6:..smatch(a$,p|
00004630  72 65 63 65 64 65 6e 63  65 24 29 3e 30 8c 66 6c  |recedence$)>0.fl|
00004640  5f 6f 6b 25 28 6c 31 25  29 3d b9 0d 1a ae 2b 20  |_ok%(l1%)=....+ |
00004650  20 20 20 c9 37 3a e7 a4  73 6d 61 74 63 68 28 61  |   .7:..smatch(a|
00004660  24 2c 62 66 24 29 3e 30  8c 66 6c 5f 6f 6b 25 28  |$,bf$)>0.fl_ok%(|
00004670  6c 31 25 29 3d b9 0d 1a  b8 07 20 20 cb 0d 1a c2  |l1%)=.....  ....|
00004680  31 20 20 e7 66 6c 6e 25  28 6e 25 2c 6c 31 25 29  |1  .fln%(n%,l1%)|
00004690  3e 30 8c 66 6c 5f 6f 6b  25 28 6c 31 25 29 3d 28  |>0.fl_ok%(l1%)=(|
000046a0  66 6c 5f 6f 6b 25 28 6c  31 25 29 3d a3 29 0d 1a  |fl_ok%(l1%)=.)..|
000046b0  cc 08 ed 6c 31 25 0d 1a  d6 11 6f 6b 25 3d 66 6c  |...l1%....ok%=fl|
000046c0  5f 6f 6b 25 28 30 29 0d  1a e0 12 e7 66 6c 63 25  |_ok%(0).....flc%|
000046d0  28 6e 25 2c 31 29 3e 30  8c 0d 1a ea 37 20 20 e7  |(n%,1)>0....7  .|
000046e0  66 6c 6a 25 28 6e 25 2c  31 29 3d 30 8c 6f 6b 25  |flj%(n%,1)=0.ok%|
000046f0  3d 6f 6b 25 2a 66 6c 5f  6f 6b 25 28 31 29 8b 6f  |=ok%*fl_ok%(1).o|
00004700  6b 25 3d 6f 6b 25 2b 66  6c 5f 6f 6b 25 28 31 29  |k%=ok%+fl_ok%(1)|
00004710  0d 1a f4 14 20 20 e7 66  6c 63 25 28 6e 25 2c 32  |....  .flc%(n%,2|
00004720  29 3e 30 8c 0d 1a fe 39  20 20 20 20 e7 66 6c 6a  |)>0....9    .flj|
00004730  25 28 6e 25 2c 32 29 3d  30 8c 6f 6b 25 3d 6f 6b  |%(n%,2)=0.ok%=ok|
00004740  25 2a 66 6c 5f 6f 6b 25  28 32 29 8b 6f 6b 25 3d  |%*fl_ok%(2).ok%=|
00004750  6f 6b 25 2b 66 6c 5f 6f  6b 25 28 32 29 0d 1b 08  |ok%+fl_ok%(2)...|
00004760  07 20 20 cd 0d 1b 12 05  cd 0d 1b 1c 09 e7 6f 6b  |.  ...........ok|
00004770  25 8c 0d 1b 26 2e 20 20  f2 70 72 69 6e 74 28 22  |%...&.  .print("|
00004780  22 2c a4 6d 73 67 31 28  22 46 61 70 70 6c 79 22  |",.msg1("Fapply"|
00004790  2c c3 28 6e 25 2b 31 29  29 2c 22 22 2c 22 22 29  |,.(n%+1)),"","")|
000047a0  0d 1b 30 1a 20 20 61 24  3d a4 66 73 75 62 73 74  |..0.  a$=.fsubst|
000047b0  28 66 6c 61 24 28 6e 25  29 29 0d 1b 3a 11 20 20  |(fla$(n%))..:.  |
000047c0  c8 8e 66 6c 61 25 28 6e  25 29 ca 0d 1b 44 23 20  |..fla%(n%)...D# |
000047d0  20 20 20 c9 31 3a f2 6e  6f 73 61 76 65 3a f2 64  |   .1:.nosave:.d|
000047e0  65 66 61 75 6c 74 73 61  76 65 6c 69 73 74 0d 1b  |efaultsavelist..|
000047f0  4e 12 20 20 20 20 c9 32  3a f2 6e 6f 73 61 76 65  |N.    .2:.nosave|
00004800  0d 1b 58 32 20 20 20 20  c9 33 3a e7 c0 61 24 2c  |..X2    .3:..a$,|
00004810  31 29 3d 22 2b 22 8c 6e  24 3d a4 67 65 74 70 61  |1)="+".n$=.getpa|
00004820  72 28 61 24 2c 22 20 22  29 3a 8b f2 6e 6f 73 61  |r(a$," "):..nosa|
00004830  76 65 0d 1b 62 2b 20 20  20 20 20 20 f2 6c 6f 67  |ve..b+      .log|
00004840  28 22 46 69 6c 74 65 72  20 72 65 64 69 72 65 63  |("Filter redirec|
00004850  74 69 6f 6e 20 74 6f 20  22 2b 61 24 29 0d 1b 6c  |tion to "+a$)..l|
00004860  34 20 20 20 20 20 20 6f  6b 25 3d 30 3a c8 95 6f  |4      ok%=0:..o|
00004870  75 74 67 25 28 6f 6b 25  29 3e 30 80 6f 6b 25 3c  |utg%(ok%)>0.ok%<|
00004880  6d 61 78 73 61 76 65 25  3a 6f 6b 25 2b 3d 31 3a  |maxsave%:ok%+=1:|
00004890  ce 0d 1b 76 11 20 20 20  20 20 20 c8 95 61 24 3e  |...v.      ..a$>|
000048a0  22 22 0d 1b 80 28 20 20  20 20 20 20 20 20 6c 61  |""...(        la|
000048b0  73 74 25 3d 6f 6b 25 3a  6e 24 3d a4 67 65 74 70  |st%=ok%:n$=.getp|
000048c0  61 72 28 61 24 2c 22 20  22 29 0d 1b 8a 2e 20 20  |ar(a$," ")....  |
000048d0  20 20 20 20 20 20 6f 6b  25 3d a4 61 64 64 74 6f  |      ok%=.addto|
000048e0  73 61 76 65 6c 69 73 74  28 a4 63 6c 65 61 6e 28  |savelist(.clean(|
000048f0  6e 24 29 2c 6f 6b 25 29  0d 1b 94 3f 20 20 20 20  |n$),ok%)...?    |
00004900  20 20 20 20 e7 6f 6b 25  3d 6c 61 73 74 25 80 6e  |    .ok%=last%.n|
00004910  24 3e 22 22 8c f2 6c 6f  67 28 22 49 6e 76 61 6c  |$>""..log("Inval|
00004920  69 64 20 72 65 64 69 72  65 63 74 69 6f 6e 20 74  |id redirection t|
00004930  6f 20 22 2b 6e 24 29 0d  1b 9e 0b 20 20 20 20 20  |o "+n$)....     |
00004940  20 ce 0d 1b a8 16 20 20  20 20 c9 34 3a f2 73 75  | .....    .4:.su|
00004950  62 6d 69 74 28 61 24 29  0d 1b b2 07 20 20 cb 0d  |bmit(a$)....  ..|
00004960  1b bc 05 cd 0d 1b c6 08  3d 6f 6b 25 0d 1b d0 04  |........=ok%....|
00004970  0d 1b da 10 dd a4 66 73  75 62 73 74 28 61 24 29  |......fsubst(a$)|
00004980  0d 1b e4 0a ea 62 24 2c  6c 25 0d 1b ee 0f 6c 25  |.....b$,l%....l%|
00004990  3d a7 61 24 2c 22 25 22  29 0d 1b f8 10 c8 95 6c  |=.a$,"%")......l|
000049a0  25 3e 30 3a 62 24 3d 22  22 0d 1c 02 12 c8 8e c1  |%>0:b$="".......|
000049b0  61 24 2c 6c 25 2b 31 2c  31 29 ca 0d 1c 0c 36 20  |a$,l%+1,1)....6 |
000049c0  20 c9 22 75 22 3a e7 74  79 70 65 25 3d 31 8c 62  | ."u":.type%=1.b|
000049d0  24 3d 22 6e 65 77 73 22  8b 62 24 3d a4 67 74 6f  |$="news".b$=.gto|
000049e0  75 28 67 72 70 24 28 6f  75 74 67 25 28 30 29 29  |u(grp$(outg%(0))|
000049f0  29 0d 1c 16 13 20 20 c9  22 66 22 3a 62 24 3d 66  |)....  ."f":b$=f|
00004a00  72 6f 6d 24 0d 1c 20 11  20 20 c9 22 74 22 3a 62  |rom$.. .  ."t":b|
00004a10  24 3d 74 6f 24 0d 1c 2a  11 20 20 c9 22 63 22 3a  |$=to$..*.  ."c":|
00004a20  62 24 3d 63 63 24 0d 1c  34 16 20 20 c9 22 72 22  |b$=cc$..4.  ."r"|
00004a30  3a 62 24 3d 72 65 70 6c  79 74 6f 24 0d 1c 3e 11  |:b$=replyto$..>.|
00004a40  20 20 c9 22 25 22 3a 62  24 3d 22 25 22 0d 1c 48  |  ."%":b$="%"..H|
00004a50  05 cb 0d 1c 52 27 61 24  3d c0 61 24 2c 6c 25 2d  |....R'a$=.a$,l%-|
00004a60  31 29 2b 62 24 2b c1 61  24 2c 6c 25 2b 32 29 3a  |1)+b$+.a$,l%+2):|
00004a70  6c 25 2b 3d a9 62 24 2d  31 0d 1c 5c 12 6c 25 3d  |l%+=.b$-1..\.l%=|
00004a80  a7 61 24 2c 22 25 22 2c  6c 25 29 0d 1c 66 05 ce  |.a$,"%",l%)..f..|
00004a90  0d 1c 70 07 3d 61 24 0d  1c 7a 04 0d 1c 84 0c dd  |..p.=a$..z......|
00004aa0  f2 6e 6f 73 61 76 65 0d  1c 8e 4d ea 6e 25 2c 67  |.nosave...M.n%,g|
00004ab0  25 3a 6e 25 3d 30 3a f5  67 25 3d 6f 75 74 67 25  |%:n%=0:.g%=outg%|
00004ac0  28 6e 25 29 3a e7 67 25  3e 30 8c 6f 75 74 67 25  |(n%):.g%>0.outg%|
00004ad0  28 6e 25 29 3d 30 3a e7  67 72 70 73 65 71 25 28  |(n%)=0:.grpseq%(|
00004ae0  67 25 29 3e 30 8c 67 72  70 73 65 71 25 28 67 25  |g%)>0.grpseq%(g%|
00004af0  29 2d 3d 31 0d 1c 98 1b  6e 25 2b 3d 31 3a fd 67  |)-=1....n%+=1:.g|
00004b00  25 3d 30 84 6e 25 3e 6d  61 78 73 61 76 65 25 0d  |%=0.n%>maxsave%.|
00004b10  1c a2 05 e1 0d 1c ac 04  0d 1c b6 10 dd f2 73 75  |..............su|
00004b20  62 6d 69 74 28 61 24 29  0d 1c c0 1f ea 66 24 2c  |bmit(a$).....f$,|
00004b30  62 24 2c 46 25 2c 6d 25  2c 64 25 3a 66 24 3d a4  |b$,F%,m%,d%:f$=.|
00004b40  74 6d 70 66 69 6c 65 0d  1c ca 37 c8 99 22 58 4f  |tmpfile...7.."XO|
00004b50  53 5f 46 69 6c 65 22 2c  31 30 2c 66 24 2c 26 46  |S_File",10,f$,&F|
00004b60  46 46 2c 2c 61 72 74 62  61 73 65 25 2c 61 72 74  |FF,,artbase%,art|
00004b70  62 61 73 65 25 2b 70 74  72 25 b8 3b 46 25 0d 1c  |base%+ptr%.;F%..|
00004b80  d4 0e e7 28 46 25 80 31  29 3d 30 8c 0d 1c de 1a  |...(F%.1)=0.....|
00004b90  20 20 c8 95 c0 a4 63 6c  65 61 6e 28 61 24 29 2c  |  ....clean(a$),|
00004ba0  31 29 3d 22 2d 22 0d 1c  e8 18 20 20 62 24 3d a4  |1)="-"....  b$=.|
00004bb0  67 65 74 70 61 72 28 61  24 2c 22 20 22 29 0d 1c  |getpar(a$," ")..|
00004bc0  f2 0f 20 20 c8 8e c0 62  24 2c 32 29 ca 0d 1c fc  |..  ...b$,2)....|
00004bd0  1d 20 20 20 20 c9 22 2d  4d 22 3a 6d 25 3d 31 30  |.    ."-M":m%=10|
00004be0  32 34 2a bb c1 62 24 2c  33 29 0d 1d 06 15 20 20  |24*..b$,3)....  |
00004bf0  20 20 c9 22 2d 4b 22 3a  f2 6e 6f 73 61 76 65 0d  |  ."-K":.nosave.|
00004c00  1d 10 12 20 20 20 20 c9  22 2d 44 22 3a 64 25 3d  |...    ."-D":d%=|
00004c10  b9 0d 1d 1a 26 20 20 20  20 c9 22 2d 4a 22 3a f2  |....&    ."-J":.|
00004c20  6e 6f 73 61 76 65 3a f2  64 65 66 61 75 6c 74 73  |nosave:.defaults|
00004c30  61 76 65 6c 69 73 74 0d  1d 24 07 20 20 cb 0d 1d  |avelist..$.  ...|
00004c40  2e 07 20 20 ce 0d 1d 38  2a 20 20 e7 a4 66 72 65  |..  ...8*  ..fre|
00004c50  65 6d 65 6d 28 30 29 3c  6d 25 8c f2 6d 65 73 73  |emem(0)<m%..mess|
00004c60  61 67 65 30 28 22 46 6d  65 6d 31 22 2c 31 29 0d  |age0("Fmem1",1).|
00004c70  1d 42 17 20 20 e7 a4 66  72 65 65 6d 65 6d 28 30  |.B.  ..freemem(0|
00004c80  29 3e 3d 6d 25 8c 0d 1d  4c 2e 20 20 f2 6c 6f 67  |)>=m%...L.  .log|
00004c90  28 22 53 75 62 6d 69 74  74 69 6e 67 20 66 69 6c  |("Submitting fil|
00004ca0  74 65 72 20 6a 6f 62 3a  20 22 2b 61 24 29 3a f2  |ter job: "+a$):.|
00004cb0  68 67 6f 6e 0d 1d 56 47  20 20 c8 99 22 58 57 69  |hgon..VG  .."XWi|
00004cc0  6d 70 5f 53 74 61 72 74  54 61 73 6b 22 2c 61 24  |mp_StartTask",a$|
00004cd0  2b 22 20 22 2b 66 24 3a  f2 68 67 6f 66 66 3a e7  |+" "+f$:.hgoff:.|
00004ce0  64 25 8c f2 70 6f 6c 6c  28 30 29 3a 46 25 3d a4  |d%..poll(0):F%=.|
00004cf0  64 65 6c 66 69 6c 65 28  66 24 29 0d 1d 60 07 20  |delfile(f$)..`. |
00004d00  20 cc 0d 1d 6a 1a 20 20  f2 6d 65 73 73 61 67 65  | ...j.  .message|
00004d10  30 28 22 46 6d 65 6d 32  22 2c 30 29 0d 1d 74 07  |0("Fmem2",0)..t.|
00004d20  20 20 cd 0d 1d 7e 05 cd  0d 1d 88 05 e1 0d 1d 92  |  ...~..........|
00004d30  04 0d 1d 9c 19 dd a4 63  68 65 63 6b 66 6f 72 77  |.......checkforw|
00004d40  61 72 64 28 67 24 2c 75  24 29 0d 1d a6 17 ea 75  |ard(g$,u$).....u|
00004d50  25 2c 66 24 2c 46 25 2c  66 74 6f 24 2c 72 65 74  |%,f$,F%,fto$,ret|
00004d60  25 0d 1d b0 19 75 25 3d  a4 75 73 65 72 6e 6f 28  |%....u%=.userno(|
00004d70  75 24 29 3a e7 75 25 3e  30 8c 0d 1d ba 1f 20 20  |u$):.u%>0.....  |
00004d80  66 24 3d a4 75 70 61 74  68 28 75 24 29 2b 22 2e  |f$=.upath(u$)+".|
00004d90  76 61 63 61 74 69 6f 6e  22 0d 1d c4 16 20 20 e7  |vacation"....  .|
00004da0  a4 6f 62 6a 74 79 70 65  28 66 24 29 3d 31 8c 0d  |.objtype(f$)=1..|
00004db0  1d ce 3a 20 20 20 20 e7  70 72 65 63 65 64 65 6e  |..:    .preceden|
00004dc0  63 65 24 3c 3e 22 62 75  6c 6b 22 80 70 72 65 63  |ce$<>"bulk".prec|
00004dd0  65 64 65 6e 63 65 24 3c  3e 22 6a 75 6e 6b 22 80  |edence$<>"junk".|
00004de0  66 72 6f 6d 24 3e 22 22  8c 0d 1d d8 2b 20 20 20  |from$>""....+   |
00004df0  20 20 20 e7 a4 66 69 6c  65 73 69 7a 65 28 66 24  |   ..filesize(f$|
00004e00  29 3e 30 8c f2 76 61 63  61 74 69 6f 6e 28 75 24  |)>0..vacation(u$|
00004e10  2c 66 24 29 0d 1d e2 09  20 20 20 20 cd 0d 1d ec  |,f$)....    ....|
00004e20  07 20 20 cd 0d 1d f6 15  20 20 e7 75 73 65 72 66  |.  .....  .userf|
00004e30  24 28 75 25 29 3e 22 22  8c 0d 1e 00 36 20 20 20  |$(u%)>""....6   |
00004e40  20 66 74 6f 24 3d 75 73  65 72 66 24 28 75 25 29  | fto$=userf$(u%)|
00004e50  3a c8 95 c0 66 74 6f 24  2c 31 29 3d 22 2b 22 3a  |:...fto$,1)="+":|
00004e60  66 74 6f 24 3d c1 66 74  6f 24 2c 32 29 3a ce 0d  |fto$=.fto$,2):..|
00004e70  1e 0a 33 20 20 20 20 f2  6c 6f 67 28 22 46 6f 72  |..3    .log("For|
00004e80  77 61 72 64 69 6e 67 20  6d 61 69 6c 20 66 6f 72  |warding mail for|
00004e90  20 22 2b 75 24 2b 22 20  74 6f 20 22 2b 66 74 6f  | "+u$+" to "+fto|
00004ea0  24 29 0d 1e 14 4c 20 20  20 20 66 24 3d a4 74 6d  |$)...L    f$=.tm|
00004eb0  70 66 69 6c 65 3a c8 99  22 58 4f 53 5f 46 69 6c  |pfile:.."XOS_Fil|
00004ec0  65 22 2c 31 30 2c 66 24  2c 26 46 46 46 2c 2c 61  |e",10,f$,&FFF,,a|
00004ed0  72 74 62 61 73 65 25 2c  61 72 74 62 61 73 65 25  |rtbase%,artbase%|
00004ee0  2b 70 74 72 25 20 b8 65  72 72 25 3b 46 25 0d 1e  |+ptr% .err%;F%..|
00004ef0  1e 12 20 20 20 20 e7 28  46 25 80 31 29 3d 30 8c  |..    .(F%.1)=0.|
00004f00  0d 1e 28 20 20 20 20 20  20 20 66 24 3d a4 72 65  |..(       f$=.re|
00004f10  6d 61 69 6c 28 66 74 6f  24 2c 66 24 2c 75 24 29  |mail(fto$,f$,u$)|
00004f20  0d 1e 32 2b 20 20 20 20  20 20 e7 66 24 3d 22 22  |..2+      .f$=""|
00004f30  80 c0 75 73 65 72 66 24  28 75 25 29 2c 31 29 3c  |..userf$(u%),1)<|
00004f40  3e 22 2b 22 8c 72 65 74  25 3d 31 0d 1e 3c 09 20  |>"+".ret%=1..<. |
00004f50  20 20 20 cd 0d 1e 46 07  20 20 cd 0d 1e 50 05 cd  |   ...F.  ...P..|
00004f60  0d 1e 5a 2c e7 72 65 74  25 3d 30 80 a7 61 72 72  |..Z,.ret%=0..arr|
00004f70  6d 61 69 6c 24 2c 75 24  29 3d 30 8c 61 72 72 6d  |mail$,u$)=0.arrm|
00004f80  61 69 6c 24 2b 3d 22 2c  22 2b 75 24 0d 1e 64 09  |ail$+=","+u$..d.|
00004f90  3d 72 65 74 25 0d 1e 6e  04 0d 1e 78 0e dd a4 67  |=ret%..n...x...g|
00004fa0  74 6f 75 28 67 24 29 0d  1e 82 10 ea 75 24 2c 75  |tou(g$).....u$,u|
00004fb0  25 3a 75 24 3d 67 24 0d  1e 8c 1d e7 c0 a4 6c 6f  |%:u$=g$.......lo|
00004fc0  77 65 72 28 67 24 29 2c  36 29 3d 22 65 6d 61 69  |wer(g$),6)="emai|
00004fd0  6c 2e 22 8c 0d 1e 96 2e  20 20 75 24 3d c1 67 24  |l.".....  u$=.g$|
00004fe0  2c 37 29 3a 75 25 3d a7  75 24 2c 22 2e 22 29 3a  |,7):u%=.u$,"."):|
00004ff0  e7 75 25 3e 30 8c 75 24  3d c0 75 24 2c 75 25 2d  |.u%>0.u$=.u$,u%-|
00005000  31 29 0d 1e a0 05 cd 0d  1e aa 07 3d 75 24 0d 1e  |1).........=u$..|
00005010  b4 04 0d 1e be 16 dd f2  76 61 63 61 74 69 6f 6e  |........vacation|
00005020  28 75 24 2c 66 32 24 29  0d 1e c8 10 ea 66 24 2c  |(u$,f2$).....f$,|
00005030  64 24 2c 73 24 2c 46 25  0d 1e d2 31 66 24 3d a4  |d$,s$,F%...1f$=.|
00005040  74 6d 70 66 69 6c 65 3a  64 24 3d 66 72 6f 6d 24  |tmpfile:d$=from$|
00005050  3a e7 72 65 70 6c 79 74  6f 24 3e 22 22 8c 64 24  |:.replyto$>"".d$|
00005060  3d 72 65 70 6c 79 74 6f  24 0d 1e dc 3a 73 24 3d  |=replyto$...:s$=|
00005070  73 75 62 6a 65 63 74 24  3a e7 c0 a4 6c 6f 77 65  |subject$:...lowe|
00005080  72 28 73 75 62 6a 65 63  74 24 29 2c 34 29 3c 3e  |r(subject$),4)<>|
00005090  22 72 65 3a 20 22 8c 73  24 3d 22 52 65 3a 20 22  |"re: ".s$="Re: "|
000050a0  2b 73 24 0d 1e e6 14 66  31 25 3d a4 6f 70 65 6e  |+s$....f1%=.open|
000050b0  6f 75 74 28 66 24 29 0d  1e f0 11 e7 66 31 25 3e  |out(f$).....f1%>|
000050c0  30 80 64 24 3e 22 22 8c  0d 1e fa 16 20 20 66 32  |0.d$>"".....  f2|
000050d0  25 3d a4 6f 70 65 6e 69  6e 28 66 32 24 29 0d 1f  |%=.openin(f2$)..|
000050e0  04 0d 20 20 e7 66 32 25  3e 30 8c 0d 1f 0e 17 20  |..  .f2%>0..... |
000050f0  20 20 20 d5 23 66 31 25  2c 22 54 6f 3a 20 22 2b  |   .#f1%,"To: "+|
00005100  64 24 0d 1f 18 27 20 20  20 20 d5 23 66 31 25 2c  |d$...'    .#f1%,|
00005110  22 46 72 6f 6d 3a 20 22  2b 75 24 2b 22 40 22 2b  |"From: "+u$+"@"+|
00005120  6d 61 69 6c 6e 61 6d 65  24 0d 1f 22 1c 20 20 20  |mailname$..".   |
00005130  20 d5 23 66 31 25 2c 22  53 75 62 6a 65 63 74 3a  | .#f1%,"Subject:|
00005140  20 22 2b 73 24 0d 1f 2c  29 20 20 20 20 f2 61 75  | "+s$..,)    .au|
00005150  74 6f 68 65 61 64 65 72  73 28 66 31 25 29 3a f2  |toheaders(f1%):.|
00005160  66 63 6f 70 79 28 66 32  25 2c 66 31 25 29 0d 1f  |fcopy(f2%,f1%)..|
00005170  36 2b 20 20 20 20 f2 63  66 28 66 31 25 29 3a f2  |6+    .cf(f1%):.|
00005180  63 66 28 66 32 25 29 3a  f2 73 65 74 74 79 70 65  |cf(f2%):.settype|
00005190  28 66 24 2c 26 46 46 46  29 0d 1f 40 1b 20 20 20  |(f$,&FFF)..@.   |
000051a0  20 61 24 3d a4 73 65 6e  64 6d 61 69 6c 28 66 24  | a$=.sendmail(f$|
000051b0  2c 75 24 29 0d 1f 4a 09  20 20 20 20 cc 0d 1f 54  |,u$)..J.    ...T|
000051c0  10 20 20 20 20 f2 63 66  28 66 31 25 29 0d 1f 5e  |.    .cf(f1%)..^|
000051d0  07 20 20 cd 0d 1f 68 05  cd 0d 1f 72 13 46 25 3d  |.  ...h....r.F%=|
000051e0  a4 64 65 6c 66 69 6c 65  28 66 24 29 0d 1f 7c 05  |.delfile(f$)..|.|
000051f0  e1 0d 1f 86 04 0d 1f 90  17 dd f2 72 65 74 75 72  |...........retur|
00005200  6e 72 65 63 65 69 70 74  28 64 24 29 0d 1f 9a 10  |nreceipt(d$)....|
00005210  ea 66 24 2c 61 24 2c 73  24 2c 46 25 0d 1f a4 3b  |.f$,a$,s$,F%...;|
00005220  e7 64 6f 72 65 63 65 69  70 74 25 3c 3e 30 80 70  |.doreceipt%<>0.p|
00005230  72 65 63 65 64 65 6e 63  65 24 3c 3e 22 62 75 6c  |recedence$<>"bul|
00005240  6b 22 80 70 72 65 63 65  64 65 6e 63 65 24 3c 3e  |k".precedence$<>|
00005250  22 6a 75 6e 6b 22 8c 0d  1f ae 11 20 20 66 24 3d  |"junk".....  f$=|
00005260  a4 74 6d 70 66 69 6c 65  0d 1f b8 3c 20 20 73 24  |.tmpfile...<  s$|
00005270  3d 73 75 62 6a 65 63 74  24 3a e7 c0 a4 6c 6f 77  |=subject$:...low|
00005280  65 72 28 73 24 29 2c 34  29 3c 3e 22 72 65 3a 20  |er(s$),4)<>"re: |
00005290  22 80 73 24 3e 22 22 8c  73 24 3d 22 52 65 3a 20  |".s$>"".s$="Re: |
000052a0  22 2b 73 24 0d 1f c2 16  20 20 66 31 25 3d a4 6f  |"+s$....  f1%=.o|
000052b0  70 65 6e 6f 75 74 28 66  24 29 0d 1f cc 0d 20 20  |penout(f$)....  |
000052c0  e7 66 31 25 3e 30 8c 0d  1f d6 17 20 20 20 20 d5  |.f1%>0.....    .|
000052d0  23 66 31 25 2c 22 54 6f  3a 20 22 2b 64 24 0d 1f  |#f1%,"To: "+d$..|
000052e0  e0 2e 20 20 20 20 d5 23  66 31 25 2c 22 46 72 6f  |..    .#f1%,"Fro|
000052f0  6d 3a 20 6d 61 69 6c 65  72 2d 64 61 65 6d 6f 6e  |m: mailer-daemon|
00005300  40 22 2b 6d 61 69 6c 6e  61 6d 65 24 0d 1f ea 37  |@"+mailname$...7|
00005310  20 20 20 20 d5 23 66 31  25 2c 22 53 75 62 6a 65  |    .#f1%,"Subje|
00005320  63 74 3a 20 41 63 6b 6e  6f 77 6c 65 64 67 65 6d  |ct: Acknowledgem|
00005330  65 6e 74 20 6f 66 20 72  65 63 65 69 70 74 20 22  |ent of receipt "|
00005340  2b 73 24 0d 1f f4 19 20  20 20 20 f2 61 75 74 6f  |+s$....    .auto|
00005350  68 65 61 64 65 72 73 28  66 31 25 29 0d 1f fe 25  |headers(f1%)...%|
00005360  20 20 20 20 d5 23 66 31  25 2c 22 59 6f 75 72 20  |    .#f1%,"Your |
00005370  6d 65 73 73 61 67 65 20  22 2b 6d 65 73 73 69 64  |message "+messid|
00005380  24 0d 20 08 31 20 20 20  20 e7 73 75 62 6a 65 63  |$. .1    .subjec|
00005390  74 24 3e 22 22 8c d5 23  66 31 25 2c 22 63 6f 6e  |t$>""..#f1%,"con|
000053a0  63 65 72 6e 69 6e 67 20  22 2b 73 75 62 6a 65 63  |cerning "+subjec|
000053b0  74 24 0d 20 12 17 20 20  20 20 d5 23 66 31 25 2c  |t$. ..    .#f1%,|
000053c0  22 74 6f 20 22 2b 74 6f  24 0d 20 1c 2a 20 20 20  |"to "+to$. .*   |
000053d0  20 d5 23 66 31 25 2c 22  77 61 73 20 72 65 63 65  | .#f1%,"was rece|
000053e0  69 76 65 64 20 61 74 20  22 2b 68 6f 73 74 6e 61  |ived at "+hostna|
000053f0  6d 65 24 0d 20 26 22 20  20 20 20 f2 63 66 28 66  |me$. &"    .cf(f|
00005400  31 25 29 3a f2 73 65 74  74 79 70 65 28 66 24 2c  |1%):.settype(f$,|
00005410  26 46 46 46 29 0d 20 30  38 20 20 20 20 61 24 3d  |&FFF). 08    a$=|
00005420  a4 73 65 6e 64 6d 61 69  6c 28 66 24 2c 22 6d 61  |.sendmail(f$,"ma|
00005430  69 6c 65 72 2d 64 61 65  6d 6f 6e 22 29 3a 46 25  |iler-daemon"):F%|
00005440  3d a4 64 65 6c 66 69 6c  65 28 66 24 29 0d 20 3a  |=.delfile(f$). :|
00005450  07 20 20 cd 0d 20 44 05  cd 0d 20 4e 05 e1 0d 20  |.  .. D... N... |
00005460  58 04 0d 20 62 17 dd f2  61 75 74 6f 68 65 61 64  |X.. b...autohead|
00005470  65 72 73 28 6f 75 74 25  29 0d 20 6c 35 d5 23 6f  |ers(out%). l5.#o|
00005480  75 74 25 2c 22 4d 65 73  73 61 67 65 2d 49 44 3a  |ut%,"Message-ID:|
00005490  20 3c 22 2b a4 69 64 5f  64 61 74 65 2b 22 40 22  | <"+.id_date+"@"|
000054a0  2b 68 6f 73 74 6e 61 6d  65 24 2b 22 3e 22 0d 20  |+hostname$+">". |
000054b0  76 1d d5 23 6f 75 74 25  2c 22 44 61 74 65 3a 20  |v..#out%,"Date: |
000054c0  22 2b a4 72 66 63 5f 64  61 74 65 0d 20 80 1d d5  |"+.rfc_date. ...|
000054d0  23 6f 75 74 25 2c 22 50  72 65 63 65 64 65 6e 63  |#out%,"Precedenc|
000054e0  65 3a 20 62 75 6c 6b 22  0d 20 8a 2d d5 23 6f 75  |e: bulk". .-.#ou|
000054f0  74 25 2c 22 58 2d 4d 61  69 6c 65 72 3a 20 52 49  |t%,"X-Mailer: RI|
00005500  53 43 20 4f 53 20 4e 65  77 73 62 61 73 65 20 22  |SC OS Newsbase "|
00005510  2b 76 65 72 24 0d 20 94  0d d5 23 6f 75 74 25 2c  |+ver$. ...#out%,|
00005520  22 22 0d 20 9e 05 e1 0d  20 a8 04 0d 20 b2 14 dd  |"". .... ... ...|
00005530  f2 61 72 74 73 61 76 65  28 67 25 2c 73 25 29 0d  |.artsave(g%,s%).|
00005540  20 bc 16 ea 67 24 2c 73  24 2c 6f 75 74 64 24 2c  | ...g$,s$,outd$,|
00005550  6f 75 74 66 24 0d 20 c6  37 e7 73 75 70 65 72 73  |outf$. .7.supers|
00005560  65 64 65 24 3e 22 22 80  61 70 70 72 6f 76 65 64  |ede$>"".approved|
00005570  24 3e 22 22 f2 64 65 6c  65 74 65 69 64 28 67 25  |$>"".deleteid(g%|
00005580  2c 73 75 70 65 72 73 65  64 65 24 29 0d 20 d0 34  |,supersede$). .4|
00005590  e7 63 6f 6e 74 72 6f 6c  24 3e 22 22 80 61 70 70  |.control$>"".app|
000055a0  72 6f 76 65 64 24 3e 22  22 f2 64 6f 63 6f 6e 74  |roved$>"".docont|
000055b0  72 6f 6c 28 67 25 2c 63  6f 6e 74 72 6f 6c 24 29  |rol(g%,control$)|
000055c0  0d 20 da 3d 67 24 3d 67  72 70 24 28 67 25 29 3a  |. .=g$=grp$(g%):|
000055d0  73 24 3d a4 73 65 71 73  74 72 28 73 25 29 3a 6f  |s$=.seqstr(s%):o|
000055e0  75 74 66 24 3d a4 61 72  74 69 63 6c 65 6f 70 28  |utf$=.articleop(|
000055f0  67 25 2c 73 24 2c 30 2c  22 22 2c 30 29 0d 20 e4  |g%,s$,0,"",0). .|
00005600  0e e7 6f 75 74 66 24 3e  22 22 8c 0d 20 ee 3a 20  |..outf$>"".. .: |
00005610  20 f2 6e 62 75 70 64 61  74 65 28 32 2c 67 24 2c  | .nbupdate(2,g$,|
00005620  73 25 2c 66 72 6f 6d 24  2c 73 75 62 6a 65 63 74  |s%,from$,subject|
00005630  24 29 3a f2 61 64 64 74  6f 69 6e 64 65 78 28 67  |$):.addtoindex(g|
00005640  25 2c 73 25 29 0d 20 f8  36 20 20 e7 65 78 70 69  |%,s%). .6  .expi|
00005650  72 65 73 25 3e 30 80 69  67 65 78 70 25 3d 30 8c  |res%>0.igexp%=0.|
00005660  f2 73 65 74 66 69 6c 65  65 78 70 28 6f 75 74 66  |.setfileexp(outf|
00005670  24 2c 65 78 70 69 72 65  73 25 29 0d 21 02 2e 20  |$,expires%).!.. |
00005680  20 f2 70 72 69 6e 74 28  22 22 2c 67 24 2b 22 2e  | .print("",g$+".|
00005690  22 2b 73 24 2c 22 22 2c  22 22 29 3a f2 70 6f 6c  |"+s$,"",""):.pol|
000056a0  6c 28 73 6c 69 63 65 25  29 0d 21 0c 29 20 20 e7  |l(slice%).!.)  .|
000056b0  74 6f 74 61 6c 25 83 33  30 3d 30 80 66 61 73 74  |total%.30=0.fast|
000056c0  25 3d 30 8c f2 77 72 69  74 65 5f 72 65 63 66 69  |%=0..write_recfi|
000056d0  6c 65 0d 21 16 07 20 20  cc 0d 21 20 2b 20 20 f2  |le.!..  ..! +  .|
000056e0  6d 65 73 73 61 67 65 28  a4 6d 73 67 32 28 22 44  |message(.msg2("D|
000056f0  73 61 76 65 66 61 69 6c  22 2c c3 73 25 2c 67 24  |savefail",.s%,g$|
00005700  29 2c 31 29 0d 21 2a 30  20 20 f2 6c 6f 67 28 22  |),1).!*0  .log("|
00005710  44 65 62 61 74 63 68 20  73 61 76 65 20 66 61 69  |Debatch save fai|
00005720  6c 75 72 65 3a 20 22 2b  67 24 2b 22 20 23 22 2b  |lure: "+g$+" #"+|
00005730  c3 73 25 29 0d 21 34 05  cd 0d 21 3e 05 e1 0d 21  |.s%).!4...!>...!|
00005740  48 04 0d 21 52 13 dd f2  77 72 69 74 65 5f 72 65  |H..!R...write_re|
00005750  63 66 69 6c 65 0d 21 5c  29 e7 72 65 63 70 6f 73  |cfile.!\).recpos|
00005760  25 3d 30 84 a4 64 69 73  6b 73 70 61 63 65 28 62  |%=0..diskspace(b|
00005770  61 73 65 64 69 72 24 29  3c 32 30 30 8c e1 0d 21  |asedir$)<200...!|
00005780  66 25 66 30 25 3d a4 6f  70 65 6e 6f 75 74 28 62  |f%f0%=.openout(b|
00005790  61 73 65 64 69 72 24 2b  22 2e 72 65 63 6f 76 65  |asedir$+".recove|
000057a0  72 22 29 0d 21 70 0b e7  66 30 25 3e 30 8c 0d 21  |r").!p..f0%>0..!|
000057b0  7a 0f 20 20 d5 23 66 30  25 2c 62 66 24 0d 21 84  |z.  .#f0%,bf$.!.|
000057c0  11 20 20 d5 23 66 30 25  2c c3 6c 65 6e 25 0d 21  |.  .#f0%,.len%.!|
000057d0  8e 14 20 20 d5 23 66 30  25 2c c3 72 65 63 70 6f  |..  .#f0%,.recpo|
000057e0  73 25 0d 21 98 31 20 20  f2 63 66 28 66 30 25 29  |s%.!.1  .cf(f0%)|
000057f0  3a f2 73 65 74 74 79 70  65 28 62 61 73 65 64 69  |:.settype(basedi|
00005800  72 24 2b 22 2e 72 65 63  6f 76 65 72 22 2c 26 46  |r$+".recover",&F|
00005810  46 46 29 0d 21 a2 13 20  20 f2 77 72 69 74 65 67  |FF).!..  .writeg|
00005820  72 70 64 61 74 61 0d 21  ac 05 cd 0d 21 b6 05 e1  |rpdata.!....!...|
00005830  0d 21 c0 04 0d 21 ca 11  dd f2 64 65 6c 5f 72 65  |.!...!....del_re|
00005840  63 66 69 6c 65 0d 21 d4  28 ea 46 25 3a 46 25 3d  |cfile.!.(.F%:F%=|
00005850  a4 64 65 6c 66 69 6c 65  28 62 61 73 65 64 69 72  |.delfile(basedir|
00005860  24 2b 22 2e 72 65 63 6f  76 65 72 22 29 0d 21 de  |$+".recover").!.|
00005870  05 e1 0d 21 e8 04 0d 21  f2 19 dd a4 63 68 65 63  |...!...!....chec|
00005880  6b 5f 72 65 63 66 69 6c  65 28 f8 20 70 25 29 0d  |k_recfile(. p%).|
00005890  21 fc 11 ea 66 24 2c 66  32 24 2c 6c 25 2c 6d 24  |!...f$,f2$,l%,m$|
000058a0  0d 22 06 24 66 30 25 3d  a4 6f 70 65 6e 69 6e 28  |.".$f0%=.openin(|
000058b0  62 61 73 65 64 69 72 24  2b 22 2e 72 65 63 6f 76  |basedir$+".recov|
000058c0  65 72 22 29 0d 22 10 0b  e7 66 30 25 3e 30 8c 0d  |er")."...f0%>0..|
000058d0  22 1a 0e 20 20 66 24 3d  be 23 66 30 25 0d 22 24  |"..  f$=.#f0%."$|
000058e0  0f 20 20 6c 25 3d bb be  23 66 30 25 0d 22 2e 0f  |.  l%=..#f0%."..|
000058f0  20 20 70 25 3d bb be 23  66 30 25 0d 22 38 0e 20  |  p%=..#f0%."8. |
00005900  20 f2 63 66 28 66 30 25  29 0d 22 42 19 20 20 66  | .cf(f0%)."B.  f|
00005910  32 24 3d 77 6f 72 6b 64  69 72 24 2b 22 2e 22 2b  |2$=workdir$+"."+|
00005920  66 24 0d 22 4c 2f 20 20  e7 a4 6f 62 6a 74 79 70  |f$."L/  ..objtyp|
00005930  65 28 66 32 24 29 3d 31  80 a4 66 69 6c 65 73 69  |e(f2$)=1..filesi|
00005940  7a 65 28 66 32 24 29 3d  6c 25 80 70 25 3c 6c 25  |ze(f2$)=l%.p%<l%|
00005950  8c 0d 22 56 23 20 20 20  20 6d 24 3d a4 6d 73 67  |.."V#    m$=.msg|
00005960  32 28 22 44 72 65 63 6f  76 65 72 22 2c 66 24 2c  |2("Drecover",f$,|
00005970  c3 70 25 29 0d 22 60 28  20 20 20 20 f2 6d 65 73  |.p%)."`(    .mes|
00005980  73 61 67 65 28 6d 24 2c  30 29 3a f2 70 6f 6c 6c  |sage(m$,0):.poll|
00005990  28 30 29 3a f2 6c 6f 67  28 6d 24 29 0d 22 6a 42  |(0):.log(m$)."jB|
000059a0  20 20 20 20 6c 25 3d a4  64 65 6c 66 69 6c 65 28  |    l%=.delfile(|
000059b0  62 61 73 65 64 69 72 24  2b 22 2e 72 65 63 6f 76  |basedir$+".recov|
000059c0  65 72 22 29 3a f2 70 6f  6c 6c 28 31 30 30 29 3a  |er"):.poll(100):|
000059d0  f2 6d 65 73 73 61 67 65  28 22 22 2c 30 29 0d 22  |.message("",0)."|
000059e0  74 09 20 20 20 20 cc 0d  22 7e 13 20 20 20 20 66  |t.    .."~.    f|
000059f0  32 24 3d 22 22 3a 70 25  3d 30 0d 22 88 07 20 20  |2$="":p%=0."..  |
00005a00  cd 0d 22 92 05 cd 0d 22  9c 08 3d 66 32 24 0d 22  |.."...."..=f2$."|
00005a10  a6 04 0d 22 b0 17 dd f2  73 65 74 66 69 6c 65 65  |..."....setfilee|
00005a20  78 70 28 66 24 2c 64 25  29 0d 22 ba 0d ea 46 25  |xp(f$,d%)."...F%|
00005a30  2c 65 25 2c 6c 25 0d 22  c4 24 c8 99 22 58 4f 53  |,e%,l%.".$.."XOS|
00005a40  5f 46 69 6c 65 22 2c 32  2c 66 24 2c 26 46 46 46  |_File",2,f$,&FFF|
00005a50  46 46 46 46 46 20 b8 3b  46 25 0d 22 ce 1e c8 99  |FFFFF .;F%."....|
00005a60  22 58 4f 53 5f 46 69 6c  65 22 2c 33 2c 66 24 2c  |"XOS_File",3,f$,|
00005a70  2c 64 25 20 b8 3b 46 25  0d 22 d8 0c e7 28 46 25  |,d% .;F%."...(F%|
00005a80  80 31 29 8c 0d 22 e2 17  20 20 c8 99 22 58 4f 53  |.1).."..  .."XOS|
00005a90  5f 46 69 6c 65 22 2c 39  2c 66 24 0d 22 ec 07 20  |_File",9,f$.".. |
00005aa0  20 cc 0d 22 f6 23 20 20  c8 99 22 58 4f 53 5f 46  | ..".#  .."XOS_F|
00005ab0  69 6c 65 22 2c 31 37 2c  66 24 b8 2c 2c 6c 25 2c  |ile",17,f$.,,l%,|
00005ac0  65 25 3b 46 25 0d 23 00  39 20 20 e7 28 46 25 80  |e%;F%.#.9  .(F%.|
00005ad0  31 29 3d 30 8c e7 6c 25  3c 3e 26 46 46 46 46 46  |1)=0..l%<>&FFFFF|
00005ae0  46 46 46 20 84 65 25 3c  3e 64 25 20 8c c8 99 22  |FFF .e%<>d% ..."|
00005af0  58 4f 53 5f 46 69 6c 65  22 2c 39 2c 66 24 0d 23  |XOS_File",9,f$.#|
00005b00  0a 05 cd 0d 23 14 05 e1  0d 23 1e 04 0d 23 28 1c  |....#....#...#(.|
00005b10  dd a4 61 72 74 63 6f 70  79 28 67 25 2c 73 25 2c  |..artcopy(g%,s%,|
00005b20  73 6f 75 72 63 65 24 29  0d 23 32 0a ea 64 65 73  |source$).#2..des|
00005b30  74 24 0d 23 3c 0a e7 67  25 3e 30 8c 0d 23 46 32  |t$.#<..g%>0..#F2|
00005b40  20 20 64 65 73 74 24 3d  a4 61 72 74 69 63 6c 65  |  dest$=.article|
00005b50  6f 70 28 67 25 2c a4 73  65 71 73 74 72 28 73 25  |op(g%,.seqstr(s%|
00005b60  29 2c 31 2c 73 6f 75 72  63 65 24 2c 30 29 0d 23  |),1,source$,0).#|
00005b70  50 10 20 20 e7 64 65 73  74 24 3e 22 22 8c 0d 23  |P.  .dest$>""..#|
00005b80  5a 2f 20 20 20 20 f2 6e  62 75 70 64 61 74 65 28  |Z/    .nbupdate(|
00005b90  32 2c 67 72 70 24 28 67  25 29 2c 73 25 2c 66 72  |2,grp$(g%),s%,fr|
00005ba0  6f 6d 24 2c 73 75 62 6a  65 63 74 24 29 0d 23 64  |om$,subject$).#d|
00005bb0  1a 20 20 20 20 f2 61 64  64 74 6f 69 6e 64 65 78  |.    .addtoindex|
00005bc0  28 67 25 2c 73 25 29 0d  23 6e 07 20 20 cd 0d 23  |(g%,s%).#n.  ..#|
00005bd0  78 05 cd 0d 23 82 0f 3d  28 64 65 73 74 24 3e 22  |x...#..=(dest$>"|
00005be0  22 29 0d 23 8c 04 0d 23  96 2d dd a4 61 72 74 69  |").#...#.-..arti|
00005bf0  63 6c 65 6f 70 28 67 25  2c 64 65 73 74 24 2c 6d  |cleop(g%,dest$,m|
00005c00  6f 64 65 25 2c 73 6f 75  72 63 65 24 2c 70 61 63  |ode%,source$,pac|
00005c10  6b 25 29 0d 23 a0 25 f4  20 73 61 76 65 20 6f 72  |k%).#.%. save or|
00005c20  20 6d 6f 76 65 20 61 20  66 69 6c 65 20 74 6f 20  | move a file to |
00005c30  61 20 67 72 6f 75 70 2e  0d 23 aa 38 f4 20 6d 6f  |a group..#.8. mo|
00005c40  64 65 25 20 3d 20 30 20  74 6f 20 73 61 76 65 20  |de% = 0 to save |
00005c50  66 72 6f 6d 20 6d 65 6d  2c 20 31 20 74 6f 20 63  |from mem, 1 to c|
00005c60  6f 70 79 2c 20 32 20 74  6f 20 72 65 6e 61 6d 65  |opy, 2 to rename|
00005c70  0d 23 b4 23 f4 20 73 6f  75 72 63 65 24 20 3d 20  |.#.#. source$ = |
00005c80  66 69 6c 65 20 74 6f 20  63 6f 70 79 2f 72 65 6e  |file to copy/ren|
00005c90  61 6d 65 0d 23 be 31 f4  20 72 65 74 75 72 6e 73  |ame.#.1. returns|
00005ca0  20 72 65 73 75 6c 74 69  6e 67 20 66 69 6c 65 6e  | resulting filen|
00005cb0  61 6d 65 20 6f 72 20 6e  75 6c 6c 20 66 6f 72 20  |ame or null for |
00005cc0  66 61 69 6c 0d 23 c8 30  ea 70 24 2c 6f 75 74 64  |fail.#.0.p$,outd|
00005cd0  24 2c 6f 75 74 66 24 2c  6f 6c 64 64 24 2c 61 24  |$,outf$,oldd$,a$|
00005ce0  2c 46 25 2c 74 72 79 25  2c 64 66 61 69 6c 25 2c  |,F%,try%,dfail%,|
00005cf0  65 72 72 25 0d 23 d2 26  74 72 79 25 3d 30 3a 64  |err%.#.&try%=0:d|
00005d00  66 61 69 6c 25 3d 30 3a  70 24 3d a4 70 61 74 68  |fail%=0:p$=.path|
00005d10  28 67 72 70 24 28 67 25  29 29 0d 23 dc 10 e7 67  |(grp$(g%)).#...g|
00005d20  25 3e 30 80 70 24 3e 22  22 8c 0d 23 e6 38 20 20  |%>0.p$>""..#.8  |
00005d30  6f 6c 64 64 24 3d 70 24  2b 22 2e 7e 78 22 3a 61  |oldd$=p$+".~x":a|
00005d40  24 3d 22 7e 78 22 3a e7  70 61 63 6b 25 3d 30 8c  |$="~x":.pack%=0.|
00005d50  61 24 3d a4 61 72 74 64  69 72 28 bb 64 65 73 74  |a$=.artdir(.dest|
00005d60  24 29 0d 23 f0 2e 20 20  6f 75 74 64 24 3d 6f 6c  |$).#..  outd$=ol|
00005d70  64 64 24 2b 22 2e 22 2b  61 24 3a 6f 75 74 66 24  |dd$+"."+a$:outf$|
00005d80  3d 6f 75 74 64 24 2b 22  2e 22 2b 64 65 73 74 24  |=outd$+"."+dest$|
00005d90  0d 23 fa 07 20 20 f5 0d  24 04 0c 20 20 20 20 46  |.#..  ..$..    F|
00005da0  25 3d 30 0d 24 0e 10 20  20 20 20 c8 8e 6d 6f 64  |%=0.$..    ..mod|
00005db0  65 25 ca 0d 24 18 47 20  20 20 20 20 20 c9 30 3a  |e%..$.G      .0:|
00005dc0  c8 99 22 58 4f 53 5f 46  69 6c 65 22 2c 31 30 2c  |.."XOS_File",10,|
00005dd0  6f 75 74 66 24 2c 26 46  46 46 2c 2c 61 72 74 62  |outf$,&FFF,,artb|
00005de0  61 73 65 25 2c 61 72 74  62 61 73 65 25 2b 70 74  |ase%,artbase%+pt|
00005df0  72 25 b8 65 72 72 25 3b  46 25 0d 24 22 37 20 20  |r%.err%;F%.$"7  |
00005e00  20 20 20 20 c9 31 3a c8  99 22 58 4f 53 5f 46 53  |    .1:.."XOS_FS|
00005e10  43 6f 6e 74 72 6f 6c 22  2c 32 36 2c 73 6f 75 72  |Control",26,sour|
00005e20  63 65 24 2c 6f 75 74 66  24 b8 65 72 72 25 3b 46  |ce$,outf$.err%;F|
00005e30  25 0d 24 2c 47 20 20 20  20 20 20 c9 32 3a e7 73  |%.$,G      .2:.s|
00005e40  6f 75 72 63 65 24 3c 3e  6f 75 74 66 24 8c c8 99  |ource$<>outf$...|
00005e50  22 58 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 22 2c  |"XOS_FSControl",|
00005e60  32 35 2c 73 6f 75 72 63  65 24 2c 6f 75 74 66 24  |25,source$,outf$|
00005e70  b8 65 72 72 25 3b 46 25  0d 24 36 09 20 20 20 20  |.err%;F%.$6.    |
00005e80  cb 0d 24 40 10 20 20 20  20 e7 28 46 25 80 31 29  |..$@.    .(F%.1)|
00005e90  8c 0d 24 4a 1a 20 20 20  20 20 20 65 72 72 25 3d  |..$J.      err%=|
00005ea0  28 21 65 72 72 25 80 26  46 46 29 0d 24 54 11 20  |(!err%.&FF).$T. |
00005eb0  20 20 20 20 20 c8 8e 65  72 72 25 ca 0d 24 5e 2b  |     ..err%..$^+|
00005ec0  20 20 20 20 20 20 20 20  c9 26 42 33 3a f2 63 68  |        .&B3:.ch|
00005ed0  65 63 6b 64 69 73 6b 3a  f2 66 75 6c 6c 64 69 72  |eckdisk:.fulldir|
00005ee0  28 6f 75 74 64 24 29 0d  24 68 1b 20 20 20 20 20  |(outd$).$h.     |
00005ef0  20 20 20 c9 26 44 36 3a  e7 64 66 61 69 6c 25 3d  |   .&D6:.dfail%=|
00005f00  30 8c 0d 24 72 16 20 20  20 20 20 20 20 20 20 20  |0..$r.          |
00005f10  64 66 61 69 6c 25 3d 31  0d 24 7c 4a 20 20 20 20  |dfail%=1.$|J    |
00005f20  20 20 20 20 20 20 e7 a4  65 6e 73 75 72 65 6e 65  |      ..ensurene|
00005f30  77 73 74 72 75 63 74 28  6f 6c 64 64 24 29 3d 30  |wstruct(oldd$)=0|
00005f40  8c 46 25 3d a4 65 6e 73  75 72 65 64 69 72 28 6f  |.F%=.ensuredir(o|
00005f50  75 74 64 24 29 3a 8b 6f  75 74 64 24 3d 6f 6c 64  |utd$):.outd$=old|
00005f60  64 24 0d 24 86 0f 20 20  20 20 20 20 20 20 20 20  |d$.$..          |
00005f70  cc 0d 24 90 19 20 20 20  20 20 20 20 20 20 20 6f  |..$..          o|
00005f80  75 74 64 24 3d 6f 6c 64  64 24 0d 24 9a 0f 20 20  |utd$=oldd$.$..  |
00005f90  20 20 20 20 20 20 20 20  cd 0d 24 a4 18 20 20 20  |        ..$..   |
00005fa0  20 20 20 20 20 7f 3a f2  63 68 65 63 6b 64 69 73  |     .:.checkdis|
00005fb0  6b 0d 24 ae 0b 20 20 20  20 20 20 cb 0d 24 b8 11  |k.$..      ..$..|
00005fc0  20 20 20 20 20 20 74 72  79 25 2b 3d 31 0d 24 c2  |      try%+=1.$.|
00005fd0  0b 20 20 20 20 20 20 cc  0d 24 cc 10 20 20 20 20  |.      ..$..    |
00005fe0  20 20 65 72 72 25 3d 30  0d 24 d6 09 20 20 20 20  |  err%=0.$..    |
00005ff0  cd 0d 24 e0 15 20 20 fd  74 72 79 25 3e 33 20 84  |..$..  .try%>3 .|
00006000  65 72 72 25 3d 30 0d 24  ea 05 cd 0d 24 f4 14 e7  |err%=0.$....$...|
00006010  65 72 72 25 3e 30 8c 6f  75 74 66 24 3d 22 22 0d  |err%>0.outf$="".|
00006020  24 fe 0a 3d 6f 75 74 66  24 0d 25 08 04 0d 25 12  |$..=outf$.%...%.|
00006030  19 dd a4 65 6e 73 75 72  65 6e 65 77 73 74 72 75  |...ensurenewstru|
00006040  63 74 28 64 24 29 0d 25  1c 39 ea 72 33 25 2c 46  |ct(d$).%.9.r3%,F|
00006050  25 3a c8 99 22 58 4f 53  5f 47 42 50 42 22 2c 31  |%:.."XOS_GBPB",1|
00006060  31 2c 64 24 2c 74 6d 70  25 2c 31 2c 30 2c 32 35  |1,d$,tmp%,1,0,25|
00006070  30 2c 22 2a 22 b8 2c 2c  2c 72 33 25 3b 46 25 0d  |0,"*".,,,r3%;F%.|
00006080  25 26 36 e7 28 46 25 80  31 29 3d 30 80 72 33 25  |%&6.(F%.1)=0.r3%|
00006090  3e 30 8c 74 25 3d 74 6d  70 25 21 31 36 3a e7 74  |>0.t%=tmp%!16:.t|
000060a0  25 3d 31 8c 46 25 3d a4  69 6e 73 65 72 74 64 69  |%=1.F%=.insertdi|
000060b0  72 28 64 24 29 0d 25 30  06 3d 30 0d 25 3a 04 0d  |r(d$).%0.=0.%:..|
000060c0  25 44 10 dd a4 61 72 74  64 69 72 28 6e 25 29 0d  |%D...artdir(n%).|
000060d0  25 4e 19 3d 22 7e 78 22  2b c3 28 28 28 6e 25 29  |%N.="~x"+.(((n%)|
000060e0  81 37 35 29 83 37 35 29  0d 25 58 04 0d 25 62 11  |.75).75).%X..%b.|
000060f0  dd f2 66 75 6c 6c 64 69  72 28 70 24 29 0d 25 6c  |..fulldir(p$).%l|
00006100  43 e7 c0 a4 6c 65 61 66  28 70 24 29 2c 32 29 3d  |C...leaf(p$),2)=|
00006110  22 7e 78 22 8c 46 25 3d  a4 69 6e 73 65 72 74 64  |"~x".F%=.insertd|
00006120  69 72 28 70 24 29 8b f2  6d 65 73 73 61 67 65 31  |ir(p$)..message1|
00006130  28 22 46 75 6c 6c 64 69  72 22 2c 70 24 2c 31 29  |("Fulldir",p$,1)|
00006140  0d 25 76 05 e1 0d 25 80  04 0d 25 8a 13 dd a4 69  |.%v...%...%....i|
00006150  6e 73 65 72 74 64 69 72  28 70 24 29 0d 25 94 18  |nsertdir(p$).%..|
00006160  ea 65 78 25 2c 6c 24 3a  6c 24 3d a4 6c 65 61 66  |.ex%,l$:l$=.leaf|
00006170  28 70 24 29 0d 25 9e 23  65 78 25 3d a4 72 65 6e  |(p$).%.#ex%=.ren|
00006180  61 6d 65 28 70 24 2c 77  6f 72 6b 64 69 72 24 2b  |ame(p$,workdir$+|
00006190  22 2e 22 2b 6c 24 29 0d  25 a8 12 f2 65 6e 73 75  |"."+l$).%...ensu|
000061a0  72 65 64 69 72 28 70 24  29 0d 25 b2 31 e7 65 78  |redir(p$).%.1.ex|
000061b0  25 3d 30 8c 65 78 25 3d  a4 72 65 6e 61 6d 65 28  |%=0.ex%=.rename(|
000061c0  77 6f 72 6b 64 69 72 24  2b 22 2e 22 2b 6c 24 2c  |workdir$+"."+l$,|
000061d0  70 24 2b 22 2e 22 2b 6c  24 29 0d 25 bc 0c 3d 28  |p$+"."+l$).%..=(|
000061e0  65 78 25 80 31 29 0d 25  c6 04 0d 25 d0 0d dd a4  |ex%.1).%...%....|
000061f0  73 65 71 28 67 25 29 0d  25 da 15 e7 67 72 70 73  |seq(g%).%...grps|
00006200  65 71 25 28 67 25 29 3c  3e 30 20 8c 0d 25 e4 22  |eq%(g%)<>0 ..%."|
00006210  20 20 67 72 70 73 65 71  25 28 67 25 29 3d 94 28  |  grpseq%(g%)=.(|
00006220  67 72 70 73 65 71 25 28  67 25 29 29 2b 31 0d 25  |grpseq%(g%))+1.%|
00006230  ee 07 20 20 cc 0d 25 f8  31 20 20 67 72 70 73 65  |..  ..%.1  grpse|
00006240  71 25 28 67 25 29 3d a4  66 69 6e 64 68 69 67 68  |q%(g%)=.findhigh|
00006250  65 73 74 28 a4 70 61 74  68 28 67 72 70 24 28 67  |est(.path(grp$(g|
00006260  25 29 29 2c 30 29 0d 26  02 22 20 20 e7 67 72 70  |%)),0).&."  .grp|
00006270  73 65 71 25 28 67 25 29  3d 30 8c 67 72 70 73 65  |seq%(g%)=0.grpse|
00006280  71 25 28 67 25 29 3d 31  0d 26 0c 05 cd 0d 26 16  |q%(g%)=1.&....&.|
00006290  11 3d 94 67 72 70 73 65  71 25 28 67 25 29 0d 26  |.=.grpseq%(g%).&|
000062a0  20 04 0d 26 2a 10 dd a4  73 65 71 73 74 72 28 73  | ..&*...seqstr(s|
000062b0  25 29 0d 26 34 1a 3d c2  22 30 30 30 30 30 30 30  |%).&4.=."0000000|
000062c0  30 22 2b c3 28 94 73 25  29 2c 38 29 0d 26 3e 04  |0"+.(.s%),8).&>.|
000062d0  0d 26 48 16 dd a4 65 6e  73 75 72 65 64 69 72 28  |.&H...ensuredir(|
000062e0  70 61 74 68 24 29 0d 26  52 18 ea 70 24 2c 6c 25  |path$).&R..p$,l%|
000062f0  2c 6c 70 24 2c 46 25 2c  74 25 2c 6f 6b 25 0d 26  |,lp$,F%,t%,ok%.&|
00006300  5c 1d 74 25 3d a4 6f 62  6a 74 79 70 65 28 70 61  |\.t%=.objtype(pa|
00006310  74 68 24 29 3a 6f 6b 25  3d 74 25 0d 26 66 0b e7  |th$):ok%=t%.&f..|
00006320  74 25 3c 32 20 8c 0d 26  70 2e 20 20 70 61 74 68  |t%<2 ..&p.  path|
00006330  24 3d a4 63 61 6e 6f 6e  28 70 61 74 68 24 29 3a  |$=.canon(path$):|
00006340  6c 25 3d a7 70 61 74 68  24 2c 22 24 22 29 3a 6f  |l%=.path$,"$"):o|
00006350  6b 25 3d 31 0d 26 7a 07  20 20 f5 0d 26 84 1f 20  |k%=1.&z.  ..&.. |
00006360  20 20 20 6c 25 3d a7 70  61 74 68 24 2b 22 2e 22  |   l%=.path$+"."|
00006370  2c 22 2e 22 2c 6c 25 2b  31 29 0d 26 8e 27 20 20  |,".",l%+1).&.'  |
00006380  20 20 70 24 3d c0 70 61  74 68 24 2c 6c 25 2d 31  |  p$=.path$,l%-1|
00006390  29 3a 74 25 3d a4 6f 62  6a 74 79 70 65 28 70 24  |):t%=.objtype(p$|
000063a0  29 0d 26 98 0d 20 20 20  20 c8 8e 74 25 ca 0d 26  |).&..    ..t%..&|
000063b0  a2 33 20 20 20 20 20 20  c9 30 3a f2 70 72 69 6e  |.3      .0:.prin|
000063c0  74 28 22 22 2c a4 6d 73  67 31 28 22 44 6d 61 6b  |t("",.msg1("Dmak|
000063d0  65 70 61 74 68 22 2c 70  24 29 2c 22 22 2c 22 22  |epath",p$),"",""|
000063e0  29 0d 26 ac 33 20 20 20  20 20 20 20 20 c8 99 22  |).&.3        .."|
000063f0  58 4f 53 5f 46 69 6c 65  22 2c 38 2c 70 24 b8 65  |XOS_File",8,p$.e|
00006400  72 72 25 3b 46 25 3a e7  28 46 25 80 31 29 8c 6f  |rr%;F%:.(F%.1).o|
00006410  6b 25 3d 30 0d 26 b6 12  20 20 20 20 20 20 c9 31  |k%=0.&..      .1|
00006420  3a 6f 6b 25 3d 30 0d 26  c0 12 20 20 20 20 20 20  |:ok%=0.&..      |
00006430  7f 3a 6c 70 24 3d 70 24  0d 26 ca 09 20 20 20 20  |.:lp$=p$.&..    |
00006440  cb 0d 26 d4 2a 20 20 20  20 e7 6f 6b 25 3d 30 3a  |..&.*    .ok%=0:|
00006450  f2 6d 65 73 73 61 67 65  31 28 22 44 70 61 74 68  |.message1("Dpath|
00006460  66 61 69 6c 22 2c 70 24  2c 31 29 0d 26 de 17 20  |fail",p$,1).&.. |
00006470  20 fd 6c 25 3e 3d a9 70  61 74 68 24 84 6f 6b 25  | .l%>=.path$.ok%|
00006480  3d 30 0d 26 e8 05 cd 0d  26 f2 08 3d 6f 6b 25 0d  |=0.&....&..=ok%.|
00006490  26 fc 04 0d 27 06 17 dd  a4 6e 61 6d 65 74 6f 6e  |&...'....nameton|
000064a0  6f 28 67 24 2c 61 64 64  25 29 0d 27 10 23 ea 6c  |o(g$,add%).'.#.l|
000064b0  6f 77 25 2c 68 69 67 68  25 2c 6d 69 64 25 2c 66  |ow%,high%,mid%,f|
000064c0  6f 75 6e 64 25 2c 67 31  24 2c 6e 6f 25 0d 27 1a  |ound%,g1$,no%.'.|
000064d0  12 67 31 24 3d a4 6c 6f  77 65 72 28 67 24 29 0d  |.g1$=.lower(g$).|
000064e0  27 24 0f e7 67 31 24 3d  6c 67 72 70 24 8c 0d 27  |'$..g1$=lgrp$..'|
000064f0  2e 0f 20 20 6e 6f 25 3d  6c 67 72 70 25 0d 27 38  |..  no%=lgrp%.'8|
00006500  07 20 20 cc 0d 27 42 18  20 20 e7 67 24 3e 22 22  |.  ..'B.  .g$>""|
00006510  80 a7 67 24 2c 22 2a 22  29 3c 31 8c 0d 27 4c 25  |..g$,"*")<1..'L%|
00006520  20 20 20 20 6c 6f 77 25  3d 31 3a 68 69 67 68 25  |    low%=1:high%|
00006530  3d 67 72 6f 75 70 73 25  3a 66 6f 75 6e 64 25 3d  |=groups%:found%=|
00006540  30 0d 27 56 15 20 20 20  20 c8 95 6c 6f 77 25 3c  |0.'V.    ..low%<|
00006550  3d 68 69 67 68 25 0d 27  60 32 20 20 20 20 6d 69  |=high%.'`2    mi|
00006560  64 25 3d 28 6c 6f 77 25  2b 68 69 67 68 25 29 81  |d%=(low%+high%).|
00006570  32 3a 74 67 24 3d a4 6c  6f 77 65 72 28 67 72 70  |2:tg$=.lower(grp|
00006580  24 28 6d 69 64 25 29 29  0d 27 6a 11 20 20 20 20  |$(mid%)).'j.    |
00006590  e7 67 31 24 3c 74 67 24  8c 0d 27 74 16 20 20 20  |.g1$<tg$..'t.   |
000065a0  20 20 20 68 69 67 68 25  3d 6d 69 64 25 2d 31 0d  |   high%=mid%-1.|
000065b0  27 7e 0b 20 20 20 20 20  20 cc 0d 27 88 37 20 20  |'~.      ..'.7  |
000065c0  20 20 20 20 e7 67 31 24  3e 74 67 24 8c 6c 6f 77  |    .g1$>tg$.low|
000065d0  25 3d 6d 69 64 25 2b 31  8b 66 6f 75 6e 64 25 3d  |%=mid%+1.found%=|
000065e0  6d 69 64 25 3a 6c 6f 77  25 3d 68 69 67 68 25 2b  |mid%:low%=high%+|
000065f0  31 0d 27 92 09 20 20 20  20 cd 0d 27 9c 09 20 20  |1.'..    ..'..  |
00006600  20 20 ce 0d 27 a6 12 20  20 20 20 e7 66 6f 75 6e  |  ..'..    .foun|
00006610  64 25 3e 30 8c 0d 27 b0  2b 20 20 20 20 20 20 6c  |d%>0..'.+      l|
00006620  67 72 70 24 3d 67 31 24  3a 6c 67 72 70 25 3d 66  |grp$=g1$:lgrp%=f|
00006630  6f 75 6e 64 25 3a 6e 6f  25 3d 66 6f 75 6e 64 25  |ound%:no%=found%|
00006640  0d 27 ba 0b 20 20 20 20  20 20 cc 0d 27 c4 10 20  |.'..      ..'.. |
00006650  20 20 20 20 20 e7 61 64  64 25 8c 0d 27 ce 48 20  |     .add%..'.H |
00006660  20 20 20 20 20 20 20 66  6f 75 6e 64 25 3d 30 3a  |       found%=0:|
00006670  e7 a4 61 63 74 69 76 65  28 67 24 29 80 a4 69 73  |..active(g$)..is|
00006680  61 63 68 65 66 28 67 24  29 3d 30 8c 66 6f 75 6e  |achef(g$)=0.foun|
00006690  64 25 3d a4 61 64 64 6e  65 77 67 72 6f 75 70 28  |d%=.addnewgroup(|
000066a0  67 24 29 0d 27 d8 37 20  20 20 20 20 20 20 20 e7  |g$).'.7        .|
000066b0  66 6f 75 6e 64 25 3e 30  8c 6c 67 72 70 24 3d 67  |found%>0.lgrp$=g|
000066c0  31 24 3a 6c 67 72 70 25  3d 66 6f 75 6e 64 25 3a  |1$:lgrp%=found%:|
000066d0  6e 6f 25 3d 66 6f 75 6e  64 25 0d 27 e2 0b 20 20  |no%=found%.'..  |
000066e0  20 20 20 20 cd 0d 27 ec  09 20 20 20 20 cd 0d 27  |    ..'..    ..'|
000066f0  f6 07 20 20 cd 0d 28 00  05 cd 0d 28 0a 08 3d 6e  |..  ..(....(..=n|
00006700  6f 25 0d 28 14 04 0d 28  1e 12 dd a4 6e 6f 74 6f  |o%.(...(....noto|
00006710  70 61 74 68 28 67 25 29  0d 28 28 14 3d a4 70 61  |path(g%).((.=.pa|
00006720  74 68 28 67 72 70 24 28  67 25 29 29 0d 28 32 04  |th(grp$(g%)).(2.|
00006730  0d 28 3c 13 dd a4 63 68  65 63 6b 63 61 73 65 28  |.(<...checkcase(|
00006740  67 24 29 0d 28 46 17 ea  67 31 24 3a 67 31 24 3d  |g$).(F..g1$:g1$=|
00006750  a4 6c 6f 77 65 72 28 67  24 29 0d 28 50 27 e7 c0  |.lower(g$).(P'..|
00006760  67 31 24 2c 36 29 3d 22  65 6d 61 69 6c 2e 22 8c  |g1$,6)="email.".|
00006770  3a 3d 22 45 6d 61 69 6c  2e 22 2b c1 67 24 2c 37  |:="Email."+.g$,7|
00006780  29 0d 28 5a 29 e7 c0 67  31 24 2c 37 29 3d 22 66  |).(Z)..g1$,7)="f|
00006790  6f 6c 64 65 72 2e 22 8c  3a 3d 22 46 6f 6c 64 65  |older.".:="Folde|
000067a0  72 2e 22 2b c1 67 24 2c  38 29 0d 28 64 08 3d 67  |r."+.g$,8).(d.=g|
000067b0  31 24 0d 28 6e 04 0d 28  78 15 dd a4 61 64 64 6e  |1$.(n..(x...addn|
000067c0  65 77 67 72 6f 75 70 28  67 24 29 0d 28 82 1d ea  |ewgroup(g$).(...|
000067d0  70 24 2c 6e 6f 25 3a 67  24 3d a4 63 68 65 63 6b  |p$,no%:g$=.check|
000067e0  63 61 73 65 28 67 24 29  0d 28 8c 16 70 24 3d a4  |case(g$).(..p$=.|
000067f0  70 61 74 68 28 67 24 29  3a 6e 6f 25 3d 30 0d 28  |path(g$):no%=0.(|
00006800  96 1d e7 70 24 3e 22 22  80 67 72 6f 75 70 73 25  |...p$>"".groups%|
00006810  3c 6d 61 78 67 72 6f 75  70 25 8c 0d 28 a0 24 20  |<maxgroup%..(.$ |
00006820  20 f2 77 72 69 74 65 69  6e 64 65 78 62 75 66 3a  | .writeindexbuf:|
00006830  f2 61 64 64 64 65 6c 62  75 66 28 30 2c 30 29 0d  |.adddelbuf(0,0).|
00006840  28 aa 19 20 20 e7 a4 65  6e 73 75 72 65 64 69 72  |(..  ..ensuredir|
00006850  28 70 24 29 3c 3e 30 8c  0d 28 b4 44 20 20 20 20  |(p$)<>0..(.D    |
00006860  f2 6e 62 75 70 64 61 74  65 28 30 2c 67 24 2c 30  |.nbupdate(0,g$,0|
00006870  2c 22 22 2c 22 22 29 3a  f2 70 72 69 6e 74 28 22  |,"",""):.print("|
00006880  22 2c a4 6d 73 67 31 28  22 47 63 72 65 61 74 65  |",.msg1("Gcreate|
00006890  22 2c 67 24 29 2c 22 22  2c 22 22 29 0d 28 be 27  |",g$),"","").(.'|
000068a0  20 20 20 20 6e 6f 25 3d  a4 61 64 64 67 72 70 74  |    no%=.addgrpt|
000068b0  6f 6c 69 73 74 28 67 24  2c b9 29 3a e7 6e 6f 25  |olist(g$,.):.no%|
000068c0  3e 30 8c 0d 28 c8 20 20  20 20 20 f2 6c 6f 67 28  |>0..(.     .log(|
000068d0  a4 6d 73 67 31 28 22 4c  63 72 67 72 70 22 2c 67  |.msg1("Lcrgrp",g|
000068e0  24 29 29 0d 28 d2 2d 20  20 20 20 c8 99 22 58 4f  |$)).(.-    .."XO|
000068f0  53 5f 46 69 6c 65 22 2c  31 31 2c 70 24 2b 22 2e  |S_File",11,p$+".|
00006900  7e 69 6e 64 65 78 22 2c  26 46 46 44 2c 30 2c 30  |~index",&FFD,0,0|
00006910  0d 28 dc 21 20 20 20 20  c8 99 22 58 4f 53 5f 46  |.(.!    .."XOS_F|
00006920  69 6c 65 22 2c 38 2c 70  24 2b 22 2e 7e 78 22 2c  |ile",8,p$+".~x",|
00006930  30 0d 28 e6 09 20 20 20  20 cd 0d 28 f0 07 20 20  |0.(..    ..(..  |
00006940  cd 0d 28 fa 05 cd 0d 29  04 08 3d 6e 6f 25 0d 29  |..(....)..=no%.)|
00006950  0e 04 0d 29 18 1c dd a4  61 64 64 67 72 70 74 6f  |...)....addgrpto|
00006960  6c 69 73 74 28 67 24 2c  63 6d 6f 64 25 29 0d 29  |list(g$,cmod%).)|
00006970  22 43 ea 6c 25 2c 6c 31  25 2c 77 25 2c 67 31 24  |"C.l%,l1%,w%,g1$|
00006980  2c 6c 6f 77 25 2c 68 69  67 68 25 2c 6d 69 64 25  |,low%,high%,mid%|
00006990  3a 67 24 3d a4 63 68 65  63 6b 63 61 73 65 28 67  |:g$=.checkcase(g|
000069a0  24 29 3a 67 31 24 3d a4  6c 6f 77 65 72 28 67 24  |$):g1$=.lower(g$|
000069b0  29 0d 29 2c 1f e7 67 31  24 3c a4 6c 6f 77 65 72  |).),..g1$<.lower|
000069c0  28 67 72 70 24 28 67 72  6f 75 70 73 25 29 29 8c  |(grp$(groups%)).|
000069d0  0d 29 36 33 6c 25 3d 31  3a c8 95 67 31 24 3e a4  |.)63l%=1:..g1$>.|
000069e0  6c 6f 77 65 72 28 67 72  70 24 28 6c 25 29 29 80  |lower(grp$(l%)).|
000069f0  6c 25 3c 3d 67 72 6f 75  70 73 25 3a 6c 25 2b 3d  |l%<=groups%:l%+=|
00006a00  31 3a ce 0d 29 40 05 cc  0d 29 4a 10 6c 25 3d 67  |1:..)@...)J.l%=g|
00006a10  72 6f 75 70 73 25 2b 31  0d 29 54 05 cd 0d 29 5e  |roups%+1.)T...)^|
00006a20  12 e7 6c 25 3c 6d 61 78  67 72 6f 75 70 25 8c 0d  |..l%<maxgroup%..|
00006a30  29 68 17 20 20 e3 77 25  3d 67 72 6f 75 70 73 25  |)h.  .w%=groups%|
00006a40  b8 6c 25 88 2d 31 0d 29  72 49 20 20 67 72 70 24  |.l%.-1.)rI  grp$|
00006a50  28 77 25 2b 31 29 3d 67  72 70 24 28 77 25 29 3a  |(w%+1)=grp$(w%):|
00006a60  67 72 70 66 25 28 77 25  2b 31 29 3d 67 72 70 66  |grpf%(w%+1)=grpf|
00006a70  25 28 77 25 29 3a 67 72  70 73 65 71 25 28 77 25  |%(w%):grpseq%(w%|
00006a80  2b 31 29 3d 67 72 70 73  65 71 25 28 77 25 29 0d  |+1)=grpseq%(w%).|
00006a90  29 7c 1f 20 20 67 72 70  65 78 70 25 28 77 25 2b  |)|.  grpexp%(w%+|
00006aa0  31 29 3d 67 72 70 65 78  70 25 28 77 25 29 0d 29  |1)=grpexp%(w%).)|
00006ab0  86 1f 20 20 67 72 70 6d  6f 64 25 28 77 25 2b 31  |..  grpmod%(w%+1|
00006ac0  29 3d 67 72 70 6d 6f 64  25 28 77 25 29 0d 29 90  |)=grpmod%(w%).).|
00006ad0  09 20 20 ed 77 25 0d 29  9a 2c 20 20 67 72 70 24  |.  .w%.).,  grp$|
00006ae0  28 6c 25 29 3d 67 24 3a  67 72 70 66 25 28 6c 25  |(l%)=g$:grpf%(l%|
00006af0  29 3d 2d 31 3a 67 72 70  73 65 71 25 28 6c 25 29  |)=-1:grpseq%(l%)|
00006b00  3d 30 0d 29 a4 21 20 20  67 72 70 65 78 70 25 28  |=0.).!  grpexp%(|
00006b10  6c 25 29 3d 30 3a 67 72  70 6d 6f 64 25 28 6c 25  |l%)=0:grpmod%(l%|
00006b20  29 3d 30 0d 29 ae 10 20  20 e7 63 6d 6f 64 25 3c  |)=0.)..  .cmod%<|
00006b30  3e 30 8c 0d 29 b8 34 20  20 20 20 e7 a4 73 70 65  |>0..).4    ..spe|
00006b40  63 69 61 6c 67 72 70 28  67 24 29 3d 30 8c 67 72  |cialgrp(g$)=0.gr|
00006b50  70 6d 6f 64 25 28 6c 25  29 3d a4 69 73 67 72 70  |pmod%(l%)=.isgrp|
00006b60  6d 6f 64 28 67 24 29 0d  29 c2 2a 20 20 20 20 e7  |mod(g$).).*    .|
00006b70  a4 73 70 65 63 69 61 6c  67 72 70 28 67 24 29 3e  |.specialgrp(g$)>|
00006b80  31 8c 67 72 70 65 78 70  25 28 6c 25 29 3d 31 45  |1.grpexp%(l%)=1E|
00006b90  36 0d 29 cc 07 20 20 cd  0d 29 d6 10 20 20 67 72  |6.)..  ..)..  gr|
00006ba0  6f 75 70 73 25 2b 3d 31  0d 29 e0 42 20 20 f4 20  |oups%+=1.).B  . |
00006bb0  6e 6f 77 20 66 69 78 20  75 70 20 74 68 65 20 73  |now fix up the s|
00006bc0  61 76 65 20 6c 69 73 74  2c 20 74 6f 20 61 6c 6c  |ave list, to all|
00006bd0  6f 77 20 66 6f 72 20 67  72 6f 75 70 20 69 6e 73  |ow for group ins|
00006be0  65 72 74 69 6f 6e 73 2e  2e 2e 0d 29 ea 15 20 20  |ertions....)..  |
00006bf0  e3 6c 31 25 3d 30 b8 6d  61 78 73 61 76 65 25 0d  |.l1%=0.maxsave%.|
00006c00  29 f4 24 20 20 20 20 e7  6f 75 74 67 25 28 6c 31  |).$    .outg%(l1|
00006c10  25 29 3e 6c 25 8c 6f 75  74 67 25 28 6c 31 25 29  |%)>l%.outg%(l1%)|
00006c20  2b 3d 31 0d 29 fe 0a 20  20 ed 6c 31 25 0d 2a 08  |+=1.)..  .l1%.*.|
00006c30  07 20 20 cc 0d 2a 12 14  20 20 6c 25 3d 30 3a f2  |.  ..*..  l%=0:.|
00006c40  74 6f 6f 6d 61 6e 79 67  0d 2a 1c 05 cd 0d 2a 26  |toomanyg.*....*&|
00006c50  07 3d 6c 25 0d 2a 30 04  0d 2a 3a 0e dd f2 74 6f  |.=l%.*0..*:...to|
00006c60  6f 6d 61 6e 79 67 0d 2a  44 18 f2 6d 65 73 73 61  |omanyg.*D..messa|
00006c70  67 65 30 28 22 47 66 75  6c 6c 22 2c 31 29 0d 2a  |ge0("Gfull",1).*|
00006c80  4e 05 e1 0d 2a 58 04 0d  2a 62 13 dd f2 72 6d 67  |N...*X..*b...rmg|
00006c90  72 70 6c 69 73 74 28 67  24 29 0d 2a 6c 2d ea 6c  |rplist(g$).*l-.l|
00006ca0  25 2c 77 25 3a c8 95 67  72 70 24 28 6c 25 29 3c  |%,w%:..grp$(l%)<|
00006cb0  3e 67 24 80 6c 25 3c 3d  67 72 6f 75 70 73 25 3a  |>g$.l%<=groups%:|
00006cc0  6c 25 2b 3d 31 3a ce 0d  2a 76 11 e7 67 72 70 24  |l%+=1:..*v..grp$|
00006cd0  28 6c 25 29 3d 67 24 8c  0d 2a 80 24 20 20 f2 77  |(l%)=g$..*.$  .w|
00006ce0  72 69 74 65 69 6e 64 65  78 62 75 66 3a f2 61 64  |riteindexbuf:.ad|
00006cf0  64 64 65 6c 62 75 66 28  30 2c 30 29 0d 2a 8a 16  |ddelbuf(0,0).*..|
00006d00  20 20 e3 77 25 3d 6c 25  2b 31 b8 67 72 6f 75 70  |  .w%=l%+1.group|
00006d10  73 25 0d 2a 94 31 20 20  20 20 67 72 70 24 28 77  |s%.*.1    grp$(w|
00006d20  25 2d 31 29 3d 67 72 70  24 28 77 25 29 3a 67 72  |%-1)=grp$(w%):gr|
00006d30  70 66 25 28 77 25 2d 31  29 3d 67 72 70 66 25 28  |pf%(w%-1)=grpf%(|
00006d40  77 25 29 0d 2a 9e 3c 20  20 20 20 67 72 70 73 65  |w%).*.<    grpse|
00006d50  71 25 28 77 25 2d 31 29  3d 67 72 70 73 65 71 25  |q%(w%-1)=grpseq%|
00006d60  28 77 25 29 3a 67 72 70  6d 6f 64 25 28 77 25 2d  |(w%):grpmod%(w%-|
00006d70  31 29 3d 67 72 70 6d 6f  64 25 28 77 25 29 3a 0d  |1)=grpmod%(w%):.|
00006d80  2a a8 21 20 20 20 20 67  72 70 65 78 70 25 28 77  |*.!    grpexp%(w|
00006d90  25 2d 31 29 3d 67 72 70  65 78 70 25 28 77 25 29  |%-1)=grpexp%(w%)|
00006da0  0d 2a b2 09 20 20 ed 77  25 0d 2a bc 2f 20 20 67  |.*..  .w%.*./  g|
00006db0  72 70 24 28 67 72 6f 75  70 73 25 29 3d 22 22 3a  |rp$(groups%)="":|
00006dc0  67 72 6f 75 70 73 25 2d  3d 31 3a 6c 67 72 70 24  |groups%-=1:lgrp$|
00006dd0  3d 22 42 4c 41 4e 4b 22  0d 2a c6 05 cd 0d 2a d0  |="BLANK".*....*.|
00006de0  05 e1 0d 2a da 04 0d 2a  e4 11 dd a4 6f 62 6a 74  |...*...*....objt|
00006df0  79 70 65 28 66 24 29 0d  2a ee 0a ea 46 25 2c 74  |ype(f$).*...F%,t|
00006e00  25 0d 2a f8 1c c8 99 22  58 4f 53 5f 46 69 6c 65  |%.*...."XOS_File|
00006e10  22 2c 31 37 2c 66 24 b8  74 25 3b 46 25 0d 2b 02  |",17,f$.t%;F%.+.|
00006e20  0f e7 28 46 25 80 31 29  8c 3d 2d 31 0d 2b 0c 07  |..(F%.1).=-1.+..|
00006e30  3d 74 25 0d 2b 16 04 0d  2b 20 12 dd a4 66 69 6c  |=t%.+...+ ...fil|
00006e40  65 74 79 70 65 28 66 24  29 0d 2b 2a 07 ea 46 25  |etype(f$).+*..F%|
00006e50  0d 2b 34 22 c8 99 22 58  4f 53 5f 46 69 6c 65 22  |.+4".."XOS_File"|
00006e60  2c 32 33 2c 66 24 b8 2c  2c 2c 2c 2c 2c 74 25 3b  |,23,f$.,,,,,,t%;|
00006e70  46 25 0d 2b 3e 0f e7 28  46 25 80 31 29 8c 3d 2d  |F%.+>..(F%.1).=-|
00006e80  31 0d 2b 48 07 3d 74 25  0d 2b 52 04 0d 2b 5c 20  |1.+H.=t%.+R..+\ |
00006e90  dd f2 65 78 70 69 72 65  67 72 6f 75 70 28 6e 67  |..expiregroup(ng|
00006ea0  25 2c 70 74 6f 25 2c 65  78 70 25 29 0d 2b 66 28  |%,pto%,exp%).+f(|
00006eb0  f4 20 70 74 6f 25 20 69  73 20 61 20 6d 6f 64 69  |. pto% is a modi|
00006ec0  66 69 65 72 20 74 6f 20  65 78 70 69 72 79 20 74  |fier to expiry t|
00006ed0  69 6d 65 2e 0d 2b 70 20  ea 67 64 69 72 25 2c 6e  |ime..+p .gdir%,n|
00006ee0  24 2c 63 6e 74 25 2c 70  72 6f 74 25 3a 70 72 6f  |$,cnt%,prot%:pro|
00006ef0  74 25 3d 30 0d 2b 7a 27  70 74 25 3d 67 72 70 65  |t%=0.+z'pt%=grpe|
00006f00  78 70 25 28 6e 67 25 29  3a e7 70 74 25 3d 30 8c  |xp%(ng%):.pt%=0.|
00006f10  70 74 25 3d 64 65 66 65  78 70 25 0d 2b 84 17 e7  |pt%=defexp%.+...|
00006f20  70 74 25 3e 31 45 34 54  48 45 4e 70 72 6f 74 25  |pt%>1E4THENprot%|
00006f30  3d b9 0d 2b 8e 12 e7 67  72 70 24 28 6e 67 25 29  |=..+...grp$(ng%)|
00006f40  3e 22 22 8c 0d 2b 98 1c  20 20 70 74 25 2b 3d 70  |>""..+..  pt%+=p|
00006f50  74 6f 25 3a e7 70 74 25  3c 30 8c 70 74 25 3d 30  |to%:.pt%<0.pt%=0|
00006f60  0d 2b a2 1c 20 20 67 64  69 72 24 3d a4 70 61 74  |.+..  gdir$=.pat|
00006f70  68 28 67 72 70 24 28 6e  67 25 29 29 0d 2b ac 32  |h(grp$(ng%)).+.2|
00006f80  20 20 e7 65 78 70 6d 61  69 6c 25 3d 30 80 a4 73  |  .expmail%=0..s|
00006f90  70 65 63 69 61 6c 67 72  70 28 67 72 70 24 28 6e  |pecialgrp(grp$(n|
00006fa0  67 25 29 29 3e 31 8c 70  72 6f 74 25 3d b9 0d 2b  |g%))>1.prot%=..+|
00006fb0  b6 43 20 20 e7 65 78 70  25 3c 3e 30 8c 63 6e 74  |.C  .exp%<>0.cnt|
00006fc0  25 3d a4 65 78 70 69 72  65 64 69 72 28 67 64 69  |%=.expiredir(gdi|
00006fd0  72 24 2c 6e 67 25 2c 70  74 25 2c a3 2c 70 72 6f  |r$,ng%,pt%,.,pro|
00006fe0  74 25 29 3a f2 73 74 61  6d 70 28 67 64 69 72 24  |t%):.stamp(gdir$|
00006ff0  29 0d 2b c0 25 20 20 f2  6e 62 75 70 64 61 74 65  |).+.%  .nbupdate|
00007000  28 31 32 2c 67 72 70 24  28 6e 67 25 29 2c 30 2c  |(12,grp$(ng%),0,|
00007010  22 22 2c 22 22 29 0d 2b  ca 05 cd 0d 2b d4 05 e1  |"","").+....+...|
00007020  0d 2b de 04 0d 2b e8 2a  dd a4 65 78 70 69 72 65  |.+...+.*..expire|
00007030  64 69 72 28 70 24 2c 67  25 2c 70 74 25 2c 66 6f  |dir(p$,g%,pt%,fo|
00007040  72 63 65 25 2c 70 72 6f  74 65 63 74 25 29 0d 2b  |rce%,protect%).+|
00007050  f2 10 ea 63 6e 74 25 3a  63 6e 74 25 3d 30 0d 2b  |...cnt%:cnt%=0.+|
00007060  fc 0e e7 70 72 6f 74 65  63 74 25 8c 0d 2c 06 2f  |...protect%..,./|
00007070  f2 70 72 69 6e 74 28 a4  6d 73 67 31 28 22 47 63  |.print(.msg1("Gc|
00007080  6f 6d 70 22 2c 67 72 70  24 28 67 25 29 29 2c 22  |omp",grp$(g%)),"|
00007090  20 22 2c 22 20 22 2c 22  20 22 29 0d 2c 10 05 cc  | "," "," ").,...|
000070a0  0d 2c 1a 4c f2 70 72 69  6e 74 28 a4 6d 73 67 31  |.,.L.print(.msg1|
000070b0  28 22 47 65 78 70 22 2c  67 72 70 24 28 67 25 29  |("Gexp",grp$(g%)|
000070c0  29 2c a4 6d 73 67 31 28  22 47 6c 61 73 74 22 2c  |),.msg1("Glast",|
000070d0  22 22 29 2c a4 6d 73 67  31 28 22 47 74 69 6d 65  |""),.msg1("Gtime|
000070e0  22 2c c3 70 74 25 29 2c  22 20 22 29 0d 2c 24 05  |",.pt%)," ").,$.|
000070f0  cd 0d 2c 2e 14 e7 a4 6f  62 6a 74 79 70 65 28 70  |..,....objtype(p|
00007100  24 29 3e 31 8c 0d 2c 38  3f 20 20 63 6e 74 25 3d  |$)>1..,8?  cnt%=|
00007110  a4 64 65 6c 66 69 6c 65  28 70 24 2b 22 2e 7e 73  |.delfile(p$+".~s|
00007120  65 71 22 29 3a 63 6e 74  25 3d a4 65 6e 73 75 72  |eq"):cnt%=.ensur|
00007130  65 6e 65 77 73 74 72 75  63 74 28 70 24 2b 22 2e  |enewstruct(p$+".|
00007140  7e 78 22 29 0d 2c 42 3d  20 20 63 61 6e 63 65 6c  |~x").,B=  cancel|
00007150  25 3d a3 3a 63 6e 74 25  3d a4 65 78 70 69 72 65  |%=.:cnt%=.expire|
00007160  73 75 62 64 69 72 28 70  24 2c 67 25 2c 70 74 25  |subdir(p$,g%,pt%|
00007170  2c 66 6f 72 63 65 25 2c  70 72 6f 74 65 63 74 25  |,force%,protect%|
00007180  29 0d 2c 4c 37 20 20 f2  61 64 64 64 65 6c 62 75  |).,L7  .adddelbu|
00007190  66 28 30 2c 30 29 3a f2  70 72 69 6e 74 28 a4 6d  |f(0,0):.print(.m|
000071a0  73 67 30 28 22 44 6f 6e  65 22 29 2c 22 20 22 2c  |sg0("Done")," ",|
000071b0  22 20 22 2c 22 20 22 29  0d 2c 56 05 cd 0d 2c 60  |" "," ").,V...,`|
000071c0  0d f2 67 61 63 74 28 22  22 29 0d 2c 6a 09 3d 63  |..gact("").,j.=c|
000071d0  6e 74 25 0d 2c 74 04 0d  2c 7e 30 dd a4 65 78 70  |nt%.,t..,~0..exp|
000071e0  69 72 65 73 75 62 64 69  72 28 70 24 2c 65 78 70  |iresubdir(p$,exp|
000071f0  67 25 2c 70 74 25 2c 66  6f 72 63 65 25 2c 70 72  |g%,pt%,force%,pr|
00007200  6f 74 65 63 74 25 29 0d  2c 88 4a ea 64 69 72 70  |otect%).,.J.dirp|
00007210  74 72 25 2c 66 25 2c 66  24 2c 6e 6f 77 25 2c 74  |tr%,f%,f$,now%,t|
00007220  24 2c 74 25 2c 72 33 25  2c 6e 72 65 61 64 25 2c  |$,t%,r3%,nread%,|
00007230  76 25 2c 61 74 74 72 25  2c 66 74 25 2c 63 6e 74  |v%,attr%,ft%,cnt|
00007240  25 2c 6d 6f 76 65 24 2c  74 65 73 74 74 69 6d 65  |%,move$,testtime|
00007250  25 0d 2c 92 49 ea 64 65  6c 74 65 73 74 25 2c 64  |%.,.I.deltest%,d|
00007260  69 72 62 75 66 25 2c 64  62 72 25 2c 61 64 64 72  |irbuf%,dbr%,addr|
00007270  25 2c 66 6c 6f 6f 70 25  2c 74 72 79 6d 6f 76 65  |%,floop%,trymove|
00007280  25 2c 63 61 6e 6d 6f 76  65 25 2c 6d 75 73 74 6d  |%,canmove%,mustm|
00007290  6f 76 65 25 2c 64 61 74  65 25 0d 2c 9c 1b ea 67  |ove%,date%.,...g|
000072a0  24 2c 70 61 63 6b 25 2c  66 6c 65 6e 25 2c 6e 66  |$,pack%,flen%,nf|
000072b0  69 6c 65 73 25 0d 2c a6  12 67 24 3d 67 72 70 24  |iles%.,..g$=grp$|
000072c0  28 65 78 70 67 25 29 0d  2c b0 0c e7 66 6f 72 63  |(expg%).,...forc|
000072d0  65 25 8c 0d 2c ba 1d 20  20 f2 67 61 63 74 28 a4  |e%..,..  .gact(.|
000072e0  6d 73 67 31 28 22 47 64  65 6c 22 2c 67 24 29 29  |msg1("Gdel",g$))|
000072f0  0d 2c c4 07 20 20 cc 0d  2c ce 40 20 20 e7 70 72  |.,..  ..,.@  .pr|
00007300  6f 74 65 63 74 25 8c f2  67 61 63 74 28 a4 6d 73  |otect%..gact(.ms|
00007310  67 31 28 22 47 63 6f 6d  70 22 2c 67 24 29 29 8b  |g1("Gcomp",g$)).|
00007320  f2 67 61 63 74 28 a4 6d  73 67 31 28 22 47 65 78  |.gact(.msg1("Gex|
00007330  70 22 2c 67 24 29 29 0d  2c d8 05 cd 0d 2c e2 1f  |p",g$)).,....,..|
00007340  6d 75 73 74 6d 6f 76 65  25 3d 28 c2 70 24 2c 36  |mustmove%=(.p$,6|
00007350  29 3d 22 2e 7e 78 2e 7e  78 22 29 0d 2c ec 2d 66  |)=".~x.~x").,.-f|
00007360  24 3d a4 6c 65 61 66 28  70 24 29 3a 63 61 6e 6d  |$=.leaf(p$):canm|
00007370  6f 76 65 25 3d 28 c2 a4  64 69 72 28 70 24 29 2c  |ove%=(..dir(p$),|
00007380  a9 66 24 29 3d 66 24 29  0d 2c f6 17 6e 66 69 6c  |.f$)=f$).,..nfil|
00007390  65 73 25 3d 30 3a 64 69  72 70 74 72 25 3d 30 0d  |es%=0:dirptr%=0.|
000073a0  2d 00 48 6e 6f 77 25 3d  a4 64 61 79 28 a4 74 69  |-.Hnow%=.day(.ti|
000073b0  6d 65 29 3a 74 65 73 74  74 69 6d 65 25 3d 70 74  |me):testtime%=pt|
000073c0  25 3a 64 62 72 25 3d a4  63 6c 61 69 6d 28 64 69  |%:dbr%=.claim(di|
000073d0  72 62 75 66 25 2c 64 62  73 69 7a 65 25 2c 22 65  |rbuf%,dbsize%,"e|
000073e0  78 70 69 72 65 22 29 0d  2d 0a 05 f5 0d 2d 14 11  |xpire").-....-..|
000073f0  61 64 64 72 25 3d 64 69  72 62 75 66 25 0d 2d 1e  |addr%=dirbuf%.-.|
00007400  56 c8 99 22 58 4f 53 5f  47 42 50 42 22 2c 31 31  |V.."XOS_GBPB",11|
00007410  2c 70 24 2c 64 69 72 62  75 66 25 2c 32 30 2c 64  |,p$,dirbuf%,20,d|
00007420  69 72 70 74 72 25 2c 64  62 73 69 7a 65 25 2c 22  |irptr%,dbsize%,"|
00007430  2a 22 b8 2c 2c 2c 72 33  25 2c 64 69 72 70 74 72  |*".,,,r3%,dirptr|
00007440  25 3b 46 25 3a 6e 72 65  61 64 25 3d 64 69 72 70  |%;F%:nread%=dirp|
00007450  74 72 25 0d 2d 28 14 e7  72 33 25 3e 30 80 28 46  |tr%.-(..r3%>0.(F|
00007460  25 80 31 29 3d 30 8c 0d  2d 32 31 20 20 6e 66 69  |%.1)=0..-21  nfi|
00007470  6c 65 73 25 2b 3d 72 33  25 3a f4 20 6e 75 6d 62  |les%+=r3%:. numb|
00007480  65 72 20 6f 66 20 66 69  6c 65 73 20 69 6e 20 64  |er of files in d|
00007490  69 72 65 63 74 6f 72 79  0d 2d 3c 13 20 20 e3 66  |irectory.-<.  .f|
000074a0  6c 6f 6f 70 25 3d 31 b8  72 33 25 0d 2d 46 4f 20  |loop%=1.r3%.-FO |
000074b0  20 74 25 3d 61 64 64 72  25 21 31 36 3a 61 74 74  | t%=addr%!16:att|
000074c0  72 25 3d 61 64 64 72 25  21 31 32 3a 66 24 3d a4  |r%=addr%!12:f$=.|
000074d0  73 74 72 28 61 64 64 72  25 2b 32 39 29 3a 64 61  |str(addr%+29):da|
000074e0  74 65 25 3d 61 64 64 72  25 2b 32 34 3a 66 6c 65  |te%=addr%+24:fle|
000074f0  6e 25 3d 61 64 64 72 25  21 38 0d 2d 50 4a 20 20  |n%=addr%!8.-PJ  |
00007500  76 25 3d bb 66 24 3a 64  65 6c 74 65 73 74 25 3d  |v%=.f$:deltest%=|
00007510  30 3a 74 72 79 6d 6f 76  65 25 3d 6d 75 73 74 6d  |0:trymove%=mustm|
00007520  6f 76 65 25 3a 70 61 63  6b 25 3d 28 28 61 74 74  |ove%:pack%=((att|
00007530  72 25 80 38 29 80 28 6d  75 73 74 6d 6f 76 65 25  |r%.8).(mustmove%|
00007540  3d a3 29 29 0d 2d 5a 0b  20 20 c8 8e 74 25 ca 0d  |=.)).-Z.  ..t%..|
00007550  2d 64 0b 20 20 20 20 c9  31 3a 0d 2d 6e 10 20 20  |-d.    .1:.-n.  |
00007560  20 20 20 20 e7 76 25 3e  30 8c 0d 2d 78 28 20 20  |    .v%>0..-x(  |
00007570  20 20 20 20 20 20 e7 28  61 64 64 72 25 3f 32 38  |      .(addr%?28|
00007580  29 3c 3e 26 46 46 20 84  66 6f 72 63 65 25 3c 3e  |)<>&FF .force%<>|
00007590  30 8c 0d 2d 82 20 20 20  20 20 20 20 20 20 20 20  |0..-.           |
000075a0  f4 20 73 74 61 6e 64 61  72 64 20 61 72 74 69 63  |. standard artic|
000075b0  6c 65 0d 2d 8c 51 20 20  20 20 20 20 20 20 20 20  |le.-.Q          |
000075c0  c8 99 22 54 65 72 72 69  74 6f 72 79 5f 43 6f 6e  |.."Territory_Con|
000075d0  76 65 72 74 44 61 74 65  41 6e 64 54 69 6d 65 22  |vertDateAndTime"|
000075e0  2c 31 2c 64 61 74 65 25  2c 74 6d 70 25 2c 31 32  |,1,date%,tmp%,12|
000075f0  38 2c 22 25 43 45 25 59  52 25 4d 4e 25 44 59 22  |8,"%CE%YR%MN%DY"|
00007600  b8 62 25 0d 2d 96 1b 20  20 20 20 20 20 20 20 20  |.b%.-..         |
00007610  20 66 74 25 3d bb a4 73  74 72 28 62 25 29 0d 2d  | ft%=..str(b%).-|
00007620  a0 33 20 20 20 20 20 20  20 20 20 20 e7 a4 64 61  |.3          ..da|
00007630  79 28 66 74 25 29 3c 3d  6e 6f 77 25 2d 74 65 73  |y(ft%)<=now%-tes|
00007640  74 74 69 6d 65 25 8c 64  65 6c 74 65 73 74 25 3d  |ttime%.deltest%=|
00007650  b9 0d 2d aa 0f 20 20 20  20 20 20 20 20 20 20 cc  |..-..          .|
00007660  0d 2d b4 1f 20 20 20 20  20 20 20 20 20 20 f4 20  |.-..          . |
00007670  68 61 73 20 65 78 70 69  72 79 20 74 69 6d 65 0d  |has expiry time.|
00007680  2d be 1c 20 20 20 20 20  20 20 20 20 20 66 74 25  |-..          ft%|
00007690  3d 28 61 64 64 72 25 21  32 34 29 0d 2d c8 1b 20  |=(addr%!24).-.. |
000076a0  20 20 20 20 20 20 20 20  20 e7 66 74 25 3c 3d a4  |         .ft%<=.|
000076b0  74 69 6d 65 20 8c 0d 2d  d2 1a 20 20 20 20 20 20  |time ..-..      |
000076c0  20 20 20 20 20 20 64 65  6c 74 65 73 74 25 3d b9  |      deltest%=.|
000076d0  0d 2d dc 11 20 20 20 20  20 20 20 20 20 20 20 20  |.-..            |
000076e0  cc 0d 2d e6 44 20 20 20  20 20 20 20 20 20 20 20  |..-.D           |
000076f0  20 f4 20 70 61 63 6b 20  61 6c 6c 20 6e 6f 6e 2d  | . pack all non-|
00007700  63 6c 61 72 69 6e 65 74  20 61 72 74 69 63 6c 65  |clarinet article|
00007710  73 20 77 69 74 68 20 65  78 70 69 72 79 20 68 65  |s with expiry he|
00007720  61 64 65 72 73 0d 2d f0  27 20 20 20 20 20 20 20  |aders.-.'       |
00007730  20 20 20 20 20 e7 74 65  73 74 74 69 6d 65 25 3d  |     .testtime%=|
00007740  30 8c 74 72 79 6d 6f 76  65 25 3d b9 0d 2d fa 45  |0.trymove%=..-.E|
00007750  20 20 20 20 20 20 20 20  20 20 20 20 e7 a4 73 6d  |            ..sm|
00007760  61 74 63 68 28 22 63 6c  61 72 69 2a 22 2c 67 24  |atch("clari*",g$|
00007770  29 3d 30 80 6d 75 73 74  6d 6f 76 65 25 3d 30 80  |)=0.mustmove%=0.|
00007780  6e 66 69 6c 65 73 25 3c  36 8c 70 61 63 6b 25 3d  |nfiles%<6.pack%=|
00007790  b9 0d 2e 04 0f 20 20 20  20 20 20 20 20 20 20 cd  |.....          .|
000077a0  0d 2e 0e 0d 20 20 20 20  20 20 20 20 cd 0d 2e 18  |....        ....|
000077b0  2a 20 20 20 20 20 20 20  20 e7 70 72 6f 74 65 63  |*        .protec|
000077c0  74 25 3d 30 80 28 64 65  6c 74 65 73 74 25 84 66  |t%=0.(deltest%.f|
000077d0  6f 72 63 65 25 29 8c 0d  2e 22 2d 20 20 20 20 20  |orce%)..."-     |
000077e0  20 20 20 20 20 e7 66 6f  72 63 65 25 8c f2 73 65  |     .force%..se|
000077f0  74 61 74 74 72 28 70 24  2b 22 2e 22 2b 66 24 2c  |tattr(p$+"."+f$,|
00007800  22 52 22 29 0d 2e 2c 26  20 20 20 20 20 20 20 20  |"R")..,&        |
00007810  20 20 e7 a4 64 65 6c 66  69 6c 65 28 70 24 2b 22  |  ..delfile(p$+"|
00007820  2e 22 2b 66 24 29 3d 30  20 8c 0d 2e 36 44 20 20  |."+f$)=0 ...6D  |
00007830  20 20 20 20 20 20 20 20  20 20 64 69 72 70 74 72  |          dirptr|
00007840  25 2d 3d 31 3a 63 6e 74  25 2b 3d 31 3a f2 61 72  |%-=1:cnt%+=1:.ar|
00007850  74 64 65 6c 65 74 65 64  28 65 78 70 67 25 2c bb  |tdeleted(expg%,.|
00007860  66 24 29 3a 74 72 79 6d  6f 76 65 25 3d 30 0d 2e  |f$):trymove%=0..|
00007870  40 11 20 20 20 20 20 20  20 20 20 20 20 20 cc 0d  |@.            ..|
00007880  2e 4a 27 20 20 20 20 20  20 20 20 20 20 20 20 e7  |.J'            .|
00007890  a4 6f 62 6a 74 79 70 65  28 70 24 2b 22 2e 22 2b  |.objtype(p$+"."+|
000078a0  66 24 29 3d 30 8c 0d 2e  54 33 20 20 20 20 20 20  |f$)=0...T3      |
000078b0  20 20 20 20 20 20 20 20  f2 61 72 74 64 65 6c 65  |        .artdele|
000078c0  74 65 64 28 65 78 70 67  25 2c bb 66 24 29 3a 74  |ted(expg%,.f$):t|
000078d0  72 79 6d 6f 76 65 25 3d  30 0d 2e 5e 13 20 20 20  |rymove%=0..^.   |
000078e0  20 20 20 20 20 20 20 20  20 20 20 cc 0d 2e 68 23  |           ...h#|
000078f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 74 72  |              tr|
00007900  79 6d 6f 76 65 25 3d 63  61 6e 6d 6f 76 65 25 0d  |ymove%=canmove%.|
00007910  2e 72 11 20 20 20 20 20  20 20 20 20 20 20 20 cd  |.r.            .|
00007920  0d 2e 7c 0f 20 20 20 20  20 20 20 20 20 20 cd 0d  |..|.          ..|
00007930  2e 86 0f 20 20 20 20 20  20 20 20 20 20 cc 0d 2e  |...          ...|
00007940  90 33 20 20 20 20 20 20  20 20 20 20 e7 63 6f 6d  |.3          .com|
00007950  70 72 65 73 73 25 8c f2  63 6f 6d 70 72 65 73 73  |press%..compress|
00007960  28 70 24 2b 22 2e 22 2b  66 24 2c 66 6c 65 6e 25  |(p$+"."+f$,flen%|
00007970  29 0d 2e 9a 0d 20 20 20  20 20 20 20 20 cd 0d 2e  |)....        ...|
00007980  a4 3e 20 20 20 20 20 20  20 20 f4 20 64 6f 6e 27  |.>        . don'|
00007990  74 20 70 61 63 6b 20 66  69 6c 65 73 20 69 66 20  |t pack files if |
000079a0  3e 35 20 66 69 6c 65 73  20 69 6e 20 74 68 65 20  |>5 files in the |
000079b0  64 69 72 65 63 74 6f 72  79 2e 2e 2e 0d 2e ae 46  |directory......F|
000079c0  20 20 20 20 20 20 20 20  f4 20 2e 2e 2e 20 6a 75  |        . ... ju|
000079d0  73 74 20 77 61 6e 74 20  74 6f 20 61 76 6f 69 64  |st want to avoid|
000079e0  20 73 63 61 74 74 65 72  65 64 20 61 6c 6d 6f 73  | scattered almos|
000079f0  74 2d 73 69 6e 67 6c 65  20 61 72 74 69 63 6c 65  |t-single article|
00007a00  73 2e 0d 2e b8 1e 20 20  20 20 20 20 20 20 e7 6e  |s.....        .n|
00007a10  66 69 6c 65 73 25 3e 36  8c 70 61 63 6b 25 3d 30  |files%>6.pack%=0|
00007a20  0d 2e c2 1c 20 20 20 20  20 20 20 20 e7 74 72 79  |....        .try|
00007a30  6d 6f 76 65 25 84 70 61  63 6b 25 8c 0d 2e cc 25  |move%.pack%....%|
00007a40  20 20 20 20 20 20 20 20  20 20 f2 73 65 74 61 74  |          .setat|
00007a50  74 72 28 70 24 2b 22 2e  22 2b 66 24 2c 22 52 22  |tr(p$+"."+f$,"R"|
00007a60  29 0d 2e d6 3a 20 20 20  20 20 20 20 20 20 20 6d  |)...:          m|
00007a70  6f 76 65 24 3d a4 61 72  74 69 63 6c 65 6f 70 28  |ove$=.articleop(|
00007a80  65 78 70 67 25 2c 66 24  2c 32 2c 70 24 2b 22 2e  |expg%,f$,2,p$+".|
00007a90  22 2b 66 24 2c 70 61 63  6b 25 29 0d 2e e0 4d 20  |"+f$,pack%)...M |
00007aa0  20 20 20 20 20 20 20 20  20 c8 99 22 58 4f 53 5f  |         .."XOS_|
00007ab0  46 69 6c 65 22 2c 34 2c  6d 6f 76 65 24 2c 2c 2c  |File",4,move$,,,|
00007ac0  2c 61 74 74 72 25 3a c8  99 22 58 4f 53 5f 46 69  |,attr%:.."XOS_Fi|
00007ad0  6c 65 22 2c 34 2c 70 24  2b 22 2e 22 2b 66 24 2c  |le",4,p$+"."+f$,|
00007ae0  2c 2c 2c 61 74 74 72 25  0d 2e ea 22 20 20 20 20  |,,,attr%..."    |
00007af0  20 20 20 20 20 20 e7 6d  6f 76 65 24 3e 22 22 8c  |      .move$>"".|
00007b00  64 69 72 70 74 72 25 2d  3d 31 0d 2e f4 0d 20 20  |dirptr%-=1....  |
00007b10  20 20 20 20 20 20 cd 0d  2e fe 0b 20 20 20 20 20  |      .....     |
00007b20  20 cd 0d 2f 08 56 20 20  20 20 c9 32 2c 33 3a e7  | ../.V    .2,3:.|
00007b30  c0 66 24 2c 32 29 3d 22  7e 78 22 8c 63 6e 74 25  |.f$,2)="~x".cnt%|
00007b40  3d 63 6e 74 25 2b a4 65  78 70 69 72 65 73 75 62  |=cnt%+.expiresub|
00007b50  64 69 72 28 70 24 2b 22  2e 22 2b 66 24 2c 65 78  |dir(p$+"."+f$,ex|
00007b60  70 67 25 2c 70 74 25 2c  66 6f 72 63 65 25 2c 70  |pg%,pt%,force%,p|
00007b70  72 6f 74 65 63 74 25 29  0d 2f 12 20 20 20 20 20  |rotect%)./.     |
00007b80  20 20 46 25 3d a4 64 65  6c 66 69 6c 65 28 70 24  |  F%=.delfile(p$|
00007b90  2b 22 2e 22 2b 66 24 29  0d 2f 1c 07 20 20 cb 0d  |+"."+f$)./..  ..|
00007ba0  2f 26 19 20 20 e7 63 61  6e 63 65 6c 25 8c 66 6c  |/&.  .cancel%.fl|
00007bb0  6f 6f 70 25 3d 72 33 25  0d 2f 30 2d 20 20 f2 70  |oop%=r3%./0-  .p|
00007bc0  6f 6c 6c 28 73 6c 69 63  65 25 2a 32 29 3a 61 64  |oll(slice%*2):ad|
00007bd0  64 72 25 3d 61 64 64 72  25 2b 28 33 33 2b a9 66  |dr%=addr%+(33+.f|
00007be0  24 29 80 ac 33 0d 2f 3a  0d 20 20 ed 66 6c 6f 6f  |$)..3./:.  .floo|
00007bf0  70 25 0d 2f 44 05 cd 0d  2f 4e 16 fd 6e 72 65 61  |p%./D.../N..nrea|
00007c00  64 25 3d 2d 31 84 63 61  6e 63 65 6c 25 0d 2f 58  |d%=-1.cancel%./X|
00007c10  12 f2 72 65 6c 65 61 73  65 28 64 62 72 25 29 0d  |..release(dbr%).|
00007c20  2f 62 09 3d 63 6e 74 25  0d 2f 6c 04 0d 2f 76 14  |/b.=cnt%./l../v.|
00007c30  dd f2 73 65 74 61 74 74  72 28 66 24 2c 61 24 29  |..setattr(f$,a$)|
00007c40  0d 2f 80 1e c8 99 22 58  4f 53 5f 46 53 43 6f 6e  |./...."XOS_FSCon|
00007c50  74 72 6f 6c 22 2c 32 34  2c 66 24 2c 61 24 0d 2f  |trol",24,f$,a$./|
00007c60  8a 05 e1 0d 2f 94 04 0d  2f 9e 17 dd f2 61 72 74  |..../.../....art|
00007c70  64 65 6c 65 74 65 64 28  67 25 2c 6e 25 29 0d 2f  |deleted(g%,n%)./|
00007c80  a8 34 f2 61 64 64 64 65  6c 62 75 66 28 67 25 2c  |.4.adddelbuf(g%,|
00007c90  6e 25 29 3a f2 6e 62 75  70 64 61 74 65 28 33 2c  |n%):.nbupdate(3,|
00007ca0  67 72 70 24 28 67 25 29  2c 6e 25 2c 22 22 2c 22  |grp$(g%),n%,"","|
00007cb0  22 29 0d 2f b2 26 f2 70  72 69 6e 74 28 22 22 2c  |")./.&.print("",|
00007cc0  22 22 2c 22 22 2c a4 6d  73 67 31 28 22 41 64 65  |"","",.msg1("Ade|
00007cd0  6c 22 2c c3 6e 25 29 29  0d 2f bc 05 e1 0d 2f c6  |l",.n%))./..../.|
00007ce0  04 0d 2f d0 1b dd f2 65  78 70 6d 69 73 63 64 69  |../....expmiscdi|
00007cf0  72 28 70 24 2c 65 74 69  6d 65 25 29 0d 2f da 44  |r(p$,etime%)./.D|
00007d00  ea 6e 25 2c 66 24 2c 6e  6f 77 25 2c 74 25 2c 74  |.n%,f$,now%,t%,t|
00007d10  24 2c 72 33 25 2c 6e 72  65 61 64 25 2c 61 25 2c  |$,r3%,nread%,a%,|
00007d20  64 25 2c 66 74 25 2c 64  69 72 62 75 66 25 2c 64  |d%,ft%,dirbuf%,d|
00007d30  62 72 25 2c 66 6c 6f 6f  70 25 2c 61 64 64 72 25  |br%,floop%,addr%|
00007d40  0d 2f e4 3d 6e 25 3d 30  3a 6e 6f 77 25 3d a4 64  |./.=n%=0:now%=.d|
00007d50  61 79 28 a4 74 69 6d 65  29 3a 64 62 72 25 3d a4  |ay(.time):dbr%=.|
00007d60  63 6c 61 69 6d 28 64 69  72 62 75 66 25 2c 64 62  |claim(dirbuf%,db|
00007d70  73 69 7a 65 25 2c 22 64  62 75 66 22 29 0d 2f ee  |size%,"dbuf")./.|
00007d80  05 f5 0d 2f f8 11 61 64  64 72 25 3d 64 69 72 62  |.../..addr%=dirb|
00007d90  75 66 25 0d 30 02 47 c8  99 22 58 4f 53 5f 47 42  |uf%.0.G.."XOS_GB|
00007da0  50 42 22 2c 31 31 2c 70  24 2c 64 69 72 62 75 66  |PB",11,p$,dirbuf|
00007db0  25 2c 32 30 2c 6e 25 2c  64 62 73 69 7a 65 25 2c  |%,20,n%,dbsize%,|
00007dc0  22 2a 22 b8 2c 2c 2c 72  33 25 2c 6e 25 3b 46 25  |"*".,,,r3%,n%;F%|
00007dd0  3a 6e 72 65 61 64 25 3d  6e 25 0d 30 0c 14 e7 72  |:nread%=n%.0...r|
00007de0  33 25 3e 30 80 28 46 25  80 31 29 3d 30 8c 0d 30  |3%>0.(F%.1)=0..0|
00007df0  16 13 20 20 e3 66 6c 6f  6f 70 25 3d 31 b8 72 33  |..  .floop%=1.r3|
00007e00  25 0d 30 20 2f 20 20 74  25 3d 61 64 64 72 25 21  |%.0 /  t%=addr%!|
00007e10  31 36 3a 61 25 3d 61 64  64 72 25 21 31 32 3a 66  |16:a%=addr%!12:f|
00007e20  24 3d a4 73 74 72 28 61  64 64 72 25 2b 32 39 29  |$=.str(addr%+29)|
00007e30  0d 30 2a 0b 20 20 c8 8e  74 25 ca 0d 30 34 0b 20  |.0*.  ..t%..04. |
00007e40  20 20 20 c9 31 3a 0d 30  3e 12 20 20 20 20 e7 28  |   .1:.0>.    .(|
00007e50  61 25 80 38 29 3d 30 8c  0d 30 48 50 20 20 20 20  |a%.8)=0..0HP    |
00007e60  20 20 c8 99 22 54 65 72  72 69 74 6f 72 79 5f 43  |  .."Territory_C|
00007e70  6f 6e 76 65 72 74 44 61  74 65 41 6e 64 54 69 6d  |onvertDateAndTim|
00007e80  65 22 2c 31 2c 61 64 64  72 25 2b 32 34 2c 74 6d  |e",1,addr%+24,tm|
00007e90  70 25 2c 31 32 38 2c 22  25 43 45 25 59 52 25 4d  |p%,128,"%CE%YR%M|
00007ea0  4e 25 44 59 22 b8 62 25  0d 30 52 4d 20 20 20 20  |N%DY".b%.0RM    |
00007eb0  20 20 66 74 25 3d bb a4  73 74 72 28 62 25 29 3a  |  ft%=..str(b%):|
00007ec0  e7 a4 64 61 79 28 66 74  25 29 3c 3d 6e 6f 77 25  |..day(ft%)<=now%|
00007ed0  2d 65 74 69 6d 65 25 8c  e7 a4 64 65 6c 66 69 6c  |-etime%...delfil|
00007ee0  65 28 70 24 2b 22 2e 22  2b 66 24 29 3d 30 6e 25  |e(p$+"."+f$)=0n%|
00007ef0  3d 6e 25 2d 31 0d 30 5c  09 20 20 20 20 cd 0d 30  |=n%-1.0\.    ..0|
00007f00  66 41 20 20 20 20 c9 32  2c 33 3a f2 65 78 70 6d  |fA    .2,3:.expm|
00007f10  69 73 63 64 69 72 28 70  24 2b 22 2e 22 2b 66 24  |iscdir(p$+"."+f$|
00007f20  2c 65 74 69 6d 65 25 29  3a 46 25 3d a4 64 65 6c  |,etime%):F%=.del|
00007f30  66 69 6c 65 28 70 24 2b  22 2e 22 2b 66 24 29 0d  |file(p$+"."+f$).|
00007f40  30 70 07 20 20 cb 0d 30  7a 2d 20 20 f2 70 6f 6c  |0p.  ..0z-  .pol|
00007f50  6c 28 73 6c 69 63 65 25  2a 32 29 3a 61 64 64 72  |l(slice%*2):addr|
00007f60  25 3d 61 64 64 72 25 2b  28 33 33 2b a9 66 24 29  |%=addr%+(33+.f$)|
00007f70  80 ac 33 0d 30 84 0d 20  20 ed 66 6c 6f 6f 70 25  |..3.0..  .floop%|
00007f80  0d 30 8e 05 cd 0d 30 98  0e fd 6e 72 65 61 64 25  |.0....0...nread%|
00007f90  3d 2d 31 0d 30 a2 12 f2  72 65 6c 65 61 73 65 28  |=-1.0...release(|
00007fa0  64 62 72 25 29 0d 30 ac  05 e1 0d 30 b6 04 0d 30  |dbr%).0....0...0|
00007fb0  c0 0a dd a4 74 69 6d 65  0d 30 ca 07 ea 62 25 0d  |....time.0...b%.|
00007fc0  30 d4 1f 3f 74 6d 70 25  3d 33 3a c8 99 22 4f 53  |0..?tmp%=3:.."OS|
00007fd0  5f 57 6f 72 64 22 2c 31  34 2c 74 6d 70 25 0d 30  |_Word",14,tmp%.0|
00007fe0  de 4a c8 99 22 54 65 72  72 69 74 6f 72 79 5f 43  |.J.."Territory_C|
00007ff0  6f 6e 76 65 72 74 44 61  74 65 41 6e 64 54 69 6d  |onvertDateAndTim|
00008000  65 22 2c 31 2c 74 6d 70  25 2c 74 6d 70 25 2b 31  |e",1,tmp%,tmp%+1|
00008010  32 38 2c 31 32 38 2c 22  25 43 45 25 59 52 25 4d  |28,128,"%CE%YR%M|
00008020  4e 25 44 59 22 b8 62 25  0d 30 e8 0e 3d bb a4 73  |N%DY".b%.0..=..s|
00008030  74 72 28 62 25 29 0d 30  f2 04 0d 30 fc 0e dd a4  |tr(b%).0...0....|
00008040  66 75 6c 6c 74 69 6d 65  0d 31 06 07 ea 62 25 0d  |fulltime.1...b%.|
00008050  31 10 1f 3f 74 6d 70 25  3d 33 3a c8 99 22 4f 53  |1..?tmp%=3:.."OS|
00008060  5f 57 6f 72 64 22 2c 31  34 2c 74 6d 70 25 0d 31  |_Word",14,tmp%.1|
00008070  1a 50 c8 99 22 54 65 72  72 69 74 6f 72 79 5f 43  |.P.."Territory_C|
00008080  6f 6e 76 65 72 74 44 61  74 65 41 6e 64 54 69 6d  |onvertDateAndTim|
00008090  65 22 2c 31 2c 74 6d 70  25 2c 74 6d 70 25 2b 31  |e",1,tmp%,tmp%+1|
000080a0  32 38 2c 31 32 38 2c 22  25 43 45 25 59 52 25 4d  |28,128,"%CE%YR%M|
000080b0  4e 25 44 59 25 32 34 25  4d 49 22 b8 62 25 0d 31  |N%DY%24%MI".b%.1|
000080c0  24 0d 3d a4 73 74 72 28  62 25 29 0d 31 2e 04 0d  |$.=.str(b%).1...|
000080d0  31 38 12 dd a4 66 69 6c  65 74 69 6d 65 28 66 24  |18...filetime(f$|
000080e0  29 0d 31 42 10 ea 6c 25  2c 65 25 2c 6f 25 2c 72  |).1B..l%,e%,o%,r|
000080f0  25 0d 31 4c 20 c8 99 22  58 4f 53 5f 46 69 6c 65  |%.1L .."XOS_File|
00008100  22 2c 32 33 2c 66 24 b8  6f 25 2c 2c 6c 25 2c 65  |",23,f$.o%,,l%,e|
00008110  25 0d 31 56 0a e7 6f 25  3e 30 8c 0d 31 60 18 20  |%.1V..o%>0..1`. |
00008120  20 21 74 6d 70 25 3d 65  25 3a 74 6d 70 25 21 34  | !tmp%=e%:tmp%!4|
00008130  3d 6c 25 0d 31 6a 4c 20  20 c8 99 22 54 65 72 72  |=l%.1jL  .."Terr|
00008140  69 74 6f 72 79 5f 43 6f  6e 76 65 72 74 44 61 74  |itory_ConvertDat|
00008150  65 41 6e 64 54 69 6d 65  22 2c 31 2c 74 6d 70 25  |eAndTime",1,tmp%|
00008160  2c 74 6d 70 25 2b 31 32  38 2c 31 32 38 2c 22 25  |,tmp%+128,128,"%|
00008170  43 45 25 59 52 25 4d 4e  25 44 59 22 b8 62 25 0d  |CE%YR%MN%DY".b%.|
00008180  31 74 12 20 20 72 25 3d  bb a4 73 74 72 28 62 25  |1t.  r%=..str(b%|
00008190  29 0d 31 7e 05 cd 0d 31  88 07 3d 72 25 0d 31 92  |).1~...1..=r%.1.|
000081a0  04 0d 31 9c 0d dd a4 64  61 79 28 74 25 29 0d 31  |..1....day(t%).1|
000081b0  a6 38 f4 20 63 6f 6e 76  65 72 74 20 64 61 74 65  |.8. convert date|
000081c0  20 74 6f 20 6e 6f 2e 6f  66 20 64 61 79 73 20 73  | to no.of days s|
000081d0  69 6e 63 65 20 73 74 61  72 74 20 6f 66 20 63 65  |ince start of ce|
000081e0  6e 74 75 72 79 2e 0d 31  b0 1c ea 64 61 79 25 2c  |ntury..1...day%,|
000081f0  6d 6f 6e 74 68 25 2c 79  65 61 72 25 2c 6d 25 2c  |month%,year%,m%,|
00008200  64 25 0d 31 ba 0f 64 61  79 25 3d 74 25 83 31 30  |d%.1..day%=t%.10|
00008210  30 0d 31 c4 17 6d 6f 6e  74 68 25 3d 28 74 25 81  |0.1..month%=(t%.|
00008220  31 30 30 29 83 31 30 30  0d 31 ce 14 79 65 61 72  |100).100.1..year|
00008230  25 3d 28 74 25 81 31 30  30 30 30 29 0d 31 d8 15  |%=(t%.10000).1..|
00008240  64 25 3d 33 36 35 2a 79  65 61 72 25 2b 64 61 79  |d%=365*year%+day|
00008250  25 0d 31 e2 0d c8 8e 6d  6f 6e 74 68 25 ca 0d 31  |%.1....month%..1|
00008260  ec 0b c9 31 3a 6d 25 3d  30 0d 31 f6 0c c9 32 3a  |...1:m%=0.1...2:|
00008270  6d 25 3d 33 31 0d 32 00  0c c9 33 3a 6d 25 3d 35  |m%=31.2...3:m%=5|
00008280  39 0d 32 0a 0c c9 34 3a  6d 25 3d 39 30 0d 32 14  |9.2...4:m%=90.2.|
00008290  0d c9 35 3a 6d 25 3d 31  32 30 0d 32 1e 0d c9 36  |..5:m%=120.2...6|
000082a0  3a 6d 25 3d 31 35 31 0d  32 28 0d c9 37 3a 6d 25  |:m%=151.2(..7:m%|
000082b0  3d 31 38 30 0d 32 32 0d  c9 38 3a 6d 25 3d 32 31  |=180.22..8:m%=21|
000082c0  31 0d 32 3c 0d c9 39 3a  6d 25 3d 32 34 32 0d 32  |1.2<..9:m%=242.2|
000082d0  46 0e c9 31 30 3a 6d 25  3d 32 37 32 0d 32 50 0e  |F..10:m%=272.2P.|
000082e0  c9 31 31 3a 6d 25 3d 33  30 33 0d 32 5a 0e c9 31  |.11:m%=303.2Z..1|
000082f0  32 3a 6d 25 3d 33 33 33  0d 32 64 05 cb 0d 32 6e  |2:m%=333.2d...2n|
00008300  0a 3d 64 25 2b 6d 25 0d  32 78 04 0d 32 82 0d dd  |.=d%+m%.2x..2...|
00008310  f2 6c 6f 67 28 41 24 29  0d 32 8c 07 ea 6c 25 0d  |.log(A$).2...l%.|
00008320  32 96 09 e7 72 77 25 8c  0d 32 a0 18 20 20 e7 41  |2...rw%..2..  .A|
00008330  24 3e 22 22 80 6c 6f 67  70 74 72 25 3c 32 30 8c  |$>"".logptr%<20.|
00008340  0d 32 aa 44 20 20 20 20  6c 6f 67 24 28 6c 6f 67  |.2.D    log$(log|
00008350  70 74 72 25 29 3d a4 63  74 69 6d 65 28 22 23 20  |ptr%)=.ctime("# |
00008360  25 59 52 25 4d 4e 25 44  59 20 25 32 34 25 4d 49  |%YR%MN%DY %24%MI|
00008370  25 53 45 20 22 29 2b 41  24 3a 6c 6f 67 70 74 72  |%SE ")+A$:logptr|
00008380  25 2b 3d 31 0d 32 b4 09  20 20 20 20 cc 0d 32 be  |%+=1.2..    ..2.|
00008390  13 20 20 20 20 e7 6c 6f  67 70 74 72 25 3e 30 8c  |.    .logptr%>0.|
000083a0  0d 32 c8 26 20 20 20 20  20 20 66 31 25 3d a4 6f  |.2.&      f1%=.o|
000083b0  70 65 6e 75 70 28 62 61  73 65 64 69 72 24 2b 22  |penup(basedir$+"|
000083c0  2e 6c 6f 67 22 29 0d 32  d2 12 20 20 20 20 20 20  |.log").2..      |
000083d0  e7 66 31 25 3c 3e 30 8c  0d 32 dc 17 20 20 20 20  |.f1%<>0..2..    |
000083e0  20 20 20 20 cf 23 66 31  25 3d a2 23 66 31 25 0d  |    .#f1%=.#f1%.|
000083f0  32 e6 19 20 20 20 20 20  20 20 20 e3 6c 25 3d 30  |2..        .l%=0|
00008400  b8 6c 6f 67 70 74 72 25  0d 32 f0 29 20 20 20 20  |.logptr%.2.)    |
00008410  20 20 20 20 20 20 e7 6c  6f 67 24 28 6c 25 29 3e  |      .log$(l%)>|
00008420  22 22 8c d5 23 66 31 25  2c 6c 6f 67 24 28 6c 25  |""..#f1%,log$(l%|
00008430  29 0d 32 fa 0d 20 20 20  20 20 20 20 20 ed 0d 33  |).2..        ..3|
00008440  04 47 20 20 20 20 20 20  20 20 6c 6f 67 24 28 29  |.G        log$()|
00008450  3d 22 22 3a 6c 6f 67 70  74 72 25 3d 30 3a f2 63  |="":logptr%=0:.c|
00008460  66 28 66 31 25 29 3a f2  73 65 74 74 79 70 65 28  |f(f1%):.settype(|
00008470  62 61 73 65 64 69 72 24  2b 22 2e 6c 6f 67 22 2c  |basedir$+".log",|
00008480  26 46 46 46 29 0d 33 0e  0b 20 20 20 20 20 20 cd  |&FFF).3..      .|
00008490  0d 33 18 09 20 20 20 20  cd 0d 33 22 07 20 20 cd  |.3..    ..3".  .|
000084a0  0d 33 2c 05 cd 0d 33 36  05 e1 0d 33 40 04 0d 33  |.3,...36...3@..3|
000084b0  4a 14 dd f2 73 65 74 74  79 70 65 28 66 24 2c 74  |J...settype(f$,t|
000084c0  25 29 0d 33 54 19 c8 99  22 58 4f 53 5f 46 69 6c  |%).3T..."XOS_Fil|
000084d0  65 22 2c 31 38 2c 66 24  2c 74 25 0d 33 5e 05 e1  |e",18,f$,t%.3^..|
000084e0  0d 33 68 04 0d 33 72 0f  dd f2 73 74 61 6d 70 28  |.3h..3r...stamp(|
000084f0  66 24 29 0d 33 7c 15 c8  99 22 58 4f 53 5f 46 69  |f$).3|..."XOS_Fi|
00008500  6c 65 22 2c 39 2c 66 24  0d 33 86 05 e1 0d 33 90  |le",9,f$.3....3.|
00008510  04 0d 33 9a 0d dd a4 64  75 70 74 61 73 6b 0d 33  |..3....duptask.3|
00008520  a4 1b ea 66 6f 75 6e 64  25 2c 72 30 25 2c 62 25  |...found%,r0%,b%|
00008530  2c 61 24 3a 72 30 25 3d  30 0d 33 ae 05 f5 0d 33  |,a$:r0%=0.3....3|
00008540  b8 3b 74 6d 70 25 21 34  3d 30 3a c8 99 22 54 61  |.;tmp%!4=0:.."Ta|
00008550  73 6b 4d 61 6e 61 67 65  72 5f 45 6e 75 6d 65 72  |skManager_Enumer|
00008560  61 74 65 54 61 73 6b 73  22 2c 72 30 25 2c 74 6d  |ateTasks",r0%,tm|
00008570  70 25 2c 32 30 b8 72 30  25 0d 33 c2 15 e7 72 30  |p%,20.r0%.3...r0|
00008580  25 3e 3d 30 80 74 6d 70  25 21 34 3e 30 8c 0d 33  |%>=0.tmp%!4>0..3|
00008590  cc 37 20 20 62 25 3d 74  6d 70 25 21 34 3a 61 24  |.7  b%=tmp%!4:a$|
000085a0  3d 22 22 3a c8 95 3f 62  25 3e 33 31 80 a9 61 24  |="":..?b%>31..a$|
000085b0  3c 32 35 35 3a 61 24 2b  3d bd 3f 62 25 3a 62 25  |<255:a$+=.?b%:b%|
000085c0  2b 3d 31 3a ce 0d 33 d6  1e 20 20 e7 c0 61 24 2c  |+=1:..3..  ..a$,|
000085d0  38 29 3d 6d 79 6e 61 6d  65 24 8c 66 6f 75 6e 64  |8)=myname$.found|
000085e0  25 3d 31 0d 33 e0 05 cd  0d 33 ea 14 fd 72 30 25  |%=1.3....3...r0%|
000085f0  3c 30 84 66 6f 75 6e 64  25 3c 3e 30 0d 33 f4 0b  |<0.found%<>0.3..|
00008600  3d 66 6f 75 6e 64 25 0d  33 fe 04 0d 34 08 0a dd  |=found%.3...4...|
00008610  f2 69 6e 69 74 0d 34 12  16 6d 79 6e 61 6d 65 24  |.init.4..myname$|
00008620  3d 22 4e 65 77 73 62 61  73 65 22 0d 34 1c 38 c8  |="Newsbase".4.8.|
00008630  99 22 4f 53 5f 42 79 74  65 22 2c 31 32 39 2c 30  |."OS_Byte",129,0|
00008640  2c 26 46 46 20 b8 2c 6f  73 76 65 72 25 3a 64 79  |,&FF .,osver%:dy|
00008650  6e 61 72 65 61 25 3d 28  6f 73 76 65 72 25 3e 26  |narea%=(osver%>&|
00008660  41 34 29 0d 34 26 10 f2  65 6e 76 69 72 6f 6e 6d  |A4).4&..environm|
00008670  65 6e 74 0d 34 30 30 6d  73 67 64 65 73 63 25 3d  |ent.400msgdesc%=|
00008680  30 3a 64 65 66 69 63 24  3d 22 22 3a 63 72 65 64  |0:defic$="":cred|
00008690  69 74 24 3d 22 22 3a 74  72 61 6e 73 70 6f 72 74  |it$="":transport|
000086a0  25 3d 30 0d 34 3a 35 67  72 6f 75 70 73 25 3d 30  |%=0.4:5groups%=0|
000086b0  3a 69 6e 69 74 67 72 6f  75 70 73 25 3d 30 3a 64  |:initgroups%=0:d|
000086c0  72 61 67 72 65 66 25 3d  30 3a 61 75 74 6f 64 65  |ragref%=0:autode|
000086d0  62 61 74 63 68 25 3d 30  0d 34 44 2a 74 68 69 73  |batch%=0.4D*this|
000086e0  61 72 74 6c 65 6e 25 3d  30 3a 6e 65 78 74 61 72  |artlen%=0:nextar|
000086f0  74 70 6f 73 25 3d 30 3a  6c 6f 67 66 69 6c 65 25  |tpos%=0:logfile%|
00008700  3d 30 0d 34 4e 3e 70 6f  73 74 66 65 74 63 68 72  |=0.4N>postfetchr|
00008710  65 61 64 79 25 3d 30 3a  73 74 61 72 74 75 70 6f  |eady%=0:startupo|
00008720  6b 25 3d 30 3a 69 6e 64  65 62 61 74 63 68 25 3d  |k%=0:indebatch%=|
00008730  30 3a 62 6c 6f 63 6b 65  78 70 69 72 65 25 3d b9  |0:blockexpire%=.|
00008740  0d 34 58 13 6e 75 6c 6c  24 3d c4 32 30 30 2c 22  |.4X.null$=.200,"|
00008750  20 22 29 0d 34 62 3c 6d  61 78 61 63 74 69 76 65  | ").4b<maxactive|
00008760  25 3d 30 3a 63 61 6e 63  65 6c 25 3d 30 3a 6e 63  |%=0:cancel%=0:nc|
00008770  6c 69 65 6e 74 25 3d 30  3a 73 6c 65 65 70 25 3d  |lient%=0:sleep%=|
00008780  30 3a 66 6f 72 63 65 62  61 74 63 68 25 3d 30 0d  |0:forcebatch%=0.|
00008790  34 6c 32 69 6e 62 75 66  73 69 7a 65 25 3d 31 36  |4l2inbufsize%=16|
000087a0  2a 31 30 32 34 3a 64 65  66 61 72 74 62 75 66 25  |*1024:defartbuf%|
000087b0  3d 38 31 39 32 3a 64 62  73 69 7a 65 25 3d 35 31  |=8192:dbsize%=51|
000087c0  32 0d 34 76 0e de 20 74  6d 70 25 20 32 35 36 0d  |2.4v.. tmp% 256.|
000087d0  34 80 23 69 62 75 66 73  69 7a 65 25 3d 38 30 30  |4.#ibufsize%=800|
000087e0  30 3a 64 65 6c 62 75 66  73 69 7a 65 25 3d 32 30  |0:delbufsize%=20|
000087f0  34 38 0d 34 8a 15 de 20  69 62 75 66 25 20 69 62  |48.4... ibuf% ib|
00008800  75 66 73 69 7a 65 25 0d  34 94 19 de 20 64 65 6c  |ufsize%.4... del|
00008810  62 75 66 25 20 64 65 6c  62 75 66 73 69 7a 65 25  |buf% delbufsize%|
00008820  0d 34 9e 1e 6d 61 78 73  61 76 65 25 3d 31 30 3a  |.4..maxsave%=10:|
00008830  6d 61 78 61 63 74 69 76  65 25 3d 31 30 30 0d 34  |maxactive%=100.4|
00008840  a8 35 de 20 6f 75 74 70  24 28 6d 61 78 73 61 76  |.5. outp$(maxsav|
00008850  65 25 29 2c 6f 75 74 73  25 28 6d 61 78 73 61 76  |e%),outs%(maxsav|
00008860  65 25 29 2c 6f 75 74 67  25 28 6d 61 78 73 61 76  |e%),outg%(maxsav|
00008870  65 25 29 0d 34 b2 19 de  20 6c 6f 67 24 28 32 30  |e%).4... log$(20|
00008880  29 2c 6f 75 74 64 69 72  24 28 31 29 0d 34 bc 25  |),outdir$(1).4.%|
00008890  64 65 6c 62 75 66 70 74  72 25 3d 30 3a 64 65 6c  |delbufptr%=0:del|
000088a0  62 75 66 67 25 3d 30 3a  6c 6f 67 70 74 72 25 3d  |bufg%=0:logptr%=|
000088b0  30 0d 34 c6 17 69 62 75  66 70 74 72 25 3d 30 3a  |0.4..ibufptr%=0:|
000088c0  69 62 75 66 67 25 3d 30  0d 34 d0 1b 74 79 70 65  |ibufg%=0.4..type|
000088d0  25 3d 30 3a 6c 69 6e 65  24 3d 22 22 3a 62 66 24  |%=0:line$="":bf$|
000088e0  3d 22 22 0d 34 da 2c 6c  65 6e 25 3d 30 3a 70 6f  |="".4.,len%=0:po|
000088f0  73 25 3d 30 3a 62 73 74  61 72 74 25 3d 30 3a 72  |s%=0:bstart%=0:r|
00008900  65 63 70 6f 73 25 3d 30  3a 62 66 24 3d 22 22 0d  |ecpos%=0:bf$="".|
00008910  34 e4 23 74 6f 74 61 6c  25 3d 30 3a 70 61 75 73  |4.#total%=0:paus|
00008920  65 25 3d a3 3a 63 68 65  63 6b 66 69 6c 65 73 25  |e%=.:checkfiles%|
00008930  3d 31 0d 34 ee 1e 54 25  3d 30 3a 3a 54 31 25 3d  |=1.4..T%=0::T1%=|
00008940  30 3a 54 32 25 3d 2d 31  3a 6f 70 65 6e 25 3d a3  |0:T2%=-1:open%=.|
00008950  0d 34 f8 34 66 30 30 25  3d 30 3a 66 30 25 3d 30  |.4.4f00%=0:f0%=0|
00008960  3a 66 31 25 3d 30 3a 66  32 25 3d 30 3a 66 33 25  |:f1%=0:f2%=0:f3%|
00008970  3d 30 3a 66 34 25 3d 30  3a 66 35 25 3d 30 3a 66  |=0:f4%=0:f5%=0:f|
00008980  36 25 3d 30 0d 35 02 19  6c 67 72 70 25 3d 30 3a  |6%=0.5..lgrp%=0:|
00008990  6c 67 72 70 24 3d 22 42  4c 41 4e 4b 22 0d 35 0c  |lgrp$="BLANK".5.|
000089a0  21 6e 6f 70 6f 6c 6c 25  3d 30 3a 6e 67 74 69 6d  |!nopoll%=0:ngtim|
000089b0  65 25 3d 30 3a 6e 67 6c  61 73 74 25 3d 30 0d 35  |e%=0:nglast%=0.5|
000089c0  16 1e 66 69 6e 64 67 25  3d 30 3a 66 69 6e 64 70  |..findg%=0:findp|
000089d0  24 3d 22 22 3a 6c 6f 6e  67 25 3d 30 0d 35 20 1e  |$="":long%=0.5 .|
000089e0  62 75 73 79 24 3d 22 22  3a 73 65 70 24 3d 22 22  |busy$="":sep$=""|
000089f0  3a 73 65 70 6c 65 6e 25  3d 30 0d 35 2a 0e 73 6c  |:seplen%=0.5*.sl|
00008a00  69 63 65 25 3d 2d 31 35  0d 35 34 12 6e 62 63 6f  |ice%=-15.54.nbco|
00008a10  6d 25 3d 26 46 45 45 44  31 30 0d 35 3e 12 6e 62  |m%=&FEED10.5>.nb|
00008a20  72 65 70 25 3d 26 46 45  45 44 31 31 0d 35 48 12  |rep%=&FEED11.5H.|
00008a30  6e 62 75 70 64 25 3d 26  46 45 45 44 31 32 0d 35  |nbupd%=&FEED12.5|
00008a40  52 0d 73 72 66 6c 61 67  25 3d 30 0d 35 5c 2d 61  |R.srflag%=0.5\-a|
00008a50  72 72 61 72 74 25 3d 30  3a 61 72 72 6d 61 69 6c  |rrart%=0:arrmail|
00008a60  24 3d 22 22 3a 67 72 70  71 25 3d 30 3a 79 6e 63  |$="":grpq%=0:ync|
00008a70  68 6f 69 63 65 25 3d 30  0d 35 66 29 61 72 74 64  |hoice%=0.5f)artd|
00008a80  61 74 65 25 3d 30 3a 6d  6f 64 67 77 24 3d 22 6d  |ate%=0:modgw$="m|
00008a90  6f 64 65 72 61 74 6f 72  73 2e 75 75 2e 6e 65 74  |oderators.uu.net|
00008aa0  22 0d 35 70 26 f4 20 6e  6f 77 20 61 6c 6c 20 63  |".5p&. now all c|
00008ab0  6f 6e 66 69 67 20 66 69  6c 65 20 76 61 72 69 61  |onfig file varia|
00008ac0  62 6c 65 73 2e 2e 2e 0d  35 7a 44 6c 6f 67 66 69  |bles....5zDlogfi|
00008ad0  6c 65 25 3d 31 3a 6b 65  65 70 6f 75 74 67 25 3d  |le%=1:keepoutg%=|
00008ae0  31 3a 66 61 73 74 25 3d  31 3a 61 6c 65 72 74 25  |1:fast%=1:alert%|
00008af0  3d 31 3a 61 6c 65 72 74  62 65 65 70 25 3d 30 3a  |=1:alertbeep%=0:|
00008b00  75 73 65 72 63 74 72 6c  25 3d 30 0d 35 84 3c 61  |userctrl%=0.5.<a|
00008b10  6c 65 72 74 6e 65 77 73  25 3d 31 3a 64 65 66 63  |lertnews%=1:defc|
00008b20  6c 69 65 6e 74 24 3d 22  22 3a 61 75 74 6f 65 78  |lient$="":autoex|
00008b30  70 25 3d 31 3a 64 65 66  65 78 70 25 3d 37 3a 64  |p%=1:defexp%=7:d|
00008b40  65 6c 6f 6b 25 3d 30 0d  35 8e 41 6c 69 73 74 74  |elok%=0.5.Alistt|
00008b50  79 70 65 25 3d 30 3a 72  65 6d 6f 74 65 68 6f 73  |ype%=0:remotehos|
00008b60  74 24 3d 22 22 3a 65 78  70 6d 61 69 6c 25 3d 30  |t$="":expmail%=0|
00008b70  3a 61 75 74 6f 64 65 62  61 74 63 68 25 3d 31 3a  |:autodebatch%=1:|
00008b80  69 67 65 78 70 25 3d 30  0d 35 98 47 6b 65 65 70  |igexp%=0.5.Gkeep|
00008b90  62 25 3d 31 3a 64 6f 63  61 6e 63 25 3d 31 3a 6b  |b%=1:docanc%=1:k|
00008ba0  69 6c 6c 63 25 3d 31 3a  64 6f 72 65 63 65 69 70  |illc%=1:doreceip|
00008bb0  74 25 3d 31 3a 63 76 65  72 25 3d 30 3a 6e 67 65  |t%=1:cver%=0:nge|
00008bc0  78 70 25 3d 37 3a 74 68  72 65 61 64 25 3d 31 0d  |xp%=7:thread%=1.|
00008bd0  35 a2 37 6d 6f 64 67 77  24 3d 22 22 3a 6d 6e 67  |5.7modgw$="":mng|
00008be0  77 24 3d 22 22 3a 6d 6e  67 77 25 3d 30 3a 75 73  |w$="":mngw%=0:us|
00008bf0  65 72 6c 69 73 74 24 3d  22 22 3a 69 6e 69 74 63  |erlist$="":initc|
00008c00  6f 6e 66 25 3d 30 0d 35  ac 41 63 6f 6d 70 72 65  |onf%=0.5.Acompre|
00008c10  73 73 25 3d 30 3a 63 6f  6d 70 6c 69 6d 69 74 25  |ss%=0:complimit%|
00008c20  3d 32 30 34 38 3a 65 78  70 74 69 6d 65 25 3d 30  |=2048:exptime%=0|
00008c30  3a 65 78 70 61 6e 79 25  3d 30 3a 6d 69 6e 64 73  |:expany%=0:minds|
00008c40  6b 25 3d 31 30 32 34 0d  35 b6 32 68 6f 73 74 6e  |k%=1024.5.2hostn|
00008c50  61 6d 65 24 3d 22 22 3a  6f 72 67 24 3d 22 22 3a  |ame$="":org$="":|
00008c60  6d 61 69 6c 6e 61 6d 65  24 3d 22 22 3a 74 69 6d  |mailname$="":tim|
00008c70  65 7a 6f 6e 65 24 3d 22  22 0d 35 c0 05 e1 0d 35  |ezone$="".5....5|
00008c80  ca 04 0d 35 d4 11 dd f2  65 6e 76 69 72 6f 6e 6d  |...5....environm|
00008c90  65 6e 74 0d 35 de 0a ea  70 24 2c 41 24 0d 35 e8  |ent.5...p$,A$.5.|
00008ca0  1d 72 77 25 3d b9 3a f4  20 72 65 61 64 2d 77 72  |.rw%=.:. read-wr|
00008cb0  69 74 65 20 61 63 63 65  73 73 0d 35 f2 14 c8 99  |ite access.5....|
00008cc0  22 4f 53 5f 47 65 74 45  6e 76 22 b8 41 24 0d 35  |"OS_GetEnv".A$.5|
00008cd0  fc 05 f5 0d 36 06 18 20  20 70 24 3d a4 67 65 74  |....6..  p$=.get|
00008ce0  70 61 72 28 41 24 2c 22  20 22 29 0d 36 10 0b 20  |par(A$," ").6.. |
00008cf0  20 c8 8e 70 24 ca 0d 36  1a 33 20 20 20 20 c9 22  | ..p$..6.3    ."|
00008d00  2d 72 6f 22 3a 72 77 25  3d a3 3a f4 20 72 65 61  |-ro":rw%=.:. rea|
00008d10  64 2d 6f 6e 6c 79 20 61  63 63 65 73 73 20 74 6f  |d-only access to|
00008d20  20 21 4e 65 77 73 44 69  72 0d 36 24 07 20 20 cb  | !NewsDir.6$.  .|
00008d30  0d 36 2e 0a fd 41 24 3d  22 22 0d 36 38 05 e1 0d  |.6...A$="".68...|
00008d40  36 42 04 0d 36 4c 11 dd  f2 73 74 61 72 74 6d 65  |6B..6L...startme|
00008d50  6d 6d 67 72 0d 36 56 0b  62 61 73 65 25 3d 93 0d  |mmgr.6V.base%=..|
00008d60  36 60 27 c8 99 20 22 57  69 6d 70 5f 53 6c 6f 74  |6`'.. "Wimp_Slot|
00008d70  53 69 7a 65 22 2c 2d 31  2c 2d 31 20 b8 20 6d 69  |Size",-1,-1 . mi|
00008d80  6e 5f 6d 65 6d 25 0d 36  6a 05 e1 0d 36 74 04 0d  |n_mem%.6j...6t..|
00008d90  36 7e 0f dd a4 63 68 65  63 6b 73 6c 6f 74 0d 36  |6~...checkslot.6|
00008da0  88 12 ea 6d 25 2c 66 25  2c 6d 69 6e 66 72 65 25  |...m%,f%,minfre%|
00008db0  0d 36 92 11 6d 69 6e 66  72 65 25 3d 26 34 30 30  |.6..minfre%=&400|
00008dc0  30 0d 36 9c 50 f4 20 69  66 20 6d 6f 72 65 20 74  |0.6.P. if more t|
00008dd0  68 61 6e 20 32 4d 62 79  74 65 73 20 66 72 65 65  |han 2Mbytes free|
00008de0  2c 20 69 6e 73 69 73 74  20 6f 6e 20 33 32 6b 20  |, insist on 32k |
00008df0  73 70 61 63 65 20 69 6e  20 77 69 6d 70 73 6c 6f  |space in wimpslo|
00008e00  74 20 28 6f 74 68 65 72  77 69 73 65 20 31 36 6b  |t (otherwise 16k|
00008e10  29 0d 36 a6 3b c8 99 22  57 69 6d 70 5f 53 6c 6f  |).6.;.."Wimp_Slo|
00008e20  74 53 69 7a 65 22 2c 2d  31 2c 2d 31 b8 2c 2c 66  |tSize",-1,-1.,,f|
00008e30  25 3a e7 66 25 3e 26 32  30 30 30 30 30 20 8c 6d  |%:.f%>&200000 .m|
00008e40  69 6e 66 72 65 25 3d 26  38 30 30 30 0d 36 b0 14  |infre%=&8000.6..|
00008e50  e7 28 93 2d e0 29 3c 6d  69 6e 66 72 65 25 20 8c  |.(.-.)<minfre% .|
00008e60  0d 36 ba 2e 20 20 6d 25  3d 6d 69 6e 66 72 65 25  |.6..  m%=minfre%|
00008e70  3a f5 c8 99 22 57 69 6d  70 5f 53 6c 6f 74 53 69  |:..."Wimp_SlotSi|
00008e80  7a 65 22 2c 2d 31 2c 2d  31 b8 2c 2c 66 25 0d 36  |ze",-1,-1.,,f%.6|
00008e90  c4 26 20 20 20 20 e7 66  25 3c 6d 25 20 f2 6d 65  |.&    .f%<m% .me|
00008ea0  73 73 61 67 65 30 28 22  4e 65 65 64 6d 65 6d 31  |ssage0("Needmem1|
00008eb0  22 2c 31 29 0d 36 ce 0d  20 20 fd 66 25 3e 3d 6d  |",1).6..  .f%>=m|
00008ec0  25 0d 36 d8 07 20 20 cc  0d 36 e2 0a 20 20 6d 25  |%.6..  ..6..  m%|
00008ed0  3d 30 0d 36 ec 05 cd 0d  36 f6 07 3d 6d 25 0d 37  |=0.6....6..=m%.7|
00008ee0  00 04 0d 37 0a 0f dd f2  73 74 61 72 74 77 69 6d  |...7....startwim|
00008ef0  70 0d 37 14 27 de 20 74  61 73 6b 69 64 25 34 2c  |p.7.'. taskid%4,|
00008f00  77 6d 73 67 73 25 33 30  3a 24 74 61 73 6b 69 64  |wmsgs%30:$taskid|
00008f10  25 3d 22 54 41 53 4b 22  0d 37 1e 3e 21 77 6d 73  |%="TASK".7.>!wms|
00008f20  67 73 25 3d 33 3a 77 6d  73 67 73 25 21 34 3d 26  |gs%=3:wmsgs%!4=&|
00008f30  34 30 30 43 32 3a 77 6d  73 67 73 25 21 38 3d 26  |400C2:wmsgs%!8=&|
00008f40  34 30 30 43 33 3a 77 6d  73 67 73 25 21 31 32 3d  |400C3:wmsgs%!12=|
00008f50  6e 62 63 6f 6d 25 0d 37  28 3b 77 6d 73 67 73 25  |nbcom%.7(;wmsgs%|
00008f60  21 31 36 3d 32 3a 77 6d  73 67 73 25 21 32 30 3d  |!16=2:wmsgs%!20=|
00008f70  26 34 30 30 43 39 3a 77  6d 73 67 73 25 21 32 34  |&400C9:wmsgs%!24|
00008f80  3d 26 35 30 32 3a 77 6d  73 67 73 25 21 32 38 3d  |=&502:wmsgs%!28=|
00008f90  30 0d 37 32 45 c8 99 20  22 57 69 6d 70 5f 49 6e  |0.72E.. "Wimp_In|
00008fa0  69 74 69 61 6c 69 73 65  22 2c 33 31 30 2c 21 74  |itialise",310,!t|
00008fb0  61 73 6b 69 64 25 2c 6d  79 6e 61 6d 65 24 2c 77  |askid%,myname$,w|
00008fc0  6d 73 67 73 25 20 b8 20  76 65 72 73 69 6f 6e 25  |msgs% . version%|
00008fd0  2c 74 61 73 6b 25 0d 37  3c 12 ee 85 f2 65 72 72  |,task%.7<....err|
00008fe0  6f 72 62 6f 78 28 a3 29  0d 37 46 4e c8 99 22 54  |orbox(.).7FN.."T|
00008ff0  65 72 72 69 74 6f 72 79  5f 45 78 69 73 74 73 22  |erritory_Exists"|
00009000  2c 31 b8 3b 46 25 3a e7  28 46 25 80 34 29 3d 30  |,1.;F%:.(F%.4)=0|
00009010  8c 85 30 2c 22 55 4b 20  54 65 72 72 69 74 6f 72  |..0,"UK Territor|
00009020  79 20 6d 6f 64 75 6c 65  20 6e 6f 74 20 70 72 65  |y module not pre|
00009030  73 65 6e 74 21 22 0d 37  50 17 de 71 25 20 26 32  |sent!".7P..q% &2|
00009040  30 30 2c 69 62 61 72 25  20 26 31 30 30 0d 37 5a  |00,ibar% &100.7Z|
00009050  3a 6d 65 6e 75 64 61 74  61 25 3d 30 3a 69 6e 64  |:menudata%=0:ind|
00009060  6d 65 6e 75 62 75 66 25  3d 30 3a 6d 65 6e 75 64  |menubuf%=0:menud|
00009070  61 74 61 72 65 66 25 3d  30 3a 69 6e 64 6d 65 6e  |ataref%=0:indmen|
00009080  75 72 65 66 25 3d 30 0d  37 64 25 c8 99 22 4f 53  |uref%=0.7d%.."OS|
00009090  5f 52 65 61 64 4d 6f 64  65 56 61 72 69 61 62 6c  |_ReadModeVariabl|
000090a0  65 22 2c 2d 31 2c 35 b8  2c 2c 41 25 0d 37 6e 3d  |e",-1,5.,,A%.7n=|
000090b0  e7 41 25 3c 32 8c f2 6d  65 72 67 65 73 70 72 69  |.A%<2..mergespri|
000090c0  74 65 73 28 22 73 70 72  69 74 65 73 32 32 22 29  |tes("sprites22")|
000090d0  8b f2 6d 65 72 67 65 73  70 72 69 74 65 73 28 22  |..mergesprites("|
000090e0  73 70 72 69 74 65 73 22  29 0d 37 78 30 c8 99 22  |sprites").7x0.."|
000090f0  57 69 6d 70 5f 4f 70 65  6e 54 65 6d 70 6c 61 74  |Wimp_OpenTemplat|
00009100  65 22 2c 2c a4 72 65 73  66 69 6c 65 28 22 54 65  |e",,.resfile("Te|
00009110  6d 70 6c 61 74 65 73 22  29 0d 37 82 1f 73 74 61  |mplates").7..sta|
00009120  74 75 73 25 3d a4 6c 6f  61 64 74 65 6d 70 28 22  |tus%=.loadtemp("|
00009130  73 74 61 74 75 73 22 29  0d 37 8c 1e 6d 73 67 77  |status").7..msgw|
00009140  25 3d a4 6c 6f 61 64 74  65 6d 70 28 22 6d 65 73  |%=.loadtemp("mes|
00009150  73 61 67 65 22 29 0d 37  96 21 67 73 65 74 75 70  |sage").7.!gsetup|
00009160  25 3d a4 6c 6f 61 64 74  65 6d 70 28 22 67 65 6e  |%=.loadtemp("gen|
00009170  73 65 74 75 70 22 29 0d  37 a0 1d 67 77 69 6e 25  |setup").7..gwin%|
00009180  3d a4 6c 6f 61 64 74 65  6d 70 28 22 67 72 6f 75  |=.loadtemp("grou|
00009190  70 73 22 29 0d 37 aa 1f  79 65 73 6e 6f 25 3d a4  |ps").7..yesno%=.|
000091a0  6c 6f 61 64 74 65 6d 70  28 22 63 6f 6e 66 69 72  |loadtemp("confir|
000091b0  6d 22 29 0d 37 b4 1b 69  6e 66 6f 25 3d a4 6c 6f  |m").7..info%=.lo|
000091c0  61 64 74 65 6d 70 28 22  69 6e 66 6f 22 29 0d 37  |adtemp("info").7|
000091d0  be 1f 61 72 72 69 76 65  25 3d a4 6c 6f 61 64 74  |..arrive%=.loadt|
000091e0  65 6d 70 28 22 61 72 72  69 76 65 22 29 0d 37 c8  |emp("arrive").7.|
000091f0  1c 75 77 69 6e 25 3d a4  6c 6f 61 64 74 65 6d 70  |.uwin%=.loadtemp|
00009200  28 22 75 73 65 72 73 22  29 0d 37 d2 1e 73 69 74  |("users").7..sit|
00009210  65 77 69 6e 25 3d a4 6c  6f 61 64 74 65 6d 70 28  |ewin%=.loadtemp(|
00009220  22 73 69 74 65 22 29 0d  37 dc 1e 66 77 69 6e 25  |"site").7..fwin%|
00009230  3d a4 6c 6f 61 64 74 65  6d 70 28 22 66 69 6c 74  |=.loadtemp("filt|
00009240  65 72 73 22 29 0d 37 e6  20 73 61 76 65 6e 64 25  |ers").7. savend%|
00009250  3d a4 6c 6f 61 64 74 65  6d 70 28 22 6e 65 77 73  |=.loadtemp("news|
00009260  64 69 72 22 29 0d 37 f0  1e 6d 73 65 74 75 70 25  |dir").7..msetup%|
00009270  3d a4 6c 6f 61 64 74 65  6d 70 28 22 73 65 74 75  |=.loadtemp("setu|
00009280  70 22 29 0d 37 fa 22 74  72 77 69 6e 25 3d a4 6c  |p").7."trwin%=.l|
00009290  6f 61 64 74 65 6d 70 28  22 74 72 61 6e 73 70 6f  |oadtemp("transpo|
000092a0  72 74 73 22 29 0d 38 04  21 6e 67 77 69 6e 25 3d  |rts").8.!ngwin%=|
000092b0  a4 6c 6f 61 64 74 65 6d  70 28 22 6e 65 77 67 72  |.loadtemp("newgr|
000092c0  6f 75 70 73 22 29 0d 38  0e 1a c8 99 22 57 69 6d  |oups").8...."Wim|
000092d0  70 5f 43 6c 6f 73 65 54  65 6d 70 6c 61 74 65 22  |p_CloseTemplate"|
000092e0  0d 38 18 0c f2 73 65 74  74 69 6d 65 0d 38 22 27  |.8...settime.8"'|
000092f0  6c 61 73 74 70 6f 6c 6c  25 3d 30 3a 6c 61 73 74  |lastpoll%=0:last|
00009300  75 70 64 25 3d 30 3a 73  74 69 6d 65 25 3d 74 69  |upd%=0:stime%=ti|
00009310  6d 65 25 0d 38 2c 30 63  72 6f 6e 30 25 3d 30 3a  |me%.8,0cron0%=0:|
00009320  63 72 6f 6e 31 25 3d 30  3a 63 72 6f 6e 32 25 3d  |cron1%=0:cron2%=|
00009330  30 3a 63 72 6f 6e 33 25  3d 30 3a 63 72 6f 6e 34  |0:cron3%=0:cron4|
00009340  25 3d 30 0d 38 36 51 63  6f 6e 66 6f 70 65 6e 25  |%=0.86Qconfopen%|
00009350  3d 30 3a 73 74 61 74 6f  70 65 6e 25 3d 30 3a 6d  |=0:statopen%=0:m|
00009360  73 67 6f 70 65 6e 25 3d  30 3a 6e 64 6f 70 65 6e  |sgopen%=0:ndopen|
00009370  25 3d 30 3a 6e 67 6f 70  65 6e 25 3d 30 3a 61 72  |%=0:ngopen%=0:ar|
00009380  72 6f 70 65 6e 25 3d 30  3a 69 6e 66 6f 6f 70 65  |ropen%=0:infoope|
00009390  6e 25 3d 30 0d 38 40 2b  62 61 72 69 63 24 3d 22  |n%=0.8@+baric$="|
000093a0  6e 65 77 73 62 61 73 65  31 22 3a 62 61 72 69 63  |newsbase1":baric|
000093b0  6f 6e 25 3d a4 69 63 28  62 61 72 69 63 24 29 0d  |on%=.ic(baric$).|
000093c0  38 4a 34 76 65 72 24 3d  22 30 2e 35 33 22 3a 72  |8J4ver$="0.53":r|
000093d0  65 76 24 3d 22 63 22 3a  76 65 72 25 3d 31 30 30  |ev$="c":ver%=100|
000093e0  2a bb 76 65 72 24 3a 67  72 6f 75 70 76 65 72 25  |*.ver$:groupver%|
000093f0  3d 34 37 0d 38 54 40 f2  75 70 64 61 74 65 69 63  |=47.8T@.updateic|
00009400  6f 6e 73 74 72 69 6e 67  28 69 6e 66 6f 25 2c 34  |onstring(info%,4|
00009410  2c 76 65 72 24 2b 72 65  76 24 2b 22 20 28 32 33  |,ver$+rev$+" (23|
00009420  2d 46 65 62 2d 39 35 29  22 29 3a f2 63 72 65 64  |-Feb-95)"):.cred|
00009430  69 74 73 0d 38 5e 36 f2  70 72 69 6e 74 28 a4 6d  |its.8^6.print(.m|
00009440  73 67 31 28 22 53 69 6e  66 6f 31 22 2c 76 65 72  |sg1("Sinfo1",ver|
00009450  24 29 2c 22 20 22 2c 22  20 22 2c 22 20 22 29 3a  |$)," "," "," "):|
00009460  f2 67 61 63 74 28 22 22  29 0d 38 68 05 e1 0d 38  |.gact("").8h...8|
00009470  72 04 0d 38 7c 12 dd a4  6c 6f 61 64 74 65 6d 70  |r..8|...loadtemp|
00009480  28 41 24 29 0d 38 86 1b  ea 62 25 2c 69 25 2c 73  |(A$).8...b%,i%,s|
00009490  25 2c 73 63 72 25 2c 69  63 6f 6e 25 2c 68 25 0d  |%,scr%,icon%,h%.|
000094a0  38 90 30 c8 99 22 57 69  6d 70 5f 4c 6f 61 64 54  |8.0.."Wimp_LoadT|
000094b0  65 6d 70 6c 61 74 65 22  2c 2c 2d 31 2c 30 2c 30  |emplate",,-1,0,0|
000094c0  2c 2d 31 2c 41 24 2c 30  b8 2c 62 25 2c 69 25 0d  |,-1,A$,0.,b%,i%.|
000094d0  38 9a 2b 73 25 3d a4 63  6c 61 69 6d 28 73 63 72  |8.+s%=.claim(scr|
000094e0  25 2c 62 25 2c 22 74 65  6d 70 6c 61 74 65 22 29  |%,b%,"template")|
000094f0  3a de 69 63 6f 6e 25 20  69 25 0d 38 a4 36 c8 99  |:.icon% i%.8.6..|
00009500  22 57 69 6d 70 5f 4c 6f  61 64 54 65 6d 70 6c 61  |"Wimp_LoadTempla|
00009510  74 65 22 2c 2c 73 63 72  25 2c 69 63 6f 6e 25 2c  |te",,scr%,icon%,|
00009520  69 63 6f 6e 25 2b 69 25  2c 2d 31 2c 41 24 2c 30  |icon%+i%,-1,A$,0|
00009530  0d 38 ae 41 73 63 72 25  21 36 34 3d 73 70 72 69  |.8.Ascr%!64=spri|
00009540  74 65 73 25 3a c8 99 22  57 69 6d 70 5f 43 72 65  |tes%:.."Wimp_Cre|
00009550  61 74 65 57 69 6e 64 6f  77 22 2c 2c 73 63 72 25  |ateWindow",,scr%|
00009560  20 b8 68 25 3a f2 72 65  6c 65 61 73 65 28 73 25  | .h%:.release(s%|
00009570  29 0d 38 b8 07 3d 68 25  0d 38 c2 04 0d 38 cc 16  |).8..=h%.8...8..|
00009580  dd f2 6d 65 72 67 65 73  70 72 69 74 65 73 28 41  |..mergesprites(A|
00009590  24 29 0d 38 d6 1f ea 73  25 2c 66 25 2c 6e 25 3a  |$).8...s%,f%,n%:|
000095a0  41 24 3d 72 65 73 64 69  72 24 2b 22 2e 22 2b 41  |A$=resdir$+"."+A|
000095b0  24 0d 38 e0 14 e7 a4 6f  62 6a 74 79 70 65 28 41  |$.8....objtype(A|
000095c0  24 29 3d 31 8c 0d 38 ea  17 73 25 3d a4 66 69 6c  |$)=1..8..s%=.fil|
000095d0  65 73 69 7a 65 28 41 24  29 2b 32 30 0d 38 f4 2a  |esize(A$)+20.8.*|
000095e0  de 73 70 72 69 74 65 73  25 20 73 25 3a 21 73 70  |.sprites% s%:!sp|
000095f0  72 69 74 65 73 25 3d 73  25 3a 73 70 72 69 74 65  |rites%=s%:sprite|
00009600  73 25 21 38 3d 30 0d 38  fe 22 c8 99 20 22 4f 53  |s%!8=0.8.".. "OS|
00009610  5f 53 70 72 69 74 65 4f  70 22 2c 26 31 30 39 2c  |_SpriteOp",&109,|
00009620  73 70 72 69 74 65 73 25  0d 39 08 2e c8 99 22 58  |sprites%.9...."X|
00009630  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 26 31 30  |OS_SpriteOp",&10|
00009640  38 2c 73 70 72 69 74 65  73 25 b8 2c 2c 73 25 2c  |8,sprites%.,,s%,|
00009650  6e 25 2c 2c 66 25 0d 39  12 30 c8 99 22 58 4f 53  |n%,,f%.9.0.."XOS|
00009660  5f 53 70 72 69 74 65 4f  70 22 2c 26 31 30 42 2b  |_SpriteOp",&10B+|
00009670  28 6e 25 3d 30 29 2c 73  70 72 69 74 65 73 25 2c  |(n%=0),sprites%,|
00009680  41 24 b8 3b 46 25 0d 39  1c 05 cc 0d 39 26 16 85  |A$.;F%.9....9&..|
00009690  31 2c 41 24 2b 22 20 6e  6f 74 20 66 6f 75 6e 64  |1,A$+" not found|
000096a0  22 0d 39 30 05 cd 0d 39  3a 05 e1 0d 39 44 04 0d  |".90...9:...9D..|
000096b0  39 4e 0c dd a4 69 63 28  41 24 29 0d 39 58 3a c8  |9N...ic(A$).9X:.|
000096c0  99 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 26  |."OS_SpriteOp",&|
000096d0  31 30 30 2b 34 30 2c 73  70 72 69 74 65 73 25 2c  |100+40,sprites%,|
000096e0  41 24 b8 2c 2c 2c 77 25  2c 68 25 3a 21 69 62 61  |A$.,,,w%,h%:!iba|
000096f0  72 25 3d 2d 31 0d 39 62  41 69 62 61 72 25 21 34  |r%=-1.9bAibar%!4|
00009700  3d 30 3a 69 62 61 72 25  21 38 3d 30 3a 69 62 61  |=0:ibar%!8=0:iba|
00009710  72 25 21 31 32 3d 77 25  2a 32 3a 69 62 61 72 25  |r%!12=w%*2:ibar%|
00009720  21 31 36 3d 31 30 30 3a  69 62 61 72 25 21 32 30  |!16=100:ibar%!20|
00009730  3d 26 33 31 30 32 0d 39  6c 31 de 69 62 61 72 6e  |=&3102.9l1.ibarn|
00009740  61 6d 65 25 31 32 3a 24  69 62 61 72 6e 61 6d 65  |ame%12:$ibarname|
00009750  25 3d 41 24 3a 69 62 61  72 25 21 32 34 3d 69 62  |%=A$:ibar%!24=ib|
00009760  61 72 6e 61 6d 65 25 0d  39 76 21 69 62 61 72 25  |arname%.9v!ibar%|
00009770  21 32 38 3d 73 70 72 69  74 65 73 25 3a 69 62 61  |!28=sprites%:iba|
00009780  72 25 21 33 32 3d 31 31  0d 39 80 24 c8 99 20 22  |r%!32=11.9.$.. "|
00009790  57 69 6d 70 5f 43 72 65  61 74 65 49 63 6f 6e 22  |Wimp_CreateIcon"|
000097a0  2c 30 2c 69 62 61 72 25  b8 69 63 25 0d 39 8a 08  |,0,ibar%.ic%.9..|
000097b0  3d 69 63 25 0d 39 94 04  0d 39 9e 14 dd f2 63 68  |=ic%.9...9....ch|
000097c0  61 6e 67 65 69 63 28 6e  65 77 24 29 0d 39 a8 0a  |angeic(new$).9..|
000097d0  ea 77 25 2c 46 25 0d 39  b2 12 e7 6e 65 77 24 3c  |.w%,F%.9...new$<|
000097e0  3e 62 61 72 69 63 24 8c  0d 39 bc 34 20 20 c8 99  |>baric$..9.4  ..|
000097f0  20 22 58 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  | "XOS_SpriteOp",|
00009800  26 31 31 38 2c 73 70 72  69 74 65 73 25 2c 6e 65  |&118,sprites%,ne|
00009810  77 24 b8 2c 2c 73 72 63  25 3b 46 25 0d 39 c6 10  |w$.,,src%;F%.9..|
00009820  20 20 e7 28 46 25 80 31  29 3d 30 8c 0d 39 d0 3b  |  .(F%.1)=0..9.;|
00009830  20 20 20 20 24 69 62 61  72 6e 61 6d 65 25 3d 6e  |    $ibarname%=n|
00009840  65 77 24 3a 21 71 25 3d  2d 31 3a 71 25 21 34 3d  |ew$:!q%=-1:q%!4=|
00009850  62 61 72 69 63 6f 6e 25  3a 71 25 21 38 3d 30 3a  |baricon%:q%!8=0:|
00009860  71 25 21 31 32 3d 30 0d  39 da 21 20 20 20 20 c8  |q%!12=0.9.!    .|
00009870  99 22 57 69 6d 70 5f 53  65 74 49 63 6f 6e 53 74  |."Wimp_SetIconSt|
00009880  61 74 65 22 2c 2c 71 25  0d 39 e4 07 20 20 cd 0d  |ate",,q%.9..  ..|
00009890  39 ee 11 20 20 62 61 72  69 63 24 3d 6e 65 77 24  |9..  baric$=new$|
000098a0  0d 39 f8 05 cd 0d 3a 02  05 e1 0d 3a 0c 04 0d 3a  |.9....:....:...:|
000098b0  16 11 dd f2 70 6f 6c 6c  28 69 64 6c 65 25 29 0d  |....poll(idle%).|
000098c0  3a 20 43 ea 70 6f 6c 5f  72 65 74 25 3a f4 20 69  |: C.pol_ret%:. i|
000098d0  64 6c 65 25 3e 30 20 69  73 20 70 6f 6c 6c 69 64  |dle%>0 is pollid|
000098e0  6c 65 20 74 69 6d 65 2c  20 3c 30 20 69 73 20 74  |le time, <0 is t|
000098f0  69 6d 65 20 62 65 74 77  65 65 6e 20 70 6f 6c 6c  |ime between poll|
00009900  73 2e 0d 3a 2a 17 f2 73  65 74 74 69 6d 65 3a e7  |s..:*..settime:.|
00009910  6e 6f 70 6f 6c 6c 25 8c  e1 0d 3a 34 24 e7 69 64  |nopoll%...:4$.id|
00009920  6c 65 25 3e 3d 30 84 6c  61 73 74 70 6f 6c 6c 25  |le%>=0.lastpoll%|
00009930  2d 74 69 6d 65 25 3c 69  64 6c 65 25 8c 0d 3a 3e  |-time%<idle%..:>|
00009940  15 20 20 6c 61 73 74 70  6f 6c 6c 25 3d 74 69 6d  |.  lastpoll%=tim|
00009950  65 25 0d 3a 48 07 20 20  f5 0d 3a 52 38 20 20 20  |e%.:H.  ..:R8   |
00009960  20 c8 99 20 22 57 69 6d  70 5f 50 6f 6c 6c 49 64  | .. "Wimp_PollId|
00009970  6c 65 22 2c 36 31 39 34  2c 71 25 2c 74 69 6d 65  |le",6194,q%,time|
00009980  25 2b 69 64 6c 65 25 20  b8 70 6f 6c 5f 72 65 74  |%+idle% .pol_ret|
00009990  25 0d 3a 5c 15 20 20 20  20 c8 8e 20 70 6f 6c 5f  |%.:\.    .. pol_|
000099a0  72 65 74 25 20 ca 0d 3a  66 20 20 20 20 20 c9 20  |ret% ..:f     . |
000099b0  30 3a e7 73 74 61 72 74  75 70 6f 6b 25 3c 3e 30  |0:.startupok%<>0|
000099c0  8c f2 63 72 6f 6e 0d 3a  70 45 20 20 20 20 c9 20  |..cron.:pE    . |
000099d0  32 3a f2 6f 70 65 6e 5f  77 69 6e 64 6f 77 28 21  |2:.open_window(!|
000099e0  71 25 2c 71 25 21 34 2c  71 25 21 38 2c 71 25 21  |q%,q%!4,q%!8,q%!|
000099f0  31 32 2c 71 25 21 31 36  2c 71 25 21 32 30 2c 71  |12,q%!16,q%!20,q|
00009a00  25 21 32 34 2c 71 25 21  32 38 29 0d 3a 7a 18 20  |%!24,q%!28).:z. |
00009a10  20 20 20 c9 20 33 3a f2  63 6c 6f 73 65 77 28 21  |   . 3:.closew(!|
00009a20  71 25 29 0d 3a 84 24 20  20 20 20 c9 20 36 3a f2  |q%).:.$    . 6:.|
00009a30  63 6c 69 63 6b 28 71 25  21 38 2c 71 25 21 31 32  |click(q%!8,q%!12|
00009a40  2c 71 25 21 31 36 29 0d  3a 8e 11 20 20 20 20 c9  |,q%!16).:..    .|
00009a50  20 37 3a f2 64 72 61 67  0d 3a 98 20 20 20 20 20  | 7:.drag.:.     |
00009a60  c9 20 38 3a f2 6b 65 79  70 72 65 73 73 28 21 71  |. 8:.keypress(!q|
00009a70  25 2c 71 25 21 32 34 29  0d 3a a2 27 20 20 20 20  |%,q%!24).:.'    |
00009a80  c9 20 39 3a f2 67 65 74  70 6f 69 6e 74 65 72 3a  |. 9:.getpointer:|
00009a90  f2 6d 65 6e 75 73 65 6c  65 63 74 28 71 25 29 0d  |.menuselect(q%).|
00009aa0  3a ac 1c 20 20 20 20 c9  20 31 37 2c 31 38 3a f2  |:..    . 17,18:.|
00009ab0  72 65 63 65 69 76 65 28  71 25 29 0d 3a b6 09 20  |receive(q%).:.. |
00009ac0  20 20 20 cb 0d 3a c0 11  20 20 fd 70 6f 6c 5f 72  |   ..:..  .pol_r|
00009ad0  65 74 25 3d 30 0d 3a ca  05 cd 0d 3a d4 05 e1 0d  |et%=0.:....:....|
00009ae0  3a de 04 0d 3a e8 0d dd  f2 73 65 74 74 69 6d 65  |:...:....settime|
00009af0  0d 3a f2 22 c8 99 22 4f  53 5f 52 65 61 64 4d 6f  |.:.".."OS_ReadMo|
00009b00  6e 6f 74 6f 6e 69 63 54  69 6d 65 22 b8 74 69 6d  |notonicTime".tim|
00009b10  65 25 0d 3a fc 05 e1 0d  3b 06 04 0d 3b 10 0d dd  |e%.:....;...;...|
00009b20  f2 63 72 65 64 69 74 73  0d 3b 1a 27 e7 63 72 65  |.credits.;.'.cre|
00009b30  64 69 74 24 3d 22 22 8c  63 72 65 64 69 74 24 3d  |dit$="".credit$=|
00009b40  a4 6d 73 67 30 28 22 43  72 65 64 69 74 22 29 0d  |.msg0("Credit").|
00009b50  3b 24 38 f2 75 70 64 61  74 65 69 63 6f 6e 73 74  |;$8.updateiconst|
00009b60  72 69 6e 67 28 69 6e 66  6f 25 2c 39 2c c0 a4 67  |ring(info%,9,..g|
00009b70  65 74 70 61 72 28 63 72  65 64 69 74 24 2c 22 3b  |etpar(credit$,";|
00009b80  22 29 2c 32 38 29 29 0d  3b 2e 05 e1 0d 3b 38 04  |"),28)).;....;8.|
00009b90  0d 3b 42 0a dd f2 64 72  61 67 0d 3b 4c 0f f2 67  |.;B...drag.;L..g|
00009ba0  65 74 70 6f 69 6e 74 65  72 0d 3b 56 4a 21 71 25  |etpointer.;VJ!q%|
00009bb0  3d 35 32 2b 38 3a 71 25  21 31 32 3d 30 3a 71 25  |=52+8:q%!12=0:q%|
00009bc0  21 31 36 3d 31 3a 71 25  21 32 30 3d 68 61 6e 64  |!16=1:q%!20=hand|
00009bd0  6c 65 25 3a 71 25 21 32  34 3d 69 63 6f 6e 25 3a  |le%:q%!24=icon%:|
00009be0  71 25 21 32 38 3d 6d 78  25 3a 71 25 21 33 32 3d  |q%!28=mx%:q%!32=|
00009bf0  6d 79 25 0d 3b 60 2e 71  25 21 33 36 3d 30 3a 71  |my%.;`.q%!36=0:q|
00009c00  25 21 34 30 3d 26 31 30  30 30 3a 24 28 71 25 2b  |%!40=&1000:$(q%+|
00009c10  34 34 29 3d 22 21 4e 65  77 73 44 69 72 22 2b bd  |44)="!NewsDir"+.|
00009c20  30 0d 3b 6a 3a c8 99 22  57 69 6d 70 5f 53 65 6e  |0.;j:.."Wimp_Sen|
00009c30  64 4d 65 73 73 61 67 65  22 2c 31 37 2c 71 25 2c  |dMessage",17,q%,|
00009c40  68 61 6e 64 6c 65 25 2c  69 63 6f 6e 25 3a 64 72  |handle%,icon%:dr|
00009c50  61 67 72 65 66 25 3d 71  25 21 38 0d 3b 74 05 e1  |agref%=q%!8.;t..|
00009c60  0d 3b 7e 04 0d 3b 88 19  dd f2 70 6f 6c 6c 6f 66  |.;~..;....pollof|
00009c70  66 3a 6e 6f 70 6f 6c 6c  25 3d b9 3a e1 0d 3b 92  |f:nopoll%=.:..;.|
00009c80  18 dd f2 70 6f 6c 6c 6f  6e 3a 6e 6f 70 6f 6c 6c  |...pollon:nopoll|
00009c90  25 3d 30 3a e1 0d 3b 9c  04 0d 3b a6 15 dd f2 6b  |%=0:..;...;....k|
00009ca0  65 79 70 72 65 73 73 28  68 25 2c 6b 25 29 0d 3b  |eypress(h%,k%).;|
00009cb0  b0 07 ea 63 25 0d 3b ba  0b e7 6b 25 3d 31 33 8c  |...c%.;...k%=13.|
00009cc0  0d 3b c4 09 c8 8e 68 25  ca 0d 3b ce 22 20 20 c9  |.;....h%..;."  .|
00009cd0  67 73 65 74 75 70 25 2c  73 69 74 65 77 69 6e 25  |gsetup%,sitewin%|
00009ce0  2c 67 77 69 6e 25 3a 63  25 3d b9 0d 3b d8 29 20  |,gwin%:c%=..;.) |
00009cf0  20 c9 66 77 69 6e 25 3a  f2 73 65 74 66 69 6c 74  | .fwin%:.setfilt|
00009d00  28 63 66 69 6c 74 25 29  3a f2 63 6c 6f 73 65 77  |(cfilt%):.closew|
00009d10  28 68 25 29 0d 3b e2 2c  20 20 c9 75 77 69 6e 25  |(h%).;.,  .uwin%|
00009d20  3a f2 67 65 74 75 73 65  72 69 6e 66 6f 3a f2 73  |:.getuserinfo:.s|
00009d30  61 76 65 75 73 65 72 69  6e 66 6f 3a 63 25 3d b9  |aveuserinfo:c%=.|
00009d40  0d 3b ec 1e 20 20 7f 3a  c8 99 22 57 69 6d 70 5f  |.;..  .:.."Wimp_|
00009d50  50 72 6f 63 65 73 73 4b  65 79 22 2c 6b 25 0d 3b  |ProcessKey",k%.;|
00009d60  f6 05 cb 0d 3c 00 1f e7  63 25 8c f2 73 61 76 65  |....<...c%..save|
00009d70  63 6f 6e 66 69 67 3a f2  63 6c 6f 73 65 77 28 68  |config:.closew(h|
00009d80  25 29 0d 3c 0a 05 cc 0d  3c 14 1a c8 99 22 57 69  |%).<....<...."Wi|
00009d90  6d 70 5f 50 72 6f 63 65  73 73 4b 65 79 22 2c 6b  |mp_ProcessKey",k|
00009da0  25 0d 3c 1e 05 cd 0d 3c  28 05 e1 0d 3c 32 04 0d  |%.<....<(...<2..|
00009db0  3c 3c 10 dd a4 62 75 73  79 6f 6e 28 64 24 29 0d  |<<...busyon(d$).|
00009dc0  3c 46 22 f4 20 72 65 74  75 72 6e 73 20 54 52 55  |<F". returns TRU|
00009dd0  45 20 69 66 20 61 6c 72  65 61 64 79 20 62 75 73  |E if already bus|
00009de0  79 0d 3c 50 2b e7 62 75  73 79 24 3c 3e 22 22 8c  |y.<P+.busy$<>"".|
00009df0  f2 6d 65 73 73 61 67 65  31 28 22 42 75 73 79 22  |.message1("Busy"|
00009e00  2c 62 75 73 79 24 2c 30  29 3a 3d b9 0d 3c 5a 16  |,busy$,0):=..<Z.|
00009e10  62 75 73 79 24 3d a4 6d  73 67 30 28 64 24 29 3a  |busy$=.msg0(d$):|
00009e20  3d a3 0d 3c 64 04 0d 3c  6e 0d dd f2 62 75 73 79  |=..<d..<n...busy|
00009e30  6f 66 66 0d 3c 78 0c 62  75 73 79 24 3d 22 22 0d  |off.<x.busy$="".|
00009e40  3c 82 05 e1 0d 3c 8c 04  0d 3c 96 0c dd f2 66 69  |<....<...<....fi|
00009e50  6e 69 73 68 0d 3c a0 0b  f2 74 69 64 79 75 70 0d  |nish.<...tidyup.|
00009e60  3c aa 07 ee 85 87 0d 3c  b4 18 e7 6c 6f 67 66 69  |<......<...logfi|
00009e70  6c 65 25 3c 3e 30 f2 6c  6f 67 28 22 22 29 0d 3c  |le%<>0.log("").<|
00009e80  be 13 e7 73 74 61 72 74  75 70 6f 6b 25 3c 3e 30  |...startupok%<>0|
00009e90  8c 0d 3c c8 20 20 20 e7  69 6e 64 65 62 61 74 63  |..<.   .indebatc|
00009ea0  68 25 8c f2 77 72 69 74  65 5f 72 65 63 66 69 6c  |h%..write_recfil|
00009eb0  65 0d 3c d2 1c 20 20 e7  67 72 6f 75 70 73 25 3e  |e.<..  .groups%>|
00009ec0  30 f2 73 61 76 65 67 72  70 64 61 74 61 0d 3c dc  |0.savegrpdata.<.|
00009ed0  12 20 20 f2 73 61 76 65  66 69 6c 74 65 72 73 0d  |.  .savefilters.|
00009ee0  3c e6 05 cd 0d 3c f0 12  f2 75 6e 6c 6f 63 6b 6e  |<....<...unlockn|
00009ef0  65 77 73 64 69 72 0d 3c  fa 1e f2 6e 62 72 65 70  |ewsdir.<...nbrep|
00009f00  6c 79 28 30 2c 30 2c 31  30 2c 30 2c 30 2c 22 22  |ly(0,0,10,0,0,""|
00009f10  2c 22 22 29 0d 3d 04 10  f2 65 6e 64 6d 73 67 74  |,"").=...endmsgt|
00009f20  72 61 6e 73 0d 3d 0e 30  f2 72 65 6c 65 61 73 65  |rans.=.0.release|
00009f30  28 6d 65 6e 75 64 61 74  61 72 65 66 25 29 3a f2  |(menudataref%):.|
00009f40  72 65 6c 65 61 73 65 28  69 6e 64 6d 65 6e 75 72  |release(indmenur|
00009f50  65 66 25 29 0d 3d 18 11  f2 74 69 64 79 64 79 6e  |ef%).=...tidydyn|
00009f60  61 72 65 61 73 0d 3d 22  18 c8 99 22 57 69 6d 70  |areas.="..."Wimp|
00009f70  5f 43 6c 6f 73 65 44 6f  77 6e 22 3a e0 0d 3d 2c  |_CloseDown":..=,|
00009f80  05 e1 0d 3d 36 04 0d 3d  40 0c dd f2 74 69 64 79  |...=6..=@...tidy|
00009f90  75 70 0d 3d 4a 0d f2 63  66 28 66 30 30 25 29 0d  |up.=J..cf(f00%).|
00009fa0  3d 54 0c f2 63 66 28 66  30 25 29 0d 3d 5e 0c f2  |=T..cf(f0%).=^..|
00009fb0  63 66 28 66 31 25 29 0d  3d 68 0c f2 63 66 28 66  |cf(f1%).=h..cf(f|
00009fc0  32 25 29 0d 3d 72 0c f2  63 66 28 66 33 25 29 0d  |2%).=r..cf(f3%).|
00009fd0  3d 7c 0c f2 63 66 28 66  34 25 29 0d 3d 86 0c f2  |=|..cf(f4%).=...|
00009fe0  63 66 28 66 35 25 29 0d  3d 90 0c f2 63 66 28 66  |cf(f5%).=...cf(f|
00009ff0  36 25 29 0d 3d 9a 05 e1  0d 3d a4 04 0d 3d ae 15  |6%).=....=...=..|
0000a000  dd f2 63 6c 69 63 6b 28  62 25 2c 77 25 2c 69 25  |..click(b%,w%,i%|
0000a010  29 0d 3d b8 10 ea 67 24  2c 75 24 2c 73 25 2c 6c  |).=...g$,u$,s%,l|
0000a020  25 0d 3d c2 0a c8 8e 77  25 20 ca 0d 3d cc 08 c9  |%.=....w% ..=...|
0000a030  2d 32 3a 0d 3d d6 26 20  20 e7 62 25 3d 34 80 69  |-2:.=.&  .b%=4.i|
0000a040  25 3d 62 61 72 69 63 6f  6e 25 f2 66 72 6f 6e 74  |%=baricon%.front|
0000a050  28 73 74 61 74 75 73 25  29 0d 3d e0 38 20 20 e7  |(status%).=.8  .|
0000a060  62 25 3d 31 80 69 25 3d  62 61 72 69 63 6f 6e 25  |b%=1.i%=baricon%|
0000a070  80 73 74 61 72 74 75 70  6f 6b 25 3d 31 80 72 77  |.startupok%=1.rw|
0000a080  25 8c f2 66 72 6f 6e 74  28 6d 73 65 74 75 70 25  |%..front(msetup%|
0000a090  29 0d 3d ea 18 20 20 e7  62 25 3d 32 80 69 25 3d  |).=..  .b%=2.i%=|
0000a0a0  62 61 72 69 63 6f 6e 25  8c 0d 3d f4 2d 20 20 20  |baricon%..=.-   |
0000a0b0  20 c8 99 22 4f 53 5f 42  79 74 65 22 2c 31 32 31  | .."OS_Byte",121|
0000a0c0  2c 28 32 82 26 38 30 29  b8 2c 41 25 3a e7 41 25  |,(2.&80).,A%:.A%|
0000a0d0  3d 26 46 46 20 8c 0d 3d  fe 1f 20 20 20 20 67 24  |=&FF ..=..    g$|
0000a0e0  3d 22 44 65 62 75 67 20  6f 6e 2c 44 65 62 75 67  |="Debug on,Debug|
0000a0f0  20 6f 66 66 22 0d 3e 08  09 20 20 20 20 cc 0d 3e  | off".>..    ..>|
0000a100  12 23 20 20 20 20 67 24  3d 22 7c 3e 49 6e 66 6f  |.#    g$="|>Info|
0000a110  2c 22 3a e7 72 77 25 3d  30 8c 67 24 2b 3d 22 3c  |,":.rw%=0.g$+="<|
0000a120  22 0d 3e 1c 40 20 20 20  20 67 24 2b 3d 22 53 65  |".>.@    g$+="Se|
0000a130  74 75 70 2e 2e 2e 2c 51  75 65 75 65 73 2e 2e 2e  |tup...,Queues...|
0000a140  2c 22 3a e7 61 75 74 6f  64 65 62 61 74 63 68 25  |,":.autodebatch%|
0000a150  3c 3e 30 84 72 77 25 3d  30 8c 67 24 2b 3d 22 3c  |<>0.rw%=0.g$+="<|
0000a160  22 0d 3e 26 32 20 20 20  20 67 24 2b 3d 22 44 65  |".>&2    g$+="De|
0000a170  62 61 74 63 68 2c 7c 22  3a e7 61 75 74 6f 65 78  |batch,|":.autoex|
0000a180  70 25 3c 3e 30 84 72 77  25 3d 30 8c 67 24 2b 3d  |p%<>0.rw%=0.g$+=|
0000a190  22 3c 22 0d 3e 30 19 20  20 20 20 67 24 2b 3d 22  |"<".>0.    g$+="|
0000a1a0  45 78 70 69 72 65 2c 51  75 69 74 22 0d 3e 3a 09  |Expire,Quit".>:.|
0000a1b0  20 20 20 20 cd 0d 3e 44  2d 20 20 20 20 f2 64 6f  |    ..>D-    .do|
0000a1c0  6d 65 6e 75 28 31 30 31  2c 67 24 2c 6d 79 6e 61  |menu(101,g$,myna|
0000a1d0  6d 65 24 2c 31 29 3a 69  6e 66 6f 6f 70 65 6e 25  |me$,1):infoopen%|
0000a1e0  3d b9 0d 3e 4e 07 20 20  cd 0d 3e 58 0d c9 73 74  |=..>N.  ..>X..st|
0000a1f0  61 74 75 73 25 3a 0d 3e  62 0c 20 20 e7 62 25 3d  |atus%:.>b.  .b%=|
0000a200  32 8c 0d 3e 6c 0f 20 20  c8 8e 70 61 75 73 65 25  |2..>l.  ..pause%|
0000a210  ca 0d 3e 76 37 20 20 20  20 c9 30 3a f2 64 6f 6d  |..>v7    .0:.dom|
0000a220  65 6e 75 28 31 30 36 2c  22 7c 3e 49 6e 66 6f 2c  |enu(106,"|>Info,|
0000a230  50 61 75 73 65 2c 43 61  6e 63 65 6c 22 2c 6d 79  |Pause,Cancel",my|
0000a240  6e 61 6d 65 24 2c 30 29  0d 3e 80 37 20 20 20 20  |name$,0).>.7    |
0000a250  7f 3a f2 64 6f 6d 65 6e  75 28 31 30 36 2c 22 7c  |.:.domenu(106,"||
0000a260  3e 49 6e 66 6f 2c 52 65  73 75 6d 65 2c 43 61 6e  |>Info,Resume,Can|
0000a270  63 65 6c 22 2c 6d 79 6e  61 6d 65 24 2c 30 29 0d  |cel",myname$,0).|
0000a280  3e 8a 07 20 20 cb 0d 3e  94 11 20 20 69 6e 66 6f  |>..  ..>..  info|
0000a290  6f 70 65 6e 25 3d b9 0d  3e 9e 07 20 20 cd 0d 3e  |open%=..>..  ..>|
0000a2a0  a8 1f c9 75 77 69 6e 25  3a 75 24 3d a4 69 63 5f  |...uwin%:u$=.ic_|
0000a2b0  73 74 72 28 75 77 69 6e  25 2c 32 30 29 0d 3e b2  |str(uwin%,20).>.|
0000a2c0  13 20 20 e7 28 62 25 3d  31 84 62 25 3d 34 29 8c  |.  .(b%=1.b%=4).|
0000a2d0  0d 3e bc 0d 20 20 20 20  c8 8e 69 25 ca 0d 3e c6  |.>..    ..i%..>.|
0000a2e0  13 20 20 20 20 20 20 c9  31 3a f2 75 6d 65 6e 75  |.      .1:.umenu|
0000a2f0  0d 3e d0 2d 20 20 20 20  20 20 c9 36 3a f2 73 65  |.>.-      .6:.se|
0000a300  74 75 77 69 6e 28 75 24  29 3a e7 62 25 3d 34 f2  |tuwin(u$):.b%=4.|
0000a310  63 6c 6f 73 65 77 28 75  77 69 6e 25 29 0d 3e da  |closew(uwin%).>.|
0000a320  47 20 20 20 20 20 20 c9  37 3a f2 67 65 74 75 73  |G      .7:.getus|
0000a330  65 72 69 6e 66 6f 3a f2  73 61 76 65 75 73 65 72  |erinfo:.saveuser|
0000a340  69 6e 66 6f 3a f2 73 61  76 65 63 6f 6e 66 69 67  |info:.saveconfig|
0000a350  3a e7 62 25 3d 34 f2 63  6c 6f 73 65 77 28 75 77  |:.b%=4.closew(uw|
0000a360  69 6e 25 29 0d 3e e4 4a  20 20 20 20 20 20 c9 31  |in%).>.J      .1|
0000a370  30 3a 73 25 3d 28 a4 72  64 69 6e 76 28 77 25 2c  |0:s%=(.rdinv(w%,|
0000a380  69 25 29 3d 30 29 3a f2  73 65 74 73 68 61 64 65  |i%)=0):.setshade|
0000a390  64 28 77 25 2c 33 2c 73  25 29 3a f2 73 65 74 73  |d(w%,3,s%):.sets|
0000a3a0  68 61 64 65 64 28 77 25  2c 34 2c 73 25 29 0d 3e  |haded(w%,4,s%).>|
0000a3b0  ee 15 20 20 20 20 20 20  c9 31 35 3a f2 75 67 6d  |..      .15:.ugm|
0000a3c0  65 6e 75 0d 3e f8 27 20  20 20 20 20 20 c9 31 36  |enu.>.'      .16|
0000a3d0  2c 31 37 3a f2 6d 65 73  73 61 67 65 31 28 22 48  |,17:.message1("H|
0000a3e0  76 61 63 22 2c 75 24 2c  30 29 0d 3f 02 1a 20 20  |vac",u$,0).?..  |
0000a3f0  20 20 20 20 c9 31 38 3a  f2 65 64 69 74 76 61 63  |    .18:.editvac|
0000a400  28 75 24 29 0d 3f 0c 1a  20 20 20 20 20 20 c9 31  |(u$).?..      .1|
0000a410  39 3a f2 63 61 6e 63 76  61 63 28 75 24 29 0d 3f  |9:.cancvac(u$).?|
0000a420  16 09 20 20 20 20 cb 0d  3f 20 07 20 20 cc 0d 3f  |..    ..? .  ..?|
0000a430  2a 11 20 20 e7 69 25 3d  30 f2 75 6d 65 6e 75 0d  |*.  .i%=0.umenu.|
0000a440  3f 34 12 20 20 e7 69 25  3d 32 f2 75 67 6d 65 6e  |?4.  .i%=2.ugmen|
0000a450  75 0d 3f 3e 07 20 20 cd  0d 3f 48 0b c9 67 77 69  |u.?>.  ..?H..gwi|
0000a460  6e 25 3a 0d 3f 52 13 20  20 e7 28 62 25 3d 31 84  |n%:.?R.  .(b%=1.|
0000a470  62 25 3d 34 29 8c 0d 3f  5c 1c 20 20 20 20 67 24  |b%=4)..?\.    g$|
0000a480  3d a4 69 63 5f 73 74 72  28 67 77 69 6e 25 2c 32  |=.ic_str(gwin%,2|
0000a490  35 29 0d 3f 66 0d 20 20  20 20 c8 8e 69 25 ca 0d  |5).?f.    ..i%..|
0000a4a0  3f 70 22 20 20 20 20 c9  35 3a e7 62 25 3d 34 f2  |?p"    .5:.b%=4.|
0000a4b0  67 77 69 6e 28 2d 31 29  8b f2 67 77 69 6e 28 31  |gwin(-1)..gwin(1|
0000a4c0  29 0d 3f 7a 22 20 20 20  20 c9 36 3a e7 62 25 3d  |).?z"    .6:.b%=|
0000a4d0  34 f2 67 77 69 6e 28 31  29 8b f2 67 77 69 6e 28  |4.gwin(1)..gwin(|
0000a4e0  2d 31 29 0d 3f 84 10 20  20 20 20 c9 37 3a 72 24  |-1).?..    .7:r$|
0000a4f0  3d 22 22 0d 3f 8e 34 20  20 20 20 20 20 e7 a4 61  |="".?.4      ..a|
0000a500  64 64 67 72 70 28 67 24  2c 72 24 29 3c 3e 30 8c  |ddgrp(g$,r$)<>0.|
0000a510  f2 67 77 69 6e 28 30 29  8b f2 6d 65 73 73 61 67  |.gwin(0)..messag|
0000a520  65 28 72 24 2c 30 29 0d  3f 98 29 20 20 20 20 c9  |e(r$,0).?.)    .|
0000a530  38 3a e7 a4 63 6f 6e 66  69 72 6d 28 a4 6d 73 67  |8:..confirm(.msg|
0000a540  31 28 22 43 72 65 6d 22  2c 67 24 29 29 3d 31 8c  |1("Crem",g$))=1.|
0000a550  0d 3f a2 0f 20 20 20 20  20 20 72 24 3d 22 22 0d  |.?..      r$="".|
0000a560  3f ac 33 20 20 20 20 20  20 e7 a4 64 65 6c 67 72  |?.3      ..delgr|
0000a570  70 28 67 24 2c 72 24 29  3d 30 8c f2 6d 65 73 73  |p(g$,r$)=0..mess|
0000a580  61 67 65 28 72 24 2c 30  29 8b f2 67 77 69 6e 28  |age(r$,0)..gwin(|
0000a590  30 29 0d 3f b6 0b 20 20  20 20 20 20 cd 0d 3f c0  |0).?..      ..?.|
0000a5a0  3d 20 20 20 20 c9 31 37  3a e7 a4 63 6f 6e 66 69  |=    .17:..confi|
0000a5b0  72 6d 28 a4 6d 73 67 31  28 22 43 64 65 6c 22 2c  |rm(.msg1("Cdel",|
0000a5c0  67 24 29 29 3d 31 f2 64  65 6c 67 72 70 28 67 24  |g$))=1.delgrp(g$|
0000a5d0  29 3a f2 67 77 69 6e 28  30 29 0d 3f ca 17 20 20  |):.gwin(0).?..  |
0000a5e0  20 20 c9 39 3a f2 72 65  69 6e 64 65 78 28 67 24  |  .9:.reindex(g$|
0000a5f0  29 0d 3f d4 0c 20 20 20  20 c9 31 38 3a 0d 3f de  |).?..    .18:.?.|
0000a600  34 20 20 20 20 20 20 e7  a4 63 6f 6e 66 69 72 6d  |4      ..confirm|
0000a610  28 a4 6d 73 67 30 28 22  43 73 63 61 6e 22 29 29  |(.msg0("Cscan"))|
0000a620  3d 31 8c f2 66 69 6e 64  61 6c 6c 67 72 6f 75 70  |=1..findallgroup|
0000a630  73 0d 3f e8 1b 20 20 20  20 c9 31 31 3a f2 65 78  |s.?..    .11:.ex|
0000a640  70 67 72 6f 75 70 28 67  24 2c 30 29 0d 3f f2 12  |pgroup(g$,0).?..|
0000a650  20 20 20 20 c9 31 32 3a  e7 62 25 3d 31 8c 0d 3f  |    .12:.b%=1..?|
0000a660  fc 22 20 20 20 20 20 20  6c 69 73 74 74 79 70 65  |."      listtype|
0000a670  25 3d 94 28 6c 69 73 74  74 79 70 65 25 3d 30 29  |%=.(listtype%=0)|
0000a680  0d 40 06 2c 20 20 20 20  20 20 e7 6c 69 73 74 74  |.@.,      .listt|
0000a690  79 70 65 25 3d 30 8c 67  24 3d 22 43 4c 69 73 74  |ype%=0.g$="CList|
0000a6a0  22 8b 67 24 3d 22 41 4c  69 73 74 22 0d 40 10 35  |".g$="AList".@.5|
0000a6b0  20 20 20 20 20 20 f2 75  70 64 61 74 65 69 63 6f  |      .updateico|
0000a6c0  6e 73 74 72 69 6e 67 28  77 25 2c 69 25 2c a4 6d  |nstring(w%,i%,.m|
0000a6d0  73 67 30 28 67 24 29 29  3a f2 67 77 69 6e 28 30  |sg0(g$)):.gwin(0|
0000a6e0  29 0d 40 1a 0b 20 20 20  20 20 20 cd 0d 40 24 17  |).@..      ..@$.|
0000a6f0  20 20 20 20 c9 31 34 3a  f2 6e 75 6d 6d 65 6e 75  |    .14:.nummenu|
0000a700  28 30 29 0d 40 2e 17 20  20 20 20 c9 31 35 3a f2  |(0).@..    .15:.|
0000a710  6e 75 6d 6d 65 6e 75 28  31 29 0d 40 38 17 20 20  |nummenu(1).@8.  |
0000a720  20 20 c9 32 34 3a f2 6e  75 6d 6d 65 6e 75 28 32  |  .24:.nummenu(2|
0000a730  29 0d 40 42 19 20 20 20  20 c9 31 39 3a f2 67 72  |).@B.    .19:.gr|
0000a740  70 6d 65 6e 75 28 31 31  30 29 0d 40 4c 1c 20 20  |pmenu(110).@L.  |
0000a750  20 20 c9 32 36 3a e7 6e  67 6f 70 65 6e 25 3d 30  |  .26:.ngopen%=0|
0000a760  f2 6e 67 77 69 6e 0d 40  56 2a 20 20 20 20 c9 31  |.ngwin.@V*    .1|
0000a770  36 3a f2 64 6f 61 6c 74  65 72 67 72 70 28 67 24  |6:.doaltergrp(g$|
0000a780  2c 94 a4 72 64 69 6e 76  28 77 25 2c 31 36 29 29  |,..rdinv(w%,16))|
0000a790  0d 40 60 1f 20 20 20 20  c9 31 30 3a e7 a4 62 75  |.@`.    .10:..bu|
0000a7a0  73 79 6f 6e 28 22 42 6d  6f 64 22 29 3d 30 8c 0d  |syon("Bmod")=0..|
0000a7b0  40 6a 3e 20 20 20 20 20  20 f2 68 67 6f 6e 3a 73  |@j>      .hgon:s|
0000a7c0  25 3d 28 a4 63 68 65 63  6b 6d 6f 64 65 72 61 74  |%=(.checkmoderat|
0000a7d0  69 6f 6e 28 67 24 2c 31  29 3e 22 22 29 3a f2 62  |ion(g$,1)>""):.b|
0000a7e0  75 73 79 6f 66 66 3a f2  68 67 6f 66 66 0d 40 74  |usyoff:.hgoff.@t|
0000a7f0  40 20 20 20 20 20 20 f2  73 65 74 69 6e 76 28 77  |@      .setinv(w|
0000a800  25 2c 31 36 2c 73 25 29  3a f2 61 6c 74 65 72 67  |%,16,s%):.alterg|
0000a810  72 70 28 67 24 29 3a e7  73 25 8c 75 24 3d 22 4d  |rp(g$):.s%.u$="M|
0000a820  79 65 73 22 8b 75 24 3d  22 4d 6e 6f 22 0d 40 7e  |yes".u$="Mno".@~|
0000a830  1c 20 20 20 20 20 20 f2  6d 65 73 73 61 67 65 31  |.      .message1|
0000a840  28 75 24 2c 67 24 2c 30  29 0d 40 88 0b 20 20 20  |(u$,g$,0).@..   |
0000a850  20 20 20 cd 0d 40 92 4a  20 20 20 20 c9 32 39 3a  |   ..@.J    .29:|
0000a860  73 25 3d 28 a4 72 64 69  6e 76 28 77 25 2c 69 25  |s%=(.rdinv(w%,i%|
0000a870  29 3d 30 29 3a f2 73 65  74 73 68 61 64 65 64 28  |)=0):.setshaded(|
0000a880  77 25 2c 33 30 2c 73 25  29 3a f2 73 65 74 73 68  |w%,30,s%):.setsh|
0000a890  61 64 65 64 28 77 25 2c  33 31 2c 73 25 29 0d 40  |aded(w%,31,s%).@|
0000a8a0  9c 3f 20 20 20 20 e3 6c  25 3d 33 35 b8 34 31 3a  |.?    .l%=35.41:|
0000a8b0  f2 73 65 74 73 68 61 64  65 64 28 67 77 69 6e 25  |.setshaded(gwin%|
0000a8c0  2c 6c 25 2c 73 25 29 3a  ed 6c 25 3a f4 20 65 78  |,l%,s%):.l%:. ex|
0000a8d0  70 69 72 79 20 73 63 68  65 64 75 6c 65 0d 40 a6  |piry schedule.@.|
0000a8e0  23 20 20 20 20 c9 33 31  3a f2 6d 65 73 73 61 67  |#    .31:.messag|
0000a8f0  65 30 28 22 43 65 78 70  6d 61 69 6c 22 2c 30 29  |e0("Cexpmail",0)|
0000a900  0d 40 b0 28 20 20 20 20  c9 33 32 3a f2 73 61 76  |.@.(    .32:.sav|
0000a910  65 63 6f 6e 66 69 67 3a  e7 62 25 3d 34 f2 63 6c  |econfig:.b%=4.cl|
0000a920  6f 73 65 77 28 77 25 29  0d 40 ba 19 20 20 20 20  |osew(w%).@..    |
0000a930  c9 33 37 3a f2 6d 6f 64  65 78 70 28 2d 31 2c 30  |.37:.modexp(-1,0|
0000a940  29 0d 40 c4 18 20 20 20  20 c9 33 38 3a f2 6d 6f  |).@..    .38:.mo|
0000a950  64 65 78 70 28 31 2c 30  29 0d 40 ce 19 20 20 20  |dexp(1,0).@..   |
0000a960  20 c9 33 39 3a f2 6d 6f  64 65 78 70 28 30 2c 2d  | .39:.modexp(0,-|
0000a970  31 29 0d 40 d8 18 20 20  20 20 c9 34 30 3a f2 6d  |1).@..    .40:.m|
0000a980  6f 64 65 78 70 28 30 2c  31 29 0d 40 e2 09 20 20  |odexp(0,1).@..  |
0000a990  20 20 cb 0d 40 ec 07 20  20 cc 0d 40 f6 0d 20 20  |  ..@..  ..@..  |
0000a9a0  20 20 c8 8e 69 25 ca 0d  41 00 19 20 20 20 20 c9  |  ..i%..A..    .|
0000a9b0  32 35 3a f2 67 72 70 6d  65 6e 75 28 31 31 30 29  |25:.grpmenu(110)|
0000a9c0  0d 41 0a 16 20 20 20 20  c9 31 3a f2 6e 75 6d 6d  |.A..    .1:.numm|
0000a9d0  65 6e 75 28 31 29 0d 41  14 16 20 20 20 20 c9 32  |enu(1).A..    .2|
0000a9e0  3a f2 6e 75 6d 6d 65 6e  75 28 30 29 0d 41 1e 17  |:.nummenu(0).A..|
0000a9f0  20 20 20 20 c9 32 32 3a  f2 6e 75 6d 6d 65 6e 75  |    .22:.nummenu|
0000aa00  28 32 29 0d 41 28 41 20  20 20 20 c9 31 32 3a f2  |(2).A(A    .12:.|
0000aa10  64 6f 6d 65 6e 75 28 31  31 31 2c 22 43 75 72 72  |domenu(111,"Curr|
0000aa20  65 6e 74 20 6c 69 73 74  2c 41 63 74 69 76 65 20  |ent list,Active |
0000aa30  6c 69 73 74 22 2c 22 4c  69 73 74 20 74 79 70 65  |list","List type|
0000aa40  22 2c 30 29 0d 41 32 09  20 20 20 20 cb 0d 41 3c  |",0).A2.    ..A<|
0000aa50  07 20 20 cd 0d 41 46 2b  c9 6d 73 67 77 25 3a e7  |.  ..AF+.msgw%:.|
0000aa60  28 62 25 3d 31 84 62 25  3d 34 29 80 69 25 3d 32  |(b%=1.b%=4).i%=2|
0000aa70  8c f2 63 6c 6f 73 65 77  28 6d 73 67 77 25 29 0d  |..closew(msgw%).|
0000aa80  41 50 0d c9 67 73 65 74  75 70 25 3a 0d 41 5a 11  |AP..gsetup%:.AZ.|
0000aa90  20 20 e7 62 25 3d 31 84  62 25 3d 34 8c 0d 41 64  |  .b%=1.b%=4..Ad|
0000aaa0  0d 20 20 20 20 c8 8e 69  25 ca 0d 41 6e 15 20 20  |.    ..i%..An.  |
0000aab0  20 20 c9 32 3a f2 6d 6f  64 67 77 6d 65 6e 75 0d  |  .2:.modgwmenu.|
0000aac0  41 78 2c 20 20 20 20 c9  34 3a f2 73 61 76 65 63  |Ax,    .4:.savec|
0000aad0  6f 6e 66 69 67 3a e7 62  25 3d 34 f2 63 6c 6f 73  |onfig:.b%=4.clos|
0000aae0  65 77 28 77 25 29 3a f4  20 4f 4b 0d 41 82 2f 20  |ew(w%):. OK.A./ |
0000aaf0  20 20 20 c9 35 3a f2 73  65 74 63 6f 6e 66 69 67  |   .5:.setconfig|
0000ab00  3a e7 62 25 3d 34 f2 63  6c 6f 73 65 77 28 77 25  |:.b%=4.closew(w%|
0000ab10  29 3a f4 20 63 61 6e 63  65 6c 0d 41 8c 43 20 20  |):. cancel.A.C  |
0000ab20  20 20 c9 31 30 3a 73 25  3d 28 a4 72 64 69 6e 76  |  .10:s%=(.rdinv|
0000ab30  28 77 25 2c 69 25 29 3d  30 29 3a e3 6c 25 3d 31  |(w%,i%)=0):.l%=1|
0000ab40  32 b8 31 34 3a f2 73 65  74 73 68 61 64 65 64 28  |2.14:.setshaded(|
0000ab50  77 25 2c 6c 25 2c 73 25  29 3a ed 6c 25 0d 41 96  |w%,l%,s%):.l%.A.|
0000ab60  15 20 20 20 20 c9 31 39  3a f2 6d 6e 67 77 6d 65  |.    .19:.mngwme|
0000ab70  6e 75 0d 41 a0 13 20 20  20 20 c9 32 31 3a f2 72  |nu.A..    .21:.r|
0000ab80  64 6d 65 6e 75 0d 41 aa  09 20 20 20 20 cb 0d 41  |dmenu.A..    ..A|
0000ab90  b4 07 20 20 cc 0d 41 be  0d 20 20 20 20 c8 8e 69  |..  ..A..    ..i|
0000aba0  25 ca 0d 41 c8 15 20 20  20 20 c9 31 3a f2 6d 6f  |%..A..    .1:.mo|
0000abb0  64 67 77 6d 65 6e 75 0d  41 d2 15 20 20 20 20 c9  |dgwmenu.A..    .|
0000abc0  31 38 3a f2 6d 6e 67 77  6d 65 6e 75 0d 41 dc 13  |18:.mngwmenu.A..|
0000abd0  20 20 20 20 c9 31 36 3a  f2 72 64 6d 65 6e 75 0d  |    .16:.rdmenu.|
0000abe0  41 e6 09 20 20 20 20 cb  0d 41 f0 07 20 20 cd 0d  |A..    ..A..  ..|
0000abf0  41 fa 0e c9 73 69 74 65  77 69 6e 25 3a 0d 42 04  |A...sitewin%:.B.|
0000ac00  0d 20 20 e7 62 25 3c 3e  32 8c 0d 42 0e 0d 20 20  |.  .b%<>2..B..  |
0000ac10  20 20 c8 8e 69 25 ca 0d  42 18 1e 20 20 20 20 c9  |  ..i%..B..    .|
0000ac20  34 3a f2 74 72 61 6e 73  70 6f 72 74 6d 65 6e 75  |4:.transportmenu|
0000ac30  28 31 30 32 29 0d 42 22  19 20 20 20 20 c9 35 3a  |(102).B".    .5:|
0000ac40  f2 69 6e 69 74 74 72 61  6e 73 70 6f 72 74 0d 42  |.inittransport.B|
0000ac50  2c 2c 20 20 20 20 c9 36  3a f2 73 61 76 65 63 6f  |,,    .6:.saveco|
0000ac60  6e 66 69 67 3a e7 62 25  3d 34 f2 63 6c 6f 73 65  |nfig:.b%=4.close|
0000ac70  77 28 77 25 29 3a f4 20  4f 4b 0d 42 36 13 20 20  |w(w%):. OK.B6.  |
0000ac80  20 20 c9 31 35 3a f2 74  7a 6d 65 6e 75 0d 42 40  |  .15:.tzmenu.B@|
0000ac90  30 20 20 20 20 c9 31 36  3a f2 73 65 74 63 6f 6e  |0    .16:.setcon|
0000aca0  66 69 67 3a e7 62 25 3d  34 f2 63 6c 6f 73 65 77  |fig:.b%=4.closew|
0000acb0  28 77 25 29 3a f4 20 63  61 6e 63 65 6c 0d 42 4a  |(w%):. cancel.BJ|
0000acc0  09 20 20 20 20 cb 0d 42  54 07 20 20 cc 0d 42 5e  |.    ..BT.  ..B^|
0000acd0  22 20 20 20 20 e7 69 25  3d 31 31 8c f2 74 72 61  |"    .i%=11..tra|
0000ace0  6e 73 70 6f 72 74 6d 65  6e 75 28 31 30 32 29 0d  |nsportmenu(102).|
0000acf0  42 68 16 20 20 20 20 e7  69 25 3d 31 34 8c f2 74  |Bh.    .i%=14..t|
0000ad00  7a 6d 65 6e 75 0d 42 72  07 20 20 cd 0d 42 7c 2b  |zmenu.Br.  ..B|+|
0000ad10  c9 61 72 72 69 76 65 25  3a e7 28 62 25 3d 31 84  |.arrive%:.(b%=1.|
0000ad20  62 25 3d 34 29 80 69 25  3d 33 8c f2 73 74 61 72  |b%=4).i%=3..star|
0000ad30  74 72 65 61 64 65 72 0d  42 86 41 c9 79 65 73 6e  |treader.B.A.yesn|
0000ad40  6f 25 3a e7 28 62 25 3d  31 84 62 25 3d 34 29 80  |o%:.(b%=1.b%=4).|
0000ad50  28 69 25 3d 31 84 69 25  3d 32 29 8c 79 6e 63 68  |(i%=1.i%=2).ynch|
0000ad60  6f 69 63 65 25 3d 69 25  3a f2 63 6c 6f 73 65 77  |oice%=i%:.closew|
0000ad70  28 79 65 73 6e 6f 25 29  0d 42 90 0c c9 6e 67 77  |(yesno%).B...ngw|
0000ad80  69 6e 25 3a 0d 42 9a 0b  20 20 c8 8e 69 25 ca 0d  |in%:.B..  ..i%..|
0000ad90  42 a4 12 20 20 20 20 c9  31 3a f2 6e 65 78 74 6e  |B..    .1:.nextn|
0000ada0  67 0d 42 ae 40 20 20 20  20 c9 32 3a 72 24 3d 22  |g.B.@    .2:r$="|
0000adb0  22 3a e7 a4 61 64 64 67  72 70 28 a4 69 63 5f 73  |":..addgrp(.ic_s|
0000adc0  74 72 28 6e 67 77 69 6e  25 2c 36 29 2c 72 24 29  |tr(ngwin%,6),r$)|
0000add0  3d 30 8c f2 6d 65 73 73  61 67 65 28 72 24 2c 30  |=0..message(r$,0|
0000ade0  29 0d 42 b8 11 20 20 20  20 20 20 f2 6e 65 78 74  |).B..      .next|
0000adf0  6e 67 0d 42 c2 15 20 20  20 20 c9 34 3a f2 63 61  |ng.B..    .4:.ca|
0000ae00  74 63 68 75 70 6e 67 0d  42 cc 07 20 20 cb 0d 42  |tchupng.B..  ..B|
0000ae10  d6 0d c9 73 61 76 65 6e  64 25 3a 0d 42 e0 0c 20  |...savend%:.B.. |
0000ae20  20 e7 69 25 3d 30 8c 0d  42 ea 13 20 20 20 20 f2  | .i%=0..B..    .|
0000ae30  67 65 74 70 6f 69 6e 74  65 72 0d 42 f4 2a 20 20  |getpointer.B.*  |
0000ae40  20 20 21 71 25 3d 73 61  76 65 6e 64 25 3a 71 25  |  !q%=savend%:q%|
0000ae50  21 34 3d 35 3a 71 25 21  32 34 3d 30 3a 71 25 21  |!4=5:q%!24=0:q%!|
0000ae60  32 38 3d 30 0d 42 fe 27  20 20 20 20 71 25 21 33  |28=0.B.'    q%!3|
0000ae70  32 3d a4 6d 6f 64 65 72  69 67 68 74 3a 71 25 21  |2=.moderight:q%!|
0000ae80  33 36 3d a4 6d 6f 64 65  74 6f 70 0d 43 08 20 20  |36=.modetop.C.  |
0000ae90  20 20 20 71 25 21 38 3d  6d 78 25 2d 33 35 3a 71  |   q%!8=mx%-35:q|
0000aea0  25 21 31 32 3d 6d 79 25  2d 33 35 0d 43 12 21 20  |%!12=my%-35.C.! |
0000aeb0  20 20 20 71 25 21 31 36  3d 6d 78 25 2b 33 35 3a  |   q%!16=mx%+35:|
0000aec0  71 25 21 32 30 3d 6d 79  25 2b 33 35 0d 43 1c 2e  |q%!20=my%+35.C..|
0000aed0  20 20 20 20 c8 99 22 57  69 6d 70 5f 44 72 61 67  |    .."Wimp_Drag|
0000aee0  42 6f 78 22 2c 2c 71 25  3a 64 72 61 67 66 6c 61  |Box",,q%:dragfla|
0000aef0  67 25 3d 73 61 76 65 6e  64 25 0d 43 26 07 20 20  |g%=savend%.C&.  |
0000af00  cd 0d 43 30 0d c9 6d 73  65 74 75 70 25 3a 0d 43  |..C0..msetup%:.C|
0000af10  3a 13 20 20 e7 28 62 25  3d 31 84 62 25 3d 34 29  |:.  .(b%=1.b%=4)|
0000af20  8c 0d 43 44 0f 20 20 c8  8e 28 69 25 81 35 29 ca  |..CD.  ..(i%.5).|
0000af30  0d 43 4e 22 20 20 20 20  c9 30 3a f2 63 66 72 6f  |.CN"    .0:.cfro|
0000af40  6e 74 28 73 69 74 65 77  69 6e 25 2c 30 2c 31 30  |nt(sitewin%,0,10|
0000af50  30 29 0d 43 58 2a 20 20  20 20 c9 31 3a f2 73 65  |0).CX*    .1:.se|
0000af60  74 63 6f 6e 66 69 67 3a  f2 63 66 72 6f 6e 74 28  |tconfig:.cfront(|
0000af70  67 73 65 74 75 70 25 2c  30 2c 30 29 0d 43 62 20  |gsetup%,0,0).Cb |
0000af80  20 20 20 20 c9 32 3a f2  63 66 72 6f 6e 74 28 74  |    .2:.cfront(t|
0000af90  72 77 69 6e 25 2c 30 2c  31 30 30 29 0d 43 6c 1f  |rwin%,0,100).Cl.|
0000afa0  20 20 20 20 c9 33 3a f2  63 66 72 6f 6e 74 28 67  |    .3:.cfront(g|
0000afb0  77 69 6e 25 2c 30 2c 31  30 30 29 0d 43 76 1f 20  |win%,0,100).Cv. |
0000afc0  20 20 20 c9 34 3a f2 63  66 72 6f 6e 74 28 75 77  |   .4:.cfront(uw|
0000afd0  69 6e 25 2c 30 2c 31 30  30 29 0d 43 80 1f 20 20  |in%,0,100).C..  |
0000afe0  20 20 c9 35 3a f2 63 66  72 6f 6e 74 28 66 77 69  |  .5:.cfront(fwi|
0000aff0  6e 25 2c 30 2c 31 30 30  29 0d 43 8a 07 20 20 cb  |n%,0,100).C..  .|
0000b000  0d 43 94 22 20 20 e7 69  25 3e 2d 31 80 62 25 3d  |.C."  .i%>-1.b%=|
0000b010  31 8c f2 63 6c 6f 73 65  77 28 6d 73 65 74 75 70  |1..closew(msetup|
0000b020  25 29 0d 43 9e 07 20 20  cd 0d 43 a8 0a c9 66 77  |%).C..  ..C...fw|
0000b030  69 6e 25 0d 43 b2 0c 20  20 e7 62 25 3d 32 8c 0d  |in%.C..  .b%=2..|
0000b040  43 bc 0d 20 20 20 20 c8  8e 69 25 ca 0d 43 c6 38  |C..    ..i%..C.8|
0000b050  20 20 20 20 20 20 c9 31  3a f2 64 6f 6d 65 6e 75  |      .1:.domenu|
0000b060  28 31 33 30 2c 22 55 6e  73 65 74 2c 4e 65 77 73  |(130,"Unset,News|
0000b070  2c 4d 61 69 6c 2c 41 6e  79 22 2c 22 54 79 70 65  |,Mail,Any","Type|
0000b080  22 2c 30 29 0d 43 d0 68  20 20 20 20 20 20 c9 32  |",0).C.h      .2|
0000b090  2c 33 2c 34 3a f2 64 6f  6d 65 6e 75 28 31 33 30  |,3,4:.domenu(130|
0000b0a0  2b 69 25 2c 22 4e 6f 6e  65 2c 54 6f 2c 46 72 6f  |+i%,"None,To,Fro|
0000b0b0  6d 2c 53 75 62 6a 65 63  74 2c 47 72 6f 75 70 2c  |m,Subject,Group,|
0000b0c0  52 65 70 6c 79 20 54 6f  2c 50 72 65 63 65 64 65  |Reply To,Precede|
0000b0d0  6e 63 65 2c 45 6e 76 65  6c 6f 70 65 22 2c 22 43  |nce,Envelope","C|
0000b0e0  6f 6e 64 69 74 69 6f 6e  22 2c 30 29 0d 43 da 41  |ondition",0).C.A|
0000b0f0  20 20 20 20 20 20 c9 31  35 3a f2 64 6f 6d 65 6e  |      .15:.domen|
0000b100  75 28 31 33 31 2c 22 4a  75 6e 6b 2c 4b 69 6c 6c  |u(131,"Junk,Kill|
0000b110  2c 52 65 64 69 72 65 63  74 2c 53 75 62 6d 69 74  |,Redirect,Submit|
0000b120  22 2c 22 41 63 74 69 6f  6e 22 2c 30 29 0d 43 e4  |","Action",0).C.|
0000b130  09 20 20 20 20 cb 0d 43  ee 09 20 20 20 20 cc 0d  |.    ..C..    ..|
0000b140  43 f8 0d 20 20 20 20 c8  8e 69 25 ca 0d 44 02 35  |C..    ..i%..D.5|
0000b150  20 20 20 20 20 20 c9 31  38 3a e7 63 66 69 6c 74  |      .18:.cfilt|
0000b160  25 3e 30 8c 63 66 69 6c  74 25 2d 3d 31 3a f2 73  |%>0.cfilt%-=1:.s|
0000b170  65 74 66 69 6c 74 77 69  6e 28 63 66 69 6c 74 25  |etfiltwin(cfilt%|
0000b180  29 0d 44 0c 3a 20 20 20  20 20 20 c9 31 39 3a e7  |).D.:      .19:.|
0000b190  63 66 69 6c 74 25 3c 6e  66 69 6c 74 25 8c 63 66  |cfilt%<nfilt%.cf|
0000b1a0  69 6c 74 25 2b 3d 31 3a  f2 73 65 74 66 69 6c 74  |ilt%+=1:.setfilt|
0000b1b0  77 69 6e 28 63 66 69 6c  74 25 29 0d 44 16 2f 20  |win(cfilt%).D./ |
0000b1c0  20 20 20 20 20 c9 32 30  3a f2 73 65 74 66 69 6c  |     .20:.setfil|
0000b1d0  74 28 63 66 69 6c 74 25  29 3a e7 62 25 3d 34 f2  |t(cfilt%):.b%=4.|
0000b1e0  63 6c 6f 73 65 77 28 77  25 29 0d 44 20 1e 20 20  |closew(w%).D .  |
0000b1f0  20 20 20 20 c9 32 31 3a  f2 64 65 6c 66 69 6c 74  |    .21:.delfilt|
0000b200  28 63 66 69 6c 74 25 29  0d 44 2a 16 20 20 20 20  |(cfilt%).D*.    |
0000b210  20 20 c9 32 32 3a f2 61  64 64 66 69 6c 74 0d 44  |  .22:.addfilt.D|
0000b220  34 09 20 20 20 20 cb 0d  44 3e 07 20 20 cd 0d 44  |4.    ..D>.  ..D|
0000b230  48 0c c9 74 72 77 69 6e  25 3a 0d 44 52 13 20 20  |H..trwin%:.DR.  |
0000b240  e7 28 62 25 3d 31 84 62  25 3d 34 29 8c 0d 44 5c  |.(b%=1.b%=4)..D\|
0000b250  0d 20 20 20 20 c8 8e 69  25 ca 0d 44 66 1e 20 20  |.    ..i%..Df.  |
0000b260  20 20 c9 31 3a f2 74 72  61 6e 73 70 6f 72 74 6d  |  .1:.transportm|
0000b270  65 6e 75 28 31 31 32 29  0d 44 70 23 20 20 20 20  |enu(112).Dp#    |
0000b280  c9 33 3a f2 64 65 6c 74  72 61 6e 73 28 a4 69 63  |.3:.deltrans(.ic|
0000b290  5f 73 74 72 28 77 25 2c  30 29 29 0d 44 7a 45 20  |_str(w%,0)).DzE |
0000b2a0  20 20 20 c9 34 3a e7 a4  72 75 6e 74 72 61 6e 73  |   .4:..runtrans|
0000b2b0  70 6f 72 74 66 69 6c 65  28 31 37 2c 22 22 2c 22  |portfile(17,"","|
0000b2c0  22 2c 22 22 29 3d 2d 33  8c f2 6d 65 73 73 61 67  |","")=-3..messag|
0000b2d0  65 30 28 22 54 6e 6f 73  65 74 75 70 22 2c 30 29  |e0("Tnosetup",0)|
0000b2e0  0d 44 84 09 20 20 20 20  cb 0d 44 8e 07 20 20 cd  |.D..    ..D..  .|
0000b2f0  0d 44 98 24 20 20 e7 62  25 3d 32 80 69 25 3d 30  |.D.$  .b%=2.i%=0|
0000b300  8c f2 74 72 61 6e 73 70  6f 72 74 6d 65 6e 75 28  |..transportmenu(|
0000b310  31 31 32 29 0d 44 a2 05  cb 0d 44 ac 05 e1 0d 44  |112).D....D....D|
0000b320  b6 04 0d 44 c0 0d dd a4  6d 6f 64 65 74 6f 70 0d  |...D....modetop.|
0000b330  44 ca 37 c8 99 22 4f 53  5f 52 65 61 64 4d 6f 64  |D.7.."OS_ReadMod|
0000b340  65 56 61 72 69 61 62 6c  65 22 2c 2d 31 2c 35 20  |eVariable",-1,5 |
0000b350  b8 2c 2c 59 65 69 67 25  3a 59 65 69 67 25 3d 32  |.,,Yeig%:Yeig%=2|
0000b360  5e 59 65 69 67 25 0d 44  d4 29 c8 99 22 4f 53 5f  |^Yeig%.D.).."OS_|
0000b370  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
0000b380  22 2c 2d 31 2c 31 32 20  b8 2c 2c 74 6f 70 25 0d  |",-1,12 .,,top%.|
0000b390  44 de 0f 3d 74 6f 70 25  2a 59 65 69 67 25 0d 44  |D..=top%*Yeig%.D|
0000b3a0  e8 04 0d 44 f2 0f dd a4  6d 6f 64 65 72 69 67 68  |...D....moderigh|
0000b3b0  74 0d 44 fc 37 c8 99 22  4f 53 5f 52 65 61 64 4d  |t.D.7.."OS_ReadM|
0000b3c0  6f 64 65 56 61 72 69 61  62 6c 65 22 2c 2d 31 2c  |odeVariable",-1,|
0000b3d0  34 20 b8 2c 2c 58 65 69  67 25 3a 58 65 69 67 25  |4 .,,Xeig%:Xeig%|
0000b3e0  3d 32 5e 58 65 69 67 25  0d 45 06 2b c8 99 22 4f  |=2^Xeig%.E.+.."O|
0000b3f0  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
0000b400  6c 65 22 2c 2d 31 2c 31  31 20 b8 2c 2c 72 69 67  |le",-1,11 .,,rig|
0000b410  68 74 25 0d 45 10 11 3d  72 69 67 68 74 25 2a 58  |ht%.E..=right%*X|
0000b420  65 69 67 25 0d 45 1a 04  0d 45 24 11 dd f2 73 74  |eig%.E...E$...st|
0000b430  61 72 74 72 65 61 64 65  72 0d 45 2e 07 ea 77 25  |artreader.E...w%|
0000b440  0d 45 38 3a 73 72 66 6c  61 67 25 3d 31 3a f2 6e  |.E8:srflag%=1:.n|
0000b450  62 72 65 70 6c 79 28 30  2c 30 2c 39 30 30 2c 30  |breply(0,0,900,0|
0000b460  2c 30 2c 22 22 2c 22 22  29 3a f2 63 6c 6f 73 65  |,0,"",""):.close|
0000b470  77 28 61 72 72 69 76 65  25 29 0d 45 42 18 e3 77  |w(arrive%).EB..w|
0000b480  25 3d 31 b8 35 3a f2 70  6f 6c 6c 28 30 29 3a ed  |%=1.5:.poll(0):.|
0000b490  77 25 0d 45 4c 10 e7 73  72 66 6c 61 67 25 3c 3e  |w%.EL..srflag%<>|
0000b4a0  30 8c 0d 45 56 1e 20 20  e7 a4 6f 62 6a 74 79 70  |0..EV.  ..objtyp|
0000b4b0  65 28 64 65 66 63 6c 69  65 6e 74 24 29 3e 30 8c  |e(defclient$)>0.|
0000b4c0  0d 45 60 25 20 20 20 20  c8 99 22 57 69 6d 70 5f  |.E`%    .."Wimp_|
0000b4d0  53 74 61 72 74 54 61 73  6b 22 2c 64 65 66 63 6c  |StartTask",defcl|
0000b4e0  69 65 6e 74 24 0d 45 6a  09 20 20 20 20 cc 0d 45  |ient$.Ej.    ..E|
0000b4f0  74 28 20 20 20 20 f2 6d  65 73 73 61 67 65 31 28  |t(    .message1(|
0000b500  22 43 6c 66 61 69 6c 22  2c 64 65 66 63 6c 69 65  |"Clfail",defclie|
0000b510  6e 74 24 2c 30 29 0d 45  7e 07 20 20 cd 0d 45 88  |nt$,0).E~.  ..E.|
0000b520  05 cd 0d 45 92 05 e1 0d  45 9c 04 0d 45 a6 12 dd  |...E....E...E...|
0000b530  f2 64 65 6c 74 72 61 6e  73 28 74 24 29 0d 45 b0  |.deltrans(t$).E.|
0000b540  17 ea 74 25 3a 74 25 3d  a4 74 72 61 6e 73 6e 6f  |..t%:t%=.transno|
0000b550  28 74 24 29 0d 45 ba 09  c8 8e 74 25 ca 0d 45 c4  |(t$).E....t%..E.|
0000b560  1e c9 30 3a ef 37 3a f2  6d 65 73 73 61 67 65 30  |..0:.7:.message0|
0000b570  28 22 54 64 65 6c 31 22  2c 30 29 0d 45 ce 27 c9  |("Tdel1",0).E.'.|
0000b580  74 72 61 6e 73 70 6f 72  74 25 3a ef 37 3a f2 6d  |transport%:.7:.m|
0000b590  65 73 73 61 67 65 30 28  22 54 64 65 6c 32 22 2c  |essage0("Tdel2",|
0000b5a0  30 29 0d 45 d8 06 7f 3a  0d 45 e2 29 20 20 e7 a4  |0).E...:.E.)  ..|
0000b5b0  63 6f 6e 66 69 72 6d 28  a4 6d 73 67 31 28 22 43  |confirm(.msg1("C|
0000b5c0  74 72 61 6e 73 64 65 6c  22 2c 74 24 29 29 3d 31  |transdel",t$))=1|
0000b5d0  8c 0d 45 ec 42 20 20 20  20 f2 68 67 6f 6e 3a f2  |..E.B    .hgon:.|
0000b5e0  77 69 70 65 28 74 72 61  6e 73 64 69 72 24 2b 22  |wipe(transdir$+"|
0000b5f0  2e 22 2b 74 24 29 3a f2  77 69 70 65 28 6e 62 64  |."+t$):.wipe(nbd|
0000b600  69 72 24 2b 22 2e 73 75  70 70 6f 72 74 2e 22 2b  |ir$+".support."+|
0000b610  74 24 29 0d 45 f6 33 20  20 20 20 f2 68 67 6f 66  |t$).E.3    .hgof|
0000b620  66 3a 74 72 61 6e 73 24  28 74 25 29 3d 22 22 3a  |f:trans$(t%)="":|
0000b630  f2 73 65 74 74 72 61 6e  73 32 28 74 72 61 6e 73  |.settrans2(trans|
0000b640  70 6f 72 74 25 29 0d 46  00 07 20 20 cd 0d 46 0a  |port%).F..  ..F.|
0000b650  05 cb 0d 46 14 05 e1 0d  46 1e 04 0d 46 28 12 dd  |...F....F...F(..|
0000b660  f2 61 6c 74 65 72 67 72  70 28 67 24 29 0d 46 32  |.altergrp(g$).F2|
0000b670  0b ea 67 25 2c 6c 31 25  0d 46 3c 12 e3 6c 31 25  |..g%,l1%.F<..l1%|
0000b680  3d 31 b8 67 72 6f 75 70  73 25 0d 46 46 29 20 20  |=1.groups%.FF)  |
0000b690  e7 a4 67 6d 61 74 63 68  28 67 24 2c 6c 31 25 29  |..gmatch(g$,l1%)|
0000b6a0  8c 67 25 3d 6c 31 25 3a  6c 31 25 3d 67 72 6f 75  |.g%=l1%:l1%=grou|
0000b6b0  70 73 25 0d 46 50 08 ed  6c 31 25 0d 46 5a 28 f4  |ps%.FP..l1%.FZ(.|
0000b6c0  6c 31 25 3d 30 3a 49 46  46 4e 73 70 65 63 69 61  |l1%=0:IFFNspecia|
0000b6d0  6c 67 72 70 28 67 24 29  3e 30 54 48 45 4e 6c 31  |lgrp(g$)>0THENl1|
0000b6e0  25 3d 31 0d 46 64 22 f2  75 70 64 61 74 65 69 63  |%=1.Fd".updateic|
0000b6f0  6f 6e 73 74 72 69 6e 67  28 67 77 69 6e 25 2c 32  |onstring(gwin%,2|
0000b700  35 2c 67 24 29 0d 46 6e  1d e7 67 25 3e 30 8c 67  |5,g$).Fn..g%>0.g|
0000b710  25 3d 67 72 70 6d 6f 64  25 28 67 25 29 8b 67 25  |%=grpmod%(g%).g%|
0000b720  3d 30 0d 46 78 18 f2 73  65 74 69 6e 76 28 67 77  |=0.Fx..setinv(gw|
0000b730  69 6e 25 2c 31 36 2c 67  25 29 0d 46 82 05 e1 0d  |in%,16,g%).F....|
0000b740  46 8c 04 0d 46 96 17 dd  f2 64 6f 61 6c 74 65 72  |F...F....doalter|
0000b750  67 72 70 28 67 24 2c 6d  25 29 0d 46 a0 08 ea 6c  |grp(g$,m%).F...l|
0000b760  31 25 0d 46 aa 12 e3 6c  31 25 3d 31 b8 67 72 6f  |1%.F...l1%=1.gro|
0000b770  75 70 73 25 0d 46 b4 26  20 20 e7 a4 67 6d 61 74  |ups%.F.&  ..gmat|
0000b780  63 68 28 67 24 2c 6c 31  25 29 8c 67 72 70 6d 6f  |ch(g$,l1%).grpmo|
0000b790  64 25 28 6c 31 25 29 3d  6d 25 0d 46 be 08 ed 6c  |d%(l1%)=m%.F...l|
0000b7a0  31 25 0d 46 c8 05 e1 0d  46 d2 04 0d 46 dc 11 dd  |1%.F....F...F...|
0000b7b0  f2 6e 75 6d 6d 65 6e 75  28 63 25 29 0d 46 e6 09  |.nummenu(c%).F..|
0000b7c0  c8 8e 63 25 ca 0d 46 f0  38 c9 30 3a f2 64 6f 6d  |..c%..F.8.0:.dom|
0000b7d0  65 6e 75 28 31 30 33 2c  22 33 2c 35 2c 37 2c 31  |enu(103,"3,5,7,1|
0000b7e0  30 2c 31 34 2c 32 31 2c  33 30 2c 5c 2d 2d 2d 22  |0,14,21,30,\---"|
0000b7f0  2c 22 44 65 66 61 75 6c  74 22 2c 30 29 0d 46 fa  |,"Default",0).F.|
0000b800  40 c9 31 3a f2 64 6f 6d  65 6e 75 28 31 30 34 2c  |@.1:.domenu(104,|
0000b810  22 44 65 66 61 75 6c 74  2c 33 2c 37 2c 31 34 2c  |"Default,3,7,14,|
0000b820  32 31 2c 33 30 2c 4e 65  76 65 72 2c 5c 2d 2d 2d  |21,30,Never,\---|
0000b830  22 2c 22 45 78 70 69 72  79 22 2c 30 29 0d 47 04  |","Expiry",0).G.|
0000b840  35 c9 32 3a f2 64 6f 6d  65 6e 75 28 31 30 35 2c  |5.2:.domenu(105,|
0000b850  22 33 2c 35 2c 37 2c 31  30 2c 31 34 2c 32 31 2c  |"3,5,7,10,14,21,|
0000b860  33 30 2c 5c 2d 2d 2d 22  2c 22 44 61 79 73 22 2c  |30,\---","Days",|
0000b870  30 29 0d 47 0e 05 cb 0d  47 18 05 e1 0d 47 22 04  |0).G....G....G".|
0000b880  0d 47 2c 0c dd f2 74 7a  6d 65 6e 75 0d 47 36 10  |.G,...tzmenu.G6.|
0000b890  ea 6c 25 2c 61 24 3a 61  24 3d 22 22 0d 47 40 41  |.l%,a$:a$="".G@A|
0000b8a0  e3 6c 25 3d 2d 31 32 b8  31 34 3a 62 24 3d c2 22  |.l%=-12.14:b$=."|
0000b8b0  30 30 30 30 22 2b c3 94  28 6c 25 2a 31 30 30 29  |0000"+..(l%*100)|
0000b8c0  2c 34 29 3a e7 6c 25 3c  30 8c 62 24 3d 22 2d 22  |,4):.l%<0.b$="-"|
0000b8d0  2b 62 24 8b 62 24 3d 22  2b 22 2b 62 24 0d 47 4a  |+b$.b$="+"+b$.GJ|
0000b8e0  1c 61 24 2b 3d 22 2c 22  2b 62 24 3a ed 6c 25 3a  |.a$+=","+b$:.l%:|
0000b8f0  61 24 3d c1 61 24 2c 32  29 0d 47 54 20 f2 64 6f  |a$=.a$,2).GT .do|
0000b900  6d 65 6e 75 28 31 32 31  2c 61 24 2c 22 54 69 6d  |menu(121,a$,"Tim|
0000b910  65 7a 6f 6e 65 22 2c 30  29 0d 47 5e 05 e1 0d 47  |ezone",0).G^...G|
0000b920  68 04 0d 47 72 17 dd f2  74 72 61 6e 73 70 6f 72  |h..Gr...transpor|
0000b930  74 6d 65 6e 75 28 6d 25  29 0d 47 7c 0a ea 41 24  |tmenu(m%).G|..A$|
0000b940  2c 6c 25 0d 47 86 21 e3  6c 25 3d 30 b8 6e 74 72  |,l%.G.!.l%=0.ntr|
0000b950  61 6e 73 25 3a e7 74 72  61 6e 73 24 28 6c 25 29  |ans%:.trans$(l%)|
0000b960  3e 22 22 8c 0d 47 90 1a  20 20 41 24 3d 41 24 2b  |>""..G..  A$=A$+|
0000b970  74 72 61 6e 73 24 28 6c  25 29 2b 22 2c 22 0d 47  |trans$(l%)+",".G|
0000b980  9a 05 cd 0d 47 a4 07 ed  6c 25 0d 47 ae 22 f2 64  |....G...l%.G.".d|
0000b990  6f 6d 65 6e 75 28 6d 25  2c c0 41 24 29 2c 22 54  |omenu(m%,.A$),"T|
0000b9a0  72 61 6e 73 70 6f 72 74  22 2c 30 29 0d 47 b8 05  |ransport",0).G..|
0000b9b0  e1 0d 47 c2 04 0d 47 cc  13 dd f2 69 6e 69 74 74  |..G...G....initt|
0000b9c0  72 61 6e 73 70 6f 72 74  0d 47 d6 17 74 69 6d 65  |ransport.G..time|
0000b9d0  7a 6f 6e 65 24 3d a4 74  69 6d 65 7a 6f 6e 65 0d  |zone$=.timezone.|
0000b9e0  47 e0 31 e7 a4 72 75 6e  74 72 61 6e 73 70 6f 72  |G.1..runtranspor|
0000b9f0  74 66 69 6c 65 28 31 34  2c 22 22 2c 22 22 2c 22  |tfile(14,"","","|
0000ba00  22 29 3d 30 8c f2 72 65  61 64 6e 65 77 73 72 63  |")=0..readnewsrc|
0000ba10  0d 47 ea 26 e7 a4 72 75  6e 74 72 61 6e 73 70 6f  |.G.&..runtranspo|
0000ba20  72 74 66 69 6c 65 28 31  31 2c 22 22 2c 22 22 2c  |rtfile(11,"","",|
0000ba30  22 22 29 3d 30 8c 0d 47  f4 27 20 20 61 24 3d a4  |"")=0..G.'  a$=.|
0000ba40  76 61 72 76 61 6c 28 22  4e 65 77 73 62 61 73 65  |varval("Newsbase|
0000ba50  24 52 65 74 75 72 6e 49  6e 66 6f 22 29 0d 47 fe  |$ReturnInfo").G.|
0000ba60  30 20 20 e7 61 24 3e 22  22 8c 68 6f 73 74 6e 61  |0  .a$>"".hostna|
0000ba70  6d 65 24 3d 61 24 20 8b  f2 6d 65 73 73 61 67 65  |me$=a$ ..message|
0000ba80  30 28 22 4e 6f 68 6f 73  74 22 2c 30 29 0d 48 08  |0("Nohost",0).H.|
0000ba90  05 cd 0d 48 12 17 6d 61  69 6c 6e 61 6d 65 24 3d  |...H..mailname$=|
0000baa0  68 6f 73 74 6e 61 6d 65  24 0d 48 1c 26 e7 a4 72  |hostname$.H.&..r|
0000bab0  75 6e 74 72 61 6e 73 70  6f 72 74 66 69 6c 65 28  |untransportfile(|
0000bac0  31 32 2c 22 22 2c 22 22  2c 22 22 29 3d 30 8c 0d  |12,"","","")=0..|
0000bad0  48 26 3d 20 20 61 24 3d  a4 76 61 72 76 61 6c 28  |H&=  a$=.varval(|
0000bae0  22 4e 65 77 73 62 61 73  65 24 52 65 74 75 72 6e  |"Newsbase$Return|
0000baf0  49 6e 66 6f 22 29 3a e7  61 24 3e 22 22 8c 72 65  |Info"):.a$>"".re|
0000bb00  6d 6f 74 65 68 6f 73 74  24 3d 61 24 0d 48 30 05  |motehost$=a$.H0.|
0000bb10  cd 0d 48 3a 0c f2 73 65  74 68 6f 73 74 0d 48 44  |..H:..sethost.HD|
0000bb20  05 e1 0d 48 4e 04 0d 48  58 26 dd a4 72 75 6e 74  |...HN..HX&..runt|
0000bb30  72 61 6e 73 70 6f 72 74  66 69 6c 65 28 63 25 2c  |ransportfile(c%,|
0000bb40  66 69 24 2c 75 73 24 2c  6e 75 24 29 0d 48 62 18  |fi$,us$,nu$).Hb.|
0000bb50  ea 46 25 2c 66 24 2c 61  24 2c 62 24 2c 6e 25 2c  |.F%,f$,a$,b$,n%,|
0000bb60  6d 65 6d 25 0d 48 6c 1b  f4 20 73 70 65 63 69 61  |mem%.Hl.. specia|
0000bb70  6c 20 72 65 74 75 72 6e  20 63 6f 64 65 73 3a 0d  |l return codes:.|
0000bb80  48 76 1a f4 20 2d 31 20  6e 6f 74 20 65 6e 6f 75  |Hv.. -1 not enou|
0000bb90  67 68 20 6d 65 6d 6f 72  79 0d 48 80 17 f4 20 2d  |gh memory.H... -|
0000bba0  32 20 63 6f 6d 6d 61 6e  64 20 66 61 69 6c 65 64  |2 command failed|
0000bbb0  0d 48 8a 1a f4 20 2d 33  20 63 6f 6d 6d 61 6e 64  |.H... -3 command|
0000bbc0  20 6e 6f 74 20 66 6f 75  6e 64 0d 48 94 49 61 24  | not found.H.Ia$|
0000bbd0  3d 74 72 61 6e 73 63 24  28 74 72 61 6e 73 70 6f  |=transc$(transpo|
0000bbe0  72 74 25 2c 63 25 29 3a  6d 65 6d 25 3d 74 72 61  |rt%,c%):mem%=tra|
0000bbf0  6e 73 6d 25 28 74 72 61  6e 73 70 6f 72 74 25 2c  |nsm%(transport%,|
0000bc00  63 25 29 3a e7 6d 65 6d  25 3d 30 8c 6d 65 6d 25  |c%):.mem%=0.mem%|
0000bc10  3d 33 32 0d 48 9e 2a c8  99 22 4f 53 5f 43 4c 49  |=32.H.*.."OS_CLI|
0000bc20  22 2c 22 75 6e 73 65 74  20 4e 65 77 73 62 61 73  |","unset Newsbas|
0000bc30  65 24 52 65 74 75 72 6e  43 6f 64 65 22 0d 48 a8  |e$ReturnCode".H.|
0000bc40  2a c8 99 22 4f 53 5f 43  4c 49 22 2c 22 75 6e 73  |*.."OS_CLI","uns|
0000bc50  65 74 20 4e 65 77 73 62  61 73 65 24 52 65 74 75  |et Newsbase$Retu|
0000bc60  72 6e 49 6e 66 6f 22 0d  48 b2 0b e7 61 24 3e 22  |rnInfo".H...a$>"|
0000bc70  22 8c 0d 48 bc 25 20 20  f4 20 73 75 62 73 74 69  |"..H.%  . substi|
0000bc80  74 75 74 65 20 70 61 72  61 6d 65 74 65 72 73 20  |tute parameters |
0000bc90  25 30 2e 2e 2e 25 32 0d  48 c6 11 20 20 6e 25 3d  |%0...%2.H..  n%=|
0000bca0  a7 61 24 2c 22 25 22 29  0d 48 d0 12 20 20 c8 95  |.a$,"%").H..  ..|
0000bcb0  6e 25 3e 30 3a 62 24 3d  22 22 0d 48 da 16 20 20  |n%>0:b$="".H..  |
0000bcc0  20 20 c8 8e c1 61 24 2c  6e 25 2b 31 2c 31 29 ca  |  ...a$,n%+1,1).|
0000bcd0  0d 48 e4 15 20 20 20 20  20 20 c9 22 66 22 3a 62  |.H..      ."f":b|
0000bce0  24 3d 66 69 24 0d 48 ee  19 20 20 20 20 20 20 c9  |$=fi$.H..      .|
0000bcf0  22 75 22 2c 22 67 22 3a  62 24 3d 75 73 24 0d 48  |"u","g":b$=us$.H|
0000bd00  f8 23 20 20 20 20 20 20  c9 22 6e 22 3a 62 24 3d  |.#      ."n":b$=|
0000bd10  6e 75 24 3a e7 62 24 3d  22 22 8c 62 24 3d 22 30  |nu$:.b$="".b$="0|
0000bd20  22 0d 49 02 1b 20 20 20  20 20 20 c9 22 68 22 3a  |".I..      ."h":|
0000bd30  62 24 3d 68 6f 73 74 6e  61 6d 65 24 0d 49 0c 1b  |b$=hostname$.I..|
0000bd40  20 20 20 20 20 20 c9 22  6d 22 3a 62 24 3d 6d 61  |      ."m":b$=ma|
0000bd50  69 6c 6e 61 6d 65 24 0d  49 16 1d 20 20 20 20 20  |ilname$.I..     |
0000bd60  20 c9 22 72 22 3a 62 24  3d 72 65 6d 6f 74 65 68  | ."r":b$=remoteh|
0000bd70  6f 73 74 24 0d 49 20 15  20 20 20 20 20 20 c9 22  |ost$.I .      ."|
0000bd80  25 22 3a 62 24 3d 22 25  22 0d 49 2a 09 20 20 20  |%":b$="%".I*.   |
0000bd90  20 cb 0d 49 34 2b 20 20  20 20 61 24 3d c0 61 24  | ..I4+    a$=.a$|
0000bda0  2c 6e 25 2d 31 29 2b 62  24 2b c1 61 24 2c 6e 25  |,n%-1)+b$+.a$,n%|
0000bdb0  2b 32 29 3a 6e 25 2b 3d  a9 62 24 2d 31 0d 49 3e  |+2):n%+=.b$-1.I>|
0000bdc0  16 20 20 20 20 6e 25 3d  a7 61 24 2c 22 25 22 2c  |.    n%=.a$,"%",|
0000bdd0  6e 25 29 0d 49 48 07 20  20 ce 0d 49 52 1e 20 20  |n%).IH.  ..IR.  |
0000bde0  e7 a4 66 72 65 65 6d 65  6d 28 30 29 3c 6d 65 6d  |..freemem(0)<mem|
0000bdf0  25 2a 31 30 32 34 20 8c  0d 49 5c 22 20 20 20 20  |%*1024 ..I\"    |
0000be00  f2 6d 65 73 73 61 67 65  31 28 22 4e 65 65 64 6d  |.message1("Needm|
0000be10  65 6d 32 22 2c 6d 24 2c  30 29 0d 49 66 2f 20 20  |em2",m$,0).If/  |
0000be20  20 20 c8 99 22 4f 53 5f  43 4c 49 22 2c 22 73 65  |  .."OS_CLI","se|
0000be30  74 20 4e 65 77 73 62 61  73 65 24 52 65 74 75 72  |t Newsbase$Retur|
0000be40  6e 43 6f 64 65 20 2d 31  22 0d 49 70 09 20 20 20  |nCode -1".Ip.   |
0000be50  20 cc 0d 49 7a 1d 20 20  20 20 66 24 3d a4 74 72  | ..Iz.    f$=.tr|
0000be60  61 6e 73 70 6f 72 74 66  69 6c 65 28 61 24 29 0d  |ansportfile(a$).|
0000be70  49 84 0f 20 20 20 20 e7  66 24 3e 22 22 8c 0d 49  |I..    .f$>""..I|
0000be80  8e 0f 20 20 20 20 20 20  f2 68 67 6f 6e 0d 49 98  |..      .hgon.I.|
0000be90  46 20 20 20 20 20 20 c8  99 22 58 57 69 6d 70 5f  |F      .."XWimp_|
0000bea0  53 6c 6f 74 53 69 7a 65  22 2c 2d 31 2c 2d 31 b8  |SlotSize",-1,-1.|
0000beb0  2c 6e 25 3a c8 99 22 58  57 69 6d 70 5f 53 6c 6f  |,n%:.."XWimp_Slo|
0000bec0  74 53 69 7a 65 22 2c 2d  31 2c 6d 65 6d 25 2a 31  |tSize",-1,mem%*1|
0000bed0  30 32 34 0d 49 a2 24 20  20 20 20 20 20 c8 99 22  |024.I.$      .."|
0000bee0  58 57 69 6d 70 5f 53 74  61 72 74 54 61 73 6b 22  |XWimp_StartTask"|
0000bef0  2c 66 24 b8 3b 46 25 0d  49 ac 22 20 20 20 20 20  |,f$.;F%.I."     |
0000bf00  20 c8 99 22 58 57 69 6d  70 5f 53 6c 6f 74 53 69  | .."XWimp_SlotSi|
0000bf10  7a 65 22 2c 2d 31 2c 6e  25 0d 49 b6 10 20 20 20  |ze",-1,n%.I..   |
0000bf20  20 20 20 f2 68 67 6f 66  66 0d 49 c0 13 20 20 20  |   .hgoff.I..   |
0000bf30  20 20 20 e7 28 46 25 80  31 29 20 8c 0d 49 ca 41  |   .(F%.1) ..I.A|
0000bf40  20 20 20 20 20 20 20 20  c8 99 22 4f 53 5f 43 4c  |        .."OS_CL|
0000bf50  49 22 2c 22 73 65 74 20  4e 65 77 73 62 61 73 65  |I","set Newsbase|
0000bf60  24 52 65 74 75 72 6e 49  6e 66 6f 20 22 2b a4 6d  |$ReturnInfo "+.m|
0000bf70  73 67 30 28 22 54 66 61  69 6c 33 22 29 0d 49 d4  |sg0("Tfail3").I.|
0000bf80  33 20 20 20 20 20 20 20  20 c8 99 22 4f 53 5f 43  |3        .."OS_C|
0000bf90  4c 49 22 2c 22 73 65 74  20 4e 65 77 73 62 61 73  |LI","set Newsbas|
0000bfa0  65 24 52 65 74 75 72 6e  43 6f 64 65 20 2d 32 22  |e$ReturnCode -2"|
0000bfb0  0d 49 de 0b 20 20 20 20  20 20 cd 0d 49 e8 0b 20  |.I..      ..I.. |
0000bfc0  20 20 20 20 20 cc 0d 49  f2 42 20 20 20 20 20 20  |     ..I.B      |
0000bfd0  c8 99 22 4f 53 5f 43 4c  49 22 2c 22 73 65 74 20  |.."OS_CLI","set |
0000bfe0  4e 65 77 73 62 61 73 65  24 52 65 74 75 72 6e 49  |Newsbase$ReturnI|
0000bff0  6e 66 6f 20 22 2b a4 6d  73 67 31 28 22 54 66 61  |nfo "+.msg1("Tfa|
0000c000  69 6c 34 22 2c 61 24 29  0d 49 fc 31 20 20 20 20  |il4",a$).I.1    |
0000c010  20 20 c8 99 22 4f 53 5f  43 4c 49 22 2c 22 73 65  |  .."OS_CLI","se|
0000c020  74 20 4e 65 77 73 62 61  73 65 24 52 65 74 75 72  |t Newsbase$Retur|
0000c030  6e 43 6f 64 65 20 2d 33  22 0d 4a 06 09 20 20 20  |nCode -3".J..   |
0000c040  20 cd 0d 4a 10 07 20 20  cd 0d 4a 1a 05 cd 0d 4a  | ..J..  ..J....J|
0000c050  24 26 6e 25 3d bb a4 76  61 72 76 61 6c 28 22 4e  |$&n%=..varval("N|
0000c060  65 77 73 62 61 73 65 24  52 65 74 75 72 6e 43 6f  |ewsbase$ReturnCo|
0000c070  64 65 22 29 0d 4a 2e 45  66 24 3d a4 76 61 72 76  |de").J.Ef$=.varv|
0000c080  61 6c 28 22 4e 65 77 73  62 61 73 65 24 52 65 74  |al("Newsbase$Ret|
0000c090  75 72 6e 49 6e 66 6f 22  29 3a e7 6e 25 3c 3e 30  |urnInfo"):.n%<>0|
0000c0a0  80 66 24 3e 22 22 8c f2  6c 6f 67 28 61 24 2b 22  |.f$>""..log(a$+"|
0000c0b0  20 2d 3e 20 22 2b 66 24  29 0d 4a 38 07 3d 6e 25  | -> "+f$).J8.=n%|
0000c0c0  0d 4a 42 04 0d 4a 4c 14  dd f2 72 75 6e 73 75 70  |.JB..JL...runsup|
0000c0d0  70 6f 72 74 28 66 24 29  0d 4a 56 19 e7 a4 66 72  |port(f$).JV...fr|
0000c0e0  65 65 6d 65 6d 28 30 29  3c 36 34 2a 31 30 32 34  |eemem(0)<64*1024|
0000c0f0  8c 0d 4a 60 20 20 20 f2  6d 65 73 73 61 67 65 31  |..J`   .message1|
0000c100  28 22 4e 65 65 64 6d 65  6d 32 22 2c 66 24 2c 30  |("Needmem2",f$,0|
0000c110  29 0d 4a 6a 07 20 20 cc  0d 4a 74 29 20 20 c8 99  |).Jj.  ..Jt)  ..|
0000c120  22 58 57 69 6d 70 5f 53  74 61 72 74 54 61 73 6b  |"XWimp_StartTask|
0000c130  22 2c 73 75 70 70 6f 72  74 24 2b 22 2e 22 2b 66  |",support$+"."+f|
0000c140  24 0d 4a 7e 05 cd 0d 4a  88 05 e1 0d 4a 92 04 0d  |$.J~...J....J...|
0000c150  4a 9c 11 dd a4 66 72 65  65 6d 65 6d 28 63 25 29  |J....freemem(c%)|
0000c160  0d 4a a6 24 ea 66 25 3a  c8 99 22 57 69 6d 70 5f  |.J.$.f%:.."Wimp_|
0000c170  53 6c 6f 74 53 69 7a 65  22 2c 2d 31 2c 2d 31 b8  |SlotSize",-1,-1.|
0000c180  2c 2c 66 25 0d 4a b0 23  e7 28 66 25 2b 28 63 25  |,,f%.J.#.(f%+(c%|
0000c190  2a 31 30 32 34 29 29 3e  30 8c 66 25 2b 3d 28 63  |*1024))>0.f%+=(c|
0000c1a0  25 2a 31 30 32 34 29 0d  4a ba 07 3d 66 25 0d 4a  |%*1024).J..=f%.J|
0000c1b0  c4 04 0d 4a ce 17 dd a4  74 72 61 6e 73 70 6f 72  |...J....transpor|
0000c1c0  74 66 69 6c 65 28 66 24  29 0d 4a d8 10 e7 c0 66  |tfile(f$).J....f|
0000c1d0  24 2c 31 29 3d 22 2a 22  8c 0d 4a e2 0f 20 20 66  |$,1)="*"..J..  f|
0000c1e0  24 3d c1 66 24 2c 32 29  0d 4a ec 07 20 20 cc 0d  |$=.f$,2).J..  ..|
0000c1f0  4a f6 3f 20 20 66 24 3d  22 3c 6e 65 77 73 62 61  |J.?  f$="<newsba|
0000c200  73 65 24 64 69 72 3e 2e  74 72 61 6e 73 70 6f 72  |se$dir>.transpor|
0000c210  74 73 2e 22 2b 74 72 61  6e 73 24 28 74 72 61 6e  |ts."+trans$(tran|
0000c220  73 70 6f 72 74 25 29 2b  22 2e 22 2b 66 24 0d 4b  |sport%)+"."+f$.K|
0000c230  00 1b 20 20 e7 a4 6f 62  6a 74 79 70 65 28 66 24  |..  ..objtype(f$|
0000c240  29 3d 30 8c 66 24 3d 22  22 0d 4b 0a 05 cd 0d 4b  |)=0.f$="".K....K|
0000c250  14 07 3d 66 24 0d 4b 1e  04 0d 4b 28 0e dd f2 67  |..=f$.K...K(...g|
0000c260  77 69 6e 28 6e 25 29 0d  4b 32 19 ea 74 25 2c 65  |win(n%).K2..t%,e|
0000c270  24 2c 6d 61 78 25 2c 63  75 72 24 2c 6e 65 77 24  |$,max%,cur$,new$|
0000c280  0d 4b 3c 10 c8 8e 6c 69  73 74 74 79 70 65 25 ca  |.K<...listtype%.|
0000c290  0d 4b 46 2a 20 20 c9 30  3a 6d 61 78 25 3d 67 72  |.KF*  .0:max%=gr|
0000c2a0  6f 75 70 73 25 2b 31 3a  63 75 72 24 3d 67 72 70  |oups%+1:cur$=grp|
0000c2b0  24 28 67 77 69 6e 5f 67  25 29 0d 4b 50 2d 20 20  |$(gwin_g%).KP-  |
0000c2c0  7f 3a 6d 61 78 25 3d 6d  61 78 61 63 74 69 76 65  |.:max%=maxactive|
0000c2d0  25 3a 63 75 72 24 3d 61  63 74 69 76 65 24 28 67  |%:cur$=active$(g|
0000c2e0  77 69 6e 5f 67 25 29 0d  4b 5a 05 cb 0d 4b 64 13  |win_g%).KZ...Kd.|
0000c2f0  e7 63 75 72 24 3d 22 22  80 6e 25 3e 30 8c e1 0d  |.cur$="".n%>0...|
0000c300  4b 6e 11 74 25 3d 67 77  69 6e 5f 67 25 2b 6e 25  |Kn.t%=gwin_g%+n%|
0000c310  0d 4b 78 14 e7 74 25 3e  6d 61 78 25 8c 74 25 3d  |.Kx..t%>max%.t%=|
0000c320  6d 61 78 25 0d 4b 82 0e  e7 74 25 3c 31 8c 74 25  |max%.K...t%<1.t%|
0000c330  3d 31 0d 4b 8c 11 e7 6c  69 73 74 74 79 70 65 25  |=1.K...listtype%|
0000c340  3d 30 8c 0d 4b 96 13 20  20 6e 65 77 24 3d 67 72  |=0..K..  new$=gr|
0000c350  70 24 28 74 25 29 0d 4b  a0 07 20 20 cc 0d 4b aa  |p$(t%).K..  ..K.|
0000c360  16 20 20 6e 65 77 24 3d  61 63 74 69 76 65 24 28  |.  new$=active$(|
0000c370  74 25 29 0d 4b b4 05 cd  0d 4b be 2f 67 77 69 6e  |t%).K....K./gwin|
0000c380  5f 67 25 3d 74 25 3a f2  75 70 64 61 74 65 69 63  |_g%=t%:.updateic|
0000c390  6f 6e 73 74 72 69 6e 67  28 67 77 69 6e 25 2c 32  |onstring(gwin%,2|
0000c3a0  35 2c 6e 65 77 24 29 0d  4b c8 32 c8 99 22 58 57  |5,new$).K.2.."XW|
0000c3b0  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
0000c3c0  74 69 6f 6e 22 2c 67 77  69 6e 25 2c 32 35 2c 2c  |tion",gwin%,25,,|
0000c3d0  2c 2d 31 2c a9 6e 65 77  24 0d 4b d2 11 e7 6c 69  |,-1,.new$.K...li|
0000c3e0  73 74 74 79 70 65 25 3d  30 8c 0d 4b dc 4a 20 20  |sttype%=0..K.J  |
0000c3f0  f2 73 65 74 65 78 70 69  63 6f 6e 28 74 25 29 3a  |.setexpicon(t%):|
0000c400  f2 73 65 74 69 6e 76 28  67 77 69 6e 25 2c 31 36  |.setinv(gwin%,16|
0000c410  2c 67 72 70 6d 6f 64 25  28 74 25 29 29 3a f2 73  |,grpmod%(t%)):.s|
0000c420  65 74 73 68 61 64 65 64  28 67 77 69 6e 25 2c 31  |etshaded(gwin%,1|
0000c430  36 2c 30 29 0d 4b e6 07  20 20 cc 0d 4b f0 3c 20  |6,0).K..  ..K.< |
0000c440  20 f2 75 70 64 61 74 65  69 63 6f 6e 73 74 72 69  | .updateiconstri|
0000c450  6e 67 28 67 77 69 6e 25  2c 31 2c 22 2d 2d 22 29  |ng(gwin%,1,"--")|
0000c460  3a f2 73 65 74 73 68 61  64 65 64 28 67 77 69 6e  |:.setshaded(gwin|
0000c470  25 2c 31 36 2c 31 29 0d  4b fa 05 cd 0d 4c 04 05  |%,16,1).K....L..|
0000c480  e1 0d 4c 0e 04 0d 4c 18  0e dd f2 67 61 63 74 28  |..L...L....gact(|
0000c490  41 24 29 0d 4c 22 27 f2  75 70 64 61 74 65 69 63  |A$).L"'.updateic|
0000c4a0  6f 6e 73 74 72 69 6e 67  28 67 77 69 6e 25 2c 32  |onstring(gwin%,2|
0000c4b0  31 2c c0 41 24 2c 35 35  29 29 0d 4c 2c 05 e1 0d  |1,.A$,55)).L,...|
0000c4c0  4c 36 04 0d 4c 40 12 dd  f2 65 72 72 6f 72 62 6f  |L6..L@...errorbo|
0000c4d0  78 28 52 25 29 0d 4c 4a  07 ea 20 85 0d 4c 54 17  |x(R%).LJ.. ..LT.|
0000c4e0  ee 20 85 20 ea 20 f2 65  72 72 6f 72 65 72 72 6f  |. . . .errorerro|
0000c4f0  72 3a e0 0d 4c 5e 47 21  74 6d 70 25 3d 9f 3a 24  |r:..L^G!tmp%=.:$|
0000c500  28 74 6d 70 25 2b 34 29  3d 22 41 6e 20 65 72 72  |(tmp%+4)="An err|
0000c510  6f 72 20 68 61 73 20 6f  63 63 75 72 72 65 64 3a  |or has occurred:|
0000c520  20 22 2b f6 24 2b 22 20  28 63 6f 64 65 20 22 2b  | "+.$+" (code "+|
0000c530  c3 9e 2b 22 29 2e 22 2b  bd 30 0d 4c 68 27 c8 99  |..+")."+.0.Lh'..|
0000c540  22 57 69 6d 70 5f 52 65  70 6f 72 74 45 72 72 6f  |"Wimp_ReportErro|
0000c550  72 22 2c 74 6d 70 25 2c  31 2c 6d 79 6e 61 6d 65  |r",tmp%,1,myname|
0000c560  24 0d 4c 72 23 f4 20 74  72 79 20 74 6f 20 77 72  |$.Lr#. try to wr|
0000c570  69 74 65 20 65 72 72 6f  72 20 74 6f 20 6c 6f 67  |ite error to log|
0000c580  66 69 6c 65 0d 4c 7c 34  f2 6c 6f 67 28 76 65 72  |file.L|4.log(ver|
0000c590  24 2b 72 65 76 24 2b 22  20 65 72 72 6f 72 3a 20  |$+rev$+" error: |
0000c5a0  22 2b f6 24 2b 22 20 61  74 20 22 2b c3 9e 29 3a  |"+.$+" at "+..):|
0000c5b0  f2 6c 6f 67 28 22 22 29  0d 4c 86 09 c8 8e 52 25  |.log("").L....R%|
0000c5c0  ca 0d 4c 90 14 20 20 c9  30 3a f2 65 72 72 6f 72  |..L..  .0:.error|
0000c5d0  65 72 72 6f 72 0d 4c 9a  45 20 20 7f 3a 21 74 6d  |error.L.E  .:!tm|
0000c5e0  70 25 3d 9f 3a 24 28 74  6d 70 25 2b 34 29 3d 22  |p%=.:$(tmp%+4)="|
0000c5f0  50 72 65 73 73 20 4f 4b  20 74 6f 20 63 6f 6e 74  |Press OK to cont|
0000c600  69 6e 75 65 20 6f 72 20  43 61 6e 63 65 6c 20 74  |inue or Cancel t|
0000c610  6f 20 71 75 69 74 22 2b  bd 30 0d 4c a4 38 20 20  |o quit"+.0.L.8  |
0000c620  20 20 20 20 20 20 20 20  20 20 c8 99 20 22 57 69  |          .. "Wi|
0000c630  6d 70 5f 52 65 70 6f 72  74 45 72 72 6f 72 22 2c  |mp_ReportError",|
0000c640  74 6d 70 25 2c 33 2c 6d  79 6e 61 6d 65 24 b8 2c  |tmp%,3,myname$.,|
0000c650  52 25 0d 4c ae 21 20 20  20 20 20 20 20 20 20 20  |R%.L.!          |
0000c660  20 20 e7 52 25 3d 32 8c  f2 65 72 72 6f 72 65 72  |  .R%=2..errorer|
0000c670  72 6f 72 0d 4c b8 05 cb  0d 4c c2 07 f7 20 85 0d  |ror.L....L... ..|
0000c680  4c cc 0b f2 74 69 64 79  75 70 0d 4c d6 05 e1 0d  |L...tidyup.L....|
0000c690  4c e0 04 0d 4c ea 10 dd  f2 65 72 72 6f 72 65 72  |L...L....errorer|
0000c6a0  72 6f 72 0d 4c f4 07 ee  85 87 0d 4c fe 0d f2 66  |ror.L......L...f|
0000c6b0  69 6e 69 73 68 3a e0 0d  4d 08 05 e1 0d 4d 12 04  |inish:..M....M..|
0000c6c0  0d 4d 1c 12 dd f2 6f 70  77 69 6e 76 61 72 28 68  |.M....opwinvar(h|
0000c6d0  25 29 0d 4d 26 09 c8 8e  68 25 ca 0d 4d 30 18 c9  |%).M&...h%..M0..|
0000c6e0  6d 73 65 74 75 70 25 3a  63 6f 6e 66 6f 70 65 6e  |msetup%:confopen|
0000c6f0  25 3d b9 0d 4d 3a 15 c9  6d 73 67 77 25 3a 6d 73  |%=..M:..msgw%:ms|
0000c700  67 6f 70 65 6e 25 3d b9  0d 4d 44 18 c9 73 74 61  |gopen%=..MD..sta|
0000c710  74 75 73 25 3a 73 74 61  74 6f 70 65 6e 25 3d b9  |tus%:statopen%=.|
0000c720  0d 4d 4e 16 c9 73 61 76  65 6e 64 25 3a 6e 64 6f  |.MN..savend%:ndo|
0000c730  70 65 6e 25 3d b9 0d 4d  58 15 c9 6e 67 77 69 6e  |pen%=..MX..ngwin|
0000c740  25 3a 6e 67 6f 70 65 6e  25 3d b9 0d 4d 62 17 c9  |%:ngopen%=..Mb..|
0000c750  61 72 72 69 76 65 25 3a  61 72 72 6f 70 65 6e 25  |arrive%:arropen%|
0000c760  3d b9 0d 4d 6c 05 cb 0d  4d 76 05 e1 0d 4d 80 04  |=..Ml...Mv...M..|
0000c770  0d 4d 8a 0f dd f2 66 72  6f 6e 74 28 68 25 29 0d  |.M....front(h%).|
0000c780  4d 94 26 21 71 25 3d 68  25 3a c8 99 22 57 69 6d  |M.&!q%=h%:.."Wim|
0000c790  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
0000c7a0  22 2c 2c 71 25 0d 4d 9e  34 71 25 21 32 30 3d 30  |",,q%.M.4q%!20=0|
0000c7b0  3a 71 25 21 32 34 3d 30  3a 71 25 21 32 38 3d 2d  |:q%!24=0:q%!28=-|
0000c7c0  31 3a c8 99 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |1:.."Wimp_OpenWi|
0000c7d0  6e 64 6f 77 22 2c 2c 71  25 0d 4d a8 11 f2 6f 70  |ndow",,q%.M...op|
0000c7e0  77 69 6e 76 61 72 28 68  25 29 0d 4d b2 05 e1 0d  |winvar(h%).M....|
0000c7f0  4d bc 04 0d 4d c6 1c dd  f2 63 66 72 6f 6e 74 28  |M...M....cfront(|
0000c800  68 25 2c 78 6f 66 66 25  2c 79 6f 66 66 25 29 0d  |h%,xoff%,yoff%).|
0000c810  4d d0 12 ea 78 25 2c 79  25 2c 77 78 25 2c 77 79  |M...x%,y%,wx%,wy|
0000c820  25 0d 4d da 11 f2 6f 70  77 69 6e 76 61 72 28 68  |%.M...opwinvar(h|
0000c830  25 29 0d 4d e4 26 21 71  25 3d 68 25 3a c8 99 22  |%).M.&!q%=h%:.."|
0000c840  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
0000c850  61 74 65 22 2c 2c 71 25  0d 4d ee 3b 78 25 3d a4  |ate",,q%.M.;x%=.|
0000c860  6d 6f 64 65 72 69 67 68  74 3a 79 25 3d a4 6d 6f  |moderight:y%=.mo|
0000c870  64 65 74 6f 70 3a 77 78  25 3d 71 25 21 31 32 2d  |detop:wx%=q%!12-|
0000c880  71 25 21 34 3a 77 79 25  3d 71 25 21 31 36 2d 71  |q%!4:wy%=q%!16-q|
0000c890  25 21 38 0d 4d f8 4d 71  25 21 34 3d 28 78 25 2d  |%!8.M.Mq%!4=(x%-|
0000c8a0  77 78 25 29 81 32 2d 78  6f 66 66 25 3a 71 25 21  |wx%).2-xoff%:q%!|
0000c8b0  31 32 3d 71 25 21 34 2b  77 78 25 3a 71 25 21 38  |12=q%!4+wx%:q%!8|
0000c8c0  3d 28 79 25 2d 77 79 25  29 81 32 2d 79 6f 66 66  |=(y%-wy%).2-yoff|
0000c8d0  25 3a 71 25 21 31 36 3d  71 25 21 38 2b 77 79 25  |%:q%!16=q%!8+wy%|
0000c8e0  0d 4e 02 34 71 25 21 32  30 3d 30 3a 71 25 21 32  |.N.4q%!20=0:q%!2|
0000c8f0  34 3d 30 3a 71 25 21 32  38 3d 2d 31 3a c8 99 22  |4=0:q%!28=-1:.."|
0000c900  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
0000c910  2c 2c 71 25 0d 4e 0c 05  e1 0d 4e 16 04 0d 4e 20  |,,q%.N....N...N |
0000c920  13 dd a4 69 63 5f 73 74  72 28 48 25 2c 49 25 29  |...ic_str(H%,I%)|
0000c930  0d 4e 2a 31 21 71 25 3d  48 25 3a 71 25 21 34 3d  |.N*1!q%=H%:q%!4=|
0000c940  49 25 3a c8 99 22 58 57  69 6d 70 5f 47 65 74 49  |I%:.."XWimp_GetI|
0000c950  63 6f 6e 53 74 61 74 65  22 2c 2c 71 25 b8 3b 46  |conState",,q%.;F|
0000c960  25 0d 4e 34 10 3d a4 73  74 72 28 71 25 21 32 38  |%.N4.=.str(q%!28|
0000c970  29 0d 4e 3e 04 0d 4e 48  1d dd f2 73 65 74 69 63  |).N>..NH...setic|
0000c980  6f 6e 73 74 72 69 6e 67  28 48 25 2c 49 25 2c 41  |onstring(H%,I%,A|
0000c990  24 29 0d 4e 52 31 21 71  25 3d 48 25 3a 71 25 21  |$).NR1!q%=H%:q%!|
0000c9a0  34 3d 49 25 3a c8 99 22  58 57 69 6d 70 5f 47 65  |4=I%:.."XWimp_Ge|
0000c9b0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 71 25 b8  |tIconState",,q%.|
0000c9c0  3b 46 25 0d 4e 5c 12 24  28 71 25 21 32 38 29 3d  |;F%.N\.$(q%!28)=|
0000c9d0  41 24 2b bd 30 0d 4e 66  05 e1 0d 4e 70 05 3a 0d  |A$+.0.Nf...Np.:.|
0000c9e0  4e 7a 20 dd f2 75 70 64  61 74 65 69 63 6f 6e 73  |Nz ..updateicons|
0000c9f0  74 72 69 6e 67 28 48 25  2c 49 25 2c 41 24 29 0d  |tring(H%,I%,A$).|
0000ca00  4e 84 3a f2 73 65 74 69  63 6f 6e 73 74 72 69 6e  |N.:.seticonstrin|
0000ca10  67 28 48 25 2c 49 25 2c  41 24 29 3a 21 71 25 3d  |g(H%,I%,A$):!q%=|
0000ca20  48 25 3a 71 25 21 34 3d  49 25 3a 71 25 21 38 3d  |H%:q%!4=I%:q%!8=|
0000ca30  30 3a 71 25 21 31 32 3d  30 0d 4e 8e 22 c8 99 22  |0:q%!12=0.N.".."|
0000ca40  58 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |XWimp_SetIconSta|
0000ca50  74 65 22 2c 2c 71 25 b8  3b 46 25 0d 4e 98 05 e1  |te",,q%.;F%.N...|
0000ca60  0d 4e a2 04 0d 4e ac 16  dd f2 73 65 74 69 6e 76  |.N...N....setinv|
0000ca70  28 48 25 2c 49 25 2c 53  25 29 0d 4e b6 42 53 25  |(H%,I%,S%).N.BS%|
0000ca80  3d 94 28 53 25 3d 30 29  3a 21 71 25 3d 48 25 3a  |=.(S%=0):!q%=H%:|
0000ca90  71 25 21 34 3d 49 25 3a  71 25 21 38 3d 28 28 31  |q%!4=I%:q%!8=((1|
0000caa0  29 3c 3c 32 31 29 2a 94  28 53 25 3d 30 29 3a 71  |)<<21)*.(S%=0):q|
0000cab0  25 21 31 32 3d 28 31 3c  3c 32 31 29 0d 4e c0 22  |%!12=(1<<21).N."|
0000cac0  c8 99 22 58 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |.."XWimp_SetIcon|
0000cad0  53 74 61 74 65 22 2c 2c  71 25 b8 3b 46 25 0d 4e  |State",,q%.;F%.N|
0000cae0  ca 05 e1 0d 4e d4 04 0d  4e de 19 dd f2 73 65 74  |....N...N....set|
0000caf0  73 68 61 64 65 64 28 48  25 2c 49 25 2c 53 25 29  |shaded(H%,I%,S%)|
0000cb00  0d 4e e8 33 21 71 25 3d  48 25 3a 71 25 21 34 3d  |.N.3!q%=H%:q%!4=|
0000cb10  49 25 3a 71 25 21 38 3d  28 28 31 29 3c 3c 32 32  |I%:q%!8=((1)<<22|
0000cb20  29 2a 94 53 25 3a 71 25  21 31 32 3d 28 31 3c 3c  |)*.S%:q%!12=(1<<|
0000cb30  32 32 29 0d 4e f2 1d c8  99 22 57 69 6d 70 5f 53  |22).N...."Wimp_S|
0000cb40  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 71 25  |etIconState",,q%|
0000cb50  0d 4e fc 05 e1 0d 4f 06  04 0d 4f 10 12 dd a4 72  |.N....O...O....r|
0000cb60  64 69 6e 76 28 48 25 2c  49 25 29 0d 4f 1a 2c 21  |dinv(H%,I%).O.,!|
0000cb70  71 25 3d 48 25 3a 71 25  21 34 3d 49 25 3a c8 99  |q%=H%:q%!4=I%:..|
0000cb80  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
0000cb90  74 65 22 2c 2c 71 25 0d  4f 24 24 3d 2d 28 28 28  |te",,q%.O$$=-(((|
0000cba0  71 25 21 32 34 29 80 28  31 3c 3c 32 31 29 29 81  |q%!24).(1<<21)).|
0000cbb0  32 30 39 37 31 35 32 3c  3e 30 29 0d 4f 2e 04 0d  |2097152<>0).O...|
0000cbc0  4f 38 0f dd f2 6d 6f 64  67 77 6d 65 6e 75 0d 4f  |O8...modgwmenu.O|
0000cbd0  42 0a ea 41 24 2c 6c 25  0d 4f 4c 45 e3 6c 25 3d  |B..A$,l%.OLE.l%=|
0000cbe0  30 b8 32 30 3a e7 6d 6f  64 67 77 24 28 6c 25 29  |0.20:.modgw$(l%)|
0000cbf0  3e 22 22 80 a9 28 41 24  2b 6d 6f 64 67 77 24 28  |>""..(A$+modgw$(|
0000cc00  6c 25 29 29 3c 32 35 33  8c 41 24 3d 41 24 2b 6d  |l%))<253.A$=A$+m|
0000cc10  6f 64 67 77 24 28 6c 25  29 2b 22 2c 22 0d 4f 56  |odgw$(l%)+",".OV|
0000cc20  07 ed 6c 25 0d 4f 60 28  e7 41 24 3e 22 22 f2 64  |..l%.O`(.A$>"".d|
0000cc30  6f 6d 65 6e 75 28 31 32  30 2c c0 41 24 29 2c 22  |omenu(120,.A$),"|
0000cc40  4d 6f 64 70 61 74 68 73  22 2c 30 29 0d 4f 6a 05  |Modpaths",0).Oj.|
0000cc50  e1 0d 4f 74 04 0d 4f 7e  0e dd f2 6d 6e 67 77 6d  |..Ot..O~...mngwm|
0000cc60  65 6e 75 0d 4f 88 0a ea  41 24 2c 6c 25 0d 4f 92  |enu.O...A$,l%.O.|
0000cc70  42 e3 6c 25 3d 30 b8 31  30 3a e7 6d 6e 67 77 24  |B.l%=0.10:.mngw$|
0000cc80  28 6c 25 29 3e 22 22 80  a9 28 41 24 2b 6d 6e 67  |(l%)>""..(A$+mng|
0000cc90  77 24 28 6c 25 29 29 3c  32 35 33 8c 41 24 3d 41  |w$(l%))<253.A$=A|
0000cca0  24 2b 6d 6e 67 77 24 28  6c 25 29 2b 22 2c 22 0d  |$+mngw$(l%)+",".|
0000ccb0  4f 9c 07 ed 6c 25 0d 4f  a6 28 e7 41 24 3e 22 22  |O...l%.O.(.A$>""|
0000ccc0  f2 64 6f 6d 65 6e 75 28  31 32 32 2c c0 41 24 29  |.domenu(122,.A$)|
0000ccd0  2c 22 47 61 74 65 77 61  79 73 22 2c 30 29 0d 4f  |,"Gateways",0).O|
0000cce0  b0 05 e1 0d 4f ba 04 0d  4f c4 0c dd f2 72 64 6d  |....O...O....rdm|
0000ccf0  65 6e 75 0d 4f ce 1b ea  41 24 2c 61 24 2c 63 25  |enu.O...A$,a$,c%|
0000cd00  2c 6c 25 2c 74 25 2c 46  25 3a 63 25 3d 30 0d 4f  |,l%,t%,F%:c%=0.O|
0000cd10  d8 44 f5 c8 99 22 58 4f  53 5f 52 65 61 64 56 61  |.D..."XOS_ReadVa|
0000cd20  72 56 61 6c 22 2c 22 4e  65 77 73 62 61 73 65 24  |rVal","Newsbase$|
0000cd30  43 6c 69 65 6e 74 2a 22  2c 74 6d 70 25 2c 32 35  |Client*",tmp%,25|
0000cd40  35 2c 63 25 b8 2c 2c 6c  25 2c 63 25 2c 74 25 3b  |5,c%.,,l%,c%,t%;|
0000cd50  46 25 0d 4f e2 43 e7 74  25 3d 30 80 28 46 25 80  |F%.O.C.t%=0.(F%.|
0000cd60  31 29 3d 30 8c 74 6d 70  25 3f 6c 25 3d 31 33 3a  |1)=0.tmp%?l%=13:|
0000cd70  61 24 3d a4 73 74 72 28  74 6d 70 25 29 3a e7 a9  |a$=.str(tmp%):..|
0000cd80  41 24 2b a9 61 24 3c 32  35 35 8c 41 24 2b 3d 61  |A$+.a$<255.A$+=a|
0000cd90  24 2b 22 2c 22 0d 4f ec  33 fd 28 46 25 80 31 29  |$+",".O.3.(F%.1)|
0000cda0  3c 3e 30 3a e7 41 24 3e  22 22 8c f2 64 6f 6d 65  |<>0:.A$>""..dome|
0000cdb0  6e 75 28 31 32 33 2c c0  41 24 29 2c 22 52 65 61  |nu(123,.A$),"Rea|
0000cdc0  64 65 72 73 22 2c 30 29  0d 4f f6 05 e1 0d 50 00  |ders",0).O....P.|
0000cdd0  04 0d 50 0a 16 dd f2 67  72 70 6d 65 6e 75 28 68  |..P....grpmenu(h|
0000cde0  61 6e 64 6c 65 25 29 0d  50 14 2e ea 6d 62 75 66  |andle%).P...mbuf|
0000cdf0  25 2c 74 62 75 66 25 2c  74 62 75 66 70 25 2c 77  |%,tbuf%,tbufp%,w|
0000ce00  25 2c 77 70 25 2c 6d 73  69 7a 25 2c 74 73 69 7a  |%,wp%,msiz%,tsiz|
0000ce10  25 2c 6e 6f 25 0d 50 1e  30 f2 72 65 6c 65 61 73  |%,no%.P.0.releas|
0000ce20  65 28 6d 65 6e 75 64 61  74 61 72 65 66 25 29 3a  |e(menudataref%):|
0000ce30  f2 72 65 6c 65 61 73 65  28 69 6e 64 6d 65 6e 75  |.release(indmenu|
0000ce40  72 65 66 25 29 0d 50 28  32 f4 49 46 6c 69 73 74  |ref%).P(2.IFlist|
0000ce50  74 79 70 65 25 3d 31 41  4e 44 61 63 74 69 76 65  |type%=1ANDactive|
0000ce60  24 28 31 29 3d 22 22 54  48 45 4e 56 44 55 37 3a  |$(1)=""THENVDU7:|
0000ce70  45 4e 44 50 52 4f 43 0d  50 32 09 f2 68 67 6f 6e  |ENDPROC.P2..hgon|
0000ce80  0d 50 3c 10 c8 8e 6c 69  73 74 74 79 70 65 25 ca  |.P<...listtype%.|
0000ce90  0d 50 46 30 20 20 c9 30  3a 6d 73 69 7a 25 3d 32  |.PF0  .0:msiz%=2|
0000cea0  38 2b 32 34 2a 28 67 72  6f 75 70 73 25 2b 31 29  |8+24*(groups%+1)|
0000ceb0  3a 74 73 69 7a 25 3d 67  72 6f 75 70 73 25 2a 32  |:tsiz%=groups%*2|
0000cec0  0d 50 50 28 20 20 e3 77  25 3d 31 b8 67 72 6f 75  |.PP(  .w%=1.grou|
0000ced0  70 73 25 3a 74 73 69 7a  25 2b 3d a9 67 72 70 24  |ps%:tsiz%+=.grp$|
0000cee0  28 77 25 29 3a ed 77 25  0d 50 5a 35 20 20 7f 3a  |(w%):.w%.PZ5  .:|
0000cef0  6d 73 69 7a 25 3d 32 38  2b 32 34 2a 28 6d 61 78  |msiz%=28+24*(max|
0000cf00  61 63 74 69 76 65 25 2b  31 29 3a 74 73 69 7a 25  |active%+1):tsiz%|
0000cf10  3d 6d 61 78 61 63 74 69  76 65 25 2a 33 0d 50 64  |=maxactive%*3.Pd|
0000cf20  2e 20 20 e3 77 25 3d 31  b8 6d 61 78 61 63 74 69  |.  .w%=1.maxacti|
0000cf30  76 65 25 3a 74 73 69 7a  25 2b 3d a9 61 63 74 69  |ve%:tsiz%+=.acti|
0000cf40  76 65 24 28 77 25 29 3a  ed 77 25 0d 50 6e 05 cb  |ve$(w%):.w%.Pn..|
0000cf50  0d 50 78 2f 6d 65 6e 75  64 61 74 61 72 65 66 25  |.Px/menudataref%|
0000cf60  3d a4 63 6c 61 69 6d 28  6d 65 6e 75 64 61 74 61  |=.claim(menudata|
0000cf70  25 2c 6d 73 69 7a 25 2c  22 6d 65 6e 75 22 29 0d  |%,msiz%,"menu").|
0000cf80  50 82 34 69 6e 64 6d 65  6e 75 72 65 66 25 3d a4  |P.4indmenuref%=.|
0000cf90  63 6c 61 69 6d 28 69 6e  64 6d 65 6e 75 62 75 66  |claim(indmenubuf|
0000cfa0  25 2c 74 73 69 7a 25 2c  22 6d 65 6e 75 64 61 74  |%,tsiz%,"menudat|
0000cfb0  61 22 29 0d 50 8c 1f e7  6d 65 6e 75 64 61 74 61  |a").P...menudata|
0000cfc0  25 3e 30 80 69 6e 64 6d  65 6e 75 62 75 66 25 3e  |%>0.indmenubuf%>|
0000cfd0  30 8c 0d 50 96 27 20 20  6d 62 75 66 25 3d 6d 65  |0..P.'  mbuf%=me|
0000cfe0  6e 75 64 61 74 61 25 3a  74 62 75 66 25 3d 69 6e  |nudata%:tbuf%=in|
0000cff0  64 6d 65 6e 75 62 75 66  25 0d 50 a0 12 20 20 74  |dmenubuf%.P..  t|
0000d000  62 75 66 70 25 3d 74 62  75 66 25 0d 50 aa 19 20  |bufp%=tbuf%.P.. |
0000d010  20 6d 65 6e 75 68 61 6e  64 6c 65 25 3d 68 61 6e  | menuhandle%=han|
0000d020  64 6c 65 25 0d 50 b4 14  20 20 6d 65 6e 75 70 74  |dle%.P..  menupt|
0000d030  72 25 3d 6d 62 75 66 25  0d 50 be 14 20 20 6d 65  |r%=mbuf%.P..  me|
0000d040  6e 75 70 74 72 25 21 32  30 3d 34 34 0d 50 c8 1d  |nuptr%!20=44.P..|
0000d050  20 20 24 6d 65 6e 75 70  74 72 25 3d 22 47 72 6f  |  $menuptr%="Gro|
0000d060  75 70 73 22 3a 77 25 3d  36 0d 50 d2 18 20 20 6d  |ups":w%=6.P..  m|
0000d070  65 6e 75 70 74 72 25 21  31 32 3d 26 37 30 32 30  |enuptr%!12=&7020|
0000d080  37 0d 50 dc 23 20 20 77  70 25 3d 6d 65 6e 75 70  |7.P.#  wp%=menup|
0000d090  74 72 25 2b 31 36 3a 6d  65 6e 75 70 74 72 25 21  |tr%+16:menuptr%!|
0000d0a0  32 34 3d 30 0d 50 e6 18  20 20 6d 65 6e 75 70 74  |24=0.P..  menupt|
0000d0b0  72 25 2b 3d 32 38 3a 6e  6f 25 3d 31 0d 50 f0 07  |r%+=28:no%=1.P..|
0000d0c0  20 20 f5 0d 50 fa 13 20  20 e7 6c 69 73 74 74 79  |  ..P..  .listty|
0000d0d0  70 65 25 3d 30 8c 0d 51  04 17 20 20 20 20 69 74  |pe%=0..Q..    it|
0000d0e0  65 6d 24 3d 67 72 70 24  28 6e 6f 25 29 0d 51 0e  |em$=grp$(no%).Q.|
0000d0f0  09 20 20 20 20 cc 0d 51  18 1a 20 20 20 20 69 74  |.    ..Q..    it|
0000d100  65 6d 24 3d 61 63 74 69  76 65 24 28 6e 6f 25 29  |em$=active$(no%)|
0000d110  0d 51 22 07 20 20 cd 0d  51 2c 1b 20 20 e7 a9 69  |.Q".  ..Q,.  ..i|
0000d120  74 65 6d 24 3e 77 25 20  8c 77 25 3d a9 69 74 65  |tem$>w% .w%=.ite|
0000d130  6d 24 0d 51 36 10 20 20  e7 69 74 65 6d 24 3e 22  |m$.Q6.  .item$>"|
0000d140  22 8c 0d 51 40 1e 20 20  21 6d 65 6e 75 70 74 72  |"..Q@.  !menuptr|
0000d150  25 3d 30 3a 6d 65 6e 75  70 74 72 25 21 34 3d 30  |%=0:menuptr%!4=0|
0000d160  0d 51 4a 1a 20 20 6d 65  6e 75 70 74 72 25 21 38  |.QJ.  menuptr%!8|
0000d170  3d 26 30 37 30 30 30 31  32 31 0d 51 54 3b 20 20  |=&07000121.QT;  |
0000d180  6d 65 6e 75 70 74 72 25  21 31 32 3d 74 62 75 66  |menuptr%!12=tbuf|
0000d190  70 25 3a 6d 65 6e 75 70  74 72 25 21 31 36 3d 30  |p%:menuptr%!16=0|
0000d1a0  3a 6d 65 6e 75 70 74 72  25 21 32 30 3d a9 69 74  |:menuptr%!20=.it|
0000d1b0  65 6d 24 2b 31 0d 51 5e  29 20 20 24 74 62 75 66  |em$+1.Q^)  $tbuf|
0000d1c0  70 25 3d 69 74 65 6d 24  2b bd 30 3a 74 62 75 66  |p%=item$+.0:tbuf|
0000d1d0  70 25 2b 3d 28 a9 69 74  65 6d 24 2b 31 29 0d 51  |p%+=(.item$+1).Q|
0000d1e0  68 12 20 20 6d 65 6e 75  70 74 72 25 2b 3d 32 34  |h.  menuptr%+=24|
0000d1f0  0d 51 72 07 20 20 cd 0d  51 7c 16 20 20 6e 6f 25  |.Qr.  ..Q|.  no%|
0000d200  2b 3d 31 3a fd 69 74 65  6d 24 3d 22 22 0d 51 86  |+=1:.item$="".Q.|
0000d210  33 20 20 21 77 70 25 3d  77 25 2a 31 36 2b 33 32  |3  !wp%=w%*16+32|
0000d220  3a 6d 65 6e 75 70 74 72  25 21 2d 32 34 3d 28 6d  |:menuptr%!-24=(m|
0000d230  65 6e 75 70 74 72 25 21  2d 32 34 29 84 26 38 30  |enuptr%!-24).&80|
0000d240  0d 51 90 56 20 20 e7 6e  6f 25 3e 32 f2 67 65 74  |.Q.V  .no%>2.get|
0000d250  70 6f 69 6e 74 65 72 3a  6d 65 6e 75 78 25 3d 6d  |pointer:menux%=m|
0000d260  78 25 2d 36 34 3a 6d 65  6e 75 79 25 3d 6d 79 25  |x%-64:menuy%=my%|
0000d270  3a c8 99 22 57 69 6d 70  5f 43 72 65 61 74 65 4d  |:.."Wimp_CreateM|
0000d280  65 6e 75 22 2c 2c 6d 62  75 66 25 2c 6d 65 6e 75  |enu",,mbuf%,menu|
0000d290  78 25 2c 6d 79 25 0d 51  9a 05 cd 0d 51 a4 0a f2  |x%,my%.Q....Q...|
0000d2a0  68 67 6f 66 66 0d 51 ae  05 e1 0d 51 b8 04 0d 51  |hgoff.Q....Q...Q|
0000d2b0  c2 0b dd f2 75 6d 65 6e  75 0d 51 cc 0a ea 41 24  |....umenu.Q...A$|
0000d2c0  2c 6c 25 0d 51 d6 3c 6c  25 3d 30 3a c8 95 6c 25  |,l%.Q.<l%=0:..l%|
0000d2d0  3c 6d 61 78 75 73 72 25  80 75 73 65 72 24 28 6c  |<maxusr%.user$(l|
0000d2e0  25 29 3e 22 22 3a 41 24  2b 3d 75 73 65 72 24 28  |%)>"":A$+=user$(|
0000d2f0  6c 25 29 2b 22 2c 22 3a  6c 25 2b 3d 31 3a ce 0d  |l%)+",":l%+=1:..|
0000d300  51 e0 2c e7 a9 41 24 3e  31 8c 41 24 3d c0 41 24  |Q.,..A$>1.A$=.A$|
0000d310  29 3a f2 64 6f 6d 65 6e  75 28 31 30 37 2c 41 24  |):.domenu(107,A$|
0000d320  2c 22 55 73 65 72 73 22  2c 30 29 0d 51 ea 05 e1  |,"Users",0).Q...|
0000d330  0d 51 f4 04 0d 51 fe 0c  dd f2 75 67 6d 65 6e 75  |.Q...Q....ugmenu|
0000d340  0d 52 08 3e f2 64 6f 6d  65 6e 75 28 31 30 38 2c  |.R.>.domenu(108,|
0000d350  22 30 2c 31 2c 32 2c 33  2c 31 30 2c 31 31 2c 31  |"0,1,2,3,10,11,1|
0000d360  32 2c 31 33 2c 31 34 2c  31 35 2c 5c 2d 2d 2d 22  |2,13,14,15,\---"|
0000d370  2c 22 47 72 6f 75 70 73  22 2c 30 29 3a e1 0d 52  |,"Groups",0):..R|
0000d380  12 04 0d 52 1c 29 dd f2  64 6f 6d 65 6e 75 28 68  |...R.)..domenu(h|
0000d390  61 6e 64 6c 65 25 2c 6d  65 6e 75 24 2c 6d 65 6e  |andle%,menu$,men|
0000d3a0  75 74 69 74 6c 65 24 2c  49 25 29 0d 52 26 2b ea  |utitle$,I%).R&+.|
0000d3b0  77 25 2c 77 70 25 2c 6c  25 2c 61 24 2c 69 74 65  |w%,wp%,l%,a$,ite|
0000d3c0  6d 24 2c 66 75 64 67 65  25 2c 74 62 75 66 70 25  |m$,fudge%,tbufp%|
0000d3d0  2c 69 6c 65 6e 25 0d 52  30 30 f2 72 65 6c 65 61  |,ilen%.R00.relea|
0000d3e0  73 65 28 6d 65 6e 75 64  61 74 61 72 65 66 25 29  |se(menudataref%)|
0000d3f0  3a f2 72 65 6c 65 61 73  65 28 69 6e 64 6d 65 6e  |:.release(indmen|
0000d400  75 72 65 66 25 29 0d 52  3a 2e 6d 65 6e 75 64 61  |uref%).R:.menuda|
0000d410  74 61 72 65 66 25 3d a4  63 6c 61 69 6d 28 6d 65  |taref%=.claim(me|
0000d420  6e 75 64 61 74 61 25 2c  26 34 30 30 2c 22 6d 65  |nudata%,&400,"me|
0000d430  6e 75 22 29 0d 52 44 33  69 6e 64 6d 65 6e 75 72  |nu").RD3indmenur|
0000d440  65 66 25 3d a4 63 6c 61  69 6d 28 69 6e 64 6d 65  |ef%=.claim(indme|
0000d450  6e 75 62 75 66 25 2c 26  34 30 30 2c 22 6d 65 6e  |nubuf%,&400,"men|
0000d460  75 64 61 74 61 22 29 0d  52 4e 0f e7 6d 65 6e 75  |udata").RN..menu|
0000d470  24 3d 22 22 8c e1 0d 52  58 19 6d 65 6e 75 49 74  |$=""...RX.menuIt|
0000d480  65 6d 73 25 3d 30 3a 66  75 64 67 65 25 3d 30 0d  |ems%=0:fudge%=0.|
0000d490  52 62 17 6d 65 6e 75 68  61 6e 64 6c 65 25 3d 68  |Rb.menuhandle%=h|
0000d4a0  61 6e 64 6c 65 25 0d 52  6c 16 6d 65 6e 75 70 74  |andle%.Rl.menupt|
0000d4b0  72 25 3d 6d 65 6e 75 64  61 74 61 25 0d 52 76 12  |r%=menudata%.Rv.|
0000d4c0  6d 65 6e 75 70 74 72 25  21 32 30 3d 34 34 0d 52  |menuptr%!20=44.R|
0000d4d0  80 27 24 6d 65 6e 75 70  74 72 25 3d 6d 65 6e 75  |.'$menuptr%=menu|
0000d4e0  74 69 74 6c 65 24 3a 77  25 3d a9 6d 65 6e 75 74  |title$:w%=.menut|
0000d4f0  69 74 6c 65 24 0d 52 8a  16 6d 65 6e 75 70 74 72  |itle$.R..menuptr|
0000d500  25 21 31 32 3d 26 37 30  32 30 37 0d 52 94 21 77  |%!12=&70207.R.!w|
0000d510  70 25 3d 6d 65 6e 75 70  74 72 25 2b 31 36 3a 6d  |p%=menuptr%+16:m|
0000d520  65 6e 75 70 74 72 25 21  32 34 3d 30 0d 52 9e 23  |enuptr%!24=0.R.#|
0000d530  6d 65 6e 75 70 74 72 25  2b 3d 32 38 3a 74 62 75  |menuptr%+=28:tbu|
0000d540  66 70 25 3d 69 6e 64 6d  65 6e 75 62 75 66 25 0d  |fp%=indmenubuf%.|
0000d550  52 a8 05 f5 0d 52 b2 14  20 20 6c 25 3d a7 6d 65  |R....R..  l%=.me|
0000d560  6e 75 24 2c 22 2c 22 29  0d 52 bc 0c 20 20 e7 6c  |nu$,",").R..  .l|
0000d570  25 3e 30 8c 0d 52 c6 2d  20 20 20 20 69 74 65 6d  |%>0..R.-    item|
0000d580  24 3d c0 6d 65 6e 75 24  2c 6c 25 2d 31 29 3a 6d  |$=.menu$,l%-1):m|
0000d590  65 6e 75 24 3d c1 6d 65  6e 75 24 2c 6c 25 2b 31  |enu$=.menu$,l%+1|
0000d5a0  29 0d 52 d0 09 20 20 20  20 cc 0d 52 da 1c 20 20  |).R..    ..R..  |
0000d5b0  20 20 69 74 65 6d 24 3d  6d 65 6e 75 24 3a 6d 65  |  item$=menu$:me|
0000d5c0  6e 75 24 3d 22 22 0d 52  e4 07 20 20 cd 0d 52 ee  |nu$="".R..  ..R.|
0000d5d0  1b 20 20 e7 a9 69 74 65  6d 24 3e 77 25 20 8c 77  |.  ..item$>w% .w|
0000d5e0  25 3d a9 69 74 65 6d 24  0d 52 f8 10 20 20 e7 69  |%=.item$.R..  .i|
0000d5f0  74 65 6d 24 3e 22 22 8c  0d 53 02 13 20 20 20 20  |tem$>""..S..    |
0000d600  21 6d 65 6e 75 70 74 72  25 3d 30 0d 53 0c 3c 20  |!menuptr%=0.S.< |
0000d610  20 20 20 e7 c0 69 74 65  6d 24 2c 31 29 3d 22 7c  |   ..item$,1)="||
0000d620  22 8c 69 74 65 6d 24 3d  c1 69 74 65 6d 24 2c 32  |".item$=.item$,2|
0000d630  29 3a 21 6d 65 6e 75 70  74 72 25 3d 32 3a 66 75  |):!menuptr%=2:fu|
0000d640  64 67 65 25 2b 3d 31 0d  53 16 3c 20 20 20 20 e7  |dge%+=1.S.<    .|
0000d650  c0 69 74 65 6d 24 2c 31  29 3d 22 21 22 8c 69 74  |.item$,1)="!".it|
0000d660  65 6d 24 3d c1 69 74 65  6d 24 2c 32 29 3a 21 6d  |em$=.item$,2):!m|
0000d670  65 6e 75 70 74 72 25 3d  21 6d 65 6e 75 70 74 72  |enuptr%=!menuptr|
0000d680  25 2b 31 0d 53 20 39 20  20 20 20 6d 65 6e 75 70  |%+1.S 9    menup|
0000d690  74 72 25 21 34 3d 2d 31  3a 6d 65 6e 75 70 74 72  |tr%!4=-1:menuptr|
0000d6a0  25 21 38 3d 26 30 37 30  30 30 31 32 31 3a 69 6c  |%!8=&07000121:il|
0000d6b0  65 6e 25 3d 31 2b a9 69  74 65 6d 24 0d 53 2a 14  |en%=1+.item$.S*.|
0000d6c0  20 20 20 20 c8 8e c0 69  74 65 6d 24 2c 31 29 ca  |    ...item$,1).|
0000d6d0  0d 53 34 2d 20 20 20 20  c9 22 3e 22 3a 6d 65 6e  |.S4-    .">":men|
0000d6e0  75 70 74 72 25 21 34 3d  69 6e 66 6f 25 3a 69 74  |uptr%!4=info%:it|
0000d6f0  65 6d 24 3d c1 69 74 65  6d 24 2c 32 29 0d 53 3e  |em$=.item$,2).S>|
0000d700  3b 20 20 20 20 c9 22 3c  22 3a 6d 65 6e 75 70 74  |;    ."<":menupt|
0000d710  72 25 21 38 3d 6d 65 6e  75 70 74 72 25 21 38 20  |r%!8=menuptr%!8 |
0000d720  84 28 31 3c 3c 32 32 29  3a 69 74 65 6d 24 3d c1  |.(1<<22):item$=.|
0000d730  69 74 65 6d 24 2c 32 29  0d 53 48 49 20 20 20 20  |item$,2).SHI    |
0000d740  c9 22 5c 22 3a 6d 65 6e  75 70 74 72 25 21 38 3d  |."\":menuptr%!8=|
0000d750  6d 65 6e 75 70 74 72 25  21 38 20 84 28 31 3c 3c  |menuptr%!8 .(1<<|
0000d760  38 29 3a 21 6d 65 6e 75  70 74 72 25 3d 21 6d 65  |8):!menuptr%=!me|
0000d770  6e 75 70 74 72 25 84 34  3a 69 74 65 6d 24 3d 22  |nuptr%.4:item$="|
0000d780  22 0d 53 52 09 20 20 20  20 cb 0d 53 5c 3a 20 20  |".SR.    ..S\:  |
0000d790  20 20 6d 65 6e 75 70 74  72 25 21 31 32 3d 74 62  |  menuptr%!12=tb|
0000d7a0  75 66 70 25 3a 6d 65 6e  75 70 74 72 25 21 31 36  |ufp%:menuptr%!16|
0000d7b0  3d 30 3a 6d 65 6e 75 70  74 72 25 21 32 30 3d 69  |=0:menuptr%!20=i|
0000d7c0  6c 65 6e 25 0d 53 66 26  20 20 20 20 24 74 62 75  |len%.Sf&    $tbu|
0000d7d0  66 70 25 3d 69 74 65 6d  24 2b bd 30 3a 74 62 75  |fp%=item$+.0:tbu|
0000d7e0  66 70 25 2b 3d 69 6c 65  6e 25 0d 53 70 07 20 20  |fp%+=ilen%.Sp.  |
0000d7f0  cd 0d 53 7a 20 20 20 6d  65 6e 75 70 74 72 25 2b  |..Sz   menuptr%+|
0000d800  3d 32 34 3a 6d 65 6e 75  49 74 65 6d 73 25 2b 3d  |=24:menuItems%+=|
0000d810  31 0d 53 84 0d fd 6d 65  6e 75 24 3d 22 22 0d 53  |1.S...menu$="".S|
0000d820  8e 23 6d 65 6e 75 70 74  72 25 21 2d 32 34 3d 28  |.#menuptr%!-24=(|
0000d830  6d 65 6e 75 70 74 72 25  21 2d 32 34 29 84 26 38  |menuptr%!-24).&8|
0000d840  30 0d 53 98 1d 21 77 70  25 3d 77 25 2a 31 36 2b  |0.S..!wp%=w%*16+|
0000d850  33 32 3a f2 67 65 74 70  6f 69 6e 74 65 72 0d 53  |32:.getpointer.S|
0000d860  a2 45 6d 65 6e 75 78 25  3d 6d 78 25 2d 36 34 3a  |.Emenux%=mx%-64:|
0000d870  e7 49 25 3c 3e 30 8c 6d  65 6e 75 79 25 3d 39 36  |.I%<>0.menuy%=96|
0000d880  2b 6d 65 6e 75 49 74 65  6d 73 25 2a 34 34 2b 66  |+menuItems%*44+f|
0000d890  75 64 67 65 25 2a 32 34  8b 6d 65 6e 75 79 25 3d  |udge%*24.menuy%=|
0000d8a0  6d 79 25 0d 53 ac 31 c8  99 20 22 57 69 6d 70 5f  |my%.S.1.. "Wimp_|
0000d8b0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 6d 65 6e  |CreateMenu",,men|
0000d8c0  75 64 61 74 61 25 2c 6d  65 6e 75 78 25 2c 6d 65  |udata%,menux%,me|
0000d8d0  6e 75 79 25 0d 53 b6 05  e1 0d 53 c0 04 0d 53 ca  |nuy%.S....S...S.|
0000d8e0  18 dd f2 6d 65 6e 75 73  65 6c 65 63 74 28 6d 65  |...menuselect(me|
0000d8f0  6e 75 73 25 29 0d 53 d4  35 ea 6c 25 2c 67 24 3a  |nus%).S.5.l%,g$:|
0000d900  c8 99 22 57 69 6d 70 5f  44 65 63 6f 64 65 4d 65  |.."Wimp_DecodeMe|
0000d910  6e 75 22 2c 2c 6d 65 6e  75 64 61 74 61 25 2c 6d  |nu",,menudata%,m|
0000d920  65 6e 75 73 25 2c 74 6d  70 25 0d 53 de 11 41 24  |enus%,tmp%.S..A$|
0000d930  3d a4 73 74 72 28 74 6d  70 25 29 0d 53 e8 0a e7  |=.str(tmp%).S...|
0000d940  62 25 80 31 8c 0d 53 f2  32 20 20 c8 99 22 57 69  |b%.1..S.2  .."Wi|
0000d950  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
0000d960  6d 65 6e 75 64 61 74 61  25 2c 6d 65 6e 75 78 25  |menudata%,menux%|
0000d970  2c 6d 65 6e 75 79 25 0d  53 fc 07 20 20 cc 0d 54  |,menuy%.S..  ..T|
0000d980  06 32 20 20 f2 72 65 6c  65 61 73 65 28 6d 65 6e  |.2  .release(men|
0000d990  75 64 61 74 61 72 65 66  25 29 3a f2 72 65 6c 65  |udataref%):.rele|
0000d9a0  61 73 65 28 69 6e 64 6d  65 6e 75 72 65 66 25 29  |ase(indmenuref%)|
0000d9b0  0d 54 10 05 cd 0d 54 1a  12 c8 8e 6d 65 6e 75 68  |.T....T....menuh|
0000d9c0  61 6e 64 6c 65 25 ca 0d  54 24 0b 20 20 c9 31 30  |andle%..T$.  .10|
0000d9d0  31 3a 0d 54 2e 0f 20 20  20 20 c8 8e 20 41 24 20  |1:.T..    .. A$ |
0000d9e0  ca 0d 54 38 3d 20 20 20  20 20 20 c9 22 53 65 74  |..T8=      ."Set|
0000d9f0  75 70 2e 2e 2e 22 3a e7  73 74 61 72 74 75 70 6f  |up...":.startupo|
0000da00  6b 25 8c f2 66 72 6f 6e  74 28 6d 73 65 74 75 70  |k%..front(msetup|
0000da10  25 29 8b f2 73 74 69 6c  6c 73 74 61 72 74 0d 54  |%)..stillstart.T|
0000da20  42 3c 20 20 20 20 20 20  c9 22 44 65 62 61 74 63  |B<      ."Debatc|
0000da30  68 22 3a e7 73 74 61 72  74 75 70 6f 6b 25 8c 63  |h":.startupok%.c|
0000da40  68 65 63 6b 66 69 6c 65  73 25 3d 31 3a 66 6f 72  |heckfiles%=1:for|
0000da50  63 65 62 61 74 63 68 25  3d b9 0d 54 4c 30 20 20  |cebatch%=..TL0  |
0000da60  20 20 20 20 c9 22 45 78  70 69 72 65 22 3a e7 73  |    ."Expire":.s|
0000da70  74 61 72 74 75 70 6f 6b  25 8c f2 65 78 70 67 72  |tartupok%..expgr|
0000da80  6f 75 70 28 22 2a 22 2c  30 29 0d 54 56 43 20 20  |oup("*",0).TVC  |
0000da90  20 20 20 20 c9 22 51 75  65 75 65 73 2e 2e 2e 22  |    ."Queues..."|
0000daa0  3a e7 73 74 61 72 74 75  70 6f 6b 25 8c 6c 25 3d  |:.startupok%.l%=|
0000dab0  a4 72 75 6e 74 72 61 6e  73 70 6f 72 74 66 69 6c  |.runtransportfil|
0000dac0  65 28 33 2c 22 22 2c 22  22 2c 22 22 29 0d 54 60  |e(3,"","","").T`|
0000dad0  27 20 20 20 20 20 20 c9  22 51 75 69 74 22 3a e7  |'      ."Quit":.|
0000dae0  a4 63 68 65 63 6b 71 75  69 74 20 f2 66 69 6e 69  |.checkquit .fini|
0000daf0  73 68 3a e0 0d 54 6a 09  20 20 20 20 cb 0d 54 74  |sh:..Tj.    ..Tt|
0000db00  22 20 20 c9 31 30 32 3a  f2 73 65 74 74 72 61 6e  |"  .102:.settran|
0000db10  73 28 a4 74 72 61 6e 73  6e 6f 28 41 24 29 29 0d  |s(.transno(A$)).|
0000db20  54 7e 23 20 20 c9 31 31  32 3a f2 73 65 74 74 72  |T~#  .112:.settr|
0000db30  61 6e 73 32 28 a4 74 72  61 6e 73 6e 6f 28 41 24  |ans2(.transno(A$|
0000db40  29 29 0d 54 88 3a 20 20  c9 31 30 33 3a e7 bb 41  |)).T.:  .103:..A|
0000db50  24 3e 30 f2 75 70 64 61  74 65 69 63 6f 6e 73 74  |$>0.updateiconst|
0000db60  72 69 6e 67 28 67 77 69  6e 25 2c 32 2c 41 24 29  |ring(gwin%,2,A$)|
0000db70  3a 64 65 66 65 78 70 25  3d bb 41 24 0d 54 92 0b  |:defexp%=.A$.T..|
0000db80  20 20 c9 31 30 34 3a 0d  54 9c 22 20 20 20 20 67  |  .104:.T."    g|
0000db90  24 3d a4 69 63 5f 73 74  72 28 67 77 69 6e 25 2c  |$=.ic_str(gwin%,|
0000dba0  32 35 29 3a c8 8e 41 24  ca 0d 54 a6 25 20 20 20  |25):..A$..T.%   |
0000dbb0  20 20 20 c9 22 44 65 66  61 75 6c 74 22 3a f2 73  |   ."Default":.s|
0000dbc0  65 74 65 78 70 69 72 79  28 67 24 2c 30 29 0d 54  |etexpiry(g$,0).T|
0000dbd0  b0 25 20 20 20 20 20 20  c9 22 4e 65 76 65 72 22  |.%      ."Never"|
0000dbe0  3a f2 73 65 74 65 78 70  69 72 79 28 67 24 2c 31  |:.setexpiry(g$,1|
0000dbf0  45 36 29 0d 54 ba 24 20  20 20 20 20 20 7f 3a e7  |E6).T.$      .:.|
0000dc00  bb 41 24 3e 30 f2 73 65  74 65 78 70 69 72 79 28  |.A$>0.setexpiry(|
0000dc10  67 24 2c bb 41 24 29 0d  54 c4 09 20 20 20 20 cb  |g$,.A$).T..    .|
0000dc20  0d 54 ce 25 20 20 20 20  f2 75 70 64 61 74 65 69  |.T.%    .updatei|
0000dc30  63 6f 6e 73 74 72 69 6e  67 28 67 77 69 6e 25 2c  |constring(gwin%,|
0000dc40  31 2c 41 24 29 0d 54 d8  3a 20 20 c9 31 30 35 3a  |1,A$).T.:  .105:|
0000dc50  e7 bb 41 24 3e 30 f2 75  70 64 61 74 65 69 63 6f  |..A$>0.updateico|
0000dc60  6e 73 74 72 69 6e 67 28  67 77 69 6e 25 2c 32 32  |nstring(gwin%,22|
0000dc70  2c 41 24 29 3a 6e 67 65  78 70 25 3d bb 41 24 0d  |,A$):ngexp%=.A$.|
0000dc80  54 e2 10 20 20 c9 31 30  36 3a c8 8e 41 24 ca 0d  |T..  .106:..A$..|
0000dc90  54 ec 19 20 20 20 20 20  20 c9 22 50 61 75 73 65  |T..      ."Pause|
0000dca0  22 3a f2 70 61 75 73 65  0d 54 f6 31 20 20 20 20  |":.pause.T.1    |
0000dcb0  20 20 c9 22 52 65 73 75  6d 65 22 3a 70 61 75 73  |  ."Resume":paus|
0000dcc0  65 25 3d 30 3a f2 70 72  69 6e 74 28 22 22 2c 22  |e%=0:.print("","|
0000dcd0  22 2c 22 20 22 2c 22 22  29 0d 55 00 1d 20 20 20  |"," ","").U..   |
0000dce0  20 20 20 c9 22 43 61 6e  63 65 6c 22 3a 63 61 6e  |   ."Cancel":can|
0000dcf0  63 65 6c 25 3d b9 0d 55  0a 09 20 20 20 20 cb 0d  |cel%=..U..    ..|
0000dd00  55 14 32 20 20 c9 31 30  37 3a f2 67 65 74 75 73  |U.2  .107:.getus|
0000dd10  65 72 69 6e 66 6f 3a f2  73 61 76 65 75 73 65 72  |erinfo:.saveuser|
0000dd20  69 6e 66 6f 3a f2 73 65  74 75 77 69 6e 28 41 24  |info:.setuwin(A$|
0000dd30  29 0d 55 1e 10 20 20 c9  31 30 38 3a c8 8e 41 24  |).U..  .108:..A$|
0000dd40  ca 0d 55 28 2c 20 20 20  20 20 20 c9 22 30 22 3a  |..U(,      ."0":|
0000dd50  f2 75 70 64 61 74 65 69  63 6f 6e 73 74 72 69 6e  |.updateiconstrin|
0000dd60  67 28 75 77 69 6e 25 2c  32 2c 41 24 29 0d 55 32  |g(uwin%,2,A$).U2|
0000dd70  30 20 20 20 20 20 20 7f  3a e7 bb 41 24 3e 30 8c  |0      .:..A$>0.|
0000dd80  f2 75 70 64 61 74 65 69  63 6f 6e 73 74 72 69 6e  |.updateiconstrin|
0000dd90  67 28 75 77 69 6e 25 2c  32 2c 41 24 29 0d 55 3c  |g(uwin%,2,A$).U<|
0000dda0  09 20 20 20 20 cb 0d 55  46 18 20 20 c9 31 31 30  |.    ..UF.  .110|
0000ddb0  3a e7 6c 69 73 74 74 79  70 65 25 3d 30 8c 0d 55  |:.listtype%=0..U|
0000ddc0  50 28 20 20 20 20 67 77  69 6e 5f 67 25 3d a4 6e  |P(    gwin_g%=.n|
0000ddd0  61 6d 65 74 6f 6e 6f 28  41 24 2c a3 29 3a f2 67  |ametono(A$,.):.g|
0000dde0  77 69 6e 28 30 29 0d 55  5a 09 20 20 20 20 cc 0d  |win(0).UZ.    ..|
0000ddf0  55 64 4e 20 20 20 20 67  77 69 6e 5f 67 25 3d 30  |UdN    gwin_g%=0|
0000de00  3a f5 67 77 69 6e 5f 67  25 2b 3d 31 3a fd 61 63  |:.gwin_g%+=1:.ac|
0000de10  74 69 76 65 24 28 67 77  69 6e 5f 67 25 29 3d 41  |tive$(gwin_g%)=A|
0000de20  24 84 67 77 69 6e 5f 67  25 3e 6d 61 78 61 63 74  |$.gwin_g%>maxact|
0000de30  69 76 65 25 3a f2 67 77  69 6e 28 30 29 0d 55 6e  |ive%:.gwin(0).Un|
0000de40  09 20 20 20 20 cd 0d 55  78 4a 20 20 c9 31 31 31  |.    ..UxJ  .111|
0000de50  3a f2 75 70 64 61 74 65  69 63 6f 6e 73 74 72 69  |:.updateiconstri|
0000de60  6e 67 28 67 77 69 6e 25  2c 31 32 2c 41 24 29 3a  |ng(gwin%,12,A$):|
0000de70  6c 69 73 74 74 79 70 65  25 3d 94 28 c0 41 24 2c  |listtype%=.(.A$,|
0000de80  31 29 3d 22 41 22 29 3a  f2 67 77 69 6e 28 30 29  |1)="A"):.gwin(0)|
0000de90  0d 55 82 22 20 20 c9 31  32 30 3a 6d 6f 64 67 77  |.U."  .120:modgw|
0000dea0  24 3d 41 24 3a f2 73 65  74 6d 6f 64 67 77 28 41  |$=A$:.setmodgw(A|
0000deb0  24 29 0d 55 8c 20 20 20  c9 31 32 31 3a 74 69 6d  |$).U.   .121:tim|
0000dec0  65 7a 6f 6e 65 24 3d 41  24 3a f2 73 65 74 68 6f  |ezone$=A$:.setho|
0000ded0  73 74 0d 55 96 20 20 20  c9 31 32 32 3a 6d 6e 67  |st.U.   .122:mng|
0000dee0  77 24 3d 41 24 3a f2 73  65 74 6d 6e 67 77 28 41  |w$=A$:.setmngw(A|
0000def0  24 29 0d 55 a0 2b 20 20  c9 31 32 33 3a f2 75 70  |$).U.+  .123:.up|
0000df00  64 61 74 65 69 63 6f 6e  73 74 72 69 6e 67 28 67  |dateiconstring(g|
0000df10  73 65 74 75 70 25 2c 31  36 2c 41 24 29 0d 55 aa  |setup%,16,A$).U.|
0000df20  28 20 20 c9 31 33 30 3a  f2 75 70 64 61 74 65 69  |(  .130:.updatei|
0000df30  63 6f 6e 73 74 72 69 6e  67 28 66 77 69 6e 25 2c  |constring(fwin%,|
0000df40  31 2c 41 24 29 0d 55 b4  3f 20 20 c9 31 33 31 3a  |1,A$).U.?  .131:|
0000df50  f2 75 70 64 61 74 65 69  63 6f 6e 73 74 72 69 6e  |.updateiconstrin|
0000df60  67 28 66 77 69 6e 25 2c  31 35 2c 41 24 29 3a f2  |g(fwin%,15,A$):.|
0000df70  73 65 74 63 61 72 65 74  28 66 77 69 6e 25 2c 31  |setcaret(fwin%,1|
0000df80  36 2c 30 29 0d 55 be 3e  20 20 c9 31 33 32 2c 31  |6,0).U.>  .132,1|
0000df90  33 33 2c 31 33 34 3a f2  75 70 64 61 74 65 69 63  |33,134:.updateic|
0000dfa0  6f 6e 73 74 72 69 6e 67  28 66 77 69 6e 25 2c 6d  |onstring(fwin%,m|
0000dfb0  65 6e 75 68 61 6e 64 6c  65 25 2d 31 33 30 2c 41  |enuhandle%-130,A|
0000dfc0  24 29 0d 55 c8 2a 20 20  20 20 f2 73 65 74 63 61  |$).U.*    .setca|
0000dfd0  72 65 74 28 66 77 69 6e  25 2c 6d 65 6e 75 68 61  |ret(fwin%,menuha|
0000dfe0  6e 64 6c 65 25 2d 31 32  37 2c 30 29 0d 55 d2 05  |ndle%-127,0).U..|
0000dff0  cb 0d 55 dc 05 e1 0d 55  e6 04 0d 55 f0 28 dd f2  |..U....U...U.(..|
0000e000  73 74 69 6c 6c 73 74 61  72 74 3a f2 6d 65 73 73  |stillstart:.mess|
0000e010  61 67 65 30 28 22 42 73  74 61 72 74 22 2c 30 29  |age0("Bstart",0)|
0000e020  3a e1 0d 55 fa 04 0d 56  04 0b dd f2 70 61 75 73  |:..U...V....paus|
0000e030  65 0d 56 0e 43 70 61 75  73 65 25 3d 31 3a f5 f2  |e.V.Cpause%=1:..|
0000e040  70 72 69 6e 74 28 22 22  2c 22 22 2c a4 6d 73 67  |print("","",.msg|
0000e050  30 28 22 50 61 75 73 65  64 22 29 2c 22 22 29 3a  |0("Paused"),""):|
0000e060  f2 70 6f 6c 6c 28 32 30  30 29 3a fd 70 61 75 73  |.poll(200):.paus|
0000e070  65 25 3d 30 0d 56 18 05  e1 0d 56 22 04 0d 56 2c  |e%=0.V....V"..V,|
0000e080  16 dd f2 73 65 74 65 78  70 69 72 79 28 67 24 2c  |...setexpiry(g$,|
0000e090  61 25 29 0d 56 36 0f ea  6c 25 3a e7 67 24 3d 22  |a%).V6..l%:.g$="|
0000e0a0  22 e1 0d 56 40 11 e3 6c  25 3d 31 b8 67 72 6f 75  |"..V@..l%=1.grou|
0000e0b0  70 73 25 0d 56 4a 2d 20  20 e7 a4 73 6d 61 74 63  |ps%.VJ-  ..smatc|
0000e0c0  68 28 67 24 2c 67 72 70  24 28 6c 25 29 29 3c 3e  |h(g$,grp$(l%))<>|
0000e0d0  30 8c 67 72 70 65 78 70  25 28 6c 25 29 3d 61 25  |0.grpexp%(l%)=a%|
0000e0e0  0d 56 54 07 ed 6c 25 0d  56 5e 05 e1 0d 56 68 04  |.VT..l%.V^...Vh.|
0000e0f0  0d 56 72 18 dd f2 70 72  69 6e 74 28 41 24 2c 42  |.Vr...print(A$,B|
0000e100  24 2c 43 24 2c 44 24 29  0d 56 7c 2e e7 41 24 3e  |$,C$,D$).V|..A$>|
0000e110  22 22 f2 75 70 64 61 74  65 69 63 6f 6e 73 74 72  |"".updateiconstr|
0000e120  69 6e 67 28 73 74 61 74  75 73 25 2c 31 2c c0 41  |ing(status%,1,.A|
0000e130  24 2c 33 36 29 29 0d 56  86 2e e7 42 24 3e 22 22  |$,36)).V...B$>""|
0000e140  f2 75 70 64 61 74 65 69  63 6f 6e 73 74 72 69 6e  |.updateiconstrin|
0000e150  67 28 73 74 61 74 75 73  25 2c 32 2c c0 42 24 2c  |g(status%,2,.B$,|
0000e160  33 36 29 29 0d 56 90 2e  e7 43 24 3e 22 22 f2 75  |36)).V...C$>"".u|
0000e170  70 64 61 74 65 69 63 6f  6e 73 74 72 69 6e 67 28  |pdateiconstring(|
0000e180  73 74 61 74 75 73 25 2c  33 2c c0 43 24 2c 33 36  |status%,3,.C$,36|
0000e190  29 29 0d 56 9a 2e e7 44  24 3e 22 22 f2 75 70 64  |)).V...D$>"".upd|
0000e1a0  61 74 65 69 63 6f 6e 73  74 72 69 6e 67 28 73 74  |ateiconstring(st|
0000e1b0  61 74 75 73 25 2c 34 2c  c0 44 24 2c 33 36 29 29  |atus%,4,.D$,36))|
0000e1c0  0d 56 a4 05 e1 0d 56 ae  04 0d 56 b8 3d dd f2 6f  |.V....V...V.=..o|
0000e1d0  70 65 6e 5f 77 69 6e 64  6f 77 28 68 61 6e 64 6c  |pen_window(handl|
0000e1e0  65 25 2c 78 30 25 2c 79  30 25 2c 78 31 25 2c 79  |e%,x0%,y0%,x1%,y|
0000e1f0  31 25 2c 73 63 78 25 2c  73 63 79 25 2c 62 68 61  |1%,scx%,scy%,bha|
0000e200  6e 64 6c 65 25 29 0d 56  c2 11 e7 68 61 6e 64 6c  |ndle%).V...handl|
0000e210  65 25 3d 2d 31 8c e1 0d  56 cc 1f 71 25 21 30 3d  |e%=-1...V..q%!0=|
0000e220  68 61 6e 64 6c 65 25 3a  71 25 21 32 38 3d 62 68  |handle%:q%!28=bh|
0000e230  61 6e 64 6c 65 25 0d 56  d6 29 71 25 21 34 3d 78  |andle%.V.)q%!4=x|
0000e240  30 25 3a 71 25 21 38 3d  79 30 25 3a 71 25 21 31  |0%:q%!8=y0%:q%!1|
0000e250  32 3d 78 31 25 3a 71 25  21 31 36 3d 79 31 25 0d  |2=x1%:q%!16=y1%.|
0000e260  56 e0 19 71 25 21 32 30  3d 73 63 78 25 3a 71 25  |V..q%!20=scx%:q%|
0000e270  21 32 34 3d 73 63 79 25  0d 56 ea 1c c8 99 20 22  |!24=scy%.V.... "|
0000e280  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
0000e290  2c 2c 71 25 0d 56 f4 05  e1 0d 56 fe 05 3a 0d 57  |,,q%.V....V..:.W|
0000e2a0  08 10 dd f2 67 65 74 70  6f 69 6e 74 65 72 0d 57  |....getpointer.W|
0000e2b0  12 22 c8 99 20 22 57 69  6d 70 5f 47 65 74 50 6f  |.".. "Wimp_GetPo|
0000e2c0  69 6e 74 65 72 49 6e 66  6f 22 2c 2c 74 6d 70 25  |interInfo",,tmp%|
0000e2d0  0d 57 1c 40 6d 78 25 3d  21 74 6d 70 25 3a 6d 79  |.W.@mx%=!tmp%:my|
0000e2e0  25 3d 74 6d 70 25 21 34  3a 62 25 3d 74 6d 70 25  |%=tmp%!4:b%=tmp%|
0000e2f0  21 38 3a 68 61 6e 64 6c  65 25 3d 74 6d 70 25 21  |!8:handle%=tmp%!|
0000e300  31 32 3a 69 63 6f 6e 25  3d 74 6d 70 25 21 31 36  |12:icon%=tmp%!16|
0000e310  0d 57 26 05 e1 0d 57 30  04 0d 57 3a 10 dd f2 63  |.W&...W0..W:...c|
0000e320  6c 6f 73 65 77 28 68 25  29 0d 57 44 0f f2 67 65  |losew(h%).WD..ge|
0000e330  74 70 6f 69 6e 74 65 72  0d 57 4e 09 c8 8e 68 25  |tpointer.WN...h%|
0000e340  ca 0d 57 58 18 c9 6d 73  65 74 75 70 25 3a 63 6f  |..WX..msetup%:co|
0000e350  6e 66 6f 70 65 6e 25 3d  a3 0d 57 62 15 c9 6d 73  |nfopen%=..Wb..ms|
0000e360  67 77 25 3a 6d 73 67 6f  70 65 6e 25 3d a3 0d 57  |gw%:msgopen%=..W|
0000e370  6c 18 c9 73 74 61 74 75  73 25 3a 73 74 61 74 6f  |l..status%:stato|
0000e380  70 65 6e 25 3d a3 0d 57  76 1e c9 6e 67 77 69 6e  |pen%=..Wv..ngwin|
0000e390  25 3a 6e 67 6f 70 65 6e  25 3d a3 3a f2 63 6c 6f  |%:ngopen%=.:.clo|
0000e3a0  73 65 6e 67 0d 57 80 37  c9 61 72 72 69 76 65 25  |seng.W.7.arrive%|
0000e3b0  3a e7 61 72 72 6f 70 65  6e 25 8c 61 72 72 6f 70  |:.arropen%.arrop|
0000e3c0  65 6e 25 3d a3 3a 61 72  72 61 72 74 25 3d 30 3a  |en%=.:arrart%=0:|
0000e3d0  61 72 72 6d 61 69 6c 24  3d 22 22 0d 57 8a 16 c9  |arrmail$="".W...|
0000e3e0  73 61 76 65 6e 64 25 3a  6e 64 6f 70 65 6e 25 3d  |savend%:ndopen%=|
0000e3f0  a3 0d 57 94 32 c9 79 65  73 6e 6f 25 2c 69 6e 66  |..W.2.yesno%,inf|
0000e400  6f 25 3a f4 20 64 75 6d  6d 79 73 20 66 6f 72 20  |o%:. dummys for |
0000e410  6f 74 68 65 72 77 69 73  65 20 63 6c 61 75 73 65  |otherwise clause|
0000e420  2e 2e 2e 0d 57 9e 1b 7f  3a e7 62 25 3d 31 8c f2  |....W...:.b%=1..|
0000e430  66 72 6f 6e 74 28 6d 73  65 74 75 70 25 29 0d 57  |front(msetup%).W|
0000e440  a8 05 cb 0d 57 b2 23 21  71 25 3d 68 25 3a c8 99  |....W.#!q%=h%:..|
0000e450  22 57 69 6d 70 5f 43 6c  6f 73 65 57 69 6e 64 6f  |"Wimp_CloseWindo|
0000e460  77 22 2c 2c 71 25 0d 57  bc 05 e1 0d 57 c6 04 0d  |w",,q%.W....W...|
0000e470  57 d0 10 dd a4 76 61 72  76 61 6c 28 41 24 29 0d  |W....varval(A$).|
0000e480  57 da 0a ea 4c 25 2c 46  25 0d 57 e4 2f c8 99 22  |W...L%,F%.W./.."|
0000e490  58 4f 53 5f 52 65 61 64  56 61 72 56 61 6c 22 2c  |XOS_ReadVarVal",|
0000e4a0  41 24 2c 74 6d 70 25 2c  32 35 36 2c 30 2c 33 20  |A$,tmp%,256,0,3 |
0000e4b0  b8 2c 2c 4c 25 3b 46 25  0d 57 ee 19 e7 28 46 25  |.,,L%;F%.W...(F%|
0000e4c0  80 31 29 20 84 4c 25 3e  32 35 36 20 8c 3a 3d 22  |.1) .L%>256 .:="|
0000e4d0  22 0d 57 f8 15 74 6d 70  25 3f 4c 25 3d 31 33 3a  |".W..tmp%?L%=13:|
0000e4e0  3d 24 74 6d 70 25 0d 58  02 04 0d 58 0c 0b dd f2  |=$tmp%.X...X....|
0000e4f0  6e 67 77 69 6e 0d 58 16  39 f4 20 68 61 6e 64 6c  |ngwin.X.9. handl|
0000e500  65 20 66 34 25 20 69 73  20 72 65 73 65 72 76 65  |e f4% is reserve|
0000e510  64 20 66 6f 72 20 75 73  65 20 62 79 20 6e 65 77  |d for use by new|
0000e520  67 72 6f 75 70 73 20 68  61 6e 64 6c 65 72 0d 58  |groups handler.X|
0000e530  20 17 6e 67 6c 61 73 74  25 3d 30 3a 6e 67 74 69  | .nglast%=0:ngti|
0000e540  6d 65 25 3d 30 0d 58 2a  18 66 31 25 3d a4 6f 70  |me%=0.X*.f1%=.op|
0000e550  65 6e 69 6e 28 6c 61 73  74 6e 67 24 29 0d 58 34  |enin(lastng$).X4|
0000e560  22 e7 66 31 25 3e 30 8c  6e 67 74 69 6d 65 25 3d  |".f1%>0.ngtime%=|
0000e570  bb be 23 66 31 25 3a f2  63 66 28 66 31 25 29 0d  |..#f1%:.cf(f1%).|
0000e580  58 3e 18 66 34 25 3d a4  6f 70 65 6e 69 6e 28 6e  |X>.f4%=.openin(n|
0000e590  65 77 67 72 70 24 29 0d  58 48 0b e7 66 34 25 3e  |ewgrp$).XH..f4%>|
0000e5a0  30 8c 0d 58 52 24 20 20  f2 63 66 72 6f 6e 74 28  |0..XR$  .cfront(|
0000e5b0  6e 67 77 69 6e 25 2c 30  2c 2d 31 30 30 29 3a f2  |ngwin%,0,-100):.|
0000e5c0  6e 65 78 74 6e 67 0d 58  5c 07 20 20 cc 0d 58 66  |nextng.X\.  ..Xf|
0000e5d0  1b 20 20 f2 6d 65 73 73  61 67 65 30 28 22 4e 47  |.  .message0("NG|
0000e5e0  6e 6f 6e 65 22 2c 30 29  0d 58 70 05 cd 0d 58 7a  |none",0).Xp...Xz|
0000e5f0  05 e1 0d 58 84 04 0d 58  8e 0c dd f2 6e 65 78 74  |...X...X....next|
0000e600  6e 67 0d 58 98 27 ea 61  24 2c 62 24 2c 6f 6b 25  |ng.X.'.a$,b$,ok%|
0000e610  3a e7 66 34 25 3d 30 8c  f2 63 6c 6f 73 65 77 28  |:.f4%=0..closew(|
0000e620  6e 67 77 69 6e 25 29 3a  e1 0d 58 a2 23 f5 61 24  |ngwin%):..X.#.a$|
0000e630  3d be 23 66 34 25 3a e7  c5 23 66 34 25 8c f2 63  |=.#f4%:..#f4%..c|
0000e640  66 28 66 34 25 29 3a 6f  6b 25 3d 32 0d 58 ac 12  |f(f4%):ok%=2.X..|
0000e650  20 20 e7 c0 61 24 2c 31  29 3d 22 23 22 8c 0d 58  |  ..a$,1)="#"..X|
0000e660  b6 25 20 20 20 20 6e 67  6c 61 73 74 25 3d bb 28  |.%    nglast%=.(|
0000e670  c1 61 24 2c 33 2c 36 29  2b c1 61 24 2c 31 30 2c  |.a$,3,6)+.a$,10,|
0000e680  32 29 29 0d 58 c0 74 20  20 20 20 e7 6e 67 6c 61  |2)).X.t    .ngla|
0000e690  73 74 25 3e 6e 67 74 69  6d 65 25 8c 66 31 25 3d  |st%>ngtime%.f1%=|
0000e6a0  a4 6f 70 65 6e 6f 75 74  28 6c 61 73 74 6e 67 24  |.openout(lastng$|
0000e6b0  29 3a e7 66 31 25 3e 30  8c d5 23 66 31 25 2c c3  |):.f1%>0..#f1%,.|
0000e6c0  6e 67 6c 61 73 74 25 3a  f2 63 66 28 66 31 25 29  |nglast%:.cf(f1%)|
0000e6d0  3a f2 73 65 74 74 79 70  65 28 6c 61 73 74 6e 67  |:.settype(lastng|
0000e6e0  24 2c 26 46 46 46 29 3a  6e 67 74 69 6d 65 25 3d  |$,&FFF):ngtime%=|
0000e6f0  6e 67 6c 61 73 74 25 0d  58 ca 09 20 20 20 20 cc  |nglast%.X..    .|
0000e700  0d 58 d4 56 20 20 20 20  e7 6e 67 6c 61 73 74 25  |.X.V    .nglast%|
0000e710  3e 3d 6e 67 74 69 6d 65  25 8c 62 24 3d a4 67 65  |>=ngtime%.b$=.ge|
0000e720  74 70 61 72 28 61 24 2c  22 20 22 29 3a 61 24 3d  |tpar(a$," "):a$=|
0000e730  62 24 3a e7 a4 61 63 74  69 76 65 28 61 24 29 3d  |b$:..active(a$)=|
0000e740  30 80 a4 69 73 61 63 68  65 66 28 61 24 29 3d 30  |0..isachef(a$)=0|
0000e750  8c 6f 6b 25 3d 31 0d 58  de 07 20 20 cd 0d 58 e8  |.ok%=1.X..  ..X.|
0000e760  0b fd 6f 6b 25 3c 3e 30  0d 58 f2 0b e7 6f 6b 25  |..ok%<>0.X...ok%|
0000e770  3d 31 8c 0d 58 fc 35 20  20 62 24 3d c3 6e 67 6c  |=1..X.5  b$=.ngl|
0000e780  61 73 74 25 3a 62 24 3d  c1 62 24 2c 35 2c 32 29  |ast%:b$=.b$,5,2)|
0000e790  2b 22 2d 22 2b c1 62 24  2c 33 2c 32 29 2b 22 2d  |+"-"+.b$,3,2)+"-|
0000e7a0  22 2b c0 62 24 2c 32 29  0d 59 06 2f 20 20 f2 75  |"+.b$,2).Y./  .u|
0000e7b0  70 64 61 74 65 69 63 6f  6e 73 74 72 69 6e 67 28  |pdateiconstring(|
0000e7c0  6e 67 77 69 6e 25 2c 35  2c 22 43 72 65 61 74 65  |ngwin%,5,"Create|
0000e7d0  64 20 22 2b 62 24 29 0d  59 10 29 20 20 f2 75 70  |d "+b$).Y.)  .up|
0000e7e0  64 61 74 65 69 63 6f 6e  73 74 72 69 6e 67 28 6e  |dateiconstring(n|
0000e7f0  67 77 69 6e 25 2c 36 2c  c0 61 24 2c 34 35 29 29  |gwin%,6,.a$,45))|
0000e800  0d 59 1a 07 20 20 cc 0d  59 24 2a 20 20 f2 63 6c  |.Y..  ..Y$*  .cl|
0000e810  6f 73 65 77 28 6e 67 77  69 6e 25 29 3a f2 6d 65  |osew(ngwin%):.me|
0000e820  73 73 61 67 65 30 28 22  4e 47 65 6e 64 22 2c 30  |ssage0("NGend",0|
0000e830  29 0d 59 2e 05 cd 0d 59  38 05 e1 0d 59 42 04 0d  |).Y....Y8...YB..|
0000e840  59 4c 0f dd f2 63 61 74  63 68 75 70 6e 67 0d 59  |YL...catchupng.Y|
0000e850  56 19 66 31 25 3d a4 6f  70 65 6e 6f 75 74 28 6c  |V.f1%=.openout(l|
0000e860  61 73 74 6e 67 24 29 0d  59 60 47 e7 66 31 25 3e  |astng$).Y`G.f1%>|
0000e870  30 8c d5 23 66 31 25 2c  a4 63 74 69 6d 65 28 22  |0..#f1%,.ctime("|
0000e880  25 59 52 25 4d 4e 25 44  59 25 32 34 22 29 3a f2  |%YR%MN%DY%24"):.|
0000e890  63 66 28 66 31 25 29 3a  f2 73 65 74 74 79 70 65  |cf(f1%):.settype|
0000e8a0  28 6c 61 73 74 6e 67 24  2c 26 46 46 46 29 0d 59  |(lastng$,&FFF).Y|
0000e8b0  6a 13 f2 63 6c 6f 73 65  77 28 6e 67 77 69 6e 25  |j..closew(ngwin%|
0000e8c0  29 0d 59 74 05 e1 0d 59  7e 04 0d 59 88 0d dd f2  |).Yt...Y~..Y....|
0000e8d0  63 6c 6f 73 65 6e 67 0d  59 92 0c f2 63 66 28 66  |closeng.Y...cf(f|
0000e8e0  34 25 29 0d 59 9c 05 e1  0d 59 a6 04 0d 59 b0 13  |4%).Y....Y...Y..|
0000e8f0  dd f2 67 65 74 74 72 61  6e 73 70 6f 72 74 73 0d  |..gettransports.|
0000e900  59 ba 24 ea 6c 25 2c 72  33 25 2c 74 25 2c 64 69  |Y.$.l%,r3%,t%,di|
0000e910  72 62 75 66 25 2c 64 62  72 25 2c 61 24 2c 62 24  |rbuf%,dbr%,a$,b$|
0000e920  2c 46 25 0d 59 c4 27 64  62 72 25 3d a4 63 6c 61  |,F%.Y.'dbr%=.cla|
0000e930  69 6d 28 64 69 72 62 75  66 25 2c 64 62 73 69 7a  |im(dirbuf%,dbsiz|
0000e940  65 25 2c 22 64 62 75 66  22 29 0d 59 ce 0f 6e 74  |e%,"dbuf").Y..nt|
0000e950  72 61 6e 73 25 3d 31 3a  f5 0d 59 d8 45 20 20 c8  |rans%=1:..Y.E  .|
0000e960  99 22 58 4f 53 5f 47 42  50 42 22 2c 31 30 2c 74  |."XOS_GBPB",10,t|
0000e970  72 61 6e 73 64 69 72 24  2c 64 69 72 62 75 66 25  |ransdir$,dirbuf%|
0000e980  2c 31 2c 6e 25 2c 64 62  73 69 7a 65 25 2c 22 2a  |,1,n%,dbsize%,"*|
0000e990  22 b8 2c 2c 2c 72 33 25  2c 6e 25 3b 46 25 0d 59  |".,,,r3%,n%;F%.Y|
0000e9a0  e2 26 20 20 e7 72 33 25  3e 30 80 28 64 69 72 62  |.&  .r3%>0.(dirb|
0000e9b0  75 66 25 21 31 36 29 3d  32 8c 6e 74 72 61 6e 73  |uf%!16)=2.ntrans|
0000e9c0  25 2b 3d 31 0d 59 ec 13  fd 6e 25 3d 2d 31 84 28  |%+=1.Y...n%=-1.(|
0000e9d0  46 25 80 31 29 3e 30 0d  59 f6 4d de 74 72 61 6e  |F%.1)>0.Y.M.tran|
0000e9e0  73 24 28 6e 74 72 61 6e  73 25 29 2c 74 72 61 6e  |s$(ntrans%),tran|
0000e9f0  73 64 24 28 6e 74 72 61  6e 73 25 29 2c 74 72 61  |sd$(ntrans%),tra|
0000ea00  6e 73 63 24 28 6e 74 72  61 6e 73 25 2c 32 30 29  |nsc$(ntrans%,20)|
0000ea10  2c 74 72 61 6e 73 6d 25  28 6e 74 72 61 6e 73 25  |,transm%(ntrans%|
0000ea20  2c 32 30 29 0d 5a 00 2c  de 74 72 61 6e 73 69 24  |,20).Z.,.transi$|
0000ea30  28 6e 74 72 61 6e 73 25  2c 31 30 29 2c 74 72 61  |(ntrans%,10),tra|
0000ea40  6e 73 6f 24 28 6e 74 72  61 6e 73 25 2c 31 30 29  |nso$(ntrans%,10)|
0000ea50  0d 5a 0a 49 74 72 61 6e  73 24 28 30 29 3d 22 6e  |.Z.Itrans$(0)="n|
0000ea60  6f 6e 65 22 3a 74 72 61  6e 73 69 24 28 30 2c 30  |one":transi$(0,0|
0000ea70  29 3d 77 6f 72 6b 64 69  72 24 2b 22 2e 2a 22 3a  |)=workdir$+".*":|
0000ea80  74 72 61 6e 73 69 24 28  30 2c 31 29 3d 6c 69 6e  |transi$(0,1)=lin|
0000ea90  64 69 72 24 2b 22 2e 2a  22 0d 5a 14 0d 6c 25 3d  |dir$+".*".Z..l%=|
0000eaa0  31 3a 6e 25 3d 30 0d 5a  1e 05 f5 0d 5a 28 45 20  |1:n%=0.Z....Z(E |
0000eab0  20 c8 99 22 58 4f 53 5f  47 42 50 42 22 2c 31 30  | .."XOS_GBPB",10|
0000eac0  2c 74 72 61 6e 73 64 69  72 24 2c 64 69 72 62 75  |,transdir$,dirbu|
0000ead0  66 25 2c 31 2c 6e 25 2c  64 62 73 69 7a 65 25 2c  |f%,1,n%,dbsize%,|
0000eae0  22 2a 22 b8 2c 2c 2c 72  33 25 2c 6e 25 2c 46 25  |"*".,,,r3%,n%,F%|
0000eaf0  0d 5a 32 1c 20 20 e7 72  33 25 3e 30 80 28 64 69  |.Z2.  .r3%>0.(di|
0000eb00  72 62 75 66 25 21 31 36  29 3d 32 8c 0d 5a 3c 37  |rbuf%!16)=2..Z<7|
0000eb10  20 20 20 20 61 24 3d a4  6c 6f 77 65 72 28 a4 73  |    a$=.lower(.s|
0000eb20  74 72 28 64 69 72 62 75  66 25 2b 32 30 29 29 3a  |tr(dirbuf%+20)):|
0000eb30  62 24 3d 74 72 61 6e 73  64 69 72 24 2b 22 2e 22  |b$=transdir$+"."|
0000eb40  2b 61 24 0d 5a 46 22 20  20 20 20 e7 a4 6f 62 6a  |+a$.ZF"    ..obj|
0000eb50  74 79 70 65 28 62 24 2b  22 2e 70 61 72 61 6d 73  |type(b$+".params|
0000eb60  22 29 3d 31 8c 0d 5a 50  17 20 20 20 20 20 20 74  |")=1..ZP.      t|
0000eb70  72 61 6e 73 24 28 6c 25  29 3d 61 24 0d 5a 5a 25  |rans$(l%)=a$.ZZ%|
0000eb80  20 20 20 20 20 20 f2 72  65 61 64 74 72 61 6e 73  |      .readtrans|
0000eb90  28 62 24 2b 22 2e 70 61  72 61 6d 73 22 2c 6c 25  |(b$+".params",l%|
0000eba0  29 0d 5a 64 46 20 20 20  20 20 20 e7 a4 72 75 6e  |).ZdF      ..run|
0000ebb0  74 72 61 6e 73 70 6f 72  74 66 69 6c 65 28 31 38  |transportfile(18|
0000ebc0  2c 22 22 2c 22 22 2c 22  22 29 3d 30 80 74 72 61  |,"","","")=0.tra|
0000ebd0  6e 73 70 6f 72 74 25 3d  30 8c 74 72 61 6e 73 70  |nsport%=0.transp|
0000ebe0  6f 72 74 25 3d 6c 25 0d  5a 6e 0f 20 20 20 20 20  |ort%=l%.Zn.     |
0000ebf0  20 6c 25 2b 3d 31 0d 5a  78 09 20 20 20 20 cd 0d  | l%+=1.Zx.    ..|
0000ec00  5a 82 07 20 20 cd 0d 5a  8c 13 fd 6e 25 3d 2d 31  |Z..  ..Z...n%=-1|
0000ec10  84 28 46 25 80 31 29 3e  30 0d 5a 96 1a f2 73 65  |.(F%.1)>0.Z...se|
0000ec20  74 74 72 61 6e 73 32 28  74 72 61 6e 73 70 6f 72  |ttrans2(transpor|
0000ec30  74 25 29 0d 5a a0 12 f2  72 65 6c 65 61 73 65 28  |t%).Z...release(|
0000ec40  64 62 72 25 29 0d 5a aa  05 e1 0d 5a b4 04 0d 5a  |dbr%).Z....Z...Z|
0000ec50  be 16 dd f2 72 65 61 64  74 72 61 6e 73 28 66 24  |....readtrans(f$|
0000ec60  2c 6e 25 29 0d 5a c8 24  ea 61 24 2c 62 24 2c 63  |,n%).Z.$.a$,b$,c|
0000ec70  24 2c 69 25 2c 6f 25 2c  6c 25 2c 70 25 2c 64 6d  |$,i%,o%,l%,p%,dm|
0000ec80  25 3a 64 6d 25 3d 33 32  0d 5a d2 1c 66 31 25 3d  |%:dm%=32.Z..f1%=|
0000ec90  a4 6f 70 65 6e 69 6e 28  66 24 29 3a e7 66 31 25  |.openin(f$):.f1%|
0000eca0  3c 3e 30 8c 0d 5a dc 22  20 20 f5 61 24 3d be 23  |<>0..Z."  .a$=.#|
0000ecb0  66 31 25 3a 62 24 3d a4  67 65 74 70 61 72 28 61  |f1%:b$=.getpar(a|
0000ecc0  24 2c 22 20 22 29 0d 5a  e6 0d 20 20 20 20 c8 8e  |$," ").Z..    ..|
0000ecd0  62 24 ca 0d 5a f0 2e 20  20 20 20 20 20 c9 22 69  |b$..Z..      ."i|
0000ece0  6e 22 3a e7 69 25 3c 31  31 8c 74 72 61 6e 73 69  |n":.i%<11.transi|
0000ecf0  24 28 6e 25 2c 69 25 29  3d 61 24 3a 69 25 2b 3d  |$(n%,i%)=a$:i%+=|
0000ed00  31 0d 5a fa 2f 20 20 20  20 20 20 c9 22 6f 75 74  |1.Z./      ."out|
0000ed10  22 3a e7 6f 25 3c 31 31  8c 74 72 61 6e 73 6f 24  |":.o%<11.transo$|
0000ed20  28 6e 25 2c 6f 25 29 3d  61 24 3a 6f 25 2b 3d 31  |(n%,o%)=a$:o%+=1|
0000ed30  0d 5b 04 1f 20 20 20 20  20 20 c9 22 64 69 72 22  |.[..      ."dir"|
0000ed40  3a f2 65 6e 73 75 72 65  64 69 72 28 61 24 29 0d  |:.ensuredir(a$).|
0000ed50  5b 0e 20 20 20 20 20 20  20 c9 22 69 6e 66 6f 22  |[.       ."info"|
0000ed60  3a 74 72 61 6e 73 64 24  28 6e 25 29 3d 61 24 0d  |:transd$(n%)=a$.|
0000ed70  5b 18 3b 20 20 20 20 20  20 c9 22 64 65 66 6d 65  |[.;      ."defme|
0000ed80  6d 22 3a 64 6d 25 3d bb  61 24 3a e7 64 6d 25 3c  |m":dm%=.a$:.dm%<|
0000ed90  30 8c 64 6d 25 3d 30 8b  e7 64 6d 25 3e 32 30 34  |0.dm%=0..dm%>204|
0000eda0  38 8c 64 6d 25 3d 32 30  34 38 0d 5b 22 0c 20 20  |8.dm%=2048.[".  |
0000edb0  20 20 20 20 7f 3a 0d 5b  2c 21 20 20 20 20 20 20  |    .:.[,!      |
0000edc0  70 25 3d 30 3a 63 24 3d  a4 67 65 74 70 61 72 28  |p%=0:c$=.getpar(|
0000edd0  61 24 2c 22 20 22 29 0d  5b 36 37 20 20 20 20 20  |a$," ").[67     |
0000ede0  20 6c 25 3d bb a4 63 6c  65 61 6e 28 63 24 29 3a  | l%=..clean(c$):|
0000edf0  e7 6c 25 3c 3d 30 8c 6c  25 3d 64 6d 25 8b e7 6c  |.l%<=0.l%=dm%..l|
0000ee00  25 3e 32 30 34 38 8c 6c  25 3d 32 30 34 38 0d 5b  |%>2048.l%=2048.[|
0000ee10  40 13 20 20 20 20 20 20  c8 8e c0 62 24 2c 35 29  |@.      ...b$,5)|
0000ee20  ca 0d 5b 4a 19 20 20 20  20 20 20 20 20 c9 22 73  |..[J.        ."s|
0000ee30  65 6e 64 6d 22 3a 70 25  3d 31 0d 5b 54 19 20 20  |endm":p%=1.[T.  |
0000ee40  20 20 20 20 20 20 c9 22  73 65 6e 64 6e 22 3a 70  |      ."sendn":p|
0000ee50  25 3d 32 0d 5b 5e 19 20  20 20 20 20 20 20 20 c9  |%=2.[^.        .|
0000ee60  22 73 68 6f 77 71 22 3a  70 25 3d 33 0d 5b 68 19  |"showq":p%=3.[h.|
0000ee70  20 20 20 20 20 20 20 20  c9 22 70 72 65 66 65 22  |        ."prefe"|
0000ee80  3a 70 25 3d 34 0d 5b 72  19 20 20 20 20 20 20 20  |:p%=4.[r.       |
0000ee90  20 c9 22 70 6f 73 74 66  22 3a 70 25 3d 35 0d 5b  | ."postf":p%=5.[|
0000eea0  7c 19 20 20 20 20 20 20  20 20 c9 22 61 64 64 75  ||.        ."addu|
0000eeb0  73 22 3a 70 25 3d 36 0d  5b 86 19 20 20 20 20 20  |s":p%=6.[..     |
0000eec0  20 20 20 c9 22 64 65 6c  75 73 22 3a 70 25 3d 37  |   ."delus":p%=7|
0000eed0  0d 5b 90 19 20 20 20 20  20 20 20 20 c9 22 6d 6f  |.[..        ."mo|
0000eee0  64 75 73 22 3a 70 25 3d  38 0d 5b 9a 19 20 20 20  |dus":p%=8.[..   |
0000eef0  20 20 20 20 20 c9 22 61  64 64 67 72 22 3a 70 25  |     ."addgr":p%|
0000ef00  3d 39 0d 5b a4 1a 20 20  20 20 20 20 20 20 c9 22  |=9.[..        ."|
0000ef10  64 65 6c 67 72 22 3a 70  25 3d 31 30 0d 5b ae 22  |delgr":p%=10.[."|
0000ef20  20 20 20 20 20 20 20 20  c9 22 67 65 74 68 6f 22  |        ."getho"|
0000ef30  2c 22 73 65 74 68 6f 22  3a 70 25 3d 31 31 0d 5b  |,"setho":p%=11.[|
0000ef40  b8 22 20 20 20 20 20 20  20 20 c9 22 67 65 74 72  |."        ."getr|
0000ef50  65 22 2c 22 73 65 74 72  65 22 3a 70 25 3d 31 32  |e","setre":p%=12|
0000ef60  0d 5b c2 1a 20 20 20 20  20 20 20 20 c9 22 67 65  |.[..        ."ge|
0000ef70  74 69 6e 22 3a 70 25 3d  31 33 0d 5b cc 1a 20 20  |tin":p%=13.[..  |
0000ef80  20 20 20 20 20 20 c9 22  6d 6b 67 72 6f 22 3a 70  |      ."mkgro":p|
0000ef90  25 3d 31 34 0d 5b d6 1a  20 20 20 20 20 20 20 20  |%=14.[..        |
0000efa0  c9 22 73 74 61 74 75 22  3a 70 25 3d 31 35 0d 5b  |."statu":p%=15.[|
0000efb0  e0 1a 20 20 20 20 20 20  20 20 c9 22 73 74 61 72  |..        ."star|
0000efc0  74 22 3a 70 25 3d 31 36  0d 5b ea 1a 20 20 20 20  |t":p%=16.[..    |
0000efd0  20 20 20 20 c9 22 73 65  74 75 70 22 3a 70 25 3d  |    ."setup":p%=|
0000efe0  31 37 0d 5b f4 1a 20 20  20 20 20 20 20 20 c9 22  |17.[..        ."|
0000eff0  64 65 74 65 63 22 3a 70  25 3d 31 38 0d 5b fe 0b  |detec":p%=18.[..|
0000f000  20 20 20 20 20 20 cb 0d  5c 08 33 20 20 20 20 20  |      ..\.3     |
0000f010  20 e7 70 25 3e 30 8c 74  72 61 6e 73 63 24 28 6e  | .p%>0.transc$(n|
0000f020  25 2c 70 25 29 3d 61 24  3a 74 72 61 6e 73 6d 25  |%,p%)=a$:transm%|
0000f030  28 6e 25 2c 70 25 29 3d  6c 25 0d 5c 12 09 20 20  |(n%,p%)=l%.\..  |
0000f040  20 20 cb 0d 5c 1c 17 20  20 fd 28 c5 23 66 31 25  |  ..\..  .(.#f1%|
0000f050  29 3a f2 63 66 28 66 31  25 29 0d 5c 26 05 cd 0d  |):.cf(f1%).\&...|
0000f060  5c 30 05 e1 0d 5c 3a 04  0d 5c 44 10 dd f2 72 65  |\0...\:..\D...re|
0000f070  61 64 6e 65 77 73 72 63  0d 5c 4e 0b ea 63 6f 75  |adnewsrc.\N..cou|
0000f080  6e 74 25 0d 5c 58 23 61  63 74 69 76 65 24 28 29  |nt%.\X#active$()|
0000f090  3d 22 22 3a 61 63 74 69  76 65 24 28 30 29 3d 22  |="":active$(0)="|
0000f0a0  6a 75 6e 6b 2a 22 0d 5c  62 3a 66 31 25 3d a4 6f  |junk*".\b:f1%=.o|
0000f0b0  70 65 6e 69 6e 28 63 6f  6e 66 64 69 72 24 2b 22  |penin(confdir$+"|
0000f0c0  2e 22 2b 74 72 61 6e 73  24 28 74 72 61 6e 73 70  |."+trans$(transp|
0000f0d0  6f 72 74 25 29 2b 22 2e  67 72 6f 75 70 73 22 29  |ort%)+".groups")|
0000f0e0  0d 5c 6c 0c e7 66 31 25  3c 3e 30 8c 0d 5c 76 0e  |.\l..f1%<>0..\v.|
0000f0f0  20 20 63 6f 75 6e 74 25  3d 31 0d 5c 80 1c 20 20  |  count%=1.\..  |
0000f100  f5 41 24 3d a4 6c 6f 77  65 72 28 a4 73 67 65 74  |.A$=.lower(.sget|
0000f110  28 66 31 25 29 29 0d 5c  8a 24 20 20 20 20 61 63  |(f1%)).\.$    ac|
0000f120  74 69 76 65 24 28 63 6f  75 6e 74 25 29 3d 41 24  |tive$(count%)=A$|
0000f130  3a 63 6f 75 6e 74 25 2b  3d 31 0d 5c 94 1e 20 20  |:count%+=1.\..  |
0000f140  fd c5 23 66 31 25 84 63  6f 75 6e 74 25 3e 6d 61  |..#f1%.count%>ma|
0000f150  78 61 63 74 69 76 65 25  0d 5c 9e 0e 20 20 f2 63  |xactive%.\..  .c|
0000f160  66 28 66 31 25 29 0d 5c  a8 05 cd 0d 5c b2 15 6d  |f(f1%).\....\..m|
0000f170  61 78 61 63 74 69 76 65  25 3d 63 6f 75 6e 74 25  |axactive%=count%|
0000f180  0d 5c bc 05 e1 0d 5c c6  04 0d 5c d0 14 dd a4 61  |.\....\...\....a|
0000f190  63 74 69 76 65 28 67 72  6f 75 70 24 29 0d 5c da  |ctive(group$).\.|
0000f1a0  19 ea 67 24 2c 66 6c 61  67 25 2c 63 6f 75 6e 74  |..g$,flag%,count|
0000f1b0  25 2c 6e 65 67 25 0d 5c  e4 12 e7 67 72 6f 75 70  |%,neg%.\...group|
0000f1c0  24 3d 22 22 8c 3a 3d a3  0d 5c ee 1e e7 a4 73 70  |$="".:=..\....sp|
0000f1d0  65 63 69 61 6c 67 72 70  28 67 72 6f 75 70 24 29  |ecialgrp(group$)|
0000f1e0  3e 30 8c 3a 3d b9 0d 5c  f8 19 67 72 6f 75 70 24  |>0.:=..\..group$|
0000f1f0  3d a4 6c 6f 77 65 72 28  67 72 6f 75 70 24 29 0d  |=.lower(group$).|
0000f200  5d 02 14 66 6c 61 67 25  3d 30 3a 63 6f 75 6e 74  |]..flag%=0:count|
0000f210  25 3d 30 0d 5d 0c 05 f5  0d 5d 16 27 20 20 67 24  |%=0.]....].'  g$|
0000f220  3d a4 6c 6f 77 65 72 28  61 63 74 69 76 65 24 28  |=.lower(active$(|
0000f230  63 6f 75 6e 74 25 29 29  3a 6e 65 67 25 3d 30 0d  |count%)):neg%=0.|
0000f240  5d 20 1e 20 20 e7 97 67  24 3d 33 33 8c 67 24 3d  |] .  ..g$=33.g$=|
0000f250  c1 67 24 2c 32 29 3a 6e  65 67 25 3d 31 0d 5d 2a  |.g$,2):neg%=1.]*|
0000f260  2c 20 20 e7 a4 73 6d 61  74 63 68 28 67 24 2c 67  |,  ..smatch(g$,g|
0000f270  72 6f 75 70 24 29 3c 3e  30 20 8c 66 6c 61 67 25  |roup$)<>0 .flag%|
0000f280  3d 31 2b 33 2a 6e 65 67  25 0d 5d 34 21 20 20 63  |=1+3*neg%.]4!  c|
0000f290  6f 75 6e 74 25 2b 3d 31  3a e7 66 6c 61 67 25 3d  |ount%+=1:.flag%=|
0000f2a0  31 8c 66 6c 61 67 25 2b  3d 31 0d 5d 3e 12 fd 67  |1.flag%+=1.]>..g|
0000f2b0  24 3d 22 22 84 66 6c 61  67 25 3e 33 0d 5d 48 13  |$="".flag%>3.]H.|
0000f2c0  e7 6e 65 67 25 3d 31 8c  66 6c 61 67 25 3d 30 0d  |.neg%=1.flag%=0.|
0000f2d0  5d 52 0a 3d 66 6c 61 67  25 0d 5d 5c 04 0d 5d 66  |]R.=flag%.]\..]f|
0000f2e0  11 dd a4 69 73 61 63 68  65 66 28 67 24 29 0d 5d  |...isachef(g$).]|
0000f2f0  70 28 ea 79 65 73 25 2c  61 31 24 2c 61 32 24 2c  |p(.yes%,a1$,a2$,|
0000f300  61 33 24 2c 61 34 24 2c  61 35 24 2c 61 36 24 3a  |a3$,a4$,a5$,a6$:|
0000f310  79 65 73 25 3d 30 0d 5d  7a 0f e7 6b 69 6c 6c 63  |yes%=0.]z..killc|
0000f320  25 3c 3e 30 8c 0d 5d 84  17 61 31 24 3d a4 67 65  |%<>0..]..a1$=.ge|
0000f330  74 70 61 72 28 67 24 2c  22 2e 22 29 0d 5d 8e 0f  |tpar(g$,".").]..|
0000f340  e7 61 31 24 3d 22 61 6c  74 22 8c 0d 5d 98 2d 20  |.a1$="alt"..].- |
0000f350  20 61 32 24 3d a4 67 65  74 70 61 72 28 67 24 2c  | a2$=.getpar(g$,|
0000f360  22 2e 22 29 3a 61 33 24  3d a4 67 65 74 70 61 72  |"."):a3$=.getpar|
0000f370  28 67 24 2c 22 2e 22 29  0d 5d a2 2d 20 20 61 34  |(g$,".").].-  a4|
0000f380  24 3d a4 67 65 74 70 61  72 28 67 24 2c 22 2e 22  |$=.getpar(g$,"."|
0000f390  29 3a 61 35 24 3d a4 67  65 74 70 61 72 28 67 24  |):a5$=.getpar(g$|
0000f3a0  2c 22 2e 22 29 0d 5d ac  3b 20 20 e7 61 33 24 3d  |,".").].;  .a3$=|
0000f3b0  61 34 24 80 61 34 24 3d  61 35 24 80 61 35 24 3e  |a4$.a4$=a5$.a5$>|
0000f3c0  22 22 84 61 35 24 3d 61  36 24 80 61 34 24 3d 61  |"".a5$=a6$.a4$=a|
0000f3d0  35 24 80 61 36 24 3e 22  22 8c 79 65 73 25 3d b9  |5$.a6$>"".yes%=.|
0000f3e0  0d 5d b6 05 cd 0d 5d c0  05 cd 0d 5d ca 09 3d 79  |.]....]....]..=y|
0000f3f0  65 73 25 0d 5d d4 04 0d  5d de 15 dd f2 6d 65 73  |es%.]...]....mes|
0000f400  73 61 67 65 30 28 41 24  2c 77 25 29 0d 5d e8 1a  |sage0(A$,w%).]..|
0000f410  f2 6d 65 73 73 61 67 65  28 a4 6d 73 67 30 28 41  |.message(.msg0(A|
0000f420  24 29 2c 77 25 29 0d 5d  f2 05 e1 0d 5d fc 04 0d  |$),w%).]....]...|
0000f430  5e 06 18 dd f2 6d 65 73  73 61 67 65 31 28 41 24  |^....message1(A$|
0000f440  2c 42 24 2c 77 25 29 0d  5e 10 1d f2 6d 65 73 73  |,B$,w%).^...mess|
0000f450  61 67 65 28 a4 6d 73 67  31 28 41 24 2c 42 24 29  |age(.msg1(A$,B$)|
0000f460  2c 77 25 29 0d 5e 1a 05  e1 0d 5e 24 04 0d 5e 2e  |,w%).^....^$..^.|
0000f470  1b dd f2 6d 65 73 73 61  67 65 32 28 41 24 2c 42  |...message2(A$,B|
0000f480  24 2c 43 24 2c 77 25 29  0d 5e 38 20 f2 6d 65 73  |$,C$,w%).^8 .mes|
0000f490  73 61 67 65 28 a4 6d 73  67 32 28 41 24 2c 42 24  |sage(.msg2(A$,B$|
0000f4a0  2c 43 24 29 2c 77 25 29  0d 5e 42 05 e1 0d 5e 4c  |,C$),w%).^B...^L|
0000f4b0  04 0d 5e 56 17 dd f2 6d  65 73 73 61 67 65 28 41  |..^V...message(A|
0000f4c0  24 2c 77 61 69 74 25 29  0d 5e 60 1a e7 41 24 3d  |$,wait%).^`..A$=|
0000f4d0  22 22 f2 63 6c 6f 73 65  77 28 6d 73 67 77 25 29  |"".closew(msgw%)|
0000f4e0  3a e1 0d 5e 6a 27 f2 75  70 64 61 74 65 69 63 6f  |:..^j'.updateico|
0000f4f0  6e 73 74 72 69 6e 67 28  6d 73 67 77 25 2c 30 2c  |nstring(msgw%,0,|
0000f500  c0 41 24 2c 31 32 37 29  29 0d 5e 74 57 e7 77 61  |.A$,127)).^tW.wa|
0000f510  69 74 25 3d 30 8c f2 75  70 64 61 74 65 69 63 6f  |it%=0..updateico|
0000f520  6e 73 74 72 69 6e 67 28  6d 73 67 77 25 2c 32 2c  |nstring(msgw%,2,|
0000f530  22 44 69 73 6d 69 73 73  22 29 8b f2 75 70 64 61  |"Dismiss")..upda|
0000f540  74 65 69 63 6f 6e 73 74  72 69 6e 67 28 6d 73 67  |teiconstring(msg|
0000f550  77 25 2c 32 2c 22 43 6f  6e 74 69 6e 75 65 22 29  |w%,2,"Continue")|
0000f560  0d 5e 7e 33 e7 6d 73 67  6f 70 65 6e 25 3d 30 8c  |.^~3.msgopen%=0.|
0000f570  f2 63 66 72 6f 6e 74 28  6d 73 67 77 25 2c 30 2c  |.cfront(msgw%,0,|
0000f580  2d 31 31 30 29 8b f2 66  72 6f 6e 74 28 6d 73 67  |-110)..front(msg|
0000f590  77 25 29 0d 5e 88 0e 6d  73 67 6f 70 65 6e 25 3d  |w%).^..msgopen%=|
0000f5a0  31 0d 5e 92 0b e7 77 61  69 74 25 8c 0d 5e 9c 1d  |1.^...wait%..^..|
0000f5b0  20 20 f5 f2 70 6f 6c 6c  28 32 30 30 29 3a fd 6d  |  ..poll(200):.m|
0000f5c0  73 67 6f 70 65 6e 25 3d  a3 0d 5e a6 05 cd 0d 5e  |sgopen%=..^....^|
0000f5d0  b0 05 e1 0d 5e ba 04 0d  5e c4 10 dd f2 72 65 61  |....^...^....rea|
0000f5e0  64 63 6f 6e 66 69 67 0d  5e ce 0a ea 63 76 65 72  |dconfig.^...cver|
0000f5f0  25 0d 5e d8 26 66 31 25  3d a4 6f 70 65 6e 69 6e  |%.^.&f1%=.openin|
0000f600  28 63 6f 6e 66 64 69 72  24 2b 22 2e 21 6e 62 63  |(confdir$+".!nbc|
0000f610  6f 6e 66 69 67 22 29 0d  5e e2 0c e7 66 31 25 3c  |onfig").^...f1%<|
0000f620  3e 30 8c 0d 5e ec 16 20  20 63 76 65 72 25 3d 31  |>0..^..  cver%=1|
0000f630  30 30 2a bb be 23 66 31  25 0d 5e f6 10 20 20 e7  |00*..#f1%.^..  .|
0000f640  63 76 65 72 25 3e 34 36  8c 0d 5f 00 17 20 20 20  |cver%>46.._..   |
0000f650  20 68 6f 73 74 6e 61 6d  65 24 3d be 23 66 31 25  | hostname$=.#f1%|
0000f660  0d 5f 0a 38 20 20 20 20  72 65 6d 6f 74 65 68 6f  |._.8    remoteho|
0000f670  73 74 24 3d be 23 66 31  25 3a e7 a9 72 65 6d 6f  |st$=.#f1%:..remo|
0000f680  74 65 68 6f 73 74 24 3c  32 8c 72 65 6d 6f 74 65  |tehost$<2.remote|
0000f690  68 6f 73 74 24 3d 22 22  0d 5f 14 2a 20 20 20 20  |host$=""._.*    |
0000f6a0  74 72 61 6e 73 70 6f 72  74 25 3d a4 74 72 61 6e  |transport%=.tran|
0000f6b0  73 6e 6f 28 a4 6c 6f 77  65 72 28 be 23 66 31 25  |sno(.lower(.#f1%|
0000f6c0  29 29 0d 5f 1e 12 20 20  20 20 6f 72 67 24 3d be  |))._..    org$=.|
0000f6d0  23 66 31 25 0d 5f 28 18  20 20 20 20 64 65 66 63  |#f1%._(.    defc|
0000f6e0  6c 69 65 6e 74 24 3d be  23 66 31 25 0d 5f 32 14  |lient$=.#f1%._2.|
0000f6f0  20 20 20 20 6d 6f 64 67  77 24 3d be 23 66 31 25  |    modgw$=.#f1%|
0000f700  0d 5f 3c 39 20 20 20 20  74 69 6d 65 7a 6f 6e 65  |._<9    timezone|
0000f710  24 3d be 23 66 31 25 3a  e7 74 69 6d 65 7a 6f 6e  |$=.#f1%:.timezon|
0000f720  65 24 3d 22 22 8c 74 69  6d 65 7a 6f 6e 65 24 3d  |e$="".timezone$=|
0000f730  a4 74 69 6d 65 7a 6f 6e  65 0d 5f 46 39 20 20 20  |.timezone._F9   |
0000f740  20 6d 61 69 6c 6e 61 6d  65 24 3d be 23 66 31 25  | mailname$=.#f1%|
0000f750  3a e7 6d 61 69 6c 6e 61  6d 65 24 3d 22 22 8c 6d  |:.mailname$="".m|
0000f760  61 69 6c 6e 61 6d 65 24  3d 68 6f 73 74 6e 61 6d  |ailname$=hostnam|
0000f770  65 24 0d 5f 50 13 20 20  20 20 6d 6e 67 77 24 3d  |e$._P.    mngw$=|
0000f780  be 23 66 31 25 0d 5f 5a  10 20 20 20 20 41 24 3d  |.#f1%._Z.    A$=|
0000f790  be 23 66 31 25 0d 5f 64  10 20 20 20 20 41 24 3d  |.#f1%._d.    A$=|
0000f7a0  be 23 66 31 25 0d 5f 6e  10 20 20 20 20 41 24 3d  |.#f1%._n.    A$=|
0000f7b0  be 23 66 31 25 0d 5f 78  10 20 20 20 20 41 24 3d  |.#f1%._x.    A$=|
0000f7c0  be 23 66 31 25 0d 5f 82  17 20 20 20 20 6c 6f 67  |.#f1%._..    log|
0000f7d0  66 69 6c 65 25 3d bb be  23 66 31 25 0d 5f 8c 17  |file%=..#f1%._..|
0000f7e0  20 20 20 20 61 75 74 6f  65 78 70 25 3d bb be 23  |    autoexp%=..#|
0000f7f0  66 31 25 0d 5f 96 18 20  20 20 20 6b 65 65 70 6f  |f1%._..    keepo|
0000f800  75 74 67 25 3d bb be 23  66 31 25 0d 5f a0 16 20  |utg%=..#f1%._.. |
0000f810  20 20 20 64 65 66 65 78  70 25 3d bb be 23 66 31  |   defexp%=..#f1|
0000f820  25 0d 5f aa 15 20 20 20  20 6b 65 65 70 62 25 3d  |%._..    keepb%=|
0000f830  bb be 23 66 31 25 0d 5f  b4 15 20 20 20 20 64 65  |..#f1%._..    de|
0000f840  6c 6f 6b 25 3d bb be 23  66 31 25 0d 5f be 14 20  |lok%=..#f1%._.. |
0000f850  20 20 20 66 61 73 74 25  3d bb be 23 66 31 25 0d  |   fast%=..#f1%.|
0000f860  5f c8 15 20 20 20 20 61  6c 65 72 74 25 3d bb be  |_..    alert%=..|
0000f870  23 66 31 25 0d 5f d2 19  20 20 20 20 61 6c 65 72  |#f1%._..    aler|
0000f880  74 62 65 65 70 25 3d bb  be 23 66 31 25 0d 5f dc  |tbeep%=..#f1%._.|
0000f890  19 20 20 20 20 61 6c 65  72 74 6e 65 77 73 25 3d  |.    alertnews%=|
0000f8a0  bb be 23 66 31 25 0d 5f  e6 18 20 20 20 20 75 73  |..#f1%._..    us|
0000f8b0  65 72 63 74 72 6c 25 3d  bb be 23 66 31 25 0d 5f  |erctrl%=..#f1%._|
0000f8c0  f0 17 20 20 20 20 65 78  70 6d 61 69 6c 25 3d bb  |..    expmail%=.|
0000f8d0  be 23 66 31 25 0d 5f fa  1b 20 20 20 20 61 75 74  |.#f1%._..    aut|
0000f8e0  6f 64 65 62 61 74 63 68  25 3d bb be 23 66 31 25  |odebatch%=..#f1%|
0000f8f0  0d 60 04 14 20 20 20 20  6d 6e 67 77 25 3d bb be  |.`..    mngw%=..|
0000f900  23 66 31 25 0d 60 0e 28  20 20 20 20 6e 67 65 78  |#f1%.`.(    ngex|
0000f910  70 25 3d bb be 23 66 31  25 3a e7 6e 67 65 78 70  |p%=..#f1%:.ngexp|
0000f920  25 3d 30 8c 6e 67 65 78  70 25 3d 37 0d 60 18 12  |%=0.ngexp%=7.`..|
0000f930  20 20 20 20 e7 63 76 65  72 25 3e 34 39 8c 0d 60  |    .cver%>49..`|
0000f940  22 18 20 20 20 20 20 20  64 6f 63 61 6e 63 25 3d  |".      docanc%=|
0000f950  bb be 23 66 31 25 0d 60  2c 17 20 20 20 20 20 20  |..#f1%.`,.      |
0000f960  6b 69 6c 6c 63 25 3d bb  be 23 66 31 25 0d 60 36  |killc%=..#f1%.`6|
0000f970  1b 20 20 20 20 20 20 64  6f 72 65 63 65 69 70 74  |.      doreceipt|
0000f980  25 3d bb be 23 66 31 25  0d 60 40 17 20 20 20 20  |%=..#f1%.`@.    |
0000f990  20 20 69 67 65 78 70 25  3d bb be 23 66 31 25 0d  |  igexp%=..#f1%.|
0000f9a0  60 4a 14 20 20 20 20 20  20 e7 63 76 65 72 25 3e  |`J.      .cver%>|
0000f9b0  35 31 8c 0d 60 54 1a 20  20 20 20 20 20 20 20 74  |51..`T.        t|
0000f9c0  68 72 65 61 64 25 3d bb  be 23 66 31 25 0d 60 5e  |hread%=..#f1%.`^|
0000f9d0  1c 20 20 20 20 20 20 20  20 63 6f 6d 70 72 65 73  |.        compres|
0000f9e0  73 25 3d bb be 23 66 31  25 0d 60 68 3b 20 20 20  |s%=..#f1%.`h;   |
0000f9f0  20 20 20 20 20 63 6f 6d  70 6c 69 6d 69 74 25 3d  |     complimit%=|
0000fa00  bb be 23 66 31 25 3a e7  63 6f 6d 70 6c 69 6d 69  |..#f1%:.complimi|
0000fa10  74 25 3d 30 8c 63 6f 6d  70 6c 69 6d 69 74 25 3d  |t%=0.complimit%=|
0000fa20  32 30 34 38 0d 60 72 1a  20 20 20 20 20 20 20 20  |2048.`r.        |
0000fa30  65 78 70 61 6e 79 25 3d  bb be 23 66 31 25 0d 60  |expany%=..#f1%.`|
0000fa40  7c 1b 20 20 20 20 20 20  20 20 65 78 70 74 69 6d  ||.        exptim|
0000fa50  65 25 3d bb be 23 66 31  25 0d 60 86 32 20 20 20  |e%=..#f1%.`.2   |
0000fa60  20 20 20 20 20 6d 69 6e  64 73 6b 25 3d bb be 23  |     mindsk%=..#|
0000fa70  66 31 25 3a e7 6d 69 6e  64 73 6b 25 3d 30 8c 6d  |f1%:.mindsk%=0.m|
0000fa80  69 6e 64 73 6b 25 3d 31  30 32 34 0d 60 90 0b 20  |indsk%=1024.`.. |
0000fa90  20 20 20 20 20 cd 0d 60  9a 09 20 20 20 20 cd 0d  |     ..`..    ..|
0000faa0  60 a4 07 20 20 cd 0d 60  ae 0e 20 20 f2 63 66 28  |`..  ..`..  .cf(|
0000fab0  66 31 25 29 0d 60 b8 05  cd 0d 60 c2 1a f2 73 65  |f1%).`....`...se|
0000fac0  74 63 6f 6e 66 69 67 3a  f2 73 65 74 73 79 73 76  |tconfig:.setsysv|
0000fad0  61 72 73 0d 60 cc 1f c8  99 22 4f 53 5f 42 79 74  |ars.`...."OS_Byt|
0000fae0  65 22 2c 31 32 31 2c 28  32 82 26 38 30 29 b8 2c  |e",121,(2.&80).,|
0000faf0  41 25 0d 60 d6 23 e7 63  76 65 72 25 3c 76 65 72  |A%.`.#.cver%<ver|
0000fb00  25 80 72 77 25 8c f2 6e  65 77 75 73 65 72 28 63  |%.rw%..newuser(c|
0000fb10  76 65 72 25 29 0d 60 e0  18 e7 41 25 3d 26 46 46  |ver%).`...A%=&FF|
0000fb20  20 8c 69 6e 69 74 63 6f  6e 66 25 3d 31 0d 60 ea  | .initconf%=1.`.|
0000fb30  2c e7 63 76 65 72 25 3c  34 37 80 72 77 25 8c f2  |,.cver%<47.rw%..|
0000fb40  69 6e 69 74 74 72 61 6e  73 70 6f 72 74 3a 69 6e  |inittransport:in|
0000fb50  69 74 63 6f 6e 66 25 3d  32 0d 60 f4 05 e1 0d 60  |itconf%=2.`....`|
0000fb60  fe 04 0d 61 08 11 dd f2  6e 65 77 75 73 65 72 28  |...a....newuser(|
0000fb70  74 25 29 0d 61 12 1b ea  46 25 2c 74 24 3a e7 74  |t%).a...F%,t$:.t|
0000fb80  25 3e 30 80 74 25 3c 34  37 8c 74 25 3d 31 0d 61  |%>0.t%<47.t%=1.a|
0000fb90  1c 28 f2 6e 75 63 70 28  74 25 29 3a 74 24 3d a4  |.(.nucp(t%):t$=.|
0000fba0  6d 73 67 31 28 22 53 77  65 6c 63 6f 6d 65 31 22  |msg1("Swelcome1"|
0000fbb0  2c 76 65 72 24 29 0d 61  26 09 c8 8e 74 25 ca 0d  |,ver$).a&...t%..|
0000fbc0  61 30 22 c9 30 3a f2 6d  65 73 73 61 67 65 31 28  |a0".0:.message1(|
0000fbd0  22 53 77 65 6c 63 6f 6d  65 32 22 2c 74 24 2c 30  |"Swelcome2",t$,0|
0000fbe0  29 0d 61 3a 22 c9 31 3a  f2 6d 65 73 73 61 67 65  |).a:".1:.message|
0000fbf0  31 28 22 53 77 65 6c 63  6f 6d 65 33 22 2c 74 24  |1("Swelcome3",t$|
0000fc00  2c 31 29 0d 61 44 2d 7f  3a f2 6d 65 73 73 61 67  |,1).aD-.:.messag|
0000fc10  65 31 28 22 53 77 65 6c  63 6f 6d 65 34 22 2c 74  |e1("Swelcome4",t|
0000fc20  24 2c 31 29 3a f2 73 61  76 65 63 6f 6e 66 69 67  |$,1):.saveconfig|
0000fc30  0d 61 4e 05 cb 0d 61 58  0c f2 70 6f 6c 6c 28 30  |.aN...aX..poll(0|
0000fc40  29 0d 61 62 05 e1 0d 61  6c 04 0d 61 76 0e dd f2  |).ab...al..av...|
0000fc50  6e 75 63 70 28 74 25 29  0d 61 80 0b ea 66 31 24  |nucp(t%).a...f1$|
0000fc60  2c 46 25 0d 61 8a 2e f4  20 63 6f 70 79 20 6e 65  |,F%.a... copy ne|
0000fc70  77 75 73 65 72 2f 75 70  64 61 74 65 20 6d 65 73  |wuser/update mes|
0000fc80  73 61 67 65 73 20 74 6f  20 77 6f 72 6b 20 64 69  |sages to work di|
0000fc90  72 0d 61 94 30 f4 20 62  75 74 20 64 65 6c 65 74  |r.a.0. but delet|
0000fca0  65 20 74 68 65 6d 20 69  66 20 64 65 63 6f 6d 70  |e them if decomp|
0000fcb0  72 65 73 73 69 6f 6e 20  66 61 69 6c 73 2e 2e 2e  |ression fails...|
0000fcc0  21 0d 61 9e 2f e7 74 25  3d 30 8c 73 24 3d 22 2e  |!.a./.t%=0.s$=".|
0000fcd0  77 65 6c 63 6f 6d 65 2e  6e 65 77 5f 22 8b 73 24  |welcome.new_".s$|
0000fce0  3d 22 2e 77 65 6c 63 6f  6d 65 2e 75 70 64 5f 22  |=".welcome.upd_"|
0000fcf0  0d 61 a8 1e 66 31 24 3d  77 6f 72 6b 64 69 72 24  |.a..f1$=workdir$|
0000fd00  2b 22 2e 70 6f 73 74 6d  61 73 74 65 72 22 0d 61  |+".postmaster".a|
0000fd10  b2 28 46 25 3d a4 63 6f  70 79 66 69 6c 65 28 73  |.(F%=.copyfile(s|
0000fd20  75 70 70 6f 72 74 24 2b  73 24 2b 22 6d 61 69 6c  |upport$+s$+"mail|
0000fd30  22 2c 66 31 24 29 0d 61  bc 1d 66 31 24 3d 77 6f  |",f1$).a..f1$=wo|
0000fd40  72 6b 64 69 72 24 2b 22  2e 6c 6f 63 61 6c 6e 65  |rkdir$+".localne|
0000fd50  77 73 22 0d 61 c6 28 46  25 3d a4 63 6f 70 79 66  |ws".a.(F%=.copyf|
0000fd60  69 6c 65 28 73 75 70 70  6f 72 74 24 2b 73 24 2b  |ile(support$+s$+|
0000fd70  22 6e 65 77 73 22 2c 66  31 24 29 0d 61 d0 05 e1  |"news",f1$).a...|
0000fd80  0d 61 da 04 0d 61 e4 0f  dd f2 73 65 74 63 6f 6e  |.a...a....setcon|
0000fd90  66 69 67 0d 61 ee 07 ea  6c 25 0d 61 f8 1d f2 73  |fig.a...l%.a...s|
0000fda0  65 74 69 6e 76 28 67 77  69 6e 25 2c 32 37 2c 64  |etinv(gwin%,27,d|
0000fdb0  6f 63 61 6e 63 25 29 0d  62 02 1c f2 73 65 74 69  |ocanc%).b...seti|
0000fdc0  6e 76 28 67 77 69 6e 25  2c 32 38 2c 6b 69 6c 6c  |nv(gwin%,28,kill|
0000fdd0  63 25 29 0d 62 0c 1e f2  73 65 74 69 6e 76 28 67  |c%).b...setinv(g|
0000fde0  77 69 6e 25 2c 32 39 2c  61 75 74 6f 65 78 70 25  |win%,29,autoexp%|
0000fdf0  29 0d 62 16 1c f2 73 65  74 69 6e 76 28 67 77 69  |).b...setinv(gwi|
0000fe00  6e 25 2c 33 33 2c 69 67  65 78 70 25 29 0d 62 20  |n%,33,igexp%).b |
0000fe10  1d f2 73 65 74 69 6e 76  28 67 77 69 6e 25 2c 33  |..setinv(gwin%,3|
0000fe20  34 2c 74 68 72 65 61 64  25 29 0d 62 2a 3e f2 73  |4,thread%).b*>.s|
0000fe30  65 74 69 6e 76 28 67 77  69 6e 25 2c 33 31 2c 65  |etinv(gwin%,31,e|
0000fe40  78 70 6d 61 69 6c 25 29  3a f2 73 65 74 69 6e 76  |xpmail%):.setinv|
0000fe50  28 67 77 69 6e 25 2c 33  30 2c 2d 28 65 78 70 6d  |(gwin%,30,-(expm|
0000fe60  61 69 6c 25 3d 30 29 29  0d 62 34 3c f2 73 65 74  |ail%=0)).b4<.set|
0000fe70  69 6e 76 28 67 77 69 6e  25 2c 33 36 2c 65 78 70  |inv(gwin%,36,exp|
0000fe80  61 6e 79 25 29 3a f2 73  65 74 69 6e 76 28 67 77  |any%):.setinv(gw|
0000fe90  69 6e 25 2c 33 35 2c 2d  28 65 78 70 61 6e 79 25  |in%,35,-(expany%|
0000fea0  3d 30 29 29 0d 62 3e 27  f2 75 70 64 61 74 65 69  |=0)).b>'.updatei|
0000feb0  63 6f 6e 73 74 72 69 6e  67 28 67 77 69 6e 25 2c  |constring(gwin%,|
0000fec0  32 2c c3 64 65 66 65 78  70 25 29 0d 62 48 27 f2  |2,.defexp%).bH'.|
0000fed0  75 70 64 61 74 65 69 63  6f 6e 73 74 72 69 6e 67  |updateiconstring|
0000fee0  28 67 77 69 6e 25 2c 32  32 2c c3 6e 67 65 78 70  |(gwin%,22,.ngexp|
0000fef0  25 29 0d 62 52 1f f2 73  65 74 69 6e 76 28 75 77  |%).bR..setinv(uw|
0000ff00  69 6e 25 2c 31 30 2c 6b  65 65 70 6f 75 74 67 25  |in%,10,keepoutg%|
0000ff10  29 0d 62 5c 1f f2 73 65  74 69 6e 76 28 75 77 69  |).b\..setinv(uwi|
0000ff20  6e 25 2c 31 31 2c 75 73  65 72 63 74 72 6c 25 29  |n%,11,userctrl%)|
0000ff30  0d 62 66 1c f2 73 65 74  69 6e 76 28 75 77 69 6e  |.bf..setinv(uwin|
0000ff40  25 2c 31 32 2c 64 65 6c  6f 6b 25 29 0d 62 70 1c  |%,12,delok%).bp.|
0000ff50  f2 73 65 74 69 6e 76 28  67 73 65 74 75 70 25 2c  |.setinv(gsetup%,|
0000ff60  33 2c 66 61 73 74 25 29  0d 62 7a 1f f2 73 65 74  |3,fast%).bz..set|
0000ff70  69 6e 76 28 67 73 65 74  75 70 25 2c 36 2c 6c 6f  |inv(gsetup%,6,lo|
0000ff80  67 66 69 6c 65 25 29 0d  62 84 21 f2 73 65 74 69  |gfile%).b.!.seti|
0000ff90  6e 76 28 67 73 65 74 75  70 25 2c 37 2c 64 6f 72  |nv(gsetup%,7,dor|
0000ffa0  65 63 65 69 70 74 25 29  0d 62 8e 20 f2 73 65 74  |eceipt%).b. .set|
0000ffb0  69 6e 76 28 67 73 65 74  75 70 25 2c 38 2c 63 6f  |inv(gsetup%,8,co|
0000ffc0  6d 70 72 65 73 73 25 29  0d 62 98 1d f2 73 65 74  |mpress%).b...set|
0000ffd0  69 6e 76 28 67 73 65 74  75 70 25 2c 39 2c 6b 65  |inv(gsetup%,9,ke|
0000ffe0  65 70 62 25 29 0d 62 a2  1e f2 73 65 74 69 6e 76  |epb%).b...setinv|
0000fff0  28 67 73 65 74 75 70 25  2c 31 30 2c 61 6c 65 72  |(gsetup%,10,aler|
00010000  74 25 29 0d 62 ac 3d f2  73 65 74 69 6e 76 28 67  |t%).b.=.setinv(g|
00010010  73 65 74 75 70 25 2c 31  31 2c 61 75 74 6f 64 65  |setup%,11,autode|
00010020  62 61 74 63 68 25 29 3a  63 68 65 63 6b 66 69 6c  |batch%):checkfil|
00010030  65 73 25 3d 61 75 74 6f  64 65 62 61 74 63 68 25  |es%=autodebatch%|
00010040  0d 62 b6 22 f2 73 65 74  69 6e 76 28 67 73 65 74  |.b.".setinv(gset|
00010050  75 70 25 2c 31 32 2c 61  6c 65 72 74 62 65 65 70  |up%,12,alertbeep|
00010060  25 29 0d 62 c0 46 f2 73  65 74 69 6e 76 28 67 73  |%).b.F.setinv(gs|
00010070  65 74 75 70 25 2c 31 34  2c 61 6c 65 72 74 6e 65  |etup%,14,alertne|
00010080  77 73 25 29 3a f2 73 65  74 69 6e 76 28 67 73 65  |ws%):.setinv(gse|
00010090  74 75 70 25 2c 31 33 2c  2d 28 61 6c 65 72 74 6e  |tup%,13,-(alertn|
000100a0  65 77 73 25 3d 30 29 29  0d 62 ca 1d f2 73 65 74  |ews%=0)).b...set|
000100b0  69 6e 76 28 67 73 65 74  75 70 25 2c 32 30 2c 6d  |inv(gsetup%,20,m|
000100c0  6e 67 77 25 29 0d 62 d4  2d f2 75 70 64 61 74 65  |ngw%).b.-.update|
000100d0  69 63 6f 6e 73 74 72 69  6e 67 28 67 73 65 74 75  |iconstring(gsetu|
000100e0  70 25 2c 32 33 2c c3 63  6f 6d 70 6c 69 6d 69 74  |p%,23,.complimit|
000100f0  25 29 0d 62 de 2a f2 75  70 64 61 74 65 69 63 6f  |%).b.*.updateico|
00010100  6e 73 74 72 69 6e 67 28  67 73 65 74 75 70 25 2c  |nstring(gsetup%,|
00010110  32 36 2c c3 6d 69 6e 64  73 6b 25 29 0d 62 e8 2b  |26,.mindsk%).b.+|
00010120  f2 73 65 74 69 63 6f 6e  73 74 72 69 6e 67 28 67  |.seticonstring(g|
00010130  77 69 6e 25 2c 31 32 2c  22 43 75 72 72 65 6e 74  |win%,12,"Current|
00010140  20 6c 69 73 74 22 29 0d  62 f2 46 e3 6c 25 3d 33  | list").b.F.l%=3|
00010150  b8 34 3a f2 73 65 74 73  68 61 64 65 64 28 75 77  |.4:.setshaded(uw|
00010160  69 6e 25 2c 6c 25 2c 28  6b 65 65 70 6f 75 74 67  |in%,l%,(keepoutg|
00010170  25 3d 30 29 29 3a ed 6c  25 3a f4 20 6b 65 65 70  |%=0)):.l%:. keep|
00010180  20 6f 75 74 67 6f 69 6e  67 20 6d 2f 6e 0d 62 fc  | outgoing m/n.b.|
00010190  46 e3 6c 25 3d 33 30 b8  33 31 3a f2 73 65 74 73  |F.l%=30.31:.sets|
000101a0  68 61 64 65 64 28 67 77  69 6e 25 2c 6c 25 2c 28  |haded(gwin%,l%,(|
000101b0  61 75 74 6f 65 78 70 25  3d 30 29 29 3a ed 6c 25  |autoexp%=0)):.l%|
000101c0  3a f4 20 6d 61 69 6c 2f  6e 65 77 73 20 65 78 70  |:. mail/news exp|
000101d0  69 72 79 0d 63 06 45 e3  6c 25 3d 33 35 b8 34 31  |iry.c.E.l%=35.41|
000101e0  3a f2 73 65 74 73 68 61  64 65 64 28 67 77 69 6e  |:.setshaded(gwin|
000101f0  25 2c 6c 25 2c 28 61 75  74 6f 65 78 70 25 3d 30  |%,l%,(autoexp%=0|
00010200  29 29 3a ed 6c 25 3a f4  20 65 78 70 69 72 79 20  |)):.l%:. expiry |
00010210  73 63 68 65 64 75 6c 65  0d 63 10 43 e3 6c 25 3d  |schedule.c.C.l%=|
00010220  31 32 b8 31 34 3a f2 73  65 74 73 68 61 64 65 64  |12.14:.setshaded|
00010230  28 67 73 65 74 75 70 25  2c 6c 25 2c 28 61 6c 65  |(gsetup%,l%,(ale|
00010240  72 74 25 3d 30 29 29 3a  ed 6c 25 3a f4 20 6e 65  |rt%=0)):.l%:. ne|
00010250  77 20 6d 61 69 6c 2f 6e  65 77 73 0d 63 1a 19 f2  |w mail/news.c...|
00010260  73 65 74 74 72 61 6e 73  28 74 72 61 6e 73 70 6f  |settrans(transpo|
00010270  72 74 25 29 0d 63 24 1f  e7 6d 6f 64 67 77 24 3d  |rt%).c$..modgw$=|
00010280  22 22 8c 6d 6f 64 67 77  24 3d 6d 6f 64 67 77 24  |"".modgw$=modgw$|
00010290  28 30 29 0d 63 2e 15 f2  73 65 74 6d 6f 64 67 77  |(0).c...setmodgw|
000102a0  28 6d 6f 64 67 77 24 29  0d 63 38 13 f2 73 65 74  |(modgw$).c8..set|
000102b0  6d 6e 67 77 28 6d 6e 67  77 24 29 0d 63 42 10 f2  |mngw(mngw$).cB..|
000102c0  64 69 73 70 65 78 70 74  69 6d 65 0d 63 4c 26 f2  |dispexptime.cL&.|
000102d0  75 70 64 61 74 65 69 63  6f 6e 73 74 72 69 6e 67  |updateiconstring|
000102e0  28 73 69 74 65 77 69 6e  25 2c 33 2c 6f 72 67 24  |(sitewin%,3,org$|
000102f0  29 0d 63 56 17 f2 73 65  74 68 6f 73 74 3a f2 73  |).cV..sethost:.s|
00010300  65 74 63 6c 69 65 6e 74  0d 63 60 16 73 6c 69 63  |etclient.c`.slic|
00010310  65 25 3d a4 63 70 75 28  66 61 73 74 25 29 0d 63  |e%=.cpu(fast%).c|
00010320  6a 05 e1 0d 63 74 04 0d  63 7e 15 dd f2 6d 6f 64  |j...ct..c~...mod|
00010330  65 78 70 28 63 68 25 2c  63 6d 25 29 0d 63 88 0a  |exp(ch%,cm%).c..|
00010340  ea 68 25 2c 6d 25 0d 63  92 23 68 25 3d 65 78 70  |.h%,m%.c.#h%=exp|
00010350  74 69 6d 65 25 81 31 30  30 3a 6d 25 3d 65 78 70  |time%.100:m%=exp|
00010360  74 69 6d 65 25 83 31 30  30 0d 63 9c 0b 6d 25 2b  |time%.100.c..m%+|
00010370  3d 63 6d 25 0d 63 a6 15  e7 6d 25 3e 35 39 8c 63  |=cm%.c...m%>59.c|
00010380  68 25 3d 31 3a 6d 25 3d  30 0d 63 b0 16 e7 6d 25  |h%=1:m%=0.c...m%|
00010390  3c 30 8c 63 68 25 3d 2d  31 3a 6d 25 3d 35 39 0d  |<0.ch%=-1:m%=59.|
000103a0  63 ba 0b 68 25 2b 3d 63  68 25 0d 63 c4 0f e7 68  |c..h%+=ch%.c...h|
000103b0  25 3c 30 8c 68 25 3d 32  33 0d 63 ce 0f e7 68 25  |%<0.h%=23.c...h%|
000103c0  3e 32 33 8c 68 25 3d 30  0d 63 d8 23 65 78 70 74  |>23.h%=0.c.#expt|
000103d0  69 6d 65 25 3d 68 25 2a  31 30 30 2b 6d 25 3a f2  |ime%=h%*100+m%:.|
000103e0  64 69 73 70 65 78 70 74  69 6d 65 0d 63 e2 05 e1  |dispexptime.c...|
000103f0  0d 63 ec 04 0d 63 f6 11  dd f2 64 69 73 70 65 78  |.c...c....dispex|
00010400  70 74 69 6d 65 0d 64 00  0d ea 61 24 2c 68 24 2c  |ptime.d...a$,h$,|
00010410  6d 24 0d 64 0a 39 68 24  3d c2 22 30 22 2b c3 28  |m$.d.9h$=."0"+.(|
00010420  65 78 70 74 69 6d 65 25  81 31 30 30 29 2c 32 29  |exptime%.100),2)|
00010430  3a 6d 24 3d c2 22 30 22  2b c3 28 65 78 70 74 69  |:m$=."0"+.(expti|
00010440  6d 65 25 83 31 30 30 29  2c 32 29 0d 64 14 14 e7  |me%.100),2).d...|
00010450  68 24 3d 22 30 30 22 8c  68 24 3d 22 31 32 22 0d  |h$="00".h$="12".|
00010460  64 1e 10 61 24 3d 68 24  2b 22 3a 22 2b 6d 24 0d  |d..a$=h$+":"+m$.|
00010470  64 28 26 e7 65 78 70 74  69 6d 65 25 3e 31 31 35  |d(&.exptime%>115|
00010480  39 8c 61 24 2b 3d 22 20  70 6d 22 8b 61 24 2b 3d  |9.a$+=" pm".a$+=|
00010490  22 20 61 6d 22 0d 64 32  22 f2 75 70 64 61 74 65  |" am".d2".update|
000104a0  69 63 6f 6e 73 74 72 69  6e 67 28 67 77 69 6e 25  |iconstring(gwin%|
000104b0  2c 34 31 2c 61 24 29 0d  64 3c 05 e1 0d 64 46 04  |,41,a$).d<...dF.|
000104c0  0d 64 50 12 dd f2 73 65  74 6d 6f 64 67 77 28 67  |.dP...setmodgw(g|
000104d0  24 29 0d 64 5a 28 f2 75  70 64 61 74 65 69 63 6f  |$).dZ(.updateico|
000104e0  6e 73 74 72 69 6e 67 28  67 73 65 74 75 70 25 2c  |nstring(gsetup%,|
000104f0  31 2c c0 67 24 2c 34 31  29 29 0d 64 64 05 e1 0d  |1,.g$,41)).dd...|
00010500  64 6e 04 0d 64 78 11 dd  f2 73 65 74 6d 6e 67 77  |dn..dx...setmngw|
00010510  28 67 24 29 0d 64 82 29  f2 75 70 64 61 74 65 69  |(g$).d.).updatei|
00010520  63 6f 6e 73 74 72 69 6e  67 28 67 73 65 74 75 70  |constring(gsetup|
00010530  25 2c 31 38 2c c0 67 24  2c 34 31 29 29 0d 64 8c  |%,18,.g$,41)).d.|
00010540  05 e1 0d 64 96 04 0d 64  a0 12 dd f2 73 65 74 74  |...d...d....sett|
00010550  72 61 6e 73 28 74 25 29  0d 64 aa 0e e7 74 25 3c  |rans(t%).d...t%<|
00010560  30 8c 74 25 3d 30 0d 64  b4 44 f2 75 70 64 61 74  |0.t%=0.d.D.updat|
00010570  65 69 63 6f 6e 73 74 72  69 6e 67 28 73 69 74 65  |eiconstring(site|
00010580  77 69 6e 25 2c 31 31 2c  c0 74 72 61 6e 73 24 28  |win%,11,.trans$(|
00010590  74 25 29 2b 22 20 2d 20  22 2b 74 72 61 6e 73 64  |t%)+" - "+transd|
000105a0  24 28 74 25 29 2c 34 30  29 29 0d 64 be 05 e1 0d  |$(t%),40)).d....|
000105b0  64 c8 04 0d 64 d2 13 dd  f2 73 65 74 74 72 61 6e  |d...d....settran|
000105c0  73 32 28 74 25 29 0d 64  dc 0e e7 74 25 3c 30 8c  |s2(t%).d...t%<0.|
000105d0  74 25 3d 30 0d 64 e6 2a  f2 75 70 64 61 74 65 69  |t%=0.d.*.updatei|
000105e0  63 6f 6e 73 74 72 69 6e  67 28 74 72 77 69 6e 25  |constring(trwin%|
000105f0  2c 30 2c 74 72 61 6e 73  24 28 74 25 29 29 0d 64  |,0,trans$(t%)).d|
00010600  f0 30 f2 75 70 64 61 74  65 69 63 6f 6e 73 74 72  |.0.updateiconstr|
00010610  69 6e 67 28 74 72 77 69  6e 25 2c 32 2c c0 74 72  |ing(trwin%,2,.tr|
00010620  61 6e 73 64 24 28 74 25  29 2c 33 38 29 29 0d 64  |ansd$(t%),38)).d|
00010630  fa 05 e1 0d 65 04 04 0d  65 0e 11 dd a4 74 72 61  |....e...e....tra|
00010640  6e 73 6e 6f 28 74 24 29  0d 65 18 07 ea 74 25 0d  |nsno(t$).e...t%.|
00010650  65 22 2c 74 25 3d 30 3a  c8 95 74 25 3c 6e 74 72  |e",t%=0:..t%<ntr|
00010660  61 6e 73 25 80 74 24 3c  3e 74 72 61 6e 73 24 28  |ans%.t$<>trans$(|
00010670  74 25 29 3a 74 25 2b 3d  31 3a ce 0d 65 2c 18 e7  |t%):t%+=1:..e,..|
00010680  74 24 3c 3e 74 72 61 6e  73 24 28 74 25 29 8c 74  |t$<>trans$(t%).t|
00010690  25 3d 30 0d 65 36 07 3d  74 25 0d 65 40 04 0d 65  |%=0.e6.=t%.e@..e|
000106a0  4a 0f dd f2 73 65 74 63  6c 69 65 6e 74 0d 65 54  |J...setclient.eT|
000106b0  2c f2 75 70 64 61 74 65  69 63 6f 6e 73 74 72 69  |,.updateiconstri|
000106c0  6e 67 28 67 73 65 74 75  70 25 2c 31 36 2c 64 65  |ng(gsetup%,16,de|
000106d0  66 63 6c 69 65 6e 74 24  29 0d 65 5e 05 e1 0d 65  |fclient$).e^...e|
000106e0  68 04 0d 65 72 0d dd f2  73 65 74 68 6f 73 74 0d  |h..er...sethost.|
000106f0  65 7c 2b f2 75 70 64 61  74 65 69 63 6f 6e 73 74  |e|+.updateiconst|
00010700  72 69 6e 67 28 73 69 74  65 77 69 6e 25 2c 30 2c  |ring(sitewin%,0,|
00010710  68 6f 73 74 6e 61 6d 65  24 29 0d 65 86 2b f2 75  |hostname$).e.+.u|
00010720  70 64 61 74 65 69 63 6f  6e 73 74 72 69 6e 67 28  |pdateiconstring(|
00010730  73 69 74 65 77 69 6e 25  2c 31 2c 6d 61 69 6c 6e  |sitewin%,1,mailn|
00010740  61 6d 65 24 29 0d 65 90  2d f2 75 70 64 61 74 65  |ame$).e.-.update|
00010750  69 63 6f 6e 73 74 72 69  6e 67 28 73 69 74 65 77  |iconstring(sitew|
00010760  69 6e 25 2c 32 2c 72 65  6d 6f 74 65 68 6f 73 74  |in%,2,remotehost|
00010770  24 29 0d 65 9a 2c f2 75  70 64 61 74 65 69 63 6f  |$).e.,.updateico|
00010780  6e 73 74 72 69 6e 67 28  73 69 74 65 77 69 6e 25  |nstring(sitewin%|
00010790  2c 31 34 2c 74 69 6d 65  7a 6f 6e 65 24 29 0d 65  |,14,timezone$).e|
000107a0  a4 05 e1 0d 65 ae 04 0d  65 b8 0f dd f2 67 65 74  |....e...e....get|
000107b0  63 6f 6e 66 69 67 0d 65  c2 0a ea 74 24 2c 6c 25  |config.e...t$,l%|
000107c0  0d 65 cc 1c 64 6f 63 61  6e 63 25 3d a4 72 64 69  |.e..docanc%=.rdi|
000107d0  6e 76 28 67 77 69 6e 25  2c 32 37 29 0d 65 d6 1b  |nv(gwin%,27).e..|
000107e0  6b 69 6c 6c 63 25 3d a4  72 64 69 6e 76 28 67 77  |killc%=.rdinv(gw|
000107f0  69 6e 25 2c 32 38 29 0d  65 e0 1d 61 75 74 6f 65  |in%,28).e..autoe|
00010800  78 70 25 3d a4 72 64 69  6e 76 28 67 77 69 6e 25  |xp%=.rdinv(gwin%|
00010810  2c 32 39 29 0d 65 ea 1b  69 67 65 78 70 25 3d a4  |,29).e..igexp%=.|
00010820  72 64 69 6e 76 28 67 77  69 6e 25 2c 33 33 29 0d  |rdinv(gwin%,33).|
00010830  65 f4 1c 74 68 72 65 61  64 25 3d a4 72 64 69 6e  |e..thread%=.rdin|
00010840  76 28 67 77 69 6e 25 2c  33 34 29 0d 65 fe 1d 64  |v(gwin%,34).e..d|
00010850  65 66 65 78 70 25 3d bb  a4 69 63 5f 73 74 72 28  |efexp%=..ic_str(|
00010860  67 77 69 6e 25 2c 32 29  0d 66 08 1d 6e 67 65 78  |gwin%,2).f..ngex|
00010870  70 25 3d bb a4 69 63 5f  73 74 72 28 67 77 69 6e  |p%=..ic_str(gwin|
00010880  25 2c 32 32 29 0d 66 12  1d 65 78 70 6d 61 69 6c  |%,22).f..expmail|
00010890  25 3d a4 72 64 69 6e 76  28 67 77 69 6e 25 2c 33  |%=.rdinv(gwin%,3|
000108a0  31 29 0d 66 1c 1c 65 78  70 61 6e 79 25 3d a4 72  |1).f..expany%=.r|
000108b0  64 69 6e 76 28 67 77 69  6e 25 2c 33 36 29 0d 66  |dinv(gwin%,36).f|
000108c0  26 1e 6c 6f 67 66 69 6c  65 25 3d a4 72 64 69 6e  |&.logfile%=.rdin|
000108d0  76 28 67 73 65 74 75 70  25 2c 36 29 0d 66 30 20  |v(gsetup%,6).f0 |
000108e0  64 6f 72 65 63 65 69 70  74 25 3d a4 72 64 69 6e  |doreceipt%=.rdin|
000108f0  76 28 67 73 65 74 75 70  25 2c 37 29 0d 66 3a 1b  |v(gsetup%,7).f:.|
00010900  66 61 73 74 25 3d a4 72  64 69 6e 76 28 67 73 65  |fast%=.rdinv(gse|
00010910  74 75 70 25 2c 33 29 0d  66 44 3c 61 75 74 6f 64  |tup%,3).fD<autod|
00010920  65 62 61 74 63 68 25 3d  a4 72 64 69 6e 76 28 67  |ebatch%=.rdinv(g|
00010930  73 65 74 75 70 25 2c 31  31 29 3a 63 68 65 63 6b  |setup%,11):check|
00010940  66 69 6c 65 73 25 3d 61  75 74 6f 64 65 62 61 74  |files%=autodebat|
00010950  63 68 25 0d 66 4e 1f 63  6f 6d 70 72 65 73 73 25  |ch%.fN.compress%|
00010960  3d a4 72 64 69 6e 76 28  67 73 65 74 75 70 25 2c  |=.rdinv(gsetup%,|
00010970  38 29 0d 66 58 1c 6b 65  65 70 62 25 3d a4 72 64  |8).fX.keepb%=.rd|
00010980  69 6e 76 28 67 73 65 74  75 70 25 2c 39 29 0d 66  |inv(gsetup%,9).f|
00010990  62 1d 61 6c 65 72 74 25  3d a4 72 64 69 6e 76 28  |b.alert%=.rdinv(|
000109a0  67 73 65 74 75 70 25 2c  31 30 29 0d 66 6c 21 61  |gsetup%,10).fl!a|
000109b0  6c 65 72 74 62 65 65 70  25 3d a4 72 64 69 6e 76  |lertbeep%=.rdinv|
000109c0  28 67 73 65 74 75 70 25  2c 31 32 29 0d 66 76 21  |(gsetup%,12).fv!|
000109d0  61 6c 65 72 74 6e 65 77  73 25 3d a4 72 64 69 6e  |alertnews%=.rdin|
000109e0  76 28 67 73 65 74 75 70  25 2c 31 34 29 0d 66 80  |v(gsetup%,14).f.|
000109f0  1c 6d 6e 67 77 25 3d a4  72 64 69 6e 76 28 67 73  |.mngw%=.rdinv(gs|
00010a00  65 74 75 70 25 2c 32 30  29 0d 66 8a 1d 6d 6f 64  |etup%,20).f..mod|
00010a10  67 77 24 3d a4 69 63 5f  73 74 72 28 67 73 65 74  |gw$=.ic_str(gset|
00010a20  75 70 25 2c 31 29 0d 66  94 1d 6d 6e 67 77 24 3d  |up%,1).f..mngw$=|
00010a30  a4 69 63 5f 73 74 72 28  67 73 65 74 75 70 25 2c  |.ic_str(gsetup%,|
00010a40  31 38 29 0d 66 9e 22 64  65 66 63 6c 69 65 6e 74  |18).f."defclient|
00010a50  24 3d a4 69 63 5f 73 74  72 28 67 73 65 74 75 70  |$=.ic_str(gsetup|
00010a60  25 2c 31 36 29 0d 66 a8  23 63 6f 6d 70 6c 69 6d  |%,16).f.#complim|
00010a70  69 74 25 3d bb a4 69 63  5f 73 74 72 28 67 73 65  |it%=..ic_str(gse|
00010a80  74 75 70 25 2c 32 33 29  0d 66 b2 20 6d 69 6e 64  |tup%,23).f. mind|
00010a90  73 6b 25 3d bb a4 69 63  5f 73 74 72 28 67 73 65  |sk%=..ic_str(gse|
00010aa0  74 75 70 25 2c 32 36 29  0d 66 bc 1e 6b 65 65 70  |tup%,26).f..keep|
00010ab0  6f 75 74 67 25 3d a4 72  64 69 6e 76 28 75 77 69  |outg%=.rdinv(uwi|
00010ac0  6e 25 2c 31 30 29 0d 66  c6 1e 75 73 65 72 63 74  |n%,10).f..userct|
00010ad0  72 6c 25 3d a4 72 64 69  6e 76 28 75 77 69 6e 25  |rl%=.rdinv(uwin%|
00010ae0  2c 31 31 29 0d 66 d0 1b  64 65 6c 6f 6b 25 3d a4  |,11).f..delok%=.|
00010af0  72 64 69 6e 76 28 75 77  69 6e 25 2c 31 32 29 0d  |rdinv(uwin%,12).|
00010b00  66 da 21 68 6f 73 74 6e  61 6d 65 24 3d a4 69 63  |f.!hostname$=.ic|
00010b10  5f 73 74 72 28 73 69 74  65 77 69 6e 25 2c 30 29  |_str(sitewin%,0)|
00010b20  0d 66 e4 3a 74 24 3d a4  69 63 5f 73 74 72 28 73  |.f.:t$=.ic_str(s|
00010b30  69 74 65 77 69 6e 25 2c  31 31 29 3a 6c 25 3d a7  |itewin%,11):l%=.|
00010b40  74 24 2c 22 20 22 29 3a  e7 6c 25 3e 30 8c 74 24  |t$," "):.l%>0.t$|
00010b50  3d c0 74 24 2c 6c 25 2d  31 29 0d 66 ee 45 e7 74  |=.t$,l%-1).f.E.t|
00010b60  72 61 6e 73 70 6f 72 74  25 3c 3e a4 74 72 61 6e  |ransport%<>.tran|
00010b70  73 6e 6f 28 74 24 29 8c  74 72 61 6e 73 70 6f 72  |sno(t$).transpor|
00010b80  74 25 3d a4 74 72 61 6e  73 6e 6f 28 74 24 29 3a  |t%=.transno(t$):|
00010b90  f2 73 74 61 72 74 74 72  61 6e 73 70 6f 72 74 0d  |.starttransport.|
00010ba0  66 f8 1c 6f 72 67 24 3d  a4 69 63 5f 73 74 72 28  |f..org$=.ic_str(|
00010bb0  73 69 74 65 77 69 6e 25  2c 33 29 0d 67 02 23 72  |sitewin%,3).g.#r|
00010bc0  65 6d 6f 74 65 68 6f 73  74 24 3d a4 69 63 5f 73  |emotehost$=.ic_s|
00010bd0  74 72 28 73 69 74 65 77  69 6e 25 2c 32 29 0d 67  |tr(sitewin%,2).g|
00010be0  0c 21 6d 61 69 6c 6e 61  6d 65 24 3d a4 69 63 5f  |.!mailname$=.ic_|
00010bf0  73 74 72 28 73 69 74 65  77 69 6e 25 2c 31 29 0d  |str(sitewin%,1).|
00010c00  67 16 22 74 69 6d 65 7a  6f 6e 65 24 3d a4 69 63  |g."timezone$=.ic|
00010c10  5f 73 74 72 28 73 69 74  65 77 69 6e 25 2c 31 34  |_str(sitewin%,14|
00010c20  29 0d 67 20 16 73 6c 69  63 65 25 3d a4 63 70 75  |).g .slice%=.cpu|
00010c30  28 66 61 73 74 25 29 0d  67 2a 0f f2 73 65 74 73  |(fast%).g*..sets|
00010c40  79 73 76 61 72 73 0d 67  34 24 e3 6c 25 3d 30 b8  |ysvars.g4$.l%=0.|
00010c50  36 3a f2 6e 62 73 69 74  65 69 6e 66 6f 28 33 30  |6:.nbsiteinfo(30|
00010c60  2c 30 2c 30 2c 6c 25 29  3a e1 0d 67 3e 05 e1 0d  |,0,0,l%):..g>...|
00010c70  67 48 04 0d 67 52 10 dd  f2 73 65 74 73 79 73 76  |gH..gR...setsysv|
00010c80  61 72 73 0d 67 5c 2a f2  73 65 74 76 61 72 28 22  |ars.g\*.setvar("|
00010c90  4e 65 77 73 62 61 73 65  24 48 6f 73 74 4e 61 6d  |Newsbase$HostNam|
00010ca0  65 22 2c 68 6f 73 74 6e  61 6d 65 24 29 0d 67 66  |e",hostname$).gf|
00010cb0  2a f2 73 65 74 76 61 72  28 22 4e 65 77 73 62 61  |*.setvar("Newsba|
00010cc0  73 65 24 4d 61 69 6c 4e  61 6d 65 22 2c 6d 61 69  |se$MailName",mai|
00010cd0  6c 6e 61 6d 65 24 29 0d  67 70 2e f2 73 65 74 76  |lname$).gp..setv|
00010ce0  61 72 28 22 4e 65 77 73  62 61 73 65 24 52 65 6d  |ar("Newsbase$Rem|
00010cf0  6f 74 65 48 6f 73 74 22  2c 72 65 6d 6f 74 65 68  |oteHost",remoteh|
00010d00  6f 73 74 24 29 0d 67 7a  34 f2 73 65 74 76 61 72  |ost$).gz4.setvar|
00010d10  28 22 4e 65 77 73 62 61  73 65 24 54 72 61 6e 73  |("Newsbase$Trans|
00010d20  70 6f 72 74 22 2c 74 72  61 6e 73 24 28 74 72 61  |port",trans$(tra|
00010d30  6e 73 70 6f 72 74 25 29  29 0d 67 84 05 e1 0d 67  |nsport%)).g....g|
00010d40  8e 04 0d 67 98 13 dd f2  73 65 74 76 61 72 28 41  |...g....setvar(A|
00010d50  24 2c 42 24 29 0d 67 a2  20 c8 99 22 58 4f 53 5f  |$,B$).g. .."XOS_|
00010d60  43 4c 49 22 2c 22 73 65  74 20 22 2b 41 24 2b 22  |CLI","set "+A$+"|
00010d70  20 22 2b 42 24 0d 67 ac  05 e1 0d 67 b6 04 0d 67  | "+B$.g....g...g|
00010d80  c0 10 dd f2 73 61 76 65  63 6f 6e 66 69 67 0d 67  |....saveconfig.g|
00010d90  ca 0e f2 67 65 74 63 6f  6e 66 69 67 0d 67 d4 09  |...getconfig.g..|
00010da0  e7 72 77 25 8c 0d 67 de  32 20 20 66 31 25 3d a4  |.rw%..g.2  f1%=.|
00010db0  6f 70 65 6e 6f 75 74 28  63 6f 6e 66 64 69 72 24  |openout(confdir$|
00010dc0  2b 22 2e 21 6e 62 63 6f  6e 66 69 67 22 29 3a e7  |+".!nbconfig"):.|
00010dd0  66 31 25 3c 3e 30 8c 0d  67 e8 19 20 20 20 20 d5  |f1%<>0..g..    .|
00010de0  23 66 31 25 2c c3 28 76  65 72 25 2f 31 30 30 29  |#f1%,.(ver%/100)|
00010df0  0d 67 f2 17 20 20 20 20  d5 23 66 31 25 2c 68 6f  |.g..    .#f1%,ho|
00010e00  73 74 6e 61 6d 65 24 0d  67 fc 19 20 20 20 20 d5  |stname$.g..    .|
00010e10  23 66 31 25 2c 72 65 6d  6f 74 65 68 6f 73 74 24  |#f1%,remotehost$|
00010e20  0d 68 06 20 20 20 20 20  d5 23 66 31 25 2c 74 72  |.h.     .#f1%,tr|
00010e30  61 6e 73 24 28 74 72 61  6e 73 70 6f 72 74 25 29  |ans$(transport%)|
00010e40  0d 68 10 12 20 20 20 20  d5 23 66 31 25 2c 6f 72  |.h..    .#f1%,or|
00010e50  67 24 0d 68 1a 18 20 20  20 20 d5 23 66 31 25 2c  |g$.h..    .#f1%,|
00010e60  64 65 66 63 6c 69 65 6e  74 24 0d 68 24 14 20 20  |defclient$.h$.  |
00010e70  20 20 d5 23 66 31 25 2c  6d 6f 64 67 77 24 0d 68  |  .#f1%,modgw$.h|
00010e80  2e 17 20 20 20 20 d5 23  66 31 25 2c 74 69 6d 65  |..    .#f1%,time|
00010e90  7a 6f 6e 65 24 0d 68 38  17 20 20 20 20 d5 23 66  |zone$.h8.    .#f|
00010ea0  31 25 2c 6d 61 69 6c 6e  61 6d 65 24 0d 68 42 13  |1%,mailname$.hB.|
00010eb0  20 20 20 20 d5 23 66 31  25 2c 6d 6e 67 77 24 0d  |    .#f1%,mngw$.|
00010ec0  68 4c 10 20 20 20 20 d5  23 66 31 25 2c 22 22 0d  |hL.    .#f1%,"".|
00010ed0  68 56 10 20 20 20 20 d5  23 66 31 25 2c 22 22 0d  |hV.    .#f1%,"".|
00010ee0  68 60 10 20 20 20 20 d5  23 66 31 25 2c 22 22 0d  |h`.    .#f1%,"".|
00010ef0  68 6a 10 20 20 20 20 d5  23 66 31 25 2c 22 22 0d  |hj.    .#f1%,"".|
00010f00  68 74 17 20 20 20 20 d5  23 66 31 25 2c c3 6c 6f  |ht.    .#f1%,.lo|
00010f10  67 66 69 6c 65 25 0d 68  7e 17 20 20 20 20 d5 23  |gfile%.h~.    .#|
00010f20  66 31 25 2c c3 61 75 74  6f 65 78 70 25 0d 68 88  |f1%,.autoexp%.h.|
00010f30  18 20 20 20 20 d5 23 66  31 25 2c c3 6b 65 65 70  |.    .#f1%,.keep|
00010f40  6f 75 74 67 25 0d 68 92  16 20 20 20 20 d5 23 66  |outg%.h..    .#f|
00010f50  31 25 2c c3 64 65 66 65  78 70 25 0d 68 9c 15 20  |1%,.defexp%.h.. |
00010f60  20 20 20 d5 23 66 31 25  2c c3 6b 65 65 70 62 25  |   .#f1%,.keepb%|
00010f70  0d 68 a6 15 20 20 20 20  d5 23 66 31 25 2c c3 64  |.h..    .#f1%,.d|
00010f80  65 6c 6f 6b 25 0d 68 b0  14 20 20 20 20 d5 23 66  |elok%.h..    .#f|
00010f90  31 25 2c c3 66 61 73 74  25 0d 68 ba 15 20 20 20  |1%,.fast%.h..   |
00010fa0  20 d5 23 66 31 25 2c c3  61 6c 65 72 74 25 0d 68  | .#f1%,.alert%.h|
00010fb0  c4 19 20 20 20 20 d5 23  66 31 25 2c c3 61 6c 65  |..    .#f1%,.ale|
00010fc0  72 74 62 65 65 70 25 0d  68 ce 19 20 20 20 20 d5  |rtbeep%.h..    .|
00010fd0  23 66 31 25 2c c3 61 6c  65 72 74 6e 65 77 73 25  |#f1%,.alertnews%|
00010fe0  0d 68 d8 18 20 20 20 20  d5 23 66 31 25 2c c3 75  |.h..    .#f1%,.u|
00010ff0  73 65 72 63 74 72 6c 25  0d 68 e2 17 20 20 20 20  |serctrl%.h..    |
00011000  d5 23 66 31 25 2c c3 65  78 70 6d 61 69 6c 25 0d  |.#f1%,.expmail%.|
00011010  68 ec 1b 20 20 20 20 d5  23 66 31 25 2c c3 61 75  |h..    .#f1%,.au|
00011020  74 6f 64 65 62 61 74 63  68 25 0d 68 f6 14 20 20  |todebatch%.h..  |
00011030  20 20 d5 23 66 31 25 2c  c3 6d 6e 67 77 25 0d 69  |  .#f1%,.mngw%.i|
00011040  00 15 20 20 20 20 d5 23  66 31 25 2c c3 6e 67 65  |..    .#f1%,.nge|
00011050  78 70 25 0d 69 0a 16 20  20 20 20 d5 23 66 31 25  |xp%.i..    .#f1%|
00011060  2c c3 64 6f 63 61 6e 63  25 0d 69 14 15 20 20 20  |,.docanc%.i..   |
00011070  20 d5 23 66 31 25 2c c3  6b 69 6c 6c 63 25 0d 69  | .#f1%,.killc%.i|
00011080  1e 19 20 20 20 20 d5 23  66 31 25 2c c3 64 6f 72  |..    .#f1%,.dor|
00011090  65 63 65 69 70 74 25 0d  69 28 15 20 20 20 20 d5  |eceipt%.i(.    .|
000110a0  23 66 31 25 2c c3 69 67  65 78 70 25 0d 69 32 16  |#f1%,.igexp%.i2.|
000110b0  20 20 20 20 d5 23 66 31  25 2c c3 74 68 72 65 61  |    .#f1%,.threa|
000110c0  64 25 0d 69 3c 18 20 20  20 20 d5 23 66 31 25 2c  |d%.i<.    .#f1%,|
000110d0  c3 63 6f 6d 70 72 65 73  73 25 0d 69 46 19 20 20  |.compress%.iF.  |
000110e0  20 20 d5 23 66 31 25 2c  c3 63 6f 6d 70 6c 69 6d  |  .#f1%,.complim|
000110f0  69 74 25 0d 69 50 16 20  20 20 20 d5 23 66 31 25  |it%.iP.    .#f1%|
00011100  2c c3 65 78 70 61 6e 79  25 0d 69 5a 17 20 20 20  |,.expany%.iZ.   |
00011110  20 d5 23 66 31 25 2c c3  65 78 70 74 69 6d 65 25  | .#f1%,.exptime%|
00011120  0d 69 64 16 20 20 20 20  d5 23 66 31 25 2c c3 6d  |.id.    .#f1%,.m|
00011130  69 6e 64 73 6b 25 0d 69  6e 11 20 20 20 20 d5 23  |indsk%.in.    .#|
00011140  66 31 25 2c 22 30 22 0d  69 78 11 20 20 20 20 d5  |f1%,"0".ix.    .|
00011150  23 66 31 25 2c 22 30 22  0d 69 82 11 20 20 20 20  |#f1%,"0".i..    |
00011160  d5 23 66 31 25 2c 22 30  22 0d 69 8c 11 20 20 20  |.#f1%,"0".i..   |
00011170  20 d5 23 66 31 25 2c 22  30 22 0d 69 96 35 20 20  | .#f1%,"0".i.5  |
00011180  20 20 f2 63 66 28 66 31  25 29 3a f2 73 65 74 74  |  .cf(f1%):.sett|
00011190  79 70 65 28 63 6f 6e 66  64 69 72 24 2b 22 2e 21  |ype(confdir$+".!|
000111a0  6e 62 63 6f 6e 66 69 67  22 2c 26 46 46 46 29 0d  |nbconfig",&FFF).|
000111b0  69 a0 07 20 20 cd 0d 69  aa 05 cd 0d 69 b4 05 e1  |i..  ..i....i...|
000111c0  0d 69 be 04 0d 69 c8 0e  dd a4 74 69 6d 65 7a 6f  |.i...i....timezo|
000111d0  6e 65 0d 69 d2 0d ea 62  25 2c 6d 25 2c 62 24 0d  |ne.i...b%,m%,b$.|
000111e0  69 dc 29 c8 99 22 54 65  72 72 69 74 6f 72 79 5f  |i.).."Territory_|
000111f0  52 65 61 64 43 75 72 72  65 6e 74 54 69 6d 65 5a  |ReadCurrentTimeZ|
00011200  6f 6e 65 22 b8 2c 62 25  0d 69 e6 24 6d 25 3d 28  |one".,b%.i.$m%=(|
00011210  62 25 83 33 36 30 30 30  30 29 81 36 30 30 30 3a  |b%.360000).6000:|
00011220  62 25 3d 62 25 81 33 36  30 30 30 30 0d 69 f0 1f  |b%=b%.360000.i..|
00011230  62 24 3d c0 c3 94 6d 25  2b 22 30 30 22 2c 32 29  |b$=...m%+"00",2)|
00011240  3a 62 24 3d c3 94 62 25  2b 62 24 0d 69 fa 14 e7  |:b$=..b%+b$.i...|
00011250  a9 62 24 3d 33 8c 62 24  3d 22 30 22 2b 62 24 0d  |.b$=3.b$="0"+b$.|
00011260  6a 04 1d e7 62 25 3c 30  8c 62 24 3d 22 2d 22 2b  |j...b%<0.b$="-"+|
00011270  62 24 8b 62 24 3d 22 2b  22 2b 62 24 0d 6a 0e 07  |b$.b$="+"+b$.j..|
00011280  3d 62 24 0d 6a 18 04 0d  6a 22 14 dd f2 73 74 61  |=b$.j...j"...sta|
00011290  72 74 74 72 61 6e 73 70  6f 72 74 0d 6a 2c 13 ea  |rttransport.j,..|
000112a0  66 24 2c 6c 25 2c 61 24  2c 62 24 2c 74 24 0d 6a  |f$,l%,a$,b$,t$.j|
000112b0  36 19 74 24 3d 74 72 61  6e 73 24 28 74 72 61 6e  |6.t$=trans$(tran|
000112c0  73 70 6f 72 74 25 29 0d  6a 40 25 6c 25 3d a4 72  |sport%).j@%l%=.r|
000112d0  75 6e 74 72 61 6e 73 70  6f 72 74 66 69 6c 65 28  |untransportfile(|
000112e0  31 36 2c 22 22 2c 22 22  2c 22 22 29 0d 6a 4a 18  |16,"","","").jJ.|
000112f0  e7 6c 25 3c 3e 30 80 74  72 61 6e 73 70 6f 72 74  |.l%<>0.transport|
00011300  25 3e 30 8c 0d 6a 54 40  20 20 f2 6d 65 73 73 61  |%>0..jT@  .messa|
00011310  67 65 31 28 22 54 66 61  69 6c 31 22 2c 74 24 2c  |ge1("Tfail1",t$,|
00011320  31 29 3a 6c 25 3d a4 72  75 6e 74 72 61 6e 73 70  |1):l%=.runtransp|
00011330  6f 72 74 66 69 6c 65 28  31 36 2c 22 22 2c 22 22  |ortfile(16,"",""|
00011340  2c 22 22 29 0d 6a 5e 2e  20 20 e7 6c 25 3c 3e 30  |,"").j^.  .l%<>0|
00011350  f2 6d 65 73 73 61 67 65  30 28 22 54 66 61 69 6c  |.message0("Tfail|
00011360  32 22 2c 31 29 3a 74 72  61 6e 73 70 6f 72 74 25  |2",1):transport%|
00011370  3d 30 0d 6a 68 05 cd 0d  6a 72 0f f2 72 65 61 64  |=0.jh...jr..read|
00011380  6e 65 77 73 72 63 0d 6a  7c 05 e1 0d 6a 86 04 0d  |newsrc.j|...j...|
00011390  6a 90 10 dd a4 6f 70 65  6e 69 6e 28 66 24 29 0d  |j....openin(f$).|
000113a0  6a 9a 13 3d a4 66 6f 70  65 6e 28 66 24 2c 26 34  |j..=.fopen(f$,&4|
000113b0  46 29 0d 6a a4 04 0d 6a  ae 11 dd a4 6f 70 65 6e  |F).j...j....open|
000113c0  6f 75 74 28 66 24 29 0d  6a b8 13 3d a4 66 6f 70  |out(f$).j..=.fop|
000113d0  65 6e 28 66 24 2c 26 38  46 29 0d 6a c2 04 0d 6a  |en(f$,&8F).j...j|
000113e0  cc 10 dd a4 6f 70 65 6e  75 70 28 66 24 29 0d 6a  |....openup(f$).j|
000113f0  d6 07 ea 68 25 0d 6a e0  15 68 25 3d a4 66 6f 70  |...h%.j..h%=.fop|
00011400  65 6e 28 66 24 2c 26 43  46 29 0d 6a ea 1b e7 68  |en(f$,&CF).j...h|
00011410  25 3d 30 8c 68 25 3d a4  66 6f 70 65 6e 28 66 24  |%=0.h%=.fopen(f$|
00011420  2c 26 38 46 29 0d 6a f4  07 3d 68 25 0d 6a fe 04  |,&8F).j..=h%.j..|
00011430  0d 6b 08 12 dd a4 66 6f  70 65 6e 28 66 24 2c 72  |.k....fopen(f$,r|
00011440  25 29 0d 6b 12 0a ea 68  25 2c 46 25 0d 6b 1c 1c  |%).k...h%,F%.k..|
00011450  c8 99 22 58 4f 53 5f 46  69 6e 64 22 2c 72 25 2c  |.."XOS_Find",r%,|
00011460  66 24 b8 68 25 3b 46 25  0d 6b 26 10 e7 28 46 25  |f$.h%;F%.k&..(F%|
00011470  80 31 29 8c 68 25 3d 30  0d 6b 30 07 3d 68 25 0d  |.1).h%=0.k0.=h%.|
00011480  6b 3a 04 0d 6b 44 0f dd  a4 63 61 6e 6f 6e 28 41  |k:..kD...canon(A|
00011490  24 29 0d 6b 4e 0a ea 72  25 2c 46 25 0d 6b 58 39  |$).kN..r%,F%.kX9|
000114a0  e7 41 24 3e 22 22 8c c8  99 22 58 4f 53 5f 46 53  |.A$>""..."XOS_FS|
000114b0  43 6f 6e 74 72 6f 6c 22  2c 33 37 2c 41 24 2c 74  |Control",37,A$,t|
000114c0  6d 70 25 2c 2c 2c 32 35  36 20 b8 2c 2c 2c 2c 2c  |mp%,,,256 .,,,,,|
000114d0  72 25 3b 46 25 0d 6b 62  1f e7 72 25 3e 30 80 28  |r%;F%.kb..r%>0.(|
000114e0  46 25 80 31 29 3d 30 8c  3a 3d a4 73 74 72 28 74  |F%.1)=0.:=.str(t|
000114f0  6d 70 25 29 0d 6b 6c 07  3d 22 22 0d 6b 76 04 0d  |mp%).kl.="".kv..|
00011500  6b 80 0e dd f2 63 66 28  f8 20 68 25 29 0d 6b 8a  |k....cf(. h%).k.|
00011510  21 e7 68 25 3c 3e 30 20  c8 99 22 58 4f 53 5f 46  |!.h%<>0 .."XOS_F|
00011520  69 6e 64 22 2c 30 2c 68  25 3a 68 25 3d 30 0d 6b  |ind",0,h%:h%=0.k|
00011530  94 05 e1 0d 6b 9e 04 0d  6b a8 1c dd a4 63 6f 75  |....k...k....cou|
00011540  6e 74 67 72 6f 75 70 73  28 74 6f 74 61 6c 25 2c  |ntgroups(total%,|
00011550  64 24 29 0d 6b b2 32 ea  66 24 2c 74 25 2c 72 33  |d$).k.2.f$,t%,r3|
00011560  25 2c 6e 72 65 61 64 25  2c 66 25 2c 64 69 72 62  |%,nread%,f%,dirb|
00011570  75 66 25 2c 64 62 72 25  2c 61 64 64 72 25 2c 66  |uf%,dbr%,addr%,f|
00011580  6c 6f 6f 70 25 0d 6b bc  27 64 62 72 25 3d a4 63  |loop%.k.'dbr%=.c|
00011590  6c 61 69 6d 28 64 69 72  62 75 66 25 2c 64 62 73  |laim(dirbuf%,dbs|
000115a0  69 7a 65 25 2c 22 64 62  75 66 22 29 0d 6b c6 12  |ize%,"dbuf").k..|
000115b0  f5 f2 70 6f 6c 6c 28 73  6c 69 63 65 25 29 0d 6b  |..poll(slice%).k|
000115c0  d0 4f 61 64 64 72 25 3d  64 69 72 62 75 66 25 3a  |.Oaddr%=dirbuf%:|
000115d0  c8 99 22 4f 53 5f 47 42  50 42 22 2c 31 30 2c 64  |.."OS_GBPB",10,d|
000115e0  24 2c 64 69 72 62 75 66  25 2c 32 30 2c 6e 72 65  |$,dirbuf%,20,nre|
000115f0  61 64 25 2c 64 62 73 69  7a 65 25 2c 22 2a 22 b8  |ad%,dbsize%,"*".|
00011600  2c 2c 2c 72 33 25 2c 6e  72 65 61 64 25 0d 6b da  |,,,r3%,nread%.k.|
00011610  0b e7 72 33 25 3e 30 8c  0d 6b e4 13 20 20 e3 66  |..r3%>0..k..  .f|
00011620  6c 6f 6f 70 25 3d 31 b8  72 33 25 0d 6b ee 23 20  |loop%=1.r3%.k.# |
00011630  20 74 25 3d 61 64 64 72  25 21 31 36 3a 66 24 3d  | t%=addr%!16:f$=|
00011640  a4 73 74 72 28 61 64 64  72 25 2b 32 30 29 0d 6b  |.str(addr%+20).k|
00011650  f8 0b 20 20 c8 8e 74 25  ca 0d 6c 02 7c 20 20 20  |..  ..t%..l.|   |
00011660  20 c9 31 3a e7 66 25 3d  30 80 28 bb 66 24 3e 30  | .1:.f%=0.(.f$>0|
00011670  84 66 24 3d 22 7e 69 6e  64 65 78 22 29 8c 74 6f  |.f$="~index").to|
00011680  74 61 6c 25 2b 3d 31 3a  66 25 3d 31 3a f2 70 72  |tal%+=1:f%=1:.pr|
00011690  69 6e 74 28 22 22 2c 22  22 2c a4 6d 73 67 31 28  |int("","",.msg1(|
000116a0  22 47 66 6f 75 6e 64 22  2c c3 74 6f 74 61 6c 25  |"Gfound",.total%|
000116b0  29 2c 22 22 29 3a e7 74  6f 74 61 6c 25 3d 31 8c  |),""):.total%=1.|
000116c0  f2 6d 65 73 73 61 67 65  30 28 22 47 63 6f 75 6e  |.message0("Gcoun|
000116d0  74 22 2c 30 29 0d 6c 0c  42 20 20 20 20 c9 32 2c  |t",0).l.B    .2,|
000116e0  33 3a e7 a7 c2 64 24 2c  33 29 2c 22 7e 22 29 3c  |3:...d$,3),"~")<|
000116f0  31 8c 74 6f 74 61 6c 25  3d a4 63 6f 75 6e 74 67  |1.total%=.countg|
00011700  72 6f 75 70 73 28 74 6f  74 61 6c 25 2c 64 24 2b  |roups(total%,d$+|
00011710  22 2e 22 2b 66 24 29 0d  6c 16 07 20 20 cb 0d 6c  |"."+f$).l..  ..l|
00011720  20 25 20 20 61 64 64 72  25 3d 61 64 64 72 25 2b  | %  addr%=addr%+|
00011730  28 a9 66 24 2b 32 34 29  80 ac 33 3a ed 66 6c 6f  |(.f$+24)..3:.flo|
00011740  6f 70 25 0d 6c 2a 05 cd  0d 6c 34 0e fd 6e 72 65  |op%.l*...l4..nre|
00011750  61 64 25 3d 2d 31 0d 6c  3e 12 f2 72 65 6c 65 61  |ad%=-1.l>..relea|
00011760  73 65 28 64 62 72 25 29  0d 6c 48 0b 3d 74 6f 74  |se(dbr%).lH.=tot|
00011770  61 6c 25 0d 6c 52 04 0d  6c 5c 1b dd a4 66 69 6e  |al%.lR..l\...fin|
00011780  64 68 69 67 68 65 73 74  28 64 24 2c 68 69 67 68  |dhighest(d$,high|
00011790  25 29 0d 6c 66 2d ea 66  24 2c 74 25 2c 72 33 25  |%).lf-.f$,t%,r3%|
000117a0  2c 64 70 74 72 25 2c 66  25 2c 64 69 72 62 75 66  |,dptr%,f%,dirbuf|
000117b0  25 2c 64 62 72 25 2c 61  64 64 72 25 2c 46 25 0d  |%,dbr%,addr%,F%.|
000117c0  6c 70 27 64 62 72 25 3d  a4 63 6c 61 69 6d 28 64  |lp'dbr%=.claim(d|
000117d0  69 72 62 75 66 25 2c 64  62 73 69 7a 65 25 2c 22  |irbuf%,dbsize%,"|
000117e0  64 62 75 66 22 29 0d 6c  7a 0b 64 70 74 72 25 3d  |dbuf").lz.dptr%=|
000117f0  30 0d 6c 84 14 f5 f2 70  6f 6c 6c 28 73 6c 69 63  |0.l....poll(slic|
00011800  65 25 2a 33 29 0d 6c 8e  44 20 20 c8 99 22 58 4f  |e%*3).l.D  .."XO|
00011810  53 5f 47 42 50 42 22 2c  31 30 2c 64 24 2c 64 69  |S_GBPB",10,d$,di|
00011820  72 62 75 66 25 2c 31 2c  64 70 74 72 25 2c 64 62  |rbuf%,1,dptr%,db|
00011830  73 69 7a 65 25 2c 22 2a  22 b8 2c 2c 2c 72 33 25  |size%,"*".,,,r3%|
00011840  2c 64 70 74 72 25 3b 46  25 0d 6c 98 16 20 20 e7  |,dptr%;F%.l..  .|
00011850  72 33 25 3e 30 80 28 46  25 80 31 29 3d 30 8c 0d  |r3%>0.(F%.1)=0..|
00011860  6c a2 15 20 20 20 20 61  64 64 72 25 3d 64 69 72  |l..    addr%=dir|
00011870  62 75 66 25 0d 6c ac 3d  20 20 20 20 74 25 3d 61  |buf%.l.=    t%=a|
00011880  64 64 72 25 21 31 36 3a  66 24 3d a4 73 74 72 28  |ddr%!16:f$=.str(|
00011890  61 64 64 72 25 2b 32 30  29 3a 61 64 64 72 25 3d  |addr%+20):addr%=|
000118a0  61 64 64 72 25 2b 28 32  35 2b a9 66 24 29 80 ac  |addr%+(25+.f$)..|
000118b0  33 0d 6c b6 0d 20 20 20  20 c8 8e 74 25 ca 0d 6c  |3.l..    ..t%..l|
000118c0  c0 21 20 20 20 20 20 20  c9 31 3a e7 bb 66 24 3e  |.!      .1:..f$>|
000118d0  68 69 67 68 25 8c 68 69  67 68 25 3d bb 66 24 0d  |high%.high%=.f$.|
000118e0  6c ca 3e 20 20 20 20 20  20 c9 32 2c 33 3a e7 c0  |l.>      .2,3:..|
000118f0  66 24 2c 31 29 3d 22 7e  22 8c 68 69 67 68 25 3d  |f$,1)="~".high%=|
00011900  a4 66 69 6e 64 68 69 67  68 65 73 74 28 64 24 2b  |.findhighest(d$+|
00011910  22 2e 22 2b 66 24 2c 68  69 67 68 25 29 0d 6c d4  |"."+f$,high%).l.|
00011920  09 20 20 20 20 cb 0d 6c  de 07 20 20 cd 0d 6c e8  |.    ..l..  ..l.|
00011930  17 fd 64 70 74 72 25 3d  2d 31 84 28 46 25 80 31  |..dptr%=-1.(F%.1|
00011940  29 3c 3e 30 0d 6c f2 12  f2 72 65 6c 65 61 73 65  |)<>0.l...release|
00011950  28 64 62 72 25 29 0d 6c  fc 0a 3d 68 69 67 68 25  |(dbr%).l..=high%|
00011960  0d 6d 06 04 0d 6d 10 13  dd f2 66 69 6e 64 61 6c  |.m...m....findal|
00011970  6c 67 72 6f 75 70 73 0d  6d 1a 0b ea 67 31 25 2c  |lgroups.m...g1%,|
00011980  6c 25 0d 6d 24 19 e7 a4  62 75 73 79 6f 6e 28 22  |l%.m$...busyon("|
00011990  42 73 63 61 6e 22 29 3d  30 20 8c 0d 6d 2e 28 f2  |Bscan")=0 ..m.(.|
000119a0  70 72 69 6e 74 28 a4 6d  73 67 30 28 22 47 73 65  |print(.msg0("Gse|
000119b0  61 72 63 68 22 29 2c 22  20 22 2c 22 20 22 2c 22  |arch")," "," ","|
000119c0  20 22 29 0d 6d 38 22 f2  66 69 6e 64 67 72 6f 75  | ").m8".findgrou|
000119d0  70 73 28 6e 65 77 73 72  6f 6f 74 24 2b 22 2e 4e  |ps(newsroot$+".N|
000119e0  65 77 73 22 29 0d 6d 42  0f e7 67 72 6f 75 70 73  |ews").mB..groups|
000119f0  25 3e 31 8c 0d 6d 4c 28  20 20 e7 73 74 61 72 74  |%>1..mL(  .start|
00011a00  75 70 6f 6b 25 3d 30 f2  6d 65 73 73 61 67 65 30  |upok%=0.message0|
00011a10  28 22 47 63 68 65 63 6b  22 2c 30 29 0d 6d 56 14  |("Gcheck",0).mV.|
00011a20  20 20 e3 67 31 25 3d 31  b8 67 72 6f 75 70 73 25  |  .g1%=1.groups%|
00011a30  0d 6d 60 25 20 20 20 20  e7 67 72 70 73 65 71 25  |.m`%    .grpseq%|
00011a40  28 67 31 25 29 3d 30 80  67 72 70 24 28 67 31 25  |(g1%)=0.grp$(g1%|
00011a50  29 3e 22 22 8c 0d 6d 6a  42 20 20 20 20 20 20 f2  |)>""..mjB      .|
00011a60  70 72 69 6e 74 28 a4 6d  73 67 30 28 22 47 63 68  |print(.msg0("Gch|
00011a70  65 63 6b 22 29 2c a4 6d  73 67 31 28 22 47 6c 61  |eck"),.msg1("Gla|
00011a80  73 74 22 2c 67 72 70 24  28 67 31 25 29 29 2c 22  |st",grp$(g1%)),"|
00011a90  20 22 2c 22 20 22 29 0d  6d 74 32 20 20 20 20 20  | "," ").mt2     |
00011aa0  20 67 72 70 73 65 71 25  28 67 31 25 29 3d a4 73  | grpseq%(g1%)=.s|
00011ab0  65 71 28 67 31 25 29 3a  6c 25 3d a4 66 69 72 73  |eq(g1%):l%=.firs|
00011ac0  74 61 72 74 28 67 31 25  29 0d 6d 7e 09 20 20 20  |tart(g1%).m~.   |
00011ad0  20 cd 0d 6d 88 0a 20 20  ed 67 31 25 0d 6d 92 05  | ..m..  .g1%.m..|
00011ae0  cd 0d 6d 9c 3d f2 73 65  74 69 63 6f 6e 73 74 72  |..m.=.seticonstr|
00011af0  69 6e 67 28 67 77 69 6e  25 2c 32 35 2c 67 72 70  |ing(gwin%,25,grp|
00011b00  24 28 31 29 29 3a 67 77  69 6e 5f 67 25 3d 31 3a  |$(1)):gwin_g%=1:|
00011b10  f2 73 65 74 65 78 70 69  63 6f 6e 28 31 29 0d 6d  |.setexpicon(1).m|
00011b20  a6 0c f2 62 75 73 79 6f  66 66 0d 6d b0 11 f2 77  |...busyoff.m...w|
00011b30  72 69 74 65 67 72 70 64  61 74 61 0d 6d ba 05 cd  |ritegrpdata.m...|
00011b40  0d 6d c4 0d f2 67 61 63  74 28 22 22 29 0d 6d ce  |.m...gact("").m.|
00011b50  05 e1 0d 6d d8 04 0d 6d  e2 14 dd f2 66 69 6e 64  |...m...m....find|
00011b60  67 72 6f 75 70 73 28 64  24 29 0d 6d ec 3c ea 6e  |groups(d$).m.<.n|
00011b70  25 2c 66 24 2c 74 25 2c  72 33 25 2c 6e 72 65 61  |%,f$,t%,r3%,nrea|
00011b80  64 25 2c 67 66 24 2c 6c  25 2c 64 69 72 62 75 66  |d%,gf$,l%,dirbuf|
00011b90  25 2c 64 62 72 25 2c 61  64 64 72 25 2c 66 6c 6f  |%,dbr%,addr%,flo|
00011ba0  6f 70 25 2c 46 25 0d 6d  f6 27 64 62 72 25 3d a4  |op%,F%.m.'dbr%=.|
00011bb0  63 6c 61 69 6d 28 64 69  72 62 75 66 25 2c 64 62  |claim(dirbuf%,db|
00011bc0  73 69 7a 65 25 2c 22 64  62 75 66 22 29 0d 6e 00  |size%,"dbuf").n.|
00011bd0  20 f2 67 61 63 74 28 22  53 63 61 6e 6e 69 6e 67  | .gact("Scanning|
00011be0  20 66 6f 72 20 67 72 6f  75 70 73 22 29 0d 6e 0a  | for groups").n.|
00011bf0  05 f5 0d 6e 14 47 c8 99  22 58 4f 53 5f 47 42 50  |...n.G.."XOS_GBP|
00011c00  42 22 2c 31 30 2c 64 24  2c 64 69 72 62 75 66 25  |B",10,d$,dirbuf%|
00011c10  2c 31 30 2c 6e 25 2c 64  62 73 69 7a 65 25 2c 22  |,10,n%,dbsize%,"|
00011c20  2a 22 b8 2c 2c 2c 72 33  25 2c 6e 25 3b 46 25 3a  |*".,,,r3%,n%;F%:|
00011c30  6e 72 65 61 64 25 3d 6e  25 0d 6e 1e 1f f2 70 6f  |nread%=n%.n...po|
00011c40  6c 6c 28 73 6c 69 63 65  25 29 3a 61 64 64 72 25  |ll(slice%):addr%|
00011c50  3d 64 69 72 62 75 66 25  0d 6e 28 14 e7 72 33 25  |=dirbuf%.n(..r3%|
00011c60  3e 30 80 28 46 25 80 31  29 3d 30 8c 0d 6e 32 13  |>0.(F%.1)=0..n2.|
00011c70  20 20 e3 66 6c 6f 6f 70  25 3d 31 b8 72 33 25 0d  |  .floop%=1.r3%.|
00011c80  6e 3c 3b 20 20 74 25 3d  61 64 64 72 25 21 31 36  |n<;  t%=addr%!16|
00011c90  3a 66 24 3d a4 73 74 72  28 61 64 64 72 25 2b 32  |:f$=.str(addr%+2|
00011ca0  30 29 3a 61 64 64 72 25  3d 61 64 64 72 25 2b 28  |0):addr%=addr%+(|
00011cb0  32 34 2b a9 66 24 29 80  ac 33 0d 6e 46 0b 20 20  |24+.f$)..3.nF.  |
00011cc0  c8 8e 74 25 ca 0d 6e 50  27 20 20 20 20 c9 31 3a  |..t%..nP'    .1:|
00011cd0  e7 67 66 24 3d 22 22 80  28 bb 66 24 3e 30 84 66  |.gf$="".(.f$>0.f|
00011ce0  24 3d 22 7e 69 6e 64 65  78 22 29 8c 0d 6e 5a 3b  |$="~index")..nZ;|
00011cf0  20 20 20 20 20 67 66 24  3d a4 70 61 74 68 74 6f  |     gf$=.pathto|
00011d00  67 72 6f 75 70 28 64 24  29 3a f2 61 64 64 69 66  |group(d$):.addif|
00011d10  6e 6f 74 69 6e 6c 69 73  74 28 67 66 24 29 3a f2  |notinlist(gf$):.|
00011d20  73 63 61 6e 6d 73 67 0d  6e 64 09 20 20 20 20 cd  |scanmsg.nd.    .|
00011d30  0d 6e 6e 19 20 20 20 20  c9 32 2c 33 3a e7 c0 66  |.nn.    .2,3:..f|
00011d40  24 2c 31 29 3d 22 7e 22  8c 0d 6e 78 44 20 20 20  |$,1)="~"..nxD   |
00011d50  20 20 20 e7 67 66 24 3d  22 22 8c 67 66 24 3d a4  |   .gf$="".gf$=.|
00011d60  70 61 74 68 74 6f 67 72  6f 75 70 28 64 24 29 3a  |pathtogroup(d$):|
00011d70  f2 61 64 64 69 66 6e 6f  74 69 6e 6c 69 73 74 28  |.addifnotinlist(|
00011d80  67 66 24 29 3a f2 73 63  61 6e 6d 73 67 0d 6e 82  |gf$):.scanmsg.n.|
00011d90  0b 20 20 20 20 20 20 cc  0d 6e 8c 20 20 20 20 20  |.      ..n.     |
00011da0  20 20 f2 66 69 6e 64 67  72 6f 75 70 73 28 64 24  |  .findgroups(d$|
00011db0  2b 22 2e 22 2b 66 24 29  0d 6e 96 09 20 20 20 20  |+"."+f$).n..    |
00011dc0  cd 0d 6e a0 07 20 20 cb  0d 6e aa 0d 20 20 ed 66  |..n..  ..n..  .f|
00011dd0  6c 6f 6f 70 25 0d 6e b4  05 cd 0d 6e be 18 fd 6e  |loop%.n....n...n|
00011de0  72 65 61 64 25 3d 2d 31  84 28 46 25 80 31 29 3c  |read%=-1.(F%.1)<|
00011df0  3e 30 0d 6e c8 12 f2 72  65 6c 65 61 73 65 28 64  |>0.n...release(d|
00011e00  62 72 25 29 0d 6e d2 05  e1 0d 6e dc 04 0d 6e e6  |br%).n....n...n.|
00011e10  10 dd f2 63 6f 6e 76 72  6e 28 64 24 29 0d 6e f0  |...convrn(d$).n.|
00011e20  45 f4 20 63 6f 6e 76 65  72 74 20 61 20 72 65 61  |E. convert a rea|
00011e30  64 6e 65 77 73 20 67 72  6f 75 70 20 62 79 20 6d  |dnews group by m|
00011e40  6f 76 69 6e 67 20 61 6c  6c 20 66 69 6c 65 73 20  |oving all files |
00011e50  74 6f 20 7e 78 20 73 75  62 64 69 72 65 63 74 6f  |to ~x subdirecto|
00011e60  72 79 0d 6e fa 40 ea 6e  25 2c 66 24 2c 74 25 2c  |ry.n.@.n%,f$,t%,|
00011e70  72 33 25 2c 6e 72 65 61  64 25 2c 66 31 24 2c 6c  |r3%,nread%,f1$,l|
00011e80  25 2c 64 69 72 62 75 66  25 2c 64 62 72 25 2c 61  |%,dirbuf%,dbr%,a|
00011e90  64 64 72 25 2c 66 6c 6f  6f 70 25 2c 46 25 2c 6d  |ddr%,floop%,F%,m|
00011ea0  6b 25 0d 6f 04 4a 64 62  72 25 3d a4 63 6c 61 69  |k%.o.Jdbr%=.clai|
00011eb0  6d 28 64 69 72 62 75 66  25 2c 64 62 73 69 7a 65  |m(dirbuf%,dbsize|
00011ec0  25 2c 22 64 62 75 66 22  29 3a f2 70 72 69 6e 74  |%,"dbuf"):.print|
00011ed0  28 22 22 2c 22 22 2c a4  6d 73 67 30 28 22 47 63  |("","",.msg0("Gc|
00011ee0  6f 6e 76 65 72 74 22 29  2c 22 22 29 0d 6f 0e 05  |onvert"),"").o..|
00011ef0  f5 0d 6f 18 47 c8 99 22  58 4f 53 5f 47 42 50 42  |..o.G.."XOS_GBPB|
00011f00  22 2c 31 30 2c 64 24 2c  64 69 72 62 75 66 25 2c  |",10,d$,dirbuf%,|
00011f10  31 30 2c 6e 25 2c 64 62  73 69 7a 65 25 2c 22 2a  |10,n%,dbsize%,"*|
00011f20  22 b8 2c 2c 2c 72 33 25  2c 6e 25 3b 46 25 3a 6e  |".,,,r3%,n%;F%:n|
00011f30  72 65 61 64 25 3d 6e 25  0d 6f 22 1f f2 70 6f 6c  |read%=n%.o"..pol|
00011f40  6c 28 73 6c 69 63 65 25  29 3a 61 64 64 72 25 3d  |l(slice%):addr%=|
00011f50  64 69 72 62 75 66 25 0d  6f 2c 14 e7 72 33 25 3e  |dirbuf%.o,..r3%>|
00011f60  30 80 28 46 25 80 31 29  3d 30 8c 0d 6f 36 13 20  |0.(F%.1)=0..o6. |
00011f70  20 e3 66 6c 6f 6f 70 25  3d 31 b8 72 33 25 0d 6f  | .floop%=1.r3%.o|
00011f80  40 3b 20 20 74 25 3d 61  64 64 72 25 21 31 36 3a  |@;  t%=addr%!16:|
00011f90  66 24 3d a4 73 74 72 28  61 64 64 72 25 2b 32 30  |f$=.str(addr%+20|
00011fa0  29 3a 61 64 64 72 25 3d  61 64 64 72 25 2b 28 32  |):addr%=addr%+(2|
00011fb0  34 2b a9 66 24 29 80 ac  33 0d 6f 4a 0b 20 20 c8  |4+.f$)..3.oJ.  .|
00011fc0  8e 74 25 ca 0d 6f 54 13  20 20 20 20 c9 31 3a e7  |.t%..oT.    .1:.|
00011fd0  bb 66 24 3c 3e 30 8c 0d  6f 5e 0f 20 20 20 20 20  |.f$<>0..o^.     |
00011fe0  20 e7 6d 6b 25 8c 0d 6f  68 3f 20 20 20 20 20 20  | .mk%..oh?      |
00011ff0  20 20 46 25 3d a4 6d 6f  76 65 66 69 6c 65 28 64  |  F%=.movefile(d|
00012000  24 2b 22 2e 22 2b 66 24  2c 64 24 2b 22 2e 7e 78  |$+"."+f$,d$+".~x|
00012010  2e 7e 78 2e 22 2b 66 24  29 3a e7 46 25 3d 30 8c  |.~x."+f$):.F%=0.|
00012020  6e 25 2d 3d 31 0d 6f 72  0d 20 20 20 20 20 20 20  |n%-=1.or.       |
00012030  20 cc 0d 6f 7c 3b 20 20  20 20 20 20 20 20 66 31  | ..o|;        f1|
00012040  24 3d a4 74 6d 70 66 69  6c 65 3a 46 25 3d a4 6d  |$=.tmpfile:F%=.m|
00012050  6f 76 65 66 69 6c 65 28  64 24 2b 22 2e 22 2b 66  |ovefile(d$+"."+f|
00012060  24 2c 66 31 24 29 3a e7  46 25 3d 30 8c 0d 6f 86  |$,f1$):.F%=0..o.|
00012070  53 20 20 20 20 20 20 20  20 e7 a4 65 6e 73 75 72  |S        ..ensur|
00012080  65 64 69 72 28 64 24 2b  22 2e 7e 78 2e 7e 78 22  |edir(d$+".~x.~x"|
00012090  29 3e 31 80 a4 6d 6f 76  65 66 69 6c 65 28 66 31  |)>1..movefile(f1|
000120a0  24 2c 64 24 2b 22 2e 7e  78 2e 7e 78 2e 22 2b 66  |$,d$+".~x.~x."+f|
000120b0  24 29 3d 30 8c 6d 6b 25  3d b9 3a 6e 25 2d 3d 31  |$)=0.mk%=.:n%-=1|
000120c0  0d 6f 90 0d 20 20 20 20  20 20 20 20 cd 0d 6f 9a  |.o..        ..o.|
000120d0  0b 20 20 20 20 20 20 cd  0d 6f a4 09 20 20 20 20  |.      ..o..    |
000120e0  cd 0d 6f ae 07 20 20 cb  0d 6f b8 0d 20 20 ed 66  |..o..  ..o..  .f|
000120f0  6c 6f 6f 70 25 0d 6f c2  05 cd 0d 6f cc 18 fd 6e  |loop%.o....o...n|
00012100  72 65 61 64 25 3d 2d 31  84 28 46 25 80 31 29 3c  |read%=-1.(F%.1)<|
00012110  3e 30 0d 6f d6 12 f2 72  65 6c 65 61 73 65 28 64  |>0.o...release(d|
00012120  62 72 25 29 0d 6f e0 05  e1 0d 6f ea 04 0d 6f f4  |br%).o....o...o.|
00012130  0d dd f2 73 63 61 6e 6d  73 67 0d 6f fe 30 e7 73  |...scanmsg.o.0.s|
00012140  74 61 72 74 75 70 6f 6b  25 3d 30 80 67 72 70 24  |tartupok%=0.grp$|
00012150  28 31 29 3d 22 22 f2 6d  65 73 73 61 67 65 30 28  |(1)="".message0(|
00012160  22 47 73 63 61 6e 22 2c  30 29 0d 70 08 05 e1 0d  |"Gscan",0).p....|
00012170  70 12 04 0d 70 1c 18 dd  f2 61 64 64 69 66 6e 6f  |p...p....addifno|
00012180  74 69 6e 6c 69 73 74 28  67 24 29 0d 70 26 07 ea  |tinlist(g$).p&..|
00012190  6c 25 0d 70 30 0b e7 67  24 3e 22 22 8c 0d 70 3a  |l%.p0..g$>""..p:|
000121a0  3f 20 20 f2 70 72 69 6e  74 28 22 22 2c a4 6d 73  |?  .print("",.ms|
000121b0  67 31 28 22 47 66 6f 75  6e 64 22 2c 67 24 29 2c  |g1("Gfound",g$),|
000121c0  a4 6d 73 67 31 28 22 47  74 6f 74 61 6c 22 2c c3  |.msg1("Gtotal",.|
000121d0  67 72 6f 75 70 73 25 29  2c 22 22 29 0d 70 44 3f  |groups%),"").pD?|
000121e0  20 20 e7 a4 6e 61 6d 65  74 6f 6e 6f 28 67 24 2c  |  ..nametono(g$,|
000121f0  30 29 3d 30 8c 6c 25 3d  a4 61 64 64 67 72 70 74  |0)=0.l%=.addgrpt|
00012200  6f 6c 69 73 74 28 67 24  2c b9 29 3a e7 6c 25 3d  |olist(g$,.):.l%=|
00012210  30 8c f2 74 6f 6f 6d 61  6e 79 67 0d 70 4e 2c 20  |0..toomanyg.pN, |
00012220  20 e7 6c 25 3e 30 f2 70  72 69 6e 74 28 22 22 2c  | .l%>0.print("",|
00012230  22 22 2c 22 22 2c 22 28  22 2b 67 24 2b 22 20 61  |"","","("+g$+" a|
00012240  64 64 65 64 29 22 29 0d  70 58 05 cd 0d 70 62 05  |dded)").pX...pb.|
00012250  e1 0d 70 6c 04 0d 70 76  15 dd a4 70 61 74 68 74  |..pl..pv...patht|
00012260  6f 67 72 6f 75 70 28 70  24 29 0d 70 80 19 ea 6c  |ogroup(p$).p...l|
00012270  25 3a 70 24 3d c1 70 24  2c a9 64 70 61 74 68 24  |%:p$=.p$,.dpath$|
00012280  2b 31 29 0d 70 8a 11 f5  6c 25 3d a7 70 24 2c 22  |+1).p...l%=.p$,"|
00012290  7e 2e 22 29 0d 70 94 22  20 20 e7 6c 25 3e 30 8c  |~.").p."  .l%>0.|
000122a0  70 24 3d c0 70 24 2c 6c  25 2d 31 29 2b c1 70 24  |p$=.p$,l%-1)+.p$|
000122b0  2c 6c 25 2b 32 29 0d 70  9e 09 fd 6c 25 3d 30 0d  |,l%+2).p...l%=0.|
000122c0  70 a8 07 3d 70 24 0d 70  b2 04 0d 70 bc 11 dd f2  |p..=p$.p...p....|
000122d0  69 6e 69 74 66 69 6c 74  65 72 73 0d 70 c6 15 6e  |initfilters.p..n|
000122e0  66 69 6c 74 25 3d 30 3a  63 66 69 6c 74 25 3d 30  |filt%=0:cfilt%=0|
000122f0  0d 70 d0 2a 6d 61 78 66  69 6c 74 25 2b 3d a4 66  |.p.*maxfilt%+=.f|
00012300  6c 69 6e 65 73 28 63 6f  6e 66 64 69 72 24 2b 22  |lines(confdir$+"|
00012310  2e 66 69 6c 74 65 72 73  22 29 0d 70 da 3a de 66  |.filters").p.:.f|
00012320  6c 74 25 28 6d 61 78 66  69 6c 74 25 29 2c 66 6c  |lt%(maxfilt%),fl|
00012330  61 24 28 6d 61 78 66 69  6c 74 25 29 2c 66 6c 61  |a$(maxfilt%),fla|
00012340  25 28 6d 61 78 66 69 6c  74 25 29 2c 66 69 6c 74  |%(maxfilt%),filt|
00012350  25 28 31 29 0d 70 e4 52  de 66 6c 63 25 28 6d 61  |%(1).p.R.flc%(ma|
00012360  78 66 69 6c 74 25 2c 32  29 2c 66 6c 63 24 28 6d  |xfilt%,2),flc$(m|
00012370  61 78 66 69 6c 74 25 2c  32 29 2c 66 6c 6e 25 28  |axfilt%,2),fln%(|
00012380  6d 61 78 66 69 6c 74 25  2c 32 29 2c 66 6c 6a 25  |maxfilt%,2),flj%|
00012390  28 6d 61 78 66 69 6c 74  25 2c 32 29 2c 66 6c 5f  |(maxfilt%,2),fl_|
000123a0  6f 6b 25 28 32 29 0d 70  ee 24 66 31 25 3d a4 6f  |ok%(2).p.$f1%=.o|
000123b0  70 65 6e 69 6e 28 63 6f  6e 66 64 69 72 24 2b 22  |penin(confdir$+"|
000123c0  2e 66 69 6c 74 65 72 73  22 29 0d 70 f8 0c e7 66  |.filters").p...f|
000123d0  31 25 3c 3e 30 8c 0d 71  02 0f 20 20 f5 61 24 3d  |1%<>0..q..  .a$=|
000123e0  be 23 66 31 25 0d 71 0c  23 20 20 66 6c 74 25 28  |.#f1%.q.#  flt%(|
000123f0  6e 66 69 6c 74 25 29 3d  bb a4 67 65 74 70 61 72  |nfilt%)=..getpar|
00012400  28 61 24 2c 22 3b 22 29  0d 71 16 0d 20 20 e3 6c  |(a$,";").q..  .l|
00012410  25 3d 30 b8 32 0d 71 20  26 20 20 66 6c 6a 25 28  |%=0.2.q &  flj%(|
00012420  6e 66 69 6c 74 25 2c 6c  25 29 3d bb a4 67 65 74  |nfilt%,l%)=..get|
00012430  70 61 72 28 61 24 2c 22  3b 22 29 0d 71 2a 26 20  |par(a$,";").q*& |
00012440  20 66 6c 63 25 28 6e 66  69 6c 74 25 2c 6c 25 29  | flc%(nfilt%,l%)|
00012450  3d bb a4 67 65 74 70 61  72 28 61 24 2c 22 3b 22  |=..getpar(a$,";"|
00012460  29 0d 71 34 25 20 20 66  6c 63 24 28 6e 66 69 6c  |).q4%  flc$(nfil|
00012470  74 25 2c 6c 25 29 3d a4  67 65 74 70 61 72 28 61  |t%,l%)=.getpar(a|
00012480  24 2c 22 3b 22 29 0d 71  3e 26 20 20 66 6c 6e 25  |$,";").q>&  fln%|
00012490  28 6e 66 69 6c 74 25 2c  6c 25 29 3d bb a4 67 65  |(nfilt%,l%)=..ge|
000124a0  74 70 61 72 28 61 24 2c  22 3b 22 29 0d 71 48 09  |tpar(a$,";").qH.|
000124b0  20 20 ed 6c 25 0d 71 52  23 20 20 66 6c 61 25 28  |  .l%.qR#  fla%(|
000124c0  6e 66 69 6c 74 25 29 3d  bb a4 67 65 74 70 61 72  |nfilt%)=..getpar|
000124d0  28 61 24 2c 22 3b 22 29  0d 71 5c 22 20 20 66 6c  |(a$,";").q\"  fl|
000124e0  61 24 28 6e 66 69 6c 74  25 29 3d a4 67 65 74 70  |a$(nfilt%)=.getp|
000124f0  61 72 28 61 24 2c 22 3b  22 29 0d 71 66 41 20 20  |ar(a$,";").qfA  |
00012500  e7 66 6c 63 24 28 6e 66  69 6c 74 25 2c 30 29 3e  |.flc$(nfilt%,0)>|
00012510  22 22 80 66 6c 61 25 28  6e 66 69 6c 74 25 29 3e  |"".fla%(nfilt%)>|
00012520  30 8c 6e 66 69 6c 74 25  2b 3d 31 3a 8b 66 6c 74  |0.nfilt%+=1:.flt|
00012530  25 28 6e 66 69 6c 74 25  29 3d 30 0d 71 70 29 20  |%(nfilt%)=0.qp) |
00012540  20 fd c5 23 66 31 25 3a  f2 63 66 28 66 31 25 29  | ..#f1%:.cf(f1%)|
00012550  3a e7 6e 66 69 6c 74 25  3e 30 8c 6e 66 69 6c 74  |:.nfilt%>0.nfilt|
00012560  25 2d 3d 31 0d 71 7a 05  cd 0d 71 84 12 f2 73 65  |%-=1.qz...q...se|
00012570  74 66 69 6c 74 77 69 6e  28 30 29 0d 71 8e 05 e1  |tfiltwin(0).q...|
00012580  0d 71 98 04 0d 71 a2 11  dd f2 73 61 76 65 66 69  |.q...q....savefi|
00012590  6c 74 65 72 73 0d 71 ac  0b ea 6c 25 2c 6c 31 25  |lters.q...l%,l1%|
000125a0  0d 71 b6 09 e7 72 77 25  8c 0d 71 c0 27 20 20 66  |.q...rw%..q.'  f|
000125b0  31 25 3d a4 6f 70 65 6e  6f 75 74 28 63 6f 6e 66  |1%=.openout(conf|
000125c0  64 69 72 24 2b 22 2e 66  69 6c 74 65 72 73 22 29  |dir$+".filters")|
000125d0  0d 71 ca 0d 20 20 e7 66  31 25 3e 30 8c 0d 71 d4  |.q..  .f1%>0..q.|
000125e0  16 20 20 20 20 e3 6c 25  3d 30 b8 6d 61 78 66 69  |.    .l%=0.maxfi|
000125f0  6c 74 25 0d 71 de 14 20  20 20 20 e7 66 6c 74 25  |lt%.q..    .flt%|
00012600  28 6c 25 29 3e 30 8c 0d  71 e8 1a 20 20 20 20 20  |(l%)>0..q..     |
00012610  20 41 24 3d c3 66 6c 74  25 28 6c 25 29 2b 22 3b  | A$=.flt%(l%)+";|
00012620  22 0d 71 f2 62 20 20 20  20 20 20 e3 6c 31 25 3d  |".q.b      .l1%=|
00012630  30 b8 32 3a 41 24 2b 3d  c3 66 6c 6a 25 28 6c 25  |0.2:A$+=.flj%(l%|
00012640  2c 6c 31 25 29 2b 22 3b  22 2b c3 66 6c 63 25 28  |,l1%)+";"+.flc%(|
00012650  6c 25 2c 6c 31 25 29 2b  22 3b 22 2b 66 6c 63 24  |l%,l1%)+";"+flc$|
00012660  28 6c 25 2c 6c 31 25 29  2b 22 3b 22 2b c3 66 6c  |(l%,l1%)+";"+.fl|
00012670  6e 25 28 6c 25 2c 6c 31  25 29 2b 22 3b 22 3a ed  |n%(l%,l1%)+";":.|
00012680  6c 31 25 0d 71 fc 24 20  20 20 20 20 20 41 24 2b  |l1%.q.$      A$+|
00012690  3d c3 66 6c 61 25 28 6c  25 29 2b 22 3b 22 2b 66  |=.fla%(l%)+";"+f|
000126a0  6c 61 24 28 6c 25 29 0d  72 06 12 20 20 20 20 20  |la$(l%).r..     |
000126b0  20 d5 23 66 31 25 2c 41  24 0d 72 10 0b 20 20 20  | .#f1%,A$.r..   |
000126c0  20 20 20 cd 0d 72 1a 37  20 20 20 20 ed 6c 25 3a  |   ..r.7    .l%:|
000126d0  f2 63 66 28 66 31 25 29  3a f2 73 65 74 74 79 70  |.cf(f1%):.settyp|
000126e0  65 28 63 6f 6e 66 64 69  72 24 2b 22 2e 66 69 6c  |e(confdir$+".fil|
000126f0  74 65 72 73 22 2c 26 46  46 46 29 0d 72 24 07 20  |ters",&FFF).r$. |
00012700  20 cd 0d 72 2e 05 cd 0d  72 38 05 e1 0d 72 42 04  | ..r....r8...rB.|
00012710  0d 72 4c 14 dd f2 73 65  74 66 69 6c 74 77 69 6e  |.rL...setfiltwin|
00012720  28 6e 25 29 0d 72 56 11  ea 61 24 2c 67 24 2c 6c  |(n%).rV..a$,g$,l|
00012730  25 2c 6c 31 25 0d 72 60  0f c8 8e 66 6c 74 25 28  |%,l1%.r`...flt%(|
00012740  6e 25 29 ca 0d 72 6a 12  20 20 c9 31 3a 67 24 3d  |n%)..rj.  .1:g$=|
00012750  22 4e 65 77 73 22 0d 72  74 12 20 20 c9 32 3a 67  |"News".rt.  .2:g|
00012760  24 3d 22 4d 61 69 6c 22  0d 72 7e 11 20 20 c9 33  |$="Mail".r~.  .3|
00012770  3a 67 24 3d 22 41 6e 79  22 0d 72 88 12 20 20 7f  |:g$="Any".r..  .|
00012780  3a 67 24 3d 22 55 6e 73  65 74 22 0d 72 92 05 cb  |:g$="Unset".r...|
00012790  0d 72 9c 21 f2 75 70 64  61 74 65 69 63 6f 6e 73  |.r.!.updateicons|
000127a0  74 72 69 6e 67 28 66 77  69 6e 25 2c 31 2c 67 24  |tring(fwin%,1,g$|
000127b0  29 0d 72 a6 0c e3 6c 31  25 3d 30 b8 32 0d 72 b0  |).r...l1%=0.2.r.|
000127c0  15 20 20 c8 8e 66 6c 63  25 28 6e 25 2c 6c 31 25  |.  ..flc%(n%,l1%|
000127d0  29 ca 0d 72 ba 14 20 20  20 20 c9 31 3a 67 24 3d  |)..r..    .1:g$=|
000127e0  22 46 72 6f 6d 22 0d 72  c4 12 20 20 20 20 c9 32  |"From".r..    .2|
000127f0  3a 67 24 3d 22 54 6f 22  0d 72 ce 17 20 20 20 20  |:g$="To".r..    |
00012800  c9 33 3a 67 24 3d 22 53  75 62 6a 65 63 74 22 0d  |.3:g$="Subject".|
00012810  72 d8 15 20 20 20 20 c9  34 3a 67 24 3d 22 47 72  |r..    .4:g$="Gr|
00012820  6f 75 70 22 0d 72 e2 18  20 20 20 20 c9 35 3a 67  |oup".r..    .5:g|
00012830  24 3d 22 52 65 70 6c 79  20 54 6f 22 0d 72 ec 1a  |$="Reply To".r..|
00012840  20 20 20 20 c9 36 3a 67  24 3d 22 50 72 65 63 65  |    .6:g$="Prece|
00012850  64 65 6e 63 65 22 0d 72  f6 18 20 20 20 20 c9 37  |dence".r..    .7|
00012860  3a 67 24 3d 22 45 6e 76  65 6c 6f 70 65 22 0d 73  |:g$="Envelope".s|
00012870  00 23 20 20 20 20 7f 3a  67 24 3d 22 4e 6f 6e 65  |.#    .:g$="None|
00012880  22 3a 66 6c 63 24 28 6e  25 2c 6c 31 25 29 3d 22  |":flc$(n%,l1%)="|
00012890  22 0d 73 0a 07 20 20 cb  0d 73 14 27 20 20 f2 75  |".s..  ..s.'  .u|
000128a0  70 64 61 74 65 69 63 6f  6e 73 74 72 69 6e 67 28  |pdateiconstring(|
000128b0  66 77 69 6e 25 2c 32 2b  6c 31 25 2c 67 24 29 0d  |fwin%,2+l1%,g$).|
000128c0  73 1e 36 20 20 f2 75 70  64 61 74 65 69 63 6f 6e  |s.6  .updateicon|
000128d0  73 74 72 69 6e 67 28 66  77 69 6e 25 2c 35 2b 6c  |string(fwin%,5+l|
000128e0  31 25 2c c0 66 6c 63 24  28 6e 25 2c 6c 31 25 29  |1%,.flc$(n%,l1%)|
000128f0  2c 31 38 29 29 0d 73 28  27 20 20 f2 73 65 74 69  |,18)).s('  .seti|
00012900  6e 76 28 66 77 69 6e 25  2c 38 2b 6c 31 25 2c 66  |nv(fwin%,8+l1%,f|
00012910  6c 6e 25 28 6e 25 2c 6c  31 25 29 29 0d 73 32 08  |ln%(n%,l1%)).s2.|
00012920  ed 6c 31 25 0d 73 3c 25  e3 6c 31 25 3d 31 31 b8  |.l1%.s<%.l1%=11.|
00012930  31 34 3a f2 73 65 74 69  6e 76 28 66 77 69 6e 25  |14:.setinv(fwin%|
00012940  2c 6c 31 25 2c 30 29 3a  ed 0d 73 46 12 e7 66 6c  |,l1%,0):..sF..fl|
00012950  63 25 28 6e 25 2c 31 29  3e 30 8c 0d 73 50 3b 20  |c%(n%,1)>0..sP; |
00012960  20 e7 66 6c 6a 25 28 6e  25 2c 31 29 3d 30 8c f2  | .flj%(n%,1)=0..|
00012970  73 65 74 69 6e 76 28 66  77 69 6e 25 2c 31 31 2c  |setinv(fwin%,11,|
00012980  31 29 8b f2 73 65 74 69  6e 76 28 66 77 69 6e 25  |1)..setinv(fwin%|
00012990  2c 31 32 2c 31 29 0d 73  5a 14 20 20 e7 66 6c 63  |,12,1).sZ.  .flc|
000129a0  25 28 6e 25 2c 32 29 3e  30 8c 0d 73 64 3d 20 20  |%(n%,2)>0..sd=  |
000129b0  20 20 e7 66 6c 6a 25 28  6e 25 2c 32 29 3d 30 8c  |  .flj%(n%,2)=0.|
000129c0  f2 73 65 74 69 6e 76 28  66 77 69 6e 25 2c 31 33  |.setinv(fwin%,13|
000129d0  2c 31 29 8b f2 73 65 74  69 6e 76 28 66 77 69 6e  |,1)..setinv(fwin|
000129e0  25 2c 31 34 2c 31 29 0d  73 6e 07 20 20 cd 0d 73  |%,14,1).sn.  ..s|
000129f0  78 05 cd 0d 73 82 0f c8  8e 66 6c 61 25 28 6e 25  |x...s....fla%(n%|
00012a00  29 ca 0d 73 8c 12 20 20  c9 31 3a 67 24 3d 22 4a  |)..s..  .1:g$="J|
00012a10  75 6e 6b 22 0d 73 96 12  20 20 c9 32 3a 67 24 3d  |unk".s..  .2:g$=|
00012a20  22 4b 69 6c 6c 22 0d 73  a0 16 20 20 c9 33 3a 67  |"Kill".s..  .3:g|
00012a30  24 3d 22 52 65 64 69 72  65 63 74 22 0d 73 aa 14  |$="Redirect".s..|
00012a40  20 20 c9 34 3a 67 24 3d  22 53 75 62 6d 69 74 22  |  .4:g$="Submit"|
00012a50  0d 73 b4 19 20 20 7f 3a  67 24 3d 22 22 3a 66 6c  |.s..  .:g$="":fl|
00012a60  61 24 28 6e 25 29 3d 22  22 0d 73 be 05 cb 0d 73  |a$(n%)="".s....s|
00012a70  c8 22 f2 75 70 64 61 74  65 69 63 6f 6e 73 74 72  |.".updateiconstr|
00012a80  69 6e 67 28 66 77 69 6e  25 2c 31 35 2c 67 24 29  |ing(fwin%,15,g$)|
00012a90  0d 73 d2 2d f2 75 70 64  61 74 65 69 63 6f 6e 73  |.s.-.updateicons|
00012aa0  74 72 69 6e 67 28 66 77  69 6e 25 2c 31 36 2c c0  |tring(fwin%,16,.|
00012ab0  66 6c 61 24 28 6e 25 29  2c 39 38 29 29 0d 73 dc  |fla$(n%),98)).s.|
00012ac0  31 f2 75 70 64 61 74 65  69 63 6f 6e 73 74 72 69  |1.updateiconstri|
00012ad0  6e 67 28 66 77 69 6e 25  2c 31 37 2c 22 46 69 6c  |ng(fwin%,17,"Fil|
00012ae0  74 65 72 20 22 2b c3 28  6e 25 2b 31 29 29 0d 73  |ter "+.(n%+1)).s|
00012af0  e6 0e f2 6c 6f 73 65 63  61 72 65 74 0d 73 f0 1a  |...losecaret.s..|
00012b00  66 69 6c 74 25 28 29 3d  30 3a e3 6c 25 3d 30 b8  |filt%()=0:.l%=0.|
00012b10  6e 66 69 6c 74 25 0d 73  fa 11 20 20 c8 8e 66 6c  |nfilt%.s..  ..fl|
00012b20  74 25 28 6c 25 29 ca 0d  74 04 16 20 20 20 20 c9  |t%(l%)..t..    .|
00012b30  31 3a 66 69 6c 74 25 28  31 29 2b 3d 31 0d 74 0e  |1:filt%(1)+=1.t.|
00012b40  16 20 20 20 20 c9 32 3a  66 69 6c 74 25 28 30 29  |.    .2:filt%(0)|
00012b50  2b 3d 31 0d 74 18 22 20  20 20 20 c9 33 3a 66 69  |+=1.t."    .3:fi|
00012b60  6c 74 25 28 30 29 2b 3d  31 3a 66 69 6c 74 25 28  |lt%(0)+=1:filt%(|
00012b70  31 29 2b 3d 31 0d 74 22  07 20 20 cb 0d 74 2c 07  |1)+=1.t".  ..t,.|
00012b80  ed 6c 25 0d 74 36 05 e1  0d 74 40 04 0d 74 4a 11  |.l%.t6...t@..tJ.|
00012b90  dd f2 64 65 6c 66 69 6c  74 28 6e 25 29 0d 74 54  |..delfilt(n%).tT|
00012ba0  1b ea 6c 25 2c 6c 31 25  3a e3 6c 25 3d 6e 25 b8  |..l%,l1%:.l%=n%.|
00012bb0  6e 66 69 6c 74 25 2d 31  0d 74 5e 41 20 20 66 6c  |nfilt%-1.t^A  fl|
00012bc0  74 25 28 6c 25 29 3d 66  6c 74 25 28 6c 25 2b 31  |t%(l%)=flt%(l%+1|
00012bd0  29 3a 66 6c 61 25 28 6c  25 29 3d 66 6c 61 25 28  |):fla%(l%)=fla%(|
00012be0  6c 25 2b 31 29 3a 66 6c  61 24 28 6c 25 29 3d 66  |l%+1):fla$(l%)=f|
00012bf0  6c 61 24 28 6c 25 2b 31  29 0d 74 68 67 20 20 e3  |la$(l%+1).thg  .|
00012c00  6c 31 25 3d 30 b8 32 3a  66 6c 63 25 28 6c 25 2c  |l1%=0.2:flc%(l%,|
00012c10  6c 31 25 29 3d 66 6c 63  25 28 6c 25 2b 31 2c 6c  |l1%)=flc%(l%+1,l|
00012c20  31 25 29 3a 66 6c 63 24  28 6c 25 2c 6c 31 25 29  |1%):flc$(l%,l1%)|
00012c30  3d 66 6c 63 24 28 6c 25  2b 31 2c 6c 31 25 29 3a  |=flc$(l%+1,l1%):|
00012c40  66 6c 6e 25 28 6c 25 2c  6c 31 25 29 3d 66 6c 6e  |fln%(l%,l1%)=fln|
00012c50  25 28 6c 25 2b 31 2c 6c  31 25 29 3a ed 6c 31 25  |%(l%+1,l1%):.l1%|
00012c60  0d 74 72 07 ed 6c 25 0d  74 7c 31 66 6c 74 25 28  |.tr..l%.t|1flt%(|
00012c70  6e 66 69 6c 74 25 29 3d  30 3a 66 6c 61 25 28 6e  |nfilt%)=0:fla%(n|
00012c80  66 69 6c 74 25 29 3d 30  3a 66 6c 61 24 28 6e 66  |filt%)=0:fla$(nf|
00012c90  69 6c 74 25 29 3d 22 22  0d 74 86 5e e3 6c 31 25  |ilt%)="".t.^.l1%|
00012ca0  3d 30 b8 32 3a 66 6c 63  25 28 6e 66 69 6c 74 25  |=0.2:flc%(nfilt%|
00012cb0  2c 6c 31 25 29 3d 30 3a  66 6c 63 24 28 6e 66 69  |,l1%)=0:flc$(nfi|
00012cc0  6c 74 25 2c 6c 31 25 29  3d 22 22 3a 66 6c 6e 25  |lt%,l1%)="":fln%|
00012cd0  28 6e 66 69 6c 74 25 2c  6c 31 25 29 3d 30 3a 66  |(nfilt%,l1%)=0:f|
00012ce0  6c 6a 25 28 6e 66 69 6c  74 25 2c 6c 31 25 29 3d  |lj%(nfilt%,l1%)=|
00012cf0  30 3a ed 6c 31 25 0d 74  90 17 e7 6e 66 69 6c 74  |0:.l1%.t...nfilt|
00012d00  25 3e 30 8c 6e 66 69 6c  74 25 2d 3d 31 0d 74 9a  |%>0.nfilt%-=1.t.|
00012d10  1c e7 63 66 69 6c 74 25  3e 6e 66 69 6c 74 25 8c  |..cfilt%>nfilt%.|
00012d20  63 66 69 6c 74 25 2d 3d  31 0d 74 a4 24 f2 73 65  |cfilt%-=1.t.$.se|
00012d30  74 66 69 6c 74 77 69 6e  28 63 66 69 6c 74 25 29  |tfiltwin(cfilt%)|
00012d40  3a f2 73 61 76 65 66 69  6c 74 65 72 73 0d 74 ae  |:.savefilters.t.|
00012d50  05 e1 0d 74 b8 04 0d 74  c2 0d dd f2 61 64 64 66  |...t...t....addf|
00012d60  69 6c 74 0d 74 cc 15 e7  6e 66 69 6c 74 25 3d 6d  |ilt.t...nfilt%=m|
00012d70  61 78 66 69 6c 74 25 8c  0d 74 d6 1a 20 20 f2 6d  |axfilt%..t..  .m|
00012d80  65 73 73 61 67 65 30 28  22 46 66 75 6c 6c 22 2c  |essage0("Ffull",|
00012d90  30 29 0d 74 e0 07 20 20  cc 0d 74 ea 1f 20 20 e7  |0).t..  ..t..  .|
00012da0  66 6c 74 25 28 6e 66 69  6c 74 25 29 3e 30 8c 6e  |flt%(nfilt%)>0.n|
00012db0  66 69 6c 74 25 2b 3d 31  0d 74 f4 36 20 20 66 6c  |filt%+=1.t.6  fl|
00012dc0  74 25 28 6e 66 69 6c 74  25 29 3d 30 3a 63 66 69  |t%(nfilt%)=0:cfi|
00012dd0  6c 74 25 3d 6e 66 69 6c  74 25 3a f2 73 65 74 66  |lt%=nfilt%:.setf|
00012de0  69 6c 74 77 69 6e 28 63  66 69 6c 74 25 29 0d 74  |iltwin(cfilt%).t|
00012df0  fe 3c 20 20 f2 75 70 64  61 74 65 69 63 6f 6e 73  |.<  .updateicons|
00012e00  74 72 69 6e 67 28 66 77  69 6e 25 2c 31 37 2c 22  |tring(fwin%,17,"|
00012e10  45 64 69 74 20 46 69 6c  74 65 72 20 22 2b c3 28  |Edit Filter "+.(|
00012e20  6e 66 69 6c 74 25 2b 31  29 29 0d 75 08 05 cd 0d  |nfilt%+1)).u....|
00012e30  75 12 05 e1 0d 75 1c 04  0d 75 26 11 dd f2 73 65  |u....u...u&...se|
00012e40  74 66 69 6c 74 28 6e 25  29 0d 75 30 17 ea 61 25  |tfilt(n%).u0..a%|
00012e50  2c 6c 31 25 2c 74 24 2c  61 24 2c 62 24 2c 41 24  |,l1%,t$,a$,b$,A$|
00012e60  0d 75 3a 23 61 25 3d a7  22 4e 4d 41 22 2c c0 a4  |.u:#a%=."NMA",..|
00012e70  69 63 5f 73 74 72 28 66  77 69 6e 25 2c 31 29 2c  |ic_str(fwin%,1),|
00012e80  31 29 29 0d 75 44 39 66  6c 74 25 28 6e 25 29 3d  |1)).uD9flt%(n%)=|
00012e90  61 25 3a e7 61 25 3c 31  8c f2 64 65 6c 66 69 6c  |a%:.a%<1..delfil|
00012ea0  74 28 6e 25 29 3a f2 6d  65 73 73 61 67 65 30 28  |t(n%):.message0(|
00012eb0  22 46 62 61 64 74 22 2c  30 29 3a e1 0d 75 4e 0c  |"Fbadt",0):..uN.|
00012ec0  e3 6c 31 25 3d 30 b8 32  0d 75 58 2d 20 20 61 25  |.l1%=0.2.uX-  a%|
00012ed0  3d a7 22 46 54 53 47 52  50 45 22 2c c0 a4 69 63  |=."FTSGRPE",..ic|
00012ee0  5f 73 74 72 28 66 77 69  6e 25 2c 32 2b 6c 31 25  |_str(fwin%,2+l1%|
00012ef0  29 2c 31 29 29 0d 75 62  1c 20 20 66 6c 63 25 28  |),1)).ub.  flc%(|
00012f00  6e 25 2c 6c 31 25 29 3d  61 25 3a e7 61 25 3e 30  |n%,l1%)=a%:.a%>0|
00012f10  8c 0d 75 6c 4a 20 20 20  20 66 6c 63 24 28 6e 25  |..ulJ    flc$(n%|
00012f20  2c 6c 31 25 29 3d a4 69  63 5f 73 74 72 28 66 77  |,l1%)=.ic_str(fw|
00012f30  69 6e 25 2c 35 2b 6c 31  25 29 3a 66 6c 6e 25 28  |in%,5+l1%):fln%(|
00012f40  6e 25 2c 6c 31 25 29 3d  a4 72 64 69 6e 76 28 66  |n%,l1%)=.rdinv(f|
00012f50  77 69 6e 25 2c 38 2b 6c  31 25 29 0d 75 76 09 20  |win%,8+l1%).uv. |
00012f60  20 20 20 cc 0d 75 80 26  20 20 20 20 66 6c 63 24  |   ..u.&    flc$|
00012f70  28 6e 25 2c 6c 31 25 29  3d 22 22 3a 66 6c 6e 25  |(n%,l1%)="":fln%|
00012f80  28 6e 25 2c 6c 31 25 29  3d 30 0d 75 8a 07 20 20  |(n%,l1%)=0.u..  |
00012f90  cd 0d 75 94 08 ed 6c 31  25 0d 75 9e 2f e7 a4 72  |..u...l1%.u./..r|
00012fa0  64 69 6e 76 28 66 77 69  6e 25 2c 31 32 29 8c 66  |dinv(fwin%,12).f|
00012fb0  6c 6a 25 28 6e 25 2c 31  29 3d 31 8b 66 6c 6a 25  |lj%(n%,1)=1.flj%|
00012fc0  28 6e 25 2c 31 29 3d 30  0d 75 a8 2f e7 a4 72 64  |(n%,1)=0.u./..rd|
00012fd0  69 6e 76 28 66 77 69 6e  25 2c 31 34 29 8c 66 6c  |inv(fwin%,14).fl|
00012fe0  6a 25 28 6e 25 2c 32 29  3d 31 8b 66 6c 6a 25 28  |j%(n%,2)=1.flj%(|
00012ff0  6e 25 2c 32 29 3d 30 0d  75 b2 2b 66 6c 61 25 28  |n%,2)=0.u.+fla%(|
00013000  6e 25 29 3d a7 22 4a 4b  52 53 22 2c c0 a4 69 63  |n%)=."JKRS",..ic|
00013010  5f 73 74 72 28 66 77 69  6e 25 2c 31 35 29 2c 31  |_str(fwin%,15),1|
00013020  29 29 0d 75 bc 1e 66 6c  61 24 28 6e 25 29 3d a4  |)).u..fla$(n%)=.|
00013030  69 63 5f 73 74 72 28 66  77 69 6e 25 2c 31 36 29  |ic_str(fwin%,16)|
00013040  0d 75 c6 20 f2 73 65 74  66 69 6c 74 77 69 6e 28  |.u. .setfiltwin(|
00013050  6e 25 29 3a f2 73 61 76  65 66 69 6c 74 65 72 73  |n%):.savefilters|
00013060  0d 75 d0 05 e1 0d 75 da  04 0d 75 e4 11 dd f2 69  |.u....u...u....i|
00013070  6e 69 74 67 72 70 64 61  74 61 0d 75 ee 10 ea 6c  |nitgrpdata.u...l|
00013080  25 2c 61 64 64 25 2c 6f  6b 25 0d 75 f8 1d 6c 25  |%,add%,ok%.u..l%|
00013090  3d 30 3a 6c 25 3d a4 66  6c 69 6e 65 73 28 67 72  |=0:l%=.flines(gr|
000130a0  70 69 6e 66 6f 24 29 0d  76 02 0a e7 6c 25 3d 30  |pinfo$).v...l%=0|
000130b0  8c 0d 76 0c 29 20 20 f2  70 72 69 6e 74 28 a4 6d  |..v.)  .print(.m|
000130c0  73 67 30 28 22 47 63 6f  75 6e 74 22 29 2c 22 20  |sg0("Gcount")," |
000130d0  22 2c 22 20 22 2c 22 20  22 29 0d 76 16 2a 20 20  |"," "," ").v.*  |
000130e0  6c 25 3d a4 63 6f 75 6e  74 67 72 6f 75 70 73 28  |l%=.countgroups(|
000130f0  30 2c 6e 65 77 73 72 6f  6f 74 24 2b 22 2e 4e 65  |0,newsroot$+".Ne|
00013100  77 73 22 29 0d 76 20 07  20 20 cd 0d 76 2a 0f f2  |ws").v .  ..v*..|
00013110  64 69 6d 67 72 70 28 6c  25 29 0d 76 34 23 de 75  |dimgrp(l%).v4#.u|
00013120  73 65 72 24 28 6d 61 78  75 73 72 25 29 2c 75 73  |ser$(maxusr%),us|
00013130  65 72 66 24 28 6d 61 78  75 73 72 25 29 0d 76 3e  |erf$(maxusr%).v>|
00013140  3f de 75 70 6f 73 74 25  28 6d 61 78 75 73 72 25  |?.upost%(maxusr%|
00013150  29 2c 75 6b 6d 25 28 6d  61 78 75 73 72 25 29 2c  |),ukm%(maxusr%),|
00013160  75 6b 6e 25 28 6d 61 78  75 73 72 25 29 2c 75 67  |ukn%(maxusr%),ug|
00013170  72 70 25 28 6d 61 78 75  73 72 25 29 0d 76 48 0d  |rp%(maxusr%).vH.|
00013180  f2 67 65 74 6d 6f 64 67  77 0d 76 52 10 f2 72 65  |.getmodgw.vR..re|
00013190  61 64 67 72 70 64 61 74  61 0d 76 5c 05 e1 0d 76  |adgrpdata.v\...v|
000131a0  66 04 0d 76 70 10 dd a4  66 6c 69 6e 65 73 28 66  |f..vp...flines(f|
000131b0  24 29 0d 76 7a 0a ea 61  24 2c 6c 25 0d 76 84 13  |$).vz..a$,l%.v..|
000131c0  66 31 25 3d a4 6f 70 65  6e 69 6e 28 66 24 29 0d  |f1%=.openin(f$).|
000131d0  76 8e 0c e7 66 31 25 3c  3e 30 8c 0d 76 98 25 20  |v...f1%<>0..v.% |
000131e0  20 f5 61 24 3d be 23 66  31 25 3a 6c 25 2b 3d 31  | .a$=.#f1%:l%+=1|
000131f0  3a fd c5 23 66 31 25 3a  f2 63 66 28 66 31 25 29  |:..#f1%:.cf(f1%)|
00013200  0d 76 a2 05 cd 0d 76 ac  07 3d 6c 25 0d 76 b6 04  |.v....v..=l%.v..|
00013210  0d 76 c0 10 dd f2 64 69  6d 67 72 70 28 6e 25 29  |.v....dimgrp(n%)|
00013220  0d 76 ca 3d 6d 61 78 67  72 6f 75 70 25 3d 6e 25  |.v.=maxgroup%=n%|
00013230  2b 61 64 64 67 72 70 25  3a e7 6d 61 78 67 72 6f  |+addgrp%:.maxgro|
00013240  75 70 25 3c 6d 69 6e 67  72 70 25 8c 6d 61 78 67  |up%<mingrp%.maxg|
00013250  72 6f 75 70 25 3d 6d 69  6e 67 72 70 25 0d 76 d4  |roup%=mingrp%.v.|
00013260  2b 67 72 6f 75 70 73 25  3d 6e 25 3a 6e 25 3d 6d  |+groups%=n%:n%=m|
00013270  61 78 67 72 6f 75 70 25  3a 6d 61 78 61 63 74 69  |axgroup%:maxacti|
00013280  76 65 25 3d 6e 25 2a 32  0d 76 de 18 de 61 63 74  |ve%=n%*2.v...act|
00013290  69 76 65 24 28 6d 61 78  61 63 74 69 76 65 25 29  |ive$(maxactive%)|
000132a0  0d 76 e8 1c de 67 72 70  65 78 70 25 28 6e 25 29  |.v...grpexp%(n%)|
000132b0  2c 67 72 70 6d 6f 64 25  28 6e 25 29 0d 76 f2 3c  |,grpmod%(n%).v.<|
000132c0  de 67 72 70 24 28 6e 25  29 2c 67 72 70 66 25 28  |.grp$(n%),grpf%(|
000132d0  6e 25 29 3a 67 72 70 24  28 29 3d c4 34 30 2c 22  |n%):grp$()=.40,"|
000132e0  20 22 29 3a 67 72 70 24  28 29 3d 22 22 3a 67 72  | "):grp$()="":gr|
000132f0  70 66 25 28 29 3d 2d 31  0d 76 fc 25 de 67 72 70  |pf%()=-1.v.%.grp|
00013300  73 65 71 25 28 6e 25 29  2c 67 72 70 61 25 28 6e  |seq%(n%),grpa%(n|
00013310  25 29 3a 67 72 70 61 25  28 29 3d 2d 31 0d 77 06  |%):grpa%()=-1.w.|
00013320  05 e1 0d 77 10 04 0d 77  1a 0e dd f2 67 65 74 6d  |...w...w....getm|
00013330  6f 64 67 77 0d 77 24 07  ea 6c 25 0d 77 2e 37 de  |odgw.w$..l%.w.7.|
00013340  6d 6f 64 67 77 24 28 32  30 29 2c 6d 6e 67 77 24  |modgw$(20),mngw$|
00013350  28 31 30 29 3a 6d 6f 64  67 77 24 28 30 29 3d 22  |(10):modgw$(0)="|
00013360  6d 6f 64 65 72 61 74 6f  72 73 2e 75 75 2e 6e 65  |moderators.uu.ne|
00013370  74 22 0d 77 38 25 66 31  25 3d a4 6f 70 65 6e 69  |t".w8%f1%=.openi|
00013380  6e 28 73 75 70 70 6f 72  74 24 2b 22 2e 6d 6f 64  |n(support$+".mod|
00013390  70 61 74 68 73 22 29 0d  77 42 0b e7 66 31 25 3e  |paths").wB..f1%>|
000133a0  30 8c 0d 77 4c 39 20 20  6c 25 3d 30 3a f5 3a 6c  |0..wL9  l%=0:.:l|
000133b0  25 2b 3d 31 3a 6d 6f 64  67 77 24 28 6c 25 29 3d  |%+=1:modgw$(l%)=|
000133c0  be 23 66 31 25 3a fd 6c  25 3d 32 30 84 c5 23 66  |.#f1%:.l%=20..#f|
000133d0  31 25 3a f2 63 66 28 66  31 25 29 0d 77 56 05 cd  |1%:.cf(f1%).wV..|
000133e0  0d 77 60 26 66 31 25 3d  a4 6f 70 65 6e 69 6e 28  |.w`&f1%=.openin(|
000133f0  73 75 70 70 6f 72 74 24  2b 22 2e 6d 61 69 6c 32  |support$+".mail2|
00013400  6e 65 77 73 22 29 0d 77  6a 0b e7 66 31 25 3e 30  |news").wj..f1%>0|
00013410  8c 0d 77 74 38 20 20 6c  25 3d 30 3a f5 3a 6c 25  |..wt8  l%=0:.:l%|
00013420  2b 3d 31 3a 6d 6e 67 77  24 28 6c 25 29 3d be 23  |+=1:mngw$(l%)=.#|
00013430  66 31 25 3a fd 6c 25 3d  31 30 84 c5 23 66 31 25  |f1%:.l%=10..#f1%|
00013440  3a f2 63 66 28 66 31 25  29 0d 77 7e 05 cd 0d 77  |:.cf(f1%).w~...w|
00013450  88 05 e1 0d 77 92 04 0d  77 9c 11 dd f2 73 65 74  |....w...w....set|
00013460  75 77 69 6e 28 75 24 29  0d 77 a6 19 ea 75 25 2c  |uwin(u$).w...u%,|
00013470  66 24 3a 75 25 3d a4 75  73 65 72 6e 6f 28 75 24  |f$:u%=.userno(u$|
00013480  29 0d 77 b0 0b e7 75 25  3e 2d 31 8c 0d 77 ba 24  |).w...u%>-1..w.$|
00013490  20 20 f2 75 70 64 61 74  65 69 63 6f 6e 73 74 72  |  .updateiconstr|
000134a0  69 6e 67 28 75 77 69 6e  25 2c 32 30 2c 75 24 29  |ing(uwin%,20,u$)|
000134b0  0d 77 c4 2b 20 20 f2 75  70 64 61 74 65 69 63 6f  |.w.+  .updateico|
000134c0  6e 73 74 72 69 6e 67 28  75 77 69 6e 25 2c 32 2c  |nstring(uwin%,2,|
000134d0  c3 75 67 72 70 25 28 75  25 29 29 0d 77 ce 31 20  |.ugrp%(u%)).w.1 |
000134e0  20 f2 75 70 64 61 74 65  69 63 6f 6e 73 74 72 69  | .updateiconstri|
000134f0  6e 67 28 75 77 69 6e 25  2c 31 33 2c c0 75 73 65  |ng(uwin%,13,.use|
00013500  72 66 24 28 75 25 29 2c  33 32 29 29 0d 77 d8 1f  |rf$(u%),32)).w..|
00013510  20 20 f2 73 65 74 69 6e  76 28 75 77 69 6e 25 2c  |  .setinv(uwin%,|
00013520  33 2c 75 6b 6d 25 28 75  25 29 29 0d 77 e2 1f 20  |3,ukm%(u%)).w.. |
00013530  20 f2 73 65 74 69 6e 76  28 75 77 69 6e 25 2c 34  | .setinv(uwin%,4|
00013540  2c 75 6b 6e 25 28 75 25  29 29 0d 77 ec 21 20 20  |,ukn%(u%)).w.!  |
00013550  f2 73 65 74 69 6e 76 28  75 77 69 6e 25 2c 35 2c  |.setinv(uwin%,5,|
00013560  75 70 6f 73 74 25 28 75  25 29 29 0d 77 f6 4d 20  |upost%(u%)).w.M |
00013570  20 66 24 3d a4 75 70 61  74 68 28 75 24 29 2b 22  | f$=.upath(u$)+"|
00013580  2e 76 61 63 61 74 69 6f  6e 22 3a f2 75 70 64 61  |.vacation":.upda|
00013590  74 65 69 63 6f 6e 73 74  72 69 6e 67 28 75 77 69  |teiconstring(uwi|
000135a0  6e 25 2c 32 31 2c a4 6d  73 67 30 28 22 49 6e 61  |n%,21,.msg0("Ina|
000135b0  63 74 69 76 65 22 29 29  0d 78 00 50 20 20 e7 a4  |ctive")).x.P  ..|
000135c0  6f 62 6a 74 79 70 65 28  66 24 29 3d 31 80 a4 66  |objtype(f$)=1..f|
000135d0  69 6c 65 73 69 7a 65 28  66 24 29 3e 30 f2 75 70  |ilesize(f$)>0.up|
000135e0  64 61 74 65 69 63 6f 6e  73 74 72 69 6e 67 28 75  |dateiconstring(u|
000135f0  77 69 6e 25 2c 32 31 2c  a4 6d 73 67 30 28 22 41  |win%,21,.msg0("A|
00013600  63 74 69 76 65 22 29 29  0d 78 0a 05 cd 0d 78 14  |ctive")).x....x.|
00013610  05 e1 0d 78 1e 04 0d 78  28 20 dd f2 65 64 69 74  |...x...x( ..edit|
00013620  76 61 63 28 75 24 29 3a  e7 a4 62 61 64 76 61 63  |vac(u$):..badvac|
00013630  28 75 24 29 8c e1 0d 78  32 21 ea 66 24 3a 66 24  |(u$)...x2!.f$:f$|
00013640  3d a4 75 70 61 74 68 28  75 24 29 2b 22 2e 76 61  |=.upath(u$)+".va|
00013650  63 61 74 69 6f 6e 22 0d  78 3c 54 e7 a4 6f 62 6a  |cation".x<T..obj|
00013660  74 79 70 65 28 66 24 29  3d 30 8c 66 32 25 3d a4  |type(f$)=0.f2%=.|
00013670  6f 70 65 6e 6f 75 74 28  66 24 29 3a e7 66 32 25  |openout(f$):.f2%|
00013680  3e 30 8c d5 23 66 32 25  2c 75 24 2b 22 20 69 73  |>0..#f2%,u$+" is|
00013690  20 61 77 61 79 22 3a f2  63 66 28 66 32 25 29 3a  | away":.cf(f2%):|
000136a0  f2 76 61 63 73 65 74 28  75 24 29 0d 78 46 5e f2  |.vacset(u$).xF^.|
000136b0  73 65 74 74 79 70 65 28  66 24 2c 26 46 46 46 29  |settype(f$,&FFF)|
000136c0  3a c8 99 22 58 57 69 6d  70 5f 53 74 61 72 74 54  |:.."XWimp_StartT|
000136d0  61 73 6b 22 2c 22 46 69  6c 65 72 5f 52 75 6e 20  |ask","Filer_Run |
000136e0  22 2b 66 24 3a f2 75 70  64 61 74 65 69 63 6f 6e  |"+f$:.updateicon|
000136f0  73 74 72 69 6e 67 28 75  77 69 6e 25 2c 32 31 2c  |string(uwin%,21,|
00013700  22 41 63 74 69 76 65 22  29 0d 78 50 05 e1 0d 78  |"Active").xP...x|
00013710  5a 04 0d 78 64 22 dd f2  6e 65 77 76 61 63 28 75  |Z..xd"..newvac(u|
00013720  24 2c 73 24 29 3a e7 a4  62 61 64 76 61 63 28 75  |$,s$):..badvac(u|
00013730  24 29 8c e1 0d 78 6e 24  ea 66 24 2c 46 25 3a 66  |$)...xn$.f$,F%:f|
00013740  24 3d a4 75 70 61 74 68  28 75 24 29 2b 22 2e 76  |$=.upath(u$)+".v|
00013750  61 63 61 74 69 6f 6e 22  0d 78 78 27 46 25 3d a4  |acation".xx'F%=.|
00013760  64 65 6c 66 69 6c 65 28  66 24 29 3a 46 25 3d a4  |delfile(f$):F%=.|
00013770  63 6f 70 79 66 69 6c 65  28 73 24 2c 66 24 29 0d  |copyfile(s$,f$).|
00013780  78 82 41 e7 46 25 3d 30  8c f2 75 70 64 61 74 65  |x.A.F%=0..update|
00013790  69 63 6f 6e 73 74 72 69  6e 67 28 75 77 69 6e 25  |iconstring(uwin%|
000137a0  2c 32 31 2c a4 6d 73 67  30 28 22 41 63 74 69 76  |,21,.msg0("Activ|
000137b0  65 22 29 29 3a f2 76 61  63 73 65 74 28 75 24 29  |e")):.vacset(u$)|
000137c0  0d 78 8c 05 e1 0d 78 96  04 0d 78 a0 10 dd f2 76  |.x....x...x....v|
000137d0  61 63 73 65 74 28 75 24  29 0d 78 aa 1d f2 6d 65  |acset(u$).x...me|
000137e0  73 73 61 67 65 31 28 22  55 76 61 63 73 65 74 22  |ssage1("Uvacset"|
000137f0  2c 75 24 2c 30 29 0d 78  b4 05 e1 0d 78 be 04 0d  |,u$,0).x....x...|
00013800  78 c8 11 dd f2 63 61 6e  63 76 61 63 28 75 24 29  |x....cancvac(u$)|
00013810  0d 78 d2 2b ea 46 25 3a  46 25 3d a4 64 65 6c 66  |.x.+.F%:F%=.delf|
00013820  69 6c 65 28 a4 75 70 61  74 68 28 75 24 29 2b 22  |ile(.upath(u$)+"|
00013830  2e 76 61 63 61 74 69 6f  6e 22 29 0d 78 dc 36 e7  |.vacation").x.6.|
00013840  46 25 3d 30 f2 75 70 64  61 74 65 69 63 6f 6e 73  |F%=0.updateicons|
00013850  74 72 69 6e 67 28 75 77  69 6e 25 2c 32 31 2c a4  |tring(uwin%,21,.|
00013860  6d 73 67 30 28 22 49 6e  61 63 74 69 76 65 22 29  |msg0("Inactive")|
00013870  29 0d 78 e6 05 e1 0d 78  f0 04 0d 78 fa 10 dd a4  |).x....x...x....|
00013880  62 61 64 76 61 63 28 75  24 29 0d 79 04 1a ea 66  |badvac(u$).y...f|
00013890  25 3a 66 25 3d 30 3a 75  24 3d a4 6c 6f 77 65 72  |%:f%=0:u$=.lower|
000138a0  28 75 24 29 0d 79 0e 2f  66 25 3d 28 75 24 3d 22  |(u$).y./f%=(u$="|
000138b0  72 6f 6f 74 22 84 75 24  3d 22 70 6f 73 74 6d 61  |root".u$="postma|
000138c0  73 74 65 72 22 84 75 24  3d 22 64 65 66 61 75 6c  |ster".u$="defaul|
000138d0  74 22 29 0d 79 18 21 e7  66 25 8c ef 37 3a f2 6d  |t").y.!.f%..7:.m|
000138e0  65 73 73 61 67 65 30 28  22 55 62 61 64 76 61 63  |essage0("Ubadvac|
000138f0  22 2c 30 29 0d 79 22 07  3d 66 25 0d 79 2c 04 0d  |",0).y".=f%.y,..|
00013900  79 36 10 dd a4 75 73 65  72 6e 6f 28 75 24 29 0d  |y6...userno(u$).|
00013910  79 40 14 ea 6c 25 2c 72  25 3a 72 25 3d 30 3a 6c  |y@..l%,r%:r%=0:l|
00013920  25 3d 30 0d 79 4a 26 c8  95 6c 25 3c 6d 61 78 75  |%=0.yJ&..l%<maxu|
00013930  73 72 25 80 75 24 3c 3e  75 73 65 72 24 28 6c 25  |sr%.u$<>user$(l%|
00013940  29 3a 6c 25 2b 3d 31 3a  ce 0d 79 54 1d e7 75 24  |):l%+=1:..yT..u$|
00013950  3d 75 73 65 72 24 28 6c  25 29 80 75 24 3e 22 22  |=user$(l%).u$>""|
00013960  8c 72 25 3d 6c 25 0d 79  5e 07 3d 72 25 0d 79 68  |.r%=l%.y^.=r%.yh|
00013970  04 0d 79 72 12 dd f2 69  6e 69 74 75 73 65 72 64  |..yr...inituserd|
00013980  61 74 61 0d 79 7c 23 ea  6f 6b 25 2c 6e 65 78 74  |ata.y|#.ok%,next|
00013990  25 2c 6e 25 2c 75 25 2c  75 63 25 2c 65 72 72 25  |%,n%,u%,uc%,err%|
000139a0  2c 75 24 2c 70 24 0d 79  86 20 c8 95 a4 76 61 72  |,u$,p$.y. ...var|
000139b0  76 61 6c 28 22 55 73 65  72 48 6f 6d 65 24 44 69  |val("UserHome$Di|
000139c0  72 22 29 3d 22 22 0d 79  90 24 20 20 6f 6b 25 3d  |r")="".y.$  ok%=|
000139d0  a4 63 6f 6e 66 69 72 6d  28 a4 6d 73 67 30 28 22  |.confirm(.msg0("|
000139e0  55 6e 6f 68 6f 6d 65 22  29 29 0d 79 9a 41 20 20  |Unohome")).y.A  |
000139f0  e7 6f 6b 25 3d 31 8c c8  99 22 4f 53 5f 43 4c 49  |.ok%=1..."OS_CLI|
00013a00  22 2c 22 73 65 74 20 55  73 65 72 48 6f 6d 65 24  |","set UserHome$|
00013a10  44 69 72 20 22 2b 6e 65  77 73 72 6f 6f 74 24 2b  |Dir "+newsroot$+|
00013a20  22 2e 55 73 65 72 48 6f  6d 65 22 0d 79 a4 05 ce  |".UserHome".y...|
00013a30  0d 79 ae 25 75 73 65 72  68 6f 6d 65 24 3d a4 76  |.y.%userhome$=.v|
00013a40  61 72 76 61 6c 28 22 55  73 65 72 48 6f 6d 65 24  |arval("UserHome$|
00013a50  44 69 72 22 29 0d 79 b8  42 75 73 65 72 24 28 30  |Dir").y.Buser$(0|
00013a60  29 3d 22 64 65 66 61 75  6c 74 22 3a 75 67 72 70  |)="default":ugrp|
00013a70  25 28 30 29 3d 31 30 3a  75 6b 6d 25 28 30 29 3d  |%(0)=10:ukm%(0)=|
00013a80  31 3a 75 6b 6e 25 28 30  29 3d 31 3a 75 70 6f 73  |1:ukn%(0)=1:upos|
00013a90  74 25 28 30 29 3d 31 0d  79 c2 1b e7 a4 6f 62 6a  |t%(0)=1.y....obj|
00013aa0  74 79 70 65 28 75 73 65  72 68 6f 6d 65 24 29 3c  |type(userhome$)<|
00013ab0  32 8c 0d 79 cc 29 20 20  f2 65 6e 73 75 72 65 64  |2..y.)  .ensured|
00013ac0  69 72 28 75 73 65 72 68  6f 6d 65 24 29 3a f2 66  |ir(userhome$):.f|
00013ad0  69 6e 64 61 6c 6c 75 73  65 72 73 0d 79 d6 07 20  |indallusers.y.. |
00013ae0  20 cc 0d 79 e0 15 20 20  6e 65 78 74 25 3d 30 3a  | ..y..  next%=0:|
00013af0  75 63 25 3d 31 3a f5 0d  79 ea 45 20 20 c8 99 22  |uc%=1:..y.E  .."|
00013b00  58 4f 53 5f 47 42 50 42  22 2c 39 2c 75 73 65 72  |XOS_GBPB",9,user|
00013b10  68 6f 6d 65 24 2c 74 6d  70 25 2c 31 2c 6e 65 78  |home$,tmp%,1,nex|
00013b20  74 25 2c 32 35 35 2c 22  2a 22 b8 20 2c 2c 2c 6e  |t%,255,"*". ,,,n|
00013b30  25 2c 6e 65 78 74 25 3b  65 72 72 25 0d 79 f4 3c  |%,next%;err%.y.<|
00013b40  20 20 75 24 3d a4 73 74  72 28 74 6d 70 25 29 3a  |  u$=.str(tmp%):|
00013b50  e7 a4 6c 6f 77 65 72 28  75 24 29 3d 22 64 65 66  |..lower(u$)="def|
00013b60  61 75 6c 74 22 8c 75 25  3d 30 8b 75 25 3d 75 63  |ault".u%=0.u%=uc|
00013b70  25 3a 75 63 25 2b 3d 31  0d 79 fe 22 20 20 e7 28  |%:uc%+=1.y."  .(|
00013b80  65 72 72 25 80 31 29 3d  30 80 6e 25 3e 30 80 75  |err%.1)=0.n%>0.u|
00013b90  25 3c 6d 61 78 75 73 72  25 8c 0d 7a 08 22 20 20  |%<maxusr%..z."  |
00013ba0  20 20 75 73 65 72 24 28  75 25 29 3d 75 24 3a 70  |  user$(u%)=u$:p|
00013bb0  24 3d a4 75 70 61 74 68  28 75 24 29 0d 7a 12 23  |$=.upath(u$).z.#|
00013bc0  20 20 20 20 66 30 25 3d  a4 6f 70 65 6e 69 6e 28  |    f0%=.openin(|
00013bd0  70 24 2b 22 2e 75 73 65  72 69 6e 66 6f 22 29 0d  |p$+".userinfo").|
00013be0  7a 1c 0f 20 20 20 20 e7  66 30 25 3e 30 8c 0d 7a  |z..    .f0%>0..z|
00013bf0  26 2c 20 20 20 20 20 20  75 67 72 70 25 28 75 25  |&,      ugrp%(u%|
00013c00  29 3d bb be 23 66 30 25  3a 75 70 6f 73 74 25 28  |)=..#f0%:upost%(|
00013c10  75 25 29 3d bb be 23 66  30 25 0d 7a 30 32 20 20  |u%)=..#f0%.z02  |
00013c20  20 20 20 20 75 6b 6d 25  28 75 25 29 3d bb be 23  |    ukm%(u%)=..#|
00013c30  66 30 25 3a 75 6b 6e 25  28 75 25 29 3d bb be 23  |f0%:ukn%(u%)=..#|
00013c40  66 30 25 3a f2 63 66 28  66 30 25 29 0d 7a 3a 0b  |f0%:.cf(f0%).z:.|
00013c50  20 20 20 20 20 20 cc 0d  7a 44 17 20 20 20 20 20  |      ..zD.     |
00013c60  20 f2 63 70 64 65 66 75  73 72 28 75 25 29 0d 7a  | .cpdefusr(u%).z|
00013c70  4e 09 20 20 20 20 cd 0d  7a 58 22 20 20 20 20 66  |N.    ..zX"    f|
00013c80  30 25 3d a4 6f 70 65 6e  69 6e 28 70 24 2b 22 2e  |0%=.openin(p$+".|
00013c90  66 6f 72 77 61 72 64 22  29 0d 7a 62 36 20 20 20  |forward").zb6   |
00013ca0  20 e7 66 30 25 3e 30 8c  75 73 65 72 66 24 28 75  | .f0%>0.userf$(u|
00013cb0  25 29 3d be 23 66 30 25  3a f2 63 66 28 66 30 25  |%)=.#f0%:.cf(f0%|
00013cc0  29 8b 75 73 65 72 66 24  28 75 25 29 3d 22 22 0d  |).userf$(u%)="".|
00013cd0  7a 6c 07 20 20 cd 0d 7a  76 1a 20 20 fd 6e 65 78  |zl.  ..zv.  .nex|
00013ce0  74 25 3c 30 84 28 65 72  72 25 80 31 29 3c 3e 30  |t%<0.(err%.1)<>0|
00013cf0  0d 7a 80 05 cd 0d 7a 8a  17 f2 73 65 74 75 77 69  |.z....z...setuwi|
00013d00  6e 28 22 64 65 66 61 75  6c 74 22 29 0d 7a 94 05  |n("default").z..|
00013d10  e1 0d 7a 9e 04 0d 7a a8  12 dd f2 63 70 64 65 66  |..z...z....cpdef|
00013d20  75 73 72 28 75 25 29 0d  7a b2 0a e7 75 25 3e 30  |usr(u%).z...u%>0|
00013d30  8c 0d 7a bc 4d 75 67 72  70 25 28 75 25 29 3d 75  |..z.Mugrp%(u%)=u|
00013d40  67 72 70 25 28 30 29 3a  75 6b 6d 25 28 75 25 29  |grp%(0):ukm%(u%)|
00013d50  3d 75 6b 6d 25 28 30 29  3a 75 6b 6e 25 28 75 25  |=ukm%(0):ukn%(u%|
00013d60  29 3d 75 6b 6e 25 28 30  29 3a 75 70 6f 73 74 25  |)=ukn%(0):upost%|
00013d70  28 75 25 29 3d 75 70 6f  73 74 25 28 30 29 0d 7a  |(u%)=upost%(0).z|
00013d80  c6 10 c8 8e 75 73 65 72  24 28 75 25 29 ca 0d 7a  |....user$(u%)..z|
00013d90  d0 19 20 20 c9 22 72 6f  6f 74 22 3a 75 67 72 70  |..  ."root":ugrp|
00013da0  25 28 75 25 29 3d 30 0d  7a da 1f 20 20 c9 22 70  |%(u%)=0.z..  ."p|
00013db0  6f 73 74 6d 61 73 74 65  72 22 3a 75 67 72 70 25  |ostmaster":ugrp%|
00013dc0  28 75 25 29 3d 31 0d 7a  e4 05 cb 0d 7a ee 05 cd  |(u%)=1.z....z...|
00013dd0  0d 7a f8 19 f2 73 61 76  65 75 73 65 72 69 6e 66  |.z...saveuserinf|
00013de0  6f 62 79 6e 6f 28 75 25  29 0d 7b 02 05 e1 0d 7b  |obyno(u%).{....{|
00013df0  0c 04 0d 7b 16 11 dd f2  67 65 74 75 73 65 72 69  |...{....getuseri|
00013e00  6e 66 6f 0d 7b 20 25 ea  75 25 3a 75 25 3d a4 75  |nfo.{ %.u%:u%=.u|
00013e10  73 65 72 6e 6f 28 a4 69  63 5f 73 74 72 28 75 77  |serno(.ic_str(uw|
00013e20  69 6e 25 2c 32 30 29 29  0d 7b 2a 0b e7 75 25 3e  |in%,20)).{*..u%>|
00013e30  2d 31 8c 0d 7b 34 21 20  20 75 67 72 70 25 28 75  |-1..{4!  ugrp%(u|
00013e40  25 29 3d bb a4 69 63 5f  73 74 72 28 75 77 69 6e  |%)=..ic_str(uwin|
00013e50  25 2c 32 29 0d 7b 3e 1e  20 20 75 6b 6d 25 28 75  |%,2).{>.  ukm%(u|
00013e60  25 29 3d a4 72 64 69 6e  76 28 75 77 69 6e 25 2c  |%)=.rdinv(uwin%,|
00013e70  33 29 0d 7b 48 1e 20 20  75 6b 6e 25 28 75 25 29  |3).{H.  ukn%(u%)|
00013e80  3d a4 72 64 69 6e 76 28  75 77 69 6e 25 2c 34 29  |=.rdinv(uwin%,4)|
00013e90  0d 7b 52 20 20 20 75 70  6f 73 74 25 28 75 25 29  |.{R   upost%(u%)|
00013ea0  3d a4 72 64 69 6e 76 28  75 77 69 6e 25 2c 35 29  |=.rdinv(uwin%,5)|
00013eb0  0d 7b 5c 22 20 20 75 73  65 72 66 24 28 75 25 29  |.{\"  userf$(u%)|
00013ec0  3d a4 69 63 5f 73 74 72  28 75 77 69 6e 25 2c 31  |=.ic_str(uwin%,1|
00013ed0  33 29 0d 7b 66 05 cd 0d  7b 70 05 e1 0d 7b 7a 04  |3).{f...{p...{z.|
00013ee0  0d 7b 84 12 dd f2 73 61  76 65 75 73 65 72 69 6e  |.{....saveuserin|
00013ef0  66 6f 0d 7b 8e 25 ea 75  25 3a 75 25 3d a4 75 73  |fo.{.%.u%:u%=.us|
00013f00  65 72 6e 6f 28 a4 69 63  5f 73 74 72 28 75 77 69  |erno(.ic_str(uwi|
00013f10  6e 25 2c 32 30 29 29 0d  7b 98 19 f2 73 61 76 65  |n%,20)).{...save|
00013f20  75 73 65 72 69 6e 66 6f  62 79 6e 6f 28 75 25 29  |userinfobyno(u%)|
00013f30  0d 7b a2 05 e1 0d 7b ac  04 0d 7b b6 1a dd f2 73  |.{....{...{....s|
00013f40  61 76 65 75 73 65 72 69  6e 66 6f 62 79 6e 6f 28  |aveuserinfobyno(|
00013f50  75 25 29 0d 7b c0 0a ea  66 24 2c 6c 25 0d 7b ca  |u%).{...f$,l%.{.|
00013f60  0b e7 75 25 3e 2d 31 8c  0d 7b d4 39 20 20 66 24  |..u%>-1..{.9  f$|
00013f70  3d a4 75 70 61 74 68 28  75 73 65 72 24 28 75 25  |=.upath(user$(u%|
00013f80  29 29 3a f2 65 6e 73 75  72 65 64 69 72 28 66 24  |)):.ensuredir(f$|
00013f90  29 3a 66 24 2b 3d 22 2e  75 73 65 72 69 6e 66 6f  |):f$+=".userinfo|
00013fa0  22 0d 7b de 16 20 20 66  30 25 3d a4 6f 70 65 6e  |".{..  f0%=.open|
00013fb0  6f 75 74 28 66 24 29 0d  7b e8 0d 20 20 e7 66 30  |out(f$).{..  .f0|
00013fc0  25 3e 30 8c 0d 7b f2 2a  20 20 20 20 d5 23 66 30  |%>0..{.*    .#f0|
00013fd0  25 2c c3 75 67 72 70 25  28 75 25 29 3a d5 23 66  |%,.ugrp%(u%):.#f|
00013fe0  30 25 2c c3 75 70 6f 73  74 25 28 75 25 29 0d 7b  |0%,.upost%(u%).{|
00013ff0  fc 27 20 20 20 20 d5 23  66 30 25 2c c3 75 6b 6d  |.'    .#f0%,.ukm|
00014000  25 28 75 25 29 3a d5 23  66 30 25 2c c3 75 6b 6e  |%(u%):.#f0%,.ukn|
00014010  25 28 75 25 29 0d 7c 06  22 20 20 20 20 f2 63 66  |%(u%).|."    .cf|
00014020  28 66 30 25 29 3a f2 73  65 74 74 79 70 65 28 66  |(f0%):.settype(f|
00014030  24 2c 26 46 46 46 29 0d  7c 10 07 20 20 cd 0d 7c  |$,&FFF).|..  ..||
00014040  1a 25 20 20 66 24 3d a4  75 70 61 74 68 28 75 73  |.%  f$=.upath(us|
00014050  65 72 24 28 75 25 29 29  2b 22 2e 66 6f 72 77 61  |er$(u%))+".forwa|
00014060  72 64 22 0d 7c 24 16 20  20 66 30 25 3d a4 6f 70  |rd".|$.  f0%=.op|
00014070  65 6e 6f 75 74 28 66 24  29 0d 7c 2e 38 20 20 e7  |enout(f$).|.8  .|
00014080  66 30 25 3e 30 8c d5 23  66 30 25 2c 75 73 65 72  |f0%>0..#f0%,user|
00014090  66 24 28 75 25 29 3a f2  63 66 28 66 30 25 29 3a  |f$(u%):.cf(f0%):|
000140a0  f2 73 65 74 74 79 70 65  28 66 24 2c 26 46 46 46  |.settype(f$,&FFF|
000140b0  29 0d 7c 38 35 20 20 6c  25 3d a4 72 75 6e 74 72  |).|85  l%=.runtr|
000140c0  61 6e 73 70 6f 72 74 66  69 6c 65 28 38 2c 22 22  |ansportfile(8,""|
000140d0  2c 75 73 65 72 24 28 75  25 29 2c c3 75 67 72 70  |,user$(u%),.ugrp|
000140e0  25 28 75 25 29 29 0d 7c  42 05 cd 0d 7c 4c 05 e1  |%(u%)).|B...|L..|
000140f0  0d 7c 56 04 0d 7c 60 11  dd a4 63 6f 6e 66 69 72  |.|V..|`...confir|
00014100  6d 28 41 24 29 0d 7c 6a  1c ea 79 6e 63 68 6f 69  |m(A$).|j..ynchoi|
00014110  63 65 25 3a f4 20 31 3d  79 65 73 2c 20 6e 6f 3d  |ce%:. 1=yes, no=|
00014120  32 0d 7c 74 29 f2 73 65  74 63 6f 6e 66 69 72 6d  |2.|t).setconfirm|
00014130  28 a4 6d 73 67 30 28 22  59 65 73 22 29 2c a4 6d  |(.msg0("Yes"),.m|
00014140  73 67 30 28 22 4e 6f 22  29 29 0d 7c 7e 3b f2 75  |sg0("No")).|~;.u|
00014150  70 64 61 74 65 69 63 6f  6e 73 74 72 69 6e 67 28  |pdateiconstring(|
00014160  79 65 73 6e 6f 25 2c 30  2c c0 41 24 2c 37 38 29  |yesno%,0,.A$,78)|
00014170  29 3a f2 63 66 72 6f 6e  74 28 79 65 73 6e 6f 25  |):.cfront(yesno%|
00014180  2c 30 2c 30 29 0d 7c 88  28 79 6e 63 68 6f 69 63  |,0,0).|.(ynchoic|
00014190  65 25 3d 30 3a f5 f2 70  6f 6c 6c 28 31 30 30 29  |e%=0:..poll(100)|
000141a0  3a fd 79 6e 63 68 6f 69  63 65 25 3e 30 0d 7c 92  |:.ynchoice%>0.|.|
000141b0  0e 3d 79 6e 63 68 6f 69  63 65 25 0d 7c 9c 04 0d  |.=ynchoice%.|...|
000141c0  7c a6 12 dd a4 63 6f 6e  66 69 72 6d 32 28 41 24  ||....confirm2(A$|
000141d0  29 0d 7c b0 24 ea 79 6e  63 68 6f 69 63 65 25 3a  |).|.$.ynchoice%:|
000141e0  f4 20 31 3d 63 6f 6e 74  69 6e 75 65 2c 20 32 3d  |. 1=continue, 2=|
000141f0  64 65 66 65 72 0d 7c ba  30 f2 73 65 74 63 6f 6e  |defer.|.0.setcon|
00014200  66 69 72 6d 28 a4 6d 73  67 30 28 22 43 6f 6e 74  |firm(.msg0("Cont|
00014210  69 6e 75 65 22 29 2c a4  6d 73 67 30 28 22 53 6b  |inue"),.msg0("Sk|
00014220  69 70 22 29 29 0d 7c c4  3b f2 75 70 64 61 74 65  |ip")).|.;.update|
00014230  69 63 6f 6e 73 74 72 69  6e 67 28 79 65 73 6e 6f  |iconstring(yesno|
00014240  25 2c 30 2c c0 41 24 2c  37 38 29 29 3a f2 63 66  |%,0,.A$,78)):.cf|
00014250  72 6f 6e 74 28 79 65 73  6e 6f 25 2c 30 2c 30 29  |ront(yesno%,0,0)|
00014260  0d 7c ce 28 79 6e 63 68  6f 69 63 65 25 3d 30 3a  |.|.(ynchoice%=0:|
00014270  f5 f2 70 6f 6c 6c 28 31  30 30 29 3a fd 79 6e 63  |..poll(100):.ync|
00014280  68 6f 69 63 65 25 3e 30  0d 7c d8 0e 3d 79 6e 63  |hoice%>0.|..=ync|
00014290  68 6f 69 63 65 25 0d 7c  e2 04 0d 7c ec 17 dd f2  |hoice%.|...|....|
000142a0  73 65 74 63 6f 6e 66 69  72 6d 28 41 24 2c 42 24  |setconfirm(A$,B$|
000142b0  29 0d 7c f6 41 f2 75 70  64 61 74 65 69 63 6f 6e  |).|.A.updateicon|
000142c0  73 74 72 69 6e 67 28 79  65 73 6e 6f 25 2c 31 2c  |string(yesno%,1,|
000142d0  41 24 29 3a f2 75 70 64  61 74 65 69 63 6f 6e 73  |A$):.updateicons|
000142e0  74 72 69 6e 67 28 79 65  73 6e 6f 25 2c 32 2c 42  |tring(yesno%,2,B|
000142f0  24 29 0d 7d 00 05 e1 0d  7d 0a 04 0d 7d 14 13 dd  |$).}....}...}...|
00014300  f2 61 75 74 6f 63 6f 6e  66 69 67 75 72 65 0d 7d  |.autoconfigure.}|
00014310  1e 2c e7 67 72 70 24 28  31 29 3d 22 22 f2 66 69  |.,.grp$(1)="".fi|
00014320  6e 64 61 6c 6c 67 72 6f  75 70 73 3a f2 6d 65 73  |ndallgroups:.mes|
00014330  73 61 67 65 28 22 22 2c  30 29 0d 7d 28 2c e7 75  |sage("",0).}(,.u|
00014340  73 65 72 24 28 33 29 3d  22 22 f2 66 69 6e 64 61  |ser$(3)="".finda|
00014350  6c 6c 75 73 65 72 73 3a  f2 6d 65 73 73 61 67 65  |llusers:.message|
00014360  28 22 22 2c 30 29 0d 7d  32 05 e1 0d 7d 3c 04 0d  |("",0).}2...}<..|
00014370  7d 46 12 dd f2 66 69 6e  64 61 6c 6c 75 73 65 72  |}F...findalluser|
00014380  73 0d 7d 50 12 ea 6e 25  2c 6c 25 2c 67 24 3a 6e  |s.}P..n%,l%,g$:n|
00014390  25 3d 30 0d 7d 5a 48 6c  25 3d a4 61 64 64 75 73  |%=0.}ZHl%=.addus|
000143a0  65 72 28 22 64 65 66 61  75 6c 74 22 29 3a 6c 25  |er("default"):l%|
000143b0  3d a4 61 64 64 75 73 65  72 28 22 72 6f 6f 74 22  |=.adduser("root"|
000143c0  29 3a 6c 25 3d a4 61 64  64 75 73 65 72 28 22 70  |):l%=.adduser("p|
000143d0  6f 73 74 6d 61 73 74 65  72 22 29 0d 7d 64 10 f5  |ostmaster").}d..|
000143e0  67 24 3d 67 72 70 24 28  6e 25 29 0d 7d 6e 35 e7  |g$=grp$(n%).}n5.|
000143f0  c0 67 24 2c 36 29 3d 22  45 6d 61 69 6c 2e 22 80  |.g$,6)="Email.".|
00014400  a7 67 24 2c 22 2e 22 2c  37 29 3c 31 8c 6c 25 3d  |.g$,".",7)<1.l%=|
00014410  a4 61 64 64 75 73 65 72  28 c1 67 24 2c 37 29 29  |.adduser(.g$,7))|
00014420  0d 7d 78 15 6e 25 2b 3d  31 3a fd 6e 25 3e 67 72  |.}x.n%+=1:.n%>gr|
00014430  6f 75 70 73 25 0d 7d 82  05 e1 0d 7d 8c 04 0d 7d  |oups%.}....}...}|
00014440  96 11 dd a4 61 64 64 75  73 65 72 28 41 24 29 0d  |....adduser(A$).|
00014450  7d a0 0b ea 6e 25 2c 6f  6b 25 0d 7d aa 09 e7 72  |}...n%,ok%.}...r|
00014460  77 25 8c 0d 7d b4 35 20  20 c8 95 75 73 65 72 24  |w%..}.5  ..user$|
00014470  28 6e 25 29 3c 3e 41 24  80 75 73 65 72 24 28 6e  |(n%)<>A$.user$(n|
00014480  25 29 3e 22 22 80 6e 25  3c 6d 61 78 75 73 72 25  |%)>"".n%<maxusr%|
00014490  3a 6e 25 2b 3d 31 3a ce  0d 7d be 14 20 20 e7 75  |:n%+=1:..}..  .u|
000144a0  73 65 72 24 28 6e 25 29  3d 22 22 8c 0d 7d c8 2b  |ser$(n%)=""..}.+|
000144b0  20 20 20 20 75 73 65 72  24 28 6e 25 29 3d 41 24  |    user$(n%)=A$|
000144c0  3a f2 65 6e 73 75 72 65  64 69 72 28 a4 75 70 61  |:.ensuredir(.upa|
000144d0  74 68 28 41 24 29 29 0d  7d d2 25 20 20 20 20 f2  |th(A$)).}.%    .|
000144e0  6c 6f 67 28 22 41 64 64  65 64 20 75 73 65 72 3a  |log("Added user:|
000144f0  20 22 2b 41 24 29 3a 6f  6b 25 3d b9 0d 7d dc 15  | "+A$):ok%=..}..|
00014500  20 20 20 20 f2 63 70 64  65 66 75 73 72 28 6e 25  |    .cpdefusr(n%|
00014510  29 0d 7d e6 1f 20 20 20  20 f2 6e 62 75 70 64 61  |).}..    .nbupda|
00014520  74 65 28 34 2c 41 24 2c  30 2c 22 22 2c 22 22 29  |te(4,A$,0,"","")|
00014530  0d 7d f0 30 20 20 20 20  6e 25 3d a4 72 75 6e 74  |.}.0    n%=.runt|
00014540  72 61 6e 73 70 6f 72 74  66 69 6c 65 28 36 2c 22  |ransportfile(6,"|
00014550  22 2c 41 24 2c c3 75 67  72 70 25 28 6e 25 29 29  |",A$,.ugrp%(n%))|
00014560  0d 7d fa 07 20 20 cd 0d  7e 04 05 cd 0d 7e 0e 08  |.}..  ..~....~..|
00014570  3d 6f 6b 25 0d 7e 18 04  0d 7e 22 0f dd a4 75 70  |=ok%.~...~"...up|
00014580  61 74 68 28 75 24 29 0d  7e 2c 15 3d 75 73 65 72  |ath(u$).~,.=user|
00014590  68 6f 6d 65 24 2b 22 2e  22 2b 75 24 0d 7e 36 04  |home$+"."+u$.~6.|
000145a0  0d 7e 40 11 dd a4 64 65  6c 75 73 65 72 28 41 24  |.~@...deluser(A$|
000145b0  29 0d 7e 4a 11 ea 70 24  2c 6e 25 2c 6f 6b 25 2c  |).~J..p$,n%,ok%,|
000145c0  6c 25 0d 7e 54 09 e7 72  77 25 8c 0d 7e 5e 2a 20  |l%.~T..rw%..~^* |
000145d0  20 c8 95 63 6c 5f 75 73  65 72 24 28 6e 25 29 3c  | ..cl_user$(n%)<|
000145e0  3e 41 24 80 6e 25 3c 6d  61 78 63 6c 25 3a 6e 25  |>A$.n%<maxcl%:n%|
000145f0  2b 3d 31 3a ce 0d 7e 68  33 20 20 e7 63 6c 5f 75  |+=1:..~h3  .cl_u|
00014600  73 65 72 24 28 6e 25 29  3d 41 24 84 41 24 3d 22  |ser$(n%)=A$.A$="|
00014610  72 6f 6f 74 22 84 41 24  3d 22 70 6f 73 74 6d 61  |root".A$="postma|
00014620  73 74 65 72 22 8c 3d 30  0d 7e 72 13 20 20 70 24  |ster".=0.~r.  p$|
00014630  3d a4 75 70 61 74 68 28  41 24 29 0d 7e 7c 16 20  |=.upath(A$).~|. |
00014640  20 e7 a4 6f 62 6a 74 79  70 65 28 70 24 29 3e 31  | ..objtype(p$)>1|
00014650  8c 0d 7e 86 27 20 20 20  20 f2 77 69 70 65 28 70  |..~.'    .wipe(p|
00014660  24 29 3a e7 a4 6f 62 6a  74 79 70 65 28 70 24 29  |$):..objtype(p$)|
00014670  3d 30 8c 6f 6b 25 3d b9  0d 7e 90 07 20 20 cd 0d  |=0.ok%=..~..  ..|
00014680  7e 9a 0b 20 20 e7 6f 6b  25 8c 0d 7e a4 39 20 20  |~..  .ok%..~.9  |
00014690  20 20 f2 6e 62 75 70 64  61 74 65 28 35 2c 41 24  |  .nbupdate(5,A$|
000146a0  2c 30 2c 22 22 2c 22 22  29 3a f2 6c 6f 67 28 22  |,0,"",""):.log("|
000146b0  52 65 6d 6f 76 65 64 20  75 73 65 72 3a 20 22 2b  |Removed user: "+|
000146c0  41 24 29 0d 7e ae 28 20  20 20 20 6e 25 3d a4 72  |A$).~.(    n%=.r|
000146d0  75 6e 74 72 61 6e 73 70  6f 72 74 66 69 6c 65 28  |untransportfile(|
000146e0  37 2c 22 22 2c 41 24 2c  22 22 29 0d 7e b8 32 20  |7,"",A$,"").~.2 |
000146f0  20 20 20 6e 25 3d 30 3a  c8 95 75 73 65 72 24 28  |   n%=0:..user$(|
00014700  6e 25 29 3c 3e 41 24 80  75 73 65 72 24 28 6e 25  |n%)<>A$.user$(n%|
00014710  29 3c 3e 22 22 3a 6e 25  2b 3d 31 3a ce 0d 7e c2  |)<>"":n%+=1:..~.|
00014720  40 20 20 20 20 e7 75 73  65 72 24 28 6e 25 29 3d  |@    .user$(n%)=|
00014730  41 24 8c e3 6c 25 3d 6e  25 2b 31 b8 6d 61 78 75  |A$..l%=n%+1.maxu|
00014740  73 72 25 3a 75 73 65 72  24 28 6c 25 2d 31 29 3d  |sr%:user$(l%-1)=|
00014750  75 73 65 72 24 28 6c 25  29 3a ed 6c 25 0d 7e cc  |user$(l%):.l%.~.|
00014760  19 20 20 20 20 75 73 65  72 24 28 6d 61 78 75 73  |.    user$(maxus|
00014770  72 25 29 3d 22 22 0d 7e  d6 07 20 20 cd 0d 7e e0  |r%)="".~..  ..~.|
00014780  05 cd 0d 7e ea 08 3d 6f  6b 25 0d 7e f4 04 0d 7e  |...~..=ok%.~...~|
00014790  fe 10 dd a4 75 73 65 72  6f 6b 28 41 24 29 0d 7f  |....userok(A$)..|
000147a0  08 15 ea 6e 25 3a 41 24  3d a4 6c 6f 77 65 72 28  |...n%:A$=.lower(|
000147b0  41 24 29 0d 7f 12 30 c8  95 a4 6c 6f 77 65 72 28  |A$)...0...lower(|
000147c0  75 73 65 72 24 28 6e 25  29 29 3c 3e 41 24 80 75  |user$(n%))<>A$.u|
000147d0  73 65 72 24 28 6e 25 29  3e 22 22 3a 6e 25 2b 3d  |ser$(n%)>"":n%+=|
000147e0  31 3a ce 0d 7f 1c 14 e7  75 73 65 72 24 28 6e 25  |1:......user$(n%|
000147f0  29 3d 22 22 8c 3d 30 0d  7f 26 06 3d b9 0d 7f 30  |)="".=0..&.=...0|
00014800  04 0d 7f 3a 11 dd f2 72  65 61 64 67 72 70 64 61  |...:...readgrpda|
00014810  74 61 0d 7f 44 21 ea 61  24 2c 62 24 2c 67 24 2c  |ta..D!.a$,b$,g$,|
00014820  6c 67 24 2c 74 79 25 2c  6e 6f 25 2c 72 65 73 61  |lg$,ty%,no%,resa|
00014830  76 65 25 0d 7f 4e 35 f2  68 67 6f 6e 3a 67 72 70  |ve%..N5.hgon:grp|
00014840  65 78 70 25 28 29 3d 30  3a 67 72 70 6d 6f 64 25  |exp%()=0:grpmod%|
00014850  28 29 3d 30 3a 72 65 73  61 76 65 25 3d 30 3a 67  |()=0:resave%=0:g|
00014860  72 6f 75 70 73 25 3d 30  0d 7f 58 19 66 31 25 3d  |roups%=0..X.f1%=|
00014870  a4 6f 70 65 6e 69 6e 28  67 72 70 69 6e 66 6f 24  |.openin(grpinfo$|
00014880  29 0d 7f 62 19 76 25 3d  30 3a e7 66 31 25 3e 30  |)..b.v%=0:.f1%>0|
00014890  8c 76 25 3d bb be 23 66  31 25 0d 7f 6c 23 e7 28  |.v%=..#f1%..l#.(|
000148a0  76 25 3e 3d 67 72 6f 75  70 76 65 72 25 84 76 25  |v%>=groupver%.v%|
000148b0  3d 31 33 29 80 66 31 25  3c 3e 30 20 8c 0d 7f 76  |=13).f1%<>0 ...v|
000148c0  22 20 20 c8 95 c5 23 66  31 25 3d a3 20 80 67 72  |"  ...#f1%=. .gr|
000148d0  6f 75 70 73 25 3c 6d 61  78 67 72 6f 75 70 25 0d  |oups%<maxgroup%.|
000148e0  7f 80 2f 20 20 20 20 61  24 3d be 23 66 31 25 3a  |../    a$=.#f1%:|
000148f0  67 24 3d a4 63 68 65 63  6b 63 61 73 65 28 a4 67  |g$=.checkcase(.g|
00014900  65 74 70 61 72 28 61 24  2c 22 20 22 29 29 0d 7f  |etpar(a$," "))..|
00014910  8a 1a 20 20 20 20 e7 67  24 3e 22 22 80 a7 67 24  |..    .g$>""..g$|
00014920  2c 22 2a 22 29 3c 31 8c  0d 7f 94 21 20 20 20 20  |,"*")<1....!    |
00014930  20 20 f4 20 64 69 73 63  61 72 64 20 64 75 70 6c  |  . discard dupl|
00014940  69 63 61 74 65 73 2e 2e  2e 0d 7f 9e 13 20 20 20  |icates.......   |
00014950  20 20 20 e7 67 24 3c 3e  6c 67 24 8c 0d 7f a8 14  |   .g$<>lg$.....|
00014960  20 20 20 20 20 20 20 20  e7 67 24 3e 6c 67 24 8c  |        .g$>lg$.|
00014970  0d 7f b2 2b 20 20 20 20  20 20 20 20 20 20 67 72  |...+          gr|
00014980  6f 75 70 73 25 2b 3d 31  3a 6e 6f 25 3d 67 72 6f  |oups%+=1:no%=gro|
00014990  75 70 73 25 3a 6c 67 24  3d 67 24 0d 7f bc 0f 20  |ups%:lg$=g$.... |
000149a0  20 20 20 20 20 20 20 20  20 cc 0d 7f c6 25 20 20  |         ....%  |
000149b0  20 20 20 20 20 20 20 20  6e 6f 25 3d a4 61 64 64  |        no%=.add|
000149c0  67 72 70 74 6f 6c 69 73  74 28 67 24 2c a3 29 0d  |grptolist(g$,.).|
000149d0  7f d0 0d 20 20 20 20 20  20 20 20 cd 0d 7f da 2c  |...        ....,|
000149e0  20 20 20 20 20 20 20 20  67 72 70 24 28 6e 6f 25  |        grp$(no%|
000149f0  29 3d 67 24 3a 74 79 25  3d a4 73 70 65 63 69 61  |)=g$:ty%=.specia|
00014a00  6c 67 72 70 28 67 24 29  0d 7f e4 2a 20 20 20 20  |lgrp(g$)...*    |
00014a10  20 20 20 20 67 72 70 73  65 71 25 28 6e 6f 25 29  |    grpseq%(no%)|
00014a20  3d 2d bb a4 67 65 74 70  61 72 28 61 24 2c 22 20  |=-..getpar(a$," |
00014a30  22 29 0d 7f ee 1f 20 20  20 20 20 20 20 20 41 25  |")....        A%|
00014a40  3d bb a4 67 65 74 70 61  72 28 61 24 2c 22 20 22  |=..getpar(a$," "|
00014a50  29 0d 7f f8 29 20 20 20  20 20 20 20 20 67 72 70  |)...)        grp|
00014a60  65 78 70 25 28 6e 6f 25  29 3d bb a4 67 65 74 70  |exp%(no%)=..getp|
00014a70  61 72 28 61 24 2c 22 20  22 29 0d 80 02 2f 20 20  |ar(a$," ").../  |
00014a80  20 20 20 20 20 20 62 24  3d a4 67 65 74 70 61 72  |      b$=.getpar|
00014a90  28 61 24 2c 22 20 22 29  3a 67 72 70 6d 6f 64 25  |(a$," "):grpmod%|
00014aa0  28 6e 6f 25 29 3d bb 62  24 0d 80 0c 66 20 20 20  |(no%)=.b$...f   |
00014ab0  20 20 20 20 20 e7 62 24  3d 22 22 80 74 79 25 3d  |     .b$="".ty%=|
00014ac0  30 8c f2 6d 65 73 73 61  67 65 31 28 22 4d 63 68  |0..message1("Mch|
00014ad0  65 63 6b 22 2c 67 24 2c  30 29 3a 67 72 70 6d 6f  |eck",g$,0):grpmo|
00014ae0  64 25 28 6e 6f 25 29 3d  a4 69 73 67 72 70 6d 6f  |d%(no%)=.isgrpmo|
00014af0  64 28 67 24 29 3a 72 65  73 61 76 65 25 3d b9 3a  |d(g$):resave%=.:|
00014b00  f2 70 6f 6c 6c 28 34 2a  73 6c 69 63 65 25 29 0d  |.poll(4*slice%).|
00014b10  80 16 3a 20 20 20 20 20  20 20 20 e7 74 79 25 3e  |..:        .ty%>|
00014b20  31 80 76 25 3c 67 72 6f  75 70 76 65 72 25 8c 67  |1.v%<groupver%.g|
00014b30  72 70 65 78 70 25 28 6e  6f 25 29 3d 31 45 36 3a  |rpexp%(no%)=1E6:|
00014b40  72 65 73 61 76 65 25 3d  b9 0d 80 20 0b 20 20 20  |resave%=... .   |
00014b50  20 20 20 cd 0d 80 2a 09  20 20 20 20 cd 0d 80 34  |   ...*.    ...4|
00014b60  07 20 20 ce 0d 80 3e 1d  20 20 f2 63 66 28 66 31  |.  ...>.  .cf(f1|
00014b70  25 29 3a f2 6d 65 73 73  61 67 65 28 22 22 2c 30  |%):.message("",0|
00014b80  29 0d 80 48 05 cd 0d 80  52 1a e7 72 65 73 61 76  |)..H....R..resav|
00014b90  65 25 8c f2 77 72 69 74  65 67 72 70 64 61 74 61  |e%..writegrpdata|
00014ba0  0d 80 5c 44 f2 73 65 74  69 63 6f 6e 73 74 72 69  |..\D.seticonstri|
00014bb0  6e 67 28 67 77 69 6e 25  2c 32 35 2c 67 72 70 24  |ng(gwin%,25,grp$|
00014bc0  28 31 29 29 3a 67 77 69  6e 5f 67 25 3d 31 3a f2  |(1)):gwin_g%=1:.|
00014bd0  73 65 74 65 78 70 69 63  6f 6e 28 31 29 3a f2 68  |setexpicon(1):.h|
00014be0  67 6f 66 66 0d 80 66 05  e1 0d 80 70 04 0d 80 7a  |goff..f....p...z|
00014bf0  12 dd a4 69 73 67 72 70  6d 6f 64 28 67 24 29 0d  |...isgrpmod(g$).|
00014c00  80 84 1d 67 24 3d a4 63  68 65 63 6b 6d 6f 64 65  |...g$=.checkmode|
00014c10  72 61 74 69 6f 6e 28 67  24 2c 31 29 0d 80 8e 0d  |ration(g$,1)....|
00014c20  3d 94 28 67 24 3e 22 22  29 0d 80 98 04 0d 80 a2  |=.(g$>"").......|
00014c30  15 dd a4 67 65 74 70 61  72 28 f8 20 41 24 2c 73  |...getpar(. A$,s|
00014c40  24 29 0d 80 ac 0a ea 42  24 2c 6c 25 0d 80 b6 0e  |$).....B$,l%....|
00014c50  6c 25 3d a7 41 24 2c 73  24 29 0d 80 c0 0a e7 6c  |l%=.A$,s$).....l|
00014c60  25 3e 30 8c 0d 80 ca 1f  20 20 42 24 3d c0 41 24  |%>0.....  B$=.A$|
00014c70  2c 6c 25 2d 31 29 3a 41  24 3d c1 41 24 2c 6c 25  |,l%-1):A$=.A$,l%|
00014c80  2b 31 29 0d 80 d4 07 20  20 cc 0d 80 de 11 20 20  |+1)....  .....  |
00014c90  42 24 3d 41 24 3a 41 24  3d 22 22 0d 80 e8 05 cd  |B$=A$:A$="".....|
00014ca0  0d 80 f2 07 3d 42 24 0d  80 fc 04 0d 81 06 14 dd  |....=B$.........|
00014cb0  f2 73 65 74 65 78 70 69  63 6f 6e 28 67 25 29 0d  |.setexpicon(g%).|
00014cc0  81 10 19 ea 6e 25 2c 61  24 3a 6e 25 3d 67 72 70  |....n%,a$:n%=grp|
00014cd0  65 78 70 25 28 67 25 29  0d 81 1a 0e e7 6e 25 3e  |exp%(g%).....n%>|
00014ce0  31 30 30 30 30 8c 0d 81  24 10 20 20 61 24 3d 22  |10000...$.  a$="|
00014cf0  4e 65 76 65 72 22 0d 81  2e 07 20 20 cc 0d 81 38  |Never"....  ...8|
00014d00  1f 20 20 e7 6e 25 3d 30  8c 61 24 3d 22 44 65 66  |.  .n%=0.a$="Def|
00014d10  61 75 6c 74 22 8b 61 24  3d c3 6e 25 0d 81 42 05  |ault".a$=.n%..B.|
00014d20  cd 0d 81 4c 21 f2 75 70  64 61 74 65 69 63 6f 6e  |...L!.updateicon|
00014d30  73 74 72 69 6e 67 28 67  77 69 6e 25 2c 31 2c 61  |string(gwin%,1,a|
00014d40  24 29 0d 81 56 05 e1 0d  81 60 04 0d 81 6a 12 dd  |$)..V....`...j..|
00014d50  f2 77 72 69 74 65 67 72  70 64 61 74 61 0d 81 74  |.writegrpdata..t|
00014d60  0d ea 41 24 2c 46 25 2c  6c 25 0d 81 7e 09 e7 72  |..A$,F%,l%..~..r|
00014d70  77 25 8c 0d 81 88 1f 20  20 46 25 3d a4 64 65 6c  |w%.....  F%=.del|
00014d80  66 69 6c 65 28 67 72 70  69 6e 66 6f 24 2b 22 7e  |file(grpinfo$+"~|
00014d90  22 29 0d 81 92 27 20 20  46 25 3d a4 72 65 6e 61  |")...'  F%=.rena|
00014da0  6d 65 28 67 72 70 69 6e  66 6f 24 2c 67 72 70 69  |me(grpinfo$,grpi|
00014db0  6e 66 6f 24 2b 22 7e 22  29 0d 81 9c 1c 20 20 66  |nfo$+"~")....  f|
00014dc0  31 25 3d a4 6f 70 65 6e  6f 75 74 28 67 72 70 69  |1%=.openout(grpi|
00014dd0  6e 66 6f 24 29 0d 81 a6  3e 20 20 e7 66 31 25 3d  |nfo$)...>  .f1%=|
00014de0  30 8c f2 63 6c 6f 73 65  66 69 6c 65 62 79 6e 61  |0..closefilebyna|
00014df0  6d 65 28 67 72 70 69 6e  66 6f 24 29 3a 66 31 25  |me(grpinfo$):f1%|
00014e00  3d a4 6f 70 65 6e 6f 75  74 28 67 72 70 69 6e 66  |=.openout(grpinf|
00014e10  6f 24 29 0d 81 b0 0e 20  20 e7 66 31 25 3c 3e 30  |o$)....  .f1%<>0|
00014e20  8c 0d 81 ba 18 20 20 20  20 d5 23 66 31 25 2c c3  |.....    .#f1%,.|
00014e30  67 72 6f 75 70 76 65 72  25 0d 81 c4 15 20 20 20  |groupver%....   |
00014e40  20 e3 6c 25 3d 31 b8 67  72 6f 75 70 73 25 0d 81  | .l%=1.groups%..|
00014e50  ce 17 20 20 20 20 20 20  e7 67 72 70 24 28 6c 25  |..      .grp$(l%|
00014e60  29 3e 22 22 8c 0d 81 d8  52 20 20 20 20 20 20 20  |)>""....R       |
00014e70  20 d5 23 66 31 25 2c 67  72 70 24 28 6c 25 29 2b  | .#f1%,grp$(l%)+|
00014e80  22 20 22 2b c3 28 94 67  72 70 73 65 71 25 28 6c  |" "+.(.grpseq%(l|
00014e90  25 29 29 2b 22 20 30 20  22 2b c3 67 72 70 65 78  |%))+" 0 "+.grpex|
00014ea0  70 25 28 6c 25 29 2b 22  20 22 2b c3 67 72 70 6d  |p%(l%)+" "+.grpm|
00014eb0  6f 64 25 28 6c 25 29 0d  81 e2 0b 20 20 20 20 20  |od%(l%)....     |
00014ec0  20 cd 0d 81 ec 0b 20 20  20 20 ed 6c 25 0d 81 f6  | .....    .l%...|
00014ed0  28 20 20 20 20 f2 63 66  28 66 31 25 29 3a f2 73  |(    .cf(f1%):.s|
00014ee0  65 74 74 79 70 65 28 67  72 70 69 6e 66 6f 24 2c  |ettype(grpinfo$,|
00014ef0  26 46 46 46 29 0d 82 00  09 20 20 20 20 cc 0d 82  |&FFF)....    ...|
00014f00  0a 21 20 20 20 20 ef 37  3a f2 6d 65 73 73 61 67  |.!    .7:.messag|
00014f10  65 30 28 22 47 72 70 69  6e 66 6f 22 2c 31 29 0d  |e0("Grpinfo",1).|
00014f20  82 14 07 20 20 cd 0d 82  1e 05 cd 0d 82 28 05 e1  |...  ........(..|
00014f30  0d 82 32 04 0d 82 3c 10  dd f2 63 72 65 61 74 65  |..2...<...create|
00014f40  64 69 72 73 0d 82 46 09  f2 68 67 6f 6e 0d 82 50  |dirs..F..hgon..P|
00014f50  24 6e 65 77 73 72 6f 6f  74 24 3d a4 76 61 72 76  |$newsroot$=.varv|
00014f60  61 6c 28 22 4e 65 77 73  64 69 72 24 64 69 72 22  |al("Newsdir$dir"|
00014f70  29 0d 82 5a 27 e7 a4 6f  62 6a 74 79 70 65 28 6e  |)..Z'..objtype(n|
00014f80  65 77 73 72 6f 6f 74 24  29 3c 32 8c 6e 65 77 73  |ewsroot$)<2.news|
00014f90  72 6f 6f 74 24 3d 22 22  0d 82 64 22 6e 62 64 69  |root$=""..d"nbdi|
00014fa0  72 24 3d a4 76 61 72 76  61 6c 28 22 4e 65 77 73  |r$=.varval("News|
00014fb0  62 61 73 65 24 64 69 72  22 29 0d 82 6e 22 74 72  |base$dir")..n"tr|
00014fc0  61 6e 73 64 69 72 24 3d  6e 62 64 69 72 24 2b 22  |ansdir$=nbdir$+"|
00014fd0  2e 74 72 61 6e 73 70 6f  72 74 73 22 0d 82 78 27  |.transports"..x'|
00014fe0  73 75 70 70 6f 72 74 24  3d 6e 62 64 69 72 24 2b  |support$=nbdir$+|
00014ff0  22 2e 73 75 70 70 6f 72  74 2e 6e 65 77 73 62 61  |".support.newsba|
00015000  73 65 22 0d 82 82 1f 72  65 73 64 69 72 24 3d 6e  |se"....resdir$=n|
00015010  62 64 69 72 24 2b 22 2e  72 65 73 6f 75 72 63 65  |bdir$+".resource|
00015020  73 22 0d 82 8c 1d 64 70  61 74 68 24 3d 6e 65 77  |s"....dpath$=new|
00015030  73 72 6f 6f 74 24 2b 22  2e 6e 65 77 73 2e 22 0d  |sroot$+".news.".|
00015040  82 96 22 62 61 73 65 64  69 72 24 3d 6e 65 77 73  |.."basedir$=news|
00015050  72 6f 6f 74 24 2b 22 2e  6e 65 77 73 62 61 73 65  |root$+".newsbase|
00015060  22 0d 82 a0 1d 77 6f 72  6b 64 69 72 24 3d 62 61  |"....workdir$=ba|
00015070  73 65 64 69 72 24 2b 22  2e 77 6f 72 6b 22 0d 82  |sedir$+".work"..|
00015080  aa 1f 63 6f 6e 66 64 69  72 24 3d 62 61 73 65 64  |..confdir$=based|
00015090  69 72 24 2b 22 2e 63 6f  6e 66 69 67 22 0d 82 b4  |ir$+".config"...|
000150a0  1d 62 61 64 64 69 72 24  3d 62 61 73 65 64 69 72  |.baddir$=basedir|
000150b0  24 2b 22 2e 64 65 62 75  67 22 0d 82 be 1f 74 6d  |$+".debug"....tm|
000150c0  70 64 69 72 24 3d 62 61  73 65 64 69 72 24 2b 22  |pdir$=basedir$+"|
000150d0  2e 73 63 72 61 74 63 68  22 0d 82 c8 1d 6f 75 74  |.scratch"....out|
000150e0  64 69 72 24 3d 62 61 73  65 64 69 72 24 2b 22 2e  |dir$=basedir$+".|
000150f0  73 70 6f 6f 6c 22 0d 82  d2 1c 6c 69 6e 64 69 72  |spool"....lindir|
00015100  24 3d 6f 75 74 64 69 72  24 2b 22 2e 6c 6f 63 61  |$=outdir$+".loca|
00015110  6c 22 0d 82 dc 1e 6f 75  74 64 69 72 24 28 30 29  |l"....outdir$(0)|
00015120  3d 6f 75 74 64 69 72 24  2b 22 2e 6d 61 69 6c 22  |=outdir$+".mail"|
00015130  0d 82 e6 1e 6f 75 74 64  69 72 24 28 31 29 3d 6f  |....outdir$(1)=o|
00015140  75 74 64 69 72 24 2b 22  2e 6e 65 77 73 22 0d 82  |utdir$+".news"..|
00015150  f0 12 e7 6e 65 77 73 72  6f 6f 74 24 3e 22 22 8c  |...newsroot$>"".|
00015160  0d 82 fa 18 f2 65 6e 73  75 72 65 64 69 72 28 62  |.....ensuredir(b|
00015170  61 73 65 64 69 72 24 29  0d 83 04 18 f2 65 6e 73  |asedir$).....ens|
00015180  75 72 65 64 69 72 28 63  6f 6e 66 64 69 72 24 29  |uredir(confdir$)|
00015190  0d 83 0e 17 f2 65 6e 73  75 72 65 64 69 72 28 62  |.....ensuredir(b|
000151a0  61 64 64 69 72 24 29 0d  83 18 18 f2 65 6e 73 75  |addir$).....ensu|
000151b0  72 65 64 69 72 28 77 6f  72 6b 64 69 72 24 29 0d  |redir(workdir$).|
000151c0  83 22 18 f2 65 6e 73 75  72 65 64 69 72 28 c0 64  |."..ensuredir(.d|
000151d0  70 61 74 68 24 29 29 0d  83 2c 17 f2 65 6e 73 75  |path$))..,..ensu|
000151e0  72 65 64 69 72 28 74 6d  70 64 69 72 24 29 0d 83  |redir(tmpdir$)..|
000151f0  36 17 f2 65 6e 73 75 72  65 64 69 72 28 6f 75 74  |6..ensuredir(out|
00015200  64 69 72 24 29 0d 83 40  17 f2 65 6e 73 75 72 65  |dir$)..@..ensure|
00015210  64 69 72 28 6c 69 6e 64  69 72 24 29 0d 83 4a 1a  |dir(lindir$)..J.|
00015220  f2 65 6e 73 75 72 65 64  69 72 28 6f 75 74 64 69  |.ensuredir(outdi|
00015230  72 24 28 30 29 29 0d 83  54 1a f2 65 6e 73 75 72  |r$(0))..T..ensur|
00015240  65 64 69 72 28 6f 75 74  64 69 72 24 28 31 29 29  |edir(outdir$(1))|
00015250  0d 83 5e 05 cd 0d 83 68  39 c8 99 22 58 4f 53 5f  |..^....h9.."XOS_|
00015260  43 4c 49 22 2c 22 73 65  74 20 4e 65 77 73 62 61  |CLI","set Newsba|
00015270  73 65 24 53 75 70 70 6f  72 74 20 22 2b 6e 62 64  |se$Support "+nbd|
00015280  69 72 24 2b 22 2e 73 75  70 70 6f 72 74 22 0d 83  |ir$+".support"..|
00015290  72 2d c8 99 22 58 4f 53  5f 43 4c 49 22 2c 22 73  |r-.."XOS_CLI","s|
000152a0  65 74 20 4e 65 77 73 62  61 73 65 24 44 61 74 61  |et Newsbase$Data|
000152b0  20 22 2b 62 61 73 65 64  69 72 24 0d 83 7c 2f c8  | "+basedir$..|/.|
000152c0  99 22 58 4f 53 5f 43 4c  49 22 2c 22 73 65 74 20  |."XOS_CLI","set |
000152d0  4e 65 77 73 62 61 73 65  24 43 6f 6e 66 69 67 20  |Newsbase$Config |
000152e0  22 2b 63 6f 6e 66 64 69  72 24 0d 83 86 2d c8 99  |"+confdir$...-..|
000152f0  22 58 4f 53 5f 43 4c 49  22 2c 22 73 65 74 20 4e  |"XOS_CLI","set N|
00015300  65 77 73 62 61 73 65 24  4c 6f 63 61 6c 20 22 2b  |ewsbase$Local "+|
00015310  6c 69 6e 64 69 72 24 0d  83 90 20 67 72 70 69 6e  |lindir$... grpin|
00015320  66 6f 24 3d 62 61 73 65  64 69 72 24 2b 22 2e 67  |fo$=basedir$+".g|
00015330  72 70 69 6e 66 6f 22 0d  83 9a 21 6e 65 77 67 72  |rpinfo"...!newgr|
00015340  70 24 3d 62 61 73 65 64  69 72 24 2b 22 2e 6e 65  |p$=basedir$+".ne|
00015350  77 67 72 6f 75 70 73 22  0d 83 a4 1e 6c 61 73 74  |wgroups"....last|
00015360  6e 67 24 3d 63 6f 6e 66  64 69 72 24 2b 22 2e 6e  |ng$=confdir$+".n|
00015370  67 74 69 6d 65 22 0d 83  ae 1e 6c 6f 63 6b 66 69  |gtime"....lockfi|
00015380  6c 65 24 3d 62 61 73 65  64 69 72 24 2b 22 2e 6c  |le$=basedir$+".l|
00015390  6f 63 6b 22 0d 83 b8 0a  f2 68 67 6f 66 66 0d 83  |ock".....hgoff..|
000153a0  c2 05 e1 0d 83 cc 04 0d  83 d6 13 dd f2 65 6e 73  |.............ens|
000153b0  75 72 65 64 69 72 28 66  24 29 0d 83 e0 0f ea 74  |uredir(f$).....t|
000153c0  25 3a e7 66 24 3e 22 22  8c 0d 83 ea 3b 20 20 74  |%:.f$>""....;  t|
000153d0  25 3d a4 6f 62 6a 74 79  70 65 28 66 24 29 3a e7  |%=.objtype(f$):.|
000153e0  74 25 3c 32 84 74 25 3e  33 8c e7 72 77 25 8c c8  |t%<2.t%>3..rw%..|
000153f0  99 22 58 4f 53 5f 46 69  6c 65 22 2c 38 2c 66 24  |."XOS_File",8,f$|
00015400  b8 3b 74 25 0d 83 f4 05  cd 0d 83 fe 05 e1 0d 84  |.;t%............|
00015410  08 04 0d 84 12 13 dd a4  72 65 6e 61 6d 65 28 73  |........rename(s|
00015420  24 2c 64 24 29 0d 84 1c  2a ea 46 25 3a c8 99 22  |$,d$)...*.F%:.."|
00015430  58 4f 53 5f 46 53 43 6f  6e 74 72 6f 6c 22 2c 32  |XOS_FSControl",2|
00015440  35 2c 73 24 2c 64 24 b8  65 72 72 25 3b 46 25 0d  |5,s$,d$.err%;F%.|
00015450  84 26 1e e7 28 46 25 80  31 29 20 80 28 21 65 72  |.&..(F%.1) .(!er|
00015460  72 25 83 26 46 46 29 3d  26 43 34 20 8c 0d 84 30  |r%.&FF)=&C4 ...0|
00015470  15 20 20 46 25 3d a4 64  65 6c 66 69 6c 65 28 64  |.  F%=.delfile(d|
00015480  24 29 0d 84 3a 28 20 20  c8 99 22 58 4f 53 5f 46  |$)..:(  .."XOS_F|
00015490  53 43 6f 6e 74 72 6f 6c  22 2c 32 35 2c 73 24 2c  |SControl",25,s$,|
000154a0  64 24 b8 65 72 72 25 3b  46 25 0d 84 44 05 cd 0d  |d$.err%;F%..D...|
000154b0  84 4e 0b 3d 28 46 25 80  31 29 0d 84 58 04 0d 84  |.N.=(F%.1)..X...|
000154c0  62 15 dd a4 63 6f 70 79  66 69 6c 65 28 73 24 2c  |b...copyfile(s$,|
000154d0  64 24 29 0d 84 6c 07 ea  46 25 0d 84 76 23 c8 99  |d$)..l..F%..v#..|
000154e0  22 58 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 22 2c  |"XOS_FSControl",|
000154f0  32 36 2c 73 24 2c 64 24  20 b8 3b 46 25 0d 84 80  |26,s$,d$ .;F%...|
00015500  0b 3d 28 46 25 80 31 29  0d 84 8a 04 0d 84 94 15  |.=(F%.1)........|
00015510  dd a4 6d 6f 76 65 66 69  6c 65 28 73 24 2c 64 24  |..movefile(s$,d$|
00015520  29 0d 84 9e 19 ea 46 25  3a 46 25 3d a4 72 65 6e  |).....F%:F%=.ren|
00015530  61 6d 65 28 73 24 2c 64  24 29 0d 84 a8 30 e7 46  |ame(s$,d$)...0.F|
00015540  25 3c 3e 30 c8 99 22 58  4f 53 5f 46 53 43 6f 6e  |%<>0.."XOS_FSCon|
00015550  74 72 6f 6c 22 2c 32 36  2c 73 24 2c 64 24 2c 28  |trol",26,s$,d$,(|
00015560  31 3c 3c 37 29 20 b8 3b  46 25 0d 84 b2 0b 3d 28  |1<<7) .;F%....=(|
00015570  46 25 80 31 29 0d 84 bc  04 0d 84 c6 11 dd a4 64  |F%.1)..........d|
00015580  65 6c 66 69 6c 65 28 66  24 29 0d 84 d0 1d ea 46  |elfile(f$).....F|
00015590  25 3a c8 99 22 58 4f 53  5f 46 69 6c 65 22 2c 36  |%:.."XOS_File",6|
000155a0  2c 66 24 b8 3b 46 25 0d  84 da 0b 3d 28 46 25 80  |,f$.;F%....=(F%.|
000155b0  31 29 0d 84 e4 04 0d 84  ee 16 dd a4 66 6f 72 63  |1)..........forc|
000155c0  65 64 65 6c 66 69 6c 65  28 66 24 29 0d 84 f8 17  |edelfile(f$)....|
000155d0  ea 46 25 3a 46 25 3d a4  64 65 6c 66 69 6c 65 28  |.F%:F%=.delfile(|
000155e0  66 24 29 0d 85 02 2e e7  46 25 3c 3e 30 f2 63 6c  |f$).....F%<>0.cl|
000155f0  6f 73 65 66 69 6c 65 62  79 6e 61 6d 65 28 66 24  |osefilebyname(f$|
00015600  29 3a 46 25 3d a4 64 65  6c 66 69 6c 65 28 66 24  |):F%=.delfile(f$|
00015610  29 0d 85 0c 07 3d 46 25  0d 85 16 04 0d 85 20 0e  |)....=F%...... .|
00015620  dd f2 77 69 70 65 28 66  24 29 0d 85 2a 1e c8 99  |..wipe(f$)..*...|
00015630  22 58 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 22 2c  |"XOS_FSControl",|
00015640  32 37 2c 66 24 2c 2c 33  0d 85 34 05 e1 0d 85 3e  |27,f$,,3..4....>|
00015650  04 0d 85 48 12 dd a4 66  69 6c 65 73 69 7a 65 28  |...H...filesize(|
00015660  66 24 29 0d 85 52 27 ea  73 25 2c 46 25 3a c8 99  |f$)..R'.s%,F%:..|
00015670  22 58 4f 53 5f 46 69 6c  65 22 2c 31 37 2c 66 24  |"XOS_File",17,f$|
00015680  b8 2c 2c 2c 2c 73 25 3b  46 25 0d 85 5c 11 e7 28  |.,,,,s%;F%..\..(|
00015690  46 25 80 31 29 8c 73 25  3d 2d 31 0d 85 66 07 3d  |F%.1).s%=-1..f.=|
000156a0  73 25 0d 85 70 04 0d 85  7a 12 dd a4 66 69 6c 65  |s%..p...z...file|
000156b0  61 74 74 72 28 66 24 29  0d 85 84 25 ea 73 25 3a  |attr(f$)...%.s%:|
000156c0  c8 99 22 58 4f 53 5f 46  69 6c 65 22 2c 31 37 2c  |.."XOS_File",17,|
000156d0  66 24 b8 2c 2c 2c 2c 2c  73 25 3b 46 25 0d 85 8e  |f$.,,,,,s%;F%...|
000156e0  11 e7 28 46 25 80 31 29  8c 73 25 3d 2d 31 0d 85  |..(F%.1).s%=-1..|
000156f0  98 07 3d 73 25 0d 85 a2  04 0d 85 ac 19 dd f2 63  |..=s%..........c|
00015700  6c 6f 73 65 66 69 6c 65  62 79 6e 61 6d 65 28 66  |losefilebyname(f|
00015710  24 29 0d 85 b6 10 ea 61  24 2c 6c 25 2c 72 25 2c  |$).....a$,l%,r%,|
00015720  46 25 0d 85 c0 16 e7 a4  6f 62 6a 74 79 70 65 28  |F%......objtype(|
00015730  66 24 29 3c 3e 31 8c e1  0d 85 ca 11 66 24 3d a4  |f$)<>1......f$=.|
00015740  63 61 6e 6f 6e 28 66 24  29 0d 85 d4 35 e3 6c 25  |canon(f$)...5.l%|
00015750  3d 31 b8 32 35 35 3a c8  99 22 58 4f 53 5f 41 72  |=1.255:.."XOS_Ar|
00015760  67 73 22 2c 37 2c 6c 25  2c 74 6d 70 25 2c 2c 2c  |gs",7,l%,tmp%,,,|
00015770  32 35 36 b8 2c 2c 2c 2c  2c 72 25 3b 46 25 0d 85  |256.,,,,,r%;F%..|
00015780  de 27 e7 28 46 25 80 31  29 3d 30 8c 61 24 3d a4  |.'.(F%.1)=0.a$=.|
00015790  73 74 72 28 74 6d 70 25  29 3a e7 61 24 3d 66 24  |str(tmp%):.a$=f$|
000157a0  8c d9 23 6c 25 0d 85 e8  07 ed 6c 25 0d 85 f2 05  |..#l%.....l%....|
000157b0  e1 0d 85 fc 04 0d 86 06  17 dd f2 61 64 64 74 6f  |...........addto|
000157c0  69 6e 64 65 78 28 67 25  2c 6e 25 29 0d 86 10 1b  |index(g%,n%)....|
000157d0  ea 70 25 2c 70 31 25 2c  6c 6d 25 2c 6c 66 25 2c  |.p%,p1%,lm%,lf%,|
000157e0  6c 73 25 2c 6c 72 25 0d  86 1a 32 e7 67 25 3c 3e  |ls%,lr%...2.g%<>|
000157f0  69 62 75 66 67 25 84 69  62 75 66 70 74 72 25 3e  |ibufg%.ibufptr%>|
00015800  3d 69 62 75 66 73 69 7a  65 25 8c f2 77 72 69 74  |=ibufsize%..writ|
00015810  65 69 6e 64 65 78 62 75  66 0d 86 24 38 e7 67 72  |eindexbuf..$8.gr|
00015820  70 61 25 28 67 25 29 3e  3d 30 8c 67 72 70 61 25  |pa%(g%)>=0.grpa%|
00015830  28 67 25 29 2b 3d 31 3a  f4 20 69 6e 63 72 65 6d  |(g%)+=1:. increm|
00015840  65 6e 74 20 61 72 74 69  63 6c 65 20 74 6f 74 61  |ent article tota|
00015850  6c 0d 86 2e 1f 70 25 3d  69 62 75 66 25 2b 69 62  |l....p%=ibuf%+ib|
00015860  75 66 70 74 72 25 3a 24  70 25 3d 6e 75 6c 6c 24  |ufptr%:$p%=null$|
00015870  0d 86 38 18 21 70 25 3d  6e 25 3a 70 25 21 38 3d  |..8.!p%=n%:p%!8=|
00015880  61 72 74 64 61 74 65 25  0d 86 42 1d 70 25 21 31  |artdate%..B.p%!1|
00015890  32 3d 30 3a 70 25 21 31  36 3d 30 3a 70 31 25 3d  |2=0:p%!16=0:p1%=|
000158a0  70 25 2b 32 30 0d 86 4c  0e f4 20 33 20 63 61 73  |p%+20..L.. 3 cas|
000158b0  65 73 3a 0d 86 56 48 f4  20 31 20 69 73 2c 20 61  |es:..VH. 1 is, a|
000158c0  6c 6c 20 6f 66 20 6d 65  73 73 69 64 2c 20 66 72  |ll of messid, fr|
000158d0  6f 6d 2c 20 73 75 62 6a  2c 20 72 65 66 73 20 66  |om, subj, refs f|
000158e0  69 74 20 69 6e 20 31 37  36 20 62 79 74 65 73 20  |it in 176 bytes |
000158f0  28 2d 3e 20 74 79 70 65  20 31 29 0d 86 60 4b f4  |(-> type 1)..`K.|
00015900  20 32 20 69 73 2c 20 61  6c 6c 20 6f 66 20 6d 65  | 2 is, all of me|
00015910  73 73 69 64 2c 20 66 72  6f 6d 2c 20 73 75 62 6a  |ssid, from, subj|
00015920  20 66 69 74 3b 20 72 65  66 73 20 67 6f 20 73 65  | fit; refs go se|
00015930  70 61 72 61 74 65 6c 79  20 28 2d 3e 20 74 79 70  |parately (-> typ|
00015940  65 20 30 2b 32 29 0d 86  6a 50 f4 20 33 20 69 73  |e 0+2)..jP. 3 is|
00015950  2c 20 66 72 6f 6d 20 26  20 73 75 62 6a 20 6e 65  |, from & subj ne|
00015960  65 64 20 74 72 75 6e 63  61 74 69 6e 67 20 74 6f  |ed truncating to|
00015970  20 66 69 74 3b 20 72 65  66 73 20 67 6f 20 73 65  | fit; refs go se|
00015980  70 61 72 61 74 65 6c 79  20 28 2d 3e 20 74 79 70  |parately (-> typ|
00015990  65 20 30 2b 32 29 0d 86  74 1d e7 6d 65 73 73 69  |e 0+2)..t..messi|
000159a0  64 24 3d 22 22 8c 6d 65  73 73 69 64 24 3d 22 3c  |d$="".messid$="<|
000159b0  30 3e 22 0d 86 7e 28 e7  73 75 62 6a 65 63 74 24  |0>"..~(.subject$|
000159c0  3d 22 22 8c 73 75 62 6a  65 63 74 24 3d 22 28 6e  |="".subject$="(n|
000159d0  6f 20 73 75 62 6a 65 63  74 29 22 0d 86 88 21 e7  |o subject)"...!.|
000159e0  66 72 6f 6d 24 3d 22 22  8c 66 72 6f 6d 24 3d 22  |from$="".from$="|
000159f0  28 6e 6f 20 73 65 6e 64  65 72 29 22 0d 86 92 39  |(no sender)"...9|
00015a00  6c 6d 25 3d a9 6d 65 73  73 69 64 24 3a 6c 66 25  |lm%=.messid$:lf%|
00015a10  3d a9 66 72 6f 6d 24 3a  6c 73 25 3d a9 73 75 62  |=.from$:ls%=.sub|
00015a20  6a 65 63 74 24 3a 6c 72  25 3d a9 72 65 66 65 72  |ject$:lr%=.refer|
00015a30  65 6e 63 65 24 0d 86 9c  1b e7 28 6c 6d 25 2b 6c  |ence$.....(lm%+l|
00015a40  66 25 2b 6c 73 25 2b 6c  72 25 29 3c 31 37 36 8c  |f%+ls%+lr%)<176.|
00015a50  0d 86 a6 3f 20 20 24 70  31 25 3d 6d 65 73 73 69  |...?  $p1%=messi|
00015a60  64 24 3a 24 28 70 31 25  2b 6c 6d 25 2b 31 29 3d  |d$:$(p1%+lm%+1)=|
00015a70  66 72 6f 6d 24 3a 24 28  70 31 25 2b 6c 6d 25 2b  |from$:$(p1%+lm%+|
00015a80  6c 66 25 2b 32 29 3d 73  75 62 6a 65 63 74 24 0d  |lf%+2)=subject$.|
00015a90  86 b0 2c 20 20 24 28 70  31 25 2b 6c 6d 25 2b 6c  |..,  $(p1%+lm%+l|
00015aa0  66 25 2b 6c 73 25 2b 33  29 3d 72 65 66 65 72 65  |f%+ls%+3)=refere|
00015ab0  6e 63 65 24 3a 70 25 21  34 3d 31 0d 86 ba 1d 20  |nce$:p%!4=1.... |
00015ac0  20 69 62 75 66 70 74 72  25 2b 3d 32 30 30 3a 69  | ibufptr%+=200:i|
00015ad0  62 75 66 67 25 3d 67 25  0d 86 c4 07 20 20 cc 0d  |bufg%=g%....  ..|
00015ae0  86 ce 0c 20 20 70 25 21  34 3d 30 0d 86 d8 19 20  |...  p%!4=0.... |
00015af0  20 e7 28 6c 6d 25 2b 6c  66 25 2b 6c 73 25 29 3c  | .(lm%+lf%+ls%)<|
00015b00  31 37 37 8c 0d 86 e2 41  20 20 20 20 24 70 31 25  |177....A    $p1%|
00015b10  3d 6d 65 73 73 69 64 24  3a 24 28 70 31 25 2b 6c  |=messid$:$(p1%+l|
00015b20  6d 25 2b 31 29 3d 66 72  6f 6d 24 3a 24 28 70 31  |m%+1)=from$:$(p1|
00015b30  25 2b 6c 6d 25 2b 6c 66  25 2b 32 29 3d 73 75 62  |%+lm%+lf%+2)=sub|
00015b40  6a 65 63 74 24 0d 86 ec  09 20 20 20 20 cc 0d 86  |ject$....    ...|
00015b50  f6 3c 20 20 20 20 6d 65  73 73 69 64 24 3d c0 6d  |.<    messid$=.m|
00015b60  65 73 73 69 64 24 2c 36  30 29 3a 24 70 31 25 3d  |essid$,60):$p1%=|
00015b70  6d 65 73 73 69 64 24 3a  70 31 25 3d 70 31 25 2b  |messid$:p1%=p1%+|
00015b80  a9 6d 65 73 73 69 64 24  2b 31 0d 87 00 34 20 20  |.messid$+1...4  |
00015b90  20 20 66 72 6f 6d 24 3d  c0 66 72 6f 6d 24 2c 34  |  from$=.from$,4|
00015ba0  30 29 3a 24 70 31 25 3d  66 72 6f 6d 24 3a 70 31  |0):$p1%=from$:p1|
00015bb0  25 3d 70 31 25 2b a9 66  72 6f 6d 24 2b 31 0d 87  |%=p1%+.from$+1..|
00015bc0  0a 27 20 20 20 20 24 70  31 25 3d c0 73 75 62 6a  |.'    $p1%=.subj|
00015bd0  65 63 74 24 2c 31 37 36  2d 28 70 25 2b 32 30 2d  |ect$,176-(p%+20-|
00015be0  70 31 25 29 29 0d 87 14  12 20 20 20 20 70 31 25  |p1%))....    p1%|
00015bf0  3f 31 39 39 3d 31 33 0d  87 1e 07 20 20 cd 0d 87  |?199=13....  ...|
00015c00  28 1d 20 20 69 62 75 66  70 74 72 25 2b 3d 32 30  |(.  ibufptr%+=20|
00015c10  30 3a 69 62 75 66 67 25  3d 67 25 0d 87 32 20 20  |0:ibufg%=g%..2  |
00015c20  20 e7 74 68 72 65 61 64  25 3c 3e 30 80 72 65 66  | .thread%<>0.ref|
00015c30  65 72 65 6e 63 65 24 3e  22 22 8c 0d 87 3c 2b 20  |erence$>""...<+ |
00015c40  20 20 20 e7 69 62 75 66  70 74 72 25 3e 3d 69 62  |   .ibufptr%>=ib|
00015c50  75 66 73 69 7a 65 25 8c  f2 77 72 69 74 65 69 6e  |ufsize%..writein|
00015c60  64 65 78 62 75 66 0d 87  46 38 20 20 20 20 70 25  |dexbuf..F8    p%|
00015c70  3d 69 62 75 66 25 2b 69  62 75 66 70 74 72 25 3a  |=ibuf%+ibufptr%:|
00015c80  24 70 25 3d 6e 75 6c 6c  24 3a 21 70 25 3d 6e 25  |$p%=null$:!p%=n%|
00015c90  3a 70 25 21 34 3d 32 3a  70 25 21 38 3d 30 0d 87  |:p%!4=2:p%!8=0..|
00015ca0  50 3d 20 20 20 20 70 25  21 31 32 3d 30 3a 70 25  |P=    p%!12=0:p%|
00015cb0  21 31 36 3d 30 3a 70 25  2b 3d 32 30 3a 24 70 25  |!16=0:p%+=20:$p%|
00015cc0  3d c0 72 65 66 65 72 65  6e 63 65 24 2c 31 37 36  |=.reference$,176|
00015cd0  29 3a 70 25 3f 31 39 39  3d 31 33 0d 87 5a 15 20  |):p%?199=13..Z. |
00015ce0  20 20 20 69 62 75 66 70  74 72 25 2b 3d 32 30 30  |   ibufptr%+=200|
00015cf0  0d 87 64 07 20 20 cd 0d  87 6e 05 cd 0d 87 78 05  |..d.  ...n....x.|
00015d00  e1 0d 87 82 04 0d 87 8c  13 dd f2 77 72 69 74 65  |...........write|
00015d10  69 6e 64 65 78 62 75 66  0d 87 96 0f ea 70 25 2c  |indexbuf.....p%,|
00015d20  65 72 72 25 2c 46 25 0d  87 a0 1a e7 69 62 75 66  |err%,F%.....ibuf|
00015d30  70 74 72 25 3d 30 84 69  62 75 66 67 25 3d 30 8c  |ptr%=0.ibufg%=0.|
00015d40  e1 0d 87 aa 05 f5 0d 87  b4 2e 20 20 66 31 25 3d  |..........  f1%=|
00015d50  a4 6f 70 65 6e 75 70 28  a4 6e 6f 74 6f 70 61 74  |.openup(.notopat|
00015d60  68 28 69 62 75 66 67 25  29 2b 22 2e 7e 69 6e 64  |h(ibufg%)+".~ind|
00015d70  65 78 22 29 0d 87 be 27  20 20 e7 66 31 25 3d 30  |ex")...'  .f1%=0|
00015d80  8c 66 31 25 3d a4 6d 61  6b 65 69 6e 64 65 78 66  |.f1%=.makeindexf|
00015d90  69 6c 65 28 69 62 75 66  67 25 29 0d 87 c8 0e 20  |ile(ibufg%).... |
00015da0  20 e7 66 31 25 3c 3e 30  8c 0d 87 d2 10 20 20 20  | .f1%<>0.....   |
00015db0  20 70 25 3d a2 23 66 31  25 0d 87 dc 34 20 20 20  | p%=.#f1%...4   |
00015dc0  20 c8 99 22 58 4f 53 5f  47 42 50 42 22 2c 31 2c  | .."XOS_GBPB",1,|
00015dd0  66 31 25 2c 69 62 75 66  25 2c 69 62 75 66 70 74  |f1%,ibuf%,ibufpt|
00015de0  72 25 2c 70 25 b8 65 72  72 25 3b 46 25 0d 87 e6  |r%,p%.err%;F%...|
00015df0  10 20 20 20 20 f2 63 66  28 66 31 25 29 0d 87 f0  |.    .cf(f1%)...|
00015e00  07 20 20 cd 0d 87 fa 0e  20 20 e7 28 46 25 80 31  |.  .....  .(F%.1|
00015e10  29 8c 0d 88 04 3e 20 20  20 20 e7 28 21 65 72 72  |)....>    .(!err|
00015e20  25 80 26 46 46 29 3d 26  43 36 8c f2 63 68 65 63  |%.&FF)=&C6..chec|
00015e30  6b 64 69 73 6b 3a 8b c8  99 22 4f 53 5f 47 65 6e  |kdisk:..."OS_Gen|
00015e40  65 72 61 74 65 45 72 72  6f 72 22 2c 65 72 72 25  |erateError",err%|
00015e50  0d 88 0e 07 20 20 cd 0d  88 18 0d fd 28 46 25 80  |....  ......(F%.|
00015e60  31 29 3d 30 0d 88 22 0e  69 62 75 66 70 74 72 25  |1)=0..".ibufptr%|
00015e70  3d 30 0d 88 2c 05 e1 0d  88 36 04 0d 88 40 0f dd  |=0..,....6...@..|
00015e80  a4 69 66 69 6c 65 28 67  25 29 0d 88 4a 1c 3d a4  |.ifile(g%)..J.=.|
00015e90  6e 6f 74 6f 70 61 74 68  28 67 25 29 2b 22 2e 7e  |notopath(g%)+".~|
00015ea0  69 6e 64 65 78 22 0d 88  54 04 0d 88 5e 16 dd a4  |index"..T...^...|
00015eb0  66 69 6e 64 61 72 74 69  64 28 67 25 2c 61 24 29  |findartid(g%,a$)|
00015ec0  0d 88 68 19 ea 67 24 2c  66 25 2c 66 24 2c 41 24  |..h..g$,f%,f$,A$|
00015ed0  2c 72 33 25 3a 66 25 3d  30 0d 88 72 0a e7 67 25  |,r3%:f%=0..r..g%|
00015ee0  3e 30 8c 0d 88 7c 21 20  20 61 24 3d a4 6c 6f 77  |>0...|!  a$=.low|
00015ef0  65 72 28 61 24 29 3a 61  24 3d a4 63 6c 65 61 6e  |er(a$):a$=.clean|
00015f00  28 61 24 29 0d 88 86 13  20 20 66 24 3d a4 69 66  |(a$)....  f$=.if|
00015f10  69 6c 65 28 67 25 29 0d  88 90 15 20 20 66 31 25  |ile(g%)....  f1%|
00015f20  3d a4 6f 70 65 6e 69 6e  28 66 24 29 0d 88 9a 0e  |=.openin(f$)....|
00015f30  20 20 e7 66 31 25 3c 3e  30 8c 0d 88 a4 10 20 20  |  .f1%<>0.....  |
00015f40  70 25 3d 30 3a f2 68 67  6f 6e 0d 88 ae 07 20 20  |p%=0:.hgon....  |
00015f50  f5 0d 88 b8 2f 20 20 20  20 c8 99 22 4f 53 5f 47  |..../    .."OS_G|
00015f60  42 50 42 22 2c 33 2c 66  31 25 2c 74 6d 70 25 2c  |BPB",3,f1%,tmp%,|
00015f70  32 30 30 2c 70 25 b8 2c  2c 2c 72 33 25 2c 70 25  |200,p%.,,,r3%,p%|
00015f80  0d 88 c2 30 20 20 20 20  41 24 3d a4 6c 6f 77 65  |...0    A$=.lowe|
00015f90  72 28 a4 73 74 72 28 74  6d 70 25 2b 32 30 29 29  |r(.str(tmp%+20))|
00015fa0  3a e7 41 24 3d 61 24 8c  66 25 3d 21 74 6d 70 25  |:.A$=a$.f%=!tmp%|
00015fb0  0d 88 cc 12 20 20 fd 72  33 25 3e 30 84 66 25 3c  |....  .r3%>0.f%<|
00015fc0  3e 30 0d 88 d6 15 20 20  f2 63 66 28 66 31 25 29  |>0....  .cf(f1%)|
00015fd0  3a f2 68 67 6f 66 66 0d  88 e0 07 20 20 cd 0d 88  |:.hgoff....  ...|
00015fe0  ea 05 cd 0d 88 f4 07 3d  66 25 0d 88 fe 04 0d 89  |.......=f%......|
00015ff0  08 17 dd a4 6d 61 6b 65  69 6e 64 65 78 66 69 6c  |....makeindexfil|
00016000  65 28 67 25 29 0d 89 12  29 ea 70 24 2c 66 24 3a  |e(g%)...).p$,f$:|
00016010  70 24 3d a4 6e 6f 74 6f  70 61 74 68 28 67 25 29  |p$=.notopath(g%)|
00016020  3a 66 24 3d a4 69 66 69  6c 65 28 67 25 29 0d 89  |:f$=.ifile(g%)..|
00016030  1c 0e f2 63 68 65 63 6b  64 69 73 6b 0d 89 26 25  |...checkdisk..&%|
00016040  e7 a4 6f 62 6a 74 79 70  65 28 70 24 2b 22 2e 7e  |..objtype(p$+".~|
00016050  78 22 29 3c 32 8c f2 63  6f 6e 76 72 6e 28 70 24  |x")<2..convrn(p$|
00016060  29 0d 89 30 14 66 31 25  3d a4 6f 70 65 6e 6f 75  |)..0.f1%=.openou|
00016070  74 28 66 24 29 0d 89 3a  22 e7 66 31 25 3d 30 8c  |t(f$)..:".f1%=0.|
00016080  f2 6d 65 73 73 61 67 65  31 28 22 49 66 61 69 6c  |.message1("Ifail|
00016090  22 2c 70 24 2c 31 29 0d  89 44 08 3d 66 31 25 0d  |",p$,1)..D.=f1%.|
000160a0  89 4e 04 0d 89 58 1d dd  a4 66 69 6e 64 66 69 6c  |.N...X...findfil|
000160b0  65 28 67 25 2c 6e 25 2c  65 78 70 61 6e 64 25 29  |e(g%,n%,expand%)|
000160c0  0d 89 62 13 ea 66 24 2c  64 24 2c 61 24 2c 6f 25  |..b..f$,d$,a$,o%|
000160d0  2c 6c 24 0d 89 6c 1f 66  24 3d 22 22 3a 61 24 3d  |,l$..l.f$="":a$=|
000160e0  c2 22 30 30 30 30 30 30  30 30 22 2b c3 6e 25 2c  |."00000000"+.n%,|
000160f0  38 29 0d 89 76 19 e7 67  25 3d 66 69 6e 64 67 25  |8)..v..g%=findg%|
00016100  80 66 69 6e 64 70 24 3e  22 22 8c 0d 89 80 31 20  |.findp$>""....1 |
00016110  20 e7 a4 6f 62 6a 74 79  70 65 28 66 69 6e 64 70  | ..objtype(findp|
00016120  24 2b 22 2e 22 2b 61 24  29 3d 31 8c 66 24 3d 66  |$+"."+a$)=1.f$=f|
00016130  69 6e 64 70 24 2b 22 2e  22 2b 61 24 0d 89 8a 05  |indp$+"."+a$....|
00016140  cd 0d 89 94 0b e7 66 24  3d 22 22 8c 0d 89 9e 14  |......f$="".....|
00016150  20 20 6c 24 3d a4 61 72  74 64 69 72 28 6e 25 29  |  l$=.artdir(n%)|
00016160  0d 89 a8 20 20 20 64 24  3d a4 6e 6f 74 6f 70 61  |...   d$=.notopa|
00016170  74 68 28 67 25 29 2b 22  2e 7e 78 2e 22 2b 6c 24  |th(g%)+".~x."+l$|
00016180  0d 89 b2 07 20 20 f5 0d  89 bc 1e 20 20 20 20 6f  |....  .....    o|
00016190  25 3d a4 6f 62 6a 74 79  70 65 28 64 24 2b 22 2e  |%=.objtype(d$+".|
000161a0  22 2b 61 24 29 0d 89 c6  1a 20 20 20 20 e7 6f 25  |"+a$)....    .o%|
000161b0  3d 31 8c 66 24 3d 64 24  2b 22 2e 22 2b 61 24 0d  |=1.f$=d$+"."+a$.|
000161c0  89 d0 37 20 20 20 20 e7  6f 25 3d 30 8c 6f 25 3d  |..7    .o%=0.o%=|
000161d0  a4 6f 62 6a 74 79 70 65  28 64 24 2b 22 2e 22 2b  |.objtype(d$+"."+|
000161e0  6c 24 29 3a e7 6f 25 3d  32 20 64 24 3d 64 24 2b  |l$):.o%=2 d$=d$+|
000161f0  22 2e 22 2b 6c 24 0d 89  da 11 20 20 fd 66 24 3e  |"."+l$....  .f$>|
00016200  22 22 84 6f 25 3c 32 0d  89 e4 0d 20 20 e7 66 24  |"".o%<2....  .f$|
00016210  3d 22 22 8c 0d 89 ee 18  20 20 20 20 64 24 3d a4  |="".....    d$=.|
00016220  6e 6f 74 6f 70 61 74 68  28 67 25 29 0d 89 f8 09  |notopath(g%)....|
00016230  20 20 20 20 f5 0d 8a 02  20 20 20 20 20 20 20 6f  |    ....       o|
00016240  25 3d a4 6f 62 6a 74 79  70 65 28 64 24 2b 22 2e  |%=.objtype(d$+".|
00016250  22 2b 61 24 29 0d 8a 0c  1c 20 20 20 20 20 20 e7  |"+a$)....      .|
00016260  6f 25 3d 31 8c 66 24 3d  64 24 2b 22 2e 22 2b 61  |o%=1.f$=d$+"."+a|
00016270  24 0d 8a 16 37 20 20 20  20 20 20 e7 6f 25 3d 30  |$...7      .o%=0|
00016280  8c 6f 25 3d a4 6f 62 6a  74 79 70 65 28 64 24 2b  |.o%=.objtype(d$+|
00016290  22 2e 7e 78 22 29 3a e7  6f 25 3d 32 20 64 24 3d  |".~x"):.o%=2 d$=|
000162a0  64 24 2b 22 2e 7e 78 22  0d 8a 20 13 20 20 20 20  |d$+".~x".. .    |
000162b0  fd 66 24 3e 22 22 84 6f  25 3c 32 0d 8a 2a 07 20  |.f$>"".o%<2..*. |
000162c0  20 cd 0d 8a 34 20 20 20  e7 66 24 3e 22 22 8c 66  | ...4   .f$>"".f|
000162d0  69 6e 64 70 24 3d 64 24  3a 66 69 6e 64 67 25 3d  |indp$=d$:findg%=|
000162e0  67 25 0d 8a 3e 05 cd 0d  8a 48 22 e7 66 24 3e 22  |g%..>....H".f$>"|
000162f0  22 80 65 78 70 61 6e 64  25 8c f2 64 65 63 6f 6d  |".expand%..decom|
00016300  70 72 65 73 73 28 66 24  29 0d 8a 52 07 3d 66 24  |press(f$)..R.=f$|
00016310  0d 8a 5c 04 0d 8a 66 25  dd a4 64 65 63 6f 6d 70  |..\...f%..decomp|
00016320  68 65 61 64 65 72 28 69  62 25 2c 69 62 73 25 2c  |header(ib%,ibs%,|
00016330  6f 62 25 2c 6f 62 73 25  29 0d 8a 70 1d ea 77 73  |ob%,obs%)..p..ws|
00016340  25 2c 63 75 72 73 6c 6f  74 25 2c 6e 25 2c 66 25  |%,curslot%,n%,f%|
00016350  2c 73 69 7a 65 25 0d 8a  7a 25 c8 99 22 53 71 75  |,size%..z%.."Squ|
00016360  61 73 68 5f 44 65 63 6f  6d 70 72 65 73 73 22 2c  |ash_Decompress",|
00016370  38 2c 69 62 73 25 20 b8  77 73 25 0d 8a 84 2a c8  |8,ibs% .ws%...*.|
00016380  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
00016390  2c 2d 31 2c 2d 31 b8 63  75 72 73 6c 6f 74 25 2c  |,-1,-1.curslot%,|
000163a0  6e 25 2c 66 25 0d 8a 8e  0f e7 6e 25 2b 66 25 3e  |n%,f%.....n%+f%>|
000163b0  77 73 25 8c 0d 8a 98 29  20 20 f4 20 74 61 6b 65  |ws%....)  . take|
000163c0  20 77 6f 72 6b 73 70 61  63 65 20 69 6e 20 74 6f  | workspace in to|
000163d0  70 20 6f 66 20 77 69 6d  70 73 6c 6f 74 0d 8a a2  |p of wimpslot...|
000163e0  27 20 20 c8 99 22 57 69  6d 70 5f 53 6c 6f 74 53  |'  .."Wimp_SlotS|
000163f0  69 7a 65 22 2c 63 75 72  73 6c 6f 74 25 2b 77 73  |ize",curslot%+ws|
00016400  25 2c 2d 31 0d 8a ac 49  20 20 c8 99 22 53 71 75  |%,-1...I  .."Squ|
00016410  61 73 68 5f 44 65 63 6f  6d 70 72 65 73 73 22 2c  |ash_Decompress",|
00016420  30 2c 63 75 72 73 6c 6f  74 25 2b 26 38 30 30 30  |0,curslot%+&8000|
00016430  2c 69 62 25 2c 69 62 73  25 2c 6f 62 25 2c 6f 62  |,ib%,ibs%,ob%,ob|
00016440  73 25 b8 2c 2c 2c 2c 2c  73 69 7a 65 25 0d 8a b6  |s%.,,,,,size%...|
00016450  16 20 20 73 69 7a 65 25  3d 6f 62 73 25 2d 73 69  |.  size%=obs%-si|
00016460  7a 65 25 0d 8a c0 23 20  20 c8 99 22 57 69 6d 70  |ze%...#  .."Wimp|
00016470  5f 53 6c 6f 74 53 69 7a  65 22 2c 63 75 72 73 6c  |_SlotSize",cursl|
00016480  6f 74 25 2c 2d 31 0d 8a  ca 05 cd 0d 8a d4 2a f4  |ot%,-1........*.|
00016490  20 72 65 74 75 72 6e 20  73 69 7a 65 20 6f 66 20  | return size of |
000164a0  64 61 74 61 20 69 6e 20  6f 75 74 70 75 74 20 62  |data in output b|
000164b0  75 66 66 65 72 0d 8a de  0a 3d 73 69 7a 65 25 0d  |uffer....=size%.|
000164c0  8a e8 04 0d 8a f2 16 dd  f2 64 65 63 6f 6d 70 72  |.........decompr|
000164d0  65 73 73 28 f8 20 66 24  29 0d 8a fc 1b ea 72 34  |ess(. f$).....r4|
000164e0  25 2c 73 25 2c 6e 73 25  2c 61 74 74 72 25 2c 74  |%,s%,ns%,attr%,t|
000164f0  24 2c 46 25 0d 8b 06 19  e7 a4 66 69 6c 65 74 79  |$,F%......filety|
00016500  70 65 28 66 24 29 3d 26  46 43 41 20 8c 0d 8b 10  |pe(f$)=&FCA ....|
00016510  0b 20 20 f2 68 67 6f 6e  0d 8b 1a 0d 20 20 e7 72  |.  .hgon....  .r|
00016520  77 25 3d 30 8c 0d 8b 24  3f 20 20 20 20 46 25 3d  |w%=0...$?    F%=|
00016530  a4 63 6f 70 79 66 69 6c  65 28 66 24 2c 22 3c 57  |.copyfile(f$,"<W|
00016540  69 6d 70 24 53 63 72 61  70 3e 22 29 3a e7 46 25  |imp$Scrap>"):.F%|
00016550  3d 30 8c 66 24 3d 22 3c  57 69 6d 70 24 53 63 72  |=0.f$="<Wimp$Scr|
00016560  61 70 3e 22 0d 8b 2e 07  20 20 cd 0d 8b 38 2e 20  |ap>"....  ...8. |
00016570  20 f4 20 67 65 74 20 66  69 6c 65 20 61 74 74 72  | . get file attr|
00016580  69 62 75 74 65 73 20 26  20 73 65 74 20 74 6f 20  |ibutes & set to |
00016590  52 57 20 61 63 63 65 73  73 0d 8b 42 3c 20 20 c8  |RW access..B<  .|
000165a0  99 22 58 4f 53 5f 46 69  6c 65 22 2c 31 37 2c 66  |."XOS_File",17,f|
000165b0  24 b8 2c 2c 2c 2c 73 25  2c 61 74 74 72 25 3a c8  |$.,,,,s%,attr%:.|
000165c0  99 22 58 4f 53 5f 46 69  6c 65 22 2c 34 2c 66 24  |."XOS_File",4,f$|
000165d0  2c 2c 2c 2c 33 0d 8b 4c  1b 20 20 66 31 25 3d a4  |,,,,3..L.  f1%=.|
000165e0  6f 70 65 6e 69 6e 28 66  24 29 3a 72 34 25 3d 30  |openin(f$):r4%=0|
000165f0  0d 8b 56 38 20 20 e7 66  31 25 3c 3e 30 8c c8 99  |..V8  .f1%<>0...|
00016600  22 58 4f 53 5f 47 42 50  42 22 2c 34 2c 66 31 25  |"XOS_GBPB",4,f1%|
00016610  2c 74 6d 70 25 2c 38 b8  2c 2c 2c 2c 72 34 25 3a  |,tmp%,8.,,,,r4%:|
00016620  f2 63 66 28 66 31 25 29  0d 8b 60 0d 20 20 e7 72  |.cf(f1%)..`.  .r|
00016630  34 25 3e 30 8c 0d 8b 6a  12 20 20 20 20 6e 73 25  |4%>0...j.    ns%|
00016640  3d 74 6d 70 25 21 34 0d  8b 74 26 20 20 20 20 e7  |=tmp%!4..t&    .|
00016650  a4 64 65 63 6f 6d 70 72  65 73 73 66 69 6c 65 28  |.decompressfile(|
00016660  66 24 2c 73 25 2c 6e 73  25 29 3d 30 8c 0d 8b 7e  |f$,s%,ns%)=0...~|
00016670  15 20 20 20 20 20 20 74  24 3d a4 74 6d 70 66 69  |.      t$=.tmpfi|
00016680  6c 65 0d 8b 88 3b 20 20  20 20 20 20 f2 72 75 6e  |le...;      .run|
00016690  73 75 70 70 6f 72 74 28  22 73 71 75 61 73 68 20  |support("squash |
000166a0  22 2b 66 24 2b 22 20 22  2b 74 24 29 3a 73 25 3d  |"+f$+" "+t$):s%=|
000166b0  a4 66 69 6c 65 73 69 7a  65 28 74 24 29 0d 8b 92  |.filesize(t$)...|
000166c0  2a 20 20 20 20 20 20 f4  20 74 65 73 74 20 74 68  |*      . test th|
000166d0  61 74 20 74 68 65 20 73  69 7a 65 20 69 73 20 72  |at the size is r|
000166e0  69 67 68 74 2e 2e 2e 0d  8b 9c 12 20 20 20 20 20  |ight.......     |
000166f0  20 e7 73 25 3d 6e 73 25  8c 0d 8b a6 2e 20 20 20  | .s%=ns%.....   |
00016700  20 20 20 20 20 f2 70 72  69 6e 74 28 22 22 2c a4  |     .print("",.|
00016710  6d 73 67 30 28 22 43 6f  6d 70 41 72 74 31 22 29  |msg0("CompArt1")|
00016720  2c 22 22 2c 22 22 29 0d  8b b0 2d 20 20 20 20 20  |,"","")...-     |
00016730  20 20 20 46 25 3d a4 64  65 6c 66 69 6c 65 28 66  |   F%=.delfile(f|
00016740  24 29 3a 46 25 3d a4 72  65 6e 61 6d 65 28 74 24  |$):F%=.rename(t$|
00016750  2c 66 24 29 0d 8b ba 0d  20 20 20 20 20 20 20 20  |,f$)....        |
00016760  cc 0d 8b c4 34 20 20 20  20 20 20 20 20 f2 6d 65  |....4        .me|
00016770  73 73 61 67 65 30 28 22  43 6f 6d 70 46 61 69 6c  |ssage0("CompFail|
00016780  32 22 2c 30 29 3a 46 25  3d a4 64 65 6c 66 69 6c  |2",0):F%=.delfil|
00016790  65 28 74 24 29 0d 8b ce  0b 20 20 20 20 20 20 cd  |e(t$)....      .|
000167a0  0d 8b d8 09 20 20 20 20  cd 0d 8b e2 09 20 20 20  |....    .....   |
000167b0  20 cc 0d 8b ec 20 20 20  20 20 f2 6d 65 73 73 61  | ....     .messa|
000167c0  67 65 30 28 22 43 6f 6d  70 46 61 69 6c 31 22 2c  |ge0("CompFail1",|
000167d0  30 29 0d 8b f6 07 20 20  cd 0d 8c 00 26 20 20 f4  |0)....  ....&  .|
000167e0  20 72 65 73 65 74 20 6f  72 69 67 69 6e 61 6c 20  | reset original |
000167f0  66 69 6c 65 20 61 74 74  72 69 62 75 74 65 73 0d  |file attributes.|
00016800  8c 0a 20 20 20 c8 99 22  58 4f 53 5f 46 69 6c 65  |..   .."XOS_File|
00016810  22 2c 34 2c 66 24 2c 2c  2c 2c 61 74 74 72 25 0d  |",4,f$,,,,attr%.|
00016820  8c 14 0c 20 20 f2 68 67  6f 66 66 0d 8c 1e 05 cd  |...  .hgoff.....|
00016830  0d 8c 28 05 e1 0d 8c 32  04 0d 8c 3c 16 dd f2 63  |..(....2...<...c|
00016840  6f 6d 70 72 65 73 73 28  66 24 2c 6f 73 25 29 0d  |ompress(f$,os%).|
00016850  8c 46 1d ea 72 34 25 2c  6e 73 25 2c 74 24 2c 61  |.F..r4%,ns%,t$,a|
00016860  74 74 72 25 2c 46 25 2c  61 72 74 24 0d 8c 50 1c  |ttr%,F%,art$..P.|
00016870  e7 6f 73 25 3c 30 8c 6f  73 25 3d a4 66 69 6c 65  |.os%<0.os%=.file|
00016880  73 69 7a 65 28 66 24 29  0d 8c 5a 14 e7 6f 73 25  |size(f$)..Z..os%|
00016890  3e 63 6f 6d 70 6c 69 6d  69 74 25 8c 0d 8c 64 2d  |>complimit%...d-|
000168a0  20 20 61 72 74 24 3d c3  bb 28 a4 6c 65 61 66 28  |  art$=..(.leaf(|
000168b0  66 24 29 29 3a e7 61 72  74 24 3d 22 30 22 8c 61  |f$)):.art$="0".a|
000168c0  72 74 24 3d 22 2e 2e 2e  22 0d 8c 6e 1b 20 20 e7  |rt$="..."..n.  .|
000168d0  a4 66 69 6c 65 74 79 70  65 28 66 24 29 3d 26 46  |.filetype(f$)=&F|
000168e0  46 46 20 8c 0d 8c 78 0d  20 20 20 20 f2 68 67 6f  |FF ...x.    .hgo|
000168f0  6e 0d 8c 82 30 20 20 20  20 f4 20 67 65 74 20 66  |n...0    . get f|
00016900  69 6c 65 20 61 74 74 72  69 62 75 74 65 73 20 26  |ile attributes &|
00016910  20 73 65 74 20 74 6f 20  52 57 20 61 63 63 65 73  | set to RW acces|
00016920  73 0d 8c 8c 3c 20 20 20  20 c8 99 22 58 4f 53 5f  |s...<    .."XOS_|
00016930  46 69 6c 65 22 2c 31 37  2c 66 24 b8 2c 2c 2c 2c  |File",17,f$.,,,,|
00016940  2c 61 74 74 72 25 3a c8  99 22 58 4f 53 5f 46 69  |,attr%:.."XOS_Fi|
00016950  6c 65 22 2c 34 2c 66 24  2c 2c 2c 2c 33 0d 8c 96  |le",4,f$,,,,3...|
00016960  27 20 20 20 20 f4 20 66  69 72 73 74 20 74 72 79  |'    . first try|
00016970  20 62 75 69 6c 74 2d 69  6e 20 72 6f 75 74 69 6e  | built-in routin|
00016980  65 2e 2e 2e 0d 8c a0 1d  20 20 20 20 e7 a4 63 6f  |e.......    ..co|
00016990  6d 70 72 65 73 73 66 69  6c 65 28 66 24 29 3d 30  |mpressfile(f$)=0|
000169a0  8c 0d 8c aa 2a 20 20 20  20 20 20 e7 a4 6f 62 6a  |....*      ..obj|
000169b0  74 79 70 65 28 73 75 70  70 6f 72 74 24 2b 22 2e  |type(support$+".|
000169c0  73 71 75 61 73 68 22 29  3d 31 8c 0d 8c b4 38 20  |squash")=1....8 |
000169d0  20 20 20 20 20 20 20 74  24 3d a4 74 6d 70 66 69  |       t$=.tmpfi|
000169e0  6c 65 3a f2 72 75 6e 73  75 70 70 6f 72 74 28 22  |le:.runsupport("|
000169f0  73 71 75 61 73 68 20 22  2b 66 24 2b 22 20 22 2b  |squash "+f$+" "+|
00016a00  74 24 29 0d 8c be 21 20  20 20 20 20 20 20 20 66  |t$)...!        f|
00016a10  31 25 3d a4 6f 70 65 6e  69 6e 28 74 24 29 3a 72  |1%=.openin(t$):r|
00016a20  34 25 3d 30 0d 8c c8 3e  20 20 20 20 20 20 20 20  |4%=0...>        |
00016a30  e7 66 31 25 3c 3e 30 8c  c8 99 22 58 4f 53 5f 47  |.f1%<>0..."XOS_G|
00016a40  42 50 42 22 2c 34 2c 66  31 25 2c 74 6d 70 25 2c  |BPB",4,f1%,tmp%,|
00016a50  38 b8 2c 2c 2c 2c 72 34  25 3a f2 63 66 28 66 31  |8.,,,,r4%:.cf(f1|
00016a60  25 29 0d 8c d2 13 20 20  20 20 20 20 20 20 e7 72  |%)....        .r|
00016a70  34 25 3e 30 8c 0d 8c dc  18 20 20 20 20 20 20 20  |4%>0.....       |
00016a80  20 20 20 6e 73 25 3d 74  6d 70 25 21 34 0d 8c e6  |   ns%=tmp%!4...|
00016a90  17 20 20 20 20 20 20 20  20 20 20 e7 6f 73 25 3d  |.          .os%=|
00016aa0  6e 73 25 8c 0d 8c f0 31  20 20 20 20 20 20 20 20  |ns%....1        |
00016ab0  20 20 20 20 46 25 3d a4  64 65 6c 66 69 6c 65 28  |    F%=.delfile(|
00016ac0  66 24 29 3a 46 25 3d a4  72 65 6e 61 6d 65 28 74  |f$):F%=.rename(t|
00016ad0  24 2c 66 24 29 0d 8c fa  37 20 20 20 20 20 20 20  |$,f$)...7       |
00016ae0  20 20 20 20 20 f2 70 72  69 6e 74 28 22 22 2c a4  |     .print("",.|
00016af0  6d 73 67 31 28 22 43 6f  6d 70 41 72 74 32 22 2c  |msg1("CompArt2",|
00016b00  61 72 74 24 29 2c 22 22  2c 22 22 29 0d 8d 04 11  |art$),"","")....|
00016b10  20 20 20 20 20 20 20 20  20 20 20 20 cc 0d 8d 0e  |            ....|
00016b20  1f 20 20 20 20 20 20 20  20 20 20 20 20 46 25 3d  |.            F%=|
00016b30  a4 64 65 6c 66 69 6c 65  28 74 24 29 0d 8d 18 0f  |.delfile(t$)....|
00016b40  20 20 20 20 20 20 20 20  20 20 cd 0d 8d 22 0f 20  |          ...". |
00016b50  20 20 20 20 20 20 20 20  20 cc 0d 8d 2c 1d 20 20  |         ...,.  |
00016b60  20 20 20 20 20 20 20 20  46 25 3d a4 64 65 6c 66  |        F%=.delf|
00016b70  69 6c 65 28 74 24 29 0d  8d 36 0d 20 20 20 20 20  |ile(t$)..6.     |
00016b80  20 20 20 cd 0d 8d 40 0b  20 20 20 20 20 20 cd 0d  |   ...@.      ..|
00016b90  8d 4a 0b 20 20 20 20 20  20 cc 0d 8d 54 31 20 20  |.J.      ...T1  |
00016ba0  20 20 20 20 f2 70 72 69  6e 74 28 22 22 2c a4 6d  |    .print("",.m|
00016bb0  73 67 31 28 22 43 6f 6d  70 41 72 74 33 22 2c 61  |sg1("CompArt3",a|
00016bc0  72 74 24 29 2c 22 22 2c  22 22 29 0d 8d 5e 09 20  |rt$),"","")..^. |
00016bd0  20 20 20 cd 0d 8d 68 28  20 20 20 20 f4 20 72 65  |   ...h(    . re|
00016be0  73 65 74 20 6f 72 69 67  69 6e 61 6c 20 66 69 6c  |set original fil|
00016bf0  65 20 61 74 74 72 69 62  75 74 65 73 0d 8d 72 22  |e attributes..r"|
00016c00  20 20 20 20 c8 99 22 58  4f 53 5f 46 69 6c 65 22  |    .."XOS_File"|
00016c10  2c 34 2c 66 24 2c 2c 2c  2c 61 74 74 72 25 0d 8d  |,4,f$,,,,attr%..|
00016c20  7c 0e 20 20 20 20 f2 68  67 6f 66 66 0d 8d 86 07  ||.    .hgoff....|
00016c30  20 20 cd 0d 8d 90 05 cd  0d 8d 9a 05 e1 0d 8d a4  |  ..............|
00016c40  04 0d 8d ae 18 dd a4 63  6f 6d 70 72 65 73 73 66  |.......compressf|
00016c50  69 6c 65 28 f8 20 66 24  29 0d 8d b8 33 ea 77 73  |ile(. f$)...3.ws|
00016c60  25 2c 77 73 73 25 2c 63  75 72 73 6c 6f 74 25 2c  |%,wss%,curslot%,|
00016c70  66 25 2c 73 69 7a 65 25  2c 6f 75 74 25 2c 6c 61  |f%,size%,out%,la|
00016c80  73 74 25 2c 6f 6b 25 2c  62 75 66 25 0d 8d c2 3b  |st%,ok%,buf%...;|
00016c90  ea 69 62 75 66 25 2c 69  62 75 66 73 25 2c 6f 62  |.ibuf%,ibufs%,ob|
00016ca0  75 66 25 2c 6f 62 75 66  73 25 2c 6c 65 66 74 25  |uf%,obufs%,left%|
00016cb0  2c 72 31 25 2c 72 32 25  2c 72 33 25 2c 72 34 25  |,r1%,r2%,r3%,r4%|
00016cc0  2c 72 35 25 2c 46 25 0d  8d cc 2e ea 6f 25 2c 6c  |,r5%,F%.....o%,l|
00016cd0  25 2c 65 25 2c 73 25 2c  61 74 74 72 25 2c 61 76  |%,e%,s%,attr%,av|
00016ce0  61 69 6c 25 2c 66 61 73  74 25 2c 46 25 3a 66 61  |ail%,fast%,F%:fa|
00016cf0  73 74 25 3d b9 0d 8d d6  08 ea 66 32 24 0d 8d e0  |st%=......f2$...|
00016d00  19 f4 20 67 65 74 20 66  69 6c 65 20 61 74 74 72  |.. get file attr|
00016d10  69 62 75 74 65 73 0d 8d  ea 23 c8 99 22 58 4f 53  |ibutes...#.."XOS|
00016d20  5f 46 69 6c 65 22 2c 31  37 2c 66 24 b8 6f 25 2c  |_File",17,f$.o%,|
00016d30  2c 6c 25 2c 65 25 2c 73  25 0d 8d f4 21 c8 99 22  |,l%,e%,s%...!.."|
00016d40  53 71 75 61 73 68 5f 43  6f 6d 70 72 65 73 73 22  |Squash_Compress"|
00016d50  2c 38 2c 73 25 b8 77 73  73 25 0d 8d fe 28 c8 99  |,8,s%.wss%...(..|
00016d60  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
00016d70  2d 31 2c 2d 31 b8 63 75  72 73 6c 6f 74 25 2c 2c  |-1,-1.curslot%,,|
00016d80  66 25 0d 8e 08 35 69 62  75 66 73 25 3d 32 30 2b  |f%...5ibufs%=20+|
00016d90  28 73 25 81 34 2a 34 2b  34 29 3a 6f 62 75 66 73  |(s%.4*4+4):obufs|
00016da0  25 3d 69 62 75 66 73 25  3a 61 76 61 69 6c 25 3d  |%=ibufs%:avail%=|
00016db0  66 25 2d 77 73 73 25 0d  8e 12 13 e7 61 76 61 69  |f%-wss%.....avai|
00016dc0  6c 25 3e 26 34 30 30 30  20 8c 0d 8e 1c 29 20 20  |l%>&4000 ....)  |
00016dd0  f4 20 63 61 6c 63 20 61  76 61 69 6c 61 62 6c 65  |. calc available|
00016de0  20 26 20 6e 65 65 64 65  64 20 6d 65 6d 6f 72 79  | & needed memory|
00016df0  2e 2e 2e 0d 8e 26 1e 20  20 e7 28 69 62 75 66 73  |.....&.  .(ibufs|
00016e00  25 2b 6f 62 75 66 73 25  29 3e 61 76 61 69 6c 25  |%+obufs%)>avail%|
00016e10  8c 0d 8e 30 2f 20 20 20  20 69 62 75 66 73 25 3d  |...0/    ibufs%=|
00016e20  61 76 61 69 6c 25 81 32  3a 6f 62 75 66 73 25 3d  |avail%.2:obufs%=|
00016e30  61 76 61 69 6c 25 81 32  3a 66 61 73 74 25 3d a3  |avail%.2:fast%=.|
00016e40  0d 8e 3a 07 20 20 cd 0d  8e 44 1a 20 20 f4 20 6e  |..:.  ...D.  . n|
00016e50  6f 77 20 67 65 74 20 74  68 65 20 52 41 4d 2e 2e  |ow get the RAM..|
00016e60  2e 0d 8e 4e 36 20 20 c8  99 22 57 69 6d 70 5f 53  |...N6  .."Wimp_S|
00016e70  6c 6f 74 53 69 7a 65 22  2c 63 75 72 73 6c 6f 74  |lotSize",curslot|
00016e80  25 2b 69 62 75 66 73 25  2b 6f 62 75 66 73 25 2b  |%+ibufs%+obufs%+|
00016e90  77 73 73 25 2c 2d 31 0d  8e 58 3a 20 20 77 73 25  |wss%,-1..X:  ws%|
00016ea0  3d 26 38 30 30 30 2b 63  75 72 73 6c 6f 74 25 3a  |=&8000+curslot%:|
00016eb0  69 62 75 66 25 3d 77 73  25 2b 77 73 73 25 3a 6f  |ibuf%=ws%+wss%:o|
00016ec0  62 75 66 25 3d 69 62 75  66 25 2b 69 62 75 66 73  |buf%=ibuf%+ibufs|
00016ed0  25 0d 8e 62 0d 20 20 e7  66 61 73 74 25 8c 0d 8e  |%..b.  .fast%...|
00016ee0  6c 26 20 20 20 20 c8 99  22 58 4f 53 5f 46 69 6c  |l&    .."XOS_Fil|
00016ef0  65 22 2c 31 36 2c 66 24  2c 69 62 75 66 25 2c 30  |e",16,f$,ibuf%,0|
00016f00  b8 3b 46 25 0d 8e 76 12  20 20 20 20 e7 28 46 25  |.;F%..v.    .(F%|
00016f10  80 31 29 3d 30 8c 0d 8e  80 50 20 20 20 20 20 20  |.1)=0....P      |
00016f20  c8 99 22 58 53 71 75 61  73 68 5f 43 6f 6d 70 72  |.."XSquash_Compr|
00016f30  65 73 73 22 2c 30 2c 77  73 25 2c 69 62 75 66 25  |ess",0,ws%,ibuf%|
00016f40  2c 73 25 2c 6f 62 75 66  25 2b 32 30 2c 6f 62 75  |,s%,obuf%+20,obu|
00016f50  66 73 25 2d 32 30 b8 6f  6b 25 2c 2c 2c 2c 6c 61  |fs%-20.ok%,,,,la|
00016f60  73 74 25 3b 46 25 0d 8e  8a 50 20 20 20 20 20 20  |st%;F%...P      |
00016f70  24 6f 62 75 66 25 3d 22  53 51 53 48 22 3a 6f 62  |$obuf%="SQSH":ob|
00016f80  75 66 25 21 34 3d 73 25  3a 6f 62 75 66 25 21 38  |uf%!4=s%:obuf%!8|
00016f90  3d 6c 25 3a 6f 62 75 66  25 21 31 32 3d 65 25 3a  |=l%:obuf%!12=e%:|
00016fa0  6f 62 75 66 25 21 31 36  3d 30 3a 6f 6b 25 3d 28  |obuf%!16=0:ok%=(|
00016fb0  6f 6b 25 3d 30 29 0d 8e  94 2c 20 20 20 20 20 20  |ok%=0)...,      |
00016fc0  e7 28 46 25 80 31 29 8c  6f 6b 25 3d 30 3a f4 20  |.(F%.1).ok%=0:. |
00016fd0  74 68 65 72 65 20 77 61  73 20 61 6e 20 65 72 72  |there was an err|
00016fe0  6f 72 0d 8e 9e 31 20 20  20 20 20 20 e7 6f 6b 25  |or...1      .ok%|
00016ff0  8c c8 99 22 4f 53 5f 46  69 6c 65 22 2c 30 2c 66  |..."OS_File",0,f|
00017000  24 2c 6c 25 2c 65 25 2c  6f 62 75 66 25 2c 6c 61  |$,l%,e%,obuf%,la|
00017010  73 74 25 0d 8e a8 09 20  20 20 20 cd 0d 8e b2 09  |st%....    .....|
00017020  20 20 20 20 cc 0d 8e bc  1b 20 20 20 20 f4 20 73  |    .....    . s|
00017030  6c 6f 77 20 70 72 6f 63  65 64 75 72 65 2e 2e 2e  |low procedure...|
00017040  0d 8e c6 1d 20 20 20 20  66 31 25 3d a4 6f 70 65  |....    f1%=.ope|
00017050  6e 69 6e 28 66 24 29 3a  6f 6b 25 3d 30 0d 8e d0  |nin(f$):ok%=0...|
00017060  0f 20 20 20 20 e7 66 31  25 3e 30 8c 0d 8e da 3b  |.    .f1%>0....;|
00017070  20 20 20 20 20 20 66 32  24 3d a4 74 6d 70 66 69  |      f2$=.tmpfi|
00017080  6c 65 3a 66 32 25 3d a4  6f 70 65 6e 6f 75 74 28  |le:f2%=.openout(|
00017090  66 32 24 29 3a 70 74 72  31 25 3d 30 3a 73 74 61  |f2$):ptr1%=0:sta|
000170a0  72 74 65 64 25 3d 30 0d  8e e4 11 20 20 20 20 20  |rted%=0....     |
000170b0  20 e7 66 32 25 3e 30 8c  0d 8e ee 2f 20 20 20 20  | .f2%>0..../    |
000170c0  20 20 20 20 f4 20 66 69  72 73 74 20 77 72 69 74  |    . first writ|
000170d0  65 20 6f 75 74 20 73 71  75 61 73 68 66 69 6c 65  |e out squashfile|
000170e0  20 68 65 61 64 65 72 0d  8e f8 46 20 20 20 20 20  | header...F     |
000170f0  20 20 20 24 6f 62 75 66  25 3d 22 53 51 53 48 22  |   $obuf%="SQSH"|
00017100  3a 6f 62 75 66 25 21 34  3d 73 25 3a 6f 62 75 66  |:obuf%!4=s%:obuf|
00017110  25 21 38 3d 6c 25 3a 6f  62 75 66 25 21 31 32 3d  |%!8=l%:obuf%!12=|
00017120  65 25 3a 6f 62 75 66 25  21 31 36 3d 30 0d 8f 02  |e%:obuf%!16=0...|
00017130  26 20 20 20 20 20 20 20  20 c8 99 22 4f 53 5f 47  |&        .."OS_G|
00017140  42 50 42 22 2c 32 2c 66  32 25 2c 6f 62 75 66 25  |BPB",2,f2%,obuf%|
00017150  2c 32 30 0d 8f 0c 0d 20  20 20 20 20 20 20 20 f5  |,20....        .|
00017160  0d 8f 16 45 20 20 20 20  20 20 20 20 20 20 c8 99  |...E          ..|
00017170  22 58 4f 53 5f 47 42 50  42 22 2c 33 2c 66 31 25  |"XOS_GBPB",3,f1%|
00017180  2c 69 62 75 66 25 2c 69  62 75 66 73 25 2c 70 74  |,ibuf%,ibufs%,pt|
00017190  72 31 25 b8 2c 2c 2c 6c  65 66 74 25 2c 70 74 72  |r1%.,,,left%,ptr|
000171a0  31 25 3b 46 25 0d 8f 20  45 20 20 20 20 20 20 20  |1%;F%.. E       |
000171b0  20 20 20 72 31 25 3d 77  73 25 3a 72 32 25 3d 69  |   r1%=ws%:r2%=i|
000171c0  62 75 66 25 3a 72 33 25  3d 69 62 75 66 73 25 2d  |buf%:r3%=ibufs%-|
000171d0  6c 65 66 74 25 3a 72 34  25 3d 6f 62 75 66 25 3a  |left%:r4%=obuf%:|
000171e0  72 35 25 3d 6f 62 75 66  73 25 0d 8f 2a 1e 20 20  |r5%=obufs%..*.  |
000171f0  20 20 20 20 20 20 20 20  e7 72 33 25 3e 30 80 28  |        .r3%>0.(|
00017200  46 25 80 31 29 3d 30 8c  0d 8f 34 11 20 20 20 20  |F%.1)=0...4.    |
00017210  20 20 20 20 20 20 20 20  f5 0d 8f 3e 35 20 20 20  |        ...>5   |
00017220  20 20 20 20 20 20 20 20  20 20 20 72 30 25 3d 73  |           r0%=s|
00017230  74 61 72 74 65 64 25 2d  32 2a 28 6c 65 66 74 25  |tarted%-2*(left%|
00017240  3d 30 29 3a 73 74 61 72  74 65 64 25 3d 31 0d 8f  |=0):started%=1..|
00017250  48 5b 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |H[              |
00017260  c8 99 22 58 53 71 75 61  73 68 5f 43 6f 6d 70 72  |.."XSquash_Compr|
00017270  65 73 73 22 2c 72 30 25  2c 77 73 25 2c 72 32 25  |ess",r0%,ws%,r2%|
00017280  2c 72 33 25 2c 6f 62 75  66 25 2c 6f 62 75 66 73  |,r3%,obuf%,obufs|
00017290  25 b8 6f 6b 25 2c 2c 72  32 25 2c 72 33 25 2c 72  |%.ok%,,r2%,r3%,r|
000172a0  34 25 2c 72 35 25 3b 46  25 0d 8f 52 42 20 20 20  |4%,r5%;F%..RB   |
000172b0  20 20 20 20 20 20 20 20  20 20 20 e7 28 46 25 80  |           .(F%.|
000172c0  31 29 3d 30 8c c8 99 22  58 4f 53 5f 47 42 50 42  |1)=0..."XOS_GBPB|
000172d0  22 2c 32 2c 66 32 25 2c  6f 62 75 66 25 2c 72 34  |",2,f2%,obuf%,r4|
000172e0  25 2d 6f 62 75 66 25 b8  3b 46 25 0d 8f 5c 1f 20  |%-obuf%.;F%..\. |
000172f0  20 20 20 20 20 20 20 20  20 20 20 fd 6f 6b 25 3c  |           .ok%<|
00017300  32 84 28 46 25 80 31 29  3e 30 0d 8f 66 2f 20 20  |2.(F%.1)>0..f/  |
00017310  20 20 20 20 20 20 20 20  20 20 70 74 72 31 25 2d  |          ptr1%-|
00017320  3d 72 33 25 3a f4 20 72  65 77 69 6e 64 20 75 6e  |=r3%:. rewind un|
00017330  75 73 65 64 20 64 61 74  61 0d 8f 70 0f 20 20 20  |used data..p.   |
00017340  20 20 20 20 20 20 20 cd  0d 8f 7a 25 20 20 20 20  |       ...z%    |
00017350  20 20 20 20 fd 28 6c 65  66 74 25 3e 30 80 6f 6b  |    .(left%>0.ok|
00017360  25 3d 30 29 84 28 46 25  80 31 29 3e 30 0d 8f 84  |%=0).(F%.1)>0...|
00017370  3b 20 20 20 20 20 20 20  20 6f 6b 25 3d 28 6f 6b  |;        ok%=(ok|
00017380  25 3d 30 29 3a e7 28 46  25 80 31 29 3e 30 8c 6f  |%=0):.(F%.1)>0.o|
00017390  6b 25 3d 30 3a f4 20 6e  6f 74 20 6f 6b 61 79 20  |k%=0:. not okay |
000173a0  69 66 20 65 72 72 6f 72  0d 8f 8e 14 20 20 20 20  |if error....    |
000173b0  20 20 20 20 f2 63 66 28  66 32 25 29 0d 8f 98 0b  |    .cf(f2%)....|
000173c0  20 20 20 20 20 20 cd 0d  8f a2 12 20 20 20 20 20  |      .....     |
000173d0  20 f2 63 66 28 66 31 25  29 0d 8f ac 0f 20 20 20  | .cf(f1%)....   |
000173e0  20 20 20 e7 6f 6b 25 8c  0d 8f b6 2e 20 20 20 20  |   .ok%.....    |
000173f0  20 20 20 20 46 25 3d a4  64 65 6c 66 69 6c 65 28  |    F%=.delfile(|
00017400  66 24 29 3a 46 25 3d a4  72 65 6e 61 6d 65 28 66  |f$):F%=.rename(f|
00017410  32 24 2c 66 24 29 0d 8f  c0 28 20 20 20 20 20 20  |2$,f$)...(      |
00017420  20 20 c8 99 22 4f 53 5f  46 69 6c 65 22 2c 31 2c  |  .."OS_File",1,|
00017430  66 24 2c 6c 25 2c 65 25  2c 61 74 74 72 25 0d 8f  |f$,l%,e%,attr%..|
00017440  ca 0b 20 20 20 20 20 20  cd 0d 8f d4 09 20 20 20  |..      .....   |
00017450  20 cd 0d 8f de 07 20 20  cd 0d 8f e8 23 20 20 c8  | .....  ....#  .|
00017460  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
00017470  2c 63 75 72 73 6c 6f 74  25 2c 2d 31 0d 8f f2 1c  |,curslot%,-1....|
00017480  20 20 e7 6f 6b 25 8c f2  73 65 74 74 79 70 65 28  |  .ok%..settype(|
00017490  66 24 2c 26 46 43 41 29  0d 8f fc 05 cd 0d 90 06  |f$,&FCA)........|
000174a0  1b f4 20 72 65 74 75 72  6e 20 73 75 63 63 65 73  |.. return succes|
000174b0  73 20 73 74 61 74 75 73  0d 90 10 08 3d 6f 6b 25  |s status....=ok%|
000174c0  0d 90 1a 04 0d 90 24 20  dd a4 64 65 63 6f 6d 70  |......$ ..decomp|
000174d0  72 65 73 73 66 69 6c 65  28 66 24 2c 63 73 25 2c  |ressfile(f$,cs%,|
000174e0  64 73 25 29 0d 90 2e 2b  f4 20 63 73 25 20 69 73  |ds%)...+. cs% is|
000174f0  20 63 6f 6d 70 20 73 69  7a 65 25 2c 20 64 73 25  | comp size%, ds%|
00017500  20 69 73 20 64 65 63 6f  6d 70 20 73 69 7a 65 0d  | is decomp size.|
00017510  90 38 33 ea 77 73 25 2c  77 73 73 25 2c 63 75 72  |.83.ws%,wss%,cur|
00017520  73 6c 6f 74 25 2c 66 25  2c 73 69 7a 65 25 2c 6f  |slot%,f%,size%,o|
00017530  75 74 25 2c 6c 61 73 74  25 2c 6f 6b 25 2c 62 75  |ut%,last%,ok%,bu|
00017540  66 25 0d 90 42 2e ea 6f  25 2c 6c 25 2c 65 25 2c  |f%..B..o%,l%,e%,|
00017550  73 25 2c 61 74 74 72 25  2c 61 76 61 69 6c 25 2c  |s%,attr%,avail%,|
00017560  66 61 73 74 25 2c 46 25  3a 66 61 73 74 25 3d b9  |fast%,F%:fast%=.|
00017570  0d 90 4c 38 ea 69 62 75  66 25 2c 69 62 75 66 73  |..L8.ibuf%,ibufs|
00017580  25 2c 6f 62 75 66 25 2c  6f 62 75 66 73 25 2c 6c  |%,obuf%,obufs%,l|
00017590  65 66 74 25 2c 72 31 25  2c 72 32 25 2c 72 33 25  |eft%,r1%,r2%,r3%|
000175a0  2c 72 34 25 2c 72 35 25  0d 90 56 08 ea 66 32 24  |,r4%,r5%..V..f2$|
000175b0  0d 90 60 14 f4 20 76 61  72 69 61 62 6c 65 73 20  |..`.. variables |
000175c0  61 72 65 3a 0d 90 6a 39  f4 20 77 73 25 2c 77 73  |are:..j9. ws%,ws|
000175d0  73 25 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |s%              |
000175e0  20 20 20 20 61 72 65 20  77 6f 72 6b 73 70 61 63  |    are workspac|
000175f0  65 20 62 61 73 65 20 26  20 73 69 7a 65 0d 90 74  |e base & size..t|
00017600  3c f4 20 69 62 75 66 25  2c 69 62 75 66 73 25 2c  |<. ibuf%,ibufs%,|
00017610  6f 62 75 66 25 2c 6f 62  75 66 73 25 20 61 72 65  |obuf%,obufs% are|
00017620  20 69 6e 70 75 74 2f 6f  75 74 70 75 74 20 62 61  | input/output ba|
00017630  73 65 20 26 20 73 69 7a  65 0d 90 7e 19 f4 20 67  |se & size..~.. g|
00017640  65 74 20 66 69 6c 65 20  61 74 74 72 69 62 75 74  |et file attribut|
00017650  65 73 0d 90 88 29 c8 99  22 58 4f 53 5f 46 69 6c  |es...).."XOS_Fil|
00017660  65 22 2c 31 37 2c 66 24  b8 6f 25 2c 2c 6c 25 2c  |e",17,f$.o%,,l%,|
00017670  65 25 2c 73 25 2c 61 74  74 72 25 0d 90 92 28 c8  |e%,s%,attr%...(.|
00017680  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
00017690  2c 2d 31 2c 2d 31 b8 63  75 72 73 6c 6f 74 25 2c  |,-1,-1.curslot%,|
000176a0  2c 66 25 0d 90 9c 27 c8  99 22 53 71 75 61 73 68  |,f%...'.."Squash|
000176b0  5f 44 65 63 6f 6d 70 72  65 73 73 22 2c 38 2c 63  |_Decompress",8,c|
000176c0  73 25 2d 32 30 b8 77 73  73 25 0d 90 a6 38 61 76  |s%-20.wss%...8av|
000176d0  61 69 6c 25 3d 66 25 2d  77 73 73 25 3a 69 62 75  |ail%=f%-wss%:ibu|
000176e0  66 73 25 3d 28 63 73 25  81 34 2a 34 2b 34 29 3a  |fs%=(cs%.4*4+4):|
000176f0  6f 62 75 66 73 25 3d 28  64 73 25 81 34 2a 34 2b  |obufs%=(ds%.4*4+|
00017700  34 29 0d 90 b0 2e f4 20  6e 65 65 64 20 61 74 20  |4)..... need at |
00017710  6c 65 61 73 74 20 77 6f  72 6b 73 70 61 63 65 2b  |least workspace+|
00017720  31 36 6b 20 74 6f 20 77  6f 72 6b 2c 20 6f 6b 3f  |16k to work, ok?|
00017730  0d 90 ba 13 e7 61 76 61  69 6c 25 3e 26 34 30 30  |.....avail%>&400|
00017740  30 20 8c 0d 90 c4 29 20  20 f4 20 63 61 6c 63 20  |0 ....)  . calc |
00017750  61 76 61 69 6c 61 62 6c  65 20 26 20 6e 65 65 64  |available & need|
00017760  65 64 20 6d 65 6d 6f 72  79 2e 2e 2e 0d 90 ce 1e  |ed memory.......|
00017770  20 20 e7 28 69 62 75 66  73 25 2b 6f 62 75 66 73  |  .(ibufs%+obufs|
00017780  25 29 3e 61 76 61 69 6c  25 8c 0d 90 d8 2f 20 20  |%)>avail%..../  |
00017790  20 20 69 62 75 66 73 25  3d 61 76 61 69 6c 25 81  |  ibufs%=avail%.|
000177a0  32 3a 6f 62 75 66 73 25  3d 61 76 61 69 6c 25 81  |2:obufs%=avail%.|
000177b0  32 3a 66 61 73 74 25 3d  a3 0d 90 e2 07 20 20 cd  |2:fast%=.....  .|
000177c0  0d 90 ec 1a 20 20 f4 20  6e 6f 77 20 67 65 74 20  |....  . now get |
000177d0  74 68 65 20 52 41 4d 2e  2e 2e 0d 90 f6 39 20 20  |the RAM......9  |
000177e0  c8 99 22 57 69 6d 70 5f  53 6c 6f 74 53 69 7a 65  |.."Wimp_SlotSize|
000177f0  22 2c 63 75 72 73 6c 6f  74 25 2b 77 73 73 25 2b  |",curslot%+wss%+|
00017800  69 62 75 66 73 25 2b 6f  62 75 66 73 25 2c 2d 31  |ibufs%+obufs%,-1|
00017810  2c 2d 31 0d 91 00 3a 20  20 77 73 25 3d 63 75 72  |,-1...:  ws%=cur|
00017820  73 6c 6f 74 25 2b 26 38  30 30 30 3a 69 62 75 66  |slot%+&8000:ibuf|
00017830  25 3d 77 73 25 2b 77 73  73 25 3a 6f 62 75 66 25  |%=ws%+wss%:obuf%|
00017840  3d 69 62 75 66 25 2b 69  62 75 66 73 25 0d 91 0a  |=ibuf%+ibufs%...|
00017850  0d 20 20 e7 66 61 73 74  25 8c 0d 91 14 20 20 20  |.  .fast%....   |
00017860  20 20 f4 20 66 61 73 74  20 63 61 73 65 20 28 65  |  . fast case (e|
00017870  6e 6f 75 67 68 20 52 41  4d 29 0d 91 1e 26 20 20  |nough RAM)...&  |
00017880  20 20 c8 99 22 58 4f 53  5f 46 69 6c 65 22 2c 31  |  .."XOS_File",1|
00017890  36 2c 66 24 2c 69 62 75  66 25 2c 30 b8 3b 46 25  |6,f$,ibuf%,0.;F%|
000178a0  0d 91 28 12 20 20 20 20  e7 28 46 25 80 31 29 3d  |..(.    .(F%.1)=|
000178b0  30 8c 0d 91 32 53 20 20  20 20 20 20 c8 99 22 58  |0...2S      .."X|
000178c0  53 71 75 61 73 68 5f 44  65 63 6f 6d 70 72 65 73  |Squash_Decompres|
000178d0  73 22 2c 30 2c 77 73 25  2c 69 62 75 66 25 2b 32  |s",0,ws%,ibuf%+2|
000178e0  30 2c 63 73 25 2d 32 30  2c 6f 62 75 66 25 2c 6f  |0,cs%-20,obuf%,o|
000178f0  62 75 66 73 25 b8 6f 6b  25 2c 2c 2c 2c 6c 61 73  |bufs%.ok%,,,,las|
00017900  74 25 3b 46 25 0d 91 3c  15 20 20 20 20 20 20 6f  |t%;F%..<.      o|
00017910  6b 25 3d 28 6f 6b 25 3d  30 29 0d 91 46 3b 20 20  |k%=(ok%=0)..F;  |
00017920  20 20 20 20 e7 6f 6b 25  80 28 46 25 80 31 29 3d  |    .ok%.(F%.1)=|
00017930  30 8c c8 99 22 58 4f 53  5f 46 69 6c 65 22 2c 30  |0..."XOS_File",0|
00017940  2c 66 24 2c 6c 25 2c 65  25 2c 6f 62 75 66 25 2c  |,f$,l%,e%,obuf%,|
00017950  6c 61 73 74 25 0d 91 50  09 20 20 20 20 cd 0d 91  |last%..P.    ...|
00017960  5a 09 20 20 20 20 cc 0d  91 64 16 20 20 20 20 f4  |Z.    ...d.    .|
00017970  20 73 6c 6f 77 20 63 61  73 65 2e 2e 2e 0d 91 6e  | slow case.....n|
00017980  1d 20 20 20 20 66 31 25  3d a4 6f 70 65 6e 69 6e  |.    f1%=.openin|
00017990  28 66 24 29 3a 6f 6b 25  3d 30 0d 91 78 0f 20 20  |(f$):ok%=0..x.  |
000179a0  20 20 e7 66 31 25 3e 30  8c 0d 91 82 3c 20 20 20  |  .f1%>0....<   |
000179b0  20 20 20 66 32 24 3d a4  74 6d 70 66 69 6c 65 3a  |   f2$=.tmpfile:|
000179c0  66 32 25 3d a4 6f 70 65  6e 6f 75 74 28 66 32 24  |f2%=.openout(f2$|
000179d0  29 3a 70 74 72 31 25 3d  32 30 3a 73 74 61 72 74  |):ptr1%=20:start|
000179e0  65 64 25 3d 30 0d 91 8c  11 20 20 20 20 20 20 e7  |ed%=0....      .|
000179f0  66 32 25 3e 30 8c 0d 91  96 0d 20 20 20 20 20 20  |f2%>0.....      |
00017a00  20 20 f5 0d 91 a0 45 20  20 20 20 20 20 20 20 20  |  ....E         |
00017a10  20 c8 99 22 58 4f 53 5f  47 42 50 42 22 2c 33 2c  | .."XOS_GBPB",3,|
00017a20  66 31 25 2c 69 62 75 66  25 2c 69 62 75 66 73 25  |f1%,ibuf%,ibufs%|
00017a30  2c 70 74 72 31 25 b8 2c  2c 2c 6c 65 66 74 25 2c  |,ptr1%.,,,left%,|
00017a40  70 74 72 31 25 3b 46 25  0d 91 aa 45 20 20 20 20  |ptr1%;F%...E    |
00017a50  20 20 20 20 20 20 72 31  25 3d 77 73 25 3a 72 32  |      r1%=ws%:r2|
00017a60  25 3d 69 62 75 66 25 3a  72 33 25 3d 69 62 75 66  |%=ibuf%:r3%=ibuf|
00017a70  73 25 2d 6c 65 66 74 25  3a 72 34 25 3d 6f 62 75  |s%-left%:r4%=obu|
00017a80  66 25 3a 72 35 25 3d 6f  62 75 66 73 25 0d 91 b4  |f%:r5%=obufs%...|
00017a90  1e 20 20 20 20 20 20 20  20 20 20 e7 72 33 25 3e  |.          .r3%>|
00017aa0  30 80 28 46 25 80 31 29  3d 30 8c 0d 91 be 11 20  |0.(F%.1)=0..... |
00017ab0  20 20 20 20 20 20 20 20  20 20 20 f5 0d 91 c8 35  |           ....5|
00017ac0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 72 30  |              r0|
00017ad0  25 3d 73 74 61 72 74 65  64 25 2d 32 2a 28 6c 65  |%=started%-2*(le|
00017ae0  66 74 25 3d 30 29 3a 73  74 61 72 74 65 64 25 3d  |ft%=0):started%=|
00017af0  31 0d 91 d2 5d 20 20 20  20 20 20 20 20 20 20 20  |1...]           |
00017b00  20 20 20 c8 99 22 58 53  71 75 61 73 68 5f 44 65  |   .."XSquash_De|
00017b10  63 6f 6d 70 72 65 73 73  22 2c 72 30 25 2c 77 73  |compress",r0%,ws|
00017b20  25 2c 72 32 25 2c 72 33  25 2c 6f 62 75 66 25 2c  |%,r2%,r3%,obuf%,|
00017b30  6f 62 75 66 73 25 b8 6f  6b 25 2c 2c 72 32 25 2c  |obufs%.ok%,,r2%,|
00017b40  72 33 25 2c 72 34 25 2c  72 35 25 3b 46 25 0d 91  |r3%,r4%,r5%;F%..|
00017b50  dc 42 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.B              |
00017b60  e7 28 46 25 80 31 29 3d  30 8c c8 99 22 58 4f 53  |.(F%.1)=0..."XOS|
00017b70  5f 47 42 50 42 22 2c 32  2c 66 32 25 2c 6f 62 75  |_GBPB",2,f2%,obu|
00017b80  66 25 2c 72 34 25 2d 6f  62 75 66 25 b8 3b 46 25  |f%,r4%-obuf%.;F%|
00017b90  0d 91 e6 1f 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00017ba0  fd 6f 6b 25 3c 32 84 28  46 25 80 31 29 3e 30 0d  |.ok%<2.(F%.1)>0.|
00017bb0  91 f0 2f 20 20 20 20 20  20 20 20 20 20 20 20 70  |../            p|
00017bc0  74 72 31 25 2d 3d 72 33  25 3a f4 20 72 65 77 69  |tr1%-=r3%:. rewi|
00017bd0  6e 64 20 75 6e 75 73 65  64 20 64 61 74 61 0d 91  |nd unused data..|
00017be0  fa 0f 20 20 20 20 20 20  20 20 20 20 cd 0d 92 04  |..          ....|
00017bf0  25 20 20 20 20 20 20 20  20 fd 28 6c 65 66 74 25  |%        .(left%|
00017c00  3e 30 80 6f 6b 25 3d 30  29 84 28 46 25 80 31 29  |>0.ok%=0).(F%.1)|
00017c10  3e 30 0d 92 0e 38 20 20  20 20 20 20 20 20 f2 63  |>0...8        .c|
00017c20  66 28 66 32 25 29 3a e7  28 46 25 80 31 29 3e 30  |f(f2%):.(F%.1)>0|
00017c30  8c 6f 6b 25 3d 31 3a f4  20 6e 6f 74 20 6f 6b 61  |.ok%=1:. not oka|
00017c40  79 20 69 66 20 65 72 72  6f 72 0d 92 18 32 20 20  |y if error...2  |
00017c50  20 20 20 20 20 20 6f 6b  25 3d 28 6f 6b 25 3d 30  |      ok%=(ok%=0|
00017c60  29 3a e7 a4 66 69 6c 65  73 69 7a 65 28 66 32 24  |):..filesize(f2$|
00017c70  29 3c 3e 64 73 25 8c 6f  6b 25 3d 30 0d 92 22 0b  |)<>ds%.ok%=0..".|
00017c80  20 20 20 20 20 20 cd 0d  92 2c 12 20 20 20 20 20  |      ...,.     |
00017c90  20 f2 63 66 28 66 31 25  29 0d 92 36 0f 20 20 20  | .cf(f1%)..6.   |
00017ca0  20 20 20 e7 6f 6b 25 8c  0d 92 40 2e 20 20 20 20  |   .ok%...@.    |
00017cb0  20 20 20 20 46 25 3d a4  64 65 6c 66 69 6c 65 28  |    F%=.delfile(|
00017cc0  66 24 29 3a 46 25 3d a4  72 65 6e 61 6d 65 28 66  |f$):F%=.rename(f|
00017cd0  32 24 2c 66 24 29 0d 92  4a 28 20 20 20 20 20 20  |2$,f$)..J(      |
00017ce0  20 20 c8 99 22 4f 53 5f  46 69 6c 65 22 2c 31 2c  |  .."OS_File",1,|
00017cf0  66 24 2c 6c 25 2c 65 25  2c 61 74 74 72 25 0d 92  |f$,l%,e%,attr%..|
00017d00  54 0b 20 20 20 20 20 20  cd 0d 92 5e 09 20 20 20  |T.      ...^.   |
00017d10  20 cd 0d 92 68 07 20 20  cd 0d 92 72 26 20 20 c8  | ...h.  ...r&  .|
00017d20  99 22 57 69 6d 70 5f 53  6c 6f 74 53 69 7a 65 22  |."Wimp_SlotSize"|
00017d30  2c 63 75 72 73 6c 6f 74  25 2c 2d 31 2c 2d 31 0d  |,curslot%,-1,-1.|
00017d40  92 7c 3f 20 20 e7 6f 6b  25 8c f2 73 65 74 74 79  |.|?  .ok%..setty|
00017d50  70 65 28 66 24 2c 26 46  46 46 29 3a f2 70 72 69  |pe(f$,&FFF):.pri|
00017d60  6e 74 28 22 22 2c a4 6d  73 67 30 28 22 43 6f 6d  |nt("",.msg0("Com|
00017d70  70 41 72 74 34 22 29 2c  22 22 2c 22 22 29 0d 92  |pArt4"),"","")..|
00017d80  86 05 cd 0d 92 90 1b f4  20 72 65 74 75 72 6e 20  |........ return |
00017d90  73 75 63 63 65 73 73 20  73 74 61 74 75 73 0d 92  |success status..|
00017da0  9a 08 3d 6f 6b 25 0d 92  a4 04 0d 92 ae 12 dd a4  |..=ok%..........|
00017db0  66 69 72 73 74 61 72 74  28 67 25 29 0d 92 b8 20  |firstart(g%)... |
00017dc0  ea 66 31 25 2c 72 65 62  75 69 6c 64 25 2c 70 24  |.f1%,rebuild%,p$|
00017dd0  2c 66 24 2c 73 25 2c 61  25 2c 46 25 0d 92 c2 0e  |,f$,s%,a%,F%....|
00017de0  72 65 62 75 69 6c 64 25  3d 30 0d 92 cc 28 e7 67  |rebuild%=0...(.g|
00017df0  72 70 66 25 28 67 25 29  3c 30 84 67 72 70 66 25  |rpf%(g%)<0.grpf%|
00017e00  28 67 25 29 3e 94 67 72  70 73 65 71 25 28 67 25  |(g%)>.grpseq%(g%|
00017e10  29 8c 0d 92 d6 32 20 20  67 72 70 66 25 28 67 25  |)....2  grpf%(g%|
00017e20  29 3d 30 3a 70 24 3d a4  6e 6f 74 6f 70 61 74 68  |)=0:p$=.notopath|
00017e30  28 67 25 29 3a 66 24 3d  70 24 2b 22 2e 7e 69 6e  |(g%):f$=p$+".~in|
00017e40  64 65 78 22 0d 92 e0 15  20 20 66 31 25 3d a4 6f  |dex"....  f1%=.o|
00017e50  70 65 6e 69 6e 28 66 24  29 0d 92 ea 0e 20 20 e7  |penin(f$)....  .|
00017e60  66 31 25 3c 3e 30 8c 0d  92 f4 2f 20 20 20 20 21  |f1%<>0..../    !|
00017e70  74 6d 70 25 3d 30 3a c8  99 22 58 4f 53 5f 47 42  |tmp%=0:.."XOS_GB|
00017e80  50 42 22 2c 33 2c 66 31  25 2c 74 6d 70 25 2c 38  |PB",3,f1%,tmp%,8|
00017e90  2c 30 b8 3b 46 25 0d 92  fe 21 20 20 20 20 e7 28  |,0.;F%...!    .(|
00017ea0  46 25 80 31 29 3d 30 8c  67 72 70 66 25 28 67 25  |F%.1)=0.grpf%(g%|
00017eb0  29 3d 21 74 6d 70 25 0d  93 08 34 20 20 20 20 f2  |)=!tmp%...4    .|
00017ec0  63 66 28 66 31 25 29 3a  e7 94 67 72 70 66 25 28  |cf(f1%):..grpf%(|
00017ed0  67 25 29 3e 94 67 72 70  73 65 71 25 28 67 25 29  |g%)>.grpseq%(g%)|
00017ee0  8c 72 65 62 75 69 6c 64  25 3d 31 0d 93 12 09 20  |.rebuild%=1.... |
00017ef0  20 20 20 cc 0d 93 1c 12  20 20 20 20 72 65 62 75  |   .....    rebu|
00017f00  69 6c 64 25 3d 31 0d 93  26 07 20 20 cd 0d 93 30  |ild%=1..&.  ...0|
00017f10  12 20 20 e7 72 65 62 75  69 6c 64 25 3e 30 8c 0d  |.  .rebuild%>0..|
00017f20  93 3a 64 20 20 20 20 e7  a4 6f 62 6a 74 79 70 65  |.:d    ..objtype|
00017f30  28 70 24 2b 22 2e 7e 78  2e 7e 78 2a 22 29 3e 31  |(p$+".~x.~x*")>1|
00017f40  8c f2 6d 65 73 73 61 67  65 31 28 22 49 72 65 62  |..message1("Ireb|
00017f50  75 69 6c 64 22 2c 67 72  70 24 28 67 25 29 2c 30  |uild",grp$(g%),0|
00017f60  29 3a f2 72 65 69 6e 64  65 78 28 67 72 70 24 28  |):.reindex(grp$(|
00017f70  67 25 29 29 3a f2 6d 65  73 73 61 67 65 28 22 22  |g%)):.message(""|
00017f80  2c 30 29 0d 93 44 07 20  20 cd 0d 93 4e 33 20 20  |,0)..D.  ...N3  |
00017f90  f4 20 6e 6f 77 20 65 73  74 69 6d 61 74 65 20 6e  |. now estimate n|
00017fa0  75 6d 62 65 72 20 6f 66  20 61 72 74 69 63 6c 65  |umber of article|
00017fb0  73 20 69 6e 20 67 72 6f  75 70 2e 2e 2e 0d 93 58  |s in group.....X|
00017fc0  3b 20 20 c8 99 22 58 4f  53 5f 46 69 6c 65 22 2c  |;  .."XOS_File",|
00017fd0  31 37 2c 66 24 b8 2c 2c  2c 2c 73 25 3b 46 25 3a  |17,f$.,,,,s%;F%:|
00017fe0  e7 28 46 25 80 31 29 3d  30 8c 73 25 3d 73 25 81  |.(F%.1)=0.s%=s%.|
00017ff0  32 30 30 8b 73 25 3d 30  0d 93 62 34 20 20 61 25  |200.s%=0..b4  a%|
00018000  3d 30 3a e7 67 72 70 66  25 28 67 25 29 3e 30 8c  |=0:.grpf%(g%)>0.|
00018010  61 25 3d 94 67 72 70 73  65 71 25 28 6c 31 25 29  |a%=.grpseq%(l1%)|
00018020  2d 67 72 70 66 25 28 67  25 29 2b 31 0d 93 6c 12  |-grpf%(g%)+1..l.|
00018030  20 20 e7 73 25 3c 61 25  8c 61 25 3d 73 25 0d 93  |  .s%<a%.a%=s%..|
00018040  76 12 20 20 67 72 70 61  25 28 67 25 29 3d 61 25  |v.  grpa%(g%)=a%|
00018050  0d 93 80 05 cd 0d 93 8a  0f 3d 94 67 72 70 66 25  |.........=.grpf%|
00018060  28 67 25 29 0d 93 94 04  0d 93 9e 20 dd a4 63 68  |(g%)....... ..ch|
00018070  65 63 6b 6d 6f 64 65 72  61 74 69 6f 6e 28 67 24  |eckmoderation(g$|
00018080  2c 66 6f 72 63 65 25 29  0d 93 a8 2a ea 67 31 24  |,force%)...*.g1$|
00018090  2c 6c 24 2c 6d 24 2c 6d  67 24 2c 6f 75 74 24 2c  |,l$,m$,mg$,out$,|
000180a0  6c 25 2c 66 25 3a 66 25  3d 30 3a 6f 75 74 24 3d  |l%,f%:f%=0:out$=|
000180b0  22 22 0d 93 b2 2f f4 20  66 6f 72 63 65 25 20 66  |"".../. force% f|
000180c0  6f 72 63 65 73 20 63 68  65 63 6b 20 69 6e 20 74  |orces check in t|
000180d0  68 65 20 61 63 74 75 61  6c 20 66 69 6c 65 2e 2e  |he actual file..|
000180e0  2e 0d 93 bc 2e f4 20 66  69 72 73 74 20 63 68 65  |...... first che|
000180f0  63 6b 20 69 6e 74 65 72  6e 61 6c 20 6c 69 73 74  |ck internal list|
00018100  2c 20 69 66 20 6e 6f 74  20 66 6f 72 63 65 25 0d  |, if not force%.|
00018110  93 c6 30 67 24 3d a4 6c  6f 77 65 72 28 67 24 29  |..0g$=.lower(g$)|
00018120  3a f2 70 72 69 6e 74 28  22 22 2c a4 6d 73 67 30  |:.print("",.msg0|
00018130  28 22 42 6d 6f 64 22 29  2c 67 24 2c 22 22 29 0d  |("Bmod"),g$,"").|
00018140  93 d0 34 e7 66 6f 72 63  65 25 3d 31 80 a7 67 24  |..4.force%=1..g$|
00018150  2c 22 2c 22 29 3d 30 8c  3a 3d a4 66 61 73 74 63  |,",")=0.:=.fastc|
00018160  68 65 63 6b 6d 6f 64 28  a4 63 6c 65 61 6e 28 67  |heckmod(.clean(g|
00018170  24 29 29 0d 93 da 0e e7  66 6f 72 63 65 25 3d 30  |$)).....force%=0|
00018180  8c 0d 93 e4 20 20 20 6c  24 3d 67 24 3a f5 67 31  |....   l$=g$:.g1|
00018190  24 3d a4 67 65 74 70 61  72 28 6c 24 2c 22 2c 22  |$=.getpar(l$,","|
000181a0  29 0d 93 ee 47 20 20 20  20 e7 67 31 24 3e 22 22  |)...G    .g1$>""|
000181b0  8c 6c 25 3d a4 6e 61 6d  65 74 6f 6e 6f 28 67 31  |.l%=.nametono(g1|
000181c0  24 2c 30 29 3a e7 6c 25  3e 30 8c 66 25 3d 31 3a  |$,0):.l%>0.f%=1:|
000181d0  e7 67 72 70 6d 6f 64 25  28 6c 25 29 3c 3e 30 20  |.grpmod%(l%)<>0 |
000181e0  6f 75 74 24 3d 67 31 24  0d 93 f8 14 20 20 fd 6c  |out$=g1$....  .l|
000181f0  24 3d 22 22 84 6f 75 74  24 3e 22 22 0d 94 02 05  |$="".out$>""....|
00018200  cd 0d 94 0c 1e f4 20 6f  74 68 65 72 77 69 73 65  |...... otherwise|
00018210  20 63 68 65 63 6b 20 74  68 65 20 66 69 6c 65 0d  | check the file.|
00018220  94 16 18 e7 6f 75 74 24  3d 22 22 84 a7 67 24 2c  |....out$=""..g$,|
00018230  22 2c 22 29 3e 30 8c 0d  94 20 28 20 20 66 33 25  |",")>0... (  f3%|
00018240  3d a4 6f 70 65 6e 69 6e  28 73 75 70 70 6f 72 74  |=.openin(support|
00018250  24 2b 22 2e 6d 6f 64 67  72 6f 75 70 73 22 29 0d  |$+".modgroups").|
00018260  94 2a 0d 20 20 e7 66 33  25 3e 30 8c 0d 94 34 11  |.*.  .f3%>0...4.|
00018270  20 20 20 20 f5 6d 24 3d  be 23 66 33 25 0d 94 3e  |    .m$=.#f3%..>|
00018280  11 20 20 20 20 20 20 6c  24 3d 67 24 3a f5 0d 94  |.      l$=g$:...|
00018290  48 27 20 20 20 20 20 20  20 20 67 31 24 3d a4 63  |H'        g1$=.c|
000182a0  6c 65 61 6e 28 a4 67 65  74 70 61 72 28 6c 24 2c  |lean(.getpar(l$,|
000182b0  22 2c 22 29 29 0d 94 52  2e 20 20 20 20 20 20 20  |","))..R.       |
000182c0  20 e7 67 31 24 3e 22 22  80 a4 73 6d 61 74 63 68  | .g1$>""..smatch|
000182d0  28 6d 24 2c 67 31 24 29  3e 30 8c 6f 75 74 24 3d  |(m$,g1$)>0.out$=|
000182e0  67 31 24 0d 94 5c 28 20  20 20 20 20 20 fd 6c 24  |g1$..\(      .l$|
000182f0  3d 22 22 84 6f 75 74 24  3e 22 22 3a f2 70 6f 6c  |="".out$>"":.pol|
00018300  6c 28 73 6c 69 63 65 25  2a 34 29 0d 94 66 16 20  |l(slice%*4)..f. |
00018310  20 20 20 fd c5 23 66 33  25 84 6f 75 74 24 3e 22  |   ..#f3%.out$>"|
00018320  22 0d 94 70 10 20 20 20  20 f2 63 66 28 66 33 25  |"..p.    .cf(f3%|
00018330  29 0d 94 7a 07 20 20 cd  0d 94 84 05 cd 0d 94 8e  |)..z.  .........|
00018340  09 3d 6f 75 74 24 0d 94  98 04 0d 94 a2 16 dd a4  |.=out$..........|
00018350  66 61 73 74 63 68 65 63  6b 6d 6f 64 28 67 24 29  |fastcheckmod(g$)|
00018360  0d 94 ac 23 f4 49 46 4c  45 46 54 24 28 67 24 2c  |...#.IFLEFT$(g$,|
00018370  36 29 3d 22 63 6c 61 72  69 2e 22 54 48 45 4e 3a  |6)="clari."THEN:|
00018380  3d 67 24 0d 94 b6 26 66  33 25 3d a4 6f 70 65 6e  |=g$...&f3%=.open|
00018390  69 6e 28 73 75 70 70 6f  72 74 24 2b 22 2e 6d 6f  |in(support$+".mo|
000183a0  64 67 72 6f 75 70 73 22  29 0d 94 c0 0b e7 66 33  |dgroups").....f3|
000183b0  25 3e 30 8c 0d 94 ca 0d  20 20 6f 75 74 24 3d 22  |%>0.....  out$="|
000183c0  22 0d 94 d4 0f 20 20 f5  6d 24 3d be 23 66 33 25  |"....  .m$=.#f3%|
000183d0  0d 94 de 21 20 20 20 20  e7 a4 73 6d 61 74 63 68  |...!    ..smatch|
000183e0  28 6d 24 2c 67 24 29 3e  30 8c 6f 75 74 24 3d 67  |(m$,g$)>0.out$=g|
000183f0  24 0d 94 e8 14 20 20 fd  c5 23 66 33 25 84 6f 75  |$....  ..#f3%.ou|
00018400  74 24 3e 22 22 0d 94 f2  0e 20 20 f2 63 66 28 66  |t$>""....  .cf(f|
00018410  33 25 29 0d 94 fc 05 cd  0d 95 06 09 3d 6f 75 74  |3%).........=out|
00018420  24 0d 95 10 04 0d 95 1a  16 dd f2 61 64 64 64 65  |$..........addde|
00018430  6c 62 75 66 28 67 25 2c  6e 25 29 0d 95 24 09 e7  |lbuf(g%,n%)..$..|
00018440  72 77 25 8c 0d 95 2e 42  20 20 e7 64 65 6c 62 75  |rw%....B  .delbu|
00018450  66 70 74 72 25 2b 34 3e  64 65 6c 62 75 66 73 69  |fptr%+4>delbufsi|
00018460  7a 65 25 84 67 25 3c 3e  64 65 6c 62 75 66 67 25  |ze%.g%<>delbufg%|
00018470  8c f2 64 6f 64 65 6c 69  6e 64 65 78 28 64 65 6c  |..dodelindex(del|
00018480  62 75 66 67 25 29 0d 95  38 0d 20 20 e7 67 25 3e  |bufg%)..8.  .g%>|
00018490  30 20 8c 0d 95 42 37 20  20 20 20 64 65 6c 62 75  |0 ...B7    delbu|
000184a0  66 25 21 64 65 6c 62 75  66 70 74 72 25 3d 6e 25  |f%!delbufptr%=n%|
000184b0  3a 64 65 6c 62 75 66 70  74 72 25 2b 3d 34 3a 64  |:delbufptr%+=4:d|
000184c0  65 6c 62 75 66 67 25 3d  67 25 0d 95 4c 21 20 20  |elbufg%=g%..L!  |
000184d0  20 20 e7 67 72 70 61 25  28 67 25 29 3e 30 8c 67  |  .grpa%(g%)>0.g|
000184e0  72 70 61 25 28 67 25 29  2d 3d 31 0d 95 56 07 20  |rpa%(g%)-=1..V. |
000184f0  20 cd 0d 95 60 05 cd 0d  95 6a 05 e1 0d 95 74 04  | ...`....j....t.|
00018500  0d 95 7e 14 dd f2 64 6f  64 65 6c 69 6e 64 65 78  |..~...dodelindex|
00018510  28 67 25 29 0d 95 88 39  ea 46 24 2c 54 24 2c 46  |(g%)...9.F$,T$,F|
00018520  25 2c 70 31 25 2c 70 32  25 2c 72 33 25 2c 61 64  |%,p1%,p2%,r3%,ad|
00018530  64 72 25 2c 73 31 25 2c  6c 25 2c 64 62 75 66 25  |dr%,s1%,l%,dbuf%|
00018540  2c 61 72 74 6e 6f 25 2c  66 6c 61 67 25 0d 95 92  |,artno%,flag%...|
00018550  18 ea 63 75 72 73 6c 6f  74 25 2c 66 25 2c 69 62  |..curslot%,f%,ib|
00018560  73 69 7a 65 25 0d 95 9c  20 e7 64 65 6c 62 75 66  |size%... .delbuf|
00018570  70 74 72 25 3d 30 20 84  67 25 3d 30 20 84 72 77  |ptr%=0 .g%=0 .rw|
00018580  25 3d 30 8c e1 0d 95 a6  13 e7 64 65 6c 62 75 66  |%=0.......delbuf|
00018590  70 74 72 25 3e 30 20 8c  0d 95 b0 1a 20 20 64 65  |ptr%>0 .....  de|
000185a0  6c 62 75 66 25 21 64 65  6c 62 75 66 70 74 72 25  |lbuf%!delbufptr%|
000185b0  3d 30 0d 95 ba 32 20 20  f2 70 72 69 6e 74 28 22  |=0...2  .print("|
000185c0  22 2c a4 6d 73 67 30 28  22 49 75 70 64 61 74 65  |",.msg0("Iupdate|
000185d0  22 29 2c 22 22 2c 22 22  29 3a f2 63 68 65 63 6b  |"),"",""):.check|
000185e0  64 69 73 6b 0d 95 c4 39  20 20 46 24 3d a4 69 66  |disk...9  F$=.if|
000185f0  69 6c 65 28 67 25 29 3a  54 24 3d 62 61 73 65 64  |ile(g%):T$=based|
00018600  69 72 24 2b 22 2e 7e 69  6e 64 65 78 22 3a 46 25  |ir$+".~index":F%|
00018610  3d a4 64 65 6c 66 69 6c  65 28 54 24 29 0d 95 ce  |=.delfile(T$)...|
00018620  2a 20 20 c8 99 22 57 69  6d 70 5f 53 6c 6f 74 53  |*  .."Wimp_SlotS|
00018630  69 7a 65 22 2c 2d 31 2c  2d 31 b8 63 75 72 73 6c  |ize",-1,-1.cursl|
00018640  6f 74 25 2c 2c 66 25 0d  95 d8 3a 20 20 69 62 73  |ot%,,f%...:  ibs|
00018650  69 7a 65 25 3d 28 66 25  81 32 30 30 29 2a 32 30  |ize%=(f%.200)*20|
00018660  30 3a e7 69 62 73 69 7a  65 25 3e 26 31 39 30 30  |0:.ibsize%>&1900|
00018670  30 20 8c 69 62 73 69 7a  65 25 3d 26 31 39 30 30  |0 .ibsize%=&1900|
00018680  30 0d 95 e2 43 20 20 c8  99 22 57 69 6d 70 5f 53  |0...C  .."Wimp_S|
00018690  6c 6f 74 53 69 7a 65 22  2c 63 75 72 73 6c 6f 74  |lotSize",curslot|
000186a0  25 2b 69 62 73 69 7a 65  25 2c 2d 31 b8 6c 25 3a  |%+ibsize%,-1.l%:|
000186b0  64 62 75 66 25 3d 63 75  72 73 6c 6f 74 25 2b 26  |dbuf%=curslot%+&|
000186c0  38 30 30 30 0d 95 ec 1b  20 20 e7 6c 25 3c 63 75  |8000....  .l%<cu|
000186d0  72 73 6c 6f 74 25 2b 69  62 73 69 7a 65 25 8c 0d  |rslot%+ibsize%..|
000186e0  95 f6 1e 20 20 20 20 f2  6d 65 73 73 61 67 65 30  |...    .message0|
000186f0  28 22 49 62 75 66 66 65  72 22 2c 31 29 0d 96 00  |("Ibuffer",1)...|
00018700  09 20 20 20 20 cc 0d 96  0a 17 20 20 20 20 66 31  |.    .....    f1|
00018710  25 3d a4 6f 70 65 6e 69  6e 28 46 24 29 0d 96 14  |%=.openin(F$)...|
00018720  0f 20 20 20 20 e7 66 31  25 3d 30 8c 0d 96 1e 21  |.    .f1%=0....!|
00018730  20 20 20 20 20 20 f2 6d  65 73 73 61 67 65 31 28  |      .message1(|
00018740  22 49 6f 70 65 6e 22 2c  46 24 2c 31 29 0d 96 28  |"Iopen",F$,1)..(|
00018750  0b 20 20 20 20 20 20 cc  0d 96 32 1a 20 20 20 20  |.      ...2.    |
00018760  20 20 66 32 25 3d a4 6f  70 65 6e 6f 75 74 28 54  |  f2%=.openout(T|
00018770  24 29 0d 96 3c 11 20 20  20 20 20 20 e7 66 32 25  |$)..<.      .f2%|
00018780  3d 30 8c 0d 96 46 28 20  20 20 20 20 20 20 20 f2  |=0...F(        .|
00018790  63 66 28 66 31 25 29 3a  f2 6d 65 73 73 61 67 65  |cf(f1%):.message|
000187a0  30 28 22 49 74 6d 70 22  2c 31 29 0d 96 50 0d 20  |0("Itmp",1)..P. |
000187b0  20 20 20 20 20 20 20 cc  0d 96 5a 32 20 20 20 20  |       ...Z2    |
000187c0  20 20 20 20 46 25 3d 30  3a 70 31 25 3d 30 3a 70  |    F%=0:p1%=0:p|
000187d0  32 25 3d 30 3a 72 33 25  3d 30 3a 73 31 25 3d a2  |2%=0:r3%=0:s1%=.|
000187e0  23 66 31 25 3a f2 68 67  6f 6e 0d 96 64 1c 20 20  |#f1%:.hgon..d.  |
000187f0  20 20 20 20 20 20 c8 95  72 33 25 3d 30 80 28 46  |      ..r3%=0.(F|
00018800  25 80 31 29 3d 30 0d 96  6e 49 20 20 20 20 20 20  |%.1)=0..nI      |
00018810  20 20 20 20 21 64 62 75  66 25 3d 30 3a c8 99 22  |    !dbuf%=0:.."|
00018820  58 4f 53 5f 47 42 50 42  22 2c 33 2c 66 31 25 2c  |XOS_GBPB",3,f1%,|
00018830  64 62 75 66 25 2c 69 62  73 69 7a 65 25 2c 70 31  |dbuf%,ibsize%,p1|
00018840  25 b8 2c 2c 2c 72 33 25  2c 70 31 25 3b 46 25 0d  |%.,,,r3%,p1%;F%.|
00018850  96 78 24 20 20 20 20 20  20 20 20 20 20 e7 72 33  |.x$          .r3|
00018860  25 3c 69 62 73 69 7a 65  25 80 28 46 25 80 31 29  |%<ibsize%.(F%.1)|
00018870  3d 30 8c 0d 96 82 19 20  20 20 20 20 20 20 20 20  |=0.....         |
00018880  20 61 64 64 72 25 3d 64  62 75 66 25 0d 96 8c 25  | addr%=dbuf%...%|
00018890  20 20 20 20 20 20 20 20  20 20 e3 6c 25 3d 31 b8  |          .l%=1.|
000188a0  28 69 62 73 69 7a 65 25  2d 72 33 25 29 81 32 30  |(ibsize%-r3%).20|
000188b0  30 0d 96 96 46 20 20 20  20 20 20 20 20 20 20 20  |0...F           |
000188c0  20 61 72 74 6e 6f 25 3d  21 61 64 64 72 25 3a 66  | artno%=!addr%:f|
000188d0  6c 61 67 25 3d 30 3a d6  63 68 6b 64 65 6c 61 72  |lag%=0:.chkdelar|
000188e0  74 25 2c 61 72 74 6e 6f  25 2c 64 65 6c 62 75 66  |t%,artno%,delbuf|
000188f0  25 2c 66 6c 61 67 25 0d  96 a0 49 20 20 20 20 20  |%,flag%...I     |
00018900  20 20 20 20 20 20 20 e7  66 6c 61 67 25 3d 30 80  |       .flag%=0.|
00018910  21 61 64 64 72 25 3e 30  8c c8 99 22 4f 53 5f 47  |!addr%>0..."OS_G|
00018920  42 50 42 22 2c 31 2c 66  32 25 2c 61 64 64 72 25  |BPB",1,f2%,addr%|
00018930  2c 32 30 30 2c 70 32 25  b8 2c 2c 2c 2c 70 32 25  |,200,p2%.,,,,p2%|
00018940  0d 96 aa 1a 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00018950  61 64 64 72 25 2b 3d 32  30 30 0d 96 b4 53 20 20  |addr%+=200...S  |
00018960  20 20 20 20 20 20 20 20  20 20 e7 6c 25 83 31 30  |          .l%.10|
00018970  3d 30 80 73 31 25 3e 30  8c c8 99 22 48 6f 75 72  |=0.s1%>0..."Hour|
00018980  67 6c 61 73 73 5f 50 65  72 63 65 6e 74 61 67 65  |glass_Percentage|
00018990  22 2c 28 28 70 31 25 2b  61 64 64 72 25 2d 64 62  |",((p1%+addr%-db|
000189a0  75 66 25 29 2a 31 30 30  29 81 73 31 25 0d 96 be  |uf%)*100).s1%...|
000189b0  11 20 20 20 20 20 20 20  20 20 20 ed 6c 25 0d 96  |.          .l%..|
000189c0  c8 0f 20 20 20 20 20 20  20 20 20 20 cd 0d 96 d2  |..          ....|
000189d0  0d 20 20 20 20 20 20 20  20 ce 0d 96 dc 24 20 20  |.        ....$  |
000189e0  20 20 20 20 20 20 f2 68  67 6f 66 66 3a f2 63 66  |      .hgoff:.cf|
000189f0  28 66 31 25 29 3a f2 63  66 28 66 32 25 29 0d 96  |(f1%):.cf(f2%)..|
00018a00  e6 18 20 20 20 20 20 20  20 20 67 72 70 66 25 28  |..        grpf%(|
00018a10  67 25 29 3d 2d 31 0d 96  f0 2f 20 20 20 20 20 20  |g%)=-1.../      |
00018a20  20 20 46 25 3d a4 64 65  6c 66 69 6c 65 28 46 24  |  F%=.delfile(F$|
00018a30  29 3a 46 25 3d a4 6d 6f  76 65 66 69 6c 65 28 54  |):F%=.movefile(T|
00018a40  24 2c 46 24 29 0d 96 fa  18 20 20 20 20 20 20 20  |$,F$)....       |
00018a50  20 64 65 6c 62 75 66 70  74 72 25 3d 30 0d 97 04  | delbufptr%=0...|
00018a60  0b 20 20 20 20 20 20 cd  0d 97 0e 09 20 20 20 20  |.      .....    |
00018a70  cd 0d 97 18 07 20 20 cd  0d 97 22 23 20 20 c8 99  |.....  ..."#  ..|
00018a80  22 57 69 6d 70 5f 53 6c  6f 74 53 69 7a 65 22 2c  |"Wimp_SlotSize",|
00018a90  63 75 72 73 6c 6f 74 25  2c 2d 31 0d 97 2c 05 cd  |curslot%,-1..,..|
00018aa0  0d 97 36 05 e1 0d 97 40  04 0d 97 4a 17 dd f2 65  |..6....@...J...e|
00018ab0  78 70 67 72 6f 75 70 28  67 24 2c 70 74 6f 25 29  |xpgroup(g$,pto%)|
00018ac0  0d 97 54 0e ea 6c 31 25  3a 6c 31 25 3d 30 0d 97  |..T..l1%:l1%=0..|
00018ad0  5e 0b f5 6c 31 25 2b 3d  31 0d 97 68 38 20 20 e7  |^..l1%+=1..h8  .|
00018ae0  a4 73 6d 61 74 63 68 28  67 24 2c 67 72 70 24 28  |.smatch(g$,grp$(|
00018af0  6c 31 25 29 29 3c 3e 30  8c f2 65 78 70 69 72 65  |l1%))<>0..expire|
00018b00  67 72 6f 75 70 28 6c 31  25 2c 70 74 6f 25 2c 31  |group(l1%,pto%,1|
00018b10  29 0d 97 72 1a 20 20 e7  63 61 6e 63 65 6c 25 80  |)..r.  .cancel%.|
00018b20  a7 67 24 2c 22 2a 22 29  3e 30 8c 0d 97 7c 3d 20  |.g$,"*")>0...|= |
00018b30  20 20 20 e7 a4 63 6f 6e  66 69 72 6d 28 a4 6d 73  |   ..confirm(.ms|
00018b40  67 31 28 22 43 63 61 6e  63 65 78 70 22 2c 67 24  |g1("Ccancexp",g$|
00018b50  29 29 3d 32 8c 63 61 6e  63 65 6c 25 3d 30 8b 63  |))=2.cancel%=0.c|
00018b60  61 6e 63 65 6c 25 3d b9  0d 97 86 07 20 20 cd 0d  |ancel%=.....  ..|
00018b70  97 90 1b fd 6c 31 25 3d  67 72 6f 75 70 73 25 84  |....l1%=groups%.|
00018b80  63 61 6e 63 65 6c 25 3c  3e 30 0d 97 9a 05 e1 0d  |cancel%<>0......|
00018b90  97 a4 04 0d 97 ae 11 dd  f2 72 65 69 6e 64 65 78  |.........reindex|
00018ba0  28 67 24 29 0d 97 b8 10  ea 77 25 2c 6c 31 25 3a  |(g$).....w%,l1%:|
00018bb0  77 25 3d 30 0d 97 c2 1d  e7 72 77 25 80 a4 62 75  |w%=0.....rw%..bu|
00018bc0  73 79 6f 6e 28 22 42 69  6e 64 65 78 22 29 3d 30  |syon("Bindex")=0|
00018bd0  8c 0d 97 cc 26 20 20 f2  6c 6f 67 28 22 52 65 62  |....&  .log("Reb|
00018be0  75 69 6c 64 69 6e 67 20  69 6e 64 65 78 20 66 6f  |uilding index fo|
00018bf0  72 20 22 2b 67 24 29 0d  97 d6 14 20 20 e3 6c 31  |r "+g$)....  .l1|
00018c00  25 3d 31 b8 67 72 6f 75  70 73 25 0d 97 e0 30 20  |%=1.groups%...0 |
00018c10  20 20 20 e7 a4 73 6d 61  74 63 68 28 67 24 2c 67  |   ..smatch(g$,g|
00018c20  72 70 24 28 6c 31 25 29  29 3c 3e 30 8c f2 67 65  |rp$(l1%))<>0..ge|
00018c30  6e 69 6e 64 65 78 28 6c  31 25 29 0d 97 ea 0a 20  |nindex(l1%).... |
00018c40  20 ed 6c 31 25 0d 97 f4  0e 20 20 f2 62 75 73 79  | .l1%....  .busy|
00018c50  6f 66 66 0d 97 fe 05 cd  0d 98 08 05 e1 0d 98 12  |off.............|
00018c60  04 0d 98 1c 13 dd f2 67  65 6e 69 6e 64 65 78 28  |.......genindex(|
00018c70  6e 67 25 29 0d 98 26 4b  ea 61 43 25 2c 66 24 2c  |ng%)..&K.aC%,f$,|
00018c80  41 24 2c 70 24 2c 61 25  2c 6c 6f 63 25 2c 6e 6f  |A$,p$,a%,loc%,no|
00018c90  62 75 66 25 2c 6e 6f 62  75 66 73 69 7a 65 25 2c  |buf%,nobufsize%,|
00018ca0  6e 6f 62 75 66 70 74 72  25 2c 6e 62 72 25 2c 70  |nobufptr%,nbr%,p|
00018cb0  63 25 2c 6c 70 63 25 3a  6c 70 63 25 3d 2d 31 0d  |c%,lpc%:lpc%=-1.|
00018cc0  98 30 1b e7 a4 61 63 74  69 76 65 28 67 72 70 24  |.0...active(grp$|
00018cd0  28 6e 67 25 29 29 3d 30  20 e1 0d 98 3a 1e f2 63  |(ng%))=0 ...:..c|
00018ce0  68 65 63 6b 64 69 73 6b  3a f2 61 64 64 64 65 6c  |heckdisk:.adddel|
00018cf0  62 75 66 28 30 2c 30 29  0d 98 44 3d 6e 6f 62 75  |buf(0,0)..D=nobu|
00018d00  66 73 69 7a 65 25 3d 31  32 2a 31 30 32 34 3a 6e  |fsize%=12*1024:n|
00018d10  62 72 25 3d a4 63 6c 61  69 6d 28 6e 6f 62 75 66  |br%=.claim(nobuf|
00018d20  25 2c 6e 6f 62 75 66 73  69 7a 65 25 2c 22 69 6e  |%,nobufsize%,"in|
00018d30  64 65 78 22 29 0d 98 4e  25 e7 6e 62 72 25 3d 30  |dex")..N%.nbr%=0|
00018d40  8c f2 6d 65 73 73 61 67  65 30 28 22 47 72 65 69  |..message0("Grei|
00018d50  6e 64 65 78 22 2c 30 29  3a e1 0d 98 58 3d 6e 6f  |ndex",0):...X=no|
00018d60  62 75 66 70 74 72 25 3d  30 3a 70 24 3d a4 70 61  |bufptr%=0:p$=.pa|
00018d70  74 68 28 67 72 70 24 28  6e 67 25 29 29 3a 46 25  |th(grp$(ng%)):F%|
00018d80  3d a4 64 65 6c 66 69 6c  65 28 70 24 2b 22 2e 7e  |=.delfile(p$+".~|
00018d90  69 6e 64 65 78 22 29 0d  98 62 3c f2 70 72 69 6e  |index")..b<.prin|
00018da0  74 28 a4 6d 73 67 30 28  22 49 62 75 69 6c 64 22  |t(.msg0("Ibuild"|
00018db0  29 2c a4 6d 73 67 31 28  22 47 6c 61 73 74 22 2c  |),.msg1("Glast",|
00018dc0  67 72 70 24 28 6e 67 25  29 29 2c 22 20 22 2c 22  |grp$(ng%))," ","|
00018dd0  20 22 29 0d 98 6c 1d 66  24 3d a4 6e 6f 74 6f 70  | ")..l.f$=.notop|
00018de0  61 74 68 28 67 25 29 22  2e 7e 69 6e 64 65 78 22  |ath(g%)".~index"|
00018df0  0d 98 76 2b 46 25 3d a4  64 65 6c 66 69 6c 65 28  |..v+F%=.delfile(|
00018e00  66 24 29 3a c8 99 22 58  4f 53 5f 46 69 6c 65 22  |f$):.."XOS_File"|
00018e10  2c 31 31 2c 66 24 2c 26  46 46 44 0d 98 80 18 f2  |,11,f$,&FFD.....|
00018e20  67 65 6e 69 6e 64 65 78  64 69 72 28 70 24 2c 6e  |genindexdir(p$,n|
00018e30  67 25 29 0d 98 8a 28 c8  99 22 4f 53 5f 48 65 61  |g%)...(.."OS_Hea|
00018e40  70 53 6f 72 74 22 2c 6e  6f 62 75 66 70 74 72 25  |pSort",nobufptr%|
00018e50  81 34 2c 6e 6f 62 75 66  25 2c 31 0d 98 94 12 e7  |.4,nobuf%,1.....|
00018e60  6e 6f 62 75 66 70 74 72  25 3e 34 20 8c 0d 98 9e  |nobufptr%>4 ....|
00018e70  18 20 20 67 72 70 66 25  28 6e 67 25 29 3d 21 6e  |.  grpf%(ng%)=!n|
00018e80  6f 62 75 66 25 0d 98 a8  2a 20 20 67 72 70 73 65  |obuf%...*  grpse|
00018e90  71 25 28 6e 67 25 29 3d  94 28 6e 6f 62 75 66 25  |q%(ng%)=.(nobuf%|
00018ea0  21 28 6e 6f 62 75 66 70  74 72 25 2d 34 29 29 0d  |!(nobufptr%-4)).|
00018eb0  98 b2 1c 20 20 67 72 70  61 25 28 6e 67 25 29 3d  |...  grpa%(ng%)=|
00018ec0  6e 6f 62 75 66 70 74 72  25 81 34 0d 98 bc 07 20  |nobufptr%.4.... |
00018ed0  20 cc 0d 98 c6 1f 20 20  67 72 70 66 25 28 6e 67  | .....  grpf%(ng|
00018ee0  25 29 3d 30 3a 67 72 70  61 25 28 6e 67 25 29 3d  |%)=0:grpa%(ng%)=|
00018ef0  30 0d 98 d0 05 cd 0d 98  da 09 70 63 25 3d 30 0d  |0.........pc%=0.|
00018f00  98 e4 1b e3 6c 6f 63 25  3d 30 b8 28 6e 6f 62 75  |....loc%=0.(nobu|
00018f10  66 70 74 72 25 2d 34 29  88 34 0d 98 ee 2c 20 20  |fptr%-4).4...,  |
00018f20  e7 6e 6f 62 75 66 70 74  72 25 3e 30 20 8c 70 63  |.nobufptr%>0 .pc|
00018f30  25 3d 28 6c 6f 63 25 2a  31 30 30 29 81 6e 6f 62  |%=(loc%*100).nob|
00018f40  75 66 70 74 72 25 0d 98  f8 7d 20 20 e7 70 63 25  |ufptr%...}  .pc%|
00018f50  3c 3e 6c 70 63 25 8c f2  70 72 69 6e 74 28 22 22  |<>lpc%..print(""|
00018f60  2c a4 6d 73 67 30 28 22  49 72 65 61 64 22 29 2c  |,.msg0("Iread"),|
00018f70  a4 6d 73 67 33 28 22 49  64 6f 6e 65 22 2c c3 28  |.msg3("Idone",.(|
00018f80  6c 6f 63 25 81 34 29 2c  c3 28 6e 6f 62 75 66 70  |loc%.4),.(nobufp|
00018f90  74 72 25 81 34 29 2c c3  70 63 25 29 2c 22 22 29  |tr%.4),.pc%),"")|
00018fa0  3a f2 67 61 63 74 28 a4  6d 73 67 31 28 22 49 70  |:.gact(.msg1("Ip|
00018fb0  65 72 22 2c c3 70 63 25  29 29 3a 6c 70 63 25 3d  |er",.pc%)):lpc%=|
00018fc0  70 63 25 0d 99 02 14 20  20 61 25 3d 6e 6f 62 75  |pc%....  a%=nobu|
00018fd0  66 25 21 6c 6f 63 25 0d  99 0c 1c 20 20 66 24 3d  |f%!loc%....  f$=|
00018fe0  a4 66 69 6e 64 66 69 6c  65 28 6e 67 25 2c 61 25  |.findfile(ng%,a%|
00018ff0  2c a3 29 0d 99 16 25 20  20 e7 66 24 3e 22 22 f2  |,.)...%  .f$>"".|
00019000  70 72 6f 63 65 73 73 68  65 61 64 65 72 28 66 24  |processheader(f$|
00019010  2c 6e 67 25 2c 61 25 29  0d 99 20 15 20 20 f2 70  |,ng%,a%).. .  .p|
00019020  6f 6c 6c 28 73 6c 69 63  65 25 2a 32 29 0d 99 2a  |oll(slice%*2)..*|
00019030  09 ed 6c 6f 63 25 0d 99  34 21 f2 72 65 6c 65 61  |..loc%..4!.relea|
00019040  73 65 28 6e 62 72 25 29  3a f2 77 72 69 74 65 69  |se(nbr%):.writei|
00019050  6e 64 65 78 62 75 66 0d  99 3e 2f f2 67 61 63 74  |ndexbuf..>/.gact|
00019060  28 22 22 29 3a f2 70 72  69 6e 74 28 a4 6d 73 67  |(""):.print(.msg|
00019070  30 28 22 44 6f 6e 65 22  29 2c 22 20 22 2c 22 20  |0("Done")," "," |
00019080  22 2c 22 20 22 29 0d 99  48 05 e1 0d 99 52 04 0d  |"," ")..H....R..|
00019090  99 5c 1e dd f2 70 72 6f  63 65 73 73 68 65 61 64  |.\...processhead|
000190a0  65 72 28 66 24 2c 6e 67  25 2c 61 25 29 0d 99 66  |er(f$,ng%,a%)..f|
000190b0  1b e7 a4 67 65 74 68 65  61 64 65 72 69 6e 66 6f  |...getheaderinfo|
000190c0  28 66 24 29 3c 3e 30 8c  0d 99 70 37 20 20 e7 a4  |(f$)<>0...p7  ..|
000190d0  73 70 65 63 69 61 6c 67  72 70 28 67 72 70 24 28  |specialgrp(grp$(|
000190e0  6e 67 25 29 29 80 a7 67  72 70 24 28 6e 67 25 29  |ng%))..grp$(ng%)|
000190f0  2c 22 6f 75 74 67 6f 69  6e 67 22 29 3e 30 8c 0d  |,"outgoing")>0..|
00019100  99 7a 38 20 20 20 20 66  72 6f 6d 24 3d 74 6f 24  |.z8    from$=to$|
00019110  3a e7 c2 67 72 70 24 28  6e 67 25 29 2c 34 29 3d  |:..grp$(ng%),4)=|
00019120  22 6e 65 77 73 22 8c 66  72 6f 6d 24 3d 6e 65 77  |"news".from$=new|
00019130  73 67 72 6f 75 70 24 0d  99 84 07 20 20 cd 0d 99  |sgroup$....  ...|
00019140  8e 1e 20 20 f2 61 64 64  74 6f 69 6e 64 65 78 28  |..  .addtoindex(|
00019150  6e 67 25 2c 61 25 29 3a  61 25 3d 30 0d 99 98 05  |ng%,a%):a%=0....|
00019160  cd 0d 99 a2 05 e1 0d 99  ac 04 0d 99 b6 17 dd a4  |................|
00019170  67 65 74 68 65 61 64 65  72 69 6e 66 6f 28 66 24  |getheaderinfo(f$|
00019180  29 0d 99 c0 2c ea 72 34  25 2c 41 24 2c 70 6f 73  |)...,.r4%,A$,pos|
00019190  25 2c 6f 6b 25 2c 6d 65  6d 25 2c 6d 62 72 25 2c  |%,ok%,mem%,mbr%,|
000191a0  6c 65 6e 25 2c 74 25 3a  6f 6b 25 3d 30 0d 99 ca  |len%,t%:ok%=0...|
000191b0  10 f2 63 6c 65 61 72 68  65 61 64 65 72 0d 99 d4  |..clearheader...|
000191c0  14 74 25 3d a4 66 69 6c  65 74 79 70 65 28 66 24  |.t%=.filetype(f$|
000191d0  29 0d 99 de 0d 6c 65 6e  25 3d 32 30 34 38 0d 99  |)....len%=2048..|
000191e0  e8 09 c8 8e 74 25 ca 0d  99 f2 2d 20 20 c9 26 46  |....t%....-  .&F|
000191f0  43 41 3a 6d 62 72 25 3d  a4 63 6c 61 69 6d 28 6d  |CA:mbr%=.claim(m|
00019200  65 6d 25 2c 6c 65 6e 25  2a 32 2c 22 68 65 61 64  |em%,len%*2,"head|
00019210  65 72 22 29 0d 99 fc 2b  20 20 c9 26 46 46 46 3a  |er")...+  .&FFF:|
00019220  6d 62 72 25 3d a4 63 6c  61 69 6d 28 6d 65 6d 25  |mbr%=.claim(mem%|
00019230  2c 6c 65 6e 25 2c 22 68  65 61 64 65 72 22 29 0d  |,len%,"header").|
00019240  9a 06 0e 20 20 7f 3a 6d  65 6d 25 3d 30 0d 9a 10  |...  .:mem%=0...|
00019250  05 cb 0d 9a 1a 0c e7 6d  65 6d 25 3e 30 8c 0d 9a  |.......mem%>0...|
00019260  24 1d 20 20 66 31 25 3d  a4 6f 70 65 6e 69 6e 28  |$.  f1%=.openin(|
00019270  66 24 29 3a e7 66 31 25  3e 30 8c 0d 9a 2e 12 20  |f$):.f1%>0..... |
00019280  20 20 20 e7 74 25 3d 26  46 43 41 20 8c 0d 9a 38  |   .t%=&FCA ...8|
00019290  36 20 20 20 20 20 20 c8  99 22 4f 53 5f 47 42 50  |6      .."OS_GBP|
000192a0  42 22 2c 33 2c 66 31 25  2c 6d 65 6d 25 2b 6c 65  |B",3,f1%,mem%+le|
000192b0  6e 25 2c 6c 65 6e 25 2c  32 30 20 b8 2c 2c 2c 2c  |n%,len%,20 .,,,,|
000192c0  72 34 25 0d 9a 42 12 20  20 20 20 20 20 e7 72 34  |r4%..B.      .r4|
000192d0  25 3e 32 30 8c 0d 9a 4c  2e 20 20 20 20 20 20 20  |%>20...L.       |
000192e0  20 f2 70 72 69 6e 74 28  22 22 2c a4 6d 73 67 30  | .print("",.msg0|
000192f0  28 22 43 6f 6d 70 48 65  61 64 22 29 2c 22 22 2c  |("CompHead"),"",|
00019300  22 22 29 0d 9a 56 39 20  20 20 20 20 20 20 20 72  |"")..V9        r|
00019310  34 25 3d a4 64 65 63 6f  6d 70 68 65 61 64 65 72  |4%=.decompheader|
00019320  28 6d 65 6d 25 2b 6c 65  6e 25 2c 72 34 25 2d 32  |(mem%+len%,r4%-2|
00019330  30 2c 6d 65 6d 25 2c 6c  65 6e 25 29 0d 9a 60 0b  |0,mem%,len%)..`.|
00019340  20 20 20 20 20 20 cd 0d  9a 6a 0b 20 20 20 20 20  |      ...j.     |
00019350  20 cc 0d 9a 74 2e 20 20  20 20 20 20 c8 99 22 4f  | ...t.      .."O|
00019360  53 5f 47 42 50 42 22 2c  34 2c 66 31 25 2c 6d 65  |S_GBPB",4,f1%,me|
00019370  6d 25 2c 6c 65 6e 25 20  b8 2c 2c 2c 2c 72 34 25  |m%,len% .,,,,r4%|
00019380  0d 9a 7e 09 20 20 20 20  cd 0d 9a 88 10 20 20 20  |..~.    .....   |
00019390  20 f2 63 66 28 66 31 25  29 0d 9a 92 0f 20 20 20  | .cf(f1%)....   |
000193a0  20 e7 72 34 25 3e 30 8c  0d 9a 9c 16 20 20 20 20  | .r4%>0.....    |
000193b0  20 20 70 6f 73 25 3d 30  3a 6f 6b 25 3d 31 0d 9a  |  pos%=0:ok%=1..|
000193c0  a6 27 20 20 20 20 20 20  f5 41 24 3d 22 22 3a f4  |.'      .A$="":.|
000193d0  20 6e 65 78 74 20 6c 69  6e 65 20 77 61 73 20 3c  | next line was <|
000193e0  20 6c 65 6e 25 0d 9a b0  1b 20 20 20 20 20 20 20  | len%....       |
000193f0  20 e7 70 6f 73 25 2b 32  35 34 3c 6c 65 6e 25 8c  | .pos%+254<len%.|
00019400  0d 9a ba 2c 20 20 20 20  20 20 20 20 20 20 41 24  |...,          A$|
00019410  3d a4 73 74 72 28 6d 65  6d 25 2b 70 6f 73 25 29  |=.str(mem%+pos%)|
00019420  3a 70 6f 73 25 2b 3d a9  41 24 2b 31 0d 9a c4 0d  |:pos%+=.A$+1....|
00019430  20 20 20 20 20 20 20 20  cd 0d 9a ce 1d 20 20 20  |        .....   |
00019440  20 20 20 20 20 f2 73 65  74 68 65 61 64 65 72 76  |     .setheaderv|
00019450  61 72 28 41 24 29 0d 9a  d8 10 20 20 20 20 20 20  |ar(A$)....      |
00019460  fd 41 24 3d 22 22 0d 9a  e2 09 20 20 20 20 cd 0d  |.A$=""....    ..|
00019470  9a ec 07 20 20 cd 0d 9a  f6 14 20 20 f2 72 65 6c  |...  .....  .rel|
00019480  65 61 73 65 28 6d 62 72  25 29 0d 9b 00 05 cd 0d  |ease(mbr%)......|
00019490  9b 0a 08 3d 6f 6b 25 0d  9b 14 04 0d 9b 1e 18 dd  |...=ok%.........|
000194a0  f2 67 65 6e 69 6e 64 65  78 64 69 72 28 70 24 2c  |.genindexdir(p$,|
000194b0  67 25 29 0d 9b 28 34 ea  64 6c 6f 6f 70 25 2c 6e  |g%)..(4.dloop%,n|
000194c0  25 2c 66 25 2c 66 24 2c  74 25 2c 72 33 25 2c 61  |%,f%,f$,t%,r3%,a|
000194d0  64 64 72 25 2c 76 25 2c  67 24 2c 64 69 72 62 75  |ddr%,v%,g$,dirbu|
000194e0  66 25 2c 64 62 72 25 0d  9b 32 38 6e 25 3d 30 3a  |f%,dbr%..28n%=0:|
000194f0  67 24 3d 67 72 70 24 28  67 25 29 3a 64 62 72 25  |g$=grp$(g%):dbr%|
00019500  3d a4 63 6c 61 69 6d 28  64 69 72 62 75 66 25 2c  |=.claim(dirbuf%,|
00019510  64 62 73 69 7a 65 25 2c  22 64 62 75 66 22 29 0d  |dbsize%,"dbuf").|
00019520  9b 3c 32 f2 70 6f 6c 6c  28 73 6c 69 63 65 25 2a  |.<2.poll(slice%*|
00019530  34 29 3a f2 67 61 63 74  28 a4 6d 73 67 31 28 22  |4):.gact(.msg1("|
00019540  47 6c 61 73 74 22 2c 67  72 70 24 28 67 25 29 29  |Glast",grp$(g%))|
00019550  29 0d 9b 46 05 f5 0d 9b  50 3d c8 99 22 58 4f 53  |)..F....P=.."XOS|
00019560  5f 47 42 50 42 22 2c 31  30 2c 70 24 2c 64 69 72  |_GBPB",10,p$,dir|
00019570  62 75 66 25 2c 32 30 2c  6e 25 2c 64 62 73 69 7a  |buf%,20,n%,dbsiz|
00019580  65 25 2c 22 2a 22 b8 2c  2c 2c 72 33 25 2c 6e 25  |e%,"*".,,,r3%,n%|
00019590  3b 46 25 0d 9b 5a 17 e7  28 46 25 80 31 29 8c 72  |;F%..Z..(F%.1).r|
000195a0  33 25 3d 30 3a 6e 25 3d  2d 31 0d 9b 64 0b e7 72  |3%=0:n%=-1..d..r|
000195b0  33 25 3e 30 8c 0d 9b 6e  13 20 20 61 64 64 72 25  |3%>0...n.  addr%|
000195c0  3d 64 69 72 62 75 66 25  0d 9b 78 13 20 20 e3 64  |=dirbuf%..x.  .d|
000195d0  6c 6f 6f 70 25 3d 31 b8  72 33 25 0d 9b 82 23 20  |loop%=1.r3%...# |
000195e0  20 74 25 3d 61 64 64 72  25 21 31 36 3a 66 24 3d  | t%=addr%!16:f$=|
000195f0  a4 73 74 72 28 61 64 64  72 25 2b 32 30 29 0d 9b  |.str(addr%+20)..|
00019600  8c 0c 20 20 76 25 3d bb  66 24 0d 9b 96 0b 20 20  |..  v%=.f$....  |
00019610  c8 8e 74 25 ca 0d 9b a0  0b 20 20 20 20 c9 31 3a  |..t%.....    .1:|
00019620  0d 9b aa 12 20 20 20 20  20 20 20 20 e7 76 25 3e  |....        .v%>|
00019630  30 8c 0d 9b b4 4d 20 20  20 20 20 20 20 20 e7 6e  |0....M        .n|
00019640  6f 62 75 66 70 74 72 25  3c 28 6e 6f 62 75 66 73  |obufptr%<(nobufs|
00019650  69 7a 65 25 2d 34 29 8c  6e 6f 62 75 66 25 21 6e  |ize%-4).nobuf%!n|
00019660  6f 62 75 66 70 74 72 25  3d 76 25 3a 6e 6f 62 75  |obufptr%=v%:nobu|
00019670  66 70 74 72 25 2b 3d 34  20 8b 6e 25 3d 2d 31 0d  |fptr%+=4 .n%=-1.|
00019680  9b be 0d 20 20 20 20 20  20 20 20 cd 0d 9b c8 32  |...        ....2|
00019690  20 20 20 20 c9 32 2c 33  3a e7 c0 66 24 2c 31 29  |    .2,3:..f$,1)|
000196a0  3d 22 7e 22 f2 67 65 6e  69 6e 64 65 78 64 69 72  |="~".genindexdir|
000196b0  28 70 24 2b 22 2e 22 2b  66 24 2c 67 25 29 0d 9b  |(p$+"."+f$,g%)..|
000196c0  d2 07 20 20 cb 0d 9b dc  25 20 20 61 64 64 72 25  |..  ....%  addr%|
000196d0  3d 61 64 64 72 25 2b 28  32 34 2b a9 66 24 29 80  |=addr%+(24+.f$).|
000196e0  ac 33 3a ed 64 6c 6f 6f  70 25 0d 9b e6 05 cd 0d  |.3:.dloop%......|
000196f0  9b f0 0a fd 6e 25 3d 2d  31 0d 9b fa 12 f2 72 65  |....n%=-1.....re|
00019700  6c 65 61 73 65 28 64 62  72 25 29 0d 9c 04 05 e1  |lease(dbr%).....|
00019710  0d 9c 0e 04 0d 9c 18 0a  dd f2 68 67 6f 6e 0d 9c  |..........hgon..|
00019720  22 14 c8 99 22 48 6f 75  72 67 6c 61 73 73 5f 4f  |"..."Hourglass_O|
00019730  6e 22 0d 9c 2c 05 e1 0d  9c 36 04 0d 9c 40 0b dd  |n"..,....6...@..|
00019740  f2 68 67 6f 66 66 0d 9c  4a 15 c8 99 22 48 6f 75  |.hgoff..J..."Hou|
00019750  72 67 6c 61 73 73 5f 4f  66 66 22 0d 9c 54 05 e1  |rglass_Off"..T..|
00019760  0d 9c 5e 04 0d 9c 68 11  dd f2 72 65 63 65 69 76  |..^...h...receiv|
00019770  65 28 71 25 29 0d 9c 72  1b ea 73 31 24 2c 73 32  |e(q%)..r..s1$,s2|
00019780  24 2c 77 25 2c 69 25 2c  74 6f 25 2c 72 65 66 25  |$,w%,i%,to%,ref%|
00019790  0d 9c 7c 15 77 25 3d 71  25 21 32 30 3a 69 25 3d  |..|.w%=q%!20:i%=|
000197a0  71 25 21 32 34 0d 9c 86  0d c8 8e 71 25 21 31 36  |q%!24......q%!16|
000197b0  20 ca 0d 9c 90 1f 20 20  c9 30 3a e7 a4 63 68 65  | .....  .0:..che|
000197c0  63 6b 71 75 69 74 20 8c  f2 66 69 6e 69 73 68 3a  |ckquit ..finish:|
000197d0  e0 0d 9c 9a 58 20 20 c9  32 3a e7 71 25 21 31 32  |....X  .2:.q%!12|
000197e0  3d 64 72 61 67 72 65 66  25 80 71 25 21 33 36 3c  |=dragref%.q%!36<|
000197f0  3e 2d 31 8c f2 6d 61 6b  65 6e 65 77 73 64 69 72  |>-1..makenewsdir|
00019800  28 a4 73 74 72 28 71 25  2b 34 34 29 29 3a 64 72  |(.str(q%+44)):dr|
00019810  61 67 72 65 66 25 3d 30  3a f2 63 6c 6f 73 65 77  |agref%=0:.closew|
00019820  28 73 61 76 65 6e 64 25  29 0d 9c a4 19 20 20 c9  |(savend%)....  .|
00019830  33 3a 73 31 24 3d a4 73  74 72 28 71 25 2b 34 34  |3:s1$=.str(q%+44|
00019840  29 3a 0d 9c ae 26 20 20  20 20 e7 77 25 3d 67 73  |):...&    .w%=gs|
00019850  65 74 75 70 25 80 69 25  3d 31 36 80 71 25 21 34  |etup%.i%=16.q%!4|
00019860  30 3d 26 32 30 30 30 8c  0d 9c b8 51 20 20 20 20  |0=&2000....Q    |
00019870  e7 a9 73 31 24 3c 31 30  30 f2 75 70 64 61 74 65  |..s1$<100.update|
00019880  69 63 6f 6e 73 74 72 69  6e 67 28 67 73 65 74 75  |iconstring(gsetu|
00019890  70 25 2c 31 36 2c 73 31  24 29 3a f2 73 65 74 63  |p%,16,s1$):.setc|
000198a0  61 72 65 74 28 67 73 65  74 75 70 25 2c 31 36 2c  |aret(gsetup%,16,|
000198b0  a9 73 31 24 29 3a 8b ef  37 0d 9c c2 09 20 20 20  |.s1$):..7....   |
000198c0  20 cd 0d 9c cc 20 20 20  20 20 e7 77 25 3d 75 77  | ....     .w%=uw|
000198d0  69 6e 25 80 28 69 25 3d  31 36 84 69 25 3d 31 37  |in%.(i%=16.i%=17|
000198e0  29 8c 0d 9c d6 22 20 20  20 20 f2 6e 65 77 76 61  |)...."    .newva|
000198f0  63 28 a4 69 63 5f 73 74  72 28 77 25 2c 30 29 2c  |c(.ic_str(w%,0),|
00019900  73 31 24 29 0d 9c e0 09  20 20 20 20 cd 0d 9c ea  |s1$)....    ....|
00019910  35 20 20 c9 26 35 30 32  3a 74 6f 25 3d 71 25 21  |5  .&502:to%=q%!|
00019920  34 3a 72 65 66 25 3d 71  25 21 38 3a 73 31 24 3d  |4:ref%=q%!8:s1$=|
00019930  a4 68 65 6c 70 28 71 25  21 33 32 2c 71 25 21 33  |.help(q%!32,q%!3|
00019940  36 29 0d 9c f4 0e 20 20  e7 73 31 24 3e 22 22 8c  |6)....  .s1$>"".|
00019950  0d 9c fe 4d 20 20 20 20  71 25 21 31 36 3d 26 35  |...M    q%!16=&5|
00019960  30 33 3a 71 25 21 31 32  3d 72 65 66 25 3a 24 28  |03:q%!12=ref%:$(|
00019970  71 25 2b 32 30 29 3d 73  31 24 3a 71 25 3f 28 32  |q%+20)=s1$:q%?(2|
00019980  30 2b a9 73 31 24 29 3d  30 3a 21 71 25 3d 28 28  |0+.s1$)=0:!q%=((|
00019990  32 35 2b a9 73 31 24 29  81 34 29 2a 34 0d 9d 08  |25+.s1$).4)*4...|
000199a0  27 20 20 20 20 c8 99 22  58 57 69 6d 70 5f 53 65  |'    .."XWimp_Se|
000199b0  6e 64 4d 65 73 73 61 67  65 22 2c 31 37 2c 71 25  |ndMessage",17,q%|
000199c0  2c 74 6f 25 0d 9d 12 07  20 20 cd 0d 9d 1c 38 20  |,to%....  ....8 |
000199d0  20 c9 26 34 30 30 43 32  3a 73 31 24 3d a4 73 74  | .&400C2:s1$=.st|
000199e0  72 28 71 25 2b 32 38 29  3a e7 73 31 24 3d 6d 79  |r(q%+28):.s1$=my|
000199f0  6e 61 6d 65 24 80 71 25  21 34 3c 3e 74 61 73 6b  |name$.q%!4<>task|
00019a00  25 20 8c 0d 9d 26 3e 20  20 20 20 21 71 25 3d 32  |% ...&>    !q%=2|
00019a10  30 3a 71 25 21 31 36 3d  30 3a 71 25 21 31 32 3d  |0:q%!16=0:q%!12=|
00019a20  30 3a c8 99 22 57 69 6d  70 5f 53 65 6e 64 4d 65  |0:.."Wimp_SendMe|
00019a30  73 73 61 67 65 22 2c 31  37 2c 71 25 2c 71 25 21  |ssage",17,q%,q%!|
00019a40  34 0d 9d 30 09 20 20 20  20 cd 0d 9d 3a 19 20 20  |4..0.    ...:.  |
00019a50  c9 26 34 30 30 43 33 3a  f2 72 6d 63 6c 28 71 25  |.&400C3:.rmcl(q%|
00019a60  21 34 29 0d 9d 44 46 20  20 c9 26 34 30 30 43 39  |!4)..DF  .&400C9|
00019a70  3a f2 72 65 6c 65 61 73  65 28 6d 65 6e 75 64 61  |:.release(menuda|
00019a80  74 61 72 65 66 25 29 3a  f2 72 65 6c 65 61 73 65  |taref%):.release|
00019a90  28 69 6e 64 6d 65 6e 75  72 65 66 25 29 3a 69 6e  |(indmenuref%):in|
00019aa0  66 6f 6f 70 65 6e 25 3d  a3 0d 9d 4e 0e 20 20 c9  |foopen%=...N.  .|
00019ab0  6e 62 63 6f 6d 25 3a 0d  9d 58 2e 20 20 20 20 73  |nbcom%:..X.    s|
00019ac0  31 24 3d a4 73 74 72 28  71 25 2b 26 32 30 29 3a  |1$=.str(q%+&20):|
00019ad0  73 32 24 3d a4 73 74 72  28 71 25 2b 26 32 31 2b  |s2$=.str(q%+&21+|
00019ae0  a9 73 31 24 29 0d 9d 62  3a 20 20 20 20 f2 6e 62  |.s1$)..b:    .nb|
00019af0  63 6f 6d 6d 61 6e 64 28  71 25 21 34 2c 71 25 21  |command(q%!4,q%!|
00019b00  38 2c 71 25 21 26 31 34  2c 71 25 21 26 31 38 2c  |8,q%!&14,q%!&18,|
00019b10  71 25 21 26 31 43 2c 73  31 24 2c 73 32 24 29 0d  |q%!&1C,s1$,s2$).|
00019b20  9d 6c 05 cb 0d 9d 76 05  e1 0d 9d 80 04 0d 9d 8a  |.l....v.........|
00019b30  11 dd a4 68 65 6c 70 28  77 25 2c 69 25 29 0d 9d  |...help(w%,i%)..|
00019b40  94 0a ea 41 24 2c 50 24  0d 9d 9e 09 c8 8e 77 25  |...A$,P$......w%|
00019b50  ca 0d 9d a8 13 20 20 c9  2d 32 3a 41 24 3d 22 48  |.....  .-2:A$="H|
00019b60  62 61 72 22 0d 9d b2 0f  20 20 c9 6d 73 65 74 75  |bar"....  .msetu|
00019b70  70 25 3a 0d 9d bc 11 20  20 20 20 c8 8e 28 69 25  |p%:....    ..(i%|
00019b80  81 35 29 ca 0d 9d c6 17  20 20 20 20 20 20 c9 30  |.5).....      .0|
00019b90  3a 41 24 3d 22 48 73 69  74 65 22 0d 9d d0 16 20  |:A$="Hsite".... |
00019ba0  20 20 20 20 20 c9 31 3a  41 24 3d 22 48 67 65 6e  |     .1:A$="Hgen|
00019bb0  22 0d 9d da 18 20 20 20  20 20 20 c9 32 3a 41 24  |"....      .2:A$|
00019bc0  3d 22 48 74 72 61 6e 73  22 0d 9d e4 17 20 20 20  |="Htrans"....   |
00019bd0  20 20 20 c9 33 3a 41 24  3d 22 48 67 72 70 73 22  |   .3:A$="Hgrps"|
00019be0  0d 9d ee 18 20 20 20 20  20 20 c9 34 3a 41 24 3d  |....      .4:A$=|
00019bf0  22 48 75 73 65 72 73 22  0d 9d f8 17 20 20 20 20  |"Husers"....    |
00019c00  20 20 c9 35 3a 41 24 3d  22 48 66 69 6c 74 22 0d  |  .5:A$="Hfilt".|
00019c10  9e 02 09 20 20 20 20 cb  0d 9e 0c 10 20 20 c9 73  |...    .....  .s|
00019c20  69 74 65 77 69 6e 25 3a  0d 9e 16 0d 20 20 20 20  |itewin%:....    |
00019c30  c8 8e 69 25 ca 0d 9e 20  18 20 20 20 20 20 20 c9  |..i%... .      .|
00019c40  30 3a 41 24 3d 22 48 53  68 6f 73 74 22 0d 9e 2a  |0:A$="HShost"..*|
00019c50  18 20 20 20 20 20 20 c9  31 3a 41 24 3d 22 48 53  |.      .1:A$="HS|
00019c60  6d 61 69 6c 22 0d 9e 34  17 20 20 20 20 20 20 c9  |mail"..4.      .|
00019c70  32 3a 41 24 3d 22 48 53  72 65 6d 22 0d 9e 3e 17  |2:A$="HSrem"..>.|
00019c80  20 20 20 20 20 20 c9 33  3a 41 24 3d 22 48 53 6f  |      .3:A$="HSo|
00019c90  72 67 22 0d 9e 48 19 20  20 20 20 20 20 c9 34 2c  |rg"..H.      .4,|
00019ca0  31 31 3a 41 24 3d 22 48  53 74 72 22 0d 9e 52 1a  |11:A$="HStr"..R.|
00019cb0  20 20 20 20 20 20 c9 31  34 2c 31 35 3a 41 24 3d  |      .14,15:A$=|
00019cc0  22 48 53 74 7a 22 0d 9e  5c 18 20 20 20 20 20 20  |"HStz"..\.      |
00019cd0  c9 35 3a 41 24 3d 22 48  53 69 6e 69 74 22 0d 9e  |.5:A$="HSinit"..|
00019ce0  66 1a 20 20 20 20 20 20  c9 31 36 3a 41 24 3d 22  |f.      .16:A$="|
00019cf0  48 63 61 6e 63 65 6c 22  0d 9e 70 17 20 20 20 20  |Hcancel"..p.    |
00019d00  20 20 c9 36 3a 41 24 3d  22 48 73 61 76 65 22 0d  |  .6:A$="Hsave".|
00019d10  9e 7a 16 20 20 20 20 20  20 7f 3a 41 24 3d 22 48  |.z.      .:A$="H|
00019d20  53 67 65 6e 22 0d 9e 84  09 20 20 20 20 cb 0d 9e  |Sgen"....    ...|
00019d30  8e 0f 20 20 c9 67 73 65  74 75 70 25 3a 0d 9e 98  |..  .gsetup%:...|
00019d40  0d 20 20 20 20 c8 8e 69  25 ca 0d 9e a2 19 20 20  |.    ..i%.....  |
00019d50  20 20 20 20 c9 31 31 3a  41 24 3d 22 48 4d 61 75  |    .11:A$="HMau|
00019d60  74 6f 22 0d 9e ac 18 20  20 20 20 20 20 c9 33 3a  |to"....      .3:|
00019d70  41 24 3d 22 48 4d 66 61  73 74 22 0d 9e b6 18 20  |A$="HMfast".... |
00019d80  20 20 20 20 20 c9 39 3a  41 24 3d 22 48 4d 6b 65  |     .9:A$="HMke|
00019d90  65 70 22 0d 9e c0 16 20  20 20 20 20 20 c9 37 3a  |ep"....      .7:|
00019da0  41 24 3d 22 48 4d 72 72  22 0d 9e ca 17 20 20 20  |A$="HMrr"....   |
00019db0  20 20 20 c9 36 3a 41 24  3d 22 48 4d 6c 6f 67 22  |   .6:A$="HMlog"|
00019dc0  0d 9e d4 18 20 20 20 20  20 20 c9 38 3a 41 24 3d  |....      .8:A$=|
00019dd0  22 48 4d 63 6f 6d 70 22  0d 9e de 1a 20 20 20 20  |"HMcomp"....    |
00019de0  20 20 c9 32 33 3a 41 24  3d 22 48 4d 63 6f 6d 70  |  .23:A$="HMcomp|
00019df0  32 22 0d 9e e8 1a 20 20  20 20 20 20 c9 31 2c 32  |2"....      .1,2|
00019e00  3a 41 24 3d 22 48 4d 6d  6f 64 70 22 0d 9e f2 1a  |:A$="HMmodp"....|
00019e10  20 20 20 20 20 20 c9 32  30 3a 41 24 3d 22 48 4d  |      .20:A$="HM|
00019e20  67 61 74 65 31 22 0d 9e  fc 1d 20 20 20 20 20 20  |gate1"....      |
00019e30  c9 31 38 2c 31 39 3a 41  24 3d 22 48 4d 67 61 74  |.18,19:A$="HMgat|
00019e40  65 32 22 0d 9f 06 21 20  20 20 20 20 20 c9 31 30  |e2"...!      .10|
00019e50  2c 31 32 2c 31 33 2c 31  34 3a 41 24 3d 22 48 4d  |,12,13,14:A$="HM|
00019e60  61 6e 6e 22 0d 9f 10 1b  20 20 20 20 20 20 c9 31  |ann"....      .1|
00019e70  36 2e 32 31 3a 41 24 3d  22 48 4d 64 65 66 22 0d  |6.21:A$="HMdef".|
00019e80  9f 1a 1e 20 20 20 20 20  20 c9 32 35 2c 32 36 3a  |...      .25,26:|
00019e90  41 24 3d 22 48 4d 6d 69  6e 64 73 6b 22 0d 9f 24  |A$="HMmindsk"..$|
00019ea0  16 20 20 20 20 20 20 7f  3a 41 24 3d 22 48 4d 67  |.      .:A$="HMg|
00019eb0  65 6e 22 0d 9f 2e 09 20  20 20 20 cb 0d 9f 38 0e  |en"....    ...8.|
00019ec0  20 20 c9 74 72 77 69 6e  25 3a 0d 9f 42 0d 20 20  |  .trwin%:..B.  |
00019ed0  20 20 c8 8e 69 25 ca 0d  9f 4c 1a 20 20 20 20 20  |  ..i%...L.     |
00019ee0  20 c9 30 2c 31 3a 41 24  3d 22 48 54 6e 61 6d 65  | .0,1:A$="HTname|
00019ef0  22 0d 9f 56 17 20 20 20  20 20 20 c9 33 3a 41 24  |"..V.      .3:A$|
00019f00  3d 22 48 54 72 65 6d 22  0d 9f 60 17 20 20 20 20  |="HTrem"..`.    |
00019f10  20 20 c9 34 3a 41 24 3d  22 48 54 73 65 74 22 0d  |  .4:A$="HTset".|
00019f20  9f 6a 16 20 20 20 20 20  20 7f 3a 41 24 3d 22 48  |.j.      .:A$="H|
00019f30  54 67 65 6e 22 0d 9f 74  09 20 20 20 20 cb 0d 9f  |Tgen"..t.    ...|
00019f40  7e 1e 20 20 c9 67 77 69  6e 25 3a 50 24 3d a4 69  |~.  .gwin%:P$=.i|
00019f50  63 5f 73 74 72 28 77 25  2c 32 35 29 0d 9f 88 0d  |c_str(w%,25)....|
00019f60  20 20 20 20 c8 8e 69 25  ca 0d 9f 92 1a 20 20 20  |    ..i%.....   |
00019f70  20 20 20 c9 32 2c 31 34  3a 41 24 3d 22 48 47 64  |   .2,14:A$="HGd|
00019f80  65 66 22 0d 9f 9c 1c 20  20 20 20 20 20 c9 32 32  |ef"....      .22|
00019f90  2c 32 34 3a 41 24 3d 22  48 47 68 69 73 74 22 0d  |,24:A$="HGhist".|
00019fa0  9f a6 19 20 20 20 20 20  20 c9 31 38 3a 41 24 3d  |...      .18:A$=|
00019fb0  22 48 47 73 63 61 6e 22  0d 9f b0 18 20 20 20 20  |"HGscan"....    |
00019fc0  20 20 c9 32 36 3a 41 24  3d 22 48 47 6e 65 77 22  |  .26:A$="HGnew"|
00019fd0  0d 9f ba 19 20 20 20 20  20 20 c9 33 33 3a 41 24  |....      .33:A$|
00019fe0  3d 22 48 47 65 78 70 68  22 0d 9f c4 19 20 20 20  |="HGexph"....   |
00019ff0  20 20 20 c9 32 37 3a 41  24 3d 22 48 47 63 61 6e  |   .27:A$="HGcan|
0001a000  63 22 0d 9f ce 19 20 20  20 20 20 20 c9 32 38 3a  |c"....      .28:|
0001a010  41 24 3d 22 48 47 63 68  65 66 22 0d 9f d8 1b 20  |A$="HGchef".... |
0001a020  20 20 20 20 20 c9 33 34  3a 41 24 3d 22 48 47 74  |     .34:A$="HGt|
0001a030  68 72 65 61 64 22 0d 9f  e2 19 20 20 20 20 20 20  |hread"....      |
0001a040  c9 32 39 3a 41 24 3d 22  48 47 61 75 74 6f 22 0d  |.29:A$="HGauto".|
0001a050  9f ec 19 20 20 20 20 20  20 c9 33 30 3a 41 24 3d  |...      .30:A$=|
0001a060  22 48 47 65 78 70 6e 22  0d 9f f6 19 20 20 20 20  |"HGexpn"....    |
0001a070  20 20 c9 33 31 3a 41 24  3d 22 48 47 65 78 70 62  |  .31:A$="HGexpb|
0001a080  22 0d a0 00 1f 20 20 20  20 20 20 c9 33 36 2c 33  |"....      .36,3|
0001a090  35 2c 34 31 3a 41 24 3d  22 48 47 65 78 70 74 22  |5,41:A$="HGexpt"|
0001a0a0  0d a0 0a 1c 20 20 20 20  20 20 c9 31 39 2c 32 35  |....      .19,25|
0001a0b0  3a 41 24 3d 22 48 47 6e  61 6d 65 22 0d a0 14 1b  |:A$="HGname"....|
0001a0c0  20 20 20 20 20 20 c9 31  2c 31 35 3a 41 24 3d 22  |      .1,15:A$="|
0001a0d0  48 47 74 69 6d 65 22 0d  a0 1e 18 20 20 20 20 20  |HGtime"....     |
0001a0e0  20 c9 31 36 3a 41 24 3d  22 48 47 6d 6f 64 22 0d  | .16:A$="HGmod".|
0001a0f0  a0 28 1d 20 20 20 20 20  20 c9 35 2c 36 2c 31 32  |.(.      .5,6,12|
0001a100  3a 41 24 3d 22 48 47 74  79 70 65 22 0d a0 32 17  |:A$="HGtype"..2.|
0001a110  20 20 20 20 20 20 c9 37  3a 41 24 3d 22 48 47 61  |      .7:A$="HGa|
0001a120  64 64 22 0d a0 3c 17 20  20 20 20 20 20 c9 38 3a  |dd"..<.      .8:|
0001a130  41 24 3d 22 48 47 72 65  6d 22 0d a0 46 18 20 20  |A$="HGrem"..F.  |
0001a140  20 20 20 20 c9 31 37 3a  41 24 3d 22 48 47 64 65  |    .17:A$="HGde|
0001a150  6c 22 0d a0 50 19 20 20  20 20 20 20 c9 31 30 3a  |l"..P.      .10:|
0001a160  41 24 3d 22 48 47 69 6e  66 6f 22 0d a0 5a 17 20  |A$="HGinfo"..Z. |
0001a170  20 20 20 20 20 c9 39 3a  41 24 3d 22 48 47 69 6e  |     .9:A$="HGin|
0001a180  64 22 0d a0 64 1a 20 20  20 20 20 20 c9 31 31 3a  |d"..d.      .11:|
0001a190  41 24 3d 22 48 47 64 6f  65 78 70 22 0d a0 6e 18  |A$="HGdoexp"..n.|
0001a1a0  20 20 20 20 20 20 c9 33  32 3a 41 24 3d 22 48 73  |      .32:A$="Hs|
0001a1b0  61 76 65 22 0d a0 78 16  20 20 20 20 20 20 7f 3a  |ave"..x.      .:|
0001a1c0  41 24 3d 22 48 47 67 65  6e 22 0d a0 82 09 20 20  |A$="HGgen"....  |
0001a1d0  20 20 cb 0d a0 8c 0d 20  20 c9 75 77 69 6e 25 3a  |  .....  .uwin%:|
0001a1e0  0d a0 96 0d 20 20 20 20  c8 8e 69 25 ca 0d a0 a0  |....    ..i%....|
0001a1f0  1b 20 20 20 20 20 20 c9  31 2c 32 30 3a 41 24 3d  |.      .1,20:A$=|
0001a200  22 48 55 6e 61 6d 65 22  0d a0 aa 1a 20 20 20 20  |"HUname"....    |
0001a210  20 20 c9 32 2c 31 35 3a  41 24 3d 22 48 55 67 72  |  .2,15:A$="HUgr|
0001a220  70 22 0d a0 b4 18 20 20  20 20 20 20 c9 32 31 3a  |p"....      .21:|
0001a230  41 24 3d 22 48 55 76 61  63 22 0d a0 be 19 20 20  |A$="HUvac"....  |
0001a240  20 20 20 20 c9 31 37 3a  41 24 3d 22 48 55 76 73  |    .17:A$="HUvs|
0001a250  65 74 22 0d a0 c8 19 20  20 20 20 20 20 c9 31 38  |et"....      .18|
0001a260  3a 41 24 3d 22 48 55 65  64 69 74 22 0d a0 d2 1a  |:A$="HUedit"....|
0001a270  20 20 20 20 20 20 c9 31  39 3a 41 24 3d 22 48 55  |      .19:A$="HU|
0001a280  63 6c 65 61 72 22 0d a0  dc 18 20 20 20 20 20 20  |clear"....      |
0001a290  c9 31 33 3a 41 24 3d 22  48 55 66 77 64 22 0d a0  |.13:A$="HUfwd"..|
0001a2a0  e6 19 20 20 20 20 20 20  c9 36 3a 41 24 3d 22 48  |..      .6:A$="H|
0001a2b0  63 61 6e 63 65 6c 22 0d  a0 f0 17 20 20 20 20 20  |cancel"....     |
0001a2c0  20 c9 37 3a 41 24 3d 22  48 73 61 76 65 22 0d a0  | .7:A$="Hsave"..|
0001a2d0  fa 16 20 20 20 20 20 20  7f 3a 41 24 3d 22 48 55  |..      .:A$="HU|
0001a2e0  67 65 6e 22 0d a1 04 09  20 20 20 20 cb 0d a1 0e  |gen"....    ....|
0001a2f0  0d 20 20 c9 66 77 69 6e  25 3a 0d a1 18 0d 20 20  |.  .fwin%:....  |
0001a300  20 20 c8 8e 69 25 ca 0d  a1 22 18 20 20 20 20 20  |  ..i%...".     |
0001a310  20 c9 32 32 3a 41 24 3d  22 48 46 6e 65 77 22 0d  | .22:A$="HFnew".|
0001a320  a1 2c 18 20 20 20 20 20  20 c9 32 31 3a 41 24 3d  |.,.      .21:A$=|
0001a330  22 48 46 64 65 6c 22 0d  a1 36 18 20 20 20 20 20  |"HFdel"..6.     |
0001a340  20 c9 32 30 3a 41 24 3d  22 48 46 73 65 74 22 0d  | .20:A$="HFset".|
0001a350  a1 40 18 20 20 20 20 20  20 c9 31 3a 41 24 3d 22  |.@.      .1:A$="|
0001a360  48 46 74 79 70 65 22 0d  a1 4a 29 20 20 20 20 20  |HFtype"..J)     |
0001a370  20 c9 32 2c 33 2c 34 2c  35 2c 36 2c 37 2c 38 2c  | .2,3,4,5,6,7,8,|
0001a380  39 2c 31 30 3a 41 24 3d  22 48 46 63 6f 6e 64 22  |9,10:A$="HFcond"|
0001a390  0d a1 54 1b 20 20 20 20  20 20 c9 31 35 2c 31 36  |..T.      .15,16|
0001a3a0  3a 41 24 3d 22 48 46 61  63 74 22 0d a1 5e 16 20  |:A$="HFact"..^. |
0001a3b0  20 20 20 20 20 7f 3a 41  24 3d 22 48 46 67 65 6e  |     .:A$="HFgen|
0001a3c0  22 0d a1 68 09 20 20 20  20 cb 0d a1 72 1b 20 20  |"..h.    ...r.  |
0001a3d0  c9 73 74 61 74 75 73 25  3a 41 24 3d 22 48 73 74  |.status%:A$="Hst|
0001a3e0  61 74 75 73 22 0d a1 7c  11 20 20 7f 3a 41 24 3d  |atus"..|.  .:A$=|
0001a3f0  22 48 61 6e 79 22 0d a1  86 05 cb 0d a1 90 0b e7  |"Hany"..........|
0001a400  41 24 3e 22 22 8c 0d a1  9a 15 20 20 41 24 3d a4  |A$>"".....  A$=.|
0001a410  6d 73 67 31 28 41 24 2c  50 24 29 0d a1 a4 05 cd  |msg1(A$,P$).....|
0001a420  0d a1 ae 07 3d 41 24 0d  a1 b8 04 0d a1 c2 18 dd  |....=A$.........|
0001a430  f2 73 65 74 63 61 72 65  74 28 77 25 2c 69 25 2c  |.setcaret(w%,i%,|
0001a440  6e 25 29 0d a1 cc 2c c8  99 22 58 57 69 6d 70 5f  |n%)...,.."XWimp_|
0001a450  53 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |SetCaretPosition|
0001a460  22 2c 77 25 2c 69 25 2c  2c 2c 2d 31 2c 6e 25 0d  |",w%,i%,,,-1,n%.|
0001a470  a1 d6 05 e1 0d a1 e0 04  0d a1 ea 0f dd f2 6c 6f  |..............lo|
0001a480  73 65 63 61 72 65 74 0d  a1 f4 21 c8 99 22 58 57  |secaret...!.."XW|
0001a490  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
0001a4a0  74 69 6f 6e 22 2c 2d 31  0d a1 fe 05 e1 0d a2 08  |tion",-1........|
0001a4b0  04 0d a2 12 15 dd f2 6d  61 6b 65 6e 65 77 73 64  |.......makenewsd|
0001a4c0  69 72 28 66 24 29 0d a2  1c 19 ea 66 31 24 2c 64  |ir(f$).....f1$,d|
0001a4d0  24 2c 6e 25 2c 6e 65 78  74 25 2c 65 72 72 25 0d  |$,n%,next%,err%.|
0001a4e0  a2 26 12 f2 65 6e 73 75  72 65 64 69 72 28 66 24  |.&..ensuredir(f$|
0001a4f0  29 0d a2 30 14 e7 a4 6f  62 6a 74 79 70 65 28 66  |)..0...objtype(f|
0001a500  24 29 3e 31 8c 0d a2 3a  1e 20 20 64 24 3d 73 75  |$)>1...:.  d$=su|
0001a510  70 70 6f 72 74 24 2b 22  2e 6e 65 77 73 64 69 72  |pport$+".newsdir|
0001a520  2e 2a 22 0d a2 44 26 20  20 c8 99 22 4f 53 5f 46  |.*"..D&  .."OS_F|
0001a530  53 43 6f 6e 74 72 6f 6c  22 2c 32 36 2c 64 24 2c  |SControl",26,d$,|
0001a540  66 24 2b 22 2e 2a 22 2c  33 0d a2 4e 25 20 20 c8  |f$+".*",3..N%  .|
0001a550  99 22 58 57 69 6d 70 5f  53 74 61 72 74 54 61 73  |."XWimp_StartTas|
0001a560  6b 22 2c 66 24 2b 22 2e  21 62 6f 6f 74 22 0d a2  |k",f$+".!boot"..|
0001a570  58 11 20 20 f2 63 72 65  61 74 65 64 69 72 73 0d  |X.  .createdirs.|
0001a580  a2 62 07 20 20 cc 0d a2  6c 1d 20 20 f2 6d 65 73  |.b.  ...l.  .mes|
0001a590  73 61 67 65 30 28 22 4d  64 69 72 66 61 69 6c 22  |sage0("Mdirfail"|
0001a5a0  2c 31 29 0d a2 76 05 cd  0d a2 80 05 e1 0d a2 8a  |,1)..v..........|
0001a5b0  04 0d a2 94 21 dd f2 6e  62 75 70 64 61 74 65 28  |....!..nbupdate(|
0001a5c0  74 79 70 65 25 2c 67 24  2c 6e 25 2c 66 24 2c 73  |type%,g$,n%,f$,s|
0001a5d0  24 29 0d a2 9e 19 e7 6e  63 6c 69 65 6e 74 25 3e  |$).....nclient%>|
0001a5e0  30 84 74 79 70 65 25 3d  31 31 8c 0d a2 a8 0e 20  |0.type%=11..... |
0001a5f0  20 c8 8e 74 79 70 65 25  ca 0d a2 b2 26 20 20 20  | ..type%....&   |
0001a600  20 c9 30 3a 66 24 3d 22  4c 31 22 3a e7 a4 64 65  | .0:f$="L1":..de|
0001a610  6c 6f 6b 28 67 24 29 8c  66 24 3d 22 4c 30 22 0d  |lok(g$).f$="L0".|
0001a620  a2 bc 26 20 20 20 20 20  20 20 20 20 20 f2 6e 62  |..&          .nb|
0001a630  75 70 64 28 74 79 70 65  25 2c 30 2c 67 24 2c 66  |upd(type%,0,g$,f|
0001a640  24 2c 22 22 29 0d a2 c6  25 20 20 20 20 c9 31 2c  |$,"")...%    .1,|
0001a650  35 3a f2 6e 62 75 70 64  28 74 79 70 65 25 2c 30  |5:.nbupd(type%,0|
0001a660  2c 67 24 2c 22 22 2c 22  22 29 0d a2 d0 24 20 20  |,g$,"","")...$  |
0001a670  20 20 c9 34 3a f2 6e 62  75 70 64 28 74 79 70 65  |  .4:.nbupd(type|
0001a680  25 2c 6e 25 2c 67 24 2c  22 22 2c 22 22 29 0d a2  |%,n%,g$,"","")..|
0001a690  da 26 20 20 20 20 c9 32  2c 33 3a f2 6e 62 75 70  |.&    .2,3:.nbup|
0001a6a0  64 28 74 79 70 65 25 2c  6e 25 2c 67 24 2c 66 24  |d(type%,n%,g$,f$|
0001a6b0  2c 73 24 29 0d a2 e4 24  20 20 20 20 c9 31 30 3a  |,s$)...$    .10:|
0001a6c0  f2 6e 62 75 70 64 28 74  79 70 65 25 2c 30 2c 22  |.nbupd(type%,0,"|
0001a6d0  22 2c 22 22 2c 22 22 29  0d a2 ee 35 20 20 20 20  |","","")...5    |
0001a6e0  c9 31 31 3a f2 6e 62 75  70 64 28 74 79 70 65 25  |.11:.nbupd(type%|
0001a6f0  2c 6e 25 2c 74 72 61 6e  73 24 28 74 72 61 6e 73  |,n%,trans$(trans|
0001a700  70 6f 72 74 25 29 2c 22  22 2c 22 22 29 0d a2 f8  |port%),"","")...|
0001a710  07 20 20 cb 0d a3 02 05  cd 0d a3 0c 05 e1 0d a3  |.  .............|
0001a720  16 04 0d a3 20 0f dd a4  63 68 65 63 6b 71 75 69  |.... ...checkqui|
0001a730  74 0d a3 2a 08 ea 6f 6b  25 0d a3 34 12 e7 69 6e  |t..*..ok%..4..in|
0001a740  64 65 62 61 74 63 68 25  3d 30 8c 0d a3 3e 0b 20  |debatch%=0...>. |
0001a750  20 6f 6b 25 3d b9 0d a3  48 07 20 20 cc 0d a3 52  | ok%=...H.  ...R|
0001a760  26 20 20 6f 6b 25 3d 28  a4 63 6f 6e 66 69 72 6d  |&  ok%=(.confirm|
0001a770  28 a4 6d 73 67 30 28 22  43 71 75 69 74 22 29 29  |(.msg0("Cquit"))|
0001a780  3d 31 29 0d a3 5c 05 cd  0d a3 66 08 3d 6f 6b 25  |=1)..\....f.=ok%|
0001a790  0d a3 70 04 0d a3 7a 37  dd f2 6e 62 63 6f 6d 6d  |..p...z7..nbcomm|
0001a7a0  61 6e 64 28 6e 62 66 72  6f 6d 25 2c 6e 62 72 65  |and(nbfrom%,nbre|
0001a7b0  66 25 2c 63 6f 6d 25 2c  70 31 25 2c 70 32 25 2c  |f%,com%,p1%,p2%,|
0001a7c0  73 74 72 24 2c 73 74 72  32 24 29 0d a3 84 10 e7  |str$,str2$).....|
0001a7d0  73 74 61 72 74 75 70 6f  6b 25 8c 0d a3 8e 10 20  |startupok%..... |
0001a7e0  20 e7 62 75 73 79 24 3d  22 22 8c 0d a3 98 2a 20  | .busy$=""....* |
0001a7f0  20 20 20 e7 a4 66 69 6e  64 63 6c 28 6e 62 66 72  |   ..findcl(nbfr|
0001a800  6f 6d 25 29 3c 30 f2 61  64 64 63 6c 28 6e 62 66  |om%)<0.addcl(nbf|
0001a810  72 6f 6d 25 29 0d a3 a2  2b 20 20 20 20 e7 63 6f  |rom%)...+    .co|
0001a820  6d 25 3c 35 30 30 80 61  72 72 6f 70 65 6e 25 8c  |m%<500.arropen%.|
0001a830  f2 63 6c 6f 73 65 77 28  61 72 72 69 76 65 25 29  |.closew(arrive%)|
0001a840  0d a3 ac 2d 20 20 20 20  f2 77 72 69 74 65 69 6e  |...-    .writein|
0001a850  64 65 78 62 75 66 3a f4  20 65 6e 73 75 72 65 20  |dexbuf:. ensure |
0001a860  75 70 2d 74 6f 2d 64 61  74 65 2e 2e 2e 0d a3 b6  |up-to-date......|
0001a870  15 20 20 20 20 c8 8e 63  6f 6d 25 83 36 35 35 33  |.    ..com%.6553|
0001a880  36 ca 0d a3 c0 2c 20 20  20 20 20 20 c9 30 3a f2  |6....,      .0:.|
0001a890  6e 62 73 74 61 72 74 75  70 28 63 6f 6d 25 2c 6e  |nbstartup(com%,n|
0001a8a0  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 29 0d a3  |bfrom%,nbref%)..|
0001a8b0  ca 44 20 20 20 20 20 20  c9 31 30 3a f2 6e 62 72  |.D      .10:.nbr|
0001a8c0  65 70 6c 79 28 6e 62 66  72 6f 6d 25 2c 6e 62 72  |eply(nbfrom%,nbr|
0001a8d0  65 66 25 2c 63 6f 6d 25  2c 30 2c 30 2c 22 22 2c  |ef%,com%,0,0,"",|
0001a8e0  22 22 29 3a f2 72 6d 63  6c 28 6e 62 66 72 6f 6d  |""):.rmcl(nbfrom|
0001a8f0  25 29 0d a3 d4 30 20 20  20 20 20 20 c9 32 30 3a  |%)...0      .20:|
0001a900  f2 73 65 74 75 73 65 72  28 63 6f 6d 25 2c 6e 62  |.setuser(com%,nb|
0001a910  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 73 74 72  |from%,nbref%,str|
0001a920  24 29 0d a3 de 32 20 20  20 20 20 20 c9 33 30 3a  |$)...2      .30:|
0001a930  f2 6e 62 73 69 74 65 69  6e 66 6f 28 63 6f 6d 25  |.nbsiteinfo(com%|
0001a940  2c 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |,nbfrom%,nbref%,|
0001a950  70 31 25 29 0d a3 e8 47  20 20 20 20 20 20 c9 31  |p1%)...G      .1|
0001a960  30 30 3a f2 61 64 64 64  65 6c 62 75 66 28 30 2c  |00:.adddelbuf(0,|
0001a970  30 29 3a f2 73 65 6e 64  67 72 6f 75 70 6c 69 73  |0):.sendgrouplis|
0001a980  74 28 63 6f 6d 25 2c 6e  62 66 72 6f 6d 25 2c 6e  |t(com%,nbfrom%,n|
0001a990  62 72 65 66 25 2c 73 74  72 24 29 0d a3 f2 39 20  |bref%,str$)...9 |
0001a9a0  20 20 20 20 20 c9 31 31  30 3a f2 6e 65 77 67 72  |     .110:.newgr|
0001a9b0  6f 75 70 6c 69 73 74 28  63 6f 6d 25 2c 6e 62 66  |ouplist(com%,nbf|
0001a9c0  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 70 31 25 2c  |rom%,nbref%,p1%,|
0001a9d0  70 32 25 29 0d a3 fc 35  20 20 20 20 20 20 c9 31  |p2%)...5      .1|
0001a9e0  32 30 3a f2 61 64 64 67  72 6f 75 70 63 6f 6d 28  |20:.addgroupcom(|
0001a9f0  63 6f 6d 25 2c 6e 62 66  72 6f 6d 25 2c 6e 62 72  |com%,nbfrom%,nbr|
0001aa00  65 66 25 2c 73 74 72 24  29 0d a4 06 35 20 20 20  |ef%,str$)...5   |
0001aa10  20 20 20 c9 31 33 30 3a  f2 64 65 6c 67 72 6f 75  |   .130:.delgrou|
0001aa20  70 63 6f 6d 28 63 6f 6d  25 2c 6e 62 66 72 6f 6d  |pcom(com%,nbfrom|
0001aa30  25 2c 6e 62 72 65 66 25  2c 73 74 72 24 29 0d a4  |%,nbref%,str$)..|
0001aa40  10 37 20 20 20 20 20 20  c9 31 34 30 3a f2 65 78  |.7      .140:.ex|
0001aa50  70 67 72 70 63 6f 6d 28  63 6f 6d 25 2c 6e 62 66  |pgrpcom(com%,nbf|
0001aa60  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 73 74 72 24  |rom%,nbref%,str$|
0001aa70  2c 70 31 25 29 0d a4 1a  43 20 20 20 20 20 20 c9  |,p1%)...C      .|
0001aa80  32 30 30 2c 32 31 30 3a  f2 73 65 6e 64 69 6e 64  |200,210:.sendind|
0001aa90  65 78 6c 69 73 74 28 63  6f 6d 25 2c 6e 62 66 72  |exlist(com%,nbfr|
0001aaa0  6f 6d 25 2c 6e 62 72 65  66 25 2c 73 74 72 24 2c  |om%,nbref%,str$,|
0001aab0  70 31 25 2c 70 32 25 29  0d a4 24 39 20 20 20 20  |p1%,p2%)..$9    |
0001aac0  20 20 c9 32 32 30 3a f2  73 65 6e 64 61 72 74 6e  |  .220:.sendartn|
0001aad0  61 6d 65 28 63 6f 6d 25  2c 6e 62 66 72 6f 6d 25  |ame(com%,nbfrom%|
0001aae0  2c 6e 62 72 65 66 25 2c  73 74 72 24 2c 70 31 25  |,nbref%,str$,p1%|
0001aaf0  29 0d a4 2e 41 20 20 20  20 20 20 c9 32 33 30 2c  |)...A      .230,|
0001ab00  32 34 30 3a f2 6c 6f 63  6b 61 72 74 6c 69 73 74  |240:.lockartlist|
0001ab10  28 63 6f 6d 25 2c 6e 62  66 72 6f 6d 25 2c 6e 62  |(com%,nbfrom%,nb|
0001ab20  72 65 66 25 2c 73 74 72  24 2c 70 31 25 2c 70 32  |ref%,str$,p1%,p2|
0001ab30  25 29 0d a4 38 3c 20 20  20 20 20 20 c9 32 35 30  |%)..8<      .250|
0001ab40  3a f2 64 65 6c 61 72 74  6c 69 73 74 28 63 6f 6d  |:.delartlist(com|
0001ab50  25 2c 6e 62 66 72 6f 6d  25 2c 6e 62 72 65 66 25  |%,nbfrom%,nbref%|
0001ab60  2c 73 74 72 24 2c 70 31  25 2c 70 32 25 29 0d a4  |,str$,p1%,p2%)..|
0001ab70  42 44 20 20 20 20 20 20  c9 32 36 30 2c 32 37 30  |BD      .260,270|
0001ab80  3a f2 66 6f 6c 64 65 72  6f 70 28 63 6f 6d 25 2c  |:.folderop(com%,|
0001ab90  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 73  |nbfrom%,nbref%,s|
0001aba0  74 72 24 2c 73 74 72 32  24 2c 70 31 25 2c 70 32  |tr$,str2$,p1%,p2|
0001abb0  25 29 0d a4 4c 39 20 20  20 20 20 20 c9 32 38 30  |%)..L9      .280|
0001abc0  3a f2 63 61 6e 63 65 6c  61 72 74 28 63 6f 6d 25  |:.cancelart(com%|
0001abd0  2c 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |,nbfrom%,nbref%,|
0001abe0  73 74 72 24 2c 73 74 72  32 24 29 0d a4 56 3c 20  |str$,str2$)..V< |
0001abf0  20 20 20 20 20 c9 33 30  30 2c 33 31 30 3a f2 63  |     .300,310:.c|
0001ac00  6c 69 65 6e 74 73 65 6e  64 66 69 6c 65 28 63 6f  |lientsendfile(co|
0001ac10  6d 25 2c 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |m%,nbfrom%,nbref|
0001ac20  25 2c 73 74 72 24 29 0d  a4 60 33 20 20 20 20 20  |%,str$)..`3     |
0001ac30  20 c9 34 30 30 3a f2 6c  69 73 74 75 73 65 72 73  | .400:.listusers|
0001ac40  28 63 6f 6d 25 2c 6e 62  66 72 6f 6d 25 2c 6e 62  |(com%,nbfrom%,nb|
0001ac50  72 65 66 25 2c 73 74 72  24 29 0d a4 6a 31 20 20  |ref%,str$)..j1  |
0001ac60  20 20 20 20 c9 34 31 30  3a f2 61 64 64 75 73 65  |    .410:.adduse|
0001ac70  72 28 63 6f 6d 25 2c 6e  62 66 72 6f 6d 25 2c 6e  |r(com%,nbfrom%,n|
0001ac80  62 72 65 66 25 2c 73 74  72 24 29 0d a4 74 31 20  |bref%,str$)..t1 |
0001ac90  20 20 20 20 20 c9 34 32  30 3a f2 64 65 6c 75 73  |     .420:.delus|
0001aca0  65 72 28 63 6f 6d 25 2c  6e 62 66 72 6f 6d 25 2c  |er(com%,nbfrom%,|
0001acb0  6e 62 72 65 66 25 2c 73  74 72 24 29 0d a4 7e 43  |nbref%,str$)..~C|
0001acc0  20 20 20 20 20 20 c9 34  35 30 3a e7 72 77 25 8c  |      .450:.rw%.|
0001acd0  f2 73 65 74 66 6f 72 77  61 72 64 28 63 6f 6d 25  |.setforward(com%|
0001ace0  2c 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |,nbfrom%,nbref%,|
0001acf0  73 74 72 24 2c 73 74 72  32 24 2c 70 31 25 29 0d  |str$,str2$,p1%).|
0001ad00  a4 88 44 20 20 20 20 20  20 c9 34 36 30 3a e7 72  |..D      .460:.r|
0001ad10  77 25 8c f2 73 65 74 76  61 63 61 74 69 6f 6e 28  |w%..setvacation(|
0001ad20  63 6f 6d 25 2c 6e 62 66  72 6f 6d 25 2c 6e 62 72  |com%,nbfrom%,nbr|
0001ad30  65 66 25 2c 73 74 72 24  2c 73 74 72 32 24 2c 70  |ef%,str$,str2$,p|
0001ad40  31 25 29 0d a4 92 18 20  20 20 20 20 20 c9 39 30  |1%)....      .90|
0001ad50  30 3a 73 72 66 6c 61 67  25 3d 30 0d a4 9c 3d 20  |0:srflag%=0...= |
0001ad60  20 20 20 20 20 7f 3a f2  6e 62 63 6f 6d 66 61 69  |     .:.nbcomfai|
0001ad70  6c 28 6e 62 66 72 6f 6d  25 2c 6e 62 72 65 66 25  |l(nbfrom%,nbref%|
0001ad80  2c 63 6f 6d 25 2c 39 2c  a4 6d 73 67 30 28 22 42  |,com%,9,.msg0("B|
0001ad90  61 64 63 6f 6d 22 29 29  0d a4 a6 09 20 20 20 20  |adcom"))....    |
0001ada0  cb 0d a4 b0 09 20 20 20  20 cc 0d a4 ba 3d 20 20  |.....    ....=  |
0001adb0  20 20 f2 6e 62 63 6f 6d  66 61 69 6c 28 6e 62 66  |  .nbcomfail(nbf|
0001adc0  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 63 6f 6d 25  |rom%,nbref%,com%|
0001add0  2c 32 2c a4 6d 73 67 31  28 22 42 75 73 79 22 2c  |,2,.msg1("Busy",|
0001ade0  62 75 73 79 24 29 29 0d  a4 c4 07 20 20 cd 0d a4  |busy$))....  ...|
0001adf0  ce 05 cd 0d a4 d8 05 e1  0d a4 e2 04 0d a4 ec 2e  |................|
0001ae00  dd f2 73 65 74 66 6f 72  77 61 72 64 28 63 6f 6d  |..setforward(com|
0001ae10  25 2c 6e 62 66 72 6f 6d  25 2c 6e 62 72 65 66 25  |%,nbfrom%,nbref%|
0001ae20  2c 75 24 2c 66 24 2c 61  25 29 0d a4 f6 19 ea 75  |,u$,f$,a%).....u|
0001ae30  25 2c 61 24 3a 75 25 3d  a4 75 73 65 72 6e 6f 28  |%,a$:u%=.userno(|
0001ae40  75 24 29 0d a5 00 0a e7  75 25 3e 30 8c 0d a5 0a  |u$).....u%>0....|
0001ae50  0b 20 20 c8 8e 61 25 ca  0d a5 14 18 20 20 20 20  |.  ..a%.....    |
0001ae60  c9 30 3a 61 24 3d 75 73  65 72 66 24 28 75 25 29  |.0:a$=userf$(u%)|
0001ae70  0d a5 1e 3b 20 20 20 20  c9 31 3a 75 73 65 72 66  |...;    .1:userf|
0001ae80  24 28 75 25 29 3d 66 24  3a f2 73 65 74 75 77 69  |$(u%)=f$:.setuwi|
0001ae90  6e 28 75 24 29 3a f2 73  61 76 65 75 73 65 72 69  |n(u$):.saveuseri|
0001aea0  6e 66 6f 62 79 6e 6f 28  75 25 29 0d a5 28 3b 20  |nfobyno(u%)..(; |
0001aeb0  20 20 20 c9 32 3a 75 73  65 72 66 24 28 75 25 29  |   .2:userf$(u%)|
0001aec0  3d 22 22 3a f2 73 65 74  75 77 69 6e 28 75 24 29  |="":.setuwin(u$)|
0001aed0  3a f2 73 61 76 65 75 73  65 72 69 6e 66 6f 62 79  |:.saveuserinfoby|
0001aee0  6e 6f 28 75 25 29 0d a5  32 07 20 20 cb 0d a5 3c  |no(u%)..2.  ...<|
0001aef0  2e 20 20 f2 6e 62 72 65  70 6c 79 28 6e 62 66 72  |.  .nbreply(nbfr|
0001af00  6f 6d 25 2c 6e 62 72 65  66 25 2c 63 6f 6d 25 2c  |om%,nbref%,com%,|
0001af10  61 25 2c 30 2c 75 24 2c  61 24 29 0d a5 46 07 20  |a%,0,u$,a$)..F. |
0001af20  20 cc 0d a5 50 36 20 20  f2 6e 62 63 6f 6d 66 61  | ...P6  .nbcomfa|
0001af30  69 6c 28 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |il(nbfrom%,nbref|
0001af40  25 2c 63 6f 6d 25 2c 31  2c a4 6d 73 67 30 28 22  |%,com%,1,.msg0("|
0001af50  55 66 61 69 6c 22 29 29  0d a5 5a 05 cd 0d a5 64  |Ufail"))..Z....d|
0001af60  05 e1 0d a5 6e 04 0d a5  78 2f dd f2 73 65 74 76  |....n...x/..setv|
0001af70  61 63 61 74 69 6f 6e 28  63 6f 6d 25 2c 6e 62 66  |acation(com%,nbf|
0001af80  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 75 24 2c 70  |rom%,nbref%,u$,p|
0001af90  24 2c 61 25 29 0d a5 82  36 ea 75 25 2c 61 24 2c  |$,a%)...6.u%,a$,|
0001afa0  66 24 3a 75 25 3d a4 75  73 65 72 6e 6f 28 75 24  |f$:u%=.userno(u$|
0001afb0  29 3a 66 24 3d a4 75 70  61 74 68 28 75 24 29 2b  |):f$=.upath(u$)+|
0001afc0  22 2e 76 61 63 61 74 69  6f 6e 22 0d a5 8c 0a e7  |".vacation".....|
0001afd0  75 25 3e 30 8c 0d a5 96  0b 20 20 c8 8e 61 25 ca  |u%>0.....  ..a%.|
0001afe0  0d a5 a0 26 20 20 20 20  c9 30 3a e7 a4 6f 62 6a  |...&    .0:..obj|
0001aff0  74 79 70 65 28 66 24 29  3d 31 8c 61 24 3d 66 24  |type(f$)=1.a$=f$|
0001b000  8b 61 24 3d 22 22 0d a5  aa 44 20 20 20 20 c9 31  |.a$=""...D    .1|
0001b010  3a e7 a4 6f 62 6a 74 79  70 65 28 70 24 29 3d 31  |:..objtype(p$)=1|
0001b020  8c 46 25 3d a4 64 65 6c  66 69 6c 65 28 66 24 29  |.F%=.delfile(f$)|
0001b030  3a 46 25 3d a4 63 6f 70  79 66 69 6c 65 28 70 24  |:F%=.copyfile(p$|
0001b040  2c 66 24 29 3a 61 24 3d  66 24 0d a5 b4 20 20 20  |,f$):a$=f$...   |
0001b050  20 20 c9 32 3a 46 25 3d  a4 64 65 6c 66 69 6c 65  |  .2:F%=.delfile|
0001b060  28 66 24 29 3a 61 24 3d  22 22 0d a5 be 07 20 20  |(f$):a$=""....  |
0001b070  cb 0d a5 c8 2e 20 20 f2  6e 62 72 65 70 6c 79 28  |.....  .nbreply(|
0001b080  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 63  |nbfrom%,nbref%,c|
0001b090  6f 6d 25 2c 61 25 2c 30  2c 75 24 2c 61 24 29 0d  |om%,a%,0,u$,a$).|
0001b0a0  a5 d2 07 20 20 cc 0d a5  dc 36 20 20 f2 6e 62 63  |...  ....6  .nbc|
0001b0b0  6f 6d 66 61 69 6c 28 6e  62 66 72 6f 6d 25 2c 6e  |omfail(nbfrom%,n|
0001b0c0  62 72 65 66 25 2c 63 6f  6d 25 2c 31 2c a4 6d 73  |bref%,com%,1,.ms|
0001b0d0  67 30 28 22 55 66 61 69  6c 22 29 29 0d a5 e6 05  |g0("Ufail"))....|
0001b0e0  cd 0d a5 f0 05 e1 0d a5  fa 04 0d a6 04 24 dd f2  |.............$..|
0001b0f0  6e 62 73 74 61 72 74 75  70 28 63 6f 6d 25 2c 6e  |nbstartup(com%,n|
0001b100  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 29 0d a6  |bfrom%,nbref%)..|
0001b110  0e 3b f2 6e 62 72 65 70  6c 79 28 6e 62 66 72 6f  |.;.nbreply(nbfro|
0001b120  6d 25 2c 6e 62 72 65 66  25 2c 63 6f 6d 25 2c 31  |m%,nbref%,com%,1|
0001b130  30 30 2a bb 76 65 72 24  2c 75 73 65 72 63 74 72  |00*.ver$,userctr|
0001b140  6c 25 2c 22 22 2c 22 22  29 0d a6 18 05 e1 0d a6  |l%,"","").......|
0001b150  22 04 0d a6 2c 21 dd f2  73 65 74 75 73 65 72 28  |"...,!..setuser(|
0001b160  63 6f 6d 25 2c 69 64 25  2c 6e 62 72 65 66 25 2c  |com%,id%,nbref%,|
0001b170  61 24 29 0d a6 36 07 ea  6c 25 0d a6 40 3e e7 a4  |a$)..6..l%..@>..|
0001b180  75 73 65 72 6f 6b 28 61  24 29 3d 30 f2 6e 62 63  |userok(a$)=0.nbc|
0001b190  6f 6d 66 61 69 6c 28 69  64 25 2c 6e 62 72 65 66  |omfail(id%,nbref|
0001b1a0  25 2c 32 30 2c 31 2c a4  6d 73 67 30 28 22 55 66  |%,20,1,.msg0("Uf|
0001b1b0  61 69 6c 22 29 29 3a e1  0d a6 4a 13 6c 25 3d a4  |ail")):...J.l%=.|
0001b1c0  66 69 6e 64 63 6c 28 69  64 25 29 0d a6 54 0b e7  |findcl(id%)..T..|
0001b1d0  6c 25 3e 2d 31 8c 0d a6  5e 39 20 20 63 6c 5f 75  |l%>-1...^9  cl_u|
0001b1e0  73 65 72 24 28 6c 25 29  3d 61 24 3a f2 6e 62 72  |ser$(l%)=a$:.nbr|
0001b1f0  65 70 6c 79 28 69 64 25  2c 6e 62 72 65 66 25 2c  |eply(id%,nbref%,|
0001b200  63 6f 6d 25 2c 30 2c 30  2c 61 24 2c 22 22 29 0d  |com%,0,0,a$,"").|
0001b210  a6 68 07 20 20 cc 0d a6  72 34 20 20 f2 6e 62 63  |.h.  ...r4  .nbc|
0001b220  6f 6d 66 61 69 6c 28 69  64 25 2c 6e 62 72 65 66  |omfail(id%,nbref|
0001b230  25 2c 63 6f 6d 25 2c 31  2c a4 6d 73 67 30 28 22  |%,com%,1,.msg0("|
0001b240  43 6c 75 6e 72 65 67 22  29 29 0d a6 7c 05 cd 0d  |Clunreg"))..|...|
0001b250  a6 86 05 e1 0d a6 90 04  0d a6 9a 10 dd f2 61 64  |..............ad|
0001b260  64 63 6c 28 69 64 25 29  0d a6 a4 07 ea 6c 25 0d  |dcl(id%).....l%.|
0001b270  a6 ae 25 c8 95 63 6c 5f  69 64 25 28 6c 25 29 3c  |..%..cl_id%(l%)<|
0001b280  3e 30 80 6c 25 3c 6d 61  78 63 6c 25 3a 6c 25 2b  |>0.l%<maxcl%:l%+|
0001b290  3d 31 3a ce 0d a6 b8 43  e7 63 6c 5f 69 64 25 28  |=1:....C.cl_id%(|
0001b2a0  6c 25 29 3d 30 8c 63 6c  5f 69 64 25 28 6c 25 29  |l%)=0.cl_id%(l%)|
0001b2b0  3d 69 64 25 3a 6e 63 6c  69 65 6e 74 25 2b 3d 31  |=id%:nclient%+=1|
0001b2c0  3a 8b f2 6d 65 73 73 61  67 65 30 28 22 43 6c 66  |:..message0("Clf|
0001b2d0  75 6c 6c 22 2c 30 29 0d  a6 c2 05 e1 0d a6 cc 04  |ull",0).........|
0001b2e0  0d a6 d6 11 dd a4 66 69  6e 64 63 6c 28 69 64 25  |......findcl(id%|
0001b2f0  29 0d a6 e0 07 ea 6c 25  0d a6 ea 27 c8 95 63 6c  |).....l%...'..cl|
0001b300  5f 69 64 25 28 6c 25 29  3c 3e 69 64 25 80 6c 25  |_id%(l%)<>id%.l%|
0001b310  3c 6d 61 78 63 6c 25 3a  6c 25 2b 3d 31 3a ce 0d  |<maxcl%:l%+=1:..|
0001b320  a6 f4 1a e7 63 6c 5f 69  64 25 28 6c 25 29 3c 3e  |....cl_id%(l%)<>|
0001b330  69 64 25 8c 6c 25 3d 2d  31 0d a6 fe 07 3d 6c 25  |id%.l%=-1....=l%|
0001b340  0d a7 08 04 0d a7 12 0f  dd f2 72 6d 63 6c 28 69  |..........rmcl(i|
0001b350  64 25 29 0d a7 1c 17 ea  6c 25 3a 6c 25 3d a4 66  |d%).....l%:l%=.f|
0001b360  69 6e 64 63 6c 28 69 64  25 29 0d a7 26 2f e7 6c  |indcl(id%)..&/.l|
0001b370  25 3e 3d 30 8c 63 6c 5f  69 64 25 28 6c 25 29 3d  |%>=0.cl_id%(l%)=|
0001b380  30 3a e7 6e 63 6c 69 65  6e 74 25 3e 30 8c 6e 63  |0:.nclient%>0.nc|
0001b390  6c 69 65 6e 74 25 2d 3d  31 0d a7 30 05 e1 0d a7  |lient%-=1..0....|
0001b3a0  3a 04 0d a7 44 2e dd f2  6e 62 72 65 70 6c 79 28  |:...D...nbreply(|
0001b3b0  66 69 64 25 2c 72 65 66  25 2c 63 6f 64 65 25 2c  |fid%,ref%,code%,|
0001b3c0  70 31 25 2c 70 32 25 2c  73 31 24 2c 73 32 24 29  |p1%,p2%,s1$,s2$)|
0001b3d0  0d a7 4e 1b 71 25 21 31  32 3d 72 65 66 25 3a 71  |..N.q%!12=ref%:q|
0001b3e0  25 21 31 36 3d 6e 62 72  65 70 25 0d a7 58 26 71  |%!16=nbrep%..X&q|
0001b3f0  25 21 26 31 34 3d 63 6f  64 65 25 3a 71 25 21 26  |%!&14=code%:q%!&|
0001b400  31 38 3d 70 31 25 3a 71  25 21 26 31 43 3d 70 32  |18=p1%:q%!&1C=p2|
0001b410  25 0d a7 62 2a 24 28 71  25 2b 26 32 30 29 3d 73  |%..b*$(q%+&20)=s|
0001b420  31 24 2b bd 30 3a 24 28  71 25 2b 26 32 31 2b a9  |1$+.0:$(q%+&21+.|
0001b430  73 31 24 29 3d 73 32 24  2b bd 30 0d a7 6c 1d 21  |s1$)=s2$+.0..l.!|
0001b440  71 25 3d 34 2b 28 26 32  32 2b a9 73 31 24 2b a9  |q%=4+(&22+.s1$+.|
0001b450  73 32 24 29 81 34 2a 34  0d a7 76 23 c8 99 22 57  |s2$).4*4..v#.."W|
0001b460  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
0001b470  2c 31 37 2c 71 25 2c 66  69 64 25 0d a7 80 05 e1  |,17,q%,fid%.....|
0001b480  0d a7 8a 04 0d a7 94 36  dd f2 6e 62 6c 6f 6e 67  |.......6..nblong|
0001b490  72 65 70 6c 79 28 66 69  64 25 2c 72 65 66 25 2c  |reply(fid%,ref%,|
0001b4a0  63 6f 64 65 25 2c 70 31  25 2c 70 32 25 2c 70 33  |code%,p1%,p2%,p3|
0001b4b0  25 2c 73 31 24 2c 73 32  24 29 0d a7 9e 1b 71 25  |%,s1$,s2$)....q%|
0001b4c0  21 31 32 3d 72 65 66 25  3a 71 25 21 31 36 3d 6e  |!12=ref%:q%!16=n|
0001b4d0  62 72 65 70 25 0d a7 a8  31 71 25 21 26 31 34 3d  |brep%...1q%!&14=|
0001b4e0  63 6f 64 65 25 3a 71 25  21 26 31 38 3d 70 31 25  |code%:q%!&18=p1%|
0001b4f0  3a 71 25 21 26 31 43 3d  70 32 25 3a 71 25 21 26  |:q%!&1C=p2%:q%!&|
0001b500  32 30 3d 70 33 25 0d a7  b2 2a 24 28 71 25 2b 26  |20=p3%...*$(q%+&|
0001b510  32 34 29 3d 73 31 24 2b  bd 30 3a 24 28 71 25 2b  |24)=s1$+.0:$(q%+|
0001b520  26 32 35 2b a9 73 31 24  29 3d 73 32 24 2b bd 30  |&25+.s1$)=s2$+.0|
0001b530  0d a7 bc 1d 21 71 25 3d  34 2b 28 26 32 36 2b a9  |....!q%=4+(&26+.|
0001b540  73 31 24 2b a9 73 32 24  29 81 34 2a 34 0d a7 c6  |s1$+.s2$).4*4...|
0001b550  23 c8 99 22 57 69 6d 70  5f 53 65 6e 64 4d 65 73  |#.."Wimp_SendMes|
0001b560  73 61 67 65 22 2c 31 37  2c 71 25 2c 66 69 64 25  |sage",17,q%,fid%|
0001b570  0d a7 d0 05 e1 0d a7 da  04 0d a7 e4 37 dd f2 6e  |............7..n|
0001b580  62 6c 6f 6e 67 72 65 70  6c 79 32 28 66 69 64 25  |blongreply2(fid%|
0001b590  2c 72 65 66 25 2c 63 6f  64 65 25 2c 70 31 25 2c  |,ref%,code%,p1%,|
0001b5a0  70 32 25 2c 73 31 24 2c  73 32 24 2c 73 33 24 29  |p2%,s1$,s2$,s3$)|
0001b5b0  0d a7 ee 1b 71 25 21 31  32 3d 72 65 66 25 3a 71  |....q%!12=ref%:q|
0001b5c0  25 21 31 36 3d 6e 62 72  65 70 25 0d a7 f8 26 71  |%!16=nbrep%...&q|
0001b5d0  25 21 26 31 34 3d 63 6f  64 65 25 3a 71 25 21 26  |%!&14=code%:q%!&|
0001b5e0  31 38 3d 70 31 25 3a 71  25 21 26 31 43 3d 70 32  |18=p1%:q%!&1C=p2|
0001b5f0  25 0d a8 02 45 24 28 71  25 2b 26 32 30 29 3d 73  |%...E$(q%+&20)=s|
0001b600  31 24 2b bd 30 3a 24 28  71 25 2b 26 32 31 2b a9  |1$+.0:$(q%+&21+.|
0001b610  73 31 24 29 3d 73 32 24  2b bd 30 3a 24 28 71 25  |s1$)=s2$+.0:$(q%|
0001b620  2b 26 32 32 2b a9 73 31  24 2b a9 73 32 24 29 3d  |+&22+.s1$+.s2$)=|
0001b630  73 33 24 2b bd 30 0d a8  0c 22 21 71 25 3d 34 2b  |s3$+.0..."!q%=4+|
0001b640  28 26 32 33 2b a9 73 31  24 2b a9 73 32 24 2b a9  |(&23+.s1$+.s2$+.|
0001b650  73 33 24 29 81 34 2a 34  0d a8 16 23 c8 99 22 57  |s3$).4*4...#.."W|
0001b660  69 6d 70 5f 53 65 6e 64  4d 65 73 73 61 67 65 22  |imp_SendMessage"|
0001b670  2c 31 37 2c 71 25 2c 66  69 64 25 0d a8 20 05 e1  |,17,q%,fid%.. ..|
0001b680  0d a8 2a 04 0d a8 34 22  dd f2 6e 62 75 70 64 28  |..*...4"..nbupd(|
0001b690  63 6f 64 65 25 2c 70 31  25 2c 73 31 24 2c 73 32  |code%,p1%,s1$,s2|
0001b6a0  24 2c 73 33 24 29 0d a8  3e 18 71 25 21 31 32 3d  |$,s3$)..>.q%!12=|
0001b6b0  30 3a 71 25 21 31 36 3d  6e 62 75 70 64 25 0d a8  |0:q%!16=nbupd%..|
0001b6c0  48 1b 71 25 21 26 31 34  3d 63 6f 64 65 25 3a 71  |H.q%!&14=code%:q|
0001b6d0  25 21 26 31 38 3d 70 31  25 0d a8 52 14 24 28 71  |%!&18=p1%..R.$(q|
0001b6e0  25 2b 26 32 30 29 3d 73  31 24 2b bd 30 0d a8 5c  |%+&20)=s1$+.0..\|
0001b6f0  19 24 28 71 25 2b 26 32  31 2b a9 73 31 24 29 3d  |.$(q%+&21+.s1$)=|
0001b700  73 32 24 2b bd 30 0d a8  66 1e 24 28 71 25 2b 26  |s2$+.0..f.$(q%+&|
0001b710  32 32 2b a9 73 31 24 2b  a9 73 32 24 29 3d 73 33  |22+.s1$+.s2$)=s3|
0001b720  24 2b bd 30 0d a8 70 0b  21 71 25 3d 32 35 36 0d  |$+.0..p.!q%=256.|
0001b730  a8 7a 20 c8 99 22 57 69  6d 70 5f 53 65 6e 64 4d  |.z .."Wimp_SendM|
0001b740  65 73 73 61 67 65 22 2c  31 37 2c 71 25 2c 30 0d  |essage",17,q%,0.|
0001b750  a8 84 05 e1 0d a8 8e 04  0d a8 98 29 dd f2 6e 62  |...........)..nb|
0001b760  63 6f 6d 66 61 69 6c 28  6e 62 66 72 6f 6d 25 2c  |comfail(nbfrom%,|
0001b770  6e 62 72 65 66 25 2c 63  25 2c 63 31 25 2c 41 24  |nbref%,c%,c1%,A$|
0001b780  29 0d a8 a2 3b 63 25 3d  28 63 25 81 31 30 29 2a  |)...;c%=(c%.10)*|
0001b790  31 30 2b 63 31 25 3a f2  6e 62 72 65 70 6c 79 28  |10+c1%:.nbreply(|
0001b7a0  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 63  |nbfrom%,nbref%,c|
0001b7b0  25 2c 30 2c 30 2c 41 24  2c 22 22 29 0d a8 ac 05  |%,0,0,A$,"")....|
0001b7c0  e1 0d a8 b6 04 0d a8 c0  29 dd f2 6e 62 73 69 74  |........)..nbsit|
0001b7d0  65 69 6e 66 6f 28 63 6f  6d 25 2c 6e 62 66 72 6f  |einfo(com%,nbfro|
0001b7e0  6d 25 2c 6e 62 72 65 66  25 2c 70 31 25 29 0d a8  |m%,nbref%,p1%)..|
0001b7f0  ca 07 ea 61 24 0d a8 d4  0a c8 8e 70 31 25 ca 0d  |...a$......p1%..|
0001b800  a8 de 15 20 20 c9 30 3a  61 24 3d 68 6f 73 74 6e  |...  .0:a$=hostn|
0001b810  61 6d 65 24 0d a8 e8 10  20 20 c9 31 3a 61 24 3d  |ame$....  .1:a$=|
0001b820  6f 72 67 24 0d a8 f2 1e  20 20 c9 32 3a 61 24 3d  |org$....  .2:a$=|
0001b830  74 72 61 6e 73 24 28 74  72 61 6e 73 70 6f 72 74  |trans$(transport|
0001b840  25 29 0d a8 fc 3f 20 20  c9 33 3a 61 24 3d a4 76  |%)...?  .3:a$=.v|
0001b850  61 72 76 61 6c 28 22 4e  65 77 73 62 61 73 65 24  |arval("Newsbase$|
0001b860  54 72 61 6e 73 70 6f 72  74 54 79 70 65 22 29 3a  |TransportType"):|
0001b870  e7 61 24 3d 22 22 8c 61  24 3d 22 62 61 74 63 68  |.a$="".a$="batch|
0001b880  22 0d a9 06 15 20 20 c9  34 3a 61 24 3d 74 69 6d  |"....  .4:a$=tim|
0001b890  65 7a 6f 6e 65 24 0d a9  10 17 20 20 c9 35 3a 61  |ezone$....  .5:a|
0001b8a0  24 3d 72 65 6d 6f 74 65  68 6f 73 74 24 0d a9 1a  |$=remotehost$...|
0001b8b0  15 20 20 c9 36 3a 61 24  3d 6d 61 69 6c 6e 61 6d  |.  .6:a$=mailnam|
0001b8c0  65 24 0d a9 24 18 20 20  c9 31 30 30 3a 61 24 3d  |e$..$.  .100:a$=|
0001b8d0  c3 75 73 65 72 63 74 72  6c 25 0d a9 2e 16 20 20  |.userctrl%....  |
0001b8e0  c9 31 30 31 3a 61 24 3d  c3 64 65 66 65 78 70 25  |.101:a$=.defexp%|
0001b8f0  0d a9 38 05 cb 0d a9 42  2d f2 6e 62 72 65 70 6c  |..8....B-.nbrepl|
0001b900  79 28 6e 62 66 72 6f 6d  25 2c 6e 62 72 65 66 25  |y(nbfrom%,nbref%|
0001b910  2c 63 6f 6d 25 2c 70 31  25 2c 30 2c 61 24 2c 22  |,com%,p1%,0,a$,"|
0001b920  22 29 0d a9 4c 05 e1 0d  a9 56 04 0d a9 60 2c dd  |")..L....V...`,.|
0001b930  f2 73 65 6e 64 67 72 6f  75 70 6c 69 73 74 28 63  |.sendgrouplist(c|
0001b940  6f 6d 25 2c 6e 62 66 72  6f 6d 25 2c 6e 62 72 65  |om%,nbfrom%,nbre|
0001b950  66 25 2c 67 31 24 29 0d  a9 6a 33 ea 6c 31 25 2c  |f%,g1$)..j3.l1%,|
0001b960  67 32 24 2c 63 6e 74 25  2c 61 72 74 73 25 2c 61  |g2$,cnt%,arts%,a|
0001b970  72 74 73 32 25 2c 66 6c  67 24 2c 46 25 2c 74 25  |rts2%,flg$,F%,t%|
0001b980  2c 73 25 2c 66 69 72 73  74 25 0d a9 74 25 f2 70  |,s%,first%..t%.p|
0001b990  72 69 6e 74 28 22 22 2c  a4 6d 73 67 30 28 22 47  |rint("",.msg0("G|
0001b9a0  6c 69 73 74 22 29 2c 22  20 22 2c 22 20 22 29 0d  |list")," "," ").|
0001b9b0  a9 7e 12 e3 6c 31 25 3d  31 b8 67 72 6f 75 70 73  |.~..l1%=1.groups|
0001b9c0  25 0d a9 88 19 20 20 e7  a4 67 6d 61 74 63 68 28  |%....  ..gmatch(|
0001b9d0  67 31 24 2c 6c 31 25 29  20 8c 0d a9 92 33 20 20  |g1$,l1%) ....3  |
0001b9e0  20 20 67 32 24 3d 67 72  70 24 28 6c 31 25 29 3a  |  g2$=grp$(l1%):|
0001b9f0  61 72 74 73 25 3d 30 3a  66 69 72 73 74 25 3d a4  |arts%=0:first%=.|
0001ba00  66 69 72 73 74 61 72 74  28 6c 31 25 29 0d a9 9c  |firstart(l1%)...|
0001ba10  28 20 20 20 20 66 6c 67  24 3d 22 4c 31 22 3a e7  |(    flg$="L1":.|
0001ba20  a4 64 65 6c 6f 6b 28 67  32 24 29 8c 66 6c 67 24  |.delok(g2$).flg$|
0001ba30  3d 22 4c 30 22 0d a9 a6  53 20 20 20 20 f2 6e 62  |="L0"...S    .nb|
0001ba40  6c 6f 6e 67 72 65 70 6c  79 28 6e 62 66 72 6f 6d  |longreply(nbfrom|
0001ba50  25 2c 6e 62 72 65 66 25  2c 63 6f 6d 25 2c 66 69  |%,nbref%,com%,fi|
0001ba60  72 73 74 25 2c 94 67 72  70 73 65 71 25 28 6c 31  |rst%,.grpseq%(l1|
0001ba70  25 29 2c 94 67 72 70 61  25 28 6c 31 25 29 2c 67  |%),.grpa%(l1%),g|
0001ba80  32 24 2c 66 6c 67 24 29  0d a9 b0 29 20 20 20 20  |2$,flg$)...)    |
0001ba90  63 6e 74 25 2b 3d 31 3a  e7 63 6e 74 25 83 36 3d  |cnt%+=1:.cnt%.6=|
0001baa0  30 20 f2 70 6f 6c 6c 28  73 6c 69 63 65 25 2a 32  |0 .poll(slice%*2|
0001bab0  29 0d a9 ba 07 20 20 cd  0d a9 c4 08 ed 6c 31 25  |)....  ......l1%|
0001bac0  0d a9 ce 2b f2 6e 62 72  65 70 6c 79 28 6e 62 66  |...+.nbreply(nbf|
0001bad0  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 63 6f 6d 25  |rom%,nbref%,com%|
0001bae0  2c 30 2c 30 2c 22 22 2c  22 22 29 0d a9 d8 05 e1  |,0,0,"","").....|
0001baf0  0d a9 e2 04 0d a9 ec 2f  dd f2 6e 65 77 67 72 6f  |......./..newgro|
0001bb00  75 70 6c 69 73 74 28 63  6f 6d 25 2c 6e 62 66 72  |uplist(com%,nbfr|
0001bb10  6f 6d 25 2c 6e 62 72 65  66 25 2c 70 31 25 2c 70  |om%,nbref%,p1%,p|
0001bb20  32 25 29 0d a9 f6 18 ea  6c 61 73 74 64 25 2c 6c  |2%).....lastd%,l|
0001bb30  61 73 74 74 25 2c 61 24  2c 63 25 0d aa 00 25 f2  |astt%,a$,c%...%.|
0001bb40  70 72 69 6e 74 28 22 22  2c a4 6d 73 67 30 28 22  |print("",.msg0("|
0001bb50  47 6c 69 73 74 22 29 2c  22 20 22 2c 22 20 22 29  |Glist")," "," ")|
0001bb60  0d aa 0a 18 66 31 25 3d  a4 6f 70 65 6e 69 6e 28  |....f1%=.openin(|
0001bb70  6e 65 77 67 72 70 24 29  0d aa 14 0b e7 66 31 25  |newgrp$).....f1%|
0001bb80  3d 30 8c 0d aa 1e 37 20  20 f2 6e 62 63 6f 6d 66  |=0....7  .nbcomf|
0001bb90  61 69 6c 28 6e 62 66 72  6f 6d 25 2c 6e 62 72 65  |ail(nbfrom%,nbre|
0001bba0  66 25 2c 63 6f 6d 25 2c  31 2c a4 6d 73 67 30 28  |f%,com%,1,.msg0(|
0001bbb0  22 4e 47 6e 6f 6e 65 22  29 29 0d aa 28 07 20 20  |"NGnone"))..(.  |
0001bbc0  cc 0d aa 32 1c 20 20 6c  61 73 74 64 25 3d 30 3a  |...2.  lastd%=0:|
0001bbd0  6c 61 73 74 74 25 3d 30  3a 63 25 3d 30 0d aa 3c  |lastt%=0:c%=0..<|
0001bbe0  0f 20 20 f5 61 24 3d be  23 66 31 25 0d aa 46 14  |.  .a$=.#f1%..F.|
0001bbf0  20 20 20 20 e7 c0 61 24  2c 31 29 3d 22 23 22 8c  |    ..a$,1)="#".|
0001bc00  0d aa 50 2c 20 20 20 20  20 20 6c 61 73 74 64 25  |..P,      lastd%|
0001bc10  3d bb c1 61 24 2c 33 2c  36 29 3a 6c 61 73 74 74  |=..a$,3,6):lastt|
0001bc20  25 3d bb c1 61 24 2c 31  30 2c 36 29 0d aa 5a 0b  |%=..a$,10,6)..Z.|
0001bc30  20 20 20 20 20 20 cc 0d  aa 64 48 20 20 20 20 20  |      ...dH     |
0001bc40  20 e7 6c 61 73 74 64 25  3e 70 31 25 80 6c 61 73  | .lastd%>p1%.las|
0001bc50  74 74 25 3e 70 32 25 8c  f2 6e 62 72 65 70 6c 79  |tt%>p2%..nbreply|
0001bc60  28 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |(nbfrom%,nbref%,|
0001bc70  63 6f 6d 25 2c 30 2c 30  2c 61 24 2c 22 22 29 0d  |com%,0,0,a$,"").|
0001bc80  aa 6e 26 20 20 20 20 20  20 63 25 2b 3d 31 3a e7  |.n&      c%+=1:.|
0001bc90  63 25 83 31 30 3d 30 8c  f2 70 6f 6c 6c 28 73 6c  |c%.10=0..poll(sl|
0001bca0  69 63 65 25 29 0d aa 78  09 20 20 20 20 cd 0d aa  |ice%)..x.    ...|
0001bcb0  82 0c 20 20 fd c5 23 66  31 25 0d aa 8c 2b f2 6e  |..  ..#f1%...+.n|
0001bcc0  62 72 65 70 6c 79 28 6e  62 66 72 6f 6d 25 2c 6e  |breply(nbfrom%,n|
0001bcd0  62 72 65 66 25 2c 63 6f  6d 25 2c 30 2c 30 2c 22  |bref%,com%,0,0,"|
0001bce0  22 2c 22 22 29 0d aa 96  05 cd 0d aa a0 05 e1 0d  |","")...........|
0001bcf0  aa aa 04 0d aa b4 2a dd  f2 61 64 64 67 72 6f 75  |......*..addgrou|
0001bd00  70 63 6f 6d 28 63 6f 6d  25 2c 6e 62 66 72 6f 6d  |pcom(com%,nbfrom|
0001bd10  25 2c 6e 62 72 65 66 25  2c 67 31 24 29 0d aa be  |%,nbref%,g1$)...|
0001bd20  07 ea 72 24 0d aa c8 15  e7 a4 61 64 64 67 72 70  |..r$......addgrp|
0001bd30  28 67 31 24 2c 72 24 29  8c 0d aa d2 2d 20 20 f2  |(g1$,r$)....-  .|
0001bd40  6e 62 72 65 70 6c 79 28  6e 62 66 72 6f 6d 25 2c  |nbreply(nbfrom%,|
0001bd50  6e 62 72 65 66 25 2c 63  6f 6d 25 2c 30 2c 30 2c  |nbref%,com%,0,0,|
0001bd60  72 24 2c 22 22 29 0d aa  dc 07 20 20 cc 0d aa e6  |r$,"")....  ....|
0001bd70  2a 20 20 f2 6e 62 63 6f  6d 66 61 69 6c 28 6e 62  |*  .nbcomfail(nb|
0001bd80  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 63 6f 6d  |from%,nbref%,com|
0001bd90  25 2c 31 2c 72 24 29 0d  aa f0 05 cd 0d aa fa 05  |%,1,r$).........|
0001bda0  e1 0d ab 04 04 0d ab 0e  15 dd a4 61 64 64 67 72  |...........addgr|
0001bdb0  70 28 67 24 2c f8 20 72  24 29 0d ab 18 07 ea 72  |p(g$,. r$).....r|
0001bdc0  25 0d ab 22 11 67 24 3d  a4 63 6c 65 61 6e 28 67  |%..".g$=.clean(g|
0001bdd0  24 29 0d ab 2c 23 72 24  3d a4 6d 73 67 30 28 22  |$)..,#r$=.msg0("|
0001bde0  52 65 61 64 6f 6e 6c 79  22 29 3a e7 72 77 25 3d  |Readonly"):.rw%=|
0001bdf0  30 8c 3a 3d 30 0d ab 36  2e 72 24 3d a4 6d 73 67  |0.:=0..6.r$=.msg|
0001be00  30 28 22 47 62 61 64 22  29 3a e7 a7 67 24 2c 22  |0("Gbad"):..g$,"|
0001be10  2c 22 29 3e 30 84 a7 67  24 2c 22 20 22 29 3e 30  |,")>0..g$," ")>0|
0001be20  8c 3d 30 0d ab 40 23 72  24 3d a4 6d 73 67 30 28  |.=0..@#r$=.msg0(|
0001be30  22 47 6e 65 67 22 29 3a  e7 c0 67 24 2c 31 29 3d  |"Gneg"):..g$,1)=|
0001be40  22 21 22 8c 3d 30 0d ab  4a 27 72 24 3d a4 6d 73  |"!".=0..J'r$=.ms|
0001be50  67 30 28 22 47 61 63 74  22 29 3a e7 a4 61 63 74  |g0("Gact"):..act|
0001be60  69 76 65 28 67 24 29 3c  3e 30 8c 3d 30 0d ab 54  |ive(g$)<>0.=0..T|
0001be70  24 72 25 3d a4 72 75 6e  74 72 61 6e 73 70 6f 72  |$r%=.runtranspor|
0001be80  74 66 69 6c 65 28 39 2c  22 22 2c 67 24 2c 22 22  |tfile(9,"",g$,""|
0001be90  29 0d ab 5e 25 72 24 3d  a4 76 61 72 76 61 6c 28  |)..^%r$=.varval(|
0001bea0  22 4e 65 77 73 62 61 73  65 24 52 65 74 75 72 6e  |"Newsbase$Return|
0001beb0  49 6e 66 6f 22 29 0d ab  68 09 c8 8e 72 25 ca 0d  |Info")..h...r%..|
0001bec0  ab 72 50 20 20 c9 30 3a  e7 a4 72 75 6e 74 72 61  |.rP  .0:..runtra|
0001bed0  6e 73 70 6f 72 74 66 69  6c 65 28 31 34 2c 22 22  |nsportfile(14,""|
0001bee0  2c 22 22 2c 22 22 29 3d  30 8c f2 72 65 61 64 6e  |,"","")=0..readn|
0001bef0  65 77 73 72 63 3a f2 6c  6f 67 28 a4 6d 73 67 31  |ewsrc:.log(.msg1|
0001bf00  28 22 4c 61 64 64 67 72  70 22 2c 67 24 29 29 0d  |("Laddgrp",g$)).|
0001bf10  ab 7c 05 cb 0d ab 86 0b  3d 28 72 25 3d 30 29 0d  |.|......=(r%=0).|
0001bf20  ab 90 04 0d ab 9a 2a dd  f2 64 65 6c 67 72 6f 75  |......*..delgrou|
0001bf30  70 63 6f 6d 28 63 6f 6d  25 2c 6e 62 66 72 6f 6d  |pcom(com%,nbfrom|
0001bf40  25 2c 6e 62 72 65 66 25  2c 67 31 24 29 0d ab a4  |%,nbref%,g1$)...|
0001bf50  07 ea 72 24 0d ab ae 15  e7 a4 64 65 6c 67 72 70  |..r$......delgrp|
0001bf60  28 67 31 24 2c 72 24 29  8c 0d ab b8 2d 20 20 f2  |(g1$,r$)....-  .|
0001bf70  6e 62 72 65 70 6c 79 28  6e 62 66 72 6f 6d 25 2c  |nbreply(nbfrom%,|
0001bf80  6e 62 72 65 66 25 2c 63  6f 6d 25 2c 30 2c 30 2c  |nbref%,com%,0,0,|
0001bf90  72 24 2c 22 22 29 0d ab  c2 07 20 20 cc 0d ab cc  |r$,"")....  ....|
0001bfa0  2a 20 20 f2 6e 62 63 6f  6d 66 61 69 6c 28 6e 62  |*  .nbcomfail(nb|
0001bfb0  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 63 6f 6d  |from%,nbref%,com|
0001bfc0  25 2c 31 2c 72 24 29 0d  ab d6 05 cd 0d ab e0 05  |%,1,r$).........|
0001bfd0  e1 0d ab ea 04 0d ab f4  15 dd a4 64 65 6c 67 72  |...........delgr|
0001bfe0  70 28 67 24 2c f8 20 72  24 29 0d ab fe 1a ea 67  |p(g$,. r$).....g|
0001bff0  72 70 64 65 6c 25 2c 6c  31 25 2c 46 25 2c 70 24  |rpdel%,l1%,F%,p$|
0001c000  2c 67 31 24 0d ac 08 11  67 24 3d a4 63 6c 65 61  |,g1$....g$=.clea|
0001c010  6e 28 67 24 29 0d ac 12  23 72 24 3d a4 6d 73 67  |n(g$)...#r$=.msg|
0001c020  30 28 22 52 65 61 64 6f  6e 6c 79 22 29 3a e7 72  |0("Readonly"):.r|
0001c030  77 25 3d 30 8c 3a 3d 30  0d ac 1c 2e 72 24 3d a4  |w%=0.:=0....r$=.|
0001c040  6d 73 67 30 28 22 47 62  61 64 22 29 3a e7 a7 67  |msg0("Gbad"):..g|
0001c050  24 2c 22 2c 22 29 3e 30  84 a7 67 24 2c 22 20 22  |$,",")>0..g$," "|
0001c060  29 3e 30 8c 3d 30 0d ac  26 23 72 24 3d a4 6d 73  |)>0.=0..&#r$=.ms|
0001c070  67 30 28 22 47 6e 65 67  22 29 3a e7 c0 67 24 2c  |g0("Gneg"):..g$,|
0001c080  31 29 3d 22 21 22 8c 3d  30 0d ac 30 29 72 24 3d  |1)="!".=0..0)r$=|
0001c090  a4 6d 73 67 30 28 22 47  6e 6f 74 61 63 74 22 29  |.msg0("Gnotact")|
0001c0a0  3a e7 a4 61 63 74 69 76  65 28 67 24 29 3d 30 8c  |:..active(g$)=0.|
0001c0b0  3d 30 0d ac 3a 2e 72 24  3d a4 6d 73 67 30 28 22  |=0..:.r$=.msg0("|
0001c0c0  47 73 70 65 63 69 61 6c  22 29 3a e7 a4 73 70 65  |Gspecial"):..spe|
0001c0d0  63 69 61 6c 67 72 70 28  67 24 29 3e 30 8c 3d 30  |cialgrp(g$)>0.=0|
0001c0e0  0d ac 44 2a 67 72 70 64  65 6c 25 3d a4 72 75 6e  |..D*grpdel%=.run|
0001c0f0  74 72 61 6e 73 70 6f 72  74 66 69 6c 65 28 31 30  |transportfile(10|
0001c100  2c 22 22 2c 67 24 2c 22  22 29 0d ac 4e 25 72 24  |,"",g$,"")..N%r$|
0001c110  3d a4 76 61 72 76 61 6c  28 22 4e 65 77 73 62 61  |=.varval("Newsba|
0001c120  73 65 24 52 65 74 75 72  6e 49 6e 66 6f 22 29 0d  |se$ReturnInfo").|
0001c130  ac 58 0f e7 67 72 70 64  65 6c 25 3d 30 8c 0d ac  |.X..grpdel%=0...|
0001c140  62 1e 20 20 f2 6c 6f 67  28 a4 6d 73 67 31 28 22  |b.  .log(.msg1("|
0001c150  4c 72 6d 67 72 70 22 2c  67 24 29 29 0d ac 6c 33  |Lrmgrp",g$))..l3|
0001c160  20 20 e7 a4 72 75 6e 74  72 61 6e 73 70 6f 72 74  |  ..runtransport|
0001c170  66 69 6c 65 28 31 34 2c  22 22 2c 22 22 2c 22 22  |file(14,"","",""|
0001c180  29 3d 30 8c f2 72 65 61  64 6e 65 77 73 72 63 0d  |)=0..readnewsrc.|
0001c190  ac 76 2f 20 20 e7 a4 63  6f 6e 66 69 72 6d 28 a4  |.v/  ..confirm(.|
0001c1a0  6d 73 67 30 28 22 47 72  65 6d 6f 76 65 22 29 29  |msg0("Gremove"))|
0001c1b0  3d 31 8c f2 64 65 6c 67  72 70 28 67 24 29 0d ac  |=1..delgrp(g$)..|
0001c1c0  80 05 cd 0d ac 8a 10 3d  28 67 72 70 64 65 6c 25  |.......=(grpdel%|
0001c1d0  3d 30 29 0d ac 94 04 0d  ac 9e 10 dd f2 64 65 6c  |=0)..........del|
0001c1e0  67 72 70 28 67 24 29 0d  ac a8 12 ea 6c 31 25 2c  |grp(g$).....l1%,|
0001c1f0  46 25 2c 67 31 24 2c 70  24 0d ac b2 17 e7 a4 62  |F%,g1$,p$......b|
0001c200  75 73 79 6f 6e 28 22 42  64 65 6c 22 29 3d 30 8c  |usyon("Bdel")=0.|
0001c210  0d ac bc 20 20 20 6c 31  25 3d 30 3a c8 95 6c 31  |...   l1%=0:..l1|
0001c220  25 3c 67 72 6f 75 70 73  25 3a 6c 31 25 2b 3d 31  |%<groups%:l1%+=1|
0001c230  0d ac c6 1a 20 20 20 20  e7 a4 67 6d 61 74 63 68  |....    ..gmatch|
0001c240  28 67 24 2c 6c 31 25 29  20 8c 0d ac d0 25 20 20  |(g$,l1%) ....%  |
0001c250  20 20 20 20 67 31 24 3d  67 72 70 24 28 6c 31 25  |    g1$=grp$(l1%|
0001c260  29 3a 70 24 3d a4 70 61  74 68 28 67 31 24 29 0d  |):p$=.path(g1$).|
0001c270  ac da 25 20 20 20 20 20  20 46 25 3d a4 65 78 70  |..%      F%=.exp|
0001c280  69 72 65 64 69 72 28 70  24 2c 6c 31 25 2c 30 2c  |iredir(p$,l1%,0,|
0001c290  b9 2c 30 29 0d ac e4 39  20 20 20 20 20 20 e7 a4  |.,0)...9      ..|
0001c2a0  6f 62 6a 74 79 70 65 28  70 24 2b 22 2e 7e 78 22  |objtype(p$+".~x"|
0001c2b0  29 3d 30 84 a4 6f 62 6a  74 79 70 65 28 70 24 2b  |)=0..objtype(p$+|
0001c2c0  22 2e 7e 69 6e 64 65 78  22 29 3d 30 8c 0d ac ee  |".~index")=0....|
0001c2d0  3d 20 20 20 20 20 20 20  20 46 25 3d a4 64 65 6c  |=        F%=.del|
0001c2e0  66 69 6c 65 28 70 24 2b  22 2e 7e 69 6e 64 65 78  |file(p$+".~index|
0001c2f0  22 29 3a 46 25 3d a4 64  65 6c 66 69 6c 65 28 70  |"):F%=.delfile(p|
0001c300  24 2b 22 2e 7e 73 65 71  22 29 0d ac f8 1b 20 20  |$+".~seq")....  |
0001c310  20 20 20 20 20 20 46 25  3d a4 64 65 6c 66 69 6c  |      F%=.delfil|
0001c320  65 28 70 24 29 0d ad 02  35 20 20 20 20 20 20 20  |e(p$)...5       |
0001c330  20 46 25 3d 30 3a c8 95  46 25 3d 30 3a 70 24 3d  | F%=0:..F%=0:p$=|
0001c340  a4 64 69 72 28 70 24 29  3a 46 25 3d a4 64 65 6c  |.dir(p$):F%=.del|
0001c350  66 69 6c 65 28 70 24 29  3a ce 0d ad 0c 3b 20 20  |file(p$):....;  |
0001c360  20 20 20 20 20 20 6c 31  25 2d 3d 31 3a f2 72 6d  |      l1%-=1:.rm|
0001c370  67 72 70 6c 69 73 74 28  67 31 24 29 3a f2 6e 62  |grplist(g1$):.nb|
0001c380  75 70 64 61 74 65 28 31  2c 67 31 24 2c 30 2c 22  |update(1,g1$,0,"|
0001c390  22 2c 22 22 29 0d ad 16  26 20 20 20 20 20 20 20  |","")...&       |
0001c3a0  20 f2 6c 6f 67 28 a4 6d  73 67 31 28 22 4c 64 65  | .log(.msg1("Lde|
0001c3b0  6c 67 72 70 22 2c 67 31  24 29 29 0d ad 20 0b 20  |lgrp",g1$)).. . |
0001c3c0  20 20 20 20 20 cd 0d ad  2a 09 20 20 20 20 cd 0d  |     ...*.    ..|
0001c3d0  ad 34 07 20 20 ce 0d ad  3e 0e 20 20 f2 62 75 73  |.4.  ...>.  .bus|
0001c3e0  79 6f 66 66 0d ad 48 05  cd 0d ad 52 05 e1 0d ad  |yoff..H....R....|
0001c3f0  5c 04 0d ad 66 2b dd f2  65 78 70 67 72 70 63 6f  |\...f+..expgrpco|
0001c400  6d 28 63 6f 6d 25 2c 6e  62 66 72 6f 6d 25 2c 6e  |m(com%,nbfrom%,n|
0001c410  62 72 65 66 25 2c 67 31  24 2c 70 25 29 0d ad 70  |bref%,g1$,p%)..p|
0001c420  2b f2 6e 62 72 65 70 6c  79 28 6e 62 66 72 6f 6d  |+.nbreply(nbfrom|
0001c430  25 2c 6e 62 72 65 66 25  2c 63 6f 6d 25 2c 30 2c  |%,nbref%,com%,0,|
0001c440  30 2c 22 22 2c 22 22 29  0d ad 7a 19 e7 72 77 25  |0,"","")..z..rw%|
0001c450  8c f2 65 78 70 67 72 6f  75 70 28 67 31 24 2c 30  |..expgroup(g1$,0|
0001c460  29 0d ad 84 05 e1 0d ad  8e 04 0d ad 98 34 dd f2  |)............4..|
0001c470  73 65 6e 64 69 6e 64 65  78 6c 69 73 74 28 63 6f  |sendindexlist(co|
0001c480  6d 25 2c 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |m%,nbfrom%,nbref|
0001c490  25 2c 67 31 24 2c 6e 31  25 2c 6e 32 25 29 0d ad  |%,g1$,n1%,n2%)..|
0001c4a0  a2 46 ea 66 70 74 72 25  2c 69 6d 65 6d 25 2c 69  |.F.fptr%,imem%,i|
0001c4b0  62 72 25 2c 72 33 25 2c  75 25 2c 75 24 2c 61 72  |br%,r3%,u%,u$,ar|
0001c4c0  74 25 2c 69 6d 70 25 2c  61 6c 6f 6f 70 25 2c 65  |t%,imp%,aloop%,e|
0001c4d0  6e 64 6c 25 2c 72 65 63  74 79 70 65 25 2c 74 6f  |ndl%,rectype%,to|
0001c4e0  74 61 6c 25 0d ad ac 18  ea 72 63 6f 6d 25 2c 72  |tal%.....rcom%,r|
0001c4f0  6f 75 74 65 25 2c 69 66  69 6c 65 24 0d ad b6 48  |oute%,ifile$...H|
0001c500  f4 20 6c 6f 63 61 6c 20  66 36 25 20 66 69 6c 65  |. local f6% file|
0001c510  68 61 6e 64 6c 65 20 6e  6f 74 20 72 65 61 6c 6c  |handle not reall|
0001c520  79 20 64 65 73 69 72 61  62 6c 65 20 62 75 74 20  |y desirable but |
0001c530  70 65 72 6d 69 74 73 20  72 65 2d 65 6e 74 72 61  |permits re-entra|
0001c540  6e 63 79 2e 0d ad c0 08  ea 66 36 25 0d ad ca 10  |ncy......f6%....|
0001c550  ea 41 24 2c 42 24 2c 43  24 2c 44 24 0d ad d4 22  |.A$,B$,C$,D$..."|
0001c560  f2 61 64 64 64 65 6c 62  75 66 28 30 2c 30 29 3a  |.adddelbuf(0,0):|
0001c570  e7 6e 32 25 3d 30 8c 6e  32 25 3d 31 45 36 0d ad  |.n2%=0.n2%=1E6..|
0001c580  de 2e 72 63 6f 6d 25 3d  63 6f 6d 25 83 36 35 35  |..rcom%=com%.655|
0001c590  33 36 3a 72 6f 75 74 65  25 3d 36 35 35 33 36 2a  |36:route%=65536*|
0001c5a0  28 63 6f 6d 25 81 36 35  35 33 36 29 0d ad e8 25  |(com%.65536)...%|
0001c5b0  e7 75 73 65 72 63 74 72  6c 25 3c 3e 30 80 a4 73  |.userctrl%<>0..s|
0001c5c0  70 65 63 69 61 6c 67 72  70 28 67 31 24 29 3d 32  |pecialgrp(g1$)=2|
0001c5d0  8c 0d ad f2 39 20 20 75  25 3d a4 66 69 6e 64 63  |....9  u%=.findc|
0001c5e0  6c 28 6e 62 66 72 6f 6d  25 29 3a e7 75 25 3e 3d  |l(nbfrom%):.u%>=|
0001c5f0  30 8c 75 25 3d a4 75 73  65 72 6e 6f 28 63 6c 5f  |0.u%=.userno(cl_|
0001c600  75 73 65 72 24 28 75 25  29 29 0d ad fc 0c 20 20  |user$(u%))....  |
0001c610  e7 75 25 3e 30 8c 0d ae  06 25 20 20 20 20 75 24  |.u%>0....%    u$|
0001c620  3d 22 65 6d 61 69 6c 2e  22 2b a4 6c 6f 77 65 72  |="email."+.lower|
0001c630  28 75 73 65 72 24 28 75  25 29 29 0d ae 10 5b 20  |(user$(u%))...[ |
0001c640  20 20 20 e7 75 24 3c 3e  c0 a4 6c 6f 77 65 72 28  |   .u$<>..lower(|
0001c650  67 31 24 29 2c a9 75 24  29 80 75 67 72 70 25 28  |g1$),.u$).ugrp%(|
0001c660  75 25 29 3e 39 8c f2 6e  62 63 6f 6d 66 61 69 6c  |u%)>9..nbcomfail|
0001c670  28 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |(nbfrom%,nbref%,|
0001c680  63 25 2c 31 2c a4 6d 73  67 30 28 22 47 64 65 6e  |c%,1,.msg0("Gden|
0001c690  79 22 29 29 3a e1 0d ae  1a 07 20 20 cd 0d ae 24  |y")):.....  ...$|
0001c6a0  05 cd 0d ae 2e 1f 69 66  69 6c 65 24 3d a4 70 61  |......ifile$=.pa|
0001c6b0  74 68 28 67 31 24 29 2b  22 2e 7e 69 6e 64 65 78  |th(g1$)+".~index|
0001c6c0  22 0d ae 38 17 66 36 25  3d a4 6f 70 65 6e 69 6e  |"..8.f6%=.openin|
0001c6d0  28 69 66 69 6c 65 24 29  0d ae 42 0b e7 66 36 25  |(ifile$)..B..f6%|
0001c6e0  3d 30 8c 0d ae 4c 1a 20  20 e7 a4 6f 62 6a 74 79  |=0...L.  ..objty|
0001c6f0  70 65 28 69 66 69 6c 65  24 29 3d 31 8c 0d ae 56  |pe(ifile$)=1...V|
0001c700  22 20 20 f2 6d 65 73 73  61 67 65 31 28 22 49 72  |"  .message1("Ir|
0001c710  65 61 64 66 61 69 6c 22  2c 67 31 24 2c 31 29 0d  |eadfail",g1$,1).|
0001c720  ae 60 07 20 20 cc 0d ae  6a 2f 20 20 f2 6d 65 73  |.`.  ...j/  .mes|
0001c730  73 61 67 65 31 28 22 49  72 65 62 75 69 6c 64 22  |sage1("Irebuild"|
0001c740  2c 67 31 24 2c 30 29 3a  f2 72 65 69 6e 64 65 78  |,g1$,0):.reindex|
0001c750  28 67 31 24 29 0d ae 74  14 20 20 f2 6d 65 73 73  |(g1$)..t.  .mess|
0001c760  61 67 65 28 22 22 2c 30  29 0d ae 7e 19 20 20 66  |age("",0)..~.  f|
0001c770  36 25 3d a4 6f 70 65 6e  69 6e 28 69 66 69 6c 65  |6%=.openin(ifile|
0001c780  24 29 0d ae 88 07 20 20  cd 0d ae 92 05 cd 0d ae  |$)....  ........|
0001c790  9c 0c e7 66 36 25 3c 3e  30 8c 0d ae a6 0d 20 20  |...f6%<>0.....  |
0001c7a0  66 70 74 72 25 3d 30 0d  ae b0 28 20 20 e7 72 63  |fptr%=0...(  .rc|
0001c7b0  6f 6d 25 3d 32 30 30 8c  41 24 3d 22 41 6c 69 73  |om%=200.A$="Alis|
0001c7c0  74 31 22 8b 41 24 3d 22  41 6c 69 73 74 32 22 0d  |t1".A$="Alist2".|
0001c7d0  ae ba 22 20 20 f2 70 72  69 6e 74 28 22 22 2c a4  |.."  .print("",.|
0001c7e0  6d 73 67 30 28 41 24 29  2c 22 20 22 2c 22 20 22  |msg0(A$)," "," "|
0001c7f0  29 0d ae c4 2d 20 20 69  62 72 25 3d a4 63 6c 61  |)...-  ibr%=.cla|
0001c800  69 6d 28 69 6d 65 6d 25  2c 34 30 30 30 2c 22 6c  |im(imem%,4000,"l|
0001c810  69 73 74 22 29 3a e7 69  62 72 25 3e 30 8c 0d ae  |ist"):.ibr%>0...|
0001c820  ce 07 20 20 f5 0d ae d8  44 20 20 20 20 21 69 6d  |..  ....D    !im|
0001c830  65 6d 25 3d 30 3a c8 99  22 58 4f 53 5f 47 42 50  |em%=0:.."XOS_GBP|
0001c840  42 22 2c 33 2c 66 36 25  2c 69 6d 65 6d 25 2c 34  |B",3,f6%,imem%,4|
0001c850  30 30 30 2c 66 70 74 72  25 b8 2c 2c 2c 72 33 25  |000,fptr%.,,,r3%|
0001c860  2c 66 70 74 72 25 3b 46  25 0d ae e2 10 20 20 20  |,fptr%;F%....   |
0001c870  20 e7 28 46 25 80 31 29  8c 0d ae ec 2c 20 20 20  | .(F%.1)....,   |
0001c880  20 20 20 f2 6d 65 73 73  61 67 65 31 28 22 49 72  |   .message1("Ir|
0001c890  65 61 64 66 61 69 6c 22  2c 67 31 24 2c 31 29 3a  |eadfail",g1$,1):|
0001c8a0  72 33 25 3d 31 0d ae f6  0b 20 20 20 20 20 20 cc  |r3%=1....      .|
0001c8b0  0d af 00 29 20 20 20 20  20 20 69 6d 70 25 3d 69  |...)      imp%=i|
0001c8c0  6d 65 6d 25 3a 65 6e 64  6c 25 3d 28 34 30 30 30  |mem%:endl%=(4000|
0001c8d0  2d 72 33 25 29 81 32 30  30 0d af 0a 24 20 20 20  |-r3%).200...$   |
0001c8e0  20 20 20 e3 61 6c 6f 6f  70 25 3d 31 b8 65 6e 64  |   .aloop%=1.end|
0001c8f0  6c 25 3a 61 72 74 25 3d  21 69 6d 70 25 0d af 14  |l%:art%=!imp%...|
0001c900  28 20 20 20 20 20 20 e7  28 61 72 74 25 3e 3d 6e  |(      .(art%>=n|
0001c910  31 25 80 61 72 74 25 3c  3d 6e 32 25 29 80 61 72  |1%.art%<=n2%).ar|
0001c920  74 25 3e 30 8c 0d af 1e  37 20 20 20 20 20 20 20  |t%>0....7       |
0001c930  20 69 6d 70 25 3f 31 39  39 3d 30 3a 41 24 3d a4  | imp%?199=0:A$=.|
0001c940  73 74 72 28 69 6d 70 25  2b 32 30 29 3a 72 65 63  |str(imp%+20):rec|
0001c950  74 79 70 65 25 3d 69 6d  70 25 21 34 0d af 28 17  |type%=imp%!4..(.|
0001c960  20 20 20 20 20 20 20 20  c8 8e 72 65 63 74 79 70  |        ..rectyp|
0001c970  65 25 ca 0d af 32 3c 20  20 20 20 20 20 20 20 c9  |e%...2<        .|
0001c980  31 3a 42 24 3d a4 73 74  72 28 69 6d 70 25 2b 32  |1:B$=.str(imp%+2|
0001c990  31 2b a9 41 24 29 3a 43  24 3d a4 73 74 72 28 69  |1+.A$):C$=.str(i|
0001c9a0  6d 70 25 2b 32 32 2b a9  41 24 2b a9 42 24 29 0d  |mp%+22+.A$+.B$).|
0001c9b0  af 3c 34 20 20 20 20 20  20 20 20 20 20 44 24 3d  |.<4          D$=|
0001c9c0  a4 73 74 72 28 69 6d 70  25 2b 32 33 2b a9 41 24  |.str(imp%+23+.A$|
0001c9d0  2b a9 42 24 2b a9 43 24  29 3a 74 6f 74 61 6c 25  |+.B$+.C$):total%|
0001c9e0  2b 3d 31 0d af 46 4b 20  20 20 20 20 20 20 20 20  |+=1..FK         |
0001c9f0  20 f2 6e 62 6c 6f 6e 67  72 65 70 6c 79 32 28 6e  | .nblongreply2(n|
0001ca00  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 2c 32 30  |bfrom%,nbref%,20|
0001ca10  30 2b 72 6f 75 74 65 25  2c 61 72 74 25 2c 69 6d  |0+route%,art%,im|
0001ca20  70 25 21 38 2c 42 24 2c  43 24 2c 41 24 29 0d af  |p%!8,B$,C$,A$)..|
0001ca30  50 43 20 20 20 20 20 20  20 20 20 20 e7 72 63 6f  |PC          .rco|
0001ca40  6d 25 3d 32 31 30 8c f2  6e 62 72 65 70 6c 79 28  |m%=210..nbreply(|
0001ca50  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 63  |nbfrom%,nbref%,c|
0001ca60  6f 6d 25 2c 61 72 74 25  2c 30 2c 44 24 2c 22 22  |om%,art%,0,D$,""|
0001ca70  29 0d af 5a 44 20 20 20  20 20 20 20 20 c9 32 3a  |)..ZD        .2:|
0001ca80  e7 72 63 6f 6d 25 3d 32  31 30 8c f2 6e 62 72 65  |.rcom%=210..nbre|
0001ca90  70 6c 79 28 6e 62 66 72  6f 6d 25 2c 6e 62 72 65  |ply(nbfrom%,nbre|
0001caa0  66 25 2c 63 6f 6d 25 2c  61 72 74 25 2c 30 2c 41  |f%,com%,art%,0,A|
0001cab0  24 2c 22 22 29 0d af 64  22 20 20 20 20 20 20 20  |$,"")..d"       |
0001cac0  20 7f 3a 42 24 3d a4 73  74 72 28 69 6d 70 25 2b  | .:B$=.str(imp%+|
0001cad0  32 31 2b a9 41 24 29 0d  af 6e 30 20 20 20 20 20  |21+.A$)..n0     |
0001cae0  20 20 20 20 20 43 24 3d  a4 73 74 72 28 69 6d 70  |     C$=.str(imp|
0001caf0  25 2b 32 32 2b a9 41 24  2b a9 42 24 29 3a 74 6f  |%+22+.A$+.B$):to|
0001cb00  74 61 6c 25 2b 3d 31 0d  af 78 4b 20 20 20 20 20  |tal%+=1..xK     |
0001cb10  20 20 20 20 20 f2 6e 62  6c 6f 6e 67 72 65 70 6c  |     .nblongrepl|
0001cb20  79 32 28 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |y2(nbfrom%,nbref|
0001cb30  25 2c 32 30 30 2b 72 6f  75 74 65 25 2c 61 72 74  |%,200+route%,art|
0001cb40  25 2c 69 6d 70 25 21 38  2c 42 24 2c 43 24 2c 41  |%,imp%!8,B$,C$,A|
0001cb50  24 29 0d af 82 0d 20 20  20 20 20 20 20 20 cb 0d  |$)....        ..|
0001cb60  af 8c 0b 20 20 20 20 20  20 cd 0d af 96 29 20 20  |...      ....)  |
0001cb70  20 20 20 20 69 6d 70 25  2b 3d 32 30 30 3a ed 61  |    imp%+=200:.a|
0001cb80  6c 6f 6f 70 25 3a f2 70  6f 6c 6c 28 73 6c 69 63  |loop%:.poll(slic|
0001cb90  65 25 29 0d af a0 09 20  20 20 20 cd 0d af aa 15  |e%)....    .....|
0001cba0  20 20 fd 72 33 25 3e 30  84 61 72 74 25 3e 6e 32  |  .r3%>0.art%>n2|
0001cbb0  25 0d af b4 33 20 20 f2  72 65 6c 65 61 73 65 28  |%...3  .release(|
0001cbc0  69 62 72 25 29 3a 67 72  70 61 25 28 a4 6e 61 6d  |ibr%):grpa%(.nam|
0001cbd0  65 74 6f 6e 6f 28 67 31  24 2c 30 29 29 3d 74 6f  |etono(g1$,0))=to|
0001cbe0  74 61 6c 25 0d af be 07  20 20 cd 0d af c8 0e 20  |tal%....  ..... |
0001cbf0  20 f2 63 66 28 66 36 25  29 0d af d2 33 20 20 f2  | .cf(f6%)...3  .|
0001cc00  6e 62 72 65 70 6c 79 28  6e 62 66 72 6f 6d 25 2c  |nbreply(nbfrom%,|
0001cc10  6e 62 72 65 66 25 2c 32  30 30 2b 72 6f 75 74 65  |nbref%,200+route|
0001cc20  25 2c 30 2c 30 2c 22 22  2c 22 22 29 0d af dc 07  |%,0,0,"","")....|
0001cc30  20 20 cc 0d af e6 20 20  20 f4 20 6e 6f 20 61 72  |  ....   . no ar|
0001cc40  74 69 63 6c 65 73 20 61  76 61 69 6c 61 62 6c 65  |ticles available|
0001cc50  2e 2e 2e 0d af f0 4e 20  20 f4 20 75 73 65 64 20  |......N  . used |
0001cc60  74 6f 20 75 73 65 20 50  52 4f 43 6e 62 63 6f 6d  |to use PROCnbcom|
0001cc70  66 61 69 6c 28 6e 62 66  72 6f 6d 25 2c 6e 62 72  |fail(nbfrom%,nbr|
0001cc80  65 66 25 2c 32 30 30 2b  72 6f 75 74 65 25 2c 32  |ef%,200+route%,2|
0001cc90  2c 46 4e 6d 73 67 30 28  22 41 6e 6f 6e 65 22 29  |,FNmsg0("Anone")|
0001cca0  29 0d af fa 33 20 20 f2  6e 62 72 65 70 6c 79 28  |)...3  .nbreply(|
0001ccb0  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 32  |nbfrom%,nbref%,2|
0001ccc0  30 30 2b 72 6f 75 74 65  25 2c 30 2c 30 2c 22 22  |00+route%,0,0,""|
0001ccd0  2c 22 22 29 0d b0 04 05  cd 0d b0 0e 05 e1 0d b0  |,"")............|
0001cce0  18 04 0d b0 22 2c dd f2  73 65 6e 64 61 72 74 6e  |....",..sendartn|
0001ccf0  61 6d 65 28 63 6f 6d 25  2c 6e 62 66 72 6f 6d 25  |ame(com%,nbfrom%|
0001cd00  2c 6e 62 72 65 66 25 2c  67 24 2c 61 25 29 0d b0  |,nbref%,g$,a%)..|
0001cd10  2c 20 ea 66 24 2c 73 25  2c 66 25 2c 74 25 2c 69  |, .f$,s%,f%,t%,i|
0001cd20  6e 66 6f 24 3a 69 6e 66  6f 24 3d 22 4c 22 0d b0  |nfo$:info$="L"..|
0001cd30  36 16 67 25 3d a4 6e 61  6d 65 74 6f 6e 6f 28 67  |6.g%=.nametono(g|
0001cd40  24 2c 30 29 0d b0 40 10  e7 67 25 3e 30 80 61 25  |$,0)..@..g%>0.a%|
0001cd50  3e 30 20 8c 0d b0 4a 2c  20 20 66 24 3d a4 66 69  |>0 ...J,  f$=.fi|
0001cd60  6e 64 66 69 6c 65 28 67  25 2c 61 25 2c b9 29 3a  |ndfile(g%,a%,.):|
0001cd70  74 25 3d a4 66 69 6c 65  74 79 70 65 28 66 24 29  |t%=.filetype(f$)|
0001cd80  0d b0 54 10 20 20 e7 74  25 3d 26 46 43 41 20 8c  |..T.  .t%=&FCA .|
0001cd90  0d b0 5e 3c 20 20 20 20  f2 6e 62 63 6f 6d 66 61  |..^<    .nbcomfa|
0001cda0  69 6c 28 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |il(nbfrom%,nbref|
0001cdb0  25 2c 63 6f 6d 25 2c 31  2c a4 6d 73 67 30 28 22  |%,com%,1,.msg0("|
0001cdc0  43 6f 6d 70 46 61 69 6c  33 22 29 29 0d b0 68 09  |CompFail3"))..h.|
0001cdd0  20 20 20 20 cc 0d b0 72  0f 20 20 20 20 e7 66 24  |    ...r.    .f$|
0001cde0  3e 22 22 8c 0d b0 7c 2b  20 20 20 20 20 20 73 25  |>""...|+      s%|
0001cdf0  3d a4 66 69 6c 65 73 69  7a 65 28 66 24 29 3a 66  |=.filesize(f$):f|
0001ce00  25 3d a4 66 69 6c 65 61  74 74 72 28 66 24 29 0d  |%=.fileattr(f$).|
0001ce10  b0 86 2a 20 20 20 20 20  20 e7 28 66 25 80 38 29  |..*      .(f%.8)|
0001ce20  3c 3e 30 8c 69 6e 66 6f  24 2b 3d 22 31 22 8b 69  |<>0.info$+="1".i|
0001ce30  6e 66 6f 24 2b 3d 22 30  22 0d b0 90 36 20 20 20  |nfo$+="0"...6   |
0001ce40  20 20 20 f2 6e 62 72 65  70 6c 79 28 6e 62 66 72  |   .nbreply(nbfr|
0001ce50  6f 6d 25 2c 6e 62 72 65  66 25 2c 63 6f 6d 25 2c  |om%,nbref%,com%,|
0001ce60  61 25 2c 73 25 2c 66 24  2c 69 6e 66 6f 24 29 0d  |a%,s%,f$,info$).|
0001ce70  b0 9a 0b 20 20 20 20 20  20 cc 0d b0 a4 4c 20 20  |...      ....L  |
0001ce80  20 20 20 20 f2 61 64 64  64 65 6c 62 75 66 28 67  |    .adddelbuf(g|
0001ce90  25 2c 61 25 29 3a f2 6e  62 63 6f 6d 66 61 69 6c  |%,a%):.nbcomfail|
0001cea0  28 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |(nbfrom%,nbref%,|
0001ceb0  63 6f 6d 25 2c 31 2c a4  6d 73 67 30 28 22 41 66  |com%,1,.msg0("Af|
0001cec0  61 69 6c 22 29 29 0d b0  ae 09 20 20 20 20 cd 0d  |ail"))....    ..|
0001ced0  b0 b8 07 20 20 cd 0d b0  c2 07 20 20 cc 0d b0 cc  |...  .....  ....|
0001cee0  37 20 20 f2 6e 62 63 6f  6d 66 61 69 6c 28 6e 62  |7  .nbcomfail(nb|
0001cef0  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 63 6f 6d  |from%,nbref%,com|
0001cf00  25 2c 31 2c a4 6d 73 67  30 28 22 41 66 61 69 6c  |%,1,.msg0("Afail|
0001cf10  32 22 29 29 0d b0 d6 05  cd 0d b0 e0 05 e1 0d b0  |2"))............|
0001cf20  ea 04 0d b0 f4 32 dd f2  6c 6f 63 6b 61 72 74 6c  |.....2..lockartl|
0001cf30  69 73 74 28 63 6f 6d 25  2c 6e 62 66 72 6f 6d 25  |ist(com%,nbfrom%|
0001cf40  2c 6e 62 72 65 66 25 2c  67 31 24 2c 6e 31 25 2c  |,nbref%,g1$,n1%,|
0001cf50  6e 32 25 29 0d b0 fe 15  ea 6c 25 2c 67 25 2c 61  |n2%).....l%,g%,a|
0001cf60  24 2c 66 24 2c 61 63 74  24 0d b1 08 09 e7 72 77  |$,f$,act$.....rw|
0001cf70  25 8c 0d b1 12 3b 20 20  67 25 3d a4 6e 61 6d 65  |%....;  g%=.name|
0001cf80  74 6f 6e 6f 28 67 31 24  2c 30 29 3a 61 24 3d 22  |tono(g1$,0):a$="|
0001cf90  52 22 3a 61 63 74 24 3d  22 22 3a 6e 32 25 3d a4  |R":act$="":n2%=.|
0001cfa0  75 70 6c 69 6d 28 67 25  2c 6e 32 25 29 0d b1 1c  |uplim(g%,n2%)...|
0001cfb0  26 20 20 e7 63 6f 6d 25  83 36 35 35 33 36 3d 32  |&  .com%.65536=2|
0001cfc0  33 30 61 24 2b 3d 22 4c  22 8b 61 63 74 24 3d 22  |30a$+="L".act$="|
0001cfd0  75 6e 22 0d b1 26 0c 20  20 e7 67 25 3e 30 8c 0d  |un"..&.  .g%>0..|
0001cfe0  b1 30 13 20 20 20 20 e3  6c 25 3d 6e 31 25 b8 6e  |.0.    .l%=n1%.n|
0001cff0  32 25 0d b1 3a 40 20 20  20 20 20 20 66 24 3d a4  |2%..:@      f$=.|
0001d000  66 69 6e 64 66 69 6c 65  28 67 25 2c 6c 25 2c a3  |findfile(g%,l%,.|
0001d010  29 3a e7 66 24 3e 22 22  c8 99 22 58 4f 53 5f 46  |):.f$>"".."XOS_F|
0001d020  53 43 6f 6e 74 72 6f 6c  22 2c 32 34 2c 66 24 2c  |SControl",24,f$,|
0001d030  61 24 0d b1 44 0b 20 20  20 20 ed 6c 25 0d b1 4e  |a$..D.    .l%..N|
0001d040  2f 20 20 20 20 f2 6e 62  72 65 70 6c 79 28 6e 62  |/    .nbreply(nb|
0001d050  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 63 6f 6d  |from%,nbref%,com|
0001d060  25 2c 30 2c 30 2c 22 22  2c 22 22 29 0d b1 58 09  |%,0,0,"","")..X.|
0001d070  20 20 20 20 cc 0d b1 62  38 20 20 20 20 f2 6e 62  |    ...b8    .nb|
0001d080  63 6f 6d 66 61 69 6c 28  6e 62 66 72 6f 6d 25 2c  |comfail(nbfrom%,|
0001d090  6e 62 72 65 66 25 2c 63  6f 6d 25 2c 31 2c a4 6d  |nbref%,com%,1,.m|
0001d0a0  73 67 30 28 22 47 66 61  69 6c 22 29 29 0d b1 6c  |sg0("Gfail"))..l|
0001d0b0  07 20 20 cd 0d b1 76 07  20 20 cc 0d b1 80 39 20  |.  ...v.  ....9 |
0001d0c0  20 f2 6e 62 63 6f 6d 66  61 69 6c 28 6e 62 66 72  | .nbcomfail(nbfr|
0001d0d0  6f 6d 25 2c 6e 62 72 65  66 25 2c 63 6f 6d 25 2c  |om%,nbref%,com%,|
0001d0e0  31 2c a4 6d 73 67 30 28  22 52 65 61 64 6f 6e 6c  |1,.msg0("Readonl|
0001d0f0  79 22 29 29 0d b1 8a 05  cd 0d b1 94 05 e1 0d b1  |y"))............|
0001d100  9e 04 0d b1 a8 31 dd f2  64 65 6c 61 72 74 6c 69  |.....1..delartli|
0001d110  73 74 28 63 6f 6d 25 2c  6e 62 66 72 6f 6d 25 2c  |st(com%,nbfrom%,|
0001d120  6e 62 72 65 66 25 2c 67  31 24 2c 6e 31 25 2c 6e  |nbref%,g1$,n1%,n|
0001d130  32 25 29 0d b1 b2 0d ea  6c 25 2c 67 25 2c 66 25  |2%).....l%,g%,f%|
0001d140  0d b1 bc 11 e7 a4 64 65  6c 6f 6b 28 67 31 24 29  |......delok(g1$)|
0001d150  8c 0d b1 c6 19 20 20 67  25 3d a4 6e 61 6d 65 74  |.....  g%=.namet|
0001d160  6f 6e 6f 28 67 31 24 2c  30 29 0d b1 d0 0c 20 20  |ono(g1$,0)....  |
0001d170  e7 67 25 3e 30 8c 0d b1  da 27 20 20 20 20 66 25  |.g%>0....'    f%|
0001d180  3d a4 66 69 72 73 74 61  72 74 28 67 25 29 3a e7  |=.firstart(g%):.|
0001d190  6e 31 25 3c 66 25 8c 6e  31 25 3d 66 25 0d b1 e4  |n1%<f%.n1%=f%...|
0001d1a0  20 20 20 20 20 6e 32 25  3d a4 75 70 6c 69 6d 28  |     n2%=.uplim(|
0001d1b0  67 25 2c 6e 32 25 29 3a  f2 68 67 6f 6e 0d b1 ee  |g%,n2%):.hgon...|
0001d1c0  38 20 20 20 20 e3 6c 25  3d 6e 31 25 b8 6e 32 25  |8    .l%=n1%.n2%|
0001d1d0  3a f2 64 65 6c 61 72 74  28 67 25 2c 6c 25 29 3a  |:.delart(g%,l%):|
0001d1e0  e7 6c 25 83 31 30 3d 30  f2 70 6f 6c 6c 28 73 6c  |.l%.10=0.poll(sl|
0001d1f0  69 63 65 25 29 0d b1 f8  12 20 20 20 20 ed 6c 25  |ice%)....    .l%|
0001d200  3a f2 68 67 6f 66 66 0d  b2 02 2f 20 20 20 20 f2  |:.hgoff.../    .|
0001d210  6e 62 72 65 70 6c 79 28  6e 62 66 72 6f 6d 25 2c  |nbreply(nbfrom%,|
0001d220  6e 62 72 65 66 25 2c 63  6f 6d 25 2c 30 2c 30 2c  |nbref%,com%,0,0,|
0001d230  22 22 2c 22 22 29 0d b2  0c 09 20 20 20 20 cc 0d  |"","")....    ..|
0001d240  b2 16 38 20 20 20 20 f2  6e 62 63 6f 6d 66 61 69  |..8    .nbcomfai|
0001d250  6c 28 6e 62 66 72 6f 6d  25 2c 6e 62 72 65 66 25  |l(nbfrom%,nbref%|
0001d260  2c 63 6f 6d 25 2c 31 2c  a4 6d 73 67 30 28 22 47  |,com%,1,.msg0("G|
0001d270  66 61 69 6c 22 29 29 0d  b2 20 07 20 20 cd 0d b2  |fail")).. .  ...|
0001d280  2a 07 20 20 cc 0d b2 34  37 20 20 f2 6e 62 63 6f  |*.  ...47  .nbco|
0001d290  6d 66 61 69 6c 28 6e 62  66 72 6f 6d 25 2c 6e 62  |mfail(nbfrom%,nb|
0001d2a0  72 65 66 25 2c 63 6f 6d  25 2c 31 2c a4 6d 73 67  |ref%,com%,1,.msg|
0001d2b0  30 28 22 41 6e 6f 64 65  6c 22 29 29 0d b2 3e 05  |0("Anodel"))..>.|
0001d2c0  cd 0d b2 48 05 e1 0d b2  52 04 0d b2 5c 13 dd f2  |...H....R...\...|
0001d2d0  64 65 6c 61 72 74 28 67  25 2c 6e 25 29 0d b2 66  |delart(g%,n%)..f|
0001d2e0  07 ea 66 24 0d b2 70 19  66 24 3d a4 66 69 6e 64  |..f$..p.f$=.find|
0001d2f0  66 69 6c 65 28 67 25 2c  6e 25 2c a3 29 0d b2 7a  |file(g%,n%,.)..z|
0001d300  13 46 25 3d a4 64 65 6c  66 69 6c 65 28 66 24 29  |.F%=.delfile(f$)|
0001d310  0d b2 84 1c e7 46 25 3d  30 8c f2 61 72 74 64 65  |.....F%=0..artde|
0001d320  6c 65 74 65 64 28 67 25  2c 6e 25 29 0d b2 8e 05  |leted(g%,n%)....|
0001d330  e1 0d b2 98 04 0d b2 a2  33 dd f2 66 6f 6c 64 65  |........3..folde|
0001d340  72 6f 70 28 63 6f 6d 25  2c 6e 62 66 72 6f 6d 25  |rop(com%,nbfrom%|
0001d350  2c 6e 62 72 65 66 25 2c  67 31 24 2c 67 32 24 2c  |,nbref%,g1$,g2$,|
0001d360  6e 31 25 2c 6e 32 25 29  0d b2 ac 1b ea 67 31 25  |n1%,n2%).....g1%|
0001d370  2c 67 32 25 2c 61 25 2c  66 25 2c 70 24 2c 46 25  |,g2%,a%,f%,p$,F%|
0001d380  2c 66 24 0d b2 b6 96 ea  74 6f 24 2c 66 72 6f 6d  |,f$.....to$,from|
0001d390  24 2c 73 75 62 6a 65 63  74 24 2c 6d 65 73 73 69  |$,subject$,messi|
0001d3a0  64 24 2c 6e 65 77 73 67  72 6f 75 70 24 2c 65 78  |d$,newsgroup$,ex|
0001d3b0  70 69 72 65 73 25 2c 61  72 74 64 61 74 65 25 2c  |pires%,artdate%,|
0001d3c0  73 75 70 65 72 73 65 64  65 24 2c 72 65 63 65 69  |supersede$,recei|
0001d3d0  70 74 24 2c 6c 61 73 74  68 25 2c 63 6f 6e 74 72  |pt$,lasth%,contr|
0001d3e0  6f 6c 24 2c 70 72 65 63  65 64 65 6e 63 65 24 2c  |ol$,precedence$,|
0001d3f0  72 65 70 6c 79 74 6f 24  2c 61 70 70 72 6f 76 65  |replyto$,approve|
0001d400  64 24 2c 72 65 66 65 72  65 6e 63 65 24 2c 63 63  |d$,reference$,cc|
0001d410  24 2c 6f 72 69 67 74 6f  24 0d b2 c0 09 e7 72 77  |$,origto$.....rw|
0001d420  25 8c 0d b2 ca 1a 20 20  e7 a4 73 70 65 63 69 61  |%.....  ..specia|
0001d430  6c 67 72 70 28 67 32 24  29 3c 32 8c 0d b2 d4 37  |lgrp(g2$)<2....7|
0001d440  20 20 20 20 f2 6e 62 63  6f 6d 66 61 69 6c 28 6e  |    .nbcomfail(n|
0001d450  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 2c 63 6f  |bfrom%,nbref%,co|
0001d460  6d 25 2c 31 2c a4 6d 73  67 30 28 22 47 62 61 64  |m%,1,.msg0("Gbad|
0001d470  22 29 29 0d b2 de 09 20  20 20 20 cc 0d b2 e8 3a  |"))....    ....:|
0001d480  20 20 20 20 67 31 25 3d  a4 6e 61 6d 65 74 6f 6e  |    g1%=.nameton|
0001d490  6f 28 67 31 24 2c 30 29  3a 67 32 25 3d a4 6e 61  |o(g1$,0):g2%=.na|
0001d4a0  6d 65 74 6f 6e 6f 28 67  32 24 2c b9 29 3a f2 70  |metono(g2$,.):.p|
0001d4b0  6f 6c 6c 6f 66 66 0d b2  f2 15 20 20 20 20 e7 67  |olloff....    .g|
0001d4c0  31 25 3d 30 84 67 32 25  3d 30 8c 0d b2 fc 3a 20  |1%=0.g2%=0....: |
0001d4d0  20 20 20 20 20 f2 6e 62  63 6f 6d 66 61 69 6c 28  |     .nbcomfail(|
0001d4e0  6e 62 66 72 6f 6d 25 2c  6e 62 72 65 66 25 2c 63  |nbfrom%,nbref%,c|
0001d4f0  6f 6d 25 2c 31 2c a4 6d  73 67 30 28 22 47 66 61  |om%,1,.msg0("Gfa|
0001d500  69 6c 22 29 29 0d b3 06  0b 20 20 20 20 20 20 cc  |il"))....      .|
0001d510  0d b3 10 0f 20 20 20 20  20 20 f2 68 67 6f 6e 0d  |....      .hgon.|
0001d520  b3 1a 2a 20 20 20 20 20  20 66 25 3d a4 66 69 72  |..*      f%=.fir|
0001d530  73 74 61 72 74 28 67 31  25 29 3a e7 6e 31 25 3c  |start(g1%):.n1%<|
0001d540  66 25 8c 6e 31 25 3d 66  25 0d b3 24 2f 20 20 20  |f%.n1%=f%..$/   |
0001d550  20 20 20 6e 32 25 3d a4  75 70 6c 69 6d 28 67 31  |   n2%=.uplim(g1|
0001d560  25 2c 6e 32 25 29 3a 70  24 3d a4 6e 6f 74 6f 70  |%,n2%):p$=.notop|
0001d570  61 74 68 28 67 32 25 29  0d b3 2e 11 20 20 20 20  |ath(g2%)....    |
0001d580  20 20 e7 70 24 3e 22 22  8c 0d b3 38 18 20 20 20  |  .p$>""...8.   |
0001d590  20 20 20 20 20 73 25 3d  a4 73 65 71 28 67 32 25  |     s%=.seq(g2%|
0001d5a0  29 0d b3 42 17 20 20 20  20 20 20 20 20 e3 61 25  |)..B.        .a%|
0001d5b0  3d 6e 31 25 b8 6e 32 25  0d b3 4c 2c 20 20 20 20  |=n1%.n2%..L,    |
0001d5c0  20 20 20 20 20 20 66 24  3d a4 66 69 6e 64 66 69  |      f$=.findfi|
0001d5d0  6c 65 28 67 31 25 2c 61  25 2c b9 29 3a e7 66 24  |le(g1%,a%,.):.f$|
0001d5e0  3e 22 22 8c 0d b3 56 27  20 20 20 20 20 20 20 20  |>""...V'        |
0001d5f0  20 20 20 20 e7 a4 67 65  74 68 65 61 64 65 72 69  |    ..getheaderi|
0001d600  6e 66 6f 28 66 24 29 3c  3e 30 8c 0d b3 60 3e 20  |nfo(f$)<>0...`> |
0001d610  20 20 20 20 20 20 20 20  20 20 20 20 20 46 25 3d  |             F%=|
0001d620  a4 61 72 74 63 6f 70 79  28 67 32 25 2c 73 25 2c  |.artcopy(g2%,s%,|
0001d630  66 24 29 3a e7 61 25 83  35 3d 30 8c f2 70 6f 6c  |f$):.a%.5=0..pol|
0001d640  6c 28 73 6c 69 63 65 25  29 0d b3 6a 45 20 20 20  |l(slice%)..jE   |
0001d650  20 20 20 20 20 20 20 20  20 20 20 e7 46 25 3d 30  |           .F%=0|
0001d660  80 63 6f 6d 25 83 36 35  35 33 36 3d 32 36 30 80  |.com%.65536=260.|
0001d670  a4 64 65 6c 6f 6b 28 67  31 24 29 3c 3e 30 8c f2  |.delok(g1$)<>0..|
0001d680  64 65 6c 61 72 74 28 67  31 25 2c 61 25 29 0d b3  |delart(g1%,a%)..|
0001d690  74 11 20 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |t.            ..|
0001d6a0  b3 7e 0f 20 20 20 20 20  20 20 20 20 20 cd 0d b3  |.~.          ...|
0001d6b0  88 0f 20 20 20 20 20 20  20 20 ed 61 25 0d b3 92  |..        .a%...|
0001d6c0  12 20 20 20 20 20 20 20  20 f2 68 67 6f 66 66 0d  |.        .hgoff.|
0001d6d0  b3 9c 0b 20 20 20 20 20  20 cd 0d b3 a6 3d 20 20  |...      ....=  |
0001d6e0  20 20 20 20 f2 6e 62 72  65 70 6c 79 28 6e 62 66  |    .nbreply(nbf|
0001d6f0  72 6f 6d 25 2c 6e 62 72  65 66 25 2c 63 6f 6d 25  |rom%,nbref%,com%|
0001d700  2c 30 2c 30 2c a4 6d 73  67 30 28 22 41 6d 6f 76  |,0,0,.msg0("Amov|
0001d710  65 22 29 2c 22 22 29 0d  b3 b0 09 20 20 20 20 cd  |e"),"")....    .|
0001d720  0d b3 ba 0f 20 20 20 20  f2 70 6f 6c 6c 6f 6e 0d  |....    .pollon.|
0001d730  b3 c4 07 20 20 cd 0d b3  ce 07 20 20 cc 0d b3 d8  |...  .....  ....|
0001d740  3c 20 20 f2 6e 62 72 65  70 6c 79 28 6e 62 66 72  |<  .nbreply(nbfr|
0001d750  6f 6d 25 2c 6e 62 72 65  66 25 2c 63 6f 6d 25 2c  |om%,nbref%,com%,|
0001d760  30 2c 30 2c a4 6d 73 67  30 28 22 52 65 61 64 6f  |0,0,.msg0("Reado|
0001d770  6e 6c 79 22 29 2c 22 22  29 0d b3 e2 05 cd 0d b3  |nly"),"").......|
0001d780  ec 05 e1 0d b3 f6 04 0d  b4 00 2a dd f2 63 61 6e  |..........*..can|
0001d790  63 65 6c 61 72 74 28 63  6f 6d 25 2c 6e 62 66 72  |celart(com%,nbfr|
0001d7a0  6f 6d 25 2c 6e 62 72 65  66 25 2c 67 24 2c 6d 24  |om%,nbref%,g$,m$|
0001d7b0  29 0d b4 0a 10 ea 72 25  2c 72 24 2c 75 24 2c 66  |).....r%,r$,u$,f|
0001d7c0  24 0d b4 14 37 72 25 3d  a4 66 69 6e 64 63 6c 28  |$...7r%=.findcl(|
0001d7d0  6e 62 66 72 6f 6d 25 29  3a e7 72 25 3c 30 8c 75  |nbfrom%):.r%<0.u|
0001d7e0  24 3d 22 6e 65 77 73 22  8b 75 24 3d 63 6c 5f 75  |$="news".u$=cl_u|
0001d7f0  73 65 72 24 28 72 25 29  0d b4 1e 2f 72 25 3d a7  |ser$(r%).../r%=.|
0001d800  6d 24 2c 22 40 22 29 3a  72 24 3d c0 c1 6d 24 2c  |m$,"@"):r$=..m$,|
0001d810  72 25 2b 31 29 29 3a e7  75 24 3d 22 22 8c 75 24  |r%+1)):.u$="".u$|
0001d820  3d 22 6e 65 77 73 22 0d  b4 28 33 f2 6c 6f 67 28  |="news"..(3.log(|
0001d830  22 43 61 6e 63 65 6c 20  72 65 71 75 65 73 74 20  |"Cancel request |
0001d840  66 6f 72 20 22 2b 6d 24  2b 22 20 66 72 6f 6d 20  |for "+m$+" from |
0001d850  75 73 65 72 20 22 2b 75  24 29 0d b4 32 16 e7 72  |user "+u$)..2..r|
0001d860  77 25 80 72 24 3d 68 6f  73 74 6e 61 6d 65 24 8c  |w%.r$=hostname$.|
0001d870  0d b4 3c 2a 20 20 66 24  3d a4 74 6d 70 66 69 6c  |..<*  f$=.tmpfil|
0001d880  65 3a 66 31 25 3d a4 6f  70 65 6e 6f 75 74 28 66  |e:f1%=.openout(f|
0001d890  24 29 3a e7 66 31 25 3e  30 8c 0d b4 46 23 20 20  |$):.f1%>0...F#  |
0001d8a0  20 20 d5 23 66 31 25 2c  22 43 6f 6e 74 72 6f 6c  |  .#f1%,"Control|
0001d8b0  3a 20 63 61 6e 63 65 6c  20 22 2b 6d 24 0d b4 50  |: cancel "+m$..P|
0001d8c0  1f 20 20 20 20 d5 23 66  31 25 2c 22 4e 65 77 73  |.    .#f1%,"News|
0001d8d0  67 72 6f 75 70 73 3a 20  22 2b 67 24 0d b4 5a 30  |groups: "+g$..Z0|
0001d8e0  20 20 20 20 d5 23 66 31  25 2c 22 50 61 74 68 3a  |    .#f1%,"Path:|
0001d8f0  20 22 2b 68 6f 73 74 6e  61 6d 65 24 2b 22 21 6e  | "+hostname$+"!n|
0001d900  6f 74 2d 66 6f 72 2d 6d  61 69 6c 22 0d b4 64 27  |ot-for-mail"..d'|
0001d910  20 20 20 20 d5 23 66 31  25 2c 22 46 72 6f 6d 3a  |    .#f1%,"From:|
0001d920  20 22 2b 75 24 2b 22 40  22 2b 6d 61 69 6c 6e 61  | "+u$+"@"+mailna|
0001d930  6d 65 24 0d b4 6e 28 20  20 20 20 d5 23 66 31 25  |me$..n(    .#f1%|
0001d940  2c 22 53 75 62 6a 65 63  74 3a 20 63 6d 73 67 20  |,"Subject: cmsg |
0001d950  63 61 6e 63 65 6c 20 22  2b 6d 24 0d b4 78 38 20  |cancel "+m$..x8 |
0001d960  20 20 20 d5 23 66 31 25  2c 22 4d 65 73 73 61 67  |   .#f1%,"Messag|
0001d970  65 2d 49 44 3a 20 3c 22  2b a4 69 64 5f 64 61 74  |e-ID: <"+.id_dat|
0001d980  65 2b 22 40 22 2b 68 6f  73 74 6e 61 6d 65 24 2b  |e+"@"+hostname$+|
0001d990  22 3e 22 0d b4 82 46 20  20 20 20 d5 23 66 31 25  |">"...F    .#f1%|
0001d9a0  2c 22 53 65 6e 64 65 72  3a 20 6e 65 77 73 40 22  |,"Sender: news@"|
0001d9b0  2b 68 6f 73 74 6e 61 6d  65 24 2b 22 20 28 52 49  |+hostname$+" (RI|
0001d9c0  53 43 20 4f 53 20 4e 65  77 73 62 61 73 65 20 22  |SC OS Newsbase "|
0001d9d0  2b 76 65 72 24 2b 22 29  22 0d b4 8c 2b 20 20 20  |+ver$+")"...+   |
0001d9e0  20 e7 6f 72 67 24 3e 22  22 d5 23 66 31 25 2c 22  | .org$>"".#f1%,"|
0001d9f0  4f 72 67 61 6e 69 7a 61  74 69 6f 6e 3a 20 22 2b  |Organization: "+|
0001da00  6f 72 67 24 0d b4 96 20  20 20 20 20 d5 23 66 31  |org$...     .#f1|
0001da10  25 2c 22 44 61 74 65 3a  20 22 2b a4 72 66 63 5f  |%,"Date: "+.rfc_|
0001da20  64 61 74 65 0d b4 a0 29  20 20 20 20 d5 23 66 31  |date...)    .#f1|
0001da30  25 2c 22 41 70 70 72 6f  76 65 64 3a 20 6e 65 77  |%,"Approved: new|
0001da40  73 40 22 2b 68 6f 73 74  6e 61 6d 65 24 0d b4 aa  |s@"+hostname$...|
0001da50  34 20 20 20 20 d5 23 66  31 25 2c 22 4c 69 6e 65  |4    .#f1%,"Line|
0001da60  73 3a 20 31 22 3a d5 23  66 31 25 2c 22 22 3a d5  |s: 1":.#f1%,"":.|
0001da70  23 66 31 25 2c 22 63 61  6e 63 65 6c 20 22 2b 6d  |#f1%,"cancel "+m|
0001da80  24 0d b4 b4 22 20 20 20  20 f2 63 66 28 66 31 25  |$..."    .cf(f1%|
0001da90  29 3a f2 73 65 74 74 79  70 65 28 66 24 2c 26 46  |):.settype(f$,&F|
0001daa0  46 46 29 0d b4 be 1e 20  20 20 20 72 24 3d a4 73  |FF)....    r$=.s|
0001dab0  65 6e 64 6e 65 77 73 28  66 24 2c 22 22 2c 75 24  |endnews(f$,"",u$|
0001dac0  29 0d b4 c8 0d 20 20 20  20 c8 8e 72 24 ca 0d b4  |)....    ..r$...|
0001dad0  d2 35 20 20 20 20 20 20  c9 22 22 3a f2 6e 62 72  |.5      ."":.nbr|
0001dae0  65 70 6c 79 28 6e 62 66  72 6f 6d 25 2c 6e 62 72  |eply(nbfrom%,nbr|
0001daf0  65 66 25 2c 63 6f 6d 25  2c 30 2c 30 2c 22 22 2c  |ef%,com%,0,0,"",|
0001db00  22 22 29 0d b4 dc 40 20  20 20 20 20 20 7f 3a f2  |"")...@      .:.|
0001db10  6e 62 63 6f 6d 66 61 69  6c 28 6e 62 66 72 6f 6d  |nbcomfail(nbfrom|
0001db20  25 2c 6e 62 72 65 66 25  2c 63 6f 6d 25 2c 31 2c  |%,nbref%,com%,1,|
0001db30  a4 6d 73 67 30 28 22 41  6e 6f 63 61 6e 63 65 6c  |.msg0("Anocancel|
0001db40  22 29 29 0d b4 e6 09 20  20 20 20 cb 0d b4 f0 09  |"))....    .....|
0001db50  20 20 20 20 cc 0d b4 fa  38 20 20 20 20 f2 6e 62  |    ....8    .nb|
0001db60  63 6f 6d 66 61 69 6c 28  6e 62 66 72 6f 6d 25 2c  |comfail(nbfrom%,|
0001db70  6e 62 72 65 66 25 2c 63  6f 6d 25 2c 31 2c a4 6d  |nbref%,com%,1,.m|
0001db80  73 67 30 28 22 53 63 72  61 70 22 29 29 0d b5 04  |sg0("Scrap"))...|
0001db90  07 20 20 cd 0d b5 0e 1e  20 20 c8 99 22 58 4f 53  |.  .....  .."XOS|
0001dba0  5f 43 4c 49 22 2c 22 72  65 6d 6f 76 65 20 22 2b  |_CLI","remove "+|
0001dbb0  66 24 0d b5 18 07 20 20  cc 0d b5 22 3a 20 20 f2  |f$....  ...":  .|
0001dbc0  6e 62 63 6f 6d 66 61 69  6c 28 6e 62 66 72 6f 6d  |nbcomfail(nbfrom|
0001dbd0  25 2c 6e 62 72 65 66 25  2c 63 6f 6d 25 2c 31 2c  |%,nbref%,com%,1,|
0001dbe0  a4 6d 73 67 30 28 22 41  6e 6f 63 61 6e 63 65 6c  |.msg0("Anocancel|
0001dbf0  22 29 29 0d b5 2c 05 cd  0d b5 36 05 e1 0d b5 40  |"))..,....6....@|
0001dc00  04 0d b5 4a 0e dd a4 72  66 63 5f 64 61 74 65 0d  |...J...rfc_date.|
0001dc10  b5 54 3c 3d a4 63 74 69  6d 65 28 22 25 57 33 2c  |.T<=.ctime("%W3,|
0001dc20  20 25 44 59 20 25 4d 33  20 25 43 45 25 59 52 20  | %DY %M3 %CE%YR |
0001dc30  25 32 34 3a 25 4d 49 3a  25 53 45 22 29 2b 22 20  |%24:%MI:%SE")+" |
0001dc40  22 2b 74 69 6d 65 7a 6f  6e 65 24 0d b5 5e 04 0d  |"+timezone$..^..|
0001dc50  b5 68 0d dd a4 69 64 5f  64 61 74 65 0d b5 72 29  |.h...id_date..r)|
0001dc60  3d a4 63 74 69 6d 65 28  22 25 43 45 25 59 52 25  |=.ctime("%CE%YR%|
0001dc70  4d 4e 25 44 59 2e 25 32  34 25 4d 49 25 53 45 2e  |MN%DY.%24%MI%SE.|
0001dc80  25 43 53 22 29 0d b5 7c  04 0d b5 86 0f dd a4 63  |%CS")..|.......c|
0001dc90  74 69 6d 65 28 61 24 29  0d b5 90 23 ea 62 25 3a  |time(a$)...#.b%:|
0001dca0  3f 74 6d 70 25 3d 33 3a  c8 99 22 4f 53 5f 57 6f  |?tmp%=3:.."OS_Wo|
0001dcb0  72 64 22 2c 31 34 2c 74  6d 70 25 0d b5 9a 3e c8  |rd",14,tmp%...>.|
0001dcc0  99 22 54 65 72 72 69 74  6f 72 79 5f 43 6f 6e 76  |."Territory_Conv|
0001dcd0  65 72 74 44 61 74 65 41  6e 64 54 69 6d 65 22 2c  |ertDateAndTime",|
0001dce0  31 2c 74 6d 70 25 2c 74  6d 70 25 2b 31 32 38 2c  |1,tmp%,tmp%+128,|
0001dcf0  31 32 38 2c 61 24 b8 62  25 0d b5 a4 0d 3d a4 73  |128,a$.b%....=.s|
0001dd00  74 72 28 62 25 29 0d b5  ae 04 0d b5 b8 2c dd f2  |tr(b%).......,..|
0001dd10  63 6c 69 65 6e 74 73 65  6e 64 66 69 6c 65 28 63  |clientsendfile(c|
0001dd20  6f 6d 25 2c 6e 62 66 72  6f 6d 25 2c 6e 62 72 65  |om%,nbfrom%,nbre|
0001dd30  66 25 2c 66 24 29 0d b5  c2 25 ea 72 25 2c 72 24  |f%,f$)...%.r%,r$|
0001dd40  2c 64 24 2c 75 25 2c 75  24 2c 46 25 2c 69 6e 66  |,d$,u%,u$,F%,inf|
0001dd50  6f 24 2c 6d 25 2c 72 63  6f 6d 25 0d b5 cc 28 75  |o$,m%,rcom%...(u|
0001dd60  25 3d a4 66 69 6e 64 63  6c 28 6e 62 66 72 6f 6d  |%=.findcl(nbfrom|
0001dd70  25 29 3a 72 63 6f 6d 25  3d 63 6f 6d 25 83 36 35  |%):rcom%=com%.65|
0001dd80  35 33 36 0d b5 d6 23 e7  75 25 3e 3d 30 8c 75 25  |536...#.u%>=0.u%|
0001dd90  3d a4 75 73 65 72 6e 6f  28 63 6c 5f 75 73 65 72  |=.userno(cl_user|
0001dda0  24 28 75 25 29 29 0d b5  e0 0e e7 75 25 3c 30 8c  |$(u%)).....u%<0.|
0001ddb0  75 25 3d 30 0d b5 ea 22  75 24 3d 75 73 65 72 24  |u%=0..."u$=user$|
0001ddc0  28 75 25 29 3a f2 73 65  74 74 79 70 65 28 66 24  |(u%):.settype(f$|
0001ddd0  2c 26 46 46 46 29 0d b5  f4 23 e7 72 77 25 80 28  |,&FFF)...#.rw%.(|
0001dde0  75 70 6f 73 74 25 28 75  25 29 3c 3e 30 84 72 63  |upost%(u%)<>0.rc|
0001ddf0  6f 6d 25 3d 33 31 30 29  8c 0d b5 fe 17 20 20 e7  |om%=310).....  .|
0001de00  a4 6f 62 6a 74 79 70 65  28 66 24 29 3d 31 20 8c  |.objtype(f$)=1 .|
0001de10  0d b6 08 44 20 20 20 20  6d 25 3d 74 72 61 6e 73  |...D    m%=trans|
0001de20  6d 25 28 74 72 61 6e 73  70 6f 72 74 25 2c 31 29  |m%(transport%,1)|
0001de30  3a e7 72 63 6f 6d 25 3d  33 30 30 8c 6d 25 3d 74  |:.rcom%=300.m%=t|
0001de40  72 61 6e 73 6d 25 28 74  72 61 6e 73 70 6f 72 74  |ransm%(transport|
0001de50  25 2c 31 29 0d b6 12 1d  20 20 20 20 e7 a4 66 72  |%,1)....    ..fr|
0001de60  65 65 6d 65 6d 28 30 29  3c 6d 25 2a 31 30 32 34  |eemem(0)<m%*1024|
0001de70  8c 0d b6 1c 2b 20 20 20  20 20 20 f4 20 73 70 6f  |....+      . spo|
0001de80  6f 6c 20 66 69 6c 65 20  66 6f 72 20 6c 61 74 65  |ol file for late|
0001de90  72 20 70 72 6f 63 65 73  73 69 6e 67 0d b6 26 30  |r processing..&0|
0001dea0  20 20 20 20 20 20 72 24  3d 6f 75 74 64 69 72 24  |      r$=outdir$|
0001deb0  28 30 29 3a e7 72 63 6f  6d 25 3d 33 30 30 8c 72  |(0):.rcom%=300.r|
0001dec0  24 3d 6f 75 74 64 69 72  24 28 31 29 0d b6 30 30  |$=outdir$(1)..00|
0001ded0  20 20 20 20 20 20 f5 64  24 3d 72 24 2b 22 2e 6e  |      .d$=r$+".n|
0001dee0  62 22 2b c3 b3 28 39 39  39 39 39 29 3a fd a4 6f  |b"+..(99999):..o|
0001def0  62 6a 74 79 70 65 28 64  24 29 3d 30 0d b6 3a 3c  |bjtype(d$)=0..:<|
0001df00  20 20 20 20 20 20 72 24  3d 22 22 3a 46 25 3d a4  |      r$="":F%=.|
0001df10  6d 6f 76 65 66 69 6c 65  28 66 24 2c 64 24 29 3a  |movefile(f$,d$):|
0001df20  e7 46 25 3c 3e 30 8c 72  24 3d a4 6d 73 67 30 28  |.F%<>0.r$=.msg0(|
0001df30  22 51 66 61 69 6c 22 29  0d b6 44 0b 20 20 20 20  |"Qfail")..D.    |
0001df40  20 20 cc 0d b6 4e 29 20  20 20 20 20 20 64 24 3d  |  ...N)      d$=|
0001df50  a4 74 6d 70 66 69 6c 65  3a 46 25 3d a4 6d 6f 76  |.tmpfile:F%=.mov|
0001df60  65 66 69 6c 65 28 66 24  2c 64 24 29 0d b6 58 16  |efile(f$,d$)..X.|
0001df70  20 20 20 20 20 20 e7 46  25 3c 3e 30 8c 64 24 3d  |      .F%<>0.d$=|
0001df80  66 24 0d b6 62 12 20 20  20 20 20 20 c8 8e 72 63  |f$..b.      ..rc|
0001df90  6f 6d 25 ca 0d b6 6c 43  20 20 20 20 20 20 20 20  |om%...lC        |
0001dfa0  c9 33 30 30 3a 69 6e 66  6f 24 3d a4 6b 65 65 70  |.300:info$=.keep|
0001dfb0  66 69 6c 65 28 31 2c 64  24 2c 75 24 29 3a 72 24  |file(1,d$,u$):r$|
0001dfc0  3d a4 73 65 6e 64 6e 65  77 73 28 64 24 2c 69 6e  |=.sendnews(d$,in|
0001dfd0  66 6f 24 2c 75 24 29 0d  b6 76 3d 20 20 20 20 20  |fo$,u$)..v=     |
0001dfe0  20 20 20 c9 33 31 30 3a  69 6e 66 6f 24 3d a4 6b  |   .310:info$=.k|
0001dff0  65 65 70 66 69 6c 65 28  30 2c 64 24 2c 75 24 29  |eepfile(0,d$,u$)|
0001e000  3a 72 24 3d a4 73 65 6e  64 6d 61 69 6c 28 64 24  |:r$=.sendmail(d$|
0001e010  2c 75 24 29 0d b6 80 0b  20 20 20 20 20 20 cb 0d  |,u$)....      ..|
0001e020  b6 8a 09 20 20 20 20 cd  0d b6 94 0d 20 20 20 20  |...    .....    |
0001e030  c8 8e 72 24 ca 0d b6 9e  35 20 20 20 20 20 20 c9  |..r$....5      .|
0001e040  22 22 3a f2 6e 62 72 65  70 6c 79 28 6e 62 66 72  |"":.nbreply(nbfr|
0001e050  6f 6d 25 2c 6e 62 72 65  66 25 2c 63 6f 6d 25 2c  |om%,nbref%,com%,|
0001e060  30 2c 30 2c 22 22 2c 22  22 29 0d b6 a8 30 20 20  |0,0,"","")...0  |
0001e070  20 20 20 20 7f 3a f2 6e  62 63 6f 6d 66 61 69 6c  |    .:.nbcomfail|
0001e080  28 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |(nbfrom%,nbref%,|
0001e090  63 6f 6d 25 2c 31 2c 72  24 29 0d b6 b2 09 20 20  |com%,1,r$)....  |
0001e0a0  20 20 cb 0d b6 bc 09 20  20 20 20 cc 0d b6 c6 3c  |  .....    ....<|
0001e0b0  20 20 20 20 f2 6e 62 63  6f 6d 66 61 69 6c 28 6e  |    .nbcomfail(n|
0001e0c0  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 2c 63 6f  |bfrom%,nbref%,co|
0001e0d0  6d 25 2c 31 2c a4 6d 73  67 31 28 22 4e 6f 46 69  |m%,1,.msg1("NoFi|
0001e0e0  6c 65 22 2c 66 24 29 29  0d b6 d0 07 20 20 cd 0d  |le",f$))....  ..|
0001e0f0  b6 da 07 20 20 cc 0d b6  e4 38 20 20 f2 6e 62 63  |...  ....8  .nbc|
0001e100  6f 6d 66 61 69 6c 28 6e  62 66 72 6f 6d 25 2c 6e  |omfail(nbfrom%,n|
0001e110  62 72 65 66 25 2c 63 6f  6d 25 2c 31 2c a4 6d 73  |bref%,com%,1,.ms|
0001e120  67 30 28 22 51 6e 6f 70  6f 73 74 22 29 29 0d b6  |g0("Qnopost"))..|
0001e130  ee 05 cd 0d b6 f8 05 e1  0d b7 02 04 0d b7 0c 18  |................|
0001e140  dd a4 73 65 6e 64 6e 65  77 73 28 64 24 2c 67 24  |..sendnews(d$,g$|
0001e150  2c 75 24 29 0d b7 16 33  ea 72 25 2c 72 24 2c 6c  |,u$)...3.r%,r$,l|
0001e160  6f 63 61 6c 25 2c 6d 24  2c 61 70 70 72 6f 76 65  |ocal%,m$,approve|
0001e170  64 25 3a 6c 6f 63 61 6c  25 3d 30 3a 61 70 70 72  |d%:local%=0:appr|
0001e180  6f 76 65 64 25 3d 30 0d  b7 20 23 e7 c0 67 24 29  |oved%=0.. #..g$)|
0001e190  3d 22 21 22 8c 61 70 70  72 6f 76 65 64 25 3d b9  |="!".approved%=.|
0001e1a0  3a 67 24 3d c1 67 24 2c  32 29 0d b7 2a 2b 72 24  |:g$=.g$,2)..*+r$|
0001e1b0  3d a4 63 68 65 63 6b 67  72 70 73 6c 69 6e 65 28  |=.checkgrpsline(|
0001e1c0  67 24 2c 6c 6f 63 61 6c  25 29 3a e7 72 24 3e 22  |g$,local%):.r$>"|
0001e1d0  22 8c 3d 72 24 0d b7 34  26 e7 a7 a4 63 6c 65 61  |".=r$..4&...clea|
0001e1e0  6e 28 67 24 29 2c 22 20  22 29 3e 31 8c 64 24 3d  |n(g$)," ")>1.d$=|
0001e1f0  a4 72 65 70 6f 73 74 28  64 24 29 0d b7 3e 25 f2  |.repost(d$)..>%.|
0001e200  70 72 69 6e 74 28 22 22  2c a4 6d 73 67 30 28 22  |print("",.msg0("|
0001e210  51 70 6f 73 74 22 29 2c  22 20 22 2c 22 20 22 29  |Qpost")," "," ")|
0001e220  0d b7 48 39 e7 67 24 3e  22 22 80 6c 6f 63 61 6c  |..H9.g$>"".local|
0001e230  25 3d 30 80 61 70 70 72  6f 76 65 64 25 3d 30 8c  |%=0.approved%=0.|
0001e240  6d 24 3d a4 63 68 65 63  6b 6d 6f 64 65 72 61 74  |m$=.checkmoderat|
0001e250  69 6f 6e 28 67 24 2c 30  29 0d b7 52 08 72 25 3d  |ion(g$,0)..R.r%=|
0001e260  30 0d b7 5c 14 e7 6d 24  3e 22 22 80 6c 6f 63 61  |0..\..m$>"".loca|
0001e270  6c 25 3d 30 8c 0d b7 66  24 20 20 72 24 3d a4 72  |l%=0...f$  r$=.r|
0001e280  65 6d 61 69 6c 28 a4 6d  6f 64 64 65 73 74 28 6d  |email(.moddest(m|
0001e290  24 29 2c 64 24 2c 75 24  29 0d b7 70 07 20 20 cc  |$),d$,u$)..p.  .|
0001e2a0  0d b7 7a 0e 20 20 e7 6c  6f 63 61 6c 25 8c 0d b7  |..z.  .local%...|
0001e2b0  84 19 20 20 20 20 72 24  3d a4 6c 6f 63 61 6c 6e  |..    r$=.localn|
0001e2c0  65 77 73 28 64 24 29 0d  b7 8e 09 20 20 20 20 cc  |ews(d$)....    .|
0001e2d0  0d b7 98 1b 20 20 20 20  e7 6d 6e 67 77 25 3c 3e  |....    .mngw%<>|
0001e2e0  30 80 6d 6e 67 77 24 3e  22 22 8c 0d b7 a2 19 20  |0.mngw$>""..... |
0001e2f0  20 20 20 20 20 72 24 3d  a4 67 61 74 65 77 61 79  |     r$=.gateway|
0001e300  28 67 24 29 0d b7 ac 1e  20 20 20 20 20 20 72 24  |(g$)....      r$|
0001e310  3d a4 72 65 6d 61 69 6c  28 72 24 2c 64 24 2c 75  |=.remail(r$,d$,u|
0001e320  24 29 0d b7 b6 0b 20 20  20 20 20 20 cc 0d b7 c0  |$)....      ....|
0001e330  2d 20 20 20 20 20 20 f2  6c 6f 67 28 22 51 75 65  |-      .log("Que|
0001e340  75 69 6e 67 20 61 72 74  69 63 6c 65 20 73 65 6e  |uing article sen|
0001e350  74 20 62 79 20 22 2b 75  24 29 0d b7 ca 2a 20 20  |t by "+u$)...*  |
0001e360  20 20 20 20 72 25 3d a4  72 75 6e 74 72 61 6e 73  |    r%=.runtrans|
0001e370  70 6f 72 74 66 69 6c 65  28 32 2c 64 24 2c 75 24  |portfile(2,d$,u$|
0001e380  2c 22 22 29 0d b7 d4 38  20 20 20 20 20 20 e7 72  |,"")...8      .r|
0001e390  25 3d 30 8c f2 6e 62 75  70 64 61 74 65 28 31 31  |%=0..nbupdate(11|
0001e3a0  2c 22 22 2c 31 2c 22 22  2c 22 22 29 3a 46 25 3d  |,"",1,"",""):F%=|
0001e3b0  a4 64 65 6c 66 69 6c 65  28 64 24 29 0d b7 de 09  |.delfile(d$)....|
0001e3c0  20 20 20 20 cd 0d b7 e8  07 20 20 cd 0d b7 f2 05  |    .....  .....|
0001e3d0  cd 0d b7 fc 2c e7 72 25  3c 3e 30 8c 72 24 3d a4  |....,.r%<>0.r$=.|
0001e3e0  76 61 72 76 61 6c 28 22  4e 65 77 73 62 61 73 65  |varval("Newsbase|
0001e3f0  24 52 65 74 75 72 6e 49  6e 66 6f 22 29 0d b8 06  |$ReturnInfo")...|
0001e400  07 3d 72 24 0d b8 10 04  0d b8 1a 11 dd a4 67 61  |.=r$..........ga|
0001e410  74 65 77 61 79 28 67 24  29 0d b8 24 11 ea 6e 25  |teway(g$)..$..n%|
0001e420  2c 61 24 2c 62 24 2c 67  31 24 0d b8 2e 28 61 24  |,a$,b$,g1$...(a$|
0001e430  3d 6d 6e 67 77 24 3a 67  31 24 3d a4 6c 6f 77 65  |=mngw$:g1$=.lowe|
0001e440  72 28 a4 67 65 74 70 61  72 28 67 24 2c 22 2c 22  |r(.getpar(g$,","|
0001e450  29 29 0d b8 38 0f 6e 25  3d a7 61 24 2c 22 25 22  |))..8.n%=.a$,"%"|
0001e460  29 0d b8 42 10 c8 95 6e  25 3e 30 3a 62 24 3d 22  |)..B...n%>0:b$="|
0001e470  22 0d b8 4c 14 20 20 c8  8e c1 61 24 2c 6e 25 2b  |"..L.  ...a$,n%+|
0001e480  31 2c 31 29 ca 0d b8 56  13 20 20 20 20 c9 22 67  |1,1)...V.    ."g|
0001e490  22 3a 62 24 3d 67 31 24  0d b8 60 3a 20 20 20 20  |":b$=g1$..`:    |
0001e4a0  c9 22 47 22 3a 62 24 3d  22 22 3a f5 62 24 3d 62  |."G":b$="":.b$=b|
0001e4b0  24 2b a4 67 65 74 70 61  72 28 67 31 24 2c 22 2e  |$+.getpar(g1$,".|
0001e4c0  22 29 3a e7 67 31 24 3e  22 22 8c 62 24 2b 3d 22  |"):.g1$>"".b$+="|
0001e4d0  2d 22 0d b8 6a 11 20 20  20 20 20 20 fd 67 31 24  |-"..j.      .g1$|
0001e4e0  3d 22 22 0d b8 74 13 20  20 20 20 c9 22 25 22 3a  |=""..t.    ."%":|
0001e4f0  62 24 3d 22 25 22 0d b8  7e 07 20 20 cb 0d b8 88  |b$="%"..~.  ....|
0001e500  29 20 20 61 24 3d c0 61  24 2c 6e 25 2d 31 29 2b  |)  a$=.a$,n%-1)+|
0001e510  62 24 2b c1 61 24 2c 6e  25 2b 32 29 3a 6e 25 2b  |b$+.a$,n%+2):n%+|
0001e520  3d a9 62 24 2d 31 0d b8  92 14 20 20 6e 25 3d a7  |=.b$-1....  n%=.|
0001e530  61 24 2c 22 25 22 2c 6e  25 29 0d b8 9c 05 ce 0d  |a$,"%",n%)......|
0001e540  b8 a6 07 3d 61 24 0d b8  b0 04 0d b8 ba 15 dd a4  |...=a$..........|
0001e550  73 65 6e 64 6d 61 69 6c  28 64 24 2c 75 24 29 0d  |sendmail(d$,u$).|
0001e560  b8 c4 2c ea 72 25 2c 72  24 3a f2 70 72 69 6e 74  |..,.r%,r$:.print|
0001e570  28 22 22 2c a4 6d 73 67  30 28 22 51 73 65 6e 64  |("",.msg0("Qsend|
0001e580  22 29 2c 22 20 22 2c 22  20 22 29 0d b8 ce 24 f2  |")," "," ")...$.|
0001e590  6c 6f 67 28 22 51 75 65  75 69 6e 67 20 6d 61 69  |log("Queuing mai|
0001e5a0  6c 20 73 65 6e 74 20 62  79 20 22 2b 75 24 29 0d  |l sent by "+u$).|
0001e5b0  b8 d8 24 72 25 3d a4 72  75 6e 74 72 61 6e 73 70  |..$r%=.runtransp|
0001e5c0  6f 72 74 66 69 6c 65 28  31 2c 64 24 2c 75 24 2c  |ortfile(1,d$,u$,|
0001e5d0  22 22 29 0d b8 e2 55 e7  72 25 3c 3e 30 8c 72 24  |"")...U.r%<>0.r$|
0001e5e0  3d a4 76 61 72 76 61 6c  28 22 4e 65 77 73 62 61  |=.varval("Newsba|
0001e5f0  73 65 24 52 65 74 75 72  6e 49 6e 66 6f 22 29 8b  |se$ReturnInfo").|
0001e600  f2 6e 62 75 70 64 61 74  65 28 31 31 2c 22 22 2c  |.nbupdate(11,"",|
0001e610  30 2c 22 22 2c 22 22 29  3a 46 25 3d a4 64 65 6c  |0,"",""):F%=.del|
0001e620  66 69 6c 65 28 64 24 29  0d b8 ec 07 3d 72 24 0d  |file(d$)....=r$.|
0001e630  b8 f6 04 0d b9 00 1c dd  a4 63 68 65 63 6b 67 72  |.........checkgr|
0001e640  70 73 6c 69 6e 65 28 67  24 2c f8 20 6c 25 29 0d  |psline(g$,. l%).|
0001e650  b9 0a 1c ea 67 31 24 2c  72 24 2c 77 25 3a 67 24  |....g1$,r$,w%:g$|
0001e660  3d a4 6c 6f 77 65 72 28  67 24 29 0d b9 14 20 f5  |=.lower(g$)... .|
0001e670  67 31 24 3d a4 63 6c 65  61 6e 28 a4 67 65 74 70  |g1$=.clean(.getp|
0001e680  61 72 28 67 24 2c 22 2c  22 29 29 0d b9 1e 44 e7  |ar(g$,","))...D.|
0001e690  c0 67 31 24 2c 39 29 3d  22 6e 65 77 73 62 61 73  |.g1$,9)="newsbas|
0001e6a0  65 2e 22 8c 6c 25 2b 3d  31 8b 77 25 2b 3d 31 3a  |e.".l%+=1.w%+=1:|
0001e6b0  f4 20 6c 25 3d 6c 6f 63  61 6c 20 67 72 6f 75 70  |. l%=local group|
0001e6c0  73 2c 20 77 25 3d 77 6f  72 6c 64 77 69 64 65 0d  |s, w%=worldwide.|
0001e6d0  b9 28 21 e7 6c 25 3e 30  80 77 25 3e 30 8c 72 24  |.(!.l%>0.w%>0.r$|
0001e6e0  3d a4 6d 73 67 30 28 22  51 78 70 6f 73 74 22 29  |=.msg0("Qxpost")|
0001e6f0  0d b9 32 5e e7 c0 67 31  24 2c 36 29 3d 22 65 6d  |..2^..g1$,6)="em|
0001e700  61 69 6c 2e 22 84 c0 67  31 24 2c 37 29 3d 22 66  |ail."..g1$,7)="f|
0001e710  6f 6c 64 65 72 2e 22 84  c0 67 31 24 2c 34 29 3d  |older."..g1$,4)=|
0001e720  22 6a 75 6e 6b 22 84 c0  67 31 24 2c 37 29 3d 22  |"junk"..g1$,7)="|
0001e730  63 6f 6e 74 72 6f 6c 22  8c 72 24 3d a4 6d 73 67  |control".r$=.msg|
0001e740  31 28 22 51 62 61 64 67  22 2c 67 31 24 29 0d b9  |1("Qbadg",g1$)..|
0001e750  3c 10 fd 67 24 3d 22 22  84 72 24 3e 22 22 0d b9  |<..g$="".r$>""..|
0001e760  46 07 3d 72 24 0d b9 50  04 0d b9 5a 13 dd a4 6c  |F.=r$..P...Z...l|
0001e770  6f 63 61 6c 6e 65 77 73  28 66 24 29 0d b9 64 0a  |ocalnews(f$)..d.|
0001e780  ea 72 24 2c 64 24 0d b9  6e 1b 64 24 3d 6c 69 6e  |.r$,d$..n.d$=lin|
0001e790  64 69 72 24 2b 22 2e 6c  6f 63 61 6c 6e 65 77 73  |dir$+".localnews|
0001e7a0  22 0d b9 78 24 66 31 25  3d a4 6f 70 65 6e 6f 75  |"..x$f1%=.openou|
0001e7b0  74 28 64 24 29 3a 66 32  25 3d a4 6f 70 65 6e 69  |t(d$):f2%=.openi|
0001e7c0  6e 28 66 24 29 0d b9 82  11 e7 66 31 25 3e 30 80  |n(f$).....f1%>0.|
0001e7d0  66 32 25 3e 30 8c 0d b9  8c 26 20 20 d5 23 66 31  |f2%>0....&  .#f1|
0001e7e0  25 2c 22 23 21 20 72 6e  65 77 73 20 22 2b c3 a4  |%,"#! rnews "+..|
0001e7f0  66 69 6c 65 73 69 7a 65  28 66 24 29 0d b9 96 27  |filesize(f$)...'|
0001e800  20 20 f2 66 63 6f 70 79  28 66 32 25 2c 66 31 25  |  .fcopy(f2%,f1%|
0001e810  29 3a f2 73 65 74 74 79  70 65 28 64 24 2c 26 46  |):.settype(d$,&F|
0001e820  46 46 29 0d b9 a0 07 20  20 cc 0d b9 aa 18 20 20  |FF)....  .....  |
0001e830  72 24 3d a4 6d 73 67 30  28 22 51 62 61 74 63 68  |r$=.msg0("Qbatch|
0001e840  22 29 0d b9 b4 05 cd 0d  b9 be 15 f2 63 66 28 66  |")..........cf(f|
0001e850  31 25 29 3a f2 63 66 28  66 32 25 29 0d b9 c8 07  |1%):.cf(f2%)....|
0001e860  3d 72 24 0d b9 d2 04 0d  b9 dc 0d dd a4 74 6d 70  |=r$..........tmp|
0001e870  66 69 6c 65 0d b9 e6 07  ea 66 24 0d b9 f0 09 e7  |file.....f$.....|
0001e880  72 77 25 8c 0d b9 fa 31  20 20 f5 66 24 3d 74 6d  |rw%....1  .f$=tm|
0001e890  70 64 69 72 24 2b 22 2e  74 6d 70 22 2b c3 b3 28  |pdir$+".tmp"+..(|
0001e8a0  39 39 39 39 29 3a fd a4  6f 62 6a 74 79 70 65 28  |9999):..objtype(|
0001e8b0  66 24 29 3d 30 0d ba 04  07 20 20 cc 0d ba 0e 17  |f$)=0....  .....|
0001e8c0  20 20 66 24 3d 22 3c 57  69 6d 70 24 53 63 72 61  |  f$="<Wimp$Scra|
0001e8d0  70 3e 22 0d ba 18 05 cd  0d ba 22 07 3d 66 24 0d  |p>".......".=f$.|
0001e8e0  ba 2c 04 0d ba 36 11 dd  a4 6d 6f 64 64 65 73 74  |.,...6...moddest|
0001e8f0  28 67 24 29 0d ba 40 08  ea 67 31 24 0d ba 4a 2c  |(g$)..@..g1$..J,|
0001e900  f5 67 31 24 3d 67 31 24  2b a4 67 65 74 70 61 72  |.g1$=g1$+.getpar|
0001e910  28 67 24 2c 22 2e 22 29  3a e7 67 24 3e 22 22 8c  |(g$,"."):.g$>"".|
0001e920  67 31 24 2b 3d 22 2d 22  0d ba 54 1a fd 67 24 3d  |g1$+="-"..T..g$=|
0001e930  22 22 3a 67 31 24 2b 3d  22 40 22 2b 6d 6f 64 67  |"":g1$+="@"+modg|
0001e940  77 24 0d ba 5e 24 f2 70  72 69 6e 74 28 22 22 2c  |w$..^$.print("",|
0001e950  22 22 2c a4 6d 73 67 30  28 22 51 6d 6f 64 31 22  |"",.msg0("Qmod1"|
0001e960  29 2c 67 31 24 29 0d ba  68 08 3d 67 31 24 0d ba  |),g1$)..h.=g1$..|
0001e970  72 04 0d ba 7c 17 dd a4  72 65 6d 61 69 6c 28 74  |r...|...remail(t|
0001e980  6f 24 2c 64 24 2c 75 24  29 0d ba 86 19 ea 41 24  |o$,d$,u$).....A$|
0001e990  2c 66 24 2c 61 24 3a 66  24 3d a4 74 6d 70 66 69  |,f$,a$:f$=.tmpfi|
0001e9a0  6c 65 0d ba 90 13 66 31  25 3d a4 6f 70 65 6e 69  |le....f1%=.openi|
0001e9b0  6e 28 64 24 29 0d ba 9a  0b e7 66 31 25 3e 30 8c  |n(d$).....f1%>0.|
0001e9c0  0d ba a4 16 20 20 66 32  25 3d a4 6f 70 65 6e 6f  |....  f2%=.openo|
0001e9d0  75 74 28 66 24 29 0d ba  ae 0d 20 20 e7 66 32 25  |ut(f$)....  .f2%|
0001e9e0  3e 30 8c 0d ba b8 18 20  20 20 20 d5 23 66 32 25  |>0.....    .#f2%|
0001e9f0  2c 22 54 6f 3a 20 22 2b  74 6f 24 0d ba c2 16 20  |,"To: "+to$.... |
0001ea00  20 20 20 f5 41 24 3d a4  73 67 65 74 28 66 31 25  |   .A$=.sget(f1%|
0001ea10  29 0d ba cc 2f 20 20 20  20 20 20 e7 c0 41 24 2c  |).../      ..A$,|
0001ea20  34 29 3d 22 54 6f 3a 20  22 8c d5 23 66 32 25 2c  |4)="To: "..#f2%,|
0001ea30  22 58 2d 4f 72 69 67 69  6e 61 6c 6c 79 2d 22 3b  |"X-Originally-";|
0001ea40  0d ba d6 23 20 20 20 20  20 20 e7 c0 41 24 2c 35  |...#      ..A$,5|
0001ea50  29 3c 3e 22 46 72 6f 6d  20 22 8c d5 23 66 32 25  |)<>"From "..#f2%|
0001ea60  2c 41 24 0d ba e0 14 20  20 20 20 fd 41 24 3d 22  |,A$....    .A$="|
0001ea70  22 84 c5 23 66 31 25 0d  ba ea 32 20 20 20 20 f2  |"..#f1%...2    .|
0001ea80  66 63 6f 70 79 28 66 31  25 2c 66 32 25 29 3a f2  |fcopy(f1%,f2%):.|
0001ea90  63 66 28 66 32 25 29 3a  f2 73 65 74 74 79 70 65  |cf(f2%):.settype|
0001eaa0  28 66 24 2c 26 46 46 46  29 0d ba f4 09 20 20 20  |(f$,&FFF)....   |
0001eab0  20 cc 0d ba fe 1c 20 20  20 20 f2 6d 65 73 73 61  | .....    .messa|
0001eac0  67 65 30 28 22 53 63 72  61 70 22 2c 30 29 0d bb  |ge0("Scrap",0)..|
0001ead0  08 07 20 20 cd 0d bb 12  1e 20 20 f2 63 66 28 66  |..  .....  .cf(f|
0001eae0  31 25 29 3a 46 25 3d a4  64 65 6c 66 69 6c 65 28  |1%):F%=.delfile(|
0001eaf0  64 24 29 0d bb 1c 05 cd  0d bb 26 15 3d a4 73 65  |d$).......&.=.se|
0001eb00  6e 64 6d 61 69 6c 28 66  24 2c 75 24 29 0d bb 30  |ndmail(f$,u$)..0|
0001eb10  04 0d bb 3a 10 dd a4 72  65 70 6f 73 74 28 64 24  |...:...repost(d$|
0001eb20  29 0d bb 44 1f ea 41 24  2c 42 24 2c 43 24 2c 66  |)..D..A$,B$,C$,f|
0001eb30  24 2c 61 24 3a 66 24 3d  a4 74 6d 70 66 69 6c 65  |$,a$:f$=.tmpfile|
0001eb40  0d bb 4e 13 66 31 25 3d  a4 6f 70 65 6e 69 6e 28  |..N.f1%=.openin(|
0001eb50  64 24 29 0d bb 58 0b e7  66 31 25 3e 30 8c 0d bb  |d$)..X..f1%>0...|
0001eb60  62 16 20 20 66 32 25 3d  a4 6f 70 65 6e 6f 75 74  |b.  f2%=.openout|
0001eb70  28 66 24 29 0d bb 6c 0d  20 20 e7 66 32 25 3e 30  |(f$)..l.  .f2%>0|
0001eb80  8c 0d bb 76 16 20 20 20  20 f5 41 24 3d a4 73 67  |...v.    .A$=.sg|
0001eb90  65 74 28 66 31 25 29 0d  bb 80 22 20 20 20 20 20  |et(f1%)..."     |
0001eba0  20 e7 c0 41 24 2c 31 32  29 3d 22 4e 65 77 73 67  | ..A$,12)="Newsg|
0001ebb0  72 6f 75 70 73 3a 20 22  8c 0d bb 8a 47 20 20 20  |roups: "....G   |
0001ebc0  20 20 20 20 20 42 24 3d  22 4e 65 77 73 67 72 6f  |     B$="Newsgro|
0001ebd0  75 70 73 3a 20 22 3a e3  72 33 25 3d 31 33 b8 a9  |ups: ":.r3%=13..|
0001ebe0  41 24 3a 43 24 3d c1 41  24 2c 72 33 25 2c 31 29  |A$:C$=.A$,r3%,1)|
0001ebf0  3a e7 43 24 3c 3e 22 20  22 8c 42 24 2b 3d 43 24  |:.C$<>" ".B$+=C$|
0001ec00  0d bb 94 16 20 20 20 20  20 20 20 20 ed 72 33 25  |....        .r3%|
0001ec10  3a 41 24 3d 42 24 0d bb  9e 0c 20 20 20 20 20 20  |:A$=B$....      |
0001ec20  20 cd 0d bb a8 12 20 20  20 20 20 20 d5 23 66 32  | .....      .#f2|
0001ec30  25 2c 41 24 0d bb b2 14  20 20 20 20 fd 41 24 3d  |%,A$....    .A$=|
0001ec40  22 22 84 c5 23 66 31 25  0d bb bc 32 20 20 20 20  |""..#f1%...2    |
0001ec50  f2 66 63 6f 70 79 28 66  31 25 2c 66 32 25 29 3a  |.fcopy(f1%,f2%):|
0001ec60  f2 63 66 28 66 32 25 29  3a f2 73 65 74 74 79 70  |.cf(f2%):.settyp|
0001ec70  65 28 66 24 2c 26 46 46  46 29 0d bb c6 09 20 20  |e(f$,&FFF)....  |
0001ec80  20 20 cc 0d bb d0 29 20  20 20 20 66 24 3d 64 24  |  ....)    f$=d$|
0001ec90  3a f4 20 63 6f 75 6c 64  6e 27 74 20 6f 70 65 6e  |:. couldn't open|
0001eca0  20 73 63 72 61 74 63 68  66 69 6c 65 0d bb da 07  | scratchfile....|
0001ecb0  20 20 cd 0d bb e4 1e 20  20 f2 63 66 28 66 31 25  |  .....  .cf(f1%|
0001ecc0  29 3a 46 25 3d a4 64 65  6c 66 69 6c 65 28 64 24  |):F%=.delfile(d$|
0001ecd0  29 0d bb ee 07 20 20 cc  0d bb f8 26 20 20 66 24  |)....  ....&  f$|
0001ece0  3d 64 24 3a f4 20 63 6f  75 6c 64 6e 27 74 20 6f  |=d$:. couldn't o|
0001ecf0  70 65 6e 20 69 6e 70 75  74 20 66 69 6c 65 0d bc  |pen input file..|
0001ed00  02 05 cd 0d bc 0c 07 3d  66 24 0d bc 16 04 0d bc  |.......=f$......|
0001ed10  20 15 dd f2 66 63 6f 70  79 28 69 6e 25 2c 6f 75  | ...fcopy(in%,ou|
0001ed20  74 25 29 0d bc 2a 1f ea  6e 62 75 66 25 2c 6e 62  |t%)..*..nbuf%,nb|
0001ed30  72 25 2c 72 33 25 2c 46  25 3a e7 c5 23 69 6e 25  |r%,r3%,F%:..#in%|
0001ed40  8c e1 0d bc 34 29 6e 62  72 25 3d a4 63 6c 61 69  |....4)nbr%=.clai|
0001ed50  6d 28 6e 62 75 66 25 2c  34 30 39 36 2c 22 66 63  |m(nbuf%,4096,"fc|
0001ed60  6f 70 79 22 29 3a 72 33  25 3d 30 0d bc 3e 0d e7  |opy"):r3%=0..>..|
0001ed70  6e 62 75 66 25 3e 30 8c  0d bc 48 3e 20 20 c8 95  |nbuf%>0...H>  ..|
0001ed80  72 33 25 3d 30 80 28 46  25 80 31 29 3d 30 3a c8  |r3%=0.(F%.1)=0:.|
0001ed90  99 22 58 4f 53 5f 47 42  50 42 22 2c 34 2c 69 6e  |."XOS_GBPB",4,in|
0001eda0  25 2c 6e 62 75 66 25 2c  34 30 39 36 b8 2c 2c 2c  |%,nbuf%,4096.,,,|
0001edb0  72 33 25 3b 46 25 0d bc  52 41 20 20 20 20 e7 72  |r3%;F%..RA    .r|
0001edc0  33 25 3c 34 30 39 36 80  28 46 25 80 31 29 3d 30  |3%<4096.(F%.1)=0|
0001edd0  8c c8 99 22 58 4f 53 5f  47 42 50 42 22 2c 32 2c  |..."XOS_GBPB",2,|
0001ede0  6f 75 74 25 2c 6e 62 75  66 25 2c 34 30 39 36 2d  |out%,nbuf%,4096-|
0001edf0  72 33 25 b8 3b 46 25 0d  bc 5c 07 20 20 ce 0d bc  |r3%.;F%..\.  ...|
0001ee00  66 07 20 20 cc 0d bc 70  1f 20 20 c8 95 ac c5 23  |f.  ...p.  ....#|
0001ee10  69 6e 25 3a d5 23 6f 75  74 25 2c 28 9a 23 69 6e  |in%:.#out%,(.#in|
0001ee20  25 29 3a ce 0d bc 7a 05  cd 0d bc 84 12 f2 72 65  |%):...z.......re|
0001ee30  6c 65 61 73 65 28 6e 62  72 25 29 0d bc 8e 05 e1  |lease(nbr%).....|
0001ee40  0d bc 98 04 0d bc a2 1b  dd a4 6b 65 65 70 66 69  |..........keepfi|
0001ee50  6c 65 28 74 79 25 2c 66  24 2c f8 20 75 24 29 0d  |le(ty%,f$,. u$).|
0001ee60  bc ac 28 ea 70 24 2c 67  24 2c 67 25 2c 72 65 74  |..(.p$,g$,g%,ret|
0001ee70  24 2c 6d 24 3a 6d 24 3d  a4 6d 73 67 30 28 22 51  |$,m$:m$=.msg0("Q|
0001ee80  6b 65 65 70 30 22 29 0d  bc b6 96 ea 74 6f 24 2c  |keep0").....to$,|
0001ee90  66 72 6f 6d 24 2c 73 75  62 6a 65 63 74 24 2c 6d  |from$,subject$,m|
0001eea0  65 73 73 69 64 24 2c 6e  65 77 73 67 72 6f 75 70  |essid$,newsgroup|
0001eeb0  24 2c 65 78 70 69 72 65  73 25 2c 61 72 74 64 61  |$,expires%,artda|
0001eec0  74 65 25 2c 73 75 70 65  72 73 65 64 65 24 2c 72  |te%,supersede$,r|
0001eed0  65 63 65 69 70 74 24 2c  6c 61 73 74 68 25 2c 63  |eceipt$,lasth%,c|
0001eee0  6f 6e 74 72 6f 6c 24 2c  70 72 65 63 65 64 65 6e  |ontrol$,preceden|
0001eef0  63 65 24 2c 72 65 70 6c  79 74 6f 24 2c 61 70 70  |ce$,replyto$,app|
0001ef00  72 6f 76 65 64 24 2c 72  65 66 65 72 65 6e 63 65  |roved$,reference|
0001ef10  24 2c 63 63 24 2c 6f 72  69 67 74 6f 24 0d bc c0  |$,cc$,origto$...|
0001ef20  28 e7 a4 67 65 74 68 65  61 64 65 72 69 6e 66 6f  |(..getheaderinfo|
0001ef30  28 66 24 29 3c 3e 30 80  6b 65 65 70 6f 75 74 67  |(f$)<>0.keepoutg|
0001ef40  25 3c 3e 30 8c 0d bc ca  41 20 20 66 72 6f 6d 24  |%<>0....A  from$|
0001ef50  3d a4 63 6c 65 61 6e 28  66 72 6f 6d 24 29 3a 67  |=.clean(from$):g|
0001ef60  24 3d 66 72 6f 6d 24 3a  67 25 3d a7 67 24 2c 22  |$=from$:g%=.g$,"|
0001ef70  40 22 29 3a e7 67 25 3e  30 8c 67 24 3d c0 67 24  |@"):.g%>0.g$=.g$|
0001ef80  2c 67 25 2d 31 29 0d bc  d4 35 20 20 75 24 3d 67  |,g%-1)...5  u$=g|
0001ef90  24 3a 75 25 3d a4 75 73  65 72 6e 6f 28 67 24 29  |$:u%=.userno(g$)|
0001efa0  3a e7 75 25 3d 30 8c 75  25 3d 30 3a 67 24 3d 22  |:.u%=0.u%=0:g$="|
0001efb0  70 6f 73 74 6d 61 73 74  65 72 22 0d bc de 4e 20  |postmaster"...N |
0001efc0  20 e7 61 70 70 72 6f 76  65 64 24 3e 22 22 8c 6e  | .approved$>"".n|
0001efd0  65 77 73 67 72 6f 75 70  24 3d 22 21 22 2b 6e 65  |ewsgroup$="!"+ne|
0001efe0  77 73 67 72 6f 75 70 24  3a f4 20 66 6c 61 67 20  |wsgroup$:. flag |
0001eff0  61 70 70 72 6f 76 65 64  20 61 72 74 73 20 66 6f  |approved arts fo|
0001f000  72 20 70 6f 73 74 69 6e  67 0d bc e8 2f 20 20 e7  |r posting.../  .|
0001f010  28 75 6b 6e 25 28 75 25  29 3c 3e 30 80 74 79 25  |(ukn%(u%)<>0.ty%|
0001f020  3d 31 29 84 28 75 6b 6d  25 28 75 25 29 3c 3e 30  |=1).(ukm%(u%)<>0|
0001f030  80 74 79 25 3d 30 29 8c  0d bc f2 0f 20 20 20 20  |.ty%=0).....    |
0001f040  e7 67 24 3e 22 22 8c 0d  bc fc 10 20 20 20 20 20  |.g$>"".....     |
0001f050  20 c8 8e 74 79 25 ca 0d  bd 06 38 20 20 20 20 20  | ..ty%....8     |
0001f060  20 20 20 c9 30 3a 67 24  3d 22 45 6d 61 69 6c 2e  |   .0:g$="Email.|
0001f070  22 2b 67 24 2b 22 2e 6f  75 74 67 6f 69 6e 67 2e  |"+g$+".outgoing.|
0001f080  6d 61 69 6c 22 3a 66 72  6f 6d 24 3d 74 6f 24 0d  |mail":from$=to$.|
0001f090  bd 10 3e 20 20 20 20 20  20 20 20 7f 3a 67 24 3d  |..>        .:g$=|
0001f0a0  22 45 6d 61 69 6c 2e 22  2b 67 24 2b 22 2e 6f 75  |"Email."+g$+".ou|
0001f0b0  74 67 6f 69 6e 67 2e 6e  65 77 73 22 3a 66 72 6f  |tgoing.news":fro|
0001f0c0  6d 24 3d 6e 65 77 73 67  72 6f 75 70 24 0d bd 1a  |m$=newsgroup$...|
0001f0d0  0b 20 20 20 20 20 20 cb  0d bd 24 23 20 20 20 20  |.      ...$#    |
0001f0e0  20 20 67 25 3d a4 6e 61  6d 65 74 6f 6e 6f 28 67  |  g%=.nametono(g|
0001f0f0  24 2c b9 29 3a e7 67 25  3e 30 8c 0d bd 2e 1c 20  |$,.):.g%>0..... |
0001f100  20 20 20 20 20 20 20 70  24 3d a4 6e 6f 74 6f 70  |       p$=.notop|
0001f110  61 74 68 28 67 25 29 0d  bd 38 13 20 20 20 20 20  |ath(g%)..8.     |
0001f120  20 20 20 e7 70 24 3e 22  22 8c 0d bd 42 2f 20 20  |   .p$>""...B/  |
0001f130  20 20 20 20 20 20 20 20  73 25 3d a4 73 65 71 28  |        s%=.seq(|
0001f140  67 25 29 3a 46 25 3d a4  61 72 74 63 6f 70 79 28  |g%):F%=.artcopy(|
0001f150  67 25 2c 73 25 2c 66 24  29 0d bd 4c 42 20 20 20  |g%,s%,f$)..LB   |
0001f160  20 20 20 20 20 20 20 e7  46 25 3c 3e 30 f2 77 72  |       .F%<>0.wr|
0001f170  69 74 65 69 6e 64 65 78  62 75 66 3a 8b f2 6d 65  |iteindexbuf:..me|
0001f180  73 73 61 67 65 28 6d 24  2b a4 6d 73 67 30 28 22  |ssage(m$+.msg0("|
0001f190  51 6b 65 65 70 31 22 29  2c 31 29 0d bd 56 0f 20  |Qkeep1"),1)..V. |
0001f1a0  20 20 20 20 20 20 20 20  20 cc 0d bd 60 2c 20 20  |         ...`,  |
0001f1b0  20 20 20 20 20 20 20 20  f2 6d 65 73 73 61 67 65  |        .message|
0001f1c0  28 6d 24 2b a4 6d 73 67  30 28 22 51 6b 65 65 70  |(m$+.msg0("Qkeep|
0001f1d0  32 22 29 2c 31 29 0d bd  6a 0d 20 20 20 20 20 20  |2"),1)..j.      |
0001f1e0  20 20 cd 0d bd 74 0d 20  20 20 20 20 20 20 20 cc  |  ...t.        .|
0001f1f0  0d bd 7e 2a 20 20 20 20  20 20 20 20 f2 6d 65 73  |..~*        .mes|
0001f200  73 61 67 65 28 6d 24 2b  a4 6d 73 67 30 28 22 51  |sage(m$+.msg0("Q|
0001f210  6b 65 65 70 33 22 29 2c  31 29 0d bd 88 0b 20 20  |keep3"),1)....  |
0001f220  20 20 20 20 cd 0d bd 92  0b 20 20 20 20 20 20 cc  |    .....      .|
0001f230  0d bd 9c 28 20 20 20 20  20 20 f2 6d 65 73 73 61  |...(      .messa|
0001f240  67 65 28 6d 24 2b a4 6d  73 67 30 28 22 51 6b 65  |ge(m$+.msg0("Qke|
0001f250  65 70 34 22 29 2c 31 29  0d bd a6 09 20 20 20 20  |ep4"),1)....    |
0001f260  cd 0d bd b0 07 20 20 cd  0d bd ba 07 20 20 cc 0d  |.....  .....  ..|
0001f270  bd c4 35 20 20 e7 6b 65  65 70 6f 75 74 67 25 3c  |..5  .keepoutg%<|
0001f280  3e 30 8c f2 6d 65 73 73  61 67 65 28 6d 24 2b a4  |>0..message(m$+.|
0001f290  6d 73 67 31 28 22 4e 6f  46 69 6c 65 22 2c 66 24  |msg1("NoFile",f$|
0001f2a0  29 2c 31 29 0d bd ce 05  cd 0d bd d8 0b e7 74 79  |),1)..........ty|
0001f2b0  25 3d 30 8c 0d bd e2 0e  20 20 72 65 74 24 3d 74  |%=0.....  ret$=t|
0001f2c0  6f 24 0d bd ec 35 20 20  f2 6c 6f 67 28 22 53 65  |o$...5  .log("Se|
0001f2d0  6e 64 69 6e 67 20 6d 61  69 6c 20 66 72 6f 6d 20  |nding mail from |
0001f2e0  22 2b 75 24 2b 22 20 74  6f 20 22 2b c0 72 65 74  |"+u$+" to "+.ret|
0001f2f0  24 2c 32 30 30 29 29 0d  bd f6 07 20 20 cc 0d be  |$,200))....  ...|
0001f300  00 15 20 20 72 65 74 24  3d 6e 65 77 73 67 72 6f  |..  ret$=newsgro|
0001f310  75 70 24 0d be 0a 35 20  20 f2 6c 6f 67 28 22 50  |up$...5  .log("P|
0001f320  6f 73 74 69 6e 67 20 6e  65 77 73 20 66 72 6f 6d  |osting news from|
0001f330  20 22 2b 75 24 2b 22 20  74 6f 20 22 2b c0 72 65  | "+u$+" to "+.re|
0001f340  74 24 2c 32 30 30 29 29  0d be 14 05 cd 0d be 1e  |t$,200))........|
0001f350  09 3d 72 65 74 24 0d be  28 04 0d be 32 0e dd a4  |.=ret$..(...2...|
0001f360  73 67 65 74 28 68 25 29  0d be 3c 38 f4 20 72 65  |sget(h%)..<8. re|
0001f370  74 75 72 6e 20 6c 69 6e  65 20 66 72 6f 6d 20 66  |turn line from f|
0001f380  69 6c 65 20 77 69 74 68  6f 75 74 20 65 72 72 6f  |ile without erro|
0001f390  72 20 69 66 20 74 6f 6f  20 6c 6f 6e 67 2e 2e 2e  |r if too long...|
0001f3a0  0d be 46 0a ea 61 24 2c  43 25 0d be 50 3a c8 95  |..F..a$,C%..P:..|
0001f3b0  43 25 3c 3e 31 30 80 c5  23 68 25 3d 30 3a 43 25  |C%<>10..#h%=0:C%|
0001f3c0  3d 9a 23 68 25 3a e7 a9  61 24 3c 32 35 33 80 43  |=.#h%:..a$<253.C|
0001f3d0  25 3c 3e 31 30 80 43 25  3c 3e 31 33 3a 61 24 2b  |%<>10.C%<>13:a$+|
0001f3e0  3d bd 43 25 0d be 5a 05  ce 0d be 64 07 3d 61 24  |=.C%..Z....d.=a$|
0001f3f0  0d be 6e 04 0d be 78 29  dd f2 6c 69 73 74 75 73  |..n...x)..listus|
0001f400  65 72 73 28 63 6f 6d 25  2c 6e 62 66 72 6f 6d 25  |ers(com%,nbfrom%|
0001f410  2c 6e 62 72 65 66 25 2c  73 74 72 24 29 0d be 82  |,nbref%,str$)...|
0001f420  0c ea 6e 25 3a 6e 25 3d  31 0d be 8c 12 c8 95 75  |..n%:n%=1......u|
0001f430  73 65 72 24 28 6e 25 29  3e 22 22 0d be 96 51 20  |ser$(n%)>""...Q |
0001f440  20 f2 6e 62 72 65 70 6c  79 28 6e 62 66 72 6f 6d  | .nbreply(nbfrom|
0001f450  25 2c 6e 62 72 65 66 25  2c 63 6f 6d 25 2c 75 67  |%,nbref%,com%,ug|
0001f460  72 70 25 28 6e 25 29 2c  30 2c 75 73 65 72 24 28  |rp%(n%),0,user$(|
0001f470  6e 25 29 2c a4 75 70 61  74 68 28 75 73 65 72 24  |n%),.upath(user$|
0001f480  28 6e 25 29 29 29 3a 6e  25 2b 3d 31 0d be a0 05  |(n%))):n%+=1....|
0001f490  ce 0d be aa 2b f2 6e 62  72 65 70 6c 79 28 6e 62  |....+.nbreply(nb|
0001f4a0  66 72 6f 6d 25 2c 6e 62  72 65 66 25 2c 63 6f 6d  |from%,nbref%,com|
0001f4b0  25 2c 30 2c 30 2c 22 22  2c 22 22 29 0d be b4 05  |%,0,0,"","")....|
0001f4c0  e1 0d be be 04 0d be c8  27 dd f2 61 64 64 75 73  |........'..addus|
0001f4d0  65 72 28 63 6f 6d 25 2c  6e 62 66 72 6f 6d 25 2c  |er(com%,nbfrom%,|
0001f4e0  6e 62 72 65 66 25 2c 73  74 72 24 29 0d be d2 14  |nbref%,str$)....|
0001f4f0  e7 a4 61 64 64 75 73 65  72 28 73 74 72 24 29 8c  |..adduser(str$).|
0001f500  0d be dc 2d 20 20 f2 6e  62 72 65 70 6c 79 28 6e  |...-  .nbreply(n|
0001f510  62 66 72 6f 6d 25 2c 6e  62 72 65 66 25 2c 63 6f  |bfrom%,nbref%,co|
0001f520  6d 25 2c 30 2c 30 2c 22  22 2c 22 22 29 0d be e6  |m%,0,0,"","")...|
0001f530  05 cc 0d be f0 37 20 20  f2 6e 62 63 6f 6d 66 61  |.....7  .nbcomfa|
0001f540  69 6c 28 6e 62 66 72 6f  6d 25 2c 6e 62 72 65 66  |il(nbfrom%,nbref|
0001f550  25 2c 63 6f 6d 25 2c 31  2c a4 6d 73 67 30 28 22  |%,com%,1,.msg0("|
0001f560  55 6e 6f 61 64 64 22 29  29 0d be fa 05 cd 0d bf  |Unoadd")).......|
0001f570  04 05 e1 0d bf 0e 04 0d  bf 18 27 dd f2 64 65 6c  |..........'..del|
0001f580  75 73 65 72 28 63 6f 6d  25 2c 6e 62 66 72 6f 6d  |user(com%,nbfrom|
0001f590  25 2c 6e 62 72 65 66 25  2c 73 74 72 24 29 0d bf  |%,nbref%,str$)..|
0001f5a0  22 14 e7 a4 64 65 6c 75  73 65 72 28 73 74 72 24  |"...deluser(str$|
0001f5b0  29 8c 0d bf 2c 2d 20 20  f2 6e 62 72 65 70 6c 79  |)...,-  .nbreply|
0001f5c0  28 6e 62 66 72 6f 6d 25  2c 6e 62 72 65 66 25 2c  |(nbfrom%,nbref%,|
0001f5d0  63 6f 6d 25 2c 30 2c 30  2c 22 22 2c 22 22 29 0d  |com%,0,0,"","").|
0001f5e0  bf 36 05 cc 0d bf 40 37  20 20 f2 6e 62 63 6f 6d  |.6....@7  .nbcom|
0001f5f0  66 61 69 6c 28 6e 62 66  72 6f 6d 25 2c 6e 62 72  |fail(nbfrom%,nbr|
0001f600  65 66 25 2c 63 6f 6d 25  2c 31 2c a4 6d 73 67 30  |ef%,com%,1,.msg0|
0001f610  28 22 55 6e 6f 64 65 6c  22 29 29 0d bf 4a 05 cd  |("Unodel"))..J..|
0001f620  0d bf 54 05 e1 0d bf 5e  04 0d bf 68 12 dd a4 75  |..T....^...h...u|
0001f630  70 6c 69 6d 28 67 25 2c  6e 25 29 0d bf 72 27 e7  |plim(g%,n%)..r'.|
0001f640  6e 25 3d 30 84 6e 25 3e  94 67 72 70 73 65 71 25  |n%=0.n%>.grpseq%|
0001f650  28 67 25 29 3a 3d 94 67  72 70 73 65 71 25 28 67  |(g%):=.grpseq%(g|
0001f660  25 29 0d bf 7c 07 3d 6e  25 0d bf 86 04 0d bf 90  |%)..|.=n%.......|
0001f670  13 dd a4 67 6d 61 74 63  68 28 67 24 2c 67 25 29  |...gmatch(g$,g%)|
0001f680  0d bf 9a 14 e7 67 25 3e  6d 61 78 67 72 6f 75 70  |.....g%>maxgroup|
0001f690  25 8c 3d 30 0d bf a4 19  3d a4 73 6d 61 74 63 68  |%.=0....=.smatch|
0001f6a0  28 67 24 2c 67 72 70 24  28 67 25 29 29 0d bf ae  |(g$,grp$(g%))...|
0001f6b0  04 0d bf b8 0f dd a4 64  65 6c 6f 6b 28 67 24 29  |.......delok(g$)|
0001f6c0  0d bf c2 28 e7 72 77 25  8c e7 64 65 6c 6f 6b 25  |...(.rw%..delok%|
0001f6d0  3c 3e 30 84 a4 73 70 65  63 69 61 6c 67 72 70 28  |<>0..specialgrp(|
0001f6e0  67 24 29 3e 31 8c 3d b9  0d bf cc 06 3d a3 0d bf  |g$)>1.=.....=...|
0001f6f0  d6 04 0d bf e0 14 dd a4  73 70 65 63 69 61 6c 67  |........specialg|
0001f700  72 70 28 67 24 29 0d bf  ea 1f 67 24 3d a4 63 6c  |rp(g$)....g$=.cl|
0001f710  65 61 6e 28 67 24 29 3a  67 24 3d a4 6c 6f 77 65  |ean(g$):g$=.lowe|
0001f720  72 28 67 24 29 0d bf f4  22 e7 67 24 3d 22 6a 75  |r(g$)...".g$="ju|
0001f730  6e 6b 22 84 c0 67 24 2c  37 29 3d 22 63 6f 6e 74  |nk"..g$,7)="cont|
0001f740  72 6f 6c 22 8c 3d 31 0d  bf fe 17 e7 c0 67 24 2c  |rol".=1......g$,|
0001f750  36 29 3d 22 65 6d 61 69  6c 2e 22 8c 3d 32 0d c0  |6)="email.".=2..|
0001f760  08 18 e7 c0 67 24 2c 37  29 3d 22 66 6f 6c 64 65  |....g$,7)="folde|
0001f770  72 2e 22 8c 3d 33 0d c0  12 1a e7 c0 67 24 2c 39  |r.".=3......g$,9|
0001f780  29 3d 22 6e 65 77 73 62  61 73 65 2e 22 8c 3d 31  |)="newsbase.".=1|
0001f790  0d c0 1c 06 3d 30 0d c0  26 04 0d c0 30 0e dd a4  |....=0..&...0...|
0001f7a0  70 61 74 68 28 41 24 29  0d c0 3a 0d ea 42 24 3a  |path(A$)..:..B$:|
0001f7b0  42 24 3d 22 22 0d c0 44  1a e7 41 24 3e 22 22 8c  |B$=""..D..A$>"".|
0001f7c0  d6 67 65 74 70 61 74 68  25 2c 41 24 2c 42 24 0d  |.getpath%,A$,B$.|
0001f7d0  c0 4e 0e 3d 64 70 61 74  68 24 2b 42 24 0d c0 58  |.N.=dpath$+B$..X|
0001f7e0  04 0d c0 62 0f dd a4 6c  6f 77 65 72 28 41 24 29  |...b...lower(A$)|
0001f7f0  0d c0 6c 16 e7 41 24 3e  22 22 d6 6d 6b 6c 63 61  |..l..A$>"".mklca|
0001f800  73 65 25 2c 41 24 0d c0  76 07 3d 41 24 0d c0 80  |se%,A$..v.=A$...|
0001f810  04 0d c0 8a 0d dd a4 73  74 72 28 61 25 29 0d c0  |.......str(a%)..|
0001f820  94 0e ea 64 75 6d 6d 79  25 2c 42 24 0d c0 9e 1a  |...dummy%,B$....|
0001f830  d6 67 65 74 6c 69 6e 65  25 2c 64 75 6d 6d 79 25  |.getline%,dummy%|
0001f840  2c 61 25 2c 42 24 0d c0  a8 07 3d 42 24 0d c0 b2  |,a%,B$....=B$...|
0001f850  04 0d c0 bc 13 dd a4 73  6d 61 74 63 68 28 41 24  |.......smatch(A$|
0001f860  2c 42 24 29 0d c0 c6 3b  f4 20 77 69 6c 64 20 73  |,B$)...;. wild s|
0001f870  74 72 69 6e 67 20 6d 61  74 63 68 20 28 63 61 73  |tring match (cas|
0001f880  65 20 69 6e 73 65 6e 73  69 74 69 76 65 29 3a 20  |e insensitive): |
0001f890  70 61 74 74 65 72 6e 2c  20 73 74 72 69 6e 67 0d  |pattern, string.|
0001f8a0  c0 d0 08 ea 6f 6b 25 0d  c0 da 23 e7 41 24 3e 22  |....ok%...#.A$>"|
0001f8b0  22 80 42 24 3e 22 22 8c  d6 73 6d 61 74 63 68 25  |".B$>""..smatch%|
0001f8c0  2c 41 24 2c 42 24 2c 6f  6b 25 0d c0 e4 09 3d 94  |,A$,B$,ok%....=.|
0001f8d0  6f 6b 25 0d c0 ee 04 0d  c0 f8 0e dd f2 6c 6f 61  |ok%..........loa|
0001f8e0  64 63 6f 64 65 0d c1 02  0a ea 6c 25 2c 46 25 0d  |dcode.....l%,F%.|
0001f8f0  c1 0c 21 6c 25 3d a4 66  69 6c 65 73 69 7a 65 28  |..!l%=.filesize(|
0001f900  72 65 73 64 69 72 24 2b  22 2e 63 6f 64 65 22 29  |resdir$+".code")|
0001f910  0d c1 16 0a e7 6c 25 3e  30 8c 0d c1 20 10 20 20  |.....l%>0... .  |
0001f920  de 6d 63 6f 64 65 25 20  6c 25 0d c1 2a 3d 20 20  |.mcode% l%..*=  |
0001f930  63 70 79 6c 63 61 73 65  25 3d 6d 63 6f 64 65 25  |cpylcase%=mcode%|
0001f940  2b 34 3a 67 65 74 70 61  74 68 25 3d 6d 63 6f 64  |+4:getpath%=mcod|
0001f950  65 25 2b 38 3a 67 65 74  6c 69 6e 65 25 3d 6d 63  |e%+8:getline%=mc|
0001f960  6f 64 65 25 2b 31 32 0d  c1 34 3e 20 20 67 65 74  |ode%+12..4>  get|
0001f970  6c 69 6e 65 7a 25 3d 6d  63 6f 64 65 25 2b 31 36  |linez%=mcode%+16|
0001f980  3a 67 65 74 73 74 72 25  3d 6d 63 6f 64 65 25 2b  |:getstr%=mcode%+|
0001f990  32 30 3a 6d 6b 6c 63 61  73 65 25 3d 6d 63 6f 64  |20:mklcase%=mcod|
0001f9a0  65 25 2b 32 34 0d c1 3e  41 20 20 74 72 69 6d 73  |e%+24..>A  trims|
0001f9b0  74 72 25 3d 6d 63 6f 64  65 25 2b 32 38 3a 63 68  |tr%=mcode%+28:ch|
0001f9c0  6b 64 65 6c 61 72 74 25  3d 6d 63 6f 64 65 25 2b  |kdelart%=mcode%+|
0001f9d0  33 32 3a 68 65 61 64 65  72 6e 6f 25 3d 6d 63 6f  |32:headerno%=mco|
0001f9e0  64 65 25 2b 33 36 0d c1  48 17 20 20 73 6d 61 74  |de%+36..H.  smat|
0001f9f0  63 68 25 3d 6d 63 6f 64  65 25 2b 34 30 0d c1 52  |ch%=mcode%+40..R|
0001fa00  32 20 20 c8 99 22 58 4f  53 5f 46 69 6c 65 22 2c  |2  .."XOS_File",|
0001fa10  31 36 2c 72 65 73 64 69  72 24 2b 22 2e 63 6f 64  |16,resdir$+".cod|
0001fa20  65 22 2c 6d 63 6f 64 65  25 2c 30 b8 3b 46 25 0d  |e",mcode%,0.;F%.|
0001fa30  c1 5c 27 20 20 e7 28 46  25 80 31 29 8c 85 30 2c  |.\'  .(F%.1)..0,|
0001fa40  22 43 6f 64 65 20 66 69  6c 65 20 6e 6f 74 20 66  |"Code file not f|
0001fa50  6f 75 6e 64 21 22 0d c1  66 07 20 20 cc 0d c1 70  |ound!"..f.  ...p|
0001fa60  1f 20 20 85 30 2c 22 43  6f 64 65 20 66 69 6c 65  |.  .0,"Code file|
0001fa70  20 6e 6f 74 20 66 6f 75  6e 64 21 22 0d c1 7a 05  | not found!"..z.|
0001fa80  cd 0d c1 84 05 e1 0d c1  8e 04 0d c1 98 11 dd f2  |................|
0001fa90  6c 6f 61 64 73 79 73 63  6f 6e 66 0d c1 a2 13 ea  |loadsysconf.....|
0001faa0  74 24 2c 70 24 2c 76 24  2c 6d 25 2c 76 25 0d c1  |t$,p$,v$,m%,v%..|
0001fab0  ac 30 61 64 64 67 72 70  25 3d 32 30 3a 6d 69 6e  |.0addgrp%=20:min|
0001fac0  67 72 70 25 3d 34 30 3a  6d 61 78 75 73 72 25 3d  |grp%=40:maxusr%=|
0001fad0  32 30 3a 6d 61 78 66 69  6c 74 25 3d 31 30 0d c1  |20:maxfilt%=10..|
0001fae0  b6 4e 6d 61 78 63 6c 25  3d 31 35 3a 6d 69 6e 63  |.Nmaxcl%=15:minc|
0001faf0  70 75 25 3d 37 3a 6d 61  78 63 70 75 25 3d 31 35  |pu%=7:maxcpu%=15|
0001fb00  3a 6d 69 6e 72 6d 61 25  3d 30 3a 69 6e 62 75 66  |:minrma%=0:inbuf|
0001fb10  73 69 7a 65 25 3d 31 36  2a 31 30 32 34 3a 64 62  |size%=16*1024:db|
0001fb20  67 5f 65 78 70 74 69 6d  65 25 3d 33 0d c1 c0 11  |g_exptime%=3....|
0001fb30  63 68 6b 74 69 6d 65 25  3d 31 30 30 30 0d c1 ca  |chktime%=1000...|
0001fb40  2c 66 31 25 3d a4 6f 70  65 6e 69 6e 28 73 75 70  |,f1%=.openin(sup|
0001fb50  70 6f 72 74 24 2b 22 2e  21 6e 62 73 79 73 22 29  |port$+".!nbsys")|
0001fb60  3a e7 66 31 25 3c 3e 30  8c 0d c1 d4 15 20 20 f5  |:.f1%<>0.....  .|
0001fb70  74 24 3d be 23 66 31 25  3a 70 24 3d 22 22 0d c1  |t$=.#f1%:p$=""..|
0001fb80  de 11 20 20 6d 25 3d a7  74 24 2c 22 20 22 29 0d  |..  m%=.t$," ").|
0001fb90  c1 e8 34 20 20 e7 6d 25  3e 30 8c 70 24 3d a4 6c  |..4  .m%>0.p$=.l|
0001fba0  6f 77 65 72 28 c0 74 24  2c 6d 25 2d 31 29 29 3a  |ower(.t$,m%-1)):|
0001fbb0  76 24 3d c1 74 24 2c 6d  25 2b 31 29 3a 76 25 3d  |v$=.t$,m%+1):v%=|
0001fbc0  bb 76 24 0d c1 f2 0b 20  20 c8 8e 70 24 ca 0d c1  |.v$....  ..p$...|
0001fbd0  fc 24 20 20 20 20 c9 22  61 64 64 5f 67 72 70 22  |.$    ."add_grp"|
0001fbe0  3a e7 76 25 3e 31 30 8c  61 64 64 67 72 70 25 3d  |:.v%>10.addgrp%=|
0001fbf0  76 25 0d c2 06 24 20 20  20 20 c9 22 6d 69 6e 5f  |v%...$    ."min_|
0001fc00  67 72 70 22 3a e7 76 25  3e 31 30 8c 6d 69 6e 67  |grp":.v%>10.ming|
0001fc10  72 70 25 3d 76 25 0d c2  10 23 20 20 20 20 c9 22  |rp%=v%...#    ."|
0001fc20  6d 61 78 5f 75 73 72 22  3a e7 76 25 3e 35 8c 6d  |max_usr":.v%>5.m|
0001fc30  61 78 75 73 72 25 3d 76  25 0d c2 1a 22 20 20 20  |axusr%=v%..."   |
0001fc40  20 c9 22 6d 61 78 5f 72  64 72 22 3a e7 76 25 3e  | ."max_rdr":.v%>|
0001fc50  34 8c 6d 61 78 63 6c 25  3d 76 25 0d c2 24 29 20  |4.maxcl%=v%..$) |
0001fc60  20 20 20 c9 22 6d 69 6e  5f 63 70 75 22 3a e7 76  |   ."min_cpu":.v|
0001fc70  25 3e 35 80 76 25 3c 32  30 8c 6d 69 6e 63 70 75  |%>5.v%<20.mincpu|
0001fc80  25 3d 76 25 0d c2 2e 29  20 20 20 20 c9 22 6d 61  |%=v%...)    ."ma|
0001fc90  78 5f 63 70 75 22 3a e7  76 25 3e 35 80 76 25 3c  |x_cpu":.v%>5.v%<|
0001fca0  36 30 8c 6d 61 78 63 70  75 25 3d 76 25 0d c2 38  |60.maxcpu%=v%..8|
0001fcb0  32 20 20 20 20 c9 22 64  65 62 5f 62 75 66 22 3a  |2    ."deb_buf":|
0001fcc0  e7 76 25 3e 33 80 76 25  3c 32 35 36 8c 69 6e 62  |.v%>3.v%<256.inb|
0001fcd0  75 66 73 69 7a 65 25 3d  76 25 2a 31 30 32 34 0d  |ufsize%=v%*1024.|
0001fce0  c2 42 28 20 20 20 20 c9  22 64 62 67 5f 65 78 70  |.B(    ."dbg_exp|
0001fcf0  22 3a e7 76 25 3e 30 8c  64 62 67 5f 65 78 70 74  |":.v%>0.dbg_expt|
0001fd00  69 6d 65 25 3d 76 25 0d  c2 4c 25 20 20 20 20 c9  |ime%=v%..L%    .|
0001fd10  22 6d 69 6e 5f 66 6c 74  22 3a e7 76 25 3e 31 30  |"min_flt":.v%>10|
0001fd20  8c 6d 61 78 66 69 6c 74  25 3d 76 25 0d c2 56 28  |.maxfilt%=v%..V(|
0001fd30  20 20 20 20 c9 22 63 68  6b 5f 74 69 6d 22 3a e7  |    ."chk_tim":.|
0001fd40  76 25 3e 35 8c 63 68 6b  74 69 6d 65 25 3d 76 25  |v%>5.chktime%=v%|
0001fd50  2a 31 30 30 0d c2 60 07  20 20 cb 0d c2 6a 15 20  |*100..`.  ...j. |
0001fd60  20 fd c5 23 66 31 25 3a  f2 63 66 28 66 31 25 29  | ..#f1%:.cf(f1%)|
0001fd70  0d c2 74 05 cd 0d c2 7e  25 de 20 63 6c 5f 69 64  |..t....~%. cl_id|
0001fd80  25 28 6d 61 78 63 6c 25  29 2c 63 6c 5f 75 73 65  |%(maxcl%),cl_use|
0001fd90  72 24 28 6d 61 78 63 6c  25 29 0d c2 88 05 e1 0d  |r$(maxcl%)......|
0001fda0  c2 92 04 0d c2 9c 0d dd  a4 63 70 75 28 66 25 29  |.........cpu(f%)|
0001fdb0  0d c2 a6 13 e7 66 25 3d  30 8c 3d 2d 6d 69 6e 63  |.....f%=0.=-minc|
0001fdc0  70 75 25 0d c2 b0 0d 3d  2d 6d 61 78 63 70 75 25  |pu%....=-maxcpu%|
0001fdd0  0d c2 ba 04 0d c2 c4 1c  dd a4 63 6c 61 69 6d 28  |..........claim(|
0001fde0  f8 20 76 61 72 25 2c 73  69 7a 65 25 2c 41 24 29  |. var%,size%,A$)|
0001fdf0  0d c2 ce 0c ea 46 25 2c  72 65 74 25 0d c2 d8 0f  |.....F%,ret%....|
0001fe00  e7 64 79 6e 61 72 65 61  25 20 8c 0d c2 e2 43 20  |.dynarea% ....C |
0001fe10  20 f4 20 63 68 61 6e 67  65 64 20 73 69 7a 65 5f  | . changed size_|
0001fe20  6c 69 6d 69 74 20 28 72  35 29 2c 20 61 6e 64 20  |limit (r5), and |
0001fe30  66 6c 61 67 20 62 69 74  20 37 20 73 65 74 20 28  |flag bit 7 set (|
0001fe40  6e 6f 6e 2d 64 72 61 67  67 61 62 6c 65 29 0d c2  |non-draggable)..|
0001fe50  ec 48 20 20 c8 99 26 32  30 30 36 36 2c 30 2c 2d  |.H  ..&20066,0,-|
0001fe60  31 2c 73 69 7a 65 25 2c  2d 31 2c 31 32 38 2c 73  |1,size%,-1,128,s|
0001fe70  69 7a 65 25 2c 30 2c 30  2c 6d 79 6e 61 6d 65 24  |ize%,0,0,myname$|
0001fe80  2b 22 5f 22 2b 41 24 b8  2c 72 65 74 25 2c 2c 76  |+"_"+A$.,ret%,,v|
0001fe90  61 72 25 3b 46 25 0d c2  f6 1b 20 20 e7 28 46 25  |ar%;F%....  .(F%|
0001fea0  80 31 29 8c 76 61 72 25  3d 30 3a 72 65 74 25 3d  |.1).var%=0:ret%=|
0001feb0  30 0d c3 00 07 20 20 cc  0d c3 0a 28 20 20 c8 99  |0....  ....(  ..|
0001fec0  22 58 4f 53 5f 4d 6f 64  75 6c 65 22 2c 36 2c 2c  |"XOS_Module",6,,|
0001fed0  2c 73 69 7a 65 25 b8 2c  2c 76 61 72 25 3b 46 25  |,size%.,,var%;F%|
0001fee0  0d c3 14 14 20 20 e7 28  46 25 80 31 29 8c 76 61  |....  .(F%.1).va|
0001fef0  72 25 3d 30 0d c3 1e 0f  20 20 72 65 74 25 3d 76  |r%=0....  ret%=v|
0001ff00  61 72 25 0d c3 28 05 cd  0d c3 32 09 3d 72 65 74  |ar%..(....2.=ret|
0001ff10  25 0d c3 3c 04 0d c3 46  15 dd f2 72 65 6c 65 61  |%..<...F...relea|
0001ff20  73 65 28 f8 20 76 61 72  25 29 0d c3 50 0a ea 46  |se(. var%)..P..F|
0001ff30  25 2c 73 25 0d c3 5a 0c  e7 76 61 72 25 3e 30 8c  |%,s%..Z..var%>0.|
0001ff40  0d c3 64 11 20 20 e7 64  79 6e 61 72 65 61 25 20  |..d.  .dynarea% |
0001ff50  8c 0d c3 6e 1d 20 20 c8  99 26 32 30 30 36 36 2c  |...n.  ..&20066,|
0001ff60  32 2c 76 61 72 25 b8 2c  2c 73 25 3b 46 25 0d c3  |2,var%.,,s%;F%..|
0001ff70  78 2f 20 20 e7 73 25 3e  30 80 28 46 25 80 31 29  |x/  .s%>0.(F%.1)|
0001ff80  3d 30 8c c8 99 26 32 30  30 36 36 2c 31 2c 76 61  |=0...&20066,1,va|
0001ff90  72 25 b8 3b 46 25 3a 76  61 72 25 3d 30 0d c3 82  |r%.;F%:var%=0...|
0001ffa0  07 20 20 cc 0d c3 8c 27  20 20 c8 99 22 58 4f 53  |.  ....'  .."XOS|
0001ffb0  5f 4d 6f 64 75 6c 65 22  2c 37 2c 2c 76 61 72 25  |_Module",7,,var%|
0001ffc0  b8 3b 46 25 3a 76 61 72  25 3d 30 0d c3 96 31 20  |.;F%:var%=0...1 |
0001ffd0  20 c8 99 22 58 4f 53 5f  43 68 61 6e 67 65 44 79  | .."XOS_ChangeDy|
0001ffe0  6e 61 6d 69 63 41 72 65  61 22 2c 31 2c 28 2d 31  |namicArea",1,(-1|
0001fff0  36 2a 31 30 32 34 2a 31  30 32 34 29 0d c3 a0 07  |6*1024*1024)....|
00020000  20 20 cd 0d c3 aa 05 cd  0d c3 b4 05 e1 0d c3 be  |  ..............|
00020010  04 0d c3 c8 12 dd f2 74  69 64 79 64 79 6e 61 72  |.......tidydynar|
00020020  65 61 73 0d c3 d2 0d ea  41 25 2c 4e 25 2c 50 25  |eas.....A%,N%,P%|
00020030  0d c3 dc 0f e7 64 79 6e  61 72 65 61 25 20 8c 0d  |.....dynarea% ..|
00020040  c3 e6 14 20 20 c8 99 26  36 36 2c 33 2c 2d 31 b8  |...  ..&66,3,-1.|
00020050  2c 41 25 0d c3 f0 0e 20  20 c8 95 41 25 3c 3e 2d  |,A%....  ..A%<>-|
00020060  31 0d c3 fa 1d 20 20 20  20 c8 99 26 36 36 2c 32  |1....    ..&66,2|
00020070  2c 41 25 b8 2c 2c 2c 2c  2c 2c 2c 2c 50 25 0d c4  |,A%.,,,,,,,,P%..|
00020080  04 16 20 20 20 20 c8 99  26 36 36 2c 33 2c 41 25  |..    ..&66,3,A%|
00020090  b8 2c 4e 25 0d c4 0e 35  20 20 20 20 e7 c0 a4 73  |.,N%...5    ...s|
000200a0  74 72 28 50 25 29 2c 31  2b a9 6d 79 6e 61 6d 65  |tr(P%),1+.myname|
000200b0  24 29 3d 6d 79 6e 61 6d  65 24 2b 22 5f 22 8c c8  |$)=myname$+"_"..|
000200c0  99 26 36 36 2c 31 2c 41  25 0d c4 18 0d 20 20 20  |.&66,1,A%....   |
000200d0  20 41 25 3d 4e 25 0d c4  22 07 20 20 ce 0d c4 2c  | A%=N%..".  ...,|
000200e0  05 cd 0d c4 36 05 e1 0d  c4 40 04 0d c4 4a 13 dd  |....6....@...J..|
000200f0  f2 73 74 61 72 74 6d 73  67 74 72 61 6e 73 0d c4  |.startmsgtrans..|
00020100  54 1f ea 66 24 3a 66 24  3d a4 72 65 73 66 69 6c  |T..f$:f$=.resfil|
00020110  65 28 22 4d 65 73 73 61  67 65 73 22 29 0d c4 5e  |e("Messages")..^|
00020120  2c c8 99 22 58 4d 65 73  73 61 67 65 54 72 61 6e  |,.."XMessageTran|
00020130  73 5f 46 69 6c 65 49 6e  66 6f 22 2c 2c 66 24 b8  |s_FileInfo",,f$.|
00020140  2c 2c 62 75 66 25 3b 46  25 0d c4 68 2d e7 28 46  |,,buf%;F%..h-.(F|
00020150  25 80 31 29 8c 85 30 2c  22 43 6f 75 6c 64 6e 27  |%.1)..0,"Couldn'|
00020160  74 20 66 69 6e 64 20 4d  65 73 73 61 67 65 73 20  |t find Messages |
00020170  66 69 6c 65 21 22 0d c4  72 1c de 6d 73 67 64 65  |file!"..r..msgde|
00020180  73 63 25 31 36 2c 6d 73  67 62 75 66 25 20 62 75  |sc%16,msgbuf% bu|
00020190  66 25 0d c4 7c 31 c8 99  22 4d 65 73 73 61 67 65  |f%..|1.."Message|
000201a0  54 72 61 6e 73 5f 4f 70  65 6e 46 69 6c 65 22 2c  |Trans_OpenFile",|
000201b0  6d 73 67 64 65 73 63 25  2c 66 24 2c 6d 73 67 62  |msgdesc%,f$,msgb|
000201c0  75 66 25 0d c4 86 05 e1  0d c4 90 04 0d c4 9a 11  |uf%.............|
000201d0  dd f2 65 6e 64 6d 73 67  74 72 61 6e 73 0d c4 a4  |..endmsgtrans...|
000201e0  33 e7 6d 73 67 64 65 73  63 25 3e 30 8c c8 99 22  |3.msgdesc%>0..."|
000201f0  4d 65 73 73 61 67 65 54  72 61 6e 73 5f 43 6c 6f  |MessageTrans_Clo|
00020200  73 65 46 69 6c 65 22 2c  6d 73 67 64 65 73 63 25  |seFile",msgdesc%|
00020210  0d c4 ae 05 e1 0d c4 b8  04 0d c4 c2 0e dd a4 6d  |...............m|
00020220  73 67 30 28 74 24 29 0d  c4 cc 0a ea 73 25 2c 46  |sg0(t$).....s%,F|
00020230  25 0d c4 d6 30 c8 99 22  58 4d 65 73 73 61 67 65  |%...0.."XMessage|
00020240  54 72 61 6e 73 5f 4c 6f  6f 6b 75 70 22 2c 6d 73  |Trans_Lookup",ms|
00020250  67 64 65 73 63 25 2c 74  24 b8 2c 2c 73 25 3b 46  |gdesc%,t$.,,s%;F|
00020260  25 0d c4 e0 1b e7 28 46  25 80 31 29 8c 73 25 3d  |%.....(F%.1).s%=|
00020270  a4 6d 73 67 66 61 69 6c  28 74 24 29 0d c4 ea 0d  |.msgfail(t$)....|
00020280  3d a4 73 74 72 28 73 25  29 0d c4 f4 11 dd a4 6d  |=.str(s%)......m|
00020290  73 67 31 28 74 24 2c 61  24 29 0d c4 fe 0a ea 73  |sg1(t$,a$).....s|
000202a0  25 2c 46 25 0d c5 08 3c  c8 99 22 58 4d 65 73 73  |%,F%...<.."XMess|
000202b0  61 67 65 54 72 61 6e 73  5f 4c 6f 6f 6b 75 70 22  |ageTrans_Lookup"|
000202c0  2c 6d 73 67 64 65 73 63  25 2c 74 24 2c 74 6d 70  |,msgdesc%,t$,tmp|
000202d0  25 2c 32 35 35 2c 61 24  b8 2c 2c 73 25 3b 46 25  |%,255,a$.,,s%;F%|
000202e0  0d c5 12 1b e7 28 46 25  80 31 29 8c 73 25 3d a4  |.....(F%.1).s%=.|
000202f0  6d 73 67 66 61 69 6c 28  74 24 29 0d c5 1c 0d 3d  |msgfail(t$)....=|
00020300  a4 73 74 72 28 73 25 29  0d c5 26 14 dd a4 6d 73  |.str(s%)..&...ms|
00020310  67 32 28 74 24 2c 61 24  2c 62 24 29 0d c5 30 0a  |g2(t$,a$,b$)..0.|
00020320  ea 73 25 2c 46 25 0d c5  3a 3f c8 99 22 58 4d 65  |.s%,F%..:?.."XMe|
00020330  73 73 61 67 65 54 72 61  6e 73 5f 4c 6f 6f 6b 75  |ssageTrans_Looku|
00020340  70 22 2c 6d 73 67 64 65  73 63 25 2c 74 24 2c 74  |p",msgdesc%,t$,t|
00020350  6d 70 25 2c 32 35 35 2c  61 24 2c 62 24 b8 2c 2c  |mp%,255,a$,b$.,,|
00020360  73 25 3b 46 25 0d c5 44  1b e7 28 46 25 80 31 29  |s%;F%..D..(F%.1)|
00020370  8c 73 25 3d a4 6d 73 67  66 61 69 6c 28 74 24 29  |.s%=.msgfail(t$)|
00020380  0d c5 4e 0d 3d a4 73 74  72 28 73 25 29 0d c5 58  |..N.=.str(s%)..X|
00020390  17 dd a4 6d 73 67 33 28  74 24 2c 61 24 2c 62 24  |...msg3(t$,a$,b$|
000203a0  2c 63 24 29 0d c5 62 0a  ea 73 25 2c 46 25 0d c5  |,c$)..b..s%,F%..|
000203b0  6c 42 c8 99 22 58 4d 65  73 73 61 67 65 54 72 61  |lB.."XMessageTra|
000203c0  6e 73 5f 4c 6f 6f 6b 75  70 22 2c 6d 73 67 64 65  |ns_Lookup",msgde|
000203d0  73 63 25 2c 74 24 2c 74  6d 70 25 2c 32 35 35 2c  |sc%,t$,tmp%,255,|
000203e0  61 24 2c 62 24 2c 63 24  b8 2c 2c 73 25 3b 46 25  |a$,b$,c$.,,s%;F%|
000203f0  0d c5 76 1b e7 28 46 25  80 31 29 8c 73 25 3d a4  |..v..(F%.1).s%=.|
00020400  6d 73 67 66 61 69 6c 28  74 24 29 0d c5 80 0d 3d  |msgfail(t$)....=|
00020410  a4 73 74 72 28 73 25 29  0d c5 8a 04 0d c5 94 11  |.str(s%)........|
00020420  dd a4 6d 73 67 66 61 69  6c 28 74 24 29 0d c5 9e  |..msgfail(t$)...|
00020430  36 f2 6d 65 73 73 61 67  65 28 22 46 61 69 6c 65  |6.message("Faile|
00020440  64 20 74 6f 20 6c 6f 6f  6b 20 75 70 20 6d 65 73  |d to look up mes|
00020450  73 61 67 65 20 74 6f 6b  65 6e 3a 20 22 2b 74 24  |sage token: "+t$|
00020460  2c 31 29 0d c5 a8 13 24  74 6d 70 25 3d 22 6e 6f  |,1)....$tmp%="no|
00020470  74 6f 6b 65 6e 22 0d c5  b2 09 3d 74 6d 70 25 0d  |token"....=tmp%.|
00020480  c5 bc 04 0d c5 c6 11 dd  f2 6c 6f 63 6b 6e 65 77  |.........locknew|
00020490  73 64 69 72 0d c5 d0 07  ea 74 25 0d c5 da 09 e7  |sdir.....t%.....|
000204a0  72 77 25 8c 0d c5 e4 11  20 20 74 25 3d a4 6c 6f  |rw%.....  t%=.lo|
000204b0  63 6b 76 61 6c 0d c5 ee  0c 20 20 e7 74 25 3e 30  |ckval....  .t%>0|
000204c0  8c 0d c5 f8 19 20 20 20  20 e7 a4 74 61 73 6b 65  |.....    ..taske|
000204d0  78 69 73 74 73 28 74 25  29 8c 0d c6 02 24 20 20  |xists(t%)....$  |
000204e0  20 20 20 20 85 30 2c a4  6d 73 67 31 28 22 4c 6f  |    .0,.msg1("Lo|
000204f0  63 6b 46 61 69 6c 31 22  2c c3 7e 74 25 29 0d c6  |ckFail1",.~t%)..|
00020500  0c 0b 20 20 20 20 20 20  cc 0d c6 16 2f 20 20 20  |..      ..../   |
00020510  20 20 20 e7 a4 63 6f 6e  66 69 72 6d 28 a4 6d 73  |   ..confirm(.ms|
00020520  67 31 28 22 4c 6f 63 6b  46 61 69 6c 33 22 2c c3  |g1("LockFail3",.|
00020530  7e 74 25 29 29 3d 31 8c  0d c6 20 42 20 20 20 20  |~t%))=1... B    |
00020540  20 20 20 20 e7 a4 66 6f  72 63 65 64 65 6c 66 69  |    ..forcedelfi|
00020550  6c 65 28 6c 6f 63 6b 66  69 6c 65 24 29 3d 30 8c  |le(lockfile$)=0.|
00020560  74 25 3d 30 8b 85 30 2c  a4 6d 73 67 30 28 22 4c  |t%=0..0,.msg0("L|
00020570  6f 63 6b 46 61 69 6c 34  22 29 0d c6 2a 0d 20 20  |ockFail4")..*.  |
00020580  20 20 20 20 20 20 cc 0d  c6 34 15 20 20 20 20 20  |      ...4.     |
00020590  20 20 20 f2 66 69 6e 69  73 68 3a e0 0d c6 3e 0b  |   .finish:...>.|
000205a0  20 20 20 20 20 20 cd 0d  c6 48 09 20 20 20 20 cd  |      ...H.    .|
000205b0  0d c6 52 07 20 20 cd 0d  c6 5c 0c 20 20 e7 74 25  |..R.  ...\.  .t%|
000205c0  3d 30 8c 0d c6 66 36 20  20 20 20 e7 a4 64 69 73  |=0...f6    ..dis|
000205d0  6b 73 70 61 63 65 28 62  61 73 65 64 69 72 24 29  |kspace(basedir$)|
000205e0  3c 31 30 30 30 8c 85 30  2c 22 4e 6f 20 64 69 73  |<1000..0,"No dis|
000205f0  6b 20 73 70 61 63 65 21  22 0d c6 70 1f 20 20 20  |k space!"..p.   |
00020600  20 66 35 25 3d a4 6f 70  65 6e 6f 75 74 28 6c 6f  | f5%=.openout(lo|
00020610  63 6b 66 69 6c 65 24 29  0d c6 7a 0f 20 20 20 20  |ckfile$)..z.    |
00020620  e7 66 35 25 3e 30 8c 0d  c6 84 1f 20 20 20 20 20  |.f5%>0.....     |
00020630  20 d5 23 66 35 25 2c c3  74 61 73 6b 25 3a f2 63  | .#f5%,.task%:.c|
00020640  66 28 66 35 25 29 0d c6  8e 0b 20 20 20 20 20 20  |f(f5%)....      |
00020650  cc 0d c6 98 1f 20 20 20  20 20 20 85 30 2c a4 6d  |.....      .0,.m|
00020660  73 67 30 28 22 4c 6f 63  6b 46 61 69 6c 32 22 29  |sg0("LockFail2")|
00020670  0d c6 a2 09 20 20 20 20  cd 0d c6 ac 07 20 20 cd  |....    .....  .|
00020680  0d c6 b6 05 cd 0d c6 c0  05 e1 0d c6 ca 04 0d c6  |................|
00020690  d4 0d dd a4 6c 6f 63 6b  76 61 6c 0d c6 de 0c ea  |....lockval.....|
000206a0  72 25 3a 72 25 3d 30 0d  c6 e8 34 66 31 25 3d a4  |r%:r%=0...4f1%=.|
000206b0  6f 70 65 6e 69 6e 28 6c  6f 63 6b 66 69 6c 65 24  |openin(lockfile$|
000206c0  29 3a e7 66 31 25 3e 30  8c 72 25 3d bb be 23 66  |):.f1%>0.r%=..#f|
000206d0  31 25 3a f2 63 66 28 66  31 25 29 0d c6 f2 07 3d  |1%:.cf(f1%)....=|
000206e0  72 25 0d c6 fc 04 0d c7  06 0f dd f2 63 68 65 63  |r%..........chec|
000206f0  6b 6c 6f 63 6b 0d c7 10  09 e7 72 77 25 8c 0d c7  |klock.....rw%...|
00020700  1a 17 20 20 e7 a4 6c 6f  63 6b 76 61 6c 3c 3e 74  |..  ..lockval<>t|
00020710  61 73 6b 25 8c 0d c7 24  37 20 20 20 20 f2 6d 65  |ask%...$7    .me|
00020720  73 73 61 67 65 30 28 22  4c 6f 63 6b 46 61 69 6c  |ssage0("LockFail|
00020730  30 22 2c 31 29 3a 73 74  61 72 74 75 70 6f 6b 25  |0",1):startupok%|
00020740  3d 30 3a f2 66 69 6e 69  73 68 3a e0 0d c7 2e 07  |=0:.finish:.....|
00020750  20 20 cd 0d c7 38 05 cd  0d c7 42 05 e1 0d c7 4c  |  ...8....B....L|
00020760  04 0d c7 56 13 dd f2 75  6e 6c 6f 63 6b 6e 65 77  |...V...unlocknew|
00020770  73 64 69 72 0d c7 60 09  e7 72 77 25 8c 0d c7 6a  |sdir..`..rw%...j|
00020780  31 20 20 e7 a4 6c 6f 63  6b 76 61 6c 3d 74 61 73  |1  ..lockval=tas|
00020790  6b 25 8c 46 25 3d a4 66  6f 72 63 65 64 65 6c 66  |k%.F%=.forcedelf|
000207a0  69 6c 65 28 6c 6f 63 6b  66 69 6c 65 24 29 0d c7  |ile(lockfile$)..|
000207b0  74 05 cd 0d c7 7e 05 e1  0d c7 88 04 0d c7 92 14  |t....~..........|
000207c0  dd a4 74 61 73 6b 65 78  69 73 74 73 28 74 25 29  |..taskexists(t%)|
000207d0  0d c7 9c 0c ea 72 25 3a  72 25 3d 30 0d c7 a6 05  |.....r%:r%=0....|
000207e0  f5 0d c7 b0 31 c8 99 22  54 61 73 6b 4d 61 6e 61  |....1.."TaskMana|
000207f0  67 65 72 5f 45 6e 75 6d  65 72 61 74 65 54 61 73  |ger_EnumerateTas|
00020800  6b 73 22 2c 72 25 2c 74  6d 70 25 2c 32 35 35 b8  |ks",r%,tmp%,255.|
00020810  72 25 0d c7 ba 12 fd 72  25 3c 30 84 21 74 6d 70  |r%.....r%<0.!tmp|
00020820  25 3d 74 25 0d c7 c4 0f  3d 28 21 74 6d 70 25 3d  |%=t%....=(!tmp%=|
00020830  74 25 29 0d c7 ce 04 0d  c7 d8 11 dd a4 72 65 73  |t%)..........res|
00020840  66 69 6c 65 28 66 24 29  0d c7 e2 10 ea 74 25 2c  |file(f$).....t%,|
00020850  74 24 2c 64 24 2c 72 24  0d c7 ec 1b c8 99 22 54  |t$,d$,r$......"T|
00020860  65 72 72 69 74 6f 72 79  5f 4e 75 6d 62 65 72 22  |erritory_Number"|
00020870  b8 74 25 0d c7 f6 30 c8  99 22 54 65 72 72 69 74  |.t%...0.."Territ|
00020880  6f 72 79 5f 4e 75 6d 62  65 72 54 6f 4e 61 6d 65  |ory_NumberToName|
00020890  22 2c 74 25 2c 74 6d 70  25 2c 32 35 30 b8 2c 74  |",t%,tmp%,250.,t|
000208a0  6d 70 25 0d c8 00 2a 74  24 3d a4 73 74 72 28 74  |mp%...*t$=.str(t|
000208b0  6d 70 25 29 3a 64 24 3d  72 65 73 64 69 72 24 2b  |mp%):d$=resdir$+|
000208c0  22 2e 22 2b 74 24 2b 22  2e 22 2b 66 24 0d c8 0a  |"."+t$+"."+f$...|
000208d0  15 e7 a4 6f 62 6a 74 79  70 65 28 64 24 29 3d 31  |...objtype(d$)=1|
000208e0  20 8c 0d c8 14 0b 20 20  72 24 3d 64 24 0d c8 1e  | .....  r$=d$...|
000208f0  07 20 20 cc 0d c8 28 17  20 20 64 24 3d 72 65 73  |.  ...(.  d$=res|
00020900  64 69 72 24 2b 22 2e 22  2b 74 24 0d c8 32 16 20  |dir$+"."+t$..2. |
00020910  20 e7 a4 6f 62 6a 74 79  70 65 28 64 24 29 3d 31  | ..objtype(d$)=1|
00020920  8c 0d c8 3c 31 20 20 20  20 66 31 25 3d a4 6f 70  |...<1    f1%=.op|
00020930  65 6e 69 6e 28 64 24 29  3a e7 66 31 25 3c 3e 30  |enin(d$):.f1%<>0|
00020940  8c 74 24 3d be 23 66 31  25 3a f2 63 66 28 66 31  |.t$=.#f1%:.cf(f1|
00020950  25 29 0d c8 46 23 20 20  20 20 72 24 3d 64 24 3d  |%)..F#    r$=d$=|
00020960  72 65 73 64 69 72 24 2b  22 2e 22 2b 74 24 2b 22  |resdir$+"."+t$+"|
00020970  2e 22 2b 66 24 0d c8 50  09 20 20 20 20 cc 0d c8  |."+f$..P.    ...|
00020980  5a 1f 20 20 20 20 72 24  3d 64 24 3d 72 65 73 64  |Z.    r$=d$=resd|
00020990  69 72 24 2b 22 2e 55 4b  2e 22 2b 66 24 0d c8 64  |ir$+".UK."+f$..d|
000209a0  07 20 20 cd 0d c8 6e 05  cd 0d c8 78 42 e7 a4 6f  |.  ...n....xB..o|
000209b0  62 6a 74 79 70 65 28 72  24 29 3d 30 8c 85 30 2c  |bjtype(r$)=0..0,|
000209c0  22 52 65 73 6f 75 72 63  65 20 66 69 6c 65 20 22  |"Resource file "|
000209d0  2b 66 24 2b 22 20 66 6f  72 20 22 2b 74 24 2b 22  |+f$+" for "+t$+"|
000209e0  20 6e 6f 74 20 66 6f 75  6e 64 22 0d c8 82 07 3d  | not found"....=|
000209f0  72 24 0d ff                                       |r$..|
000209f4