; gf.seg.s ; modified for ACOS on 03/25/87 on nocar goto no.car goto start no.car log "a:" link "main.seg","term1" center b=(edit(3)/2)-(len(a$)/2):if b<1 b=1 print chr$(32,b); if flag(32) print chr$(15);a$;chr$(14):return print a$:return show.file setint(1):print \s$\:use "b:xshow",f$ setint(""):if key(1) print "%> Aborted <%" return link.main log "a:" link "main.seg","fromsys" start sc$=chr$(12):log "c:" f$="g1":open #1,f$:a=mark(1):close:if not a goto start2 print sc$\"Creating working files...."; create "about":create f$:open #1,f$:position #1,55,0 print #1,"0":close f$="gf.data":create f$:open #1,f$:position #1,42,0 print #1,"0":position #1,42,1:print #1,"Noname,1":close start2 print sc$ if flag(32) a$=chr$(32,21)+chr$(14,2):gosub center if flag(32) a$=" "+chr$(14)+" General File Base "+chr$(15)+" ":gosub center if flag(32) a$=chr$(32,21)+chr$(14,2):gosub center if not flag(32) a$="%> General File Base <%":gosub center start1 log "c:" f$="gf.data":open #1,f$:position #1,42,0:input #1,a if not a close:print \"G-Files are closed.":if info(5) goto sysop if not a goto link.main print \"[#)_G-file sub____________________|Flag" for x=1 to a:position #1,42,x:input #1,a$,f if (a$="EMPTY") or (not flag(f)) next:goto select a$=a$+chr$(32,30):a$=left$(a$,30) setint(1):print "["x") "a$"|"f:setint(""):if key(1) x=a next select close print \" [H]elp":if info(5) print " [S]ysOptions" print \"Which? ";:gosub get.key bb=val(i$):if i$=chr$(4) get i$:if i$=chr$(3) print \\"-DC-'s General File Base"\"Shooting Star -- 206/838-7686":goto start1 if i$="H" print sc$\:f$="gfile.hlp":gosub show.file:goto start1 if (i$="S") and (info(5)) goto sysop if (not bb) or (bb>a) print "Quit...":goto link.main open #1,"gf.data":position #1,42,bb:input #1,a$,gf:close if not flag(gf) goto start1 print bb:gf=bb:lg$="c"+str$(gf-1)+":" if gf=1 lg$="c:" print sc$' Select: [1) Download Files [2) Upload Files':if info(5) print "[3) Convert Files" print \"Choice? ";:gosub get.key a=val(i$):print a if (a=3) and info(5) print sc$:goto convert if a=1 goto download if a=2 goto upload goto start2 convert print \"%> File Conversion <%" cvrt1 input @2 \"FILENAME: "fn$ if fn$="CAT" use "b:xdos",fn$+" "+lg$:goto convert if fn$="QUIT" or fn$="Q" or fn$="" goto start1 print \"Convert "fn$" to: ";:input @1 i$ gosub lower.case:md=202:gosub empty.chk use "b:xdos","getinfo "+lg$+fn$ a=peek(edit(5)+7):sz=peek(edit(5)+21)+peek(edit(5)+22)*256 open #1,"k:pae.filetypes":position #1,4,a:input #1,x$:close sz$=right$("000"+str$(sz),4):if len(x$)<>3 x$="???" open #1,lg$+"g"+str$(gf):position #1,55,0:input #1,a if a Conversion Completed <%"\:goto cvrt1 purge input \"Kill entry #"a:if (a<1) or (a>x) goto purge open #1,lg$+"g"+str$(gf):position #1,55,a input #1,i$,i$,i$,i$:position #1,55,a print #1,a,a,"EMPTY","NONE":close kill i$:goto download download f$=lg$+"g"+str$(gf):open #1,f$:position #1,55,0:input #1,x:close if not x print \"There are no files in base #"gf:input @0 "Upload one? "i$:if i$<>"N" goto upload if not x goto start1 print sc$\"%> There are "x" Current Records <%"\ open #1,f$:for a=1 to x:position #1,55,a input #1,x$,sz$,i$,fn$:if i$="EMPTY" goto dl1 if i$="" position #1,55,a:print #1,x$,sz$,"EMPTY",fn$:goto dl1 a$=str$(a):if a<10 a$="0"+a$ setint(1):print a$") ["x$"/"sz$"] "i$ setint(""):if key(1) print "%> Aborted <%":a=x dl1 next:close dl2 print \"[GF Base "gf"] : ["; if clock(2) print (clock(2)-clock(1))/60":"; if clock(2) i$=str$((clock(2)-clock(1)) mod 60):if len(i$)<2 i$="0"+i$ if not clock(2) i$="00:00" print i$"]" print "Titles 1-"x" [L)ist, Q)uit]: ";:input @1 i$ if i$="Q" goto start if i$="?" or i$="L" goto download if (i$="K") and flag(4) goto purge a=val(i$):if (a<1) or (a>x) goto dl2 open #1,lg$+"g"+str$(gf):position #1,55,a:input #1,i$,i$,i$,f$:close:f$=lg$+f$ open #1,f$:if mark(1) close:print \"Sorry, that file doesn't exist.":goto dl2 close:print \"[D)ownload or [V)iew? ";:gosub get.key if (i$<>"D") and (i$<>"V") print "Quit":goto dl2 if i$="V" print "View"\:goto view print "D/L" use "b:xdos","getinfo "+f$:ix=peek(edit(5)+7) sz=peek(edit(5)+21)+peek(edit(5)+22)*256 pb=peek(edit(5)+11)+peek(edit(5)+12)*256 open #1,"k:pae.filetypes":position #1,4,ix input #1,x$:close:if len(x$)<>3 x$="???" print \"Total Xmodem blocks: "sz print "Total ProDOS blocks: "pb print " Filetype: "x$ print \"Continue? ";:gosub get.key close:if i$<>"Y" print "No":goto dl2 print "Yes"\:byte(2)=byte(2)+1 i$="f:u."+str$(un):open #1,i$:position #1,5,8 input #1,md:if byte(2)>md md=byte(2) md=md+1:position #1,5,8:print #1,md:close print "Waiting to send" use "b:protocol.down",255,0,f$:goto download view gosub uploader:gosub show.file print \"";:get i$:goto download uploader open #1,lg$+"about":position #1,45,a:input #1,d1$,d2$,d3$,d4$,bb if not d1$ close:print "No data available for this file.":return if not info(5) position #1,45,a:print #1,d1$,d2$,d3$,d4$,bb+1 close:print "Uploaded by: "d1$" "d2$ print "Upload date: "d3$ print "Upload time: "d4$ print "Times d/led: "bb return upload print \"%> Upload a File <%"\ print "Are you sure? ";:gosub get.key if i$<>"Y" print "No":goto start1 print "Yes"\\"Note: You do NOT have to use ProDOS filenames for the title." input @1 \"Title: "i$:if len(i$)<2 goto start1 if len(i$)>30 print \"30 characters max!":goto upload fn$=i$:gosub case.convert:gosub lower.case empty.chk open #1,lg$+"g"+str$(gf):position #1,55,0 input #1,x:if not x x=1:goto ul2 for a=1 to x:position #1,55,a:input #1,sz$,sz$,o$,sz$ if o$="EMPTY" b=a:a=x:next:x=b:close:goto ul3 if instr(ab$,o$) print \"File already exists!":a=x:next:close:goto download if instr(fn$,sz$) print \"Error - Conflicting filenames":a=x:next:close:goto download next:x=x+1 ul2 position #1,55,0:print #1,x ul3 close:if md=202 return nibble(3)=nibble(3)+1 print \"[1) DOS 3.3 AE"\"[2) ProDOS AE"\"[3) X/Ymodem" print\"Which? ";:gosub get.key a=val(i$):if (a<1) or (a>3) print "Quit":goto start1 print a:f$=lg$+fn$:create f$:print \"Ready to receive" if a=3 use "b:protocol.up",255,0,f$ if a=1 use "b:x.up",2,f$ if a=2 use "b:x.up",1,f$ use "b:xdos","getinfo "+f$:a=peek(edit(5)+7) sz=peek(edit(5)+21)+peek(edit(5)+22)*256 pb=peek(edit(5)+11)+peek(edit(5)+12)*256 open #1,"k:pae.filetypes":position #1,4,a input #1,x$:close:i$=right$("000"+str$(sz),4) open #1,lg$+"g"+str$(gf):position #1,55,x print #1,x$,i$,ab$,fn$:close open #1,lg$+"about":position #1,45,x print #1,a1$,a2$,date$,time$,"0":close print \"%> Upload Completed <%" ul4 print \"[V)iew/[S)ave/[D)elete: ";:gosub get.key if i$<>"S" goto option print "Save"\ open #1,"k:pae.points":position #1,12,un:input #1,bb,a,b position #1,12,un:print #1,bb+pb,a,b:close print pb" PAE points added to your account." open #1,"f:u."+str$(un):position #1,5,7:input #1,bb position #1,5,7:print #1,bb+1 close:goto start1 option if i$="V" print "View":gosub show.file:goto ul4 if i$<>"D" goto ul4 print "Delete"\\"Delete your upload? ";:gosub get.key if i$<>"Y" print "No":goto ul4 print "Yes":open #1,lg$+"g"+str$(gf) position #1,55,x:print #1,0,0,"EMPTY","NONE":close kill f$:goto start1 lower.case if len(i$)=1 ab$=i$:return ab$=left$(i$,1):for wy=2 to len(i$):wx=asc(mid$(i$,wy,1)) if wx=32 ab$=ab$+" "+mid$(i$,wy+1,1):wy=wy+1:next:return if (wx<65) or (wx>96) ab$=ab$+chr$(wx):next:return ab$=ab$+chr$(wx+32):next:return sysop print sc$' SysOp Menu ---------- [A)dd new g-file base [C)hange flag level on a base [R)e-name a base [D)elete a base [Q)uit' input @0 \"Select: " a$:if a$="Q" goto start2 if a$="A" goto add.base if a$="C" goto change.base if a$="R" goto rename.base if a$<>"D" goto sysop print sc$\"Delete a G-file base"\chr$(173,20) delete input @2 \"Enter base # to delete: " bb:if not bb goto sysop if bb>a print \"Base doesn't exist!":goto delete print \"Deleting..."; open #1,"gf.data":position #1,42,bb:print #1,"EMPTY","0":close lg$="c"+str$(bb-1)+":":if bb=1 lg$="c:" f$=lg$+"g"+str$(bb):open #1,f$ position #1,55,0:input #1,x if not x close:kill f$:goto del1 for ab=1 to x:position #1,55,x:input #1,i$,i$,i$,i$:i$=lg$+i$ kill i$:next:close:kill f$ del1 print chr$(8,6)"ed. ":goto delete change.base print sc$"Change Flag Level"\chr$(173,17) change1 input @1 \"Base # to change: " bb if (not bb) or (bb>a) goto sysop lg$="c"+str$(bb-1)+":":if bb=1 lg$="c:" input @1 \"Change to flag #" f print \"Changing..."; open #1,lg$+"gf.data":position #1,42,bb:input #1,a$,x position #1,42,bb:print #1,a$,f:close print chr$(8,6)"ed. ":goto change1 rename.base print sc$\"Rename a Base"\chr$(173,13) ren1 input @1\"Base # to change: "bb:if (not bb) or (bb>a) goto sysop input @3\"Change name to: "a$ if len(a$)>30 print \"Sorry, name can only be 30 characters.":goto ren1 print \"Changing..."; lg$="c"+str$(bb-1)+":":if bb=1 lg$="c:" open #1,lg$+"gf.data":position #1,42,bb:input #1,i$,x position #1,42,bb:print #1,a$,x:close print chr$(8,6)"ed. ":goto ren1 add.base print sc$\"Add a New Base"\chr$(173,14) add1 input @3 \"Enter base's name: " a$ if len(a$)>30 print \"Sorry, name can only be 30 characters.":goto add1 if not a$ goto sysop input @1 \"Enter flag level: " f print \"Adding..."; open #1,"gf.data":position #1,42,0:input #1,bb if not bb bb=1:position #1,42,0:print #1,bb:position #1,42,1:print #1,a$,f:close:goto done1 for x=1 to bb:position #1,42,x:input #1,i$,ab if i$<>"EMPTY" goto done2 position #1,42,x:print #1,a$,f:z=x:x=bb:next:close:bb=z:goto done1 done2 next:bb=bb+1:position #1,42,0:print #1,bb position #1,42,bb:print #1,a$,f:close done1 lg$="c"+str$(bb-1)+":":if bb=1 lg$="c:" f$=lg$+"g"+str$(bb) create f$:open #1,f$:position #1,55,0:print #1,"0":close f$=lg$+"about":create f$:open #1,f$:position #1,45,0:print #1,"0":close print chr$(8,6)"ed. ":goto add1 get.key ww=0:wx=0 get.key1 gg=clock(2) if (gg<>0) and (clock(1)>gg) print \\"[ Time Limit Exceeded ]":pop:goto no.car gg=peek(-16384):if (gg=129) or (gg=150) get i$:print chr$(8);:return gg=key(0):if (gg>96) and (gg<123) gg=gg-32 if (gg>31) or (gg=13) i$=chr$(gg):return ww=ww+1:if flag(33)=0 goto get.key2 wx=wx+1:if wx>16 wx=1 print mid$("!/-\!/-\!\-/!\-/",wx,1);chr$(8); get.key2 if ww=2000 print chr$(7,2); if ww=4000 pop:goto no.car if (not info(0)) and (not info(5)) and (eu<>1) pop:goto no.car goto get.key1 case.convert f$="":for wy=1 to len(fn$):wx=asc(mid$(fn$,wy,1)) if (wx=32) or (wx=46) f$=f$+".":next:goto case1 if (wx<48) or (wx>90) next:goto case1 if (wx>57) and (wx<65) next:goto case1 f$=f$+chr$(wx):next case1 f$=left$(f$,15) if right$(f$,1)="." f$=left$(f$,(len(f$)-1)):goto case1 fn$=f$:return