home *** CD-ROM | disk | FTP | other *** search
- /*
- * Test of rexxflow.library
- */
-
- options results
-
- /*
- The following defines are from work_detail.h for flow.library
-
- #define DTB_IFSENT 7 /* Let X= 'sent', else 'end of session' */
- #define DTB_DELETE 6 /* delete if X */
- #define DTB_TRUNCATE 5 /* truncate if X */
- #define DTB_REQUEUE 4 /* requeue if not X */
- */
-
- DTF_IFSENT = 128
- DTF_DELETE = 64
- DTF_TRUNCATE = 32
- DTF_REQUEUE = 16
-
-
- DT_TRUNCATE = DTF_IFSENT+DTF_TRUNCATE+DTF_REQUEUE
- DT_FILEATTACH = DTF_IFSENT+DTF_REQUEUE
- DT_DELETE = DTF_IFSENT+DTF_DELETE+DTF_REQUEUE
- DT_SHOW_DELETE = DT_DELETE
- DT_NOTHING = DT_FILEATTACH
- DT_EXTRA_DELETE = DT_DELETE
- DT_REQUEST = DTF_REQUEUE+DTF_DELETE
- DT_MAILBUNDLE = DT_TRUNCATE
-
- DTPRI_CRASH = 50
- DTPRI_HOLD = -50
-
- nl='0a'X
- cr='0d'X
- TRUE = 1
- FALSE = 0
-
- call pragma('D',"welmat:msg")
-
-
- magicnum = 10000000
-
- outbound = GetOutbound()
- if (outbound="")then call SetOutbound("welmat:outbound/")
- outbound = upper(GetOutbound())
- say outbound
-
-
- if open('in',outbound||"BUNDLES/MAGICNUM",'R') then do
- magicnum=readln('in')
- close('in')
- end
-
- myaddress.domain = "Fidonet"
- myaddress.zone = 1
- myaddress.net = 163
- myaddress.node = 139
- myaddress.point = 0
- call SetDefaultAddress(myaddress)
-
-
- whichnode.numnodes = 15
- whichnode.1.domain = "Fidonet"
- whichnode.1.zone = 1
- whichnode.1.net = 163
- whichnode.1.node = 109
- whichnode.1.point = 0
- whichnode.1.pri = DTPRI_CRASH
-
- whichnode.2.domain = "Fidonet"
- whichnode.2.zone = 1
- whichnode.2.net = 163
- whichnode.2.node = 136
- whichnode.2.point = 0
- whichnode.2.pri = DTPRI_CRASH
-
- whichnode.3.domain = "Fidonet"
- whichnode.3.zone = 1
- whichnode.3.net = 163
- whichnode.3.node = 211
- whichnode.3.point = 0
- whichnode.3.pri = DTPRI_CRASH
-
- whichnode.4.domain = "Fidonet"
- whichnode.4.zone = 1
- whichnode.4.net = 163
- whichnode.4.node = 150
- whichnode.4.point = 0
- whichnode.4.pri = DTPRI_CRASH
-
- whichnode.5.domain = "Fidonet"
- whichnode.5.zone = 1
- whichnode.5.net = 163
- whichnode.5.node = 133
- whichnode.5.point = 0
- whichnode.5.pri = DTPRI_CRASH
-
- whichnode.6.domain = "Fidonet"
- whichnode.6.zone = 1
- whichnode.6.net = 163
- whichnode.6.node = 123
- whichnode.6.point = 0
- whichnode.6.pri = DTPRI_CRASH
-
- whichnode.7.domain = "Fidonet"
- whichnode.7.zone = 1
- whichnode.7.net = 163
- whichnode.7.node = 239
- whichnode.7.point = 0
- whichnode.7.pri = DTPRI_CRASH
-
- whichnode.8.domain = "Fidonet"
- whichnode.8.zone = 1
- whichnode.8.net = 224
- whichnode.8.node = 140
- whichnode.8.point = 0
- whichnode.8.pri = DTPRI_HOLD
-
- whichnode.9.domain = "Fidonet"
- whichnode.9.zone = 1
- whichnode.9.net = 163
- whichnode.9.node = 112
- whichnode.9.point = 0
- whichnode.9.pri = DTPRI_CRASH
-
- whichnode.10.domain = "Fidonet"
- whichnode.10.zone = 1
- whichnode.10.net = 163
- whichnode.10.node = 130
- whichnode.10.point = 0
- whichnode.10.pri = DTPRI_CRASH
-
- whichnode.11.domain = "Fidonet"
- whichnode.11.zone = 1
- whichnode.11.net = 163
- whichnode.11.node = 207
- whichnode.11.point = 0
- whichnode.11.pri = DTPRI_CRASH
-
- whichnode.12.domain = "Fidonet"
- whichnode.12.zone = 1
- whichnode.12.net = 163
- whichnode.12.node = 162
- whichnode.12.point = 0
- whichnode.12.pri = DTPRI_CRASH
-
- whichnode.13.domain = "Fidonet"
- whichnode.13.zone = 1
- whichnode.13.net = 163
- whichnode.13.node = 109
- whichnode.13.point = 10
- whichnode.13.pri = DTPRI_HOLD
- whichnode.13.private = 30056
-
- whichnode.14.domain = "Fidonet"
- whichnode.14.zone = 1
- whichnode.14.net = 163
- whichnode.14.node = 109
- whichnode.14.point = 4
- whichnode.14.pri = DTPRI_HOLD
- whichnode.14.private = 30056
-
- whichnode.15.domain = "Fidonet"
- whichnode.15.zone = 1
- whichnode.15.net = 232
- whichnode.15.node = 301
- whichnode.15.point = 0
- whichnode.15.pri = DTPRI_HOLD
-
- /* call fidoflo2uucp("jammys fido") */
-
- do anode = 1 until anode = whichnode.numnodes
- say anode
- if symbol('whichnode.anode.private')=="VAR" then do
- say "Unflow" whichnode.anode.net"/"||whichnode.anode.node||"."||whichnode.anode.point
- floname = upper(outbound||"bundles/"||right(d2x(whichnode.anode.private),4,"0") ,
- ||right(d2x(whichnode.anode.point),4,"0")||".CLO")
- end
- else do
- say "Unflow" whichnode.anode.net"/"||whichnode.anode.node
- floname = upper(outbound||"bundles/"||right(d2x(whichnode.anode.net),4,"0") ,
- ||right(d2x(whichnode.anode.node),4,"0")||".CLO")
- end
- address command "delete "floname
-
- work_detail = FindDetail(whichnode.anode)
- say work_detail
-
- call ScanDetail(work_detail, huge_list)
- if (huge_list.numnodes > 0) then do
- say "InIt-Un"
- x=Open('flofile',floname,'W')
- if x=0 then do
- say "Error opening" floname
- Exit 1
- end
- do i = 1 until i = huge_list.numnodes
- say huge_list.i.filename
- if index(upper(huge_list.i.filename),outbound||"BUNDLES") then do
- wildchar=''
- drop flags
- if (huge_list.i.flags = DT_TRUNCATE) then wildchar='#'
- if (huge_list.i.flags = DT_DELETE) then wildchar='^'
- call WriteLN('flofile', upper(wildchar||huge_list.i.filename))
- say "Writing:" wildchar||huge_list.i.filename
- end
- else do
- drop flags
- say "AddWorkName("work_detail","huge_list.i.filename","huge_list.i.asname","huge_list.i.flags")"
- detailnode=AddWorkName(work_detail,huge_list.i.filename,huge_list.i.asname,huge_list.i.flags)
- say "ChangeDetailPri("work_detail","detailnode","huge_list.i.pri")"
- ChangeDetailPri(work_detail,detailnode,huge_list.i.pri)
- end
- end
- x=Close('flofile')
- end
- /* FreeDetail(work_detail) */
- call DumpOutbound(outbound)
- end
-
-
- address command "assign at: t:"
- address command "assign mail: welmat:msg"
- address command "stack 300000" nl ,
- "welmat:msg/bin/cm import welmat:msg/areas.bbs -k -n -a rx xarc x"
-
- address command "stack 300000" nl ,
- "welmat:msg/bin/cm export welmat:msg/areas.bbs -o "outbound||"BUNDLES/"
-
- call netmailscan() /* Does point remapping/etc */
-
- address command "stack 30000" nl ,
- "welmat:msg/bin/ommm -z1"
-
- do anode = 1 until anode = whichnode.numnodes
- say anode
- say whichnode.anode.net"/"||whichnode.anode.node
-
- if symbol('whichnode.anode.private')=="VAR" then do
- say "ReFlow" whichnode.anode.net"/"||whichnode.anode.node||"."||whichnode.anode.point
- outname = upper(outbound||"BUNDLES/"||right(d2x(whichnode.anode.private),4,"0") ,
- ||right(d2x(whichnode.anode.point),4,"0")||".CUT")
- floname = upper(outbound||"BUNDLES/"||right(d2x(whichnode.anode.private),4,"0") ,
- ||right(d2x(whichnode.anode.point),4,"0")||".CLO")
- end
- else do
- say "ReFlow" whichnode.anode.net"/"||whichnode.anode.node
- outname = upper(outbound||"BUNDLES/"||right(d2x(whichnode.anode.net),4,"0") ,
- ||right(d2x(whichnode.anode.node),4,"0")||".CUT")
- floname = upper(outbound||"BUNDLES/"||right(d2x(whichnode.anode.net),4,"0") ,
- ||right(d2x(whichnode.anode.node),4,"0")||".CLO")
- end
-
- say outname ":" floname
-
- work_detail = FindDetail(whichnode.anode)
-
- say work_detail
-
- call ScanDetail(work_detail, huge_list)
-
- additout = EXISTS(outname)
- say "numnodes" huge_list.numnodes
-
- if huge_list.numnodes > 0 then do
- say "InIt"
- do i = 1 until i = huge_list.numnodes
- say i
- drop flags
- if upper(huge_list.i.filename) ~= outname then do
- say "AddWorkName("work_detail","huge_list.i.filename","huge_list.i.asname","huge_list.i.flags")"
- detailnode=AddWorkName(work_detail,huge_list.i.filename,huge_list.i.asname,huge_list.i.flags)
- say "ChangeDetailPri("work_detail","detailnode","huge_list.i.pri")"
- ChangeDetailPri(work_detail,detailnode,huge_list.i.pri)
- end
- end
- end
-
- if EXISTS(floname) then do
- x=Open('flofile',floname,'R')
- if x=0 then do
- say "Error opening" floname
- Exit 1
- end
-
- do forever
-
- Line=upper(ReadLn('flofile'))
-
- if EOF('flofile') then Leave
-
- say "processing line" Line
-
- flags= DT_NOTHING
- if (LEFT(Line,1) = "#") then do
- flags = DT_TRUNCATE
- Line=DELSTR(Line,1,1)
- end
- if (LEFT(Line,1) = "^") then do
- flags = DT_DELETE
- Line=DELSTR(Line,1,1)
- end
- addit = TRUE
-
- if huge_list.numnodes > 0 then do
- say "InIt1" huge_list.numnodes
-
- do i = 1 until i = huge_list.numnodes
- say i " : " upper(huge_list.i.filename) " || " Line
- if upper(huge_list.i.filename) = Line then do
- addit = FALSE
- say "not adding"
- end
- end
- end
- if (addit = TRUE) & (Line ~= outname) then do
- say "Adding: " Line
- detailnode=AddWork(work_detail,Line, flags)
- ChangeDetailPri(work_detail,detailnode,whichnode.anode.pri)
- end
- end
- x=Close('flofile')
- address command "delete "floname
- end /* exists floname */
-
- if additout = TRUE then do
- magicnum= magicnum+1
- if ((magicnum > 99999999) | (Magicnum < 10000000)) then magicnum = 10000000
- say "Adding It - MagicNum" magicnum
- detailnode=AddWorkName(work_detail,outname,magicnum||".PKT", DT_DELETE)
- ChangeDetailPri(work_detail,detailnode,whichnode.anode.pri)
- end
- /* freeDetail(work_detail) */
- call DumpOutbound(outbound)
- end
-
- if ~open('out',outbound||"BUNDLES/MAGICNUM",'W') then do
- say "Can't open numberfile"
- end
- else do
- writeln('out',magicnum)
- close('out')
- Say "Wrote out Magicnum:"magicnum
- end
-
- /* call fidoflo2uucp("jammys UUCP") */
-