home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 44
/
Amiga_Dream_44.iso
/
RiscPc
/
Utils
/
qedit058.spk
/
!Qedit
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1997-05-12
|
15KB
|
684 lines
Qedit
David Croft, 1995-7 Multi-transport support by Joseph Heenan
ID$="0.58":E$="12-May-97":
$+" (internal error code "+
)+")":
x%,c$:
(a$):c$=
a$,x%,1):
c$>="A"
c$<="Z"
a$,x%,1)=
(c$)+32)
b$:k$="":B$="":
b("NewsDir$Dir")
a("autondir"))
(Df%=
("<NewsDir$Dir>.newsbase.startup.c00saved.transport"):
a("autonfile"))
#f%:b$=
e(f%,249):
b$,22)="transport default mail"
b$,24)
b$,22)="transport default news"
b$,24)
k$=""
a("autonmail"))
"in_smtpd":m%=1
"pop":m%=2
"ant":m%=3
"ka9q":m%=4
"termite":m%=5
g("autowmail",k$))
m$=""
a("autonnews"))
"freenews":n%=1
"newshound":n%=2
"ant":n%=3
"ka9q":n%=4
"termite":n%=5
g("autownews",m$))
c(e$):
k(e$):
a("autohow")):
a% 1024,j% 256,a$(7):n$="Qedit":C%=
m:V%=
:l%=8:g%=0:m%=0:n%=0:B$="":k$="":d$="":
35,n$+"$Dir",a%,1024,0
,,d:p$=
q(a%,0,d):aa%=537984:ba%=537985:ca%=537986:w%=-1:
262336,200,&4B534154,n$
,da%:
L:i$=
a("scrap"):e$=
a("confirm"),1):
e$="N"
e$="n"
s3m%=
a("mail")):n%=
a("news")):
1:a$(0)="<SMTPServer$MailDir>.spool.mqueue.text":a$(2)="<SMTPServer$MailDir>.held.mqueue.text":a$(4)="<SMTPServer$MailDir>.spool.mqueue.work":a$(6)="<SMTPServer$MailDir>.held.mqueue.work":k$="in_smtpd"
b("SMTPServer$MailDir")
0,"!FreeSMTP has not been seen by the filer."
2:a$(0)="<POP$MailDir>.spool.mqueue.text":a$(2)="<POP$MailDir>.held.mqueue.text":a$(4)="<POP$MailDir>.spool.mqueue.work":a$(6)="<POP$MailDir>.held.mqueue.work":k$="pop"
b("POP$MailDir")
0,"!Pop has not been seen by the filer."
3:a$(0)="InetSpool:Queue":a$(2)="InetSpool:heldQueue":a$(4)="":a$(6)="":k$="ANT":
b("InetSpool$Path")
0,"InetSuite has not been seen by the filer."
4:a$(0)="<Mail$Dir>.spool.mqueue.text":a$(2)="<Mail$Dir>.held.mqueue.text":a$(4)="<Mail$Dir>.spool.mqueue.work":a$(6)="<Mail$Dir>.held.mqueue.work":k$="ka9q"
b("Mail$Dir")
0,"!tcp/ip has not been seen by the filer."
5:a$(0)="<Termite$MailBox>.OutTray.Internet.Mail.text":a$(2)="<Termite$MailBox>.OutHeld.Internet.Mail.text":a$(4)="<Termite$MailBox>.OutTray.Internet.Mail.work":a$(6)="<Termite$MailBox>.OutHeld.Internet.Mail.work":k$="termite"
b("Termite$MailBox")
0,"Termite has not been seen by the filer."
0,"Unknown mail transport requested"
1:a$(1)="<FreeNews$Dir>.Data.articles":a$(3)="<FreeNews$Dir>.Data.heldart":a$(5)="<FreeNews$Dir>.Data.badmarker":a$(7)="<FreeNews$Dir>.Data.heldbad":m$="freenews"
b("FreeNews$Dir")
0,"!FreeNews has not been seen by the filer."
2:a$(1)="<NewsHound$NewsDir>.articles":a$(3)="<NewsHound$NewsDir>.held":a$(5)="<NewsHound$NewsDir>.badmarker":a$(7)="<NewsHound$NewsDir>.heldbad"
b("NewsHound$NewsDir")
0,"!NewsHound has not been seen by the filer."
m$="NewsHound"
3:a$(1)="InetSpool:QueuePost":a$(3)="InetSpool:heldPost":a$(5)="":a$(7)="":m$="ANT":
b("InetSpool$Path")
0,"InetSuite has not been seen by the filer."
4:a$(1)="<Mail$Dir>.spool.newsqueue.articles":a$(3)="<Mail$Dir>.held.newsqueue.articles":a$(5)="<Mail$Dir>.spool.newsqueue.badmarker":a$(7)="<Mail$Dir>.held.newsqueue.badmarker":m$="ka9q"
b("Mail$Dir")
0,"!tcp/ip has not been seen by the filer."
5:a$(1)="<Termite$MailBox>.OutTray.Internet.News":a$(3)="<Termite$MailBox>.OutHeld.Internet.News":a$(5)="":a$(7)="":m$="termite":
b("Termite$MailBox")
0,"Termite has not been seen by the filer."
0,"Unknown news transport requested"
v(7,N%,D$+" ("+E$+")"):
e(k%,
((H%=17
H%=18)
a%!16=0)
262369,48,a%,W%+50
S(H%):
S(H%):
!a%=k%
262341,,a%
!a%=k%
:!a%=k%:
262342,,a%
262364,a%!24
17,18:
19:s%=
393438,i$
fa%=0
a("noeditor"):
z(s%)
a%!16
a%!20=11
da%<>a%!4
1282:
a%!32
n("hqueue")
n("hmessage")
n("hinfo")
#(a%!20),"Filer_Run "+p$
f(a%,44)="<Qedit$Dir>.!Run"
f(a%,44),6)="!Qedit"
a%!40=8192)
4a%!16=4:a%!12=a%!8:
262375,17,a%,a%!4:
e(k%,-1)
V:ga%=!a%:ha%=a%!4:ia%=a%!8:
a%!12
k%:b=
o(D%):
2:p%=b:
B(b):
p(q%,ga%-64,ha%)
(a%(b)
a%!16=2
o(D%)
262365,da%,&4B534154:
U:W%-=1000:
262344,,a%
ja%:O%=a%!4-a%!20:E%=a%!16-a%!24:
ja%:ka%=a%!32:la%=a%!40:I%=((E%-la%)
32)-60:J%=((E%-ka%)
I%>(g%*3)-1I%=(g%*3)-1
J%>(g%*3)-1J%=(g%*3)-1
I%<0I%=0
J%<0J%=0
J%:i%=(c
3):b%=(c
(a%(i%)
(a%(i%)
16)=16
K%=13
262374,K%:
O%+6,E%-(c*32)-60-(i%*10):
h(i%);" ";
d$(i%),6),7);:
b%(i%)>0
b%(i%)>50*1024
(b%(i%)
1024)+"k",5);" ";
(b%(i%)),5);" ";
i(f$(i%),18);" ";:
b$(i%)
1:a$="":
(a%(i%)
a$="HELD"
(a%(i%)
a$="edit"
a$<>""
O%+6,E%-(c*32)-60-(i%*10):
262374,11:
262374,K%
O%+6+(16*37),E%-(c*32)-60-(i%*10):
c$(i%)
O%+6+(16*37),E%-(c*32)-60-(i%*10):
e$(i%)
262346,,a%
393424,,0:!a%=
:$(a%+4)=
$+" (internal error code "+
)+"), about to quit."+
262367,a%,1,n$
,m:C%=
393424,,0:!a%=
:$(a%+4)=
$+" (internal error code "+
)+"), press Cancel to quit program."+
262367,a%,3,n$
k(F$):
393424,,0:!a%=1:$(a%+4)=F$+
262367,a%,17,"Message from "+n$:
m(o$):
393424,,0:!a%=1:$(a%+4)=o$+
262367,a%,19,"Question from "+n$
N:c%=&7009031:ma%=&7409031:
X% 250:i=0:r=4:
y% (28+(24*r)):
E("Item",y%,7):
b(y%,"Edit",0,-1,c%):
g(y%,"Hold",0,-1,c%,7):
g(y%,"Release",0,-1,c%,7):
b(y%,"Delete",0,-1,c%):
F(y%):r=6:
q% (28+(24*r)):
E(n$,q%,16)
b(q%,"Info",0,N%,c%):na%=X%+i:
g(q%,"News item XXXXXX",0,y%,c%,21):
b(q%,"Re-check queues",0,-1,c%):
b(q%,"Flush queues",0,-1,c%):
b(q%,"Help",0,-1,c%):
b(q%,"Quit",0,-1,c%):
F(q%):
i>200
0,"Indirected overflow!"
E(G$,e%,s):$e%=
0,12):e%?12=7:e%?13=2:e%?14=7:e%?15=0:e%!16=(s+1)*16:e%!20=44:e%!24=0:e=28:
b(e%,h$,n,o,p):
(h$)>11
g(e%,h$,n,o,p,0):
@e%!e=n:e%!(e+4)=o:e%!(e+8)=p:$(e%+(e+12))=
0,12):e+=24:
g(e%,h$,n,o,p,q):
(h$)+1)q=
(h$)+1
fe%!e=n:e%!(e+4)=o:e%!(e+8)=p+(1<<8):e%!(e+12)=X%+i:e%!(e+16)=0:e%!(e+20)=q:e+=24:$(X%+i)=h$:i+=q:
F(e%):e%!(e-24)=e%!(e-24)+128:
p(e%,oa%,pa%):
262356,,e%,oa%,pa%:qa%=e%:
262357,,qa%,a%,j%:a$=
f(j%,0):
262351,,j%:ra%=(j%!8=1):
!a%=1
a%!8=-1
p%>-1
A(p%)
D(p%)
C(p%)
"Info":
p(N%,j%!0-64,j%!4+64)
"Re-check queues":
"Flush queues":
"Help":
262366,"Filer_Run "+p$+".!Help"
"Quit":
B(p%):
p(qa%,oa%,pa%)
B(b):
$(na%)="No article"
:$(na%)=
h(b)+" item "+d$(b)
M:j=500:
L% j:u%=L%:Q%=a%:
262361,,p$+".Templates":
262363,,Q%,u%,L%+j,-1,"info",0
,,u%:
262337,,Q%
262363,,Q%,u%,L%+j,-1,"queue",0
,,u%:
262337,,Q%
262363,,Q%,u%,L%+j,-1,"find",0
,,u%:
262337,,Q%
262363,,Q%,u%,L%+j,-1,"message",0
,,u%:
262337,,Q%
262362:
e(k,sa%):!a%=k:
262347,,a%:
a%!28=-1
262341,,a%:
ca(k):
ta%,ua%,P%,R%,Z%,_%:a%!0=k:
262347,,a%:
53,-1,4
,,ta%:
53,-1,5
,,ua%:
53,-1,11
,,P%:
53,-1,12
,,R%:P%=(P%+1)<<ta%:R%=(R%+1)<<ua%:Z%=a%!12-a%!4:_%=a%!16-a%!8:a%!4=(P%/2)-(Z%/2):a%!8=(R%/2)-(_%/2):a%!12=a%!4+Z%
!)a%!16=a%!8+_%:a%!28=-1:
262341,,a%:
o(k):!a%=k:
262342,,a%:
v(t,u,e$):!j%=u:j%!4=t:
262350,,j%:j%!8=0:j%!12=0:$(j%!28)=e$:
262349,,j%:
h(S%):
262353,k%,0,-((S%+1)*3*32)-60-(S%*10),((l%+37)*16)+10,-(S%*3*32)-58-(S%*10):
262353,k%,0,`%,((l%+37)*16)+10,0:
d:`%=-(g%*((32*3)+10))-52:
`%=-150
@?!a%=0:a%!4=`%:a%!8=((l%+37)*16)+10:a%!12=0:
262359,k%,a%:
t(s$,d)=
d,"0")+s$,d)
i(s$,d)=
d," "),d)
f(l,g):q$="":
:q$+=
(l?g):g+=1:
l?g<32:=q$
q(l,g,d):q$="":v=g:
:q$+=
(l?g):g+=1:
l?g<32
d=(g-v):=q$
a$(c)<>""
G(a$(c))
G(x$):
s$,d%:d%=
(x$):
d%<>0
:s$=x$:
s$)="."
s$="":
s$<>""
8,8,x$
u(H$):
131080,17,H$
F%;M%:
w:g%=0:
3:z%=0:
z%>-1:
12,9,a$(c),a%,255,z%,1024,"*"
,,,T%,z%:g%+=T%:
P:r%=g%+20:
a%(r%),d$(r%):
f$(r%),b%(r%):
b$(r%),c$(r%),e$(r%):d$()=
10," "):d$()="":f$()=
18," "):d$()="":b$()=
40," "):b$()="":c$()=
40," "):c$()="":e$()=
50," "):e$()="":
x:b%=0:
12,11,a$(c),a%,1,0,1024,"*"
,,,T%,z%:
z%>-1:d$(b%)=
f(a%,29):a%(b%)=c:
Gb$(b%)=
a("sending"):c$(b%)="":e$(b%)="":
(b$(b%))>l%
(b$(b%))
>b%+=T%:
12,11,a$(c),a%,1,z%,1024,"*"
,,,T%,z%:
:g%=b%:
s(U%,b%):
=67778
0,"PROCload called with later%=TRUE - contact author"
[b%(b%)=a%!8:
193,a%+24,j%,256,"%24:%MI:%SE %DY %M3 %YR":f$(b%)=
f(j%,0):
(a%(b%)
c(b%):
h$=""
d(b%)
(h$):
!b$(b%)=
a("nowork"):c$(b%)=""
e(f,249):
b$,10)<>"MAIL FROM:"
e(f,249)
("MAIL FROM:"))="MAIL FROM:"
("MAIL FROM:")+1)
b$,1)="<"
b$,2)
b$,1)=">"
3c$(b%)="From: "+b$:
(c$(b%))=253
c$(b%)+="..."
Qb$(b%)="To: ":
(b$(b%))<250):b$=
e(f,255-
(b$(b%))):
b$,4)="DATA"
(b$(b%))<254)
(b$(b%))>4)
b$(b%)+=", "
("RCPT TO:"))="RCPT TO:"
("RCPT TO:")+1)
b$,1)="<"
b$,2)
b$,1)=">"
b$(b%)+=b$
d(b%)):
e(f,250):
j$,":")-1)
"Subject":e$(b%)=j$
"X-MailList":a%(b%)=a%(b%)
"Approved":a%(b%)=a%(b%)
j$=""
d(b%)):
e(f,250):
j$,":")-1)
"Newsgroups":b$(b%)=j$
"From":c$(b%)=j$
"Subject":e$(b%)=j$
j$=""
(c$(b%))>l%
(c$(b%)):
(b$(b%))>l%
(b$(b%)):
(e$(b%))>l%
(e$(b%)):
e(h,d):a$="":
a<>10
a<>13
(a$)<d-3
(a$)<d
a$+="."
(a$)=d
a<>10
a<>13
a("badwork")
(a$)=d
a<>10
a<>13
262356,,-1:ra%=
g%>r%
a("notupdated"):V%=
:g%=r%:
a("notupdated"):V%=
@a%(0)=0:d$(0)="":f$(0)="":b%(0)=0:b$(0)="":c$(0)="":e$(0)=""
e(k%,
262366,"Run "+p$+".!Run":
m:o%=0:va%=-1:C$="":G%=0:
h(b%):
b%(b%)=0
="None"
(a%(b%)
g$="News"
g$="Mail"
d(b%):
(a%(b%)
(a%(b%)
g$=a$(3)+"."
g$=a$(2)+"."
(a%(b%)
g$=a$(1)+"."
g$=a$(0)+"."
=g$+d$(b%)
c(b%):
(a%(b%)
(a%(b%)
g$=a$(7)+"."
g$=a$(6)+"."
(a%(b%)
g$=a$(5)+"."
g$=a$(4)+"."
g$="."=""
=g$+d$(b%)
r:!a%=k%:
262348,,a%:y=ha%-a%!16+a%!24:b=(a%!44-(y+58)):
b=-((32*3)+10)
R"b=b
((32*3)+10):
g%<(b+1)
j(b,o$):
g("cantdo",o$)):=-1
l:wa%=-1:
a%(c)=va%
d$(c)=C$
wa%=c
:=wa%
D(b):
j(b,"hold")
n(b):
s(a%(b)):
h(b):
n(b):
l$,o$,v%:
(a%(b)
:a%(b)=a%(b)
a("inprogress"):
41,25,l$,r$:=1
rDv%=
c(b):v$=
d(b):a%(b)=a%(b)
2:l$=
c(b):o$=
d(b):
o(v$)
y%a%(b)=a%(b)
a("vanish"):=2
l$<>""
o(r$)
%a%(b)=a%(b)
a("vanish"):=2
41,25,r$,l$:v%=
41,25,v$,o$:=0
C(b):
j(b,"release")
I(b):
s(a%(b)):
h(b):
I(b):
(a%(b)
c(b):v$=
d(b):a%(b)=a%(b)
2:l$=
c(b):
l$<>""
41,25,r$,
41,25,v$,
d(b):
j(p%,"delete")
p("suredel",
h(p%),d$(p%)))
,p%):
t(xa%,c%):
j(c%,"delete")
c%=-1
c(c%):
l$<>""
41,27,
c(c%),,2
41,27,
d(c%),,2:
c%<g%
g%-1:a%(c)=a%(c+1):d$(c)=d$(c+1):f$(c)=f$(c+1):b%(c)=b%(c+1):b$(c)=b$(c+1):c$(c)=c$(c+1):e$(c)=e$(c+1):
g%-=1:
e(k%,0):
s(a%(c%)):
a("cantflush"):
a("sureflush"))
c%=g%-1
,c%):
da(f$,A%):
f$,9)="Received:"
f$,5)="From:"
d$=""
f$,6)
f$,7)="Sender:"
f$,8):
#A%,f$:
A(b):
v%,A%,f$,h%:
a("already"):
w%=-1
a("neednb"):
(a%(b)
a%(b)=a%(b)
n(b)<>0
a%(b)=a%(b)
n(b)<>0
c(b)=""
d(b)):A%=
(i$):
#v%:f$=
e(v%,250):
f$,4)="DATA"
f$,4)="POST"
f$=""
#A%,"":h%=2
da(f$,A%)
f$<>"."
#A%,f$
ea(i$,4095):
d$=""
d$=c$(s%)
d$,6)="From:"
d$,6)
d$,"<")>0
d$,"<")+1)
d$,"@")>0
d$,"@")-1)
d$,1)=" ":d$=
(d$)-1):
d$)=" ":d$=
:!a%=(49+
(i$))
-4:a%!12=0:a%!16=5:a%!20=k%:a%!28=0:a%!32=0:a%!36=0:a%!40=4095:$(a%+44)=i$:
262375,18,a%,0:s%=b:va%=a%(b):C$=d$(b):o%=
8,17,i$
,,ya%,za%:
e(Y%,
h(b):
#!a%=Y%:
262347,,a%:
a%!28=-1
G%=a%!28:
o(Y%)
6!a%=G%:
393419,,a%
(a%!32
1<<16)=0
s%=-1
a("vanished"):
z(s%):
41,27,i$,,2
8,17,i$
,,Ba%,Ca%:
Ba%=ya%
Ca%=za%
+(Aa%=
w%=-1
g("afteredit",i$)):
-Ya%!24=0:$(a%+32)=d$+
i(w%,20,(37+
(d$)+2)
-4):$(a%+32)=i$+
h(s%)="Mail"
i(w%,310,(37+
(i$)+1)
i(w%,300,(37+
(i$)+1)
,s%):
!a%=G%:
393447,3,a%,G%:
a("cantquit"))
z(c%):
(a%(c%)
I(c%):a%(c%)=a%(c%)
h(c%):
Q:a%!24=53:
i(0,0,28):
i(Da%,Ea%,Fa%):
Da%=-1
a("nbgone"):
Y<!a%=Fa%:a%!12=0:a%!16=aa%:a%!20=Ea%:
262375,17,a%,Da%:
Y:y$=
(a%!20):
y$,1)
"9","2","1":
p("comms"+
y$,1),y$,
f(a%,32)))
a%!20
0:w%=a%!4
10:w%=-1:
a("servergone")
a("newssent")
a("mailsent")
s(F%):
(a%(b%)
w$=B$
w$=k$
p_!a%=(37+
(w$))
-4:a%!12=0:a%!16=ca%:a%!20=11:a%!24=(F%
1):$(a%+32)=w$+
262375,17,a%,0:
o(f$):
8,17,f$+
F%=1=
ea(f$,t%):
131080,18,f$,t%:
a(e$):
a(e$)):
r(e$):
v(1,D%,e$):
ca(D%):
n(e$):e$=
a(e$)+
0:!a%=(25+
(e$))
-4:a%!12=a%!8:a%!16=1283:$(a%+20)=e$:
262375,17,a%,a%!4:
b(h$):
35,h$,a%,1024,0,0:=
Ga% 256:z$=p$+".Messages":
267520,,z$
M%,,Ha%:
Ia%=0
Ia% Ha%
30,6,,,17+
,,B%:$(B%+16)=z$:
267521,B%,B%+16,Ia%:
a(t$):
267522,B%,t$
,,u$:
g(t$,A$):
267522,B%,t$,Ga%,256,A$
,,u$:
p(t$,A$,I$):
267522,B%,t$,Ga%,256,A$,I$
,,u$:
267524,B%: