From 33c975873e77862db8c87abda1052fc1dfb09b0b Mon Sep 17 00:00:00 2001 From: astrofra Date: Sat, 30 Mar 2019 19:40:46 +0100 Subject: [PATCH] Batch commit of the original source code archive provided by the author itself. --- ABBS.info | Bin 0 -> 931 bytes ABBSint.s | 227 + ABBSmy.s | 1074 ++ Browse.asm | 1425 ++ Div.asm | 196 + Exeption.asm | 436 + FSE.asm | 2476 +++ Hippo.c | 418 + Include/.RELEASE.h | 230 + Include/ABBSFront.h | 78 + Include/ABBSFront.i | 67 + Include/ABBSmy.i | 53 + Include/ABBSmyfix.i | 25 + Include/Browse.pro | 8 + Include/NodeSupport.pro | 6 + Include/NodeSupportdefs.i | 35 + Include/QWK.pro | 1 + Include/abbsint.i | 8 + Include/asm.i | 122 + Include/bbs.h | 831 + Include/bbs.i | 759 + Include/fifo.h | 41 + Include/fifo.i | 39 + Include/first.i | 24 + Include/fse.i | 46 + Include/misc.h | 31 + Include/msg.pro | 23 + Include/node.h | 217 + Include/node.i | 204 + Include/nodedefs.i | 195 + Include/noderefs.i | 34 + Include/paragon.pro | 2 + Include/rexx.pro | 2 + Include/tables.i | 10 + Include/tables.pro | 13 + Include/transfer.pro | 6 + Include/xpr.h | 9 + Include/xpr.i | 102 + Include/xproto.h | 119 + JEO.c | 1399 ++ JEO/-Loadsaveuserfile.c | 63 + JEO/ABBS1x_config.lha | Bin 0 -> 538 bytes JEO/ANSIHELP.txt | 26 + JEO/AddFile.info | Bin 0 -> 835 bytes JEO/AddMsg.c | 434 + JEO/AddMsg.info | Bin 0 -> 835 bytes JEO/Addfile.c | 623 + JEO/Arc | Bin 0 -> 10128 bytes JEO/Arc.c | 394 + JEO/Arc.gui | Bin 0 -> 4250 bytes JEO/Arc.h | 40 + JEO/B.c | 251 + JEO/Broadcast.c | 125 + JEO/Broadcast.info | Bin 0 -> 835 bytes JEO/CheckABBSnr | Bin 0 -> 8376 bytes JEO/CheckABBSnr.c | 61 + JEO/CheckABBSnr.info | Bin 0 -> 835 bytes JEO/CheckUserfile | Bin 0 -> 7880 bytes JEO/CheckUserfile.c | 260 + JEO/CheckUserfile.info | Bin 0 -> 835 bytes JEO/ConfigBBS.c | 842 + JEO/ConfigBBS.info | Bin 0 -> 835 bytes JEO/ConfigBBS_GUI.c | 242 + JEO/ConfigBBS_GUI.gui | Bin 0 -> 9492 bytes JEO/ConfigBBS_GUI.h | 76 + JEO/ConvertConfig.c | 526 + JEO/ConvertConfig.info | Bin 0 -> 835 bytes JEO/ConvertConfig.s | Bin 0 -> 25932 bytes JEO/ConvertFL | Bin 0 -> 12568 bytes JEO/ConvertFL.c | 166 + JEO/ConvertFL.info | Bin 0 -> 835 bytes JEO/CygnusEdTempA.688 | 539 + JEO/FLMaker | Bin 0 -> 10052 bytes JEO/FLMaker.c | 245 + JEO/FLMaker.info | Bin 0 -> 835 bytes JEO/FileCache | Bin 0 -> 7116 bytes JEO/FileCache.c | 101 + JEO/FileCache.info | Bin 0 -> 835 bytes JEO/FileEditor/-Historie | 46 + JEO/FileEditor/-TODO | 0 JEO/FileEditor/Comment.c | 131 + JEO/FileEditor/FE | Bin 0 -> 46348 bytes JEO/FileEditor/FE.c | 1609 ++ JEO/FileEditor/FE.h | 140 + JEO/FileEditor/FE_locale.h | 221 + JEO/FileEditor/FileEditor.cd | 417 + JEO/FileEditor/FileEditor17.lha | Bin 0 -> 28700 bytes JEO/FileEditor/GUI.c | 394 + JEO/FileEditor/GUI.gui | Bin 0 -> 8714 bytes JEO/FileEditor/GUI.h | 73 + JEO/FileEditor/Install.c | 1118 ++ JEO/FileEditor/Liste_base.c | 666 + JEO/FileEditor/Norsk.ct | 452 + JEO/FileEditor/Test_arc.c | 391 + JEO/FindUnread.c | 191 + JEO/FindUnread.info | Bin 0 -> 835 bytes JEO/FixConferences | Bin 0 -> 39844 bytes JEO/FixConferences.info | Bin 0 -> 835 bytes JEO/FixFileInfo | Bin 0 -> 9864 bytes JEO/FixFileInfo.c | 321 + JEO/FixFileInfo.info | Bin 0 -> 835 bytes JEO/FixIndex | Bin 0 -> 11080 bytes JEO/FixIndex.c | 409 + JEO/FixIndex.info | Bin 0 -> 835 bytes JEO/Gen | Bin 0 -> 9360 bytes JEO/Gen.c | 123 + JEO/JEO.c | 54 + JEO/Message.c | 76 + JEO/MsgTest.c | 80 + JEO/PackMsgs | Bin 0 -> 12120 bytes JEO/PackMsgs.c | 418 + JEO/ShowConfig | Bin 0 -> 41416 bytes JEO/ShowConfig.c | 352 + JEO/ShowConfig.info | Bin 0 -> 835 bytes JEO/Showuserfile | Bin 0 -> 8348 bytes JEO/Showuserfile.c | 88 + JEO/SortFiles | Bin 0 -> 12088 bytes JEO/SortFiles.c | 382 + JEO/SortFiles.info | Bin 0 -> 835 bytes JEO/UserEditor | Bin 0 -> 94796 bytes JEO/UserEditor.c | 816 + JEO/UserEditor.info | Bin 0 -> 835 bytes JEO/Usereditorgui.c | 426 + JEO/Usereditorgui.gui | Bin 0 -> 12702 bytes JEO/Usereditorgui.h | 115 + JEO/ZapFile.c | 206 + JEO/ZapFile.info | Bin 0 -> 835 bytes JEO/ansi.txt | 315 + JEO/b | Bin 0 -> 11476 bytes JEO/b.info | Bin 0 -> 835 bytes JEO/t | Bin 0 -> 8196 bytes JEO/t.c | 33 + JEO/t.info | Bin 0 -> 835 bytes JEO/tt | Bin 0 -> 1824 bytes JEO/tt.c | 24 + JEO/tt.info | Bin 0 -> 835 bytes Main.asm | 5810 ++++++ Makefile | 79 + Msg.asm | 568 + Node.asm | 29275 ++++++++++++++++++++++++++++++ NodeSupport.asm | 436 + PIP.info | Bin 0 -> 835 bytes Paragon.asm | 818 + QWK.c | 1649 ++ Rexx.asm | 1031 ++ c/CheckIndex.c | 249 + c/ConfigNode.c | 1216 ++ c/ConfigNode.info | Bin 0 -> 835 bytes c/ConfigNodeGui.c | 851 + c/ConfigNodegui.changes | 11 + c/ConfigNodegui.gui | Bin 0 -> 27164 bytes c/ConfigNodegui.gui2 | Bin 0 -> 26838 bytes c/ConfigNodegui.h | 210 + c/ConfigNodegui_temp.c | 456 + c/CryptPasswords.c | 128 + c/FindLostFiles.c | 308 + c/FindUnread.c | 172 + c/FixIndex.c | 359 + c/JEO.c | 36 + c/KillMsg.c | 187 + c/ListFiles.c | 269 + c/Makefile | 275 + c/Test.c | 31 + c/Usereditorgui.c | 426 + c/Usereditorgui.gui | Bin 0 -> 12702 bytes c/Usereditorgui.h | 115 + c/confignodegui2.h | 91 + c/convertconfig.c | 260 + c/split.c | 23 + c/usereditor.c | 760 + doc/ABBS.doc | 457 + doc/ABBSRexx.doc | 302 + doc/AddFile.Doc | 53 + doc/AddFile.Doc.new | 62 + doc/AddMsg.Doc | 22 + doc/AddMsg.doc.new | 19 + doc/Broadcast.doc | 13 + doc/CheckIndex.doc | 17 + doc/CheckUsers.doc | 11 + doc/ConfigBBS.doc | 247 + doc/ConfigNode.doc | 143 + doc/Configbbs.txt | 47 + doc/CryptPasswords.doc | 23 + doc/DLratio.doc | 11 + doc/Doors.doc | 71 + doc/FixFileOrder.Doc | 10 + doc/FixIndex.doc | 33 + doc/Fixusers.doc | 18 + doc/Installasjon.txt | 88 + doc/ListFiles.doc | 26 + doc/MiscMenu.doc | 42 + doc/NewArexx.txt | 10 + doc/NewConfigNode.doc | 318 + doc/NewConfigNode.txt | 34 + doc/PackFileDirs.doc | 20 + doc/SysopAvail.doc | 11 + doc/ToggleCache.Doc | 9 + doc/msgport.doc | 45 + doc/scripts.doc | 50 + gen | Bin 0 -> 9360 bytes hebbe.asm | Bin 0 -> 351 bytes readme.md | 3 + rse-a2.lzx | Bin 0 -> 99850 bytes s/asm | 12 + s/asmd | 3 + s/gen | Bin 0 -> 1336 bytes s/log | Bin 0 -> 700 bytes tables.asm | 237 + transfer.asm | 1078 ++ util/Broadcast.asm | 306 + util/Checkusers.asm | 428 + util/ConfigNode.asm | 1546 ++ util/Configbbs.asm | 4141 +++++ util/Convert2.asm | 183 + util/DLratio | Bin 0 -> 2004 bytes util/DLratio.asm | 522 + util/FixFileOrder.asm | 138 + util/PackfileDirs.asm | 412 + util/SysopAvail.asm | 265 + util/ToggleCache.asm | 146 + util/bbs.i | 645 + util/check.asm | 103 + util/configbbs.pw | Bin 0 -> 4751 bytes util/configbbs1.pw | Bin 0 -> 4935 bytes util/configbbsnew.pw | Bin 0 -> 11358 bytes util/configbbsstr.asm | 1900 ++ util/confignode.pw | Bin 0 -> 4676 bytes util/confignodestr.asm | 989 + util/convert.asm | 331 + util/convertfl | Bin 0 -> 2528 bytes util/fix.asm | 256 + util/fixPUSmistake.asm | 221 + util/fixconforder.asm | 145 + util/flush.asm | 21 + util/make | 9 + util/nconfigbb | Bin 0 -> 9268 bytes util/nconfigbbs.asm | 2066 +++ withfile | 61 + 238 files changed, 90570 insertions(+) create mode 100644 ABBS.info create mode 100644 ABBSint.s create mode 100644 ABBSmy.s create mode 100644 Browse.asm create mode 100644 Div.asm create mode 100644 Exeption.asm create mode 100644 FSE.asm create mode 100644 Hippo.c create mode 100644 Include/.RELEASE.h create mode 100644 Include/ABBSFront.h create mode 100644 Include/ABBSFront.i create mode 100644 Include/ABBSmy.i create mode 100644 Include/ABBSmyfix.i create mode 100644 Include/Browse.pro create mode 100644 Include/NodeSupport.pro create mode 100644 Include/NodeSupportdefs.i create mode 100644 Include/QWK.pro create mode 100644 Include/abbsint.i create mode 100644 Include/asm.i create mode 100644 Include/bbs.h create mode 100644 Include/bbs.i create mode 100644 Include/fifo.h create mode 100644 Include/fifo.i create mode 100644 Include/first.i create mode 100644 Include/fse.i create mode 100644 Include/misc.h create mode 100644 Include/msg.pro create mode 100644 Include/node.h create mode 100644 Include/node.i create mode 100644 Include/nodedefs.i create mode 100644 Include/noderefs.i create mode 100644 Include/paragon.pro create mode 100644 Include/rexx.pro create mode 100644 Include/tables.i create mode 100644 Include/tables.pro create mode 100644 Include/transfer.pro create mode 100644 Include/xpr.h create mode 100644 Include/xpr.i create mode 100644 Include/xproto.h create mode 100644 JEO.c create mode 100644 JEO/-Loadsaveuserfile.c create mode 100644 JEO/ABBS1x_config.lha create mode 100644 JEO/ANSIHELP.txt create mode 100644 JEO/AddFile.info create mode 100644 JEO/AddMsg.c create mode 100644 JEO/AddMsg.info create mode 100644 JEO/Addfile.c create mode 100644 JEO/Arc create mode 100644 JEO/Arc.c create mode 100644 JEO/Arc.gui create mode 100644 JEO/Arc.h create mode 100644 JEO/B.c create mode 100644 JEO/Broadcast.c create mode 100644 JEO/Broadcast.info create mode 100644 JEO/CheckABBSnr create mode 100644 JEO/CheckABBSnr.c create mode 100644 JEO/CheckABBSnr.info create mode 100644 JEO/CheckUserfile create mode 100644 JEO/CheckUserfile.c create mode 100644 JEO/CheckUserfile.info create mode 100644 JEO/ConfigBBS.c create mode 100644 JEO/ConfigBBS.info create mode 100644 JEO/ConfigBBS_GUI.c create mode 100644 JEO/ConfigBBS_GUI.gui create mode 100644 JEO/ConfigBBS_GUI.h create mode 100644 JEO/ConvertConfig.c create mode 100644 JEO/ConvertConfig.info create mode 100644 JEO/ConvertConfig.s create mode 100644 JEO/ConvertFL create mode 100644 JEO/ConvertFL.c create mode 100644 JEO/ConvertFL.info create mode 100644 JEO/CygnusEdTempA.688 create mode 100644 JEO/FLMaker create mode 100644 JEO/FLMaker.c create mode 100644 JEO/FLMaker.info create mode 100644 JEO/FileCache create mode 100644 JEO/FileCache.c create mode 100644 JEO/FileCache.info create mode 100644 JEO/FileEditor/-Historie create mode 100644 JEO/FileEditor/-TODO create mode 100644 JEO/FileEditor/Comment.c create mode 100644 JEO/FileEditor/FE create mode 100644 JEO/FileEditor/FE.c create mode 100644 JEO/FileEditor/FE.h create mode 100644 JEO/FileEditor/FE_locale.h create mode 100644 JEO/FileEditor/FileEditor.cd create mode 100644 JEO/FileEditor/FileEditor17.lha create mode 100644 JEO/FileEditor/GUI.c create mode 100644 JEO/FileEditor/GUI.gui create mode 100644 JEO/FileEditor/GUI.h create mode 100644 JEO/FileEditor/Install.c create mode 100644 JEO/FileEditor/Liste_base.c create mode 100644 JEO/FileEditor/Norsk.ct create mode 100644 JEO/FileEditor/Test_arc.c create mode 100644 JEO/FindUnread.c create mode 100644 JEO/FindUnread.info create mode 100644 JEO/FixConferences create mode 100644 JEO/FixConferences.info create mode 100644 JEO/FixFileInfo create mode 100644 JEO/FixFileInfo.c create mode 100644 JEO/FixFileInfo.info create mode 100644 JEO/FixIndex create mode 100644 JEO/FixIndex.c create mode 100644 JEO/FixIndex.info create mode 100644 JEO/Gen create mode 100644 JEO/Gen.c create mode 100644 JEO/JEO.c create mode 100644 JEO/Message.c create mode 100644 JEO/MsgTest.c create mode 100644 JEO/PackMsgs create mode 100644 JEO/PackMsgs.c create mode 100644 JEO/ShowConfig create mode 100644 JEO/ShowConfig.c create mode 100644 JEO/ShowConfig.info create mode 100644 JEO/Showuserfile create mode 100644 JEO/Showuserfile.c create mode 100644 JEO/SortFiles create mode 100644 JEO/SortFiles.c create mode 100644 JEO/SortFiles.info create mode 100644 JEO/UserEditor create mode 100644 JEO/UserEditor.c create mode 100644 JEO/UserEditor.info create mode 100644 JEO/Usereditorgui.c create mode 100644 JEO/Usereditorgui.gui create mode 100644 JEO/Usereditorgui.h create mode 100644 JEO/ZapFile.c create mode 100644 JEO/ZapFile.info create mode 100644 JEO/ansi.txt create mode 100644 JEO/b create mode 100644 JEO/b.info create mode 100644 JEO/t create mode 100644 JEO/t.c create mode 100644 JEO/t.info create mode 100644 JEO/tt create mode 100644 JEO/tt.c create mode 100644 JEO/tt.info create mode 100644 Main.asm create mode 100644 Makefile create mode 100644 Msg.asm create mode 100644 Node.asm create mode 100644 NodeSupport.asm create mode 100644 PIP.info create mode 100644 Paragon.asm create mode 100644 QWK.c create mode 100644 Rexx.asm create mode 100644 c/CheckIndex.c create mode 100644 c/ConfigNode.c create mode 100644 c/ConfigNode.info create mode 100644 c/ConfigNodeGui.c create mode 100644 c/ConfigNodegui.changes create mode 100644 c/ConfigNodegui.gui create mode 100644 c/ConfigNodegui.gui2 create mode 100644 c/ConfigNodegui.h create mode 100644 c/ConfigNodegui_temp.c create mode 100644 c/CryptPasswords.c create mode 100644 c/FindLostFiles.c create mode 100644 c/FindUnread.c create mode 100644 c/FixIndex.c create mode 100644 c/JEO.c create mode 100644 c/KillMsg.c create mode 100644 c/ListFiles.c create mode 100644 c/Makefile create mode 100644 c/Test.c create mode 100644 c/Usereditorgui.c create mode 100644 c/Usereditorgui.gui create mode 100644 c/Usereditorgui.h create mode 100644 c/confignodegui2.h create mode 100644 c/convertconfig.c create mode 100644 c/split.c create mode 100644 c/usereditor.c create mode 100644 doc/ABBS.doc create mode 100644 doc/ABBSRexx.doc create mode 100644 doc/AddFile.Doc create mode 100644 doc/AddFile.Doc.new create mode 100644 doc/AddMsg.Doc create mode 100644 doc/AddMsg.doc.new create mode 100644 doc/Broadcast.doc create mode 100644 doc/CheckIndex.doc create mode 100644 doc/CheckUsers.doc create mode 100644 doc/ConfigBBS.doc create mode 100644 doc/ConfigNode.doc create mode 100644 doc/Configbbs.txt create mode 100644 doc/CryptPasswords.doc create mode 100644 doc/DLratio.doc create mode 100644 doc/Doors.doc create mode 100644 doc/FixFileOrder.Doc create mode 100644 doc/FixIndex.doc create mode 100644 doc/Fixusers.doc create mode 100644 doc/Installasjon.txt create mode 100644 doc/ListFiles.doc create mode 100644 doc/MiscMenu.doc create mode 100644 doc/NewArexx.txt create mode 100644 doc/NewConfigNode.doc create mode 100644 doc/NewConfigNode.txt create mode 100644 doc/PackFileDirs.doc create mode 100644 doc/SysopAvail.doc create mode 100644 doc/ToggleCache.Doc create mode 100644 doc/msgport.doc create mode 100644 doc/scripts.doc create mode 100644 gen create mode 100644 hebbe.asm create mode 100644 readme.md create mode 100644 rse-a2.lzx create mode 100644 s/asm create mode 100644 s/asmd create mode 100644 s/gen create mode 100644 s/log create mode 100644 tables.asm create mode 100644 transfer.asm create mode 100644 util/Broadcast.asm create mode 100644 util/Checkusers.asm create mode 100644 util/ConfigNode.asm create mode 100644 util/Configbbs.asm create mode 100644 util/Convert2.asm create mode 100644 util/DLratio create mode 100644 util/DLratio.asm create mode 100644 util/FixFileOrder.asm create mode 100644 util/PackfileDirs.asm create mode 100644 util/SysopAvail.asm create mode 100644 util/ToggleCache.asm create mode 100644 util/bbs.i create mode 100644 util/check.asm create mode 100644 util/configbbs.pw create mode 100644 util/configbbs1.pw create mode 100644 util/configbbsnew.pw create mode 100644 util/configbbsstr.asm create mode 100644 util/confignode.pw create mode 100644 util/confignodestr.asm create mode 100644 util/convert.asm create mode 100644 util/convertfl create mode 100644 util/fix.asm create mode 100644 util/fixPUSmistake.asm create mode 100644 util/fixconforder.asm create mode 100644 util/flush.asm create mode 100644 util/make create mode 100644 util/nconfigbb create mode 100644 util/nconfigbbs.asm create mode 100644 withfile diff --git a/ABBS.info b/ABBS.info new file mode 100644 index 0000000000000000000000000000000000000000..58f6c72abb2998fbbeb2d197d13d67d5626a92e1 GIT binary patch literal 931 zcmb8t&r1S96bJC>2P_0)#}0u)bquUihqgtk!&0QgMtO=TD?w7q=+;ihPW}o08(qRf z2MK}>9Xluq&C#TThU>oOy_qS4AbOzl+3&o!>kc-@*$^}3vS~IduZOIeryCRgTu12A znn^rxDg1obxT4FZ*f1NuUr@bZiW>lL=%FYVCj5^A=EyOe2x**VeI%*+rMgk2)sw{C z0(6wZ4z!f|J*X@7`cPHsgy1W+;8Fr->u{@8g=Z}v=nc3~zXbdGxFw4Vd?pqb_)IJ= z@R?X#)M-U&{4O&91LtQ31~T@QF>|^WGj|q$tHCS)>U(2Rtu9ow0^iXJmwc`0fJ98$L}$`w+(3$aI1Gq`jFsTMB!@1!zJzy~P?R}i2=2ks#Br2=_Z07t4z zZOlOCm-Bq3EJy-SrzA5t+=AlR$^uO0n*2H$5z{rIK(^%9rs*h*?6=_183^v`=rt4+w*?Ej6RL|OK#?J5MOY!{Kaqh4bPvTxASuE!E3n#XB bdY+|VJ9lzWxLD5~mh8kp;1!DY+#LG^drn%! literal 0 HcmV?d00001 diff --git a/ABBSint.s b/ABBSint.s new file mode 100644 index 0000000..4729a01 --- /dev/null +++ b/ABBSint.s @@ -0,0 +1,227 @@ +* +* Source machine generated by GadToolsBox V2.0 +* which is (c) Copyright 1991-1993 Jaba Development +* +* GUI Designed by : JEO +* + + include 'exec/types.i' + include 'intuition/intuition.i' + include 'intuition/classes.i' + include 'libraries/gadtools.i' + + XDEF Project0NewMenu0 + +Project0NewMenu0: + DC.B NM_TITLE,0 + DC.L Project0MName0 + DC.L 0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu1: + DC.B NM_ITEM,0 + DC.L Project0MName1 + DC.L Project0MComm1 + DC.W CHECKIT!MENUTOGGLE + DC.L 0,0 + +Project0NewMenu2: + DC.B NM_ITEM,0 + DC.L Project0MName2 + DC.L Project0MComm2 + DC.W 0 + DC.L 0,0 + +Project0NewMenu3: + DC.B NM_ITEM,0 + DC.L Project0MName3 + DC.L Project0MComm3 + DC.W 0 + DC.L 0,0 + +Project0NewMenu4: + DC.B NM_ITEM,0 + DC.L Project0MName4 + DC.L Project0MComm4 + DC.W 0 + DC.L 0,0 + +Project0NewMenu5: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu6: + DC.B NM_ITEM,0 + DC.L Project0MName6 + DC.L Project0MComm6 + DC.W 0 + DC.L 0,0 + +Project0NewMenu7: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu8: + DC.B NM_ITEM,0 + DC.L Project0MName8 + DC.L Project0MComm8 + DC.W 0 + DC.L 0,0 + +Project0NewMenu9: + DC.B NM_ITEM,0 + DC.L Project0MName9 + DC.L Project0MComm9 + DC.W NM_ITEMDISABLED + DC.L 0,0 + +Project0NewMenu10: + DC.B NM_ITEM,0 + DC.L Project0MName10 + DC.L Project0MComm10 + DC.W NM_ITEMDISABLED + DC.L 0,0 + +Project0NewMenu11: + DC.B NM_TITLE,0 + DC.L Project0MName11 + DC.L 0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu12: + DC.B NM_ITEM,0 + DC.L Project0MName12 + DC.L Project0MComm12 + DC.W 0 + DC.L 0,0 + +Project0NewMenu13: + DC.B NM_ITEM,0 + DC.L Project0MName13 + DC.L Project0MComm13 + DC.W 0 + DC.L 0,0 + +Project0NewMenu14: + DC.B NM_ITEM,0 + DC.L Project0MName14 + DC.L Project0MComm14 + DC.W 0 + DC.L 0,0 + +Project0NewMenu15: + DC.B NM_ITEM,0 + DC.L Project0MName15 + DC.L Project0MComm15 + DC.W 0 + DC.L 0,0 + +Project0NewMenu16: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu17: + DC.B NM_ITEM,0 + DC.L Project0MName17 + DC.L Project0MComm17 + DC.W 0 + DC.L 0,0 + + DC.B NM_END,0 + DC.L 0,0 + DC.W 0 + DC.L 0,0 + +Project0MName0: + DC.B 'This node',0 + +Project0MName1: + DC.B 'Chat',0 + +Project0MComm1: + DC.B 'S',0 + +Project0MName2: + DC.B 'Show user',0 + +Project0MComm2: + DC.B 'U',0 + +Project0MName3: + DC.B 'Eject user',0 + +Project0MComm3: + DC.B 'E',0 + +Project0MName4: + DC.B 'Kill user',0 + +Project0MComm4: + DC.B 'K',0 + +Project0MName6: + DC.B 'Zoom Window',0 + +Project0MComm6: + DC.B 'Z',0 + +Project0MName8: + DC.B 'Hide node',0 + +Project0MComm8: + DC.B 'H',0 + +Project0MName9: + DC.B 'Shut down',0 + +Project0MComm9: + DC.B 'D',0 + +Project0MName10: + DC.B 'Shut down busy',0 + +Project0MComm10: + DC.B 'B',0 + +Project0MName11: + DC.B 'User',0 + +Project0MName12: + DC.B 'Add 5 min',0 + +Project0MComm12: + DC.B '+',0 + +Project0MName13: + DC.B 'Sub 5 min',0 + +Project0MComm13: + DC.B '-',0 + +Project0MName14: + DC.B 'Add 5 f min',0 + +Project0MComm14: + DC.B '>',0 + +Project0MName15: + DC.B 'Sub 5 f min',0 + +Project0MComm15: + DC.B '<',0 + +Project0MName17: + DC.B 'Tmp sysop',0 + +Project0MComm17: + DC.B 'T',0 + + END diff --git a/ABBSmy.s b/ABBSmy.s new file mode 100644 index 0000000..f76ab42 --- /dev/null +++ b/ABBSmy.s @@ -0,0 +1,1074 @@ +* +* Source machine generated by GadToolsBox V2.0b +* which is (c) Copyright 1991-1993 Jaba Development +* +* GUI Designed by : JEO +* + + include 'exec/types.i' + include 'intuition/intuition.i' + include 'intuition/classes.i' + include 'intuition/classusr.i' + include 'intuition/imageclass.i' + include 'intuition/gadgetclass.i' + include 'libraries/gadtools.i' + include 'libraries/gadtools_lib.i' + include 'libraries/intuition_lib.i' + include 'libraries/exec_lib.i' + include 'graphics/displayinfo.i' + include 'graphics/gfxbase.i' + + XREF exebase + XREF intbase + XREF gfxbase + XREF gadbase + XREF nodelist + +_SysBase equ exebase +_IntuitionBase equ intbase +_GfxBase equ gfxbase +_GadToolsBase equ gadbase + + XDEF OpenABBSAppWindowWindow + XDEF CloseABBSAppWindowWindow + XDEF SetupScreen + XDEF CloseDownScreen + XDEF ABBSAppWindowRender + XDEF ABBSAppWindowWnd + XDEF ABBSAppWindowGadgets + XDEF ABBSAppWindowMenus + XDEF ABBSAppWindowLeft + XDEF ABBSAppWindowTop + + IFND GT_Underscore +GT_Underscore EQU GT_TagBase+64 ; ti_Data points to the symbol + ENDC + +GD_ListViewGadget EQU 0 +GD_ShowGadget EQU 1 +GD_HideGadget EQU 2 +GD_ChatGadget EQU 3 +GD_OffHook EQU 4 +GD_EjectGadget EQU 5 +GD_killgadget EQU 6 +GD_TmpSysopGadget EQU 7 +GD_ShowuserGadget EQU 8 +GD_shutdownGadget EQU 9 +GD_foo2 EQU 10 +GD_CloseABBSGadget EQU 11 +GD_Reopen_node EQU 12 +GD_EjectAll EQU 13 +GD_Init_modem EQU 14 +GD_Release_port EQU 15 +GD_Win_size EQU 16 + +Y1 = 70 +Y2 = Y1+11 + +ABBSAppWindow_CNT EQU 17 +Scr: + DC.L 0 +VisualInfo: + DC.L 0 +PubScreenName: + DC.L 0 +ABBSAppWindowWnd: + DC.L 0 +ABBSAppWindowGList: + DC.L 0 +ABBSAppWindowMenus: + DC.L 0 +MTags0: + DC.L GTMN_FrontPen,1,TAG_DONE +MTags1: + DC.L TAG_DONE +ABBSAppWindowGadgets: + DCB.L 17,0 +BufNewGad: + DC.W 0,0,0,0 + DC.L 0,0 + DC.W 0 + DC.L 0,0,0 +BufIText: + DC.B 0,0,0,0 + DC.W 0,0 + DC.L 0,0,0 +TD: + DC.L TAG_DONE +NR: + DC.L GT_VisualInfo,$00000000,TAG_DONE +IR: + DC.L GT_VisualInfo,$00000000,GTBB_Recessed,1,TAG_DONE +ABBSAppWindowLeft: + DC.W 0 +ABBSAppWindowTop: + DC.W 11 +ABBSAppWindowWidth: + DC.W 630 +ABBSAppWindowHeight: + DC.W Y1+26 +Font: + DC.L 0 +FontX: + DC.W 0 +FontY: + DC.W 0 +OffX: + DC.W 0 +OffY: + DC.W 0 +Attr: + DC.L 0 + DC.W 0 + DC.B 0,0 +TopazName: + DC.B 'topaz.font',0 + CNOP 0,2 + +ABBSAppWindowGTypes: + DC.W LISTVIEW_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W BUTTON_KIND + DC.W CYCLE_KIND + +ABBSAppWindowNGads: + DC.W 4,13,623,Y1-12 + DC.L ListViewGadgetText,0 + DC.W GD_ListViewGadget + DC.L 0,0,0 + DC.W 9,Y1,44,11 + DC.L ShowGadgetText,0 + DC.W GD_ShowGadget + DC.L PLACETEXT_IN,0,0 + DC.W 9,Y2,44,11 + DC.L HideGadgetText,0 + DC.W GD_HideGadget + DC.L PLACETEXT_IN,0,0 + DC.W 55,Y1,44,11 + DC.L ChatGadgetText,0 + DC.W GD_ChatGadget + DC.L PLACETEXT_IN,0,0 + DC.W 101,Y2,84,11 + DC.L OffHookText,0 + DC.W GD_OffHook + DC.L PLACETEXT_IN,0,0 + DC.W 277,Y1,88,11 + DC.L EjectGadgetText,0 + DC.W GD_EjectGadget + DC.L PLACETEXT_IN,0,0 + DC.W 55,Y2,44,11 + DC.L killgadgetText,0 + DC.W GD_killgadget + DC.L PLACETEXT_IN,0,0 + DC.W 101,Y1,84,11 + DC.L TmpSysopGadgetText,0 + DC.W GD_TmpSysopGadget + DC.L PLACETEXT_IN,0,0 + DC.W 187,Y1,88,11 + DC.L ShowuserGadgetText,0 + DC.W GD_ShowuserGadget + DC.L PLACETEXT_IN,0,0 + DC.W 492,Y1,76,11 + DC.L shutdownGadgetText,0 + DC.W GD_shutdownGadget + DC.L PLACETEXT_IN,0,0 + DC.W 187,Y2,88,11 + DC.L foo2Text,0 + DC.W GD_foo2 + DC.L PLACETEXT_IN,0,0 + DC.W 570,Y2,50,11 + DC.L CloseABBSGadgetText,0 + DC.W GD_CloseABBSGadget + DC.L PLACETEXT_IN,0,0 + DC.W 492,Y2,76,11 + DC.L Reopen_nodeText,0 + DC.W GD_Reopen_node + DC.L PLACETEXT_IN,0,0 + DC.W 277,Y2,88,11 + DC.L EjectAllText,0 + DC.W GD_EjectAll + DC.L PLACETEXT_IN,0,0 + DC.W 367,Y1,123,11 + DC.L Init_modemText,0 + DC.W GD_Init_modem + DC.L PLACETEXT_IN,0,0 + DC.W 367,Y2,123,11 + DC.L Release_portText,0 + DC.W GD_Release_port + DC.L PLACETEXT_IN,0,0 + DC.W 563,1,63,11 + DC.L Win_sizeText,0 + DC.W GD_Win_size + DC.L 0,0,0 + +ABBSAppWindowGTags: + DC.L GTLV_ShowSelected,0 + DC.l GTLV_Labels,nodelist + DC.L LAYOUTA_Spacing,2 + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L GA_Disabled,1 + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L GA_Disabled,1 + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L GA_Disabled,1 + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GA_Disabled,1 + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GT_Underscore,'_' + DC.L TAG_DONE + DC.L GTCY_Labels,Win_sizeLabels + DC.L GTCY_Active,1 + DC.L GT_Underscore,'_' + DC.L TAG_DONE + + +ListViewGadgetText: + DC.B '',0 + +ShowGadgetText: + DC.B '_Show',0 + +HideGadgetText: + DC.B '_Hide',0 + +ChatGadgetText: + DC.B 'Chat',0 + +OffHookText: + DC.B '_Off Hook',0 + +EjectGadgetText: + DC.B '_Eject user',0 + +killgadgetText: + DC.B 'Kill',0 + +TmpSysopGadgetText: + DC.B 'TmpSysop',0 + +ShowuserGadgetText: + DC.B 'Sh_ow user',0 + +shutdownGadgetText: + DC.B 'Sh_utDown',0 + +foo2Text: + DC.B 'Edit User',0 + +CloseABBSGadgetText: + DC.B '_Quit',0 + +Reopen_nodeText: + DC.B '_ReOpen',0 + +EjectAllText: + DC.B 'Eject _ALL',0 + +Init_modemText: + DC.B '_Init Modem',0 + +Release_portText: + DC.B 'Re_lease Serial',0 + +Win_sizeText: + DC.B '',0 + + CNOP 0,2 + +Win_sizeLabels: + DC.L Win_sizeLab0 + DC.L Win_sizeLab1 + DC.L 0 + +Win_sizeLab0: DC.B 'Hide',0 +Win_sizeLab1: DC.B 'Show',0 + + CNOP 0,2 + + IFND WFLG_NEWLOOKMENUS +WFLG_NEWLOOKMENUS EQU $00200000 ; window has NewLook menus + ENDC + +ABBSAppWindowWindowTags: +ABBSAppWindowL: + DC.L WA_Left,0 +ABBSAppWindowT: + DC.L WA_Top,0 +ABBSAppWindowW: + DC.L WA_Width,0 +ABBSAppWindowH: + DC.L WA_Height,0 + DC.L WA_IDCMP,LISTVIEWIDCMP!BUTTONIDCMP!CYCLEIDCMP!IDCMP_MENUPICK!IDCMP_CLOSEWINDOW!IDCMP_REFRESHWINDOW|IDCMP_SIZEVERIFY|IDCMP_VANILLAKEY|IDCMP_NEWSIZE + DC.L WA_Flags,WFLG_DRAGBAR!WFLG_DEPTHGADGET!WFLG_CLOSEGADGET!WFLG_SMART_REFRESH|WFLG_NEWLOOKMENUS +ABBSAppWindowWG: + DC.L WA_Gadgets,0 + DC.L WA_Title,ABBSAppWindowWTitle + DC.L WA_ScreenTitle,ABBSAppWindowSTitle +ABBSAppWindowSC: + DC.L WA_PubScreen,0 + DC.L TAG_DONE + +ABBSAppWindowWTitle: + DC.B 'ABBS II - Copyright © 1997-2000 Jan Erik Olausen',0 + CNOP 0,2 + +ABBSAppWindowSTitle: + DC.B 'ABBS II - Copyright © 1997-2000 Jan Erik Olausen',0 + CNOP 0,2 + +ABBSAppWindowText0: + DC.B 1,0 + DC.B RP_JAM1 + DC.B 0 + DC.W 22,7 + DC.L 0 + DC.L ABBSAppWindowIText0 + DC.L 0 + +ABBSAppWindowText1: + DC.B 1,0 + DC.B RP_JAM1 + DC.B 0 + DC.W 65,7 + DC.L 0 + DC.L ABBSAppWindowIText1 + DC.L 0 + +ABBSAppWindowText2: + DC.B 1,0 + DC.B RP_JAM1 + DC.B 0 + DC.W 127,7 + DC.L 0 + DC.L ABBSAppWindowIText2 + DC.L 0 + +ABBSAppWindowText3: + DC.B 1,0 + DC.B RP_JAM1 + DC.B 0 + DC.W 319,7 + DC.L 0 + DC.L ABBSAppWindowIText3 + DC.L 0 + +ABBSAppWindow_TNUM EQU 4 + +ABBSAppWindowIText0: + DC.B 'Node',0 + +ABBSAppWindowIText1: + DC.B 'Speed',0 + +ABBSAppWindowIText2: + DC.B 'Status',0 + +ABBSAppWindowIText3: + DC.B 'Caller',0 + + CNOP 0,2 + +ABBSAppWindowNewMenu0: + DC.B NM_TITLE,0 + DC.L ABBSAppWindowMName0 + DC.L 0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu1: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName1 + DC.L ABBSAppWindowMComm1 + DC.W NM_ITEMDISABLED + DC.L 0,0 + +ABBSAppWindowNewMenu2: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu3: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName3 + DC.L ABBSAppWindowMComm3 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu4: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu5: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName5 + DC.L ABBSAppWindowMComm5 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu6: + DC.B NM_TITLE,0 + DC.L ABBSAppWindowMName6 + DC.L 0 + DC.W NM_MENUDISABLED!CHECKIT + DC.L 0,0 + +ABBSAppWindowNewMenu7: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName7 + DC.L ABBSAppWindowMComm7 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu8: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName8 + DC.L ABBSAppWindowMComm8 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu9: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu10: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName10 + DC.L ABBSAppWindowMComm10 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu11: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu12: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName12 + DC.L ABBSAppWindowMComm12 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu13: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName13 + DC.L ABBSAppWindowMComm13 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu14: + DC.B NM_TITLE,0 + DC.L ABBSAppWindowMName14 + DC.L 0 + DC.W NM_MENUDISABLED!CHECKIT + DC.L 0,0 + +ABBSAppWindowNewMenu15: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName15 + DC.L 0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu16: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName16 + DC.L 0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu17: + DC.B NM_ITEM,0 + DC.L NM_BARLABEL,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu18: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName18 + DC.L 0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowNewMenu19: + DC.B NM_ITEM,0 + DC.L ABBSAppWindowMName19 + DC.L 0 + DC.W 0 + DC.L 0,0 + + DC.B NM_END,0 + DC.L 0,0 + DC.W 0 + DC.L 0,0 + +ABBSAppWindowMName0: + DC.B 'Project',0 + +ABBSAppWindowMName1: + DC.B 'About',0 + +ABBSAppWindowMComm1: + DC.B 'A',0 + +ABBSAppWindowMName3: + DC.B 'Iconify',0 + +ABBSAppWindowMComm3: + DC.B 'I',0 + +ABBSAppWindowMName5: + DC.B 'ShutDown',0 + +ABBSAppWindowMComm5: + DC.B 'Q',0 + +ABBSAppWindowMName6: + DC.B 'Misc',0 + +ABBSAppWindowMName7: + DC.B 'Eject User',0 + +ABBSAppWindowMComm7: + DC.B 'E',0 + +ABBSAppWindowMName8: + DC.B 'Kill User',0 + +ABBSAppWindowMComm8: + DC.B 'K',0 + +ABBSAppWindowMName10: + DC.B 'Chat',0 + +ABBSAppWindowMComm10: + DC.B 'C',0 + +ABBSAppWindowMName12: + DC.B 'Tmp Sysop',0 + +ABBSAppWindowMComm12: + DC.B 'T',0 + +ABBSAppWindowMName13: + DC.B 'Modify User',0 + +ABBSAppWindowMComm13: + DC.B 'M',0 + +ABBSAppWindowMName14: + DC.B 'Time',0 + +ABBSAppWindowMName15: + DC.B 'Add 5min',0 + +ABBSAppWindowMName16: + DC.B 'Sub 5min',0 + +ABBSAppWindowMName18: + DC.B 'Add 5min FT',0 + +ABBSAppWindowMName19: + DC.B 'Sub 5min FT',0 + + CNOP 0,2 + +ComputeX: + move.l d1,-(sp) + move.w FontX,d1 + bra.s ComputeItX +ComputeY: + move.l d1,-(sp) + move.w FontY,d1 + mulu d1,d0 + addq.w #4,d0 + divu #8,d0 + move.l (sp)+,d1 + rts + +ComputeItX: + mulu d1,d0 + addq.w #4,d0 + divu #8,d0 + move.l (sp)+,d1 + rts + +ComputeFont: + lea.l Attr,a0 + move.l a0,Font + move.l Scr,a1 + lea.l sc_RastPort(a1),a1 + move.l rp_Font(a1),a1 + move.l LN_NAME(a1),ta_Name(a0) + move.w tf_YSize(a1),ta_YSize(a0) + move.w tf_XSize(a1),FontX + move.w tf_YSize(a1),FontY + move.l Scr,a0 + move.b sc_WBorLeft(a0),d0 + ext.w d0 + move.w d0,OffX + move.l sc_Font(a0),a1 + move.w ta_YSize(a1),d0 + addq.w #1,d0 + move.b sc_WBorTop(a0),d1 + ext.w d1 + add.w d1,d0 + move.w d0,OffY + tst.w d2 + beq.s CompDone + tst.w d3 + beq.s CompDone + move.w d2,d0 + jsr ComputeX + add.w OffX,d0 + move.b sc_WBorRight(a0),d1 + ext.w d1 + add.w d1,d0 + cmp.w sc_Width(a0),d0 + bhi.s UseTopaz + move.w d3,d0 + jsr ComputeY + add.w OffY,d0 + move.b sc_WBorBottom(a0),d1 + ext.w d1 + add.w d1,d0 + cmp.w sc_Height(a0),d0 + bhi.s UseTopaz +CompDone: + rts +UseTopaz: + move.l Font,a0 + move.l #TopazName,ta_Name(a0) + move.w #8,FontY + move.w #8,FontX + move.w #8,ta_YSize(a0) + rts + +SetupScreen + movem.l d1-d3/a0-a2/a6,-(sp) + move.l _IntuitionBase,a6 + move.l PubScreenName,a0 + jsr _LVOLockPubScreen(a6) + move.l d0,Scr + tst.l d0 + beq SError + moveq #0,d2 + moveq #0,d3 + jsr ComputeFont + move.l Scr,a0 + move.l _GadToolsBase,a6 + lea.l TD,a1 + jsr _LVOGetVisualInfoA(a6) + move.l d0,VisualInfo + tst.l d0 + beq VError + moveq #0,d0 +SDone: + movem.l (sp)+,d1-d3/a0-a2/a6 + rts +SError: + moveq #1,d0 + bra.s SDone +VError: + moveq #2,d0 + bra.s SDone + +CloseDownScreen: + movem.l d0-d1/a0-a1/a6,-(sp) + move.l _GadToolsBase,a6 + move.l VisualInfo,a0 + cmpa.l #0,a0 + beq.s NoVis + jsr _LVOFreeVisualInfo(a6) + move.l #0,VisualInfo +NoVis: + move.l _IntuitionBase,a6 + suba.l a0,a0 + move.l Scr,a1 + cmpa.l #0,a1 + beq.s NoScr + jsr _LVOUnlockPubScreen(a6) + move.l #0,Scr +NoScr: + movem.l (sp)+,d0-d1/a0-a1/a6 + rts + +ABBSAppWindowRender: + movem.l d0-d5/a0-a2/a6,-(sp) + move.l ABBSAppWindowWnd,a0 + move.w ABBSAppWindowWidth,d2 + move.l ABBSAppWindowHeight,d3 + jsr ComputeFont + move.l VisualInfo,NR+4 + move.l VisualInfo,IR+4 + move.l _GadToolsBase,a6 + move.l ABBSAppWindowWnd,a0 + move.l wd_RPort(a0),a2 + move.l a2,a0 + lea.l IR,a1 + move.l #1,d0 + jsr ComputeY + add.w OffY,d0 + move.l d0,d1 + move.l #37,d0 + jsr ComputeX + move.l d0,d2 + move.l #11,d0 + jsr ComputeY + move.l d0,d3 + move.l #3,d0 + jsr ComputeX + add.w OffX,d0 + jsr _LVODrawBevelBoxA(a6) + move.l a2,a0 + lea.l IR,a1 + move.l #1,d0 + jsr ComputeY + add.w OffY,d0 + move.l d0,d1 + move.l #48,d0 + jsr ComputeX + move.l d0,d2 + move.l #11,d0 + jsr ComputeY + move.l d0,d3 + move.l #42,d0 + jsr ComputeX + add.w OffX,d0 + jsr _LVODrawBevelBoxA(a6) + move.l a2,a0 + lea.l IR,a1 + move.l #1,d0 + jsr ComputeY + add.w OffY,d0 + move.l d0,d1 + move.l #198,d0 + jsr ComputeX + move.l d0,d2 + move.l #11,d0 + jsr ComputeY + move.l d0,d3 + move.l #92,d0 + jsr ComputeX + add.w OffX,d0 + jsr _LVODrawBevelBoxA(a6) + move.l a2,a0 + lea.l IR,a1 + move.l #1,d0 + jsr ComputeY + add.w OffY,d0 + move.l d0,d1 + move.l #269,d0 + jsr ComputeX + move.l d0,d2 + move.l #11,d0 + jsr ComputeY + move.l d0,d3 + move.l #292,d0 + jsr ComputeX + add.w OffX,d0 + jsr _LVODrawBevelBoxA(a6) ; Caller + move.l a2,a0 + lea.l IR,a1 + move.l #Y1-2,d0 + jsr ComputeY + add.w OffY,d0 + move.l d0,d1 + move.l #622,d0 + jsr ComputeX + move.l d0,d2 + move.l #26,d0 + jsr ComputeY + move.l d0,d3 + move.l #4,d0 + jsr ComputeX + add.w OffX,d0 + jsr _LVODrawBevelBoxA(a6) ; Gadgets + moveq #0,d3 + lea.l ABBSAppWindowText0,a2 +ABBSAppWindowTLoop: + move.l _SysBase,a6 + lea.l BufIText,a1 + move.l a2,a0 + move.l d3,d0 + mulu #it_SIZEOF,d0 + add.l d0,a0 + moveq #it_SIZEOF,d0 + jsr _LVOCopyMem(a6) + lea.l BufIText,a0 + move.l _IntuitionBase,a6 + move.l Font,it_ITextFont(a0) + jsr _LVOIntuiTextLength(a6) + asr.l #1,d0 + move.l d0,-(sp) + lea.l BufIText,a0 + move.w it_LeftEdge(a0),d0 + jsr ComputeX + add.w OffX,d0 + ext.l d0 + sub.l (sp)+,d0 + move.w d0,it_LeftEdge(a0) + move.w it_TopEdge(a0),d0 + jsr ComputeY + add.w OffY,d0 + move.l Font,a1 + move.w ta_YSize(a1),d1 + asr.w #1,d1 + sub.w d1,d0 + move.w d0,it_TopEdge(a0) + move.l a0,a1 + move.l ABBSAppWindowWnd,a0 + move.l wd_RPort(a0),a0 + moveq #0,d0 + moveq #0,d1 + jsr _LVOPrintIText(a6) + addq.l #1,d3 + cmp.l #ABBSAppWindow_TNUM,d3 + bmi ABBSAppWindowTLoop + movem.l (sp)+,d0-d5/a0-a2/a6 + rts + +OpenABBSAppWindowWindow: + movem.l d1-d4/a0-a4/a6,-(sp) + move.l Scr,a0 + moveq #0,d3 + moveq #0,d2 + move.w ABBSAppWindowWidth,d2 + move.w ABBSAppWindowHeight,d3 + jsr ComputeFont + move.l Scr,a0 + move.l d2,d0 + jsr ComputeX + move.l d0,d4 + move.w ABBSAppWindowLeft,d2 + add.w d2,d0 + add.w OffX,d0 + move.b sc_WBorRight(a0),d1 + ext.w d1 + add.w d1,d0 + cmp.w sc_Width(a0),d0 + bls.s ABBSAppWindowWOk + move.w sc_Width(a0),d0 + sub.w d4,d0 + move.w d0,d2 +ABBSAppWindowWOk: + move.l d3,d0 + jsr ComputeY + move.l d0,d4 + move.w ABBSAppWindowTop,d3 + add.w d3,d0 + add.w OffY,d0 + move.b sc_WBorBottom(a0),d1 + ext.w d1 + add.w d1,d0 + cmp.w sc_Height(a0),d0 + bls.s ABBSAppWindowHOk + move.w sc_Height(a0),d0 + sub.w d4,d0 + move.w d0,d3 +ABBSAppWindowHOk: + move.l _GadToolsBase,a6 + lea.l ABBSAppWindowGList,a0 + jsr _LVOCreateContext(a6) + move.l d0,a3 + tst.l d0 + beq ABBSAppWindowCError + movem.w d2-d3,-(sp) + moveq #0,d3 + lea.l ABBSAppWindowGTags,a4 +ABBSAppWindowGL: + move.l _SysBase,a6 + lea.l ABBSAppWindowNGads,a0 + move.l d3,d0 + mulu #gng_SIZEOF,d0 + add.l d0,a0 + lea.l BufNewGad,a1 + moveq #gng_SIZEOF,d0 + jsr _LVOCopyMem(a6) + lea.l BufNewGad,a0 + move.l VisualInfo,gng_VisualInfo(a0) + move.l Font,gng_TextAttr(a0) + move.w gng_LeftEdge(a0),d0 + jsr ComputeX + add.w OffX,d0 + move.w d0,gng_LeftEdge(a0) + move.w gng_TopEdge(a0),d0 + jsr ComputeY + add.w OffY,d0 + move.w d0,gng_TopEdge(a0) + move.w gng_Width(a0),d0 + jsr ComputeX + move.w d0,gng_Width(a0) + move.w gng_Height(a0),d0 + jsr ComputeY + move.w d0,gng_Height(a0) + move.l _GadToolsBase,a6 + lea.l ABBSAppWindowGTypes,a0 + moveq #0,d0 + move.l d3,d1 + asl.l #1,d1 + add.l d1,a0 + move.w (a0),d0 + move.l a3,a0 + lea.l BufNewGad,a1 + move.l a4,a2 + jsr _LVOCreateGadgetA(a6) + tst.l d0 + bne.s ABBSAppWindowCOK + movem.w (sp)+,d2-d3 + bra ABBSAppWindowGError +ABBSAppWindowCOK: + move.l d0,a3 + move.l d3,d0 + asl.l #2,d0 + lea.l ABBSAppWindowGadgets,a0 + add.l d0,a0 + move.l a3,(a0) +ABBSAppWindowTL: + tst.l (a4) + beq.s ABBSAppWindowDN + addq.w #8,a4 + bra.s ABBSAppWindowTL +ABBSAppWindowDN: + addq.w #4,a4 + addq.w #1,d3 + cmp.w #ABBSAppWindow_CNT,d3 + bmi ABBSAppWindowGL + movem.w (sp)+,d2-d3 + move.l ABBSAppWindowGList,ABBSAppWindowWG+4 + move.l _GadToolsBase,a6 + lea.l ABBSAppWindowNewMenu0,a0 + lea.l MTags0,a1 + jsr _LVOCreateMenusA(a6) + move.l d0,ABBSAppWindowMenus + tst.l d0 + beq ABBSAppWindowMError + move.l d0,a0 + move.l VisualInfo,a1 + lea.l MTags1,a2 + jsr _LVOLayoutMenusA(a6) + move.l Scr,ABBSAppWindowSC+4 + ext.l d2 + ext.l d3 + move.l d2,ABBSAppWindowL+4 + move.l d3,ABBSAppWindowT+4 + move.l Scr,a0 + move.w ABBSAppWindowWidth,d0 + jsr ComputeX + add.w OffX,d0 + move.b sc_WBorRight(a0),d1 + ext.w d1 + add.w d1,d0 + move.l d0,ABBSAppWindowW+4 + move.w ABBSAppWindowHeight,d0 + jsr ComputeY + add.w OffY,d0 + move.b sc_WBorBottom(a0),d1 + ext.w d1 + add.w d1,d0 + move.l d0,ABBSAppWindowH+4 + move.l _IntuitionBase,a6 + suba.l a0,a0 + lea.l ABBSAppWindowWindowTags,a1 + jsr _LVOOpenWindowTagList(a6) + move.l d0,ABBSAppWindowWnd + tst.l d0 + beq ABBSAppWindowWError + move.l ABBSAppWindowWnd,a0 + move.l ABBSAppWindowMenus,a1 + jsr _LVOSetMenuStrip(a6) + move.l _GadToolsBase,a6 + move.l ABBSAppWindowWnd,a0 + suba.l a1,a1 + jsr _LVOGT_RefreshWindow(a6) + jsr ABBSAppWindowRender + moveq #0,d0 +ABBSAppWindowDone: + movem.l (sp)+,d1-d4/a0-a4/a6 + rts +ABBSAppWindowCError: + moveq #1,d0 + bra.s ABBSAppWindowDone +ABBSAppWindowGError: + moveq #2,d0 + bra.s ABBSAppWindowDone +ABBSAppWindowMError: + moveq #3,d0 + bra.s ABBSAppWindowDone +ABBSAppWindowWError: + moveq #4,d0 + bra.s ABBSAppWindowDone + +CloseABBSAppWindowWindow: + movem.l d0-d1/a0-a2/a6,-(sp) + move.l _IntuitionBase,a6 + move.l ABBSAppWindowMenus,a0 + cmpa.l #0,a0 + beq ABBSAppWindowNMenu + move.l ABBSAppWindowWnd,a0 + jsr _LVOClearMenuStrip(a6) + move.l _GadToolsBase,a6 + move.l ABBSAppWindowMenus,a0 + jsr _LVOFreeMenus(a6) + move.l #0,ABBSAppWindowMenus +ABBSAppWindowNMenu: + move.l _IntuitionBase,a6 + move.l ABBSAppWindowWnd,a0 + cmpa.l #0,a0 + beq ABBSAppWindowNWnd + jsr _LVOCloseWindow(a6) + move.l #0,ABBSAppWindowWnd +ABBSAppWindowNWnd: + move.l _GadToolsBase,a6 + move.l ABBSAppWindowGList,a0 + cmpa.l #0,a0 + beq ABBSAppWindowNGad + jsr _LVOFreeGadgets(a6) + move.l #0,ABBSAppWindowGList +ABBSAppWindowNGad: + movem.l (sp)+,d0-d1/a0-a2/a6 + rts + + end diff --git a/Browse.asm b/Browse.asm new file mode 100644 index 0000000..2f2453a --- /dev/null +++ b/Browse.asm @@ -0,0 +1,1425 @@ +***************************************************************** +* Browse rutiner * +***************************************************************** + +;browsedebug = 1 + + ***************************************************************** + * + * NAME + * Browse.asm + * + * DESCRIPTION + * Browse rutiner + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: Browse.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: Browse.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + include 'first.i' + +; IFND __M68 + include 'exec/types.i' + include 'intuition/intuition.i' +; ENDC + include 'asm.i' + include 'bbs.i' + include 'fse.i' + include 'node.i' + include 'msg.pro' + + XDEF setupbrowse + XDEF setuptmpbrowse + XDEF cleanuptmpbrowse + XDEF addtmpbrowse + XDEF dobrowseselect + XDEF sendbrowsefiles + XDEF setbrowsenodestatus + XDEF clearbrowsenodestatus + + XREF dofileinfoline1 + XREF writetext + XREF writetexto + XREF writetexti + XREF writetextlen + XREF writetextrfill + XREF writechari + XREF readchar + XREF breakoutimage + XREF upchar + XREF skrivnr + XREF skrivnrw + XREF konverter + XREF konverterw + XREF memcopylen + XREF dotypeinfofile + XREF doviewarchive + XREF writeerroro + XREF justchecksysopaccess + XREF downloadfile1 + XREF addfilesub1 + XREF changenodestatus + XREF deletefilefromabbs + XREF buildfilepath + XREF getyorn + XREF readlinepromptwhelp + XREF findnameicase + XREF movefileinabbs + XREF strcopy + XREF readlinepromptwhelpflush + XREF upword + XREF strlen + XREF getdirnamesub + + XREF nodehook + + XREF errsavefilhtext + XREF dirnotfoundtext + XREF filelistfilname + XREF filetablfultext + XREF fileihnorettext + XREF ansilbluetext + XREF ansiclearscreen + XREF errloadfilhtext + XREF exebase + XREF dosbase + XREF ansiredtext + XREF ansiwhitetext + +LINELENGTH equ 96 +BROWSETOP equ 4 +MAXLINES equ 60 + + STRUCTURE browseblock,0 + UWORD b_Y ; current line in message + UWORD b_P ; line number of first line on screen + UWORD NumFiles + UWORD Numtagged + ULONG TotTaggedKb + UWORD TotNumtagged + ULONG TaggedKb + UWORD b_dirnr + UBYTE b_updatetop + UBYTE b_Mode + UWORD b_lines + STRUCT b_Update,MAXLINES + LABEL browseblock_SIZEOF + + STRUCTURE storedfiles,0 + UWORD s_dirnum + ULONG s_filenum + LABEL storedfiles_SIZEOF + + STRUCTURE confinfo,0 + STRUCT c_confname,Sizeof_NameT + UBYTE c_Selected + LABEL confinfo_SIZEOF + + +buffersize equ 480000 ; 5000 linjer... + +; d0 = mode (0 = file, 1 = conferences) +setupbrowse + move.l (Tmpusermem,NodeBase),a0 + move.w #-1,(a0) + lea (xpriomem,NodeBase),a0 ; browsestruktur + move.b d0,(b_Mode,a0) ; husker mode + moveq.l #0,d0 + move.w d0,(TotNumtagged,a0) ; sletter totalt filestats + move.l d0,(TotTaggedKb,a0) + clrz + rts + +setbrowsenodestatus + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 9$ + moveq.l #72,d0 + jsr (changenodestatus) +9$ rts + +clearbrowsenodestatus + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 9$ + moveq.l #4,d0 + jsr (changenodestatus) +9$ rts + +setuptmpbrowse + move.l #buffersize,d0 + moveq.l #0,d1 + jsrlib AllocMem + move.l d0,(tmpstore,NodeBase) + beq.b 9$ + move.l d0,a0 + move.l #buffersize,d0 + subq.l #2,d0 ; plass til nummer + divu #LINELENGTH,d0 ; 98 = 93+1 for linje, og 4 for filnr + move.w d0,(a0) + lea (2,a0),a0 + move.l a0,(tmpval,NodeBase) + moveq.l #-1,d0 + move.l d0,(a0) +9$ rts + +cleanuptmpbrowse + move.l (tmpstore,NodeBase),d0 + beq.b 9$ + move.l d0,a1 + move.l #buffersize,d0 + jmplib FreeMem +9$ rts + +; a0 = tmpfileentry +; d0 = filenr +; ret: z = 1, array full +addtmpbrowse + move.l a0,a1 ; husker fileinfo + move.l (tmpstore,NodeBase),a0 + move.w (a0),d1 + bne.b 1$ + lea (filetablfultext),a0 + jsr (writetexto) + setz + bra.b 9$ ; fullt +1$ subq.w #1,d1 + move.w d1,(a0) + move.l a1,d1 ; flytter fileinfo + move.l (tmpval,NodeBase),a1 + move.l d0,(a1)+ ; lagrer filummer + lea (LINELENGTH-4,a1),a0 ; finner addressen til neste (94+4) + move.l a0,(tmpval,NodeBase) + moveq.l #-1,d0 + move.l d0,(a0) ; legger ut en markering for siste (skrives over hvis ikke) + move.l d1,a0 ; endelig er fileinfo riktig!! (tada! :-) + moveq.l #Fileentry_SIZEOF,d0 + jsr (memcopylen) + clrz +9$ rts + +sendbrowsefiles + push d2/a2/a3/d7 + jsr (nodehook) + link.w a2,#-160 + move.l a2,d7 + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq 9$ + moveq.l #0,d2 ; ikke add + move.l (Tmpusermem,NodeBase),a0 + move.w (s_dirnum,a0),d1 ; henter fildir*1 + cmp.w #-1,d1 + beq.b 9$ ; vi har ikke valgt noe... ut. +0$ lea (browsedoprompt),a0 + suba.l a1,a1 + lea (browsedoprompth),a2 + jsr (readlinepromptwhelpflush) + beq.b 2$ ; bare return, eller no carrier + bsr upword + move.b (a0),d0 + cmp.b #'D',d0 + beq.b 2$ + cmp.b #'X',d0 + beq.b 9$ + cmp.b #'A',d0 + beq.b 3$ + lea (unknwoncomtext),a0 + jsr writeerroro + bra.b 0$ + +3$ moveq.l #1,d2 ; Vi skal ha add +2$ move.l (Tmpusermem,NodeBase),a2 + lea (tmpfileentry,NodeBase),a3 +1$ move.w (s_dirnum,a2),d1 ; henter fildir*1 + cmp.w #-1,d1 + beq.b 9$ + move.l (s_filenum,a2),d0 ; henter filnr + tst.l d2 ; skal vi ta add ? + beq.b 4$ ; nope + jsr (addfilesub1) + bra.b 5$ +4$ bsr downloadfile1 +5$ move.b (readcharstatus,NodeBase),d0 + bne.b 9$ + lea (storedfiles_SIZEOF,a2),a2 + bra.b 1$ + + jsr writeerroro +9$ move.l d7,a2 + unlk a2 + pop d2/a2/a3/d7 + rts + + XREF _Handle_Preview + +; d0 = dirnr +dobrowseselect + push d2/a3 + IFD browsedebug + bsr opendebug + ENDC + bset #DIVB_InBrowse,(Divmodes,NodeBase) + lea (xpriomem,NodeBase),a3 ; browsestruktur + move.w d0,(b_dirnr,a3) ; husker dirnr + move.w #1,(b_Y,a3) + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + moveq.l #0,d0 + move.w d0,(Numtagged,a3) + move.l d0,(TaggedKb,a3) + move.b d0,(readlinemore,NodeBase) ; flush'er input + move.w d0,(NumFiles,a3) + + move.w #14,d0 ; minimums høyde, var 20 + move.w (PageLength+CU,NodeBase),d1 + sub.w #4,d1 ; for liten skjerm. Bruker min. + bcs.b 6$ + cmp.w d0,d1 ; for liten skjerm. Bruker min. + bls.b 6$ + move.w d1,d0 + cmpi.w #MAXLINES,d0 ; For mange linjer ? + bls.b 6$ ; nope + move.w #MAXLINES,d0 ; jepp, bruker max +6$ move.w d0,(b_lines,a3) + + moveq.l #1,d2 + move.l (tmpstore,NodeBase),a0 + lea (2,a0),a0 + moveq.l #-1,d1 + move.l (a0),d0 + cmp.l d0,d1 + beq 9$ ; ingen filer funnet + + moveq.l #0,d2 + moveq.l #0,d0 +0$ addq.l #1,d0 + lea (LINELENGTH,a0),a0 + cmp.l (a0),d1 + bne.b 0$ + move.w d0,(NumFiles,a3) + bsr drawheader + bsr redrawscreen + +1$ move.b (readcharstatus,NodeBase),d1 ; noe spess ? + bne 9$ ; ja, kast'n ut + IFD browsedebug + bsr writedebuginfo + ENDC + bsr updatescreenmaybe + bsr readchar + bmi 2$ ; spesial taster + move.b (readcharstatus,NodeBase),d1 ; noe spess ? + bne 9$ ; ja, kast'n ut + + jsr (upchar) + cmp.b #'P',d0 ; JEO Preview? + bne.b 100$ + bsr handlepreview + bra.b 1$ + +100$ cmp.b #'N',d0 ; next dir ? + bne.b 5$ + moveq.l #1,d2 + bra 9$ + +5$ cmp.b #'Q',d0 ; exit ? + beq 9$ + + cmp.b #' ',d0 ; space ? + bne.b 3$ + bsr handlespace + bra 215$ ; går en ned også.. Hvis ikke til 1$ + +3$ cmp.b #'V',d0 ; View ? + bne.b 4$ + bsr handleview + beq 99$ + bra.b 1$ + +4$ cmp.b #'I',d0 ; Info ? + bne.b 7$ + bsr handleinfo + beq 99$ + bra.b 1$ + +7$ cmp.b #'U',d0 ; Untag all ? + bne.b 8$ + bsr handleuntag + bra.b 1$ + +8$ cmp.b #'M',d0 ; Move ? + bne.b 10$ + bsr handlemove + beq 99$ + bra 1$ + +10$ cmp.b #'Z',d0 ; Zap ? + bne 11$ + moveq.l #0,d0 ; vi er ikke CZap + bsr handlezap + bne 1$ + moveq.l #1,d2 ; vi skal videre hvis vi kan + bra 99$ + +11$ cmp.b #'C',d0 ; CZap ? + bne 12$ + moveq.l #1,d0 ; vi er CZap + bsr handlezap + bne 1$ + moveq.l #1,d2 ; vi skal videre hvis vi kan + bra 99$ + +12$ cmp.b #'T',d0 ; Touch ? + bne.b 13$ + bsr handletouch + beq 99$ + bra 1$ + +13$ cmp.b #'*',d0 ; Comment ? JEO + bne 1$ + bsr handlecomment + beq 99$ + bra 1$ + +2$ cmpi.w #20,d0 ; er det funksjonstaster ? + bcs 1$ ; ja, vil ikke ha dem. + bhi.b 21$ ; 20 = opp + move.w (b_Y,a3),d0 + subq.w #1,d0 + bne.b 201$ + move.w #1,d0 +201$ move.w d0,(b_Y,a3) +; add.w #3,d0 +; bsr gotoline + bra 1$ + +21$ cmpi.w #21,d0 ; 21 = ned + bne 1$ +215$ move.w (b_Y,a3),d0 + addq.w #1,d0 + move.w (NumFiles,a3),d1 + cmp.w (b_lines,a3),d1 ; har vi færre filer en en skjermside ? + bcc.b 214$ + cmp.w d0,d1 ; ja. + bcs.b 213$ + bra.b 211$ +214$ addq.w #1,d1 ; nei. Gjør plass til + cmp.w d1,d0 ; numfiles,y + bcs.b 211$ +213$ subq.w #1,d0 +211$ move.w d0,(b_Y,a3) + bra 1$ + +9$ move.w #BROWSETOP+1,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.w (TotNumtagged,a3),d0 + add.w (Numtagged,a3),d0 + move.w d0,(TotNumtagged,a3) + move.l (TotTaggedKb,a3),d0 + add.l (TaggedKb,a3),d0 + move.l d0,(TotTaggedKb,a3) + bsr.b func + +99$ bclr #DIVB_InBrowse,(Divmodes,NodeBase) + tst.l d2 ; skal vi forstette ? + pop d2/a3 + rts + +func push d2/a2 + move.l (Tmpusermem,NodeBase),a1 + moveq.l #-1,d0 +2$ cmp.w (a1),d0 + beq.b 1$ + lea (storedfiles_SIZEOF,a1),a1 + bra.b 2$ + +1$ move.l (tmpstore,NodeBase),a0 + lea 2(a0),a0 ; Hopper over antallet vi har plass til + move.w (NumFiles,a3),d2 + beq.b 9$ ; ingen filer + move.w (b_dirnr,a3),d0 +4$ move.w (4+Filestatus,a0),d1 + btst #FILESTATUSB_Selected,d1 + beq.b 3$ + move.w d0,(s_dirnum,a1) + move.l (a0),(s_filenum,a1) + lea (storedfiles_SIZEOF,a1),a1 + move.l (Tmpusermem,NodeBase),d1 + add.l (UserrecordSize+CStr,MainBase),d1 + sub.l #storedfiles_SIZEOF+2,d1 + cmp.l a1,d1 + bcs.b 8$ +3$ lea (LINELENGTH,a0),a0 + subq.w #1,d2 + bne.b 4$ +8$ move.w #-1,(a1) +9$ + IFD browsedebug + bsr closedebug + ENDC + pop d2/a2 + rts + +handlezap + push d2 + move.l d0,d2 + jsr (justchecksysopaccess) + beq.b 9$ ; ikke lov, glemm komandoen + move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.b #0,(readlinemore,NodeBase) ; Flush'er eventuell input + lea (surezaptext),a0 + sub.l a1,a1 + moveq.l #0,d0 + jsr (getyorn) + beq.b 1$ + lea (zapfunc),a0 + move.l d2,d0 ; CZap status + bsr loopselectedfiles + move.w (NumFiles,a3),d0 + beq.b 99$ ; ingen filer igjen, ut. +1$ bsr redrawscreenfull + bsr mayfixY + setz +9$ notz +99$ pop d2 + rts + +zapfunc push a2/d3 + link.w a3,#-160 + move.l a0,a2 + move.l d1,d3 + bsr deletefilefromabbs + lea (sp),a1 + lea (Filename,a2),a0 + move.l d3,d0 + jsr (buildfilepath) + move.l (dosbase),a6 + move.l sp,d1 + jsrlib DeleteFile + tst.l d2 ; er vi CZap ? + beq.b 1$ ; nope + subq.w #1,(Uploaded+CU,NodeBase) ; Oppdaterer Uploaded telleren + bcc.b 2$ + move.w #0,(Uploaded+CU,NodeBase) ; ingen underflow.. +2$ move.l (Fsize,a2),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + sub.l d0,(KbUploaded+CU,NodeBase) + bcc.b 1$ + moveq.l #0,d0 + move.l d0,(KbUploaded+CU,NodeBase) ; ikke her heller +1$ move.l (exebase),a6 + setz + clrn + unlk a3 + pop a2/d3 + rts + +; a0 = func to call with the fileentry in a0, filepos in d0, dirnum in d1 +; d0 = data to the function (received in d2) +loopselectedfiles + push d5/a2/d3/d4/d2 + move.l a0,d4 + move.l d0,d2 ; stores data + moveq.l #0,d3 ; har ikke slettet noen fileentry's enda. + + move.l (tmpstore,NodeBase),a2 + lea 2(a2),a2 ; Hopper over antallet vi har plass til + move.w (NumFiles,a3),d5 + beq 9$ ; ingen filer, ferdig + +1$ move.w (4+Filestatus,a2),d1 ; looper igjennom alle filer + btst #FILESTATUSB_Selected,d1 + beq.b 2$ ; hopper over de som ikke er valgt + + move.w (b_dirnr,a3),d1 + move.l (a2),d0 + lea (4,a2),a0 + move.l d4,a1 + jsr (a1) ; kaller prosedyren + bmi.b 9$ + bne.b 2$ ; skal ikke slette info'n + + sub.w #1,(NumFiles,a3) + sub.w #1,(Numtagged,a3) + + move.l (4+Fsize,a2),d1 + beq.b 4$ + moveq.l #10,d0 + lsr.l d0,d1 +4$ sub.l d1,(TaggedKb,a3) + move.l a2,a1 ; fjerner den fra lista + lea (LINELENGTH,a2),a0 + move.l d5,d0 + mulu #LINELENGTH,d0 + jsr (memcopylen) + moveq.l #1,d3 + bra.b 3$ + +2$ lea (LINELENGTH,a2),a2 +3$ subq.w #1,d5 + bne.b 1$ + + tst.l d3 ; har vi slettet noen ? + beq.b 9$ + move.w #1,(b_Y,a3) +; bsr redrawscreenfull ; ja, da tar vi full redraw +9$ pop d5/a2/d4/d3/d2 + rts + +handlemove + push a2 + jsr (justchecksysopaccess) + notz + bne.b 9$ ; ikke lov, glemm komandoen + move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + lea (movetowhdirtext),a0 + lea (filelistfilname),a1 + suba.l a2,a2 ; ingen ekstra help + bsr readlinepromptwhelp + bne.b 2$ + move.w #-1,(linesleft,NodeBase) + setz + bra.b 9$ +2$ move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha more lenger.. + bsr getdirnamesub + bne.b 1$ + jsr readchar + beq.b 9$ + bra.b 8$ + +1$ lsr.w #1,d0 + and.l #$ffff,d0 ; fjerner høye bits.. + lea (movefunc),a0 + bsr loopselectedfiles + move.w (NumFiles,a3),d0 + beq.b 9$ ; ingen filer igjen, ut. + +8$ bsr redrawscreenfull + bsr mayfixY + clrz +9$ pop a2 + rts + +movefunc + push a2/d2/d3 + move.l a0,a2 + move.l d1,d3 + moveq.l #0,d1 ; not to set private to conf + exg d2,d3 ; swap to correct place + jsr (movefileinabbs) + bne.b 1$ + exg a2,a0 + lea (Filename,a0),a0 + bsr writetexto + move.l a2,a0 + bsr writeerroro + jsr readchar + bne.b 9$ + setn ; ut av loopen + bra.b 99$ +1$ setz ; fila skal slettes fra fillista +9$ clrn +99$ pop a2/d2/d3 + rts + +handletouch + jsr (justchecksysopaccess) + notz + bne.b 9$ ; ikke lov, glem komandoen + move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.b #0,(readlinemore,NodeBase) ; Flush'er eventuell input + lea (suretouchtext),a0 + sub.l a1,a1 + moveq.l #0,d0 + jsr (getyorn) + beq.b 1$ + lea (touchfunc),a0 + bsr loopselectedfiles +1$ bsr redrawscreenfull + bsr mayfixY + setz +9$ notz +99$ rts + +touchfunc + push a2/d2/d3 + move.l a0,a2 + move.l d0,d2 + move.l d1,d3 + move.l dosbase,a6 + lea (ULdate,a2),a0 ; opdaterer dato + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + andi.w #~(FILESTATUSF_Selected),(Filestatus,a2) + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l d2,(m_arg,a1) ; filpos. + move.l d3,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + ori.w #FILESTATUSF_Selected,(Filestatus,a2) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + beq.b 9$ + lea (Filename,a2),a0 + bsr writetexto + lea (errsavefilhtext),a0 + bsr writeerroro + jsr readchar + bne.b 9$ + setn ; ut av loopen + bra.b 99$ +9$ clrn +99$ clrz + pop a2/d2/d3 + rts + +handleuntag + move.l (tmpstore,NodeBase),a0 + lea (2,a0),a0 ; Hopper over antallet vi har plass til + move.w (NumFiles,a3),d0 + beq.b 9$ ; ingen filer + move.b (b_Mode,a3),d1 ; hvilken mode ? + bne.b 2$ ; ikke fileinfo + + +1$ move.w (4+Filestatus,a0),d1 + bclr #FILESTATUSB_Selected,d1 + move.w d1,(4+Filestatus,a0) + lea (LINELENGTH,a0),a0 + subq.w #1,d0 + bne.b 1$ + bra.b 3$ + +2$ bclr #0,(c_Selected+4,a0) + lea (LINELENGTH,a0),a0 + subq.w #1,d0 + bne.b 2$ + +3$ moveq.l #0,d0 + move.w d0,(Numtagged,a3) + move.l d0,(TaggedKb,a3) + bsr redrawscreenfull + bsr mayfixY +9$ rts + +handlepreview + move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.w (b_Y,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a0 + move.l a0,a2 + lea (2+4,a0),a0 + mulu #LINELENGTH,d0 + add.l d0,a0 + move.w (b_dirnr,a3),d0 + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; enabler more igjen + move.b (CommsPort+Nodemem,NodeBase),d1 ; internal node + push d2-d6/a1-a3 + jsr _Handle_Preview + pop d2-d6/a1-a3 + beq.b 9$ + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + lea (endtext),a0 + bsr writetexto + beq.b 9$ + jsr readchar + beq.b 9$ + bsr redrawscreenfull + bsr mayfixY + clrz +9$ rts + +handleinfo + push a2 + move.w (b_Y,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a2 + lea (2+4,a2),a2 + mulu #LINELENGTH,d0 + add.l d0,a2 + jsr justchecksysopaccess + bne.b 1$ + move.l (Infomsgnr,a2),d0 + notz + bne.b 9$ +1$ move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; enabler more igjen + move.l a2,a0 + jsr (dotypeinfofile) + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha more lenger.. + move.b (readcharstatus,NodeBase),d0 ; noe galt ? + notz + beq.b 9$ ; jepp. + lea (endtext),a0 + bsr writetexto + beq.b 9$ + jsr readchar + beq.b 9$ + bsr redrawscreenfull + bsr mayfixY + clrz +9$ pop a2 + rts + +handlecomment ; JEO + push a2 + move.w (b_Y,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a2 + lea (2+4,a2),a2 + mulu #LINELENGTH,d0 + add.l d0,a2 + jsr justchecksysopaccess + bne.b 1$ + move.l (Filedescription,a2),a2 + notz + bne.b 9$ +1$ move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline +; move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; enabler more igjen + move.l a2,a0 + jsr (writetexto) +; move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha more lenger.. + move.b (readcharstatus,NodeBase),d0 ; noe galt ? + notz + beq.b 9$ ; jepp. + lea (endtext),a0 + bsr writetexto + beq.b 9$ + jsr readchar + beq.b 9$ + bsr redrawscreenfull + bsr.b mayfixY + clrz +9$ pop a2 + rts + +handleview + move.w #BROWSETOP+2,d0 + add.w (b_lines,a3),d0 + bsr gotoline + move.w (b_Y,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a0 + move.l a0,a2 + lea (2+4,a0),a0 + mulu #LINELENGTH,d0 + add.l d0,a0 + move.w (b_dirnr,a3),d0 + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; enabler more igjen + jsr (doviewarchive) + beq.b 9$ + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + lea (endtext),a0 + bsr writetexto + beq.b 9$ + jsr readchar + beq.b 9$ + bsr redrawscreenfull + bsr.b mayfixY + clrz +9$ rts + +mayfixY move.w (NumFiles,a3),d0 + sub.w (b_P,a3),d0 + bcs.b 1$ + cmp.w (b_lines,a3),d0 + bcc.b 9$ +1$ addq.w #1,(b_Y,a3) +9$ rts + +updatescreenmaybe + push d2/a2/d3 + link.w a2,#-160 + move.l a2,d3 + bsr 20$ ; har vi input ? + bne 9$ ; jepp, da skip'er vi + + move.w (b_P,a3),d0 ; har vi scrollet oppover ? + move.w (b_Y,a3),d1 + cmp.w d0,d1 ; er p mindre eller lik y ? + bcc.b 2$ ; ja, alt ok + sub.w d1,d0 ; + cmpi.w #6,d0 ; er forskjellen større en 6 ? + bls.b 4$ ; nope + bsr redrawscreen ; ja, redraw'er alt. + bra.b 3$ + +4$ move.w d0,d1 + move.w #BROWSETOP,d0 + bsr InsertLines + move.w (b_Y,a3),(b_P,a3) + bsr test_p + bra.b 3$ + +2$ add.w (b_lines,a3),d0 + subq.w #1,d0 + cmp.w d0,d1 + bls.b 3$ + sub.w d0,d1 + cmpi.w #6,d1 + bls.b 5$ + bsr redrawscreen + bra.b 3$ + +5$ move.w #BROWSETOP,d0 + bsr DeleteLines + move.w (b_Y,a3),d0 + sub.w (b_lines,a3),d0 + addq.w #1,d0 + move.w d0,(b_P,a3) + bsr test_p +3$ lea (b_Update,a3),a2 + move.w #0,d2 + +6$ bsr 20$ ; er det input på gang ? + bne 9$ ; jepp, da avbryter vi + move.b (a2)+,d1 ; skal den oppdateres ? + beq 7$ ; nei. + move.w d2,d0 + addq.w #4,d0 + bsr gotolinenoout + move.w d2,d0 + add.w (b_P,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a0 + lea (2+4,a0),a0 + mulu #LINELENGTH,d0 + add.l d0,a0 + move.l (-4,a0),d0 + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 8$ + subq.w #1,(b_Y,a3) + bne.b 801$ + move.w #1,(b_Y,a3) +801$ lea (endtext),a0 + bra.b 61$ + +8$ lea sp,a1 + bsr getlinestring + lea sp,a0 + move.b (-1,a2),d0 +; Tilbake til gammel browse +; cmp.b #3,d0 +; bne.b 603$ +; lea (deltoeoltext),a0 +; bra.b 61$ +603$ subq.b #1,d0 ; full update ? + bne.b 61$ ; jepp + move.l a0,a1 +60$ move.b (a1)+,d0 + cmp.b #' ',d0 + bne.b 60$ +601$ move.b (a1)+,d0 + cmp.b #' ',d0 + beq.b 601$ +602$ move.b (a1)+,d0 + cmp.b #' ',d0 + bne.b 602$ + + move.l a1,d0 + sub.l a0,d0 + subq.l #1,d0 + jsr (writetextlen) + jsr (breakoutimage) + bra.b 62$ +61$ jsr (writetexti) + +62$ move.b #0,(-1,a2) ; clear'er oppdaterings requesten + +7$ addq.w #1,d2 + cmp.w (b_lines,a3),d2 + bcs 6$ + + bsr.b 20$ ; er det input på gang ? + bne.b 9$ ; jepp, da avbryter vi + bsr updatetopheader + + move.w (b_Y,a3),d0 + sub.w (b_P,a3),d0 + bcc.b 71$ + move.w #0,d0 + addq.w #1,(b_Y,a3) +71$ addq.w #4,d0 + bsr gotoline + +9$ move.l d3,a2 + unlk a2 + pop d2/a2/d3 + rts + +20$ ; CheckInput +; returnerer Z = 0, når vi har nytt tegn + move.l (creadreq,NodeBase),d0 + beq.b 22$ + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + bne.b 28$ ; Ja, vi har et tegn +22$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 21$ + movea.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + bne.b 28$ ; Ja, vi har et tegn + ENDC +21$ setz ; nope. Ikke noe tegn +28$ clrn + rts + +handlespace + push a2/d2 + move.w (b_Y,a3),d0 + subq.w #1,d0 + move.l (tmpstore,NodeBase),a2 + lea (2,a2),a2 + mulu #LINELENGTH,d0 + add.l d0,a2 + + move.b (b_Mode,a3),d0 ; hvilken mode ? + beq.b 1$ ; fileinfo + bchg #0,(c_Selected+4,a2) + bra.b 3$ + +1$ lea (4,a2),a2 + move.l (Fsize,a2),d1 + beq.b 5$ + moveq.l #10,d0 + lsr.l d0,d1 +5$ move.w (Filestatus,a2),d0 + bchg #FILESTATUSB_Selected,d0 + bne.b 2$ ; ikke valgt + + move.w d0,(Filestatus,a2) + addq.w #1,(Numtagged,a3) ; velger + add.l d1,(TaggedKb,a3) + bra.b 3$ + +2$ move.w d0,(Filestatus,a2) ; velger bort igjen + subq.w #1,(Numtagged,a3) + sub.l d1,(TaggedKb,a3) + +3$ move.w (b_Y,a3),d0 + sub.w (b_P,a3),d0 + move.b #1,(b_updatetop,a3) + move.b (b_Update,a3,d0.w),d1 + bne.b 4$ + move.b #1,(b_Update,a3,d0.w) +4$ pop a2/d2 + rts + +redrawscreenfull + move.b (readcharstatus,NodeBase),d0 ; skjedd noe ? + bne.b 9$ ; ja, ut + push d2 + lea (ansiclearscreen),a0 + bsr writetext + move.b (b_Mode,a3),d0 ; hvilken mode ? + bne.b 1$ ; ikke fileinfo .. + move.w (b_dirnr,a3),d0 + move.l (firstFileDirRecord+CStr,MainBase),a0 + mulu.w #FileDirRecord_SIZEOF,d0 + lea (n_DirName,a0,d0.l),a0 + bsr writetext +1$ bsr drawheader + move.w (b_P,a3),d2 + bsr.b redrawscreen + move.w d2,(b_P,a3) + bsr test_p + pop d2 +9$ rts + +redrawscreen + lea (b_Update,a3),a0 + move.w (b_lines,a3),d0 + lea (0,a0,d0.w),a1 ; slutten + move.w (NumFiles,a3),d1 +; Tilbake til gammel browse +; add.w #1,d1 +; sub.w (b_Y,a3),d1 +; bcc.b 2$ +; moveq.l #0,d0 +2$ cmp.w d0,d1 ; b_lines <= numfiles ? + bcc.b 1$ ; jepp + move.w d1,d0 ; nei, tar den isteden + addq.w #1,d0 ; setter av plass til også +1$ move.b #2,(a0)+ ; full redraw + subq.w #1,d0 + bcs.b 4$ + bne.b 1$ +4$ cmp.l a0,a1 ; er vi ferdige ? (har vi tatt alle ?) + bls.b 3$ ; jepp + move.b #0,(a0)+ ; nei, resten skal ikke updates +; Tilbake til gammel browse +; move.b #3,(a0)+ ; nei, resten skal slettes + bra.b 4$ ; sjekk igjen +3$ move.w (b_Y,a3),(b_P,a3) + + bsr.b test_p + move.b #1,(b_updatetop,a3) + rts + +test_p move.w (b_P,a3),d0 ; henter p + add.w (b_lines,a3),d0 ; p + antall linjer + cmp.w (NumFiles,a3),d0 + bls.b 9$ ; numfiles er større, ferdig + move.w (NumFiles,a3),d0 + add.w #2,d0 + sub.w (b_lines,a3),d0 + bcc.b 1$ +2$ moveq.l #1,d0 +1$ beq.b 2$ + cmp.w (b_Y,a3),d0 ; safety. Er Y < P ? + bls.b 3$ ; nei + move.w (b_Y,a3),d0 ; ja, det får den ikke være +3$ move.w d0,(b_P,a3) ; fikser b_P igjen +9$ rts + +gotoline + bsr.b gotolinenoout + jmp (breakoutimage) + +gotolinenoout + move.w d0,-(a7) + lea (ansipos1text),a0 + jsr (writetext) + move.w (a7)+,d0 + and.l #$ffff,d0 + jsr (skrivnr) + lea (ansipos2text),a0 + jmp (writetext) + +drawheader + lea (ansifilhpostext),a0 + bsr writetext + lea (greentext),a0 + bsr writetexti + lea (fileihnorettext),a0 + move.b (b_Mode,a3),d0 ; hvilken mode ? + beq.b 3$ ; fileinfo + lea (conferencetext),a0 +3$ bsr writetexti + move.w #BROWSETOP,d0 + add.w (b_lines,a3),d0 + bsr.b gotolinenoout + bsr getbottomline + +2$ bsr writetexti + move.b (b_Mode,a3),d0 ; hvilken mode ? + bne.b 9$ ; ikke fileinfo .. + lea (topheader1text),a0 + bsr writetext + lea (topheader2text),a0 + bsr writetexti +9$ +; bra.b updatetopheader + +updatetopheader + move.b (b_updatetop,a3),d0 ; trengs update ? + beq.b 9$ ; nei + move.b (b_Mode,a3),d0 ; hvilken mode ? + bne.b 9$ ; ikke fileinfo .. + move.b #0,(b_updatetop,a3) + link.w a2,#-80 + lea (ansilbluetext),a0 + bsr writetext + lea (topheader1pos),a0 + bsr writetext + move.w (Numtagged,a3),d0 + add.w (TotNumtagged,a3),d0 + lea sp,a0 + jsr (konverterw) + lea sp,a0 + moveq.l #3,d0 + jsr (writetextrfill) + + lea (topheader2pos),a0 + bsr writetext + move.l (TaggedKb,a3),d0 + add.l (TotTaggedKb,a3),d0 + lea sp,a0 + jsr (konverter) + lea sp,a0 + moveq.l #6,d0 + jsr (writetextrfill) + move.b #'K',d0 + bsr writechari + unlk a2 +9$ rts + +; insert d1 (N) linjer på plass d0 (L) +InsertLines + push d2/d3 + move.w d0,d2 + move.w d1,d3 +; d2 = L +; d3 = N + move.w #BROWSETOP,d0 + add.w (b_lines,a3),d0 + sub.w d3,d0 +; addq.w #1,d0 + bsr gotolinenoout + move.w d3,d0 + bsr ControlDelete + move.w d2,d0 + bsr gotolinenoout + move.w d3,d0 + bsr ControlInsert + + lea (b_Update,a3),a1 + move.w (b_lines,a3),d0 + lea (0,a1,d0.w),a1 + move.l a1,a0 + and.l #$ffff,d3 + sub.l d3,a0 + + move.w (b_lines,a3),d0 + sub.w d2,d0 + sub.w d3,d0 + addq.w #BROWSETOP,d0 + +1$ move.b -(a0),-(a1) + subq.w #1,d0 + bne.b 1$ + move.w d3,d0 +2$ move.b #2,-(a1) + subq.w #1,d0 + bne.b 2$ + pop d2/d3 + rts + +; delete d1 (N) linjer på plass d0 (L) +DeleteLines + push d2/d3 + move.w d0,d2 + move.w d1,d3 +; d2 = L +; d3 = N + bsr gotolinenoout + move.w d3,d0 + bsr.b ControlDelete + + move.w #BROWSETOP,d0 + add.w (b_lines,a3),d0 + sub.w d3,d0 + bsr gotolinenoout + move.w d3,d0 + bsr.b ControlInsert + subq.w #BROWSETOP,d2 ; justerer updata data'ene også + + move.w (b_lines,a3),d0 + sub.w d2,d0 + sub.w d3,d0 + lea (b_Update,a3,d2.w),a0 + add.w d3,d2 + lea (b_Update,a3,d2.w),a1 + +1$ move.b (a1)+,(a0)+ + subq.w #1,d0 + bne.b 1$ + move.w d3,d0 +2$ move.b #2,(a0)+ + subq.w #1,d0 + bne.b 2$ + pop d2/d3 + rts + +;d0 = antall linjer +ControlDelete + move.l d2,-(a7) + move.w d0,d2 +1$ lea (Deletetext),a0 + jsr (writetexti) + subq.w #1,d2 + bne.b 1$ + move.l (a7)+,d2 + rts + +;d0 = antall linjer +ControlInsert + move.l d2,-(a7) + move.w d0,d2 +1$ lea (Inserttext),a0 + jsr (writetexti) + subq.w #1,d2 + bne.b 1$ + move.l (a7)+,d2 + rts + +; a0 = info +; a1 = string +; a3 = browseblock +getlinestring + move.b (b_Mode,a3),d0 ; hvilken mode ? + bne.b 1$ ; ikke fileinfo + move.w (b_dirnr,a3),d5 + jsr (dofileinfoline1) ; generer tekst stringen + bra.b 9$ +1$ push a0 ; conf + move.l #ansiredtext,d1 + move.b (c_Selected,a0),d0 + bne.b 11$ + move.l #ansilbluetext,d1 +11$ move.l d1,a0 + jsr (strcopy) + subq.l #1,a1 + pop a0 + jsr (strcopy) + +9$ rts + +getbottomline + move.b (b_Mode,a3),d0 ; hvilken mode ? + bne.b 1$ ; ikke fileinfo + jsr (justchecksysopaccess) + beq.b 2$ + lea (botom1head2text),a0 + bra.b 9$ +2$ lea (botom1head1text),a0 + bra.b 9$ + +1$ lea (botom2head2text),a0 + +9$ rts + + IFD browsedebug +writedebuginfo + move.w (b_Y,a3),d0 + bsr skrivdebugnrw + bsr dospace + move.w (b_P,a3),d0 + bsr skrivdebugnrw + bsr dospace + move.w (b_lines,a3),d0 + bsr skrivdebugnrw + bsr dospace + move.w (NumFiles,a3),d0 + bsr skrivdebugnrw + bsr donl + rts + +skrivdebugnrw + andi.l #$ffff,d0 + +; d0 = tall +skrivdebugnr + push d2/d3/a6 + link.w a2,#-80 + move.l sp,a0 + jsr (konverter) + move.l sp,a0 + jsr (strlen) + move.l debugwin,d1 + beq.b 9$ + move.l sp,d2 + move.l d0,d3 + move.l dosbase,a6 + jsrlib Write +9$ unlk a2 + pop d2/d3/a6 + rts + +dospace push d2/d3/a6 + move.l debugwin,d1 + beq.b 9$ + move.l #space,d2 + moveq.l #1,d3 + move.l dosbase,a6 + jsrlib Write +9$ pop d2/d3/a6 + rts + +donl push d2/d3/a6 + move.l debugwin,d1 + beq.b 9$ + move.l #nl,d2 + moveq.l #1,d3 + move.l dosbase,a6 + jsrlib Write +9$ pop d2/d3/a6 + rts + +closedebug + push a6 + move.l debugwin,d1 + beq.b 9$ + move.l dosbase,a6 + jsrlib Close +9$ pop a6 + rts + +opendebug + push a6/d2 + move.l #debugwinname,d1 + move.l #MODE_NEWFILE,d2 + move.l dosbase,a6 + jsrlib Open + move.l d0,debugwin + pop a6/d2 + rts + ENDC + section data,data + + IFD browsedebug +debugwin dc.l 0 +debugwinname dc.b 'con:0/0/640/200/Yo',0 +nl dc.b 10 +space dc.b ' ' + ENDC + +Inserttext dc.b '',0 +Deletetext dc.b '',0 +ansifilhpostext dc.b '',0 +conferencetext dc.b 'Conference name',10 + dc.b '---------------',0 +botom1head1text dc.b 'Space tags/untags,View,Info,Next dir,Quit(exit),Untag all',0 +botom1head2text dc.b 'Space tags/untags,View,Info,Next dir,Quit(exit),Untag all,Zap,Move,Touch,Czap.',0 +botom2head1text dc.b 'Space tags/untags,Info,Next,Quit(exit),Untag all',0 +botom2head2text dc.b 'Space tags/untags,Info,Quit(exit),Untag all',0 +topheader1text dc.b 'Tagged files:',0 +topheader2text dc.b 'Tagged size:',0 +topheader1pos dc.b '',0 +topheader2pos dc.b '',0 +ansipos1text dc.b '[',0 +ansipos2text dc.b ';1H',0 +endtext dc.b '' +deltoeoltext dc.b '',0 +surezaptext dc.b 'Sure you want to ZAP all marked files ',0 +suretouchtext dc.b 'Sure you want to Touch all marked files ',0 +movetowhdirtext dc.b 'Move to what directory',0 +browsedoprompt dc.b 'ownload, dd to hold or eit',0 +browsedoprompth dc.b '',0 +unknwoncomtext dc.b 'Unknown command',0 +greentext dc.b '',0 + + + END diff --git a/Div.asm b/Div.asm new file mode 100644 index 0000000..d06837f --- /dev/null +++ b/Div.asm @@ -0,0 +1,196 @@ +****************************************************************************** +****** ****** +****** ABBS - Amiga Bulletin Board System ****** +****** Written By Geir Inge Høsteng ****** +****** ****** +****************************************************************************** + + ***************************************************************** + * + * NAME + * Div.asm + * + * DESCRIPTION + * Misc support routines + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: Div.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: Div.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + include 'first.i' + +; IFND __M68 + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/iffparse.i' +; ENDC + + include 'asm.i' + include 'bbs.i' + include 'fse.i' + include 'node.i' + + section kode,code + + XREF iffbase + XREF exebase + + XDEF dosnip + XDEF getnextsnipchar + XDEF freepastemem + +; z = 1 => ingen flere tegn +getnextsnipchar + lea (pastetext,NodeBase),a0 + cmp.w #$00ff,(a0) ; er det minneblokk ? + bne.b 1$ ; nei + move.l (8,a0),a0 ; henter buffer adr +1$ move.b (a0),d0 ; henter byte'n + bne.b 3$ + bsr freepastemem + move.b #0,d0 + bra.b 9$ +3$ lea (1,a0),a1 +2$ move.b (a1)+,(a0)+ ; flytter resten + bne.b 2$ + tst.b d0 +9$ rts + +; leser tekst ut fra clipboard'et, og legger det i abbs's paste buffer +; retur z = 0 => tegn i buffer, returnerer første tegnet +dosnip push a2/d2/a6 + moveq.l #0,d2 ; ok status + move.l iffbase,d0 ; har vi iffparse.library ? + beq 9$ ; nope, nocando + move.l d0,a6 + jsrlib AllocIFF ; div setup av IFF struct for bruk mot console + tst.l d0 + beq.b 9$ + move.l d0,a2 ; struct iff + + moveq.l #PRIMARY_CLIP,d0 + jsrlib OpenClipboard + move.l d0,(iff_Stream,a2) + beq.b 91$ + + move.l a2,a0 + jsrlib InitIFFasClip + + move.l a2,a0 + moveq.l #IFFF_READ,d0 + jsrlib OpenIFF + tst.l d0 + bne.b 92$ + + move.l a2,a0 + move.l #'FTXT',d0 + move.l #'CHRS',d1 + jsrlib StopChunk + tst.l d0 + bne.b 93$ + + move.l a2,a0 + moveq.l #IFFPARSE_SCAN,d0 + jsrlib ParseIFF + tst.l d0 + bne.b 93$ + + move.l a2,a0 + jsrlib CurrentChunk + tst.l d0 + beq.b 93$ + move.l d0,a0 + move.l #'FTXT',d0 + cmp.l (cn_Type,a0),d0 + bne.b 93$ + move.l #'CHRS',d0 + cmp.l (cn_ID,a0),d0 + bne.b 93$ + + bsr.b 10$ + +93$ move.l a2,a0 + jsrlib CloseIFF +92$ move.l (iff_Stream,a2),a0 + jsrlib CloseClipboard +91$ move.l a2,a0 + jsrlib FreeIFF +9$ move.l d2,d0 + pop a2/d2/a6 + rts + +10$ push a3 + bsr.b freepastemem + lea (pastetext,NodeBase),a1 + move.w #$0000,(a1) ; markerer ikke noe i paste buffer + move.l (cn_Size,a0),d0 + beq.b 19$ + cmp.l #78,d0 ; Plass i pastetext stringen ? + bls.b 11$ ; jepp, dropper alloc + move.l d0,(4,a1) ; husker alloc size (i pastetext stringen) + addq.l #1,d0 ; legger til for null byte + move.l exebase,a6 + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + move.l iffbase,a6 + lea (pastetext,NodeBase),a1 + move.l d0,(8,a1) ; alloc failed + bne.b 12$ + moveq.l #78,d0 ; tar bare første string'en + bra.b 11$ +12$ move.w #$00ff,(a1) ; markerer at det er en minne blokk her. + move.l (4,a1),a1 ; size + exg d0,a1 ; bytter slik at det blir riktig (d0 = size, a1 = adr) +11$ move.l a2,a0 + move.l a1,a3 + jsrlib ReadChunkBytes ; leser antall bytes + tst.l d0 + bmi.b 18$ ; error + beq.b 18$ ; 0 bytes + move.b #0,(a3,d0.l) + bsr getnextsnipchar + move.b d0,d2 + bra.b 19$ +18$ bsr.b freepastemem +19$ pop a3 + rts + +;deallokerer minne blokk hvis det er noen der +freepastemem + push a6 + lea (pastetext,NodeBase),a1 + cmp.w #$00ff,(a1) ; er det minneblokk ? + bne.b 29$ ; nei + move.w #$0000,(a1) + move.l exebase,a6 ; ja, frigir gammel blokk + move.l (4,a1),d0 ; alloc size + addq.l #1,d0 ; legger til for null byte + move.l (8,a1),a1 ; alloc adr + jsrlib FreeMem +29$ pop a6 + rts + +;strcopy1line +;1$ move.b (a0)+,d0 +; cmp.b #10,d0 +; beq.b 2$ +; cmp.b #13,d0 +; beq.b 2$ +; move.b d0,(a1)+ +; bra.b 1$ +;2$ move.b #0,(a1) +; rts + +; section data,data + + END diff --git a/Exeption.asm b/Exeption.asm new file mode 100644 index 0000000..ef90fef --- /dev/null +++ b/Exeption.asm @@ -0,0 +1,436 @@ +****************************************************************************** +****** ****** +****** ABBS - Amiga Bulletin Board System ****** +****** Written By Geir Inge Høsteng ****** +****** ****** +****************************************************************************** + + ***************************************************************** + * + * NAME + * exeption.asm + * + * DESCRIPTION + * Exeption code for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: exeption.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: exeption.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + + include 'exec/types.i' + include 'exec/tasks.i' + include 'exec/execbase.i' + include 'exec/memory.i' + include 'exec/lists.i' + include 'dos/dos.i' + + include 'asm.i' + include "first.i" + include "bbs.i" + include "fse.i" + include "node.i" + + + LIST + + section gurustuff,code + + XDEF Exception + + XREF first + XREF dosbase + XREF mainstack + XREF mainmemoryblock + + XDEF Environment + +*************************************************************************** +*** Guru traping *** +*************************************************************************** + + SUPER +Exception + move.l (a7)+,d0 ; get exception # from stack + move.l d0,(GURUNum) ; and save it + cmpi.l #3,d0 ; ADDRESS or BUS error? + bgt.b 2$ ; no, skip adjustment + btst #0,(Environment+3) ; is it 68010 or 68020? + beq.b 1$ ; 0 means NO + bset #7,(8,a7) ; set Rerun flag + bra.b 2$ + +1$ addq.l #8,a7 ; adjust for 68000 +2$ move.l (2,a7),d0 ; get PC at crash + move.l d0,(GURUAddr) ; and save it + move.l #$1fffff,d1 +3$ move.w d1,($dff180) + subq.l #1,d1 +; bne.b 3$ + bra.b 3$ + tst.l d0 + move.l #GURUExit,(2,a7) ; use our own exit point + rte + +GURUExit + movem.l d0-d7/a0-a7,-(sp) ; save all registers + move.l 4,a6 ; make sure we are working with Exec + jsrlib GetCC ; safe way - works with all CPUs + movea.l (ThisTask,a6),a3 + movea.l (TC_TRAPDATA,a3),a4 ; make sure we have a valid # in a4 + move.l d0,(Flags) ; save area + movem.l (sp)+,d0-d7 + movem.l d0-d7,(DDump) ; save data reg contents + movem.l (sp)+,d0-d7 + movem.l d0-d7,(ADump) ; save address reg contents + tst.l (StackPtr) ; if there's something there + bne GExit1 ; ...we've been here before! + move.l (A7Store),d0 ; make sure we have proper TOS + move.l d0,(StackPtr) ; ...and save it + + movea.l (LN_NAME,a3),a0 + moveq.l #-1,d0 ; strlen +4$ tst.b (a0)+ + dbeq d0,4$ + not.w d0 + andi.l #$ffff,d0 + movea.l (LN_NAME,a3),a0 + addq.l #4,d0 ; adjust for shift + lsr.l #2,d0 + move.l d0,(NameLen) ; store length + add.l d0,(FAILlen) ; and sub-chunk total + + moveq #0,d0 ; clear d0 for use + lea (VBlankFrequency,a6),a0 ; set up a0 to find correct data + move.b (a0)+,d0 ; get just in case + move.l d0,(VBlankFreq) ; ...so we can figure what + move.b (a0),d0 ; ...type of machine + move.l d0,(PowerSupFreq) ; ...we're working on + + lea (first-4),a0 ; get seglist ptr + moveq #-1,d0 ; always at least 1 +2$ addq.l #1,d0 + move.l (a0),d1 ; find end of list + beq.b 3$ + lsl.l #2,d1 ; BPTR!!!!! + movea.l d1,a0 + bra.b 2$ + +3$ add.l d0,(SegCount) ; store # of seglist pointers + add.l d0,d0 ; multiply by 2 for longword count + add.l d0,(FAILlen) ; and sub-chunk length + + move.l (mainstack),d0 + cmpa.l (mainmemoryblock),a4 + beq.b 1$ + move.l (nodestack,a4),d0 ; get top of stack +1$ move.l d0,(StackTop) + + sub.l (StackPtr),d0 ; find number of bytes used + addq.l #4,d0 ; adjust for longword conversion + lsr.l #2,d0 ; convert from bytes to long + move.l d0,(StackLen) ; and save + add.l d0,(s2len) ; and sub-chunk total + + move.l a5,-(sp) ; save a5 for later + jsrlib Forbid ; don't let 'em change while we ask + move.l (MemList+LH_HEAD,a6),d0 ; first node in MemList +checkchip + movea.l d0,a5 ; move node address to address reg + move.w (MH_ATTRIBUTES,a5),d4 ; get node attributes + btst #MEMB_CHIP,d4 ; is it chip? + beq.b checkfast ; no, go on + lea (chipAvail),a3 + bsr.w AddIt +checkfast + btst #MEMB_FAST,d4 ; is it fast? + beq.b next ; no, go on + lea (fastAvail),a3 + bsr.w AddIt +next + move.l (LN_SUCC,a5),d0 ; get address of next node + bne.b checkchip ; ...and loop back if valid + jsrlib Permit ; allow others access again + move.l #MEMF_CHIP+MEMF_LARGEST,d1 ; to find largest hunk in chip ram + jsrlib AvailMem + move.l d0,(chipLargest) ; store + move.l #MEMF_FAST+MEMF_LARGEST,d1 ; to find largest hunk in fast ram + jsrlib AvailMem + move.l d0,(fastLargest) ; store + movea.l (sp)+,a5 ; and restore a5 + + movea.l (dosbase),a6 + lea (DumpName),a0 ; get name of output file + move.l a0,d1 + move.l #MODE_NEWFILE,d2 ; create new file + jsrlib Open + bne.b 4$ + lea (DumpPath),a0 ; if error in current dir, try DF0: + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + bne.b 4$ + move.b #'1',(DumpPath+3) ; still error? Try DF1: + lea (DumpPath),a0 + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + beq GExit2 ; if no error, continue (finally!) +4$ + move.l d0,d5 ; save file handle for Write + move.l d5,d1 ; get file handle + lea (PGTB),a0 ; first part of fixed + move.l a0,d2 + move.l #chunk_len_1,d3 ; length of first + jsrlib Write ; ...since it gets written over + + move.l d5,d1 ; get file handle + move.l 4,a0 + movea.l (ThisTask,a0),a0 + move.l (LN_NAME,a0),d2 ; get address of program name + move.l (NameLen),d3 ; get # longs in program name + lsl.l #2,d3 ; ..and convert to bytes + jsrlib Write + + move.l d5,d1 ; get file handle + lea (Environment),a0 ; second part of fixed + move.l a0,d2 + move.l #chunk_len_2,d3 ; length of second part + jsrlib Write + + lea (first-8),a0 ; address of seglist (size of seg) + move.l (a0)+,d0 ; segsize + move.l d0,(TempStore+4) ; save it + move.l a0,(TempStore) ; store first number + move.l (SegCount),d4 +5$ + move.l d5,d1 ; get file handle + lea (TempStore),a0 + move.l a0,d2 ; address of write buffer + moveq #TempSize,d3 ; size of segment pointer + jsrlib Write + movea.l (TempStore),a0 ; retrieve pointer + move.l (a0),d0 ; get next seg pointer + lsl.l #2,d0 ; adjust + move.l d0,(TempStore) ; ..and save + movea.l d0,a0 + move.l (-4,a0),d0 ; get segsize + move.l d0,(TempStore+4) ; ...and save it + subq.l #1,d4 ; done yet? + bne.b 5$ ; no, do next + + move.l d5,d1 + lea (subFMEM),a0 + move.l a0,d2 + move.l #FMEMlen,d3 + jsrlib Write + + move.l d5,d1 ; (get the idea?) + lea (subREGS),a0 ; third part of fixed + move.l a0,d2 + move.l #chunk_len_3,d3 ; length of third + jsrlib Write + + move.l (StackLen),d0 ; get length of stack used + cmpi.l #2048,d0 ; > 8k ? + bgt.b 6$ ; yes, dump two chunks + move.l d5,d1 + lea (STAK2),a0 ; whole stack chunk + move.l a0,d2 + moveq #STAK2len,d3 ; length of fixed part + jsrlib Write + + move.l d5,d1 + move.l (StackPtr),d2 ; address of stack + move.l (StackLen),d3 ; get # longwords on stack + lsl.l #2,d3 ; ..and convert to bytes + jsrlib Write + bra.b 7$ + +6$ move.l d5,d1 + lea (STAK3),a0 ; top4k chunk + move.l a0,d2 + moveq #STAK3len,d3 ; length of fixed part + jsrlib Write + + move.l d5,d1 + move.l (StackTop),d2 ; find top of stack + subi.l #4096,d2 ; find top-4k + move.l #4096,d3 ; # bytes to write + jsrlib Write + + move.l d5,d1 + lea (STAK4),a0 ; bottom4k chunk + move.l a0,d2 + moveq #STAK4len,d3 ; length of fixed part + jsrlib Write + + move.l d5,d1 + move.l (StackPtr),d2 ; current stack address + move.l #4096,d3 ; # bytes to write + jsrlib Write +7$ +9$ + move.l d5,d1 + moveq #0,d2 ; offset from EOF + moveq #1,d3 ; OFFSET_END + jsrlib Seek ; Seek returns OLD position + moveq #3,d1 ; did user write even longwords? + and.l d0,d1 + beq.b 10$ ; Yep! Nice Human. + move.l d1,d6 ; Nope, save for later. + clr.l (TempStore) ; clear temp storage + move.l d5,d1 + lea (TempStore),a0 + move.l a0,d2 + moveq #4,d3 + sub.l d6,d3 ; find how many NULLs to pad + jsrlib Write + bra.b 9$ +10$ + move.l d5,d1 + moveq #0,d2 ; offset to 'Length' field + moveq #1,d3 ; OFFSET_END + jsrlib Seek ; make sure we are at end of file + move.l d5,d1 + moveq #4,d2 ; offset to 'Length' field + moveq #-1,d3 ; OFFSET_BEGINNING + jsrlib Seek + subq.l #8,d0 ; adjust total length + lsr.l #2,d0 ; adjust to longwords + move.l d0,(TempStore) ; save for write + move.l d5,d1 + lea (TempStore),a0 + move.l a0,d2 + moveq.l #4,d3 + jsrlib Write ; write 'Length' field +GExit1 + move.l d5,d1 + beq.b GExit2 + movea.l (dosbase),a6 + jsrlib Close + +GExit2 +; move.l 4,a6 +;1$ moveq.l #0,d0 ; Venter for alltid. +; jsrlib Wait +; bra.s 1$ ; Kommer aldri hit, men ... + movea.l (mainstack),a7 + cmpa.l (mainmemoryblock),a4 + beq.b 1$ + movea.l (nodestack,a4),a7 ; get top of stack +1$ rts ; ;Hopper ut... + +*----------------------------------------------------------------------- +* AddIt: routine to add memory parts to variables + +AddIt + move.l (MH_FREE,a5),d0 + add.l d0,(a3) ; add to available + move.l (MH_UPPER,a5),d0 + sub.l (MH_LOWER,a5),d0 + add.l d0,(4,a3) ; add to Max section + rts + + section data,DATA + +DumpPath dc.b 'DF0:' +DumpName dc.b 'SnapShot.TB',0 +TempStore dc.l 0,0 ; Temporary storage for BPTR -> APTR +TempSize equ *-TempStore + + cnop 0,4 + +*-------------------------------------------------------------------------- +* New IFF chunk format - +* PGTB = Program Traceback, header for chunk +* FAIL = reason for and environment of crash +* REGS = registers at time of crash, including PC and CCR +* VERS = version, revision, name of this program +* STAK = ENTIRE stack at time of crash or, alternately, +* the top and bottom 4k if the stack used is > 8k +* UDAT = optional user data dump (if _ONGURU is set to a +* function pointer in the user's program) +*-------------------------------------------------------------------------- + +PGTB dc.b 'PGTB' +Length dc.l 0 ; length of chunk (in longwords) + +subFAIL dc.b 'FAIL' +FAILlen dc.l 9 +NameLen dc.l 0 ; length of program name +chunk_len_1 equ *-PGTB +Environment dc.l 0 ; CPU (, Math) +VBlankFreq dc.l 0 ; PAL = 50, NTSC = 60 (approx.) +PowerSupFreq dc.l 0 ; Europe = 50, USA = 60 (approx.) +Starter dc.l -1 ; 0 = WB, -1 = CLI +GURUNum dc.l 0 ; cause of crash (GURU #) +SegCount dc.l 1 ; # hunks in seglist +chunk_len_2 equ *-Environment + +subFMEM dc.b 'FMEM' ; FMEM - free memory at crash + dc.l 6 +chipAvail dc.l 0 ; available chip memory +chipMax dc.l 0 ; maximum chip memory +chipLargest dc.l 0 ; largest chip memory +fastAvail dc.l 0 ; available fast memory +fastMax dc.l 0 ; maximum fast memory +fastLargest dc.l 0 ; largest fast memory +FMEMlen equ *-subFMEM + +subREGS dc.b 'REGS' ; REGS - register storage field +REGSlen dc.l 18 +GURUAddr dc.l 0 ; PC at time of crash +Flags dc.l 0 ; Condition Code Register (CCR) +DDump dc.l 0,0,0,0,0,0,0,0 ; data registers +ADump dc.l 0,0,0,0,0,0,0 ; address registers +A7Store dc.l 0 + +subVERS dc.b 'VERS' ; VERS - program version field + dc.l 5 + dc.l VERSION ; version # + dc.l REVISION ; revision # + dc.l 2 ; length of name of program + dc.b 'ABBS',0,0,0,0 ; name + +subSTAK dc.b 'STAK' ; STAK - stack field +STAKlen dc.l 4 +Type dc.l 0 ; 0 = Info +StackTop dc.l 0 ; top of stack pointer +StackPtr dc.l 0 ; current Stack Pointer +StackLen dc.l 0 ; # bytes used on stack +chunk_len_3 equ *-subREGS + +STAK2 dc.b 'STAK' +s2len dc.l 1 ; length of subtype + dc.l 1 ; 1 = whole stack +STAK2len equ *-STAK2 + +STAK3 dc.b 'STAK' + dc.l 1025 + dc.l 2 ; 2 = top 4k of stack +STAK3len equ *-STAK3 + +STAK4 dc.b 'STAK' + dc.l 1025 + dc.l 3 ; 3 = bottom 4k of stack +STAK4len equ *-STAK4 + +STAK5 dc.b 'STAK' +_STAKOffset dc.l 0 + dc.l 4 ; 4 = user defined amount +STAK5len equ *-STAK5 + +UDAT dc.b 'UDAT' + dc.l 0 +UDATlen equ *-UDAT diff --git a/FSE.asm b/FSE.asm new file mode 100644 index 0000000..1575acc --- /dev/null +++ b/FSE.asm @@ -0,0 +1,2476 @@ +****************************************************************************** +****** ****** +****** ABBS - Amiga Bulletin Board System ****** +****** Written By Geir Inge Høsteng ****** +****** ****** +****************************************************************************** + + ***************************************************************** + * + * NAME + * FSE.asm + * + * DESCRIPTION + * FullScreen editor for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: FSE.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: FSE.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + + include 'exec/types.i' + include 'dos/dos.i' + + include 'asm.i' + include 'bbs.i' + include 'fse.i' + include 'node.i' + + LIST + + XDEF fseeditor + + XREF dosbase + XREF exebase + XREF getfullnamewithreq + XREF getline + XREF konverter + XREF konverterw + XREF readchar + XREF skrivnr + XREF strcopy + XREF strcopymaxlen + XREF strlen + XREF strrcopy + XREF upchar + XREF writechar + XREF writechari + XREF writetexti + XREF writetextleni + XREF writetextmemi + XREF writetext + XREF nodehook + XREF dosnip + XREF justchecksysopaccess + + XREF spacetext + XREF enterffnametext + XREF privatemsgtext + XREF tonoansitext + XREF bordertext + XREF subjecttext + XREF abortmsgtext + XREF ansiyellowtext + XREF ansiredtext + + XDEF NormAtttext + XDEF ansiclearsctext + + +;***************************************************************************** +; Full Screen editor. +;***************************************************************************** + + +;d0 - x +;d1 - y +MoveCursor + cmp.w (FizzX,a3),d0 + bne.b 1$ + cmp.w (FizzY,a3),d1 + beq.b 9$ +1$ move.w d0,(FizzX,a3) + move.w d1,(FizzY,a3) + bsr ControlCursor +9$ rts + +InsertLines + movem.l d2/d3/d4,-(a7) + move.w d0,d2 + move.w d1,d3 +; d2 = L +; d3 = N +; d4 = I + move.w #1,d0 + move.w (WindowEnd,a3),d1 + sub.w d3,d1 + addq.w #1,d1 + bsr.b MoveCursor + move.w d3,d0 + bsr ControlDelete + move.w #1,d0 + move.w d2,d1 + bsr.b MoveCursor + move.w d3,d0 + bsr ControlInsert + move.w (WindowEnd,a3),d4 + lea (ScreenUpd,a3),a0 + lea (ScreenClr,a3),a1 +1$ move.w d2,d0 + add.w d3,d0 + cmp.w d4,d0 + bhi.b 3$ + move.w d4,d0 + sub.w d3,d0 + move.b (0,a0,d0.w),(0,a0,d4.w) + move.b (0,a1,d0.w),(0,a1,d4.w) + bra.b 2$ +3$ move.b #1,(0,a0,d4.w) + move.b #1,(0,a1,d4.w) +2$ subq.w #1,d4 + cmp.w d4,d2 + bls.b 1$ + movem.l (a7)+,d2/d3/d4 + rts + +DeleteLines + movem.l d2/d3/d4,-(a7) + move.w d0,d2 + move.w d1,d3 +; d2 = L +; d3 = N +; d4 = I + move.w #1,d0 + move.w d2,d1 + bsr MoveCursor + move.w d3,d0 + bsr ControlDelete + move.w d2,d4 + lea (ScreenUpd,a3),a0 + lea (ScreenClr,a3),a1 +1$ move.w (WindowEnd,a3),d0 + sub.w d3,d0 + cmp.w d4,d0 + bcs.b 3$ + move.w d4,d0 + add.w d3,d0 + move.b (0,a0,d0.w),(0,a0,d4.w) + move.b (0,a1,d0.w),(0,a1,d4.w) + bra.b 2$ +3$ move.b #1,(0,a0,d4.w) + move.b #1,(0,a1,d4.w) +2$ addq.w #1,d4 + cmp.w (WindowEnd,a3),d4 + bls.b 1$ + movem.l (a7)+,d2/d3/d4 + rts + +PadLine ; ensure that all chars lower than X exist + move.l (FSEbuffer,a3),a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a0 + move.l a0,-(a7) + bsr strlen + movea.l (a7)+,a0 + move.w (X,a3),d1 + subq.w #1,d1 + cmp.w d1,d0 + bcc.b 9$ + adda.l d0,a0 +1$ move.b #' ',(a0)+ + addq.l #1,d0 + cmp.w d0,d1 + bcc.b 1$ + move.b #0,(a0) +9$ rts + +UnPadLine ; strip trailing blanks + move.l (FSEbuffer,a3),a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a0 + move.l a0,-(a7) + bsr strlen + movea.l (a7)+,a0 + beq.b 9$ + adda.l d0,a0 +1$ cmpi.b #' ',-(a0) + bne.b 2$ + subq.l #1,d0 + bne.b 1$ + subq.l #1,a0 +2$ move.b #0,(1,a0) +9$ rts + +; d0 = pos +MarkIt movem.l d2/d3,-(a7) ; remember to update from current position + move.w d0,d2 +; d2 - pos +; d3 - Z + move.w (Y,a3),d3 + cmp.w (NrLines,a2),d3 + bls.b 1$ + move.w d3,(NrLines,a2) +1$ sub.w (P,a3),d3 + addq.w #WindowTop,d3 ; Z = Y-P+WindowTop + move.w (Y,a3),d0 + cmp.w (P,a3),d0 + bcs.b 9$ + move.w (P,a3),d1 + add.w (WindowSiz,a3),d1 + cmp.w d0,d1 + bcs.b 9$ + lea (ScreenUpd,a3),a0 + moveq.l #0,d0 + move.b (0,a0,d3.w),d0 + cmp.w d0,d2 + bcc.b 9$ + move.b d2,(0,a0,d3.w) +9$ movem.l (a7)+,d2/d3 + rts + +DoLineDelete + movem.l d2/d3/d4/d5,-(a7) + move.l a2,-(a7) + move.w d0,d2 +; d2 = N +; d3 = I +; d5 = LinesSize + move.l (FSEbuffer,a3),a2 + moveq.l #0,d5 + move.b #LinesSize,d5 + move.w (MaxFSEbufferlines,a3),d4 + subq.w #1,d4 + mulu.w d5,d4 + move.w d2,d3 + subq.w #1,d3 + mulu.w d5,d3 +1$ lea (0,a2,d3.l),a1 + add.l d5,d3 + lea (0,a2,d3.l),a0 + bsr strcopy + cmp.l d3,d4 + bcc.b 1$ + move.w (MaxFSEbufferlines,a3),d0 + subq.w #1,d0 + mulu.w d5,d0 + move.b #0,(0,a2,d0.l) + cmp.w (P,a3),d2 + bcs.b 2$ + move.w (P,a3),d0 + add.w (WindowSiz,a3),d0 + cmp.w d0,d2 + bhi.b 2$ + move.w d2,d0 + sub.w (P,a3),d0 + addq.w #WindowTop,d0 + move.w #1,d1 + bsr DeleteLines +2$ movea.l (a7)+,a2 + cmp.w (NrLines,a2),d2 + bhi.b 9$ ; Mike har bcc her. + subq.w #1,(NrLines,a2) +9$ movem.l (a7)+,d2/d3/d4/d5 + rts + +DoLineInsert + movem.l d2/d3/d4/d5,-(a7) + move.l a2,-(a7) + move.w d0,d2 +; d2 = N +; d3 = I +; d5 - linsesize.l + moveq.l #0,d5 + move.b #LinesSize,d5 + move.l (FSEbuffer,a3),a2 + move.w (MaxFSEbufferlines,a3),d3 + subq.w #1,d3 + mulu.w d5,d3 ; MaxFSEbufferlines * linsesize + move.w d2,d4 +; add.w #1,d4 ; N + 1 + mulu.w d5,d4 ; N + 1 * linsesize +1$ lea (0,a2,d3.l),a1 + sub.l d5,d3 + lea (0,a2,d3.l),a0 + bsr strcopy + cmp.l d3,d4 + bls.b 1$ + move.w d2,d0 + subq.w #1,d0 + mulu.w d5,d0 + move.b #0,(0,a2,d0.l) + + cmp.w (P,a3),d2 + bcs.b 2$ + move.w (P,a3),d0 + add.w (WindowSiz,a3),d0 + cmp.w d0,d2 + bhi.b 2$ + move.w d2,d0 + sub.w (P,a3),d0 + addq.w #WindowTop,d0 + move.w #1,d1 + bsr InsertLines +2$ movea.l (a7)+,a2 + move.w (MaxFSEbufferlines,a3),d0 + cmp.w (NrLines,a2),d0 + bls.b 9$ + addq.w #1,(NrLines,a2) +9$ movem.l (a7)+,d2/d3/d4/d5 + rts + +Wrap move.l d2,-(a7) ; called with text in LongLine, not CurrText^... +;d2 - savedy + move.w (Y,a3),d2 ; SavedY +1$ lea (LongLine,a3),a0 + bsr strlen + move.w (WindowWith,a3),d1 + subq.w #1,d1 + cmp.w d1,d0 + bls.b 2$ + bsr.b 10$ ; WrapLine + bra.b 1$ +2$ lea (LongLine,a3),a0 + move.l (FSEbuffer,a3),a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a1 + bsr strcopy + move.w d2,(Y,a3) + move.w (WindowWith,a3),d0 + cmp.w (X,a3),d0 + bcc.b 9$ + move.w d0,(X,a3) + bsr ControlAlarm +9$ move.l (a7)+,d2 + rts + +10$ movem.l d3-d7/a6,-(a7) ; WrapLine +; d6 = I +; d3 = J +; d4 = P +; d5 = Q +; d2 = SavedY + move.l (FSEbuffer,a3),a0 + move.l a0,d7 + move.w (MaxFSEbufferlines,a3),d0 + cmp.w (Y,a3),d0 + bhi.b 11$ + move.w (WindowWith,a3),d0 + lea (LongLine,a3),a0 + move.b #0,(-1,a0,d0.w) + bra 19$ +11$ bsr 20$ ; Findsplit + lea (LongLine,a3),a0 + movea.l d7,a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a1 + movea.l a1,a6 + moveq.l #0,d0 + move.b #1,d0 + move.w d3,d1 + bsr copy + move.w d6,d0 + subq.w #1,d0 + bsr MarkIt + cmp.w (Y,a3),d2 + bne.b 12$ + cmp.w (X,a3),d6 + bhi.b 12$ + addq.w #1,d2 + sub.w d6,(X,a3) + addq.w #1,(X,a3) +12$ move.w #1,d4 + movea.l a6,a0 + bsr strlen +13$ cmp.w d0,d4 + bhi.b 14$ + move.b (-1,a6,d4.w),d1 + cmpi.b #' ',d1 + bne.b 14$ + addq.w #1,d4 + bra.b 13$ +14$ addq.w #1,(Y,a3) + lea (LongLine,a3),a0 + movea.l a0,a1 + moveq.l #0,d0 + moveq.l #0,d1 + move.w d6,d0 + move.b #99,d1 + bsr copy + + movea.l d7,a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a6 + tst.b (a6) + bne.b 15$ + move.w (Y,a3),d0 + + move.l a6,-(a7) + movea.l (24,a7),a6 + bsr DoLineInsert + movea.l (a7)+,a6 + +15$ lea (LongLine,a3),a0 + tst.b (a0) + beq.b 16$ + tst.b (a6) + beq.b 16$ +17$ tst.b (a0)+ + bne.b 17$ + move.b #' ',(-1,a0) + move.b #0,(a0) +16$ move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEAutoIndent,d0 + beq.b 110$ + movea.l d7,a0 + move.w (Y,a3),d0 + subq.w #2,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + cmp.w d0,d4 + bhi.b 110$ + subq.w #1,d4 + move.w #1,d5 +111$ cmp.w d5,d4 + bcs.b 110$ + cmp.w (Y,a3),d2 + bne.b 112$ + addq.w #1,(X,a3) +112$ lea (LongLine,a3),a0 + move.b #' ',d0 + moveq.l #1,d1 + bsr insert + tst.b (a6) + beq.b 113$ + cmpi.b #' ',(1,a6) + bne.b 113$ + movea.l a6,a0 + moveq.l #1,d0 + move.w #1,d1 + bsr delete +113$ addq.w #1,d5 + bra.b 111$ +110$ lea (LongLine,a3),a1 +18$ tst.b (a1)+ + bne.b 18$ + subq.l #1,a1 + movea.l a6,a0 + bsr strcopy +130$ move.w #1,d0 + bsr MarkIt +19$ movem.l (a7)+,d3-d7/a6 + rts + +; d6 = I +; d3 = J +20$ move.w (WindowWith,a3),d3 ; FindSplit + lea (LongLine,a3),a0 +21$ move.b (-1,a0,d3.w),d0 + cmpi.b #' ',d0 + bne.b 22$ + move.w d3,d6 + addq.w #1,d6 + subq.w #1,d3 + bra.b 29$ +22$ cmpi.b #'-',d0 + bne.b 23$ + cmp.w (WindowWith,a3),d3 + beq.b 23$ + move.w d3,d6 + addq.w #1,d6 + bra.b 29$ +23$ subq.w #1,d3 + bne.b 21$ + move.w (WindowWith,a3),d6 + move.w d6,d3 + subq.w #1,d3 +29$ rts + +DoBackspace + cmpi.w #1,(X,a3) + bgt 1$ + cmpi.w #1,(Y,a3) + bgt.b 3$ + bsr ControlAlarm + bra 9$ +3$ move.l d2,-(a7) + lea (LongLine,a3),a1 + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + move.l a0,d2 + bsr strcopy + move.w (Y,a3),d0 + bsr DoLineDelete + subq.w #1,(Y,a3) + subi.l #LinesSize,d2 + movea.l d2,a0 + bsr strlen + addi.w #1,d0 + move.w d0,(X,a3) + bsr MarkIt + + lea (LongLine,a3),a0 + tst.b (a0) + beq.b 4$ + movea.l d2,a1 + tst.b (a1) + beq.b 4$ + addq.w #1,(X,a3) + move.b #' ',d0 + moveq.l #0,d1 + bsr insert + lea (LongLine,a3),a0 +4$ lea (tmptext,NodeBase),a1 + bsr strcopy + lea (LongLine,a3),a1 + movea.l d2,a0 + bsr strcopy + subq.l #1,a1 + lea (tmptext,NodeBase),a0 + bsr strcopy + bsr Wrap + move.l (a7)+,d2 + bra 9$ + +1$ move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + move.l a0,-(a7) + bsr strlen + movea.l (a7)+,a0 + addq.l #1,d0 + cmp.w (X,a3),d0 + bcs.b 2$ + + moveq.l #0,d0 + move.w (X,a3),d0 + subq.w #1,d0 + move.w #1,d1 + bsr delete + move.w (X,a3),d0 + subq.w #1,d0 + bsr MarkIt +2$ subq.w #1,(X,a3) +9$ rts + +DoDelCharacter + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + cmp.w (X,a3),d0 + bcc.b 1$ + move.w (NrLines,a2),d0 + cmp.w (Y,a3),d0 + bls.b 9$ + addq.w #1,(Y,a3) + move.w #0,(X,a3) +1$ addq.w #1,(X,a3) + bsr DoBackspace +9$ rts + +DoReturn + movem.l d2/d3,-(a7) +; d2 - I +; d3 - P + move.w (MaxFSEbufferlines,a3),d0 + cmp.w (Y,a3),d0 + bhi.b 1$ + bsr ControlAlarm + bra 9$ +1$ move.w (Y,a3),d0 + addq.w #1,d0 + bsr DoLineInsert + bsr PadLine + + move.l (FSEbuffer,a3),a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a0 + addi.l #LinesSize,d0 + lea (0,a1,d0.l),a1 + moveq.l #0,d0 + moveq.l #0,d1 + move.w (X,a3),d0 + move.b #99,d1 + move.l a0,-(a7) + bsr copy + movea.l (a7)+,a0 + movea.l a0,a1 + moveq.l #0,d0 + moveq.l #0,d1 + move.b #1,d0 + move.w (X,a3),d1 + subq.w #1,d1 + move.l a0,-(a7) + bsr copy + bsr UnPadLine + move.w (X,a3),d0 + bsr MarkIt + move.w #1,d3 + movea.l (a7),a0 + bsr strlen + movea.l (a7)+,a0 +4$ cmp.w d0,d3 + bhi.b 3$ + move.b (-1,a0,d3.w),d1 + cmpi.b #' ',d1 + bne.b 3$ + addq.w #1,d3 + bra.b 4$ +3$ move.w #1,(X,a3) + addq.w #1,(Y,a3) + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEAutoIndent,d0 + beq.b 9$ + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #2,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + movea.l a0,a1 + bsr strlen + cmp.w d0,d3 + bhi.b 9$ + lea (LinesSize,a1),a1 + move.w #1,d2 + subq.w #1,d3 +2$ cmp.w d2,d3 + bcs.b 9$ + addq.w #1,(X,a3) + moveq.l #0,d1 + move.b #' ',d0 + movea.l a1,a0 + bsr insert + addq.w #1,d2 + bra.b 2$ +9$ movem.l (a7)+,d2/d3 + rts + +DoTAB move.w (X,a3),d0 + move.w (WindowWith,a3),d1 + andi.w #$fff8,d1 + cmp.w d0,d1 + bhi.b 1$ + bra ControlAlarm +1$ addq.w #7,d0 + andi.w #$fff8,d0 + addq.w #1,d0 +3$ move.w d0,(X,a3) + rts + +DoNewLine + move.w (Y,a3),d0 + cmp.w (NrLines,a2),d0 + bcs.b 1$ + tst.b (HaveCR,a3) + beq DoReturn + bra ControlAlarm +1$ addq.w #1,(Y,a3) + move.w #1,(X,a3) + rts + +DoForward + move.w (X,a3),d0 + cmp.w (WindowWith,a3),d0 + bcc.b 1$ + addq.w #1,(X,a3) + rts +1$ move.w (Y,a3),d0 + cmp.w (NrLines,a2),d0 + bcc ControlAlarm + addq.w #1,(Y,a3) + move.w #1,(X,a3) + rts + +DoBackward + cmpi.w #1,(X,a3) + bls.b 1$ + subq.w #1,(X,a3) + bra.b 9$ +1$ cmpi.w #1,(Y,a3) + bhi.b 2$ + bsr ControlAlarm + bra.b 9$ +2$ subq.w #1,(Y,a3) + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + addq.w #1,d0 + move.w d0,(X,a3) +9$ rts + +DoWordLeft + subq.w #1,(X,a3) + move.w #0,d0 + bsr 10$ ; Find + move.w #1,d0 + bsr 10$ ; Find + addq.w #1,(X,a3) + rts + +10$ move.l d2,-(a7) ; Find + move.w d0,d2 +11$ cmpi.w #1,(X,a3) + bcc.b 12$ + tst.w d2 + bne.b 19$ + cmpi.w #1,(Y,a3) + bls.b 19$ + subq.w #1,(Y,a3) + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + addq.w #1,d0 + move.w d0,(X,a3) +12$ move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + moveq.l #0,d1 + move.w (X,a3),d1 + add.l d1,d0 + cmpi.b #' ',(-1,a0,d0.l) + beq.b 13$ ; true = hopp + tst.w d2 + beq.b 19$ + bra.b 14$ +13$ tst.w d2 + bne.b 19$ +14$ subq.w #1,(X,a3) + bra.b 11$ +19$ move.l (a7)+,d2 + rts + +DoWordRight + subq.w #1,(X,a3) + move.w #1,d0 + bsr 10$ ; Find + move.w #0,d0 + bsr 10$ ; Find + rts + +10$ movem.l d4/d2/d3,-(a7) + move.w d0,d2 + move.l a2,d4 + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a2 + movea.l a2,a0 + bsr strlen + move.l d0,d3 +11$ cmp.w (X,a3),d3 + bcc.b 12$ + tst.w d2 + bne.b 19$ + move.w (Y,a3),d0 + movea.l d4,a0 + cmp.w (NrLines,a0),d0 + bcc.b 19$ + addq.w #1,(Y,a3) + move.w #0,(X,a3) + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a2 + movea.l a2,a0 + bsr strlen + move.l d0,d3 +12$ addq.w #1,(X,a3) + move.w (X,a3),d0 + cmpi.b #' ',(-1,a2,d0.w) + beq.b 13$ ; True = hopp + tst.w d2 + beq.b 19$ + bra.b 11$ +13$ tst.w d2 + beq.b 11$ +19$ movea.l d4,a2 + movem.l (a7)+,d4/d2/d3 + rts + +DoUpward + cmpi.w #1,(Y,a3) + bhi.b 1$ + bra ControlAlarm +1$ subq.w #1,(Y,a3) + rts + +DoPageUp + move.w (Y,a3),d0 + cmpi.w #1,d0 + bhi.b 1$ + bra ControlAlarm +1$ sub.w (WindowSiz,a3),d0 + cmpi.w #1,d0 + bge.b 2$ + move.w #1,d0 +2$ move.w d0,(Y,a3) + rts + +DoDownward + move.w (NrLines,a2),d0 + cmp.w (Y,a3),d0 + bhi.b 1$ + bra ControlAlarm +1$ addq.w #1,(Y,a3) + rts + +DoPageDown + move.w (Y,a3),d1 + move.w (NrLines,a2),d0 + cmp.w d0,d1 + bcc ControlAlarm + add.w (WindowSiz,a3),d1 + cmp.w d0,d1 + bls.b 2$ + move.w d0,d1 +2$ move.w d1,(Y,a3) + rts + +DoHomeward + cmpi.w #1,(X,a3) + bls.b 1$ + move.w #1,(X,a3) + bra.b 9$ +1$ move.w (P,a3),d0 + cmp.w (Y,a3),d0 + beq.b 2$ + move.w d0,(Y,a3) + bra.b 9$ +2$ move.w #1,(Y,a3) +9$ rts + +DoEndward + move.l d2,-(a7) + move.w (P,a3),d2 + add.w (WindowSiz,a3),d2 + move.w (NrLines,a2),d0 + cmp.w d2,d0 + bcc.b 1$ + move.w d0,d2 +1$ move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + addq.w #1,d0 + cmp.w (X,a3),d0 + bhi.b 2$ + cmp.w (Y,a3),d2 + beq.b 3$ + move.w d2,(Y,a3) + bra.b 4$ +3$ move.w (NrLines,a2),(Y,a3) +4$ bne.b 5$ + move.w #1,(Y,a3) +5$ move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strlen + tst.w d0 + bne.b 2$ + moveq.l #1,d0 +2$ move.w d0,(X,a3) + move.l (a7)+,d2 + rts + +showfsemode + move.w #-1,(FizzY,a3) + move.w #31,d0 + move.w #2,d1 + bsr MoveCursor + bsr ControlNormAtt + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEOverwritemode,d0 + beq.b 1$ + lea (overwritetext),a0 + bra.b 2$ +1$ lea (inserttext),a0 +2$ bsr writetexti + move.w #42,d0 + move.w #2,d1 + bsr MoveCursor + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEAutoIndent,d0 + beq.b 3$ + lea (autoindenttext),a0 + bra.b 4$ +3$ lea (noindenttext),a0 +4$ bsr writetexti +9$ rts + +RedrawScreen +; d0 = I + lea (ScreenUpd,a3),a0 + moveq.l #WindowTop,d0 +1$ move.b #1,(0,a0,d0.w) + addq.l #1,d0 + cmp.w (WindowEnd,a3),d0 + bls.b 1$ + move.w (Y,a3),d0 + subq.w #7,d0 + cmpi.w #1,d0 + bge.b 2$ + move.w #1,d0 +2$ move.w d0,(P,a3) + rts + +UpdateScreenMaybe + push d2/d3/d4 +;d2 = I +;d3 = J + tst.b (ZapEcho,a3) + bne 72$ + bsr 20$ + bne 72$ + move.w (P,a3),d0 + move.w (Y,a3),d1 + cmp.w d0,d1 + bcc.b 2$ + sub.w d1,d0 + cmpi.w #6,d0 + bls.b 4$ + bsr.b RedrawScreen + bra.b 3$ +4$ move.w d0,d1 + move.w #WindowTop,d0 + bsr InsertLines + move.w (Y,a3),(P,a3) + bra.b 3$ +2$ add.w (WindowSiz,a3),d0 + cmp.w d0,d1 + bls.b 3$ + sub.w d0,d1 + cmpi.w #6,d1 + bls.b 5$ + bsr.b RedrawScreen + bra.b 3$ + +5$ move.w #WindowTop,d0 + bsr DeleteLines + move.w (Y,a3),d0 + sub.w (WindowSiz,a3),d0 + move.w d0,(P,a3) + +3$ move.w #WindowTop,d2 +6$ + bsr 20$ + bne 72$ + lea (ScreenUpd,a3),a0 + move.w #0,d0 + move.b (0,a0,d2.w),d0 + move.w (WindowWith,a3),d1 + cmp.b d1,d0 + bcc 7$ + move.w d2,d1 + bsr MoveCursor + move.w d2,d3 + add.w (P,a3),d3 + subq.w #WindowTop,d3 + move.w (MaxFSEbufferlines,a3),d0 + cmp.w d0,d3 + bhi.b 8$ + move.l (FSEbuffer,a3),a0 + move.w d3,d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + moveq.l #0,d4 ; ikke quoting + cmpi.b #'>',(a0) ; er det et quote tegn ? + bne.b 61$ + moveq.l #1,d4 ; vi skal quote denne linja +; cmpi.b #'>',(1,a0) ; er det et quote tegn ? +; bne.b 61$ +; moveq.l #2,d4 ; rød +61$ moveq.l #0,d0 + moveq.l #0,d1 + lea (ScreenUpd,a3),a1 + move.b (0,a1,d2.w),d0 + move.b #99,d1 + lea (tmptext,NodeBase),a1 + bsr copy + lea (tmptext,NodeBase),a0 + bsr strlen + move.w d0,-(a7) + lea (tmptext,NodeBase),a0 + move.l d4,d1 + bsr maywritequotetext + move.w (a7)+,d0 + add.w d0,(FizzX,a3) + lea (ScreenClr,a3),a0 + move.w (FizzX,a3),d0 + cmp.b (0,a0,d2.w),d0 + bls.b 8$ + move.b d0,(0,a0,d2.w) +8$ lea (ScreenClr,a3),a0 + move.w (FizzX,a3),d0 + cmp.b (0,a0,d2.w),d0 + bcc.b 88$ + move.b d0,(0,a0,d2.w) + bsr ControlErase +88$ lea (ScreenUpd,a3),a0 + move.w (WindowWith,a3),d0 + move.b d0,(0,a0,d2.w) +7$ addq.w #1,d2 + cmp.w (WindowEnd,a3),d2 + bls 6$ + bsr 20$ + bne.b 72$ + bsr 10$ +72$ bsr readchar + bne.b 73$ + tst.b (readcharstatus,NodeBase) + notz + bne.b 73$ + setn + bra.b 9$ +73$ move.b d0,(CharIn,a3) + clrn +9$ pop d2/d3/d4 + rts + +10$ move.w (NrLines,a2),d0 + cmp.w (LastN,a3),d0 + beq.b 11$ + move.w #20,d0 + move.w #2,d1 + bsr MoveCursor + bsr ControlNormAtt + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 + move.w (NrLines,a2),d0 + move.w d0,(LastN,a3) + bsr konverter + move.b #' ',(a0)+ + move.b #' ',(a0)+ + move.b #' ',(a0)+ + move.b #0,(a0) + lea (tmptext,NodeBase),a0 + bsr writetexti +11$ move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEXYon,d0 + beq 12$ + move.w (Y,a3),d0 + cmp.w (LastY,a3),d0 + beq.b 13$ + move.w #69,d0 + move.w #2,d1 + bsr MoveCursor + bsr ControlNormAtt + cmpi.w #100,(Y,a3) + bcc.b 14$ + move.b #' ',d0 + bsr writechar + cmpi.w #10,(Y,a3) + bcc.b 14$ + move.b #' ',d0 + bsr writechar +14$ moveq.l #0,d0 + move.w (Y,a3),d0 + bsr skrivnr + move.b #':',d0 + bsr writechar + move.w (WindowWith,a3),(FizzX,a3) + move.w (Y,a3),(LastY,a3) + +13$ move.w (X,a3),d0 + cmp.w (LastX,a3),d0 + beq.b 12$ + move.w #73,d0 + move.w #2,d1 + bsr MoveCursor + bsr ControlNormAtt + moveq.l #0,d0 + move.w (X,a3),d0 + bsr skrivnr + move.b #' ',d0 + jsr (writechar) + move.w (X,a3),(LastX,a3) +12$ move.w (X,a3),d0 + move.w (Y,a3),d1 + sub.w (P,a3),d1 + addq.w #WindowTop,d1 + bra MoveCursor + +20$ ; CheckInput +; returnerer N satt, når vi ikke har carrier (Carrier testing er fjernet.) +; returnerer Z = 0, når vi har nytt tegn + move.l (creadreq,NodeBase),d0 + beq.b 22$ + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + bne.b 28$ ; Ja, vi har et tegn +22$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 21$ + movea.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + bne.b 28$ ; Ja, vi har et tegn + ENDC +21$ setz ; nope. Ikke noe tegn +28$ clrn +29$ rts + +IncludeFile + push d2-d5 + move.b (userok,NodeBase),d0 ; nekter hvis han ikke er logget inn ordentelig + beq 9$ + move.w #0,d5 + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 1$ ; Yepp. + jsr (justchecksysopaccess) ; sysop ? + beq 9$ ; nei, ut +1$ bsr ControlHeadAtt +2$ suba.l a1,a1 ; ikke noe filnavn + lea (tmptext,NodeBase),a0 ; Her vil vi ha filnavnet + bsr getfullnamewithreq + bmi.b 12$ ; ikke noen asl. tar vanelig + bne.b 11$ + bra 99$ +12$ move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlErase + move.w #-1,(FizzY,a3) + lea (enterffnametext),a0 + jsr (writetexti) + move.w #30,d0 + bsr getline + beq 99$ +11$ move.l a0,d1 + movea.l (dosbase),a6 + move.l #MODE_OLDFILE,d2 + jsrlib Open + movea.l (exebase),a6 + move.l d0,d4 + bne.b 3$ + bsr ControlAlarm + bra.b 2$ +3$ move.w (MaxFSEbufferlines,a3),d0 + cmp.w (NrLines,a2),d0 + bls 4$ ; for mange linjer. Ferdig + tst.w d5 + bne 4$ ; EOF ?? Jepp, ut + + movea.l (dosbase),a6 + lea (tmptext,NodeBase),a0 + move.l a0,d2 +7$ moveq.l #77,d3 ; max len + move.l d4,d1 + jsrlib FGets + tst.l d0 + bne.b 10$ ; Vi har en linje +6$ move.w #1,d5 ; ferdig/error + movea.l d2,a0 + move.b #0,(a0) + bra.b 8$ +10$ move.l d2,a0 + bsr strlen + move.l d2,a0 +14$ move.b (-1,a0,d0.l),d1 + cmp.b #10,d1 + beq.b 13$ + cmp.b #13,d1 + bne.b 8$ +13$ move.b #0,(-1,a0,d0.l) + subq.l #1,d0 + bcc.b 14$ +8$ movea.l (exebase),a6 + bsr expandtabsstring +; bsr PadLine + lea (LongLine,a3),a1 + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strcopy + lea (LongLine,a3),a0 + lea (tmptext,NodeBase),a1 + moveq.l #0,d0 + move.w (X,a3),d0 + bsr insertstr + move.w (X,a3),d0 + bsr MarkIt + lea (tmptext,NodeBase),a0 + bsr strlen + add.w d0,(X,a3) + lea (LongLine,a3),a0 + bsr strlen + addq.w #1,d0 + cmp.w (X,a3),d0 + bcc.b 5$ + move.w d0,(X,a3) +5$ bsr Wrap + bsr DoReturn + bra 3$ +4$ move.l d4,d1 + movea.l (dosbase),a6 + jsrlib Close + movea.l (exebase),a6 +99$ bsr ControlNormAtt +9$ pop d2-d5 + rts + +; move.w (X,a3),d1 +expandtabsstring + move.l a0,a1 + moveq.l #0,d1 ; Char-Counter +1$ move.b (a0)+,d0 + beq.b 8$ ; End of the string? + addq.w #1,d1 ; One more char in the string now + cmp.b #9,d0 ; TAB? + bne.b 1$ ; no, continue loop + +; It's a tab - compute how many spaces are needed and put it on stack. + bset #16,d1 ; Mark that we've found a tab... + move.w d1,d0 + neg.w d0 + and.w #FSETabSize-1,d0 + add.w d0,d1 + move.w d0,-(a7) ; (number of spaces-1) On stack... + bra.b 1$ + +8$ btst #16,d1 ; Finished scanning the string for tabs - have we discovered any? + bne.b 10$ +9$ rts ; quit + +10$ subq.w #1,a0 ; Yepp - we have some tabs in the string - now copy it from end to start. + lea (a1,d1.w),a1 ; Destination-pointer. + sf (a1) ; Null-termitation. +14$ move.b -(a0),d0 + cmp.b #9,d0 ; TAB? + bne.b 11$ +; It's a tab - replace it with spaces instead. + move.w (a7)+,d0 + beq.b 12$ ; Only one space. + sub.w d0,d1 + subq.w #1,d0 +13$ move.b #' ',-(a1) + dbra d0,13$ +12$ move.b #' ',d0 +11$ move.b d0,-(a1) + subq.w #1,d1 + bne.b 14$ + bra.b 9$ + +WriteFile + movem.l d2-d5,-(a7) + move.b (userok,NodeBase),d0 ; nekter hvis han ikke er logget inn ordentelig + beq 9$ + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 1$ ; Yepp. + jsr (justchecksysopaccess) ; sysop ? + beq 9$ ; nei, ut +1$ bsr ControlHeadAtt +2$ suba.l a1,a1 ; ikke noe filnavn + lea (tmptext,NodeBase),a0 ; Her vil vi ha filnavnet + bsr getfullnamewithreq + bmi.b 12$ ; ikke noen asl. tar vanelig + bne.b 11$ + bra 99$ +12$ move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlErase + move.w #-1,(FizzY,a3) + lea (enterffnametext),a0 + jsr (writetexti) + move.w #30,d0 + bsr getline + beq 99$ +11$ move.l a0,d1 + movea.l (dosbase),a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + movea.l (exebase),a6 + move.l d0,d4 + bne.b 3$ + bsr ControlAlarm + bra.b 2$ +3$ move.w #0,d5 +4$ move.w d5,d0 + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + lea (0,a0,d0.l),a0 + move.l a0,d2 + bsr strlen + movea.l d2,a0 + move.l d0,d3 + addq.l #1,d3 + move.b #10,(-1,a0,d3.w) + move.l d4,d1 + movea.l (dosbase),a6 + jsrlib Write + movea.l (exebase),a6 + movea.l d2,a0 + move.b #0,(-1,a0,d3.w) + cmp.l d3,d0 + beq.b 5$ + move.l d4,d1 + movea.l (dosbase),a6 + jsrlib Close + movea.l (exebase),a6 + bra.b 99$ +5$ addq.w #1,d5 + cmp.w (NrLines,a2),d5 + bcs.b 4$ + move.l d4,d1 + movea.l (dosbase),a6 + jsrlib Close + movea.l (exebase),a6 +99$ bsr ControlNormAtt +9$ movem.l (a7)+,d2-d5 + rts + +quotemessage + push d2/a6 +; d2 - I + move.w #1,d2 +0$ move.w d2,d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + lea (0,a0,d0.l),a6 + movea.l a6,a0 + bsr strlen + beq.b 1$ + cmp.w #LinesSize-3,d0 + bcs.b 2$ + move.b #0,(-1,a6,d0.w) +2$ move.b #'>',d0 + moveq #0,d1 + movea.l a6,a0 + bsr.w insert +1$ addq.w #1,d2 + cmp.w (NrLines,a2),d2 + bls.b 0$ + pop d2/a6 + bsr.w RedrawScreen + rts + +TrimMessage + push d2/a6 +; d2 - I + move.w #1,d2 +1$ move.w d2,d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + lea (0,a0,d0.l),a6 + movea.l a6,a0 + bsr strlen + move.w d0,d0 +2$ tst.w d0 + beq.b 3$ + cmpi.b #' ',(-1,a6,d0.w) + bne.b 3$ + subq.w #1,d0 + bra.b 2$ +3$ move.b #0,(0,a6,d0.w) + addq.w #1,d2 + cmp.w (NrLines,a2),d2 + bls.b 1$ +4$ move.w (NrLines,a2),d0 + beq.b 9$ + subq.w #1,d0 + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + lea (0,a0,d0.l),a0 + bsr strlen + bne.b 9$ + subq.w #1,(NrLines,a2) + bra.b 4$ +9$ pop d2/a6 + rts + +packmessage + move.l d2,-(a7) + moveq.l #0,d2 + move.l (FSEbuffer,a3),a1 +1$ cmp.w (NrLines,a2),d2 + bcc.b 2$ + move.w d2,d0 + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + lea (0,a0,d0.l),a0 + bsr strcopy + move.b #10,(-1,a1) + addq.l #1,d2 + bra.b 1$ +2$ move.b #0,(-1,a1) + move.l (FSEbuffer,a3),a0 + bsr strlen + move.w d0,(NrBytes,a2) + move.l (FSEbuffer,a3),a0 + move.l (a7)+,d2 + rts + +unpackmessage + push d2/d3/d4/d5/a2/a3/d6 + move.l a0,(tmpstore,NodeBase) ; husker msgheader + moveq.l #0,d0 + move.w (NrBytes,a0),d0 + move.w (MaxFSEbufferlines,a3),d5 ; max linjer + move.l (FSEbuffer,a3),a2 ; a2 = starten på meldingen + movea.l a2,a3 + adda.l d0,a3 ; a3 = slutten på meldingen + moveq.l #LinesSize,d4 + move.w (NrLines,a0),d3 ; d3 = antall linjer + cmp.w d5,d3 + bls.b 4$ ; plass + move.w d5,d3 + move.w d3,(NrLines,a0) ; Oppdaterer antall linjer + move.w d3,d0 ; legger en null på slutten + mulu.w d4,d0 ; av meldinga.. + move.l a2,a3 + add.l d0,a3 ; setter ny slutt + bra.b 5$ +4$ move.w d3,d0 ; legger en null på slutten + mulu.w d4,d0 ; av meldinga.. +5$ move.b #0,(0,a2,d0.l) + subq.w #1,d3 + bls.b 9$ ; Z = 1, C = 1 + mulu.w d4,d3 +1$ move.b #0,(a3) ; Stanser linja her + moveq.l #0,d6 ; antall tegn +2$ cmpa.l a3,a2 ; sikkerhet + bhi.b 3$ ; panic. :-) + addq.l #1,d6 + cmp.b #79,d6 + bhi.b 6$ ; 79 < d6 + cmpi.b #10,-(a3) ; leter etter linefeed + bne.b 2$ +6$ lea (0,a2,d3.l),a1 ; beregner destination + lea (1,a3),a0 ; alt etter linefeed'et + bsr strrcopy + sub.l d4,d3 + beq.b 7$ + cmpi.b #10,(a3) ; Var det NL vi stanset for ? + beq.b 1$ ; jepp. + lea (1,a3),a3 + bra.b 1$ +7$ move.b #0,(a3) +3$ movea.l (tmpstore,NodeBase),a0 ; henter msgheader + move.w (NrLines,a0),d0 ; Sjekker om vi kan øke med en linje + cmp.w d5,d0 + bcc.b 9$ ; Det kan vi ikke + addq.w #1,d0 ;: øker med 1 + move.w d0,(NrLines,a0) + mulu.w d4,d0 ; Tømmer den nye linja + move.b #0,(0,a2,d0.l) +9$ pop d2/d3/d4/d5/a2/a3/d6 + rts + +showfseheader + move.l d2,-(a7) + move.w d0,d2 + bsr ControlClear + move.w #-1,d0 + move.w d0,(LastN,a3) + move.w d0,(LastX,a3) + move.w d0,(LastY,a3) + move.w d0,(FizzX,a3) + move.w d0,(FizzY,a3) + move.w #1,d1 + bsr 10$ + move.w (confnr,NodeBase),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + jsr (writetext) + lea (spacehashtext),a0 + jsr (writetext) + move.l (Number,a2),d0 + bsr skrivnr + move.b (Security,a2),d0 + btst #SECB_SecReceiver,d0 + beq.b 1$ + lea (privatemsgtext),a0 + jsr (writetext) +1$ bsr ControlHeadAtt + lea (tonoansitext),a0 + jsr (writetext) + lea (maintmptext,NodeBase),a0 + jsr (writetext) + lea (spaceresptext),a0 + jsr (writetext) + lea (Subject,a2),a0 + jsr (writetexti) + move.w #2,d1 + bsr 10$ + lea (linesinmesgtext),a0 + jsr (writetexti) + move.w #3,d1 + bsr 10$ + lea (fseinfotext),a0 + jsr (writetexti) + move.w #4,d1 + bsr.b 10$ + move.w #5,d1 + bsr.b 10$ + lea (bordertext),a0 + move.w d2,d0 + subq.w #1,d0 + jsr (writetextleni) + move.b #'>',d0 + jsr (writechar) + bsr ControlNormAtt + bsr showfsemode + move.w #WindowTop,d0 +2$ move.w d0,d2 + add.w (P,a3),d2 + subq.w #WindowTop,d2 + lea (ScreenClr,a3),a0 + move.b #1,(0,a0,d0.w) + lea (ScreenUpd,a3),a0 + move.w (WindowWith,a3),d1 + move.b d1,(0,a0,d0.w) + move.w (MaxFSEbufferlines,a3),d1 + cmp.w d2,d1 + bcs.b 3$ + move.l (FSEbuffer,a3),a1 + move.w d2,d1 + subq.w #1,d1 + mulu.w #LinesSize,d1 + tst.b (0,a1,d1.l) + beq.b 3$ + move.b #1,(0,a0,d0.w) +3$ addq.w #1,d0 + cmp.w (WindowEnd,a3),d0 + bls.b 2$ + + move.l (a7)+,d2 + rts + +10$ move.w d1,-(a7) + bsr ControlHeadAtt + move.w (a7)+,d1 + move.w #1,d0 + bsr MoveCursor + bra ControlErase + +ShowHelp + bsr ControlClear + lea (fsehelppagetext),a0 + bsr strlen + lea (fsehelppagetext),a0 + moveq.l #0,d1 + jsr (writetextmemi) + bsr readchar + bne.b 1$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ +1$ move.w (WindowWith,a3),d0 + bsr showfseheader + clrz +9$ rts + +ChangeSubject + move.b (userok,NodeBase),d0 ; nekter hvis han ikke er logget inn ordentelig + beq ControlAlarm + move.w (confnr,NodeBase),d0 + cmpi.w #4,d0 ; userinfo ? + beq ControlAlarm + cmpi.w #6,d0 ; fileinfo ? + beq ControlAlarm + bsr ControlHeadAtt + move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + lea (subjecttext),a0 + jsr (writetexti) + move.b #0,(FSEditor,NodeBase) ; Vi er ikke i FSE akkuratt nå... + move.w #30,d0 + bsr getline + beq.b 1$ + moveq.l #30,d0 + lea (Subject,a2),a1 + bsr strcopymaxlen +1$ move.b #1,(FSEditor,NodeBase) ; Vi er i FSE. + move.w #-1,(FizzY,a3) + bsr ControlNormAtt + move.w (WindowWith,a3),d0 + bsr showfseheader + rts + +ToggleSecurity + move.b (Security,a2),d0 + andi.b #SECF_SecNone,d0 + beq.b 1$ + move.l (MsgTo,a2),d0 + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 3$ + move.w (confnr,NodeBase),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.w (n_ConfSW,a0,d0.l),d0 + andi.w #CONFSWF_PostBox+CONFSWF_Private,d0 + beq.b 3$ + move.b #SECF_SecReceiver,(Security,a2) + bra.b 2$ +3$ bsr ControlAlarm + rts +1$ move.w (confnr,NodeBase),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.w (n_ConfSW,a0,d0.l),d0 + btst #CONFSWB_PostBox,d0 + bne.b 3$ + move.b #SECF_SecNone,(Security,a2) +2$ ; bsr ControlNormAtt + move.w (WindowWith,a3),d0 + bsr showfseheader +9$ rts + +ControlCursor + exg d0,d1 + movem.l d0/d1,-(a7) + lea (tmptext,NodeBase),a1 + lea (escrbrackettext),a0 + bsr strcopy + subq.l #1,a1 + movea.l a1,a0 + move.l (a7)+,d0 + bsr konverterw + move.b #';',(a0)+ + move.l (a7)+,d0 + bsr konverterw + move.b #'H',(a0)+ + move.b #0,(a0) + lea (tmptext,NodeBase),a0 + jmp (writetexti) + +ControlDelete + move.l d2,-(a7) + move.w d0,d2 +1$ lea (Deletetext),a0 + jsr (writetexti) + subq.w #1,d2 + bne.b 1$ + move.l (a7)+,d2 + rts + +ControlInsert + move.l d2,-(a7) + move.w d0,d2 +1$ lea (Inserttext),a0 + jsr (writetexti) + subq.w #1,d2 + bne.b 1$ + move.l (a7)+,d2 + rts + +ControlNormAtt + cmpi.w #7,(CurColor,a3) + bne.b 1$ + rts +1$ move.w #7,(CurColor,a3) + lea (NormAtttext),a0 +; bra.b MayWriteANSI + +MayWriteANSI + move.w (Userbits+CU,NodeBase),d0 ; Vil vi ha ansi text ? + andi.w #USERF_ColorMessages,d0 + beq.b 9$ ; nei. + jsr (writetexti) +9$ rts + +MayAutoQuote + move.w (Userbits+CU,NodeBase),d0 ; Vil brukerene autoquote ? + andi.w #USERF_AutoQuote,d0 + beq.b 9$ ; nei. + bsr quotemessage ; JEO +9$ rts + +ControlHeadAtt + cmpi.w #6,(CurColor,a3) + beq.b 9$ + move.w #6,(CurColor,a3) + lea (HeadAtttext),a0 + bra.b MayWriteANSI +9$ rts + +ControlyellowAtt + cmpi.w #3,(CurColor,a3) + beq.b 9$ + move.w #3,(CurColor,a3) + lea (ansiyellowtext),a0 + bra.b MayWriteANSI +9$ rts + +ControlredAtt + cmpi.w #3,(CurColor,a3) + beq.b 9$ + move.w #3,(CurColor,a3) + lea (ansiredtext),a0 + bra.b MayWriteANSI +9$ rts + +ControlWarnAtt + cmpi.w #1,(CurColor,a3) + beq.b 9$ + move.w #1,(CurColor,a3) + lea (WarnAtttext),a0 + bra.b MayWriteANSI +9$ rts + +ControlClear + lea (ansiclearsctext),a0 + jmp (writetexti) + +ControlErase + lea (ansiclearlntext),a0 + jmp (writetexti) + +ControlAlarm + move.b #7,d0 + jmp (writechari) + +fseinserttext + move.l d2,-(a7) + move.l a0,d2 +1$ movea.l d2,a0 + move.b (a0)+,d0 + beq.b 9$ + move.l a0,d2 + bsr.b fseinsertchar + bra.b 1$ +9$ move.l (a7)+,d2 + rts + +fseinsertchar + move.l d2,-(a7) + move.l d0,d2 + bsr PadLine + lea (LongLine,a3),a1 + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strcopy + lea (LongLine,a3),a0 + move.b d2,d0 + moveq.l #0,d1 + move.w (X,a3),d1 + bsr insert + move.b #0,(1,a0) ; paranoia (insert etterlater a0 på slutten. + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEOverwritemode,d0 + beq.b 31$ + lea (LongLine,a3),a0 + moveq.l #0,d0 + move.w (X,a3),d0 + addq.w #1,d0 + move.w #1,d1 + bsr delete +31$ move.w (X,a3),d0 + bsr MarkIt + addq.w #1,(X,a3) + bsr Wrap + move.l (a7)+,d2 + rts + +; a0 = text +; d0 = length +; d1 = quting (true/false) 0 = ikke, 1 = lys blå, 2 = mørk blå. +maywritequotetext + push a0/d0 + tst.w d1 + beq.b 1$ ; nei + cmpi.w #1,d1 + beq.b 3$ + bsr ControlredAtt + bra.b 2$ +3$ bsr ControlHeadAtt + bra.b 2$ +1$ bsr ControlNormAtt +2$ pop a0/d0 + jsr (writetextleni) +9$ rts + +;maywritequotetext +; move.w d2,-(a7) +; move.w d1,d2 ; skal dette quite's ? +; beq.b 1$ ; nei +; push a0/d0 +; bsr ControlHeadAtt +; pop a0/d0 +;1$ jsr writetextleni +; tst.w d2 ; var det quiting ? +; beq.b 9$ ; nope +; bsr ControlNormAtt +;9$ move.w (a7)+,d2 +; rts + +;a0 = msgheader +;a1 = buffer +;d0 = max size +;d1 = WindowWith +fseeditor + movem.l a2/a3,-(a7) + movea.l a0,a2 + move.l (Tmpusermem,NodeBase),a3 + move.b #0,(ZapEcho,a3) + move.b #0,(HaveCR,a3) + move.w d1,(WindowWith,a3) + move.l a1,(FSEbuffer,a3) + divu #LinesSize,d0 + move.w d0,(MaxFSEbufferlines,a3) + move.w #24,d0 + move.w (PageLength+CU,NodeBase),d1 + cmp.w d0,d1 + bls.b 1$ + move.w d1,d0 + cmpi.w #MaxScreen,d0 + bls.b 1$ + move.w #MaxScreen,d0 +1$ move.w d0,(WindowEnd,a3) + subq.w #WindowTop,d0 + move.w d0,(WindowSiz,a3) + lea (SavedLines,a3),a0 + moveq.l #0,d0 +2$ move.b #0,(0,a0,d0.w) ; Nulstiller savedlines + addi.w #LinesSize,d0 + cmpi.w #LinesSize*NrSavedLines,d0 + bcs.b 2$ + + cmpi.b #2,(FSEditor,NodeBase) ; Skal vi includere ? + bne.b 22$ ; Nei. + movea.l a2,a0 + bsr unpackmessage +; bra.b 24$ + move.w (NrLines,a2),d0 ; Nullstiler resten av bufferet. + mulu.w #LinesSize,d0 + move.l (FSEbuffer,a3),a0 + movea.l a0,a1 + adda.l d0,a0 + adda.l (msgmemsize,NodeBase),a1 + bra.b 23$ +22$ move.w #0,(NrLines,a2) ; Sletter. + move.l (FSEbuffer,a3),a0 + movea.l a0,a1 + adda.l (msgmemsize,NodeBase),a1 +21$ move.b #0,(a0) ; Nulstiller melding buffer + lea (LinesSize,a0),a0 +23$ cmpa.l a1,a0 + bcs.b 21$ + +24$ bsr MayAutoQuote; JEO + move.b #1,(FSEditor,NodeBase) ; Vi er i FSE. + move.w #0,(LastSave,a3) + move.b #0,(LongLine,a3) + move.w #1,d0 + move.w d0,(Y,a3) + move.w d0,(X,a3) + move.w d0,(P,a3) + move.b #NoShift,(ShiftStatus,a3) + move.w (WindowWith,a3),d0 + bsr showfseheader + +3$ bsr UpdateScreenMaybe + bmi 999$ +31$ cmpi.b #NoShift,(ShiftStatus,a3) + bne 4$ + + move.b (CharIn,a3),d0 + cmpi.b #' ',d0 + bcs.b 300$ + cmpi.b #$7f,d0 + beq 328$ + cmpi.b #$9b,d0 + beq 329$ + + move.b (CharIn,a3),d0 + bsr fseinsertchar + bra 3$ + +300$ cmpi.b #$01,d0 ; ctl/A + bne.b 301$ + bsr DoWordLeft + bra 399$ +301$ cmpi.b #$02,d0 ; ctl/B + bne.b 302$ + move.w (Y,a3),d0 + bsr DoLineInsert + subq.w #1,(LastSave,a3) + bcc.b 332$ + move.w #NrSavedLines-1,(LastSave,a3) +332$ move.l (FSEbuffer,a3),a1 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a1 + lea (SavedLines,a3),a0 + move.w (LastSave,a3),d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + bsr strcopy + move.w #1,d0 + bsr MarkIt + bra 399$ +302$ cmpi.b #$03,d0 ; ctl/C + bne.b 303$ +3021$ bsr DoPageDown + bra 399$ +303$ cmpi.b #$04,d0 ; ctl/D + bne.b 304$ + bsr DoForward + bra 399$ +304$ cmpi.b #$05,d0 ; ctl/E + bne.b 305$ + bsr DoUpward + bra 399$ +305$ cmpi.b #$06,d0 ; ctl/F + bne.b 306$ + bsr DoWordRight + bra 399$ +306$ cmpi.b #$07,d0 ; ctl/G + bne.b 307$ + bsr DoDelCharacter + bra 399$ +307$ cmpi.b #$08,d0 ; bs + bne.b 308$ + bsr DoBackspace + bra 399$ +308$ cmpi.b #$09,d0 ; ht + bne.b 309$ + bsr DoTAB + bra 399$ +309$ cmpi.b #$0A,d0 ; lf + bne.b 310$ + bsr DoNewLine + bra 399$ +310$ cmpi.b #$0B,d0 ; ctl/K + bne.b 311$ + move.b #CtrlKshift,(ShiftStatus,a3) + move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlHeadAtt + lea (ctlrktext),a0 + jsr (writetexti) + bsr ControlNormAtt + move.w #-1,(FizzY,a3) + bra 399$ +311$ cmpi.b #$0C,d0 ; ctl/L + bne.b 312$ + eori.w #SAVEBITSF_FSEXYon,(Savebits+CU,NodeBase) + move.w #-1,d0 + move.w d0,(LastY,a3) + move.w d0,(LastX,a3) + move.w (Savebits+CU,NodeBase),d0 + andi.w #SAVEBITSF_FSEXYon,d0 + bne 399$ + move.w #69,d0 + move.w #2,d1 + bsr MoveCursor + lea (spacetext),a0 + moveq.l #7,d0 + jsr (writetextleni) + bra 399$ +312$ cmpi.b #$0D,d0 ; cr + bne.b 313$ + bsr DoReturn + bra 399$ +313$ cmpi.b #$0E,d0 ; ctl/N + bne.b 314$ + bra 330$ +314$ cmpi.b #$10,d0 ; ctl/P + bne.b 315$ +330$ move.w (WindowWith,a3),d0 + bsr showfseheader + clr.b (ZapEcho,a3) + bra 399$ +315$ cmpi.b #$0F,d0 ; ctl/O + bne.b 316$ + move.w (Y,a3),d0 + bsr DoLineInsert + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + move.b #0,(0,a0,d0.l) + move.w #1,d0 + bsr MarkIt + bra 399$ +316$ cmpi.b #$11,d0 ; ctl/Q + bne.b 317$ +334$ move.b #NoShift,(ShiftStatus,a3) + move.w #25,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlWarnAtt + lea (abortmsgtext),a0 + jsr (writetexti) + bsr ControlNormAtt + bsr UpdateScreenMaybe + bmi.b 999$ + move.b (CharIn,a3),d0 + bsr upchar + cmpi.b #'Y',d0 + bne.b 331$ +999$ move.w #1,d0 + move.w (WindowEnd,a3),d1 + addq.w #3,d1 + bsr MoveCursor + move.b #0,(FSEditor,NodeBase) + setz + bra 9$ +331$ move.w #-1,(FizzX,a3) + move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlHeadAtt + bsr ControlErase + bsr ControlNormAtt + bra 399$ +317$ cmpi.b #$12,d0 ; ctl/R + bne.b 318$ +3171$ bsr DoPageUp + bra 399$ +318$ cmpi.b #$13,d0 ; ctl/S + bne.b 319$ + bsr DoBackward + bra 399$ +319$ cmpi.b #$14,d0 ; ctl/T + bne.b 320$ + movem.l d2/a2,-(a7) + moveq.l #0,d2 + move.l (FSEbuffer,a3),a2 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a2,d0.l),a2 + move.w (X,a3),d0 + cmpi.b #' ',(-1,a2,d0.w) + bne.b 335$ + bset #31,D2 +335$ bsr DoDelCharacter + addq.w #1,d2 + cmpi.w #80,d2 + bhi.b 336$ + move.w (X,a3),d0 + move.b (-1,a2,d0.w),d0 + btst #31,d2 + beq.b 338$ + cmpi.b #' ',d0 + bne.b 336$ + bra.b 339$ +338$ cmpi.b #' ',d0 + beq.b 336$ +339$ movea.l a2,a0 + bsr strlen + cmp.w (X,a3),d0 + bcc.b 335$ +336$ movem.l (a7)+,d2/a2 + bra 399$ +320$ cmpi.b #$15,d0 ; ctl/U + bne.b 321$ + bsr ShowHelp + beq 999$ ; vi fikk no carrier + bra 399$ +321$ cmpi.b #$16,d0 ; ctl/V + bne.b 322$ + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_FSEOverwritemode,d0 + beq.b 337$ + eori.w #SAVEBITSF_FSEAutoIndent,(Savebits+CU,NodeBase) +337$ eori.w #SAVEBITSF_FSEOverwritemode,(Savebits+CU,NodeBase) + bsr showfsemode + bra 399$ +322$ cmpi.b #$17,d0 ; ctl/W + bne.b 323$ + bra 399$ +323$ cmpi.b #$18,d0 ; ctl/X + bne.b 324$ + bsr DoDownward + bra 399$ +324$ cmpi.b #$19,d0 ; ctl/Y + bne.b 325$ + move.l (FSEbuffer,a3),a0 + move.w (Y,a3),d0 + subq.w #1,d0 + mulu.w #LinesSize,d0 + lea (0,a0,d0.l),a0 + lea (SavedLines,a3),a1 + move.w (LastSave,a3),d0 + mulu.w #LinesSize,d0 + lea (0,a1,d0.l),a1 + bsr strcopy + move.w (LastSave,a3),d0 + addq.w #1,d0 + cmpi.w #NrSavedLines,d0 + bcs.b 333$ + move.w #0,d0 +333$ move.w d0,(LastSave,a3) + move.w (Y,a3),d0 + bsr DoLineDelete + bra 399$ +325$ cmpi.b #$1A,d0 ; ctl/Z + bne.b 326$ + move.w #1,d0 + move.w (WindowEnd,a3),d1 + addq.w #3,d1 + bsr MoveCursor + bsr TrimMessage + bsr packmessage + move.b #0,(FSEditor,NodeBase) + tst.w (NrLines,a2) + bra 9$ +326$ cmpi.b #$1B,d0 ; esc + bne.b 398$ + move.b #ESCshift,(ShiftStatus,a3) + bra.b 399$ + +328$ bsr DoDelCharacter ; del + bra.b 399$ + +329$ move.b #CSIshift,(ShiftStatus,a3) + bra.b 399$ + +398$ bsr ControlAlarm +399$ clr.b (HaveCR,a3) + cmpi.b #13,(CharIn,a3) + bne 3$ + move.b #1,(HaveCR,a3) + bra 3$ + + +4$ cmpi.b #CtrlKshift,(ShiftStatus,a3) + bne.b 5$ + move.b (CharIn,a3),d0 + bsr upchar + cmpi.b #'P',d0 + bne.b 41$ + bsr ToggleSecurity + bra.b 49$ +41$ cmpi.b #'Q',d0 + beq 334$ + cmpi.b #'R',d0 + bne.b 43$ + bsr IncludeFile + bra.b 49$ +43$ cmpi.b #'S',d0 + bne.b 44$ + bsr ChangeSubject + bra.b 49$ +44$ cmpi.b #'W',d0 + bne.b 45$ + bsr WriteFile + bra.b 49$ +45$ cmpi.b #'Z',d0 + bne.b 46$ + eori.b #$ff,(ZapEcho,a3) + bra.b 49$ +46$ cmpi.b #'>',d0 + bne.b 49$ + bsr quotemessage +49$ move.b #NoShift,(ShiftStatus,a3) + move.w #1,d0 + move.w #4,d1 + bsr MoveCursor + bsr ControlHeadAtt + bsr ControlErase + bsr ControlNormAtt + bra 3$ + +5$ cmpi.b #CSIshift,(ShiftStatus,a3) + beq.b 51$ + cmpi.b #CSIspaceshift,(ShiftStatus,a3) + beq 513$ + cmpi.b #ESCshift,(ShiftStatus,a3) + bne 6$ +51$ move.b #NoShift,(ShiftStatus,a3) + move.b (CharIn,a3),d0 + cmpi.b #'0',d0 + bcs.b 52$ + cmpi.b #'?',d0 + bhi.b 52$ + move.b #CSIshift,(ShiftStatus,a3) + move.b d0,(CSInum,a3) + bra 3$ +52$ cmpi.b #'A',d0 + bne.b 53$ + bsr DoUpward + bra 3$ +53$ cmpi.b #'B',d0 + bne.b 54$ + bsr DoDownward + bra 3$ +54$ cmpi.b #'C',d0 + bne.b 55$ + bsr DoForward + bra 3$ +55$ cmpi.b #'D',d0 + bne.b 56$ + bsr DoBackward + bra 3$ +56$ cmpi.b #'H',d0 + bne.b 57$ +561$ bsr DoHomeward + bra 3$ +57$ cmpi.b #'K',d0 + bne.b 58$ +571$ bsr DoEndward + bra 3$ +58$ cmpi.b #'O',d0 + bne.b 59$ + move.b #VT100shift,(ShiftStatus,a3) + bra 3$ +59$ cmpi.b #'~',d0 + bne.b 510$ + cmpi.b #1,(tegn_fra,NodeBase) ; var dette ifra console ? + bne.b 512$ ; nei + moveq.l #0,d0 + move.b (CSInum,a3),d0 + subi.b #'0',d0 + bcs.b 512$ + cmpi.b #10,d0 + bcc.b 512$ + lsl.l #2,d0 + lea (keys,MainBase),a0 + adda.l d0,a0 + move.l (a0),d0 + beq 3$ + movea.l d0,a0 + bsr fseinserttext + bra 3$ + +510$ cmpi.b #'[',d0 + bne.b 511$ + move.b #CSIshift,(ShiftStatus,a3) + bra 3$ +511$ cmpi.b #'T',d0 + beq 3171$ + cmpi.b #'S',d0 + beq 3021$ + cmpi.b #' ',d0 + bne.b 512$ + move.b #CSIspaceshift,(ShiftStatus,a3) + bra 3$ + +513$ move.b #NoShift,(ShiftStatus,a3) + move.b (CharIn,a3),d0 + cmpi.b #'A',d0 + beq 561$ + cmpi.b #'@',d0 + beq 571$ + cmp.b #'v',d0 ; clipboard paste ? + beq.b 514$ ; ja +512$ bsr ControlAlarm + bra 3$ + +514$ cmp.b #1,(tegn_fra,NodeBase) + bne.b 512$ ; nekter hvis ikke "0 v" kom fra console + jsr dosnip ; behandler paste + beq 3$ ; ikke noe tegn, fortsett + move.b d0,(CharIn,a3) + bra 31$ ; fortsetter uten en readchar + +6$ cmpi.b #VT100shift,(ShiftStatus,a3) + bne 7$ + move.b #NoShift,(ShiftStatus,a3) + move.b (CharIn,a3),d0 + cmpi.b #'P',d0 + bne.b 61$ + eori.w #SAVEBITSF_FSEOverwritemode,(Savebits+CU,NodeBase) + bsr showfsemode + bra 3$ +61$ cmpi.b #'q',d0 + beq.b 62$ + cmpi.b #'R',d0 + bne.b 63$ +62$ bsr DoEndward + bra 3$ +63$ cmpi.b #'r',d0 + bne.b 64$ + bsr DoDownward + bra 3$ +64$ cmpi.b #'s',d0 + bne.b 65$ + bsr DoPageDown + bra 3$ +65$ cmpi.b #'t',d0 + bne.b 66$ + bsr DoBackward + bra 3$ +66$ cmpi.b #'u',d0 + beq 3$ + cmpi.b #'v',d0 + bne.b 67$ + bsr DoForward + bra 3$ +67$ cmpi.b #'w',d0 + bne.b 68$ + bsr DoHomeward + bra 3$ +68$ cmpi.b #'x',d0 + bne.b 610$ + bsr DoUpward + bra 3$ +610$ cmpi.b #'y',d0 + bne.b 611$ + bsr DoPageUp + bra 3$ +611$ bsr ControlAlarm + bra 3$ + + +7$ move.b #NoShift,(ShiftStatus,a3) + bra 3$ +9$ movem.l (a7)+,a2/a3 + rts + +; a0 - string +; d0.b - tegn +; d1.l - pos +insert subq.l #1,d1 + bcc.b 2$ + moveq.l #0,d1 +2$ adda.l d1,a0 +1$ move.b (a0),d1 + move.b d0,(a0)+ + move.b d1,d0 + bne.b 1$ + move.b #0,(a0) + rts + +; a0 - dest string +; a1 - source string +; d0.l - pos +insertstr + movem.l a2/a3/d2/d3,-(a7) +;a2 - dest +;a3 - source +;d2 - destlen +;d3 - sourcelen + movea.l a1,a3 + subq.l #1,d0 + bcc.b 2$ + moveq.l #0,d0 +2$ adda.l d0,a0 + movea.l a0,a2 + bsr strlen + move.l d0,d2 + movea.l a3,a0 + bsr strlen + move.l d0,d3 + add.l d2,d0 + move.l d2,d1 + move.b #0,(1,a2,d0.w) +1$ move.b (0,a2,d1.w),(0,a2,d0.w) + subq.l #1,d0 + subq.l #1,d1 + bcc.b 1$ +4$ move.b (a3)+,d0 + beq.b 3$ + move.b d0,(a2)+ + bra.b 4$ +3$ movem.l (a7)+,a2/a3/d2/d3 + rts + +; a0 - string +; d0.l - pos +; d1.w - antall +delete subq.l #1,d0 + bcc.b 2$ + moveq.l #0,d0 +2$ adda.l d0,a0 +1$ move.b (0,a0,d1.w),(a0)+ + bne.b 1$ + rts + +; a0 - source +; a1 - dest +; d0.l - startpos +; d1.w - maksantall +copy subq.w #1,d1 + bcs.b 4$ + subq.l #1,d0 + bcc.b 2$ + moveq.l #0,d0 +2$ adda.l d0,a0 +3$ move.b (a0)+,(a1)+ + beq.b 9$ + dbf d1,3$ +4$ move.b #0,(a1) +9$ rts + + section data,DATA + +; For FSE (og litt i getline) +WarnAtttext dc.b '',0 +NormAtttext dc.b '',0 +HeadAtttext dc.b '',0 +escrbrackettext dc.b '[',0 +ansiclearsctext dc.b '',0 +ansiclearlntext dc.b '',0 +Inserttext dc.b '',0 +Deletetext dc.b '',0 + +spacehashtext dc.b ' #',0 +spaceresptext dc.b ' re: ',0 +linesinmesgtext dc.b 'Lines in message:',0 +fseinfotext dc.b 'Ctrl/Z=done, Ctrl/Q=abort, Ctrl/U=help, move with arrow/Wordstar keys',0 +inserttext dc.b 'Insert ',0 +overwritetext dc.b 'OverWrite',0 +autoindenttext dc.b 'AutoIndent',0 +noindenttext dc.b 'No Indent ',0 +ctlrktext dc.b '^K',0 + +fsehelppagetext dc.b 'Screen editor help:',10,10 + dc.b ' Enter = new line Backspace = delete prev char',10 + dc.b ' Home = start line, page, message Del = delete current char',10 + dc.b ' End = end line, page, message TAB = skip 8 columns',10,10 + dc.b 'Ctrl/A back a word Ctrl/B ins. deleted line Ctrl/C forward a page',10 + dc.b 'Ctrl/D forward one char Ctrl/E up one character Ctrl/F forward a word',10 + dc.b 'Ctrl/G delete character Ctrl/L toggle XY display Ctrl/N rewrite screen',10 + dc.b 'Ctrl/O open new line Ctrl/Q exit DON''T SAVE Ctrl/R back a page',10 + dc.b 'Ctrl/S back a character Ctrl/T delete word Ctrl/V insert/indent modes',10 + dc.b 'Ctrl/X down a character Ctrl/Y delete line CTRL/Z SAVE and EXIT',10 + dc.b 'Ctrl/K,S change subject Ctrl/K,R or W read/write local file (local/sysop only)',10 + dc.b 'Ctrl/K,P toggle public/private Ctrl/K,> quote message',10 + dc.b ' Ctrl/K+Q exit DON''T SAVE',10 + dc.b ' Ctrl/L and Ctrl/V keys are remembered between sessions.',10 + dc.b 'Up to 10 lines are remembered by Ctrl/Y and can be reinserted with Ctrl/B',10,10 + dc.b ' <>',0 + + END ; That's all Folks !!! diff --git a/Hippo.c b/Hippo.c new file mode 100644 index 0000000..37d9ee4 --- /dev/null +++ b/Hippo.c @@ -0,0 +1,418 @@ + /**************************************************************** + * + * NAME + * Hippo.c + * + * DESCRIPTION + * Hippo routines for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id$ + * + * MODIFICATION HISTORY + * $Log$ + * + ****************************************************************/ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#define a4a5 register __a4 struct ramblocks *nodebase,register __a5 struct Mainmemory *mainmeory +#define usea4a5 nodebase,mainmeory + +__asm int hippopackmessages(a4a5); +__asm int hippounpackmessages (a4a5); +__asm int dohippograbmsg (register __d0 int nr, register __d1 int conf,register __d2 BPTR msgfil,a4a5, + register __d3 int *msgnr,register __d4 int *touser,register __d5 int *numgrabbed); +__asm int hippounpackmsg (register __d0 BPTR msgfil,a4a5); + +extern far ULONG exebase; +extern far struct DosLibrary *DOSBase; +extern far struct Library *UtilityBase; +extern far char logentermsgtext[]; +extern far char logreplymsgtext[]; +extern far UBYTE fraISOtilIBN[128]; +extern far UBYTE fraIBNtilISO[128]; + +extern far int msprintf(char *, const char *, ...); +extern __asm far writetexto (register __a0 char *text,a4a5); +extern __asm far writeerroro (register __a0 char *text,a4a5); +extern __asm far UWORD loadmsg (register __a0 char *msgtext, + register __a1 struct MessageRecord *msgheader, + register __d0 ULONG msgnr, register __d1 UWORD confnr,a4a5); +extern __asm far UWORD savemsg (register __a0 char *msgtext, + register __a1 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm far UWORD loadmsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 ULONG msgnr, register __d1 UWORD confnr,a4a5); +extern __asm far UWORD loadmsgtext (register __a0 UBYTE *msgbyf, + register __a1 struct MessageRecord *msgheader,register __d0 UWORD confnr,a4a5); +extern __asm far UWORD savemsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm far UWORD savemsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm int kanskrive (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm int getfromname (register __a0 struct MessageRecord *msgheader, + register __a1 UBYTE *msgtext,a4a5); +extern __asm int gettoname (register __a0 struct MessageRecord *msgheader, + register __a1 UBYTE *msgtext,a4a5); +extern __asm int skipnetnames (register __a0 UBYTE *msgtext,register __d0 int msgsize,a4a5); + +extern __asm far void removefromqueue (register __d0 ULONG msgnr,a4a5); +extern __asm far ULONG gettopqueue (a4a5); +extern __asm far void unjoin (a4a5); +extern __asm short getnextconfnr (register __d0 short conf,a4a5); + +__asm int hippounpackmessages (a4a5) +{ + return (0); +} + +/* returns -1 for fatal errors, 1 for endoffile, 2 for non-fatal error (msg skipped) + and 0 for all ok (1 message parsed) +*/ +__asm int hippounpackmsg (register __d0 BPTR msgfil,a4a5) +{ + return (0); +} + +__asm int hippopackmessages(a4a5) +{ + BPTR msgfil; + char tmpstring[40]; + int conf; + int message,msgpacked,touser,tousertot; + int dobreak,highmsg; + int ret = 1; + int msgnr = 1,tmp; + int startconf; + char string[80]; + struct ConfigRecord *configdata = &mainmeory->config; + + putreg (REG_A6,exebase); + writetexto ("**************************** Making HIPPO Packet *****************************\n",usea4a5); + writetexto ("Conference High # Total For You",usea4a5); + + while (1) { + msprintf (tmpstring,"%ls/%s.HD",nodebase->Nodemem.TmpPath, + configdata->BaseName); + if (!(msgfil = Open(tmpstring,MODE_NEWFILE))) { + putreg (REG_A6,exebase); + writeerroro ("Error opening msg file",usea4a5); + break; + } + putreg (REG_A6,exebase); + + startconf = nodebase->confnr/2; + dobreak = 0; + msgpacked = 0; + touser = 0; + + while ((message = gettopqueue(usea4a5)) && !dobreak) { + if (dohippograbmsg (message,startconf,msgfil,usea4a5,&msgnr,&touser,&msgpacked)) { + dobreak = 1; + break; + } + removefromqueue (message,usea4a5); + } + if (dobreak) + break; + unjoin(usea4a5); + + if (msgpacked) { + msprintf (string,"%-33ls %-9ld %-9ld %ld", + configdata->firstconference[startconf].n_ConfName, + configdata->firstconference[startconf].n_ConfDefaultMsg, + msgpacked,touser); + writetexto (string,usea4a5); + } + tousertot = touser; + + conf = startconf; + do { + conf = getnextconfnr(conf*2,usea4a5)/2; + if (conf >= configdata->Maxconferences) + conf = 0; + tmp = 0; + + if (!*(configdata->firstconference[conf].n_ConfName)) + continue; + + if (!(nodebase->CU.firstuserconf[conf].uc_Access & ACCF_Read)) + continue; + + msgpacked = 0; + touser = 0; + + highmsg = configdata->firstconference[conf].n_ConfDefaultMsg; + + message = nodebase->CU.firstuserconf[conf].uc_LastRead+1; + +/* Sjekker om vi skal bruke max scan */ + if (message == 1) { + if ((highmsg - message) > configdata->firstconference[conf].n_ConfMaxScan) + message = highmsg - configdata->firstconference[conf].n_ConfMaxScan; + } + + for (; message <= highmsg; message++) { + if (!message) + continue; + + tmp = 1; + if (dohippograbmsg (message,conf,msgfil,usea4a5,&msgnr,&touser,&msgpacked)) { + dobreak = 1; + break; + } + } +/* Mark read +*/ + if (!dobreak && tmp) { + nodebase->CU.firstuserconf[conf].uc_LastRead = highmsg; + msprintf (string,"%-33ls %-9ld %-9ld %ld", + configdata->firstconference[conf].n_ConfName, + configdata->firstconference[startconf].n_ConfDefaultMsg, + msgpacked,touser); + writetexto (string,usea4a5); + tousertot += touser; + } + + } while (!dobreak && (conf != startconf)); + + if (dobreak) + break; + + msprintf (string,"\nNumber of messages %-9ld",msgnr-1); + writetexto (string,usea4a5); + + msprintf (string,"\nMessages to you %-9ld",tousertot); + writetexto (string,usea4a5); + + writetexto ("\nPacking...",usea4a5); + + ret = 0; + break; + } + + if (msgfil) + Close (msgfil); + + if (ret) + DeleteFile (tmpstring); + + putreg (REG_A6,exebase); + return (ret ? -1L : (msgnr-1)); +} + +__asm int dohippograbmsg (register __d0 int nr, register __d1 int conf,register __d2 BPTR msgfil,a4a5, + register __d3 int *msgnr,register __d4 int *touser,register __d5 int *numgrabbed) +{ + struct ClockData dt; + ULONG secs; + char *ptr,*ptr2; + char string[256]; + int msgsize; + int ret = 1; + struct MessageRecord *msgheader; + struct ConfigRecord *configdata = &mainmeory->config; + + msgheader = &nodebase->tmpmsgheader; + + putreg (REG_A6,exebase); + if (loadmsg (nodebase->tmpmsgmem,msgheader,nr,conf*2,usea4a5)) { + msprintf (string,"Error loading message (%ls:%ld)", + configdata->firstconference[conf].n_ConfName,nr); + writeerroro (string,usea4a5); + return (1); + } + + if (kanskrive (msgheader,conf*2,usea4a5)) + return (0); + + while (TRUE) { + if (FPuts (msgfil,"Command: Message\n")) { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + msprintf (string,"Area: %ls\n",configdata->firstconference[conf].n_ConfName); + if (FPuts (msgfil,string)) { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + if ((msgheader->MsgStatus & MSTATF_MsgRead) || + (msgheader->Security & SECF_SecReceiver)) { + strcpy (string,"Status:"); + + if (msgheader->MsgStatus & MSTATF_MsgRead) + strcat (string," Private"); + if (msgheader->Security & SECF_SecReceiver) + strcat (string," Read"); + + strcat (string,"\n"); + + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + } + + msprintf (string,"Number: %ld\n",msgheader->Number); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + if (msgheader->RefTo) + { + msprintf (string,"Reply: %ld\n",msgheader->RefTo); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + } + + if (msgheader->RefBy) + { + msprintf (string,"Next: %ld\n",msgheader->RefBy); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + } + + if (msgheader->RefNxt) + { + msprintf (string,"NReply: %ld\n",msgheader->RefNxt); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + } + + secs = msgheader->MsgTimeStamp.ds_Days*24*60*60; + secs += msgheader->MsgTimeStamp.ds_Minute*60; + secs += msgheader->MsgTimeStamp.ds_Tick/TICKS_PER_SECOND; + Amiga2Date (secs,&dt); + msprintf (string,"Subject: %ls\nDate: %ld%02ld%02ld%02ld%02ld%02ld\n", + msgheader->Subject,dt.year,dt.month,dt.mday,dt.hour, + dt.min,dt.sec); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + putreg (REG_A6,exebase); + getfromname (msgheader,nodebase->tmpmsgmem,usea4a5); ptr = (UBYTE *) getreg (REG_A0); + msprintf (string,"From: %ls\n",ptr); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + putreg (REG_A6,exebase); + gettoname (msgheader,nodebase->tmpmsgmem,usea4a5); ptr = (UBYTE *) getreg (REG_A0); + msprintf (string,"To: %ls\n",ptr); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + msprintf (string,"Lines: %ld\n", + msgheader->NrLines > 0 ? msgheader->NrLines : -msgheader->NrLines); + if (FPuts (msgfil,string)) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + *msgnr += 1; + + putreg (REG_A6,exebase); + msgsize = skipnetnames (nodebase->tmpmsgmem,msgheader->NrBytes,usea4a5); + ptr2 = (UBYTE *) getreg (REG_A0); + + + if (1 != FWrite (msgfil,ptr2,msgsize,1)) { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + if (FPuts (msgfil,"\n")) + { + putreg (REG_A6,exebase); writeerroro ("File error",usea4a5); break; + } + + ret = 0; + break; + } + + putreg (REG_A6,exebase); + + if (!ret) + *numgrabbed += 1; + + return (ret); +} + +static __asm unsigned char convertchartoiso (register __d0 unsigned char c,a4a5) +{ + if (c > 127) { + c = fraIBNtilISO[c-128]; + if (!c) + c = ' '; + } + + return (c); +} + +static __asm unsigned char convertcharfromiso (register __d0 unsigned char c,a4a5) +{ + if (c > 127) { + c = fraISOtilIBN[c-128]; + if (!c) + c = ' '; + } + + return (c); +} + +/* +{ + int n; + +/ * ingen oversetting hvis det er ISO +* / + if (NodeBase->Charset) { + if ((NodeBase->Charset < 3) || (NodeBase->Charset == 12)) { + if (NodeBase->Charset == 12) + n = 3; + else + n = NodeBase->Charset; + + if (c > 127) { + c = convertISOtoxxx[n][c-128]; + if (!c) + c = ' '; + } + } else { + } + } + + return (c); +*/ + diff --git a/Include/.RELEASE.h b/Include/.RELEASE.h new file mode 100644 index 0000000..bde5859 --- /dev/null +++ b/Include/.RELEASE.h @@ -0,0 +1,230 @@ +#ifndef BBS_H +#define BBS_H + +#ifndef EXEC_TYPES_H +#include "exec/types.h" +#endif + +#ifndef EXEC_NODES_H +#include "exec/nodes.h" +#endif + +#ifndef EXEC_IO_H +#include "exec/io.h" +#endif + +#ifndef LIBRARIES_DOS_H +#include "libraries/dos.h" +#endif + +#define ConfigRev 1 + +#define ABBS_PUBLICSCREENNAME "ABBS Screen" + +#define LinesSize equ 80 + +#define Sizeof_NameT 30 +#define Sizeof_PassT 8 +#define Sizeof_NPassT 12 +#define Sizeof_TelNo 16 +#define Sizeof_FileDescription 36 +#define Sizeof_FileName 18 +#define Sizeof_loginscript 14 + +typedef char NameT[31]; +typedef char NameTbug[30]; +typedef char PassT[9]; +typedef char NPassT[12]; +typedef char TelNoT[17]; +typedef char FileName[19]; +typedef char FileDescription[37]; +typedef char ModemStrT[61]; +typedef char ModemSStrT[17]; +typedef char LoginScript[14]; + +struct Userconf { + UWORD uc_Access; + ULONG uc_LastRead; +}; + +struct UserRecord { + NameT Name; /* First AND Last name */ + UBYTE pass_10; + ULONG Usernr; /* User number */ + PassT Password; /* users password */ + NameT Address; /* Street address */ + NameT CityState; /* City/State */ + TelNoT HomeTelno; /* home telephone */ + TelNoT WorkTelno; /* work telephone */ + UBYTE pass_11; + UWORD TimeLimit; /* daily time limit */ + UWORD FileLimit; /* daily file time limit */ + UWORD PageLength; /* page length */ + UBYTE Protocol; /* download protocol */ + UBYTE Charset; /* character set */ + UBYTE ScratchFormat; + UBYTE XpertLevel; + UWORD Userbits; /* See bit definitions */ + NameT UserScript; + UBYTE pad_1332; + LONG ResymeMsgNr; + UBYTE MessageFilterV; + UBYTE GrabFormat; + UWORD u_ByteRatiov; /* i bytes */ + UWORD u_FileRatiov; /* i filer */ + UBYTE u_reserved1[16]; +/* startsave */ + UWORD Uploaded; /* files uploaded */ + UWORD Downloaded; /* files downloaded */ + LONG KbUploaded; + LONG KbDownloaded; + UWORD TimesOn; /* number of times on */ + struct DateStamp LastAccess; + /* last time on system */ + UWORD TimeUsed; /* minutes on system today */ + UWORD MsgsLeft; /* messages entered */ + ULONG MsgsRead; /* messages read */ + ULONG Totaltime; /* total time on system */ + LONG NFday; /* last day user took Newfiles */ + UWORD FTimeUsed; /* file min's on system today */ + UWORD Savebits; + ULONG MsgaGrab; + UBYTE u_reserved2[20]; + struct Userconf firstuserconf[1]; +}; + +#define SIZEOFUSERRECORD (sizeof (struct UserRecord)-sizeof (struct Userconf)) + +#define u_startsave Uploaded +#define u_endsave u_reserved2+6 + +#define ACCB_Read 0 +#define ACCB_Write 1 +#define ACCB_Upload 2 +#define ACCB_Download 3 +#define ACCB_FileVIP 4 +/*#define ACCB_Invited 5 */ +#define ACCB_Sigop 6 +#define ACCB_Sysop 7 + +#define ACCF_Read (1L<<0) +#define ACCF_Write (1L<<1) +#define ACCF_Upload (1L<<2) +#define ACCF_Download (1L<<3) +#define ACCF_FileVIP (1L<<4) +/*#define ACCF_Invited (1L<<5) */ +#define ACCF_Sigop (1L<<6) +#define ACCF_Sysop (1L<<7) + +#define USERB_Killed 0 /* user is dead */ +#define USERB_FSE 1 /* use FSE */ +#define USERB_ANSIMenus 2 +#define USERB_ColorMessages 3 +#define USERB_G_R 4 /* use G&R protocol */ +#define USERB_KeepOwnMsgs 5 /* Mark written messages */ +#define USERB_ANSI 6 +#define USERB_ClearScreen 7 +#define USERB_RAW 8 +#define USERB_NameAndAdress 9 +#define USERB_Filter 10 +#define USERB_SendBulletins 11 + +#define USERF_Killed (1L<<0) /* user is dead */ +#define USERF_FSE (1L<<1) /* use FSE */ +#define USERF_ANSIMenus (1L<<2) +#define USERF_ColorMessages (1L<<3) +#define USERF_G_R (1L<<4) /* use G&R protocol */ +#define USERF_KeepOwnMsgs (1L<<5) /* Mark written messages */ +#define USERF_ANSI (1L<<6) +#define USERF_ClearScreen (1L<<7) +#define USERF_RAW (1L<<8) +#define USERF_NameAndAdress (1L<<9) +#define USERF_Filter (1L<<10) +#define USERF_SendBulletins (1L<<11) + +struct Fileentry { + FileName Filename; // Filenavn (18 tegn) + UBYTE pad1; // En pad. + UWORD Filestatus; // Diverse flags + ULONG Fsize; // Filstørrelse i bytes + ULONG Uploader; // Hvem som uploada fila + ULONG PrivateULto; // Fila mottager / conf (conf = #/2+1) + ULONG AntallDLs; // Hvor mange som har downloada fila + ULONG Infomsgnr; // Meldingsnummer i FileInfo i filinfo konfen + struct DateStamp ULdate; // Dato fila ble uploada + FileDescription Filedescription; // Filbeskrivelse (36 tegn) + UBYTE pad2; // En pad til +}; + +/* filestatus +*/ +#define FILESTATUSB_PrivateUL 0 +#define FILESTATUSB_PrivateConfUL 1 +#define FILESTATUSB_Filemoved 2 +#define FILESTATUSB_Fileremoved 3 +#define FILESTATUSB_FreeDL 4 +#define FILESTATUSB_ArcTested 5 +#define FILESTATUSB_VirusTested 6 + +#define FILESTATUSF_PrivateUL (1L<<0) +#define FILESTATUSF_PrivateConfUL (1L<<1) +#define FILESTATUSF_Filemoved (1L<<2) +#define FILESTATUSF_Fileremoved (1L<<3) +#define FILESTATUSF_FreeDL (1L<<4) +#define FILESTATUSF_ArcTested (1L<<5) +#define FILESTATUSF_VirusTested (1L<<6) + +// ********************************** +struct ConfigRecord { + UWORD Revision; /* ConfigRev = Revision of configfile */ + ULONG Configsize; + ULONG UserrecordSize; + UWORD Maxconferences; + UWORD MaxfileDirs; + ULONG Users; /* number of users registerd */ + ULONG MaxUsers; /* max number of users registred */ + NameT BaseName; /* name of this BBS */ + NameT SYSOPname; + ULONG SYSOPUsernr; + NPassT SYSOPpassword; /* brukes ved lokal login. Hvis tom, ikke noe passord.. */ + NPassT ClosedPassword; /* brukes ikke enda */ + UWORD MaxLinesMessage; + UWORD ActiveConf; /* limited to Maxconferences */ + UWORD ActiveDirs; /* limited to MaxFileDirs */ + UWORD NewUserTimeLimit; + UWORD SleepTime; + UBYTE DefaultCharSet; + UBYTE Cflags; + UWORD NewUserFileLimit; + + UWORD ByteRatiov; /* i bytes */ + UWORD FileRatiov; /* i filer */ + UWORD MinULSpace; /* i KB */ + UBYTE Cflags2; + UBYTE pad_a123; + NPassT dosPassword; + UBYTE cnfg_empty[256]; + struct FileDirRecord *firstFileDirRecord; + struct ConferenceRecord firstconference[1]; +}; + +#define SIZEOFCONFIGRECORD (sizeof (struct ConfigRecord)-sizeof (struct ConferenceRecord)) + +struct FileDirRecord { + NameT n_DirName; + NameT n_DirPaths; + UWORD n_FileOrder; + UWORD n_PrivToConf; +}; + +struct ConferenceRecord { + NameT n_ConfName; + UBYTE n_ConfBullets; + ULONG n_ConfDefaultMsg; /* Highest message in conference */ + ULONG n_ConfFirstMsg; /* First message number in conference */ + UWORD n_ConfOrder; /* order */ + UWORD n_ConfSW; + UWORD n_ConfMaxScan; +}; + +#endif /* BBS_H */ diff --git a/Include/ABBSFront.h b/Include/ABBSFront.h new file mode 100644 index 0000000..a8f3804 --- /dev/null +++ b/Include/ABBSFront.h @@ -0,0 +1,78 @@ +#ifndef ABBSFRONT_H +#define ABBSFRONT_H + +typedef char ModemStrT[61]; +typedef char ModemSStrT[17]; + +struct ConnectMsg { + ULONG cm_fieldCnt; /* Responses present, currently 4 */ + ULONG cm_baud; /* Baud-rate as reported by modem */ + STRPTR cm_connect; /* Extended connect msg eg. /ARQ, /HST */ + STRPTR cm_protocol; /* Protocol as reported by modem */ + STRPTR cm_compression; /* Compression as reported by modem */ + /* More fields could follow here, check cm_fieldCnt */ +}; + +struct FrontMsg { + struct Message msg; + UWORD f_Command; + UWORD f_Error; + struct ConnectMsg *f_Connect; + STRPTR f_LoginString; + UWORD f_Flags; +}; + +#define FFLAGSB_NoInit 0 +#define FFLAGSB_NoHangup 1 + +#define FFLAGSF_NoInit (1L<<0) +#define FFLAGSF_NoHangup (1L<<1) + +/* Commands +*/ +#define front_SleepSer 0 /* ingen parametre. Får abbs til å "glemme serieporten" */ +#define front_DoLogin 1 /* Du må fylle ut f_Connect og f_LoginString */ +#define front_DropCarrier 2 /* dropper carrier. Ingen parametre */ +#define front_ReplyNOW 3 /* Svarer på meldingen ASAP */ +#define front_AwakeSer 4 /* ingen parametre. Får abbs til å "huske serieporten" */ +#define front_GetSerDev 5 /* Get serial device info */ + +#define F_Error_OK 0 +#define F_Error_UserOnline 1 +#define F_Error_NoSerial 2 +#define F_Error_NoMsgtoReply 3 + +struct FrontNodeRecord { + UBYTE f_NodeRecord_pad; + UBYTE f_CommsPort; /* 0 = local, else port = n-1 */ + UBYTE f_ConnectWait; /* max time to wait from ring to connect (seconds) */ + UBYTE f_NodeRecord_pad1; /* Private */ + ULONG f_MinBaud; /* minimum baud to accept for this node */ + UWORD f_Setup; /* See Bit definitions below */ + ULONG f_NodeBaud; /* baud to use between modem-machine */ + ModemStrT f_Serialdevicename; + ModemStrT f_ModemInitString; + ModemSStrT f_ModemAnswerString; + ModemSStrT f_ModemOffHookString; + ModemSStrT f_ModemOnHookString; + ModemSStrT f_ModemCallString; + ModemSStrT f_ModemRingString; + ModemSStrT f_ModemConnectString; + ModemSStrT f_ModemOKString; + ModemSStrT f_ModemATString; + ModemSStrT f_ModemNoCarrierString; +}; + +/* #define SETUPB_XonXoff 0 */ /* NOT IN USE */ +#define FSETUPB_RTSCTS 1 +#define FSETUPB_Lockedbaud 2 +#define FSETUPB_SimpelHangup 3 +#define FSETUPB_NullModem 4 + +/* #define FSETUPF_XonXoff (1L<<0) */ +#define FSETUPF_RTSCTS (1L<<1) +#define FSETUPF_Lockedbaud (1L<<2) +#define FSETUPF_SimpelHangup (1L<<3) +#define FSETUPF_NullModem (1L<<4) + +#endif /* ABBSFRONT_H */ diff --git a/Include/ABBSFront.i b/Include/ABBSFront.i new file mode 100644 index 0000000..845c667 --- /dev/null +++ b/Include/ABBSFront.i @@ -0,0 +1,67 @@ + IFND ABBSFRONT_I +ABBSFRONT_I SET 1 + + STRUCTURE ConnectMsg,0 + ULONG cm_fieldCnt ; Responses present, currently 4 + ULONG cm_baud ; Baud-rate as reported by modem + CPTR cm_connect ; Extended connect msg eg. /ARQ, /HST + CPTR cm_protocol ; Protocol as reported by modem + CPTR cm_compression ; Compression as reported by modem + LABEL ConnectMsg_SIZE + + STRUCTURE FrontMsg,MN_SIZE + UWORD f_Command + UWORD f_Error + ULONG f_Connect + ULONG f_LoginString + UWORD f_Flags + LABEL FrontMsg_SIZE + + BITDEF f_flags,NoInit,0 + BITDEF f_flags,NoHangup,1 + + +* commands + DEVINIT 0 + DEVCMD front_SleepSer ; ingen parametre. Får abbs til å "glemme serieporten" + DEVCMD front_DoLogin ; Du må fylle ut f_Connect og f_LoginString + DEVCMD front_DropCarrier ; dropper carrier. Ingen parametre + DEVCMD front_ReplyNOW ; Svarer på meldingen ASAP + DEVCMD front_AwakeSer ; ingen parametre. Får abbs til å "huske serieporten" igjen. + DEVCMD front_GetSerDev ; Get serial device info + + DEVINIT 0 + DEVCMD F_Error_OK + DEVCMD F_Error_UserOnline + DEVCMD F_Error_NoSerial + DEVCMD F_Error_NoMsgtoReply + + STRUCTURE FrontNodeRecord,0 + UBYTE f_NodeRecord_pad + UBYTE f_CommsPort ; 0 = local, else port = n-1 + UBYTE f_ConnectWait ; max time to wait from ring to connect + UBYTE f_NodeRecord_pad1 ; private + UBYTE f_NodeSetup ; div bits for setup + ULONG f_MinBaud ; minimum baud to accept for this node + UWORD f_Setup ; See Bit definitions below + ULONG f_NodeBaud ; baud to use between modem-machine + ModemStrT f_Serialdevicename + ModemStrT f_ModemInitString + ModemSStrT f_ModemAnswerString + ModemSStrT f_ModemOffHookString + ModemSStrT f_ModemOnHookString + ModemSStrT f_ModemCallString + ModemSStrT f_ModemRingString + ModemSStrT f_ModemConnectString + ModemSStrT f_ModemOKString + ModemSStrT f_ModemATString + ModemSStrT f_ModemNoCarrierString + LABEL FrontNodeRecord_SIZEOF + +; BITDEF f_SETUP,XonXoff,0 ; NOT IN USE + BITDEF f_SETUP,RTSCTS,1 + BITDEF f_SETUP,Lockedbaud,2 + BITDEF f_SETUP,SimpelHangup,3 + BITDEF f_SETUP,NullModem,4 + + ENDC ; ABBSFRONT_I diff --git a/Include/ABBSmy.i b/Include/ABBSmy.i new file mode 100644 index 0000000..ff1fb4f --- /dev/null +++ b/Include/ABBSmy.i @@ -0,0 +1,53 @@ +* +* Source machine generated by GadToolsBox V2.0 +* which is (c) Copyright 1991-1993 Jaba Development +* +* GUI Designed by : Geir Inge +* + +GD_ListViewGadget EQU 0 +GD_ShowGadget EQU 1 +GD_HideGadget EQU 2 +GD_ChatGadget EQU 3 +GD_OffHook EQU 4 +GD_EjectGadget EQU 5 +GD_killgadget EQU 6 +GD_TmpSysopGadget EQU 7 +GD_ShowuserGadget EQU 8 +GD_shutdownGadget EQU 9 +GD_foo2 EQU 10 +GD_CloseABBSGadget EQU 11 +GD_Reopen_node EQU 12 +GD_EjectAll EQU 13 +GD_Init_modem EQU 14 +GD_Release_port EQU 15 +GD_Win_size EQU 16 + +GDX_ListViewGadget EQU 0 +GDX_ShowGadget EQU 1 +GDX_HideGadget EQU 2 +GDX_ChatGadget EQU 3 +GDX_OffHook EQU 4 +GDX_EjectGadget EQU 5 +GDX_killgadget EQU 6 +GDX_TmpSysopGadget EQU 7 +GDX_ShowuserGadget EQU 8 +GDX_shutdownGadget EQU 9 +GDX_foo2 EQU 10 +GDX_CloseABBSGadget EQU 11 +GDX_Reopen_node EQU 12 +GDX_EjectAll EQU 13 +GDX_Init_modem EQU 14 +GDX_Release_port EQU 15 +GDX_Win_size EQU 16 + + XREF OpenABBSAppWindowWindow + XREF CloseABBSAppWindowWindow + XREF SetupScreen + XREF CloseDownScreen + XREF ABBSAppWindowRender + XREF ABBSAppWindowWnd + XREF ABBSAppWindowGadgets + XREF ABBSAppWindowMenus + XREF ABBSAppWindowLeft + XREF ABBSAppWindowTop diff --git a/Include/ABBSmyfix.i b/Include/ABBSmyfix.i new file mode 100644 index 0000000..ec8dd81 --- /dev/null +++ b/Include/ABBSmyfix.i @@ -0,0 +1,25 @@ + XREF exebase + XREF intbase + XREF gfxbase + XREF gadbase + XREF nodelist + +_SysBase equ exebase +_IntuitionBase equ intbase +_GfxBase equ gfxbase +_GadToolsBase equ gadbase + + XDEF OpenABBSAppWindowWindow + XDEF CloseABBSAppWindowWindow + XDEF SetupScreen + XDEF CloseDownScreen + XDEF ABBSAppWindowRender + XDEF ABBSAppWindowWnd + XDEF ABBSAppWindowGadgets + XDEF ABBSAppWindowMenus + XDEF ABBSAppWindowLeft + XDEF ABBSAppWindowTop + + IFND GT_Underscore +GT_Underscore EQU GT_TagBase+64 ; ti_Data points to the symbol + ENDC diff --git a/Include/Browse.pro b/Include/Browse.pro new file mode 100644 index 0000000..f19b93c --- /dev/null +++ b/Include/Browse.pro @@ -0,0 +1,8 @@ + XREF setupbrowse + XREF setuptmpbrowse + XREF addtmpbrowse + XREF dobrowseselect + XREF sendbrowsefiles + XREF cleanuptmpbrowse + XREF setbrowsenodestatus + XREF clearbrowsenodestatus diff --git a/Include/NodeSupport.pro b/Include/NodeSupport.pro new file mode 100644 index 0000000..96325f8 --- /dev/null +++ b/Include/NodeSupport.pro @@ -0,0 +1,6 @@ + XREF isnetmessage + XREF updatewindowtitle + XREF GetCommentUserNr + XREF checkforduplicatetmpdirs + XREF makehardlink + XREF renameconfbulletins diff --git a/Include/NodeSupportdefs.i b/Include/NodeSupportdefs.i new file mode 100644 index 0000000..086e799 --- /dev/null +++ b/Include/NodeSupportdefs.i @@ -0,0 +1,35 @@ + XDEF isnetmessage + XDEF updatewindowtitle + XDEF skiptonewline + XDEF packnetmessage + XDEF doisnetmessage + XDEF GetCommentUserNr + XDEF checkforduplicatetmpdirs + XDEF makehardlink + XDEF renameconfbulletins + + XREF writeerroro + XREF arexxjmp + XREF strcopy + XREF strlen + XREF intbase + XREF exebase + XREF dosbase + XREF nonetext + XREF getbestfilenamebuffer + XREF writetextmemi + XREF getusernumber + XREF writechar + XREF skrivnr + XREF outimage + XREF upchar + XREF startsleepdetect + XREF readchar + XREF nodelist + XREF getkonfbulletlist + XREF getkonfbulletname + XREF konverter + + XREF errorrenbultext + XREF bulletlisttext + XREF bulletinpath diff --git a/Include/QWK.pro b/Include/QWK.pro new file mode 100644 index 0000000..3fdc093 --- /dev/null +++ b/Include/QWK.pro @@ -0,0 +1 @@ + XREF grabQWK diff --git a/Include/abbsint.i b/Include/abbsint.i new file mode 100644 index 0000000..78c578d --- /dev/null +++ b/Include/abbsint.i @@ -0,0 +1,8 @@ +* +* Source machine generated by GadToolsBox V2.0 +* which is (c) Copyright 1991-1993 Jaba Development +* +* GUI Designed by : Geir Inge +* + + XREF OpenProject0Window diff --git a/Include/asm.i b/Include/asm.i new file mode 100644 index 0000000..4c1c92e --- /dev/null +++ b/Include/asm.i @@ -0,0 +1,122 @@ + IFD __ArgAsm + opt L+,D+,O+,S+ ; linkable, debuginfo, optimize (?) + ENDC + + IFD __M68 + DEBUG ON,LATTICE4,CODE,DATA + ENDC + +jsrlib MACRO + IFND _LVO\1 + XREF _LVO\1 + ENDIF + jsr _LVO\1(a6) + ENDM + +jmplib MACRO + IFND _LVO\1 + XREF _LVO\1 + ENDIF + jmp _LVO\1(a6) + ENDM + +openlib MACRO + moveq.l #0,d0 ;LIBRARY_VERSION,d0 + move.l #\1name,a1 + IFND _LVOOpenLibrary + XREF _LVOOpenLibrary + ENDIF + jsr _LVOOpenLibrary(a6) + move.l d0,\1base + beq no_\1 + ENDM + +closlib MACRO + tst.l \1base + beq.s cLIB\@ + move.l \1base,a1 + IFND _LVOCloseLibrary + XREF _LVOCloseLibrary + ENDIF + jsr _LVOCloseLibrary(a6) + clr.l \1base +cLIB\@ + ENDM + +setz macro + ori #$4,ccr + endm + +clrz macro + andi #$fb,ccr + endm + +notz macro + eori #$4,ccr + endm + +clrzn macro + andi #$f3,ccr + endm + +setzn macro + ori #$c,ccr + endm + +setn macro + ori #$8,ccr + endm + +clrn macro + andi #$f7,ccr + endm + +notn macro + eori #$8,ccr + endm + +push macro ;* push + ifc '\1','all' + movem.l d0-d7/a0-a6,-(sp) + endc + ifnc '\1','all' + movem.l \1,-(sp) + endc + endm + +pop macro ;* pull + ifc '\1','all' + movem.l (sp)+,d0-d7/a0-a6 + endc + ifnc '\1','all' + movem.l (sp)+,\1 + endc + endm + +peek macro ;* peek + ifc '\1','all' + movem.l (sp),d0-d7/a0-a6 + endc + ifnc '\1','all' + movem.l (sp),\1 + endc + endm + +musvent MACRO +493673$ btst #6,$bfe001 + bne.s 493673$ +493674$ btst #6,$bfe001 + beq.s 493674$ + ENDM + +vmus macro + btst #6,$bfe001 + endm ; Z = 1 -> Venstre musknapp nede + +hmus macro + btst #10,$dff016 + endm ; Z = 1 -> Høyre musknapp nede + +true equ 1 +false equ 0 +NULL equ 0 diff --git a/Include/bbs.h b/Include/bbs.h new file mode 100644 index 0000000..e51b3fb --- /dev/null +++ b/Include/bbs.h @@ -0,0 +1,831 @@ +#ifndef BBS_H +#define BBS_H + +#ifndef EXEC_TYPES_H +#include "exec/types.h" +#endif + +#ifndef EXEC_NODES_H +#include "exec/nodes.h" +#endif + +#ifndef EXEC_IO_H +#include "exec/io.h" +#endif + +#ifndef LIBRARIES_DOS_H +#include "libraries/dos.h" +#endif + +#define ConfigRev 1 + +#define ABBS_PUBLICSCREENNAME "ABBS Screen" + +#define LinesSize equ 80 + +/* maks er 256.. */ +#ifdef DEMO +#define NumMsgNrInQueue 100 +#else +#define NumMsgNrInQueue 2000 +#endif + +#define MaxInterNodeMsg 10 +#define InterNodeMsgsiz 84 +#define MaxUsersGChat 5 + +#define Sizeof_NameT 30 +#define Sizeof_PassT 8 +#define Sizeof_NPassT 12 +#define Sizeof_TelNo 16 +#define Sizeof_FileDescription 36 +#define Sizeof_FileName 18 +#define Sizeof_loginscript 14 + +typedef char NameT[31]; +typedef char NameTbug[30]; +typedef char PassT[9]; +typedef char NPassT[12]; +typedef char TelNoT[17]; +typedef char FileName[19]; +typedef char FileDescription[37]; +typedef char ModemStrT[61]; +typedef char ModemSStrT[17]; +typedef char LoginScript[14]; + +#define MainPortName "ABBS mainport" +#define NetPortName1 "ABBSnet" +#define NetPortName2 ".port" + +#define maksisøkebuffer 5 + +struct match { + UBYTE m_poeng; + NameT m_navn; +}; + +struct chatnode { + APTR c_Task; /* = 0 -> denne brukes ikke i chat'en */ + LONG c_Sigbit; /* hvilket sigbit vi skal få tilsendt */ + UWORD c_Rpos; /* hvor langt vi har lest */ + NameT c_Name; /* usernavn på denne noden */ + UBYTE c_pad; + ULONG c_Usernr; /* usernr på denne noden */ + ULONG c_Speed; /* 0 = local */ + UWORD c_Status; /* se under */ + UWORD c_color; /* denne nodens farve (OBS : fylles i av lokal noden) */ + UWORD c_Nodenr; /* hvilken nodenr dette er */ +}; + +#define statusB_Splitscreen 0 +#define statusF_Splitscreen (1L<<0) + +struct localchatnode { + APTR l_chatnode; /* peker til vår chatnode hos den andre noden */ + APTR l_chat; /* peker til den andre nodens chat struktur */ +}; + +struct chat { + APTR msgarea; /* starten på meldingsområdet */ + APTR msgareaend; /* Slutten på meldingsområdet */ + UWORD Wpos; /* hvor langt har vi skrevet */ + UWORD ChatNodeNr; + struct chatnode chatnodes[MaxUsersGChat-1]; /* public */ + struct localchatnode localchatnodes[MaxUsersGChat]; /* private */ +}; + +struct ABBSmsg { + struct Message msg; // am_Msg + UWORD Command; // am_Command + UWORD Error; // am_Result + ULONG Data; // am_Arg1 + char *Name; // am_Arg2 + ULONG UserNr; // am_Arg3 + ULONG arg; // am_Arg4 +}; + +struct ABBSpubmsg { + struct Message msg; + UWORD pm_Command; + UWORD pm_Error; + ULONG pm_Data; + ULONG pm_Arg; + ULONG pm_Arg2; +}; + +/* MainCommands +*/ +#define Main_loaduser 0 +#define Main_saveuser 1 +#define Main_createuser 2 +#define Main_getusername 3 +#define Main_getusernumber 4 +#define Main_saveconfig 5 +#define Main_startnode 6 +#define Main_shutdown 7 +#define Main_savemsg 8 +#define Main_loadmsg 9 +#define Main_createconference 10 + +#define Main_loadmsgheader 11 +// Read a messageheader +// +// In: +// Error: (UWORD) confnumber*2 +// Data: (struct AbbsMsgHeader *) +// UserNr: (ULONG) messagenr +// Out: +// Error: 0 - ok +// 1 - error seeking (msg doesn't exist) +// 5 - error reading +// -------------------------------------------------------------------------- + +#define Main_loadmsgtext 12 +#define Main_savemsgheader 13 +#define Main_testconfig_dontuse 14 +#define Main_createbulletin 15 +#define Main_Clearbulletins 16 +#define Main_createfiledir 17 +#define Main_addfile 18 +#define Main_findfile 19 +#define Main_addfiledl 20 +#define Main_loadfileentry 21 +#define Main_savefileentry 22 +#define Main_BroadcastMsg 23 +#define Main_GetMaxConfDirs 24 +#define Main_loadusernr 25 +#define Main_saveusernr 26 +#define Main_ChangeName 27 +#define Main_DeleteDir 28 +#define Main_RenameDir 29 +#define Main_DeleteConference 30 +#define Main_RenameConference 31 +#define Main_NotAvailSysop 32 +#define Main_loadusernrnr 33 +#define Main_saveusernrnr 34 +#define Main_MatchName 35 +#define Main_CleanConference 36 +#define Main_QuitBBS 37 +#define Main_not_AddNetUser 38 +#define Main_not_AddNetBBS 39 +#define Main_PackUserFile 40 +#define Main_OpenScreen 41 +#define Main_CloseScreen 42 +#define Main_Renamefileentry 43 +#define Main_LockABBS 44 +#define Main_UnLockABBS 45 +#define Main_Getconfig 46 +#define Main_LASTCOMM 47 + +/* Public error messages +*/ +#define PError_OK 0 +#define PError_NoPort 1 +#define PError_PError_NoCarrier 2 +#define PError_PError_NoMore 3 + +/* Error messages +*/ +#define Error_OK 0 +#define Error_Not_Found 1 +#define Error_EOF 2 +#define Error_Found 3 +#define Error_Open_File 4 +#define Error_Read 5 +#define Error_Write 6 +#define Error_File 7 +#define Error_Nodeinit 8 +#define Error_Conferencelist_full 9 +#define Error_Bulletinlist_full 10 +#define Error_No_Active_User 11 +#define Error_User_Active 12 +#define Error_Not_allowed 13 +#define Error_Cant_shut_down 14 +#define Error_SavingIndex 15 +#define Error_IllegalCMD 16 +#define Error_NoMem 17 +#define Error_NoPort 18 + +/* Node commands +*/ +#define Node_WriteText 0 +#define Node_WriteTexto 1 +#define Node_FlushSer 2 +#define Node_WriteSerLen 3 +#define Node_ReadSerLen 4 +#define Node_QuitLogin 5 +#define Node_ReadSer 6 +#define Node_LASTCOMM 7 + +/* Private commands +*/ +#define Node_Reloaduser 0x8000 +#define Node_Eject 0x8001 +#define Node_Gotosleep 0x8002 +#define Node_Wakeupagain 0x8003 +#define Node_Killuser 0x8004 +#define Node_TmpSysop 0x8005 +#define Node_Show 0x8006 +#define Node_Hide 0x8007 +#define Node_chat 0x8008 +#define Node_ShowUser 0x8009 +#define Node_Shutdown 0x800a +#define Node_GetRegs 0x800b +#define Node_InitModem 0x800c +#define Node_ReleasePort 0x800d +#define Node_OffHook 0x800e +#define Node_LASTPRIVCOMM 0x800f + +/* Net commands +*/ +#define Net_DoLogin 0 +#define Net_LASTCOMM 1 + +/* line status +*/ +#define OK 0 +#define Timeout 1 +#define NoCarrier 2 +#define Thrownout 3 + +struct Nodenode { + struct Node Nodenode; + ULONG Nodeusernr; + UWORD Nodenr; + UWORD Nodestatus; + UBYTE Nodedivstatus; /* se under */ + UBYTE NodeECstatus; /* MNP eller V32bis */ + ULONG NodesubStatus; + ULONG Nodespeed; + ULONG NodeTask; + ULONG InterMsgSig; + UWORD InterMsgread; + UWORD InterMsgwrite; + NameT Nodeuser; + NameT NodeuserCityState; + char NodeStatusText[120]; + UBYTE InterNodeMsg[InterNodeMsgsiz*MaxInterNodeMsg]; + struct ABBSmsg Nodemsg; + APTR nodenode_nodemem; + ULONG Nodenode_alloc; +}; + +#define NDSB_Notavail 0 +#define NDSB_Stealth 1 +#define NDSB_WaitforChatCon 2 + +#define NDSF_Notavail (1L<<0) +#define NDSF_Stealth (1L<<1) +#define NDSF_WaitforChatCon (1L<<2) + +#define NECSB_MNP 0 +#define NECSB_V42BIS 1 +#define NECSB_UPDATED 2 + +#define NECSF_MNP (1L<<0) +#define NECSF_V42BIS (1L<<1) +#define NECSF_UPDATED (1L<<2) + +struct intermsg { + UBYTE i_type; + UBYTE i_pri; + UWORD i_franode; + ULONG i_usernr; + ULONG i_usernr2; + NameT i_Name; + NameT i_Name2; + UWORD i_conf; + ULONG i_msgnr; +}; +#define i_msg i_usernr + +#define i_type_login 0 +#define i_type_logout 1 +#define i_type_msg 2 +#define i_type_entermsg 3 +#define i_type_chatreq 4 + +struct ParagonMsg { + struct Message msg; + UWORD p_Command; + UWORD p_Data; + UBYTE p_string[72]; + APTR p_msg; + APTR p_config; + UWORD p_carrier; +}; + +struct RexxParam { + ULONG rx_NumParam; + APTR rx_ptr1; + APTR rx_ptr2; + APTR rx_ptr3; + APTR rx_ptr4; + APTR rx_ptr5; +}; + +struct OldUserRecord { + NameT Name; /* First AND Last name */ + UBYTE pass_10; + ULONG Usernr; /* User number */ + PassT Password; /* users password */ + NameT Address; /* Street address */ + NameT CityState; /* City/State */ + TelNoT HomeTelno; /* home telephone */ + TelNoT WorkTelno; /* work telephone */ + UBYTE pass_11; + UWORD TimeLimit; /* daily time limit */ + UWORD FileLimit; /* daily file time limit */ + UWORD PageLength; /* page length */ + UBYTE Protocol; /* download protocol */ + UBYTE Charset; /* character set */ + UBYTE ScratchFormat; + UBYTE XpertLevel; + UWORD Userbits; /* See bit definitions */ + UBYTE ConfAccess[100*1]; +/* SEven */ + LoginScript UserScript; + LONG ResymeMsgNr; + UBYTE MessageFilterV; + UBYTE GrabFormat; + UWORD u_ByteRatiov; /* i bytes */ + UWORD u_FileRatiov; /* i filer */ + UWORD Uploaded; /* files uploaded */ + UWORD Downloaded; /* files downloaded */ + LONG KbUploaded; + LONG KbDownloaded; + UWORD TimesOn; /* number of times on */ + struct DateStamp LastAccess; + /* last time on system */ + UWORD TimeUsed; /* minutes on system today */ + UWORD MsgsLeft; /* messages entered */ + ULONG MsgsRead; /* messages read */ + ULONG Totaltime; /* total time on system */ + ULONG Conflastread[100]; + /* zero is for MAIN */ + LONG NFday; /* last day user took Newfiles */ + UWORD FTimeUsed; /* file min's on system today */ + UWORD Savebits; + ULONG MsgaGrab; + UBYTE u_reserved2[6]; +}; + +struct Userconf { + UWORD uc_Access; + ULONG uc_LastRead; +}; + +#define ACCB_Read 0 +#define ACCB_Write 1 +#define ACCB_Upload 2 +#define ACCB_Download 3 +#define ACCB_FileVIP 4 +#define ACCB_Invited 5 +#define ACCB_Sigop 6 +#define ACCB_Sysop 7 + +#define ACCF_Read (1L<<0) +#define ACCF_Write (1L<<1) +#define ACCF_Upload (1L<<2) +#define ACCF_Download (1L<<3) +#define ACCF_FileVIP (1L<<4) +#define ACCF_Invited (1L<<5) +#define ACCF_Sigop (1L<<6) +#define ACCF_Sysop (1L<<7) + +struct Log_entry { + ULONG l_RecordNr; /* Hvilken record i userfile har han ? */ + ULONG l_UserNr; + NameT l_Name; + UBYTE l_pad; + UWORD l_UserBits; /* Er brukeren død ?? */ +}; + +struct UserRecord { + NameT Name; /* First AND Last name */ + UBYTE pass_10; + ULONG Usernr; /* User number */ + PassT Password; /* users password */ + NameT Address; /* Street address */ + NameT CityState; /* City/State */ + TelNoT HomeTelno; /* home telephone */ + TelNoT WorkTelno; /* work telephone */ + UBYTE pass_11; + UWORD TimeLimit; /* daily time limit */ + UWORD FileLimit; /* daily file time limit */ + UWORD PageLength; /* page length */ + UBYTE Protocol; /* download protocol */ + UBYTE Charset; /* character set */ + UBYTE ScratchFormat; + UBYTE XpertLevel; + UWORD Userbits; /* See bit definitions */ + NameT UserScript; + UBYTE pad_1332; + LONG ResymeMsgNr; + UBYTE MessageFilterV; + UBYTE GrabFormat; + UWORD u_ByteRatiov; /* i bytes */ + UWORD u_FileRatiov; /* i filer */ + UBYTE u_reserved1[16]; +/* startsave */ + UWORD Uploaded; /* files uploaded */ + UWORD Downloaded; /* files downloaded */ + LONG KbUploaded; + LONG KbDownloaded; + UWORD TimesOn; /* number of times on */ + struct DateStamp LastAccess; + /* last time on system */ + UWORD TimeUsed; /* minutes on system today */ + UWORD MsgsLeft; /* messages entered */ + ULONG MsgsRead; /* messages read */ + ULONG Totaltime; /* total time on system */ + LONG NFday; /* last day user took Newfiles */ + UWORD FTimeUsed; /* file min's on system today */ + UWORD Savebits; + ULONG MsgaGrab; + UBYTE u_reserved2[20]; + struct Userconf firstuserconf[1]; +}; + +#define SIZEOFUSERRECORD (sizeof (struct UserRecord)-sizeof (struct Userconf)) + +#define u_startsave Uploaded +#define u_endsave u_reserved2+6 + +#define USERB_Killed 0 /* user is dead */ +#define USERB_FSE 1 /* use FSE */ +#define USERB_ANSIMenus 2 +#define USERB_ColorMessages 3 +#define USERB_G_R 4 /* use G&R protocol */ +#define USERB_KeepOwnMsgs 5 /* Mark written messages */ +#define USERB_ANSI 6 +#define USERB_ClearScreen 7 +#define USERB_RAW 8 +#define USERB_NameAndAdress 9 +#define USERB_Filter 10 +#define USERB_SendBulletins 11 +#define USERB_AutoQuote 12 + +#define USERF_Killed (1L<<0) /* user is dead */ +#define USERF_FSE (1L<<1) /* use FSE */ +#define USERF_ANSIMenus (1L<<2) +#define USERF_ColorMessages (1L<<3) +#define USERF_G_R (1L<<4) /* use G&R protocol */ +#define USERF_KeepOwnMsgs (1L<<5) /* Mark written messages */ +#define USERF_ANSI (1L<<6) +#define USERF_ClearScreen (1L<<7) +#define USERF_RAW (1L<<8) +#define USERF_NameAndAdress (1L<<9) +#define USERF_Filter (1L<<10) +#define USERF_SendBulletins (1L<<11) + +#define SAVEBITSB_FSEOverwritemode 0 /* */ +#define SAVEBITSB_FSEXYon 1 /* */ +#define SAVEBITSB_FSEAutoIndent 2 /* */ +#define SAVEBITSB_ReadRef 3 /* */ +#define SAVEBITSB_LostDL 4 /* */ +#define SAVEBITSB_Dontshowconfs 5 /* */ + +#define SAVEBITSF_FSEOverwritemode (1L<<0) /* */ +#define SAVEBITSF_FSEXYon (1L<<1) /* */ +#define SAVEBITSF_FSEAutoIndent (1L<<2) /* */ +#define SAVEBITSF_ReadRef (1L<<3) /* */ +#define SAVEBITSF_LostDL (1L<<4) /* */ +#define SAVEBITSF_Dontshowconfs (1L<<5) /* */ + +struct MessageRecord { + ULONG Number; /* Message Number */ + UBYTE MsgStatus; /* Message Status */ + UBYTE Security; /* Message security */ + ULONG MsgFrom; /* user number */ + ULONG MsgTo; /* Ditto (-1=ALL) */ + NameT Subject; /* subject of message*/ + UBYTE MsgBits; /* Misc bits */ + struct DateStamp MsgTimeStamp; /* time entered*/ + ULONG RefTo; /* refers to */ + ULONG RefBy; /* first answer */ + ULONG RefNxt; /* next in this thread*/ + WORD NrLines; /* number of lines, negative if net names in message body */ + UWORD NrBytes; /* number of bytes */ + ULONG TextOffs; /* offset in text file*/ +}; + +#define MSTATB_NormalMsg 0 +#define MSTATB_KilledByAuthor 1 +#define MSTATB_KilledBySysop 2 +#define MSTATB_KilledBySigop 3 +#define MSTATB_Moved 4 +#define MSTATB_Diskkilled 5 // Slettet fysisk fra disken? +#define MSTATB_MsgRead 6 +#define MSTATB_Dontshow 7 // Slettes av ABBS dersom brukeren er killa etc + +#define MSTATF_NormalMsg (1L<<0) +#define MSTATF_KilledByAuthor (1L<<1) +#define MSTATF_KilledBySysop (1L<<2) +#define MSTATF_KilledBySigop (1L<<3) +#define MSTATF_Moved (1L<<4) +#define MSTATF_Diskkilled (1L<<5) // Slettet fysisk fra disken? +#define MSTATF_MsgRead (1L<<6) /* read by receiver */ +#define MSTATF_Dontshow (1L<<7) + +#define SECB_SecNone 0 +#define SECB_SecPassword 1 +#define SECB_SecReceiver 2 + +#define SECF_SecNone (1L<<0) +#define SECF_SecPassword (1L<<1) +#define SECF_SecReceiver (1L<<2) + +#define MsgBitsB_FromNet 0 +#define MsgBitsF_FromNet (1L<<0) + +struct OldConfigRecord { + ULONG Users; /* number of users registerd */ + ULONG MaxUsers; /* max number of users registred */ + NameT BaseName; /* name of this BBS */ + NameT SYSOPname; + ULONG SYSOPUsernr; + PassT SYSOPpassword; /* brukes ikke enda */ + BYTE pad; + UWORD MaxLinesMessage; + UWORD ActiveConf; /* limited to 100 */ + UWORD ActiveDirs; /* limited to MaxFileDirs */ + UWORD NewUserTimeLimit; + UWORD SleepTime; + PassT ClosedPassword; /* brukes ikke enda */ + BYTE pad2; + UBYTE DefaultCharSet; + UBYTE Cflags; + UWORD NewUserFileLimit; + NameTbug ConfNames[100]; + UBYTE ConfSW[100]; + UBYTE ConfOrder[100]; + ULONG ConfDefaultMsg[100]; + NameTbug DirNames[100]; + UBYTE FileOrder[100]; + UBYTE ConfBullets[100]; + NameTbug DirPaths[100]; + UWORD ConfMaxScan[100]; + UWORD ByteRatiov; /* i bytes */ + UWORD FileRatiov; /* i filer */ + UWORD MinULSpace; /* i KB */ + UBYTE Cflags2; + UBYTE pad_a123; + ULONG pad_asdsad; + ULONG pad_sdsd; + PassT dosPassword; + UBYTE cnfg_empty[13]; +}; + +struct ConferenceRecord { + NameT n_ConfName; + UBYTE n_ConfBullets; + ULONG n_ConfDefaultMsg; /* Highest message in conference */ + ULONG n_ConfFirstMsg; /* First message number in conference */ + UWORD n_ConfOrder; /* order */ + UWORD n_ConfSW; + UWORD n_ConfMaxScan; +}; + +struct ConfigRecord { + UWORD Revision; /* ConfigRev = Revision of configfile */ + ULONG Configsize; + ULONG UserrecordSize; + UWORD Maxconferences; + UWORD MaxfileDirs; + ULONG Users; /* number of users registerd */ + ULONG MaxUsers; /* max number of users registred */ + NameT BaseName; /* name of this BBS */ + NameT SYSOPname; + ULONG SYSOPUsernr; + NPassT SYSOPpassword; /* brukes ved lokal login. Hvis tom, ikke noe passord.. */ + NPassT ClosedPassword; /* brukes ikke enda */ + UWORD MaxLinesMessage; + UWORD ActiveConf; /* limited to Maxconferences */ + UWORD ActiveDirs; /* limited to MaxFileDirs */ + UWORD NewUserTimeLimit; + UWORD SleepTime; + UBYTE DefaultCharSet; + UBYTE Cflags; + UWORD NewUserFileLimit; + + UWORD ByteRatiov; /* i bytes */ + UWORD FileRatiov; /* i filer */ + UWORD MinULSpace; /* i KB */ + UBYTE Cflags2; + UBYTE pad_a123; + NPassT dosPassword; + UBYTE cnfg_empty[256]; + struct FileDirRecord *firstFileDirRecord; + struct ConferenceRecord firstconference[1]; +}; + +#define SIZEOFCONFIGRECORD (sizeof (struct ConfigRecord)-sizeof (struct ConferenceRecord)) + +struct FileDirRecord { + NameT n_DirName; + NameT n_DirPaths; + UWORD n_FileOrder; + UWORD n_PrivToConf; +}; + +/* confSW +*/ + +#define CONFSWB_ImmRead 0 +#define CONFSWB_ImmWrite 1 +#define CONFSWB_PostBox 2 +#define CONFSWB_Private 3 +#define CONFSWB_VIP 4 +#define CONFSWB_Resign 5 +#define CONFSWB_Network 6 +#define CONFSWB_Alias 7 + +#define CONFSWF_ImmRead (1L<<0) +#define CONFSWF_ImmWrite (1L<<1) +#define CONFSWF_PostBox (1L<<2) +#define CONFSWF_Private (1L<<3) +#define CONFSWF_VIP (1L<<4) +#define CONFSWF_Resign (1L<<5) +#define CONFSWF_Network (1L<<6) +#define CONFSWF_Alias (1L<<7) + +//Cflags +#define CFLAGSF_lace (1L<<0) +#define CFLAGSF_8Col (1L<<1) +#define CFLAGSF_Download (1L<<2) +#define CFLAGSF_Upload (1L<<3) +#define CFLAGSF_Byteratio (1L<<4) +#define CFLAGSF_Fileratio (1L<<5) +#define CFLAGSF_AllowTmpSysop (1L<<6) +#define CFLAGSF_UseASL (1L<<7) + +//Cflags2 +#define CFLAGS2F_NoGet (1L<<0) +#define CFLAGS2F_CacheFL (1L<<1) + +#define BCCS_ISO 0 +#define BCCS_IBM 1 +#define BCCS_IBN 2 + +struct NodeRecord { + UBYTE NodeRecord_pad; + UBYTE CommsPort; /* 0 = local, else port = n-1 */ + UBYTE ConnectWait; /* max time to wait from ring to connect */ + UBYTE NodeSetup; /* div bits for setup */ + ULONG MinBaud; /* minimum baud to accept for this node */ + UWORD Setup; /* See Bit definitions below */ + ULONG NodeBaud; /* baud to use between modem-machine */ + ModemStrT Serialdevicename; + ModemStrT ModemInitString; + ModemSStrT ModemAnswerString; + ModemSStrT ModemOffHookString; + ModemSStrT ModemOnHookString; + ModemSStrT ModemCallString; + ModemSStrT ModemRingString; + ModemSStrT ModemConnectString; + ModemSStrT ModemOKString; + ModemSStrT ModemATString; + ModemSStrT ModemNoCarrierString; +/* SEven */ + UBYTE pad_1; + UBYTE HourMaxTime[24]; /* Maximum allowed time this hour */ + UBYTE HourMinWait[24]; /* Minimum time between calls this hour */ + NameT PublicScreenName; /* abbs/wb(default)/any */ + NameT HoldPath; + NameT TmpPath; /* path for this nodes tmpdir (must end in a : or /) */ + NameT Font; /* name for this nodes font (must end in a : or /) */ + UWORD FontSize; /* font size */ + UWORD win_big_x; /* x pos for normal window */ + UWORD win_big_y; /* y pos for normal window */ + UWORD win_big_height; /* height for normal window */ + UWORD win_big_width; /* width for normal window */ + UWORD win_tiny_x; /* x pos for tiny window */ + UWORD win_tiny_y; /* y pos for tiny window */ +}; + +/* #define SETUPB_XonXoff 0 */ /* NOT IN USE */ +#define SETUPB_RTSCTS 1 +#define SETUPB_Lockedbaud 2 +#define SETUPB_SimpelHangup 3 +#define SETUPB_NullModem 4 +#define SETUPB_NoSleepTime 5 + +/* #define SETUPF_XonXoff (1L<<0) */ +#define SETUPF_RTSCTS (1L<<1) +#define SETUPF_Lockedbaud (1L<<2) +#define SETUPF_SimpelHangup (1L<<3) +#define SETUPF_NullModem (1L<<4) +#define SETUPF_NoSleepTime (1L<<5) + +#define NodeSetupB_TinyMode 0 +#define NodeSetupB_DontShow 1 +#define NodeSetupB_BackDrop 2 +#define NodeSetupB_UseABBScreen 3 + +#define NodeSetupF_TinyMode (1L<<0) +#define NodeSetupF_DontShow (1L<<1) +#define NodeSetupF_BackDrop (1L<<2) +#define NodeSetupF_UseABBScreen (1L<<3) + +struct OldFileEntry { + UBYTE fe_Name[17]; // Filnavn (16 tegn) + UBYTE pad1; // En pad + UWORD fe_Flags; // Diverse flags + ULONG fe_Size; // Filstørrelse i bytes + ULONG fe_Sender; // Hvem som uploada fila + ULONG fe_Receiver; // Filas mottager / conf (conf = #/2+1) + ULONG fe_DLoads; // Hvor mange som har downloada fila + ULONG fe_MsgNr; // Meldingsnummer i FileInfo i filinfo konfen + struct DateStamp fe_DateStamp; // Dato fila ble uploada + UBYTE fe_Descr[39]; // Filbeskrivelse (38 tegn) + UBYTE pad2; +}; + +struct Fileentry { + FileName Filename; // Filenavn (18 tegn) + UBYTE pad1; // En pad. + UWORD Filestatus; // Diverse flags + ULONG Fsize; // Filstørrelse i bytes + ULONG Uploader; // Hvem som uploada fila + ULONG PrivateULto; // Fila mottager / conf (conf = #/2+1) + ULONG AntallDLs; // Hvor mange som har downloada fila + ULONG Infomsgnr; // Meldingsnummer i FileInfo i filinfo konfen + struct DateStamp ULdate; // Dato fila ble uploada + FileDescription Filedescription; // Filbeskrivelse (36 tegn) + UBYTE pad2; // En pad til +}; + +/* filestatus +*/ +#define FILESTATUSB_PrivateUL 0 +#define FILESTATUSB_PrivateConfUL 1 +#define FILESTATUSB_Filemoved 2 +#define FILESTATUSB_Fileremoved 3 +#define FILESTATUSB_FreeDL 4 +#define FILESTATUSB_Selected 5 +#define FILESTATUSB_Preview 6 + +#define FILESTATUSF_PrivateUL (1L<<0) +#define FILESTATUSF_PrivateConfUL (1L<<1) +#define FILESTATUSF_Filemoved (1L<<2) +#define FILESTATUSF_Fileremoved (1L<<3) +#define FILESTATUSF_FreeDL (1L<<4) +#define FILESTATUSF_Selected (1L<<5) +#define FILESTATUSF_Preview (1L<<6) + +#define PAD1STATUSB_ArcTested 0 +#define PAD1STATUSB_VirusTested 1 + +#define PAD1STATUSF_ArcTested (1L<<0) +#define PAD1STATUSF_VirusTested (1L<<1) + +#define PAD2STATUSB_ABBS_1 0 +#define PAD2STATUSB_ABBS_2 1 + +struct mem_Fileentry { + struct Fileentry mem_fileentry; + ULONG mem_filefilenr; + ULONG mem_filenr; + ULONG mem_fnext; + ULONG mem_fnexthash; +}; + +struct fileentryheader { + ULONG fl_hash[72]; + APTR first_file; +}; + +struct Mainmemory { + UWORD Nodes; + UWORD MainBits; + ULONG MainmemoryAlloc; + ULONG MaxNumLogEntries; + ULONG NrTabelladr; + ULONG LogTabelladr; + ULONG flpool; + char txtbuffer[80]; + char txt2buffer[80]; + ULONG keys[10]; + ULONG keyfile; + ULONG userfile; + struct ABBSmsg Mainmsg; + APTR n_Filedirfiles; + APTR n_MsgHeaderfiles; + APTR n_MsgTextfiles; + struct ConfigRecord config; + +/* STRUCT NrTabell,0 / * denne har dynamisk størrelse + / * nrTabell(usernr) -> LogTabell + STRUCT LogTabell / * dynamisk size og plaseringen +*/ +}; + +#ifdef sdfsdf + + BITDEF MainBits,SysopNotAvail,0 + BITDEF MainBits,ABBSLocked,1 + +#endif + +#endif /* BBS_H */ diff --git a/Include/bbs.i b/Include/bbs.i new file mode 100644 index 0000000..ee32052 --- /dev/null +++ b/Include/bbs.i @@ -0,0 +1,759 @@ + IFND BBS_I +BBS_I SET 1 + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + IFND EXEC_IO_I + INCLUDE "exec/io.i" + ENDC ; EXEC_IO_I + + IFND LIBRARIES_DOS_I + INCLUDE "libraries/dos.i" + ENDC + +ConfigRev EQU 1 + +MainBase equr a5 +NodeBase equr a4 +LinesSize equ 80 + + IFD DEMO +NumMsgNrInQueue equ 100 + ENDC + + IFND DEMO +NumMsgNrInQueue equ 2000 + ENDC + +MaxInterNodeMsg equ 10 +InterNodeMsgsiz equ 84 +MaxUsersGChat equ 5 + +Sizeof_NameT equ 30 +Sizeof_PassT equ 8 +Sizeof_NPassT equ 12 +Sizeof_TelNo equ 16 +Sizeof_FileName equ 18 +Sizeof_FileDescription equ 36 +Sizeof_loginscript equ Sizeof_NameT + +SEven MACRO + IFNE SOFFSET&1 +SOFFSET SET SOFFSET+1 + ENDC + ENDM + +NameT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+31 + ENDM + +PassT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+9 + ENDM + +NPassT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+12 + ENDM + +TelNoT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+17 + ENDM + +FileName MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+19 + ENDM + +FileDescription MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+37 + ENDM + +ModemStrT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+61 + ENDM + +ModemSStrT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+17 + ENDM + +maksisøkebuffer = 5 + + STRUCTURE match,0 + UBYTE m_poeng + NameT m_navn + LABEL match_sizeof + + STRUCTURE chatnode,0 + APTR c_Task ; = 0 -> denne brukes ikke i chat'en + LONG c_Sigbit ; hvilket sigbit vi skal få tilsendt + UWORD c_Rpos ; hvor langt vi har lest + NameT c_Name ; usernavn på denne noden + SEven + ULONG c_Usernr ; usernr på denne noden + ULONG c_Speed ; 0 = local + UWORD c_Status ; se under + UWORD c_color ; denne nodens farve (OBS : fylles i av lokal noden) + UWORD c_Nodenr ; hvilken nodenr dette er + LABEL chatnode_sizeof + + BITDEF status,Splitscreen,0 + + STRUCTURE localchatnode,0 + APTR l_chatnode ; peker til vår chatnode hos den andre noden + APTR l_chat ; peker til den andre nodens chat struktur + LABEL localchatnode_sizeof + + STRUCTURE chat,0 + APTR msgarea ; starten på meldingsområdet + APTR msgareaend ; Slutten på meldingsområdet + UWORD Wpos ; hvor langt har vi skrevet + UWORD ChatNodeNr + STRUCT chatnodes,chatnode_sizeof*(MaxUsersGChat-1) ; public + STRUCT localchatnodes,localchatnode_sizeof*MaxUsersGChat ; private + LABEL chat_sizeof + + STRUCTURE ABBSmsg,MN_SIZE + UWORD m_Command + UWORD m_Error + ULONG m_Data + ULONG m_Name + ULONG m_UserNr + ULONG m_arg + LABEL ABBSmsg_SIZE + + STRUCTURE ABBSpubmsg,MN_SIZE + UWORD pm_Command + UWORD pm_Error + ULONG pm_Data + ULONG pm_Arg + ULONG pm_Arg2 + LABEL ABBSpubmsg_SIZE + + ;MainCommands + DEVINIT 0 + DEVCMD Main_loaduser + DEVCMD Main_saveuser + DEVCMD Main_createuser + DEVCMD Main_getusername + DEVCMD Main_getusernumber + DEVCMD Main_saveconfig + DEVCMD Main_startnode + DEVCMD Main_shutdown + DEVCMD Main_savemsg + DEVCMD Main_loadmsg + DEVCMD Main_createconference + DEVCMD Main_loadmsgheader + DEVCMD Main_loadmsgtext + DEVCMD Main_savemsgheader + DEVCMD Main_testconfig_dontuse + DEVCMD Main_createbulletin + DEVCMD Main_Clearbulletins + DEVCMD Main_createfiledir + DEVCMD Main_addfile + DEVCMD Main_findfile + DEVCMD Main_addfiledl + DEVCMD Main_loadfileentry + DEVCMD Main_savefileentry + DEVCMD Main_BroadcastMsg + DEVCMD Main_GetMaxConfDirs + DEVCMD Main_loadusernr + DEVCMD Main_saveusernr + DEVCMD Main_ChangeName + DEVCMD Main_DeleteDir + DEVCMD Main_RenameDir + DEVCMD Main_DeleteConference + DEVCMD Main_RenameConference + DEVCMD Main_NotAvailSysop + DEVCMD Main_loadusernrnr + DEVCMD Main_saveusernrnr + DEVCMD Main_MatchName + DEVCMD Main_CleanConference + DEVCMD Main_QuitBBS + DEVCMD not_Main_AddNetUser + DEVCMD not_Main_AddNetBBS + DEVCMD Main_PackUserFile + DEVCMD Main_OpenScreen + DEVCMD Main_CloseScreen + DEVCMD Main_Renamefileentry + DEVCMD Main_LockABBS + DEVCMD Main_UnLockABBS + DEVCMD Main_Getconfig + DEVCMD Main_LASTCOMM + + + ; PublicErrors + DEVINIT 0 + DEVCMD PError_OK + DEVCMD PError_NoPort + DEVCMD PError_NoCarrier + DEVCMD PError_NoMore + + ; Errors + DEVINIT 0 + DEVCMD Error_OK + DEVCMD Error_Not_Found + DEVCMD Error_EOF + DEVCMD Error_Found + DEVCMD Error_Open_File + DEVCMD Error_Read + DEVCMD Error_Write + DEVCMD Error_File + DEVCMD Error_Nodeinit + DEVCMD Error_Conferencelist_full + DEVCMD Error_Bulletinlist_full + DEVCMD Error_No_Active_User + DEVCMD Error_User_Active + DEVCMD Error_Not_allowed + DEVCMD Error_Cant_shut_down + DEVCMD Error_SavingIndex + DEVCMD Error_IllegalCMD + DEVCMD Error_Nomem + DEVCMD Error_NoPort + + ;NodeCommands + DEVINIT 0 + DEVCMD Node_WriteText + DEVCMD Node_WriteTexto + DEVCMD Node_FlushSer + DEVCMD Node_WriteSerLen + DEVCMD Node_ReadSerLen + DEVCMD Node_QuitLogin + DEVCMD Node_ReadSer + DEVCMD Node_LASTCOMM + + ; private nodecommands + DEVINIT $8000 + DEVCMD Node_Reloaduser + DEVCMD Node_Eject + DEVCMD Node_Gotosleep + DEVCMD Node_Wakeupagain + DEVCMD Node_Killuser + DEVCMD Node_TmpSysop + DEVCMD Node_Show + DEVCMD Node_Hide + DEVCMD Node_chat + DEVCMD Node_ShowUser + DEVCMD Node_Shutdown + DEVCMD Node_GetRegs + DEVCMD Node_InitModem + DEVCMD Node_ReleasePort + DEVCMD Node_OffHook + DEVCMD Node_LASTPRIVCOMM + + ;NetCommands + DEVINIT 0 + DEVCMD Net_DoLogin + DEVCMD Net_LASTCOMM + + DEVINIT 0 + DEVCMD OK + DEVCMD Timeout + DEVCMD NoCarrier + DEVCMD Thrownout + + STRUCTURE Nodenode,LN_SIZE ; node + ULONG Nodeusernr + UWORD Nodenr + UWORD Nodestatus + UBYTE Nodedivstatus ; se under + UBYTE NodeECstatus ; MNP eller V32bis + ULONG NodesubStatus + ULONG Nodespeed + ULONG NodeTask + ULONG InterMsgSig + UWORD InterMsgread + UWORD InterMsgwrite + NameT Nodeuser + NameT NodeuserCityState + STRUCT NodeStatusText,120 + SEven + STRUCT InterNodeMsg,InterNodeMsgsiz*MaxInterNodeMsg + SEven + STRUCT Nodemsg,ABBSmsg_SIZE + APTR nodenode_nodemem + ULONG Nodenode_alloc + LABEL Nodenode_SIZEOF + + BITDEF NDS,Notavail,0 + BITDEF NDS,Stealth,1 + BITDEF NDS,WaitforChatCon,2 + + BITDEF NECS,MNP,0 + BITDEF NECS,V42BIS,1 + BITDEF NECS,UPDATED,2 + + STRUCTURE intermsg,0 + UBYTE i_type + UBYTE i_pri ; pri != 0 => ignorer MF verdi + UWORD i_franode + ULONG i_usernr + ULONG i_usernr2 + NameT i_Name + NameT i_Name2 + SEven + UWORD i_conf + ULONG i_msgnr + LABEL intermsg_sizeof +i_msg equ i_usernr + + STRUCTURE ParagonMsg,MN_SIZE + UWORD p_Command + UWORD p_Data + STRUCT p_string,72 + APTR p_msg + APTR p_config + UWORD p_carrier + LABEL ParagonMsg_SIZE + + STRUCTURE RexxParam,0 + ULONG rx_NumParam + APTR rx_ptr1 + APTR rx_ptr2 + APTR rx_ptr3 + APTR rx_ptr4 + APTR rx_ptr5 + LABEL rx_sizeof + + STRUCTURE ou_UserRecord,0 + NameT ou_Name ;* First AND Last name * + UBYTE ou_pass_10 + ULONG ou_Usernr ;* User number * + PassT ou_Password ;* users password * + NameT ou_Address ;* Street address * + NameT ou_CityState ;* City/State * + TelNoT ou_HomeTelno ;* home telephone * + TelNoT ou_WorkTelno ;* work telephone * + UBYTE ou_pass_11 + UWORD ou_TimeLimit ;* daily time limit * + UWORD ou_FileLimit ;* daily file time limit * + UWORD ou_PageLength ;* page length * + UBYTE ou_Protocol ;* download protocol * + UBYTE ou_Charset ;* character set * + UBYTE ou_ScratchFormat + UBYTE ou_XpertLevel + UWORD ou_Userbits ;* See bit definitions * + STRUCT ou_ConfAccess,(100*1) + SEven + STRUCT ou_UserScript,Sizeof_loginscript ;* Arexx script to be run at login * + LONG ou_ResymeMsgNr + UBYTE ou_MessageFilterV + UBYTE ou_GrabFormat + UWORD ou_u_ByteRatiov ; i bytes + UWORD ou_u_FileRatiov ; i filer + + LABEL ou_u_startsave + UWORD ou_Uploaded ;* files uploaded * + UWORD ou_Downloaded ;* files downloaded * + LONG ou_KbUploaded + LONG ou_KbDownloaded + UWORD ou_TimesOn ;* number of times on * + STRUCT ou_LastAccess,ds_SIZEOF + ;* last time on system * + UWORD ou_TimeUsed ;* minutes on system today * + UWORD ou_MsgsLeft ;* messages entered * + ULONG ou_MsgsRead ;* messages read * + ULONG ou_Totaltime ;* total time on system * + STRUCT ou_Conflastread,100*4 + ;* zero is for MAIN * + LONG ou_NFday ;* last day user took Newfiles * + UWORD ou_FTimeUsed ;* file min's on system today * + UWORD ou_Savebits + ULONG ou_MsgaGrab + STRUCT ou_u_reserved2,6 + LABEL ou_u_endsave + LABEL ou_UserRecord_SIZEOF + + STRUCTURE UserRecord,0 + NameT Name ;* First AND Last name * + UBYTE pass_10 + ULONG Usernr ;* User number * + PassT Password ;* users password * + NameT Address ;* Street address * + NameT CityState ;* City/State * + TelNoT HomeTelno ;* home telephone * + TelNoT WorkTelno ;* work telephone * + UBYTE pass_11 + UWORD TimeLimit ;* daily time limit * + UWORD FileLimit ;* daily file time limit * + UWORD PageLength ;* page length * + UBYTE Protocol ;* download protocol * + UBYTE Charset ;* character set * + UBYTE ScratchFormat + UBYTE XpertLevel + UWORD Userbits ;* See bit definitions * + NameT UserScript ;* Arexx script to be run at login * + SEven + LONG ResymeMsgNr + UBYTE MessageFilterV + UBYTE GrabFormat + UWORD u_ByteRatiov ; i bytes + UWORD u_FileRatiov ; i filer + STRUCT u_reserved,16 + + LABEL u_startsave + UWORD Uploaded ;* files uploaded * + UWORD Downloaded ;* files downloaded * + LONG KbUploaded + LONG KbDownloaded + UWORD TimesOn ;* number of times on * + STRUCT LastAccess,ds_SIZEOF + ;* last time on system * + UWORD TimeUsed ;* minutes on system today * + UWORD MsgsLeft ;* messages entered * + ULONG MsgsRead ;* messages read * + ULONG Totaltime ;* total time on system * + LONG NFday ;* last day user took Newfiles * + UWORD FTimeUsed ;* file min's on system today * + UWORD Savebits + ULONG MsgaGrab + STRUCT u_reserved2,20 + LABEL u_almostendsave + LABEL almostUserRecord_SIZEOF + + STRUCTURE Userconf,0 + UWORD uc_Access + ULONG uc_LastRead + LABEL Userconf_seizeof + + BITDEF ACC,Read,0 + BITDEF ACC,Write,1 + BITDEF ACC,Upload,2 + BITDEF ACC,Download,3 + BITDEF ACC,FileVIP,4 ; only valid in News (conf 0) + BITDEF ACC,Invited,5 + BITDEF ACC,Sigop,6 + BITDEF ACC,Sysop,7 + + BITDEF USER,Killed,0 ;* user is dead * + BITDEF USER,FSE,1 ;* use FSE * + BITDEF USER,ANSIMenus,2 ;* user wants ansi menus + BITDEF USER,ColorMessages,3 ;* user wants color in messages + BITDEF USER,G_R,4 ;* use G&R protocol * + BITDEF USER,KeepOwnMsgs,5 ;* Mark written messages * + BITDEF USER,ANSI,6 + BITDEF USER,ClearScreen,7 + BITDEF USER,RAW,8 + BITDEF USER,NameAndAdress,9 + BITDEF USER,Filter,10 + BITDEF USER,SendBulletins,11 + BITDEF USER,AutoQuote,12 + + BITDEF SAVEBITS,FSEOverwritemode,0 + BITDEF SAVEBITS,FSEXYon,1 + BITDEF SAVEBITS,FSEAutoIndent,2 + BITDEF SAVEBITS,ReadRef,3 + BITDEF SAVEBITS,LostDL,4 + BITDEF SAVEBITS,Dontshowconfs,5 + BITDEF SAVEBITS,Browse,6 + + STRUCTURE MessageRecord,0 + ULONG Number ;* Message Number * + UBYTE MsgStatus ;* Message Status * + UBYTE Security ;* Message security * + ULONG MsgFrom ;* user number * + ULONG MsgTo ;* Ditto (-1=ALL) * + NameT Subject ;* subject of message * + UBYTE MsgBits ;* Misc bits * + STRUCT MsgTimeStamp,ds_SIZEOF + ;* time entered * + ULONG RefTo ;* refers to * + ULONG RefBy ;* first answer * + ULONG RefNxt ;* next in this thread * + WORD NrLines ;* number of lines, negative if net names in message body * + UWORD NrBytes ;* number of bytes * + ULONG TextOffs ;* offset in text file * + LABEL MessageRecord_SIZEOF + + BITDEF MSTAT,NormalMsg,0 + BITDEF MSTAT,KilledByAuthor,1 + BITDEF MSTAT,KilledBySysop,2 + BITDEF MSTAT,KilledBySigop,3 + BITDEF MSTAT,Moved,4 + BITDEF MSTAT,MsgRead,6 ;* read by receiver * + BITDEF MSTAT,Dontshow,7 + + BITDEF SEC,SecNone,0 + BITDEF SEC,SecPassword,1 + BITDEF SEC,SecReceiver,2 + + BITDEF MsgBits,FromNet,0 + + STRUCTURE ConfigRecord,0 + UWORD Revision ; ConfigRev = Revision of configfile + ULONG Configsize ; + ULONG UserrecordSize ; + UWORD Maxconferences ; + UWORD MaxfileDirs ; + ULONG Users ; number of users registerd + ULONG MaxUsers ; max number of users registred. (Antall logentrys,nrentrys) + NameT BaseName ; name of this BBS + NameT SYSOPname + ULONG SYSOPUsernr + NPassT SYSOPpassword ; brukes ved lokal login. Hvis tom, ikke noe passord.. + NPassT ClosedPassword ; brukes ikke enda + UWORD MaxLinesMessage ; Maximum minne for meldinger. + UWORD ActiveConf ; limited to Maxconferences + UWORD ActiveDirs ; limited to MaxfileDirs + UWORD NewUserTimeLimit + UWORD SleepTime + UBYTE DefaultCharSet + UBYTE Cflags + UWORD NewUserFileLimit + + UWORD ByteRatiov ; i bytes + UWORD FileRatiov ; i filer + UWORD MinULSpace ; i KB + UBYTE Cflags2 + UBYTE pad_a123 + NPassT dosPassword + STRUCT cnfg_empty,256 + ULONG firstFileDirRecord + LABEL n_FirstConference + LABEL staticConfigRecord_SIZEOF + + STRUCTURE ConferenceRecord,0 + NameT n_ConfName ; 0 + UBYTE n_ConfBullets ; 31 + ULONG n_ConfDefaultMsg ; 32 Highest message in conference + ULONG n_ConfFirstMsg ; 36 First message number in conference + UWORD n_ConfOrder ; 40 order + UWORD n_ConfSW ; 42 + UWORD n_ConfMaxScan ; 44 + LABEL ConferenceRecord_SIZEOF ; 46 + + STRUCTURE FileDirRecord,0 + NameT n_DirName; + NameT n_DirPaths; + UWORD n_FileOrder + UWORD n_PrivToConf + LABEL FileDirRecord_SIZEOF + + STRUCTURE oc_ConfigRecord,0 + ULONG oc_Users ; number of users registerd + ULONG oc_MaxUsers ; max number of users registred. (Antall logentrys,nrentrys) + NameT oc_BaseName ; name of this BBS + NameT oc_SYSOPname + SEven + ULONG oc_SYSOPUsernr + PassT oc_SYSOPpassword ; brukes ikke enda + SEven + UWORD oc_MaxLinesMessage + UWORD oc_ActiveConf ; limited to MaxConferences + UWORD oc_ActiveDirs ; limited to MaxFileDirs + UWORD oc_NewUserTimeLimit + UWORD oc_SleepTime + PassT oc_ClosedPassword ; brukes ikke enda + SEven + UBYTE oc_DefaultCharSet + UBYTE oc_Cflags + UWORD oc_NewUserFileLimit + STRUCT oc_ConfNames,100*Sizeof_NameT + STRUCT oc_ConfSW,100*1 + SEven + STRUCT oc_ConfOrder,100*1 + SEven + STRUCT oc_ConfDefaultMsg,100*4 + STRUCT oc_DirNames,100*Sizeof_NameT + SEven + STRUCT oc_FileOrder,100*1 + SEven + STRUCT oc_ConfBullets,100*1 + SEven + STRUCT oc_DirPaths,100*Sizeof_NameT + SEven + STRUCT oc_ConfMaxScan,100*2 + UWORD oc_ByteRatiov ; i bytes + UWORD oc_FileRatiov ; i filer + UWORD oc_MinULSpace ; i KB + UBYTE oc_Cflags2 + UBYTE oc_pad_a123 + ULONG oc_pad_2344 + ULONG oc_pad_2343 + PassT oc_dosPassword + STRUCT oc_cnfg_empty,13 + LABEL oc_ConfigRecord_SIZEOF + +;confSW : + BITDEF CONFSW,ImmRead,0 + BITDEF CONFSW,ImmWrite,1 + BITDEF CONFSW,PostBox,2 + BITDEF CONFSW,Private,3 + BITDEF CONFSW,VIP,4 + BITDEF CONFSW,Resign,5 + BITDEF CONFSW,Network,6 + BITDEF CONFSW,Alias,7 + +;Cflags + BITDEF Cflags,Lace,0 + BITDEF Cflags,8Col,1 + BITDEF Cflags,Download,2 + BITDEF Cflags,Upload,3 + BITDEF Cflags,Byteratio,4 + BITDEF Cflags,Fileratio,5 + BITDEF Cflags,AllowTmpSysop,6 + BITDEF Cflags,UseASL,7 + +;Cflags2 + BITDEF Cflags,NoGet,0 + BITDEF Cflags,CacheFL,1 + + STRUCTURE NodeRecord,0 + UBYTE NodeRecord_pad + UBYTE CommsPort ; 0 = local, else port = n-1 + UBYTE ConnectWait ; max time to wait from ring to connect + UBYTE NodeSetup ; div bits for setup + ULONG MinBaud ; minimum baud to accept for this node + UWORD Setup ; See Bit definitions below + ULONG NodeBaud ; baud to use between modem-machine + ModemStrT Serialdevicename + ModemStrT ModemInitString + ModemSStrT ModemAnswerString + ModemSStrT ModemOffHookString + ModemSStrT ModemOnHookString + ModemSStrT ModemCallString + ModemSStrT ModemRingString + ModemSStrT ModemConnectString + ModemSStrT ModemOKString + ModemSStrT ModemATString + ModemSStrT ModemNoCarrierString + SEven + STRUCT HourMaxTime,24 ; Maximum allowed time this hour + STRUCT HourMinWait,24 ; Minimum time between calls this hour + NameT PublicScreenName ; abbs/wb(default)/any + NameT HoldPath + NameT TmpPath ; path for this nodes tmpdir (must end in a : or /) + NameT Font ; name for this nodes font (must end in a : or /) + UWORD FontSize ; font size + UWORD win_big_x ; x pos for normal window + UWORD win_big_y ; y pos for normal window + UWORD win_big_height ; height for normal window + UWORD win_big_width ; width for normal window + UWORD win_tiny_x ; x pos for tiny window + UWORD win_tiny_y ; y pos for tiny window + LABEL NodeRecord_SIZEOF + +; BITDEF SETUP,XonXoff,0 ; NOT USE + BITDEF SETUP,RTSCTS,1 + BITDEF SETUP,Lockedbaud,2 + BITDEF SETUP,SimpelHangup,3 + BITDEF SETUP,NullModem,4 + BITDEF SETUP,NoSleepTime,5 + + BITDEF NodeSetup,TinyMode,0 + BITDEF NodeSetup,DontShow,1 + BITDEF NodeSetup,BackDrop,2 + BITDEF NodeSetup,UseABBScreen,3 +; BITDEF NodeSetup,,4 +; BITDEF NodeSetup,,5 + + IFD OLDNodeRecord + + STRUCTURE NodeRecord,0 + UWORD CommsPort + UWORD tinymode + UWORD OpenModemAt + UWORD NoCarrierPause + UWORD Setup ; See Bit definitions below + ULONG NodeBaud + ModemStrT Serialdevicename + ModemStrT ModemInitString + ModemSStrT ModemAnswerString + ModemSStrT ModemOffHookString + ModemSStrT ModemOnHookString + ModemSStrT ModemCallString + ModemSStrT ModemRingString + ModemSStrT ModemConnectString + ModemSStrT ModemOKString + ModemSStrT ModemATString + LABEL NodeRecord_SIZEOF + + BITDEF SETUP,XonXoff,0 + BITDEF SETUP,RTSCTS,1 + BITDEF SETUP,Lockedbaud,2 + BITDEF SETUP,SimpelHangup,3 + + ENDC + + STRUCTURE Fileentry,0 + FileName Filename + SEven + UWORD Filestatus + ULONG Fsize + ULONG Uploader + ULONG PrivateULto ; Både konf nr og brukr nr. + ULONG AntallDLs + ULONG Infomsgnr + STRUCT ULdate,ds_SIZEOF + FileDescription Filedescription + SEven + LABEL Fileentry_SIZEOF ; = $5c + +Fileentry_SIZEOF_old = $5d + +;filestatus + BITDEF FILESTATUS,PrivateUL,0 + BITDEF FILESTATUS,PrivateConfUL,1 + BITDEF FILESTATUS,Filemoved,2 + BITDEF FILESTATUS,Fileremoved,3 + BITDEF FILESTATUS,FreeDL,4 + BITDEF FILESTATUS,Selected,5 ; for use in browse menu + BITDEF FILESTATUS,Preview,6 + + STRUCTURE fileentryheader,0 + STRUCT fl_hash,72*4 + APTR first_file + LABEL fileentryheader_sizeof + + STRUCTURE mem_Fileentry,0 + STRUCT mem_fentry,Fileentry_SIZEOF ; actual file entry record, same as on disk + ULONG mem_filefilenr ; Filenr on disk [0 - n> + ULONG mem_filenr ; Filenr in memory [0 - n> + ULONG mem_fnext ; next sequential file entry + ULONG mem_fnexthash ; next file entry on this hash key + LABEL mem_Fileentry_SIZEOF + + STRUCTURE Log_entry,0 + ULONG l_RecordNr ; Hvilken record i userfile har han ? (nummer 0,1 osv) + ULONG l_UserNr + NameT l_Name + SEven + UWORD l_UserBits ; Er brukeren død ?? + LABEL Log_entry_SIZEOF + + STRUCTURE Mainmemory,0 + UWORD Nodes ; number of nodes running + UWORD MainBits + ULONG MainmemoryAlloc + ULONG MaxNumLogEntries + ULONG NrTabelladr + ULONG LogTabelladr + ULONG flpool + STRUCT txtbuffer,80 + STRUCT txt2buffer,80 + STRUCT keys,4*10 + ULONG keyfile + ULONG userfile + STRUCT Mainmsg,ABBSmsg_SIZE + ULONG n_Filedirfiles + ULONG n_MsgHeaderfiles + ULONG n_MsgTextfiles + LABEL CStr + +; STRUCT NrTabell,0 ; denne har dynamisk størrelse + ; nrTabell(usernr) -> LogTabell +; STRUCT LogTabell ; dynamisk size og plaseringen + LABEL StaticMainmemory_SIZEOF + + BITDEF MainBits,SysopNotAvail,0 + BITDEF MainBits,ABBSLocked,1 + + ENDC ; BBS_I diff --git a/Include/fifo.h b/Include/fifo.h new file mode 100644 index 0000000..bce4157 --- /dev/null +++ b/Include/fifo.h @@ -0,0 +1,41 @@ + +/* + * FIFO.H + * + * PUBLIC FIFO STRUCTURES AND DEFINES + */ + +#ifndef LIBRARIES_FIFO_H +#define LIBRARIES_FIFO_H + +#define FIFONAME "fifo.library" + +#define FIFOF_READ 0x00000100L /* intend to read from fifo */ +#define FIFOF_WRITE 0x00000200L /* intend to write to fifo */ +#define FIFOF_RESERVED 0xFFFF0000L /* reserved for internal use */ +#define FIFOF_NORMAL 0x00000400L /* request blocking/sig support*/ +#define FIFOF_NBIO 0x00000800L /* non-blocking IO */ + +#define FIFOF_KEEPIFD 0x00002000L /* keep fifo alive if data pending */ +#define FIFOF_EOF 0x00004000L /* EOF on close */ +#define FIFOF_RREQUIRED 0x00008000L /* reader required to exist */ + +#define FREQ_RPEND 1 +#define FREQ_WAVAIL 2 +#define FREQ_ABORT 3 + +typedef void *FifoHan; /* returned by OpenFifo() */ + +#ifndef IN_LIBRARY + +FifoHan OpenFifo(char *, long, long); +void CloseFifo(FifoHan, long); +long ReadFifo(FifoHan, char **, long); +long WriteFifo(FifoHan, char *, long); +void RequestFifo(FifoHan, struct Message *, long); +long BufSizeFifo(FifoHan); + +#endif + +#endif + diff --git a/Include/fifo.i b/Include/fifo.i new file mode 100644 index 0000000..44d3ed4 --- /dev/null +++ b/Include/fifo.i @@ -0,0 +1,39 @@ + IFND FIFO_I +FIFO_I SET 1 +** +** FIFO.I +** + +FIFOLIBNAME MACRO + dc.b 'fifo.library',0 + ENDM + +FIFOF_READ EQU $100 ; intend to read from fifo */ +FIFOF_WRITE EQU $200 ; intend to write to fifo */ +FIFOF_RESERVED EQU $FFFF0000 ; reserved for internal use */ +FIFOF_NORMAL EQU $400 ; request blocking/sig support*/ +FIFOF_NBIO EQU $800 ; non-blocking IO */ + +FIFOF_KEEPIFD EQU $2000 ; keep fifo alive if data pending */ +FIFOF_EOF EQU $4000 ; EOF on close */ +FIFOF_RREQUIRED EQU $8000 ; reader required to exist */ + +FREQ_RPEND EQU 1 +FREQ_WAVAIL EQU 2 +FREQ_ABORT EQU 3 + +;typedef void *FifoHan; ; returned by OpenFifo() */ + +;#ifndef IN_LIBRARY + +_LVOOpenFifo EQU -30 +_LVOCloseFifo EQU -36 +_LVOReadFifo EQU -42 +_LVOWriteFifo EQU -48 +_LVORequestFifo EQU -54 +_LVOBufSizeFifo EQU -60 + +;#endif + + + ENDC ; FIFO_I diff --git a/Include/first.i b/Include/first.i new file mode 100644 index 0000000..6cd5d07 --- /dev/null +++ b/Include/first.i @@ -0,0 +1,24 @@ + IFND FIRST_I +FIRST_I SET 1 + +;DEMO = 1 + +sn EQU 161 +snrcoded EQU -349967883 +snrrotverdi EQU $56ca34bf + +date MACRO + dc.b ' - 21.03.2011' + ENDM + +VERSION EQU 1 ; Brukes i Snapshot +REVISION EQU 1 + +version MACRO + dc.b 'v2.15' + IFD DEMO + dc.b ' (demo)' + ENDC + ENDM + + ENDC ; FIRST_I diff --git a/Include/fse.i b/Include/fse.i new file mode 100644 index 0000000..e6c721f --- /dev/null +++ b/Include/fse.i @@ -0,0 +1,46 @@ + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + +WindowTop equ 6 +MaxScreen equ 100 +NrSavedLines equ 10 +FSETabSize equ 8 + + STRUCTURE fseblock,0 + UWORD FizzX + UWORD FizzY + UWORD WindowEnd + UWORD WindowSiz + UWORD WindowWith + UBYTE ZapEcho + UBYTE ShiftStatus + UBYTE HaveCR + UBYTE CharIn + UBYTE CSInum + UBYTE fsepad + UWORD X ; current column in message + UWORD Y ; current line in message + UWORD P ; line number of first line on screen + UWORD LastSave + UWORD LastN + UWORD LastY + UWORD LastX + UWORD CurColor + UWORD MaxFSEbufferlines + APTR FSEbuffer + STRUCT LongLine,256 + STRUCT SavedLines,NrSavedLines*LinesSize + STRUCT ScreenUpd,MaxScreen-WindowTop+1 + ; first updated position in line + STRUCT ScreenClr,MaxScreen-WindowTop+1 + ; first cleared position in line + LABEL fseblock_SIZE + +;ShiftStatus'er +NoShift equ 0 +ESCshift equ 1 +CSIshift equ 2 +CtrlKshift equ 3 +VT100shift equ 4 +CSIspaceshift equ 5 diff --git a/Include/misc.h b/Include/misc.h new file mode 100644 index 0000000..06c8960 --- /dev/null +++ b/Include/misc.h @@ -0,0 +1,31 @@ +/* + * Source machine generated by GadToolsBox V2.0 + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Geir Inge Høsteng + */ + +#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer ) +#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt ) + +#define GD_ListGadget 0 +#define GD_Cancelgadget 1 +#define GD_OKGadget 2 + +#define GDX_ListGadget 0 +#define GDX_Cancelgadget 1 +#define GDX_OKGadget 2 + +#define Select_CNT 3 + +extern struct IntuitionBase *IntuitionBase; +extern struct Library *GadToolsBase; + +extern struct GfxBase *GfxBase; +extern struct MinList ListGadget0List; + + +extern int SetupScreen( void ); +extern void CloseDownScreen( void ); +extern int OpenSelectWindow( void ); +extern void CloseSelectWindow( void ); diff --git a/Include/msg.pro b/Include/msg.pro new file mode 100644 index 0000000..f3c887f --- /dev/null +++ b/Include/msg.pro @@ -0,0 +1,23 @@ + XREF savemsgheader + XREF loadmsgheader + XREF loadmsgtext + XREF loadmsg + XREF savemsg + XREF sendintermsg + XREF doallusers + XREF handlemsg + XREF handlemsgspesport + XREF sendmsgspesport + XREF getnamenrmatch + XREF getusernumber + XREF loadusernrnr + XREF saveusernrnr + XREF loadusernr + XREF saveusernr + XREF loaduser + XREF saveuser + XREF saveconfig + XREF lockoutallothernodes + XREF unlockoutallothernodes + XREF askopenscreen + XREF askclosescreen diff --git a/Include/node.h b/Include/node.h new file mode 100644 index 0000000..3961049 --- /dev/null +++ b/Include/node.h @@ -0,0 +1,217 @@ +#ifndef NODE_H +#define NODE_H +/*************************************************************** +* node variabler * +***************************************************************/ + +#ifndef BBS_H +#include +#endif /* BBS_H */ + +#ifndef XPROTO_H +#include +#endif /* XPROTO_H */ + + +#ifndef XPR_H +#include +#endif /* XPR_H */ + +struct ramblocks { + UBYTE con_tegn; + UBYTE Divmodes; /* se def under */ +#ifndef DEMO + UBYTE ser_tegn; +#else + UBYTE pad_1241; +#endif + UBYTE tegn_fra; + + UWORD loginmin; + UWORD joinfilemin; + ULONG lastdayonline; + UWORD lastminonline; + + ULONG oldcliname; + ULONG filereqadr; + ULONG windowadr; + LONG pubscreenadr; + LONG fontadr; + ULONG windowtitleptr; + ULONG showuserwindowadr; + ULONG creadreq; + ULONG cwritereq; +#ifndef DEMO + ULONG sreadreq; + ULONG swritereq; +#endif + ULONG timer1req; + ULONG timer2req; + + ULONG nodestack; + ULONG waitbits; + ULONG gotbits; + ULONG consigbit; +#ifndef DEMO + ULONG sersigbit; +#endif + ULONG intsigbit; + ULONG showwinsigbit; + ULONG timer1sigbit; + ULONG timer2sigbit; + ULONG intersigbit; + ULONG publicsigbit; + ULONG rexxsigbit; + ULONG intmsgport; + ULONG msg; + ULONG HighMsgQueue; + ULONG curprompt; + ULONG ULfilenamehack; +#define tmpstore ULfilenamehack; + ULONG ParamPass; + ULONG tmpval; + ULONG SerTotOut; + + ULONG infoblock; + UBYTE readcharstatus; + UBYTE dosleepdetect; + UBYTE tmpsysopstat; +#ifndef DEMO + UBYTE RealCommsPort; +#else + UBYTE pad_142; +#endif + UBYTE batch; + UBYTE cursorpos; + + ULONG currentmsg; + UWORD menunr; + UWORD confnr; + UWORD linesleft; + UBYTE in_waitforcaller; + UBYTE readlinemore; + UBYTE ShutdownNode; + UBYTE active; + UBYTE activesysopchat; + UBYTE Dodiv; /* See bit definistion below */ + UWORD Historyoffset; + +#ifndef DEMO + UWORD cpsrate; +#endif + UWORD intextchar; + UWORD outtextchar; + UWORD outtextbufferpos; + + UBYTE readingpassword; + UBYTE userok; + UBYTE Tinymode; + UBYTE warningtineindex; + + UWORD OldTimelimit; + UWORD OldFilelimit; + UBYTE NodeError; + UBYTE DlUlstatus; + UWORD NodeNumber; + ULONG FrontDoorMsg; + ULONG nodeport; + ULONG rexxport; + ULONG nodepublicport; + ULONG nodenoden; + ULONG msgmemsize; + APTR tmpmsgmem; + ULONG exallctrl; + APTR node_menu; + APTR visualinfo; + UBYTE FSEditor; + UBYTE outlines; + UBYTE intersigbitnr; + UBYTE serescstat; + UBYTE lastchar; + UBYTE noglobal; + UWORD tmsgsread; + UWORD tmsgsdumped; + UWORD minchat; + UWORD minul; + UWORD tmpword; + UWORD PrevNodestatus; + ULONG PrevNodesubStatus; + ULONG waitforcallerstack; + ULONG pad2342; + APTR Tmpusermem; + APTR Loginlastread; + UBYTE windowsizepos[2*8]; /* top,left,width,height * 2 (zoom også) */ + struct DateStamp lastchartime; + struct DateStamp tmpdatestamp; + char tmpnodestatustext[24]; + char readlinebuffer[80]; // ?? + char intextbuffer[82]; // Hele argumentlinja + char outtextbuffer[82*2]; // ?? + char conouttextbuffer[82*2]; + char transouttextbuffer[82*4]; + struct NodeRecord Nodemem; +/* SEven +*/ + char logfilename[24]; + char Publicportname[20]; + char Paragonportname[16]; /* brukes bare når paragondoors kjøres */ +#define tmpwhilenotinparagon Paragonportname + UWORD pad_234234; + UBYTE Nodetaskname_BCPL; + char Nodetaskname[59]; + char pastetext[80]; + char tmpnametext[80]; + struct MessageRecord tmpmsgheader; + char tmptext[80]; + char maintmptext[80]; + struct Fileentry tmpfileentry; + struct FileInfoBlock infoblockmem; + UBYTE infoblockmempad[2]; +#define tmplargestore infoblockmem + + struct XPR_IO xpriomem; + UBYTE dummy[100]; +#define tmptext2 dummy + char historybuffer[1024]; + ULONG msgqueue[NumMsgNrInQueue+1]; + ULONG prevqueue[52]; + struct UserRecord CU; +}; + +/* Bits for the DoDiv field +*/ +#define DoDivB_HideNode 0 +#define DoDivF_HideNode (1L<<0) + +#define DoDivB_NoInit 1 +#define DoDivF_NoInit (1L<<1) + +#define DoDivB_Sleep 2 +#define DoDivF_Sleep (1L<<2) + +#define DoDivB_ExitWaitforCaller 3 +#define DoDivF_ExitWaitforCaller (1L<<3) + +#ifdef sfdgsdfg + BITDEF DIV,QuickMode,0 + BITDEF DIV,StealthMode,1 + BITDEF DIV,InNewuser,2 + BITDEF DIV,Browse,3 + BITDEF DIV,InBrowse,4 + BITDEF DIV,InNetLogin,5 + + STRUCTURE findfilestruct,0 + STRUCT ff_infoblockmem,fib_SIZEOF + ULONG ff_lock + STRUCT ff_pattern,160 + STRUCT ff_path,100 + STRUCT ff_full,160 + LABEL findfilestruct_sizeof +#endif + +#define Net_FromCode '\x1e' /* From = Terminert av newline */ +#define Net_ToCode '\x1f' /* To = Terminert av newline */ +#define Net_SubjCode '\x1d' /* Subject = Terminert av newline */ +#define Net_ExtDCode '\x1c' /* ExtData = Terminert av $FF byte */ + +#endif /* NODE_H */ diff --git a/Include/node.i b/Include/node.i new file mode 100644 index 0000000..1f7f200 --- /dev/null +++ b/Include/node.i @@ -0,0 +1,204 @@ + IFND NODE_I +NODE_I SET 1 +***************************************************************** +* node variabler * +***************************************************************** + + IFND BBS_I + include 'bbs.i' + ENDC ; BBS_I + + IFND XPR_I + include 'xpr.i' + ENDC ; XPR_I + + STRUCTURE ramblocks,0 + BYTE con_tegn + BYTE Divmodes ; se def under + IFND DEMO + BYTE ser_tegn + ELSEIF + BYTE pad_1241 + ENDC + BYTE tegn_fra + + UWORD loginmin + UWORD joinfilemin + LONG lastdayonline + UWORD lastminonline + + LONG oldcliname + LONG filereqadr + LONG windowadr + LONG pubscreenadr + LONG fontadr + LONG windowtitleptr + LONG showuserwindowadr + LONG creadreq + LONG cwritereq + IFND DEMO + LONG sreadreq + LONG swritereq + ENDC + LONG timer1req + LONG timer2req + + LONG nodestack + LONG waitbits + LONG gotbits + LONG consigbit + IFND DEMO + LONG sersigbit + ENDC + LONG intsigbit + LONG showwinsigbit + LONG timer1sigbit + LONG timer2sigbit + LONG intersigbit + LONG publicsigbit + LONG rexxsigbit + LONG intmsgport + LONG msg + LONG HighMsgQueue + LONG curprompt + LONG ULfilenamehack +tmpstore equ ULfilenamehack + LONG ParamPass + LONG tmpval + LONG SerTotOut + + LONG infoblock + BYTE readcharstatus + BYTE dosleepdetect + BYTE tmpsysopstat + IFND DEMO + BYTE RealCommsPort + ELSEIF + BYTE pad_142 + ENDC + BYTE batch + BYTE cursorpos + + LONG currentmsg + UWORD menunr + UWORD confnr + UWORD linesleft + BYTE in_waitforcaller + BYTE readlinemore + BYTE ShutdownNode + BYTE active + BYTE activesysopchat + BYTE DoDiv + UWORD Historyoffset + + IFND DEMO + UWORD cpsrate + ENDC + UWORD intextchar + UWORD outtextchar + UWORD outtextbufferpos + + BYTE readingpassword + BYTE userok + BYTE Tinymode + BYTE warningtineindex + + UWORD OldTimelimit + UWORD OldFilelimit + UBYTE NodeError + UBYTE DlUlstatus + UWORD NodeNumber + ULONG FrontDoorMsg + ULONG nodeport + ULONG rexxport + ULONG nodepublicport + ULONG nodenoden + ULONG msgmemsize + APTR tmpmsgmem + ULONG exallctrl + APTR node_menu + APTR visualinfo + UBYTE FSEditor + UBYTE outlines + UBYTE intersigbitnr + UBYTE serescstat + UBYTE lastchar + UBYTE noglobal + UWORD tmsgsread + UWORD tmsgsdumped + UWORD minchat + UWORD minul + UWORD tmpword + UWORD PrevNodestatus + ULONG PrevNodesubStatus + ULONG waitforcallerstack + ULONG pad34234 + APTR Tmpusermem + APTR Loginlastread + STRUCT windowsizepos,2*8 ; top,left,width,height * 2 (zoom også) + STRUCT lastchartime,ds_SIZEOF + STRUCT tmpdatestamp,ds_SIZEOF + STRUCT tmpnodestatustext,24 + STRUCT readlinebuffer,80 + STRUCT intextbuffer,82 + STRUCT outtextbuffer,82*2 + STRUCT conouttextbuffer,82*2 + STRUCT transouttextbuffer,82*4 + STRUCT Nodemem,NodeRecord_SIZEOF + SEven + STRUCT logfilename,24 + STRUCT Publicportname,20 + STRUCT Paragonportname,16 ; brukes bare når paragondoors kjøres +tmpwhilenotinparagon equ Paragonportname + UWORD pad_234234 + UBYTE Nodetaskname_BCPL + STRUCT Nodetaskname,59 + STRUCT pastetext,80 + STRUCT tmpnametext,80 + STRUCT tmpmsgheader,MessageRecord_SIZEOF + STRUCT tmptext,80 + STRUCT maintmptext,80 + STRUCT tmpfileentry,Fileentry_SIZEOF + STRUCT infoblockmem,fib_SIZEOF+2 +tmplargestore equ infoblockmem + STRUCT xpriomem,XPR_IO_SIZEOF + STRUCT dummy,100 +tmptext2 = dummy + STRUCT historybuffer,1024 + STRUCT msgqueue,4*(NumMsgNrInQueue+1) + STRUCT prevqueue,4*52 + LABEL CU ;UserRecord_SIZEOF + + LABEL ramblocks_SIZE ; + UserRecord_SIZEOF*2+maxconferences*4 + + BITDEF DIV,QuickMode,0 + BITDEF DIV,StealthMode,1 + BITDEF DIV,InNewuser,2 + BITDEF DIV,Browse,3 + BITDEF DIV,InBrowse,4 + BITDEF DIV,InNetLogin,5 + + BITDEF DoDiv,HideNode,0 + BITDEF DoDiv,NoInit,1 + BITDEF DoDiv,Sleep,2 + BITDEF DoDiv,ExitWaitforCaller,3 + + STRUCTURE findfilestruct,0 + STRUCT ff_infoblockmem,fib_SIZEOF + ULONG ff_lock + STRUCT ff_pattern,160 + STRUCT ff_path,100 + STRUCT ff_full,160 + LABEL findfilestruct_sizeof + +Net_FromCode equ $1e ; From = Terminert av newline * +Net_ToCode equ $1f ; To = Terminert av newline * +Net_SubjCode equ $1d ; Subject = Terminert av newline * +Net_ExtDCode equ $1c ; ExtData = Terminert av $FF byte * + + IFNE Nodetaskname_BCPL&3 + FAIL "Nodetaskname_BCPL er ikke på 4 byte boundry" + ENDC + + + ENDC ; NODE_I diff --git a/Include/nodedefs.i b/Include/nodedefs.i new file mode 100644 index 0000000..3de767b --- /dev/null +++ b/Include/nodedefs.i @@ -0,0 +1,195 @@ + XDEF aapnemodem + XDEF wf_makenodelocal1 + XDEF v42bistext + XDEF mnptext + XDEF nonetext + XDEF throwouttext1 + XDEF throwouttext2 + XDEF getconfunreadmsgs + XDEF inputnr + XDEF typefilemaybeall + XDEF getaccbittext + XDEF parseaccessbitssub + XDEF initwaitforcaller1 + XDEF getfullnamewithreq + XDEF getline + XDEF accessbitstext + XDEF konverter + XDEF konverterw + XDEF invalidacctext + XDEF readchar + XDEF skrivnr + XDEF skrivnrw + XDEF strcopymaxlen + XDEF strcopylen + XDEF strlen + XDEF strrcopy + XDEF strcopy + XDEF upchar + XDEF moretext + XDEF morenohelptext + XDEF writechar + XDEF writechari + XDEF writetexti + XDEF writetextleni + XDEF writetextlen + XDEF writetextmemi + XDEF writetext + XDEF writetextlfill + XDEF writetextrfill + XDEF CreatePort + XDEF DeletePort + XDEF fillinnodenr + XDEF parserexxcmd + XDEF comparestringsfull + XDEF comparestringsifull + XDEF publicportname + XDEF memcopyrlen + XDEF getkonfbulletname + XDEF first + XDEF memcopylen + XDEF comparestringsicase + XDEF nodestart + XDEF nstart + XDEF getdirnamesub + XDEF getbestfilenamebuffer + XDEF startsleepdetect + + XDEF ansiyellowtext + XDEF deadtext + XDEF ansilbluetext + XDEF createmenutags + XDEF MenuTags + XDEF getname + XDEF writetexto + XDEF writeerroro + XDEF breakoutimage + XDEF calleditor + XDEF doconsole + XDEF dointuition + XDEF doserial + XDEF findfile + XDEF getfilelen + XDEF gettimestr + XDEF mayedlinepromptfull + XDEF mayedlineprompt + XDEF memclr + XDEF newconline + XDEF outimage + XDEF saveuserarea + XDEF serwritestringdo + XDEF strcat + XDEF testbreak + XDEF typefile + XDEF typefileansi + XDEF typefilenoerror + XDEF updatetime + XDEF waitsecs + XDEF writeconchar + XDEF writecontext + XDEF writecontextlen + XDEF calctime + XDEF deletefile + XDEF divl + XDEF findcleanup + XDEF findfirst + XDEF findnext + XDEF fjernpath + XDEF initserread + XDEF parseprotocol + XDEF readlineprompt + XDEF serwritestringlen + XDEF setupa4a5 + XDEF stopserread + XDEF toaysopupload + XDEF waitseroutput + XDEF writecontextrfill + XDEF writelogtexttimed + XDEF writetosysoptextd + XDEF dofileinfoline1 + XDEF dofileinfoline2 + XDEF dotypeinfofile + XDEF doviewarchive + XDEF justchecksysopaccess + XDEF downloadfile1 + XDEF addfilesub1 + XDEF getusername + XDEF gettopqueue + XDEF removefromqueue + XDEF unjoin + XDEF atoi + XDEF _checkmemberofconf + XDEF stopreviewmessages + XDEF sendintermsgmsg + XDEF killrepwritelog + XDEF _kanskrive + XDEF changenodestatus + XDEF changenodestatusnostore + XDEF deletefilefromabbs + XDEF buildfilepath + XDEF getyorn + XDEF getfromname + XDEF gettoname + XDEF skipnetnames + XDEF nodehook + XDEF checkupdatedbulletins + XDEF readlinepromptwhelp + XDEF findnameicase + XDEF movefileinabbs + XDEF getnextconfnr + XDEF getnetsubject + XDEF readline + XDEF readlineall + XDEF upword + XDEF readlinepromptwhelpflush + XDEF stengmodem + XDEF tmpcloseserport + XDEF tmpopenserport + XDEF getkonfbulletlist + + XDEF filelistfilname + XDEF cleartoEOLtext + XDEF cpstext + XDEF errorstext + XDEF logdlmsgtext + XDEF logulmsgtext + XDEF receivetext + XDEF sendtext + XDEF startyourtext + XDEF traprotocoltext + XDEF trfstatl1text + XDEF trfstatl2text + XDEF abbsextension + XDEF nulltext + XDEF nyconfgrabtext + XDEF paragonportname + XDEF doorspath + XDEF pltellsysoptext + XDEF usernotfountext + XDEF scanuserregtext + XDEF spacetext + XDEF enterffnametext + XDEF privatemsgtext + XDEF tonoansitext + XDEF bordertext + XDEF subjecttext + XDEF abortmsgtext + XDEF filetablfultext + XDEF fileihnorettext + XDEF ansiclearscreen + XDEF errloadfilhtext + XDEF logentermsgtext + XDEF logreplymsgtext + XDEF CursorOffData + XDEF CursorOnData + XDEF deltext + XDEF versionstr + XDEF dirnotfoundtext + XDEF errsavefilhtext + XDEF serreadstring + XDEF ansiredtext + XDEF ansiwhitetext + XDEF preskreopentext + XDEF bulletinpath + XDEF errorrenbultext + XDEF bulletlisttext diff --git a/Include/noderefs.i b/Include/noderefs.i new file mode 100644 index 0000000..78113cb --- /dev/null +++ b/Include/noderefs.i @@ -0,0 +1,34 @@ + XREF main +; XREF fseblock_SIZE + XREF abbsrootname + XREF fseeditor + XREF NormAtttext + XREF ansiclearsctext + XREF copyrighttext + XREF dosbase + XREF exebase + XREF aslbase + XREF rexbase + XREF utibase + XREF fifobase + XREF Exception + XREF gfxbase + XREF intbase + XREF gadbase + XREF dfobase + XREF mainmemoryblock + XREF mainmsgport + XREF mainscreenadr + XREF nodelist + XREF Project0NewMenu0 + XREF dosnip + XREF getnextsnipchar + XREF freepastemem + XREF shortprotocname + XREF protoclname + XREF protocolisbatch + XREF MainTask + XREF skiptonewline + XREF packnetmessage + XREF doisnetmessage + XREF _copybulletin diff --git a/Include/paragon.pro b/Include/paragon.pro new file mode 100644 index 0000000..b2b83ca --- /dev/null +++ b/Include/paragon.pro @@ -0,0 +1,2 @@ + XREF doparagondoor + XREF handleparagonmsg diff --git a/Include/rexx.pro b/Include/rexx.pro new file mode 100644 index 0000000..10ce606 --- /dev/null +++ b/Include/rexx.pro @@ -0,0 +1,2 @@ + XREF arexxcomtxt + XREF arexxjmp diff --git a/Include/tables.i b/Include/tables.i new file mode 100644 index 0000000..5425cb0 --- /dev/null +++ b/Include/tables.i @@ -0,0 +1,10 @@ + +windowtagssize equ 144 + +windowwidthoff equ 4 +windowheightoff equ 12 +windowtitleoff equ 20 +windowtopoff equ 28 +windowleftoff equ 36 +windowflagsoff equ 44 +windowpubscreenoff equ 52 diff --git a/Include/tables.pro b/Include/tables.pro new file mode 100644 index 0000000..2116674 --- /dev/null +++ b/Include/tables.pro @@ -0,0 +1,13 @@ + XREF firstzoom + XREF NewWindowStructure1 + XREF windowtags + XREF warningtimearr + XREF daytext + XREF monthtext + XREF xprbaudates + XREF convertISOtoxxx + XREF convertxxxtoISO + XREF charsettext + XREF transwhat7bitchar + XREF fraISO7tilISO8 + XREF fraISO8tilISO7 diff --git a/Include/transfer.pro b/Include/transfer.pro new file mode 100644 index 0000000..48d3ba3 --- /dev/null +++ b/Include/transfer.pro @@ -0,0 +1,6 @@ + XREF sendfile + XREF skrivuldllog + XREF dosendGogR + XREF doreciveGogR + XREF receivefile + XREF docheckGogR diff --git a/Include/xpr.h b/Include/xpr.h new file mode 100644 index 0000000..8736a7a --- /dev/null +++ b/Include/xpr.h @@ -0,0 +1,9 @@ +#pragma libcall XProtocolBase XProtocolCleanup 1e 801 +#pragma libcall XProtocolBase XProtocolSetup 24 801 +#pragma libcall XProtocolBase XProtocolSend 2a 801 +#pragma libcall XProtocolBase XProtocolReceive 30 801 + +long XProtocolCleanup(struct XPR_IO *); +long XProtocolSetup(struct XPR_IO *); +long XProtocolSend(struct XPR_IO *); +long XProtocolReceive(struct XPR_IO *); diff --git a/Include/xpr.i b/Include/xpr.i new file mode 100644 index 0000000..08f4c2f --- /dev/null +++ b/Include/xpr.i @@ -0,0 +1,102 @@ + IFND XPR_I +XPR_I SET 1 + + STRUCTURE XPR_IO,0 + APTR xpr_filename ; File name(s) + ULONG xpr_fopen ; Open file + ULONG xpr_fclose ; Close file + ULONG xpr_fread ; Get char from file + ULONG xpr_fwrite ; Put string to file + ULONG xpr_sread ; Get char from serial + ULONG xpr_swrite ; Put string to serial + ULONG xpr_sflush ; Flush serial input buffer + ULONG xpr_update ; Print stuff + ULONG xpr_chkabort ; Check for abort + ULONG xpr_chkmisc ; Check misc. stuff + ULONG xpr_gets ; Get string interactively + ULONG xpr_setserial ; Set and Get serial info + ULONG xpr_ffirst ; Find first file name + ULONG xpr_fnext ; Find next file name + ULONG xpr_finfo ; Return file info + ULONG xpr_fseek ; Seek in a file + ULONG xpr_extension ; Number of extensions + ULONG xpr_data ; Initialized by Setup. + ULONG xpr_options ; Prompts user for commands or options. + ULONG xpr_unlink ; Deletes files by name. + ULONG xpr_squery ; Returns actual size of current serial buffer contents. + ULONG xpr_getptr ; Gets various pointers from user. + LABEL XPR_IO_SIZEOF + +XPR_EXTENSION equ 4 + +_LVOXProtocolCleanup EQU -$1E +_LVOXProtocolSetup EQU -$24 +_LVOXProtocolSend EQU -$2A +_LVOXProtocolReceive EQU -$30 + + STRUCTURE XPR_UPDATE,0 + ULONG xpru_updatemask + APTR xpru_protocol + APTR xpru_filename + ULONG xpru_filesize + APTR xpru_msg + APTR xpru_errormsg + ULONG xpru_blocks + ULONG xpru_blocksize + ULONG xpru_bytes + ULONG xpru_errors + ULONG xpru_timeouts + ULONG xpru_packettype + ULONG xpru_packetdelay + ULONG xpru_chardelay + APTR xpru_blockcheck + APTR xpru_expecttime + APTR xpru_elapsedtime + ULONG xpru_datarate + ULONG xpru_reserved1 + ULONG xpru_reserved2 + ULONG xpru_reserved3 + ULONG xpru_reserved4 + ULONG xpru_reserved5 + LABEL XPR_UPDATE_SIZEOF + +* +* The possible bit values for the xpru_updatemask are: +* + + BITDEF XPRU,PROTOCOL,0 + BITDEF XPRU,FILENAME,1 + BITDEF XPRU,FILESIZE,2 + BITDEF XPRU,MSG,3 + BITDEF XPRU,ERRORMSG,4 + BITDEF XPRU,BLOCKS,5 + BITDEF XPRU,BLOCKSIZE,6 + BITDEF XPRU,BYTES,7 + BITDEF XPRU,ERRORS,8 + BITDEF XPRU,TIMEOUTS,9 + BITDEF XPRU,PACKETTYPE,10 + BITDEF XPRU,PACKETDELAY,11 + BITDEF XPRU,CHARDELAY,12 + BITDEF XPRU,BLOCKCHECK,13 + BITDEF XPRU,EXPECTTIME,14 + BITDEF XPRU,ELAPSEDTIME,15 + BITDEF XPRU,DATARATE,16 + +* +* The xpro_option structure +* + STRUCTURE XPR_OPTION,0 + APTR xpro_description ; description of the option + ULONG xpro_type ; type of option + APTR xpro_value ; pointer to a buffer with the current value + ULONG xpro_length ; buffer size + +* +* Valid values for xpro_type are: +* + +XPRO_BOOLEAN equ 1 ; xpro_value is "yes", "no", "on" or "off" +XPRO_LONG equ 2 ; xpro_value is string representing a number +XPRO_STRING equ 3 ; xpro_value is a string + + ENDC ; XPR_I diff --git a/Include/xproto.h b/Include/xproto.h new file mode 100644 index 0000000..f2d970c --- /dev/null +++ b/Include/xproto.h @@ -0,0 +1,119 @@ +/** xproto.h +* +* Include file for External Protocol Handling +* +**/ +/* +* The structure +*/ +struct XPR_IO { + char *xpr_filename; /* File name(s) */ + long (*xpr_fopen)(); /* Open file */ + long (*xpr_fclose)(); /* Close file */ + long (*xpr_fread)(); /* Get char from file */ + long (*xpr_fwrite)(); /* Put string to file */ + long (*xpr_sread)(); /* Get char from serial */ + long (*xpr_swrite)(); /* Put string to serial */ + long (*xpr_sflush)(); /* Flush serial input buffer*/ + long (*xpr_update)(); /* Print stuff */ + long (*xpr_chkabort)(); /* Check for abort */ + long (*xpr_chkmisc)(); /* Check misc. stuff */ + long (*xpr_gets)(); /* Get string interactively */ + long (*xpr_setserial)(); /* Set and Get serial info */ + long (*xpr_ffirst)(); /* Find first file name */ + long (*xpr_fnext)(); /* Find next file name */ + long (*xpr_finfo)(); /* Return file info */ + long (*xpr_fseek)(); /* Seek in a file */ + long xpr_extension; /* Number of extensions */ + long *xpr_data; /* Initialized by Setup. */ + long (*xpr_options)(); /* Multiple XPR options. */ + long (*xpr_unlink)(); /* Delete a file. */ + long (*xpr_squery)(); /* Query serial device */ + long (*xpr_getptr)(); /* Get various host ptrs */ + }; +/* +* Number of defined extensions +*/ +#define XPR_EXTENSION 4L + +/* +* The functions +*/ +extern long XProtocolSend(), XProtocolReceive(), + XProtocolSetup(), XProtocolCleanup(); +/* +* Flags returned by XProtocolSetup() +*/ +#define XPRS_FAILURE 0x00000000L +#define XPRS_SUCCESS 0x00000001L +#define XPRS_NORECREQ 0x00000002L +#define XPRS_NOSNDREQ 0x00000004L +#define XPRS_HOSTMON 0x00000008L +#define XPRS_USERMON 0x00000010L +#define XPRS_HOSTNOWAIT 0x00000020L +/* +* The update structure +*/ +struct XPR_UPDATE { long xpru_updatemask; + char *xpru_protocol; + char *xpru_filename; + long xpru_filesize; + char *xpru_msg; + char *xpru_errormsg; + long xpru_blocks; + long xpru_blocksize; + long xpru_bytes; + long xpru_errors; + long xpru_timeouts; + long xpru_packettype; + long xpru_packetdelay; + long xpru_chardelay; + char *xpru_blockcheck; + char *xpru_expecttime; + char *xpru_elapsedtime; + long xpru_datarate; + long xpru_reserved1; + long xpru_reserved2; + long xpru_reserved3; + long xpru_reserved4; + long xpru_reserved5; + }; +/* +* The possible bit values for the xpru_updatemask are: +*/ +#define XPRU_PROTOCOL 0x00000001L +#define XPRU_FILENAME 0x00000002L +#define XPRU_FILESIZE 0x00000004L +#define XPRU_MSG 0x00000008L +#define XPRU_ERRORMSG 0x00000010L +#define XPRU_BLOCKS 0x00000020L +#define XPRU_BLOCKSIZE 0x00000040L +#define XPRU_BYTES 0x00000080L +#define XPRU_ERRORS 0x00000100L +#define XPRU_TIMEOUTS 0x00000200L +#define XPRU_PACKETTYPE 0x00000400L +#define XPRU_PACKETDELAY 0x00000800L +#define XPRU_CHARDELAY 0x00001000L +#define XPRU_BLOCKCHECK 0x00002000L +#define XPRU_EXPECTTIME 0x00004000L +#define XPRU_ELAPSEDTIME 0x00008000L +#define XPRU_DATARATE 0x00010000L +/* +* The xpro_option structure +*/ +struct xpr_option { + char *xpro_description; /* description of the option */ + long xpro_type; /* type of option */ + char *xpro_value; /* pointer to a buffer with the current value */ + long xpro_length; /* buffer size */ +}; +/* +* Valid values for xpro_type are: +*/ +#define XPRO_BOOLEAN 1L /* xpro_value is "yes", "no", "on" or "off" */ +#define XPRO_LONG 2L /* xpro_value is string representing a number */ +#define XPRO_STRING 3L /* xpro_value is a string */ +#define XPRO_HEADER 4L /* xpro_value is ignored */ +#define XPRO_COMMAND 5L /* xpro_value is ignored */ +#define XPRO_COMMPAR 6L /* xpro_value contains command parameters */ + diff --git a/JEO.c b/JEO.c new file mode 100644 index 0000000..0dc1191 --- /dev/null +++ b/JEO.c @@ -0,0 +1,1399 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +int HandleMsg (struct ABBSmsg *msg); + +char Dummy[3000]; + +struct ABBSmsg msg; + +extern far int msprintf (char *, const char *, ...); +#define a4a5 register __a4 struct ramblocks *nodebase,register __a5 struct Mainmemory *mainmeory +#define usea4a5 nodebase,mainmeory +extern far ULONG exebase; + +extern far char CursorOffData[]; +extern far char CursorOnData[]; +extern far char deltext[]; +extern far char moretext[]; +extern far char morenohelptext[]; +extern far char accessbitstext[]; +extern far char invalidacctext[]; +extern far char deadtext[]; +extern far char invalidacctext[]; +extern far char versionstr[]; + +extern __asm far VOID CheckInvited (a4a5); +extern __asm far BOOL saveuser (register __a0 char *Name, register __a1 struct UserRecord *cu); +extern __asm far BOOL saveuserarea (register __d0 UWORD size, register __a0 UWORD access); +extern __asm far writecontext (register __a0 char *text,a4a5); +extern __asm far writetexto (register __a0 char *text,a4a5); // Med return +extern __asm far loadusernrnr (register __d0 ULONG usernr, register __a0 struct UserRecord *ur, a4a5); // Med return +extern __asm far writetexti (register __a0 char *text,a4a5); // Uten return +extern __asm far writetext (register __a0 char *text,a4a5); +extern __asm far BOOL Handle_Preview (register __d0 int filedirnr, register __a0 struct Fileentry *fileentry, a4a5); +extern __asm far sendfile (register __a0 char *Filename,a4a5); +//extern __asm far sendpreviewfile (register __a0 char *Filename,a4a5); +extern __asm far VOID Write_user_CPS (register __d5 UWORD cps, a4a5); +extern __asm far readchar (a4a5); +extern __asm far readlineall (register __d0 int len, a4a5); +extern __asm far mayedlineprompt (register __d0 int len, register __a0 char *Text, register __a1 char *TextArg, a4a5); +extern __asm far VOID Hebbe (register __a0 char *Buf, register __d0 int len, a4a5); +__asm far VOID DelText (register __d0 UWORD nr, a4a5); + +__asm far BOOL CheckTextMode (register __d1 int pos, register __d2 char Tegn, + register __d3 int len, register __a3 char *Buf, a4a5) +{ +/* + int i; + BPTR fh; + char Buffer[200]; + + if (fh = Open ("PRT:", MODE_NEWFILE)) + { + msprintf (Buffer, "pos = %ld, Tegn = %ld, len = %ld\n", pos, Tegn, len); + Write (fh, Buffer, strlen (Buffer)); + Close (fh); + } + if (pos + 1 < len) + { + for (i = pos + 1; i < len; i++) + { + switch (Buf[i]) + { + case ' ': return (FALSE); + case '.': return (FALSE); + case ',': return (FALSE); + case Tegn: return (TRUE); + } + } + } +*/ + return (FALSE); +} + +#define START 0 +#define GO 1 +#define STOP 2 + +__asm far VOID WriteLineNr (a4a5) +{ + WORD i; + + if (!nodebase->readlinemore) + { + nodebase->linesleft = 65535; // Vi vil ikke ha noen more her.. + putreg (REG_A6,exebase); + writetexti ("\f", usea4a5); + for (i = 70; i >= 3; i--) + { + msprintf (Dummy, "%2ld\n", i); + writetexti (Dummy, usea4a5); + } + writetexti ("\n", usea4a5); + nodebase->linesleft = nodebase->CU.PageLength; + } +} + + +// Filer fra killa brukerer blir fra sysop i steden! +// + +LONG FileSize (UBYTE *Name) +{ + register BPTR lock = 0; + register struct FileInfoBlock *fib = 0; + register LONG size = ERROR; + + if (!(fib = (struct FileInfoBlock *)AllocMem (sizeof (struct FileInfoBlock), MEMF_CLEAR))) + return (-2); + + if (lock = Lock (Name, ACCESS_READ)) + { + if (Examine (lock, fib)) + size = fib->fib_Size; + } + + if (lock) + UnLock (lock); + if (fib) + FreeMem (fib, sizeof (struct FileInfoBlock)); + + return (size); +} + +__asm far VOID PackUserDoFiles (a4a5) +{ + BPTR fh; + + if (fh = Open ("RAM:JEOJEO", MODE_NEWFILE)) + { + Write (fh, &nodebase->tmpmsgmem, nodebase->msgmemsize); + Close (fh); + } +} + +VOID Slash_to_space (char *S) +{ + while (*S) + { + if (*S == '/') + *S = ' '; + *S++; + } +} + +ULONG CenterText (UBYTE *String, UBYTE max) +{ + ULONG len; + + len = strlen (String); + if (len >= max) + return (0); + + return ((max / 2) - (len / 2)); +} + +__asm far VOID Make_conf_text (register __a0 char *Conf, a4a5) +{ + char Confname[51]; + char Hold[200]; + char Line[80]; + char Filename[108]; + BPTR fh = 0, lock = 0; + int line; + BOOL go_flag; + char Conf_text_dir[] = "ABBS:Text/Conf_text"; + UBYTE start; + + lock = CreateDir (Conf_text_dir); + if (lock) + UnLock (lock); + + strcpy (Confname, Conf); + Slash_to_space (Confname); + msprintf (Filename, "%s/%s", Conf_text_dir, Confname); + if (fh = Open (Filename, MODE_NEWFILE)) + { + go_flag = TRUE; + line = Dummy[0] = 0; + + strcpy (Dummy, "\n __ __\n"); + strcat (Dummy, " ___/ / \\ \\___\n"); + strcat (Dummy, " \\ / /\\  Conference /\\ \\ /\n"); + strcat (Dummy, " ___________/ \\/\\ \\  ------------ / /\\/ \\___________\n"); + strcat (Dummy, " / / / \\ \\ \\\n"); + Write (fh, &Dummy, strlen (Dummy)); + + start = CenterText (Conf, 71); + strcpy (Hold, " \\ ___ \\/ \\/ ___ /\n"); + strncpy (&Hold[start+9], Conf, strlen (Conf)); + Write (fh, &Hold, strlen (Hold)); + + strcpy (Dummy, " \\__ / \\______________________ _____________________/ \\ __/\n"); + strcat (Dummy, " \\/ \\_/ \\/\n\n"); + Write (fh, &Dummy, strlen (Dummy)); + + strcpy (Dummy, " ***************************************************************************\n"); + Write (fh, &Dummy, strlen (Dummy)); + + putreg (REG_A6,exebase); + writetexto ("\nPlease enter conference text (enter on blank line quits)", usea4a5); + putreg (REG_A6,exebase); + writetexto ("Type ç (ALT-C) at the end of each line to allign text to center.", usea4a5); + while (go_flag) + { + msprintf (Dummy, "%02ld: ", line + 1); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + putreg (REG_A6,exebase); + readlineall (71, usea4a5); + if (*(nodebase->intextbuffer)) + { + strcpy (Line, nodebase->intextbuffer); + if (Line[strlen (Line) - 1] == 'ç') // Skal vi sentrere? + { + Line[strlen (Line) - 1] = 0; // Ta bort ç + start = CenterText (Line, 71); // Ja + strcpy (Hold, " "); + strncpy (&Hold[start], Line, strlen (Line)); + msprintf (Dummy, " * %-71s *\n", Hold); + } + else + msprintf (Dummy, " * %-71s *\n", nodebase->intextbuffer); + if (*(Dummy)) + { + Write (fh, &Dummy, strlen (Dummy)); + line++; + } + } + else + { + if (line) // Har vi skrevet noe? + { + strcpy (Dummy, " ***************************************************************************\n"); + Write (fh, &Dummy, strlen (Dummy)); + } + go_flag = FALSE; + } + } + strcpy (Dummy, ""); // Resetter sakene ;) + Write (fh, &Dummy, strlen (Dummy)); + Close (fh); + if (line) + { + putreg (REG_A6,exebase); + writetexto ("Done.\n", usea4a5); + } + } + else + { + msprintf (Dummy, "\nError opening '%s'.\nCouldn't create conference text file...\n\n", Filename); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } +} + +/* +__asm far char GetChar (a4a5) +{ + putreg (REG_A6,exebase); + writetexti ("Tast inne et eller annet: ", usea4a5); +} +*/ +/* +__asm far VOID Test (a4a5) +{ + putreg (REG_A6,exebase); + writetexti ("Tast inne et eller annet: ", usea4a5); + putreg (REG_A6,exebase); + readline (usea4a5); + msprintf (Dummy, "Du tastet: %s", nodebase->intextbuffer); + putreg (REG_A6,exebase); + writetexto (Dummy, usea4a5); + +// msprintf (Dummy, "status = %ld\n", nodebase->readcharstatus); +// writetexto (Dummy, usea4a5); +} +*/ +/* +BOOL GetUser (ULONG nr, UBYTE *User) // Henter bare navnet fra nummer... +{ + int err; + BOOL ret = FALSE; + + msg.Command = Main_getusername; + msg.UserNr = nr; + err = HandleMsg (&msg); + if (err == Error_OK) + { + strcpy (User, msg.Name); + ret = TRUE; + } + return (ret); +} +*/ + +BOOL Check_bits (char *Scan_bits, ULONG access) +{ + UBYTE i; + + for (i = 0; Scan_bits[i] != 0; i++) // Sjekker for valide bits + { + switch (Scan_bits[i]) + { + case 'R': { if (!(access & ACCF_Read)) return (FALSE); break; } + case 'W': { if (!(access & ACCF_Write)) return (FALSE); break; } + case 'U': { if (!(access & ACCF_Upload)) return (FALSE); break; } + case 'D': { if (!(access & ACCF_Download)) return (FALSE); break; } + case 'F': { if (!(access & ACCF_FileVIP)) return (FALSE); break; } + case 'I': { if (!(access & ACCF_Invited)) return (FALSE); break; } + case 'S': { if (!(access & ACCF_Sigop)) return (FALSE); break; } + case 'Z': { if (!(access & ACCF_Sysop)) return (FALSE); break; } + } + } + return (TRUE); +} + +VOID Do_bits (char *Bits, ULONG access) +{ + if (access & ACCF_Read) strcat (Bits, "R"); + if (access & ACCF_Write) strcat (Bits, "W"); + if (access & ACCF_Upload) strcat (Bits, "U"); + if (access & ACCF_Download) strcat (Bits, "D"); + if (access & ACCF_FileVIP) strcat (Bits, "F"); + if (access & ACCF_Invited) strcat (Bits, "I"); + if (access & ACCF_Sigop) strcat (Bits, "S"); + if (access & ACCF_Sysop) strcat (Bits, "Z"); +} + +char Bits[] = "RWUDFISZ"; + +BOOL Parse_bits (char *Scan_bits) +{ + UBYTE i, j; + BOOL flag; + + for (i = 0; Scan_bits[i] != 0; i++) // Sjekker for valide bits + { + flag = FALSE; + for (j = 0; Bits[j] != 0; j++) + { + if (Scan_bits[i] == Bits[j]) + { + flag = TRUE; + break; + } + } + if (!flag) + return (FALSE); + } + + return (TRUE); +} + +VOID ReverseString (char *String) +{ + ULONG i, len, x; + UBYTE c; + + x = len = strlen (String); + x >>= 1; // Deler på 2 + len--; + for (i = 0; i < x; i++, len--) + { + c = String[i]; + String[i] = String[len]; + String[len] = c; + } +} + +VOID Strip_access (char *Access) +{ + char Hold[10]; + BYTE i, j; + + for (i = strlen (Access) - 1, j = 0; i >= 0; i--, j++) + { + Hold[j] = Access[i]; + if (Hold[j] == ' ') + break; + } + Hold[j] = 0; + strcpy (Access, Hold); + ReverseString (Access); +} + +__asm far VOID ShowUsers_c (a4a5) +{ + struct ConfigRecord *config = &mainmeory->config; + BOOL c_flag, go_flag = TRUE; + char Time[15]; + char Access_scan[9]; + ULONG usernr, linesleft, listed = 0, killed = 0, i; + char Date[20], Hold[30]; + struct DateTime dt = { NULL }; + char DayString[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; + char m1, m2, c; + UBYTE month; + UWORD active_conf; + UWORD cur_line; + BOOL sysop = FALSE; + char Name[45]; + BOOL rip; + char Bits[9]; + struct UserRecord *ur = 0; + char User[] = "user", Users[] = "users"; + char MonthString[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", + "Aug", "Sep", "Oct", "Nov", "Dec" }; + + if (!(ur = AllocMem (config->UserrecordSize, MEMF_CLEAR))) + return; + + active_conf = nodebase->confnr / 2; + + strcpy (Access_scan, "R"); + if (nodebase->CU.firstuserconf[active_conf].uc_Access & ACCF_Sysop) + { + sysop = TRUE; + putreg (REG_A6,exebase); + mayedlineprompt (8, "Access type : ", Access_scan, usea4a5); + strcpy (Access_scan, nodebase->intextbuffer); + for (i = 0; Access_scan[i] != 0; i++) + Access_scan[i] = toupper (Access_scan[i]); + + Strip_access (Access_scan); + if (*(Access_scan)) + { + if (!Parse_bits (Access_scan)) + { + putreg (REG_A6,exebase); + sprintf (Dummy, "%s %s\n", invalidacctext, Access_scan); + writetext (Dummy, usea4a5); + goto end; + } + } + else + goto end; + } + + linesleft = nodebase->linesleft; + nodebase->linesleft = 65535; // Slår av more-prompt + if (sysop) + cur_line = 1; + else + cur_line = 1; + for (usernr = 0; usernr < config->MaxUsers; usernr++) + { + if (!go_flag) + break; + loadusernrnr (usernr, ur, usea4a5); + strcpy (Name, ur->Name); + + if (usernr == 0) + { + putreg (REG_A6,exebase); + writetext ("\n", usea4a5); + } + + if (!Check_bits (Access_scan, ur->firstuserconf[active_conf].uc_Access)) + continue; // Ikke det vi spurte etter! + + rip = FALSE; + if (ur->Userbits & USERF_Killed) // Er killa? + { + killed++; + if (sysop) // Er det sysop som ser? ;) + { + sprintf (Dummy, "%s", deadtext); + strcat (Name, Dummy); + rip = TRUE; + } + else + continue; + } + + dt.dat_Stamp.ds_Days = ur->LastAccess.ds_Days; + dt.dat_Stamp.ds_Minute = ur->LastAccess.ds_Minute; + dt.dat_Stamp.ds_Tick = ur->LastAccess.ds_Tick; + dt.dat_Format = FORMAT_CDN; + dt.dat_Flags = 0; + dt.dat_StrDate = Date; + dt.dat_StrTime = Time; + + if (DateToStr (&dt)) + { + if (ur->LastAccess.ds_Days > 0) + { + strncpy (Hold, Date, 3); + Hold[3] = 0; + m1 = Date[3]; + m2 = Date[4]; + month = 0; + if (m1 == '1') + month += 10; + month += (m2 - 48); + month--; + strcat (Hold, MonthString[month]); + strncat (Hold, &Date[5], 3); + Time[5] = 0; + } + else + strcpy (Hold, "N/A"); + } + else + strcpy (Hold, "DATE ERROR"); + + strcpy (Bits, " "); + if (sysop) + Do_bits (Bits, ur->firstuserconf[active_conf].uc_Access); + if (!rip) + msprintf (Dummy, "%-39s %s %s %s%s", Name, DayString[ur->LastAccess.ds_Days%7], Hold, Time, Bits); + else + msprintf (Dummy, "%-44s %s %s %s%s", Name, DayString[ur->LastAccess.ds_Days%7], Hold, Time, Bits); + putreg (REG_A6,exebase); + writetexto (Dummy, usea4a5); + listed++; + cur_line++; + if (cur_line == nodebase->CU.PageLength) // Da spør vi om mere ;) + { + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + msprintf (Dummy, "%s", morenohelptext); + else + msprintf (Dummy, "%s", moretext); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + c_flag = TRUE; + while (c_flag) + { + nodebase->dosleepdetect = 1; + c = readchar (usea4a5); + c = toupper (c); + nodebase->dosleepdetect = 0; + switch (c) + { + case 'Y': + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 0; + break; + } + case ' ': // Samme som Y + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 0; + break; + } + case 13: // Return da gir vi kun 1 linje + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = nodebase->CU.PageLength - 1; + break; + } + case 'N': + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case -1: // Ejecta? + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case 0: // Quit ABBS + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case 'C': // Vi fortsetter + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 35535; // Skal vel holde det ;) + break; + } + } + } + } + } + +end: + if (sysop) + { + listed -= killed; + sprintf (Dummy, "\n%ld active %s and %ld killed %s listed.", listed, listed == 1 ? User : Users, killed, killed == 1 ? User : Users); + } + else + sprintf (Dummy, "\n%ld %s listed.", listed, listed == 1 ? User : Users); + putreg (REG_A6,exebase); + writetexto (Dummy, usea4a5); + + if (ur) + { + FreeMem (ur, config->UserrecordSize); + ur = 0; + } + nodebase->linesleft = linesleft; +} + +__asm far VOID DelText (register __d0 UWORD nr, a4a5) +{ + UWORD i; + + putreg (REG_A6,exebase); + for (i = 0; i < nr; i++) + writetexti (deltext, usea4a5); +} + +UWORD Find_max_conf_name_len (struct ConfigRecord *config) +{ + UWORD n; + UBYTE max = 0, len; + + for (n = 0; n < config->Maxconferences; n++) // Går igjenom alle konfer + { + if (*(config->firstconference[n].n_ConfName)) // Er det et navn her? + { + len = strlen (config->firstconference[n].n_ConfName); + if (len > max) + max = len; + } + } + return (max); +} + +// d0 = fildirnr +// a0 = fileentry + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport, *inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) + { + PutMsg (mainport, (struct Message*)msg); + Permit (); + while (1) + { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *)GetMsg (inport)) + break; + } + ret = inmsg->Error; + } + else + { + Permit (); + ret = Error_NoPort; + } + + return (ret); +} + +__asm far BOOL Handle_Preview (register __d0 int filedirnr, register __a0 struct Fileentry *fileentry, a4a5) +{ + char Filedir[] = "ABBS:Previews/"; + char Filename[108]; + char Holdpath[108]; + + msprintf (Filename, "%s%s_@PREVIEW@", Filedir, fileentry->Filename); + if (Exists (Filename)) // Eksisterer det? + { + strcpy (Holdpath, nodebase->Nodemem.HoldPath); + if (Holdpath[strlen (Holdpath) - 1] != ':') // Vi må sjekke etter slash + { + if (Holdpath[strlen (Holdpath) - 1] != '/') // Er det en slash? + strcat (Holdpath, "/"); // Nei, da legger vi til... + } + msprintf (Dummy, "C:Copy \"%s\" TO \"%s\"", Filename, Holdpath); + Execute (Dummy, NULL, NULL); + putreg (REG_A6,exebase); + msprintf (Dummy, "Preview file of '%s' has been moved to hold...\n", fileentry->Filename); + writetexti (Dummy, usea4a5); + } + else + { + putreg (REG_A6,exebase); + writetexti ("File has no preview attached!\n", usea4a5); + } + + return (TRUE); +} + +__asm far BOOL ShowConferencesAll (register __d1 char argument, a4a5) +{ + ULONG n, i, teller, k; + BOOL member, show, go_flag, c_flag; + char Hold[181], c; + struct ConferenceRecord *confarray; + struct ConfigRecord *config = &mainmeory->config; + UWORD linesleft; + UWORD cur_line; + char Bulletins[19]; + UBYTE max_len, tot; + + if (argument != 'A') // Ikke all + return (FALSE); + + linesleft = nodebase->linesleft; + nodebase->linesleft = 65535; // Slår av more-prompt + confarray = (struct ConferenceRecord *)(((int) config) + (SIZEOFCONFIGRECORD)); + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + putreg (REG_A6,exebase); + writetexti ("Conference status\n", usea4a5); + putreg (REG_A6,exebase); + writetexti ("-----------------\n", usea4a5); + teller = 0; + cur_line = 4; + go_flag = TRUE; + max_len = Find_max_conf_name_len (config); + + for (i = 0;; i++) // Går igjenom alle konfer + { + if (!go_flag) + break; + for (n = 0; n < config->Maxconferences; n++) // Går igjenom alle konfer + { // for å finne neste order + if (!go_flag) + break; + + if (i == config->firstconference[n].n_ConfOrder) // Leter etter neste rekkefølge + { // FUNNET!! + if (*(config->firstconference[n].n_ConfName)) // Er det et navn her? + { + teller++; + member = FALSE; + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) // Medlem? + { + strcpy (Hold, "Member"); + member = TRUE; + } + else + strcpy (Hold, "Non-member"); + + show = TRUE; + if (confarray[n].n_ConfSW & CONFSWF_VIP) // VIP conf? + { + if (!member) + show = FALSE; + } + else // Ikke vise READ ONLY i VIP konfer, de er jo alltid READ ONLY + { // fra starten av + if (n > 3) + { + if (!(config->firstconference[n].n_ConfSW & CONFSWF_ImmWrite)) // Har vi READ ONLY? + strcat (Hold, ", READ ONLY"); + } + } + + if (show) + { + if (n == 2) + strcat (Hold, ", USER INFO"); + if (n == 3) + strcat (Hold, ", FILE INFO"); + if (config->firstconference[n].n_ConfSW & CONFSWF_PostBox) // MAIL? + strcat (Hold, ", MAIL"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Private) // Private meldinger? + strcat (Hold, ", Private allowed"); + if (!(config->firstconference[n].n_ConfSW & CONFSWF_Resign)) // Obligatory? + strcat (Hold, ", Obligatory"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Network) // MAIL? + strcat (Hold, ", Network"); + + Bulletins[0] = 0; + if (config->firstconference[n].n_ConfBullets > 0) + strcpy (Bulletins, "(Bulletins)"); + + msprintf (Dummy, "%s", config->firstconference[n].n_ConfName); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + + tot = max_len - strlen (config->firstconference[n].n_ConfName); + for (k = 0; k < tot; k++) + Dummy[k] = ' '; + Dummy[tot] = ':'; + Dummy[tot + 1] = 0; + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + + msprintf (Dummy, " %s. %s\n", Hold, Bulletins); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + + cur_line++; +// msprintf (Dummy, "status = %ld, n = %ld, linesleft = %ld, cursorpos = %ld\n", nodebase->outtextbufferpos, n, nodebase->linesleft, nodebase->cursorpos); +// putreg (REG_A6,exebase); +// writetexto (Dummy, usea4a5); + if (cur_line == nodebase->CU.PageLength) // Da spør vi om mere ;) + { + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + msprintf (Dummy, "%s", morenohelptext); + else + msprintf (Dummy, "%s", moretext); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + c_flag = TRUE; + while (c_flag) + { + nodebase->dosleepdetect = 1; + c = readchar (usea4a5); + c = toupper (c); + nodebase->dosleepdetect = 0; + switch (c) + { + case 'Y': + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 0; + break; + } + case ' ': // Samme som Y + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 0; + break; + } + case 13: // Return da gir vi kun 1 linje + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = nodebase->CU.PageLength - 1; + break; + } + case 'N': + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case -1: // Ejecta? + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case 0: // Quit ABBS + { + c_flag = FALSE; + go_flag = FALSE; + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + break; + } + case 'C': // Vi fortsetter + { + c_flag = FALSE; + if (nodebase->CU.XpertLevel > 1) // Er vi expert eller høyere + DelText (8, usea4a5); + else + DelText (17, usea4a5); + cur_line = 35535; // Skal vel holde det ;) + break; + } +/* + default: + { + msprintf (Dummy, "%ld\n", c); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + break; + } +*/ + } + } + } + } + if (teller == config->ActiveConf) + go_flag = FALSE; + } + } + } + } + nodebase->linesleft = linesleft; + return (TRUE); +} + +// ****************************************************************************** +// ***************************** CONFERENCE BROWSER (CB) ************************ +// ****************************************************************************** + +#define MEMBER 31 +#define OBLIGATORY 34 +#define NON_MEMBER 36 + +typedef struct +{ + char Name[81]; + UWORD flag; + UWORD confnr; +} CB_header; + +CB_header far head[500]; + +__asm far VOID Update_names (register __d0 int active_conf, register __d1 int max_lines, register __d2 BOOL mode, a4a5) +{ + int n; + int start; + + if (mode) // ned + start = active_conf - max_lines; + else + start = active_conf - 1; + + putreg (REG_A6,exebase); + writecontext (CursorOffData,usea4a5); + + putreg (REG_A6,exebase); + writetexti ("", usea4a5); + putreg (REG_A6,exebase); + for (n = start; n < start + max_lines; n++) // Printer ut... + { + msprintf (Dummy, "[%ldm%-30s", head[n].flag, head[n].Name); + writetexti (Dummy, usea4a5); + + if (n < start + max_lines - 1) + writetexti ("\n", usea4a5); + else + { + msprintf (Dummy, "[%ld;1H", max_lines + 3); + writetexti (Dummy, usea4a5); + } + } + putreg (REG_A6,exebase); + writecontext (CursorOnData,usea4a5); +} + +BOOL Check_conf_text (char *Conf) +{ + char My_conf[31]; + char Filename[108] = "ABBS:Text/Conf_text/"; + + strcpy (My_conf, Conf); + Slash_to_space (My_conf); + strcat (Filename, My_conf); + if (FileSize (Filename) > 0) + return (TRUE); + else + return (FALSE); +} + +__asm far VOID ABBS_version (a4a5) +{ + BPTR fh; + + if (fh = Open ("ABBS:ABBS", MODE_OLDFILE)) + { + putreg (REG_A6, exebase); + sprintf (Dummy, "\n %s\n\n", versionstr); + writetexti (Dummy, usea4a5); + Close (fh); + } +} + + +__asm far VOID Conference_browser (a4a5) +{ + int cursor; + struct ConfigRecord *config = &mainmeory->config; + struct ConferenceRecord *confarray; + int n; + char c; + BOOL flag = TRUE, m_flag; + int max_confs; + int active_conf = 1; + int max_lines = 0; + char Access[9]; + + nodebase->linesleft = 65535; // Vi vil ikke ha noen more her.. + max_confs = 0; + confarray = (struct ConferenceRecord *) (((int) config) + (SIZEOFCONFIGRECORD)); + for (n = 0; n < config->Maxconferences; n++) // Finner antall konfer som er tilgjengelig + { + if (*(confarray[n].n_ConfName)) + { + m_flag = FALSE; + if (confarray[n].n_ConfSW & CONFSWF_VIP) // Her må vi sjekke om brukeren er read + { + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) // Read? + m_flag = TRUE; + else if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Sysop) // Sysop? + m_flag = TRUE; + else if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Invited) // Invited? + m_flag = TRUE; + } + else + m_flag = TRUE; + if (m_flag) // Godkjent som medlem? + { + max_confs++; // Fordi vi starter på 1 + Access[0] = 0; + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) + strcat (Access, "R"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Write) + strcat (Access, "W"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Upload) + strcat (Access, "U"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Download) + strcat (Access, "D"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_FileVIP) + strcat (Access, "F"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Invited) + strcat (Access, "I"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Sigop) + strcat (Access, "S"); + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Sysop) + strcat (Access, "Z"); + + msprintf (head[max_confs].Name, "%-30s %6ld %-8s", confarray[n].n_ConfName, confarray[n].n_ConfDefaultMsg, Access); + if (!(confarray[n].n_ConfSW & CONFSWF_Resign)) // Obligatorisk? + head[max_confs].flag = OBLIGATORY; + else if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) // Er vi medlem? + head[max_confs].flag = MEMBER; + else + head[max_confs].flag = NON_MEMBER; + + head[max_confs].confnr = n; + } + } + } + + putreg (REG_A6,exebase); + writetexti ("", usea4a5); // Sletter skjerm + writetexti ("", usea4a5); // Cursor på topp + + writetexti ("\nConference name High Flags\n", usea4a5); + writetexti ("--------------- ---- -----\n", usea4a5); + + max_lines = 0; + cursor = 1; + for (n = 1; n <= max_confs; n++) // Printer ut... + { + if (max_lines > nodebase->CU.PageLength - 7) // 7 = headere og slikt + break; + + if (head[n].flag == OBLIGATORY) + { + msprintf (Dummy, "%-30s\n", head[n].Name); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + else if (head[n].flag == MEMBER) + { + msprintf (Dummy, "%-30s\n", head[n].Name); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + else // NON_MEMBER + { + msprintf (Dummy, "%-30s\n", head[n].Name); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + max_lines++; + } + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + writetexti ("Space tags/untags,Info,Quit(exit),Untag all", usea4a5); + writetexti ("", usea4a5); // Cursor på topp + + while (flag) + { + putreg (REG_A6,exebase); + c = readchar (usea4a5); + switch (c) + { + case 27: flag = FALSE; break; // ESC + case 32: // SPACE + { + if (head[active_conf].flag != OBLIGATORY) + { + if (head[active_conf].flag == NON_MEMBER) + { + msprintf (Dummy, "%-30s", head[active_conf].Name); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + head[active_conf].flag = MEMBER; + } + else if (head[active_conf].flag == MEMBER) + { + msprintf (Dummy, "%-30s", head[active_conf].Name); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + head[active_conf].flag = NON_MEMBER; + } + if (cursor < max_lines) + { + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + cursor++; + active_conf++; + } + else // Kommer ikke lengere ned, start på linja... + { + msprintf (Dummy, "[%ld;1H", cursor + 3); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + } + break; + } + case 113: flag = FALSE; break; // Q + case 20: // Pil opp + { + if (cursor == 1) // Er vi på topp??? + { + if (active_conf > cursor) // JA! Har vi flere tilbake? + { + putreg (REG_A6,exebase); + Update_names (active_conf, max_lines, 0, usea4a5); // Det hadde vi + putreg (REG_A6,exebase); + writetexti ("\n ", usea4a5); + writetexti ("", usea4a5); + active_conf--; + } + } + else // NEI! + { + putreg (REG_A6,exebase); + writetexti ("", usea4a5); // JA! + cursor--; + active_conf--; + } + break; + } + case 21: // Pil ned + { + if (active_conf < max_confs) + { + if (cursor == max_lines) // Slutt på lista men vi har flere + { + putreg (REG_A6,exebase); + Update_names (active_conf + 2, max_lines, 1, usea4a5); + if (active_conf == max_confs - 1) + { + putreg (REG_A6,exebase); + writetexti ("\n ", usea4a5); + msprintf (Dummy, "[%ld;1H", max_lines + 3); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + } + else if (active_conf < max_confs) + { + putreg (REG_A6,exebase); + writetexti ("", usea4a5); + cursor++; + } + active_conf++; + } + break; + } + } + } + msprintf (Dummy, "[%ld;1H", nodebase->CU.PageLength); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); + flag = FALSE; + for (n = 1; n <= max_confs; n++) + { + if ((head[n].flag == MEMBER) OR (head[n].flag == OBLIGATORY)) // Sjekker om vi er medlem... + { + if (!(nodebase->CU.firstuserconf[head[n].confnr].uc_Access & ACCF_Read)) // Ikke medlem + { + flag = TRUE; + if (!(stricmp (config->SYSOPname, nodebase->CU.Name))) // Supersysop? + { + nodebase->CU.firstuserconf[head[n].confnr].uc_Access = 0; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Read; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Write; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Upload; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Download; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Sysop; + } + else // Ikke sysop! Må sjekke flags i confen + { + if (confarray[head[n].confnr].n_ConfSW & CONFSWF_ImmWrite) + { + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Read; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Write; + } + else if (confarray[head[n].confnr].n_ConfSW & CONFSWF_ImmRead) + nodebase->CU.firstuserconf[head[n].confnr].uc_Access |= ACCF_Read; + } + msprintf (Dummy, "Joining: %s\n", confarray[head[n].confnr].n_ConfName); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + } + else // NON_MEMBER + { + if (nodebase->CU.firstuserconf[head[n].confnr].uc_Access & ACCF_Read) // Medlem? + { + flag = TRUE; + nodebase->CU.firstuserconf[head[n].confnr].uc_Access = 0; + msprintf (Dummy, "Resigning: %s\n", confarray[head[n].confnr].n_ConfName); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + } + } + } + nodebase->linesleft = nodebase->CU.PageLength; + if (flag) + saveuser (nodebase->CU.Name, &nodebase->CU); + putreg (REG_A6,exebase); + writetexti ("\n", usea4a5); +} + +WORD Exists (char *Filename) +{ + BPTR lock = 0; + struct FileInfoBlock *fib = 0; + BOOL flag; + + flag = FALSE; + if (!(fib = (struct FileInfoBlock *)AllocMem (sizeof (struct FileInfoBlock), MEMF_CLEAR))) + return (ERROR); + + if (lock = Lock (Filename, ACCESS_READ)) + { + if (Examine (lock, fib)) + flag = TRUE; + } + + if (lock) + UnLock (lock); + if (fib) + FreeMem (fib, sizeof (struct FileInfoBlock)); + + return (flag); +} + +// ****************************************************************************** +// ******************************* CheckInvited ********************************* +// ****************************************************************************** + +char You_are_invited[] = "\nYou are invited to the following conference(s):\n\n"; + +__asm far VOID CheckInvited (a4a5) +{ + struct ConfigRecord *config = &mainmeory->config; + int n; + BOOL header_flag = FALSE; + BOOL save_flag = FALSE; + UWORD linesleft; + + linesleft = nodebase->linesleft; + nodebase->linesleft = 65535; // Slår av more-prompt + + for (n = 2; n < config->Maxconferences; n++) // Går igjenom alle konfer + { + if (*(config->firstconference[n].n_ConfName)) // Er det et navn her? + { + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Invited) // Er vi invited? + { + nodebase->CU.firstuserconf[n].uc_Access ^= ACCF_Invited; // Sletter bit + if (!(nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read)) + { // Ikke medlem + if (!header_flag) + { + header_flag = TRUE; + putreg (REG_A6,exebase); + writetexti (You_are_invited, usea4a5); + } + nodebase->CU.firstuserconf[n].uc_Access |= ACCF_Read; // Melder inn + if (config->firstconference[n].n_ConfSW & CONFSWF_ImmWrite) // Har confen writeaxx?? + nodebase->CU.firstuserconf[n].uc_Access |= ACCF_Write; // Melder inn + msprintf (Dummy, "%s\n", config->firstconference[n].n_ConfName); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); + save_flag = TRUE; + } + } + } + } + + if (save_flag) + saveuser (nodebase->CU.Name, &nodebase->CU); + nodebase->linesleft = linesleft; // Vi setter tilbake +} + + +// ****************************************************************************** +// ****************************************************************************** +// ****************************************************************************** + + +__asm far VOID Write_user_CPS (register __d5 UWORD cps, a4a5) +{ + msprintf (Dummy, "\n  cps = '%ld'\n", cps); + putreg (REG_A6,exebase); + writetexti (Dummy, usea4a5); +} + + +/* + msprintf (Dummy, "NodeNumber: %ld", nodebase->NodeNumber); + writetexto (Dummy, usea4a5); +*/ + +/* +Sort  +Rød  +Grønn  +Gul  +Mørkeblå  +Lilla  +Lyseblå  +white  + +#define CONFSWF_ImmRead (1L<<0) +#define CONFSWF_ImmWrite (1L<<1) +#define CONFSWF_PostBox (1L<<2) +#define CONFSWF_Private (1L<<3) +#define CONFSWF_VIP (1L<<4) +#define CONFSWF_Resign (1L<<5) +#define CONFSWF_Network (1L<<6) +#define CONFSWF_Alias (1L<<7) + +#define ACCF_Read (1L<<0) +#define ACCF_Write (1L<<1) +#define ACCF_Upload (1L<<2) +#define ACCF_Download (1L<<3) +#define ACCF_FileVIP (1L<<4) +#define ACCF_Invited (1L<<5) +#define ACCF_Sigop (1L<<6) +#define ACCF_Sysop (1L<<7) +*/ + +__asm far VOID JEO_NewFiles (register __d0 ULONG stamp, a4a5) +{ + char Tmp[10], Hold[10]; + char Date[7]; + struct ClockData cd; + + + Amiga2Date (stamp, &cd); + msprintf (Date, "%02ld%02ld%2ld", cd.year, cd.month, cd.mday); + putreg (REG_A6,exebase); + mayedlineprompt (6, "Date to scan for YYMMDD: ", Date, usea4a5); +} diff --git a/JEO/-Loadsaveuserfile.c b/JEO/-Loadsaveuserfile.c new file mode 100644 index 0000000..2eabbec --- /dev/null +++ b/JEO/-Loadsaveuserfile.c @@ -0,0 +1,63 @@ +BOOL Load_userfile (VOID) +{ + int n; + BPTR fh; + BOOL ret = FALSE; + + u_size = FileSize (UserFName); + if (u_size != config->UserrecordSize * config->MaxUsers) + { + printf ("\n Error in userfile!\n\n"); + return (FALSE); + } + + if (U_buffer = AllocMem (u_size, MEMF_CLEAR)) + { + if (fh = Open (UserFName, MODE_OLDFILE)) + { + n = Read (fh, U_buffer, u_size); + if (n == u_size) + ret = TRUE; + Close (fh); + } + else + Err_opening_file (UserFName); + } + else + Err_no_mem (u_size); + + if (!ret) // Vi må lukke etter oss... + { + if (U_buffer) + FreeMem (U_buffer, u_size); + } + + return (ret); +} + +BOOL Save_userfile (VOID) +{ + int n; + BPTR fh; + BOOL ret = FALSE; + + if (u_save_flag) + { + if (fh = Open (UserFName, MODE_NEWFILE)) + { + n = Write (fh, U_buffer, u_size); + if (n == u_size) + ret = TRUE; + else + Err_writing_file (UserFName); + Close (fh); + } + else + Err_opening_file (UserFName); + } + + if (U_buffer) + FreeMem (U_buffer, u_size); + + return (ret); +} diff --git a/JEO/ABBS1x_config.lha b/JEO/ABBS1x_config.lha new file mode 100644 index 0000000000000000000000000000000000000000..46ba93b2e2a53f5326869bf5bb6f6ed229eb3cee GIT binary patch literal 538 zc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HN7W)t><>m$zQ{(oLhgvD-^U(y5f9c1R?&wzy&G&gR&K_Bz_NG%db_p4$yYviR^>W-)z* z*}~1SZp@nPhFN7j&2d7Fr9HcexL;a)3u1j}KIkgg_=N?`%PzoXDfmg2;qSxNW&9b9 z9cm@hxb4VegRK5fMoFcol|m$~#@csoiQitM&2Db|W&{7HA2a;@D6x#c@t(-S*7o{V z(UO~phO$awD)EBHF6#<^E*pr*l~a!T_aI=H7$TR&D}9PV1&8R$E-85B9Y-$V Q-$Csl@_ezxfBS%c09(5;5C8xG literal 0 HcmV?d00001 diff --git a/JEO/FileEditor/GUI.h b/JEO/FileEditor/GUI.h new file mode 100644 index 0000000..5e69edf --- /dev/null +++ b/JEO/FileEditor/GUI.h @@ -0,0 +1,73 @@ +/* + * Source machine generated by GadToolsBox V2.0b + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Jan Erik Olausen + */ + +#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer ) +#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt ) + +#define GD_LIST_1 0 +#define GD_LIST_2 1 + +#define GDX_LIST_1 0 +#define GDX_LIST_2 1 + +#define GD_FILE_NAME 0 +#define GD_COMMENT 1 +#define GD_FILEINFO 2 +#define GD_REMOVE_CONF 3 +#define GD_UPDATE_SIZE 4 + +#define GDX_FILE_NAME 0 +#define GDX_COMMENT 1 +#define GDX_FILEINFO 2 +#define GDX_REMOVE_CONF 3 +#define GDX_UPDATE_SIZE 4 + +#define FileEditor_CNT 2 +#define Edit_CNT 5 + +extern struct IntuitionBase *IntuitionBase; +extern struct Library *GadToolsBase; + +extern struct Screen *Scr; +extern UBYTE *PubScreenName; +extern APTR VisualInfo; +extern struct Window *FileEditorWnd; +extern struct Window *EditWnd; +extern struct Gadget *FileEditorGList; +extern struct Gadget *EditGList; +extern struct Menu *FileEditorMenus; +extern struct Menu *EditMenus; +extern struct Gadget *FileEditorGadgets[2]; +extern struct Gadget *EditGadgets[5]; +extern UWORD FileEditorLeft; +extern UWORD FileEditorTop; +extern UWORD FileEditorWidth; +extern UWORD FileEditorHeight; +extern UWORD EditLeft; +extern UWORD EditTop; +extern UWORD EditWidth; +extern UWORD EditHeight; +extern UBYTE *FileEditorWdt; +extern UBYTE *EditWdt; +extern struct TextAttr topaz8; +extern struct NewMenu FileEditorNewMenu[]; +extern struct NewMenu EditNewMenu[]; +extern UWORD FileEditorGTypes[]; +extern UWORD EditGTypes[]; +extern struct NewGadget FileEditorNGad[]; +extern struct NewGadget EditNGad[]; +extern ULONG FileEditorGTags[]; +extern ULONG EditGTags[]; + + +extern int SetupScreen( void ); +extern void CloseDownScreen( void ); +extern int OpenFileEditorWindow( void ); +extern void CloseFileEditorWindow( void ); +extern void EditRender( void ); +extern int OpenEditWindow( void ); +extern void CloseEditWindow( void ); diff --git a/JEO/FileEditor/Install.c b/JEO/FileEditor/Install.c new file mode 100644 index 0000000..3410785 --- /dev/null +++ b/JEO/FileEditor/Install.c @@ -0,0 +1,1118 @@ +;/* +sc5 -j73 Install +x fe.s +quit +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FE:GUI.h" +#include "FE:FE.h" +#include +#include + +char Comment_string[] = "FileEditor: No description found..."; + +VOID Lag_komma (UBYTE *String, LONG number) +{ + ULONG i, j; + BOOL start; + + sprintf (Dummy, "%10ld", number); + String[0] = Dummy[0]; + String[1] = '.'; + String[2] = Dummy[1]; + String[3] = Dummy[2]; + String[4] = Dummy[3]; + String[5] = '.'; + String[6] = Dummy[4]; + String[7] = Dummy[5]; + String[8] = Dummy[6]; + String[9] = '.'; + String[10] = Dummy[7]; + String[11] = Dummy[8]; + String[12] = Dummy[9]; + String[13] = 0; + start = AV; + for (i = 0, j = 0; i < 13; i++) + { + if (isdigit (String[i])) + start = PÅ; + if (start) + { + Dummy[j] = String[i]; + j++; + } + } + Dummy[j] = 0; + strcpy (String, Dummy); +} + +struct DateStamp Now_stamp (VOID) +{ + struct DateTime datetime = { NULL }; + struct DateStamp stamp = { NULL }; + UBYTE Date[10], Time[10]; + + GetDateTime (Date, Time, 0); + datetime.dat_Format = FORMAT_CDN; // dd-mm-yy + datetime.dat_Flags = 0; + datetime.dat_StrDate = Date; + datetime.dat_StrTime = Time; + StrToDate (&datetime); + stamp = datetime.dat_Stamp; + return (stamp); +} + +//******************************************************************************** + +fib_Sjef fib_sjef; +ULONG fib_len; + +VOID fib_SlettBase (VOID) +{ + ULONG s; + struct Node *nd; + + nd = fib_sjef.list.lh_Head; + for (s = 0; s < fib_len; s++) + { + Remove (nd); + FreeMem ((UBYTE *)nd, sizeof (Filbase)); + nd = 0; + nd = fib_sjef.list.lh_Head; + } + fib_len = 0; +} + +VOID fib_Close (VOID) +{ + Filbase *bp; + + fib_SlettBase (); + bp = (Filbase *)fib_sjef.list.lh_Head; + while (bp = RemHead (&fib_sjef.list)) + { + FreeMem (bp, sizeof (Filbase)); + bp = 0; + } +} + +struct Node *fib_FindTheOne (UBYTE *Name) // Legger den alfabetisk i bufferen +{ + struct Node *nd; + + nd = fib_sjef.list.lh_Head; + while (nd->ln_Succ) + { + if (stricmp (nd->ln_Name, Name) > 0) + { + nd = nd->ln_Pred; + return (nd); + } + nd = nd->ln_Succ; + } + return (FALSE); +} + +VOID fib_Rename (UBYTE *Name) +{ + struct Node *nd; + Filbase *bp = NULL; + + nd = fib_FindTheOne (Name); + nd = nd->ln_Succ; + bp = (Filbase *)nd; + + strcpy (bp->Filename, Name); + bp->nd.ln_Name = bp->Filename; +} + +VOID fib_Insett (struct FileInfoBlock *fib) +{ + Filbase *bp = NULL; + struct Node *nd; + + if (bp = (Filbase *)AllocMem (sizeof (Filbase), MEMF_CLEAR)) + { + strcpy (bp->Filename, fib->fib_FileName); + strncpy (bp->Comment, fib->fib_Comment, 36); + bp->Comment[36] = 0; + bp->size = fib->fib_Size; + bp->stamp = fib->fib_Date; + + bp->nd.ln_Name = bp->Filename; + if (!(nd = fib_FindTheOne (bp->Filename))) + AddTail (&fib_sjef.list, &bp->nd); + else + Insert (&fib_sjef.list, &bp->nd, nd); + + fib_len++; + } +} + +char Readme[][8] = +{ + ".readme", + ".rea" +}; + +#define MAX_README (sizeof (Readme) / 8) +#define MIN_README_LEN 4 +#define MAX_README_LEN 6 + +BOOL Check_readme_file (char *Name) // Er ok! +{ + char Stripname[108]; + WORD len, start, i; + + len = strlen (Name); + if (len > MIN_README_LEN) + { + strcpy (Stripname, Name); + + for (i = 0; i < MAX_README; i++) // Filtrerer bort .readme .rea osv + { + start = len - strlen (Readme[i]); + if (!(stricmp (&Stripname[start], Readme[i]))) // Funnet! + return (TRUE); + } + } + return (FALSE); +} + +ULONG fib_read_files (UBYTE *Skuff, BOOL mode) // 0 = ikke ta readme +{ + BOOL success = 0; + BPTR lock = 0; + struct FileInfoBlock *fileinfoblock = 0; + ULONG files = 0; + +// fib_SlettBase (); + + fileinfoblock = (struct FileInfoBlock *) AllocMem (sizeof (struct FileInfoBlock), MEMF_CLEAR); + if (lock = Lock (Skuff, ACCESS_READ)) // Kunne ikke locke + { + if (success = Examine (lock, fileinfoblock)) // Kunne ikke examinere + { + FOREVER + { + success = ExNext (lock, fileinfoblock); // FindNext File/Dir + if (!(success)) // End of directory ? + break; + if (fileinfoblock->fib_DirEntryType < 0) // < 0 = a file, else a dir :) + { + if (!mode) // Ikke ta med readme + { + if (Check_readme_file (fileinfoblock->fib_FileName)) + continue; + } + fib_Insett (fileinfoblock); + files++; + } + } + } + } + if (lock) + UnLock (lock); + if (fileinfoblock) + FreeMem (fileinfoblock, sizeof (struct FileInfoBlock)); + + return (files); +} + +VOID fib_Open (VOID) +{ + fib_len = 0; + NewList (&fib_sjef.list); +} + +// *************************************************************************** + +BOOL Find_file (UBYTE *Name) +{ + UWORD r, n; + int err; + ULONG matchbuffer[1024/4]; + struct Fileentry fl; + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) // Finnes filedirret? + { + r = config->firstFileDirRecord[n].n_FileOrder - 1; + msg.Command = Main_findfile; + msg.Name = Name; + msg.arg = (ULONG)matchbuffer; // am_Arg4 + matchbuffer[2] = 0; + msg.UserNr = r; // am_Arg3 + msg.Data = (ULONG)&fl; + err = HandleMsg (&msg); + if (err == Error_OK) // Fila funnet? + { + filedir_number = n; + file_order = msg.UserNr; + Load_fentry (); + return (TRUE); + } + } + } + return (FALSE); +} + +// ************************************************************************* +// ************************************************************************* +// ************************************************************************* + +/* +BOOL Exctract_archive (WORD pack, char *File, char *Id) +{ + UBYTE Command[51]; + UBYTE FileName[108]; + BOOL flag; + + flag = FALSE; + switch (pack) + { + case PACK_LHA: strcpy (Command, "C:LHA -q -N x"); flag = TRUE; break; + case PACK_LZX: strcpy (Command, "C:LZX x"); flag = TRUE; break; + } + if (flag) + { + if (!(stricmp (Id, "FILE_ID.DIZ"))) + sprintf (Dummy, "%s \"%s\" \"%s\" \"%s\" >NIL:", Command, File, Id, To); + else + sprintf (Dummy, "%s \"%s\" \"%s%s\" \"%s\" >NIL:", Command, File, Name, Id, To); + Execute (Dummy, NULL, NULL); + sprintf (Dummy, "%s%s", To, Id); + if (FileSize (Dummy) > 0) + { + if (!(stricmp (Id, "FILE_ID.DIZ"))) + { + sprintf (FileName, "%s%s.readme", To, Name); + SetProtection (Dummy, 0); + Rename (Dummy, FileName); + DeleteFile (Dummy); + } + return (TRUE); + } + } + return (FALSE); +} + +WORD Sjekk_pakkemetode (UBYTE *Filename) +{ + UWORD len, i, j; + + len = strlen (Filename); + if (len < 4) + return (ERROR); + + for (i = len - 4, j = 0; i < len; i++, j++) + Dummy[j] = Filename[i]; + + Dummy[j] = 0; + if (!(stricmp (Dummy, ".LHA"))) + return (PACK_LHA); + else if (!(stricmp (Dummy, ".LZH"))) + return (PACK_LHA); + else if (!(stricmp (Dummy, ".LZX"))) + return (PACK_LZX); + else if (!(stricmp (Dummy, ".ARC"))) + return (PACK_ARC); + else if (!(stricmp (Dummy, ".DMS"))) + return (PACK_DMS); + else if (!(stricmp (Dummy, ".GIF"))) + return (PACK_GIF); + else if (!(stricmp (Dummy, ".ZIP"))) + return (PACK_ZIP); + + return (ERROR); +} + +VOID Strip_FILEINFO (char *Filename, char *ReadmeFilename) +{ + BOOL LHA_feil, ZIP_feil, LZX_feil; + UBYTE FName[108]; + WORD pack; + + pack = Sjekk_pakkemetode (FName); + if (pack >= PACK_LHA) + { + LHA_feil = ZIP_feil = LZX_feil = AV; + + strcpy (FName, Filename); + Strip_extention (FName); + + switch (pack) + { + case PACK_LHA: // Og LZH + { + if (FileSize ("C:LHA") > 0) + { + if (Exctract_archive (pack, FName, "FILE_ID.DIZ")) + break; + if (Exctract_archive (pack, FName, ".readme")) + break; + if (Exctract_archive (pack, FName, ".rea")) + break; + } + else if (!LHA_feil) + { + ErrorMsg (GLS (&txt_066)); + LHA_feil = PÅ; + rtSetWaitPointer (MainWnd); + } + break; + } + case PACK_LZX: + { + if (FileSize ("C:LZX") > 0) + { + sprintf (Dummy, "'%s' -> Kopierer 'FILEINFO' til '%s'...", Name, oppsett->FILEINFO); + Status (Dummy); + + if (Exctract_archive (pack, Path, "FILE_ID.DIZ", oppsett->FILEINFO, ABBS_name)) + break; + if (Exctract_archive (pack, Path, ".readme", oppsett->FILEINFO, ABBS_name)) + break; + if (Exctract_archive (pack, Path, ".rea", oppsett->FILEINFO, ABBS_name)) + break; + } + else if (!LZX_feil) + { + ErrorMsg (GLS (&txt_067)); + LZX_feil = PÅ; + rtSetWaitPointer (MainWnd); + } + break; + } + } + } +} +*/ + +BOOL FE_GetFileName (UBYTE *Dir, UBYTE *Name, UBYTE *Message, UBYTE *OkText) +{ + register struct rtFileRequester *filereq = 0; + + if (filereq = rtAllocRequestA (RT_FILEREQ, NULL)) + { + strcpy (filereq->Dir, Dir); + if (rtFileRequest (filereq, Name, Message, RT_ReqPos, REQPOS_CENTERSCR, + RTFI_OkText, OkText, TAG_END)) + { + if (strlen (filereq->Dir)) + { + strcpy (Dir, filereq->Dir); + if (Dir[strlen (Dir) - 1] != ':') + strcat (Dir, "/"); + } + else + strcpy (Dir, ":"); + } + else + { + rtFreeRequest (filereq); + return (FALSE); + } + rtFreeRequest (filereq); + } + else + return (FALSE); + + return (TRUE); +} + +BOOL Check_readme (char *Path, char *ABBSname, char *ReadmeFilename) +{ + char HoldFname[108]; + char HoldPath[108]; + WORD len, i; + BOOL flag = FALSE; + + strcpy (ReadmeFilename, ABBSname); + strcpy (HoldPath, Path); + Do_slash (HoldPath); + len = strlen (ReadmeFilename); + for (i = len; i > 0; i--) + { + if (ReadmeFilename[i] == '.') + { + flag = TRUE; + ReadmeFilename[i] = 0; + break; + } + } + if (flag) + { + for (i = 0; i < MAX_README; i++) + { + strcpy (HoldFname, ReadmeFilename); + strcat (HoldFname, Readme[i]); + sprintf (Dummy, "%s%s", HoldPath, HoldFname); + if (FileSize (Dummy) > 0) + { + strcpy (ReadmeFilename, Dummy); + return (TRUE); + } + } + } + return (FALSE); +} + +// ****************************************************************************** +// ***************************** README stuff *********************************** +// ****************************************************************************** + +enum +{ + R_SHORT = 0, + R_AUTHOR, + R_UPLOADER, + R_VERSION, + R_TYPE, + R_KURZ, + R_REQUIRES, + R_DATE, + R_TESTED, + R_REPLACES, + R_DISTRIBUTION, + R_SOURCE, + R_WWW, + R_URL, + MAX_TYPES +}; + +char Readme_types[MAX_TYPES][14] = +{ + "Short:", + "Author:", + "Uploader:", + "Version:", + "Type:", + "Kurz:", + "Requires:", + "Date:", + "Tested:", + "Replaces:", + "Distribution:", + "Source:", + "WWW:", + "Url:" +}; + +char rhead[MAX_TYPES][81]; + +int Find_text_start (char *Line) +{ + int i; + BOOL flag; + + flag = OFF; + for (i = 0; Line[i] != 0; i++) + { + if (Line[i] == ' ') // Fant vi space? + flag = ON; + else if (flag) + return (i); + } +} + +VOID Strip_spaces (char *Text) +{ + UWORD i; + + for (i = 0; Text[i] != 0; i++) + { + if (Text[i] == ' ') + { + Text[i] = 0; + break; + } + } +} + + +int Get_readme_info (char *Filename) +{ + int i, j, r, count, start; + ULONG len, len1, len2; + BPTR file = 0; + UBYTE *Buffer = 0; + LONG size; + char Line[71]; + + count = 0; // Antall typer readme vi fant + + if (file = Open (Filename, MODE_OLDFILE)) + { + size = FileSize (Filename); + if (size > 6) + { + if (Buffer = AllocMem (size, MEMF_CLEAR)) + { + if (Read (file, Buffer, size)) + { + len = strlen (Buffer); + for (i = 0, j = 0; Buffer[i] != 0; i++) + { + if (j == 70) + j = 69; +// Buffer[i] = '\n'; // Vi lurer'n her ;) + Line[j] = Buffer[i]; + if (Buffer[i] == '\n') // Ny linje + { + Line[j] = 0; + j = 0; + for (r = 0; r < MAX_TYPES; r++) + { + if (!rhead[r][0]) // Ikke noe her ennå! + { + len1 = strlen (Readme_types[r]); +// sprintf (Dummy, "(%ld) '%s' - '%s'", len1, Readme_types[r], Line); +// JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_OK)); + if (!(strnicmp (Readme_types[r], Line, len1))) + { + start = Find_text_start (Line); + len2 = strlen (Line); + strncpy (rhead[r], &Line[start], len2 - start); + rhead[r][len2 - start] = 0; + count++; + + if (!(stricmp (Readme_types[r], "Type:"))) + Strip_spaces (rhead[r]); + + break; + } + } + } + if (i < len - 1) + { + if (Buffer[i+1] == '\n') // Ferdig + break; + } + } + else + j++; + } + } + FreeMem (Buffer, size); + Buffer = 0; + } + } + Close (file); + file = 0; + } + return (count); +} + +// ****************************************************************************** +// ***************************** README stuff *********************************** +// ****************************************************************************** + +VOID Do_slash (UBYTE *Navn) +{ + ULONG len; + + len = strlen (Navn); + + if (Navn[len-1] == ':' OR Navn[len-1] == '/') + return; + else + { + Navn[len] = '/'; + Navn[len+1] = 0; + } +} + +WORD Check_dir_exists (char *Type) +{ + WORD n; + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) + { + if (!(stricmp (config->firstFileDirRecord[n].n_DirName, Type))) + return (n); + } + } + return (-1); +} + +BOOL Check_same_dir (char *dir1, char *dir2) +{ + BOOL ret = FALSE; + BPTR lock1 = 0, lock2 = 0; + + if (lock1 = Lock (dir1, MODE_OLDFILE)) + { + if (lock2 = Lock (dir2, MODE_OLDFILE)) + { + if (SameLock (lock1, lock2) == 0) + ret = TRUE; + UnLock (lock2); + } + UnLock (lock1); + } + return (ret); +} + +//******************************************************************************** + +VOID Multi_create_dir (char *Dir) +{ + int i; + BPTR lock; + + for (i = 0; Dir[i] != 0; i++) + { + if (Dir[i] == '/') + { + Dir[i] = 0; + lock = CreateDir (Dir); + if (lock) + UnLock (lock); + Dir[i] = '/'; + } + } + lock = CreateDir (Dir); + if (lock) + UnLock (lock); +} + +VOID Install_files (ULONG path) +{ + ULONG files = 0; + LONG i, new_size, r; + UBYTE c; + struct Node *nd; + Filbase *bp; + char Filename[108]; + char Pathname[31], ToPathname[31]; + struct Fileentry *fl = 0; + UBYTE Hold[108], Hold1[50], NameSize[15]; + WORD value; + char ReadmeFilename[108]; + ULONG not_found = 0; + BOOL exists; + BOOL automatic = OFF; + BOOL go_flag, flag; + BOOL readme; + WORD move_dir; + ULONG old_path, replace_dl; + BOOL check; + char ReadmeFound[12]; + BOOL copy; + BPTR fh = 0; + char ErrorFname[] = "T:FE.Error"; + LONG error_size; + char *Buffer = 0; + int hold_order, hold_number; + char *R_hold = 0; + BOOL to_conf_flag = FALSE; + + old_path = path; + All (OFF); + + for (i = 0; i < config->Maxconferences; i++) + { + if (*(config->firstconference[i].n_ConfName)) // Noe her? + { + if (!(stricmp (config->firstFileDirRecord[path].n_DirName, config->firstconference[i].n_ConfName))) + { + if (ur->firstuserconf[i].uc_Access & ACCF_Upload) // Har vi upload axx? + { + sprintf (Dummy, GLS (&txt_138), config->firstFileDirRecord[path].n_DirName); + if (JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_072))) + to_conf_flag = TRUE; + } + break; + } + } + } + + if (fl = AllocMem (sizeof (struct Fileentry), MEMF_CLEAR)) + { + rtSetWaitPointer (FileEditorWnd); + + fib_Open (); + strcpy (Pathname, config->firstFileDirRecord[path].n_DirPaths); + Do_slash (Pathname); + + if (files = fib_read_files (Pathname, 0)) // Leser alle filene fra dirret + { + nd = fib_sjef.list.lh_Head; + bp = (Filbase *)nd; + + while (nd->ln_Succ) // Går igjenom alle filene på disken... + { + replace_dl = 0; + path = old_path; // Husker alltid den vi kom i fra... + go_flag = TRUE; + strcpy (Dummy, bp->Filename); + while (go_flag) + { + if (strlen (Dummy) > 18) + { + strcpy (Dummy, bp->Filename); + Dummy[18] = 0; + sprintf (Hold, GLS (&txt_068), bp->Filename); + if (GetReqString (Dummy, 18, Hold)) + { + if (strcmp (Dummy, bp->Filename)) // renama + { + sprintf (Hold, "C:Rename \"%s%s\" \"%s%s\"", Pathname, bp->Filename, Pathname, Dummy); + Execute (Hold, NULL, NULL); + } + } + else + strcpy (Dummy, bp->Filename); + } + else + { + strcpy (bp->Filename, Dummy); + go_flag = FALSE; + } + } + sprintf (Filename, "%s%s", Pathname, bp->Filename); + hold_order = file_order; + hold_number = filedir_number; + + for (r = 0; r < MAX_TYPES; r++) // Nullstill + rhead[r][0] = 0; + + if (Check_readme (Pathname, bp->Filename, ReadmeFilename)) + { + readme = TRUE; + if (Get_readme_info (ReadmeFilename)) // Funnet fra readme, brukes + { + strncpy (bp->Comment, rhead[R_SHORT], 36); + bp->Comment[36] = 0; + } + } + else + { + ReadmeFilename[0] = 0; + readme = FALSE; + } + exists = Find_file (bp->Filename); + if (exists) + { + new_size = FileSize (Filename); // Størrelsen på fila på HD'n + if (path == filedir_number) // Ligger i samma dir... + { + if (new_size != fentry.Fsize) // Forskjellig størrelse! + { // Men i samma dir så vi oppdaterer + fentry.Fsize = new_size; + SaveFileEntry (); + } + } + else // Vi ligger i forskjellige dirs.... vi sjekker størrelsen... + { + if (new_size != fentry.Fsize) // Forskjellig størrelse! + { + sprintf (Dummy, GLS (&txt_069), + bp->Filename, fentry.Filedescription, fentry.Fsize, rhead[R_SHORT], new_size, new_size - fentry.Fsize); + if (JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_070))) + { + replace_dl = fentry.AntallDLs; // Vi husker downloads fra gammel fil + Delete_fentry (); + exists = FALSE; + } + } + } + } + file_order = hold_order; + filedir_number = hold_number; + if (!exists) // Ikke funnet i ABBS! + { + not_found++; + Lag_komma (NameSize, bp->size); + + move_dir = -1; + copy = FALSE; + if (rhead[R_TYPE][0]) + { + if (stricmp (rhead[R_TYPE], config->firstFileDirRecord[path].n_DirName)) // Ikke samme dir + { + move_dir = Check_dir_exists (rhead[R_TYPE]); + if (move_dir == -1) // Not found + { + sprintf (Dummy, GLS (&txt_071), rhead[R_TYPE]); + if (JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_072))) + { + if (Create_dir (rhead[R_TYPE])) + move_dir = Check_dir_exists (rhead[R_TYPE]); + } + } + } + } + if (move_dir != -1) // Meningen vi skal vi flytte fila? + { + if (!Check_same_dir (config->firstFileDirRecord[move_dir].n_DirPaths, config->firstFileDirRecord[path].n_DirPaths)) + copy = TRUE; // Ikke samme fildir. Kopier fila til annet path... + } + + if (!automatic) + { + if (ReadmeFilename[0]) + strcpy (ReadmeFound, GLS (&txt_073)); + else + strcpy (ReadmeFound, GLS (&txt_074)); + + if (move_dir == -1) // Samme skuff som vi er i + { + strcpy (Hold, GLS (&txt_075)); + strcpy (Hold1, GLS (&txt_076)); + move_dir = filedir_number; // Vi må legge inn skuffen igjen! + } + else + { + strcpy (Hold, GLS (&txt_077)); + strcpy (Hold1, GLS (&txt_078)); + } + + R_hold = AllocMem (2000, MEMF_CLEAR); + strcpy (R_hold, "\n"); + if (readme) + { + flag = FALSE; + for (r = 0; r < MAX_TYPES; r++) + { + if (*(rhead[r])) + { + flag = TRUE; + sprintf (Dummy, "%13s %s\n", Readme_types[r], rhead[r]); + strcat (R_hold, Dummy); + } + } + if (flag) + strcat (R_hold, "\n"); + } + + sprintf (Dummy, GLS (&txt_079), + Hold, config->firstFileDirRecord[move_dir].n_DirName, bp->Filename, NameSize, R_hold, ReadmeFound); + FreeMem (R_hold, 2000); + + strcat (Hold1, GLS (&txt_080)); + value = JEOReqRequest (GLS (&txt_MESSAGE), Dummy, Hold1); // Legg til fil + } + if (!value) // Move/Install = 1 AUTO INSTALL = 2 Skip file = 3 + break; + + if (value == 2) // Auto install (Value vil alltid være 2 hele tiden) + automatic = ON; + + if (value != 3) // Ikke skip file + { + if (move_dir != -1) + { + if (copy) // Skal vi kopiere? + { + strcpy (ToPathname, config->firstFileDirRecord[move_dir].n_DirPaths); + Do_slash (ToPathname); + check = Exists (ToPathname); + if (!check) + { + Multi_create_dir (ToPathname); + check = Exists (ToPathname); + } + if (check) + { + sprintf (Dummy, "C:Copy \"%s\" \"%s\" >NIL:", Filename, ToPathname); + Execute (Dummy, NULL, NULL); + DeleteFile (Filename); + sprintf (Filename, "%s%s", ToPathname, bp->Filename); + path = move_dir; // Den må alltid flyttes intern :) + } + else + { + sprintf (Dummy, GLS (&txt_081), ToPathname); + ErrorMsg (Dummy); + } + } + else + path = move_dir; // Den må alltid flyttes intern :) + } + sprintf (Dummy, "ABBS:Utils/AddFile \"%s\" %s DIR=%s FROM=\"%s\"", Filename, bp->Filename, config->firstFileDirRecord[path].n_DirName, "SYSOP"); + if (readme) + { + sprintf (Hold, " I=\"%s\"", ReadmeFilename); + strcat (Dummy, Hold); + } + if (to_conf_flag) // Skal den privat til conf? + { + sprintf (Hold, " C=\"%s\"", config->firstFileDirRecord[path].n_DirName); + strcat (Dummy, Hold); + } + if (bp->Comment[0] == 0) // Ingen beskrivelse fra disken eller fra readmefila + { + if (!automatic) // da spør + { + bp->Comment[0] = 0; + sprintf (Hold, GLS (&txt_082), bp->Filename); + GetReqString (bp->Comment, 36, Hold); + } + if (bp->Comment[0] == 0) // Igjen! + strcpy (bp->Comment, Comment_string); // Legger inn standard string + } + sprintf (Hold, " DESC=\"%s\"", bp->Comment); // Til slutt! + strcat (Dummy, Hold); + fh = Open (ErrorFname, MODE_NEWFILE); + Execute (Dummy, NULL, fh); + Close (fh); + + if ((error_size = FileSize (ErrorFname)) == 0) // Ingen error + { + if (replace_dl) // Skal vi huske downloads? + { + if (Find_file (bp->Filename)) // Fant vi fila? + { + fentry.AntallDLs = replace_dl; + SaveFileEntry (); + } + } + DeleteFile (ReadmeFilename); + ur->Uploaded++; + ur->KbUploaded += (bp->size / 1024); + ur->MsgsLeft++; + Save_user (); + if (!automatic) + { + if (!(strcmp (config->firstFileDirRecord[path].n_DirName, config->firstFileDirRecord[old_path].n_DirName))) + SetupFiles (); + } + } + else if (fh = Open (ErrorFname, MODE_OLDFILE)) + { + if (Buffer = AllocMem (error_size, MEMF_CLEAR)) + { + Read (fh, Buffer, error_size); + for (i = strlen (Buffer), c = 0; i >= 0; i--) // Ta bort siste linje + { + if (Buffer[i] == '\n') + { + c++; + if (c > 1) + { + Buffer[i] = 0; + break; + } + } + } + ErrorMsg (Dummy); + } + FreeMem (Buffer, error_size); + Close (fh); + } + } + } + nd = nd->ln_Succ; + bp = (Filbase *)nd; + } + } + fib_Close (); + } + if (not_found == 0) + { + sprintf (Dummy, GLS (&txt_083), config->firstFileDirRecord[path].n_DirName); + JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_OK)); + } + else + { + if (automatic) // Fordi vi ikke har gjort det fra før.... + SetupFiles (); + } + DeleteFile (ErrorFname); + path = old_path; // Just in case + SetupFiles (); // Hmmmm + All (ON); +} + +VOID Strip_preview (char *Name) // tar bort _@PREVIEW@ +{ + UBYTE len; + + len = strlen (Name); + if (len > 11) + Name[len-10] = 0; +} + +VOID Install_preview_files (ULONG path) // Path hvor er vi? +{ + ULONG files = 0; + struct Node *nd; + Filbase *bp; + char Filename[108], Pathname[] = "ABBS:Previews/"; + struct Fileentry *fl = 0; + BOOL exists; + ULONG old_path, updated = 0; + int hold_order, hold_number; + + old_path = path; + All (OFF); + if (fl = AllocMem (sizeof (struct Fileentry), MEMF_CLEAR)) + { + rtSetWaitPointer (FileEditorWnd); + fib_Open (); + if (files = fib_read_files (Pathname, 0)) // Leser alle filene fra dirret + { + nd = fib_sjef.list.lh_Head; + bp = (Filbase *)nd; + while (nd->ln_Succ) // Går igjenom alle filene på disken... + { + path = old_path; // Husker alltid den vi kom i fra... + Strip_preview (bp->Filename); + sprintf (Filename, "%s%s", Pathname, bp->Filename); + hold_order = file_order; // Vi husker ;) + hold_number = filedir_number; + exists = Find_file (bp->Filename); // Har vi fila i ABBS? + if (exists) + { +/* + if (fentry.Filestatus & FILESTATUSF_Preview) + { + fentry.Filestatus -= FILESTATUSF_Preview; // Tar bort + SaveFileEntry (); + } +*/ + + if (!(fentry.Filestatus & FILESTATUSF_Preview)) // Er den ikke lagt inn? + { + fentry.Filestatus |= FILESTATUSF_Preview; // Nei, da legger vi den inn + SaveFileEntry (); + updated++; + } + } + nd = nd->ln_Succ; + bp = (Filbase *)nd; + } + } + fib_Close (); + } + sprintf (Dummy, GLS (&txt_137), updated, updated == 1 ? GLS (&txt_060) : GLS (&txt_061)); + JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_OK)); + path = old_path; // Just in case + file_order = hold_order; // Vi legger tilbake ;) + filedir_number = hold_number; + SetupFiles (); + All (ON); +} + +/* + bp->Filename + bp->Comment + bp->size + bp->stamp + +fN8DZTvN +*/ diff --git a/JEO/FileEditor/Liste_base.c b/JEO/FileEditor/Liste_base.c new file mode 100644 index 0000000..728befa --- /dev/null +++ b/JEO/FileEditor/Liste_base.c @@ -0,0 +1,666 @@ +;/* +Delete Liste_base.o quiet +sc5 -j73 -v -q5e Liste_base +x fe.s +quit +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "FE:GUI.h" +#include "FE:FE.h" +#include +#include + +Liste_Sjef Liste_sjef; +ULONG liste_len; + +ULONG liste_antall; +UBYTE file_start; +UBYTE file_len; +UBYTE cStart = 0; +ULONG file_offsett; +char Com[81]; +static char Liste_navn[108] = ""; + +enum +{ + ISO = 0, + IBN, + IBM, + IBMM, +}; + +UBYTE CharSets[][9] = +{ + "æøå-ÆØÅ|", + "‘›†„’„", + "‘”†„’™„", + "‘›†„’„" +}; + +BOOL Check_ASCII (UBYTE *Buffer) +{ + if (Buffer[0] == 0x00) // Executable file + if (Buffer[1] == 0x00) + if (Buffer[2] == 0x03) + if (Buffer[3] == 0xF3) + return (FALSE); + if (Buffer[0] == 0xE3) // Icon file + if (Buffer[1] == 0x10) + if (Buffer[2] == 0x00) + if (Buffer[3] == 0x01) + return (FALSE ); + if (Buffer[0] == 0x0F) // Font header file + if (Buffer[1] == 0x00) + if (Buffer[2] == 0x00) + return (FALSE); + if (Buffer[0] == 0xF3) // info file + if (Buffer[1] == 0x4C) + if (Buffer[2] == 0x00) + if (Buffer[3] == 0x12) + return (FALSE); + if (Buffer[0] == 0x44) // BootBlock file + if (Buffer[1] == 0x4F) + if (Buffer[2] == 0x53) + if (Buffer[3] == 0x00) + return (FALSE); + if (Buffer[0] == 0x46) // Anc data + if (Buffer[1] == 0x56) + if (Buffer[2] == 0x4C) + if (Buffer[3] == 0x30) + return (FALSE); + if (Buffer[0] == 0x00) // Object file + if (Buffer[1] == 0x00) + if (Buffer[2] == 0x03) + if (Buffer[3] == 0xE7 OR Buffer[3] == 0xFA) + return (FALSE); + if (!(strncmp, &Buffer[2], "-lh", 3)) // LHA, LZH archive + return (FALSE); + if (!(strncmp, Buffer, "PK", 2)) // ZIP archive + return (FALSE); + if (!(strncmp, Buffer, "LZX", 3)) // LZX archive + return (FALSE); + if (!(strncmp, Buffer, "DMS", 3)) // DMS archive + return (FALSE); + if (!(strncmp, Buffer, "Warp", 4)) // WRP archive + return (FALSE); + if (!(strncmp, Buffer, "PP20", 4)) // PP archive + return (FALSE); + if (!(strncmp, Buffer, "FORM", 4)) // IFF files + return (FALSE); + if (!(strncmp, Buffer, "PP20", 4)) // PP archive + return (FALSE); + + return (TRUE); +} + +BOOL FinnCommentStart (UBYTE *Buf, ULONG fillisteSize) +{ + ULONG i, j, lines; + BOOL title; + + title = FALSE; + Status (GLS (&txt_135)); + +// AMIGA LISTER + file_len = 18; +// MC FLM + lines = 0; + for (i = 0, j = 0; i < fillisteSize; i++, j++) + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 100) + break; + } + else + { + if (i + 10 < fillisteSize) + { + if (!(strncmp ("-*- MC FLM", &Buf[i], 10))) + { + file_start = 0; + cStart = 35; + file_offsett = i + 9; + return (TRUE); + } + } + } + } + +// FLIM/FILM/FileList + lines = 0; + for (i = 0, j = 0; i < fillisteSize; i++, j++) + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 100) + break; + j = 0; + } + else + { + if (i + 16 < fillisteSize) + { + if (!(strncmp ("File description", &Buf[i], 16))) + { + file_start = 2; + cStart = j - 1; + file_offsett = i + 30; + return (TRUE); + } + } + } + } + +// Aminet + lines = 0; + for (i = 0, j = 0; i < fillisteSize; i++, j++) + { + if (!title) + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 10) + break; + } + if (i + 7 < fillisteSize) + { + if (!(strncmp ("Aminet ", &Buf[i], 7))) + title = TRUE; + } + } + else + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 200) + break; + j = 0; + } + else + { + if (i + 11 < fillisteSize) + { + if (!(strncmp ("Description", &Buf[i], 11))) + { + file_start = 0; + cStart = j - 1; + file_offsett = i + 50; + return (TRUE); + } + } + } + } + } + +// PC LISTER + file_len = 12; +// AG-GRAB + lines = 0; + for (i = 0, j = 0; i < fillisteSize; i++, j++) + { + if (Buf[i] == 13) + continue; + if (!title) + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 200) + break; + } + if (i + 7 < fillisteSize) + { + if (!(strncmp ("AG-GRAB", &Buf[i], 7))) + title = TRUE; + } + } + else + { + if (Buf[i] == '\n') + { + lines++; + if (lines > 400) + break; + j = 0; + } + else + { + if (i + 11 < fillisteSize) + { + if (!(strncmp ("File Description", &Buf[i], 16))) + { + file_start = 3; + cStart = j - 1; + file_offsett = i + 50; + return (TRUE); + } + } + } + } + } + return (FALSE); +} + +VOID Liste_SlettBase (VOID) +{ + ULONG s; + struct Node *nd; + + Status (GLS (&txt_PLEASE)); + nd = Liste_sjef.list.lh_Head; + for (s = 0; s < liste_len; s++) + { + Remove (nd); + FreeMem ((UBYTE *)nd, sizeof (Listebase)); + nd = 0; + nd = Liste_sjef.list.lh_Head; + } + liste_len = 0; +} + +VOID Liste_Close (VOID) +{ + Listebase *bp; + + if (liste_len > 0) + { + Liste_SlettBase (); + bp = (Listebase *)Liste_sjef.list.lh_Head; + while (bp = RemHead (&Liste_sjef.list)) + { + FreeMem (bp, sizeof (Listebase)); + bp = 0; + } + } +} + +BOOL Sjekk_liste_norsk (UBYTE *Name) +{ + struct Node *nd; + UBYTE Hold1[108], Hold2[18]; + + nd = Liste_sjef.list.lh_Head; + while (nd->ln_Succ) + { + strcpy (Hold1, nd->ln_Name); + strcpy (Hold2, Name); + JEOtoupper (Hold1); + JEOtoupper (Hold2); + if (!(strcmp (Hold1, Hold2))) + { + nd = nd->ln_Pred; + return (TRUE); + } + nd = nd->ln_Succ; + } + return (FALSE); +} + +BOOL Sjekk_liste (UBYTE *Name) +{ + struct Node *nd; + + nd = Liste_sjef.list.lh_Head; + while (nd->ln_Succ) + { + if (!(stricmp (nd->ln_Name, Name))) + { + + nd = nd->ln_Pred; + return (TRUE); + } + nd = nd->ln_Succ; + } +/* + if (Sjekk_liste_norsk (Name)) + return (TRUE); +*/ + return (FALSE); +} + +BOOL Liste_Insett (UBYTE *Name, UBYTE *Comment, ULONG flags) +{ + Listebase *bp = NULL; + + if (bp = (Listebase *)AllocMem (sizeof (Listebase), MEMF_CLEAR)) + { + strcpy (bp->Name, Name); + strcpy (bp->Comment, Comment); + bp->flags = flags; + + bp->nd.ln_Name = bp->Name; + AddTail (&Liste_sjef.list, &bp->nd); + liste_len++; + return (TRUE); + } + return (FALSE); +} + +BOOL KopierNavn (UBYTE *Navn, UBYTE *Hold) +{ + UBYTE i, len, space, første; + + første = space = 0; + for (i = file_start, len = 0; i < file_start + file_len; i++, len++) + { + Navn[len] = Hold[i]; + if (Navn[len] == ' ') + { + if (!space) // Første spacen + { + første = len; + space++; + } + } + else if (space) // Allerede en space + return (FALSE); + } + if (space) + len = første; + Navn[len] = 0; + + if (len == 0) + return (FALSE); + if (!(strncmp (Navn, "---------", 9))) + return (FALSE); + if (!(strcmp (Navn, "|File"))) + return (FALSE); + if (!(strcmp (Navn, "|---------------"))) + return (FALSE); + if (!(strncmp (Navn, "============", 12))) + return (FALSE); + + return (TRUE); +} + +BOOL KopierComment (UBYTE *Comment, UBYTE *Hold) +{ + BYTE i, len; + + for (i = cStart, len = 0; Hold[i] != 0; i++, len++) + { + Comment[len] = Hold[i]; + if (len == 36) + break; + } + for (i = len - 1; i >= 0; i--) + { + if (Comment[i] != ' ') + { + Comment[i + 1] = 0; + goto end; + } + } + Comment[0] = 0; + +end: + if (!(strncmp (Comment, "File Description", 16))) + return (FALSE); + + return (TRUE); +} + +VOID Hent_filliste (VOID) +{ + BPTR fh = 0; + UBYTE Head[8]; + UBYTE *Buf = 0; + ULONG i, j; + UBYTE Navn[18], Comment[40]; + UBYTE Hold[81]; + LONG size; + WORD ret; + static char Filskuff[108] = "RAM:"; + char Filename[108]; + + ret = TRUE; + if (FE_GetFileName (Filskuff, Liste_navn, GLS (&txt_124), GLS (&txt_125))) + { + rtSetWaitPointer (FileEditorWnd); + sprintf (Filename, "%s%s", Filskuff, Liste_navn); + size = FileSize (Filename); + if (size > 0) + { + if ((fh = Open (Filename, MODE_OLDFILE)) != NULL) + { + Status (GLS (&txt_126)); + Read (fh, Head, 8); + if (Check_ASCII (Head)) + { + if (Buf = AllocMem (size, MEMF_CLEAR)) + { + Read (fh, Buf, size); + Close (fh); + fh = 0; + if (FinnCommentStart (Buf, size)) // Jepp en liste :-) + { + Liste_SlettBase (); // Slett den gammle basen... + liste_antall = 0; + Status (GLS (&txt_127)); + for (i = file_offsett, j = 0; i < size; i++) + { + if (Buf[i] == 13) + continue; + Hold[j] = Buf[i]; + if (Buf[i] == '\n') + { + Hold[j] = 0; + if (j > 35) + { + if (KopierNavn (Navn, Hold)) + { + if (KopierComment (Comment, Hold)) + { + if (!Liste_Insett (Navn, Comment, 0)) // Ikke nok minne + { + ret = -2; + break; + } + else + liste_antall++; + } + } + } + j = 0; + } + else + { + j++; + if (j > 80) + { + JEOReqRequest (GLS (&txt_MESSAGE), GLS (&txt_128), GLS (&txt_OK)); + break; + } + } + } + } + else + ret = -3; + } + else + ret = -2; + } + else + ret = -1; + } + else + ret = -4; + } + else + ret = -4; + } + else + ret = FALSE; + + if (Buf) + { + FreeMem (Buf, size); + Buf = 0; + } + if (fh) + { + Close (fh); + fh = 0; + } + + if (ret < 0) + cStart = 0; + + switch (ret) + { + case -1: JEOReqRequest (GLS (&txt_MESSAGE), GLS (&txt_129), GLS (&txt_OK)); break; + case -2: JEOReqRequest (GLS (&txt_MESSAGE), GLS (&txt_030), GLS (&txt_OK)); break; + case -3: JEOReqRequest (GLS (&txt_MESSAGE), GLS (&txt_130), GLS (&txt_OK)); break; + case -4: JEOReqRequest (GLS (&txt_MESSAGE), GLS (&txt_131), GLS (&txt_OK)); break; + } +} + +// ****************************************************************************** +// ********************************** COMMENT *********************************** +// ****************************************************************************** + +BOOL Check_comment (UBYTE *Descr) +{ + if (strlen (Descr) <= 2) + return (TRUE); + if (!(strncmp (Descr, "FileEditor: No d", 16))) // FileEditor + return (TRUE); + if (!(strncmp (Descr, "Local upload by", 15))) // AFE, MakeComment + return (TRUE); + if (!(strncmp (Descr, "http://", 7))) + return (TRUE); + if (!(strncmp (Descr, "ftp://", 6))) + return (TRUE); + + return (FALSE); +} + +WORD FinnCommentFraListe (VOID) +{ + BOOL save_flagg = AV; + struct Node *nd; + Listebase *bp; + + if (fentry.Filedescription[0] == 0) + { + save_flagg = ON; + strcpy (fentry.Filedescription, Comment_string); // Legger inn standard string + Com[0] = 0; + } + + nd = Liste_sjef.list.lh_Head; + bp = (Listebase *)nd; + while (nd->ln_Succ) + { + if (CheckESC (FileEditorWnd)) + return (ERROR); + if (!(stricmp (bp->Name, fentry.Filename))) // Finner vi fila i lista? + { + strcpy (Com, bp->Comment); // Jepp, kopierer over komment + save_flagg = ON; + return (TRUE); + } + nd = nd->ln_Succ; + bp = (Listebase *)nd; + } + + if (save_flagg) + return (TRUE); + else + return (FALSE); +} + +//BOOL cStart = FALSE; + +VOID Lag_beskrivelse (VOID) +{ + int n; + int temp_nr, temp_order; + int updated = 0, o, err; + + if (!cStart) + { + Hent_filliste (); + if (!cStart) + return; + } + + sprintf (Dummy, GLS (&txt_132), Liste_navn, liste_antall); + if (!JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_072))) + return; + rtSetWaitPointer (FileEditorWnd); + + temp_nr = filedir_number; + temp_order = file_order; + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) // Finnes navnet? + { + sprintf (Dummy, GLS (&txt_133), config->firstFileDirRecord[n].n_DirName); + Status (Dummy); + filedir_number = n; + for (o = 1;; o++) + { + file_order = o; + err = Load_fentry (); + if (err == Error_EOF) + break; + if (err != Error_OK) + { + ErrorMsg (GLS (&txt_029)); + break; + } + if (fentry.Filestatus & (FILESTATUSF_Filemoved | FILESTATUSF_Fileremoved)) + continue; // Fila er ikke her! + if (Check_comment (fentry.Filedescription)) // Trenger vi å forandre? + { // JA! + switch (FinnCommentFraListe ()) // Ny comment i Com[] + { + case TRUE: + { + if (Com[0]) // Regner med at vi fant noe.... + { + strcpy (fentry.Filedescription, Com); + Status (Com); + SaveFileEntry (); + updated++; +// Lag_disk_beskrivelse (i, j); + } + break; + } + case ERROR: // Vi breaka + break; + } + } + } + } + } + + filedir_number = temp_nr; + file_order = temp_order; + if (selected) // har vi valgt dir? + SetupFiles (); + sprintf (Dummy, GLS (&txt_134), updated, updated == 1 ? GLS (&txt_060) : GLS (&txt_061)); + JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_OK)); + Status (GLS (&txt_READY)); +} + +VOID Liste_Open (VOID) +{ + liste_len = 0; + NewList (&Liste_sjef.list); +} diff --git a/JEO/FileEditor/Norsk.ct b/JEO/FileEditor/Norsk.ct new file mode 100644 index 0000000..728bbc3 --- /dev/null +++ b/JEO/FileEditor/Norsk.ct @@ -0,0 +1,452 @@ +; +; FileEditor.catalog +; +; Catalog Translation generated by CatEdit +; CatEdit is © Rafael D'Halleweyn +; +## version $VER: FileEditor.catalog 0.10 (23.5.98) +## codeset 0 +## language norsk +; +txt_001 +Velg bruker: +; +txt_002 +Feil ved henting av bruker: '%s'!\n\ +Vennligst prøv igjen +; +txt_003 +Ok|Avslutt FileEditor +; +txt_004 +Feil ved lagring av bruker: '%s'! +; +txt_005 +%s - Bruker: %s +; +txt_OK +Ok +; +txt_MESSAGE +Beskjed +; +txt_READY +Klar. +; +txt_PLEASE +Vennligst vent... +; +txt_NOT_YET +Ikke ennå ;) +; +txt_ERROR +Feil! +; +txt_012 +SIkker på at du vil slette '%s'? +; +txt_DELETE_CANCEL +Slett|Avbryt +; +txt_014 +Feil ved sletting av fileentry! +; +txt_015 +Kunne ikke lagre configfile! +; +txt_016 + Nedlastet: +; +txt_017 + Størrelse: +; +txt_018 + Dato: +; +txt_019 + Fra: +; +txt_020 + Til: +; +txt_021 +Konferanse: +; +txt_022 +ALLE +; +txt_023 +N/A +; +txt_024 +Fant ikke filen:\n\ +\n\ +%s +; +txt_025 +Slett fil|Avbryt +; +txt_026 +Er du sikker på at denne filen skal bli tilgjengelig for alle? +; +txt_027 +Lag tilgjengelig|Avbryt +; +txt_028 +Feil ved lagring av '%s' +; +txt_029 +Feil ved henting av fileentry!\n\ + +; +txt_030 +Ikke nok minne! +; +txt_031 +Velg navn på skuffen: +; +txt_032 +Velg søkesti for: '%s' +; +txt_033 +Feil ved opprettelse av ny skuff! +; +txt_034 +Søkesti navnet er for langt! +; +txt_035 +Ugyldige bokstaver i skuffnavnet! +; +txt_036 +Velg ny søkesti for '%s'... +; +txt_037 +Sjekker %s... +; +txt_038 +Slett fil|Fortsett +; +txt_039 +Slett fil '%s' +; +txt_040 +Slett|Hopp over +; +txt_041 +Du kan ikke slette '%s!' +; +txt_042 +Sikker på at du vil slette '%s'? +; +txt_043 +Feil ved sletting av skuff! +; +txt_044 +Teller: %6ld filer, %6ld (MB)... +; +txt_045 +Totalt innstallert: %6ld filer\n\ + Total størrelse: %6ld (MB) +; +txt_046 +Fil teller resultat +; +txt_047 +Vennligst velg en skuff du vil redigering. +; +txt_048 +Vennligst velg en skuff du vil slette. +; +txt_049 +Vennligst velg en skuff. +; +txt_050 +Vennligst velg en fil du vil redigere. +; +txt_051 +Vennligst velg en fil du vil slette. +; +txt_052 +FileEditor trenger '%s' v%ld + +; +txt_053 +ABBS må være oppe! +; +txt_054 +Kunne ikke åpne beskjed porten! +; +txt_055 +Kunne ikke åpne utility.library +; +txt_056 +ABBS must be running for FileEditor to work! +; +txt_057 +Teste LHA, LZH, ARC, DMS og GIF filer for feil? +; +txt_058 +Nye filer|Alle filer|Avbryt +; +txt_059 +Testet %ld %s. +; +txt_060 +fil +; +txt_061 +filer +; +txt_062 + Funnet %ld %s\n\ +\n\ +Vennligst se i '%s' filen. +; +txt_063 +feil +; +txt_064 +feil +; +txt_065 +\n\ +\n\ +Alt ser ut til å være i orden. +; +txt_066 +Kunne ikke finne C:LHA! +; +txt_067 +Kunne ikke finne C:LZX! +; +txt_068 +For langt filnavn: '%s' +; +txt_069 +Filen %s eksisterer allerede!\n\ +\n\ +ABBS FIL:\n\ +Kort beskrivelse: %s\n\ + Størrelse: %ld\n\ +\n\ +NY FIL:\n\ +Kort beskrivelse: %s\n\ + Størrelse: %ld\n\ +\n\ + Forskjell: %ld +; +txt_070 +Erstatt|Hopp over +; +txt_071 +Opprette ABBS skuff '%s'? +; +txt_072 +Ja|Nei +; +txt_073 +Funnet +; +txt_074 +Ikke funnet +; +txt_075 +Innstallere denne filen til +; +txt_076 +Innstaller| +; +txt_077 +Flytte denne filen til +; +txt_078 +Flytt| +; +txt_079 +%s '%s'?\n\ +\n\ + Navn: %s\n\ + Størrelse: %s bytes\n\ +%s Readme fil: %s +; +txt_080 +AUTO INNSTALLER|Hopp over|Avbryt +; +txt_081 +Feil ved opprettelse/låsing av skuff:\n\ +%s +; +txt_082 +Tast filbeskrivelse for '%s'... +; +txt_083 +Ingen nye filer er funnet i '%s'. +; +txt_084 +Rediger fil... avbryter +; +txt_085 +Prosjekt +; +txt_086 +Informasjon +; +txt_087 +Avslutt +; +txt_088 +Skuffer +; +txt_089 +Ny +; +txt_090 +Endre navn +; +txt_091 +Endre søkesti +; +txt_092 +Slett +; +txt_093 +Oppdater +; +txt_094 +Fil +; +txt_095 +Auto innstaller +; +txt_096 +Rediger +; +txt_097 +Oppdater filstørrelser +; +txt_098 +Tell filer +; +txt_099 +Filbeskrivelser +; +txt_100 +Hent ny filliste +; +txt_101 +Lag beskrivelser +; +txt_102 +Sjekking +; +txt_103 +Test arkiver +; +txt_104 +Virus sjekk +; +txt_105 +Slett/flytt ikke innstallerte filer +; +txt_ABOUT +Informasjon +; +txt_TRANSLATION +Norsk oversettelse av Jan Erik Olausen +; +txt_TESTING +Tester: %s +; +txt_108 +Flytt eller slett ikke innstallerte filer fra disken. +; +txt_109 +Flytt|Slett|Avbryt +; +txt_110 +Oppdatert %ld fil%s +; +txt_111 +størrelse +; +txt_112 +størrelser +; +txt_113 +Avbryt +; +txt_114 +Navn +; +txt_115 +Beskrivelse +; +txt_116 +Info +; +txt_117 +Filskuffer +; +txt_118 +Filer +; +txt_119 +Filnavn +; +txt_120 +Filbeskrivelse +; +txt_121 +Filinfo +; +txt_122 +Slett konf +; +txt_123 +Fix størrelse +; +txt_124 +Velg en filliste +; +txt_125 +Hent +; +txt_126 +Henter filliste... +; +txt_127 +Konverterer filliste... +; +txt_128 +Feil i fillisten! +; +txt_129 +Ikke en tekstfil! +; +txt_130 +Ikke en filliste! +; +txt_131 +Feil ved henting! +; +txt_132 +Lage beskrivelse fra '%s'?\n\ +(Funnet %ld filer) +; +txt_133 +Skanner skuff: %s +; +txt_134 +Oppdatert %ld %s med ny beskrivelse. +; +txt_135 +Analyserer fillisten... +; +txt_136 +Oppdater forhåndsfiler +; +txt_137 +Oppdatert %ld forhånds%s. +; +txt_138 +Innstallere filene privat til konferansen '%s'? +; diff --git a/JEO/FileEditor/Test_arc.c b/JEO/FileEditor/Test_arc.c new file mode 100644 index 0000000..ff9e25f --- /dev/null +++ b/JEO/FileEditor/Test_arc.c @@ -0,0 +1,391 @@ +;/* +sc5 -j73 Test_arc +x fe.s +quit +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PACK_PÅ (UBYTE)'·' + +VOID Finn_siste_linje (UBYTE *Buffer, UBYTE *Linje, BYTE pakk) +{ + LONG i, j, len; + WORD cnt; + UBYTE Hold[256]; + UWORD ln; + + switch (pakk) + { + case PACK_LHA: ln = 1; break; + case PACK_ARC: ln = 1; break; + case PACK_LZX: ln = 2; break; + case PACK_DMS: ln = 2; break; + case PACK_GIF: ln = 1; break; + case PACK_ZIP: ln = 1; break; + default: ln = 10; + } + + cnt = 0; + len = strlen (Buffer) - 1; + for (i = len, j = 0; i > 0; i--) + { + Linje[j] = Buffer[i]; + if (Buffer[i] == '\n' OR Buffer[i] == 13 OR Buffer[i] == 0) + { + Linje[j] = 0; + if (ln == 10) + printf ("%ld %s\n", cnt, Linje); + if (cnt == ln) + break; + j = 0; + cnt++; + } + else + j++; + } + len = strlen (Linje); + if (len) + { + if (pakk == PACK_LZX) + { + if (len > 12) + len = 12; + for (i = 0, j = len - 1; i < len; i++, j--) + Hold[j] = Linje[i]; + Hold[len] = 0; + } + else if (pakk == PACK_ZIP) + { + if (len > 3) + len = 3; + for (i = 0, j = len - 1; i < len; i++, j--) + Hold[j] = Linje[i]; + Hold[len] = 0; + } + else + { + for (i = 0, j = len - 1; i < len; i++, j--) + Hold[j] = Linje[i]; + Hold[len] = 0; + } + strcpy (Linje, Hold); + } +// printf ("%s\n", Linje); +} + +WORD Sjekk_pakkemetode (UBYTE *Navn) +{ + UWORD len, i, j; + + len = strlen (Navn); + if (len < 4) + return (ERROR); + + for (i = len - 4, j = 0; i < len; i++, j++) + Dummy[j] = Navn[i]; + + Dummy[j] = 0; + if (!(stricmp (Dummy, ".LHA"))) + return (PACK_LHA); + else if (!(stricmp (Dummy, ".LZH"))) + return (PACK_LHA); + else if (!(stricmp (Dummy, ".LZX"))) + return (PACK_LZX); + else if (!(stricmp (Dummy, ".ARC"))) + return (PACK_ARC); + else if (!(stricmp (Dummy, ".DMS"))) + return (PACK_DMS); + else if (!(stricmp (Dummy, ".GIF"))) + return (PACK_GIF); + else if (!(stricmp (Dummy, ".ZIP"))) + return (PACK_ZIP); + + return (ERROR); +} + +VOID Test_arc (VOID) +{ + BPTR fh = 0; + char ErrorFname[] = "T:FE_Test_arc.ERROR"; + char ArcFname[] = "ABBS:-Arc.ERROR"; + UBYTE *Buffer = 0; + UBYTE Fil[256]; + BYTE pakk; + UBYTE ErrMsg[80]; + BOOL lagre; + UBYTE test; + UBYTE Hold[256]; + BOOL LHA_feil, LZX_feil, ARC_feil, DMS_feil, GIF_feil, ZIP_feil; + ULONG sjekket = 0; + ULONG feil = 0, n, o; + char FentryFName[80]; + int num, size, err; + + if (!(test = JEOReqRequest (GLS (&txt_103), GLS (&txt_057), GLS (&txt_058)))) + return; + + rtSetWaitPointer (FileEditorWnd); + LHA_feil = LZX_feil = ARC_feil = DMS_feil = GIF_feil = ZIP_feil = AV; + + fh = Open (ArcFname, MODE_NEWFILE); // Lage, åpne ny :) + if (fh) + { + Close (fh); + fh = 0; + } + + lagre = AV; + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) // Finnes navnet? + { + strcpy (Dummy, config->firstFileDirRecord[n].n_DirName); + Do_fl (Dummy); + sprintf (FentryFName, "ABBS:Fileheaders/%s.fl", Dummy); + size = FileSize (FentryFName); + if (size > 0) + { + filedir_number = n; + num = size / sizeof (struct Fileentry); + for (o = 1;; o++) + { + if (CheckKey (FileEditorWnd, ESC)) + goto end; + file_order = o; + err = Load_fentry (); + if (err == Error_EOF) + break; + if (err != Error_OK) + { + printf ("Error reading fileentry\n"); + break; + } + if (fentry.Filestatus & (FILESTATUSF_Filemoved | FILESTATUSF_Fileremoved)) + continue; + + if (fentry.pad1 & PAD1STATUSF_ArcTested) // Allerede testet? + { + if (test == 1) // Test kun nye + continue; + } + if ((pakk = Sjekk_pakkemetode (fentry.Filename)) == ERROR) + continue; + strcpy (Fil, config->firstFileDirRecord[n].n_DirPaths); + Do_slash (Fil); + strcat (Fil, fentry.Filename); + sprintf (Dummy, GLS (&txt_TESTING), Fil); + Status (Dummy); + if (fh = Open (ErrorFname, MODE_NEWFILE)) + { + switch (pakk) + { + case PACK_LHA: + { + if (FileSize ("C:LHA") > 0) + { + sprintf (Dummy, "C:LHA t %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, "Operation successful."); + } + else if (!LHA_feil) + { + ErrorMsg ("Error executing 'C:LHA'"); + LHA_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + case PACK_ZIP: + { + if (FileSize ("C:ZIP") > 0) + { + sprintf (Dummy, "C:ZIP -T %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, " OK"); + } + else if (!ZIP_feil) + { + ErrorMsg ("Error executing 'C:ZIP'"); + LHA_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + case PACK_LZX: + { + if (FileSize ("C:LZX") > 0) + { + sprintf (Dummy, "C:LZX t %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, "all files OK"); + } + else if (!LZX_feil) + { + ErrorMsg ("Error executing 'C:LZX'"); + LZX_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + case PACK_ARC: + { + if (FileSize ("C:ARC") > 0) + { + sprintf (Dummy, "C:ARC t %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, "No errors detected"); + } + else if (!ARC_feil) + { + ErrorMsg ("Error executing 'C:ARC'"); + ARC_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + case PACK_DMS: + { + if (FileSize ("C:DMS") > 0) + { + sprintf (Dummy, "C:DMS test %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, " All Done!"); + } + else if (!DMS_feil) + { + ErrorMsg ("Error executing 'C:DMS'"); + DMS_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + case PACK_GIF: + { + if (FileSize ("C:GIFINFO") > 0) + { + sprintf (Dummy, "Failat 500000000\nC:GIFINFO -ver %s", Fil); + Execute (Dummy, NULL, fh); + strcpy (ErrMsg, " Size ="); + } + else if (!GIF_feil) + { + ErrorMsg ("Error executing 'C:GIFINFO'"); + GIF_feil = PÅ; + rtSetWaitPointer (FileEditorWnd); + } + break; + } + } + Close (fh); + fh = 0; + + size = FileSize (ErrorFname); + if (size > 0) + { + if (Buffer = AllocMem (size, MEMF_CLEAR)) + { + if (fh = Open (ErrorFname, MODE_OLDFILE)) + { + Read (fh, Buffer, size); + Close (fh); + fh = 0; + DeleteFile (ErrorFname); + } + } + else + { + DB; + ErrorMsg (GLS (&txt_030)); + goto end; + } + + Finn_siste_linje (Buffer, Hold, pakk); // Eller nest siste :-) + if (strnicmp (Hold, ErrMsg, strlen (ErrMsg))) // ERROR + { + if (fentry.pad1 & PAD1STATUSF_ArcTested) // På? + { + fentry.pad1 |= PAD1STATUSF_ArcTested; // Slår av.. + SaveFileEntry (); + } + feil++; + sprintf (Dummy, "Seems to be a problem with file: '%s'!\n", Fil); + if (fh = Open (ArcFname, MODE_OLDFILE)) + { + Seek (fh, 0, OFFSET_END); + Write (fh, Dummy, strlen (Dummy)); + Close (fh); + fh = 0; + } + } + else + { + if (!(fentry.pad1 & PAD1STATUSF_ArcTested)) // Ikke på? + { + fentry.pad1 |= PAD1STATUSF_ArcTested; + SaveFileEntry (); + } + } + sjekket++; + if (Buffer) + { + FreeMem (Buffer, size); + Buffer = 0; + } + } + } + } + } + } + } +end: + if (Buffer) + { + FreeMem (Buffer, size); + Buffer = 0; + } + + sprintf (Dummy, GLS (&txt_059), sjekket, sjekket == 1 ? GLS (&txt_060) : GLS (&txt_061)); + if (feil) + { + sprintf (Hold, GLS (&txt_062), feil, feil == 1 ? GLS (&txt_063) : GLS (&txt_064), ArcFname); + strcat (Dummy, Hold); + } + else + strcat (Dummy, GLS (&txt_065)); + + JEOReqRequest (GLS (&txt_MESSAGE), Dummy, GLS (&txt_OK)); + Status (GLS (&txt_READY)); +} + +WORD CheckKey (struct Window *w, USHORT key) +{ + struct IntuiMessage *message; + ULONG class; + USHORT Code; + + while (message = (struct IntuiMessage *)GetMsg (w->UserPort)) + { + class = message->Class; + Code = message->Code; + ReplyMsg ((struct Message *)message); + + switch (class) + { + case IDCMP_RAWKEY: + { + if (Code == key) + return (TRUE); + } + } + } + return (FALSE); +} diff --git a/JEO/FindUnread.c b/JEO/FindUnread.c new file mode 100644 index 0000000..731692b --- /dev/null +++ b/JEO/FindUnread.c @@ -0,0 +1,191 @@ +;/* +sc5 -j73 -v -O FindUnread +slink LIB:c.o+"FindUnread.o" to FindUnread LIB LIB:sc.lib LIB:JEO.lib +Copy FindUnread ABBS:Utils +Delete FindUnread.o FindUnread QUIET +quit +*/ + +/*************************************************************************** +* FindUnread 0.2 (06.10.98) +* +* Finds unread messages in conferenes. +* +* Usage : +* +* +***************************************************************************/ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct MessageRecord msgheader; + +int main(int argc, char **argv); +int HandleMsg (struct ABBSmsg *msg); +int Setup (void); +void Cleanup (void); +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr); + +#define TEMPLATE "Conf/A" +#define OPT_COUNT 1 + +char *vers = "\0$VER: FindUnread v0.2 - 06.10.98"; + +struct ConfigRecord *config; + +int main(int argc, char **argv) +{ + int n, k, j; + int confnr; + LONG *result[OPT_COUNT] = {0}; + int ret = 10; + struct RDArgs *RDArg; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + while (1) { + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + break; + } + config = (struct ConfigRecord *) msg.Data; + + k = strlen ((char *) result[0]); + for (n = 0; n < config->Maxconferences ; n++) + { + if (*config->firstconference[n].n_ConfName) + { + if (!strnicmp ((char *) result[0], config->firstconference[n].n_ConfName, k)) + break; + } + } + + if (n == config->Maxconferences) + { + printf ("Error: Unknown conference (%s)\n",result[0]); + break; + } + confnr = n; + + printf ("\nConfnr = %ld, maxmsg = %ld\n\n", confnr, + config->firstconference[confnr].n_ConfDefaultMsg); + + for (n = 1, j = 0; n < config->firstconference[confnr].n_ConfDefaultMsg; n++) + { + if (k = loadmsgheader (&msgheader,n,confnr)) + { + printf ("Error loading message %d (%d)\n",n,k); + break; + } + if (msgheader.MsgStatus & (MSTATF_KilledByAuthor| + MSTATF_KilledBySigop|MSTATF_KilledBySysop| + MSTATF_Dontshow|MSTATF_MsgRead|MSTATF_Moved)) + continue; + + if (msgheader.MsgTo == -1) + continue; + + if (j == 15) + { + j = 0; + printf ("\n"); + } + else + j++; + printf ("%ld ", n); + } + printf ("\n"); + break; + } + Cleanup(); + } + FreeArgs (RDArg); + } + else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr) +{ + int n; + + msg.Command = Main_loadmsgheader; + msg.Data = (ULONG) msgheader; + msg.UserNr = msgnr - 1; + msg.Error = confnr * 2; + n = HandleMsg (&msg); + + if (n != Error_OK) { + if (n == Error_NoPort) + printf ("Error talking to ABBS\n"); + else + printf ("Error reading message header\n"); + } + + return (n); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport, (struct Message *)msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + ret = 1; + else + printf ("Error creating message port\n"); + } else + printf ("ABBS must be running for FindUnread to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); +} diff --git a/JEO/FindUnread.info b/JEO/FindUnread.info new file mode 100644 index 0000000000000000000000000000000000000000..5c004fe2a4bf30ac1aa85b7dc338bd2e1457d5ab GIT binary patch literal 835 zcmZ{hze@sP7{{OMt`i~D97;n(@%{h@hiWNk$SaT_qDEbs9Hhb}@Ls7Ua?qopKcJz( zA-BexivEMfBgNU#K)9YCCppxM`hDNe`{gWw+n1}}V0)qPGg9j5Nd`I6^=dHhe_3tzcY+?R9$S`*+1d~j_GUkaXF+i>k1d|2IY z%iTpD{}R4)E4+nGIcO?~=8FhZ_at zoYG7yNq!)n(K&N;{%4|d;^cZUiOyF7lI*+-7CSG3&CZXI$9>!*C+Eal8Oudp4jzRE zzHn!gxt)zgxlhii-x~|h&!lgobLQxr=96=NE;?t9&WV$A;^e#t4vU@87hXO%sT|VA F_yMdMxSRk0 literal 0 HcmV?d00001 diff --git a/JEO/FixConferences b/JEO/FixConferences new file mode 100644 index 0000000000000000000000000000000000000000..aa34f8614061eebac64db32b0f175e7dc8d1b4a6 GIT binary patch literal 39844 zcmeIbe_&MAnKyp!WHK4T5QY#!fB=^mLkN+?fJo80lSv3e2uYd*j6b$BL*_?DCNtyA z1i?}p5EWb6jkdM6udi!=yscH*QeW3~t*=Gbc5T;o(Yh|{x@ujl*3#-)>be%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xIh?I{nq+NZq$+Aj+^b+j-wA7Gfv2I>U2Q3jv$Sz H?5+O`ebDee literal 0 HcmV?d00001 diff --git a/JEO/FixConferences.info b/JEO/FixConferences.info new file mode 100644 index 0000000000000000000000000000000000000000..ce797e7c2997967ba13f035b813fb8799a35b70a GIT binary patch literal 835 zcmZ{hze@sP7{{OM>_iYXk z51fkrgGNblb}SIC=f{Z#^`d^?_w#;vPCpJ~paHENScN>SfdM*b!Nhqjn7H7JUmu#j z9t>~Y2e;)D#L8A=S^ z@4hG5kY=a-Z=ZSZ-h1vj=bn4+Ip>~x1(D@*G9NKl3PkcRiG=AymOt>ia(UY=x8kOi zf8rRv%_OZrO+1(;wiEze6+I^&JvBa7QExd}5fu-4Is_-1OMSY1csC2Oa;h5Mty*_tt6L2=Nvlmrr@Z;daBWONcsDuUvfe6M9- z5EL%5caWQ$8_Ll4PDMz3dw-ue7#bCS%Cgb7Zn{;mGFVYBp2B+)&;izG8OTvcyg%G$ z8A=hxp#VkSy7enAZ}kn~trS`}hrshy&6;Xfi9V`mryp3(N8Z3(h_N|Vt>?v0( zIevZm*Qc47rjolWR$5LCW}nW8L1-W-_A8fz!O1z)T@=MgMw3%cKj|baVL{;ZF|jdo zK3jZ*2(|6d-51605aV@}E+!WLgb@=S{l)lo2iksFjf6g?wU9NFEB93dEkk~C2bq`L zdYLaFzRH5Ga>5M852Ek9i`TZZ1h8Z!As%F{!H_*gk^4zDEAC;n8o^Hl)# zJDj32!hGVOZg(ZbGaM5VRYstDopE_xKFfKX!(PkvZFNCf%yFk$!XcpT*JaT5aXOT* zqHi6$x9;M1w?(^}lN&1&ZR^tU^mF7df>Z}}8w;A8ZmP^jCA!U(YlF&1MY_Wk+d5LobSHInwk6s+pPP`^BmX2pI$^#oKO?=MG#OO$NGA-HF(agv47e2g| zN-eJieB!&x0Q}+zYC}ftXlT^3utKpMRuY!|aT0o)>fsgAHbHd&vQXJ_%M+)9j)wYe z6ez5`H`)bGcl}kIYMbh#UH+*oNphN0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Cdr@XDs-{^hVbxxXhV@fz+C zn$_7XwpHNv3JaPa_R|8@jJ|zbUQjjk?@Zt~MeYr%^e@mXBz#i82U!Kz_e^MeXW|;> zyeh?Vn!l#5$4$Q-cx&;?9ADj9NA5)1Ik#Wbt)27wMQwg$XM5!luH}+HU%N@(f8KZJ z$dC|`*LMx)ApGWlvrTkOT^(zvUm0D!JccH2*Npox7tRN_$1T3U2~I%DkbAB4Dr!~g zf#alk;8#xguoeF1#4n#y{nOyJi1c5U@n1i6EA;BjNl+O5KF7YN40h~{6l%B|DbMg7 z05VDb!b;Mc()#i2hKBT(DX8%pLog(YCqp8@Laz4KMF> z;x#Iuxr+BAv=1Tk`@;C&1{~v#XUa)j@|-b2({W=t)eRQ1*>>Lr}*LgYlviwud zpL}DoR2+9c-4jm^o;4ofYaSC}yYYx$^YDIVi1z>fDI=PG5Ng@`mn0GT{u0Jt(=XnJ zl;QPh&Ps^oAU zg9!g)V#$L6KmIM4AMh^@_yH@JT9A86@f4O87ECK}6pLcPtbziuptRtgl7fO61qHLG zO`A3YB_1({&kN4gu +#include +#include +#include +#include +#include + +int HandleMsg (struct ABBSmsg *msg); + +WORD dir_order, dir_number; +WORD file_order; +struct MessageRecord *msg_head = 0; +char *Dummy = 0; +struct Fileentry tempfentry, fentry; // Føre vi forandrer noe... +struct ABBSmsg msg; + +struct ConfigRecord *config; +struct Library *UtilityBase = NULL; + +VOID CleanUp (VOID) +{ + if (msg.msg.mn_ReplyPort) + DeleteMsgPort (msg.msg.mn_ReplyPort); + + if (UtilityBase) + CloseLibrary (UtilityBase); + + if (Dummy) + FreeMem (Dummy, 5000); + if (msg_head) + FreeMem (msg_head, sizeof (struct MessageRecord)); + exit (0); +} + +BOOL SaveFileEntry (VOID) +{ + int err; + BOOL ret; + + msg.Command = Main_savefileentry; + msg.UserNr = dir_number; + msg.arg = file_order; + msg.Data = (ULONG)&fentry; + err = HandleMsg (&msg); + if (err == Error_OK) + ret = TRUE; + else + { + printf ("\n Error saving '%s'", fentry.Filename); + ret = FALSE; + } + return (ret); +} + +int Load_fentry (VOID) +{ + int err; + + msg.Command = Main_loadfileentry; + msg.UserNr = dir_number; + msg.arg = file_order; + msg.Data = (ULONG)&fentry; + err = HandleMsg (&msg); + return (err); +} + +VOID Do_fl (char *Name) +{ + UWORD i; + + for (i = 0; Name[i] != 0; i++) + { + if (Name[i] == '/') + Name[i] = ' '; + } +} + +BOOL Find_dir (char *Name) +{ + int n; + struct FileDirRecord *dirarray; + + dirarray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (config->Maxconferences * sizeof (struct ConferenceRecord))); + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (!(stricmp (dirarray[n].n_DirName, Name))) + return (TRUE); // Found! + } + return (FALSE); +} + +BOOL Setup (void) +{ + BOOL ret = FALSE; + + if (!(Dummy = AllocMem (5000, MEMF_CLEAR))) + return (FALSE); + if (!(msg_head = AllocMem (sizeof (struct MessageRecord), MEMF_CLEAR))) + return (FALSE); + + if (FindPort (MainPortName)) + { + if (UtilityBase = OpenLibrary ("utility.library",36)) + { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + { + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) + printf ("Error talking to ABBS\n"); + else + { + config = (struct ConfigRecord *)msg.Data; + ret = TRUE; + } + } + else + printf ("Error creating message port\n"); + } + else + printf ("Error opening utility.library\n"); + } + else + printf ("ABBS must be running for FileEditor to work\n"); + + return (ret); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport, *inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) + { + PutMsg (mainport, (struct Message*)msg); + Permit (); + while (1) + { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *)GetMsg (inport)) + break; + } + ret = inmsg->Error; + } + else + { + Permit (); + ret = Error_NoPort; + } + + return (ret); +} + +BOOL Find_file (UBYTE *Name) +{ + UWORD r, n; + int err; + ULONG matchbuffer[1024/4]; + struct Fileentry fl; + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) // Finnes filedirret? + { + r = config->firstFileDirRecord[n].n_FileOrder - 1; + msg.Command = Main_findfile; + msg.Name = Name; + msg.arg = (ULONG)matchbuffer; // am_Arg4 + matchbuffer[2] = 0; + msg.UserNr = r; // am_Arg3 + msg.Data = (ULONG)&fl; + err = HandleMsg (&msg); + if (err == Error_OK) // Fila funnet? + { + dir_number = n; + file_order = msg.UserNr; + Load_fentry (); + return (TRUE); + } + } + } + return (FALSE); +} + +VOID Do_Subject (char *Subject) +{ + UBYTE i; + + for (i = 0; Subject[i] != 0; i++) + { + if (Subject[i] == ' ') + break; + } + Subject[i] = 0; +} + +BOOL Load_msgheader (UWORD confnr, UWORD msg_nr) +{ + int err; + BOOL ret; + + msg.Command = Main_loadmsgheader; + msg.UserNr = msg_nr - 1; + msg.Error = confnr * 2; + msg.Data = (ULONG)msg_head; + err = HandleMsg (&msg); + if (err == Error_OK) + ret = TRUE; + else + { + printf ("\n Error loading msgheader (%ld)!\n\n", msg.Error); + ret = FALSE; + } + return (ret); +} + +VOID main (int argc, char **argv) +{ + LONG confnr, i; + ULONG count = 0; + BOOL go_flag; + char Filename[19]; + char Subject[31]; + BOOL kill_flag; + + if (argc != 2) + { + printf ("FixFileInfo v%s by Jan Erik Olausen\n\n Usage: FixFileInfo \n\n", Ver); + exit (10); + } + + if (strlen (argv[1]) > 18) + { + printf ("\nError: Filename (%s) too long!\n\n", argv[1]); + exit (10); + } + if (Setup ()) + { + strcpy (Filename, argv[1]); + go_flag = TRUE; + while (go_flag) + { + if (Find_file (argv[1])) + { + confnr = 3; // Standard FILEINFO + if (fentry.Filestatus & FILESTATUSF_PrivateConfUL) // Privat til konf? + confnr = fentry.PrivateULto / 2; // JA! + if (fentry.Infomsgnr == 0) // Ikke lagt inn noe + { + fentry.Infomsgnr = config->firstconference[confnr].n_ConfDefaultMsg; + // går ut i fra den siste + for (i = fentry.Infomsgnr; i >= fentry.Infomsgnr - 5; i--) + { + if (!Load_msgheader (confnr, i)) + break; + if (i < 0) + break; + + kill_flag = FALSE; + if (msg_head->MsgStatus & MSTATF_KilledByAuthor) + kill_flag = TRUE; + if (msg_head->MsgStatus & MSTATF_KilledBySysop) + kill_flag = TRUE; + if (msg_head->MsgStatus & MSTATF_KilledBySigop) + kill_flag = TRUE; + if (msg_head->MsgStatus & MSTATF_Moved) + kill_flag = TRUE; + if (msg_head->MsgStatus & MSTATF_Diskkilled) + kill_flag = TRUE; + if (msg_head->MsgStatus & MSTATF_Dontshow) + kill_flag = TRUE; + if (!kill_flag) // Ikke killa + { + strcpy (Subject, msg_head->Subject); + Do_Subject (Subject); + if (!(stricmp (Subject, fentry.Filename))) + { + fentry.Infomsgnr = i; + printf ("\n Adding fileinfo to '%s' in conference: %s.\n\n", argv[1], config->firstconference[confnr].n_ConfName); + SaveFileEntry (); + break; + } + } + } + } + go_flag = FALSE; // Vi avslutter + } + else + { + if (count < 12) + { + Delay (60 * 5); // 5 sekunder føre neste sjekk + count++; + } + else // Vi gidder ikke mere + { + printf ("\n File '%s' not found\n\n", argv[1]); + go_flag = FALSE; // Vi avslutter + } + } + } + } + CleanUp (); +} diff --git a/JEO/FixFileInfo.info b/JEO/FixFileInfo.info new file mode 100644 index 0000000000000000000000000000000000000000..c9e10de64b9936c6720c21b2d2a6c4e2089c5520 GIT binary patch literal 835 zcmZ{hze@sP7{{OM>`VwXhtd#Hx`-wn9IB-lk#L%pcq_x-$Ip3{%RIA}m?4_2WFYhZv5S~!2v3+FFAzM22f z^z|@o1HP9Oa(e%+a+dc+oU{PO=BNI91@U0d`2~EA8Itv+q+8+CS}IBR8dPeMsW$i3 zD|4t0Uih4>d7MTnNZpn54bK7N?4NuRzWk`TFKPRM#AP!g_!Ov}A`ldKM0+$bRD zltxNP@&oaV&Y7e0KNFo3C)e{ybhhGPtN(d=$tt^Cr-|Zlk)=DEOtU)c=7nWd_tSh E543T&Q~&?~ literal 0 HcmV?d00001 diff --git a/JEO/FixIndex b/JEO/FixIndex new file mode 100644 index 0000000000000000000000000000000000000000..0100313d6a2aff37dc06b1fb2b1220540b361757 GIT binary patch literal 11080 zcmc(Fe{>Vqo$q%>BY7~w436qJ!6i2nVQe8J#W+A&HY>?C2w`L+1J6llIs$vf#`q}A&DC$f$lsIs*o@#grL(B83`d4+aI)`SJcGwK==NQnI;zdD*VNGz`n ziW4)fHzz@%lCzK8Kqd@RDM_OdK*pV9?gnDXdoyai(Cl?XUEWdNfe`5T~53FWRS3$1%Y#v ziEY`patn?Vp*95FeY)TzF8u}e=gRI#?d89UIQ~cx( zG7q_pN^eqpng!Jw!U*z5(dJZnZHOg-B}bCt4_FtuYr9CYQS5~CSxDrJohZMVCQV{~ zlH5sgdNI`|#aG0ee10Dq6HgX2R?0PKYE|+j#goiylMIOkW24}+o8uPn%A;fA^M;ep z0;tD1g)hpy;u*uKCdCPk35k4B=-yylUe#-J8XWewg|y!tMH-U;Oa@gi}Ig=$6CT zaE)%L7p=dBTMn<)*JpdNw#p)V9i9Zu{ds$fM)nK9ZU**fT2e3a)f`>`NGl+ZrtKD_ zZqkIc1LjRTZo}#Tt(4triLLH!+Q=z7N7kI?q!+8~k6 z$5fM`(ogxAq+{r5R5c~|Vs9p91u)+*G578zwZ!cuss>LkG4HE}m|v)3Ng}K)c09X7 z_J@Qj$m+tLX3i`LBS&|1sP=fyFZg9YMfTd?0mm0wu8|UbnQj^pe@bu(Rr|;bu9|$; zAT}Ju51tz7y}`NO+k_76pnBaeC+N=YKEL4g9ZZm{frB#|)aAbzBtfXulvl^Z>$(^} zz)OSjTcem=oor{K!@5f?;qvy=tlnxUI?QL+z9&I*uJZBOeiX;r;QCVS37UV@k8%0Q z>^ljZn_OZ()~RfJc2=XFAXbUW;qk0WS8`8enJ|?d%}r)ALL|g>UJVScN&8lC88Ukc z43c}J=1Aw=6Y-Ig=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?d00001 diff --git a/JEO/FixIndex.c b/JEO/FixIndex.c new file mode 100644 index 0000000..7738c21 --- /dev/null +++ b/JEO/FixIndex.c @@ -0,0 +1,409 @@ +;/* +sc5 -j73 -v -O FixIndex +slink LIB:c.o+"FixIndex.o" to FixIndex LIB LIB:sc.lib LIB:JEO.lib +Copy FixIndex ABBS:Utils +quit +*/ + +/*************************************************************************** +* FixIndex 2.00 (16.10.97) +* +* Recreates the index files +* +* 2.00: Works only with ABBS v2.x. +* 1.4 : Addded KILLHIGH,FIXDUPLICATESNR, and FIXDUPLICATENAMES options. +* 1.3 : Added CHECK option, to just check for errors, not to rewrite file +* 1.2 : checks for abnormaly large usernumbers. +* Fixed bug where error allocating nrindex buffer crashed the machine +* +***************************************************************************/ +#include + +#include +#include +#include + +#include +#include +#include +#include + +int main(int argc, char **argv); +int insertlogentry (struct Log_entry *index, struct Log_entry *tmplog); +int comparestringsifull (unsigned char *string,unsigned char *string2, int length); +unsigned char upchar (unsigned char c); +static BOOL SaveCurrentUser (BPTR fil); + +struct UserRecord *user = NULL; +struct Log_entry tmplog; + +ULONG users = 0; +char *vers = "\0$VER: FixIndex 2.00 - 17.10.97"; +LONG user_size; + +#define TEMPLATE "CHECK/S,KILLHIGH/S,FIXDUPLICATESNR/S,FIXDUPLICATENAMES/S" +#define OPT_COUNT 4 + +int main (int argc, char **argv) +{ + BPTR fil; + int n, maxusernr = 0, oldmaxusernr = 0, record, k; + ULONG *nrindex = NULL; + struct Log_entry *index = NULL; + BOOL DoBreak = FALSE; + char userfname[50], indexfname[50], nrindexfname[50], configfname[50], *ptr; + LONG *result[OPT_COUNT] = {0,0,0,0}; + struct RDArgs *RDArg; + + if (FindPort (MainPortName)) + { + printf ("\n FixIndex won't work if ABBS is running...\n\n"); + return (0); + } + + strcpy (userfname, "abbs:config/userfile"); + strcpy (indexfname, "abbs:config/userfile.index"); + strcpy (nrindexfname, "abbs:config/userfile.nrindex"); + strcpy (configfname, "abbs:config/configfile"); + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) + { + if (fil = Open (configfname, MODE_OLDFILE)) + { + Seek (fil, 6, OFFSET_BEGINNING); + n = IoErr(); + if (!n) // Error seeking + { + if (4 == Read (fil, &user_size, 4)) + { + Close (fil); +// ******************************************************************** +// Start på main rutiner +// ******************************************************************** + while (1) + { + if (!(user = AllocVec (user_size, NULL))) + { + printf ("Error allocating memory"); + break; + } + + if (!(fil = Open (userfname, MODE_OLDFILE))) + { + printf ("Error opening userfile\n"); + break; + } + + record = 0; + do + { + n = Read (fil, user, user_size); + if (user->Usernr > maxusernr) + { + oldmaxusernr = maxusernr; + maxusernr = user->Usernr; + } +// printf ("%3ld: '%s'\n", user->Usernr, user->Name); + + if (user->Usernr > 100000) + { + printf ("Hiiiigh usernr %d for %s (%d)\n",user->Usernr, user->Name, record + 1); + if (result[1]) + { + maxusernr = oldmaxusernr; + ptr = (char *) &user; + for (k = 0; k < user_size; k++) + *ptr = '0'; + user->Usernr = record; + sprintf (user->Name,"Kill Me%d",record); + + if (!(SaveCurrentUser (fil))) { + DoBreak = TRUE; + break; + } + } + } + + if (n == user_size) + record += 1; + } while (n == user_size); + + if (DoBreak) + break; + + if (!n) + { + Seek (fil,0,OFFSET_BEGINNING); + n = IoErr(); + } + + if (n) + { + printf ("Error reading userfile\n"); + break; + } + maxusernr += 1; + + printf ("%d users (%d bytes), maximum user number = %d\n",record, user_size * record, maxusernr); + + if ((!(nrindex = AllocVec ((maxusernr * 4)+4,0))) || + (!(index = (struct Log_entry *) AllocVec ((maxusernr+1) * sizeof (struct Log_entry),MEMF_CLEAR)))) + { + printf ("Error allocating memory\n"); + break; + } + + for (n = 0; n <= maxusernr; n++) + nrindex[n] = -1L; + + record = 0; + n = Read (fil, user, user_size); + while (n == user_size) + { + tmplog.l_RecordNr = record; + tmplog.l_UserNr = user->Usernr; + + for (k = 0; k < users; k++) + { + if (user->Usernr == index[k].l_UserNr) + { + printf ("Duplicate usernumbers for %s. Same as %s (%d)\n", user->Name, index[k].l_Name, user->Usernr); + if (result[2]) + { + user->Usernr = maxusernr+1; + tmplog.l_UserNr = user->Usernr; + if (!(SaveCurrentUser (fil))) + { + DoBreak = TRUE; + break; + } + printf ("1 Usernumber crash problem fixed. Please restart\n"); + DoBreak = TRUE; + break; + } + } + } + if (DoBreak) + break; + + if (n == 1) + break; + + memset (tmplog.l_Name,'\0',sizeof (NameT)); + strncpy (tmplog.l_Name,user->Name,Sizeof_NameT); + tmplog.l_pad = 0; + tmplog.l_UserBits = user->Userbits; + + if (insertlogentry (index, &tmplog)) + { + if (result[3]) + { + sprintf (user->Name, "KILL ME_%d",record); + if (!(SaveCurrentUser (fil))) + { + DoBreak = TRUE; + break; + } + printf ("Username crash problem fixed. Please restart\n"); + DoBreak = TRUE; + break; + } + n = 1; + break; + } + record += 1; + users += 1; + + if (strlen (user->Name) > Sizeof_NameT) + { + user->Name[Sizeof_NameT] = '\0'; + Seek (fil,-user_size,OFFSET_CURRENT); + if (IoErr()) + { + n = 0; + printf ("Error fixing username\n"); + } + else + n = Write (fil,user,user_size); + } + + if (n == user_size) + n = Read (fil,user,user_size); + } + + if (DoBreak) + break; + + if (n) + { + printf ("Error reading userfile\n"); + break; + } + + for (n = 0; n <= maxusernr; n++) + nrindex[n] = -1L; + + for (record = 0; record < users; record++) + { + nrindex[index[record].l_UserNr] = record; +// printf ("%s\n",index[record].l_Name); + } + Close (fil); + + if (!(fil = Open (indexfname, MODE_NEWFILE))) + { + printf ("Error creating index file\n"); + break; + } + n = sizeof (struct Log_entry) * users; + if (n != Write (fil,index,n)) + { + printf ("Error writing userfile.index\n"); + break; + } + Close (fil); + + if (!(fil = Open (nrindexfname,MODE_NEWFILE))) + { + printf ("Error creating nrindex file\n"); + break; + } + if (((maxusernr * 4)+4) != Write (fil,nrindex,(maxusernr * 4)+4)) + { + printf ("Error writing userfile.nrindex\n"); + break; + } + Close (fil); + + if (!(fil = Open (configfname,MODE_READWRITE))) + { + printf ("Error opening config file\n"); + break; + } + + Seek (fil, 14, OFFSET_BEGINNING); + n = IoErr(); + + if (n) + { + printf ("Error seek'ing configfile (%n)\n"); + break; + } + + if ((4 != Write (fil,&users,4)) || (4 != Write (fil,&maxusernr,4))) + { + printf ("Error writing configfile\n"); + break; + } + break; + } + } + else + printf ("\n Error reading file %s!\n\n", configfname); + } + else + printf ("\n Error seeking in configfile!\n\n"); + } + else + printf ("\n Error opening file %s! \n\n", configfname); + + FreeArgs (RDArg); + } + else + PrintFault(IoErr(),argv[0]); + + if (user) FreeVec (user); + if (index) FreeVec (index); + if (nrindex) FreeVec (nrindex); + if (fil) Close (fil); + + return (0); +} + +static BOOL SaveCurrentUser (BPTR fil) +{ + int n; + + Seek (fil,-user_size,OFFSET_CURRENT); + if (IoErr()) { + n = 0; + } else { + n = Write (fil,user,user_size); + if (n != user_size) + n = 0; + } + + if (!n) + printf ("Error fixing user %d,%s\n",user->Usernr,user->Name); + + return ((BOOL) n); +} + + +int insertlogentry (struct Log_entry *index, struct Log_entry *tmplog) +{ + int n,l; + + n = 0; + + while (1) + { + l = comparestringsifull (index[n].l_Name,tmplog->l_Name,sizeof (NameT)); + if (!l) + { + printf ("ERROR: Duplicate name: '%s' found in userfile!\n",tmplog->l_Name); + return (1); + } + if ((l < 0) && (*index[n].l_Name)) + { + n += 1; + continue; + } + + for (l = users; l >= n; l--) + memcpy (&index[l+1],&index[l],sizeof (struct Log_entry)); + memcpy (&index[n],tmplog,sizeof (struct Log_entry)); + break; + } + return (0); +} + +/******************************* +;result = comparestringsifull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +*******************************/ + +int comparestringsifull (unsigned char *string,unsigned char *string2, int length) +{ + unsigned char c,d; + + while (--length > 0) { + c = upchar (*(string++)); + d = upchar (*(string2++)); + + if (c == d) + continue; + + if (c > d) + return (1); + + if (c < d) + return (-1); + } + + return (0); +} + +unsigned char upchar (unsigned char c) +{ + if (c < 'a') + return (c); + + if (c <= 'z') + return ((unsigned char) (c - 32)); + + if (c < 0xe0) + return (c); + + return ((unsigned char) (c - 32)); +} diff --git a/JEO/FixIndex.info b/JEO/FixIndex.info new file mode 100644 index 0000000000000000000000000000000000000000..0ed5660446eaa52e842b4feb213662ef60cc9da0 GIT binary patch literal 835 zcmZ{hO-lk%6o$_5hAr%q@dZjjz3!Rleprs4_ z12L+y_#g`D2=l~3_Li<6dM>9wcNuORI0IlqC=Aw#kfm2`@nT0=$YUV~y;GS=k2 zdSecyevi-5@_^Hbd8s>czUDb#od1*0!dIUZ_a*BttqE|r1F$UGojyRwFhFJ#_ozwqC&M7NNN#~wZYYZjf(#wS0t9Qv#-@%On za!zT)lq5e8&*+>vI{!1#IdO8mm_%nQ3=wwT0+XF*z+&eGrXk&|=cwS;LS&$%7p z?m&2bm${V;2Dneosox$8Pfw+9p>yWwoaU2rel9v^j?RgbbK>MY19cWVp)b6AdXYb) GjqewOs<hZ$^5JB)RB9_nQLNdbwjh<=GAx%PIVxoLAZ8O1SeDCi z#KHIL8QCVA)ZHKV$BpUfo_?=izxTTPeY7C5{fVqcEYt##yaw&}h-`o0?a0{n8=i=V zR{s~rsNPD_DzwDm46&8y@M&Vjk+sJr#;aPy3sq6^&5B;Z#TL`B;XFUcf~=Bi&kt&L zHf!iLTH&7cY}TH`sBBe8JeMC9(usCfEu`&Pvo9!~ajztSgy3 zK0t)l0Ce~H>_fzO8?~E>vwy~j32Wb;xTfISFKcS(6M6`|W()ORP#O1=C&;|yG0Llx zVx9%vl>`YUUIOfzo3{p75?FF1DGswP@>F$^BwmajEZPr_oY8}~e3&LpVt$f5N%6u$ zs!EFQi0AnF-ajm!Drn5XHE3#8@+HMntXjNmNGuo~0-fy~w}4lw4vQm(ldl3sALAo@ zDzMKOPIpo~%`w4|4_M;{raLU>n%& z&1e5+d$d21+U!eqZ^*S(F{UbMfzuRGb@ z_t@09zV1z(8DFAvOZOw4L<^G%s|0G23Ex8Ny&3(ywc@5X%~;(OZD38SV{PrVj3ZSKr;$CIqLf76D}4BOPdxsPq=WL@1x7e4#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@-67= +#include +#include + +char *Dummy = 0; +#define DUMMYSIZE 5000 + +char firstFName[] = "dabbs:include/first.i"; + +ULONG sn, snrcoded = 0, snrrotverdi = 0x56CA34bf; + +void CleanUp (void) +{ + if (Dummy) + { + FreeMem (Dummy, DUMMYSIZE); + Dummy = 0; + } + exit (0); +} + +void Generate (void) +{ + ULONG i; + + snrcoded = sn; + + for (i = 0; i < 5000; i++) + snrcoded += ((i + snrrotverdi) * sn); +} + +BOOL GetDateTime (UBYTE *Date, UBYTE *Time, BOOL mode) +{ + struct ClockData cd; + struct Library *TimerBase; + struct Library *UtilityBase; + struct timerequest tr; + struct timeval tv; + BOOL ret = FALSE; + char Tmp[5]; + char Hold[5]; + + + if (UtilityBase = OpenLibrary ("utility.library", 37)) + { + if (!(OpenDevice ("timer.device", UNIT_VBLANK, (struct IORequest *)&tr, NULL))) + { + TimerBase = (struct Library *)tr.tr_node.io_Device; + GetSysTime (&tv); + Amiga2Date (tv.tv_secs,&cd); + + if (mode) // 1999 + sprintf (Hold, "%ld", cd.year); + else // 99 + { + sprintf (Tmp, "%ld", cd.year); + strncpy (Hold, &Tmp[2], 2); + Hold[2] = 0; + } + sprintf (Date, "%02ld.%02ld.%s", cd.mday, cd.month, Hold); + sprintf (Time, "%02ld:%02ld:%02ld", cd.hour, cd.min, cd.sec); + ret = TRUE; + CloseDevice((struct IORequest *)&tr); + } + CloseLibrary (UtilityBase); + } + return (ret); +} + +main (int argc, char **argv) +{ + char Hold[100], Date[30], Version[100]; + BPTR fh; + + if (argc != 3) + exit (0); + + sn = atoi (argv[1]); + strcpy (Version, argv[2]); + if (sn >= 0) + { + if (Dummy = AllocMem (DUMMYSIZE, MEMF_CLEAR)) + { + GetDateTime (Date, Dummy, 1); + Generate (); + strcpy (Dummy, "\tIFND FIRST_I\nFIRST_I SET 1\n\n;DEMO = 1\n\n"); + sprintf (Hold, "sn\t\tEQU\t%ld\nsnrcoded\tEQU\t%ld\nsnrrotverdi\tEQU\t$%lx\n\n", sn, snrcoded, snrrotverdi); + strcat (Dummy, Hold); + sprintf (Hold, "date\tMACRO\n\tdc.b\t' - %s'\n\tENDM\n\n", Date); + strcat (Dummy, Hold); + strcat (Dummy, "VERSION\t\tEQU 1 ; Brukes i Snapshot\n"); + strcat (Dummy, "REVISION\tEQU 1\n\n"); + sprintf (Hold, "version\tMACRO\n\tdc.b\t'v%s'\n", Version); + strcat (Dummy, Hold); + strcat (Dummy, "\tIFD DEMO\n\tdc.b\t' (demo)'\n\tENDC\n\tENDM\n\n"); + strcat (Dummy, "\tENDC\t; FIRST_I\n"); + if (fh = Open (firstFName, MODE_NEWFILE)) + { + Write (fh, Dummy, strlen (Dummy)); + Close (fh); + } + else + printf ("\n Error opening file: '%s'!\n\n", firstFName); + } + else + printf ("\n Error allocating %ld bytes!\n\n", DUMMYSIZE); + } + else + printf ("\n ABBS serial number must be higher than -1!\n\n"); + CleanUp (); +} diff --git a/JEO/JEO.c b/JEO/JEO.c new file mode 100644 index 0000000..d4728ba --- /dev/null +++ b/JEO/JEO.c @@ -0,0 +1,54 @@ +;/* +sc JEO.c Data=FARONLY cpu=000 param=register Autoregister AbsFuncPointer NoStackCheck optimize +copy JEO.c -J:JEO.c +copy JEO.c dabbs:JEO/ +copy JEO.o dabbs:JEO/ +quit +*/ + +#include +#include +#include +#include + +//#include +//#include +//#include +//#include +//#include + +#include +#include +//#include + +#include +#include +#include + +#define a4a5 register __a4 struct ramblocks *nodebase,register __a5 struct Mainmemory *mainmeory +#define usea4a5 nodebase,mainmeory + +extern far struct DosLibrary *DOSBase; +extern __asm far writetexto (register __a0 char *text,a4a5); + +UBYTE Dummy[1000]; + +__asm VOID Test (a4a5) +{ + ULONG i; + + for (i = 0; i < 100; i++) + { + sprintf (Dummy, "mFatman er en dritt!! HEHE\n", i); + writetexto (Dummy, usea4a5); + Delay (2); + } +} + +__asm VOID Bug (register __d0 int d0, register __d1 int d1, register __d2 d2, + register __d3 int d3, register __d4 int d4, register __d5 d5, + register __d6 int d6) +{ + printf ("d0 = %ld - %08lx\n", d0); + printf ("d2 = %ld - %08lx\n", d2); +} diff --git a/JEO/Message.c b/JEO/Message.c new file mode 100644 index 0000000..76f1a36 --- /dev/null +++ b/JEO/Message.c @@ -0,0 +1,76 @@ +#include +#include +#include +#include +#include + +struct ABBSmsg msg; + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) + DeleteMsgPort (msg.msg.mn_ReplyPort); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport, (struct Message*)msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + BOOL ret = FALSE; + + if (FindPort (MainPortName)) + { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + ret = TRUE; + else + printf ("PORT ERROR...\n"); + } + else + printf ("ABBS must be running for Usereditor to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +main () +{ + int n; + + if (Setup ()) + { + msg.Command = Main_DeleteConference; + msg.Name = curuser.Name; + msg.Data = (ULONG) &curuser; + msg.arg = 0; + n = HandleMsg (&msg); + + if (n != Error_OK) + EasyRequestArgs (NULL, &saveerrorreq, NULL,NULL); +} diff --git a/JEO/MsgTest.c b/JEO/MsgTest.c new file mode 100644 index 0000000..e7fff04 --- /dev/null +++ b/JEO/MsgTest.c @@ -0,0 +1,80 @@ +// Dette her er utklipp fra FileEditor. Kanskje du skjønner mere; + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; + +BOOL Setup (void) +{ + BOOL ret = FALSE; + + if (FindPort (MainPortName)) + { + if (UtilityBase = OpenLibrary ("utility.library",36)) + { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + { + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) + printf ("Error talking to ABBS\n"); + else + { + config = (struct ConfigRecord *)msg.Data; + ret = TRUE; + } + } + else + printf ("Error creating message port\n"); + } + else + printf ("Error opening utility.library\n"); + } + else + printf ("ABBS must be running for FileEditor to work\n"); + + return (ret); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport, *inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) + { + PutMsg (mainport, (struct Message*)msg); + Permit (); + while (1) + { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *)GetMsg (inport)) + break; + } + ret = inmsg->Error; + } + else + { + Permit (); + ret = Error_NoPort; + } + + return (ret); +} + +main () +{ + struct Fileentry fentry; + + msg.Command = Main_loadfileentry; + msg.UserNr = filedir_number; + msg.arg = file_order; + msg.Data = (ULONG)&fentry; + err = HandleMsg (&msg); + + if (err != Error_OK) + printf ("Error loading fileentry\n"); +} diff --git a/JEO/PackMsgs b/JEO/PackMsgs new file mode 100644 index 0000000000000000000000000000000000000000..0fdb6cfcc7fa7ccc0c364c76b40f18b7915de61c GIT binary patch literal 12120 zcmc(FdvsJ)y61OJPEH+)N+@Dk9f8K}v4}}g)QJ$0o6FLw%7dZ^l~@5gDy^q5Ifq9j zRb3=BX0f;x2nZT`((1LX!PYG0iM&X){1)2b6)tk_J?%NJs=fES`2Y%>iUKX&|> zx`Eukd+&GeF)>Rew^Xc@PYw4xoD)NkKu8>no)3klcxX5yim{xbWIP&~Bvi8y#tbmA zIXBWX`w$UIJ0ZKzXTL*?myxSXoc(u#)?7aCs|d-X8u>!Z zPd>9WkP=^FA+?;q!T166T~K*xCre?J5>1H**aq@dY#>QK6@S~614XX*+g?wGbctys z`BL)91yqp|hvX5i-v2Hi+tU0-rLv!XfntX;}FzB@StFA#?Tehv^(Y7txf-QNjzuDSOPO#+vfA9m# zFxFKo8yZ%|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pjK6*ZnmU&_h z1F@X)96w93CsyH$j-@r%=@`FHAa)w%U-u!xI3SN2&cG_%wT}j|=UVad{MQXuE57r< zD(OJ%PUa4xZO>o}=e)mv@Y3!sqsW^Q#ni&NuXs zs*&|IX6FsiG!P)fq4A{($}hrlrQjmk&hH+ojFw-*GbvVAb6hr!<3WDT>qqnNEj{3K zDfZe*oa+Ic>*e@{6mJP|YI(F(h!4kT9@b73&K$(K`3iwd)?mk24hwz5_XsS9U^yO6 zGgSdkDe!oJ$BlQ~+aUJk5Pp$XWaS*LtjCv( z*4WkdhksUi;!#|R1N1G-Hvm_J*{wGnBbv31=$0n5gQkjWcDtKrdHSrDi89Zp5}Wvy z^WQ{eDv!Fq{_CCm<=cC#pYR<&d%#ZXCw|9|_cM#M|L>0~$nXHf^5(xriE#2?8}V=H z7pD!%@p2J=Xvwb5v}S$0sQoy(5pT+f@Refqos}B?mn^Q-mQ`wKE1X%F|9SCqcpZgB zh3?s+SU9(^P%QKo&Mzq}ys5BoUQtoeO~~;R^W%9&lx_P_XF8pl`e67wTJrXtw_9q# lwA_|qW7L2YMG7G;M_Psi`B}dLJYid0j>5A@efj1q{})=hAAkS= literal 0 HcmV?d00001 diff --git a/JEO/PackMsgs.c b/JEO/PackMsgs.c new file mode 100644 index 0000000..49cfef9 --- /dev/null +++ b/JEO/PackMsgs.c @@ -0,0 +1,418 @@ +;/* +sc5 -j73 -v -O PackMsgs +slink LIB:c.o+"PackMsgs.o" to PackMsgs LIB LIB:sc.lib LIB:reqtools.lib LIB:JEO.lib +Copy PackMsgs ABBS:Utils +Delete PackMsgs.o PackMsgs.info QUIET +quit +*/ + +#include +#include +#include +#include +#include +//#include +//#include + + +#ifdef __SASC +__regargs int _CXBRK(void) { return(0); } /* Disable Lattice CTRL/C handling */ +__regargs int __chkabort(void) { return(0); } /* really */ +#endif + +struct ConfigRecord *config; +char *vers = "\0$VER: PackMsgs v1.01 - 30.10.97"; +char Dummy[1000]; +char Ok[] = "Ok"; +char ConfigFName[] = "ABBS:Config/ConfigFile"; +char string[10]; +int configsize = 0; +char Message[] = "Message"; + +int tot_killed = 0; +int tot_bytes = 0; + +int from_msg, to_msg; + +VOID Slash_to_space (char *S) +{ + while (*S) + { + if (*S == '/') + *S = ' '; + *S++; + } +} + +BOOL Check_if_any_killed (char *Buf, int size) +{ + int i; + struct MessageRecord mr; + + for (i = 0; i < size; i += sizeof (struct MessageRecord)) + { + CopyMem (&Buf[i], &mr, sizeof (struct MessageRecord)); + if (!(mr.MsgStatus & MSTATF_Diskkilled)) // Ikke killa fra før + { + if (mr.MsgStatus & MSTATF_KilledByAuthor) + return (TRUE); + else if (mr.MsgStatus & MSTATF_KilledBySysop) + return (TRUE); + else if (mr.MsgStatus & MSTATF_KilledBySigop) + return (TRUE); + else if (mr.MsgStatus & MSTATF_Moved) + return (TRUE); + else if (mr.MsgStatus & MSTATF_Dontshow) + return (TRUE); + } + } + return (FALSE); +} + +VOID Err_no_mem (int size) +{ + printf ("\n Error allocating memory (%ld bytes)!\n\n", size); +} + +VOID Err_opening_file (char *Filename) +{ + printf ("\n Error opening file '%s'!\n\n", Filename); +} + +VOID Err_reading_file (char *Filename) +{ + printf ("\n Error reading from file '%s'!\n\n", Filename); +} + +VOID Err_writing_file (char *Filename) +{ + printf ("\n Error writing to file '%s'!\n\n", Filename); +} + +BOOL SaveConfigfile (VOID) +{ + BPTR file; + + printf (" Saving configfile...\n"); + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + Seek (file, 10, OFFSET_BEGINNING); + if (Write (file, ((APTR) (((ULONG) config) + sizeof (string))), (configsize-sizeof (string)))) + { + Close (file); + return (TRUE); + } + } + return (FALSE); +} + +VOID PackMessages (int nr, BOOL mode) +{ + char H_name[108], M_name[108]; + char Temp_h[] = "ABBS_P:ABBS_conf_temp.h"; + char Temp_m[] = "ABBS_P:ABBS_conf_temp.m"; + char Hold[81]; + BPTR fh_h, fh_m = 0, fh_temp_h = 0, fh_temp_m = 0; + int i, size, n; + struct MessageRecord mr; + int killed = 0; + int bytes = 0; + BOOL kill, ret; + int offset; + char *H_buffer, *M_buffer; + BOOL first; + + strcpy (Hold, config->firstconference[nr].n_ConfName); + Slash_to_space (Hold); + sprintf (H_name, "ABBS:Conferences/%s.h", Hold); + sprintf (M_name, "ABBS:Conferences/%s.m", Hold); + + ret = TRUE; + if (fh_h = Open (H_name, MODE_OLDFILE)) + { + if (fh_m = Open (M_name, MODE_OLDFILE)) + { + if (fh_temp_h = Open (Temp_h, MODE_NEWFILE)) + { + if (!(fh_temp_m = Open (Temp_m, MODE_NEWFILE))) + { + Err_opening_file (Temp_m); + ret = FALSE; + } + } + else + { + Err_opening_file (Temp_h); + ret = FALSE; + } + } + else + { + Err_opening_file (M_name); + ret = FALSE; + } + } + else + { + Err_opening_file (H_name); + ret = FALSE; + } + + if (ret) + { + if ((size = FileSize (H_name)) > 0) + { + if (H_buffer = AllocMem (size, MEMF_CLEAR)) + { + n = Read (fh_h, H_buffer, size); + if (n == size) + { + if ((Check_if_any_killed (H_buffer, size)) OR (mode)) // Noen killa i den konfen??? + { + printf ("\n\n ********************************************************************\n\n", config->firstconference[nr].n_ConfName); + printf (" KILLING MESSAGES IN CONFERENCE '%s'\n", config->firstconference[nr].n_ConfName); + offset = 0; // Start på ny offset + first = FALSE; + for (i = 0; i < size; i += sizeof (struct MessageRecord)) + { + CopyMem (&H_buffer[i], &mr, sizeof (struct MessageRecord)); + kill = FALSE; + if (mr.MsgStatus & MSTATF_KilledByAuthor) + kill = TRUE; + else if (mr.MsgStatus & MSTATF_KilledBySysop) + kill = TRUE; + else if (mr.MsgStatus & MSTATF_KilledBySigop) + kill = TRUE; + else if (mr.MsgStatus & MSTATF_Moved) + kill = TRUE; + else if (mr.MsgStatus & MSTATF_Dontshow) + kill = TRUE; + else if (mr.MsgStatus & MSTATF_Diskkilled) + kill = TRUE; + + if (mode) // Har vi satt på manuell killing? + { + if ((mr.Number <= to_msg) AND (mr.Number >= from_msg)) + kill = TRUE; + } + if (kill) + { + if (!(mr.MsgStatus & MSTATF_Diskkilled)) + { + printf ("%5ld: %s\n", (i / sizeof (struct MessageRecord)) + 1, mr.Subject); + mr.MsgStatus = 0; + mr.MsgStatus |= MSTATF_Dontshow; + mr.MsgStatus |= MSTATF_Diskkilled; + killed++; + tot_killed++; + bytes += mr.NrBytes; + tot_bytes += mr.NrBytes; + mr.TextOffs = 0; + mr.NrBytes = 0; + } + Write (fh_temp_h, &mr, sizeof (struct MessageRecord)); + } + else // IKKE killa (HER MÅ DET LEGGES INN MERE ERRORSJEKKING + { + if (M_buffer = AllocMem (mr.NrBytes, MEMF_CLEAR)) // Da henter vi msg + { + if (!first) + { + config->firstconference[nr].n_ConfFirstMsg = mr.Number; + first = TRUE; + } + Seek (fh_m, mr.TextOffs, OFFSET_BEGINNING); + Read (fh_m, M_buffer, mr.NrBytes); + mr.TextOffs = offset; // offset i den nye tekstfila + Write (fh_temp_m, M_buffer, mr.NrBytes); + FreeMem (M_buffer, mr.NrBytes); + offset += mr.NrBytes; // Vi må lage nye offsets + Write (fh_temp_h, &mr, sizeof (struct MessageRecord)); + } + } + } + } + } + else + Err_reading_file (H_name); + FreeMem (H_buffer, size); + } + else + Err_no_mem (size); + } + else + { + if (size != 0) + printf ("\n Error in file size: %s\n\n", H_name); + } + } + + if (fh_h) + Close (fh_h); + if (fh_m) + Close (fh_m); + if (fh_temp_h) + Close (fh_temp_h); + if (fh_temp_m) + Close (fh_temp_m); + + if (ret AND killed) // Kopiere og slikt etter at filene er stengt! + { + if ((FileSize (Temp_h) >= 0) AND (FileSize (Temp_m) >= 0)) // Virkelig blitt noe? + { + printf ("\n Deleted messages in this conf: %ld (%ld KB)\n", killed, bytes / 1024); + printf (" Totaly deleted messages: %ld (%ld KB)\n", tot_killed, tot_bytes / 1024); + sprintf (Dummy, "C:Copy \"%s\" TO \"%s\"", Temp_h, H_name); + Execute (Dummy, NULL, NULL); + sprintf (Dummy, "C:Copy \"%s\" TO \"%s\"", Temp_m, M_name); + Execute (Dummy, NULL, NULL); + SaveConfigfile (); + } + } + DeleteFile (Temp_h); + DeleteFile (Temp_m); +} + +BOOL Strip_confs (char *Conf) +{ + int n; + BOOL all_flag = FALSE, mode; + BOOL ret = FALSE; + + if (!(stricmp (Conf, "ALL"))) + all_flag = TRUE; + + mode = FALSE; + for (n = 0; n < config->Maxconferences; n++) + { + if (*(config->firstconference[n].n_ConfName)) + { + if (config->firstconference[n].n_ConfDefaultMsg > 0) // For å slette... + { + if (!all_flag) // Kun 1 conf? + { + if (!(stricmp (Conf, config->firstconference[n].n_ConfName))) + { + printf ("\n Force to kill messages from: "); + gets (Dummy); + if (*(Dummy)) + { + from_msg = atoi (Dummy); + if (from_msg < 1 OR from_msg > config->firstconference[n].n_ConfDefaultMsg) + printf ("\n Error: wrong number!\n"); + else + { + printf (" Enter to message (%ld-%ld): ", from_msg, config->firstconference[n].n_ConfDefaultMsg); + gets (Dummy); + if (*(Dummy)) + { + to_msg = atoi (Dummy); + if (to_msg < from_msg OR to_msg > config->firstconference[n].n_ConfDefaultMsg) + printf ("\n Error: wrong number!\n"); + printf ("\n DELETING messages from %ld to %ld...", from_msg, to_msg); + mode = TRUE; + } + } + } + PackMessages (n, mode); + return (TRUE); + } + } + else + { + PackMessages (n, mode); + ret = TRUE; + } + } + } + } + return (ret); +} + +VOID main (int argc, char **argv) +{ + BPTR file; + int n; + BOOL ret; + + if (FindPort ("ABBS mainport")) + { + JEOEasyRequest (NULL, Message, "Please close ABBS!", Ok, NULL); + exit (0); + } + + if (argc != 2) + { + printf ("\n Usage: PackMsgs ALL/\n\n"); + exit (0); + } + + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + n = Read (file, string, sizeof (string)); + if (n == sizeof (string)) + configsize = ((struct ConfigRecord *) &string)->Configsize; + else + Err_reading_file (ConfigFName); + if (configsize && (config = AllocVec (configsize,NULL))) + { + memcpy (config,string,sizeof (string)); + + if ((configsize-sizeof (string)) == Read (file, + ((APTR) (((ULONG) config) + sizeof (string))), + (configsize-sizeof (string)))) + { + Close (file); + file = NULL; + ret = Strip_confs (argv[1]); + } + else + Err_reading_file (ConfigFName); + if (file) + Close (file); + } + else + Err_no_mem (configsize); + } + else + Err_opening_file (ConfigFName); + + FreeVec (config); + if (ret) + printf ("\n Done!\n\n"); + else + printf ("\n Error: Cant't find conference '%s'\n\n", argv[1]); +} + +/* +struct MessageRecord { + ULONG Number; // Message Number + UBYTE MsgStatus; // Message Status + UBYTE Security; // Message security + ULONG MsgFrom; // user number + ULONG MsgTo; // Ditto (-1=ALL) + NameT Subject; // subject of message + UBYTE MsgBits; // Misc bits + struct DateStamp MsgTimeStamp; // time entered + ULONG RefTo; // refers to + ULONG RefBy; // first answer + ULONG RefNxt; // next in this thread + WORD NrLines; // number of lines, negative if net names in message body + UWORD NrBytes; // number of bytes + ULONG TextOffs; // offset in text file +}; + +#define MSTATF_NormalMsg (1L<<0) +#define MSTATF_KilledByAuthor (1L<<1) +#define MSTATF_KilledBySysop (1L<<2) +#define MSTATF_KilledBySigop (1L<<3) +#define MSTATF_Moved (1L<<4) +#define MSTATF_MsgRead (1L<<6) // read by receiver +#define MSTATF_Dontshow (1L<<7) + +#define SECF_SecNone (1L<<0) +#define SECF_SecPassword (1L<<1) +#define SECF_SecReceiver (1L<<2) + +#define MsgBitsF_FromNet (1L<<0) +*/ diff --git a/JEO/ShowConfig b/JEO/ShowConfig new file mode 100644 index 0000000000000000000000000000000000000000..c6cd236905989601940ca5ed53510ac6fa52ac69 GIT binary patch literal 41416 zcmeIbdwg5fnKrt%EX%SZJBs5tj&s`)#yHN!#<`HDl*;lYvg6psc7nM~CB?c}M3#hP zn}nv+4oL_!Z4IRqIxWM@F#RY^+myp}D8okshiRc7?Fp1&D8m7UhCsjx5*Sp^JzU#JkyoD(GgD@_K8EQh5tq?-{cOi;?56pvG z3wE@&w+FWDXueodHQ;v}aUoV#G1SC8?-=PjdrqOUk$Pue|3+EQZ z9FOLNekqEq4m;`}zx=6lXIJ*QPOa>9JXxRCs`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+owuLqP~3DmaX}Vo>P2mbhcqmcl!`LSpski~eMRyp z=tf7{tk>40gLcJwjIUcEfxh2uVp2NOUi*Pbo$+IN(AiLd2465k0&RHM#8kgD zbXjQElu45}_nSz{%K@{6c4z?eESXe)v+9dy4Z{ZA+%Mw?;}1X7h?uB*lxez#DPs_6 zwqLb%_N8G9>((J!MVV=j@+C&o7r@iDg|kM!Z7X$1Q(vlI%t#vcgJFZmnf4cac^K(p zx^7orsJ&wluas_Y8|oVXDjKfE5A50Y7s^cgw*2WR(zuG=#!b8ZHo|-P>ci$Xxe#vR zGL@T4`96dN8hH|y#ic(>-$9aN0>=z#r$~EAV$A_+oLJ%3t*e2Tl_-Qk@9b;8eVO>Q zytEIv41#^~a(uwWe4Ud0e}Aoq-Q9~WQY4vTy!_lb{8q^IIU+Tk1SRH_e?x>xT-sf; zu^KtFo`himQv4RTdY|FD_nEUS2*QAufkW&wyMVll=X!F2`N}RqlT`ujnKw zOATu6HR$6R-1i|(yKl$s$Gr(R^eitYeqn=@&w(*OgO6(*A8=Xgl)gc{0Ee_(gL5vz zi{Z>CJ$=2e*H~+~P8(@+yDGFhWLoYo5i>4hF2V$gM|MDDKa=N9J`O+~lwS*Rn<me zgo9&ek$i4$ZLTrMOUyX6;}JhD*D3svcN(h#>~pk3W;%*jA(58-hq?-zd(_1~l=ah) z4Jk{O$a3~NLhhf*cf{mF8(ERYmTES>8{!P{m^pzrmgK1esDz7s=Lq5PK3*uoRpORu p>)1nRGe{Si?>@-`2c(-N2K&Jgj)`geWjX7VLpY8hjjQPG{|A=eX955K literal 0 HcmV?d00001 diff --git a/JEO/ShowConfig.c b/JEO/ShowConfig.c new file mode 100644 index 0000000..3d2aa98 --- /dev/null +++ b/JEO/ShowConfig.c @@ -0,0 +1,352 @@ +;/* +sc5 -j73 -d4 -v ShowConfig +copy ShowConfig.c -J:ShowConfig.c +slink LIB:c.o+"ShowConfig.o" to ShowConfig LIB LIB:sc.lib LIB:JEO.lib ADDSYM +quit +*/ + +#include +#include +#include +#include +#include +#include + +void typeconfig (struct ConfigRecord *config); + +struct ConfigRecord *config; +struct UserRecord *users; + +char *vers = "\0$VER: FixConferences v1.00 - 02.10.97"; + +BOOL ShowUserfile (VOID); +char UserFName[] = "ABBS:Config/UserFile"; +char ConfigFName[] = "ABBS:Config/ConfigFile"; +char string[10]; +int configsize = 0; +WORD JEO[501]; + +BOOL SaveConfigfile (struct ConfigRecord *config) +{ + BPTR file = 0; + + printf (" Saving configfile...\n"); + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + Seek (file, 10, OFFSET_BEGINNING); + if (Write (file, ((APTR) (((ULONG) config) + sizeof (string))), (configsize-sizeof (string)))) + { + Close (file); + file = NULL; + return (TRUE); + } + } + return (FALSE); +} + +VOID __stdargs __main (char *Line) +{ + BPTR file = NULL; + ULONG ret = 10; + int n; + int usersize = 0; + + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + n = Read (file, string, sizeof (string)); + if (n == sizeof (string)) + configsize = ((struct ConfigRecord *) &string)->Configsize; + else + printf ("\n Error reading file %s!\n\n", ConfigFName); + if (configsize && (config = AllocVec (configsize,NULL))) + { + memcpy (config,string,sizeof (string)); + + if ((configsize-sizeof (string)) == Read (file, + ((APTR) (((ULONG) config) + sizeof (string))), + (configsize-sizeof (string)))) + { + Close (file); + file = NULL; + typeconfig (config); + ret = 0; + } + else + printf ("\n Error reading file %s!\n\n", ConfigFName); + if (file) + Close (file); + } + else + printf ("\n Error allocating memory!\n\n"); + } + else + printf ("\n Error opening file %s! \n\n", ConfigFName); + + ShowUserfile (); + FreeVec (config); + return (ret); +} + + +BOOL SaveConfigFile (VOID) +{ + BPTR file = 0; + + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + Seek (file, 10, OFFSET_BEGINNING); + if (Write (file, ((APTR) (((ULONG) config) + sizeof (string))), (configsize-sizeof (string)))) + { + Close (file); + file = NULL; + return (TRUE); + } + } + return (FALSE); +} + +void typeconfig (struct ConfigRecord *config) +{ + int n, i; + struct FileDirRecord *dirarray; + BOOL flag; + + printf ("UWORD Revision = %d\n",config->Revision); + printf ("ULONG Configsize = %d\n",config->Configsize); + printf ("ULONG UserrecordSize = %d\n",config->UserrecordSize); + printf ("UWORD Maxconferences = %d\n",config->Maxconferences); + printf ("UWORD MaxfileDirs = %d\n",config->MaxfileDirs); + printf ("ULONG Users = %d\n",config->Users); + printf ("ULONG MaxUsers = %d\n",config->MaxUsers); + printf ("NameT BaseName = %s\n",config->BaseName); + printf ("NameT SYSOPname = %s\n",config->SYSOPname); + printf ("ULONG SYSOPUsernr = %d\n",config->SYSOPUsernr); + printf ("NPassT SYSOPpassword = %s\n",config->SYSOPpassword); + printf ("NPassT ClosedPassword = %s\n",config->ClosedPassword); + printf ("UWORD MaxLinesMessage = %d\n",config->MaxLinesMessage); + printf ("UWORD ActiveConf = %d\n",config->ActiveConf); + printf ("UWORD ActiveDirs = %d\n",config->ActiveDirs); + printf ("UWORD NewUserTimeLimit = %d\n",config->NewUserTimeLimit); + printf ("UWORD SleepTime = %d\n",config->SleepTime); + printf ("UBYTE DefaultCharSet = %c\n",config->DefaultCharSet); + printf ("UBYTE Cflags = $%x\n",config->Cflags); + printf ("UWORD NewUserFileLimit = %d\n",config->NewUserFileLimit); + printf ("UWORD ByteRatiov = %d\n",config->ByteRatiov); + printf ("UWORD FileRatiov = %d\n",config->FileRatiov); + printf ("UWORD MinULSpace = %d\n",config->MinULSpace); + printf ("UBYTE Cflags2 = $%x\n",config->Cflags2); + printf ("UBYTE pad_a123 = %d\n",config->pad_a123); + printf ("NPassT dosPassword = %s\n",config->dosPassword); + + for (n = 0; n < config->Maxconferences; n++) + { + if (*(config->firstconference[n].n_ConfName)) + { + printf ("\n"); + printf ("%03d:%-20s Or = %3d DM = %5d B = %2d M = %2d, 1st = %2d ", + n,config->firstconference[n].n_ConfName, + config->firstconference[n].n_ConfOrder, + config->firstconference[n].n_ConfDefaultMsg, + config->firstconference[n].n_ConfBullets, + config->firstconference[n].n_ConfMaxScan, + config->firstconference[n].n_ConfFirstMsg); + + if (config->firstconference[n].n_ConfSW & CONFSWF_ImmRead) + printf ("R"); + if (config->firstconference[n].n_ConfSW & CONFSWF_ImmWrite) + printf ("W"); + if (config->firstconference[n].n_ConfSW & CONFSWF_PostBox) + printf ("A"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Private) + printf ("P"); + if (config->firstconference[n].n_ConfSW & CONFSWF_VIP) + printf ("V"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Resign) + printf ("E"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Network) + printf ("N"); + if (config->firstconference[n].n_ConfSW & CONFSWF_Alias) + printf ("?"); + } + } + + dirarray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (config->Maxconferences * sizeof (struct ConferenceRecord))); + +// FixConferences +/* + + if (FindPort (MainPortName)) + { + printf (" \nABBS must be down for FixConferences to work!\n\n"); + return; + } + + flag = FALSE; + for (n = 1; n <= config->Maxconferences; n++) + JEO[n] = OFF; + for (n = 0; n < config->Maxconferences; n++) + { + if (config->firstconference[n].n_ConfOrder == 0) + { + flag = TRUE; + printf ("\nError in '%s'\n", config->firstconference[n].n_ConfName); + for (i = 1; i <= config->Maxconferences; i++) + { + if (JEO[i] == OFF) + { + printf ("Next missing order are %ld\nFixing it...\n", i); + config->firstconference[n].n_ConfOrder = i; + JEO[i] = ON; + break; + } + } + } + else + JEO[config->firstconference[n].n_ConfOrder] = ON; + } + printf ("\n"); + if (flag) + SaveConfigFile (); + else + printf (" Conferences ok!\n\n"); + + dirarray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (config->Maxconferences * sizeof (struct ConferenceRecord))); + + printf ("dirarray = %ld\n", *dirarray); + + for (n = 0; n < config->MaxfileDirs; n++) + { + JEO[dirarray[n].n_FileOrder]++; + if (dirarray[n].n_FileOrder == 0) + { + printf ("\nError: in file order!!\n"); + printf ("Dir %d = %-20s\tOr = %3d\tpath = %-20s\n", n, dirarray[n].n_DirName, dirarray[n].n_FileOrder, dirarray[n].n_DirPaths); + + for (i = 1; i <= config->MaxfileDirs; i++) + { + if (JEO[i] != 1) + { + printf ("Missing number are %ld\nFixing it...\n\n", i); + dirarray[n].n_FileOrder = i; + break; + } + } + } + } + SaveConfigFile (); +*/ +} + + +VOID ShowUser (struct UserRecord *user, UWORD nr) +{ + int n; + BOOL flag = FALSE; + + printf ("******************************************************************\n"); +// user->pass_10 = olduser->pass_10; + printf ("(%ld) Usernr = %ld\n", nr, user->Usernr); + printf ("Name: %s\n", user->Name); +// printf ("Address: %s\n", user->Address); +// printf ("State: %s\n", user->CityState); +// printf ("HomeTelno: %s\n", user->HomeTelno); +// printf ("WorkTelno: %s\n", user->WorkTelno); +// user->pass_11 = olduser->pass_11; +// printf ("TimeLimit: %ld\n", user->TimeLimit); +// printf ("FileLimit: %ld\n", user->FileLimit); +// printf ("PageLength: %ld\n", user->PageLength); +// printf ("Protocol = user->Protocol); +// printf ("Charset = user->Charset; +// printf ("ScratchFormat = user->ScratchFormat; +// printf ("XpertLevel = user->XpertLevel; + + if (user->Userbits & USERF_Killed) + printf ("Killed!\n"); + + printf ("Userbits: $%lx\n", user->Userbits); +// strncpy (printf ("UserScript,user->UserScript,Sizeof_loginscript); +// user->ResymeMsgNr = oldprintf ("ResymeMsgNr; +// user->MessageFilterV = oldprintf ("MessageFilterV; +// user->GrabFormat = oldprintf ("GrabFormat; +// user->u_ByteRatiov = oldprintf ("u_ByteRatiov; +// user->u_FileRatiov = oldprintf ("u_FileRatiov; +// user->Uploaded = oldprintf ("Uploaded; +// user->Downloaded = oldprintf ("Downloaded; +// user->KbUploaded = oldprintf ("KbUploaded; +// user->KbDownloaded = oldprintf ("KbDownloaded; +// printf ("Times on: %ld\n", user->TimesOn); +// memcpy (&user->LastAccess,&user->LastAccess,sizeof (struct DateStamp)); +// printf ("TimeUsed = user->TimeUsed; +// printf ("MsgsLeft = user->MsgsLeft; +// printf ("MsgsRead = user->MsgsRead; +// printf ("Totaltime = user->Totaltime; +// printf ("NFday = user->NFday; +// printf ("FTimeUsed = user->FTimeUsed; +// printf ("Savebits = user->Savebits; +// printf ("MsgaGrab = user->MsgaGrab; + + printf ("\n"); + for (n = 0; n < config->Maxconferences; n++) + { + if (*(config->firstconference[n].n_ConfName)) + { + if ((user->firstuserconf[n].uc_Access & ACCF_Invited)) + { + printf ("\n"); + printf ("%-30s LastRead: %5ld ", config->firstconference[n].n_ConfName, user->firstuserconf[n].uc_LastRead); + + if (user->firstuserconf[n].uc_Access & ACCF_Read) + printf ("R"); + if (user->firstuserconf[n].uc_Access & ACCF_Write) + printf ("W"); + if (user->firstuserconf[n].uc_Access & ACCF_Upload) + printf ("U"); + if (user->firstuserconf[n].uc_Access & ACCF_Download) + printf ("D"); + if (user->firstuserconf[n].uc_Access & ACCF_FileVIP) + printf ("F"); + if (user->firstuserconf[n].uc_Access & ACCF_Invited) + printf ("I"); + if (user->firstuserconf[n].uc_Access & ACCF_Sigop) + printf ("S"); + if (user->firstuserconf[n].uc_Access & ACCF_Sysop) + printf ("Z"); + } + } + } + printf ("\n"); +} + +BOOL ShowUserfile (VOID) +{ + int n, i; + BPTR in; + struct UserRecord *user; + BOOL ret = FALSE; + + printf ("\n\nUserRecord: %ld\n", config->UserrecordSize); + printf ("MaxUsers: %ld\n\n", config->MaxUsers); + if (user = AllocMem (config->UserrecordSize * config->MaxUsers, MEMF_CLEAR)) + { + if (in = Open (UserFName, MODE_OLDFILE)) + { + for (i = 0; i < config->MaxUsers; i++) + { + n = Read (in, user, config->UserrecordSize); + ShowUser (user, i); + } + Close (in); + } + else + printf ("\n Error opening file '%s'!\n\n", UserFName); + FreeMem (user, config->UserrecordSize * config->MaxUsers); + } + else + printf ("\n Error allocating memory (%d bytes)!\n\n", config->UserrecordSize); + + return (ret); +} diff --git a/JEO/ShowConfig.info b/JEO/ShowConfig.info new file mode 100644 index 0000000000000000000000000000000000000000..7797cd9b8f38555ca944dea836aaf404ec81aca0 GIT binary patch literal 835 zcmZ{hJxfAS7{{O6wJVCKIh2No(j6Kd9IBy&0=)$iM7u80U?3GPfgY(Pa?m^V0U8<{ z@*6nyvPFFXNpW^85N^-Q6&>oJ{?GZHKhM>lgD_}7YYUbk11n&F4w^TRd-Mj*-uY(! zL(^Bi{_U*SzqhWC(|fiGN#190(gNror~2#)!tS2)8~7YDBr8$LUXfF4s3_fQP%KNv zn%q~<%%RkM;&Zgz=QLt&>ODDM@EkCX{>eMxfm_9W$+|;p3>;1$Y|F%#f(P63*j5tW z%+`--XOV}#gzwx4uVE8;-m#as?+nkmU*8;ZKM|CE?mEJ}J@PP5O?)!HDRbH#nV;%N z-|D#hQuta`_->WvD41KW^UqgtKK%{T4kkLM|BIYcRuYoED^9I3kc1OA<8rTFBum{M zZWNGnN+YHu`GI&w=giUhpNY^uz?J3mAo>f;_cIVWC=n>O;i zb1&TK3$Jf5w-P}g_sKc++auwriS#XW&K#Z7d~(juMd!@XIdO7MoSdhj&SJ;(g%|ga J3kS6E`~v29xc~qF literal 0 HcmV?d00001 diff --git a/JEO/Showuserfile b/JEO/Showuserfile new file mode 100644 index 0000000000000000000000000000000000000000..b104d0d3ab916be8f9dd345fab6a72bc61f923aa GIT binary patch literal 8348 zcmc&(e{d9amVe#p%rwI!bi$Y$0rhJ;&L%_1j3ENYTHeegz|h1=oPZb9^*S25fegvq zn6NIDV|yS$(C9_>^z_bitt)HGAJLtqD2t;kHf&K_(POs)%X!&7N?ez05Lu-#XK`#~ z?(^-LA-L<+-hbOk_xIO(@B6;*z3+SP`yHZ^&nf?ig;F4LK8X6i6P0|->#?bwSA8)b zt^FSkQTrH4YfuyW)5PxL9lGd0dhb|nrlv(aSQ8fq{M~|wEv6CEJ-L^KSv56G?$sS^ z-tZf=Qk}Qoa%6yI)kMT>c0^d;xt`Su>m8Qe7ZyjbAB7I2ydm(`f>s^EyI!O)QQg5bkXzTG3^bkg=i=1qLCA0C&tvxr2OLD zU%bo2G*#YMvsOGbo_WX;!;nB&9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TH${8y?~tOJh%#0CuawHBwoY$x>H}o68!?VS6EPeG)PPJy!Rd9`~s^ryC*59iSGto z`WHwR96n&)jI4sodjX`qCpnEZuS>ClTz6l=qFfVeiwSk!4kh=W{8Gh_55B9JF`^}?!gL8vr*tPKVzxU$z4BTi#uATx1 z&iJz&`erZe*rPcO+!<6`JOY3xDd?;tvpsDd$!u#)?>Lg_F2`-?DeTmcOvn-LPA^+6 zV5}kS=A}Kl=h`Ua{!a*QtFp^Gk{lOzw0T_I@0aF(0|>$t;{S$Uaqt@lKNq8R0Uv?a zh;D-UBA(gp(p^NQLwIpXP^zQPgV%)@Pst^`=TZ5--6ZiKV0`%f_F}&6dLCp3h~}Nn zw-sI#=CFH;bzaWCtoT&(r`VV+W6D>bfoo5pKVv__*F1TEUG^h>&BMo;&Dx*+BSUU4 zLo7S~6eq%qe+uINGcH~SWbt}gE{AV9{;qrMJ_#|^e#(}Czf*tE*IWb-cJ%f31RqKE zJi00P?T#(D#kGG4U3o_+i2tSaq2P*85PhX{OAAjG9%q%aw5(LA5XI7krKMtNRq4%@ zrKR&rOBa=umCZ+qM=Zeef>X6^7xLndh*FqFWf5L4UT&}W83K3RIPn)=*qU%TFI%A< LWh?selwA5>)Xki; literal 0 HcmV?d00001 diff --git a/JEO/Showuserfile.c b/JEO/Showuserfile.c new file mode 100644 index 0000000..e35f73c --- /dev/null +++ b/JEO/Showuserfile.c @@ -0,0 +1,88 @@ +#include + +#include + +#include +#include + +#include +#include + +int main(int argc, char **argv); +static int dsdiff (struct DateStamp *first, struct DateStamp *last); + +#ifdef __SASC +__regargs int _CXBRK(void) { return(0); } /* Disable Lattice CTRL/C handling */ +__regargs int __chkabort(void) { return(0); } /* really */ +#endif + +struct UserRecord *user = NULL; + +#define TEMPLATE "config/A,userfile/A" +#define OPT_COUNT 2 + +char *vers = "\0$VER: ShowUserfile v0.1"; + +int main(int argc, char **argv) +{ + BPTR file = NULL; + int ret = 10,n; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0,0}; + struct DateStamp now; + int usersize = 0; + char string[80]; + + DateStamp (&now); + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (file = Open ((char *) result[0],MODE_OLDFILE)) { + n = Read (file,string,sizeof (string)); + if (n == sizeof (string)) + usersize = ((struct ConfigRecord *) &string)->UserrecordSize; + Close (file); + file = NULL; + } + if (usersize) { + if (!(user = AllocVec (usersize,NULL))) + printf ("Error allocating memory\n"); + } else + printf ("Error reading file %s\n",(char *) result[0]); + + if (user && (file = Open ((char *) result[1],MODE_OLDFILE))) { + while (TRUE) { + n = Read (file,user,usersize); + if (n == 0) { + ret = 0; + break; + } else + if (usersize== n) + { +// if ((user->LastAccess.ds_Days + 30) > now.ds_Days) + printf ("%06d\t%d\t%s\n",user->Usernr, user->firstuserconf[0].uc_LastRead,user->Name); + } else + break; + + if (SIGBREAKF_CTRL_C & SetSignal(0L,0L)) + break; + } + + Close (file); + file = NULL; + } else + printf ("Error opening file %s\n",(char *) result[0]); + if (user) + FreeVec (user); + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +static int dsdiff (struct DateStamp *first, struct DateStamp *last) +{ + return (((((last->ds_Days - first->ds_Days) * 24 * 60) + + (last->ds_Minute - first->ds_Minute)) * 60) + + (last->ds_Tick - first->ds_Tick)/TICKS_PER_SECOND); +} diff --git a/JEO/SortFiles b/JEO/SortFiles new file mode 100644 index 0000000000000000000000000000000000000000..13da76836985dc6002eeb0ed2f5c75840eb32f64 GIT binary patch literal 12088 zcmc(Fe{d5=p6_?Y!nhuJSxS*JT?zfxs=0_gypD^>ka{`R*&-Tm!ve|v}u{*}yMK`s`FY!^uwUP>gKCo1?Y ze-B^UcH0$p(aJw?D(_~J9z;q!nkKdkbbeKI4?lEb{8mMSe7zzno^W>xPPUK+6ZX+v zEWpaCdUTg6vl#=gQjIcWZ${37O{O9!UmY40`dZd7uh1uFjJ$w&Rar&?3DMWbYa*Eh zi6s>QaV%ddUmZa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|AYGpZZUU#d6{I%e^kk$>Y>Bpci5UitC=#ofptv?)%- z(WmgO;TSjz2>7|a#G?=a@5L&_4G>L-tJ!uL;W6aP2qMvp2*MhKDui<6IT36K_!V43 zz@9U_G?%`D%ps$Qq@@k*#)o<}wZ?~Nelz0VSs4VYTf4gA2{T;`xm@7A;61Z$3FeZc zp6J_FU(YMU9QaeZGRz6{=a2Vv zr~Jm}m;Ud^H(>0D@Y!I^y_J6aFRrTeFRk<=uW)){?pKPRrPNYbROpx~iiL9u3&q0H z!g(cyg|i9^=N1(e%|eWyn4{+r=PGXD&%g8&U;ay_|IspIolG~Wg^R#r1mPgwF()aE jP=^pez`Tc+;BH}fadQD{hRZ27qs~!;4D#_Sxc2`6%+GRL literal 0 HcmV?d00001 diff --git a/JEO/SortFiles.c b/JEO/SortFiles.c new file mode 100644 index 0000000..13711a1 --- /dev/null +++ b/JEO/SortFiles.c @@ -0,0 +1,382 @@ +;/* +sc5 -j73 -v -O SortFiles +copy SortFiles.c -J:SortFiles.c +slink LIB:c.o+"SortFiles.o" to SortFiles LIB LIB:sc.lib LIB:reqtools.lib LIB:JEO.lib +Copy SortFiles ABBS:Utils +quit +*/ + +#include +#include +#include +#include +#include +#include +#include + +VOID SortConfs (VOID); +VOID SortDirs (VOID); +BOOL Do_files (VOID); + +struct ReqToolsBase *ReqToolsBase = 0; +struct ConfigRecord *config; + +char *vers = "\0$VER: SortFiles v1.03 - 21.08.98"; +char Dummy[1000]; +char Ok[] = "Ok"; +char ConfigFName[] = "ABBS:Config/ConfigFile"; +char string[10]; +int configsize = 0; +char Message[] = "Message"; + +#define MAX_FILES 5000 +struct Fileentry far fl_all[MAX_FILES]; +int max_files; + +VOID main (VOID) +{ + BPTR file = NULL; + int n; + + if (FindPort ("ABBS mainport")) + { + JEOEasyRequest (NULL, Message, "Please close ABBS!", Ok, NULL); + exit (0); + } + + if (!(ReqToolsBase = (struct ReqToolsBase *)OpenLibrary ("reqtools.library", REQTOOLSVERSION))) + { + sprintf (Dummy, "SortFiles needs '%s' v%ld +", REQTOOLSNAME, REQTOOLSVERSION); + JEOEasyRequest (NULL, Message, Dummy, Ok, NULL); + Exit (0); + } + + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + n = Read (file, string, sizeof (string)); + if (n == sizeof (string)) + configsize = ((struct ConfigRecord *) &string)->Configsize; + else + printf ("\n Error reading file %s!\n\n", ConfigFName); + if (configsize && (config = AllocVec (configsize,NULL))) + { + memcpy (config,string,sizeof (string)); + + if ((configsize-sizeof (string)) == Read (file, + ((APTR) (((ULONG) config) + sizeof (string))), + (configsize-sizeof (string)))) + { + Close (file); + file = NULL; +// if (JEOReqRequest (Message, "Want to sort conferences?", "Yes|No")) +// SortConfs (); + if (JEOReqRequest (Message, "Want to sort directories?", "Yes|No")) + SortDirs (); + if (!Do_files ()) + printf ("\n Error sorting files!\n\n"); + } + else + printf ("\n Error reading file %s!\n\n", ConfigFName); + if (file) + Close (file); + } + else + printf ("\n Error allocating memory!\n\n"); + } + else + printf ("\n Error opening file %s! \n\n", ConfigFName); + + FreeVec (config); + printf ("\n Done!\n\n"); + if (ReqToolsBase) + CloseLibrary ((struct Library *)ReqToolsBase); +} + +BOOL SaveConfigfile (struct ConfigRecord *config) +{ + BPTR file = 0; + + printf (" Saving configfile...\n"); + if (file = Open (ConfigFName, MODE_OLDFILE)) + { + Seek (file, 10, OFFSET_BEGINNING); + if (Write (file, ((APTR) (((ULONG) config) + sizeof (string))), (configsize-sizeof (string)))) + { + Close (file); + file = NULL; + return (TRUE); + } + } + return (FALSE); +} + +VOID SortDirs (VOID) +{ + int n; + BOOL save_flag = OFF; + struct FileDirRecord *dirarray, temp; + int gap, i, j; + + dirarray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (config->Maxconferences * sizeof (struct ConferenceRecord))); + + printf ("\n Sorting directories...\n"); + n = config->MaxfileDirs; + for (gap = n / 2; gap > 0; gap /= 2) + { + for (i = gap; i < n; i++) + { + for (j = i - gap; j >= 0 AND (stricmp (dirarray[j].n_DirName, dirarray[j + gap].n_DirName) > 0); j -= gap) + { + if (!(stricmp (dirarray[j].n_DirName, "UPLOAD")) OR (!(stricmp (dirarray[j].n_DirName, "PRIVATE")))) // IKKE sorter + JEOtoupper (dirarray[j].n_DirName); + else + { + save_flag = ON; + CopyMem (&dirarray[j], &temp, sizeof (struct FileDirRecord)); + CopyMem (&dirarray[j + gap], &dirarray[j], sizeof (struct FileDirRecord)); + CopyMem (&temp, &dirarray[j + gap], sizeof (struct FileDirRecord)); + } + } + } + } + for (n = 0; n < config->MaxfileDirs; n++) + dirarray[n].n_FileOrder = n + 1; + if (save_flag) + SaveConfigfile (config); +} + +VOID SortConfs (VOID) +{ + int n; + BOOL save_flag = OFF; + struct ConferenceRecord *confarray, temp; + int gap, i, j; + + confarray = (struct ConferenceRecord *) + (((int) config) + (SIZEOFCONFIGRECORD)); + + printf ("\n Sorting conferences...\n"); + n = config->Maxconferences; + for (gap = n / 2; gap > 0; gap /= 2) + { + for (i = gap; i < n; i++) + { + for (j = i - gap; j >= 0 AND (stricmp (confarray[j].n_ConfName, confarray[j + gap].n_ConfName) > 0); j -= gap) + { +// if (!(stricmp (confarray[j].n_ConfName, "NEWS")) OR (!(stricmp (confarray[j].n_ConfName, "POST")) OR (!(stricmp (confarray[j].n_ConfName, "USERINFO")) OR (!(stricmp (confarray[j].n_ConfName, "FILEINFO")))) // IKKE sorter +// JEOtoupper (confarray[j].n_ConfName); + if (j > 6) // Ikke sorter de første... + { + save_flag = ON; + CopyMem (&confarray[j], &temp, sizeof (struct ConferenceRecord)); + CopyMem (&confarray[j + gap], &confarray[j], sizeof (struct ConferenceRecord)); + CopyMem (&temp, &confarray[j + gap], sizeof (struct ConferenceRecord)); + } + } + } + } + for (n = 0; n < config->Maxconferences; n++) + confarray[n].n_ConfOrder = n + 1; + if (save_flag) + SaveConfigfile (config); +} + +VOID Do_fl_name (char *String) +{ + ULONG i; + + for (i = 0; String[i] != 0; i++) + { + if (String[i] == '/') + String[i] = ' '; + } +} + +#define SORT_NAVN 0 +#define SORT_DATO 1 +#define SORT_DATO_MOTSATT 2 + +BOOL Sort_files (WORD mode) +{ + LONG gap, i, j, n; + struct Fileentry *fl = 0; + BOOL save_flag = OFF; + + fl = AllocMem (sizeof (struct Fileentry), MEMF_CLEAR); + n = max_files; + for (gap = n / 2; gap > 0; gap /= 2) + { + for (i = gap; i < n; i++) + { + if (mode == SORT_NAVN) + { + for (j = i - gap; j >= 0 AND (stricmp (fl_all[j].Filename, fl_all[j + gap].Filename) > 0); j -= gap) + { + save_flag = ON; + CopyMem (&fl_all[j], fl, sizeof (struct Fileentry)); + CopyMem (&fl_all[j + gap], &fl_all[j], sizeof (struct Fileentry)); + CopyMem (fl, &fl_all[j + gap], sizeof (struct Fileentry)); + } + } + else if (mode == SORT_DATO) + { + for (j = i - gap; j >= 0 AND (fl_all[j].ULdate.ds_Days > fl_all[j + gap].ULdate.ds_Days); j -= gap) + { + save_flag = ON; + CopyMem (&fl_all[j], fl, sizeof (struct Fileentry)); + CopyMem (&fl_all[j + gap], &fl_all[j], sizeof (struct Fileentry)); + CopyMem (fl, &fl_all[j + gap], sizeof (struct Fileentry)); + } + } + else + { + for (j = i - gap; j >= 0 AND (fl_all[j].ULdate.ds_Days < fl_all[j + gap].ULdate.ds_Days); j -= gap) + { + save_flag = ON; + CopyMem (&fl_all[j], fl, sizeof (struct Fileentry)); + CopyMem (&fl_all[j + gap], &fl_all[j], sizeof (struct Fileentry)); + CopyMem (fl, &fl_all[j + gap], sizeof (struct Fileentry)); + } + } + } + } + FreeMem (fl, sizeof (struct Fileentry)); + return (save_flag); +} + +#define C_NONE 0 +#define C_FIRST 1 +#define C_ALL 2 + +BOOL Do_files (VOID) +{ + int size; + int n, i, j; + BOOL ret = TRUE; + char *Buffer = 0; + struct Fileentry *temp; + struct FileDirRecord *dirarray; + char Hold[80]; + BPTR fh = 0; + char Filename[108]; + WORD mode, c_mode; + BOOL save_flag = FALSE; + ULONG write; + BOOL backup_flag; + + printf ("\n"); + switch (JEOReqRequest (Message, "Sort files by:", "Name|Date (new last)|Date (new first)|Cancel")) + { + case 1: mode = SORT_NAVN; break; + case 2: mode = SORT_DATO; break; + case 3: mode = SORT_DATO_MOTSATT; break; + case 0: return (TRUE); + } + + switch (JEOReqRequest (Message, "File name:", "No change|Capital first letter|Capital all|Cancel")) + { + case 1: c_mode = C_NONE; break; + case 2: c_mode = C_FIRST; break; + case 3: c_mode = C_ALL; break; + case 0: return (TRUE); + } + + dirarray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (config->Maxconferences * sizeof (struct ConferenceRecord))); + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(dirarray[n].n_DirName)) + { + strcpy (Hold, dirarray[n].n_DirName); + Do_fl_name (Hold); + sprintf (Filename, "ABBS:Fileheaders/%s.fl", Hold); + size = FileSize (Filename); + if (size > 0) + { + if (fh = Open (Filename, MODE_OLDFILE)) + { + if (Buffer = AllocMem (size, MEMF_CLEAR)) + { + if (Read (fh, Buffer, size) == size) + { + Close (fh); + fh = 0; + j = max_files = 0; + for (i = 0; i < size; i += sizeof (struct Fileentry)) + { + temp = (struct Fileentry *)&Buffer[i]; + if (temp->Filename[0] == 0) + continue; + if (temp->Filestatus & FILESTATUSF_Filemoved) + continue; + if (temp->Filestatus & FILESTATUSF_Fileremoved) + continue; + CopyMem (temp, &fl_all[j], sizeof (struct Fileentry)); + switch (c_mode) + { + case C_ALL: JEOtoupper (fl_all[j].Filename); save_flag = TRUE; break; + case C_FIRST: + { + Dummy[0] = fl_all[j].Filename[0]; + Dummy[1] = 0; + JEOtoupper (Dummy); + fl_all[j].Filename[0] = Dummy[0]; + save_flag = TRUE; + break; + } + } + j++; + if (j == MAX_FILES) + { + printf ("\n You have over %ld in a directory, please ask for a upgrade of FileSort.\n\n", MAX_FILES); + break; + } + } + max_files = j; + if (max_files > 1) + { + printf (" Sorting files in directory %s...\n", dirarray[n].n_DirName); + if (Sort_files (mode)) + save_flag = TRUE; + } + if (save_flag) + { + sprintf (Dummy, "%s_BACKUP", Filename); // Vi sletter backup + DeleteFile (Dummy); + sprintf (Dummy, "C:Rename \"%s\" TO \"%s_BACKUP\"", Filename, Filename); + Execute (Dummy, NULL, NULL); // Vi lager ny backup + backup_flag = TRUE; + if (fh = Open (Filename, MODE_NEWFILE)) + { + for (i = 0; i < max_files; i++) + { + write = Write (fh, &fl_all[i], sizeof (struct Fileentry)); + if (write != sizeof (struct Fileentry)) + { + printf ("\n ERROR writing to file '%s'!\n\n", Filename); + backup_flag = FALSE; + break; + } + } + Close (fh); + fh = 0; + if (backup_flag) // Klarte vi å lagre hele? + { // De sletter vi backup + sprintf (Dummy, "%s_BACKUP", Filename); + DeleteFile (Dummy); + } + } + } + } + } + } + } + } + } +end: + return (ret); +} diff --git a/JEO/SortFiles.info b/JEO/SortFiles.info new file mode 100644 index 0000000000000000000000000000000000000000..2c97cde78726a063b7cf5c583acae1134b0e2440 GIT binary patch literal 835 zcmZ{hze@sP7{{MWJrTkm4W%KXbZg<@P%Q-wc?A+g(5Oq3gH*T#-Yd044tg{+HZ(fq z)_7CVe^5hkq&Pbo2-oxDM2C7&zwi5bzdWZO`*F~K);26d0aieV0BGUFeHq`6d^7){ z1y;kM&v7{P^`Vf{d$vkh-WPDv0%+@}f!P(r{XORx_#D$EYe`9`%&9e1lI}GqS0z&| z?yFbkQ0YDMIazf%^^~6hN6r^K2lV5A@=o~Tt>V6<<;(6{!8!M>tpWElQR(krFEQ^7gUoZ2h|F)voK9Ef=ep82 zyFR}ZzE&5$SEo4&=9ce#<3*fLf5WtciO%W&BIlH~jHGkLsWtnOaOP)P?$w)QrRU&A z0Xe7CQ%aH_h-Y-p9G(A}=$tsYo=>9F6^A8u-Ufr6=fPy>N62F??vayo;*GRnBQJUn z!aY~GwaMJfL?hfM=hW{Eh36*HH_TH9Lcwb620^mRZ2$AwX!b&dt+Ylo2j1Vb(xc&yrhs%h}ubDTm_KIuD zrb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z^Gyd47PYl|eBPoOpS#<@XK}ZyDC{f1T|K@de1E>f-LQVq`kpxc>`yc-tgjZ>C51Be z)0OcZnX|>C);=E3Jx>b+Q(Q=ukKn_D3;EzaT>EhW3+@6Iz?F^*N&d}nnh-NL)-P %c" >ram:script + +Du kan så editere script fila (ram:script) og forandre/fikse kommentar osv før +du utfører scriptet med "Execute ram:script" diff --git a/doc/AddFile.Doc.new b/doc/AddFile.Doc.new new file mode 100644 index 0000000..0015968 --- /dev/null +++ b/doc/AddFile.Doc.new @@ -0,0 +1,62 @@ +*NOTE* ABBS must be running (and installed) for AddFile to work. *NOTE* + +Usage : FILE/A,AS/A,DIR/K,P=Private/K,C=Conf/K,I=Info/K,FREE/S,MOVE/S, + FROM/K,NOCOPY/S,DESC/A/F + +File (Required) Name of source files(s). Patterns allowed. + +as (Required) name to use in abbs (in lists etc). Note, If + you use patterns in the source filename, this name will + not be used, instead the source filename is used. + If so, this name is not used, but still, you need to + type something. + +DIR Name of directory to install file in. + +PRIVATE Make the file private to a spesific user + Name must be enclosed in quotes. eg "foo bar" + +CONF Make the file private to a spesific conference + +INFO Text file to install as a file info for this file. + Note. If source is several files, all files will get + the same fileinfo message (different copies though) + +FREE Install this file as a free download + +MOVE move the file (that is, delete the source after copy) + +FROM Usernr who uploaded the file + +NOCOPY If this option is selected Addfile will not check if the + file beeing installed resides in the correct place, nor will + addfile copy it. Hence, MOVE will have no effect when NOCOPY + is active. + +DESC (Required) The file(s) description. + +Examples: + +1) AddFile dh0:download/#? foo DIR upload FREE "New files" + + Will install all files in dh0:download in directory upload using + their original names. + +2) AddFile df0:newfile Superfile.lha DIR text "the new text file" + + Will install the file df0:newfile as Superfile.lha in directory + text with comment "the new text file" + +3) AddFile ram:ToGeirInge.lha ToYou.lha Private "Geir Inge" "Here it is!" + + Will install ram:ToGeirInge.lha private to user "Geir Inge" as + ToYou.lha. + +4) To get really powerfull, you can use the c:list command. +eg: + +List df0:#?.lha lformat "Addfile df0:%n %n FREE %c" >ram:script +execute ram:script + +will add all lha files on drive df0: as free downloads, using their +filecomment as comment!!! diff --git a/doc/AddMsg.Doc b/doc/AddMsg.Doc new file mode 100644 index 0000000..f8b2d92 --- /dev/null +++ b/doc/AddMsg.Doc @@ -0,0 +1,22 @@ +OBS: ABBS være i gang for at dette programmet skal virke + +Usage : AddMsg + +Obs. Håndterer ikke space i filnavnet. + + er amiga dos filnavnet på tekst filen du vil legge inn som en + melding. + + er konferanse navnet du vil legge inn meldingen i + + er den teksten du vil ha som subject. (her kan du ha med space). + +Alle meldinger laget med AddMsg vil få avsender Sysop, og være til ALL. + +eks: + +AddMsg ram:readme.txt news Viktig nyhet + +Legger inn filen "ram:readme.txt" som en melding til alle fra sysop i +konferansen news med subject "Viktig nyhet" + diff --git a/doc/AddMsg.doc.new b/doc/AddMsg.doc.new new file mode 100644 index 0000000..7987a1b --- /dev/null +++ b/doc/AddMsg.doc.new @@ -0,0 +1,19 @@ +*NOTE* ABBS must be running (and installed) for AddMsg to work. *NOTE* + +Usage : Filename/A,Conf/A,Subject/A,TO/K,FROM/K,R=Reply/K/N,P=Private/S + +Filename (Required) Filename for textfile containing the message. + +Conf (Required) Conference name to store the message in + +Subject (Required) Subject of message. Must be enclosed in quotes if + the subject contains spaces + +TO Username to write too. (name must be enclosed in quotes) + +FROM Username who write this message. (name must be enclosed in quotes) + +Reply Message number to make this message a reply to + +Private This keyword will make the message private if it can be made + private diff --git a/doc/Broadcast.doc b/doc/Broadcast.doc new file mode 100644 index 0000000..b4f8cd1 --- /dev/null +++ b/doc/Broadcast.doc @@ -0,0 +1,13 @@ +OBS: ABBS være i gang for at dette programmet skal virke + +Usage : Broadcast + + er nodenummeret du vil sende melding til. +Er dette nummeret 0, går det til alle noder. + + er teksten som skal sendes. (kan inneholde space) +obs: maks 80 tegn langt + +Broadcast 0 Hei dette er sysop + +sender altså en node melding til alle brukere som er inne på basen. diff --git a/doc/CheckIndex.doc b/doc/CheckIndex.doc new file mode 100644 index 0000000..12ede6d --- /dev/null +++ b/doc/CheckIndex.doc @@ -0,0 +1,17 @@ +CheckIndex v 2.0 (Formely CheckUsers) + +*NOTE* + +ABBS must not be running. Running CheckIndex when abbs is running has +no effect. + +*NOTE* + +Template: USER,INDEX,NRINDEX,CONFIG +Usage : [USER=] [INDEX=] [NRINDEX=] + [CONFIG=] + +Checks the index files for mistakes. +FixIndex should be able to fix most mistakes reported by CheckIndex. + +Geir Inge Høsteng. diff --git a/doc/CheckUsers.doc b/doc/CheckUsers.doc new file mode 100644 index 0000000..b2cbb8b --- /dev/null +++ b/doc/CheckUsers.doc @@ -0,0 +1,11 @@ +OBS : ABBS skal ikke være i gang! + +Bruk : CheckUsers + +Sjekker om index filene er som de skal. Skriver ikke programmet ut noen +feilmeldin er alt bra. Hvis det skriver ut en feilmelding (som skyldes +feil i index filene) kontakt meg på ABBS support (02) 277176. + +Dette programmet er mest ment for meg, derfor vil jeg ikke gjøre noe forsøk +på å forklare utskriften. + diff --git a/doc/ConfigBBS.doc b/doc/ConfigBBS.doc new file mode 100644 index 0000000..214b33c --- /dev/null +++ b/doc/ConfigBBS.doc @@ -0,0 +1,247 @@ + + ##### # ###### # ###### # ### # + ######### ###### ### ###### ### # ####### + ## ### ## # # ## ## # # ## ## #### + ## ## # ## # # # # # # # # ### + # # ## ## ## ## # ## ## # #### + # # ## ## ## # ## ## # #### + # # ## # ### # # ### # ### ### + ######## ## ## ## ## ###### # + # ## #### # #### # # ##### + #### # ### # #### # # #### # # ## + # ### # # ##### # ##### # # + ## + + Amiga Bulletin Borad System + (C) 1991, Geir Inge Høsteng + + ConfigBBS dokumentasjon + =========================== + + +ConfigBBS er et programm som brukes til å konfigurere ABBS. + +ConfigBBS krever at ABBS kjører, siden ConfigBBS bruker endel rutiner som +ligger i ABBS. + +For å konfigurere ABBS bare starter man configBBS, og fyller ut alle +gadget'ene, Velger det man vil i menyen, og velger Save i menyen. og så er man +ferdig. +(hvis ikke ConfigBBS raporterer noen feil i tittelbar'en da ...). + +Noen av gadget'ene/menyene er allerede utfyllte med forslag. + +Hvis du allerede har konfigurert basen, og kjører ConfigBBS, vil du kunne +forandre noen av valgene. Ikke alle frandringene vil merkes før du avslutter, +og starter ABBS igjen. + +Forklaring av de forskjellige gadgetene +*************************************** + +Sysop info: ++++++++++++ + +Name +==== +Dette er sysop's navn. Det må være et navn i nøyaktig 2 deler, separert +av et mellomrom (space). + +Password +======== +Dette er sysop's lokale passord. Ved første konfigurering av basen blir det +også syops vanelige passord OBS. Alle passord i ABBS er case sensitive, dvs +at Foo og foo ikke er like. (Store og små bokstaver er forskjellige). +Det er lurt å velge noe som ikke er så veldig opplagt her. +Mellomrom er ikke tillatt i passord + +Hvis du velger et tomt passord når du kjører configBBS etter å ha configurert +ABBS, vil F2 og F3 login ikke spørre etter passord. + +Address +======= +Dette er sysop's adresse. Dette er bare en ren tekststring som ABBS aldri +tolker/bruker. + +Postalcode +========== +Dette er sysop's post kode. Bare en ren tekststring som ABBS aldri tolker. + +Home phone +========== +Dette er sysop's telefonnummer hjem. Bare en ren tekststring som ABBS aldri +tolker. + +Work phone +========== +Dette er sysop's telefonnummer på jobb. Bare en ren tekststring som ABBS +aldri tolker. Har du ikke noe jobb telefonnummer, svar bare '-' eller noe +slikt. + +Board name +========== +Dette er navnet på basen. For øyeblikket brukes dette kun til navnet på +grab filene. + +News conferance name +==================== +Dette er en obligatorisk nyhetskonferanse, hvor alle kan lese, mens bare +sysop kan skrive her. + +POST conferance name +==================== +Dette er en obligatorisk post konferanse. Her kan alle skrive, men bare +private meldinger. Ingen kan lese private meldinger untatt sender, mottager +og Sysop. + +UserInfo conferance name +======================== +Konferanse for resyme'er. Ingen skal kunne skrive her, untatt ved bruk av +main komandoen edit. + +FileInfo conferance name +======================== +Konferanse for Filinfo. Ingen skal kunne skrive her, untatt ved upload. + +Time limit +========== +Dette er den tiden nyregistrerte brukere får som maks antall minutter pr. dag. +0 betyr ingen tidsbegrensning. + +File limit +========== +Dette er den tiden nyregistrerte brukere får som maks antall minutter i +filmenyen pr. dag. 0 betyr ingen tidsbegrensning. +(Det er time limit som er den viktigste, dvs, selv om man har lengre filtid +enn vanelig tid, blir man kastet ut når den vanelige tiden er oppbrukt) + +Max lines in msg's +================== +Bestemmer hvor mange linjer editorene skal ha som maks. Minne til disse +allokerers ved oppstart. Mange linjer gir mulighet for store meldinger, +men tar mere minne en få linjer. Det allokeres en slik buffer for hver node. + +Sleep time +========== +Dette er antall minutter som ABBS skal vente på input før den antar at +brukeren har sovent, og log'er han av basen. + +KByte Ratio +=========== +KB ratio for Upload/Download. Gjelder ikke før du har slått den på med on/off +gadgeten til høyre for denne. + +File Ratio +========== +File ratio for Upload/Download. Gjelder ikke før du har slått den på med on/off +gadgeten til høyre for denne. + +Min UL Space +============ +Antall K som må være ledig på upload partisjonen for å tillate en upload. +0 slår av denne testen. + +File Dirs +========= +Når denne er valgt er det fil directory's som vises i requesteren + +Conferences +=========== +Når denne er valgt er det konferanser som vises i requesteren + +Order +===== +Brukes til å forandre rekkefølgen på konferansene/fildirene + +Scan +==== +Setter maks scan for konferanser, dvs er denne verdien 50, så vil en person +som join'er denne for første gang bare få de siste 50 meldingene + +Bits +==== +Lar deg editere konferanse bit'ene. (ikke på news,post,userinfo og fileinfo +konferansene) + +Up +== +Minker order med en for denne konferansen + +Down +==== +Øker order med en for denne konferansen + +Sliedebar'en +============ +Lar deg "scrolle" vinduet. + +Liten pil opp +============= +Scroll'er listen med navn oppover + +Liten pil ned +============= +Scroll'er listen med navn nedover + +I Menyen: +********* + +Load config +=========== +Denne henter inn oppsette som sist ble lagret. + +Save config +=========== +Denne sjekker input'en, og lagrer de nødvendige config filene. + +Cancel +====== +Avbryter ConfigBBS uten å lagre noe som helst. + +Features: ++++++++++ + +Interlace +========= +Når denne er aktivisert vil ABBS skjermen åpnes i interlace mode, og den vil +vil være dobbelt så høy. + +8 Colors +======== +Når denne er aktivisert Åpner skjermen og alle nodene med 8 farver. Dette +tar endel mere chip ram en 2 farver, og går tregere, men nå vil alle ansi +farver fungere lokalt også. + + +Charset +======= +Dette er det tegnsette nye brukere for som default. For øyeblikket kan det +være en av "ISO", "IBM" eller "IBN" + +Allow TmpSysop +============== +Velger om Amiga-T har noen virkning eller ikke. + +Use ASL +======= +Velger om ABBS skal bruke ASL.library eller ikke (har du ikke ASL vil ikke +abbs prøve å bruke det uansett, og dette valget har følgelig ingen virkning. +ASL.library er en del av 2.0 versjonen av Amiga's OS. + + +New users May: +++++++++++++++ + +Download +======== +Når denne gadget'en er aktivisert vil ny-registrerte brukere kunne hente ned +filer uten at sysop må gi dem access til dette først. + +Upload +====== +Når denne gadget'en er aktivisert vil ny-registrerte brukere kunne legge opp +filer uten at sysop må gi dem access til dette først. + + +Hvis du vil slette oppsettet og starte på nytt, slett alle filene i +abbs:conferences/ og slett filene userfile, userfile.index, userfile.nrindex +og configfile i abbs:config/ diff --git a/doc/ConfigNode.doc b/doc/ConfigNode.doc new file mode 100644 index 0000000..183ccb6 --- /dev/null +++ b/doc/ConfigNode.doc @@ -0,0 +1,143 @@ + + ##### # ###### # ###### # ### # + ######### ###### ### ###### ### # ####### + ## ### ## # # ## ## # # ## ## #### + ## ## # ## # # # # # # # # ### + # # ## ## ## ## # ## ## # #### + # # ## ## ## # ## ## # #### + # # ## # ### # # ### # ### ### + ######## ## ## ## ## ###### # + # ## #### # #### # # ##### + #### # ### # #### # # #### # # ## + # ### # # ##### # ##### # # + ## + + Amiga Bulletin Borad System + (C) 1991, Geir Inge Høsteng + + ConfigNode Documentation + ========================== + + +ConfigNode brukes til å generere node config filer til abbs (de som brukes +i abbs:config/startup.config). + +ConfigNode kan lese inn og forandre config'er som allerede eksisterer, eller +starte fra grunnen av. + +Når du starter opp ConfigNode er alle gadget'er allerede utfyllte med et +forslag, for å gjøre det lettere. Hvis du vil slette innholdet i en tekst +gadget, velg gadget'en og trykk Høyre Amiga tast, og X. + + +Forklaring av de forskjellige gadgetene +*************************************** + +Local node +========== +Når denne er valgt, er det en lokal node, og alle andre gadget'er untatt +"Tiny mode" er uvesentlig (de brukes ikke) + +Tiny Mode +========= +Dette sier at noden skal åpne et lite vindu, hvor man bare ser litt status, +istedenfor et stort vindu hvor man ser alt som foregår. Fin til å spare chip +ram. + +Save config +=========== +Denne lagrer configfile med det navnet som er i "Config filename" gadget'en. +Alle config'er bør ligge i ABBS:config/ directoryen. + +Load config +=========== +Denne henter inn en config med filnavnet som ligger i "Config filename". + +Cancel +====== +Avslutter Confignode uten å lagre noe som helst. + +Config filename +=============== +Filnavnet som configfile vil bli lagret under, eller hentet fra. +Pass på og forandre denne, slik at du ikke sletter andre noder, hvis +ikke det er meningen. + +Serial device +============= +Velger hvilket device ABBS skal bruke på denne noden. Det må være et +device som er kompatibelt med serial.device. Har du ekstra serialporter, +og vil bruke de, velg devicet for disse her. +Har du bare den standard serialporten, må dette være serial.device. + +Serial port unit +================ +Sier hvilken unit som skal åpnes. +Har du bare den standard serialporten, må dette være 0. + +Modem init string +================= +Dette er modem init stringen som abbs sender til modemet. +Forslaget er en initstring til et EB 2424A modem (Det samme som TBK 4161) +Dette er veldig forskjellig fra modem til modem. + +Viktige ting er at modemet *ikke* skal ta røret ved ringe signal. (Vaneligvis +fikser ATS0=0 dette) +Modemet skal bare sende CD signalet når det har Carrier. +Modemet skal bryte forbindelsen når DTR går lav. +Ekko må være av. +Modemet må gi en "Connect xxxx" string ved svar, der xxxx er baudhastigheten +Modemet må gi "RING" (eller noe lignende) ved ringesignal. + +Modem answer string +=================== +Dette er stringen som får modemet til å svare på annrop. Vaneligvis "ATA" + +Modem off hook string +===================== +Dette er stringen som får modemet til å ta av røret. Vaneligvis "ATH1" + +Modem on hook string +==================== +Dette er stringen som får modemet til å legge på røret. Vaneligvis "ATH0" + +Modem call string +================= +String som skal settes forran et nummer for å ringe. Vaneligvis "ATDT" +OBS. Dette brukes ikke for øyeblikket. + +Modem RING string +================= +Dette er den stringen modemet sender når det oppdager ringesignal. +Vaneligvis "RING". + +Modem CONNECT string +==================== +Dette er stringen som modemet sender når det får connect (etterfulgt av +baud hastigheten). Vaneligvis "CONNECT". + +Modem AT string +=============== +String som brukes for å få modemet's oppmerksomhet. Vaneligvis "AT". + +Modem OK string +=============== +Stringen som modeme sender når alt har gått bra med gitt komando. +Vaneligvis "\r\nOK\r\n". \r er return, og \n er newline. + +Locked baud rate +================ +Er denne valgt vil noden gi blaffen i hastigheter som kommer etter CONNECT +stringen, og alltid bruke baud hastigheten i boksen til høyre +Den bør være lik eller høyere enn det som modemet maks kan yte. Modemet +må også supportere låst baud hastighet (Mulighet for forskjellig baud +hastighet mellom maskin og modem, og modem og linje). + +Xon/Xoff +======== +Velger Xon/Xoff handshaking på noden. + +CTS/RTS +======= +Velger CTS/RTS (eller 7-wire) handshaking. + diff --git a/doc/Configbbs.txt b/doc/Configbbs.txt new file mode 100644 index 0000000..46f46c3 --- /dev/null +++ b/doc/Configbbs.txt @@ -0,0 +1,47 @@ +security +BOOL Nekte super sysop å logge inn eksternt +BOOL Nekte sysop å logge inn eksternt +BOOL All upload privat,uploads private to sysop +BOOL lukket system - passord for å registrere seg +PASSWD passord for sysop menyen for eksterne brukere +PASSWD ClosedPassword +PASSWD dosPassword +STRING systemfiler-dirs (userfiles/#?) +INT Log level + +BOOL read ref default +BOOL Sysop availible fra startup ? +BOOL flcache on/off +STRING internet addresse felt (256 bytes) +STRING Skjerm gui'et skal åpne på +STRING font til gui'et. +BOOL Skal GUI'et åpnes ved start ? +UWORD GUI x,y pos + +INT Maxconferences +INT MaxfileDirs +STRING BaseName +STRING SYSOPname +PASSWD SYSOPpassword +INT MaxLinesMessage +INT NewUserTimeLimit +INT NewUserFileLimit +INT SleepTime +UBYTE DefaultCharSet +UBYTE Cflags (Lace,8Col,Download,Upload,Byteratio,Fileratio,AllowTmpSysop,UseASL) +INT ByteRatiov +INT FileRatiov +INT MinULSpace +UBYTE Cflags2 (NoGet,CacheFL) + +(filedirs) +n_DirName +n_DirPaths +n_FileOrder +n_PrivToConf + +(conferences) +n_ConfName +n_ConfOrder +n_ConfSW +n_ConfMaxScan diff --git a/doc/CryptPasswords.doc b/doc/CryptPasswords.doc new file mode 100644 index 0000000..88f3b57 --- /dev/null +++ b/doc/CryptPasswords.doc @@ -0,0 +1,23 @@ +*NOTE* + +ABBS must not be running. Running CryptPasswords when abbs is running has +no effect. + +Converted userfiles will only work with abbs v1.1 and later. abbs 1.0 beta +will *NOT* be able to use these files. + +*NOTE* + +Template: USERFILE +Usage : USER= + +You must give path (if needed) and name of userfile. +eg: CryptPasswords abbs:config/userfile + +If all goes well, you will have a file called abbs:config/userfile.old +and abbs:config/userfile. The .old file is the way it was before conversion. + +Once a userfile is converted, you can't undo it. And, never convert a +userfile several times. + +Geir Inge Høsteng. diff --git a/doc/DLratio.doc b/doc/DLratio.doc new file mode 100644 index 0000000..fb0b7a6 --- /dev/null +++ b/doc/DLratio.doc @@ -0,0 +1,11 @@ + +DLratio [ [NOACTION]] + +ratio nr er forholdstallet. Vil du ha en upload pr 5. DL, skal dette tallet +være 5. + +DLratio kan generere en liste over hvem som mister/får DL access. Spesifiserer +du et filnavn på vil dette skje. + +Spesifiserer du NOACTION, vil den generere lista, men ikke ta fra/gi noen +access. diff --git a/doc/Doors.doc b/doc/Doors.doc new file mode 100644 index 0000000..1db993f --- /dev/null +++ b/doc/Doors.doc @@ -0,0 +1,71 @@ +ABBS DoorsDoc 1/2-94 + +For å sette opp doors på abbs, skal dere ha en directory som heter +abbs:doors, og der skal det ligge 2 filer for hver node. + +NodexMenu(.raw/.ansi) er en tekst fil som skrives ut til brukere som skriver + open. (x = tallet på noden) + +NodexConfig, hvor x er tallet på noden. Setter opp hvilke dører som er + tilgjengelig på denne noden. Format et er : + +A ; komentar +^ ^ +type filnavn + +Tillatte typer: +A - Arexx door +P - Paragon door +S - Shell door + +A'en sier at det er en Arexx dør. Skriver du en P der, så starter abbs den +som en paragon dør, og S er shell dør. Det kan være spaces/tabs før A'en. +Det må være minst en space/tab etter A'en, og filnavnet må være uten spaces +eller tabs. Man kan ha en komentar etterpå hvis man vil. + +ABBS teller gjyldige linjer nedover når den skal finne door x. + +Dør 3 er altså den 3. linjen som er av formatet over. (Du kan ha rene +komentar linjer mellom, de telles ikke). + +for node 1 blir filene derfor : + +abbs:doors/Node1Menu +abbs:doors/Node1Config + +Dette er et eksempel på en nodexconfig fil. Den setter opp gitaris og days. +----------------------- klipp ------------------ +A abbs:Doors/Gitaris.ABBS ; Gitaris er door nr 1 +A ABBS:Doors/Days/Days.ABBS ; Days er door nr 2 +P abbs:doors/KSE/KSE101 ; Kse (paragon door) er door nr 3 +S abbs:Doors/XBJ/XBJ.script ; Black jack (shell door) er door nr 4 +----------------------- klipp ------------------ + +Se Arexx doc'en for hvilke Arexx kommandoer som ABBS tilbyr. + +Når det gjelder shell doors, så startes via et shell script. +Her er eksempelet på fila XBJ.script: + +------------------------ klipp -------------------- +cd doors:xbj ; forandrer Currentdir til riktig sted +failat 2147483647 ; max failat verdi +stack 10000 ; setter opp stack'en +path sys:rexxc ; Sørger for at vi finner rx.. +; Denne linjen forandrer nodestatus til "Playing Black Jack". Trengs ikke. +rx "Address 'ABBS node #`get Nodenr` port' 'SETSTATUSTEXT ''Playing Black Jack'''" +xbj -u "`get fullname`" ; Starter selve door'en +Endcli ; sørger for at shellet avsluttes. VIKTIG!! +------------------------ klipp -------------------- + +** VIKTIG ** Oppsettet av shell doors må sjekkes NØYE !!!! ** VIKTIG ** + +Skjer den noe galt, så havner brukeren i et shell (likt det du får ved +"! exit"), og det er jo farlig for sikkerheten. + +Når det gjelder parametre, så ligger de som lokale variable. Følgende lokale +variable er tilgjengelige: + +FullName - Gir logonnavnet +NodeNr - Gir nodenummeret som brukeren er inne på. + +Bruk C:get kommandoen (som vist i eksemplet over) til å hente ut parameterene. diff --git a/doc/FixFileOrder.Doc b/doc/FixFileOrder.Doc new file mode 100644 index 0000000..51d5d65 --- /dev/null +++ b/doc/FixFileOrder.Doc @@ -0,0 +1,10 @@ + +Resets the filedir order to a known state. Usefull if the order is in +a terrible state, so abbs can't walk the filedir list. + +But, for this program to have an effect, ABBS must be down. + +Another reason that abbs may stop to walk the filedir list is because of +an error in on of the .fl files. Usually it's of a wrong size. +FixFileOrder will not fix this. + diff --git a/doc/FixIndex.doc b/doc/FixIndex.doc new file mode 100644 index 0000000..1f35508 --- /dev/null +++ b/doc/FixIndex.doc @@ -0,0 +1,33 @@ +*NOTE* + +ABBS must not be running. Running FixIndex when ABBS is running has +no effect. + +*NOTE* + +Template: CHECK/S,KILLHIGH/S,FIXDUPLICATESNR/S,FIXDUPLICATENAMES/S +Usage: [CHECK] [KILLHIGH] [FIXDUPLICATESNR] [FIXDUPLICATENAMES] + +[CHECK] is a NOP. + +[KILLHIGH] Renames the user with to high a usernumber to "KILL ME_". + This user should be killed imidiatly from ABBS. + +[FIXDUPLICATESNR] Tries to fix duplicate usernumbers. + +[FIXDUPLICATENAMES] Tries to fix duplicate names. Renames the second + user with the same name to "KILL ME_". This user should be killed.. + +Rebuilds the userfile.index and userfile.nrindex from the userfile, +and also updates the "ABBS:config/configfile" a little bit. + +Use this to fix problems with bad index files. (Usually noticed +when messages get other authors or receivers etc. + +It should be safe to use, but, since it's not testet all that much +please backup the files listed above just in case. + + +FixIndex v2.00 is for ABBS v2.x only! + +Jan Erik Olausen diff --git a/doc/Fixusers.doc b/doc/Fixusers.doc new file mode 100644 index 0000000..357cc17 --- /dev/null +++ b/doc/Fixusers.doc @@ -0,0 +1,18 @@ + + Rebuilds the files "abbs:config/userfile.index" and +"abbs:config/userfile.nrindex" from the "abbs:config/userfile" +Also updates the "abbs:config/configfile" a little bit. + +Use this to fix problems with bad index files. (Usually noticed +when messages get other authors or receivers etc. + +It should be safe to use, but, since it's not testet all that much +please backup the files listed above just in case. + +Be warned. If PUS have been used on the userfiles, checkusers will report +errors, EVEN IF THE FILES ARE OK!!!! +(This happens when Users != Maximum users). + +As always, this is beta sw. Use with care. Hope it will help. + +Geir Inge Høsteng. diff --git a/doc/Installasjon.txt b/doc/Installasjon.txt new file mode 100644 index 0000000..78973fa --- /dev/null +++ b/doc/Installasjon.txt @@ -0,0 +1,88 @@ + + ##### # ###### # ###### # ### # + ######### ###### ### ###### ### # ####### + ## ### ## # # ## ## # # ## ## #### + ## ## # ## # # # # # # # # ### + # # ## ## ## ## # ## ## # #### + # # ## ## ## # ## ## # #### + # # ## # ### # # ### # ### ### + ######## ## ## ## ## ###### # + # ## #### # #### # # ##### + #### # ### # #### # # #### # # ## + # ### # # ##### # ##### # # + ## + + Amiga Bulletin Borad System + (C) 1991, Geir Inge Høsteng + + Instalasjon + =========== + +Instalasjon av ABBS +=================== + +OBS: Har du allerede installert demo versjonen av ABBS, slett hele + demoversjonen. ABBS og demoversjonen har forskjellige config filer, + og de er ikke kompatible + +1) Velg en directory eller partisjon hvor du vil ha abbs, (Lag gjerne en + ny directory med MakeDir komandoen). + + F.eks : "Makedir work:ABBS" + +2) Assign denne til ABBS:, og plasser denne assignen i s:user-startup + + F.eks : "Assign ABBS: work:abbs", hvis "work:abbs" er directoryen valgt over. + + Vær obs på at hvis det står en diskett i diskettstasjonen som heter abbs, så + vil du ikke få feilmeldingen (Can't cancel abbs). Hvis du setter inn en + diskett som heter abbs etter at du har foretatt assign'en, så vil disketten, + og ikke harddisken bli brukt. + +3) Kopier hele abbs oppsettet fra disken til det som nå er abbs: + + F.eks : "copy df0:#? abbs: all" + +4) Så forandrer du filene som nå ligger i sys directoryen (pack.lzh osv). + Bytt ut teksten "sys:cc/" med den path'en pakkerene har på din maskin. + Har du ikke en av pakkerene, så slett den tilsvarende pack filen, så vil + ikke folk kunne velge den pakke metoden. Når du får tak i pakkeren, kan + du legge de inn igjen. + + F.eks : "sys:cc/arc" til "c:arc" (La resten være som det er.) + +5) Kopier filene i abbs:l til l:, abbs:libs: til libs: og abbs:s til s: + +6) Start så abbs. ABBS skal bare åpne et vindu, og ikke gjore noe mere + foreløpig. + + F.eks : "run abbs" + +7) Configurer basen med ConfigBBS programmet. (se i ConfigBBS.doc for bruk) + +8) Avslutt nå ABBS, ved å klikke på "Quit" button'en eller aktivisere abbs + vinduet og velg shutdown i menuen (Amiga-Q) + +9) Konfigurer de nodene du trenger med ConfigNode programmet + (se i ConfigNode.doc for bruk). Husk å lagre de under forskjellige navn, + og at de må ligge i ABBS:Config/ directoryen. (Husk også at de får + forskjellig nodetmpdir og hold directory) + +10) Legg inn navnene på nodefilene (som du lagde i punkt 9) inn i fila + ABBS:Config/startup.config, på samme måte som eksemplene som allerede + ligger der. (De som ligger der bør du slette, eller komentere ut). + +11) Legg inn følgende linje i s:user-startup + + run >nil: ] [ToConf] [Upcase] [Upload] [All] [Check] [Fix] + + Since: Only list files uploaded on or after this date. + + ToConf: Include files private to conferences too. + + Upcase: Upcase all filenames. + + Upload: Include upload dir in listing. + + All: List everyting, even private files. + + Check: Only list files missing corresponding file on disk. + + Fix: Delete file entries that don't have a matching file on disk. + diff --git a/doc/MiscMenu.doc b/doc/MiscMenu.doc new file mode 100644 index 0000000..a8faeb9 --- /dev/null +++ b/doc/MiscMenu.doc @@ -0,0 +1,42 @@ +Misc Menu: + +ABBS now has a misc menu where you the sysop can insert any command you +want to add to abbs. You can only add commands in the Misc menu with +Arexx scripts. + +To set up Misc: + "Makedir abbs:Misc" + +To add commands to the misc menu, put arexx scripts in the abbs:Misc +directory. The name of the script determinantes the name of the command in +the misc menu. To get a command called hello, you add a arexx script called +hello.abbs in the directory. + +This is an example setup: + + abbs:Misc (dir) + Hello.abbs + +Here is the Hello.abbs file : + +************* cut *************** +/* Example Arexx script for abbs +*/ + +options results + +outimage + +username +if RC >= 5 THEN DO /* Exit if there is no user online */ + EXIT +END + +tekst = '"Hi, '||result||'. This is the Misc Hello command talking to you!"' +writetext tekst +outimage + +exit +************* cut *************** + +That's about all there is to it. diff --git a/doc/NewArexx.txt b/doc/NewArexx.txt new file mode 100644 index 0000000..bf7d07c --- /dev/null +++ b/doc/NewArexx.txt @@ -0,0 +1,10 @@ + +string = EXPERT(n) - retur av ekspertnivå til innlogget bruker på + node n +time = LOGONTIME(n) - Når bruker på node n logget inn +bool = ANSITE - om bruker på node n har satt opp ANSI terminal + eller ikke + ++ kommandoer som returnerer andre deler av brukerprofilen. Protokoll, +pakkeformat, linjelengde, Sigop/Sysop status, raw files etc. + diff --git a/doc/NewConfigNode.doc b/doc/NewConfigNode.doc new file mode 100644 index 0000000..c397aa3 --- /dev/null +++ b/doc/NewConfigNode.doc @@ -0,0 +1,318 @@ + + ##### # ###### # ###### # ### # + ######### ###### ### ###### ### # ####### + ## ### ## # # ## ## # # ## ## #### + ## ## # ## # # # # # # # # ### + # # ## ## ## ## # ## ## # #### + # # ## ## ## # ## ## # #### + # # ## # ### # # ### # ### ### + ######## ## ## ## ## ###### # + # ## #### # #### # # ##### + #### # ### # #### # # #### # # ## + # ### # # ##### # ##### # # + ## + + Amiga Bulletin Board System + (C) 1991-1994, Geir Inge Høsteng + + ConfigNode 2.1 Documentation + ============================ + + +ConfigNode is the program that generates config files for the different +abbs nodes you want to set up for your abbs board. Normaly these config +files have an extension of .config, and they normaly reside in the +abbs:config directory. (Offcourse you can change all this). + +Confignode has the ability to read old configfiles for easy modification, +or generate new ones from scratch. + +When you start ConfigNode, all gadgets will be filled in with some default +values. Modify the setup as you pleases, then save the config file. +If you want to edit an old config file, just load it befor editing and +saving. + +All gadgets marked with "(Accepts special characters)" accept C style +control characters \n and \r. '\n' means newline (ASCII 10), and '\r' +means carriage return (ASCII 13) + +Description of all the different gadgets +**************************************** + +Modem init string (Accepts special characters) +================= +This is the string abbs will send to the modem each time abbs wants to reset +the modem. (Typically at startup and after each call) +The modem init string is the most difficult thing to get right, and it is very +important that it is correct. The init string will be different for different +modems. You have to read the manual to figure it out. + +This string even accept the '~' special charater. When abbs encounters this character +it waits one second (per '~' character). + +So, if you want to reset the modem, wait 3 seconds, then send an init string +"atz\n~~~ATS0=0&c1&d2E0X6" would do the trick. + +This is abbs requirements for the modem : + - The modem should *not* answer the phone all by it selves. + (Normaly S0=0 fixes this) + + - It must show the true value of CD (CD on only if the modem detects + carrier) (Usually &c1) + + - The modem must disconnect when DTR goes low (usually &d2) + + - The modem must not echo commands back to the machine (usually E0) + + - the modem must give a connect string of the format "Connect xxxx" + where xxxx is the connect speed (note. this should be the + modem-modem speed, *NOT* modem-machine speed) Usually the X command + controlls this, but sometimes other commands modifies this too) + + - The modem must give som kind of string when a ring signal is detected + usually this is "RING" + +So, "ATS0=0&c1&d2E0X6" is an example of an init string. + + +Modem on hook string (Accepts special characters) +==================== +When abbs wants the modem on hook again, this string is sent to the modem. +Usually this is "ATH0" + +Modem off hook string (Accepts special characters) +===================== +This is the string abbs sends to the modem when abbs wants the modem to go +off hook (to make the line busy). Usually this is "ATH1" + +Modem answer string (Accepts special characters) +=================== +This is the string abbs sends to the modem when abbs wants the modem to answer +an incomming call. Usually this is "ATA" + +Modem Dial string (Accepts special characters) +================= +Dial prefix for outgoing calls. Usually "ATDT" +Note. This string is currently not used. + +Modem RING string (Accepts special characters) +================= +This is the string abbs listens for when waiting for an incomming call. +Usually "RING" + +Modem CONNECT string (Accepts special characters) +==================== +This it the string abbs waits for after it has sent the modem answer string +to the modem. When abbs receives this string, it collects the speed +(following the connect word), checks for a CD signal, and starts the login +sequence. Usually "CONNECT". + +Modem NO CARRIER string (Accepts special characters) +======================= +The string the modem outputs after a failed dial or answer sequence. Usually +"NO CARRIER". Note, Currently not used. + +Modem AT string (Accepts special characters) +=============== +String used for getting the modems attension. Usually "AT" + +Modem OK string (Accepts special characters) +=============== +String returned from the modem if everything was ok with last command +Usually "OK" + +Min Baud +======== +The minimum baud speed accepted for this node. If the modem connects with +another modem with a speed less than this, the call will be terminated + +Connect Wait +============ +Maximum number of seconds abbs will wait after an ATA command is issued +for a "CONNECT" string to appear. If the connect string doesn't appear +withing this timeout value, abbs will abort the connection sequence. +This value must be atleast 10 seconds. + +Modem-machine baud +================== +The baud speed initially used for communication between the machine and +the modem. If locked baud rate, this speed will never change. + +Serial Node->Local node->Nullmodem Node +======================================= +If Serial Node is selected this is a normal external node. It will use +the serial device specified, and answer incomming calls in a normal way + +If Local node is selected, this is a local node. It will not open any +serial device, and you can only logon to this node localy, using the +node window. + +If Nullmodem node is selected, this modem will open the serial device +specified. You can logon by just sending a character to the serialport. +No "RING","ATA","CONNECT" sequence is used. Also, no CD cheching is done +in this node. + +Comm port name +============== +Name of the serial device to use for this node. Only valid for serialnodes +and nullmodem nodes. Usually this will be "serial.device" for the internal +port and the CBM 2232 serial card, but for the GVP IOextender "gvpser.device" +is the correct string. Other serial cards may have other names. + +The device selected must be compatible with serial.device (that is, accept +the same commands, and behave in the same way) + +Comm port +========= +Unit number for the serial port (on the device specified in Comm port name) +to open. For the internal (an usually for the first port on a serial card) +the unit number is 0. + +CTS/RTS +======= +If this is checked, the node will use the CTS/RTS hardware handshaking +(also called 7-wire) protocol. You must have this turned on if you use +locked baud rate. + +*NOTE* if you turn this option on, you must also enable the CTS/RTS +protocol in the modem. (&H1 omn some modems). Most modems also require +that you set DSR always on (usually &S0). This must be added to the +modem init string (&H1&S0) + +Locked baud rate +================ +If this option is turned on abbs will not change the modem-machine speed +according to the connect speed. + +This is the recomended way of configuring a high speed modem (9600 or more) +with compression. Use a modem-machine baud higher than the modem speed +(with compression the modem will be faster than the modem speed. For example, +a 14400 modem with compression, v42bis or something else, will give you more +than 14400 bps). For a 14400 modem, use a modem-machine baud of 19200 or +38400, and turn on CTS/RTS. + +For this option to work, you must also tell the modem never to change the +modem-machine baud on its own. (Usually &B1 fixes this). The modem must +be able to support different speed between the 2 modems and modem-machine +for this to work. + ++++ hangup +========== +If this option is enabled, abbs will disconnect the user by first setting +the modem in command mode (by sending '+++' to the modem), then sending +the modem on hook string. + +This is not a very safe method, and it is not recomended. The only use for +this option is if the modem is unable to dropp the connection when abbs +dropps the DTR signal. + +No Sleep +======== +If this choise is selected, there will be no sleep disconect checking on this +node. Use with care. Only meant for non-dialup connections.. + +Hold Path +========= +Full path to the hold directory for this node. This is where the node will store +files used by the hold system. + +*NOTE* This path must be unique. NO OTHER NODES MAY USE THE SAME PATH!!!! + +Tmpdir path +=========== +Full path to the temporary directory for this node. This is where the node will +store temporary files sutch as scratchpad, qwk files etc. +This directory will be created an deleted by abbs!! +(Remember, all directorys except the last one in the path must always exists. +ABBS will not creatre those! That is, if the tmppath is "t:tmp/node1tmpdir" +t:tmp must exsist, ABBS will only create (and delete) the node1tmpdir +directory) + +*VERY IMPORTANT* +*NOTE* This tmppath must be unique. NO OTHER NODES MAY USE THE SAME PATH!!!! + +ABBS Screen->Public screen->Default public screen +================================================= +If ABBS Screen is selected the node will open on the abbs screen (the node +will open the screen if it doesn't already exsist) + +If public screen is selected, you must enter the name of an exsisting +public screen in the gadget directly to the right of the (ABBS Screen-> +Public screen->Default public screen) gadget. The node will open the window +on the specified public screen (if it exsists) + +If default public screen is selected, the node windo will open up on the +default public screen. (This is usually the Workbench, but need not always be) + +Fullsize->Backdrop->Tiny +======================== +If Fullsize is selected the node window will open according to the position +and size spesified in the window x-pos, window y-pos, height & Width +gadgets + +If Backdrop is selected, the node will open a backdrop window with the full +size of the screen it opens on (well, it will leave one line on the bottom, +so you can click on the abbs screen and use the menus, if it's open on the +abbs screen, that is). + +If Tiny is selected, the node will open a tiny status window at the x and y +position specified in the window x-pos & window y-pos gadgets. + +Window x-pos +============ +X position for the node window + +Window y-pos +============ +Y position for the node window + +Height +====== +Height of the fullscreen node window + +Width +===== +Width of the fullscreen node window + +Open at startup +=============== +If this gadget is checked, the node will open its window when the node is +started. If it is not selected the node window will only apear when you +request it (with show in the gui) + +Font +==== +Allows you to choose the font used for the node window. (Use the choose file +gadget to the right of the font specification) + +Set min time between two logins +=============================== +Opens a separate window where you can set the minimum time (in minutes) +between to logins by the same user in a spesific hour of the day (1-24) + +That means, if it's 18:27, the setting for 18 (second row, gadget nr 9) +is 5, and user foo bar logs off the system, user foo bar can not logon +to the system until 18:32. (Other users will be able to login before +18:32) + +Set max login time +================== +Opens a separate window where you can set the maximum onlinetime (in +minutes) in a spesific hour of the day (1-24). If this value is less +than the users timelimit, this value will be used instead of the users +timelimit. If the user has unlimited timelimit (0), this value is not +applied at all to that user. + +So, if it's 17:36, the setting for 17 (second row, gadget nr 8) is 15, +and user foo bar logs into the system, he will be thrown out at 17:51 +unless he is thrown out/logs out before that + +History: +******** + + 2.2 Added No Sleep gadget. + Now accepts a config file as parameter. + + 2.1 Fixed bug with missing filename gadget. + + 2.0 Total rewrite diff --git a/doc/NewConfigNode.txt b/doc/NewConfigNode.txt new file mode 100644 index 0000000..9ca4120 --- /dev/null +++ b/doc/NewConfigNode.txt @@ -0,0 +1,34 @@ +(Cycle/String) PublicScreenName (ABBS,Default public/specify), +(string) Hold Path +(string) Tmpdir Path +(string) Font +(number) FontSize +(number) Window_x,Window_y,Window_height,Window_width for fullsize window +(number) Window_x,Window_y for tiny window (pos) + +(bool) Don't show (if node window should open or not at startup) +(bool) If node window should open in tiny or full size +(bool) Backdrop window +(bool) Internal/External node (if internal, no serial settings are interrresting (that is, the rest of this list) + (string) Comm port name + (number) Comm port number + (bool) CTS/RTS + (bool) Locked baud rate + (bool) +++ hangup + (bool) Nullmodem (if true, the following serial settings are not interesting) + (string) Modem Init + (string) Modem On Hook + (string) Modem Off Hook + (string) Modem Answer + (string) Modem Dial + (string) Modem Ring + (string) Modem Connect + (string) Modem No carrier + (string) Modem OK string + (string) Modem AT string + (number) Minimum baud + + (number) Connect Wait + (number) Modem-machine baud + (number) Max logintime (in minutes) during this hour (24 numbers) + (number) Min time between two logins (in minutes) during this hour (24 numbers) diff --git a/doc/PackFileDirs.doc b/doc/PackFileDirs.doc new file mode 100644 index 0000000..d38f5a0 --- /dev/null +++ b/doc/PackFileDirs.doc @@ -0,0 +1,20 @@ +******************************************************************************* +Warning. THIS IS A BETA VERSION. BACKUP ALL .FL FILES BEFORE RUNNING THIS PROG. +******************************************************************************* + +OBS: ABBS must be down (not running) for this programm to work. + +Usage : PackFileDirs + +Purpose: + +PackFileDirs will remove all dummy fileentries in the .fl files left over +from files delted or moved. + + +This is a beta version, not fully tested. (Well, seams to work ok :-) +There will be a nother version, also working while abbs is up. + +******************************************************************************* +Warning. THIS IS A BETA VERSION. BACKUP ALL .FL FILES BEFORE RUNNING THIS PROG. +******************************************************************************* diff --git a/doc/SysopAvail.doc b/doc/SysopAvail.doc new file mode 100644 index 0000000..0d89bbe --- /dev/null +++ b/doc/SysopAvail.doc @@ -0,0 +1,11 @@ +OBS: ABBS være i gang for at dette programmet skal virke + +Usage : SysopAvail [OFF] + +SysopAvail + +Setter altså sysop availible, mens + +SysopAvail OFF + +setter sysop not availible diff --git a/doc/ToggleCache.Doc b/doc/ToggleCache.Doc new file mode 100644 index 0000000..a3bad95 --- /dev/null +++ b/doc/ToggleCache.Doc @@ -0,0 +1,9 @@ +This small utility enables/disenables the .fl cache in abbs. + +With cache enabled, you will notice a big speed improvementon searching, +but it will cost memroy. 5000 files in the .fl files will take around 530kb of +memory for the cache. + +An added bonus is that if you have cache enabled and exits abbs in a normal +way, the .fl files will be packed (old files is removed) for free. + diff --git a/doc/msgport.doc b/doc/msgport.doc new file mode 100644 index 0000000..ddc5c02 --- /dev/null +++ b/doc/msgport.doc @@ -0,0 +1,45 @@ +WriteText + - Write a text to screen/serialport + pm_Command = Node_WriteText + pm_Data = null terminated text + +WriteTexto + - Write a text to screen/serialport with newline + pm_Command = Node_WriteText + pm_Data = null terminated text + +FlushSer + - flush serial port + pm_Command = Node_FlushSer + +WriteSerLen + - Write a number of bytes to the serial port only + pm_Command = Node_WriteSerLen + pm_Data = text string + pm_Arg = string length + +ReadSerLen + - Read a number of bytes to the serial port with timeout + pm_Command = Node_ReadSerLen + pm_Data = read buffer + pm_Arg = number of characters to read + pm_Arg2 = timeout in microseconds (note: 1000000 == 1 second). + A Timeout of 0, means read the characters in buffer +returns: + pm_Arg = number of characters read + pm_Error = PError_NoCarrier if no carrier was detected + +ReadSer + - Read a bytes from the serial port. Wait for it to arrive + pm_Command = Node_ReadSer + +returns: + pm_Data = character read + pm_Error = PError_NoCarrier if no carrier was detected + +QuitLogin + - Tell ABBS that frontdoor login sequence is finished + pm_Command = Node_QuitLogin + pm_Arg = Login status. 0 means frontdoor login compleate. Logoff + ~0 means this is a user login. Continue login sequence. + pm_Data = Line read from user, if this was a user login (null terminated) diff --git a/doc/scripts.doc b/doc/scripts.doc new file mode 100644 index 0000000..0952717 --- /dev/null +++ b/doc/scripts.doc @@ -0,0 +1,50 @@ +Dos scripts: + abbs:sys/upload.script: + + - Executed after an upload + + + abbs:sys/logout.script + + - Executed after an logout + + abbs:sys/pack.arc + abbs:sys/pack.lzh + abbs:sys/pack.zip + abbs:sys/pack.lha + abbs:sys/pack.arj + abbs:sys/pack.zoo + [Archive] [filename] + - Executed when we want to archive files. + + + abbs:sys/extract.arc + abbs:sys/extract.lzh + abbs:sys/extract.zip + abbs:sys/extract.lha + abbs:sys/extract.arj + abbs:sys/extract.zoo + [full path] + - Executed when we want to extract archives + + abbs:sys/View + [archive] [extension] + - Executed when we want to view an archive. + + abbs:sys/Check + [archive] [extension] + - Executed to see if archive is of a type may extract files from + + abbs:sys/shell-startup + - Used by "! EXIT" + +Arexx scripts: + abbs:sys/sysoppage.abbs + + abbs:sys/LoginScript.abbs + + abbs:sys/LogoutScript.abbs + + abbs:sys/Newuser.abbs + + abbs:sys/Questionnaire.abbs diff --git a/gen b/gen new file mode 100644 index 0000000000000000000000000000000000000000..071170eb0bc84d879c327465e99198573ed3aa70 GIT binary patch literal 9360 zcmc&)eQ*;;mVYxE%Y!1!U=*(dEa@o1*uqGPall8olq7#3CPp^0VV#f7j)**CV__-6 z=17X;B=ZrIkUb~a%`SVnT>hZ$^5JB)RB9_nQLNdbwjh<=GAx%PIVxoLAZ8O1SeDCi z#KHIL8QCVA)ZHKV$BpUfo_?=izxTTPeY7C5{fVqcEYt##yaw&}h-`o0?a0{n8=i=V zR{s~rsNPD_DzwDm46&8y@M&Vjk+sJr#;aPy3sq6^&5B;Z#TL`B;XFUcf~=Bi&kt&L zHf!iLTH&7cY}TH`sBBe8JeMC9(usCf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Vcc}-bl%~{|Q z-oZ~);vdl|Jo1{9rs;##b$*BBME}M*!$Smp$JM?GbvMt8pV&k9Bpyg{uAhSca|yuj z?)rD*+0f2vVCF@OmJ{$xuiN0en(#3gYc0>7qk>B$8zjrJ(PzetigtCqD5VdE?zCP~ z2(+$p1vu0FWq{k3Yge!~Nm)oZ15M{Q(#BX4NYJXthW`o>)%zi?o*@Tv7mocCek3oD z=Z}DaHyep$w1&~v?lA5;=f)7>6GKQJ#QR~XlERu48D?^=rRb*L@``ayL3*So77V}+$ zCzI~!zO2bM=!%yLy-EaN+#W0OPe>&D=82UgQ~e3uGWp-%ot^pl-`|~``T5`9ot^pl z-`|~``T5`9ot^n-{{RyJ01p5W0ssK$0000A0ssI23IG6nI1NC`_dnTO-h}B3W@&6? zUuk46WNCU30tkoz0Du4~nSe96Dm>+f;B*SM`{`=Kc5`ZqpfOJMI|wB~a?(O@U4PyI z|025p00008W&i-7XpW^0-frchfo?6*iTVXv;7pYL5NDB)d2$sW`%fi*vN!)`@N5_0 z)@ND>?+jM4FxJ|zdxg-JGoebN;x1s}hfIT`M-}xb3Fw^EZ#Y-*TWPgh(%mJPSW$)< zDsPRYGSqTSCF0@vYdn-9zMgsq;oPOYsvyDAL|bXtJ=K;t!ZMIC@B;}Wc=dm%wa@xi i@|M5<&RpI9af-ek?G9P}IVb7dWEp)#KDf646952JAoc$M literal 0 HcmV?d00001 diff --git a/s/asm b/s/asm new file mode 100644 index 0000000..1b6da74 --- /dev/null +++ b/s/asm @@ -0,0 +1,12 @@ +.key para + +failat 1 +date >t:date +IF not "" EQ "" +gen +copy Node.asm ram:Node.asm +Programs:prog/sc/c/smake ABBSsn +ELSE +gen 13 +Programs:prog/sc/c/smake +ENDIF diff --git a/s/asmd b/s/asmd new file mode 100644 index 0000000..efd98e6 --- /dev/null +++ b/s/asmd @@ -0,0 +1,3 @@ +date >t:date +gen 13 +Programs:prog/sc/c/smake ABBSd diff --git a/s/gen b/s/gen new file mode 100644 index 0000000000000000000000000000000000000000..f6a0721ac682940bdda5bb69d98cea3607c222d6 GIT binary patch literal 1336 zcmcIiUuauZ82@f^k=#R+Sjs3v^q7S;Lg~7!>f9o>X;PA4Z%fi`B8a)^J@@pwn#B8O zS{xEZ#5bY%q(112=u0Ug17T$y_%MB{V~7tjaWA5{G3FSI)y3brX{Npk9`ZZi?|kRG zzu%XSLlpmm`YW~@HN+2rcZlM@Dn9la>H99I+kIQu^bVy@BOW%_|NJ4!BqeEyu~p=f z7HKg_bUB^J>G=%y_*HYgcO^^CFyhx)n!Zh>eU3V_L3Adqs~T!z!Om>h0IF>M%Uy*#MdmME3(+HW8K;_uU{S1 zX!!x7Et!t^C#e2X?onLZ1piF3DE}S!NB#cPJgQ&8H7Qf+RTa(kyUjwB>5v(gf8jiG z)495(OgTgKw**lknIi76+Pj%@bk3zlWHMrjjXZ9yKZv>Zdb|p+=S~t0VUiC-6HdhP zbf@vp34VZ@B;`qe_9tC8!%PC_q5TwfxP7L}aASs@UUlTeh2GBW)Ye(0tTG-AjmX1a zz)$9|GdYI+ez|`wPZMG3NUA zH*@hcO$?o{cAe{KqeH2mx8X+Gxo@1Ch1A-6<_l(cAXc89)SSKLsq%EWFiBE>`}{<# zJT*yCEaYODN6b)7EB-sSht&7@tpQyi4?F>6fro)TfO@aDfZu@2z$HMvQsun?ds^FIL!YH0q^A;~-;4i>0}F{xk>mTZSQC2|0mzOKn@& ze;>Vea7uW#8)Y(&=MFhfHigZYGBD<*XKM4zu$RW0#we#zW|Yk09An2zwR&aVj8u(- z#!+7I!jr=1F0Z$&j=$UvSgmxt64k&M?ZCr#+pT{q=Ef&R4Sc=0?BZLW2g`!*7LIYZ z9ovMTw1uK10=06v#ACIA2c literal 0 HcmV?d00001 diff --git a/s/log b/s/log new file mode 100644 index 0000000000000000000000000000000000000000..6a5177d8bcf73e02343933823da31187c46c33df GIT binary patch literal 700 zcmX|3`?Cfy~hbrF;vdKlIv6p1kh4_bo6pTii!9=6hhC$o)-La8M`r3DWg z)Z$USwFeKLB?rNSMPyU)=sV~!)C93<@rC%p;_o)O|jBcZ(8FQesd-|9d>yuS-|yku(NS>829_t(UsZgK8`|| zjp?M==Z|ROBv)bVEpJm_4irT0-+5;WUjG_Eg76* z6ZQ5{hOZ z%Sm*)$Mzbb(-nGUrV%bYd>jbf=|=xc&m%NU@6&oAAotu$}83!U{&w2X8A0rc&< AumAu6 literal 0 HcmV?d00001 diff --git a/tables.asm b/tables.asm new file mode 100644 index 0000000..8d006f4 --- /dev/null +++ b/tables.asm @@ -0,0 +1,237 @@ + ***************************************************************** + * + * NAME + * Tables.asm + * + * DESCRIPTION + * Misc tables for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: tables.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: tables.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + include 'first.i' + include 'tables.i' + include 'exec/types.i' + include 'intuition/intuition.i' + include 'asm.i' + + section data,data + + XDEF NewWindowStructure1 + XDEF windowtags + XDEF firstzoom + XDEF warningtimearr + XDEF daytext + XDEF monthtext + XDEF xprbaudates + XDEF convertISOtoxxx + XDEF convertxxxtoISO + XDEF charsettext + XDEF transwhat7bitchar + XDEF fraISO7tilISO8 + XDEF fraISO8tilISO7 + XDEF fraISOtilIBN + XDEF fraIBNtilISO + XDEF fraISOtilMAC + XDEF fraMACtilISO + XDEF windowtagssize + +minwindowx = 272 ; obs! også i node.asm!! +minwindowy = 30 ; obs! også i node.asm!! + +maxwindowx = -1 ; obs! også i node.asm!! +maxwindowy = -1 ; obs! også i node.asm!! + + +warningtimearr dc.b 0,1,3,5,15,30,45,60 + +daytext dc.b 'Monday',0,0,0,0 + dc.b 'Tuesday',0,0,0 + dc.b 'Wednesday',0 + dc.b 'Thursday',0,0 + dc.b 'Friday',0,0,0,0 + dc.b 'Saturday',0,0 + dc.b 'Sunday',0 + +monthtext + dc.b 'January',0,0,0 + dc.b 'February',0,0 + dc.b 'March',0,0,0,0,0 + dc.b 'April',0,0,0,0,0 + dc.b 'May',0,0,0,0,0,0,0 + dc.b 'June',0,0,0,0,0,0 + dc.b 'July',0,0,0,0,0,0 + dc.b 'August',0,0,0,0 + dc.b 'September',0 + dc.b 'October',0,0,0 + dc.b 'November',0,0 + dc.b 'December',0 + + cnop 0,4 + +xprbaudates + dc.l 110 + dc.l 300 + dc.l 1200 + dc.l 2400 + dc.l 4800 + dc.l 9600 + dc.l 19200 + dc.l 31250 + dc.l 38400 + dc.l 57600 + dc.l 76800 + dc.l 115200 + +convertISOtoxxx + dc.l 0 + dc.l fraISOtilIBM + dc.l fraISOtilIBN + dc.l fraISOtilMAC + +convertxxxtoISO + dc.l 0 + dc.l fraIBMtilISO + dc.l fraIBNtilISO + dc.l fraMACtilISO + +charsettext + dc.b 'ISO',0 + dc.b 'IBM',0 + dc.b 'IBN',0 + dc.b 'US7',0 + dc.b 'UK7',0 + dc.b 'GE7',0 + dc.b 'FR7',0 + dc.b 'SF7',0 + dc.b 'NO7',0 + dc.b 'DE7',0 + dc.b 'SP7',0 + dc.b 'IT7',0 + dc.b 'MAC',0,0,0 + +fraISOtilIBM +fraISOtilIBN + dc.b 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,173,155,156,0,157,124,0,0,0,166,174,0,0,0,0 + dc.b 248,241,253,0,0,230,0,0,0,0,167,175,172,171,0,168 + dc.b 'A','A','A','A',142,143,146,128,'E',144,'E','E','I','I','I','I' + dc.b 0,165,'O','O','O','O',148,0,157,'U','U','U',154,'Y',0,225 + dc.b 133,160,131,'a',132,134,145,135,138,130,136,137,'i',161,140,139 + dc.b 0,164,149,162,147,'o',148,0,155,151,163,150,129,'y',0,152 + +fraIBNtilISO +fraIBMtilISO + dc.b $c7,$fc,$e9,$e2,$e4,$e0,$e5,$e7,$ea,$eb,$e8,$ef,$ee,$ec,$c4,$c5 + dc.b $c9,$e6,$c6,$f4,$f6,$f2,$fb,$f9,0,$d6,$dc,$f8,$a3,$d8,0,0 + dc.b $e1,$ed,$f3,$fa,$f1,$d1,$aa,$ba,$bf,0,0,$bd,$bc,$a1,$ab,$bb + dc.b 0,$7f,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,$df,0,0,0,0,$b5,0,0,0,0,0,0,0,0,0 + dc.b 0,$b1,0,0,0,0,0,0,$b0,0,0,0,0,$b2,0,0 + +fraMACtilISO + dc.b 196,32,199,201,209,214,220,225,224,226,228,227,229,32,233,232 + dc.b 234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252 + dc.b 32,32,231,163,167,183,182,223,174,169,32,180,168,32,198,187 + dc.b 32,177,32,32,32,181,240,32,32,32,32,170,186,32,230,248 + dc.b 191,161,172,32,32,32,208,171,32,32,32,192,197,213,32,32 + dc.b 32,32,32,32,32,32,247,32,255,32,32,164,32,32,32,32 + dc.b 32,32,32,32,32,194,202,193,203,200,205,206,207,204,211,212 + dc.b 32,210,32,32,32,185,32,32,175,32,32,176,32,32,32,32 + +fraISOtilMAC + dc.b 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32 + dc.b 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32 + dc.b 32,193,162,163,219,164,124,164,172,169,187,199,194,158,168,248 + dc.b 251,177,32,32,171,181,166,165,44,245,188,175,32,32,32,192 + dc.b 203,231,229,204,128,204,174,130,233,131,230,232,237,234,235,236 + dc.b 198,132,241,238,239,205,133,32,191,157,156,158,134,32,32,167 + dc.b 136,135,137,139,138,140,190,162,143,142,144,145,147,146,148,149 + dc.b 182,150,152,151,153,155,154,214,191,157,156,158,159,32,32,216 + +; # 23 - 0,@ 40 - 1 taes manuellt +; [ 5b - 2,\ 5c - 3,] 5d - 4,^ 5e - 5,` 60 - 6,{ 7b - 7,| 7c - 8,} 7d - 9,~ 7e - 10 +transwhat7bitchar ; starter på $5b + dc.b 2,3,4,5,0 + dc.b 6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + dc.b 0,0,0,0,0,0,0,0,0,0,0,7,8,9,10,0 + +fraISO7tilISO8 +fraISO8tilISO7 + dc.b '#','@','[','\',']','^','`','{','|','}','~' ;us7 + dc.b $A3,'@','[','\',']','^','`','{','|','}','~' ;uk7 + dc.b '#',$A7,$C4,$D6,$DC,'^','`',$E4,$F6,$FC,$DF ;ge7 + dc.b $A3,$E0,$B0,$E7,$A7,'^','`',$E9,$F9,$E8,'~' ;fr7 + dc.b '#',$C9,$C4,$D6,$C5,$DC,$E9,$E4,$F6,$E5,$FC ;sf7 + dc.b '#','@',$C6,$D8,$C5,'^','`',$E6,$F8,$E5,'~' ;no7 + dc.b '#','@',$C6,$D8,$C5,$DC,'`',$E6,$F8,$E5,$FC ;de7 + dc.b $A3,$A7,$A1,$D1,$BF,'^','`',$B0,$F1,$E7,'~' ;sp7 + dc.b $A3,$A7,$B0,$E7,$E9,'^',$F9,$E0,$F2,$E8,$EC ;it7 + +NewWindowStructure1 + dc.w 0,11 + dc.w 640,245 + dc.b 0,1 + dc.l MENUPICK + dc.l SIMPLE_REFRESH+BACKDROP+BORDERLESS+ACTIVATE + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w 90,40 + dc.w -1,-1 + dc.w CUSTOMSCREEN + + IFND WFLG_NEWLOOKMENUS +WFLG_NEWLOOKMENUS EQU $00200000 ; window has NewLook menus + ENDC + +windowtags +;windowwidthoff equ 4 + dc.l WA_Width,640 +;windowheightoff equ 12 + dc.l WA_Height,245 +;windowtitleoff equ 20 + dc.l WA_Title,NULL +;windowtopoff equ 28 + dc.l WA_Top,0 +;windowleftoff equ 36 + dc.l WA_Left,0 +;windowflagsoff equ 44 + dc.l WA_Flags,WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_SIZEGADGET|WFLG_ACTIVATE|WFLG_NEWLOOKMENUS +;windowpubscreenoff equ 52 + dc.l WA_PubScreen,0 + dc.l WA_MinWidth,minwindowx + dc.l WA_MinHeight,minwindowy + dc.l WA_MaxWidth,maxwindowx + dc.l WA_MaxHeight,maxwindowy + dc.l WA_SimpleRefresh,1 + dc.l WA_PubScreenFallBack,1 + dc.l WA_DetailPen,1 + dc.l WA_BlockPen,2 + dc.l WA_IDCMP,IDCMP_MENUPICK+IDCMP_NEWSIZE + dc.l WA_Zoom,firstzoom + dc.l TAG_DONE,0 + + IFNE windowtagssize-(*-windowtags) + FAIL "windowtagssize er feil!!!!" + ENDC + +firstzoom dc.w 0,0,minwindowx,minwindowy + + END diff --git a/transfer.asm b/transfer.asm new file mode 100644 index 0000000..1f5ae0b --- /dev/null +++ b/transfer.asm @@ -0,0 +1,1078 @@ + ***************************************************************** + * + * NAME + * transfer.asm + * + * DESCRIPTION + * transfer rutines + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: transfer.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: transfer.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + include 'first.i' + +; IFND __M68 + include 'exec/types.i' + include 'devices/serial.i' + include 'intuition/intuition.i' +; ENDC + include 'asm.i' + include 'bbs.i' + include 'fse.i' + include 'node.i' + + + XDEF sendfile + XDEF dosendGogR + XDEF doreciveGogR + XDEF receivefile + XDEF shortprotocname + XDEF protoclname + XDEF protocolisbatch + XDEF docheckGogR + + XREF deletefile + XREF dosbase + XREF exebase + XREF findcleanup + XREF initserread + XREF parseprotocol + XREF protocolinitstr + XREF protokollbaser + XREF readlineprompt + XREF setupa4a5 + XREF startyourtext + XREF stopserread + XREF strcopy + XREF traprotocoltext + XREF writecontext + XREF writetext + XREF writetexto + XREF receivetext + XREF trfstatl1text + XREF trfstatl2text + XREF logdlmsgtext + XREF fjernpath + XREF calctime + XREF getfilelen + XREF konverter + XREF konverterw + XREF errorstext + XREF writelogtexttimed + XREF cpstext + XREF serwritestringdo + XREF sendtext + XREF logulmsgtext + XREF toaysopupload + XREF writetosysoptextd + XREF findfirst + XREF findnext + XREF waitseroutput + XREF memcopylen + XREF serwritestringlen + XREF divl + XREF writeconchar + XREF cleartoEOLtext + XREF writecontextrfill + XREF serreadstring + +;nocarrier = 1 + + IFND DEMO +; a0 = filename +sendfile + push a2/a3/d2 + movea.l a0,a2 + move.b #-1,(DlUlstatus,NodeBase) + moveq.l #0,d2 + move.w d2,(tmpword,NodeBase) ; sletter antall errors + move.l d2,(tmpwhilenotinparagon,NodeBase) ; sletter antall bytes + tst.b (readlinemore,NodeBase) ; er det mere innput ? + bne.b 8$ ; jepp. da er det protokoll + move.b (Protocol+CU,NodeBase),d2 + beq.b 8$ + subq.l #1,d2 + bra.b 5$ ; Vi har en protokoll +8$ lea (traprotocoltext),a0 + bsr readlineprompt + beq 9$ + bsr parseprotocol + beq.b 8$ + move.l d0,d2 +5$ lsl.l #2,d2 + lea (startyourtext),a0 + bsr writetext + lea (protoclname),a0 + movea.l (0,a0,d2.w),a0 + bsr writetext + lea (receivetext),a0 + bsr writetexto + move.w (Userbits+CU,NodeBase),d0 + btst #USERB_G_R,d0 + beq.b 4$ + movea.l a2,a0 + move.l d2,d0 + lsr.l #2,d0 + bsr dosendGogR +4$ move.b #0,(DlUlstatus,NodeBase) ; Setter error + lea (protokollinitstr),a0 ; init string + movea.l (0,a0,d2.w),a0 + bsr setup_xprio +; beq.s 9$ ; kan aldri forekomme + movea.l d0,a3 + bsr stopserread + movea.l (dosbase),a6 + lea (tmpdatestamp,NodeBase),a0 ; lagrer start tiden + move.l a0,d1 + jsrlib DateStamp + lea (protokollbaser),a0 + adda.l d2,a0 + movea.l (a0),a6 + movea.l a3,a0 + push d2-d7/a2-a6 + jsr (_LVOXProtocolSetup,a6) + pop d2-d7/a2-a6 + tst.l d0 + beq 1$ + tst.b (Tinymode,NodeBase) ; skriver ut header (hvis ikke + bne.b 6$ ; tiny mode) + move.l a6,-(a7) + movea.l (exebase),a6 + lea (trfstatl1text),a0 + bsr writecontext + lea (trfstatl2text),a0 + bsr writecontext + movea.l (a7)+,a6 +6$ moveq.l #0,d0 ; sletter lagringsstedet + move.l d0,(tmpval,NodeBase) + movea.l a3,a0 + move.l a2,(xpr_filename,a0) + push d2-d7/a2-a6 + jsr (_LVOXProtocolSend,a6) + pop d2-d7/a2-a6 + move.l a6,-(sp) + tst.l d0 + beq.b 2$ + move.b #1,(DlUlstatus,NodeBase) + movea.l (dosbase),a6 ; Sjekker tiden nu + lea (lastchartime,NodeBase),a0 + move.l a0,d1 + jsrlib DateStamp + movea.l (exebase),a6 + lea (logdlmsgtext),a0 + moveq.l #0,d0 ; dette er Download + bsr skrivuldllog +2$ move.l (tmpval,NodeBase),d1 ; lukker filen hvis den er åpen + beq.b 3$ + movea.l (dosbase),a6 + jsrlib Close +3$ moveq.l #0,d0 ; sletter igjen + move.l d0,(tmpval,NodeBase) + movea.l (sp)+,a6 + movea.l a3,a0 + move.l #0,(xpr_filename,a0) + push d2-d7/a2-a6 + jsr (_LVOXProtocolCleanup,a6) + pop d2-d7/a2-a6 +1$ movea.l (exebase),a6 +; move.l a3,a0 +; bsr clear_xprio (ingenting å gjøre...) +9$ pop a2/a3/d2 + bsr initserread + moveq.l #0,d0 + move.l d0,(SerTotOut,NodeBase) ; empty counter + move.b (batch,NodeBase),d1 + beq.b 91$ + move.b d0,(batch,NodeBase) + bsr findcleanup +91$ tst.b (DlUlstatus,NodeBase) + rts + + + XREF _Write_user_CPS + +;skrivr feks: +;09:35 Downloaded file: (Z) thor21_bbs.lha (1719 cps 1100 s 100 err) +;a2 = filename +;a0 = logfile text +;d0 = 0 -> Download, 1 = upload, 2 = ungrab (ikke skriv i tosysop fila) +skrivuldllog + push d3/a3/d4/d5 + link.w a3,#-160 + move.l a3,d4 + move.l d0,d5 ; husker hva det var + movea.l a0,a3 + move.l sp,a1 ; bruker dette til å lagre str'en i + + move.b #'(',(a1)+ + lea (shortprotocname),a0 + adda.l d2,a0 + bsr strcopy + move.b #')',(-1,a1) + move.b #' ',(a1)+ + movea.l a2,a0 + move.l a1,d3 + bsr fjernpath + movea.l d3,a1 + bsr strcopy + move.b #' ',(-1,a1) + move.b #0,(a1) ; avslutter srtringen for sikkerhetsskyld + move.l a1,d3 ; husker hvor vi var i str'en + lea (lastchartime,NodeBase),a1 ; tiden nå + lea (tmpdatestamp,NodeBase),a0 ; tiden for start av DL. + bsr calctime ; beregner antall sekunder + move.l d0,d2 ; husker antall sek. + beq 3$ ; egentlig umulig, men.. + move.b (batch,NodeBase),d0 ; er det batch ? + beq.b 5$ ; nei, finn størrelsen + move.l (tmpwhilenotinparagon,NodeBase),d0 + beq.b 3$ ; egentlig umulig, men ... + bra.b 4$ +5$ movea.l a2,a0 + move.l (ULfilenamehack,NodeBase),d0 + beq.b 2$ + movea.l d0,a0 +2$ bsr getfilelen + beq.b 3$ +4$ movea.l d3,a0 ; henter ut igjen + move.b #'(',(a0)+ + divu.w d2,d0 ; beregner cps'en + bsr konverterw + movea.l a0,a1 + move.b #' ',(a1)+ + lea (cpstext),a0 + bsr strcopy + subq.l #1,a1 + movea.l a1,a0 + move.l d2,d0 + bsr konverter + movea.l a0,a1 +; move.b #' ',(a1)+ +; move.b #'s',(a1)+ + lea (secstext),a0 + bsr strcopy + subq.l #1,a1 + move.w (tmpword,NodeBase),d0 ; noen error's ? + beq.b 1$ ; nei, ikke noen utskrift + move.b #' ',(-1,a1) + movea.l a1,a0 + jsr (konverterw) + move.b #' ',(a0)+ + movea.l a0,a1 + lea (errorstext),a0 + bsr strcopy + subq.l #1,a1 +1$ move.b #')',(a1)+ + move.b #0,(a1) +3$ movea.l a3,a0 + move.l sp,a1 + bsr writelogtexttimed + cmp.b #1,d5 ; vanlig upload ? + bne.b 6$ ; nei + move.l sp,a1 ; skriver til tosysop fila + lea (toaysopupload),a0 + bsr writetosysoptextd +6$ move.l d4,a3 + +; jsr (_Write_user_CPS) + unlk a3 + pop d3/a3/d4/d5 + rts + +dosendGogR + movem.l d0,-(a7) + bsr fjernpath + move.l a0,-(a7) + lea (tmptext,NodeBase),a1 + lea (vipparamkode),a0 + bsr strcopy + subq.l #1,a1 + movea.l (a7)+,a0 + bsr strcopy + move.b #13,(-1,a1) + move.l (a7)+,d0 + mulu.w #6,d0 + lea (recivefilekoder),a0 + adda.l d0,a0 + bsr strcopy + lea (tmptext,NodeBase),a0 + bsr serwritestringdo + rts + +doreciveGogR + movem.l d0,-(a7) + bsr fjernpath + move.l a0,-(a7) + lea (tmptext,NodeBase),a1 + lea (vipparamkode),a0 + bsr strcopy + subq.l #1,a1 + movea.l (a7)+,a0 + bsr strcopy + move.b #13,(-1,a1) + move.l (a7)+,d0 + mulu.w #6,d0 + lea (sendfilekoder),a0 + adda.l d0,a0 + bsr strcopy + lea (tmptext,NodeBase),a0 + bra serwritestringdo + +docheckGogR + tst.w (CommsPort+Nodemem,NodeBase) + beq.b 9$ + lea (checkG_Rkode),a0 + bsr serwritestringdo + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 + move.l #1000000,d1 ; 1 sek timeout mellom tegnene + jsr (serreadstring) + movea.l a0,a1 + lea (logfilemenutext),a0 + bsr writelogtexttimed +9$ rts + +; a0 = filename +; d0 = 1, ungrab (ikke skriv i tosysop fila) +receivefile + push a2/a3/d2/d3 + movea.l a0,a2 + move.l d0,d3 ; skal vi skrive i tosysop fila ? (1 = nei) + moveq.l #0,d2 + move.w d2,(tmpword,NodeBase) ; sletter antall errors + tst.b (readlinemore,NodeBase) ; er det mere innput ? + bne.b 8$ ; jepp. da er det protokoll + move.b (Protocol+CU,NodeBase),d2 + beq.b 8$ + subq.l #1,d2 + bra.b 5$ ; Vi har en protokoll +8$ lea (traprotocoltext),a0 + bsr readlineprompt + beq 9$ + bsr parseprotocol + beq.b 8$ + move.l d0,d2 +5$ lsl.l #2,d2 + lea (startyourtext),a0 + bsr writetext + lea (protoclname),a0 + movea.l (0,a0,d2.w),a0 + bsr writetext + lea (sendtext),a0 + bsr writetexto + move.w (Userbits+CU,NodeBase),d0 + btst #USERB_G_R,d0 + beq.b 4$ + movea.l a2,a0 + move.l d2,d0 + lsr.l #2,d0 + bsr doreciveGogR +4$ move.b #0,(DlUlstatus,NodeBase) ; Setter error + lea (protokollinitstr),a0 ; init string + movea.l (0,a0,d2.w),a0 + bsr setup_xprio +; beq.s 9$ ; kan aldri forekomme + movea.l d0,a3 + bsr stopserread + movea.l (dosbase),a6 + lea (tmpdatestamp,NodeBase),a0 ; lagrer start tiden + move.l a0,d1 + jsrlib DateStamp + + lea (protokollbaser),a0 + adda.l d2,a0 + movea.l (a0),a6 + movea.l a3,a0 + movem.l d2-d7/a2-a6,-(sp) + jsr (_LVOXProtocolSetup,a6) + movem.l (sp)+,d2-d7/a2-a6 + tst.l d0 + beq 1$ + tst.b (Tinymode,NodeBase) ; skriver ut header (hvis ikke + bne.b 6$ ; tiny mode) + move.l a6,-(a7) + movea.l (exebase),a6 + lea (trfstatl1text),a0 + bsr writecontext + lea (trfstatl2text),a0 + bsr writecontext + movea.l (a7)+,a6 +6$ moveq.l #0,d0 + move.l d0,(tmpval,NodeBase) ; sikrer at verdien er riktig + move.l a2,(xpr_filename,a3) + movea.l a3,a0 + movem.l d2-d7/a2-a6,-(sp) + jsr (_LVOXProtocolReceive,a6) + movem.l (sp)+,d2-d7/a2-a6 + move.l a6,-(sp) + tst.l d0 + beq.b 2$ + move.b #1,(DlUlstatus,NodeBase) + movea.l (dosbase),a6 ; Sjekker tiden nu + lea (lastchartime,NodeBase),a0 + move.l a0,d1 + jsrlib DateStamp + movea.l (exebase),a6 + lea (logulmsgtext),a0 + moveq.l #1,d0 ; dette er Upload + tst.l d3 + beq.b 7$ ; vanelig upload + moveq.l #2,d0 ; dette er ungrab +7$ bsr skrivuldllog +2$ move.l (tmpval,NodeBase),d1 ; lukker filen hvis den er åpen + beq.b 3$ + movea.l (dosbase),a6 + jsrlib Close +3$ moveq.l #0,d0 ; sletter igjen + move.l d0,(tmpval,NodeBase) + movea.l (sp)+,a6 + movea.l a3,a0 + move.l #0,(xpr_filename,a0) + movem.l d2-d7/a2-a6,-(sp) + jsr (_LVOXProtocolCleanup,a6) + movem.l (sp)+,d2-d7/a2-a6 +1$ movea.l (exebase),a6 +; move.l a3,a0 +; bsr clear_xprio (ingenting å gjøre...) +9$ pop a3/a2/d2/d3 + bsr initserread + moveq.l #0,d0 + move.l d0,(SerTotOut,NodeBase) ; empty counter + tst.b (DlUlstatus,NodeBase) + rts + +setup_xprio + push a2 + movea.l a0,a2 + lea (xpriomem,NodeBase),a0 ; clear'er minnet (for sikkerhets skyld) + moveq.l #XPR_IO_SIZEOF,d0 + moveq.l #0,d1 + subq.l #1,d0 +1$ move.b d1,(a0)+ + dbf d0,1$ + + lea (xpriomem,NodeBase),a0 + move.l a2,(xpr_filename,a0) + move.l #fopen,(xpr_fopen,a0) + move.l #fclose,(xpr_fclose,a0) + move.l #fread,(xpr_fread,a0) + move.l #fwrite,(xpr_fwrite,a0) + move.l #sread,(xpr_sread,a0) + move.l #swrite,(xpr_swrite,a0) + move.l #sflush,(xpr_sflush,a0) + move.l #update,(xpr_update,a0) + move.l #chkabort,(xpr_chkabort,a0) + move.l d1,(xpr_chkmisc,a0) + move.l #gets,(xpr_gets,a0) + move.l d1,(xpr_setserial,a0) +; move.l #setserial,xpr_setserial(a0) + move.l #ffirst,(xpr_ffirst,a0) + move.l #fnext,(xpr_fnext,a0) + move.l #finfo,(xpr_finfo,a0) + move.l #fseek,(xpr_fseek,a0) + move.l #XPR_EXTENSION,(xpr_extension,a0) + move.l d1,(xpr_data,a0) + move.l d1,(xpr_options,a0) + move.l #unlink,(xpr_unlink,a0) + move.l d1,(xpr_squery,a0) + move.l d1,(xpr_getptr,a0) + move.l a0,d0 + pop a2 + rts + +ffirst push a4/a5/a6 + bsr setupa4a5 + move.b (batch,NodeBase),d0 + beq.b 1$ + bsr findfirst + beq.b 8$ + move.l (tmpmsgmem,NodeBase),d0 + addq.l #3,d0 + and.l #$fffffffc,d0 + move.l d0,a0 ; findfile struct + lea (ff_full,a0),a0 + move.l a0,(ULfilenamehack,NodeBase) + bsr getfilelen + beq.b 2$ ; error, den kommer vi over senere også.. + add.l d0,(tmpwhilenotinparagon,NodeBase) ; husker størrelsen +2$ moveq.l #1,d0 + bra.b 9$ +1$ exg a0,a1 + bsr strcopy + moveq.l #1,d0 + bra.b 9$ +8$ moveq.l #0,d0 +9$ pop a4/a5/a6 + rts + +fnext push a4/a5/a6 + bsr setupa4a5 + moveq.l #0,d0 + move.b (batch,NodeBase),d0 + beq.b 9$ + bsr findnext + beq.b 8$ + move.l (tmpmsgmem,NodeBase),d0 + addq.l #3,d0 + and.l #$fffffffc,d0 + move.l d0,a0 ; findfile struct + lea (ff_full,a0),a0 + move.l a0,(ULfilenamehack,NodeBase) + bsr getfilelen + beq.b 2$ ; error, den kommer vi over senere også.. + add.l d0,(tmpwhilenotinparagon,NodeBase) ; husker størrelsen +2$ moveq.l #1,d0 + bra.b 9$ +8$ moveq.l #0,d0 +9$ pop a4/a5/a6 + rts + +fopen movem.l d2/d3/a4/a5/a6,-(sp) + move.l a0,d1 + bsr setupa4a5 + move.l (ULfilenamehack,NodeBase),d0 ; Hack for å forhindre filnavn + beq.b 5$ ; overide som Zmodem har. + move.l d0,d1 ; Ja, vi hadde filnavn, bytt. +5$ moveq.l #0,d0 + move.b (a1),d3 + cmpi.b #'r',d3 + bne.b 1$ + move.l #MODE_OLDFILE,d2 + bra.b 4$ +1$ cmpi.b #'w',d3 + bne.b 2$ + move.l #MODE_NEWFILE,d2 + bra.b 4$ +2$ cmpi.b #'a',d3 + bne.b 9$ + move.l #MODE_OLDFILE,d2 +4$ movea.l (dosbase),a6 + jsrlib Open +; tst.l d0 + move.l d0,(tmpval,NodeBase) ; husker fileptr (for å sikre at den er i bruk) + beq.b 9$ + cmpi.b #'a',d3 + bne.b 9$ +; move.l d0,-(a7) + move.l d0,d1 + moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + jsrlib Seek +; move.l (a7)+,d0 + move.l (tmpval,NodeBase),d0 ; henter fileptr +9$ movem.l (sp)+,a6/d2/d3/a4/a5 + rts + +fclose push a4/a5/a6 + bsr setupa4a5 + move.l a0,d1 + movea.l (dosbase),a6 + jsrlib Close + moveq.l #0,d0 + move.l d0,(tmpval,NodeBase) ; husker at den er stengt + pop a4/a5/a6 + rts + +fread movem.l d2/d3/d4/a6,-(sp) + move.l d0,d4 ; block size + beq.b 9$ + move.l d0,d3 + mulu.w d1,d3 + move.l a1,d1 + move.l a0,d2 + movea.l (dosbase),a6 + jsrlib Read + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 8$ + moveq.l #0,d0 + bra.b 9$ +8$ divu.w d4,d0 + andi.l #$ffff,d0 +9$ movem.l (sp)+,a6/d2/d3/d4 + rts + +fwrite movem.l d2/d3/d4/a6,-(sp) + move.l d0,d4 ; block size + beq.b 9$ + move.l d0,d3 + mulu.w d1,d3 + move.l a1,d1 + move.l a0,d2 + movea.l (dosbase),a6 + jsrlib Write + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 8$ + moveq.l #0,d0 + bra.b 9$ +8$ divu.w d4,d0 + andi.l #$ffff,d0 +9$ movem.l (sp)+,a6/d2/d3/d4 + rts + +fseek movem.l d2/d3/a6,-(sp) + move.l d0,d2 + moveq.l #-1,d0 + move.l d1,d3 + bne.b 1$ + moveq.l #OFFSET_BEGINNING,d3 + bra.b 4$ +1$ subq.l #1,d3 + bne.b 2$ + moveq.l #OFFSET_CURRENT,d3 + bra.b 4$ +2$ subq.l #1,d3 + bne.b 9$ + moveq.l #OFFSET_END,d3 +4$ move.l a0,d1 + movea.l (dosbase),a6 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 9$ + moveq.l #0,d0 +9$ movem.l (sp)+,a6/d2/d3 + rts + +finfo moveq.l #2,d1 + cmp.l d1,d0 + bne.b 1$ + moveq.l #1,d0 ; Filtype. Alltid binær. + rts +1$ moveq.l #1,d1 + cmp.l d1,d0 + beq.b 2$ + moveq.l #0,d0 ; ukjent. returner error. + rts +2$ movem.l a6/a4/a5,-(sp) + bsr setupa4a5 + move.l (ULfilenamehack,NodeBase),d0 ; Hack for å forhindre filnavn + beq.b 3$ ; overide som Zmodem har. + movea.l d0,a0 ; Ja, vi hadde filnavn, bytt. +3$ bsr getfilelen + movem.l (sp)+,a6/a4/a5 + rts + +swrite push a6/a4/a5/d2/d3 + movea.l (exebase),a6 + bsr setupa4a5 + move.l d0,d3 + move.l a0,d2 + bsr waitseroutput + move.l (tmpmsgmem,NodeBase),a1 ; Bruker tmpmsgmem til copy space + lea ($400,a1),a1 + move.l d2,a0 + move.l d3,d0 + bsr memcopylen + move.l (tmpmsgmem,NodeBase),a0 + lea ($400,a0),a0 + move.l d3,d0 + bsr serwritestringlen +; bsr serwritestringlendo + pop a6/a4/a5/d2/d3 + rts + +;a0 = buffer +;d0 = len +;d1 = timeout +sread movem.l d2/d3/a2/a6/a4/a5,-(sp) + movea.l (exebase),a6 + bsr setupa4a5 + movea.l a0,a2 ; Buffer + move.l d0,d2 ; lengde vi skal lese + move.l d1,d3 ; timeout +; tst.l d3 ; Har vi timeout ? + bne.b 1$ + movea.l (sreadreq,NodeBase),a1 ; Leser alle tegn i inn buffer + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + movea.l (sreadreq,NodeBase),a1 + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 2$ ; jepp, no CD checking. + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + beq.b 2$ ; Ja, hopp + move.b #NoCarrier,(readcharstatus,NodeBase) + bra 9$ ; No carrier, Logoff !! + ENDC +2$ move.l (IO_ACTUAL,a1),d0 + beq 9$ + cmp.l d0,d2 + bcc.b 3$ + move.l d2,d0 ; Vi har flere uleste bytes enn len. +3$ move.w #CMD_READ,(IO_COMMAND,a1) + move.l a2,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jsrlib DoIO + movea.l (sreadreq,NodeBase),a1 + move.l (IO_ACTUAL,a1),d3 + bra 9$ + +1$ movea.l (sreadreq,NodeBase),a1 ; Setter igang ny request + move.w #CMD_READ,(IO_COMMAND,a1) + move.l a2,(IO_DATA,a1) + move.l d2,(IO_LENGTH,a1) + jsrlib SendIO + move.l d3,d0 + move.l #1000000,d1 + bsr divl + movea.l (timer1req,NodeBase),a1 + move.l d0,(TV_SECS+IOTV_TIME,a1) + move.l d1,(TV_MICRO+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jsrlib SendIO ; Starter timeout'en. +10$ move.l (timer1sigbit,NodeBase),d0 + or.l (sersigbit,NodeBase),d0 + jsrlib Wait + move.l d0,d2 + and.l (sersigbit,NodeBase),d0 + beq.b 4$ + movea.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 4$ + movea.l (timer1req,NodeBase),a1 + bra.b 5$ +4$ and.l (timer1sigbit,NodeBase),d2 + beq.b 10$ + movea.l (timer1req,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 10$ + movea.l (sreadreq,NodeBase),a1 +5$ jsrlib AbortIO + movea.l (timer1req,NodeBase),a1 + jsrlib WaitIO + movea.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + movea.l (sreadreq,NodeBase),a1 + move.l (IO_ACTUAL,a1),d3 + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + movea.l (sreadreq,NodeBase),a1 + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 9$ ; jepp, no CD checking. + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + beq.b 9$ ; Ja, hopp + move.b #NoCarrier,(readcharstatus,NodeBase) + bra.b 6$ + ENDC +9$ move.l d3,d0 + tst.b (readcharstatus,NodeBase) + notz + bne.b 99$ +6$ moveq.l #-1,d0 +99$ movem.l (sp)+,d2/d3/a2/a6/a4/a5 + rts + +sflush movem.l a6/a4/a5,-(sp) + bsr setupa4a5 + movea.l (exebase),a6 + movea.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + movea.l (sreadreq,NodeBase),a1 + move.w #CMD_CLEAR,(IO_COMMAND,a1) ; Flush'es serial buffers + jsrlib DoIO + movem.l (sp)+,a6/a4/a5 + rts + +update push a2/a6/a4/a5/d2/d3 + movea.l a0,a2 + bsr setupa4a5 + movea.l (exebase),a6 + move.l (windowadr,NodeBase),d0 + beq 9$ ; no window + move.l (xpru_updatemask,a2),d0 + move.l d0,d3 + andi.l #XPRUF_ERRORMSG+XPRUF_BLOCKS+XPRUF_BYTES+XPRUF_ERRORS+XPRUF_TIMEOUTS+XPRUF_EXPECTTIME+XPRUF_ELAPSEDTIME+XPRUF_DATARATE,d0 + beq 9$ + tst.b (Tinymode,NodeBase) + bne 9$ + move.b #13,d0 ; starter først på linjen. + bsr writeconchar + move.l (xpru_blocks,a2),d0 + moveq.l #4,d1 + moveq.l #XPRUB_BLOCKS,d2 + bsr 10$ + move.b #' ',d0 + bsr writeconchar + move.l (xpru_bytes,a2),d0 + moveq.l #10,d1 + moveq.l #XPRUB_BYTES,d2 + bsr 10$ + move.b #' ',d0 + bsr writeconchar + movea.l (xpru_elapsedtime,a2),a0 + moveq.l #10,d0 + moveq.l #XPRUB_ELAPSEDTIME,d2 + bsr 20$ + move.b #' ',d0 + bsr writeconchar + movea.l (xpru_expecttime,a2),a0 + moveq.l #10,d0 + moveq.l #XPRUB_EXPECTTIME,d2 + bsr 20$ + move.b #' ',d0 + bsr writeconchar + move.l (xpru_datarate,a2),d0 + moveq.l #4,d1 + moveq.l #XPRUB_DATARATE,d2 + bsr 10$ + move.b #' ',d0 + bsr writeconchar + move.l (xpru_timeouts,a2),d0 + moveq.l #4,d1 + moveq.l #XPRUB_TIMEOUTS,d2 + bsr 10$ + move.b #' ',d0 + bsr writeconchar + move.l (xpru_errors,a2),d0 + moveq.l #4,d1 + moveq.l #XPRUB_ERRORS,d2 + btst d2,d3 ; er denne gyldig ? + beq.b 1$ ; nei + move.w d0,(tmpword,NodeBase) ; lagrer errors +1$ bsr 10$ + move.b #' ',d0 + bsr writeconchar + move.l (xpru_updatemask,a2),d0 ; har vi error melding ? + andi.l #XPRUF_ERRORMSG,d0 + beq.b 8$ ; nei, ut + movea.l (xpru_errormsg,a2),a0 ; skriver den ut + bsr writecontext + move.b #10,d0 ; ny linje + bsr writeconchar +8$ lea (cleartoEOLtext),a0 ; sletter alt etter + bsr writecontext +9$ pop a2/a6/a4/a5/d2/d3 + rts + +10$ btst d2,d3 ; er denne gyldig ? + bne.b 11$ ; ja + move.l d1,d0 ; nei, hopper over plassene + bra 30$ +11$ move.l d1,-(a7) ; skriver ut tallet + lea (tmptext,NodeBase),a0 + bsr konverter + move.l (a7)+,d0 + lea (tmptext,NodeBase),a0 ; og fyller ut alle plassene + bra writecontextrfill + +20$ btst d2,d3 ; er denne gyldig ? + beq.b 30$ ; nei, hopper over plassene + bra writecontextrfill + +; d0 = antall posisjoner +30$ lea (tmptext,NodeBase),a0 + move.b #$9b,(a0)+ + bsr konverter + move.b #'C',(a0)+ + move.b #0,(a0) + lea (tmptext,NodeBase),a0 + bra writecontext + +chkabort + push a4/a5 + bsr setupa4a5 + moveq.l #0,d0 + tst.b (readcharstatus,NodeBase) + beq.b 9$ + moveq.l #-1,d0 +9$ pop a4/a5 + rts + +gets moveq.l #0,d0 + rts + +unlink movem.l a6/a4/a5,-(sp) + movea.l (exebase),a6 + bsr setupa4a5 + bsr deletefile + tst.w d0 + bne.b 1$ + moveq.l #-1,d0 + bra.b 9$ +1$ moveq.l #0,d0 +9$ movem.l (sp)+,a6/a4/a5 + rts + + IFD notyet +setserial + movem.l d2/a6/a4/a5,-(sp) + move.l d0,d2 + movea.l (exebase),a6 + bsr setupa4a5 + movea.l (sreadreq,NodeBase),a1 + moveq.l #12*4,d0 +1$ subq.l #4,d0 + bcs.b 2$ + move.l (IO_BAUD,a1),d1 + lea (xprbaudates),a0 + cmp.l (0,a0,d0.w),d1 + bne.b 1$ + lsr.l #2,d0 +2$ andi.l #$ff,d0 + swap d0 + moveq #0,d1 + move.b (IO_EXTFLAGS+3,a1),d1 + cmpi.b #8,(IO_READLEN,a1) + beq.b 3$ + bset #3,d1 +3$ cmpi.b #8,(IO_WRITELEN,a1) + beq.b 4$ + bset #4,d1 +4$ cmpi.b #1,(IO_STOPBITS,a1) + beq.b 5$ + bset #2,d1 +5$ lsl.w #8,d1 + or.w d1,d0 + move.b (IO_SERFLAGS,a1),d0 + moveq.l #-1,d1 + cmp.l d2,d1 + beq 9$ + move.l d0,d2 + + move.b (IO_SERFLAGS,a1),-(sp) + move.b (IO_READLEN,a1),-(sp) + move.b (IO_WRITELEN,a1),-(sp) + move.b (IO_STOPBITS,a1),-(sp) + move.l (IO_BAUD,a1),-(sp) + move.b (IO_EXTFLAGS+3,a1),d1 + move.w d1,-(sp) + + movea.l (sreadreq,NodeBase),a1 + move.b d0,(IO_SERFLAGS,a1) + swap d0 + lsl.w #2,d0 + + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_Lockedbaud,d1 + bne.b 10$ + lea (xprbaudates),a0 + move.l (0,a0,d0.w),(IO_BAUD,a1) +10$ swap d0 + lsr.w #8,d0 + move.b #8,(IO_READLEN,a1) + move.b #8,(IO_WRITELEN,a1) + move.b #1,(IO_STOPBITS,a1) + btst #3,d0 + beq.b 71$ + move.b #7,(IO_READLEN,a1) +71$ btst #4,d0 + beq.b 72$ + move.b #7,(IO_WRITELEN,a1) +72$ btst #2,d0 + beq.b 73$ + move.b #2,(IO_STOPBITS,a1) +73$ andi.w #$3,d0 + move.b d0,(IO_EXTFLAGS+3,a1) + move.w #SDCMD_SETPARAMS,(IO_COMMAND,a1) + jsrlib DoIO + tst.l d0 + beq.b 6$ + movea.l (sreadreq,NodeBase),a1 + move.w (sp)+,d1 + move.b (sp)+,(IO_EXTFLAGS+3,a1) + + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_Lockedbaud,d0 + bne.b 12$ + addq.l #4,sp + bra.b 11$ +12$ move.l (sp)+,(IO_BAUD,a1) +11$ move.b (sp)+,(IO_STOPBITS,a1) + move.b (sp)+,(IO_WRITELEN,a1) + move.b (sp)+,(IO_READLEN,a1) + move.b (sp)+,(IO_SERFLAGS,a1) + move.w #SDCMD_SETPARAMS,(IO_COMMAND,a1) + jsrlib DoIO + moveq.l #-1,d0 + bra.b 9$ +6$ lea (10,sp),sp + move.l d2,d0 +9$ movem.l (sp)+,a6/a4/a5/d2 + rts + ENDC + + ENDC + section data,data + +; protokollinfo (koden forutsetter 4 tegn) +shortprotocname dc.b 'Z',0,0,0 + dc.b 'X',0,0,0 + dc.b 'C',0,0,0 + dc.b 'Y',0,0,0 + dc.b 'YB',0,0 + dc.b 'YG',0,0 + dc.b 0,0 + +protocolisbatch dc.b 1,0,0,0,1,0 + +protokollinitstr + dc.l xprzmodeminitst + dc.l xprxmodeminitst + dc.l xprxcmodeminits + dc.l xprymodeminitst + dc.l xprybmodeminits + dc.l xprygmodeminits + +protoclname dc.l zmodemtext + dc.l xmodemtext + dc.l xcmodemtext + dc.l ymodemtext + dc.l ybmodemtext + dc.l ygmodemtext + +xprzmodeminitst dc.b 'TN OS B16 F0 AN DN KN SN RN PABBS:FILES/',0 +xprxmodeminitst dc.b 'YS,Z1,C0,B0',0 +xprxcmodeminits dc.b 'YS,Z1,C1,B0',0 +xprymodeminitst dc.b 'YS,Z1,C1,B1',0 +xprybmodeminits dc.b 'YB,Z1',0 +xprygmodeminits dc.b 'YG,Z1',0 + +zmodemtext dc.b 'Zmodem',0 +xmodemtext dc.b 'Xmodem',0 +xcmodemtext dc.b 'Xmodem-CRC',0 +ymodemtext dc.b 'Ymodem',0 +ybmodemtext dc.b 'Ymodem batch',0 +ygmodemtext dc.b 'Ymodem-G',0 + +checkG_Rkode dc.b 27,'[97x',0 +vipparamkode dc.b 27,'[17x',0 +recivefilekoder dc.b 27,'[49x',0 ; z modem + dc.b 27,'[29x',0 ; x modem + dc.b 27,'[29x',0 ; x modem ikke CRC ... + dc.b 27,'[39x',0 ; y modem + dc.b 27,'[59x',0 ; y modem batch + dc.b 27,'[89x',0 ; y modem-G + +sendfilekoder dc.b 27,'[48x',0 ; z modem + dc.b 27,'[28x',0 ; x modem + dc.b 27,'[28x',0 ; x modem ikke CRC ... + dc.b 27,'[38x',0 ; y modem + dc.b 27,'[58x',0 ; y modem batch + dc.b 27,'[88x',0 ; y modem-G + +logfilemenutext dc.b 'Entered file menu:',0 +secstext dc.b ' secs',0 + + cnop 0,4 + + END diff --git a/util/Broadcast.asm b/util/Broadcast.asm new file mode 100644 index 0000000..a696383 --- /dev/null +++ b/util/Broadcast.asm @@ -0,0 +1,306 @@ +****************************************************************************** +****** ****** +****** Broadcast - Adds a file to a file dir. ****** +****** ****** +****** Broadcast ****** +****** ****** +****************************************************************************** + +RamBlock equr a4 + + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/ports.i' + include 'exec/io.i' + include 'exec/memory.i' + include 'exec/tasks.i' + + include 'asm.i' + include 'bbs.i' + + STRUCTURE ramblocks,0 + STRUCT msg,ABBSmsg_SIZE + STRUCT tmptext,160 + LABEL ramblocks_SIZE + +start move.l 4,a6 + move.l d0,d2 + move.l a0,a2 + openlib dos + lea mainmsgportname,a1 + jsrlib FindPort + tst.l d0 + bne.s 1$ + lea noporttext,a0 + bsr writedostext + bra 9$ + +1$ bsr parsecomandline + beq 9$ + move.l #ramblocks_SIZE,d0 + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + move.l d0,RamBlock + tst.l d0 + bne.s 3$ + lea notenoughramtxt,a0 + bsr writedostext + bra 9$ + +3$ lea tmpportname,a0 + moveq.l #0,d0 + bsr CreatePort + bne.s 4$ + lea nocporttext,a0 + bsr writedostext + bra 8$ +4$ move.l d0,port + lea msg(RamBlock),a0 + move.l d0,MN_REPLYPORT(a0) + + move.l nodenr,a0 + bsr inputnr + bpl.s 2$ + lea illigalnrtext,a0 + bra.s 6$ + +2$ move.l d0,d2 + lea tmptext(RamBlock),a2 + lea i_msg(a2),a1 + move.l text,a0 + moveq.l #80,d0 + bsr strcopymaxlen + move.b #2,i_type(a2) + move.w #0,i_franode(a2) + move.l a2,a0 ; sender meldingen + move.l d2,d0 + bsr sendintermsg + beq.s 7$ + lea nactiveusertext,a0 + cmp.w #Error_No_Active_User,d1 + beq.s 6$ + lea errnodemsgtext,a0 +6$ bsr writedostext + +7$ move.l port,a0 + bsr DeletePort +8$ move.l RamBlock,a1 + move.l #ramblocks_SIZE,d0 + jsrlib FreeMem +9$ closlib dos +no_dos moveq.l #0,d0 ; returverdi ? + rts + +inputnr push d3 + moveq.l #0,d0 + moveq.l #0,d3 ; ingen feil + move.l d0,d1 +2$ move.b (a0)+,d1 + beq.s 9$ + sub.b #'0',d1 + bcs.s 1$ + cmp.b #10,d1 + bcc.s 1$ + mulu #10,d0 + add.l d1,d0 + bra.s 2$ +1$ moveq.l #-1,d3 +9$ and.l #$ffff,d0 + move.l d3,d1 + pop d3 + tst.l d1 + rts + +parsecomandline + move.l a2,a0 + + cmp.b #' ',(a0) + bne.s 1$ + addq.l #1,a0 + subq.l #1,d2 + bcs.s 8$ + +1$ move.b (a0)+,d0 + beq.s 8$ + subq.l #1,d2 + bcs.s 8$ + cmp.b #' ',d0 + bne.s 1$ + move.b #0,-1(a0) + move.l a2,nodenr + move.l a0,a2 + +3$ move.b (a0)+,d0 + beq.s 4$ + subq.l #1,d2 + bcs.s 4$ + cmp.b #10,d0 + bne.s 3$ +; text kan ha spaces.. +4$ move.b #0,-1(a0) + move.l a2,text + clrz + rts +8$ lea usagetext,a0 + bsr writedostext + setz + rts + +; sendintermsg (intermsgstruct,receivenode) +; a0.l d0.l +sendintermsg + lea msg(RamBlock),a1 + move.w #Main_BroadcastMsg,m_Command(a1) + move.l a0,m_Data(a1) + move.l d0,m_UserNr(a1) + bsr handlemsg + lea msg(RamBlock),a1 + move.w m_Error(a1),d1 + cmp.w #Error_OK,d1 + rts + +handlemsg + move.l a1,-(a7) + jsrlib Forbid + lea mainmsgportname,a1 + jsrlib FindPort + move.l (a7)+,a1 + tst.l d0 + beq.s 9$ + move.l d0,a0 + jsrlib PutMsg + jsrlib Permit +1$ move.l port,a0 + jsrlib WaitPort + tst.l d0 + beq.s 1$ + move.l port,a0 + jsrlib GetMsg + tst.l d0 + beq.s 1$ + rts +9$ jsrlib Permit + setz + rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) +;outputs: msgport (d0) +****************************** +CreatePort + movem.l d2/d3/a2/a3,-(sp) + move.l a0,a2 + move.l d0,d3 + move.l #MP_SIZE,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.s 1$ + move.l d0,a3 + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + beq.s 2$ + move.b d0,MP_SIGBIT(a3) + sub.l a1,a1 + jsrlib FindTask + move.l d0,MP_SIGTASK(a3) + move.l a2,LN_NAME(a3) + move.b d3,LN_PRI(a3) + move.b #NT_MSGPORT,LN_TYPE(a3) + move.b #PA_SIGNAL,MP_FLAGS(a3) + move.l a3,a1 + jsrlib AddPort + move.l a3,d0 + movem.l (sp)+,a2/a3/d2/d3 + rts + +2$ move.l a3,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem +1$ movem.l (sp)+,a2/a3/d2/d3 + setz + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(sp) + move.l a0,a2 + move.l a0,a1 + jsrlib RemPort + move.b MP_SIGBIT(a2),d0 + jsrlib FreeSignal + move.l a2,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem + move.l (sp)+,a2 + rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen move.l a0,d0 +1$ tst.b (a0)+ + bne.s 1$ + subq.l #1,a0 + sub.l d0,a0 + move.l a0,d0 + rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + +strcopymaxlen +2$ move.b (a0)+,(a1)+ + beq.s 1$ + dbf d0,2$ + bra.s 9$ +1$ move.b #0,(a1)+ + dbf d0,1$ +9$ rts + + DATA + +nodenr dc.l 0 +text dc.l 0 +port dc.l 0 +dosbase dc.l 0 +tmpportname dc.b 'Broadcast port',0 +noporttext dc.b 'Can''t find abbs !',10,0 +nocporttext dc.b 'Couldn''t create port.',10,0 +notenoughramtxt dc.b 'Not enough ram.',10,0 +illigalnrtext dc.b 'Illegal nodenumber.',10,0 +errnodemsgtext dc.b 'Error sending node msg.',10,0 +nactiveusertext dc.b 'No active user on that node!',10,0 +usagetext dc.b 'Usage : Broadcast ',10,0 +dosname dc.b 'dos.library',0 +mainmsgportname dc.b 'ABBS mainport',0 + + END diff --git a/util/Checkusers.asm b/util/Checkusers.asm new file mode 100644 index 0000000..ab5d7e8 --- /dev/null +++ b/util/Checkusers.asm @@ -0,0 +1,428 @@ + include 'abbs:include/first.i' + + include 'exec/types.i' + include 'exec/memory.i' + include 'dos/dosextens.i' + include 'dos/dos.i' + + include 'asm.i' + include 'bbs.i' + + code +start move.l 4,a6 + openlib dos + move.l #ConfigRecord_SIZEOF,d7 ; mem size + add.l #UserRecord_SIZEOF,d7 + lea indexfilename,a0 + bsr getfilelen + beq 9$ + addq.l #1,d0 + and.b #$fe,d0 + add.l d0,d7 + move.l d0,indsize + lea nrindexfilename,a0 + bsr getfilelen + beq 9$ + addq.l #1,d0 + and.b #$fe,d0 + add.l d0,d7 + move.l d0,nrsize + lea userfilename,a0 + bsr getfilelen + beq 9$ + divu #UserRecord_SIZEOF,d0 + moveq.l #0,d1 + move.w d0,d1 + move.l d1,numuser + swap d0 + tst.w d0 + beq.s 1$ + lea wsizeuf,a0 + bsr writedostext + bra 9$ + +1$ move.l d7,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + bne.s 2$ + lea nomemtext,a0 + bsr writedostext + bra 9$ +2$ move.l d0,a5 + move.l a5,configm + move.l a5,a0 + add.l #ConfigRecord_SIZEOF,a0 + move.l a0,tmpuser + add.l #UserRecord_SIZEOF,a0 + move.l a0,nrindex + add.l nrsize,a0 + move.l a0,index + lea indexfilename,a0 + move.l index,a1 + move.l indsize,d0 + bsr readfile + beq.s 8$ + lea nrindexfilename,a0 + move.l nrindex,a1 + move.l nrsize,d0 + bsr readfile + beq.s 8$ + lea configfilename,a0 + move.l configm,a1 + move.l #ConfigRecord_SIZEOF,d0 + bsr readfile + beq.s 8$ + + move.l dosbase,a6 + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 3$ + lea errreadingftext,a0 + bsr writedostext + move.l #userfilename,a0 + bsr writedostext + bsr nl + bra.s 8$ + +3$ moveq.l #0,d0 + move.l d0,ret + bsr do_check + +7$ move.l d4,d1 + jsrlib Close +8$ move.l 4,a6 + move.l d7,d0 + move.l a5,a1 + jsrlib FreeMem +9$ closlib dos +no_dos move.l ret,d0 + rts + +; d4 = serfileptr +do_check + push d7/a3/a4/a5/a2/d6 + moveq.l #0,d7 + move.l configm,a0 + move.l (Users,a0),d6 + move.l nrindex,a5 + move.l index,a4 + move.l tmpuser,a3 + +1$ move.l (a5)+,d0 + cmp.l #-1,d0 + beq.b 1$ ; hopper over denne. Slettet bruker. + mulu #Log_entry_SIZEOF,d0 + move.l a4,a2 + add.l d0,a2 ; log entry'n + + move.l l_UserNr(a2),d0 + cmp.l d0,d7 + beq.s 2$ + move.l #10,ret + move.l d7,d0 + bsr skrivnr + bsr spa + lea piler,a0 + bsr writedostext + bsr spa + move.l l_UserNr(a2),d0 + bsr skrivnr + bsr spa + lea l_Name(a2),a0 + bsr writedostext + bsr nl + +2$ move.l l_RecordNr(a2),d2 + cmp.l numuser,d2 + bls.s 21$ + move.l #10,ret + lea irecnum,a0 + bsr writedostext + bra 8$ + +21$ move.l d4,d1 + mulu #UserRecord_SIZEOF,d2 + moveq.l #OFFSET_BEGINNING,d3 + jsrlib Seek + moveq.l #-1,d1 ; error ? + cmp.l d0,d1 + bne.s 3$ + move.l #10,ret + bsr 10$ + bsr spa + lea seeker,a0 + bsr writedostext + bsr nl + bra 8$ + +3$ move.l d4,d1 + move.l a3,d2 + move.l #UserRecord_SIZEOF,d3 + jsrlib Read + cmp.l d3,d0 + beq.s 4$ + move.l #10,ret + bsr 10$ + bsr spa + lea reader,a0 + bsr writedostext + bsr nl + bra 8$ + +4$ lea l_Name(a2),a0 + lea Name(a3),a1 + bsr comparestrings + beq.s 5$ + move.l #10,ret + bsr 10$ + bsr spa + lea piler,a0 + bsr writedostext + bsr spa + lea Name(a3),a0 + bsr writedostext + bsr nl + +5$ move.l Usernr(a3),d0 + cmp.l d0,d7 + beq.s 6$ + move.l #10,ret + move.l d7,d0 + bsr skrivnr + bsr spa + bsr spa + lea piler,a0 + bsr writedostext + bsr spa + move.l Usernr(a3),d0 + bsr skrivnr + bsr spa + lea l_Name(a2),a0 + bsr writedostext + bsr nl + +6$ + + +8$ addq.l #1,d7 + cmp.l d7,d6 + bhi 1$ + +9$ pop d7/a3/a4/a5/a2/d6 + rts + +10$ move.l d7,d0 + bsr skrivnr + bsr spa + lea l_Name(a2),a0 + bra writedostext + + +spa lea sptext,a0 + bra writedostext + +nl lea nltext,a0 + bra writedostext + +****************************** +;result = comparestrings (streng,streng1) +;Zero bit a0.l a1.l +****************************** +comparestrings +1$ move.b (a0)+,d0 + beq.s 2$ + move.b (a1)+,d1 + beq.s 3$ + cmp.b d0,d1 + bne.s 9$ + bra.s 1$ +2$ tst.b (a1) + rts +3$ clrz +9$ rts + +skrivnr lea tekst,a0 + bsr konverter + lea tekst,a0 + bra writedostext + +; d0 = tall +; a0 = inn streng. +konverterw + and.l #$ffff,d0 +konverter + link a5,#-12 + move.l sp,a1 +1$ moveq.l #10,d1 + bsr divspes + add.w #'0',d1 + move.b d1,(a1)+ + tst.l d0 + bne.s 1$ + move.l a1,d1 + moveq.l #0,d0 +2$ move.b -(a1),(a0)+ + add.l #1,d0 + cmpa.l a1,sp + bne.s 2$ + clr.b (a0) + sub.l sp,d1 + unlk a5 + rts + +divspes move.l d2,-(sp) + swap d1 + move.w d1,d2 + bne.s 9$ + swap d0 + swap d1 + swap d2 + move.w d0,d2 + beq.s 1$ + divu d1,d2 + move.w d2,d0 +1$ swap d0 + move.w d0,d2 + divu d1,d2 + move.w d2,d0 + swap d2 + move.w d2,d1 +9$ move.l (sp)+,d2 + rts + +writedostext + push d2-d3/a6 + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + pop d2-d3/a6 + rts + +;a0 = filename +;a1 = adr +;d0 = size +readfile + push d2-d5/a6/a2 + move.l a0,a2 + move.l dosbase,a6 + move.l d0,d3 + move.l a1,d5 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.s 2$ + move.l d4,d1 + move.l d5,d2 + jsrlib Read + cmp.l d3,d0 + beq.s 1$ + move.l d4,d1 + jsrlib Close +2$ lea errreadingftext,a0 + bsr writedostext + move.l a2,a0 + bsr writedostext + bsr nl + setz + bra.s 9$ +1$ move.l d4,d1 + jsrlib Close + clrz +9$ pop d2-d5/a6/a2 + rts + +getfilelen + push d2/d3/a2 + move.l dosbase,a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.s 1$ + move.l d0,d3 + lea infoblockmem,a0 + move.l a0,d2 + jsrlib Examine + move.l d0,d2 + beq.s 2$ + lea infoblockmem,a0 + move.l fib_Size(a0),d2 +2$ move.l d3,d1 + jsrlib UnLock + move.l d2,d0 + bne.s 9$ +1$ lea cntfindsizetext,a0 + bsr writedostext + move.l a2,a0 + bsr writedostext + bsr nl + setz +9$ move.l 4,a6 + pop d2/d3/a2 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + section bdata,BSS + +infoblockmem + ds.b fib_SIZEOF+2 +tekst ds.b 80 +configm ds.l 1 +tmpuser ds.l 1 +nrindex ds.l 1 +index ds.l 1 +dosbase ds.l 1 +nrsize ds.l 1 +indsize ds.l 1 +numuser ds.l 1 + + section data,data + +ret dc.l 100 + +dosname dc.b 'dos.library',0 +userfilename dc.b 'abbs:config/userfile',0 +indexfilename dc.b 'abbs:config/userfile.index',0 +nrindexfilename dc.b 'abbs:config/userfile.nrindex',0 +configfilename dc.b 'abbs:config/configfile',0 +cntfindsizetext dc.b 'Can''t find size of : ',0 +nomemtext dc.b 'Can''t get memory',10,0 +errreadingftext dc.b 'Error reading file : ',0 + + +nltext dc.b 10,0 +sptext dc.b ' ',0 +piler dc.b '<->',0 +irecnum dc.b 'Illegal record number',10,0 +seeker dc.b 'Seek error' +reader dc.b 'Read error' +wsizeuf dc.b 'Wrong size on userfile',10,0 + END diff --git a/util/ConfigNode.asm b/util/ConfigNode.asm new file mode 100644 index 0000000..37e1af3 --- /dev/null +++ b/util/ConfigNode.asm @@ -0,0 +1,1546 @@ + include 'abbs:first.i' + + include 'exec/types.i' + include 'libraries/dos.i' + include 'intuition/intuition.i' + + include 'asm.i' + include 'bbs.i' + +start move.l 4,a6 + openlib dos + openlib int + move.l d0,a6 + lea NewWindowStructure1,a0 + jsrlib OpenWindow + move.l d0,winadr + beq no_win + move.l d0,a0 + move.l wd_RPort(a0),a0 + lea IntuiTextList1,a1 + moveq.l #0,d0 + moveq.l #0,d1 + jsrlib PrintIText + move.l winadr,a0 + move.l wd_UserPort(a0),msgport + lea Gadget3,a0 + move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l 4,a6 + +vent move.l msgport,a0 + jsrlib WaitPort + tst.l d0 + beq.s vent + move.l msgport,a0 + jsrlib GetMsg + tst.l d0 + beq.s vent + move.l d0,a1 + move.l im_Class(a1),d0 + cmp.l #GADGETUP,d0 + beq.s 1$ +2$ jsrlib ReplyMsg + bra.s vent +1$ move.l im_IAddress(a1),a0 + move.w gg_GadgetID(a0),d2 + beq.s 2$ + jsrlib ReplyMsg + tst.w d2 + bmi 9$ + cmp.w #20,d2 + beq.s 3$ + sub.w #1,d2 + asl.w #2,d2 + lea activetabell,a0 + move.l 0(a0,d2.w),a0 + move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l 4,a6 + bra.s vent +3$ lea Gadget18,a0 + move.w gg_Flags(a0),d0 + and.w #SELECTED,d0 + bne.s 5$ + move.l intbase,a6 + lea Gadget19,a0 + move.l winadr,a1 + sub.l a2,a2 + jsrlib OffGadget + move.l 4,a6 + bra vent +5$ move.l intbase,a6 + lea Gadget19,a0 + move.l winadr,a1 + sub.l a2,a2 + jsrlib OnGadget + lea Gadget19,a0 + move.l winadr,a1 + sub.l a2,a2 + jsrlib ActivateGadget + move.l 4,a6 + bra vent +9$ cmp.w #-3,d2 + beq foo + cmp.w #-2,d2 + bne ut +loadconf + lea Gadget12SIBuff,a0 + tst.b (a0) + bne.s 10$ + lea noftext,a1 + bsr title + bra vent +10$ move.l dosbase,a6 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 20$ + lea nfitext,a1 + bsr title + move.l 4,a6 + bra vent +20$ move.l d4,d1 + move.l #nodecon,d2 + move.l #NodeRecord_SIZEOF,d3 + jsrlib Read + move.l d4,d1 + jsrlib Close + move.l intbase,a6 + move.l winadr,a0 + lea GadgetList1,a1 + moveq.l #-1,d0 + jsrlib RemoveGList + + lea nodecon,a2 + + lea gg_Flags+Gadget1,a0 ; Local ? + and.w #~SELECTED,(a0) + tst.w CommsPort(a2) + bne.s 1$ + or.w #SELECTED,(a0) + move.w #$3000,Gadget3SIBuff ; Skriver '0',0 + bra.s 2$ + +1$ move.w CommsPort(a2),d0 + sub.w #1,d0 + lea Gadget3SIBuff,a0 ; Com port. + bsr itoa + +2$ lea Gadget2+gg_Flags,a0 ; Tiny ? + and.w #~SELECTED,(a0) + tst.b tinymode(a2) + beq.s 3$ + or.w #SELECTED,(a0) + +3$ + lea Gadget4SIBuff,a1 + lea Serialdevicename(a2),a0 + bsr strcopy + + lea Gadget5SIBuff,a1 + lea ModemInitString(a2),a0 + bsr strcopy + lea Gadget5SIBuff,a1 + bsr CTRLtoC + + lea Gadget6SIBuff,a1 + lea ModemOffHookString(a2),a0 + bsr strcopy + lea Gadget6SIBuff,a1 + bsr CTRLtoC + + lea Gadget7SIBuff,a1 + lea ModemOnHookString(a2),a0 + bsr strcopy + lea Gadget7SIBuff,a1 + bsr CTRLtoC + + lea Gadget8SIBuff,a1 + lea ModemCallString(a2),a0 + bsr strcopy + lea Gadget8SIBuff,a1 + bsr CTRLtoC + + lea Gadget9SIBuff,a1 + lea ModemRingString(a2),a0 + bsr strcopy + lea Gadget9SIBuff,a1 + bsr CTRLtoC + + lea Gadget10SIBuff,a1 + lea ModemAnswerString(a2),a0 + bsr strcopy + lea Gadget10SIBuff,a1 + bsr CTRLtoC + + lea Gadget11SIBuff,a1 + lea ModemConnectString(a2),a0 + bsr strcopy + lea Gadget11SIBuff,a1 + bsr CTRLtoC + + lea Gadget16SIBuff,a1 + lea ModemATString(a2),a0 + bsr strcopy + lea Gadget16SIBuff,a1 + bsr CTRLtoC + + lea Gadget17SIBuff,a1 + lea ModemOKString(a2),a0 + bsr strcopy + lea Gadget17SIBuff,a0 + bsr CTRLtoC + + lea Gadget19SIBuff,a0 + move.l NodeBaud(a2),d0 + bsr itoa + + move.w Setup(a2),d0 + + lea Gadget20+gg_Flags,a0 + and.w #~SELECTED,(a0) + btst #SETUPB_XonXoff,d0 + beq.s 4$ + or.w #SELECTED,(a0) + +4$ lea Gadget21+gg_Flags,a0 + and.w #~SELECTED,(a0) + btst #SETUPB_RTSCTS,d0 + beq.s 5$ + or.w #SELECTED,(a0) + +5$ lea Gadget18+gg_Flags,a0 + and.w #~SELECTED,(a0) + or.w #GADGDISABLED,Gadget19+gg_Flags + btst #SETUPB_Lockedbaud,d0 + beq.s 6$ + or.w #SELECTED,(a0) + and.w #~GADGDISABLED,Gadget19+gg_Flags + +6$ lea Gadget22+gg_Flags,a0 + and.w #~SELECTED,(a0) + btst #SETUPB_SimpelHangup,d0 + beq.s 7$ + or.w #SELECTED,(a0) + +7$ move.l winadr,a0 + lea GadgetList1,a1 + moveq.l #-1,d0 + moveq.l #-1,d1 + sub.l a2,a2 + jsrlib AddGList + lea GadgetList1,a0 + move.l winadr,a1 + moveq.l #-1,d0 + sub.l a2,a2 + jsrlib RefreshGList + lea Gadget3,a0 + move.l winadr,a1 + sub.l a2,a2 + jsrlib ActivateGadget + move.l 4,a6 + bra vent + +foo bsr testgadgets + beq vent + + lea nodecon,a2 + move.l a2,a0 + move.w #NodeRecord_SIZEOF,d0 + bsr memclr + + move.w gg_Flags+Gadget1,d0 ; Local ? + and.w #SELECTED,d0 + beq.s 1$ + clr.w CommsPort(a2) + bra.s 2$ +1$ lea Gadget3SIBuff,a0 ; Com port. + bsr atoi + add.w #1,d0 + move.w d0,CommsPort(a2) +2$ move.w Gadget2+gg_Flags,d0 ; Tiny ? + move.b #0,tinymode(a2) + and.w #SELECTED,d0 + beq.s 3$ + move.b #1,tinymode(a2) +3$ + lea Gadget4SIBuff,a0 + lea Serialdevicename(a2),a1 + bsr strcopy + + lea Gadget5SIBuff,a0 + lea ModemInitString(a2),a1 + bsr strcopy + + lea Gadget6SIBuff,a0 + lea ModemOffHookString(a2),a1 + bsr strcopy + + lea Gadget7SIBuff,a0 + lea ModemOnHookString(a2),a1 + bsr strcopy + + lea Gadget8SIBuff,a0 + lea ModemCallString(a2),a1 + bsr strcopy + + lea Gadget9SIBuff,a0 + lea ModemRingString(a2),a1 + bsr strcopy + + lea Gadget10SIBuff,a0 + lea ModemAnswerString(a2),a1 + bsr strcopy + + lea Gadget11SIBuff,a0 + lea ModemConnectString(a2),a1 + bsr strcopy + + lea Gadget16SIBuff,a0 + lea ModemATString(a2),a1 + bsr strcopy + + lea Gadget17SIBuff,a0 + lea ModemOKString(a2),a1 + bsr strcopy + + lea Gadget19SIBuff,a0 + bsr atoi + move.l d0,NodeBaud(a2) + + move.w #0,Setup(a2) + + move.w Gadget20+gg_Flags,d0 + and.w #SELECTED,d0 + beq.s 4$ + or.w #SETUPF_XonXoff,Setup(a2) +4$ + move.w Gadget21+gg_Flags,d0 + and.w #SELECTED,d0 + beq.s 5$ + or.w #SETUPF_RTSCTS,Setup(a2) +5$ + move.w Gadget18+gg_Flags,d0 + and.w #SELECTED,d0 + beq.s 6$ + or.w #SETUPF_Lockedbaud,Setup(a2) +6$ + move.w Gadget22+gg_Flags,d0 + and.w #SELECTED,d0 + beq.s 7$ + or.w #SETUPF_SimpelHangup,Setup(a2) +7$ + + lea Gadget12SIBuff,a0 +20$ move.l dosbase,a6 + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.s ut + move.l d4,d1 + move.l #nodecon,d2 + move.l #NodeRecord_SIZEOF,d3 + jsrlib Write + move.l d4,d1 + jsrlib Close +ut move.l intbase,a6 + move.l winadr,a0 + jsrlib CloseWindow +no_win move.l 4,a6 + closlib int +no_int closlib dos +no_dos rts + +testgadgets + tst.b Gadget3SIBuff ; FLOTT kode !! + beq.s 1$ + tst.b Gadget4SIBuff + beq.s 1$ + tst.b Gadget5SIBuff + beq.s 1$ + tst.b Gadget6SIBuff + beq.s 1$ + tst.b Gadget7SIBuff + beq.s 1$ + tst.b Gadget8SIBuff + beq.s 1$ + tst.b Gadget9SIBuff + beq.s 1$ + tst.b Gadget10SIBuff + beq.s 1$ + tst.b Gadget11SIBuff + beq.s 1$ + tst.b Gadget12SIBuff + beq.s 1$ + tst.b Gadget16SIBuff + beq.s 1$ + tst.b Gadget17SIBuff + beq.s 1$ + lea Gadget18,a0 ; Har vi locked baud rate ? + move.w gg_Flags(a0),d0 + and.w #SELECTED,d0 + beq.s 9$ ; Nei, hopp. + tst.b Gadget19SIBuff + beq.s 1$ +9$ clrz + rts +1$ lea youtext,a1 +3$ bsr title + setz + rts + +title movem.l a6/a2,-(a7) + move.l a1,-(a7) + move.l intbase,a6 + sub.l a0,a0 + jsrlib DisplayBeep + move.l winadr,a0 + move.l (a7)+,a1 + suba.l a2,a2 + jsrlib SetWindowTitles + movem.l (a7)+,a6/a2 + rts + +atoi moveq.l #0,d0 + moveq.l #0,d1 +1$ move.b (a0)+,d1 + beq.s 9$ + sub.b #'0',d1 + mulu #10,d0 + add.l d1,d0 + bra.s 1$ +9$ rts + +; d0 = tall +; a0 = ut streng. +itoa + link a5,#-12 + move.l sp,a1 +1$ moveq.l #10,d1 + bsr divspes + add.w #'0',d1 + move.b d1,(a1)+ + tst.l d0 + bne.s 1$ + move.l a1,d1 + moveq.l #0,d0 +2$ move.b -(a1),(a0)+ + add.l #1,d0 + cmpa.l a1,sp + bne.s 2$ + clr.b (a0) + sub.l sp,d1 + unlk a5 + rts + +divspes move.l d2,-(sp) + swap d1 + move.w d1,d2 + bne.s 9$ + swap d0 + swap d1 + swap d2 + move.w d0,d2 + beq.s 1$ + divu d1,d2 + move.w d2,d0 +1$ swap d0 + move.w d0,d2 + divu d1,d2 + move.w d2,d0 + swap d2 + move.w d2,d1 +9$ move.l (sp)+,d2 + rts + + +CTRLtoC +1$ move.b (a0)+,d0 + beq.s 9$ + cmp.b #10,d0 + bne.s 2$ + move.b #'n',d0 + bra.s 3$ +2$ cmp.b #13,d0 + bne.s 1$ + move.b #'r',d0 +3$ move.b #'\',-1(a0) + move.l a0,-(a7) +5$ move.b (a0),d1 + beq.s 4$ + move.b d0,(a0)+ + move.b d1,d0 + bra.s 5$ +4$ move.b d0,(a0)+ + move.b #0,(a0) + move.l (a7)+,a0 + bra.s 1$ +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,d0 + beq.s 9$ + cmp.b #'\',d0 + beq.s 2$ +3$ move.b d0,(a1)+ + bra.s 1$ +2$ tst.b (a0) + beq.s 3$ + move.b (a0)+,d1 + cmp.b #'r',d1 + bne.s 4$ + move.b #13,(a1)+ + bra.s 1$ +4$ cmp.b #'n',d1 + bne.s 1$ + move.b #10,(a1)+ + bra.s 1$ +9$ move.b d0,(a1) + rts + +****************************** +;strrcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys reversed from a0 to a1 +****************************** +strrcopy + moveq.l #-1,d0 ; Get Strlen. +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 ; D0 = Strlen. + tst.b -(a0) +2$ move.b -(a0),(a1)+ + dbra d0,2$ + rts + +****************************** +;memclr (from,length) +; a0.l d0.w +****************************** +memclr move.l a0,-(a7) + moveq #0,d1 +1$ move.b d1,(a0)+ + dbf d0,1$ + move.l (a7)+,a0 + rts + + DATA +intbase dc.l 0 +dosbase dc.l 0 +winadr dc.l 0 +msgport dc.l 0 +intname dc.b 'intuition.library',0 +dosname dc.b 'dos.library',0 +noftext dc.b 'No file name !',0 +nfitext dc.b 'No file !',0 +youtext dc.b 'You must fill in text/numbers in all collums !',0 + +nodecon dcb.b NodeRecord_SIZEOF,0 + dc.l 0,0 + +activetabell + dc.l Gadget4,Gadget5,Gadget6,Gadget7,Gadget8,Gadget9,Gadget10 + dc.l Gadget11,Gadget16,Gadget17,Gadget12,Gadget3 + +NewWindowStructure1: + dc.w 0,19 + dc.w 640,200 + dc.b 0,1 + dc.l GADGETUP + dc.l WINDOWDRAG+WINDOWDEPTH+ACTIVATE+NOCAREREFRESH + dc.l GadgetList1 + dc.l NULL + dc.l NewWindowName1 + dc.l NULL + dc.l NULL + dc.w 5,5 + dc.w -1,-1 + dc.w WBENCHSCREEN +NewWindowName1: + dc.b 'Config node',0 + cnop 0,2 +UNDOBUFFER: + dcb.b 61,0 + cnop 0,2 +GadgetList1: +Gadget1: + dc.l Gadget2 + dc.w 6,14 + dc.w 87,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border1 + dc.l NULL + dc.l IText1 + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Border1: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors1 + dc.l NULL +BorderVectors1: + dc.w 0,0 + dc.w 88,0 + dc.w 88,11 + dc.w 0,11 + dc.w 0,0 +IText1: + dc.b 3,0,RP_JAM2,0 + dc.w 4,1 + dc.l NULL + dc.l ITextText1 + dc.l NULL +ITextText1: + dc.b 'Local node',0 + cnop 0,2 +Gadget2: + dc.l Gadget3 + dc.w 6,27 + dc.w 76,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border2 + dc.l NULL + dc.l IText2 + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Border2: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors2 + dc.l NULL +BorderVectors2: + dc.w 0,0 + dc.w 77,0 + dc.w 77,11 + dc.w 0,11 + dc.w 0,0 +IText2: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText2 + dc.l NULL +ITextText2: + dc.b 'Tiny Mode',0 + cnop 0,2 +Gadget3: + dc.l Gadget4 + dc.w 232,14 + dc.w 26,8 + dc.w NULL + dc.w RELVERIFY+LONGINT + dc.w STRGADGET + dc.l Border3 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget3SInfo + dc.w 1 + dc.l NULL +Gadget3SInfo: + dc.l Gadget3SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 3 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget3SIBuff: + dc.b '0',0 +PWstringlen set *-Gadget3SIBuff + dcb.b 3-PWstringlen,0 + cnop 0,2 +Border3: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors3 + dc.l NULL +BorderVectors3: + dc.w 0,0 + dc.w 27,0 + dc.w 27,9 + dc.w 0,9 + dc.w 0,0 +Gadget4: + dc.l Gadget5 + dc.w 232,25 + dc.w 320,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget4SInfo + dc.w 2 + dc.l NULL +Gadget4SInfo: + dc.l Gadget4SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 41 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget4SIBuff: + dc.b 'serial.device',0 +PWstringlen set *-Gadget4SIBuff + dcb.b 41-PWstringlen,0 + cnop 0,2 +Border4: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors4 + dc.l NULL +BorderVectors4: + dc.w 0,0 + dc.w 321,0 + dc.w 321,9 + dc.w 0,9 + dc.w 0,0 +Gadget5: + dc.l Gadget6 + dc.w 179,40 + dc.w 456,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border5 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget5SInfo + dc.w 3 + dc.l NULL +Gadget5SInfo: + dc.l Gadget5SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 61 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget5SIBuff: + dc.b 'AT&FS0=0&C1&D2H0E0&G0+C0+M2',0 +PWstringlen set *-Gadget5SIBuff + dcb.b 61-PWstringlen,0 + cnop 0,2 +Border5: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors5 + dc.l NULL +BorderVectors5: + dc.w 0,0 + dc.w 457,0 + dc.w 457,9 + dc.w 0,9 + dc.w 0,0 +Gadget6: + dc.l Gadget7 + dc.w 179,52 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget6SInfo + dc.w 4 + dc.l NULL +Gadget6SInfo: + dc.l Gadget6SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget6SIBuff: + dc.b 'ATH1',0 +PWstringlen set *-Gadget6SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border6: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors6 + dc.l NULL +BorderVectors6: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget7: + dc.l Gadget8 + dc.w 179,64 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border7 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget7SInfo + dc.w 5 + dc.l NULL +Gadget7SInfo: + dc.l Gadget7SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget7SIBuff: + dc.b 'ATH0',0 +PWstringlen set *-Gadget7SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border7: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors7 + dc.l NULL +BorderVectors7: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget8: + dc.l Gadget9 + dc.w 179,76 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget8SInfo + dc.w 6 + dc.l NULL +Gadget8SInfo: + dc.l Gadget8SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget8SIBuff: + dc.b 'ATDT',0 +PWstringlen set *-Gadget8SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border8: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors8 + dc.l NULL +BorderVectors8: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget9: + dc.l Gadget10 + dc.w 179,88 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border9 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget9SInfo + dc.w 7 + dc.l NULL +Gadget9SInfo: + dc.l Gadget9SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget9SIBuff: + dc.b 'RING',0 +PWstringlen set *-Gadget9SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border9: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors9 + dc.l NULL +BorderVectors9: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget10: + dc.l Gadget11 + dc.w 179,100 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget10SInfo + dc.w 8 + dc.l NULL +Gadget10SInfo: + dc.l Gadget10SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget10SIBuff: + dc.b 'ATA',0 +PWstringlen set *-Gadget10SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border10: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors10 + dc.l NULL +BorderVectors10: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget11: + dc.l Gadget12 + dc.w 179,112 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border11 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget11SInfo + dc.w 9 + dc.l NULL +Gadget11SInfo: + dc.l Gadget11SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget11SIBuff: + dc.b 'CONNECT',0 +PWstringlen set *-Gadget11SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border11: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors11 + dc.l NULL +BorderVectors11: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget12: + dc.l Gadget13 + dc.w 179,-29 + dc.w 456,8 + dc.w GRELBOTTOM + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget12SInfo + dc.w 12 + dc.l NULL +Gadget12SInfo: + dc.l Gadget12SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 61 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget12SIBuff: + dc.b 'abbs:config/node1.config',0 +PWstringlen set *-Gadget12SIBuff + dcb.b 61-PWstringlen,0 + cnop 0,2 +Border12: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors12 + dc.l NULL +BorderVectors12: + dc.w 0,0 + dc.w 457,0 + dc.w 457,9 + dc.w 0,9 + dc.w 0,0 +Gadget13: + dc.l Gadget14 + dc.w 14,-15 + dc.w 91,10 + dc.w GRELBOTTOM + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border13 + dc.l NULL + dc.l IText3 + dc.l NULL + dc.l NULL + dc.w -3 + dc.l NULL +Border13: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors13 + dc.l NULL +BorderVectors13: + dc.w 0,0 + dc.w 92,0 + dc.w 92,11 + dc.w 0,11 + dc.w 0,0 +IText3: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText3 + dc.l NULL +ITextText3: + dc.b 'Save config',0 + cnop 0,2 +Gadget14: + dc.l Gadget15 + dc.w 113,-15 + dc.w 91,10 + dc.w GRELBOTTOM + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border14 + dc.l NULL + dc.l IText4 + dc.l NULL + dc.l NULL + dc.w -2 + dc.l NULL +Border14: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors14 + dc.l NULL +BorderVectors14: + dc.w 0,0 + dc.w 92,0 + dc.w 92,11 + dc.w 0,11 + dc.w 0,0 +IText4: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText4 + dc.l NULL +ITextText4: + dc.b 'Load config',0 + cnop 0,2 +Gadget15: + dc.l Gadget16 + dc.w 209,-15 + dc.w 51,10 + dc.w GRELBOTTOM + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border15 + dc.l NULL + dc.l IText5 + dc.l NULL + dc.l NULL + dc.w -1 + dc.l NULL +Border15: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors15 + dc.l NULL +BorderVectors15: + dc.w 0,0 + dc.w 52,0 + dc.w 52,11 + dc.w 0,11 + dc.w 0,0 +IText5: + dc.b 3,0,RP_JAM2,0 + dc.w 2,1 + dc.l NULL + dc.l ITextText5 + dc.l NULL +ITextText5: + dc.b 'Cancel',0 + cnop 0,2 +Gadget16: + dc.l Gadget17 + dc.w 179,124 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border16 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget16SInfo + dc.w 10 + dc.l NULL +Gadget16SInfo: + dc.l Gadget16SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget16SIBuff: + dc.b 'AT',0 +PWstringlen set *-Gadget16SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border16: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors16 + dc.l NULL +BorderVectors16: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget17: + dc.l Gadget18 + dc.w 179,136 + dc.w 136,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget17SInfo + dc.w 11 + dc.l NULL +Gadget17SInfo: + dc.l Gadget17SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 17 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget17SIBuff: + dc.b 'OK',0 +PWstringlen set *-Gadget17SIBuff + dcb.b 17-PWstringlen,0 + cnop 0,2 +Border17: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors17 + dc.l NULL +BorderVectors17: + dc.w 0,0 + dc.w 137,0 + dc.w 137,9 + dc.w 0,9 + dc.w 0,0 +Gadget18: + dc.l Gadget19 + dc.w 389,107 + dc.w 136,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border18 + dc.l NULL + dc.l IText6 + dc.l NULL + dc.l NULL + dc.w 20 + dc.l NULL +Border18: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors18 + dc.l NULL +BorderVectors18: + dc.w 0,0 + dc.w 137,0 + dc.w 137,11 + dc.w 0,11 + dc.w 0,0 +IText6: + dc.b 3,0,RP_JAM2,0 + dc.w 4,1 + dc.l NULL + dc.l ITextText6 + dc.l NULL +ITextText6: + dc.b 'Locked baud rate',0 + cnop 0,2 +Gadget19: + dc.l Gadget20 + dc.w 557,108 + dc.w 56,8 + dc.w GADGDISABLED + dc.w RELVERIFY+LONGINT + dc.w STRGADGET + dc.l Border19 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l Gadget19SInfo + dc.w 0 + dc.l NULL +Gadget19SInfo: + dc.l Gadget19SIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 7 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +Gadget19SIBuff: + dc.b '2400',0 +PWstringlen set *-Gadget19SIBuff + dcb.b 7-PWstringlen,0 + cnop 0,2 +Border19: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors19 + dc.l NULL +BorderVectors19: + dc.w 0,0 + dc.w 57,0 + dc.w 57,9 + dc.w 0,9 + dc.w 0,0 +Gadget20: + dc.l Gadget21 + dc.w 389,121 + dc.w 70,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border20 + dc.l NULL + dc.l IText7 + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Border20: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors20 + dc.l NULL +BorderVectors20: + dc.w 0,0 + dc.w 71,0 + dc.w 71,11 + dc.w 0,11 + dc.w 0,0 +IText7: + dc.b 3,0,RP_JAM2,0 + dc.w 4,1 + dc.l NULL + dc.l ITextText7 + dc.l NULL +ITextText7: + dc.b 'Xon/Xoff',0 + cnop 0,2 +Gadget21: + dc.l Gadget22 + dc.w 389,135 + dc.w 70,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border21 + dc.l NULL + dc.l IText8 + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Border21: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors21 + dc.l NULL +BorderVectors21: + dc.w 0,0 + dc.w 71,0 + dc.w 71,11 + dc.w 0,11 + dc.w 0,0 +IText8: + dc.b 3,0,RP_JAM2,0 + dc.w 7,1 + dc.l NULL + dc.l ITextText8 + dc.l NULL +ITextText8: + dc.b 'CTS/RST',0 + cnop 0,2 +Gadget22: + dc.l NULL + dc.w 389,60 + dc.w 88,10 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border22 + dc.l NULL + dc.l IText9 + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Border22: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors22 + dc.l NULL +BorderVectors22: + dc.w 0,0 + dc.w 89,0 + dc.w 89,11 + dc.w 0,11 + dc.w 0,0 +IText9: + dc.b 3,0,RP_JAM2,0 + dc.w 4,1 + dc.l NULL + dc.l ITextText9 + dc.l NULL +ITextText9: + dc.b '+++ hangup',0 + cnop 0,2 +IntuiTextList1: +IText10: + dc.b 3,0,RP_JAM2,0 + dc.w 100,15 + dc.l NULL + dc.l ITextText10 + dc.l IText11 +ITextText10: + dc.b 'Serial port unit',0 + cnop 0,2 +IText11: + dc.b 3,0,RP_JAM2,0 + dc.w 40,40 + dc.l NULL + dc.l ITextText11 + dc.l IText12 +ITextText11: + dc.b 'Modem init string',0 + cnop 0,2 +IText12: + dc.b 3,0,RP_JAM2,0 + dc.w 23,99 + dc.l NULL + dc.l ITextText12 + dc.l IText13 +ITextText12: + dc.b 'Modem answer string',0 + cnop 0,2 +IText13: + dc.b 3,0,RP_JAM2,0 + dc.w 7,51 + dc.l NULL + dc.l ITextText13 + dc.l IText14 +ITextText13: + dc.b 'Modem off hook string',0 + cnop 0,2 +IText14: + dc.b 3,0,RP_JAM2,0 + dc.w 15,63 + dc.l NULL + dc.l ITextText14 + dc.l IText15 +ITextText14: + dc.b 'Modem on hook string',0 + cnop 0,2 +IText15: + dc.b 3,0,RP_JAM2,0 + dc.w 39,75 + dc.l NULL + dc.l ITextText15 + dc.l IText16 +ITextText15: + dc.b 'Modem call string',0 + cnop 0,2 +IText16: + dc.b 3,0,RP_JAM2,0 + dc.w 55,170 + dc.l NULL + dc.l ITextText16 + dc.l IText17 +ITextText16: + dc.b 'Config filename',0 + cnop 0,2 +IText17: + dc.b 3,0,RP_JAM2,0 + dc.w 100,25 + dc.l NULL + dc.l ITextText17 + dc.l IText18 +ITextText17: + dc.b 'Serial device',0 + cnop 0,2 +IText18: + dc.b 3,0,RP_JAM2,0 + dc.w 39,87 + dc.l NULL + dc.l ITextText18 + dc.l IText19 +ITextText18: + dc.b 'Modem RING string',0 + cnop 0,2 +IText19: + dc.b 3,0,RP_JAM2,0 + dc.w 15,111 + dc.l NULL + dc.l ITextText19 + dc.l IText20 +ITextText19: + dc.b 'Modem CONNECT string',0 + cnop 0,2 +IText20: + dc.b 3,0,RP_JAM2,0 + dc.w 55,124 + dc.l NULL + dc.l ITextText20 + dc.l IText21 +ITextText20: + dc.b 'Modem AT string',0 + cnop 0,2 +IText21: + dc.b 3,0,RP_JAM2,0 + dc.w 55,136 + dc.l NULL + dc.l ITextText21 + dc.l IText22 +ITextText21: + dc.b 'Modem OK string',0 + cnop 0,2 +IText22: + dc.b 3,0,RP_JAM2,0 + dc.w 529,108 + dc.l NULL + dc.l ITextText22 + dc.l NULL +ITextText22: + dc.b '-->',0 + cnop 0,2 + + END diff --git a/util/Configbbs.asm b/util/Configbbs.asm new file mode 100644 index 0000000..51b34df --- /dev/null +++ b/util/Configbbs.asm @@ -0,0 +1,4141 @@ + include 'dabbs:include/first.i' + + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + include 'intuition/intuition.i' + +;debug = 1 + + include 'asm.i' + include 'bbs.i' + + XDEF _SysBase + + section kode,code + +;ToDo : +; fikse slik at man kan forrandre navn på conf'er og dir'er + +start move.l 4,a6 + move.l a6,_SysBase + moveq.l #0,d7 ; full setup eller foradre (= 0) + moveq.l #0,d6 ; conf er aktiv + openlib dos + openlib int + moveq.l #0,d0 + lea tmpportname,a0 + bsr CreatePort ; setter opp vår reply port + lea noporttext,a0 + move.l d0,port + beq error + lea msg,a0 ; Fyller i msg + move.l d0,MN_REPLYPORT(a0) + move.l #ConfigRecord_SIZEOF,d0 ; allokerer config minne + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + lea nomemtext,a0 + move.l d0,mem + beq error + move.l d0,MainBase +; bsr getconfig ; henter inn config'en +; lea noabbstext,a0 +; bmi error ; ingen msg port +; bne.s 1$ ; abbs er konfigurert + moveq.l #1,d7 ; + bsr setupnewconfig + lea Worktlf,a0 ; vi er ikke konfigurert, saa + moveq.l #0,d0 ; vi tar og + move.l d0,(a0) ; slår av "fil requestor'en" + lea IText18,a0 + lea IText20,a1 + move.l a1,it_NextText(a0) + lea MenuItem1,a0 ; Disabler Load'en + and.w #~ITEMENABLED,mi_Flags(a0) + lea News,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea Post,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea Userinfo,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea Fileinfo,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + bra.s 2$ +1$ move.l SYSOPUsernr(MainBase),d0 + lea userrec,a0 ; henter inn sysop'en + bsr loadusernr + lea nosysoptext,a0 + beq error + bsr setupgadgets +2$ move.l intbase,a6 ; Opp med vindu ! + lea NewWindowStructure1,a0 + jsrlib OpenWindow + lea nowindowtext,a0 + move.l d0,winadr + beq error + move.l d0,a0 + move.l wd_RPort(a0),a0 ; ut med tekst ! + lea IntuiTextList1,a1 + moveq.l #0,d0 + moveq.l #0,d1 + jsrlib PrintIText + move.l winadr,a0 ; Opp med meny + lea MenuList1,a1 + jsrlib SetMenuStrip + lea nomenutext,a0 + tst.l d0 + beq error + move.b #1,menusta + move.l winadr,a0 + move.l wd_UserPort(a0),msgport + lea GadgetList1,a0 ; aktiviserer første gadgeten. + move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l _SysBase,a6 + +vent move.l msgport,a0 + jsrlib WaitPort + tst.l d0 + beq.s vent + tst.w titlech + beq.s 7$ + lea NewWindowName1,a0 ; setter tilbake orginal tittel + moveq.l #0,d0 ; ikke noen blinking + bsr title + move.w #0,titlech +7$ move.l msgport,a0 + jsrlib GetMsg + tst.l d0 + beq.s vent + move.l d0,a1 + move.l im_Class(a1),d0 + cmp.l #MENUPICK,d0 + beq 2$ + cmp.l #GADGETUP,d0 + beq.s 1$ +4$ jsrlib ReplyMsg + bra.s vent + +1$ move.l im_IAddress(a1),a0 + move.w gg_GadgetID(a0),d2 + beq.s 4$ + jsrlib ReplyMsg + tst.w d2 + bmi.s 8$ ; negative = spesielle + sub.w #1,d2 + asl.w #2,d2 +5$ lea activetabell,a0 ; aktiviserer neste gadget + move.l 0(a0,d2.w),a0 + move.w gg_Flags(a0),d0 + and.w #GFLG_DISABLED,d0 ; bare hvis den ikke er disabl'a + beq.s 6$ + addq.l #4,d2 + cmp.w #17*4,d2 + bcs.s 5$ + moveq.l #0,d2 + bra.s 5$ + +; d2 = gadget id. +8$ lea specialjumptable,a0 + neg.w d2 + sub.w #1,d2 + lsl.w #2,d2 + move.l 0(a0,d2.w),a0 + jsr (a0) + bra vent + +6$ move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l _SysBase,a6 + bra vent + +2$ move.w im_Code(a1),-(a7) + jsrlib ReplyMsg + move.w (a7)+,d0 +3$ cmp.w #MENUNULL,d0 + beq vent + move.w d0,d1 + and.w #$1f,d0 ; d0 er nå menu num + bne.s 30$ ; ikke 0 + move.w d1,d0 + lsr.w #5,d0 + and.w #$3f,d0 ; d0 er nå menu item + bne.s 31$ ; ikke item 0 + bsr getconfig ; load config + lea noabbstext,a0 + bmi error ; ingen msg port + bsr setupgadgetsspes + lea nomenutext,a0 + beq error + bra vent +31$ cmp.w #1,d0 ; item 01 ? + beq lagre + cmp.w #2,d0 ; item 02 ? + beq ut ; Ja + bra vent + +30$ cmp.w #1,d0 ; menu num 1 ? + bne vent ; nei + move.w d1,d0 + lsr.w #5,d0 + and.w #$3f,d0 ; d0 er nå menu item + cmp.w #2,d0 ; item 12 ? + bne vent ; nei + move.w d1,d0 + lsr.w #8,d0 + lsr.w #3,d0 + and.w #$1f,d0 ; d0 er nå sub item (0-2) + cmp.w #2,d0 + bhi vent ; ukjennt sub item + move.w d0,-(a7) + move.l intbase,a6 + move.l winadr,a0 ; fjerner meny + jsrlib ClearMenuStrip + move.b #0,menusta + move.w (a7)+,d0 + and.l #$ffff,d0 + move.b d0,charset + lea charsettext,a0 + lsl.l #2,d0 ; beregner fremm plassen til + add.l d0,a0 ; tegnsett plassen + lea ITextText6+8,a1 ; strcopy subitem13{1-3}'s tekst + moveq.l #3,d0 ; inn i menyitem 13's tekst, + bsr strcopymaxlen ; dvs "Charset [xxx]" + move.l winadr,a0 ; Opp med meny + lea MenuList1,a1 + jsrlib SetMenuStrip + move.l _SysBase,a6 + tst.l d0 + lea nomenutext,a0 + beq error + move.b #1,menusta + bra vent + +lagre bsr sjekkinput + beq vent + bsr saveconfig + bmi.s ut ; ferdig (ikke fullt oppsett) + beq vent + bsr createconfs + bmi.s ut + beq vent + bsr createdirs + bmi.s ut + beq vent + bsr createsysop + bmi.s ut + beq vent + bra.s ut + +error bsr writedostext +ut bsr cleanup + closlib int +no_int closlib dos +no_dos rts + +sjekkinput + lea Boardname,a0 + bsr 20$ + beq 9$ + lea Sysopname,a0 + bsr 30$ + beq 9$ + tst.l d7 ; fullt settup + beq.s 1$ ; nei, da tillater vi tomt her. + lea SysopPassword,a0 + bsr 10$ + beq 9$ +1$ lea SysopAddress,a0 + bsr 20$ + beq 9$ + lea postal,a0 + bsr 20$ + beq 9$ + lea Hometlf,a0 + bsr 20$ + beq 9$ + lea Worktlf,a0 + bsr 20$ + beq 9$ + lea maxmsglines,a0 + moveq.l #100,d0 ; min verdi + bsr 40$ + beq 9$ + lea newtime,a0 + moveq.l #5,d0 ; min verdi + bsr 40$ + beq.s 9$ + lea sleeptime,a0 + moveq.l #1,d0 ; min verdi + bsr 40$ + beq.s 9$ + lea newfiletime,a0 + moveq.l #0,d0 ; min verdi + bsr 40$ + beq.s 9$ + lea News,a0 + bsr 10$ + beq.s 9$ + lea Post,a0 + bsr 10$ + beq.s 9$ + lea Userinfo,a0 + bsr 10$ + beq.s 9$ + lea Fileinfo,a0 + bsr 10$ + beq.s 9$ + lea byteratio,a0 + moveq.l #0,d0 ; min verdi + bsr 40$ + beq.s 9$ + lea fileratio,a0 + moveq.l #0,d0 ; min verdi + bsr 40$ + beq.s 9$ + lea minspace,a0 + moveq.l #0,d0 ; min verdi + bsr 40$ + beq.s 9$ + clrz +9$ rts + +10$ bsr 60$ + move.b (a1)+,d0 ; sjekker om det er noe i en string, og + beq.s 50$ ; om den inneholder spaces +11$ cmp.b #' ',d0 + beq.s 50$ + move.b (a1)+,d0 + bne.s 11$ + clrz + rts + +20$ bsr 60$ + tst.b (a1) + beq.s 40$ + rts + +30$ bsr 60$ + move.b (a1)+,d0 ; sjekker at stringen er av formen : + beq.s 50$ ; " " + cmp.b #' ',d0 + beq.s 50$ +31$ move.b (a1)+,d0 + beq.s 50$ + cmp.b #' ',d0 + bne.s 31$ + move.b (a1)+,d0 + beq.s 50$ +32$ cmp.b #' ',d0 + beq.s 50$ + move.b (a1)+,d0 + bne.s 32$ + clrz + rts + +40$ push a0/d0 + bsr 60$ + move.l a1,a0 + bsr atoi + bmi.s 49$ + pop a0/d1 + cmp.l d0,d1 ; sjekker mot min verdi + bhi.s 50$ ; for liten verdi +41$ clrzn + rts +49$ pop a0/d0 +; bra.s 50$ + +50$ move.l a0,a1 + lea wrongdatatext,a0 + bra blinkandactivate + +60$ move.l gg_SpecialInfo(a0),a1 ; henter ut si bufferen til gadgeten + move.l si_Buffer(a1),a1 + rts + +saveconfig + push a2/a3 + bsr getabbsconfig + move.l a0,a3 + bmi 9$ ; finner ikke abbs + bne.s 1$ ; ikke fullt oppsett + bsr 10$ ; Fyller i vår configmem + bmi 8$ ; error + move.l a3,a1 + move.l MainBase,a0 + move.l #ConfigRecord_SIZEOF,d0 ; Kopierer over hele config'en + bsr memcopylen + clrzn + bra 9$ + +1$ bsr 10$ ; tolker gadget'er + bmi 8$ + + lea SYSOPname(a3),a0 + lea SysopnameSIBuff,a1 + bsr namechange + lea cantrenysoptext,a0 + beq 7$ + move.l SYSOPUsernr(MainBase),d0 + lea userrec,a0 ; henter inn sysop'en igjen + bsr loadusernr + lea nosysoptext,a0 + beq 7$ + +; vanskelig .. +; STRUCT ConfNames,MaxConferences*Sizeof_NameT +; STRUCT DirNames,MaxFileDirs*Sizeof_NameT + + lea userrec,a2 ; lagrer sysop med ny adresse osv. + lea SysopAddressSIBuff,a0 + lea Address(a2),a1 + bsr strcopy + lea postalSIBuff,a0 + lea CityState(a2),a1 + bsr strcopy + lea HometlfSIBuff,a0 + lea HomeTelno(a2),a1 + bsr strcopy + lea WorktlfSIBuff,a0 + lea WorkTelno(a2),a1 + bsr strcopy + move.l a2,a0 + move.l Usernr(a2),d0 + bsr saveusernr + lea cantsasysoptext,a0 + beq 7$ + lea BaseName(MainBase),a0 ; kopierer over til abbs's config + lea BaseName(a3),a1 ; struktur. + bsr strcopy + lea SYSOPpassword(MainBase),a0 + lea SYSOPpassword(a3),a1 + moveq.l #Sizeof_PassT,d0 + bsr strcopymaxlen + move.w MaxLinesMessage(MainBase),MaxLinesMessage(a3) + move.w NewUserTimeLimit(MainBase),NewUserTimeLimit(a3) + move.w SleepTime(MainBase),SleepTime(a3) + move.b DefaultCharSet(MainBase),DefaultCharSet(a3) + move.b Cflags(MainBase),Cflags(a3) + move.w NewUserFileLimit(MainBase),NewUserFileLimit(a3) + move.w ByteRatiov(MainBase),ByteRatiov(a3) + move.w FileRatiov(MainBase),FileRatiov(a3) + move.w MinULSpace(MainBase),MinULSpace(a3) + lea 4+ConfSW(MainBase),a0 + lea 4+ConfSW(a3),a1 + moveq.l #MaxConferences*1-4,d0 + bsr memcopylen + lea ConfOrder(MainBase),a0 + lea ConfOrder(a3),a1 + moveq.l #MaxConferences*1,d0 + bsr memcopylen + lea FileOrder(MainBase),a0 + lea FileOrder(a3),a1 + moveq.l #MaxConferences*1,d0 + bsr memcopylen + lea DirPaths(MainBase),a0 + lea DirPaths(a3),a1 + move.l #MaxConferences*Sizeof_NameT,d0 + bsr memcopylen + lea ConfMaxScan(MainBase),a0 + lea ConfMaxScan(a3),a1 + move.l #MaxConferences*2,d0 + bsr memcopylen + bsr savemainconfig ; lagrer config + lea cantsavcnfitext,a0 + beq.s 7$ ; error + setn + bra.s 9$ +7$ moveq.l #1,d0 + bsr title + move.w #1,titlech + +8$ clrn ; ikke ferdig + setz ; ikke ut +9$ pop a2/a3 + rts + +10$ push a2/d2 + move.l MainBase,a2 + + lea BoardnameSIBuff,a0 + lea BaseName(a2),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + + lea SysopnameSIBuff,a0 + lea SYSOPname(a2),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + + lea SysopPasswordSIBuff,a0 + lea SYSOPpassword(a2),a1 + moveq.l #Sizeof_PassT,d0 + bsr strcopymaxlen + +; moveq.l #0,SYSOPUsernr(a2) + + lea maxmsglinesSIBuff,a0 + bsr atoi + bmi 20$ ; egentlig umulig, men ... + move.w d0,MaxLinesMessage(a2) + + lea newtimeSIBuff,a0 + bsr atoi + bmi 20$ ; egentlig umulig, men ... + move.w d0,NewUserTimeLimit(a2) + + lea sleeptimeSIBuff,a0 + bsr atoi + bmi 20$ ; egentlig umulig, men ... + move.w d0,SleepTime(a2) + + move.b charset,DefaultCharSet(a2) + + move.b #0,d0 + lea byteratiobit,a0 + move.b #CflagsB_Byteratio,d1 + bsr 40$ + lea fileratiobit,a0 + move.b #CflagsB_Fileratio,d1 + bsr 40$ + lea MenuItem4,a0 + move.b #CflagsB_Lace,d1 + bsr 30$ + lea MenuItem5,a0 + move.b #CflagsB_8Col,d1 + bsr 30$ + lea MenuItem7,a0 + move.b #CflagsB_Upload,d1 + bsr 30$ + lea MenuItem8,a0 + move.b #CflagsB_Download,d1 + bsr 30$ + lea NewMenuItem1,a0 + move.b #CflagsB_AllowTmpSysop,d1 + bsr 30$ + lea NewMenuItem2,a0 + move.b #CflagsB_UseASL,d1 + bsr 30$ + move.b d0,Cflags(a2) + + lea newfiletimeSIBuff,a0 + bsr atoi + bmi.s 20$ ; egentlig umulig, men ... + move.w d0,NewUserFileLimit(a2) + + lea byteratioSIBuff,a0 + bsr atoi + bmi.s 20$ ; egentlig umulig, men ... + move.w d0,ByteRatiov(a2) + + lea fileratioSIBuff,a0 + bsr atoi + bmi.s 19$ ; egentlig umulig, men ... + move.w d0,FileRatiov(a2) + + lea minspaceSIBuff,a0 + bsr atoi + bmi.s 20$ ; egentlig umulig, men ... + move.w d0,MinULSpace(a2) + clrn +19$ pop a2/d2 + rts + +20$ lea intererror1text,a0 ; egentlig umulig, men amiga .. :-) + moveq.l #1,d0 + bsr title + move.w #1,titlech + setn + bra.s 19$ + +30$ move.w mi_Flags(a0),d2 ; setter flagg i d0 avhengig + and.w #CHECKED,d2 ; av om menyitemet er valgt + beq.s 39$ ; eller ikke + bset d1,d0 +39$ rts + +40$ move.w gg_Flags(a0),d2 ; setter flagg i d0 avhengig + and.w #GFLG_SELECTED,d2 ; av om gadgeten er valgt + beq.s 49$ ; eller ikke + bset d1,d0 +49$ rts + +createconfs + lea NewsSIBuff,a0 + moveq.l #CONFSWF_ImmRead,d0 + bsr 10$ + bmi.s 9$ + beq.s 9$ + lea PostSIBuff,a0 + move.l #CONFSWF_ImmRead+CONFSWF_ImmWrite+CONFSWF_PostBox,d0 + bsr 10$ + bmi.s 9$ + beq.s 9$ + lea UserinfoSIBuff,a0 + moveq.l #CONFSWF_ImmRead+CONFSWF_Resign,d0 + bsr 10$ + bmi.s 9$ + beq.s 9$ + lea FileinfoSIBuff,a0 + moveq.l #CONFSWF_ImmRead+CONFSWF_Resign,d0 + bsr 10$ +; bmi.s 9$ +; beq.s 9$ +9$ rts + +10$ lea msg,a1 ; lager conf + move.w #Main_createconference,m_Command(a1) + move.l d0,m_Data(a1) + bsr upstring + lea msg,a1 + move.l a0,m_Name(a1) + bsr handlemsg + bne.s 11$ + setn + bra.s 19$ +11$ move.l d0,a0 + cmp.w #Error_OK,m_Error(a0) ; Alt ok ? + notz + bne.s 19$ + lea cantcrconftext,a0 + bsr title + move.w #1,titlech + setz +19$ rts + +createdirs + lea privatename,a0 + bsr 10$ + bmi.s 9$ + beq.s 9$ + lea uploadname,a0 + bsr 10$ +; bmi.s 9$ +; beq.s 9$ +9$ rts + +10$ lea msg,a1 ; lager dir + move.w #Main_createfiledir,m_Command(a1) + bsr upstring + lea msg,a1 + move.l a0,m_Name(a1) + lea fildedirpath,a0 + move.l a0,m_Data(a1) + bsr handlemsg + bne.s 11$ + setn + bra.s 19$ +11$ move.l d0,a0 + cmp.w #Error_OK,m_Error(a0) ; Alt ok ? + notz + bne.s 19$ + lea cantcrfdirtext,a0 + bsr title + move.w #1,titlech + setz +19$ rts + +createsysop + move.l a2,-(a7) + lea userrec,a2 + move.l a2,a0 ; tømmer bufferen først. + lea UserRecord_SIZEOF(a2),a1 + moveq.l #0,d0 +1$ move.w d0,(a0)+ + cmp.l a0,a1 + bhi.s 1$ + lea SysopnameSIBuff,a0 ; begynner å fylle inn data + lea Name(a2),a1 + bsr strcopy + IFND V1.0 + lea SysopPasswordSIBuff,a0 + move.l a2,a1 + bsr insertpasswd + ELSE + lea Password(a2),a1 + bsr strcopy + ENDC + lea SysopAddressSIBuff,a0 + lea Address(a2),a1 + bsr strcopy + lea postalSIBuff,a0 + lea CityState(a2),a1 + bsr strcopy + lea HometlfSIBuff,a0 + lea HomeTelno(a2),a1 + bsr strcopy + lea WorktlfSIBuff,a0 + lea WorkTelno(a2),a1 + bsr strcopy + lea ConfAccess(a2),a0 + move.b #ACCF_Write+ACCF_Read+ACCF_Download+ACCF_Upload+ACCF_FileVIP+ACCF_Sysop,d0 + move.b d0,(a0) ; Full access i news + move.b d0,1(a0) ; i post + move.b d0,2(a0) ; i userinfo + move.b d0,3(a0) ; .. og i fileinfo +; move.w #0,d0 ( allerede null) +; move.w d0,TimeLimit(a2) ; Sysop har +; move.w d0,FileLimit(a2) ; ingen limit + move.b DefaultCharSet(MainBase),Charset(a2) + move.w #28,PageLength(a2) + move.w #SAVEBITSF_ReadRef,Savebits(a2) + move.b #1,ScratchFormat(a2) ; setter ARC som default pakker + lea msg,a1 ; foretar createuser + move.w #Main_createuser,m_Command(a1) + move.l a2,m_Data(a1) + lea Name(a2),a0 + move.l a0,m_Name(a1) + bsr handlemsg + bne.s 2$ + setn + bra.s 9$ +2$ move.l d0,a0 + cmp.w #Error_OK,m_Error(a0) ; Alt ok ? + notz + bne.s 9$ + lea cantcrsysoptext,a0 + bsr title + move.w #1,titlech + setz +9$ move.l (a7)+,a2 + rts + +;a0 = passord +;a1 = userrecord +insertpasswd + push a2 + link.w a3,#-20 + move.l a1,a2 + move.l sp,a1 + pea (Name,a2) ; navn + move.l a0,-(a7) ; passord + move.l a1,-(a7) ; buffer + IFND _ACrypt + XREF _ACrypt + ENDC + jsr _ACrypt + lea (12,sp),sp ; fjerner parametrene igjen + lea (Password,a2),a1 + move.l sp,a0 + moveq.l #Sizeof_PassT+1-1,d0 +1$ move.b (a0)+,(a1)+ + dbf d0,1$ + move.b (a0)+,(pass_10,a2) + move.b (a0)+,(pass_11,a2) + unlk a3 + pop a2 + rts + +filedirbitcode + lea filedirbit,a0 + move.w gg_Flags(a0),d0 + and.w #GFLG_SELECTED,d0 ; prøver de å deselecte oss ? + beq.s 8$ ; ja.. FY. + lea confbit,a0 ; slår av confbit'et hvis det er på + move.w gg_Flags(a0),d0 + and.w #GFLG_SELECTED,d0 + beq.s 1$ + bsr toggleselected +1$ moveq.l #1,d6 ; File er aktiv + bsr refreshfilreqspes + bsr updatesubfil + bra.s 9$ +8$ bsr toggleselected +9$ rts + +confbitcode + lea confbit,a0 + move.w gg_Flags(a0),d0 + and.w #GFLG_SELECTED,d0 ; prøver de å deselecte oss ? + beq.s 8$ ; ja.. FY. + lea filedirbit,a0 + move.w gg_Flags(a0),d0 + and.w #GFLG_SELECTED,d0 + beq.s 1$ + bsr toggleselected +1$ moveq.l #0,d6 ; conf er aktiv + bsr refreshfilreqspes + bsr updatesubfil + bra.s 9$ +8$ bsr toggleselected +9$ rts + +updatesubfil + move.l intbase,a6 + lea CFName,a1 + moveq.l #5,d0 + move.l winadr,a0 + jsrlib RemoveGList + lea bigup,a1 + moveq.l #2,d0 + move.l winadr,a0 + jsrlib RemoveGList + + move.b #0,CFNameSIBuff ; clearer CFName + move.b #0,pathSIBuff ; clearer + move.b #0,scanSIBuff ; clearer + move.b #0,BitsSIBuff ; clearer + move.b #0,orderSIBuff ; clearer + + lea bigup,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) ; av med bigup + lea bigdown,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) ; av med bigdown + + lea path,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) ; av med path + lea scan,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) ; slår av scan og bits + lea Bits,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) + lea order,a0 + or.w #GFLG_DISABLED,gg_Flags(a0) + lea CFName,a0 +; or.w #GFLG_DISABLED,gg_Flags(a0) + + lea CFName,a1 + moveq.l #-1,d0 + moveq.l #5,d1 + move.l winadr,a0 + jsrlib AddGList + lea bigup,a1 + moveq.l #-1,d0 + moveq.l #2,d1 + move.l winadr,a0 + jsrlib AddGList + move.l winadr,a1 + lea CFName,a0 + moveq.l #5,d0 + jsrlib RefreshGList + lea bigup,a0 + move.l winadr,a1 + moveq.l #5,d0 + jsrlib RefreshGList + move.l _SysBase,a6 + rts + +; a0 - gadget +toggleselected + push a2 + move.l intbase,a6 + move.l a0,a2 + move.l winadr,a0 + move.l a2,a1 + moveq.l #1,d0 + jsrlib RemoveGList + move.l a2,a1 + eor.w #GFLG_SELECTED,gg_Flags(a1) + moveq.l #-1,d0 + moveq.l #1,d1 + move.l winadr,a0 + jsrlib AddGList + move.l winadr,a1 + move.l a2,a0 + moveq.l #1,d0 + jsrlib RefreshGList + move.l _SysBase,a6 + pop a2 + rts + +bigdowncode + move.w #1,d0 + bsr movedown + beq.s 9$ ; ingen forandring + bsr refreshfilreqspes +9$ rts + +bigupcode + move.w #1,d0 + bsr moveup + beq.s 9$ ; ingen forandring + bsr refreshfilreqspes +9$ rts + +downcode + tst.l d6 ; conf aktiv ? + bne.s 1$ ; nei + move.w conftop,d0 + add.w #1,d0 + move.w ActiveConf(MainBase),d1 + sub.w #4,d1 + bcs.s 9$ ; for få + beq.s 9$ ; for få + cmp.w d1,d0 + bhi.s 9$ + move.w d0,conftop + bra.s 8$ +1$ move.w dirtop,d0 + add.w #1,d0 + move.w ActiveDirs(MainBase),d1 + sub.w #4,d1 + bcs.s 9$ ; for få + beq.s 9$ ; for få + cmp.w d1,d0 + bhi.s 9$ + move.w d0,dirtop +8$ bsr refreshfilreqspes + bsr recalcpropgadget +9$ rts + +upcode tst.l d6 ; conf aktiv ? + bne.s 1$ ; nei + move.w conftop,d0 + beq.s 9$ + sub.w #1,conftop + bra.s 8$ +1$ move.w dirtop,d0 + beq.s 9$ + sub.w #1,dirtop +8$ bsr refreshfilreqspes + bsr recalcpropgadget +9$ rts + +recalcpropgadget + push a2/a6/d2/d3/d4 + bsr calcpotbody + move.l d0,d2 + move.l d1,d4 + moveq.l #-1,d1 + moveq.l #-1,d3 + move.w #AUTOKNOB+FREEVERT+PROPNEWLOOK,d0 + lea slidebar,a0 + move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ModifyProp + pop a2/a6/d2/d3/d4 + rts + +slidebarcode + push d2 + lea slidebarSInfo,a0 + + move.w conftop,d2 + move.w ActiveConf(MainBase),d0 + tst.l d6 ; conf aktiv ? + beq.s 1$ ; ja + move.w dirtop,d2 + move.w ActiveDirs(MainBase),d0 +1$ sub.w #4,d0 + bcc.s 2$ + moveq.l #0,d0 ; hidden klar +2$ mulu pi_VertPot(a0),d0 + add.l #MAXPOT/2,d0 + divu #MAXPOT,d0 + cmp.w d2,d0 ; samme topline ? + beq.s 9$ ; jepp. + tst.l d6 ; conf aktiv ? + bne.s 3$ ; nei + move.w ActiveConf(MainBase),d1 + sub.w #4,d1 + bcs.s 9$ ; for få + beq.s 9$ ; for få + cmp.w d1,d0 + bhi.s 9$ + move.w d0,conftop + bra.s 8$ +3$ move.w ActiveDirs(MainBase),d1 + sub.w #4,d1 + bcs.s 9$ ; for få + beq.s 9$ ; for få + cmp.w d1,d0 + bhi.s 9$ + move.w d0,dirtop +8$ bsr refreshfilreqspes +9$ pop d2 + rts + +name1code + moveq.l #0,d0 + bra.s namexcode +name2code + moveq.l #1,d0 + bra.s namexcode +name3code + moveq.l #2,d0 + bra.s namexcode +name4code + moveq.l #3,d0 +; bra.s namexcode +namexcode + move.l intbase,a6 + push d2/a2/d3 + lea nameptrs,a0 + move.l d0,d3 + beq.s 4$ +7$ addq.l #4,a0 + subq.l #1,d0 + bne.s 7$ +4$ move.l (a0),a0 ; ptr til teksten + tst.b (a0) ; er det noe her ? + beq 99$ : nei, ut + cmp.b #' ',(a0) + beq 99$ : nei, ut + tst.w d6 ; conferences ? + bne 1$ ; nei + + move.l winadr,a0 + lea CFName,a1 + moveq.l #5,d0 + jsrlib RemoveGList + add.w conftop,d3 + move.l d3,d0 + lea ConfNames(MainBase),a0 + lea ConfOrder(MainBase),a1 + bsr 10$ + move.w d2,topnr + lea ConfSW(MainBase),a0 + move.b 0(a0,d2.w),d0 + lea BitsSIBuff,a0 + lea confacsbitstext,a1 + moveq #0,d1 +6$ btst d1,d0 + beq.s 5$ + move.b 0(a1,d1.w),(a0)+ +5$ addq.w #1,d1 + cmp.w #6,d1 + bls.s 6$ + move.b #0,(a0) + + lsl.l #1,d2 + lea ConfMaxScan(MainBase),a0 + move.w 0(a0,d2.w),d0 + lea scanSIBuff,a0 + bsr konverterw + lea orderSIBuff,a0 + + bsr 20$ + + lea CFName,a0 ; slår på alle gadget'ene under +; and.w #~GFLG_DISABLED,gg_Flags(a0) + lea order,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea scan,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea Bits,a0 ; disabler bit'ene hvis det er faste + and.w #~GFLG_DISABLED,gg_Flags(a0) + move.w topnr,d0 ; conf'er det er snakk om. + cmp.w #4,d0 + bcc.s 2$ + or.w #GFLG_DISABLED,gg_Flags(a0) + +2$ move.l winadr,a0 + lea CFName,a1 ; opp med gadgetene + moveq.l #-1,d0 + moveq.l #5,d1 + jsrlib AddGList + move.l winadr,a1 + lea CFName,a0 ; refresh'er dem + moveq.l #5,d0 + jsrlib RefreshGList + bra 9$ + +1$ move.l winadr,a0 ; fjerner navn + lea CFName,a1 + moveq.l #5,d0 + jsrlib RemoveGList + add.w dirtop,d3 + move.l d3,d0 + lea DirNames(MainBase),a0 + lea FileOrder(MainBase),a1 + bsr 10$ + move.w d2,topnr + lea orderSIBuff,a0 + + bsr 20$ + + lea DirPaths(MainBase),a0 + move.w d2,d0 + mulu #Sizeof_NameT,d0 + lea (0,a0,d0.l),a0 + lea pathSIBuff,a1 + bsr strcopy + + lea CFName,a0 ; slår på alle gadget'ene under +; and.w #~GFLG_DISABLED,gg_Flags(a0) + lea path,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + lea order,a0 + and.w #~GFLG_DISABLED,gg_Flags(a0) + + move.l winadr,a0 + lea CFName,a1 + moveq.l #-1,d0 + moveq.l #5,d1 + jsrlib AddGList + move.l winadr,a1 + lea CFName,a0 ; refresh'er dem + moveq.l #5,d0 + jsrlib RefreshGList + +9$ lea CFName,a0 + bsr activate +99$ pop d2/a2/d3 + move.l _SysBase,a6 + rts + +10$ moveq.l #0,d2 + move.b 0(a1,d0.w),d2 ; henter nummeret + sub.b #1,d2 + move.l d2,d0 + mulu #Sizeof_NameT,d0 + lea (0,a0,d0.l),a0 + lea CFNameSIBuff,a1 + bsr strcopy + rts + +20$ move.w d3,oldordr + move.w d3,d0 + addq.l #1,d0 + bsr konverterw + lea bigup,a0 ; er bigup og bigdown slått på ? + move.w gg_Flags(a0),d0 + and.w #GFLG_DISABLED,d0 + beq.s 29$ ; ja + move.l winadr,a1 ; nei, slår de på + jsrlib OnGadget + lea bigdown,a0 + move.l winadr,a1 + jsrlib OnGadget +29$ rts + +cfnamecode + lea CFNameSIBuff,a0 + tst.b (a0) + bne.s 1$ + lea CFName,a1 + lea wrongdatatext,a0 + bsr blinkandactivate + bra.s 9$ +1$ bsr upstring + lea ConfNames(MainBase),a1 + tst.w d6 + beq.s 2$ + lea DirNames(MainBase),a1 +2$ move.w topnr,d1 + moveq.l #Sizeof_NameT,d0 + mulu d0,d1 + lea 0(a1,d1.l),a1 + bsr strcopymaxlen + move.l intbase,a6 + move.l winadr,a1 + lea CFName,a0 + moveq.l #1,d0 + jsrlib RefreshGList + move.l _SysBase,a6 + bsr refreshfilreqspes + lea order,a0 ; akriverer neste gadget + tst.w d6 + beq.s 3$ + lea path,a0 +3$ bsr activate +9$ rts + +pathcode + lea pathSIBuff,a0 + tst.b (a0) + bne.s 1$ + lea path,a1 + lea wrongdatatext,a0 + bsr blinkandactivate + bra.s 9$ +1$ lea DirPaths(MainBase),a1 + move.w topnr,d1 + moveq.l #Sizeof_NameT,d0 + mulu d0,d1 + lea 0(a1,d1.l),a1 + subq.l #1,d0 + bsr strcopymaxlen + lea order,a0 ; akriverer neste gadget + bsr activate +9$ rts + +ordercode + lea orderSIBuff,a0 + bsr atoi + bmi.s 2$ + bne.s 1$ +2$ lea order,a1 + lea wrongdatatext,a0 + bsr blinkandactivate + bra.s 9$ +1$ move.w oldordr,d1 + sub.w d1,d0 + sub.w #1,d0 + beq.s 8$ ; samme order ? jepp,nop + bpl.s 3$ + neg.w d0 + bsr moveup + bra.s 4$ +3$ bsr movedown +4$ beq.s 8$ ; ingen forandring + bsr refreshfilreqspes +8$ lea scan,a0 + tst.w d6 + beq.s 5$ + lea CFName,a0 +5$ bsr activate +9$ rts + +scancode + lea scanSIBuff,a0 + bsr atoi + bmi.s 2$ + bne.s 1$ +2$ lea scan,a1 + lea wrongdatatext,a0 + bsr blinkandactivate + bra.s 9$ +1$ cmp.w #700,d0 + bhi.s 2$ + move.w topnr,d1 + lsl.w #1,d1 + lea ConfMaxScan(MainBase),a0 + move.w d0,0(a0,d1.w) + lea Bits,a0 ; er neste disablet ? + move.w gg_Flags(a0),d0 + and.w #GFLG_DISABLED,d0 + beq.s 3$ ; nei + lea CFName,a0 ; ja, tar neste etter der isteden +3$ bsr activate +9$ rts + +bitscode + lea BitsSIBuff,a0 + tst.b (a0) + beq.s 2$ + bsr parseconfaccsesbits + bne.s 1$ +2$ lea Bits,a0 + lea wrongdatatext,a0 + bsr blinkandactivate + bra.s 9$ +1$ move.w topnr,d1 + lea ConfSW(MainBase),a0 + move.b d0,0(a0,d1.w) + lea CFName,a0 + bsr activate +9$ rts + +parseconfaccsesbits + bsr upstring + moveq.l #0,d0 +4$ move.b (a0)+,d1 + beq.s 9$ + cmp.b #'R',d1 + bne.s 42$ + ori.b #CONFSWF_ImmRead,d0 + bra.s 4$ +42$ cmp.b #'W',d1 + bne.s 43$ + ori.b #CONFSWF_ImmWrite,d0 + bra.s 4$ +43$ cmp.b #'P',d1 + bne.s 44$ + ori.b #CONFSWF_PostBox,d0 + bra.s 4$ +44$ cmp.b #'A',d1 + bne.s 45$ + ori.b #CONFSWF_Private,d0 + bra.s 4$ +45$ cmp.b #'V',d1 + bne.s 46$ + ori.b #CONFSWF_VIP,d0 + bra.s 4$ +46$ cmp.b #'E',d1 + bne.s 47$ + ori.b #CONFSWF_Resign,d0 + bra.s 4$ +47$ +9$ notz + rts + +; d0 = antall plasser +moveup + lea ConfOrder(MainBase),a0 + tst.l d6 ; conf aktiv ? + beq.s 1$ ; ja + lea FileOrder(MainBase),a0 +1$ move.w oldordr,d1 + cmp.w d0,d1 + bcc.s 2$ + move.l d1,d0 + beq.s 9$ +2$ sub.w d0,oldordr ; opdaterer oldorder + lea (0,a0,d1.w),a0 + move.b (a0),d1 +3$ move.b -1(a0),(a0) + subq.l #1,a0 + sub.w #1,d0 + bne.s 3$ + move.b d1,(a0) + bsr moveupdate + clrz +9$ rts + +; d0 = antall plasser +movedown + lea ConfOrder(MainBase),a0 + move.w ActiveConf(MainBase),d1 + tst.l d6 ; conf aktiv ? + beq.s 1$ ; ja + lea FileOrder(MainBase),a0 + move.w ActiveDirs(MainBase),d1 +1$ sub.w oldordr,d1 + beq.s 9$ + sub.w #1,d1 + beq.s 9$ + cmp.w d0,d1 + bcc.s 2$ + move.w d1,d0 + beq.s 9$ +2$ move.w oldordr,d1 + add.w d0,oldordr ; opdaterer oldorder + lea (0,a0,d1.w),a0 + move.b (a0),d1 ; husker denne +3$ move.b 1(a0),(a0)+ + sub.w #1,d0 + bne.s 3$ +8$ move.b d1,(a0) + bsr moveupdate + clrz +9$ rts + +moveupdate + move.l intbase,a6 + move.w oldordr,d0 + add.w #1,d0 + lea orderSIBuff,a0 + bsr konverterw + move.l winadr,a1 + lea order,a0 + moveq.l #1,d0 + jsrlib RefreshGList + move.l _SysBase,a6 + rts + +activate + move.w gg_Flags(a0),d0 + and.w #GFLG_DISABLED,d0 ; bare hvis den ikke er disabl'a + bne.s 9$ + move.l intbase,a6 + move.l winadr,a1 ; aktiviserer gadget med feil i + sub.l a2,a2 + jsrlib ActivateGadget + move.l _SysBase,a6 +9$ rts + +; a0 = title +; a1 = gadget +blinkandactivate + move.l a1,-(a7) + moveq.l #1,d0 + bsr title + move.w #1,titlech + move.l (a7)+,a0 + bsr activate ; aktiviserer gadget med feil i + setz + rts + +; a0 = tittel +; d0 = beep (= true) ? +title push a6/a2 + move.l intbase,a6 + move.l a0,a1 + tst.l d0 + beq.s 1$ + move.l a1,-(a7) + sub.l a0,a0 + jsrlib DisplayBeep + move.l (a7)+,a1 +1$ move.l winadr,a0 + suba.l a2,a2 + jsrlib SetWindowTitles + pop a6/a2 + rts + +cleanup move.l intbase,a6 + tst.b menusta + bne.s 1$ + move.l winadr,d0 + jsrlib ClearMenuStrip + move.b #0,menusta +1$ move.l winadr,d0 + beq.s 2$ + move.l d0,a0 + jsrlib CloseWindow + moveq.l #0,d0 + move.l d0,winadr +2$ move.l _SysBase,a6 + move.l mem,d0 + beq.s 3$ + move.l d0,a1 + move.l #ConfigRecord_SIZEOF,d0 + jsrlib FreeMem + moveq.l #0,d0 + move.l d0,mem +3$ move.l port,d0 + beq.s 4$ + move.l d0,a0 + bsr DeletePort + moveq.l #0,d0 + move.l d0,port +4$ rts + +writedostext + push d2-d3/a6 + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + pop d2-d3/a6 + rts + +; a0 = data område +; d0 = brukernr +loadusernr + lea msg,a1 + move.w #Main_loadusernr,m_Command(a1) + move.l d0,m_UserNr(a1) + move.l a0,m_Data(a1) + bsr handlemsg + lea msg,a1 + move.w m_Error(a1),d0 + cmp.w #Error_OK,d0 + notz + rts + +; a0 = data område +; d0 = brukernr +saveusernr + lea msg,a1 + move.w #Main_saveusernr,m_Command(a1) + move.l d0,m_UserNr(a1) + move.l a0,m_Data(a1) + bsr handlemsg + lea msg,a1 + move.w m_Error(a1),d0 + cmp.w #Error_OK,d0 + notz + rts + +savemainconfig + lea msg,a1 + move.w #Main_saveconfig,m_Command(a1) + moveq.l #0,d0 + move.l d0,m_Data(a1) + bsr handlemsg + lea msg,a1 + move.w m_Error(a1),d0 + cmp.w #Error_OK,d0 + notz + rts + +; a0 = gammelt navn +; a1 = nytt navn +namechange + move.l a2,-(a7) + move.l a1,a2 + moveq.l #Sizeof_NameT,d0 ; Har vi byttet navn på sysop ? + bsr comparestringsfull + notz + bne.s 9$ ; nei, ferdig + lea msg,a1 ; byttter navn + move.w #Main_ChangeName,m_Command(a1) + move.l a2,m_Name(a1) + move.l SYSOPUsernr(MainBase),m_UserNr(a1) + moveq.l #0,d0 ; ifra node 0 + move.l d0,m_arg(a1) + move.l #userrec,m_Data(a1) ; tom plass som changename trenger + bsr handlemsg + lea msg,a1 + move.w m_Error(a1),d1 + cmp.w #Error_OK,d1 + notz +9$ move.l (a7)+,a2 + rts + +getabbsconfig + lea msg,a1 + move.w #Main_testconfig,m_Command(a1) + bsr handlemsg + bne.s 1$ + setn + bra.s 9$ ; abbs porten var ikke der +1$ lea msg,a1 + move.l m_Data(a1),a0 ; Configspace + move.w m_UserNr(a1),d0 ; configstatus + clrn +9$ rts + +getconfig + bsr getabbsconfig + bmi.s 9$ + beq.s 9$ + move.l MainBase,a1 + move.l #ConfigRecord_SIZEOF,d0 ; Kopierer hele config'em til buffer + bsr memcopylen + clrzn +9$ rts + +setupgadgetsspes + move.l intbase,a6 + move.l winadr,a0 ; fjerner meny + jsrlib ClearMenuStrip + move.b #0,menusta + move.l winadr,a0 + lea GadgetList1,a1 ; fjerner gadgeter + moveq.l #-1,d0 + jsrlib RemoveGList + bsr setupgadgets ; oppdaterer alt + move.l winadr,a0 + lea GadgetList1,a1 ; opp med gadgetene + moveq.l #-1,d0 + moveq.l #-1,d1 + jsrlib AddGList + move.l winadr,a1 ; refresh'er dem + lea GadgetList1,a0 + moveq.l #-1,d0 + jsrlib RefreshGList + move.l winadr,a0 ; Opp med meny + lea MenuList1,a1 + jsrlib SetMenuStrip + tst.l d0 + beq.s 1$ + move.b #1,menusta +1$ move.l _SysBase,a6 + rts + +setupgadgets + push a2/d2 + lea BaseName(MainBase),a0 ; base navnet + lea BoardnameSIBuff,a1 + bsr strcopy + lea SYSOPname(MainBase),a0 ; Sysop navn + lea SysopnameSIBuff,a1 + bsr strcopy + lea SYSOPpassword(MainBase),a0 ; sysop passord + lea SysopPasswordSIBuff,a1 + bsr strcopy + lea userrec,a2 + lea Address(a2),a0 + lea SysopAddressSIBuff,a1 + bsr strcopy + lea CityState(a2),a0 + lea postalSIBuff,a1 + bsr strcopy + lea HomeTelno(a2),a0 + lea HometlfSIBuff,a1 + bsr strcopy + lea WorkTelno(a2),a0 + lea WorktlfSIBuff,a1 + bsr strcopy + move.w MaxLinesMessage(MainBase),d0 + lea maxmsglinesSIBuff,a0 + bsr konverterw + move.w NewUserTimeLimit(MainBase),d0 + lea newtimeSIBuff,a0 + bsr konverterw + move.w SleepTime(MainBase),d0 + lea sleeptimeSIBuff,a0 + bsr konverterw +; lea ClosedPassword(MainBase),a0 + moveq.l #0,d0 + move.b DefaultCharSet(MainBase),d0 + move.b d0,charset + lea charsettext,a0 + lsl.l #2,d0 ; beregner fremm plassen til + add.l d0,a0 ; tegnsett plassen + lea ITextText6+8,a1 + moveq.l #3,d0 + bsr strcopymaxlen + move.b Cflags(MainBase),d2 + lea MenuItem4,a0 + move.b #CflagsB_Lace,d0 + bsr 10$ + lea MenuItem5,a0 + move.b #CflagsB_8Col,d0 + bsr 10$ + lea MenuItem8,a0 + move.b #CflagsB_Download,d0 + bsr 10$ + lea MenuItem7,a0 + move.b #CflagsB_Upload,d0 + bsr 10$ + lea fileratiobit,a0 + move.b #CflagsB_Fileratio,d0 + bsr 20$ + lea byteratiobit,a0 + move.b #CflagsB_Byteratio,d0 + bsr 20$ + lea NewMenuItem1,a0 + move.b #CflagsB_AllowTmpSysop,d0 + bsr 10$ + lea NewMenuItem2,a0 + move.b #CflagsB_UseASL,d0 + bsr 10$ + + move.w NewUserFileLimit(MainBase),d0 + lea newfiletimeSIBuff,a0 + bsr konverterw + lea ConfNames(MainBase),a2 + move.l a2,a0 + lea NewsSIBuff,a1 + bsr strcopy + lea PostSIBuff,a1 + lea Sizeof_NameT(a2),a2 + move.l a2,a0 + bsr strcopy + lea UserinfoSIBuff,a1 + lea Sizeof_NameT(a2),a2 + move.l a2,a0 + bsr strcopy + lea FileinfoSIBuff,a1 + lea Sizeof_NameT(a2),a2 + move.l a2,a0 + bsr strcopy + move.w ByteRatiov(MainBase),d0 + lea byteratioSIBuff,a0 + bsr konverter + move.w FileRatiov(MainBase),d0 + lea fileratioSIBuff,a0 + bsr konverterw + move.w MinULSpace(MainBase),d0 + lea minspaceSIBuff,a0 + bsr konverterw + bsr updateslidebar + bsr refreshfilreq + pop a2/d2 + rts + +10$ and.w #~CHECKED,mi_Flags(a0) ; slaar av flagget + btst d0,d2 ; skal det vaere paa ? + beq.s 19$ ; nei. + or.w #CHECKED,mi_Flags(a0) ; slaar det paa +19$ rts + +20$ and.w #~GFLG_SELECTED,gg_Flags(a0) ; slaar av flagget + btst d0,d2 ; skal det vaere paa ? + beq.s 29$ ; nei. + or.w #GFLG_SELECTED,gg_Flags(a0) ; slaar det paa +29$ rts + +updateslidebar + bsr calcpotbody + lea slidebarSInfo,a0 + move.w d0,pi_VertPot(a0) + move.w d1,pi_VertBody(a0) + rts + +calcpotbody + push d2/d3/d4 +; totallines = d3 +; visiblelines = 4 +; topline = d2 +; overlap = 1 +; hidden = d1 + + move.w conftop,d2 + move.w ActiveConf(MainBase),d3 + tst.l d6 ; conf aktiv ? + beq.s 1$ ; ja + move.w dirtop,d2 + move.w ActiveDirs(MainBase),d3 +1$ move.w d3,d1 + sub.w #4,d1 + bcc.s 2$ + moveq.l #0,d1 ; hidden klar +2$ cmp.w d2,d1 ; topline,hidden + bcc.s 3$ + move.w d1,d2 ; reduce topline +3$ move.w #MAXBODY,d0 + tst.w d1 ; hidden == 0 ? + beq.s 4$ ; jepp + move.l #(4-1)*MAXBODY,d0 + move.w d3,d4 + sub.w #1,d4 + divu d4,d0 +4$ move.w d0,d4 + moveq.l #0,d0 + tst.w d1 ; hidden == 0 ? + beq.s 5$ ; jepp + move.w d2,d0 + mulu #MAXPOT,d0 + divu d1,d0 +5$ move.w d4,d1 + pop d2/d3/d4 + rts + +refreshfilreqspes + tst.l d7 ; er det full setup ? + bne.s 9$ ; ja. dette er en nop + move.l intbase,a6 + move.l winadr,a0 + lea name1,a1 ; fjerner Name gadgetene + moveq.l #4,d0 + jsrlib RemoveGList + bsr refreshfilreq + move.l winadr,a0 + lea name1,a1 ; opp med gadgetene + moveq.l #-1,d0 + moveq.l #4,d1 + jsrlib AddGList + move.l winadr,a1 ; refresh'er dem + lea name1,a0 + moveq.l #4,d0 + jsrlib RefreshGList + move.l _SysBase,a6 +9$ rts + +refreshfilreq + push a2/a3/d2/d3/d4 + tst.l d7 ; er det full setup ? + bne.s 9$ ; ja. dette er en nop + moveq.l #0,d3 + moveq.l #0,d4 ; 4 gadget'er aa update + lea nameptrs,a4 + lea ConfOrder(MainBase),a2 + lea ConfNames(MainBase),a3 + move.w conftop,d2 + tst.l d6 ; conf aktiv ? + beq.s 1$ ; ja + lea FileOrder(MainBase),a2 + lea DirNames(MainBase),a3 + move.w dirtop,d2 +1$ move.b 0(a2,d2.w),d3 ; henter nummeret + sub.b #1,d3 + move.l d3,d0 + mulu #Sizeof_NameT,d0 + lea (0,a3,d0.l),a0 + move.l (a4)+,a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopypace + add.w #1,d2 + addq.l #1,d4 + cmp.w #4,d4 + bcs.s 1$ +9$ pop a2/a3/d2/d3/d4 + rts + +nameptrs dc.l ITextText51,ITextText52,ITextText53,ITextText54 + +setupnewconfig + move.l d2,-(a7) + move.w #MaxConferences,d2 ; oppdaterer MaxScan og order + move.w #50,d0 + moveq.l #1,d1 + lea ConfOrder(MainBase),a1 + lea ConfMaxScan(MainBase),a0 +1$ move.w d0,(a0)+ + move.b d1,(a1)+ + addq.l #1,d1 + sub.w #1,d2 + bne.s 1$ + + move.w #MaxFileDirs,d2 ; oppdaterer Filedir order + moveq.l #1,d1 + lea FileOrder(MainBase),a1 +2$ move.b d1,(a1)+ + addq.l #1,d1 + sub.w #1,d2 + bne.s 2$ + move.l (a7)+,d2 + rts + +handlemsg + move.l a1,-(a7) + XREF Forbid +0$ jsrlib Forbid + lea mainmsgportname,a1 + jsrlib FindPort + move.l (a7)+,a1 + tst.l d0 + beq.s 9$ + move.l d0,a0 + jsrlib PutMsg + jsrlib Permit +1$ move.l port,a0 + jsrlib WaitPort + tst.l d0 + beq.s 1$ + move.l port,a0 + jsrlib GetMsg + tst.l d0 + beq.s 1$ + rts +9$ move.l a1,-(a7) + jsrlib Permit + lea IText70,a1 ; BodyText + bsr req ; Trenger abbs !! + bne.s 0$ ; Prøv igjen + addq.l #4,a7 + setz ; gir opp + rts + +req movem.l a2/a3/a6,-(a7) + move.l intbase,a6 + move.l winadr,a0 + lea IText90,a2 ; PositiveText + lea IText80,a3 ; NegativeText + moveq.l #0,d0 ; PositiveFlags + moveq.l #0,d1 ; NegativeFlags + move.l #300,d2 ; with + moveq.l #60,d3 ; height + jsrlib AutoRequest + movem.l (a7)+,a2/a3/a6 + tst.l d0 + rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) (hvis name er null, så blir det en privat port) +;outputs: msgport (d0) +****************************** +CreatePort + movem.l d2/d3/a2/a3,-(sp) + move.l a0,a2 + move.l d0,d3 + move.l #MP_SIZE,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.s 1$ + move.l d0,a3 + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + beq.s 2$ + move.b d0,MP_SIGBIT(a3) + sub.l a1,a1 + jsrlib FindTask + move.l d0,MP_SIGTASK(a3) + move.l a2,LN_NAME(a3) + move.b d3,LN_PRI(a3) + move.b #NT_MSGPORT,LN_TYPE(a3) + move.b #PA_SIGNAL,MP_FLAGS(a3) + move.l a3,a1 + tst.l LN_NAME(a1) + bne.s 3$ + lea MP_MSGLIST(A1),A0 ; Address of port's message list. + NEWLIST a0 ; initer msg listen + bra.s 4$ +3$ jsrlib AddPort +4$ move.l a3,d0 + movem.l (sp)+,a2/a3/d2/d3 + rts + +2$ move.l a3,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem +1$ movem.l (sp)+,a2/a3/d2/d3 + setz + rts + + +; d0 = tall +; a0 = inn streng. +konverterw + and.l #$ffff,d0 +konverter + link a5,#-12 + move.l sp,a1 +1$ moveq.l #10,d1 + bsr divspes + add.w #'0',d1 + move.b d1,(a1)+ + tst.l d0 + bne.s 1$ + move.l a1,d1 + moveq.l #0,d0 +2$ move.b -(a1),(a0)+ + add.l #1,d0 + cmpa.l a1,sp + bne.s 2$ + clr.b (a0) + sub.l sp,d1 + unlk a5 + rts + +divspes move.l d2,-(sp) + swap d1 + move.w d1,d2 + bne.s 9$ + swap d0 + swap d1 + swap d2 + move.w d0,d2 + beq.s 1$ + divu d1,d2 + move.w d2,d0 +1$ swap d0 + move.w d0,d2 + divu d1,d2 + move.w d2,d0 + swap d2 + move.w d2,d1 +9$ move.l (sp)+,d2 + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(sp) + move.l a0,a2 + move.l a0,a1 + tst.l LN_NAME(a1) ; Er den add'a ? + beq.s 1$ ; nei. + jsrlib RemPort +1$ move.b MP_SIGBIT(a2),d0 + jsrlib FreeSignal + move.l a2,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem + move.l (sp)+,a2 + rts + +atoi moveq.l #-1,d0 + moveq.l #0,d1 +1$ move.b (a0)+,d1 + beq.s 9$ + cmp.b #' ',d1 + beq.s 9$ + cmp.b #10,d1 + beq.s 9$ + cmp.b #13,d1 + beq.s 9$ + sub.b #'0',d1 + bcs.s 8$ + cmp.b #9,d1 + bhi.s 8$ + cmp.l #-1,d0 + bne.s 2$ + move.l d1,d0 + bra.s 1$ +2$ mulu #10,d0 + add.l d1,d0 + bra.s 1$ +8$ setn + rts +9$ tst.w d0 + rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + +****************************** +;strcopylen (fromstreng,tostreng1,length) +;memcopylen (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +****************************** +strcopylen +memcopylen + subq.l #1,d0 + bcs.s 9$ +1$ move.b (a0)+,(a1)+ + dbf d0,1$ +9$ rts + +****************************** +;strcopymaxlen (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +;Fyller ut med 0'er på slutten. +****************************** +strcopymaxlen + sub.w #1,d0 +2$ move.b (a0)+,(a1)+ + beq.s 3$ + dbf d0,2$ + bra.s 9$ +1$ move.b #0,(a1)+ +3$ dbf d0,1$ +9$ rts + +****************************** +;strcopymaxlenspace (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +;Fyller ut med spac'er på slutten. +****************************** +strcopypace + sub.w #1,d0 +2$ move.b (a0)+,(a1)+ + beq.s 1$ + dbf d0,2$ + bra.s 9$ +1$ move.b #' ',-1(a1) +3$ move.b #' ',(a1)+ + dbf d0,3$ +9$ move.b #0,-1(a1) + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +****************************** +;char = upchar (char) +;d0.b d0.b +****************************** + +upchar cmp.b #'a',d0 + bcs.s 1$ + cmp.b #'z',d0 + bhi.s 2$ + sub.b #'a'-'A',d0 +1$ rts +2$ cmp.b #224,d0 ; Starten på utenlandske tegn (små) + bcs.s 3$ + sub.b #32,d0 ; Forskjellen på Store og små ISO tegn. +3$ rts + +****************************** +;string = upstring (string) +;a0 a0 +;does a upchar on every char in string +****************************** + +upstring + movem.l a0/d0,-(sp) + move.l a0,a1 +3$ move.b (a0)+,d0 + beq.s 1$ + bsr upchar + move.b d0,(a1)+ + bra.s 3$ +1$ movem.l (sp)+,a0/d0 + rts + +****************************** +;result = comparestringsfull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +****************************** +comparestringsfull + subq.w #1,d0 +1$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + dbne d0,1$ + rts + + section bdata,BSS + +_SysBase ds.l 1 +charset ds.b 1 +pad_1 ds.b 1 + +oldordr ds.w 1 +newordr ds.w 1 +topnr ds.w 1 +conftop ds.w 1 +dirtop ds.w 1 +menusta ds.w 1 +titlech ds.w 1 +msgport ds.l 1 +winadr ds.l 1 +dosbase ds.l 1 +intbase ds.l 1 +port ds.l 1 +mem ds.l 1 +msg ds.b ABBSmsg_SIZE +userrec ds.b UserRecord_SIZEOF + + section data,data + +charsettext + dc.b 'ISO',0 + dc.b 'IBM',0 + dc.b 'IBN',0,0,0 + +confacsbitstext dc.b 'RWPAVEN',0,0 + +intererror1text dc.b 'Internal error 1',0 +sorrynocodetext dc.b 'Sorry. Edit save is not functional yet.',0 +wrongdatatext dc.b 'Error in data or data missing !',0 +cantcrsysoptext dc.b 'Can''t create sysop !',0 +cantsasysoptext dc.b 'Can''t save sysop !',0 +cantrenysoptext dc.b 'Can''t rename sysop !',0 +cantcrconftext dc.b 'Can''t create conference !',0 +cantcrfdirtext dc.b 'Can''t create filedir !',0 +nomenutext dc.b 'Error setting up menu',10,0 +nowindowtext dc.b 'Can''t open window',10,0 +nosysoptext dc.b 'Error loading sysop',10,0 +noporttext dc.b 'Can''t create msg port',10,0 +nomemtext dc.b 'Can''t allocate memory',10,0 +cantsavcnfitext dc.b 'Can''t save config !',0 + +dosname dc.b 'dos.library',0 +intname dc.b 'intuition.library',0 +noabbstext dc.b 'Can''t find abbs !',10,0 +tmpportname dc.b 'ConfigBBS port',0 +mainmsgportname + dc.b 'ABBS mainport',0 +fildedirpath dc.b 'abbs:files/',0 +uploadname dc.b 'UPLOAD',0 +privatename dc.b 'PRIVATE',0 + + CNOP 0,2 + +activetabell + dc.l SysopPassword,SysopAddress,postal,Hometlf,Worktlf,Boardname + dc.l News,Post,Userinfo,Fileinfo,newtime,newfiletime,maxmsglines + dc.l sleeptime,byteratio,fileratio,minspace,Sysopname + +specialjumptable + dc.l filedirbitcode,confbitcode,bigupcode,bigdowncode,slidebarcode + dc.l upcode,downcode,name1code,name2code,name3code,name4code,cfnamecode + dc.l pathcode,ordercode,scancode,bitscode + + +NewWindowStructure1: + dc.w 0,0 + dc.w 640,200 + dc.b 0,1 + dc.l GADGETUP+MENUPICK + dc.l WINDOWDRAG+WINDOWDEPTH+ACTIVATE+NOCAREREFRESH + dc.l GadgetList1 + dc.l NULL + dc.l NewWindowName1 + dc.l NULL + dc.l NULL + dc.w 5,5 + dc.w -1,-1 + dc.w WBENCHSCREEN +NewWindowName1: + dc.b 'ConfigBBS',0 + cnop 0,2 +UNDOBUFFER: + dcb.b 31,0 + cnop 0,2 +GadgetList1: +Sysopname: + dc.l SysopPassword + dc.w 16,34 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border1 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopnameSInfo + dc.w 1 + dc.l NULL +SysopnameSInfo: + dc.l SysopnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border1: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors1 + dc.l NULL +BorderVectors1: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +SysopPassword: + dc.l SysopAddress + dc.w 268,34 + dc.w 73,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopPasswordSInfo + dc.w 2 + dc.l NULL +SysopPasswordSInfo: + dc.l SysopPasswordSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopPasswordSIBuff: + dcb.b 9,0 + cnop 0,2 +Border2: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors2 + dc.l NULL +BorderVectors2: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +SysopAddress: + dc.l postal + dc.w 16,55 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border3 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopAddressSInfo + dc.w 3 + dc.l NULL +SysopAddressSInfo: + dc.l SysopAddressSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopAddressSIBuff: + dcb.b 31,0 + cnop 0,2 +Border3: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors3 + dc.l NULL +BorderVectors3: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +postal: + dc.l News + dc.w 16,76 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l postalSInfo + dc.w 4 + dc.l NULL +postalSInfo: + dc.l postalSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +postalSIBuff: + dcb.b 31,0 + cnop 0,2 +Border4: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors4 + dc.l NULL +BorderVectors4: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +News: + dc.l Post + dc.w 369,23 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border5 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NewsSInfo + dc.w 8 + dc.l NULL +NewsSInfo: + dc.l NewsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +NewsSIBuff: + dc.b 'News',0,0 +PWstringlen set *-NewsSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border5: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors5 + dc.l NULL +BorderVectors5: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Post: + dc.l Userinfo + dc.w 370,45 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l PostSInfo + dc.w 9 + dc.l NULL +PostSInfo: + dc.l PostSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +PostSIBuff: + dc.b 'Post',0 +PWstringlen set *-PostSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border6: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors6 + dc.l NULL +BorderVectors6: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Userinfo: + dc.l Fileinfo + dc.w 370,67 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border7 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l UserinfoSInfo + dc.w 10 + dc.l NULL +UserinfoSInfo: + dc.l UserinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +UserinfoSIBuff: + dc.b 'UserInfo',0 +PWstringlen set *-UserinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border7: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors7 + dc.l NULL +BorderVectors7: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Fileinfo: + dc.l newtime + dc.w 370,89 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l FileinfoSInfo + dc.w 11 + dc.l NULL +FileinfoSInfo: + dc.l FileinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +FileinfoSIBuff: + dc.b 'Fileinfo',0 +PWstringlen set *-FileinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border8: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors8 + dc.l NULL +BorderVectors8: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +newtime: + dc.l newfiletime + dc.w 16,125 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border9 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newtimeSInfo + dc.w 12 + dc.l NULL +newtimeSInfo: + dc.l newtimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newtimeSIBuff: + dc.b '30',0 +PWstringlen set *-newtimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border9: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors9 + dc.l NULL +BorderVectors9: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +newfiletime: + dc.l Boardname + dc.w 16,137 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newfiletimeSInfo + dc.w 13 + dc.l NULL +newfiletimeSInfo: + dc.l newfiletimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newfiletimeSIBuff: + dc.b '15',0 +PWstringlen set *-newfiletimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border10: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors10 + dc.l NULL +BorderVectors10: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Boardname: + dc.l fileratio + dc.w 241,97 + dc.w 110,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border11 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BoardnameSInfo + dc.w 7 + dc.l NULL +BoardnameSInfo: + dc.l BoardnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BoardnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border11: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors11 + dc.l NULL +BorderVectors11: + dc.w 0,0 + dc.w 109,0 + dc.w 109,10 + dc.w 0,10 + dc.w 0,1 +fileratio: + dc.l byteratio + dc.w 16,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l fileratioSInfo + dc.w 17 + dc.l NULL +fileratioSInfo: + dc.l fileratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +fileratioSIBuff: + dc.b '5',0 +PWstringlen set *-fileratioSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border12: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors12 + dc.l NULL +BorderVectors12: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratio: + dc.l fileratiobit + dc.w 16,173 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l byteratioSInfo + dc.w 16 + dc.l NULL +byteratioSInfo: + dc.l byteratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 5 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +byteratioSIBuff: + dc.b '1000',0 + cnop 0,2 +Border13: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors13 + dc.l NULL +BorderVectors13: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +fileratiobit: + dc.l minspace + dc.w 156,183 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image1 + dc.l Image2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image1: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData1 + dc.b $0003,$0000 + dc.l NULL +Image2: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData2 + dc.b $0003,$0000 + dc.l NULL +minspace: + dc.l maxmsglines + dc.w 207,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border14 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l minspaceSInfo + dc.w 18 + dc.l NULL +minspaceSInfo: + dc.l minspaceSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +minspaceSIBuff: + dc.b '100',0 + cnop 0,2 +Border14: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors14 + dc.l NULL +BorderVectors14: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +maxmsglines: + dc.l sleeptime + dc.w 16,149 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l maxmsglinesSInfo + dc.w 14 + dc.l NULL +maxmsglinesSInfo: + dc.l maxmsglinesSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 5 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +maxmsglinesSIBuff: + dc.b '300',0 + cnop 0,2 +Border15: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors15 + dc.l NULL +BorderVectors15: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +sleeptime: + dc.l byteratiobit + dc.w 16,161 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border16 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l sleeptimeSInfo + dc.w 15 + dc.l NULL +sleeptimeSInfo: + dc.l sleeptimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 3 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +sleeptimeSIBuff: + dc.b '3',0 +PWstringlen set *-sleeptimeSIBuff + dcb.b 3-PWstringlen,0 + cnop 0,2 +Border16: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors16 + dc.l NULL +BorderVectors16: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratiobit: + dc.l Hometlf + dc.w 156,171 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image3 + dc.l Image4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image3: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData3 + dc.b $0003,$0000 + dc.l NULL +Image4: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData4 + dc.b $0003,$0000 + dc.l NULL +Hometlf: + dc.l Worktlf + dc.w 16,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l HometlfSInfo + dc.w 5 + dc.l NULL +HometlfSInfo: + dc.l HometlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +HometlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border17: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors17 + dc.l NULL +BorderVectors17: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 +Worktlf: + dc.l filedirbit + dc.w 122,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border18 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l WorktlfSInfo + dc.w 6 + dc.l NULL +WorktlfSInfo: + dc.l WorktlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +WorktlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border18: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors18 + dc.l NULL +BorderVectors18: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 +filedirbit: + dc.l confbit + dc.w 368,101 + dc.w 75,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image5 + dc.l Image6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -1 + dc.l NULL +Image5: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData5 + dc.b $0003,$0000 + dc.l NULL +Image6: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData6 + dc.b $0003,$0000 + dc.l NULL +confbit: + dc.l bigup + dc.w 445,101 + dc.w 91,9 + dc.w GADGHIMAGE+GADGIMAGE+GFLG_SELECTED + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image7 + dc.l Image8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -2 + dc.l NULL +Image7: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData7 + dc.b $0003,$0000 + dc.l NULL +Image8: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData8 + dc.b $0003,$0000 + dc.l NULL +bigup: + dc.l bigdown + dc.w 542,101 + dc.w 32,9 + dc.w GADGHIMAGE+GADGIMAGE+GFLG_DISABLED + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image9 + dc.l Image10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -3 + dc.l NULL +Image9: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData9 + dc.b $0003,$0000 + dc.l NULL +Image10: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData10 + dc.b $0003,$0000 + dc.l NULL +bigdown: + dc.l slidebar + dc.w 580,101 + dc.w 34,9 + dc.w GADGHIMAGE+GADGIMAGE+GFLG_DISABLED + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image11 + dc.l Image12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -4 + dc.l NULL +Image11: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData11 + dc.b $0003,$0000 + dc.l NULL +Image12: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData12 + dc.b $0003,$0000 + dc.l NULL +slidebar: + dc.l up + dc.w 617,100 + dc.w 17,44 + dc.w NULL ;GADGIMAGE + dc.w RELVERIFY + dc.w PROPGADGET + dc.l Image13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l slidebarSInfo + dc.w -5 + dc.l NULL +slidebarSInfo: + dc.w AUTOKNOB+FREEVERT+PROPNEWLOOK + dc.w MAXPOT,MAXPOT + dc.w MAXBODY,MAXBODY + dc.w 0,0,0,0,0,0 +Image13: + dc.w 0,0 + dc.w 10,40 + dc.w 0 + dc.l NULL + dc.b $0000,$0000 + dc.l NULL +up: + dc.l down + dc.w 619,146 + dc.w 15,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image14 + dc.l Image15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -6 + dc.l NULL +Image14: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData14 + dc.b $0003,$0000 + dc.l NULL +Image15: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData15 + dc.b $0003,$0000 + dc.l NULL +down: + dc.l name1 + dc.w 619,155 + dc.w 14,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image16 + dc.l Image17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -7 + dc.l NULL +Image16: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData16 + dc.b $0003,$0000 + dc.l NULL +Image17: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData17 + dc.b $0003,$0000 + dc.l NULL +name1: + dc.l name2 + dc.w 368,113 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border19 + dc.l NULL + dc.l IText51 + dc.l NULL + dc.l NULL + dc.w -8 + dc.l NULL +Border19: + dc.w -1,-1 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors19 + dc.l NULL +BorderVectors19: + dc.w 0,0 + dc.w 247,0 + dc.w 247,40 + dc.w 0,40 + dc.w 0,1 +IText51: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText51 + dc.l NULL +ITextText51: + ds.b Sizeof_NameT+2 + cnop 0,2 +name2: + dc.l name3 + dc.w 368,123 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border20 + dc.l NULL + dc.l IText52 + dc.l NULL + dc.l NULL + dc.w -9 + dc.l NULL +Border20: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors20 + dc.l NULL +BorderVectors20: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +IText52: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText52 + dc.l NULL +ITextText52: + ds.b Sizeof_NameT+2 + cnop 0,2 +name3: + dc.l name4 + dc.w 368,133 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border21 + dc.l NULL + dc.l IText53 + dc.l NULL + dc.l NULL + dc.w -10 + dc.l NULL +Border21: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors21 + dc.l NULL +BorderVectors21: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +IText53: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText53 + dc.l NULL +ITextText53: + ds.b Sizeof_NameT+2 + cnop 0,2 +name4: + dc.l CFName + dc.w 368,143 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Border22 + dc.l NULL + dc.l IText54 + dc.l NULL + dc.l NULL + dc.w -11 + dc.l NULL +Border22: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors22 + dc.l NULL +BorderVectors22: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +IText54: + dc.b 3,0,RP_JAM2,0 + dc.w 1,1 + dc.l NULL + dc.l ITextText54 + dc.l NULL +ITextText54: + ds.b Sizeof_NameT+2 + cnop 0,2 +CFName: + dc.l scan + dc.w 370,156 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border23 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l CFNameSInfo + dc.w -12 + dc.l NULL +CFNameSInfo: + dc.l CFNameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +CFNameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border23: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors23 + dc.l NULL +BorderVectors23: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +scan: + dc.l Bits + dc.w 488,180 + dc.w 33,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border26 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l scanSInfo + dc.w -15 + dc.l NULL +scanSInfo: + dc.l scanSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +scanSIBuff: + dcb.b 4,0 + cnop 0,2 +Border26: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors26 + dc.l NULL +BorderVectors26: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Bits: + dc.l order + dc.w 541,180 + dc.w 72,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border27 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BitsSInfo + dc.w -16 + dc.l NULL +BitsSInfo: + dc.l BitsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BitsSIBuff: + dcb.b 9,0 + cnop 0,2 +Border27: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors27 + dc.l NULL +BorderVectors27: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +order: + dc.l path + dc.w 435,180 + dc.w 32,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border25 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l orderSInfo + dc.w -14 + dc.l NULL +orderSInfo: + dc.l orderSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +orderSIBuff: + dcb.b 4,0 + cnop 0,2 +Border25: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors25 + dc.l NULL +BorderVectors25: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 + +path: dc.l NULL + dc.w 370,168 + dc.w 244,8 + dc.w GFLG_DISABLED + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border24 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l pathSInfo + dc.w -13 + dc.l NULL +pathSInfo: + dc.l pathSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +pathSIBuff: + dcb.b 31,0 + cnop 0,2 +Border24: + dc.w -3,-2 + dc.b 3,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors24 + dc.l NULL +BorderVectors24: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 + +MenuList1: +Menu1: + dc.l Menu2 + dc.w 0,0 + dc.w 63,0 + dc.w MENUENABLED + dc.l Menu1Name + dc.l MenuItem1 + dc.w 0,0,0,0 +Menu1Name: + dc.b 'Project',0 + cnop 0,2 +MenuItem1: + dc.l MenuItem2 + dc.w 0,0 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText1 + dc.l NULL + dc.b 'L' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText1: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText1 + dc.l NULL +ITextText1: + dc.b 'Load Config',0 + cnop 0,2 +MenuItem2: + dc.l MenuItem3 + dc.w 0,8 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText2 + dc.l NULL + dc.b 'S' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText2: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText2 + dc.l NULL +ITextText2: + dc.b 'Save Config',0 + cnop 0,2 +MenuItem3: + dc.l NULL + dc.w 0,16 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText3 + dc.l NULL + dc.b 'Q' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText3: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText3 + dc.l NULL +ITextText3: + dc.b 'Quit',0 + cnop 0,2 +Menu2: + dc.l Menu3 + dc.w 70,0 + dc.w 71,0 + dc.w MENUENABLED + dc.l Menu2Name + dc.l MenuItem4 + dc.w 0,0,0,0 +Menu2Name: + dc.b 'Features',0 + cnop 0,2 +MenuItem4: + dc.l MenuItem5 + dc.w 0,0 + dc.w 131,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText4 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText4: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText4 + dc.l NULL +ITextText4: + dc.b 'Interlaced',0 + cnop 0,2 +MenuItem5: + dc.l MenuItem6 + dc.w 0,8 + dc.w 131,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText5 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText5: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText5 + dc.l NULL +ITextText5: + dc.b '8 Colors',0 + cnop 0,2 +MenuItem6: + dc.l NewMenuItem1 + dc.w 0,16 + dc.w 131,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText6 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l SubItem1 + dc.w MENUNULL +IText6: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText6 + dc.l NULL +ITextText6: + dc.b 'Charset ISO',0 + cnop 0,2 +SubItem1: + dc.l SubItem2 + dc.w 92,-8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText7 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText7: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText7 + dc.l NULL +ITextText7: + dc.b 'ISO',0 + cnop 0,2 +SubItem2: + dc.l SubItem3 + dc.w 92,0 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText8 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText8: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText8 + dc.l NULL +ITextText8: + dc.b 'IBM',0 + cnop 0,2 +SubItem3: + dc.l NULL + dc.w 92,8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText9 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText9: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText9 + dc.l NULL +ITextText9: + dc.b 'IBN',0 + cnop 0,2 + + +NewMenuItem1 + dc.l NewMenuItem2 + dc.w 0,24 + dc.w 131,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l NewIText1 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +NewIText1: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l NewITextText1 + dc.l NULL +NewITextText1: + dc.b 'Allow TmpSysop',0 + cnop 0,2 + +NewMenuItem2 + dc.l NULL + dc.w 0,32 + dc.w 131,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l NewIText2 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +NewIText2: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l NewITextText2 + dc.l NULL +NewITextText2: + dc.b 'Use ASL',0 + cnop 0,2 + + +Menu3: + dc.l NULL + dc.w 148,0 + dc.w 111,0 + dc.w MENUENABLED + dc.l Menu3Name + dc.l MenuItem7 + dc.w 0,0,0,0 +Menu3Name: + dc.b 'New Users May',0 + cnop 0,2 +MenuItem7: + dc.l MenuItem8 + dc.w 0,0 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText10 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText10: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText10 + dc.l NULL +ITextText10: + dc.b 'Upload',0 + cnop 0,2 +MenuItem8: + dc.l NULL + dc.w 0,8 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText11 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText11: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText11 + dc.l NULL +ITextText11: + dc.b 'Download',0 + cnop 0,2 +IntuiTextList1: +IText12: + dc.b 3,0,RP_JAM2,0 + dc.w 54,125 + dc.l NULL + dc.l ITextText12 + dc.l IText13 +ITextText12: + dc.b 'Time limit',0 + cnop 0,2 +IText13: + dc.b 3,0,RP_JAM2,0 + dc.w 55,137 + dc.l NULL + dc.l ITextText13 + dc.l IText14 +ITextText13: + dc.b 'File Time Limit',0 + cnop 0,2 +IText14: + dc.b 3,0,RP_JAM2,0 + dc.w 54,185 + dc.l NULL + dc.l ITextText14 + dc.l IText15 +ITextText14: + dc.b 'File Ratio',0 + cnop 0,2 +IText15: + dc.b 3,0,RP_JAM2,0 + dc.w 55,173 + dc.l NULL + dc.l ITextText15 + dc.l IText16 +ITextText15: + dc.b 'KByte Ratio',0 + cnop 0,2 +IText16: + dc.b 3,0,RP_JAM2,0 + dc.w 246,185 + dc.l NULL + dc.l ITextText16 + dc.l IText17 +ITextText16: + dc.b 'Min UL Space',0 + cnop 0,2 +IText17: + dc.b 3,0,RP_JAM2,0 + dc.w 55,149 + dc.l NULL + dc.l ITextText17 + dc.l IText18 +ITextText17: + dc.b 'Max Lines In Msgs',0 + cnop 0,2 +IText18: + dc.b 3,0,RP_JAM2,0 + dc.w 54,161 + dc.l NULL + dc.l ITextText18 + dc.l IText19 +ITextText18: + dc.b 'Sleep Time',0 + cnop 0,2 +IText19: + dc.b 3,0,RP_JAM2,0 + dc.w 432,190 + dc.l NULL + dc.l ITextText19 + dc.l IText20 +ITextText19: + dc.b 'Order Scan Bits',0 + cnop 0,2 +IText20: + dc.b 2,0,RP_JAM2,0 + dc.w 14,13 + dc.l NULL + dc.l ITextText20 + dc.l IText21 +ITextText20: + dc.b 'SYSOP INFO',0 + cnop 0,2 +IText21: + dc.b 3,0,RP_JAM2,0 + dc.w 237,87 + dc.l NULL + dc.l ITextText21 + dc.l IText22 +ITextText21: + dc.b 'Board Name',0 + cnop 0,2 +IText22: + dc.b 3,0,RP_JAM2,0 + dc.w 367,13 + dc.l NULL + dc.l ITextText22 + dc.l IText23 +ITextText22: + dc.b 'News Conference Name',0 + cnop 0,2 +IText23: + dc.b 3,0,RP_JAM2,0 + dc.w 367,35 + dc.l NULL + dc.l ITextText23 + dc.l IText24 +ITextText23: + dc.b 'Post Conference Name',0 + cnop 0,2 +IText24: + dc.b 3,0,RP_JAM2,0 + dc.w 367,57 + dc.l NULL + dc.l ITextText24 + dc.l IText25 +ITextText24: + dc.b 'UserInfo Conference Name',0 + cnop 0,2 +IText25: + dc.b 3,0,RP_JAM2,0 + dc.w 367,79 + dc.l NULL + dc.l ITextText25 + dc.l IText26 +ITextText25: + dc.b 'FileInfo Conference Name',0 + cnop 0,2 +IText26: + dc.b 3,0,RP_JAM2,0 + dc.w 14,24 + dc.l NULL + dc.l ITextText26 + dc.l IText27 +ITextText26: + dc.b 'Name',0 + cnop 0,2 +IText27: + dc.b 3,0,RP_JAM2,0 + dc.w 13,45 + dc.l NULL + dc.l ITextText27 + dc.l IText28 +ITextText27: + dc.b 'Address',0 + cnop 0,2 +IText28: + dc.b 3,0,RP_JAM2,0 + dc.w 13,66 + dc.l NULL + dc.l ITextText28 + dc.l IText29 +ITextText28: + dc.b 'Postal Code',0 + cnop 0,2 +IText29: + dc.b 3,0,RP_JAM2,0 + dc.w 13,87 + dc.l NULL + dc.l ITextText29 + dc.l IText30 +ITextText29: + dc.b 'Home Phone',0 + cnop 0,2 +IText30: + dc.b 3,0,RP_JAM2,0 + dc.w 120,87 + dc.l NULL + dc.l ITextText30 + dc.l IText31 +ITextText30: + dc.b 'Work Phone',0 + cnop 0,2 +IText31: + dc.b 3,0,RP_JAM2,0 + dc.w 265,24 + dc.l NULL + dc.l ITextText31 + dc.l NULL +ITextText31: + dc.b 'Password',0 + cnop 0,2 + +;**************** requester tekst ***************** +IText70: + dc.b 1,0,RP_JAM2,0 + dc.w 6,3 ;x,y + dc.l NULL + dc.l ITextText70 + dc.l IText720 + +ITextText70: + dc.b 'Can''t find ABBS''s msgport.',0 + cnop 0,2 + +IText720: + dc.b 1,0,RP_JAM2,0 + dc.w 6,3+10 ;x,y + dc.l NULL + dc.l ITextText720 + dc.l NULL + +ITextText720: + dc.b 'You must run ABBS first !.',0 + cnop 0,2 + +IText80: + dc.b 1,0,RP_JAM2,0 + dc.w 6,3 ;x,y + dc.l NULL + dc.l ITextText80 + dc.l NULL +ITextText80: + dc.b 'Cancel',0 + cnop 0,2 + +IText90: + dc.b 1,0,RP_JAM2,0 + dc.w 6,3 ;x,y + dc.l NULL + dc.l ITextText90 + dc.l NULL +ITextText90: + dc.b ' Retry ',0 + cnop 0,2 + + section imagedata,data_c + +ImageData1: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 + +ImageData2: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData3: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 +ImageData4: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData5: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$1F86,$0600,$001E,$0600,$0010,$1800 + dc.w $0600,$001B,$0000,$0010,$1806,$060F,$0019,$861F + dc.w $0F10,$1E06,$0619,$8019,$8619,$9810,$1806,$061F + dc.w $8019,$8618,$0F10,$1806,$0618,$001B,$0618,$0190 + dc.w $1803,$030F,$001E,$0318,$1F10,$0000,$0000,$0000 + dc.w $0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000,$0000 + dc.w $0000,$9F86,$0600,$001E,$0600,$0000,$9800,$0600 + dc.w $001B,$0000,$0000,$9806,$060F,$0019,$861F,$0F00 + dc.w $9E06,$0619,$8019,$8619,$9800,$9806,$061F,$8019 + dc.w $8618,$0F00,$9806,$0618,$001B,$0618,$0180,$9803 + dc.w $030F,$001E,$0318,$1F00,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000 + +ImageData6: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000 + dc.w $0000,$0000,$9F86,$0600,$001E,$0600,$0000,$9800 + dc.w $0600,$001B,$0000,$0000,$9806,$060F,$0019,$861F + dc.w $0F00,$9E06,$0619,$8019,$8619,$9800,$9806,$061F + dc.w $8019,$8618,$0F00,$9806,$0618,$001B,$0618,$0180 + dc.w $9803,$030F,$001E,$0318,$1F00,$8000,$0000,$0000 + dc.w $0000,$0000,$8000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0010,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0010,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0010,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0010,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0010,$7FFF,$FFFF,$FFFF,$FFFF,$FFF0 + +ImageData7: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0780,$0007,$0000,$0000 + dc.w $0000,$0010,$0C00,$000C,$0000,$0000,$0000,$0010 + dc.w $180F,$1F1F,$0F1F,$0F1F,$0F0F,$0F10,$1819,$998C + dc.w $1999,$9999,$9819,$9810,$1819,$998C,$1F98,$1F99 + dc.w $981F,$8F10,$0C19,$998C,$1818,$1819,$9818,$0190 + dc.w $078F,$198C,$0F18,$0F19,$8F0F,$1F10,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF + dc.w $FFFF,$FFF0,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$8780,$0007 + dc.w $0000,$0000,$0000,$0000,$8C00,$000C,$0000,$0000 + dc.w $0000,$0000,$980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00 + dc.w $9819,$998C,$1999,$9999,$9819,$9800,$9819,$998C + dc.w $1F98,$1F99,$981F,$8F00,$8C19,$998C,$1818,$1819 + dc.w $9818,$0180,$878F,$198C,$0F18,$0F19,$8F0F,$1F00 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000 + +ImageData8: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8780,$0007,$0000,$0000 + dc.w $0000,$0000,$8C00,$000C,$0000,$0000,$0000,$0000 + dc.w $980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00,$9819,$998C + dc.w $1999,$9999,$9819,$9800,$9819,$998C,$1F98,$1F99 + dc.w $981F,$8F00,$8C19,$998C,$1818,$1819,$9818,$0180 + dc.w $878F,$198C,$0F18,$0F19,$8F0F,$1F00,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$7FFF,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0 + +ImageData9: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$000C,$C000 + dc.w $0400,$000C,$C000,$0400,$000C,$CF80,$0400,$000C + dc.w $CCC0,$0400,$000C,$CCC0,$0400,$000C,$CF80,$0400 + dc.w $0007,$8C00,$0400,$0000,$0C00,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C + dc.w $C000,$0000,$800C,$C000,$0000,$800C,$CF80,$0000 + dc.w $800C,$CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80 + dc.w $0000,$8007,$8C00,$0000,$8000,$0C00,$0000,$0000 + dc.w $0000,$0000 + +ImageData10: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C,$C000 + dc.w $0000,$800C,$C000,$0000,$800C,$CF80,$0000,$800C + dc.w $CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80,$0000 + dc.w $8007,$8C00,$0000,$8000,$0C00,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData11: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$0F00,$0000 + dc.w $0400,$0D80,$0000,$0400,$0CC7,$98CF,$8400,$0CCC + dc.w $D8CC,$C400,$0CCC,$DACC,$C400,$0D8C,$DFCC,$C400 + dc.w $0F07,$8D8C,$C400,$0000,$0000,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00 + dc.w $0000,$0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000 + dc.w $8CCC,$D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC + dc.w $C000,$8F07,$8D8C,$C000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000 + +ImageData12: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00,$0000 + dc.w $0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000,$8CCC + dc.w $D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC,$C000 + dc.w $8F07,$8D8C,$C000,$8000,$0000,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData13: + dc.w $0000,$2AC0,$5540,$2AC0,$5540,$2AC0,$FFC0,$FFC0 + dc.w $D500,$AA80,$D500,$AA80,$D500,$0000 + +ImageData14: + dc.w $0000,$0008,$0208,$0508,$0888,$1048,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData15: + dc.w $FFF8,$8000,$8200,$8500,$8880,$9040,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 + +ImageData16: + dc.w $0000,$0008,$1048,$0888,$0508,$0208,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData17: + dc.w $FFF8,$8000,$9040,$8880,$8500,$8200,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 + END diff --git a/util/Convert2.asm b/util/Convert2.asm new file mode 100644 index 0000000..11e4087 --- /dev/null +++ b/util/Convert2.asm @@ -0,0 +1,183 @@ + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + + section kode,code + +;Filelen = NodeRecord_SIZEOF +Filelen = ConfigRecord_SIZEOF + +filename MACRO + dc.b 'abbs:Config/ConfigFile',0 +; dc.b 'abbs:Config/nullmodem.config',0 +; dc.b 'ram:node.config',0 + ENDM + +PatchCode MACRO + + move.l a2,a0 + move.l d5,d0 + subq.l #1,d0 + beq.b 1113$ + bcc.b 1111$ +1113$ lea (nopasswdtext),a0 + bsr writedostext + bra.b no_file +1111$ cmp.w #Sizeof_PassT,d0 + bls.b 1112$ + move.w #Sizeof_PassT,d0 +1112$ add.l d0,a0 + move.b #0,(a0) + move.l a2,a0 + bsr writedostext + lea (newlinetext),a0 + bsr writedostext + move.l a2,a0 + lea (dosPassword,MainBase),a1 + bsr strcopy + +; move.b #60,ConnectWait(MainBase) +; or.w #SETUPF_NullModem,Setup(MainBase) + ENDM + +start move.l a0,a2 + move.l d0,d5 + move.l 4,a6 + openlib dos + + lea (patchingtext),a0 + bsr writedostext + lea (configfilename),a0 + bsr writedostext + lea (patchendtext),a0 + bsr writedostext + + move.l #Filelen,d0 ; allokerer minne + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + bne.s 2$ + lea nomem,a0 + bsr writedostext + bra no_mem +2$ move.l d0,MainBase + + move.l dosbase,a6 ; leser filen + move.l #configfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 3$ + lea erropenfiletext,a0 + bsr writedostext + bra no_file +3$ move.l d4,d1 + move.l MainBase,d2 + move.l #Filelen,d3 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d3,d2 + lea errorreadftext,a0 + bne 9$ + + PatchCode + + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_READWRITE,d2 + jsrlib Open + lea (eropenofiletext),a0 + move.l d0,d4 + beq.s 9$ + move.l d4,d1 + move.l MainBase,d2 + move.l #Filelen,d3 + jsrlib Write + lea altoktext,a2 + cmp.l d0,d3 + beq.b 4$ + lea (errorwriteftext),a2 +4$ move.l d4,d1 + jsrlib Close + move.l a2,a0 + +9$ bsr writedostext +no_file move.l 4,a6 + move.l #Filelen,d0 + move.l MainBase,a1 + jsrlib FreeMem +no_mem closlib dos +no_dos rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +copymemrev + subq.l #1,d0 + bcs.s 9$ + add.l d0,a0 + add.l d0,a1 + move.b (a0),(a1) + sub.w #1,d0 + bcs.s 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + section bdata,BSS + +dosbase ds.l 1 +paramfilename ds.b 80 + + section data,DATA + +nopasswdtext dc.b 'No password entered!',10 + dc.b 'Usage: MakePasswd ',10,0 +patchingtext dc.b 10,'Pathing: ',0 +patchendtext dc.b '',10,0 +errorreadftext dc.b 'Error reading input file.' +newlinetext dc.b 10,0 +errorwriteftext dc.b 'Error writing output file.',10,0 +altoktext dc.b 'Conversion sucessfull',10,0 +erropenfiletext dc.b 'Error opening input file',10,0 +eropenofiletext dc.b 'Error opening output file',10,0 +nomem dc.b 'Can''t get memory',10,0 +dosname dc.b 'dos.library',0 +configfilename filename + + END diff --git a/util/DLratio b/util/DLratio new file mode 100644 index 0000000000000000000000000000000000000000..b12159a313efa4104fd1dddd6cde5aa6af792e66 GIT binary patch literal 2004 zcmb7EUuauZ82|3gZA`BtV8AqlD1Q>S-Bgne;#yOZrYo((3*ss zMAuS6)`u}<4`c2@_8>kK@j*%`V@wh0WWwBo%smYmRz$7;7^4oHSQmfi+;-~*d+@^V z-0ytnJHPY&JBP^kCwZT?_V*Df2OwVtMm?SHSE1{j!c2=TVpL;d)n6iG2LD!T{@?3T zALK-z)_g;ML;IvPe|I`vhi0~>*ra~Vj~=C(HXznwC9+97#B*|&E_CXhZ7B*G&tWyp zJ8P;uEf`M{`EFYC%^!M*@Af>X(F`%aO*F!_k>i=$o|cK7I`^{_m@D3HL*p9u-e8Y$ z4IXrQmg!Gm8RQ{jO8ntvc2H`ps=2Juc9I@;fPZ0vXb%3*d74lUoedxZIik}gO7tj^ zk-GFZvUt&@ojpplaV*=jX655qmFTbb6rCOTg{btDP0B9GlYmsp^sd|G_JUL8yWmUU z0c*dswqQM&7M@Zr#9Hq8c4#8Nbu~%@SgsB)rP}0L=f*X#?d~E&^v0Tn%Can{jff|Dvcd_#(Cyh*y^zL zZ?u)C&B+?!HqwP$w11Tp5rOQhpjDMOC9>XOBFm*_I{Mn>=IVvh8vITPOVfKAP-;l<3&;Uz_}sv@%RR<18lPS32Q+pVhbUUW_(5jVSt z;RPYXNFp)?_1=RHOLwJ8%{Z!g_k3fPC$^+$)4N|`_HB2HLfvW7w+vD1mKoA0fDvzm zu@9^7v&V;*+C(?)^Ekn_LukBC?bG9?VZ!dc(01B{f5S-Mw~HUPs(8u%0Nc}m$TF@y z1px-U3cLZ}X`vGE0Wc4UYF-0w0KWmN*ct)gm2w=I13m}9tNH;80FU|+a0$4DGs8d> zhy&Y!1mFVi03QP9fuDif;BN)+Y!S|&UcdzRUI6wgUMTex@EvTgV-25g1^6Ap(~`XCSZr|Wyf_YRaZo67nmbBb>XJ$nHC75E~q!5w)8R30L}sUWF18ArTia& C-s$oH literal 0 HcmV?d00001 diff --git a/util/DLratio.asm b/util/DLratio.asm new file mode 100644 index 0000000..186d2df --- /dev/null +++ b/util/DLratio.asm @@ -0,0 +1,522 @@ +****************************************************************************** +****** ****** +****** DLratio - Gjør diverse ting med DL ration ****** +****** ****** +****** DLratio [ [NOACTION]] ****** +****** ****** +****************************************************************************** + +; d2 og d3 er scratch +; d4 og d7 brukes også. + + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/ports.i' + include 'exec/io.i' + include 'exec/memory.i' + include 'exec/tasks.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + +start move.l 4,a6 + move.l d0,d0store + move.l a0,a0store + openlib dos + moveq.l #3,d7 ; d7 er error. Her, ingne abbs + lea mainmsgportname,a1 + jsrlib FindPort + tst.l d0 + beq 9$ + moveq.l #1,d7 ; usage text + bsr parsecomandline + beq.s 9$ + moveq.l #0,d4 ; fil ptr + moveq.l #4,d7 ; error create port + lea tmpportname,a0 + moveq.l #0,d0 + bsr CreatePort + beq.s 9$ + move.l d0,port + lea msg,a0 + move.l d0,MN_REPLYPORT(a0) + move.l listfname,d1 + beq.s 1$ + moveq.l #2,d7 ; file open error. + move.l dosbase,a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.s 9$ + move.l 4,a6 +1$ + + moveq.l #0,d7 ; Alt ok så langt. + + moveq.l #0,d6 ; usernr +2$ move.l d6,d0 + bsr douser + beq.s 8$ + addq.l #1,d6 + bra.s 2$ + +8$ move.l 4,a6 + move.l port,d0 + beq.s 81$ + move.l d0,a0 + bsr DeletePort +81$ move.l dosbase,a6 + move.l d4,d1 + beq.s 9$ + jsrlib Close +9$ move.l d7,d0 + beq.s 99$ + bsr skriverror +99$ move.l 4,a6 + closlib dos +no_dos rts + +douser push d5 + move.l d0,d5 + lea tmpuser,a0 + bsr loadusernr + bmi 9$ + beq 99$ + lea tmpuser,a0 + move.b ConfAccess(a0),d0 + btst #ACCB_FileVIP,d0 ; Skal vi sjekke denne brukeren ? + bne 99$ ; Nei, da er vi ferdige + + moveq.l #0,d0 + move.w Uploaded(a0),d0 ; sjekker ratio + addq.l #1,d0 + move.l rationr,d1 + mulu d1,d0 + moveq.l #0,d1 + move.w Downloaded(a0),d1 + cmp.l d1,d0 + bhi.s 1$ ; Vi er under + move.b ConfAccess(a0),d0 ; Har vi DL access ?? + btst #ACCB_Download,d0 + beq.s 8$ ; Nei, da gjør vi ikke noe. + and.b #~ACCF_Download,d0 ; fjerner DL access + move.b d0,ConfAccess(a0) + +; skrive til fil at brukeren mistet access + lea Name(a0),a0 + moveq.l #Sizeof_NameT+1,d0 + bsr writetextlfill + lea lostdlacctext,a0 + bsr writedostext + bra.s 2$ ; Lagrer brukeren + +1$ move.b ConfAccess(a0),d0 ; Har vi DL access ?? + btst #ACCB_Download,d0 + bne.s 99$ ; Ja, da er dette en NOP + btst #ACCB_Upload,d0 ; Har han UL access ?? + beq.s 8$ ; Nei, da skal han ikke få DL heller + or.b #ACCF_Download,d0 + move.b d0,ConfAccess(a0) ; oppdaterer +; skrive til fil at brukeren mistet access + lea Name(a0),a0 + moveq.l #Sizeof_NameT+1,d0 + bsr writetextlfill + lea regaindlacctext,a0 + bsr writedostext + +2$ tst.w noaction + bne.s 8$ + move.l d5,d0 ; lagrer bruker + lea tmpuser,a0 + bsr saveusernr + bmi.s 9$ + beq.s 99$ +8$ clrz + bra.s 99$ +9$ setz +99$ pop d5 + rts + +loadusernr + lea msg,a1 + move.w #Main_loadusernr,m_Command(a1) + move.l d0,m_UserNr(a1) + move.l a0,m_Data(a1) + bsr handlemsg + beq.s 8$ + lea msg,a1 + move.w m_Error(a1),d0 + cmp.w #Error_OK,d0 + beq.s 9$ + cmp.w #Error_EOF,d0 + beq.s 99$ + moveq.l #5,d7 ; Abbs error retur + setn + setz + bra.s 99$ +8$ moveq.l #3,d7 ; Ingen abbs port + clrz +9$ notz +99$ rts + +saveusernr + lea msg,a1 + move.w #Main_saveusernr,m_Command(a1) + move.l d0,m_UserNr(a1) + move.l a0,m_Data(a1) + bsr handlemsg + beq.s 8$ + lea msg,a1 + move.w m_Error(a1),d0 + cmp.w #Error_OK,d0 + beq.s 9$ + moveq.l #5,d7 ; Abbs error retur + setn + setz + bra.s 99$ +8$ moveq.l #3,d7 ; Ingen abbs port + clrz +9$ notz +99$ rts + +handlemsg + move.l a1,-(a7) + jsrlib Forbid + lea mainmsgportname,a1 + jsrlib FindPort + move.l (a7)+,a1 + tst.l d0 + beq.s 9$ + move.l d0,a0 + jsrlib PutMsg + jsrlib Permit +1$ move.l port,a0 + jsrlib WaitPort + tst.l d0 + beq.s 1$ + move.l port,a0 + jsrlib GetMsg + tst.l d0 + beq.s 1$ + rts +9$ jsrlib Permit + setz + rts + +writetextlfill + movem.l d2/a2,-(sp) + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + move.l a2,a0 + bsr writedostextlen + move.l d2,d0 + bmi.s 9$ + beq.s 9$ + lea spacetext,a0 ; .. og jevner ut med space + bsr writedostextlen +9$ movem.l (sp)+,d2/a2 + rts + +writedostextlen + move.l d4,d1 ; Skriver vi til fil ? + beq.s 9$ ; Nei + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + move.l d0,d3 + jsrlib Write + movem.l (a7)+,d2-d3/a6 +9$ rts + +writedostext + move.l d4,d1 ; Skriver vi til fil ? + beq.s 9$ ; Nei + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + move.l d4,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 +9$ rts + +skriverror + lea errormsg,a0 + subq.l #1,d0 + lsl.l #2,d0 + add.l d0,a0 + move.l (a0),a0 + push d2-d3/a6 + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + pop d2-d3/a6 + rts + +parsecomandline + push d2/a2 + move.l d0store,d0 + move.l a0store,a0 + move.l a0,a2 + move.l d0,d2 + moveq.l #0,d1 + move.w d1,noaction + move.l d1,listfname + move.l d1,rationr + + subq.l #1,d2 + bcs 8$ ; For kort com line + cmp.b #' ',(a0) + bne.s 1$ + addq.l #1,a0 + move.l a0,a2 + subq.l #1,d2 + bcs 8$ ; For kort com line +1$ move.b (a0)+,d0 + beq.s 3$ + subq.l #1,d2 + bcs 3$ + cmp.b #' ',d0 + bne.s 1$ + bra.s 4$ +3$ move.b #0,-1(a0) + move.l a2,a0 + bsr atoi + bmi 8$ ; Ikke noe tall + beq 8$ ; Kan ikke ha null. + move.l d0,rationr + bra.s 7$ +4$ move.b #0,-1(a0) + exg a0,a2 + bsr atoi + bmi.s 8$ ; Ikke noe tall + beq.s 8$ ; Kan ikke ha null. + move.l d0,rationr + move.l a2,a0 + +5$ move.b (a0)+,d0 + beq.s 6$ + subq.l #1,d2 + bcs.s 6$ + cmp.b #' ',d0 + bne.s 5$ + move.b #0,-1(a0) + move.l a2,listfname + move.l a0,a2 + bra.s 2$ +6$ move.b #0,-1(a0) + move.l a2,listfname + bra.s 7$ + +2$ move.b (a0)+,d0 + beq.s 10$ + subq.l #1,d2 + bcs.s 10$ + cmp.b #' ',d0 + bne.s 2$ +10$ move.b #0,-1(a0) + move.l a2,a0 + bsr upword + lea noactiontext,a1 + bsr comparestrings + bne.s 8$ + move.w #1,noaction + clrz + bra.s 9$ + rts +7$ tst.l rationr + bra.s 9$ +8$ setz +9$ pop d2/a2 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + and.l #$ffff,d0 + rts + +atoi moveq.l #-1,d0 + moveq.l #0,d1 +1$ move.b (a0)+,d1 + beq.s 9$ + cmp.b #' ',d1 + beq.s 9$ + cmp.b #10,d1 + beq.s 9$ + cmp.b #13,d1 + beq.s 9$ + sub.b #'0',d1 + bcs.s 8$ + cmp.b #9,d1 + bhi.s 8$ + cmp.l #-1,d0 + bne.s 2$ + move.l d1,d0 + bra.s 1$ +2$ mulu #10,d0 + add.l d1,d0 + bra.s 1$ +8$ setn + rts +9$ tst.w d0 + rts + +****************************** +;char = upchar (char) +;d0.b d0.b +****************************** + +upchar cmp.b #'a',d0 + bcs.s 1$ + cmp.b #'z',d0 + bhi.s 2$ + sub.b #'a'-'A',d0 +1$ rts +2$ cmp.b #224,d0 ; Starten på utenlandske tegn (små) + bcs.s 3$ + sub.b #32,d0 ; Forskjellen på Store og små ISO tegn. +3$ rts + +****************************** +;string = upword (string) +;a0 a0 +;does a upchar on every char in the first +;word of string (space or null separates words) +****************************** +upword movem.l a0/d0,-(sp) + move.l a0,a1 +3$ move.b (a0)+,d0 + beq.s 1$ + cmp.b #' ',d0 + beq.s 1$ + bsr upchar +2$ move.b d0,(a1)+ + bra.s 3$ +1$ movem.l (sp)+,a0/d0 + rts + +****************************** +;result = comparestrings (streng,streng1) +;Zero bit a0.l a1.l +****************************** +comparestrings +1$ move.b (a0)+,d0 + beq.s 2$ + move.b (a1)+,d1 + beq.s 3$ + cmp.b d0,d1 + bne.s 9$ + bra.s 1$ +2$ tst.b (a1) + rts +3$ clrz +9$ rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) +;outputs: msgport (d0) +****************************** +CreatePort + movem.l d2/d3/a2/a3,-(sp) + move.l a0,a2 + move.l d0,d3 + move.l #MP_SIZE,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.s 1$ + move.l d0,a3 + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + beq.s 2$ + move.b d0,MP_SIGBIT(a3) + sub.l a1,a1 + jsrlib FindTask + move.l d0,MP_SIGTASK(a3) + move.l a2,LN_NAME(a3) + move.b d3,LN_PRI(a3) + move.b #NT_MSGPORT,LN_TYPE(a3) + move.b #PA_SIGNAL,MP_FLAGS(a3) + move.l a3,a1 + jsrlib AddPort + move.l a3,d0 + movem.l (sp)+,a2/a3/d2/d3 + rts + +2$ move.l a3,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem +1$ movem.l (sp)+,a2/a3/d2/d3 + setz + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(sp) + move.l a0,a2 + move.l a0,a1 + jsrlib RemPort + move.b MP_SIGBIT(a2),d0 + jsrlib FreeSignal + move.l a2,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem + move.l (sp)+,a2 + rts + + BSS + +noaction ds.w 1 +d0store ds.l 1 +a0store ds.l 1 +port ds.l 1 +dosbase ds.l 1 +listfname ds.l 1 +rationr ds.l 1 +tmpuser ds.b UserRecord_SIZEOF +msg ds.b ABBSmsg_SIZE + + DATA +noactiontext dc.b 'NOACTION',0 +dosname dc.b 'dos.library',0 +mainmsgportname dc.b 'ABBS mainport',0 +tmpportname dc.b 'DLratio port',0 +lostdlacctext dc.b 'lost his/her download access',10,0 +regaindlacctext dc.b 'regained his/her download access',10,0 +spacetext dc.b ' ',0 + +; error meldinger : +errormsg dc.l usagetext + dc.l nofiletext + dc.l noporttext + dc.l nocporttext + dc.l abbserrortext + +usagetext dc.b 'Usage : DLratio [ [NOACTION]]',10,0 +nofiletext dc.b 'Error opening list file',10,0 +noporttext dc.b 'Can''t find abbs !',10,0 +nocporttext dc.b 'Couldn''t create port.',10,0 +abbserrortext dc.b 'ABBS returned an error',10,0 + END diff --git a/util/FixFileOrder.asm b/util/FixFileOrder.asm new file mode 100644 index 0000000..6449ef8 --- /dev/null +++ b/util/FixFileOrder.asm @@ -0,0 +1,138 @@ + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + + code + +start move.l 4,a6 + openlib dos + move.l #ConfigRecord_SIZEOF,d0 ; allokerer minne + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + bne.s 2$ + lea nomem,a0 + bsr writedostext + bra no_mem +2$ move.l d0,MainBase + + move.l dosbase,a6 ; leser filen + move.l #configfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 3$ + lea erropenfiletext,a0 + bsr writedostext + bra no_file +3$ move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d3,d2 + lea erropenfiletext,a0 + bne 9$ + + move.w #MaxFileDirs,d3 ; oppdaterer order + moveq.l #1,d1 + lea FileOrder(MainBase),a1 + lea DirNames(MainBase),a0 +1$ move.b (a0),d0 + beq.b 6$ + move.b d1,(a1)+ +6$ addq.l #1,d1 + sub.w #1,d3 + lea Sizeof_NameT(a0),a0 + bne.s 1$ + + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_READWRITE,d2 + jsrlib Open + move.l d0,d4 + beq.s no_file + move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Write + move.l d4,d1 + move.l d0,d4 + jsrlib Close + lea fileerrortext,a0 + cmp.l d4,d3 + bne.s 9$ + lea altoktext,a0 +9$ bsr writedostext +no_file move.l 4,a6 + move.l #ConfigRecord_SIZEOF,d0 + move.l MainBase,a1 + jsrlib FreeMem +no_mem closlib dos +no_dos rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +copymemrev + subq.l #1,d0 + bcs.s 9$ + add.l d0,a0 + add.l d0,a1 + move.b (a0),(a1) + sub.w #1,d0 + bcs.s 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + BSS + +dosbase ds.l 1 + + DATA + +erroropenftext dc.b 'Error opening file.',10,0 +errorreadftext dc.b 'Error reading file.',10,0 +fileerrortext dc.b 'File error.',10,0 +altoktext dc.b 'Fixing sucessfull',10,0 +erropenfiletext dc.b 'Error opening configfile',10,0 +nomem dc.b 'Can''t get memory',10,0 +dosname dc.b 'dos.library',0 +configfilename dc.b 'abbs:config/configfile',0 + END diff --git a/util/PackfileDirs.asm b/util/PackfileDirs.asm new file mode 100644 index 0000000..04fd170 --- /dev/null +++ b/util/PackfileDirs.asm @@ -0,0 +1,412 @@ +****************************************************************************** +****** ****** +****** Packfiledirs - Removes all dummy files from .fl files ****** +****** ****** +****** Usage : Packfiledirs ****** +****** ****** +****************************************************************************** + + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/ports.i' + include 'exec/io.i' + include 'exec/memory.i' + include 'exec/tasks.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + +start move.l 4,a6 + openlib dos + moveq.l #0,d7 ; abbs er ikke oppe + lea mainmsgportname,a1 + jsrlib FindPort + lea noporttext,a0 + tst.l d0 + bne.s 1$ ; abbs er oppe + + move.l #ConfigRecord_SIZEOF,d0 ; ikke oppe + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + move.l d0,MainBase + tst.l d0 + lea notenoughramtxt,a0 + bne.s 2$ + bsr writedostext + bra 9$ +2$ lea configfilename,a0 + move.l MainBase,a1 + move.l #ConfigRecord_SIZEOF,d0 + bsr readfile + beq 8$ + bra.s 3$ + +1$ lea abbsuptext,a0 + bsr writedostext + bra 9$ + + moveq.l #1,d7 ; abbs er oppe + lea tmpportname,a0 + moveq.l #0,d0 + bsr CreatePort + beq.s 4$ + move.l d0,port + lea msg,a0 + move.l d0,MN_REPLYPORT(a0) + bsr testconfig + bne 3$ +4$ lea abbsnosetuptext,a0 + bsr writedostext + bra 8$ + +3$ move.w #MaxFileDirs,d6 + lea DirNames(MainBase),a4 + moveq.l #0,d4 +5$ tst.b (a4) ; er det en fildir her ? + beq.s 6$ + move.l a4,a0 + move.l d4,d0 + bsr readflfile + beq.s 6$ ; tom fil, ikke noe å gjøre + bpl.s 7$ + lea errprocfdirtext,a0 ; skriver feilmelding +10$ bsr writedostext + move.l a4,a0 + bsr writedostext + bsr nl + bra.s 8$ ; og ut + +7$ move.l a4,a0 + move.l d4,d0 + bsr writeflfile + lea errwritfdirtext,a0 + beq.s 10$ + +6$ addq.l #1,d4 + lea Sizeof_NameT(a4),a4 + sub.w #1,d6 + bne.s 5$ + +8$ tst.l d7 ; har vi brukt abbs ? + bne.s 81$ ; ja. da frigir vi ikke + move.l MainBase,a1 + move.l #ConfigRecord_SIZEOF,d0 + jsrlib FreeMem + bra.s 9$ +81$ move.l port,a0 + bsr DeletePort +9$ closlib dos +no_dos rts + +writeflfile + push a2/d2-d5 + bsr makefname + move.l flbuffersize,d5 + moveq.l #Fileentry_SIZEOF,d3 + divu d3,d5 + move.l flbuffer,a2 + + lea tmptext,a0 ; har det + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + move.l dosbase,a6 + jsrlib Open + move.l d0,d4 + bne.s 1$ + bsr 11$ ; cleanup + bra.s 9$ + +1$ move.w Filestatus(a2),d0 ; hopper over alle som er slettet + and.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d0 + bne.s 2$ ; vi vil ikke ha denne + + lea 39+Filedescription(a2),a0 ; Sikrer at description ikker er for lang + move.b #0,(a0) + + move.l d4,d1 + move.l a2,d2 + jsrlib Write + cmp.l d0,d3 + beq.s 2$ + bsr 10$ + bra.s 9$ + +2$ lea Fileentry_SIZEOF(a2),a2 + sub.w #1,d5 + bne.s 1$ + + bsr 10$ + clrz +9$ pop a2/d2-d5 + rts + +10$ move.l d4,d1 + jsrlib Close +11$ move.l 4,a6 + move.l flbuffersize,d0 + move.l flbuffer,a1 + jsrlib FreeMem + setz + rts + +readflfile + push a2/d2 + bsr makefname + lea tmptext,a0 ; har det + bsr getfilelen ; fillengde + clrz + bmi.s 9$ ; error + move.l d0,d2 ; husker size + move.l d0,flbuffersize + beq.s 9$ ; ferdig + move.l #MEMF_CLEAR,d1 ; allokerer buff'er + jsrlib AllocMem + move.l d0,flbuffer + beq.s 8$ + lea tmptext,a0 + move.l flbuffer,a1 + move.l d2,d0 + bsr readfile + bne.s 7$ ; alt ok, ut + move.l flbuffer,a1 ; frigir + move.l d2,d0 + jsrlib FreeMem +8$ clrz ; setter error + setn + bra.s 9$ +7$ clrzn +9$ pop a2/d2 + rts + +makefname + move.l a0,-(a7) + lea conferancepath,a0 ; bygger opp filnavn + lea tmptext,a1 + bsr strcopy + subq.l #1,a1 + move.l (a7)+,a0 + bsr strcopy + subq.l #1,a1 + lea dotfilelisttext,a0 + bra strcopy + +; a0 = file name. +getfilelen + push d2/d3/d4 + moveq.l #-1,d4 + move.l dosbase,a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.s 1$ + move.l d0,d3 + lea infoblock,a0 + move.l a0,d2 + jsrlib Examine + move.l d0,d2 + beq.s 2$ + lea infoblock,a0 + move.l 124(a0),d4 +2$ move.l d3,d1 + jsrlib UnLock +1$ move.l d4,d0 + move.l 4,a6 + pop d2/d3/d4 + rts + +testconfig + lea msg,a1 + move.w #Main_testconfig,m_Command(a1) + bsr handlemsg + beq.s 9$ + lea msg,a0 + move.l m_Data(a0),MainBase + move.w m_UserNr(a0),d0 +9$ rts + +handlemsg + move.l a1,-(a7) + jsrlib Forbid + lea mainmsgportname,a1 + jsrlib FindPort + move.l (a7)+,a1 + tst.l d0 + beq.s 9$ + move.l d0,a0 + jsrlib PutMsg + jsrlib Permit +1$ move.l port,a0 + jsrlib WaitPort + tst.l d0 + beq.s 1$ + move.l port,a0 + jsrlib GetMsg + tst.l d0 + beq.s 1$ + rts +9$ jsrlib Permit + setz + rts + +;a0 = filename +;a1 = adr +;d0 = size +readfile + push d2-d5/a6/a2 + move.l a0,a2 + move.l dosbase,a6 + move.l d0,d3 + move.l a1,d5 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.s 2$ + move.l d4,d1 + move.l d5,d2 + jsrlib Read + cmp.l d3,d0 + beq.s 1$ + move.l d4,d1 + jsrlib Close +2$ lea errreadingftext,a0 + bsr writedostext + move.l a2,a0 + bsr writedostext + bsr nl + setz + bra.s 9$ +1$ move.l d4,d1 + jsrlib Close + clrz +9$ pop d2-d5/a6/a2 + rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) +;outputs: msgport (d0) +****************************** +CreatePort + movem.l d2/d3/a2/a3,-(sp) + move.l a0,a2 + move.l d0,d3 + move.l #MP_SIZE,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.s 1$ + move.l d0,a3 + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + beq.s 2$ + move.b d0,MP_SIGBIT(a3) + sub.l a1,a1 + jsrlib FindTask + move.l d0,MP_SIGTASK(a3) + move.l a2,LN_NAME(a3) + move.b d3,LN_PRI(a3) + move.b #NT_MSGPORT,LN_TYPE(a3) + move.b #PA_SIGNAL,MP_FLAGS(a3) + move.l a3,a1 + jsrlib AddPort + move.l a3,d0 + movem.l (sp)+,a2/a3/d2/d3 + rts + +2$ move.l a3,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem +1$ movem.l (sp)+,a2/a3/d2/d3 + setz + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(sp) + move.l a0,a2 + move.l a0,a1 + jsrlib RemPort + move.b MP_SIGBIT(a2),d0 + jsrlib FreeSignal + move.l a2,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem + move.l (sp)+,a2 + rts + +nl lea nltext,a0 +; bra writedostext + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + section variabler,BSS + +infoblock ds.b fib_SIZEOF+4 +port ds.l 1 +dosbase ds.l 1 +flbuffer ds.l 1 +flbuffersize ds.l 1 +msg ds.b ABBSmsg_SIZE +tmpfileentry ds.b Fileentry_SIZEOF +tmptext ds.b 80 + + section tekst,DATA + +nltext dc.b 10,0 +readerrortext dc.b 'Read error',10,0 +noporttext dc.b 'Can''t find abbs !',10,0 +abbsnosetuptext dc.b 'ABBS not setup!',10,0 +configfilename dc.b 'abbs:config/configfile',0 +tmpportname dc.b 'Packfiledirs port',0 +nocporttext dc.b 'Couldn''t create port.',10,0 +notenoughramtxt dc.b 'Not enough ram.',10,0 +dosname dc.b 'dos.library',0 +mainmsgportname dc.b 'ABBS mainport',0 +errreadingftext dc.b 'Error reading file : ',0 +errprocfdirtext dc.b 'Error processing filedir : ',0 +errwritfdirtext dc.b 'Error writing filedir : ',0 +conferancepath dc.b 'abbs:conferences/',0 +dotfilelisttext dc.b '.fl',0 +abbsuptext dc.b 'You must close down abbs first!',10,0 + END diff --git a/util/SysopAvail.asm b/util/SysopAvail.asm new file mode 100644 index 0000000..2b2dd86 --- /dev/null +++ b/util/SysopAvail.asm @@ -0,0 +1,265 @@ +****************************************************************************** +****** ****** +****** SysopAvail - Sets sysop avail flag. ****** +****** ****** +****** SysopAvail [off] ****** +****** ****** +****************************************************************************** + + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/ports.i' + include 'exec/io.i' + include 'exec/tasks.i' + include 'exec/memory.i' + + include 'asm.i' + include 'bbs.i' + +start move.l 4,a6 + move.l d0,d2 + move.l a0,a2 + openlib dos + lea mainmsgportname,a1 + jsrlib FindPort + tst.l d0 + bne.s 1$ + lea noporttext,a0 + bsr writedostext + bra 9$ +1$ bsr parsecomandline + beq 9$ + lea tmpportname,a0 + moveq.l #0,d0 + bsr CreatePort + bne.s 4$ + lea nocporttext,a0 + bsr writedostext + bra 9$ +4$ move.l d0,port + lea msg,a0 + move.l d0,MN_REPLYPORT(a0) + +; 0 = availible +; 1 = not availible + + lea msg,a1 + move.w #Main_NotAvailSysop,m_Command(a1) + moveq.l #0,d0 + tst.w off + bne.s 2$ + moveq.l #1,d0 +2$ move.l d0,m_Data(a1) + bsr handlemsg + +7$ move.l port,a0 + bsr DeletePort +9$ closlib dos +no_dos moveq.l #0,d0 ; returverdi ? + rts + +parsecomandline + move.l a2,a0 + + move.b (a0),d0 + cmp.b #10,d0 + beq.s 9$ ; ingen tekst + cmp.b #' ',d0 + bne.s 1$ + addq.l #1,a0 + subq.l #1,d2 + bcs.s 9$ +1$ move.b (a0)+,d0 + beq.s 4$ + subq.l #1,d2 + bcs.s 4$ +3$ cmp.b #' ',d0 + beq.s 8$ + cmp.b #10,d0 + bne.s 1$ + +4$ move.b #0,-1(a0) + move.l a2,a0 + bsr upstring + moveq.l #3,d0 + lea offtext,a1 + bsr comparestringsfull + bne.s 8$ ; ikke off + move.w #1,off +9$ clrz + rts +8$ lea usagetext,a0 + bsr writedostext + setz + rts + +handlemsg + move.l a1,-(a7) + jsrlib Forbid + lea mainmsgportname,a1 + jsrlib FindPort + move.l (a7)+,a1 + tst.l d0 + beq.s 9$ + move.l d0,a0 + jsrlib PutMsg + jsrlib Permit +1$ move.l port,a0 + jsrlib WaitPort + tst.l d0 + beq.s 1$ + move.l port,a0 + jsrlib GetMsg + tst.l d0 + beq.s 1$ + rts +9$ jsrlib Permit + setz + rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) +;outputs: msgport (d0) +****************************** +CreatePort + movem.l d2/d3/a2/a3,-(sp) + move.l a0,a2 + move.l d0,d3 + move.l #MP_SIZE,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.s 1$ + move.l d0,a3 + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + beq.s 2$ + move.b d0,MP_SIGBIT(a3) + sub.l a1,a1 + jsrlib FindTask + move.l d0,MP_SIGTASK(a3) + move.l a2,LN_NAME(a3) + move.b d3,LN_PRI(a3) + move.b #NT_MSGPORT,LN_TYPE(a3) + move.b #PA_SIGNAL,MP_FLAGS(a3) + move.l a3,a1 + jsrlib AddPort + move.l a3,d0 + movem.l (sp)+,a2/a3/d2/d3 + rts + +2$ move.l a3,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem +1$ movem.l (sp)+,a2/a3/d2/d3 + setz + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(sp) + move.l a0,a2 + move.l a0,a1 + jsrlib RemPort + move.b MP_SIGBIT(a2),d0 + jsrlib FreeSignal + move.l a2,a1 + move.l #MP_SIZE,d0 + jsrlib FreeMem + move.l (sp)+,a2 + rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen move.l a0,d0 +1$ tst.b (a0)+ + bne.s 1$ + subq.l #1,a0 + sub.l d0,a0 + move.l a0,d0 + rts + +****************************** +;char = upchar (char) +;d0.b d0.b +****************************** + +upchar cmp.b #'a',d0 + bcs.s 1$ + cmp.b #'z',d0 + bhi.s 2$ + sub.b #'a'-'A',d0 +1$ rts +2$ cmp.b #224,d0 ; Starten på utenlandske tegn (små) + bcs.s 3$ + sub.b #32,d0 ; Forskjellen på Store og små ISO tegn. +3$ rts + +****************************** +;string = upstring (string) +;a0 a0 +;does a upchar on every char in string +****************************** + +upstring + movem.l a0/d0,-(sp) + move.l a0,a1 +3$ move.b (a0)+,d0 + beq.s 1$ + bsr upchar + move.b d0,(a1)+ + bra.s 3$ +1$ movem.l (sp)+,a0/d0 + rts + +****************************** +;result = comparestringsfull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +****************************** +comparestringsfull + subq.w #1,d0 +1$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + dbne d0,1$ + rts + + BSS + +port ds.l 1 +dosbase ds.l 1 +off ds.w 1 +msg ds.b ABBSmsg_SIZE + + DATA + +offtext dc.b 'OFF',0 +tmpportname dc.b 'SysopAvail port',0 +noporttext dc.b 'Can''t find abbs !',10,0 +nocporttext dc.b 'Couldn''t create port.',10,0 +usagetext dc.b 'Usage : SysopAvail [OFF]',10,0 +dosname dc.b 'dos.library',0 +mainmsgportname dc.b 'ABBS mainport',0 + + END diff --git a/util/ToggleCache.asm b/util/ToggleCache.asm new file mode 100644 index 0000000..b1aaf79 --- /dev/null +++ b/util/ToggleCache.asm @@ -0,0 +1,146 @@ + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + + section kode,code + +start move.l 4,a6 + openlib dos + + lea mainmsgportname,a1 + jsrlib FindPort + tst.l d0 + lea (noabbsplease),a0 + bne.b 13$ + + move.l #ConfigRecord_SIZEOF,d0 ; allokerer minne + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + bne.s 2$ + lea nomem,a0 +13$ bsr writedostext + bra no_mem +2$ move.l d0,MainBase + + move.l dosbase,a6 ; leser filen + move.l #configfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 3$ + lea erropenfiletext,a0 + bsr writedostext + bra no_file +3$ move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d3,d2 + lea erropenfiletext,a0 + bne 9$ + + bchg #CflagsB_CacheFL,(Cflags2,MainBase) ; Toggle cache + + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_READWRITE,d2 + jsrlib Open + move.l d0,d4 + beq.s no_file + move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Write + move.l d4,d1 + move.l d0,d4 + jsrlib Close + lea fileerrortext,a0 + cmp.l d4,d3 + bne.s 9$ + lea (cacheontext),a0 + btst #CflagsB_CacheFL,(Cflags2,MainBase) ; cache på ? + bne.b 345$ + lea (cacheofftext),a0 +345$ bsr writedostext + lea altoktext,a0 +9$ bsr writedostext +no_file move.l 4,a6 + move.l #ConfigRecord_SIZEOF,d0 + move.l MainBase,a1 + jsrlib FreeMem +no_mem closlib dos +no_dos rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +copymemrev + subq.l #1,d0 + bcs.s 9$ + add.l d0,a0 + add.l d0,a1 + move.b (a0),(a1) + sub.w #1,d0 + bcs.s 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + section bdata,BSS + +dosbase ds.l 1 + + section data,data + +noabbsplease dc.b 'This won''t work with abbs running..',10,0 +erroropenftext dc.b 'Error opening file.',10,0 +errorreadftext dc.b 'Error reading file.',10,0 +fileerrortext dc.b 'File error.',10,0 +cacheontext dc.b 'Cache is now on.',10,0 +cacheofftext dc.b 'Cache is now off.',10,0 + +altoktext dc.b 'Fixing sucessfull',10,0 +erropenfiletext dc.b 'Error opening configfile',10,0 +nomem dc.b 'Can''t get memory',10,0 +dosname dc.b 'dos.library',0 +configfilename dc.b 'abbs:config/configfile',0 +mainmsgportname dc.b 'ABBS mainport',0 + + END diff --git a/util/bbs.i b/util/bbs.i new file mode 100644 index 0000000..2414375 --- /dev/null +++ b/util/bbs.i @@ -0,0 +1,645 @@ + IFND BBS_I +BBS_I SET 1 + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + IFND EXEC_IO_I + INCLUDE "exec/io.i" + ENDC ; EXEC_IO_I + + IFND LIBRARIES_DOS_I + INCLUDE "libraries/dos.i" + ENDC + +MainBase equr a5 +NodeBase equr a4 +LinesSize equ 80 + +; maks er 256.. + IFD DEMO +MaxConferences equ 3 +MaxFileDirs equ 3 +NumMsgNrInQueue equ 100 + ENDC + + IFND DEMO +MaxConferences equ 100 +MaxFileDirs equ 100 +NumMsgNrInQueue equ 2000 + ENDC +MaxInterNodeMsg equ 10 +InterNodeMsgsiz equ 84 +MaxUsersGChat equ 5 + +Sizeof_NameT equ 30 +Sizeof_PassT equ 8 +Sizeof_TelNo equ 16 +Sizeof_FileDescription equ 38 +Sizeof_FileName equ 16 +Sizeof_loginscript equ 14 + +SEven MACRO + IFNE SOFFSET&1 +SOFFSET SET SOFFSET+1 + ENDC + ENDM + +NameT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+31 + ENDM + +PassT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+9 + ENDM + +TelNoT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+17 + ENDM + +FileName MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+17 + ENDM + +FileDescription MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+39 + ENDM + +ModemStrT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+61 + ENDM + +ModemSStrT MACRO +\1 EQU SOFFSET +SOFFSET SET SOFFSET+17 + ENDM + +maksisøkebuffer = 5 + + STRUCTURE match,0 + UBYTE m_poeng + NameT m_navn + LABEL match_sizeof + + STRUCTURE chatnode,0 + APTR c_Task ; = 0 -> denne brukes ikke i chat'en + LONG c_Sigbit ; hvilket sigbit vi skal få tilsendt + UWORD c_Rpos ; hvor langt vi har lest + NameT c_Name ; usernavn på denne noden + SEven + ULONG c_Usernr ; usernr på denne noden + ULONG c_Speed ; 0 = local + UWORD c_Status ; se under + UWORD c_color ; denne nodens farve (OBS : fylles i av lokal noden) + UWORD c_Nodenr ; hvilken nodenr dette er + LABEL chatnode_sizeof + + BITDEF status,Splitscreen,0 + + STRUCTURE localchatnode,0 + APTR l_chatnode ; peker til vår chatnode hos den andre noden + APTR l_chat ; peker til den andre nodens chat struktur + LABEL localchatnode_sizeof + + STRUCTURE chat,0 + APTR msgarea ; starten på meldingsområdet + APTR msgareaend ; Slutten på meldingsområdet + UWORD Wpos ; hvor langt har vi skrevet + UWORD ChatNodeNr + STRUCT chatnodes,chatnode_sizeof*(MaxUsersGChat-1) ; public + STRUCT localchatnodes,localchatnode_sizeof*MaxUsersGChat ; private + LABEL chat_sizeof + + STRUCTURE ABBSmsg,MN_SIZE + UWORD m_Command + UWORD m_Error + ULONG m_Data + ULONG m_Name + ULONG m_UserNr + ULONG m_arg + LABEL ABBSmsg_SIZE + + STRUCTURE ABBSpubmsg,MN_SIZE + UWORD pm_Command + UWORD pm_Error + ULONG pm_Data + ULONG pm_Arg + ULONG pm_Arg2 + LABEL ABBSpubmsg_SIZE + + ;MainCommands + DEVINIT 0 + DEVCMD Main_loaduser + DEVCMD Main_saveuser + DEVCMD Main_createuser + DEVCMD Main_getusername + DEVCMD Main_getusernumber + DEVCMD Main_saveconfig + DEVCMD Main_startnode + DEVCMD Main_shutdown + DEVCMD Main_savemsg + DEVCMD Main_loadmsg + DEVCMD Main_createconference + DEVCMD Main_loadmsgheader + DEVCMD Main_loadmsgtext + DEVCMD Main_savemsgheader + DEVCMD Main_testconfig + DEVCMD Main_createbulletin + DEVCMD Main_Clearbulletins + DEVCMD Main_createfiledir + DEVCMD Main_addfile + DEVCMD Main_findfile + DEVCMD Main_addfiledl + DEVCMD Main_loadfileentry + DEVCMD Main_savefileentry + DEVCMD Main_BroadcastMsg + DEVCMD Main_GetMaxConfDirs + DEVCMD Main_loadusernr + DEVCMD Main_saveusernr + DEVCMD Main_ChangeName + DEVCMD Main_DeleteDir + DEVCMD Main_RenameDir + DEVCMD Main_DeleteConference + DEVCMD Main_RenameConference + DEVCMD Main_NotAvailSysop + DEVCMD Main_loadusernrnr + DEVCMD Main_saveusernrnr + DEVCMD Main_MatchName + DEVCMD Main_CleanConference + DEVCMD Main_QuitBBS + DEVCMD not_Main_AddNetUser + DEVCMD not_Main_AddNetBBS + DEVCMD Main_PackUserFile + DEVCMD Main_OpenScreen + DEVCMD Main_CloseScreen + DEVCMD Main_Renamefileentry + DEVCMD Main_LASTCOMM + + + ; PublicErrors + DEVINIT 0 + DEVCMD PError_OK + DEVCMD PError_NoPort + DEVCMD PError_NoCarrier + DEVCMD PError_NoMore + + ; Errors + DEVINIT 0 + DEVCMD Error_OK + DEVCMD Error_Not_Found + DEVCMD Error_EOF + DEVCMD Error_Found + DEVCMD Error_Open_File + DEVCMD Error_Read + DEVCMD Error_Write + DEVCMD Error_File + DEVCMD Error_Nodeinit + DEVCMD Error_Conferencelist_full + DEVCMD Error_Bulletinlist_full + DEVCMD Error_No_Active_User + DEVCMD Error_User_Active + DEVCMD Error_Not_allowed + DEVCMD Error_Cant_shut_down + DEVCMD Error_SavingIndex + DEVCMD Error_IllegalCMD + DEVCMD Error_Nomem + DEVCMD Error_NoPort + + ;NodeCommands + DEVINIT 0 + DEVCMD Node_WriteText + DEVCMD Node_WriteTexto + DEVCMD Node_FlushSer + DEVCMD Node_WriteSerLen + DEVCMD Node_ReadSerLen + DEVCMD Node_QuitLogin + DEVCMD Node_ReadSer + DEVCMD Node_LASTCOMM + + ; private nodecommands + DEVINIT $8000 + DEVCMD Node_Reloaduser + DEVCMD Node_Eject + DEVCMD Node_Gotosleep + DEVCMD Node_Wakeupagain + DEVCMD Node_Killuser + DEVCMD Node_TmpSysop + DEVCMD Node_Show + DEVCMD Node_Hide + DEVCMD Node_chat + DEVCMD Node_ShowUser + DEVCMD Node_Shutdown + DEVCMD Node_GetRegs + DEVCMD Node_InitModem + DEVCMD Node_ReleasePort + DEVCMD Node_OffHook + DEVCMD Node_LASTPRIVCOMM + + ;NetCommands + DEVINIT 0 + DEVCMD Net_DoLogin + DEVCMD Net_LASTCOMM + + DEVINIT 0 + DEVCMD OK + DEVCMD Timeout + DEVCMD NoCarrier + DEVCMD Thrownout + + STRUCTURE Nodenode,LN_SIZE ; node + ULONG Nodeusernr + UWORD Nodenr + UWORD Nodestatus + UBYTE Nodedivstatus ; se under + UBYTE NodeECstatus ; MNP eller V32bis + ULONG NodesubStatus + ULONG Nodespeed + ULONG NodeTask + ULONG InterMsgSig + UWORD InterMsgread + UWORD InterMsgwrite + NameT Nodeuser + NameT NodeuserCityState + STRUCT NodeStatusText,120 + SEven + STRUCT InterNodeMsg,InterNodeMsgsiz*MaxInterNodeMsg + SEven + STRUCT Nodemsg,ABBSmsg_SIZE + ULONG Nodenode_alloc + LABEL Nodenode_SIZEOF + + BITDEF NDS,Notavail,0 + BITDEF NDS,Stealth,1 + BITDEF NDS,WaitforChatCon,2 + + BITDEF NECS,MNP,0 + BITDEF NECS,V42BIS,1 + BITDEF NECS,UPDATED,2 + + STRUCTURE intermsg,0 + UBYTE i_type + UBYTE i_pri ; pri != 0 => ignorer MF verdi + UWORD i_franode + ULONG i_usernr + ULONG i_usernr2 + NameT i_Name + NameT i_Name2 + SEven + UWORD i_conf + ULONG i_msgnr + LABEL intermsg_sizeof +i_msg equ i_usernr + + STRUCTURE RexxParam,0 + ULONG rx_NumParam + APTR rx_ptr1 + APTR rx_ptr2 + APTR rx_ptr3 + APTR rx_ptr4 + APTR rx_ptr5 + LABEL rx_sizeof + + STRUCTURE UserRecord,0 + NameT Name ;* First AND Last name * + UBYTE pass_10 + ULONG Usernr ;* User number * + PassT Password ;* users password * + NameT Address ;* Street address * + NameT CityState ;* City/State * + TelNoT HomeTelno ;* home telephone * + TelNoT WorkTelno ;* work telephone * + UBYTE pass_11 + UWORD TimeLimit ;* daily time limit * + UWORD FileLimit ;* daily file time limit * + UWORD PageLength ;* page length * + UBYTE Protocol ;* download protocol * + UBYTE Charset ;* character set * + UBYTE ScratchFormat + UBYTE XpertLevel + UWORD Userbits ;* See bit definitions * + STRUCT ConfAccess,(MaxConferences*1) + SEven + STRUCT UserScript,Sizeof_loginscript ;* Arexx script to be run at login * + LONG ResymeMsgNr + UBYTE MessageFilterV + UBYTE GrabFormat + UWORD u_ByteRatiov ; i bytes + UWORD u_FileRatiov ; i filer + + LABEL u_startsave + UWORD Uploaded ;* files uploaded * + UWORD Downloaded ;* files downloaded * + LONG KbUploaded + LONG KbDownloaded + UWORD TimesOn ;* number of times on * + STRUCT LastAccess,ds_SIZEOF + ;* last time on system * + UWORD TimeUsed ;* minutes on system today * + UWORD MsgsLeft ;* messages entered * + ULONG MsgsRead ;* messages read * + ULONG Totaltime ;* total time on system * + STRUCT Conflastread,MaxConferences*4 + ;* zero is for MAIN * + LONG NFday ;* last day user took Newfiles * + UWORD FTimeUsed ;* file min's on system today * + UWORD Savebits + ULONG MsgaGrab + STRUCT u_reserved2,6 + LABEL u_endsave + LABEL UserRecord_SIZEOF + + BITDEF ACC,Read,0 + BITDEF ACC,Write,1 + BITDEF ACC,Upload,2 + BITDEF ACC,Download,3 + BITDEF ACC,FileVIP,4 + BITDEF ACC,Invited,5 + BITDEF ACC,Sigop,6 + BITDEF ACC,Sysop,7 + + BITDEF USER,Killed,0 ;* user is dead * + BITDEF USER,FSE,1 ;* use FSE * + BITDEF USER,ANSIMenus,2 ;* user wants ansi menus + BITDEF USER,ColorMessages,3 ;* user wants color in messages + BITDEF USER,G_R,4 ;* use G&R protocol * + BITDEF USER,KeepOwnMsgs,5 ;* Mark written messages * + BITDEF USER,ANSI,6 + BITDEF USER,ClearScreen,7 + BITDEF USER,RAW,8 + BITDEF USER,NameAndAdress,9 + BITDEF USER,Filter,10 + BITDEF USER,SendBulletins,11 + + BITDEF SAVEBITS,FSEOverwritemode,0 + BITDEF SAVEBITS,FSEXYon,1 + BITDEF SAVEBITS,FSEAutoIndent,2 + BITDEF SAVEBITS,ReadRef,3 + BITDEF SAVEBITS,LostDL,4 + BITDEF SAVEBITS,Dontshowconfs,5 + BITDEF SAVEBITS,Browse,6 + + STRUCTURE MessageRecord,0 + ULONG Number ;* Message Number * + UBYTE MsgStatus ;* Message Status * + UBYTE Security ;* Message security * + ULONG MsgFrom ;* user number * + ULONG MsgTo ;* Ditto (-1=ALL) * + NameT Subject ;* subject of message * + UBYTE MsgBits ;* Misc bits * + STRUCT MsgTimeStamp,ds_SIZEOF + ;* time entered * + ULONG RefTo ;* refers to * + ULONG RefBy ;* first answer * + ULONG RefNxt ;* next in this thread * + WORD NrLines ;* number of lines, negative if net names in message body * + UWORD NrBytes ;* number of bytes * + ULONG TextOffs ;* offset in text file * + LABEL MessageRecord_SIZEOF + + BITDEF MSTAT,NormalMsg,0 + BITDEF MSTAT,KilledByAuthor,1 + BITDEF MSTAT,KilledBySysop,2 + BITDEF MSTAT,KilledBySigop,3 + BITDEF MSTAT,Moved,4 + BITDEF MSTAT,MsgRead,6 ;* read by receiver * + BITDEF MSTAT,Dontshow,7 + + BITDEF SEC,SecNone,0 + BITDEF SEC,SecPassword,1 + BITDEF SEC,SecReceiver,2 + + BITDEF MsgBits,FromNet,0 + + STRUCTURE ConfigRecord,0 + ULONG Users ; number of users registerd 0 + ULONG MaxUsers ; max number of users registred. (Antall logentrys,nrentrys) 4 + NameT BaseName ; name of this BBS 8 + NameT SYSOPname 39 + SEven 70 + ULONG SYSOPUsernr 70 + PassT SYSOPpassword ; brukes ikke enda 74 + SEven 83 + UWORD MaxLinesMessage 84 + UWORD ActiveConf ; limited to MaxConferences 86 + UWORD ActiveDirs ; limited to MaxFileDirs 88 + UWORD NewUserTimeLimit + UWORD SleepTime + PassT ClosedPassword ; brukes ikke enda + SEven + UBYTE DefaultCharSet + UBYTE Cflags + UWORD NewUserFileLimit + STRUCT ConfNames,MaxConferences*Sizeof_NameT + STRUCT ConfSW,MaxConferences*1 + SEven + STRUCT ConfOrder,MaxConferences*1 + SEven + STRUCT ConfDefaultMsg,MaxConferences*4 + STRUCT DirNames,MaxFileDirs*Sizeof_NameT + SEven + STRUCT FileOrder,MaxFileDirs*1 + SEven + STRUCT ConfBullets,MaxConferences*1 + SEven + STRUCT DirPaths,MaxFileDirs*Sizeof_NameT + SEven + STRUCT ConfMaxScan,MaxConferences*2 + UWORD ByteRatiov ; i bytes + UWORD FileRatiov ; i filer + UWORD MinULSpace ; i KB + UBYTE Cflags2 + UBYTE pad_a123 + ULONG pad_2344 + ULONG pad_2343 + PassT dosPassword + STRUCT cnfg_empty,13 + LABEL ConfigRecord_SIZEOF + +;confSW : + BITDEF CONFSW,ImmRead,0 + BITDEF CONFSW,ImmWrite,1 + BITDEF CONFSW,PostBox,2 + BITDEF CONFSW,Private,3 + BITDEF CONFSW,VIP,4 + BITDEF CONFSW,Resign,5 + BITDEF CONFSW,Network,6 + BITDEF CONFSW,Alias,7 + +;Cflags + BITDEF Cflags,Lace,0 + BITDEF Cflags,8Col,1 + BITDEF Cflags,Download,2 + BITDEF Cflags,Upload,3 + BITDEF Cflags,Byteratio,4 + BITDEF Cflags,Fileratio,5 + BITDEF Cflags,AllowTmpSysop,6 + BITDEF Cflags,UseASL,7 + +;Cflags2 + BITDEF Cflags,NoGet,0 + BITDEF Cflags,CacheFL,1 + + STRUCTURE NodeRecord,0 + UBYTE NodeRecord_pad + UBYTE CommsPort ; 0 = local, else port = n-1 + UBYTE ConnectWait ; max time to wait from ring to connect + UBYTE NodeSetup ; div bits for setup + ULONG MinBaud ; minimum baud to accept for this node + UWORD Setup ; See Bit definitions below + ULONG NodeBaud ; baud to use between modem-machine + ModemStrT Serialdevicename + ModemStrT ModemInitString + ModemSStrT ModemAnswerString + ModemSStrT ModemOffHookString + ModemSStrT ModemOnHookString + ModemSStrT ModemCallString + ModemSStrT ModemRingString + ModemSStrT ModemConnectString + ModemSStrT ModemOKString + ModemSStrT ModemATString + ModemSStrT ModemNoCarrierString + SEven + STRUCT HourMaxTime,24 ; Maximum allowed time this hour + STRUCT HourMinWait,24 ; Minimum time between calls this hour + NameT PublicScreenName ; abbs/wb(default)/any + NameT HoldPath + NameT TmpPath ; path for this nodes tmpdir (must end in a : or /) + NameT Font ; name for this nodes font (must end in a : or /) + UWORD FontSize ; font size + UWORD win_big_x ; x pos for normal window + UWORD win_big_y ; y pos for normal window + UWORD win_big_height ; height for normal window + UWORD win_big_width ; width for normal window + UWORD win_tiny_x ; x pos for tiny window + UWORD win_tiny_y ; y pos for tiny window + LABEL NodeRecord_SIZEOF + +; BITDEF SETUP,XonXoff,0 ; NOT USE + BITDEF SETUP,RTSCTS,1 + BITDEF SETUP,Lockedbaud,2 + BITDEF SETUP,SimpelHangup,3 + BITDEF SETUP,NullModem,4 + BITDEF SETUP,NoSleepTime,5 + + BITDEF NodeSetup,TinyMode,0 + BITDEF NodeSetup,DontShow,1 + BITDEF NodeSetup,BackDrop,2 + BITDEF NodeSetup,UseABBScreen,3 +; BITDEF NodeSetup,,4 +; BITDEF NodeSetup,,5 + + IFD OLDNodeRecord + + STRUCTURE NodeRecord,0 + UWORD CommsPort + UWORD tinymode + UWORD OpenModemAt + UWORD NoCarrierPause + UWORD Setup ; See Bit definitions below + ULONG NodeBaud + ModemStrT Serialdevicename + ModemStrT ModemInitString + ModemSStrT ModemAnswerString + ModemSStrT ModemOffHookString + ModemSStrT ModemOnHookString + ModemSStrT ModemCallString + ModemSStrT ModemRingString + ModemSStrT ModemConnectString + ModemSStrT ModemOKString + ModemSStrT ModemATString + LABEL NodeRecord_SIZEOF + + BITDEF SETUP,XonXoff,0 + BITDEF SETUP,RTSCTS,1 + BITDEF SETUP,Lockedbaud,2 + BITDEF SETUP,SimpelHangup,3 + + ENDC + + STRUCTURE Fileentry,0 + FileName Filename + SEven + UWORD Filestatus + ULONG Fsize + ULONG Uploader + ULONG PrivateULto ; Både konf nr og brukr nr. + ULONG AntallDLs + ULONG Infomsgnr + STRUCT ULdate,ds_SIZEOF + FileDescription Filedescription + SEven + LABEL Fileentry_SIZEOF ; = $5c + +Fileentry_SIZEOF_old = $5d + +;filestatus + BITDEF FILESTATUS,PrivateUL,0 + BITDEF FILESTATUS,PrivateConfUL,1 + BITDEF FILESTATUS,Filemoved,2 + BITDEF FILESTATUS,Fileremoved,3 + BITDEF FILESTATUS,FreeDL,4 + BITDEF FILESTATUS,Selected,5 ; for use in browse menu + + STRUCTURE fileentryheader,0 + STRUCT fl_hash,72*4 + APTR first_file + LABEL fileentryheader_sizeof + + STRUCTURE mem_Fileentry,0 + STRUCT mem_fentry,Fileentry_SIZEOF ; actual file entry record, same as on disk + ULONG mem_filefilenr ; Filenr on disk [0 - n> + ULONG mem_filenr ; Filenr in memory [0 - n> + ULONG mem_fnext ; next sequential file entry + ULONG mem_fnexthash ; next file entry on this hash key + LABEL mem_Fileentry_SIZEOF + + STRUCTURE Log_entry,0 + ULONG l_RecordNr ; Hvilken record i userfile har han ? (nummer 0,1 osv) + ULONG l_UserNr + NameT l_Name + SEven + UWORD l_UserBits ; Er brukeren død ?? + LABEL Log_entry_SIZEOF + + STRUCTURE Mainmemory,0 + STRUCT config,ConfigRecord_SIZEOF + UWORD Nodes ; number of nodes running + UWORD MainBits + ULONG MaxNumLogEntries + ULONG NrTabelladr + ULONG LogTabelladr + ULONG flpool + STRUCT txtbuffer,80 + STRUCT txt2buffer,80 + STRUCT keys,4*10 + ULONG keyfile + ULONG userfile + STRUCT Mainmsg,ABBSmsg_SIZE + STRUCT Filedirfiles,MaxFileDirs*4 + STRUCT MsgHeaderfiles,MaxConferences*4 + STRUCT MsgTextfiles,MaxConferences*4 + +; STRUCT NrTabell,0 ; denne har dynamisk størrelse + ; nrTabell(usernr) -> LogTabell +; STRUCT LogTabell ; dynamisk size og plaseringen + LABEL Mainmemory_SIZEOF + + BITDEF MainBits,SysopNotAvail,0 + + STRUCTURE ParagonMsg,MN_SIZE + UWORD p_Command + UWORD p_Data + STRUCT p_string,72 + APTR p_msg + APTR p_config + UWORD p_carrier + LABEL ParagonMsg_SIZE + + ENDC ; BBS_I diff --git a/util/check.asm b/util/check.asm new file mode 100644 index 0000000..79f69b5 --- /dev/null +++ b/util/check.asm @@ -0,0 +1,103 @@ + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + + code +start move.l 4,a6 + openlib dos + + move.l #mem_SIZEOF,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq no_mem + move.l d0,a5 + + move.l dosbase,a6 + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq no_file + + moveq.l #0,d7 +1$ move.l d4,d1 + lea busermem(a5),a0 + move.l a0,d2 + move.l #UserRecord_SIZEOF,d3 + jsrlib Read + tst.l d0 + beq 5$ + cmp.l d3,d0 + bne fil_err + + cmp.l Usernr(a5),d7 + bne.s 2$ + addq.l #1,d7 + bra 1$ +2$ lea Name+busermem(a5),a0 + bsr writedostext + lea Usernrinccwtext,a0 + bsr writedostext + bra.s 6$ +5$ lea noproblemwutext,a0 + bsr writedostext +6$ +fil_err move.l d4,d1 + jsrlib Close +no_file move.l 4,a6 + move.l #mem_SIZEOF,d0 + move.l a5,a1 + jsrlib FreeMem +no_mem closlib dos +no_dos rts + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + DATA +dosbase dc.l 0 +Usernrinccwtext dc.b 'Usernr increment count wrong !!',10,0 +noproblemwutext dc.b 'No problem with the usernumbers in the config file',10,0 +dosname dc.b 'dos.library',0 +userfilename dc.b 'abbs:config/userfile',0 + + STRUCTURE mem,0 + STRUCT busermem,UserRecord_SIZEOF + LABEL mem_SIZEOF + END diff --git a/util/configbbs.pw b/util/configbbs.pw new file mode 100644 index 0000000000000000000000000000000000000000..b09dd485f3a884614a2e13b1f738fffb0d5d08c4 GIT binary patch literal 4751 zcmbuDU2GIp6vyv&f!k8rZVQ@XK!=1ViF|DNkb=ex6m^>jEEcsvNV>EGUDz*n7FrS? z_JPEb_`pY7mI!tqe5i@h#`w?&ABaJmOnm5r4}Cz>2VzURge4&c3<>_v%-p%N-7aXn z$+>fO?z!ju=FFKpb2psq)6ySD6Ftd3T{*LP<2L2%mL09z*DL5-m7`~s_I>+5+I8@Q z{rlS6I@aS?+eW2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- literal 0 HcmV?d00001 diff --git a/util/configbbs1.pw b/util/configbbs1.pw new file mode 100644 index 0000000000000000000000000000000000000000..1f4b3408cc778855cae3f370201f37f96a9c7d36 GIT binary patch literal 4935 zcmb`Le{35`701VM+p(J<0u)FP5?iT){L!Xyd+p^;;*@L3k?2V3)`5njCEnQE*qmcq zw%hom`@{c{O8k+cE6R^HSO?;Q)IZYtba5*F2*|s)l7kea>SUDzg1AGGXpbQAM@~XI zzHisFV<)iziILvS+nG1>K7RXlcGmvHl$N?2jfWFcY30VL?la0Seb4nidt5=?tBk*< z3=UuT&Wj_LE({O$2ae;azguZg7<0eP81v>BJC4=`v8!WKiPWplCsT=uljGy*lh-rR z*vU{Lel0qI%XB8yt)?f*n2L+Fw6~z`V+Yy6Pf)0nn?LQPwyu1Uuie?QdfKM86sjX)(I8kxN0~ z27wy{ZVdAdkhTgy5QUdQ`0c2Z zl6w4+7zOdZ)I(}C&Kf*0ih?&U_NER{;nZ@$EsZW#3YA4snx?Hc;XGr8< z4igk!`bD1Vw>l(sw9T<-K<$h-Qbep{AWk5@Nw`P`AxXIMW7ckJD^L#g@(!rK$_AXg z*2n7eTJKy2wca`EQ0rqduLt2^a8F*>=D6T{D~Lrlx&EakuKTl)X|7-D*@uswZUN2p z2gG-}CKvSk^|_#rbP-=*NAlhOkGViDnwBcHeyI56 z4xF#la<05i2BKgQlQ>sua$@C2Vib)3D`ydGMX(k7Abv;?lEgB*IiDjZ4(Do~{gJ)S z6pE*Z-WhuF9vO&&>n-A3?U3;-{z{CpqtK4-iRXdSJ!C;4^tdn=NUK0v1=4B~l7q~U zfo0`XZeQIVYus7_+fQoQR@cc`6s|u6HR@i;w)(ypZOle+RkqUAE^PM$Tz?A2hhTdM z#;1NVpmk*B_SNl4#v5B;yII3#+5w} z={6X+K(6g`$l4a(DpxzWF=s-SaC=A5?i;qc4bfQWbNzs&Yc@n<-n!>l+A7?bpQfSl~G25e5v5omnEWOQ*1-MvfhbRy$RcVU6p}D zi@gvd15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+7<-iU)e=pi&0>N>wT)gV0Z zi>1j#ejf_I???GS&v$#ycjFV()920ce$C#nAVEO73Btca(D{7=8SjeOTH=7@0QnR8 ztczbe!in(6m9PU$8ww4#4k;3tzL2U0=C`u|?r6qivadyauT-rAUvB`z+Q*lu1Nn?T zaN4&6W`MN9oW~gm*JYRNZN*U147O}K(9~~h^s-E`6Nr)kQ(f-J^vRliJ1%l literal 0 HcmV?d00001 diff --git a/util/configbbsstr.asm b/util/configbbsstr.asm new file mode 100644 index 0000000..f3b5776 --- /dev/null +++ b/util/configbbsstr.asm @@ -0,0 +1,1900 @@ + +NewWindowStructure1: + dc.w 0,0 + dc.w 640,200 + dc.b 0,1 + dc.l CLOSEWINDOW + dc.l WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH + dc.l GadgetList1 + dc.l NULL + dc.l NewWindowName1 + dc.l NULL + dc.l NULL + dc.w 5,5 + dc.w -1,-1 + dc.w WBENCHSCREEN +NewWindowName1: + dc.b 'ConfigBBS',0 + cnop 0,2 +UNDOBUFFER: + dcb.b 31,0 + cnop 0,2 +GadgetList1: +Sysopname: + dc.l Password + dc.w 16,34 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border1 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopnameSInfo + dc.w 1 + dc.l NULL +SysopnameSInfo: + dc.l SysopnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border1: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors1 + dc.l NULL +BorderVectors1: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Password: + dc.l Address + dc.w 268,34 + dc.w 73,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l PasswordSInfo + dc.w 2 + dc.l NULL +PasswordSInfo: + dc.l PasswordSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +PasswordSIBuff: + dcb.b 9,0 + cnop 0,2 +Border2: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors2 + dc.l NULL +BorderVectors2: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +Address: + dc.l postal + dc.w 16,55 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border3 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l AddressSInfo + dc.w 3 + dc.l NULL +AddressSInfo: + dc.l AddressSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +AddressSIBuff: + dcb.b 31,0 + cnop 0,2 +Border3: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors3 + dc.l NULL +BorderVectors3: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +postal: + dc.l News + dc.w 16,76 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l postalSInfo + dc.w 4 + dc.l NULL +postalSInfo: + dc.l postalSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +postalSIBuff: + dcb.b 31,0 + cnop 0,2 +Border4: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors4 + dc.l NULL +BorderVectors4: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +News: + dc.l Post + dc.w 369,23 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border5 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NewsSInfo + dc.w 8 + dc.l NULL +NewsSInfo: + dc.l NewsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +NewsSIBuff: + dc.b 'News',0 +PWstringlen set *-NewsSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border5: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors5 + dc.l NULL +BorderVectors5: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Post: + dc.l Userinfo + dc.w 370,45 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l PostSInfo + dc.w 9 + dc.l NULL +PostSInfo: + dc.l PostSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +PostSIBuff: + dc.b 'Post',0 +PWstringlen set *-PostSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border6: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors6 + dc.l NULL +BorderVectors6: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Userinfo: + dc.l Fileinfo + dc.w 370,67 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border7 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l UserinfoSInfo + dc.w 10 + dc.l NULL +UserinfoSInfo: + dc.l UserinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +UserinfoSIBuff: + dc.b 'UserInfo',0 +PWstringlen set *-UserinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border7: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors7 + dc.l NULL +BorderVectors7: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Fileinfo: + dc.l newtime + dc.w 370,89 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l FileinfoSInfo + dc.w 11 + dc.l NULL +FileinfoSInfo: + dc.l FileinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +FileinfoSIBuff: + dc.b 'Fileinfo',0 +PWstringlen set *-FileinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border8: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors8 + dc.l NULL +BorderVectors8: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +newtime: + dc.l newfiletime + dc.w 16,125 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border9 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newtimeSInfo + dc.w 12 + dc.l NULL +newtimeSInfo: + dc.l newtimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newtimeSIBuff: + dc.b '30',0 +PWstringlen set *-newtimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border9: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors9 + dc.l NULL +BorderVectors9: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +newfiletime: + dc.l Boardname + dc.w 16,137 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newfiletimeSInfo + dc.w 13 + dc.l NULL +newfiletimeSInfo: + dc.l newfiletimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newfiletimeSIBuff: + dc.b '15',0 +PWstringlen set *-newfiletimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border10: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors10 + dc.l NULL +BorderVectors10: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Boardname: + dc.l fileratio + dc.w 241,97 + dc.w 110,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border11 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BoardnameSInfo + dc.w 7 + dc.l NULL +BoardnameSInfo: + dc.l BoardnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BoardnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border11: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors11 + dc.l NULL +BorderVectors11: + dc.w 0,0 + dc.w 109,0 + dc.w 109,10 + dc.w 0,10 + dc.w 0,1 +fileratio: + dc.l byteratio + dc.w 16,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l fileratioSInfo + dc.w 17 + dc.l NULL +fileratioSInfo: + dc.l fileratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +fileratioSIBuff: + dc.b '5',0 +PWstringlen set *-fileratioSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border12: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors12 + dc.l NULL +BorderVectors12: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratio: + dc.l fileratiobit + dc.w 16,173 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l byteratioSInfo + dc.w 16 + dc.l NULL +byteratioSInfo: + dc.l byteratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 5 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +byteratioSIBuff: + dc.b '1000',0 + cnop 0,2 +Border13: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors13 + dc.l NULL +BorderVectors13: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +fileratiobit: + dc.l minspace + dc.w 156,183 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image1 + dc.l Image2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image1: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData1 + dc.b $0003,$0000 + dc.l NULL +Image2: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData2 + dc.b $0003,$0000 + dc.l NULL +minspace: + dc.l maxmsglines + dc.w 207,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border14 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l minspaceSInfo + dc.w 18 + dc.l NULL +minspaceSInfo: + dc.l minspaceSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +minspaceSIBuff: + dc.b '100',0 + cnop 0,2 +Border14: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors14 + dc.l NULL +BorderVectors14: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +maxmsglines: + dc.l sleeptime + dc.w 16,149 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l maxmsglinesSInfo + dc.w 14 + dc.l NULL +maxmsglinesSInfo: + dc.l maxmsglinesSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +maxmsglinesSIBuff: + dc.b '300',0 + cnop 0,2 +Border15: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors15 + dc.l NULL +BorderVectors15: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +sleeptime: + dc.l byteratiobit + dc.w 16,161 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border16 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l sleeptimeSInfo + dc.w 15 + dc.l NULL +sleeptimeSInfo: + dc.l sleeptimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 3 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +sleeptimeSIBuff: + dc.b '3',0 +PWstringlen set *-sleeptimeSIBuff + dcb.b 3-PWstringlen,0 + cnop 0,2 +Border16: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors16 + dc.l NULL +BorderVectors16: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratiobit: + dc.l Hometlf + dc.w 156,171 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image3 + dc.l Image4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image3: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData3 + dc.b $0003,$0000 + dc.l NULL +Image4: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData4 + dc.b $0003,$0000 + dc.l NULL +Hometlf: + dc.l Worktlf + dc.w 16,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l HometlfSInfo + dc.w 5 + dc.l NULL +HometlfSInfo: + dc.l HometlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +HometlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border17: + dc.w -1,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors17 + dc.l NULL +BorderVectors17: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 +Worktlf: + dc.l filedirbit + dc.w 121,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border18 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l WorktlfSInfo + dc.w 6 + dc.l NULL +WorktlfSInfo: + dc.l WorktlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +WorktlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border18: + dc.w -1,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors18 + dc.l NULL +BorderVectors18: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 +filedirbit: + dc.l confbit + dc.w 368,101 + dc.w 75,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image5 + dc.l Image6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -1 + dc.l NULL +Image5: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData5 + dc.b $0003,$0000 + dc.l NULL +Image6: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData6 + dc.b $0003,$0000 + dc.l NULL +confbit: + dc.l bigup + dc.w 445,101 + dc.w 91,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image7 + dc.l Image8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -2 + dc.l NULL +Image7: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData7 + dc.b $0003,$0000 + dc.l NULL +Image8: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData8 + dc.b $0003,$0000 + dc.l NULL +bigup: + dc.l bigdown + dc.w 542,101 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image9 + dc.l Image10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -3 + dc.l NULL +Image9: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData9 + dc.b $0003,$0000 + dc.l NULL +Image10: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData10 + dc.b $0003,$0000 + dc.l NULL +bigdown: + dc.l slidebar + dc.w 580,101 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image11 + dc.l Image12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -4 + dc.l NULL +Image11: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData11 + dc.b $0003,$0000 + dc.l NULL +Image12: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData12 + dc.b $0003,$0000 + dc.l NULL +slidebar: + dc.l up + dc.w 617,100 + dc.w 17,44 + dc.w GADGIMAGE + dc.w RELVERIFY + dc.w PROPGADGET + dc.l Image13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l slidebarSInfo + dc.w -5 + dc.l NULL +slidebarSInfo: + dc.w FREEVERT + dc.w 0,7281 + dc.w -1,6553 + dc.w 0,0,0,0,0,0 +Image13: + dc.w 0,3 + dc.w 10,7 + dc.w 2 + dc.l ImageData13 + dc.b $0003,$0000 + dc.l NULL +up: + dc.l down + dc.w 619,146 + dc.w 15,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image14 + dc.l Image15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -6 + dc.l NULL +Image14: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData14 + dc.b $0003,$0000 + dc.l NULL +Image15: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData15 + dc.b $0003,$0000 + dc.l NULL +down: + dc.l name1 + dc.w 619,155 + dc.w 14,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image16 + dc.l Image17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -7 + dc.l NULL +Image16: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData16 + dc.b $0003,$0000 + dc.l NULL +Image17: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData17 + dc.b $0003,$0000 + dc.l NULL +name1: + dc.l name2 + dc.w 368,113 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border19 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -8 + dc.l NULL +Border19: + dc.w -1,-1 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors19 + dc.l NULL +BorderVectors19: + dc.w 0,0 + dc.w 247,0 + dc.w 247,40 + dc.w 0,40 + dc.w 0,1 +name2: + dc.l name3 + dc.w 368,123 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border20 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -9 + dc.l NULL +Border20: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors20 + dc.l NULL +BorderVectors20: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +name3: + dc.l name4 + dc.w 368,133 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border21 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -10 + dc.l NULL +Border21: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors21 + dc.l NULL +BorderVectors21: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +name4: + dc.l CFName + dc.w 368,143 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border22 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -11 + dc.l NULL +Border22: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors22 + dc.l NULL +BorderVectors22: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +CFName: + dc.l path + dc.w 370,156 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border23 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l CFNameSInfo + dc.w -12 + dc.l NULL +CFNameSInfo: + dc.l CFNameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +CFNameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border23: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors23 + dc.l NULL +BorderVectors23: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +path: + dc.l order + dc.w 370,168 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border24 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l pathSInfo + dc.w -13 + dc.l NULL +pathSInfo: + dc.l pathSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +pathSIBuff: + dcb.b 31,0 + cnop 0,2 +Border24: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors24 + dc.l NULL +BorderVectors24: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +order: + dc.l scan + dc.w 435,180 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border25 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l orderSInfo + dc.w -14 + dc.l NULL +orderSInfo: + dc.l orderSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +orderSIBuff: + dcb.b 4,0 + cnop 0,2 +Border25: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors25 + dc.l NULL +BorderVectors25: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +scan: + dc.l Bits + dc.w 488,180 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border26 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l scanSInfo + dc.w -15 + dc.l NULL +scanSInfo: + dc.l scanSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +scanSIBuff: + dcb.b 4,0 + cnop 0,2 +Border26: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors26 + dc.l NULL +BorderVectors26: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Bits: + dc.l NULL + dc.w 541,180 + dc.w 73,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border27 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BitsSInfo + dc.w -16 + dc.l NULL +BitsSInfo: + dc.l BitsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BitsSIBuff: + dcb.b 9,0 + cnop 0,2 +Border27: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors27 + dc.l NULL +BorderVectors27: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +MenuList1: +Menu1: + dc.l Menu2 + dc.w 0,0 + dc.w 63,0 + dc.w MENUENABLED + dc.l Menu1Name + dc.l MenuItem1 + dc.w 0,0,0,0 +Menu1Name: + dc.b 'Project',0 + cnop 0,2 +MenuItem1: + dc.l MenuItem2 + dc.w 0,0 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText1 + dc.l NULL + dc.b 'l' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText1: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText1 + dc.l NULL +ITextText1: + dc.b 'Load Config',0 + cnop 0,2 +MenuItem2: + dc.l MenuItem3 + dc.w 0,8 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText2 + dc.l NULL + dc.b 's' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText2: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText2 + dc.l NULL +ITextText2: + dc.b 'Save Config',0 + cnop 0,2 +MenuItem3: + dc.l NULL + dc.w 0,16 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText3 + dc.l NULL + dc.b 'q' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText3: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText3 + dc.l NULL +ITextText3: + dc.b 'Quit',0 + cnop 0,2 +Menu2: + dc.l Menu3 + dc.w 70,0 + dc.w 71,0 + dc.w MENUENABLED + dc.l Menu2Name + dc.l MenuItem4 + dc.w 0,0,0,0 +Menu2Name: + dc.b 'Features',0 + cnop 0,2 +MenuItem4: + dc.l MenuItem5 + dc.w 0,0 + dc.w 107,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText4 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText4: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText4 + dc.l NULL +ITextText4: + dc.b 'Interlaced',0 + cnop 0,2 +MenuItem5: + dc.l MenuItem6 + dc.w 0,8 + dc.w 107,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText5 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText5: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText5 + dc.l NULL +ITextText5: + dc.b '8 Colors',0 + cnop 0,2 +MenuItem6: + dc.l NULL + dc.w 0,16 + dc.w 107,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText6 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l SubItem1 + dc.w MENUNULL +IText6: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText6 + dc.l NULL +ITextText6: + dc.b 'Charset ISO',0 + cnop 0,2 +SubItem1: + dc.l SubItem2 + dc.w 92,-8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText7 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText7: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText7 + dc.l NULL +ITextText7: + dc.b 'ISO',0 + cnop 0,2 +SubItem2: + dc.l SubItem3 + dc.w 92,0 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText8 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText8: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText8 + dc.l NULL +ITextText8: + dc.b 'IBM',0 + cnop 0,2 +SubItem3: + dc.l NULL + dc.w 92,8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText9 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText9: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText9 + dc.l NULL +ITextText9: + dc.b 'IBN',0 + cnop 0,2 +Menu3: + dc.l NULL + dc.w 148,0 + dc.w 111,0 + dc.w MENUENABLED + dc.l Menu3Name + dc.l MenuItem7 + dc.w 0,0,0,0 +Menu3Name: + dc.b 'New Users May',0 + cnop 0,2 +MenuItem7: + dc.l MenuItem8 + dc.w 0,0 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText10 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText10: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText10 + dc.l NULL +ITextText10: + dc.b 'Upload',0 + cnop 0,2 +MenuItem8: + dc.l NULL + dc.w 0,8 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText11 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText11: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText11 + dc.l NULL +ITextText11: + dc.b 'Download',0 + cnop 0,2 +IntuiTextList1: +IText12: + dc.b 3,0,RP_JAM2,0 + dc.w 55,125 + dc.l NULL + dc.l ITextText12 + dc.l IText13 +ITextText12: + dc.b 'New User Time limit',0 + cnop 0,2 +IText13: + dc.b 3,0,RP_JAM2,0 + dc.w 55,137 + dc.l NULL + dc.l ITextText13 + dc.l IText14 +ITextText13: + dc.b 'New User File Time Limit',0 + cnop 0,2 +IText14: + dc.b 3,0,RP_JAM2,0 + dc.w 54,185 + dc.l NULL + dc.l ITextText14 + dc.l IText15 +ITextText14: + dc.b 'File Ratio',0 + cnop 0,2 +IText15: + dc.b 3,0,RP_JAM2,0 + dc.w 55,173 + dc.l NULL + dc.l ITextText15 + dc.l IText16 +ITextText15: + dc.b 'KByte Ratio',0 + cnop 0,2 +IText16: + dc.b 3,0,RP_JAM2,0 + dc.w 246,185 + dc.l NULL + dc.l ITextText16 + dc.l IText17 +ITextText16: + dc.b 'Min UL Space',0 + cnop 0,2 +IText17: + dc.b 3,0,RP_JAM2,0 + dc.w 55,149 + dc.l NULL + dc.l ITextText17 + dc.l IText18 +ITextText17: + dc.b 'Max Lines In Msgs',0 + cnop 0,2 +IText18: + dc.b 3,0,RP_JAM2,0 + dc.w 54,161 + dc.l NULL + dc.l ITextText18 + dc.l IText19 +ITextText18: + dc.b 'Sleep Time',0 + cnop 0,2 +IText19: + dc.b 3,0,RP_JAM2,0 + dc.w 432,190 + dc.l NULL + dc.l ITextText19 + dc.l IText20 +ITextText19: + dc.b 'Order Scan Bits',0 + cnop 0,2 +IText20: + dc.b 2,0,RP_JAM2,0 + dc.w 14,13 + dc.l NULL + dc.l ITextText20 + dc.l IText21 +ITextText20: + dc.b 'SYSOP INFO',0 + cnop 0,2 +IText21: + dc.b 3,0,RP_JAM2,0 + dc.w 237,87 + dc.l NULL + dc.l ITextText21 + dc.l IText22 +ITextText21: + dc.b 'Board Name',0 + cnop 0,2 +IText22: + dc.b 3,0,RP_JAM2,0 + dc.w 367,13 + dc.l NULL + dc.l ITextText22 + dc.l IText23 +ITextText22: + dc.b 'News Conference Name',0 + cnop 0,2 +IText23: + dc.b 3,0,RP_JAM2,0 + dc.w 367,35 + dc.l NULL + dc.l ITextText23 + dc.l IText24 +ITextText23: + dc.b 'Post Conference Name',0 + cnop 0,2 +IText24: + dc.b 3,0,RP_JAM2,0 + dc.w 367,57 + dc.l NULL + dc.l ITextText24 + dc.l IText25 +ITextText24: + dc.b 'UserInfo Conference Name',0 + cnop 0,2 +IText25: + dc.b 3,0,RP_JAM2,0 + dc.w 367,79 + dc.l NULL + dc.l ITextText25 + dc.l IText26 +ITextText25: + dc.b 'FileInfo Conference Name',0 + cnop 0,2 +IText26: + dc.b 3,0,RP_JAM2,0 + dc.w 14,24 + dc.l NULL + dc.l ITextText26 + dc.l IText27 +ITextText26: + dc.b 'Name',0 + cnop 0,2 +IText27: + dc.b 3,0,RP_JAM2,0 + dc.w 13,45 + dc.l NULL + dc.l ITextText27 + dc.l IText28 +ITextText27: + dc.b 'Address',0 + cnop 0,2 +IText28: + dc.b 3,0,RP_JAM2,0 + dc.w 13,66 + dc.l NULL + dc.l ITextText28 + dc.l IText29 +ITextText28: + dc.b 'Postal Code',0 + cnop 0,2 +IText29: + dc.b 3,0,RP_JAM2,0 + dc.w 13,87 + dc.l NULL + dc.l ITextText29 + dc.l IText30 +ITextText29: + dc.b 'Home Phone',0 + cnop 0,2 +IText30: + dc.b 3,0,RP_JAM2,0 + dc.w 120,87 + dc.l NULL + dc.l ITextText30 + dc.l IText31 +ITextText30: + dc.b 'Work Phone',0 + cnop 0,2 +IText31: + dc.b 3,0,RP_JAM2,0 + dc.w 265,24 + dc.l NULL + dc.l ITextText31 + dc.l NULL +ITextText31: + dc.b 'Password',0 + cnop 0,2 + +ImageData1: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 + +ImageData2: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData3: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 +ImageData4: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData5: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$1F86,$0600,$001E,$0600,$0010,$1800 + dc.w $0600,$001B,$0000,$0010,$1806,$060F,$0019,$861F + dc.w $0F10,$1E06,$0619,$8019,$8619,$9810,$1806,$061F + dc.w $8019,$8618,$0F10,$1806,$0618,$001B,$0618,$0190 + dc.w $1803,$030F,$001E,$0318,$1F10,$0000,$0000,$0000 + dc.w $0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000,$0000 + dc.w $0000,$9F86,$0600,$001E,$0600,$0000,$9800,$0600 + dc.w $001B,$0000,$0000,$9806,$060F,$0019,$861F,$0F00 + dc.w $9E06,$0619,$8019,$8619,$9800,$9806,$061F,$8019 + dc.w $8618,$0F00,$9806,$0618,$001B,$0618,$0180,$9803 + dc.w $030F,$001E,$0318,$1F00,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000 + +ImageData6: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000 + dc.w $0000,$0000,$9F86,$0600,$001E,$0600,$0000,$9800 + dc.w $0600,$001B,$0000,$0000,$9806,$060F,$0019,$861F + dc.w $0F00,$9E06,$0619,$8019,$8619,$9800,$9806,$061F + dc.w $8019,$8618,$0F00,$9806,$0618,$001B,$0618,$0180 + dc.w $9803,$030F,$001E,$0318,$1F00,$8000,$0000,$0000 + dc.w $0000,$0000,$8000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0010,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0010,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0010,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0010,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0010,$7FFF,$FFFF,$FFFF,$FFFF,$FFF0 + +ImageData7: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0780,$0007,$0000,$0000 + dc.w $0000,$0010,$0C00,$000C,$0000,$0000,$0000,$0010 + dc.w $180F,$1F1F,$0F1F,$0F1F,$0F0F,$0F10,$1819,$998C + dc.w $1999,$9999,$9819,$9810,$1819,$998C,$1F98,$1F99 + dc.w $981F,$8F10,$0C19,$998C,$1818,$1819,$9818,$0190 + dc.w $078F,$198C,$0F18,$0F19,$8F0F,$1F10,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF + dc.w $FFFF,$FFF0,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$8780,$0007 + dc.w $0000,$0000,$0000,$0000,$8C00,$000C,$0000,$0000 + dc.w $0000,$0000,$980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00 + dc.w $9819,$998C,$1999,$9999,$9819,$9800,$9819,$998C + dc.w $1F98,$1F99,$981F,$8F00,$8C19,$998C,$1818,$1819 + dc.w $9818,$0180,$878F,$198C,$0F18,$0F19,$8F0F,$1F00 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000 + +ImageData8: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8780,$0007,$0000,$0000 + dc.w $0000,$0000,$8C00,$000C,$0000,$0000,$0000,$0000 + dc.w $980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00,$9819,$998C + dc.w $1999,$9999,$9819,$9800,$9819,$998C,$1F98,$1F99 + dc.w $981F,$8F00,$8C19,$998C,$1818,$1819,$9818,$0180 + dc.w $878F,$198C,$0F18,$0F19,$8F0F,$1F00,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$7FFF,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0 + +ImageData9: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$000C,$C000 + dc.w $0400,$000C,$C000,$0400,$000C,$CF80,$0400,$000C + dc.w $CCC0,$0400,$000C,$CCC0,$0400,$000C,$CF80,$0400 + dc.w $0007,$8C00,$0400,$0000,$0C00,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C + dc.w $C000,$0000,$800C,$C000,$0000,$800C,$CF80,$0000 + dc.w $800C,$CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80 + dc.w $0000,$8007,$8C00,$0000,$8000,$0C00,$0000,$0000 + dc.w $0000,$0000 + +ImageData10: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C,$C000 + dc.w $0000,$800C,$C000,$0000,$800C,$CF80,$0000,$800C + dc.w $CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80,$0000 + dc.w $8007,$8C00,$0000,$8000,$0C00,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData11: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$0F00,$0000 + dc.w $0400,$0D80,$0000,$0400,$0CC7,$98CF,$8400,$0CCC + dc.w $D8CC,$C400,$0CCC,$DACC,$C400,$0D8C,$DFCC,$C400 + dc.w $0F07,$8D8C,$C400,$0000,$0000,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00 + dc.w $0000,$0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000 + dc.w $8CCC,$D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC + dc.w $C000,$8F07,$8D8C,$C000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000 + +ImageData12: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00,$0000 + dc.w $0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000,$8CCC + dc.w $D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC,$C000 + dc.w $8F07,$8D8C,$C000,$8000,$0000,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData13: + dc.w $0000,$2AC0,$5540,$2AC0,$5540,$2AC0,$FFC0,$FFC0 + dc.w $D500,$AA80,$D500,$AA80,$D500,$0000 + +ImageData14: + dc.w $0000,$0008,$0208,$0508,$0888,$1048,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData15: + dc.w $FFF8,$8000,$8200,$8500,$8880,$9040,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 + +ImageData16: + dc.w $0000,$0008,$1048,$0888,$0508,$0208,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData17: + dc.w $FFF8,$8000,$9040,$8880,$8500,$8200,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 diff --git a/util/confignode.pw b/util/confignode.pw new file mode 100644 index 0000000000000000000000000000000000000000..8332d0706fa7f2f323e924a5f10dbe0162f2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g%HX;sOp0;diQ@ zgPn9HLaod?xH5YPDue2v2FQo@0_2=;4<(tv^ZBLa`BY|AWNjdz&#ut~lI9XoW=-TG z`(3?PT(7Tk;t<~$N)m8Mz$JZ92O;fl${cOXeOA!qLotZR;lN!*?lxna z{MB$20d4+7IJN+t1Kb?o=K7!nl!BIF&yQ$TZbawTZC|mg0Hv>0dgzq7r!)vx<|R6c zgtImibiP!t*LJ+ZMWBDsEAwv6yB{C)SAzlRvj2KO>hkwkK9QAqK+gku9?abskk7Q-xfPsbrR~A~-JZ{1-95o!Yr=BkO?BUflE_E0z0vmlO zD+|C{0M-Jq7M?)s5N#%Tc=lYnw1m*!Vjr2IP1VrYTuHUjQ6!w1pYTfRj9$;qqI7nP z=gSCfDz15V`l69aU$mox&gnjaIhBD{p*3iOD`^aycA`Cx*?P(!SH^+-wG}ztNS)%^ zUOI||vy>UoG;Lra6+`A?R9u(PoDPq-wemu%mrga}G-%VHO@sCxM!e^QB(z%*3r`t{ z-^DkOzJ4E9ikC+AM{yHz1^6FVn8c4O&6mb!X#8xOAZL!!GNiP-yu4fr`6E}Z$LLf* zXI^*n%Q2-C&9>5Ouk~Rs9Jh#iCt3()CEVhu(pV zmElhq2Vq=7@kRQ9c})t#BH@RBIC4ceUt#TDiB zJGK8dbc8#D5&yNIm{@=v7QXuquH2VU-mAq*`?;tF>P`Gt0tpT`)P|xKDEgeu8FwFx zYR)*EGbn4*(LU62%(ZymAi',0 + cnop 0,2 diff --git a/util/convert.asm b/util/convert.asm new file mode 100644 index 0000000..37868c4 --- /dev/null +++ b/util/convert.asm @@ -0,0 +1,331 @@ + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + + include 'asm.i' + include 'bbs.i' + + code + +MainBase equr a5 + +start move.l 4,a6 + openlib dos + move.l #ConfigRecord_SIZEOF,d0 ; allokerer minne + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + bne.s 2$ + lea nomem,a0 + bsr writedostext + bra no_mem +2$ move.l d0,MainBase + + move.l dosbase,a6 ; leser filen + move.l #configfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + bne.s 3$ + lea erropenfiletext,a0 + bsr writedostext + bra no_file +3$ move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d3,d2 + lea aconvtext,a0 + beq 9$ + lea wrongformattext,a0 + cmp.l #9908,d2 + bne 9$ + +; oppretter 2 nye conf'er (fil'er) + add.w #2,ActiveConf(MainBase) + cmp.w #MaxConferences,ActiveConf(MainBase) + lea conferencefull,a0 + bcc 9$ + lea resymetext,a0 + bsr fillin + lea errorcrconffile,a0 + beq 9$ + lea fileinfotext,a0 + bsr fillin + lea errorcrconffile,a0 + beq 9$ + +; oppdaterer alle brukere + move.l dosbase,a6 + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d6 ; file ptr + bne.s 10$ + lea erroropenftext,a0 + move.l 4,a6 + bra 9$ + +10$ bsr douser + bne.s 10$ + + move.l d6,d1 + jsrlib Close + move.l 4,a6 + + lea 2*Sizeof_NameT+ConfNames(MainBase),a0 + lea 4*Sizeof_NameT+ConfNames(MainBase),a1 + move.l #(MaxConferences-4)*Sizeof_NameT,d0 + bsr copymemrev + lea 2*Sizeof_NameT+ConfNames(MainBase),a1 + lea resymetext,a0 + bsr strcopy + lea 3*Sizeof_NameT+ConfNames(MainBase),a1 + lea fileinfotext,a0 + bsr strcopy + + lea 2*1+ConfSW(MainBase),a0 + lea 4*1+ConfSW(MainBase),a1 + moveq.l #(MaxConferences-4)*1,d0 + bsr copymemrev + lea 2*1+ConfSW(MainBase),a0 + move.b #CONFSWF_Special+CONFSWF_Resign+CONFSWF_ImmRead,(a0) + move.b #CONFSWF_Special+CONFSWF_Resign+CONFSWF_ImmRead,1(a0) + + lea 2*4+ConfDefaultMsg(MainBase),a0 + lea 4*4+ConfDefaultMsg(MainBase),a1 + move.l #(MaxConferences-4)*4,d0 + bsr copymemrev + lea 2*4+ConfDefaultMsg(MainBase),a0 + moveq.l #0,d0 + move.l d0,(a0) + move.l d0,4(a0) + + lea 2*1+ConfBullets(MainBase),a0 + lea 4*1+ConfBullets(MainBase),a1 + moveq.l #(MaxConferences-4)*1,d0 + bsr copymemrev + lea 2*1+ConfBullets(MainBase),a0 + move.b #0,(a0) + move.b #0,1(a0) + +; flytter alle conf'er 2 plasser nedover +; setter de 2 nye inn på de tom'e plassene. + + move.w #MaxConferences,d3 ; oppdaterer MaxScan og order + move.w #50,d0 + moveq.l #1,d1 + lea ConfOrder(MainBase),a1 + lea ConfMaxScan(MainBase),a0 +1$ move.w d0,(a0)+ + move.b d1,(a1)+ + addq.l #1,d1 + sub.w #1,d3 + bne.s 1$ + + move.w #MaxFileDirs,d3 ; oppdaterer Filedir order + moveq.l #1,d1 + lea FileOrder(MainBase),a1 +4$ move.b d1,(a1)+ + addq.l #1,d1 + sub.w #1,d3 + bne.s 4$ + + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_READWRITE,d2 + jsrlib Open + move.l d0,d4 + beq.s no_file + move.l d4,d1 + move.l MainBase,d2 + move.l #ConfigRecord_SIZEOF,d3 + jsrlib Write + move.l d4,d1 + jsrlib Close + + lea altoktext,a0 +9$ bsr writedostext +no_file move.l 4,a6 + move.l #ConfigRecord_SIZEOF,d0 + move.l MainBase,a1 + jsrlib FreeMem +no_mem closlib dos +no_dos rts + +douser lea tmpuser,a2 + move.l d6,d1 + move.l a2,d2 + move.l #UserRecord_SIZEOF,d3 + jsrlib Read + tst.l d0 + clrn + beq 9$ ; 0 == EOF + cmp.l d0,d3 + bne 7$ + + lea 2+ConfAccess(a2),a0 + lea 4+ConfAccess(a2),a1 + moveq.l #(MaxConferences-4)*1,d0 + bsr copymemrev + + lea 2*4+Conflastread(a2),a0 + lea 4*4+Conflastread(a2),a1 + move.l #(MaxConferences-4)*4,d0 + bsr copymemrev + + lea 2+ConfAccess(a2),a0 + move.b -2(a0),d0 ; henter news access + btst #ACCB_Sysop,d0 ; er vi sysop ? + beq.s 1$ ; nei + move.b #ACCF_Read+ACCF_Sysop,(a0) + move.b #ACCF_Read+ACCF_Sysop,1(a0) + bra.s 2$ ; gir full access i de nye conf'ene +1$ move.b #ACCF_Read,(a0) ; gir read access i conf'en + move.b #ACCF_Read,1(a0) +2$ + lea 2*4+Conflastread(a2),a0 + moveq.l #0,d0 + move.l d0,(a0) + move.l d0,4(a0) + + move.l d6,d1 ; søker tilbake + move.l #UserRecord_SIZEOF,d2 + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + beq 6$ ; error + move.l d6,d1 ; og lagrer brukeren + move.l #UserRecord_SIZEOF,d3 + move.l a2,d2 + jsrlib Write + cmp.l d0,d3 + bne 6$ + clrz + bra.s 9$ + +6$ lea fileerrortext,a0 + bra.s 8$ +7$ lea errorreadftext,a0 +8$ bsr writedostext + setz + setn +9$ rts + +fillin move.l a0,-(a7) + lea conferancepath,a0 + lea tekst,a1 + bsr strcopy + move.l (a7),a0 + subq.l #1,a1 + bsr strcopy + subq.l #1,a1 + lea dotmessagestext,a0 + bsr strcopy + lea tekst,a0 ; Filnavn (path/konfnavn.messages) + move.l a0,d1 + move.l dosbase,a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d1 + beq 9$ + jsrlib Close + lea conferancepath,a0 + lea tekst,a1 + bsr strcopy + move.l (a7),a0 + subq.l #1,a1 + bsr strcopy + subq.l #1,a1 + lea dotmsgheadertxt,a0 + bsr strcopy + lea tekst,a0 ; Filnavn (path/konfnavn.msgheaders) + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d1 + beq.s 9$ + jsrlib Close + clrz +9$ addq.l #4,a7 + move.l 4,a6 + rts + + +writedostext + movem.l d2-d3/a6,-(a7) + move.l dosbase,a6 + move.l a0,d2 + bsr strlen + move.l d0,d3 + jsrlib Output + move.l d0,d1 + jsrlib Write + movem.l (a7)+,d2-d3/a6 + rts + +****************************** +;len = strlen (string) +;d0 a0 +****************************** +strlen moveq.l #-1,d0 +1$ tst.b (a0)+ + dbeq d0,1$ + not.w d0 + ext.l d0 + rts + +copymemrev + subq.l #1,d0 + bcs.s 9$ + add.l d0,a0 + add.l d0,a1 + move.b (a0),(a1) + sub.w #1,d0 + bcs.s 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.s 1$ + rts + + BSS + +tekst ds.b 80 +dosbase ds.l 1 +tmpuser ds.b UserRecord_SIZEOF + + DATA + +erroropenftext dc.b 'Error opening file.',10,0 +errorreadftext dc.b 'Error reading file.',10,0 +fileerrortext dc.b 'File error.',10,0 +errorcrconffile dc.b 'Error while creating conference files!',10,0 +conferencefull dc.b 'Conferencelist Full.',10,0 +aconvtext dc.b 'Already converted!',10,0 +wrongformattext dc.b 'Wrong Format/Read Error.',10,0 +altoktext dc.b 'Conversion sucessfull',10,0 +erropenfiletext dc.b 'Error opening configfile',10,0 +nomem dc.b 'Can''t get memory',10,0 +dosname dc.b 'dos.library',0 +configfilename dc.b 'abbs:config/configfile',0 +conferancepath dc.b 'abbs:conferences/',0 +resymetext dc.b 'USERINFO',0 +fileinfotext dc.b 'FILEINFO',0 +dotmessagestext dc.b '.m',0 +dotmsgheadertxt dc.b '.h',0 +userfilename dc.b 'abbs:config/userfile',0 + END diff --git a/util/convertfl b/util/convertfl new file mode 100644 index 0000000000000000000000000000000000000000..2c1779228599eabbf655bdaa88c02a6e5e2a7a20 GIT binary patch literal 2528 zcmZ8iU1$_n6h8CQux>+K(x5?Xy_qgaSR_fUXd0HXCPp^vb`b;pQ^`)UGm|x&nPql1 zMoA^8ZBa@E>w^?5#Rnfs5y2u`SC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s.asm b/util/nconfigbbs.asm new file mode 100644 index 0000000..ed1ab8f --- /dev/null +++ b/util/nconfigbbs.asm @@ -0,0 +1,2066 @@ + include 'abbs:first.i' + + include 'exec/types.i' + include 'exec/memory.i' + include 'libraries/dos.i' + include 'intuition/intuition.i' + +;debug = 1 + + include 'asm.i' + + include 'bbs.i' + + CODE + +MainBase equr a5 + +start move.l 4,a6 + moveq.l #0,d7 ; full setup eller foradre + openlib dos + openlib int + +; moveq.l #0,d0 +; move.l d0,a0 +; bsr CreatePort ; setter opp vår reply port +; beq no_port +; move.l d0,iport +; lea msg,a0 ; Fyller i msg +; move.l d0,MN_REPLYPORT(a0) + +;2$ move.l #ConfigRecord_SIZEOF,d0 ; allokerer config minne +; move.l #MEMF_CLEAR,d1 +; jsrlib AllocMem +; move.l d0,mem +; beq no_mem +; move.l d0,MainBase + +3$ +; lea Worktlf,a0 +; moveq.l #0,d0 +; move.l d0,(a0) ; slår av "fil requestor'en" +; lea IText18,a0 +; lea IText20,a1 +; move.l a1,it_NextText(a0) + + move.l intbase,a6 ; Opp med vindu ! + lea NewWindowStructure1,a0 + jsrlib OpenWindow + move.l d0,winadr + beq no_win + move.l d0,a0 + move.l wd_RPort(a0),a0 ; ut med tekst ! + lea IntuiTextList1,a1 + moveq.l #0,d0 + moveq.l #0,d1 + jsrlib PrintIText + move.l winadr,a0 + lea MenuList1,a1 + jsrlib SetMenuStrip + tst.l d0 + beq no_menu + + move.l winadr,a0 + move.l wd_UserPort(a0),msgport + lea GadgetList1,a0 ; aktiviserer første gadgeten. + move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l 4,a6 + +vent move.l msgport,a0 + jsrlib WaitPort + tst.l d0 + beq.s vent + move.l msgport,a0 + jsrlib GetMsg + tst.l d0 + beq.s vent + move.l d0,a1 + move.l im_Class(a1),d0 + cmp.l #MENUPICK,d0 + beq 2$ + cmp.l #GADGETUP,d0 + beq.s 1$ +4$ jsrlib ReplyMsg + bra.s vent + + +1$ move.l im_IAddress(a1),a0 + move.w gg_GadgetID(a0),d2 + beq.s 4$ + jsrlib ReplyMsg + tst.w d2 + bmi.s vent ; dropper negative for øyeblikket + sub.w #1,d2 + asl.w #2,d2 +5$ lea activetabell,a0 ; aktiviserer neste gadget + move.l 0(a0,d2.w),a0 + move.w gg_Flags(a0),d0 + and.w #GFLG_DISABLED,d0 ; bare hvis den ikke er disabl'a + beq.s 6$ + addq.l #4,d2 + cmp.w #17*4,d2 + bcs.s 5$ + moveq.l #0,d2 + bra.s 5$ + +6$ move.l winadr,a1 + sub.l a2,a2 + move.l intbase,a6 + jsrlib ActivateGadget + move.l 4,a6 + bra vent + +2$ move.w im_Code(a1),-(a7) + jsrlib ReplyMsg + move.w (a7)+,d0 +3$ cmp.w #MENUNULL,d0 + beq vent +; bra.s ut + + + +ut move.l intbase,a6 + move.l winadr,d0 + jsrlib ClearMenuStrip +no_menu move.l winadr,d0 + beq.s no_win + move.l d0,a0 + jsrlib CloseWindow +no_win move.l 4,a6 +; move.l mem,d0 +; beq.s no_mem +; move.l d0,a1 +; move.l #ConfigRecord_SIZEOF,d0 +; jsrlib FreeMem +no_mem +no_abbs +; move.l iport,a0 +; bsr DeletePort +no_port closlib int +no_int closlib dos +no_dos rts + + + BSS + +msgport ds.l 1 +winadr ds.l 1 +dosbase ds.l 1 +intbase ds.l 1 + + DATA + +dosname dc.b 'dos.library',0 +intname dc.b 'intuition.library',0 + + CNOP 0,2 + +activetabell + dc.l SysopPassword,SysopAddress,postal,Hometlf,Worktlf,Boardname + dc.l News,Post,Userinfo,Fileinfo,newtime,newfiletime,maxmsglines + dc.l sleeptime,byteratio,fileratio,minspace,Sysopname + +;filedirbit +;confbit +;bigup +;bigdown +;slidebar +;up +;down +;name1 +;name2 +;name3 +;name4 +;CFName +;path +;order +;scan +;Bits + + + +NewWindowStructure1: + dc.w 0,0 + dc.w 640,200 + dc.b 0,1 + dc.l IDCMP_GADGETUP+IDCMP_MENUPICK + dc.l WINDOWDRAG+WINDOWDEPTH+ACTIVATE+NOCAREREFRESH + dc.l GadgetList1 + dc.l NULL + dc.l NewWindowName1 + dc.l NULL + dc.l NULL + dc.w 5,5 + dc.w -1,-1 + dc.w WBENCHSCREEN +NewWindowName1: + dc.b 'ConfigBBS',0 + cnop 0,2 +UNDOBUFFER: + dcb.b 31,0 + cnop 0,2 +GadgetList1: +Sysopname: + dc.l SysopPassword + dc.w 16,34 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border1 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopnameSInfo + dc.w 1 + dc.l NULL +SysopnameSInfo: + dc.l SysopnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border1: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors1 + dc.l NULL +BorderVectors1: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +SysopPassword: + dc.l SysopAddress + dc.w 268,34 + dc.w 73,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopPasswordSInfo + dc.w 2 + dc.l NULL +SysopPasswordSInfo: + dc.l SysopPasswordSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopPasswordSIBuff: + dcb.b 9,0 + cnop 0,2 +Border2: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors2 + dc.l NULL +BorderVectors2: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +SysopAddress: + dc.l postal + dc.w 16,55 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border3 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l SysopAddressSInfo + dc.w 3 + dc.l NULL +SysopAddressSInfo: + dc.l SysopAddressSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +SysopAddressSIBuff: + dcb.b 31,0 + cnop 0,2 +Border3: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors3 + dc.l NULL +BorderVectors3: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +postal: + dc.l News + dc.w 16,76 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l postalSInfo + dc.w 4 + dc.l NULL +postalSInfo: + dc.l postalSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +postalSIBuff: + dcb.b 31,0 + cnop 0,2 +Border4: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors4 + dc.l NULL +BorderVectors4: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +News: + dc.l Post + dc.w 369,23 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border5 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NewsSInfo + dc.w 8 + dc.l NULL +NewsSInfo: + dc.l NewsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +NewsSIBuff: + dc.b 'News',0 +PWstringlen set *-NewsSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border5: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors5 + dc.l NULL +BorderVectors5: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Post: + dc.l Userinfo + dc.w 370,45 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l PostSInfo + dc.w 9 + dc.l NULL +PostSInfo: + dc.l PostSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +PostSIBuff: + dc.b 'Post',0 +PWstringlen set *-PostSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border6: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors6 + dc.l NULL +BorderVectors6: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Userinfo: + dc.l Fileinfo + dc.w 370,67 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border7 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l UserinfoSInfo + dc.w 10 + dc.l NULL +UserinfoSInfo: + dc.l UserinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +UserinfoSIBuff: + dc.b 'UserInfo',0 +PWstringlen set *-UserinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border7: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors7 + dc.l NULL +BorderVectors7: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +Fileinfo: + dc.l newtime + dc.w 370,89 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l FileinfoSInfo + dc.w 11 + dc.l NULL +FileinfoSInfo: + dc.l FileinfoSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +FileinfoSIBuff: + dc.b 'Fileinfo',0 +PWstringlen set *-FileinfoSIBuff + dcb.b 31-PWstringlen,0 + cnop 0,2 +Border8: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors8 + dc.l NULL +BorderVectors8: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +newtime: + dc.l newfiletime + dc.w 16,125 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border9 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newtimeSInfo + dc.w 12 + dc.l NULL +newtimeSInfo: + dc.l newtimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newtimeSIBuff: + dc.b '30',0 +PWstringlen set *-newtimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border9: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors9 + dc.l NULL +BorderVectors9: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +newfiletime: + dc.l Boardname + dc.w 16,137 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l newfiletimeSInfo + dc.w 13 + dc.l NULL +newfiletimeSInfo: + dc.l newfiletimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +newfiletimeSIBuff: + dc.b '15',0 +PWstringlen set *-newfiletimeSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border10: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors10 + dc.l NULL +BorderVectors10: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Boardname: + dc.l fileratio + dc.w 241,97 + dc.w 110,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border11 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BoardnameSInfo + dc.w 7 + dc.l NULL +BoardnameSInfo: + dc.l BoardnameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BoardnameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border11: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors11 + dc.l NULL +BorderVectors11: + dc.w 0,0 + dc.w 109,0 + dc.w 109,10 + dc.w 0,10 + dc.w 0,1 +fileratio: + dc.l byteratio + dc.w 16,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l fileratioSInfo + dc.w 17 + dc.l NULL +fileratioSInfo: + dc.l fileratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +fileratioSIBuff: + dc.b '5',0 +PWstringlen set *-fileratioSIBuff + dcb.b 4-PWstringlen,0 + cnop 0,2 +Border12: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors12 + dc.l NULL +BorderVectors12: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratio: + dc.l fileratiobit + dc.w 16,173 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l byteratioSInfo + dc.w 16 + dc.l NULL +byteratioSInfo: + dc.l byteratioSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 5 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +byteratioSIBuff: + dc.b '1000',0 + cnop 0,2 +Border13: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors13 + dc.l NULL +BorderVectors13: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +fileratiobit: + dc.l minspace + dc.w 156,183 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image1 + dc.l Image2 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image1: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData1 + dc.b $0003,$0000 + dc.l NULL +Image2: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData2 + dc.b $0003,$0000 + dc.l NULL +minspace: + dc.l maxmsglines + dc.w 207,185 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border14 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l minspaceSInfo + dc.w 18 + dc.l NULL +minspaceSInfo: + dc.l minspaceSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +minspaceSIBuff: + dc.b '100',0 + cnop 0,2 +Border14: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors14 + dc.l NULL +BorderVectors14: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +maxmsglines: + dc.l sleeptime + dc.w 16,149 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l maxmsglinesSInfo + dc.w 14 + dc.l NULL +maxmsglinesSInfo: + dc.l maxmsglinesSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +maxmsglinesSIBuff: + dc.b '300',0 + cnop 0,2 +Border15: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors15 + dc.l NULL +BorderVectors15: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +sleeptime: + dc.l byteratiobit + dc.w 16,161 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border16 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l sleeptimeSInfo + dc.w 15 + dc.l NULL +sleeptimeSInfo: + dc.l sleeptimeSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 3 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +sleeptimeSIBuff: + dc.b '3',0 +PWstringlen set *-sleeptimeSIBuff + dcb.b 3-PWstringlen,0 + cnop 0,2 +Border16: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors16 + dc.l NULL +BorderVectors16: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +byteratiobit: + dc.l Hometlf + dc.w 156,171 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image3 + dc.l Image4 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w NULL + dc.l NULL +Image3: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData3 + dc.b $0003,$0000 + dc.l NULL +Image4: + dc.w 0,0 + dc.w 27,11 + dc.w 2 + dc.l ImageData4 + dc.b $0003,$0000 + dc.l NULL +Hometlf: + dc.l Worktlf + dc.w 16,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l HometlfSInfo + dc.w 5 + dc.l NULL +HometlfSInfo: + dc.l HometlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +HometlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border17: + dc.w -1,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors17 + dc.l NULL +BorderVectors17: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 +Worktlf: + dc.l filedirbit + dc.w 121,97 + dc.w 99,8 + dc.w NULL + dc.w RELVERIFY + dc.w STRGADGET + dc.l Border18 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l WorktlfSInfo + dc.w 6 + dc.l NULL +WorktlfSInfo: + dc.l WorktlfSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 18 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +WorktlfSIBuff: + dcb.b 18,0 + cnop 0,2 +Border18: + dc.w -1,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors18 + dc.l NULL +BorderVectors18: + dc.w 0,0 + dc.w 100,0 + dc.w 100,10 + dc.w 0,10 + dc.w 0,1 + +filedirbit: + dc.l confbit + dc.w 368,101 + dc.w 75,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image5 + dc.l Image6 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -1 + dc.l NULL +Image5: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData5 + dc.b $0003,$0000 + dc.l NULL +Image6: + dc.w -1,-1 + dc.w 76,11 + dc.w 2 + dc.l ImageData6 + dc.b $0003,$0000 + dc.l NULL +confbit: + dc.l bigup + dc.w 445,101 + dc.w 91,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Image7 + dc.l Image8 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -2 + dc.l NULL +Image7: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData7 + dc.b $0003,$0000 + dc.l NULL +Image8: + dc.w -1,-1 + dc.w 92,11 + dc.w 2 + dc.l ImageData8 + dc.b $0003,$0000 + dc.l NULL +bigup: + dc.l bigdown + dc.w 542,101 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image9 + dc.l Image10 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -3 + dc.l NULL +Image9: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData9 + dc.b $0003,$0000 + dc.l NULL +Image10: + dc.w -3,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData10 + dc.b $0003,$0000 + dc.l NULL +bigdown: + dc.l slidebar + dc.w 580,101 + dc.w 29,9 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image11 + dc.l Image12 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -4 + dc.l NULL +Image11: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData11 + dc.b $0003,$0000 + dc.l NULL +Image12: + dc.w -2,-1 + dc.w 38,11 + dc.w 2 + dc.l ImageData12 + dc.b $0003,$0000 + dc.l NULL +slidebar: + dc.l up + dc.w 617,100 + dc.w 17,44 + dc.w GADGIMAGE + dc.w RELVERIFY + dc.w PROPGADGET + dc.l Image13 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l slidebarSInfo + dc.w -5 + dc.l NULL +slidebarSInfo: + dc.w FREEVERT + dc.w 0,7281 + dc.w -1,6553 + dc.w 0,0,0,0,0,0 +Image13: + dc.w 0,3 + dc.w 10,7 + dc.w 2 + dc.l ImageData13 + dc.b $0003,$0000 + dc.l NULL +up: + dc.l down + dc.w 619,146 + dc.w 15,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image14 + dc.l Image15 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -6 + dc.l NULL +Image14: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData14 + dc.b $0003,$0000 + dc.l NULL +Image15: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData15 + dc.b $0003,$0000 + dc.l NULL +down: + dc.l name1 + dc.w 619,155 + dc.w 14,7 + dc.w GADGHIMAGE+GADGIMAGE + dc.w RELVERIFY + dc.w BOOLGADGET + dc.l Image16 + dc.l Image17 + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -7 + dc.l NULL +Image16: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData16 + dc.b $0003,$0000 + dc.l NULL +Image17: + dc.w 0,0 + dc.w 13,8 + dc.w 2 + dc.l ImageData17 + dc.b $0003,$0000 + dc.l NULL +name1: + dc.l name2 + dc.w 368,113 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border19 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -8 + dc.l NULL +Border19: + dc.w -1,-1 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors19 + dc.l NULL +BorderVectors19: + dc.w 0,0 + dc.w 247,0 + dc.w 247,40 + dc.w 0,40 + dc.w 0,1 +name2: + dc.l name3 + dc.w 368,123 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border20 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -9 + dc.l NULL +Border20: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors20 + dc.l NULL +BorderVectors20: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +name3: + dc.l name4 + dc.w 368,133 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border21 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -10 + dc.l NULL +Border21: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors21 + dc.l NULL +BorderVectors21: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +name4: + dc.l CFName + dc.w 368,143 + dc.w 246,9 + dc.w NULL + dc.w RELVERIFY+TOGGLESELECT + dc.w BOOLGADGET + dc.l Border22 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l NULL + dc.w -11 + dc.l NULL +Border22: + dc.w -1,-1 + dc.b 0,0,RP_JAM1 + dc.b 5 + dc.l BorderVectors22 + dc.l NULL +BorderVectors22: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,0 +CFName: + dc.l path + dc.w 370,156 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border23 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l CFNameSInfo + dc.w -12 + dc.l NULL +CFNameSInfo: + dc.l CFNameSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +CFNameSIBuff: + dcb.b 31,0 + cnop 0,2 +Border23: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors23 + dc.l NULL +BorderVectors23: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +path: + dc.l order + dc.w 370,168 + dc.w 244,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border24 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l pathSInfo + dc.w -13 + dc.l NULL +pathSInfo: + dc.l pathSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 31 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +pathSIBuff: + dcb.b 31,0 + cnop 0,2 +Border24: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors24 + dc.l NULL +BorderVectors24: + dc.w 0,0 + dc.w 247,0 + dc.w 247,10 + dc.w 0,10 + dc.w 0,1 +order: + dc.l scan + dc.w 435,180 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border25 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l orderSInfo + dc.w -14 + dc.l NULL +orderSInfo: + dc.l orderSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +orderSIBuff: + dcb.b 4,0 + cnop 0,2 +Border25: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors25 + dc.l NULL +BorderVectors25: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +scan: + dc.l Bits + dc.w 488,180 + dc.w 34,8 + dc.w NULL + dc.w RELVERIFY+LONGINT+ALTKEYMAP + dc.w STRGADGET + dc.l Border26 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l scanSInfo + dc.w -15 + dc.l NULL +scanSInfo: + dc.l scanSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 4 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +scanSIBuff: + dcb.b 4,0 + cnop 0,2 +Border26: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors26 + dc.l NULL +BorderVectors26: + dc.w 0,0 + dc.w 37,0 + dc.w 37,10 + dc.w 0,10 + dc.w 0,1 +Bits: + dc.l NULL + dc.w 541,180 + dc.w 73,8 + dc.w NULL + dc.w RELVERIFY+ALTKEYMAP + dc.w STRGADGET + dc.l Border27 + dc.l NULL + dc.l NULL + dc.l NULL + dc.l BitsSInfo + dc.w -16 + dc.l NULL +BitsSInfo: + dc.l BitsSIBuff + dc.l UNDOBUFFER + dc.w 0 + dc.w 9 + dc.w 0 + dc.w 0,0,0,0,0 + dc.l 0 + dc.l 0 + dc.l NULL +BitsSIBuff: + dcb.b 9,0 + cnop 0,2 +Border27: + dc.w -3,-2 + dc.b 3,0,RP_COMPLEMENT + dc.b 5 + dc.l BorderVectors27 + dc.l NULL +BorderVectors27: + dc.w 0,0 + dc.w 76,0 + dc.w 76,10 + dc.w 0,10 + dc.w 0,1 +MenuList1: +Menu1: + dc.l Menu2 + dc.w 0,0 + dc.w 63,0 + dc.w MENUENABLED + dc.l Menu1Name + dc.l MenuItem1 + dc.w 0,0,0,0 +Menu1Name: + dc.b 'Project',0 + cnop 0,2 +MenuItem1: + dc.l MenuItem2 + dc.w 0,8 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText1 + dc.l NULL + dc.b 'S' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText1: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText1 + dc.l NULL +ITextText1: + dc.b 'Save Config',0 + cnop 0,2 +MenuItem2: + dc.l NULL + dc.w 0,16 + dc.w 128,8 + dc.w ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText2 + dc.l NULL + dc.b 'Q' + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText2: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText2 + dc.l NULL +ITextText2: + dc.b 'Quit',0 + cnop 0,2 +Menu2: + dc.l Menu3 + dc.w 70,0 + dc.w 71,0 + dc.w MENUENABLED + dc.l Menu2Name + dc.l MenuItem4 + dc.w 0,0,0,0 +Menu2Name: + dc.b 'Features',0 + cnop 0,2 +MenuItem4: + dc.l MenuItem5 + dc.w 0,0 + dc.w 107,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText4 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText4: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText4 + dc.l NULL +ITextText4: + dc.b 'Interlaced',0 + cnop 0,2 +MenuItem5: + dc.l MenuItem6 + dc.w 0,8 + dc.w 107,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText5 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText5: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText5 + dc.l NULL +ITextText5: + dc.b '8 Colors',0 + cnop 0,2 +MenuItem6: + dc.l NULL + dc.w 0,16 + dc.w 107,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText6 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l SubItem1 + dc.w MENUNULL +IText6: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText6 + dc.l NULL +ITextText6: + dc.b 'Charset ISO',0 + cnop 0,2 +SubItem1: + dc.l SubItem2 + dc.w 92,-8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText7 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText7: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText7 + dc.l NULL +ITextText7: + dc.b 'ISO',0 + cnop 0,2 +SubItem2: + dc.l SubItem3 + dc.w 92,0 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText8 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText8: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText8 + dc.l NULL +ITextText8: + dc.b 'IBM',0 + cnop 0,2 +SubItem3: + dc.l NULL + dc.w 92,8 + dc.w 24,8 + dc.w ITEMTEXT+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText9 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText9: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 0,0 + dc.l NULL + dc.l ITextText9 + dc.l NULL +ITextText9: + dc.b 'IBN',0 + cnop 0,2 +Menu3: + dc.l NULL + dc.w 148,0 + dc.w 111,0 + dc.w MENUENABLED + dc.l Menu3Name + dc.l MenuItem7 + dc.w 0,0,0,0 +Menu3Name: + dc.b 'New Users May',0 + cnop 0,2 +MenuItem7: + dc.l MenuItem8 + dc.w 0,0 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText10 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText10: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText10 + dc.l NULL +ITextText10: + dc.b 'Upload',0 + cnop 0,2 +MenuItem8: + dc.l NULL + dc.w 0,8 + dc.w 83,8 + dc.w CHECKIT+ITEMTEXT+MENUTOGGLE+ITEMENABLED+HIGHCOMP + dc.l 0 + dc.l IText11 + dc.l NULL + dc.b NULL + dc.b NULL + dc.l NULL + dc.w MENUNULL +IText11: + dc.b 3,1,RP_COMPLEMENT,0 + dc.w 19,0 + dc.l NULL + dc.l ITextText11 + dc.l NULL +ITextText11: + dc.b 'Download',0 + cnop 0,2 +IntuiTextList1: +IText12: + dc.b 3,0,RP_JAM2,0 + dc.w 55,125 + dc.l NULL + dc.l ITextText12 + dc.l IText13 +ITextText12: + dc.b 'New User Time limit',0 + cnop 0,2 +IText13: + dc.b 3,0,RP_JAM2,0 + dc.w 55,137 + dc.l NULL + dc.l ITextText13 + dc.l IText14 +ITextText13: + dc.b 'New User File Time Limit',0 + cnop 0,2 +IText14: + dc.b 3,0,RP_JAM2,0 + dc.w 54,185 + dc.l NULL + dc.l ITextText14 + dc.l IText15 +ITextText14: + dc.b 'File Ratio',0 + cnop 0,2 +IText15: + dc.b 3,0,RP_JAM2,0 + dc.w 55,173 + dc.l NULL + dc.l ITextText15 + dc.l IText16 +ITextText15: + dc.b 'KByte Ratio',0 + cnop 0,2 +IText16: + dc.b 3,0,RP_JAM2,0 + dc.w 246,185 + dc.l NULL + dc.l ITextText16 + dc.l IText17 +ITextText16: + dc.b 'Min UL Space',0 + cnop 0,2 +IText17: + dc.b 3,0,RP_JAM2,0 + dc.w 55,149 + dc.l NULL + dc.l ITextText17 + dc.l IText18 +ITextText17: + dc.b 'Max Lines In Msgs',0 + cnop 0,2 +IText18: + dc.b 3,0,RP_JAM2,0 + dc.w 54,161 + dc.l NULL + dc.l ITextText18 + dc.l IText19 +ITextText18: + dc.b 'Sleep Time',0 + cnop 0,2 +IText19: + dc.b 3,0,RP_JAM2,0 + dc.w 432,190 + dc.l NULL + dc.l ITextText19 + dc.l IText20 +ITextText19: + dc.b 'Order Scan Bits',0 + cnop 0,2 +IText20: + dc.b 2,0,RP_JAM2,0 + dc.w 14,13 + dc.l NULL + dc.l ITextText20 + dc.l IText21 +ITextText20: + dc.b 'SYSOP INFO',0 + cnop 0,2 +IText21: + dc.b 3,0,RP_JAM2,0 + dc.w 237,87 + dc.l NULL + dc.l ITextText21 + dc.l IText22 +ITextText21: + dc.b 'Board Name',0 + cnop 0,2 +IText22: + dc.b 3,0,RP_JAM2,0 + dc.w 367,13 + dc.l NULL + dc.l ITextText22 + dc.l IText23 +ITextText22: + dc.b 'News Conference Name',0 + cnop 0,2 +IText23: + dc.b 3,0,RP_JAM2,0 + dc.w 367,35 + dc.l NULL + dc.l ITextText23 + dc.l IText24 +ITextText23: + dc.b 'Post Conference Name',0 + cnop 0,2 +IText24: + dc.b 3,0,RP_JAM2,0 + dc.w 367,57 + dc.l NULL + dc.l ITextText24 + dc.l IText25 +ITextText24: + dc.b 'UserInfo Conference Name',0 + cnop 0,2 +IText25: + dc.b 3,0,RP_JAM2,0 + dc.w 367,79 + dc.l NULL + dc.l ITextText25 + dc.l IText26 +ITextText25: + dc.b 'FileInfo Conference Name',0 + cnop 0,2 +IText26: + dc.b 3,0,RP_JAM2,0 + dc.w 14,24 + dc.l NULL + dc.l ITextText26 + dc.l IText27 +ITextText26: + dc.b 'Name',0 + cnop 0,2 +IText27: + dc.b 3,0,RP_JAM2,0 + dc.w 13,45 + dc.l NULL + dc.l ITextText27 + dc.l IText28 +ITextText27: + dc.b 'Address',0 + cnop 0,2 +IText28: + dc.b 3,0,RP_JAM2,0 + dc.w 13,66 + dc.l NULL + dc.l ITextText28 + dc.l IText29 +ITextText28: + dc.b 'Postal Code',0 + cnop 0,2 +IText29: + dc.b 3,0,RP_JAM2,0 + dc.w 13,87 + dc.l NULL + dc.l ITextText29 + dc.l IText30 +ITextText29: + dc.b 'Home Phone',0 + cnop 0,2 +IText30: + dc.b 3,0,RP_JAM2,0 + dc.w 120,87 + dc.l NULL + dc.l ITextText30 + dc.l IText31 +ITextText30: + dc.b 'Work Phone',0 + cnop 0,2 +IText31: + dc.b 3,0,RP_JAM2,0 + dc.w 265,24 + dc.l NULL + dc.l ITextText31 + dc.l NULL +ITextText31: + dc.b 'Password',0 + cnop 0,2 + + section imagedata,data_c + +ImageData1: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 + +ImageData2: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData3: + dc.w $0000,$0000,$0000,$0020,$0F07,$0720,$198C,$0C20 + dc.w $199F,$1F20,$198C,$0C20,$198C,$0C20,$198C,$0C20 + dc.w $0F0C,$0C20,$0000,$0020,$FFFF,$FFE0,$FFFF,$FFE0 + dc.w $8000,$0000,$8F07,$0700,$998C,$0C00,$999F,$1F00 + dc.w $998C,$0C00,$998C,$0C00,$998C,$0C00,$8F0C,$0C00 + dc.w $8000,$0000,$0000,$0000 +ImageData4: + dc.w $FFFF,$FFE0,$8000,$0000,$81E0,$0000,$8330,$0000 + dc.w $8333,$E000,$8333,$3000,$8333,$3000,$8333,$3000 + dc.w $81E3,$3000,$8000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$0000,$0020,$0000,$0020,$0000,$0020 + dc.w $0000,$0020,$7FFF,$FFE0 + +ImageData5: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$1F86,$0600,$001E,$0600,$0010,$1800 + dc.w $0600,$001B,$0000,$0010,$1806,$060F,$0019,$861F + dc.w $0F10,$1E06,$0619,$8019,$8619,$9810,$1806,$061F + dc.w $8019,$8618,$0F10,$1806,$0618,$001B,$0618,$0190 + dc.w $1803,$030F,$001E,$0318,$1F10,$0000,$0000,$0000 + dc.w $0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000,$0000 + dc.w $0000,$9F86,$0600,$001E,$0600,$0000,$9800,$0600 + dc.w $001B,$0000,$0000,$9806,$060F,$0019,$861F,$0F00 + dc.w $9E06,$0619,$8019,$8619,$9800,$9806,$061F,$8019 + dc.w $8618,$0F00,$9806,$0618,$001B,$0618,$0180,$9803 + dc.w $030F,$001E,$0318,$1F00,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000 + +ImageData6: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000,$0000 + dc.w $0000,$0000,$9F86,$0600,$001E,$0600,$0000,$9800 + dc.w $0600,$001B,$0000,$0000,$9806,$060F,$0019,$861F + dc.w $0F00,$9E06,$0619,$8019,$8619,$9800,$9806,$061F + dc.w $8019,$8618,$0F00,$9806,$0618,$001B,$0618,$0180 + dc.w $9803,$030F,$001E,$0318,$1F00,$8000,$0000,$0000 + dc.w $0000,$0000,$8000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0010,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0010,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0010,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0010,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0010,$7FFF,$FFFF,$FFFF,$FFFF,$FFF0 + +ImageData7: + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0780,$0007,$0000,$0000 + dc.w $0000,$0010,$0C00,$000C,$0000,$0000,$0000,$0010 + dc.w $180F,$1F1F,$0F1F,$0F1F,$0F0F,$0F10,$1819,$998C + dc.w $1999,$9999,$9819,$9810,$1819,$998C,$1F98,$1F99 + dc.w $981F,$8F10,$0C19,$998C,$1818,$1819,$9818,$0190 + dc.w $078F,$198C,$0F18,$0F19,$8F0F,$1F10,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$FFFF,$FFFF,$FFFF,$FFFF + dc.w $FFFF,$FFF0,$FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$8780,$0007 + dc.w $0000,$0000,$0000,$0000,$8C00,$000C,$0000,$0000 + dc.w $0000,$0000,$980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00 + dc.w $9819,$998C,$1999,$9999,$9819,$9800,$9819,$998C + dc.w $1F98,$1F99,$981F,$8F00,$8C19,$998C,$1818,$1819 + dc.w $9818,$0180,$878F,$198C,$0F18,$0F19,$8F0F,$1F00 + dc.w $8000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000 + +ImageData8: + dc.w $FFFF,$FFFF,$FFFF,$FFFF,$FFFF,$FFF0,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8780,$0007,$0000,$0000 + dc.w $0000,$0000,$8C00,$000C,$0000,$0000,$0000,$0000 + dc.w $980F,$1F1F,$0F1F,$0F1F,$0F0F,$0F00,$9819,$998C + dc.w $1999,$9999,$9819,$9800,$9819,$998C,$1F98,$1F99 + dc.w $981F,$8F00,$8C19,$998C,$1818,$1819,$9818,$0180 + dc.w $878F,$198C,$0F18,$0F19,$8F0F,$1F00,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$0000,$0000 + dc.w $0000,$0000,$0000,$0010,$0000,$0000,$0000,$0000 + dc.w $0000,$0010,$0000,$0000,$0000,$0000,$0000,$0010 + dc.w $0000,$0000,$0000,$0000,$0000,$0010,$7FFF,$FFFF + dc.w $FFFF,$FFFF,$FFFF,$FFF0 + +ImageData9: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$000C,$C000 + dc.w $0400,$000C,$C000,$0400,$000C,$CF80,$0400,$000C + dc.w $CCC0,$0400,$000C,$CCC0,$0400,$000C,$CF80,$0400 + dc.w $0007,$8C00,$0400,$0000,$0C00,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C + dc.w $C000,$0000,$800C,$C000,$0000,$800C,$CF80,$0000 + dc.w $800C,$CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80 + dc.w $0000,$8007,$8C00,$0000,$8000,$0C00,$0000,$0000 + dc.w $0000,$0000 + +ImageData10: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$800C,$C000 + dc.w $0000,$800C,$C000,$0000,$800C,$CF80,$0000,$800C + dc.w $CCC0,$0000,$800C,$CCC0,$0000,$800C,$CF80,$0000 + dc.w $8007,$8C00,$0000,$8000,$0C00,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData11: + dc.w $0000,$0000,$0000,$0000,$0000,$0400,$0F00,$0000 + dc.w $0400,$0D80,$0000,$0400,$0CC7,$98CF,$8400,$0CCC + dc.w $D8CC,$C400,$0CCC,$DACC,$C400,$0D8C,$DFCC,$C400 + dc.w $0F07,$8D8C,$C400,$0000,$0000,$0400,$FFFF,$FFFF + dc.w $FC00,$FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00 + dc.w $0000,$0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000 + dc.w $8CCC,$D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC + dc.w $C000,$8F07,$8D8C,$C000,$8000,$0000,$0000,$0000 + dc.w $0000,$0000 + +ImageData12: + dc.w $FFFF,$FFFF,$FC00,$8000,$0000,$0000,$8F00,$0000 + dc.w $0000,$8D80,$0000,$0000,$8CC7,$98CF,$8000,$8CCC + dc.w $D8CC,$C000,$8CCC,$DACC,$C000,$8D8C,$DFCC,$C000 + dc.w $8F07,$8D8C,$C000,$8000,$0000,$0000,$8000,$0000 + dc.w $0000,$0000,$0000,$0000,$0000,$0000,$0400,$0000 + dc.w $0000,$0400,$0000,$0000,$0400,$0000,$0000,$0400 + dc.w $0000,$0000,$0400,$0000,$0000,$0400,$0000,$0000 + dc.w $0400,$0000,$0000,$0400,$0000,$0000,$0400,$7FFF + dc.w $FFFF,$FC00 + +ImageData13: + dc.w $0000,$2AC0,$5540,$2AC0,$5540,$2AC0,$FFC0,$FFC0 + dc.w $D500,$AA80,$D500,$AA80,$D500,$0000 + +ImageData14: + dc.w $0000,$0008,$0208,$0508,$0888,$1048,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData15: + dc.w $FFF8,$8000,$8200,$8500,$8880,$9040,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 + +ImageData16: + dc.w $0000,$0008,$1048,$0888,$0508,$0208,$0008,$FFF8 + dc.w $FFF8,$8000,$8000,$8000,$8000,$8000,$8000,$0000 + +ImageData17: + dc.w $FFF8,$8000,$9040,$8880,$8500,$8200,$8000,$8000 + dc.w $0000,$0008,$0008,$0008,$0008,$0008,$0008,$7FF8 + END diff --git a/withfile b/withfile new file mode 100644 index 0000000..2a464c4 --- /dev/null +++ b/withfile @@ -0,0 +1,61 @@ +define _DOSBase dosbase +define _UtilityBase utibase +define _fraISOtilIBN fraISOtilIBN +define _fraIBNtilISO fraIBNtilISO +define _dosbase dosbase +define _exebase exebase +define _logreplymsgtext logreplymsgtext +define _logentermsgtext logentermsgtext +define _CursorOffData CursorOffData +define _accessbitstext accessbitstext +define _CursorOnData CursorOnData +define _deltext deltext +define _deadtext deadtext +define _moretext moretext; +define _morenohelptext morenohelptext +define _invalidacctext invalidacctext +define _versionstr versionstr + +define @outimage outimage + +define _mayedlineprompt mayedlineprompt +define _loadusernrnr loadusernrnr +define _sendfile sendfile +define _downloadfile1 downloadfile1 +define _writecontext writecontext +define _saveuser saveuser +define _saveuserarea saveuserarea +define _writeerroro writeerroro +define _writetexto writetexto +define _writetexti writetexti +define _writetext writetext +define _readchar readchar +define _readline readline +define _readlineall readlineall +define _loadmsg loadmsg +define _savemsg savemsg +define _strcopylen strcopylen +define _getusername getusername +define _savemsgheader savemsgheader +define _removefromqueue removefromqueue +define _gettopqueue gettopqueue +define _unjoin unjoin +define _getusernumber getusernumber +define _atoi atoi +define _loadmsgheader loadmsgheader +define _loadmsgtext loadmsgtext +define _savemsgheader savemsgheader +define _sendintermsgmsg sendintermsgmsg +define _killrepwritelog killrepwritelog +define _getfromname getfromname +define _gettoname gettoname +define _skipnetnames skipnetnames +define _getfromname getfromname +define _gettoname gettoname +define _skipnetnames skipnetnames +define _checkupdatedbulletins checkupdatedbulletins +define _getnextconfnr getnextconfnr +define _getnetsubject getnetsubject + +define _stopreviewmessages stopreviewmessages +define @checkformsgerror checkformsgerror

xu!|8D|u246?1Xh&5W{O9Ql(dmP%EyI1$LNn)LLu15Q? zqFvf>Wy7M+Hc$wSRt&RgA$w(oO`Ed1tGundyR+*;nRz6t`Zs;Q;(bFrW|JoI?i!$- z>eFb~_FT|E_m2l?%ak0hSgd3Hx>bYwCw@CX8+uytjd$Y=*b+nU-{);w^e@z-`nOIa z9;6RVccFU4yKUoYTjZqvO&XA6$`M7owxy$^Yh@|=uG1Rp253t<6m1ND#wjV2X>o!g zbqtwH!b;|~ZEM$dZBXPoZ!uY;&r|g4db>#y@AXPokeNAj{;Blq}%Ca#irP8CbueCNWVU&Tp&pn%?FBelq@%_+_<89&ERo26mR%e zVV^_Gzv#R`4&7f06AtabK; z{JjqCz`*Hx(EKWYqfMJ~1B`BcyxSU$B%2m9Y~HY={4$5Wy{%`(`j`qHI)7yspr4@h zLH;XSZ&+=ON;3b&1N|z(y#Bhq1CRS z%dgWby^}tE37;Hc%QF=Gg)P7P20A7FhP-oq{9-y)eh<419<=MYV#6vP6_DoozRFtX_wyHhHX6U!lwKPYv+i z*uw6{@lL`Z`g<(h%!b{&b}w$4TPei2EFs=20bSv|mY$aCxi>8CTHlR7oe$OE@5Rf@ zLUr>Oh4_HM`q=_YdAkn_@%7b0H2xgV4=eHa?nw=Sp)e9y9uvjvEIi0;Rhgm4+^#ai z6K>&Ta#7N&O2#2`o61ZCnUg6+Nm!LkL&mEzGePELYE>PIbA?XUfD)&jC5nuKUZ*CaiNpSjD3KzO$u?Y5P`Z_*1jr45kU%#weL7&I zBXgLp1>0tU=a8*t`=NW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iq%{tT7Fw`T-+(1o-O&gW|d=JC|9=VZkc$@ z?00V4x`qEcwr|~X8k6p$zD?ga{Uy=2UP_^jXhA6ow(TDE-$hlA1ax<$%^vRii*FLG}kZNB|(-n)2_ zaqYMBQdjM_^4`LGGcSJHDTnqNFMiu!%S*p#zmz2|^Pm&nNguj{_j+FVtFGql;H6Ks zJei;EnxQmxGGQQis zFSAzL9}c839OJ!#mvq{F9OAKiI|cByyre4};vMH5;T`1N&D+U)74Mb2m+@}py@dBd z-VR>P(&)>oEA8*D!~eR|X^&5^h6hi)gZEb6W4wwRH@4D|jCq`w^0771XTXPed0cmy zd=DeEt39$F9UkMa=Rt0GESgz|Pe8?eTCKc48Wmu2^fYf)7ntpSV%TuZ%(>xx zQI~0YJn0wWt>>`z8MC+h!BAG0t`9)D#a&={>&P4Wre(K!&8^B=VNK{mA*A;+{ABFU zZiNkp%#J^BV7HjVdX+ot?;*cOjVWySmhs|QFfJVHX{SBlPHHW`a*Vt88!zg$^Z^j` zXX}nd9^u*Da7{=$5sf z^}KDlrAy8j+o|_hKBZ|T1yitd94ZICNy69D!rHI78)|{S#vvzR!&mvq=JxF$95nO# z7*6Z5wV3U@`B`Q4yFC97z;Da7?qi$VJ;u|=Tlk~D$|-R?!p|!E>wZ(o^>Ojrck-k3 zRnUA;c57oB$x#CO^MKahm8YdU?S%CNeoS8?0T^?-A+{BSp#Gp5Zj=Xwt1rPQoZH=x z{RyBc8=E(%A4E60!XMgI4sG`7s(3RUWBcj+tgM50uRV^%@*k5P)~d~5j@R(((iF!V4 zP`zez@ftm3J95kN7QY-2&$XK;)e}4!$Y^5 lzD^G(w9oLfQjbWkQ9n}hG}YVq$>x%e4}|sVe>`p9|KD>fl?wm> literal 0 HcmV?d00001 diff --git a/JEO/UserEditor.c b/JEO/UserEditor.c new file mode 100644 index 0000000..f530400 --- /dev/null +++ b/JEO/UserEditor.c @@ -0,0 +1,816 @@ +;/* +sc5 -j73 -q5e -d4 UserEditor +copy UserEditor.c -J:UserEditor.c +slink LIB:c.o+"UserEditor.o" to UserEditor LIB LIB:sc.lib LIB:JEO.lib ADDSYM +quit +*/ + +/*************************************************************************** +* UserEditor 2.00 (1/05-94) +* +* Edits userlists +* +* +***************************************************************************/ +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +//#include +//#include +//#include +//#include + +#include "dabbs:JEO/UserEditorGui.c" + +struct ConfigRecord *config; +char UserFName[] = "ABBS:Config/UserFile"; + +int main(int argc, char **argv); +int Setup (void); +void Cleanup (void); +int HandleMsg (struct ABBSmsg *msg); +int setuplistview(void); +int setupconflistview(void); +BOOL handleidcmp(void); +void UpdateDisplayNewUser (char *name); +void updateconflistview(void); +void dosaveuser(void); + +char *vers = "\0$VER: UserEditor 1.00 (29.05.97)\n\r"; /* day,month,year */ + +struct IntuitionBase *IntuitionBase = NULL; +struct GfxBase *GfxBase = NULL; +struct Library *DiskfontBase = NULL; +struct Library *GadToolsBase = NULL; +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +//struct Mainmemory *Mainmem; +struct UserRecord *curuser, *curuserback; +struct DateTime dt; + +short screenok = 0; +short windowok = 0; +UWORD numconfs = 0; +extern struct Window *ABBSUserEditorWnd; +extern struct Gadget *ABBSUserEditorGadgets[]; +extern struct Menu *ABBSUserEditorMenus; + +static struct Node *list = NULL,*conflist = NULL; +struct List listheader,conflistheader; + +struct EasyStruct aboutereq = { + sizeof (struct EasyStruct),0, + "ABBS Usereditor Info", + "ABBS Usereditor v2.00\nProgrammed by Jan Erik Olausen.\n(c) 1998", + "I know" +},saveerrorreq = { + sizeof (struct EasyStruct),0, + "Save Error!", + "Error saving user!", + "I know" +},loaderrorreq = { + sizeof (struct EasyStruct),0, + "Load Error!", + "Error loading user!", + "I know" +}; + +struct coNode { + struct Node node; + char text[sizeof (NameT) + 10]; +}; + +struct ueNode { + struct Node node; + NameT name; +}; + + +int main (int argc, char **argv) +{ + int ret = 0; + int quit = 1; + ULONG waitsigs,gotsigs; + + if (Setup()) + { + waitsigs = ((1L << ABBSUserEditorWnd->UserPort->mp_SigBit) | SIGBREAKF_CTRL_C); + + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) + printf ("Error talking to ABBS\n"); + else + { + config = (struct ConfigRecord *)msg.Data; + curuser = AllocMem (config->UserrecordSize, MEMF_CLEAR); + curuserback = AllocMem (config->UserrecordSize, MEMF_CLEAR); + memcpy (curuserback, curuser, config->UserrecordSize); + + printf ("1\n"); + if (setuplistview()) + { + printf ("2\n"); + if (setupconflistview()) + quit = 0; + } + } + while (!quit) + { + gotsigs = Wait (waitsigs); + quit = (!(handleidcmp())); + if (gotsigs & SIGBREAKF_CTRL_C) + quit = 1; + } + + Cleanup(); + } + + return (ret); +} + +void updateconflistview(void) +{ + struct ConferenceRecord *confarray; + struct coNode *nodes; + int n; + UWORD acc; + char bits[10],*ptr,*ptr2; + + confarray = (struct ConferenceRecord *) + (((int)config) + (SIZEOFCONFIGRECORD)); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,NULL,TAG_DONE,0); + + nodes = (struct coNode *) conflist; + + for (n = 0; n < config->Maxconferences; n++) + { + ptr = bits; + ptr2 = "RWUDFISZ"; + acc = curuser->firstuserconf[confarray[n].n_ConfOrder-1].uc_Access; + + while (*ptr2) { + if (acc & 1) + *(ptr++) = *(ptr2++); + else { + *(ptr++) = ' '; + ptr2 += 1; + } + acc = acc >> 1; + } + bits[8] = '\0'; + sprintf (nodes[n].text,"%s-%s",bits, confarray[confarray[n].n_ConfOrder-1].n_ConfName); +// config->ConfNames[config->ConfOrder[n]-1]); + } + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,&conflistheader,TAG_DONE,0); +} + +void UpdateDisplayNewUser (char *name) +{ + int n; + char string[80],string2[40]; + + msg.Command = Main_loaduser; + msg.Name = name; + msg.Data = (ULONG)curuser; + n = HandleMsg (&msg); + + if (n != Error_OK) { + EasyRequestArgs(ABBSUserEditorWnd,&loaderrorreq,NULL,NULL); + return; + } + + memcpy (&curuserback,&curuser,sizeof (struct UserRecord)); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_username], + ABBSUserEditorWnd,NULL,GA_Disabled,TRUE,GTST_String,&curuser->Name,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_address], + ABBSUserEditorWnd,NULL,GTST_String,&curuser->Address,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_citystate], + ABBSUserEditorWnd,NULL,GTST_String,&curuser->CityState,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_passwd], + ABBSUserEditorWnd,NULL,GTST_String,&curuser->Password,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_homephone], + ABBSUserEditorWnd,NULL,GTST_String,&curuser->HomeTelno,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_workphone], + ABBSUserEditorWnd,NULL,GTST_String,&curuser->WorkTelno,TAG_DONE,0); + +/* + dt.dat_Stamp.ds_Days = curuser->LastAccess.ds_Days; + dt.dat_Stamp.ds_Minute = curuser->LastAccess.ds_Minute; + dt.dat_Stamp.ds_Tick = curuser->LastAccess.ds_Tick; + dt.dat_Format = FORMAT_DOS; + dt.dat_Flags = DTF_SUBST; + dt.dat_StrDate = string; + dt.dat_StrTime = string2; + if (DateToStr (&dt)) + { + strcat (string," at "); + strcat (string,string2); + } + else + string[0] = '0'; + + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_lastontext], + ABBSUserEditorWnd,NULL,GTTX_Text,string,TAG_DONE,0); + +*/ + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_charset], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser->Charset,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_scratchformat], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser->ScratchFormat,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_xpertlevel], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser->XpertLevel,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_protocol], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser->Protocol,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timelimit], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->TimeLimit,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_filelimit], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->FileLimit,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_pagelength], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->PageLength,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_resymemsgnr], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->ResymeMsgNr,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timeused], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->TimeUsed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ftimeused], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->FTimeUsed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_byteratio], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->u_ByteRatiov,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_fileratio], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->u_FileRatiov,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_uploaded], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->Uploaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_downloaded], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->Downloaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_kbupload], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->KbUploaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_kbdownload], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->KbDownloaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timeson], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->TimesOn,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_msgread], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->MsgsRead,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_msgdumped], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->MsgaGrab,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_totaltime], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser->Totaltime,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_grabformat], + ABBSUserEditorWnd,NULL,GTMX_Active,curuser->GrabFormat,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_Killed], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_Killed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_usefse], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_FSE,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ansimenus], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_ANSIMenus,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_colormsg], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_ColorMessages,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_g_r], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_G_R,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_reviewown], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_KeepOwnMsgs,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ansi], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_ANSI,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_clearscreen], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_ClearScreen,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_raw], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_RAW,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_filter], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_Filter,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_sendbulletins], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser->Userbits & USERF_SendBulletins,TAG_DONE,0); + +// updateconflistview(); +} + +void dosaveuser(void) +{ + int n; + +/* Save'r bare hvis det er gjort forandringer +*/ + if (!(memcmp (&curuserback,&curuser,sizeof (struct UserRecord)))) + return; + + msg.Command = Main_saveuser; + msg.Name = curuser->Name; + msg.Data = (ULONG) &curuser; + msg.arg = 0; + n = HandleMsg (&msg); + + if (n != Error_OK) { + EasyRequestArgs(ABBSUserEditorWnd,&saveerrorreq,NULL,NULL); + } +} + +BOOL handleidcmp(void) +{ + struct IntuiMessage *m; + BOOL running = TRUE; + int n; + UWORD code; + struct IntuiMessage tmpmsg; + struct Node *node; + struct MenuItem *mi; + + while (m = GT_GetIMsg (ABBSUserEditorWnd->UserPort)) { + CopyMem ((char *) m, (char *) &tmpmsg, (long) sizeof(struct IntuiMessage)); + GT_ReplyIMsg(m); + + switch (tmpmsg.Class) { + case IDCMP_REFRESHWINDOW: + GT_BeginRefresh (ABBSUserEditorWnd); + ABBSUserEditorRender(); + GT_EndRefresh (ABBSUserEditorWnd,TRUE); + break; + + case IDCMP_MENUPICK: + code = tmpmsg.Code; + while (code != MENUNULL) { + switch (MENUNUM(code)) { + case 0: + switch (ITEMNUM(code)) { + case 0: /* About */ + EasyRequestArgs(ABBSUserEditorWnd,&aboutereq,NULL,NULL); + break; + + case 1: /* Save */ + dosaveuser(); + break; + + case 3: /* Quit */ +/* if (memcmp (&noderecordback,&noderecord,sizeof (struct NodeRecord))) { + if (1 == EasyRequestArgs(ABBSUserEditorWnd,&quitreq,NULL,NULL)) + running = FALSE; + } else +*/ running = FALSE; + break; + } + break; + } + + mi = ItemAddress(ABBSUserEditorMenus,code); + code = mi->NextSelect; + } + break; + + case IDCMP_CLOSEWINDOW: + running = FALSE; + break; + + case IDCMP_GADGETUP: + switch (((struct Gadget *) tmpmsg.IAddress)->GadgetID) { + case GD_Users_ListView: + node = listheader.lh_Head; + for (n = 0; n < tmpmsg.Code; n++) + node = node->ln_Succ; + UpdateDisplayNewUser (node->ln_Name); + break; + + case GD_saveuser : + dosaveuser(); + break; + +/* case GD_username : + strncpy (curuser->Name,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; +*/ + case GD_address: + strncpy (curuser->Address,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_citystate: + strncpy (curuser->CityState,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_passwd: + strncpy (curuser->Password,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_homephone: + strncpy (curuser->HomeTelno,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_workphone: + strncpy (curuser->WorkTelno,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_charset: + curuser->Charset = tmpmsg.Code; + break; + + case GD_scratchformat: + curuser->ScratchFormat = tmpmsg.Code; + break; + + case GD_xpertlevel: + curuser->XpertLevel = tmpmsg.Code; + break; + + case GD_protocol : + curuser->Protocol = tmpmsg.Code; + break; + + case GD_timelimit : + curuser->TimeLimit = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + case GD_filelimit : + curuser->FileLimit = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_pagelength: + curuser->PageLength = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_resymemsgnr: + curuser->ResymeMsgNr = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_timeused: + curuser->TimeUsed = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_ftimeused: + curuser->FTimeUsed = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_byteratio: + curuser->u_ByteRatiov = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_fileratio: + curuser->u_FileRatiov = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_uploaded: + curuser->Uploaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_downloaded: + curuser->Downloaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_kbupload: + curuser->KbUploaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_kbdownload: + curuser->KbDownloaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_timeson: + curuser->TimesOn = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_msgread: + curuser->MsgsRead = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_msgdumped: + curuser->MsgaGrab = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_totaltime: + curuser->Totaltime = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_grabformat: + curuser->GrabFormat = tmpmsg.Code; + break; + + case GD_Killed: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_Killed; + else + curuser->Userbits &= ~USERF_Killed; + break; + + case GD_usefse: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_FSE; + else + curuser->Userbits &= ~USERF_FSE; + break; + + case GD_ansimenus: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_ANSIMenus; + else + curuser->Userbits &= ~USERF_ANSIMenus; + break; + + case GD_colormsg: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_ColorMessages; + else + curuser->Userbits &= ~USERF_ColorMessages; + break; + + case GD_g_r: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_G_R; + else + curuser->Userbits &= ~USERF_G_R; + break; + + case GD_reviewown: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_KeepOwnMsgs; + else + curuser->Userbits &= ~USERF_KeepOwnMsgs; + break; + + case GD_ansi: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_ANSI; + else + curuser->Userbits &= ~USERF_ANSI; + break; + + case GD_clearscreen: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_ClearScreen; + else + curuser->Userbits &= ~USERF_ClearScreen; + break; + + case GD_raw: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_RAW; + else + curuser->Userbits &= ~USERF_RAW; + break; + + case GD_filter: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_Filter; + else + curuser->Userbits &= ~USERF_Filter; + break; + + case GD_sendbulletins: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser->Userbits |= USERF_SendBulletins; + else + curuser->Userbits &= ~USERF_SendBulletins; + break; + } + break; + } + } + + return (running); +} + +int setupconflistview (void) +{ + static struct coNode *nodes; + int n; + struct ConferenceRecord *confarray; + + confarray = (struct ConferenceRecord *) + (((int)config) + (SIZEOFCONFIGRECORD)); + + numconfs = config->ActiveConf; + if (!(nodes = AllocVec (numconfs * (sizeof (struct coNode)), MEMF_CLEAR))) + return (0); + + if (conflist) + FreeVec (conflist); + conflist = (struct Node *)nodes; + + NewList (&conflistheader); + + for (n = 0; n < numconfs; n++) + { + nodes[n].node.ln_Name = (char *) &nodes[n].text; + sprintf (nodes[n].text," -%s", confarray[confarray[n].n_ConfOrder-1].n_ConfName); +// config->ConfNames[config->ConfOrder[n]-1]); + AddTail (&conflistheader,&nodes[n].node); + } + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,&conflistheader,TAG_DONE,0); + + return (1); +} + +int setuplistview(void) +{ + static struct ueNode *nodes; + int n, num; + BPTR in; + + num = config->Users; + printf ("num = %ld\n", num); + + if (!(nodes = AllocVec (num * (sizeof (struct ueNode)), MEMF_CLEAR))) + return (0); + + printf ("Inne\n"); + + if (list) + FreeVec (list); + list = (struct Node *)nodes; + NewList (&listheader); + + Forbid(); + + if (in = Open (UserFName, MODE_OLDFILE)) + { + for (n = 0; n < num; n++) + { + nodes[n].node.ln_Name = (char *)&nodes[n].name; + Read (in, curuser, config->UserrecordSize); + strcpy (nodes[n].name, curuser->Name); + AddTail (&listheader, &nodes[n].node); + } + Close (in); + } + Permit(); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_Users_ListView], + ABBSUserEditorWnd,NULL,GTLV_Labels,&listheader,TAG_DONE,0); + + return (1); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport, (struct Message *)msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) + { + if (IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library",37)) + { + if (GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",36L)) + { + if (DiskfontBase = OpenLibrary ("diskfont.library",0L)) + { + if (GadToolsBase = OpenLibrary("gadtools.library",37)) + { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + { + if (!(SetupScreen())) + { + screenok = 1; + if (!(OpenABBSUserEditorWindow())) + { + ABBSUserEditorRender(); + windowok = 1; + ret = 1; + } + else + { + CloseABBSUserEditorWindow(); + printf ("Error opening window\n"); + } + } + else + printf ("No screen\n"); + } + else + printf ("Error creating message port\n"); + } + else + printf ("No gadtools lib\n"); + } + else + printf ("No diskfont lib\n"); + } + else + printf ("No gfx lib\n"); + } + else + printf ("No intuition lib\n"); + } + else + printf ("ABBS must be running for Usereditor to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (windowok) CloseABBSUserEditorWindow(); + if (screenok) CloseDownScreen(); + if (conflist) FreeVec (conflist); + if (list) FreeVec (list); + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); + if (GadToolsBase) CloseLibrary (GadToolsBase); + if (DiskfontBase) CloseLibrary((struct Library *) DiskfontBase); + if (GfxBase) CloseLibrary((struct Library *) GfxBase); + if (IntuitionBase) CloseLibrary ((struct Library *) IntuitionBase); +} diff --git a/JEO/UserEditor.info b/JEO/UserEditor.info new file mode 100644 index 0000000000000000000000000000000000000000..a12346366485e4fb498d43c10e3c629be79ac9f6 GIT binary patch literal 835 zcmZ{hze@sP7{{OM&NCs@97;n(>4ruJqaRB_LtcRd(XLCALsYl~`bsU4gWlBEP@_Zs z2R9XM{Ru~kwB=YJT+fda9qL8>zVGM#@|=F`$3X*H+pq)$SOybx(8A{9JifDhGy9?G zD`DedEgbs#RLJQ)U8OAV3pi;GLhJAP^a|p^p7R^{95W@)l9FzjQ){Xu-D^;;N~T)e zS1-(=(tGA}vg&b~sUUS%&KEof%;SIZPWZyD;=W|Vr!@i&-vh_C@TK6%u?@%0!kg9p zv7BAxu@B)pH^S@KL|*irMeh59bM7~`2Hej?rN4ijVBQ%T%yZ+2%x}q@PFLpVy3)71 z0lyT!S`)rkqd5v@R^WUiFU}{wVbZ}w=k$M(bIP-fqDCV6*chn*KNp=dN9V-JIdO8HhX#us(H9OKoRkh} GWBdXoXt;U+ literal 0 HcmV?d00001 diff --git a/JEO/Usereditorgui.c b/JEO/Usereditorgui.c new file mode 100644 index 0000000..48c2858 --- /dev/null +++ b/JEO/Usereditorgui.c @@ -0,0 +1,426 @@ +/* + * Source machine generated by GadToolsBox V2.0 + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Geir Inge Høsteng + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Usereditorgui.h" + +#include + +static struct Screen *Scr = NULL; +static UBYTE *PubScreenName = NULL; +static APTR VisualInfo = NULL; +struct Window *ABBSUserEditorWnd = NULL; +static struct Gadget *ABBSUserEditorGList = NULL; +struct Menu *ABBSUserEditorMenus = NULL; +struct Gadget *ABBSUserEditorGadgets[44]; +static UWORD ABBSUserEditorLeft = 0; +static UWORD ABBSUserEditorTop = 13; +static UWORD ABBSUserEditorWidth = 558; +static UWORD ABBSUserEditorHeight = 288; +static UBYTE *ABBSUserEditorWdt = (UBYTE *)"ABBS UserEditor"; +static struct TextAttr *Font, Attr; +static UWORD FontX, FontY; +static UWORD OffX, OffY; +static struct TextFont *ABBSUserEditorFont = NULL; + +static UBYTE *protocol0Labels[] = { + (UBYTE *)"(none)", + (UBYTE *)"Zmodem", + (UBYTE *)"Xmodem", + (UBYTE *)"Xmodem-CRC", + (UBYTE *)"Ymodem", + (UBYTE *)"Ymodem-Batch", + (UBYTE *)"Ymodem-G", + NULL }; + +static UBYTE *charset0Labels[] = { + (UBYTE *)"ISO", + (UBYTE *)"IBM", + (UBYTE *)"IBN", + (UBYTE *)"US7", + (UBYTE *)"UK7", + (UBYTE *)"GE7", + (UBYTE *)"FR7", + (UBYTE *)"SF7", + (UBYTE *)"NO7", + (UBYTE *)"DE7", + (UBYTE *)"SP7", + (UBYTE *)"IT7", + NULL }; + +static UBYTE *scratchformat0Labels[] = { + (UBYTE *)"Text", + (UBYTE *)"Arc", + (UBYTE *)"Lzh", + (UBYTE *)"Zip", + (UBYTE *)"Lharc", + (UBYTE *)"Arj", + (UBYTE *)"Zoo", + NULL }; + +static UBYTE *xpertlevel0Labels[] = { + (UBYTE *)"Novice", + (UBYTE *)"Junior", + (UBYTE *)"Expert", + (UBYTE *)"SuperExpert", + NULL }; + +static UBYTE *grabformat0Labels[] = { + (UBYTE *)"MBBS", + (UBYTE *)"QWK", + NULL }; + +static struct Node Users_ListView0Nodes[] = { + ( struct Node * )&Users_ListView0List.mlh_Tail, ( struct Node * )&Users_ListView0List.mlh_Head, 0, 0, "." }; + +struct MinList Users_ListView0List = { + ( struct MinNode * )&Users_ListView0Nodes[0], ( struct MinNode * )NULL, ( struct MinNode * )&Users_ListView0Nodes[0] }; + +static struct Node conference_listview0Nodes[] = { + ( struct Node * )&conference_listview0List.mlh_Tail, ( struct Node * )&conference_listview0List.mlh_Head, 0, 0, "." }; + +struct MinList conference_listview0List = { + ( struct MinNode * )&conference_listview0Nodes[0], ( struct MinNode * )NULL, ( struct MinNode * )&conference_listview0Nodes[0] }; + +static struct NewMenu ABBSUserEditorNewMenu[] = { + NM_TITLE, (STRPTR)"Project", NULL, 0, NULL, NULL, + NM_ITEM, (STRPTR)"About", (STRPTR)"A", 0, 0L, NULL, + NM_ITEM, (STRPTR)"Save user", (STRPTR)"S", 0, 0L, NULL, + NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL, + NM_ITEM, (STRPTR)"Quit", (STRPTR)"Q", 0, 0L, NULL, + NM_END, NULL, NULL, 0, 0L, NULL }; + +static UWORD ABBSUserEditorGTypes[] = { + LISTVIEW_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + CYCLE_KIND, + CYCLE_KIND, + CYCLE_KIND, + CYCLE_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + TEXT_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + MX_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + LISTVIEW_KIND, + INTEGER_KIND, + BUTTON_KIND +}; + +static struct NewGadget ABBSUserEditorNGad[] = { + 273, 15, 265, 145, (UBYTE *)"Users", NULL, GD_Users_ListView, PLACETEXT_ABOVE|NG_HIGHLABEL, NULL, NULL, + 9, 5, 252, 13, NULL, NULL, GD_username, 0, NULL, NULL, + 9, 21, 252, 13, NULL, NULL, GD_address, 0, NULL, NULL, + 9, 37, 252, 13, NULL, NULL, GD_citystate, 0, NULL, NULL, + 155, 53, 77, 13, NULL, NULL, GD_passwd, 0, NULL, NULL, + 9, 53, 140, 13, NULL, NULL, GD_homephone, 0, NULL, NULL, + 9, 69, 140, 13, NULL, NULL, GD_workphone, 0, NULL, NULL, + 9, 85, 36, 13, NULL, NULL, GD_timelimit, 0, NULL, NULL, + 51, 85, 36, 13, NULL, NULL, GD_filelimit, 0, NULL, NULL, + 92, 85, 36, 13, NULL, NULL, GD_pagelength, 0, NULL, NULL, + 136, 85, 122, 13, NULL, NULL, GD_protocol, 0, NULL, NULL, + 155, 69, 71, 13, NULL, NULL, GD_charset, 0, NULL, NULL, + 9, 101, 71, 13, NULL, NULL, GD_scratchformat, 0, NULL, NULL, + 86, 100, 118, 13, NULL, NULL, GD_xpertlevel, 0, NULL, NULL, + 9, 117, 26, 11, (UBYTE *)"Killed", NULL, GD_Killed, PLACETEXT_RIGHT, NULL, NULL, + 9, 129, 26, 11, (UBYTE *)"Use FSE", NULL, GD_usefse, PLACETEXT_RIGHT, NULL, NULL, + 9, 141, 26, 11, (UBYTE *)"ANSI menus", NULL, GD_ansimenus, PLACETEXT_RIGHT, NULL, NULL, + 9, 153, 26, 11, (UBYTE *)"Color msgs", NULL, GD_colormsg, PLACETEXT_RIGHT, NULL, NULL, + 9, 165, 26, 11, (UBYTE *)"G&R", NULL, GD_g_r, PLACETEXT_RIGHT, NULL, NULL, + 9, 177, 26, 11, (UBYTE *)"Review own", NULL, GD_reviewown, PLACETEXT_RIGHT, NULL, NULL, + 9, 189, 26, 11, (UBYTE *)"ANSI", NULL, GD_ansi, PLACETEXT_RIGHT, NULL, NULL, + 9, 201, 26, 11, (UBYTE *)"Clear Scr.", NULL, GD_clearscreen, PLACETEXT_RIGHT, NULL, NULL, + 9, 213, 26, 11, (UBYTE *)"Use Raw", NULL, GD_raw, PLACETEXT_RIGHT, NULL, NULL, + 9, 224, 26, 11, (UBYTE *)"Filter", NULL, GD_filter, PLACETEXT_RIGHT, NULL, NULL, + 9, 235, 26, 11, (UBYTE *)"Send bulletins", NULL, GD_sendbulletins, PLACETEXT_RIGHT, NULL, NULL, + 7, 268, 255, 13, NULL, NULL, GD_lastontext, 0, NULL, NULL, + 134, 117, 68, 13, NULL, NULL, GD_resymemsgnr, 0, NULL, NULL, + 175, 148, 36, 13, NULL, NULL, GD_timeused, 0, NULL, NULL, + 135, 133, 36, 13, NULL, NULL, GD_Gadget280, 0, NULL, NULL, + 12, 248, 17, 9, NULL, NULL, GD_grabformat, PLACETEXT_RIGHT, NULL, NULL, + 134, 148, 36, 13, NULL, NULL, GD_byteratio, 0, NULL, NULL, + 134, 164, 36, 13, NULL, NULL, GD_fileratio, 0, NULL, NULL, + 134, 179, 36, 13, NULL, NULL, GD_uploaded, 0, NULL, NULL, + 134, 194, 36, 13, NULL, NULL, GD_downloaded, 0, NULL, NULL, + 134, 209, 36, 13, NULL, NULL, GD_kbupload, 0, NULL, NULL, + 134, 223, 36, 13, NULL, NULL, GD_kbdownload, 0, NULL, NULL, + 175, 133, 52, 13, NULL, NULL, GD_timeson, 0, NULL, NULL, + 175, 164, 36, 13, NULL, NULL, GD_ftimeused, 0, NULL, NULL, + 175, 179, 52, 13, NULL, NULL, GD_msgread, 0, NULL, NULL, + 175, 194, 52, 13, NULL, NULL, GD_msgdumped, 0, NULL, NULL, + 175, 223, 52, 13, NULL, NULL, GD_totaltime, 0, NULL, NULL, + 275, 168, 265, 121, (UBYTE *)"Conferences", NULL, GD_conference_listview, PLACETEXT_ABOVE|NG_HIGHLABEL, NULL, NULL, + 175, 209, 52, 13, NULL, NULL, GD_msgleft, 0, NULL, NULL, + 137, 247, 103, 14, (UBYTE *)"Save user", NULL, GD_saveuser, PLACETEXT_IN, NULL, NULL +}; + +static ULONG ABBSUserEditorGTags[] = { + (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 8, (TAG_DONE), + (GTST_MaxChars), 16, (TAG_DONE), + (GTST_MaxChars), 16, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTCY_Labels), (ULONG)&protocol0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&charset0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&scratchformat0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&xpertlevel0Labels[ 0 ], (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (GTTX_Border), TRUE, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 8, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTMX_Labels), (ULONG)&grabformat0Labels[ 0 ], (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (TAG_DONE) +}; + +static UWORD ComputeX( UWORD value ) +{ + return(( UWORD )((( FontX * value ) + 4 ) / 8 )); +} + +static UWORD ComputeY( UWORD value ) +{ + return(( UWORD )((( FontY * value ) + 4 ) / 8 )); +} + +static void ComputeFont( UWORD width, UWORD height ) +{ + Forbid(); + Font = &Attr; + Font->ta_Name = (STRPTR)GfxBase->DefaultFont->tf_Message.mn_Node.ln_Name; + Font->ta_YSize = FontY = GfxBase->DefaultFont->tf_YSize; + FontX = GfxBase->DefaultFont->tf_XSize; + Permit(); + + OffX = Scr->WBorLeft; + OffY = Scr->RastPort.TxHeight + Scr->WBorTop + 1; + + if ( width && height ) { + if (( ComputeX( width ) + OffX + Scr->WBorRight ) > Scr->Width ) + goto UseTopaz; + if (( ComputeY( height ) + OffY + Scr->WBorBottom ) > Scr->Height ) + goto UseTopaz; + } + return; + +UseTopaz: + Font->ta_Name = (STRPTR)"topaz.font"; + FontX = FontY = Font->ta_YSize = 8; +} + +int SetupScreen( void ) +{ + if ( ! ( Scr = LockPubScreen( PubScreenName ))) + return( 1L ); + + ComputeFont( 0, 0 ); + + if ( ! ( VisualInfo = GetVisualInfo( Scr, TAG_DONE ))) + return( 2L ); + + return( 0L ); +} + +void CloseDownScreen( void ) +{ + if ( VisualInfo ) { + FreeVisualInfo( VisualInfo ); + VisualInfo = NULL; + } + + if ( Scr ) { + UnlockPubScreen( NULL, Scr ); + Scr = NULL; + } +} + +void ABBSUserEditorRender( void ) +{ + ComputeFont( ABBSUserEditorWidth, ABBSUserEditorHeight ); + + DrawBevelBox( ABBSUserEditorWnd->RPort, OffX + ComputeX( 3 ), + OffY + ComputeY( 2 ), + ComputeX( 264 ), + ComputeY( 284 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); +} + +int OpenABBSUserEditorWindow( void ) +{ + struct NewGadget ng; + struct Gadget *g; + UWORD lc, tc; + UWORD wleft = ABBSUserEditorLeft, wtop = ABBSUserEditorTop, ww, wh; + + ComputeFont( ABBSUserEditorWidth, ABBSUserEditorHeight ); + + ww = ComputeX( ABBSUserEditorWidth ); + wh = ComputeY( ABBSUserEditorHeight ); + + if (( wleft + ww + OffX + Scr->WBorRight ) > Scr->Width ) wleft = Scr->Width - ww; + if (( wtop + wh + OffY + Scr->WBorBottom ) > Scr->Height ) wtop = Scr->Height - wh; + + if ( ! ( ABBSUserEditorFont = OpenDiskFont( Font ))) + return( 5L ); + + if ( ! ( g = CreateContext( &ABBSUserEditorGList ))) + return( 1L ); + + for( lc = 0, tc = 0; lc < ABBSUserEditor_CNT; lc++ ) { + + CopyMem((char * )&ABBSUserEditorNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget )); + + ng.ng_VisualInfo = VisualInfo; + ng.ng_TextAttr = Font; + ng.ng_LeftEdge = OffX + ComputeX( ng.ng_LeftEdge ); + ng.ng_TopEdge = OffY + ComputeY( ng.ng_TopEdge ); + ng.ng_Width = ComputeX( ng.ng_Width ); + ng.ng_Height = ComputeY( ng.ng_Height); + + ABBSUserEditorGadgets[ lc ] = g = CreateGadgetA((ULONG)ABBSUserEditorGTypes[ lc ], g, &ng, ( struct TagItem * )&ABBSUserEditorGTags[ tc ] ); + + while( ABBSUserEditorGTags[ tc ] ) tc += 2; + tc++; + + if ( NOT g ) + return( 2L ); + } + + if ( ! ( ABBSUserEditorMenus = CreateMenus( ABBSUserEditorNewMenu, GTMN_FrontPen, 0L, TAG_DONE ))) + return( 3L ); + + LayoutMenus( ABBSUserEditorMenus, VisualInfo, TAG_DONE ); + + if ( ! ( ABBSUserEditorWnd = OpenWindowTags( NULL, + WA_Left, wleft, + WA_Top, wtop, + WA_Width, ww + OffX + Scr->WBorRight, + WA_Height, wh + OffY + Scr->WBorBottom, + WA_IDCMP, LISTVIEWIDCMP|STRINGIDCMP|INTEGERIDCMP|CYCLEIDCMP|CHECKBOXIDCMP|TEXTIDCMP|MXIDCMP|BUTTONIDCMP|IDCMP_MENUPICK|IDCMP_CLOSEWINDOW|IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_SIZEGADGET|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_ACTIVATE, + WA_Gadgets, ABBSUserEditorGList, + WA_Title, ABBSUserEditorWdt, + WA_ScreenTitle, "WorkBench Screen", + WA_PubScreen, Scr, + WA_MinWidth, 67, + WA_MinHeight, 21, + WA_MaxWidth, 912, + WA_MaxHeight, 600, + TAG_DONE ))) + return( 4L ); + + SetMenuStrip( ABBSUserEditorWnd, ABBSUserEditorMenus ); + GT_RefreshWindow( ABBSUserEditorWnd, NULL ); + + ABBSUserEditorRender(); + + return( 0L ); +} + +void CloseABBSUserEditorWindow( void ) +{ + if ( ABBSUserEditorMenus ) { + ClearMenuStrip( ABBSUserEditorWnd ); + FreeMenus( ABBSUserEditorMenus ); + ABBSUserEditorMenus = NULL; } + + if ( ABBSUserEditorWnd ) { + CloseWindow( ABBSUserEditorWnd ); + ABBSUserEditorWnd = NULL; + } + + if ( ABBSUserEditorGList ) { + FreeGadgets( ABBSUserEditorGList ); + ABBSUserEditorGList = NULL; + } + + if ( ABBSUserEditorFont ) { + CloseFont( ABBSUserEditorFont ); + ABBSUserEditorFont = NULL; + } +} + diff --git a/JEO/Usereditorgui.gui b/JEO/Usereditorgui.gui new file mode 100644 index 0000000000000000000000000000000000000000..9f9bd3a89c7c287e313d2b193b78e29a82039f33 GIT binary patch literal 12702 zcmd^`UyK{Y8Nk0?`?C3SmmV|;ZCa>-<4-9`Q(xM&eTsd5oFjLai=7Y?A;O+Lcjsii zYwfP@auIE#3iTlzQlJR+p%O2sPe>r$3ldQjg{Tex1%yAXq6i@#qL5ZaKpF}({k|Em z&lh{w8^_Z~bWYh>&(3@^zxigq`DS)AxGg;b@RKJ~*_}hF)XpIQH4OkAyDWQOl9{=w zSSDvPW@6e^hf5ehg{6mkK*77Z&?v1g)Biz&YnAi^>nAMJy*9Ag#xFjErI5IS+SSNm zH46%sh~i&e804c2E{vrI2FKD{`Z2>2ktwyKZyVm728eX<6a~~2E7-9ibCSijTy$J! zPKvCdubKNYzf9@*9hPM{No)U)Ll=~kQP3+Z8_*Ao_F<);eUs^t4=qf62<#Oad*Ae4 zxvsuX07S3cy(E?0)xWF1ANxVMKaoskb~?-+$QNA8Zd8hL#DcRlD(0KkcI&?qtJ)md z577NBs#J|BF>WpBM-*02B*H;}Jl$c;FzUj10`vb2V>AQGI*j+K!`iPg-bd0fHnpFg zJdbfnTYl;=#?(W77&{oR#u%+=gwo3>CyVi6Ojj`eJ;fEvv?i5JW|PTnSxj3F8gwa3 zmG67nxa09uHkC*vNE>iQSq*EIW$>7`VJ50={C6DF0D82wFP*0wQUX=nuE6E(87?^P zy#+SoBUQydtk~0q90!-e5^N*(UdVu!cRf@n&p{V-!&lIyZI~65WZS``3@I^mwlemb zsTWD({y~LKT$L^hNVy)9ZmJ}E@nyM!e%27j1o446u2+>x$s*SCd7C*+Mv8pm4TAWg zRh&2?lQ>s!XB}5}1C=bB_$kmX2p|pLC6h z&!Vk<5PC?*zum}*HJLhg3q@uWiUnL&{eudThPImf;%KusU{OBz{6*A1sc85tY^w0a zUvN1upC7U`JW(*NHSdES?~$)K?=tEeS-d5Ek{P(^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wy_DBNBS{@|tkE!&PF{|ifQEzbY| literal 0 HcmV?d00001 diff --git a/JEO/Usereditorgui.h b/JEO/Usereditorgui.h new file mode 100644 index 0000000..d8679d9 --- /dev/null +++ b/JEO/Usereditorgui.h @@ -0,0 +1,115 @@ +/* + * Source machine generated by GadToolsBox V2.0 + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Geir Inge Høsteng + */ + +#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer ) +#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt ) + +#define GD_Users_ListView 0 +#define GD_username 1 +#define GD_address 2 +#define GD_citystate 3 +#define GD_passwd 4 +#define GD_homephone 5 +#define GD_workphone 6 +#define GD_timelimit 7 +#define GD_filelimit 8 +#define GD_pagelength 9 +#define GD_protocol 10 +#define GD_charset 11 +#define GD_scratchformat 12 +#define GD_xpertlevel 13 +#define GD_Killed 14 +#define GD_usefse 15 +#define GD_ansimenus 16 +#define GD_colormsg 17 +#define GD_g_r 18 +#define GD_reviewown 19 +#define GD_ansi 20 +#define GD_clearscreen 21 +#define GD_raw 22 +#define GD_filter 23 +#define GD_sendbulletins 24 +#define GD_lastontext 25 +#define GD_resymemsgnr 26 +#define GD_timeused 27 +#define GD_Gadget280 28 +#define GD_grabformat 29 +#define GD_byteratio 30 +#define GD_fileratio 31 +#define GD_uploaded 32 +#define GD_downloaded 33 +#define GD_kbupload 34 +#define GD_kbdownload 35 +#define GD_timeson 36 +#define GD_ftimeused 37 +#define GD_msgread 38 +#define GD_msgdumped 39 +#define GD_totaltime 40 +#define GD_conference_listview 41 +#define GD_msgleft 42 +#define GD_saveuser 43 + +#define GDX_Users_ListView 0 +#define GDX_username 1 +#define GDX_address 2 +#define GDX_citystate 3 +#define GDX_passwd 4 +#define GDX_homephone 5 +#define GDX_workphone 6 +#define GDX_timelimit 7 +#define GDX_filelimit 8 +#define GDX_pagelength 9 +#define GDX_protocol 10 +#define GDX_charset 11 +#define GDX_scratchformat 12 +#define GDX_xpertlevel 13 +#define GDX_Killed 14 +#define GDX_usefse 15 +#define GDX_ansimenus 16 +#define GDX_colormsg 17 +#define GDX_g_r 18 +#define GDX_reviewown 19 +#define GDX_ansi 20 +#define GDX_clearscreen 21 +#define GDX_raw 22 +#define GDX_filter 23 +#define GDX_sendbulletins 24 +#define GDX_lastontext 25 +#define GDX_resymemsgnr 26 +#define GDX_timeused 27 +#define GDX_Gadget280 28 +#define GDX_grabformat 29 +#define GDX_byteratio 30 +#define GDX_fileratio 31 +#define GDX_uploaded 32 +#define GDX_downloaded 33 +#define GDX_kbupload 34 +#define GDX_kbdownload 35 +#define GDX_timeson 36 +#define GDX_ftimeused 37 +#define GDX_msgread 38 +#define GDX_msgdumped 39 +#define GDX_totaltime 40 +#define GDX_conference_listview 41 +#define GDX_msgleft 42 +#define GDX_saveuser 43 + +#define ABBSUserEditor_CNT 44 + +extern struct IntuitionBase *IntuitionBase; +extern struct Library *GadToolsBase; + +extern struct GfxBase *GfxBase; +extern struct MinList Users_ListView0List; +extern struct MinList conference_listview0List; + + +extern int SetupScreen( void ); +extern void CloseDownScreen( void ); +extern void ABBSUserEditorRender( void ); +extern int OpenABBSUserEditorWindow( void ); +extern void CloseABBSUserEditorWindow( void ); diff --git a/JEO/ZapFile.c b/JEO/ZapFile.c new file mode 100644 index 0000000..a577554 --- /dev/null +++ b/JEO/ZapFile.c @@ -0,0 +1,206 @@ +;/* +sc5 -j73 -v -O ZapFile +slink LIB:c.o+"ZapFile.o" to ZapFile LIB LIB:sc.lib LIB:JEO.lib +Copy ZapFile ABBS:Utils +Delete ZapFile.o ZapFile QUIET +quit +*/ + +#include +#include +#include +#include +#include + +struct Library *UtilityBase = NULL; + +struct ConfigRecord *config; +struct ABBSmsg msg; +struct MsgPort *rport = NULL; + +struct Fileentry fentry; + +int filedir_number = 0, file_order = 0; + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport, (struct Message *)msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +BOOL Load_fentry (VOID) +{ + int err; + + msg.Command = Main_loadfileentry; + msg.UserNr = filedir_number; + msg.arg = file_order; + msg.Data = (ULONG)&fentry; + err = HandleMsg (&msg); + + if (err == Error_OK) + return (TRUE); + + return (FALSE); +} + +VOID Do_slash (UBYTE *Navn) +{ + ULONG len; + + len = strlen (Navn); + + if (Navn[len-1] == ':' OR Navn[len-1] == '/') + return; + else + { + Navn[len] = '/'; + Navn[len+1] = 0; + } +} + +char Diskname[108]; + +BOOL FindFile (UBYTE *Name) +{ + UWORD r, n; + int err; + ULONG matchbuffer[1024/4]; + struct Fileentry fl; + + for (n = 0; n < config->MaxfileDirs; n++) + { + if (*(config->firstFileDirRecord[n].n_DirName)) // Finnes filedirret? + { + r = config->firstFileDirRecord[n].n_FileOrder - 1; + msg.Command = Main_findfile; + msg.Name = Name; + msg.arg = (ULONG)matchbuffer; // am_Arg4 + matchbuffer[2] = 0; + msg.UserNr = r; // am_Arg3 + msg.Data = (ULONG)&fl; + err = HandleMsg (&msg); + if (err == Error_OK) // Fila funnet? + { + filedir_number = n; + file_order = msg.UserNr; + if (Load_fentry ()) + { + strcpy (Diskname, config->firstFileDirRecord[n].n_DirPaths); + Do_slash (Diskname); + strcat (Diskname, fentry.Filename); + return (TRUE); + } + } + } + } + return (FALSE); +} + +VOID CleanUp (VOID) +{ + if (UtilityBase) + CloseLibrary (UtilityBase); + + if (msg.msg.mn_ReplyPort) + DeleteMsgPort(msg.msg.mn_ReplyPort); + + exit (0); +} + +VOID SetUp (void) +{ + BOOL ret = FALSE; + + if (FindPort (MainPortName)) + { + if (UtilityBase = OpenLibrary ("utility.library", 36)) + { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + { + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) + printf ("Error talking to ABBS\n"); + else + { + config = (struct ConfigRecord *)msg.Data; + ret = TRUE; + } + } + else + printf ("Error creating message port\n"); + } + else + printf ("Error opening utility.library\n"); + } + else + printf ("ABBS must be running for ZapFile to work\n"); + + if (!ret) + CleanUp(); +} + +BOOL DeleteFileEntry (VOID) +{ + int err; + BOOL ret = FALSE; + + fentry.Filestatus |= FILESTATUSF_Fileremoved; + + msg.Command = Main_savefileentry; + msg.UserNr = filedir_number; + msg.arg = file_order; + msg.Data = (ULONG)&fentry; + err = HandleMsg (&msg); + if (err == Error_OK) + { + DeleteFile (Diskname); + ret = TRUE; + } + else + printf ("Error deleting '%s'", fentry.Filename); + + return (ret); +} + +main (int argc, char **argv) +{ + if (argc != 2) + { + printf ("\n Usage: ZapFile \n\n"); + exit (0); + } + + SetUp (); + + if (FindFile (argv[1])) + { + if (DeleteFileEntry ()) + printf ("\n File deleted (%s)\n\n", fentry.Filename); + } + else + printf ("\n File not found!\n\n"); + + CleanUp (); +} diff --git a/JEO/ZapFile.info b/JEO/ZapFile.info new file mode 100644 index 0000000000000000000000000000000000000000..910a27643536617f7093369c933a11d96db90c97 GIT binary patch literal 835 zcmZ{hze@sP7{{OM^h_uFc53WhNAKUKMhB&sHhJ`#ers0R6b5&#oZm?>WDL&rw6NmXLJHoLWmI=w5?zRWjM; zzIta4mHr!_6IGYfNcyQea=zv{V4VGvPr{cT7562Z9<4EOcrMtMi7y2&wiU3g41AiM zAJZ-%kA4Z?dl25hCi0?ZuW;WRUU9#l(z&tw%%lx*?>GouPwkLh7 z=kpuk8+GCPb(*7KZu!nn#^QYX8>SshbWZ;lIj5|pC7nA?tu>H@3qMnGuRbIzeFrxR z$T_8vRFeEaJfm~w=={$_=fuhNd=j0m7{u9m2TXRJ1B;!XB9FSbM^4U(H&UjJyy!g( z_gvx4ZRS=w66QWRr+#-NJUfxTh0d9ybDB@i`MKzvIXWj!&WV%r95h+%n7(lE@Vs reserved for private (experimental) use +3/15 ? reserved for private (experimental) use +3/1 3/0 10 HEM horizontal editing mode +3/1 3/1 11 PUM positioning unit mode +3/1 3/2 12 SRM send/receive mode +3/1 3/3 13 FEAM format effector action mode +3/1 3/4 14 FETM format effector transfer mode +3/1 3/5 15 MATM multiple area transfer mode +3/1 3/6 16 TTM transfer termination mode +3/1 3/7 17 SATM selected area transfer mode +3/1 3/8 18 TSM tabulation stop mode +3/1 3/9 19 EBM editing boundary mode +3/1 3/10 1: reserved separator for parameters +3/1 3/11 1; Standard separator for parameters +3/1 3/12 1< error condition--unspecified recovery +3/1 3/13 1= error condition--unspecified recovery +3/1 3/14 1> error condition--unspecified recovery +3/1 3/15 1? error condition--unspecified recovery +3/2 3/0 20 LNM linefeed/newline mode (not in ISO 6429) +3/2 3/1 21 + . . + . . reserved for future standardization + . . +3/9 3/9 99 + +3/12 3/0 <0 + . . + . . reserved for private (experimental) use + . . +3/15 3/15 ?? + +v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v +^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^ + +NOTES ON THE DEC VT100 IMPLEMENTATION + +In the case of the popular DEC VT100 video-terminal implementation, +the only mode that may be altered is the linefeed/newline (LNM) mode. +Other modes are considered permanently set, reset, or not applicable +as follows: + + Set: ERM + Reset: CRM, EBM, FEAM, FETM, IRM, KAM, PUM, SRTM, TSM + N/A: GATM, HEM, MATM, SATM, TTM, VEM + +Control sequences implemented in the VT100 are as follows: + + CPR, CUB, CUD, CUF, CUP, CUU, DA, DSR, ED, EL, HTS, HVP, IND, + LNM, NEL, RI, RIS, RM, SGR, SM, TBC + +plus several private DEC commands. + +Erasing parts of the display (EL and ED) in the VT100 is performed thus: + + Erase from cursor to end of line Esc [ 0 K or Esc [ K + Erase from beginning of line to cursor Esc [ 1 K + Erase line containing cursor Esc [ 2 K + Erase from cursor to end of screen Esc [ 0 J or Esc [ J + Erase from beginning of screen to cursor Esc [ 1 J + Erase entire screen Esc [ 2 J + +The VT100 responds to receiving the DA (Device Attributes) control + + Esc [ c (or Esc [ 0 c) + +by transmitting the sequence + + Esc [ ? l ; Ps c + +where Ps is a character that describes installed options. + +The VT100's cursor location can be read with the DSR (Device Status +Report) control + + Esc [ 6 n + +The VT100 reports by transmitting the CPR sequence + + Esc [ Pl ; Pc R + +where Pl is the line number and Pc is the column number (in decimal). + +v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v +^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^ + +The complete document describing the standard, "ANSI X3.64-1979: +Additional Controls for Use with the American National Standard +Code for Information Interchange," can be ordered for $13.50 (plus +$4 postage) from + + Standards Sales Department + American National Standards Institute + 1430 Broadway + New York, NY 10018 + 212/354-3300 + +It's best to read the full standard before using it. It also helps +to have copies of the related standards "X3.4-1977: American +National Standard Code for Information Interchange" (the ASCII +standard) and "X3.41.1974: Code-Extension Techniques for Use with +the 7-Bit Coded Character Set of American National Standard for +Information Interchange." + +See also the chapter "Using Extended Screens and Keyboard Control" +in the IBM PC-DOS manuals (versions 2.0, 2.1, and 3.0), especially +for the coding for character attributes. + +The specification for the DEC VT100 is document EK-VT100-UG-003, +available for $13.00 prepaid from: + + Digital Equipment Corporation + Accessories and Supplies Group + POB CS-2008 + Nashua, NH 03061 + +(Copyright 1984 BYTE Publications, subsidiary of McGraw-Hill Inc.) +(Permission granted to reproduce for noncommercial uses.) +(This file prepared by Richard S. Shuford.) + diff --git a/JEO/b b/JEO/b new file mode 100644 index 0000000000000000000000000000000000000000..a90410dd4ae401d995b8241cc6d95c1433d632e1 GI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+D557GF6{Yj2-jK#J4(qQ4c1T+`( zvEbdO6<{7-73Z-bvu$3_7dHC@`7`@5Une}DeFo>AB7DGpgfDms2nXy({DOz~Gn=*l z_ZQ@S+lxHYntyVv6j}4O$-`kIT6ymf#2YZoseRiz-p*h&xSPl_JKRXte z%6L8pgZC&rk&eFJOyse2=82t=uXgN$&JjJ9=~;JgG=l$CbNMD@#h2l$2DLm6a_)jYllv^NLdyv93S=h@*eL|Nqu&+XHl& xKf-mC_fdX?avWs@K!#F{;zQv!!Et32E`QD`beZ!icA+_e@(q+W!0|Y){V$q}N9h0n literal 0 HcmV?d00001 diff --git a/JEO/t.c b/JEO/t.c new file mode 100644 index 0000000..1df12be --- /dev/null +++ b/JEO/t.c @@ -0,0 +1,33 @@ +#include +#include +#include +#include + +//void Amiga2Date( unsigned long seconds, struct ClockData *result ); +//ULONG Date2Amiga( struct ClockData *date ); + +struct ClockData *cd = 0; + +main () +{ + ULONG t = 8034; + + cd = AllocMem (sizeof (struct ClockData), MEMF_CLEAR); + + cd->sec = 0; + cd->min = 0; + cd->hour = 0; + cd->mday = 5; + cd->month = 1; + cd->year = 2000; + + t = Date2Amiga (cd); + printf ("t = %ld\n\n", t); + + Amiga2Date (4294967295, cd); + + printf ("%02ld:%02ld:%02ld\n", cd->hour, cd->min, cd->sec); + printf ("%02ld %02ld %02ld %02ld\n", cd->mday, cd->month, cd->year, cd->wday); + + FreeMem (cd, sizeof (struct ClockData)); +} diff --git a/JEO/t.info b/JEO/t.info new file mode 100644 index 0000000000000000000000000000000000000000..a754dd8d6e77d1148b55af6d241aab257da8506c GIT binary patch literal 835 zcmZ{hze@sP7{{MWI}}3Ap)^E1Ji^hzp;`(W@(Lt~c3qkrq{1ceUa6tTL2qhoXlQUq z>JPZ7=)X8poE-~<>-lk_L%pcq_x-$Ip3{%R1ZY5O2iBkj>!3pjv`F57NPaWNH;W%y zXd?oJM|?jkoU{bmYaukhf<&nV&WX1&rh~lfKM40d z;r14DD;tY)pPW;_Hx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&9oDVs~x vDpeEz{xxbg7yqx-hATuB{Euz-GkA?x9gAMtrO#9MtJIRSyxX^FYq +#include + +VOID Multi_create_dir (char *Dir) +{ + int i; + BPTR lock; + char Dir[] = "RAM:Test/JEO/Ellinor"; + + for (i = 0; Dir[i] != 0; i++) + { + if (Dir[i] == '/') + { + Dir[i] = 0; + lock = CreateDir (Dir); + if (lock) + UnLock (lock); + Dir[i] = '/'; + } + } + lock = CreateDir (Dir); + if (lock) + UnLock (lock); +} diff --git a/JEO/tt.info b/JEO/tt.info new file mode 100644 index 0000000000000000000000000000000000000000..97b18bb27ca6fce44e974b650bb69b82de1e8e3f GIT binary patch literal 835 zcmZ{hze@sP7{{OM>_jj%htd#HxauII;z4)vmb-}m!=c}_p}W1s=84OoIaEQ0|$Xu*Y}LNNB0%lj}wKQ-qTgg@IH@|=0LxA(x+Dt^Y@(Jz~`tTSxrbfB~GoW5_GRYsUn$d zabG<%hjQ~I4NGeHwAfC}Vb9DY^qI2TpdNzqpRt)0oybUHh&w<6x_mM|k+#@IF#Oo>3Mqcpl zg?p~>#u{@g9SL!toKwFu6rLSR-$Lii(K*d0=looB&K#W+C+Eb;c@7#Zc0^xze)q7r HN1MPeyFj^U literal 0 HcmV?d00001 diff --git a/Main.asm b/Main.asm new file mode 100644 index 0000000..c423fc4 --- /dev/null +++ b/Main.asm @@ -0,0 +1,5810 @@ +****************************************************************************** +****** ****** +****** ABBS - Amiga Bulletin Board System ****** +****** Written By Geir Inge Høsteng ****** +****** ****** +****************************************************************************** + +******************************************************************************* +* * +* * * * * * * * * * * * * Kode for Master task * * * * * * * * * * * * * * * * +* * +******************************************************************************* + + ***************************************************************** + * + * NAME + * Main.asm + * + * DESCRIPTION + * Source for the ABBS main task + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: main.asm 1.2 1995/07/08 12:01:33 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: main.asm $ +;; Revision 1.2 1995/07/08 12:01:33 geirhos +;; removed unused code. small cleanup +;; +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + NOLIST + include 'first.i' + + include 'exec/types.i' + include 'exec/lists.i' + include 'exec/ports.i' + include 'exec/lists.i' + include 'exec/io.i' + include 'exec/memory.i' + include 'exec/tasks.i' + include 'exec/libraries.i' + include 'exec/execbase.i' + include 'dos/dos.i' + include 'dos/dostags.i' + include 'dos/dosextens.i' + include 'utility/tagitem.i' + include 'rexx/storage.i' + include 'intuition/intuition.i' + include 'intuition/screens.i' + include 'graphics/gfxbase.i' + include 'workbench/workbench.i' + include 'libraries/commodities.i' + include 'libraries/gadtools.i' + include 'fifo.i' + include 'ABBSmy.i' + + include 'asm.i' + include 'bbs.i' + +; LIST + +CreateMissingFiles EQU 1 + + section kode,code + + XREF comparestringsfull + XREF comparestringsifull + XREF comparestringsicase + XREF CreatePort + XREF DeletePort + XREF Exception + XREF fillinnodenr + XREF getkonfbulletname + XREF memcopylen + XREF memcopyrlen + XREF NewScreenStructure + XREF NewWindowStructure1 + XREF publicportname + XREF nodestart + XREF nstart + XREF parserexxcmd + XREF strcopy + XREF atoi + XREF strcopymaxlen + XREF Environment + XREF upchar + XREF createmenutags + XREF MenuTags + XREF versionstr + XREF strlen + XREF memclr + XREF _AsmDeletePool + XREF _AsmCreatePool + XREF _AsmAllocPooled + XREF _AsmFreePooled + + XDEF exebase + XDEF intbase + XDEF gfxbase + XDEF gadbase + XDEF aslbase + XDEF rexbase + XDEF dosbase + XDEF utibase + XDEF fifobase + XDEF dfobase + XDEF iffbase + XDEF utiname + XDEF mainstack + XDEF copyrighttext + XDEF protokollbaser + XDEF nodelist + XDEF mainscreenadr + XDEF abbsrootname + XDEF mainmemoryblock + XDEF main + XDEF mainmsgport + XDEF pubscreenname + XDEF MainTask + +;exceptionhandler = 1 + +main move.l 4.w,a6 + move.l a7,mainstack + moveq.l #0,d0 + move.l d0,wbmessage ; nullstiller, just in case + move.l ThisTask(a6),a0 + move.l pr_CLI(a0),d0 + bne.b 1$ ; startet fra cli + push a2 ; henter wb startupmessage + move.l a0,a2 +2$ lea pr_MsgPort(a2),a0 + jsrlib WaitPort + lea pr_MsgPort(a2),a0 + jsrlib GetMsg + move.l d0,wbmessage + beq.b 2$ + pop a2 + bra 4$ + +1$ + IFD sdfsdfsdf + moveq.l #0,d0 + move.l #dosname,a1 + IFND _LVOOpenLibrary + XREF _LVOOpenLibrary + ENDIF + jsr _LVOOpenLibrary(a6) + move.l d0,dosbase + beq mainsetuperror + cmp.w #36,LIB_VERSION(a6) ; Kjører vi på noe bedre enn 1.3 ? + bcc.b 5$ ; Jepp. Kjører. + lea need2.0text,a0 + bsr writemainerror + bra mainsetuperror + +5$ push d2/d3/a6 + move.l #readargsstring,d1 + lea mainscreenadr,a0 ; bruker som tmp buffer + move.l a0,d2 + moveq.l #0,d3 + move.l d3,(a0)+ ; clearer + move.l d3,(a0)+ + move.l dosbase,a6 + jsrlib ReadArgs + move.l d0,d1 + bne.b 6$ + jsrlib IoErr + move.l d0,d1 + move.l #abbstext,d2 + jsrlib PrintFault + bra.b 7$ +6$ jsrlib FreeArgs + + push a2 + lea mainscreenadr,a2 +; bruk argumentene.. + move.l (a2)+,d0 + beq.b 8$ + move.l d0,a0 + jsr writemainerror +8$ move.l (a2)+,d0 + beq.b 9$ + move.l d0,a0 + jsr writemainerror +9$ pop a2 + move.l dosbase,a6 + +7$ lea mainscreenadr,a0 ; tmp buffer + moveq.l #0,d0 + move.l d0,(a0)+ ; clearer igjen + move.l d0,(a0)+ + jsrlib GetArgStr + move.l d0,a0 +11$ move.b (a0),d0 ; ødelegger startup parametrene + beq.b 10$ + move.b #0,(a0)+ + bra.b 11$ +10$ pop d2/d3/a6 + ENDC + +4$ bsr mainsetup + beq mainsetuperror ; Branch if error + bsr loadconfigs ; load userdata ++ (needs work) + bpl.b 3$ ; normal sak. + bsr openstatuswindow; ingen config, åpner vinduet så installasjon skal være lettere + bra.b main1 ; Ingen config file, dummy mode +3$ beq loadconfigserror ; ... error + + bsr openfiles ; Åpner filer + beq openfileserror + + bsr gettooltypes + bsr setupappicon + bsr setupcommodity + beq no_appicon + bsr startnodes ; Kick off each node. + beq startnodeserror ; No startup file. + btst #0,configbyte + bne.b main1 ; skal ikke pop'e opp + bsr openstatuswindow + +main1 +1$ tst.w mainshutdown + bne mainexit + move.l mainwait,d0 ; Service requests + jsrlib Wait + move.l d0,-(sp) + and.l mainportsigbit,d0 + beq.b 2$ + bsr mainportinput ; Some node wants a job done. +2$ move.l (sp),d0 + move.l mainscreenadr,d1 + beq.b 3$ ; ingen skjerm oppe, så vi sjekker ikke + and.l mainintsigbit,d0 + beq.b 3$ + bsr intuitioninput ; Intuition message. +3$ move.l (sp),d0 + move.b statusopen,d1 + beq.b 4$ ; ikke noe status vindu oppe, gi f.. + and.l maingadtosigbit,d0 + beq.b 4$ + bsr gadtoolsinput ; Gadtools message. + tst.b closestatuswind + beq.b 4$ + move.b #0,closestatuswind + move.b statusopen,d0 + beq.b 4$ + bsr closestatuswindow +4$ move.l (sp),d0 + and.l #SIGBREAKF_CTRL_C,d0 + beq.b 6$ + move.b statusopen,d0 + bne.b 41$ + bsr openstatuswindow + bra.b 6$ +41$ bsr closestatuswindow +6$ move.l (sp),d0 + and.l #SIGBREAKF_CTRL_E,d0 + beq.b 5$ + bsr updatenodelist +5$ move.l (sp),d0 + and.l maincommisigbit,d0 + beq.b 7$ + bsr handlecommodity +7$ move.l (sp)+,d0 + and.l wbportsigbit,d0 + beq 1$ + bsr wbinput ; WorkBench message. + bra 1$ + +mainexit + bsr shutdownnodes ; free resources used for nodes. + tst.w lesconfigstatus + beq.b 1$ + bsr main_saveconfig ; Saves config (needs work) +1$ +startnodeserror + bsr clearcommodity + bsr clearappicon +no_appicon + bsr closefiles +openfileserror +loadconfigserror + bsr mainclosedown ; close screen,window ++ +mainsetuperror + move.l wbmessage,d0 + beq.b 1$ + jsrlib Forbid ; reply the wb message + move.l wbmessage,a1 + jsrlib ReplyMsg +1$ moveq #0,d0 ; We don't need a return code, do we ? + rts + +; reads startupfile, and kick's off all nodes in there. +; returns z=1 for error, or Z=0 for no error +startnodes + push d2-d5/a2/a6 + link.w a3,#-128 + move.w #0,Nodes(MainBase) ; Zero nodes active + move.l dosbase,a6 ; open startup file for read. + move.l #startupfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 8$ ; error : No startup file + +3$ move.l d4,d1 ; leser et tegn + move.l sp,d2 + moveq.l #127,d3 + jsrlib FGets + tst.l d0 ; null ? + beq.b 2$ ; Ja <=> EOF,error + moveq.l #0,d5 ; ingen tegn + + move.l sp,a0 +1$ move.b (a0)+,d0 + cmp.b #10,d0 ; NewLine ? + beq.b 4$ ; Jepp. + cmp.b #' ',d0 ; Space ? + beq.b 4$ ; Jepp. + cmp.b #9,d0 ; TAB ? + beq.b 4$ ; Jepp. + cmp.b #';',d0 ; Semi kolon ? + beq.b 4$ ; Jepp + addq.l #1,d5 ; tegnpos ++ + bra.b 1$ + +4$ tst.l d5 ; Tegnet var NL, eller komentar ferdig + beq.b 3$ ; strlen = 0 -> no name. + move.b #0,(-1,a0) ; markerer str slutt + move.l sp,a0 ; navn i a0 + bsr kickoffnode ; starter node +; beq.b 3$ ; error, prøver neste + bra.b 3$ + +2$ move.l d4,d1 + jsrlib Close + jsrlib IoErr + tst.l d0 + notz + bne.b 9$ + lea (errstartfiltext),a0 + bra.b 81$ +8$ lea nostartfiletext,a0 +81$ bsr writemainerror + setz +9$ unlk a3 + pop d2-d5/a2/a6 + rts + +; d0 = nodenr +; a0 = string å legge navnet i (160 lang) +getnodeconfigfile + push d2-d6/a6/a2 + move.l a0,a2 + move.l d0,d6 + move.l dosbase,a6 ; open startup file for read. + move.l #startupfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 9$ ; error : No startup file + +3$ move.l d4,d1 ; leser en string + move.l a2,d2 + moveq.l #127,d3 + jsrlib FGets + tst.l d0 ; null ? + beq.b 2$ ; Ja <=> EOF,error + moveq.l #0,d5 ; ingen tegn + + move.l a2,a0 +1$ move.b (a0)+,d0 + cmp.b #10,d0 ; NewLine ? + beq.b 4$ ; Jepp. + cmp.b #' ',d0 ; Space ? + beq.b 4$ ; Jepp. + cmp.b #9,d0 ; TAB ? + beq.b 4$ ; Jepp. + cmp.b #';',d0 ; Semi kolon ? + beq.b 4$ ; Jepp + addq.l #1,d5 ; tegnpos ++ + bra.b 1$ + +4$ tst.l d5 ; Tegnet var NL, eller komentar ferdig + beq.b 3$ ; strlen = 0 -> no name. + move.b #0,(-1,a0) ; markerer str slutt + sub.w #1,d6 ; teller ned + bne.b 3$ ; Vi er ikke ferdig enda, tar neste + move.l d4,d1 + jsrlib Close + clrz + bra.b 9$ + +2$ move.l d4,d1 + jsrlib Close + setz +9$ pop d2-d6/a6/a2 + rts + +; navn på config fila til noden +kickoffnode + push d2-d5/a2/a6 + move.l exebase,a6 + move.l a0,a2 + move.w (MaxLinesMessage+CStr,MainBase),d0 + mulu #LinesSize,d0 + add.l #Nodenode_SIZEOF,d0 + move.l d0,d2 ; husker size'n + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,d5 + beq 1$ + addq.w #1,Nodes(MainBase) + move.l d0,a0 + move.l d2,Nodenode_alloc(a0) ; husker size'n + move.l a2,Nodeusernr(a0) ; Midlertidig lagersted + move.w Nodes(MainBase),Nodenr(a0) + + jsrlib Forbid ; legger inn noden i lista + move.l a0,a1 + lea nodelist,a0 + ADDTAIL + jsrlib Permit + + lea CreateNewProcTags,a0 + move.l #nstart,4(a0) ; slenger inn startkode + move.l a2,12(a0) ; slenger inn navnet + move.l a0,d1 + move.l dosbase,a6 + jsrlib CreateNewProc +; bra.b 5$ + +;6$ sub.l a1,a1 ; arver prioritet +; jsrlib FindTask +; move.l d0,a0 +; moveq.l #0,d2 +; move.b (pr_Task+TC_Struct+LN_PRI,a0),d2 +; move.l a2,d1 ; name +; move.l #nodestart,d3 +; lsr.l #2,d3 +; move.l #4*4096,d4 ; stack størrelse +; move.l dosbase,a6 +; jsrlib CreateProc + +5$ tst.l d0 ; gikk det bra ? + bne.b 1$ ; ja + move.l d5,a1 ; fjerner fra lista + lea nodelist,a0 + REMOVE + move.l d5,a1 ; frigir minne + move.l Nodenode_alloc(a1),d0 + move.l exebase,a6 + jsrlib FreeMem + subq.w #1,Nodes(MainBase) + moveq.l #0,d5 +1$ move.l d5,d0 + pop d2-d5/a2/a6 + rts +; fjern currentdir saken (default med createnewproc) + +shutdownnodes + push a2/d2 + move.l nodelist+LH_HEAD,a2 +1$ move.l (LN_SUCC,a2),d2 ; henter neste + beq.b 9$ + move.l a2,a1 ; fjerner fra lista + REMOVE + move.l a2,a1 + move.l (Nodenode_alloc,a1),d0 + beq.b 2$ + jsrlib FreeMem +2$ move.l d2,a2 + bra.b 1$ +9$ pop a2/d2 + rts + +intuitioninput + push d2/d3 +intuitioninput1 + move.l mainintuiport,a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l d0,a1 + move.l im_Class(a1),d0 + cmp.l #MENUPICK,d0 + bne 8$ + move.w im_Code(a1),d2 ; husker item + move.w d2,d0 + cmp.w #MENUNULL,d0 + beq 8$ + move.w d0,d1 + and.w #$1f,d0 ;menunum + asr.w #5,d1 +; move.w d1,d2 + and.w #$3f,d1 ;itemnum +; asr.w #6,d2 +; and.w #$1f,d2 ;subnum + + push d0/d1 + jsrlib ReplyMsg + pop d0/d1 + + tst.w d0 + bne.b 2$ + tst.w d1 + bne.b 9$ + + move.w MainBits(MainBase),d0 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d0 + bne.b 3$ ; ja, nekte + tst.w Nodes(MainBase) + beq.b 1$ +3$ move.l intbase,a6 + move.l mainscreenadr,a0 + jsrlib DisplayBeep + move.l exebase,a6 + bra.b 9$ +1$ move.w #1,mainshutdown + bra.b 9$ + +2$ cmp.w #1,d0 ; sysop available ? + bne.b 9$ + tst.w d1 + bne.b 9$ + move.l intbase,a6 + move.l (mainmenustruct),a0 + move.w d2,d0 + jsrlib ItemAddress + move.l (exebase),a6 + move.l d0,a0 + move.w MainBits(MainBase),d0 + and.w #~MainBitsF_SysopNotAvail,d0 + move.w mi_Flags(a0),d1 + and.w #CHECKED,d1 + beq.b 21$ + or.w #MainBitsF_SysopNotAvail,d0 +21$ move.w d0,MainBits(MainBase) + bra.b 9$ + +8$ jsrlib ReplyMsg + bra intuitioninput1 +9$ pop d2/d3 + rts + +mainportinput + push a2 +0$ move.l mainmsgport,a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l d0,a2 + move.l d0,a0 + XREF CheckRexxMsg + jsr CheckRexxMsg ; arexx melding ?? + tst.l d0 + beq.b 1$ ; nope, vanelig + move.l ARG0(a2),a0 ; kommandoen + bsr domainarexxcmd + moveq.l #0,d1 + move.l d1,rm_Result2(a2) + move.l d0,rm_Result1(a2) ; setter RC + bne.b 8$ ; error + move.l a0,d0 ; har vi en streng ? + beq.b 8$ ; nope + move.l ACTION(a2),d0 ; vil han ha en string ? + btst #RXFB_RESULT,d0 + beq.b 8$ ; nope + move.l rm_LibBase(a2),d0 ; henter libbase + beq.b 8$ ; har ingen! + move.l d0,a6 + + move.l a0,a1 ; strlen + move.l a0,d0 +3$ tst.b (a1)+ + bne.b 3$ + subq.l #1,a1 + sub.l d0,a1 + move.l a1,d0 + jsrlib CreateArgstring + move.l a2,a1 + move.l d0,rm_Result2(a1) + move.l exebase,a6 + bra.b 8$ + +1$ move.l a2,a0 + lea msgportjumps,a1 + move.w m_Command(a0),d0 + cmp.w #Main_LASTCOMM,d0 ; lovlig kommando ? + bcc.b 2$ ; nei + asl.w #2,d0 + move.l 0(a1,d0.w),a1 + jsr (a1) + bra.b 8$ +2$ move.w #Error_IllegalCMD,m_Error(a2) +8$ move.l a2,a1 + tst.l MN_REPLYPORT(a1) + beq 0$ + jsrlib ReplyMsg + bra 0$ ; Ta alle meldinger. +9$ pop a2 + rts + +wbinput push a2 +0$ move.l wbmsgport,a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l d0,a2 + move.l d0,a0 + move.w (am_Type,a0),d0 + cmp.w #MTYPE_APPICON,d0 + bne.b 8$ ; ukjennt sak + move.b statusopen,d0 + bne.b 1$ + bsr openstatuswindow + bra.b 8$ +1$ bsr closestatuswindow + +8$ move.l a2,a1 + tst.l MN_REPLYPORT(a1) + beq 0$ + jsrlib ReplyMsg + bra 0$ ; Ta alle meldinger. +9$ pop a2 + rts + +gadtoolsinput + push a2/a6 + move.l gadbase,a6 +0$ move.l maingadtoolport,a0 + jsrlib GT_GetIMsg + tst.l d0 + beq 9$ + move.l d0,a2 + move.l im_Class(a2),d0 + cmp.l #IDCMP_CLOSEWINDOW,d0 + bne.b 1$ + move.l a2,a1 + jsrlib GT_ReplyIMsg + bsr closestatuswindow + bra.b 9$ +1$ cmp.l #IDCMP_NEWSIZE,d0 + beq.b 5$ + cmp.l #IDCMP_SIZEVERIFY,d0 + bne.b 2$ +5$ jsr ABBSAppWindowRender + bra.b 8$ + +2$ cmp.l #IDCMP_GADGETUP,d0 + bne.b 3$ + move.l (im_IAddress,a2),a0 + move.w (gg_GadgetID,a0),d0 + move.w (im_Code,a2),d1 + move.l a2,a0 + bsr handlestatusgadget + bra.b 8$ +3$ cmp.l #IDCMP_MENUPICK,d0 + bne.b 4$ + move.w (im_Code,a2),d0 + cmpi.w #MENUNULL,d0 + beq.b 8$ + bsr handlegadmenu + bra.b 8$ +4$ cmp.l #IDCMP_VANILLAKEY,d0 + bne.b 8$ +; move.w (ie_Qualifier,a2),d0 Tar alle qualifiere + move.w (im_Code,a2),d0 + bsr handlevanillakey +8$ move.l a2,a1 + jsrlib GT_ReplyIMsg + bra 0$ +9$ pop a2/a6 + rts + +updatenodelist + push a2/a3/a6 + move.b statusopen,d0 + beq.b 9$ + move.l gadbase,a6 + move.l ABBSAppWindowGadgets,a0 + move.l ABBSAppWindowWnd,a1 + suba.l a2,a2 + lea (updatenodelisttags),a3 + jsrlib GT_SetGadgetAttrsA +9$ pop a2/a3/a6 + rts + +handlevanillakey + push d2 + bsr upchar + lea chartogadget,a0 + moveq.l #0,d2 +1$ move.b (a0)+,d1 + beq.b 9$ ; ferdig, ukjennt tegn + addq.l #1,d2 + cmp.b d0,d1 + bne.b 1$ + move.l d2,d0 + bsr handlestatusgadget +9$ pop d2 + rts + +; d0 = menucode +handlegadmenu + push d2 +0$ move.l d0,d2 ; husker menukode + move.l d0,d1 + lsr.l #5,d1 + andi.w #$3f,d1 ; finner item nummeret + andi.w #$1f,d0 ; finner menu nummeret + bne.b 2$ ; ikke menu 0 + move.w d1,d0 + bne.b 11$ ; ikke item 0 +; Item (0,0) - about + bra.b 8$ + +11$ cmp.w #2,d0 + bne.b 12$ + move.b #1,closestatuswind ; Item (0,2) - Iconify + bra.b 8$ + +12$ cmp.w #4,d0 + bne.b 8$ + move.l (exebase),a6 + bsr shutdownall + move.w MainBits(MainBase),d0 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d0 + bne.b 7$ ; ja, nekte + move.w Nodes(MainBase),d1 ; Item (0,4) - Quit + bne.b 7$ ; kan ikke + move.w #1,mainshutdown + bra.b 8$ + +2$ + +7$ move.l (intbase),a6 + suba.l a0,a0 ; nei, blinker vinduet. + jsrlib DisplayBeep +8$ movea.l (intbase),a6 ; Finner neste, hvis det er noen + move.w d2,d0 + movea.l (ABBSAppWindowMenus),a0 + jsrlib ItemAddress + tst.l d0 + beq.b 9$ + movea.l d0,a0 + move.w (mi_NextSelect,a0),d0 + cmp.w #MENUNULL,d0 + bne.b 0$ + +9$ pop d2 + move.l gadbase,a6 + rts + +; d0 = gadgetid +; d1 = Code (bare for listgadget, og cycle gadgeter) +; a0 = intuimessage (bare for listgadget, og cycle gadgeter) +handlestatusgadget + push d2/d3/d4/a6 + move.l intbase,a6 + move.w d1,d4 ; husker code + cmp.w #GD_ListViewGadget,d0 + bne.b 1$ + move.w d1,activenode ; lagrer hvilken node det var + move.l oldclicksecs,d0 ; sjekker om det var double click + move.l oldclickmicros,d1 + move.l (im_Seconds,a0),d2 + move.l (im_Micros,a0),d3 + move.l d2,oldclicksecs + move.l d3,oldclickmicros + jsrlib DoubleClick + tst.l d0 + beq 9$ ; ikke double, ikke vis noden + moveq.l #0,d0 + move.l d0,oldclicksecs ; sletter gamle tider, for å hindre tripple click + move.l d0,oldclickmicros + move.w activenode,d0 + move.w #Node_Show,d2 + bra.b 2$ + +1$ cmp.w #GD_Win_size,d0 + bhi.b 9$ ; for høy + sub.w #1,d0 ; trekker ifra for listview'n + ext.l d0 + + add.l d0,d0 + lea (gadgetcmdtable),a0 + moveq.l #0,d2 + move.w (a0,d0.w),d2 ; husker i d2 + bmi.b 3$ ; negative skal sendes som meldinger + subq.l #1,d2 + lsl.l #2,d2 + lea (gadgetjmptable),a0 + add.l d2,a0 + move.l (a0),a0 + move.l d4,d0 ; gir code videre + move.l (exebase),a6 + jsr (a0) + beq.b 8$ + bra.b 9$ +3$ move.w activenode,d0 ; har vi en valgt ? + cmp.w #-1,d0 + bne.b 2$ ; jepp + suba.l a0,a0 ; nei, blinker vinduet. + jsrlib DisplayBeep + bra.b 9$ + +2$ add.w #1,d0 ; har nodenummer i d0 nå + move.l exebase,a6 + move.w d2,d1 + bsr sendmsgtonodeasync + bne.b 9$ ; alt ok + cmp.w #Node_Show,d2 ; Fant ikke noden (trolig nede) + bne.b 8$ ; blink hvis det ikke var show + bsr main_opennode ; da prøver vi å åpne noden + bne.b 9$ ; blinker ikke hvis det gikk bra. +8$ move.l intbase,a6 + suba.l a0,a0 ; nei, blinker vinduet. + jsrlib DisplayBeep +9$ pop d2/d3/d4/a6 + rts + +; d0: code +; returner z = 1 for displaybeep +main_winsize + move.l ABBSAppWindowWnd,a0 + move.w (wd_Height,a0),d1 + neg.w d1 + tst.w d0 + bne.b 1$ ; 1 = Show + add.w statuswinheight,d1 + sub.w #28,d1 + bra.b 2$ +1$ add.w statuswinheight,d1 +2$ move.l (intbase),a6 + moveq.l #0,d0 + jsrlib SizeWindow +9$ move.l (exebase),a6 + clrz + rts + +main_closeabbs + move.w MainBits(MainBase),d1 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d1 + bne.b 9$ ; ja, nekte + move.w Nodes(MainBase),d1 + notz + beq.b 9$ ; kan ikke + move.w #1,mainshutdown ; husker at vi skal ned +9$ rts + +main_opennode + push d2 + link.w a3,#-128 + move.w activenode,d2 ; har vi en valgt ? + cmp.w #-1,d2 + beq.b 9$ ; Nei, beep + add.w #1,d2 + move.w d2,d0 + move.l sp,a1 + lea publicportname,a0 + bsr fillinnodenr ; bygger opp navnet til porten + move.l sp,a1 ; Ser om vi finner porten + jsrlib FindPort + tst.l d0 + notz + beq.b 9$ ; vi fant, da er den allerede oppe + move.w d2,d0 + move.l sp,a0 + bsr getnodeconfigfile + beq.b 9$ + move.l sp,a0 + move.w activenode,d0 + add.w #1,d0 + bsr restartnode +9$ unlk a3 + pop d2 + rts + +main_ejectall + move.w #Node_Eject,d0 + bsr loopallopennodes + rts + +shutdownall + move.w #Node_Shutdown,d0 +; bra loopallopennodes + +; d0.w = command to send to all open nodes +loopallopennodes + push a2/d2/d3 + move.w d0,d3 + move.l nodelist+LH_HEAD,a2 +1$ move.l (LN_SUCC,a2),d2 + beq.b 9$ + move.w (Nodenr,a2),d0 + beq.b 2$ + move.w d3,d1 + bsr sendmsgtonodeasync + beq.b 99$ +2$ move.l d2,a2 + bra.b 1$ +9$ clrz +99$ pop a2/d2/d3 + rts + +openstatuswindow + push a6/a2/a3 + move.b #1,statusopen + jsr SetupScreen + bne.b closestatuswindow1 + jsr OpenABBSAppWindowWindow + bne.b closestatuswindow1 + move.l ABBSAppWindowWnd,a0 + move.w (wd_Height,a0),statuswinheight + move.l wd_UserPort(a0),a0 + moveq #0,d1 + move.b MP_SIGBIT(a0),d1 + moveq.l #0,d0 + bset d1,d0 + move.l d0,maingadtosigbit + or.l #SIGBREAKF_CTRL_E,d0 + or.l d0,mainwait + move.l a0,maingadtoolport + move.w #-1,activenode ; sletter hvilken node som er valgt + +; move.l (gadbase),a6 +; move.l ABBSAppWindowWnd,a1 +; move.l ABBSAppWindowGadgets,a0 +; moveq.l #GDX_Win_size*4,d0 +; add.l d0,a0 +; move.l (a0),a0 +; suba.l a2,a2 +; lea (winsizetags),a3 +; jsrlib GT_SetGadgetAttrsA + pop a6/a2/a3 + clrz + rts + +closestatuswindow + push a6 +closestatuswindow1 + move.b #0,statusopen + move.l maingadtosigbit,d0 + or.l #SIGBREAKF_CTRL_E,d0 + not.l d0 + and.l d0,mainwait + jsr CloseABBSAppWindowWindow + jsr CloseDownScreen + move.l maingadtosigbit,d0 ; fjerner gadtools sigbit'et + or.l #SIGBREAKF_CTRL_E,d0 + not.l d0 + and.l d0,mainwait + pop a6 + setz + rts + +; a0 = cmdline +domainarexxcmd + lea mainarexxcmdtxt,a1 + moveq.l #1,d0 ; vi kaller parserexxcmd ifra main + bsr parserexxcmd + beq.b 9$ ; ikke kjennt + lea mainarexxjmp,a0 ; utfører kommandoen + add.l d0,a0 + move.l (a0),a0 + jsr (a0) ; utfører +9$ rts + +; Arexx kommandoene +; de skal returnere: +; a0 - retur string til arexx programmet, 0 for ingen +; d0 - retur verdi til arexx programmet (RC) + +rexx_shutdown + moveq.l #5,d0 ; RC = 5, kan ikke lukke + move.w MainBits(MainBase),d1 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d1 + bne.b 9$ ; ja, nekte + move.w Nodes(MainBase),d1 + bne.b 9$ + move.w #1,mainshutdown + moveq.l #0,d0 ; RC = 0, alt ok +9$ sub.l a0,a0 ; ingen return string + rts + +rexx_startnode + moveq.l #10,d0 ; error + lea txtbuffer(MainBase),a1 + move.l rx_NumParam(a1),d1 ; har vi 1 parameter ? + beq.b 9$ ; nope. + move.l rx_ptr1(a1),a0 ; har configfilename + moveq.l #0,d0 ; node nummeret + bsr restartnode + beq.b 8$ + moveq.l #0,d0 + bra.b 9$ +8$ moveq.l #5,d0 ; RC = klarte ikke +9$ sub.l a0,a0 ; ingen return string + rts + +rexx_showgui + lea (txtbuffer,MainBase),a1 + move.l (rx_NumParam,a1),d1 ; har vi 1 parameter ? + bne.b 1$ ; Jepp, da skal vi lukke + move.b statusopen,d0 + bne.b 9$ ; allerede åpent + bsr openstatuswindow + bra.b 9$ +1$ move.b statusopen,d0 + beq.b 9$ ; allerede lukket + bsr closestatuswindow +; bra.b 9$ +9$ moveq.l #0,d0 + sub.l a0,a0 ; ingen return string + rts + +; a0 = nodeconfig fil +; d0.w = bruk node nr # (0 = ta første og beste) +restartnode + push d2 + move.w d0,d2 ; husker node nummeret + move.l nodelist+LH_HEAD,a1 + moveq.l #1,d1 ; nodenr +1$ move.l (LN_SUCC,a1),d0 + beq.b 2$ + tst.w Nodenr(a1) + beq.b 3$ ; fant en vi kan bruke +5$ move.l d0,a1 + addq.l #1,d1 ; teller nodenr'et + bra.b 1$ + +2$ bsr kickoffnode ; starter ny node + bra.b 9$ + +3$ tst.w d2 ; skal vi ha en spesiell ? + beq.b 4$ ; nei, tar hva som helst + cmp.w d1,d2 ; riktig node ? + bne.b 5$ ; fortsetter hvis ikke +4$ moveq.l #0,d0 + move.l d0,(NodeTask,a1) ; sletter task feltet + move.w d1,(Nodenr,a1) ; lagrer nodenr'et + move.l a0,(Nodeusernr,a1) ; Midlertidig lagersted + move.l (dosbase),a6 + move.l a0,d1 ; navn på config fila + moveq.l #0,d2 + move.l #nodestart,d3 + lsr.l #2,d3 + move.l #4*4096,d4 ; stack størrelse + jsrlib CreateProc + move.l exebase,a6 + tst.l d0 ; gikk det bra ? + beq.b 9$ ; nei + addq.w #1,Nodes(MainBase) + clrz +9$ pop d2 + rts + +; d0 = usernr +; d1 = node vi skal ignorere +Reloaduser + push a2/a3/d2/d3/a6 + move.l exebase,a6 + move.l d0,d2 + move.l d1,d3 + + move.l nodelist+LH_HEAD,a2 +1$ move.l (LN_SUCC,a2),d0 + beq.b 9$ + cmp.l Nodeusernr(a2),d2 ; riktig bruker ? + bne.b 2$ ; nope. + move.w Nodestatus(a2),d0 ; inne ? + beq.b 2$ ; nope + move.w Nodenr(a2),d0 + beq.b 2$ ; noden er nede + cmp.w d0,d3 ; skal vi droppe denne ? + beq.b 2$ ; jepp + +; d2 = usernr + move.w #Node_Reloaduser,d1 + bsr sendmsgtonodeasync + +2$ move.l (LN_SUCC,a2),a2 ; Henter ptr til nestenode + bra 1$ ; flere noder. Same prosedure as last year +9$ pop a2/a3/d2/d3/a6 + rts + + +; d0.w = nodenummer +; d1.w = command +; d2.l = usernr (optional for commands that need it) +sendmsgtonodeasync + push a2/d3 + move.l d1,d3 + lea txtbuffer(MainBase),a1 + lea publicportname,a0 + bsr fillinnodenr ; bygger opp navnet til porten + + moveq.l #ABBSmsg_SIZE,d0 ; allokerer minne til melding + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + tst.l d0 + beq.b 9$ + move.l d0,a2 + + jsrlib Forbid + lea txtbuffer(MainBase),a1 ; Ser om vi finner porten + jsrlib FindPort + tst.l d0 + beq.b 3$ ; ingen port + move.l d0,a0 + move.l a2,a1 + move.w d3,m_Command(a1) + move.l d2,m_UserNr(a1) + jsrlib PutMsg + jsrlib Permit + clrz + bra.b 9$ + +3$ jsrlib Permit + move.l a2,a1 + moveq.l #ABBSmsg_SIZE,d0 + jsrlib FreeMem + setz +9$ pop d3/a2 + rts + +openscreen + move.l mainscreenadr,d0 + bne 9$ ; already open + move.l intbase,a6 + move.b (Cflags+CStr,MainBase),d0 + btst #CflagsB_Lace,d0 + beq.b 1$ + or.l #LORESLACE_KEY,ScreenModes+4 +1$ btst #CflagsB_8Col,d0 + beq.b 2$ + move.l #3,ScreenDepth+4 + bra.b 4$ +2$ lea (penlist2color),a0 + move.l a0,ScreenPens+4 +4$ sub.l a0,a0 + lea NewScreenTags,a1 + jsrlib OpenScreenTagList + move.l d0,mainscreenadr + bne.b 5$ + lea nomainscrentext,a0 + bsr writemainerror + bra no_scr +5$ bsr readcolors + move.l mainscreenadr,a0 + lea sc_ViewPort(a0),a0 + lea screencolors,a1 ; Velger mellom 2 farver + moveq.l #2,d0 ; og 8 farver paletten + move.b (Cflags+CStr,MainBase),d1 + btst #CflagsB_8Col,d1 + beq.b 3$ + lea screencolors+4,a1 + moveq.l #8,d0 +3$ move.l gfxbase,a6 + jsrlib LoadRGB4 + move.l intbase,a6 + lea NewWindowStructure1,a0 + move.l mainscreenadr,a1 + move.l a1,nw_Screen(a0) + move.w sc_Width(a1),nw_Width(a0) ; Samme bredde som skjermen + moveq.l #0,d0 + move.b sc_BarHeight(a1),d0 ; Justerer starten etter + addq.w #1,d0 + move.w d0,nw_TopEdge(a0) ; Høyden på skjermens titlebar + move.w sc_Height(a1),d1 + sub.w d0,d1 + move.w d1,nw_Height(a0) ; Og justerer høyden på vinduet + move.w #0,nw_LeftEdge(a0) ; For sikkerhetsskyld + jsrlib OpenWindow + move.l d0,mainwindowadr + bne.b 6$ + lea nomainwintext,a0 + bsr writemainerror + bra no_mwin +6$ move.l d0,a0 + move.l wd_UserPort(a0),a0 + moveq #0,d1 + move.b MP_SIGBIT(a0),d1 + moveq.l #0,d0 + bset d1,d0 + move.l d0,mainintsigbit + or.l d0,mainwait + move.l a0,mainintuiport + bsr setupmenu + bne.b 7$ + lea (nosetupmenutext),a0 + bsr writemainerror + bra no_msup +7$ move.l mainwindowadr,a0 + move.l mainmenustruct,a1 + jsrlib SetMenuStrip + tst.l d0 + bne.b 8$ + lea nomainmenutext,a0 + bsr writemainerror + bra.b no_mmen +8$ move.w MainBits(MainBase),d0 + and.w #MainBitsF_SysopNotAvail,d0 + bne.b 81$ + move.l mainwindowadr,a0 + jsrlib ClearMenuStrip + move.l mainmenustruct,a0 + move.l (mu_NextMenu,a0),a0 + move.l (mu_FirstItem,a0),a0 + andi.w #~CHECKED,(mi_Flags,a0) + move.l mainwindowadr,a0 + move.l mainmenustruct,a1 + jsrlib ResetMenuStrip +81$ movea.l mainscreenadr,a0 + moveq.l #0,d0 + jsrlib PubScreenStatus ; gjør skjermen public + move.l exebase,a6 +9$ add.w #1,screenopencount + rts + +closescreen + sub.w #1,screenopencount + bne.b noclose ; flere er oppe + move.l mainscreenadr,d0 + beq.b noclose ; no screen to close + move.l intbase,a6 + move.l mainwindowadr,d0 + beq.b noclose + move.l d0,a0 + jsrlib ClearMenuStrip +no_mmen bsr freemenu +no_msup move.l mainintsigbit,d0 + not.l d0 + and.l d0,mainwait + move.l mainwindowadr,a0 + jsrlib CloseWindow +no_mwin moveq.l #0,d0 + move.l d0,mainwindowadr + move.l mainscreenadr,a0 + jsrlib CloseScreen + moveq.l #0,d0 + move.l d0,mainscreenadr +no_scr move.l exebase,a6 +noclose rts + +******************************************************************************* +* kode for node kommandoer +******************************************************************************* + + +***************************************************************************** +;Error = GetMaxConfDirs () +;m_Error (altid ok) +;m_Data = MaxConferences, m_UserNr = MaxFileDirs +***************************************************************************** +GetMaxConfDirs + moveq.l #0,d0 + move.w (Maxconferences+CStr,MainBase),d0 + move.l d0,m_Data(a0) + move.w (MaxfileDirs+CStr,MainBase),d0 + move.l d0,m_UserNr(a0) + move.w #Error_OK,m_Error(a0) + rts + +***************************************************************************** +;Error = BroadcastMsg (intermsg, receivenode) +;m_Error m_Data m_UserNr +***************************************************************************** + +BroadcastMsg + push a3/a2 + move.l a0,a3 + move.w #Error_OK,m_Error(a3) ; Alt ok. + jsrlib Forbid + move.l m_UserNr(a3),d1 + beq 1$ ; 0 = alle noder. + + move.l nodelist+LH_HEAD,a2 ; finner noden + move.l (LN_SUCC,a2),d0 + beq.b 22$ ; ingen node + bra.b 21$ +2$ move.l (LN_SUCC,a2),d0 + beq.b 22$ ; fant den ikke +21$ cmp.w Nodenr(a2),d1 + beq.b 3$ ; funnet + move.l d0,a2 + bra.b 2$ +22$ move.w #Error_Not_Found,m_Error(a3) + bra 9$ +8$ move.w #Error_No_Active_User,m_Error(a3) + bra 9$ + +3$ move.w Nodestatus(a2),d0 ; fant noden + beq.b 8$ ; 0 = Logged off, vil ikke ha meldingen + move.w InterMsgwrite(a2),d1 + lea InterNodeMsg(a2),a1 + moveq.l #InterNodeMsgsiz,d0 + mulu d0,d1 + lea 0(a1,d1.w),a1 + move.l m_Data(a3),a0 + moveq.l #InterNodeMsgsiz,d0 + jsr memcopylen + move.w InterMsgwrite(a2),d1 + addq.w #1,d1 + cmp.w #MaxInterNodeMsg,d1 + bcs.b 4$ + moveq.l #0,d1 +4$ move.w d1,InterMsgwrite(a2) + cmp.w InterMsgread(a2),d1 ; Er buffer full ? + bne.b 40$ ; Nei. + move.w InterMsgread(a2),d0 + addq.w #1,d0 + cmpi.w #MaxInterNodeMsg,d0 + bcs.b 41$ + moveq.l #0,d0 ; wrap'er rundt +41$ move.w d0,InterMsgread(a2) ; Sletter eldste melding. +40$ move.l NodeTask(a2),a1 + move.l InterMsgSig(a2),d0 + jsrlib Signal + bra.b 9$ + +1$ move.l nodelist+LH_HEAD,a2 + move.l (LN_SUCC,a2),d0 + beq.b 9$ +5$ move.w Nodestatus(a2),d0 + beq.b 6$ ; 0 = Logged off + move.w i_franode(a2),a0 + cmp.w Nodenr(a2),d1 ; Er dette senderen ?? + beq.b 6$ ; Ja, sa skip'er vi + +; move.b (Nodedivstatus,a2),d0 ; not availible ? (sjekkes før dette) +; andi.b #NDSF_Notavail,d0 +; bne.b 6$ ; jepp, da skip'er vi. + move.w InterMsgwrite(a2),d1 + lea InterNodeMsg(a2),a1 + moveq.l #InterNodeMsgsiz,d0 + mulu d0,d1 + lea 0(a1,d1.w),a1 + move.l m_Data(a3),a0 + moveq.l #InterNodeMsgsiz,d0 + jsr memcopylen + move.w InterMsgwrite(a2),d1 + addq.w #1,d1 + cmp.w #MaxInterNodeMsg,d1 + bcs.b 7$ + moveq.l #0,d1 +7$ move.w d1,InterMsgwrite(a2) + cmp.w InterMsgread(a2),d1 ; Er buffer full ? + bne.b 61$ ; Nei. + move.w InterMsgread(a2),d0 + addq.w #1,d0 + cmpi.w #MaxInterNodeMsg,d0 + bcs.b 62$ + moveq.l #0,d0 ; wrap'er rundt +62$ move.w d0,InterMsgread(a2) ; Sletter eldste melding. +61$ move.l NodeTask(a2),a1 + move.l InterMsgSig(a2),d0 + jsrlib Signal +6$ move.l (LN_SUCC,a2),a2 + move.l (LN_SUCC,a2),d0 + bne.b 5$ + +9$ jsrlib Permit + pop a3/a2 + rts + +LockABBS + move.w (MainBits,MainBase),d0 + or.w #MainBitsF_ABBSLocked,d0 + move.w d0,(MainBits,MainBase) + rts + +UnLockABBS + move.w (MainBits,MainBase),d0 + and.w #~MainBitsF_ABBSLocked,d0 + move.w d0,(MainBits,MainBase) + rts + +; for bruk av configbbs. Returnerer config strukturen og config init status. +Getconfig + lea (CStr,MainBase),a1 + move.l a1,m_Data(a0) + move.w lesconfigstatus,m_UserNr(a0) + move.w #Error_OK,m_Error(a0) ; Alt ok. + rts + +Testconfig + move.w #Error_IllegalCMD,m_Error(a0) ; nekter + rts + +Startnode +; add.w #1,Nodes(MainBase) + rts + +Nodeshutdown + subq.w #1,Nodes(MainBase) + rts + +Loadfileentry + movem.l a2/a3/d2-d5,-(sp) + move.l a0,a2 + moveq.l #Fileentry_SIZEOF,d5 + move.l m_Data(a2),a3 ; filestruct + move.l m_UserNr(a2),d0 ; dir + lsl.l #2,d0 + move.l d0,d4 + move.w #Error_File,m_Error(a2) + move.l m_arg(a2),d1 ; filnr + 1 + subq.l #1,d1 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq.b 2$ ; nei. + move.l (n_Filedirfiles,MainBase),a0 + add.l d4,a0 + move.l (a0),d0 + beq.b 9$ ; ingen fil.. + move.l d0,a0 + move.l d1,d0 + move.w #Error_EOF,(m_Error,a2) + bsr findflentrynr + bmi.b 9$ ; EOF + beq.b 9$ ; not found + +; push a0 ; remove ME!!! + move.l a3,a1 + move.l d5,d0 + jsr memcopylen +; pop a0 ; remove ME!!! +; move.l (mem_filefilenr,a0),(Uploader,a3) ; remove ME!!! +; move.l (mem_filenr,a0),(AntallDLs,a3) ; remove ME!!! + bra.b 1$ ; ok + +2$ move.l dosbase,a6 + mulu d5,d1 + move.l (n_Filedirfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.l d4,d0 + move.l a3,d2 + move.l d5,d3 + move.w #Error_EOF,m_Error(a2) + move.l (n_Filedirfiles,MainBase),a0 + bsr readfile + beq.b 9$ + bpl.b 1$ + move.w #Error_Read,m_Error(a2) + bra.b 9$ +1$ move.w #Error_OK,m_Error(a2) + move.l m_arg(a2),m_UserNr(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d5 + rts + +RenameFileEntry + moveq.l #2,d0 + bra.b Addfiledl1 +Savefileentry + moveq.l #1,d0 + bra.b Addfiledl1 +Addfiledl + moveq.l #0,d0 +Addfiledl1 + movem.l a2/a3/d2-d7,-(sp) + move.l d0,d6 ; husker om det var add dl save eller rename + move.l a0,a2 ; husker meldingen + moveq.l #Fileentry_SIZEOF,d5 ; legger size hendig i et register + move.l (m_Data,a2),a3 ; fileentry strukturen + move.l (m_UserNr,a2),d0 ; file dir nr (* 1) + lsl.l #2,d0 + move.l d0,d7 ; = file dir nr (* 4) + move.w #Error_File,(m_Error,a2) + move.l (m_arg,a2),d1 ; filnr + 1 + subq.l #1,d1 ; = filenr + move.l (n_Filedirfiles,MainBase),a0 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq.b 2$ ; nei. + move.l d1,d4 ; = filenr (mem) + add.l d7,a0 ; finner denne dir'ens mem structure + move.l (a0),d0 + beq 9$ ; Error, ingen mem strukt (egentlig umulig) + move.l d0,a0 ; = mem struct + move.l d4,d0 ; filenr [0 - n> + move.l a0,d4 ; husker mem struct... + move.w #Error_EOF,(m_Error,a2) + bsr findflentrynr + bmi 9$ ; EOF + cmp.w #2,d6 ; rename ? + bne.b 5$ ; nope + move.l a0,d3 ; husker.. + lea (mem_fentry+Filename,a0),a0 + bsr calchash + move.l d0,d2 ; husker hash verdien + move.l d3,a0 + lea (mem_fentry+Filename,a0),a1 + lea (Filename,a3),a0 + moveq.l #Sizeof_FileName,d0 + jsr memcopylen + move.l d4,a1 ; henter memstruct + move.l d3,a0 ; henter mem entry + move.l d2,d0 ; henter tilbake hash'en + bsr rehashentry + move.l d3,a0 +5$ move.l (mem_filefilenr,a0),d4 ; Henter filposnr (fil) + tst.l d6 ; Skal vi bare save ? + bne.b 3$ ; ja. + addq.l #1,(AntallDLs,a0) ; Vi skal øke antall dl's +; moveq.l #1,d6 ; nå skal vi bare save + move.l a0,a3 ; ny vi skal save + bra.b 4$ +3$ exg a0,a3 ; a3 = ny save buffer + move.l a3,a1 + move.l d5,d0 + jsr memcopylen ; sletter ved å flytte den andre +4$ move.l d7,d0 ; file dir nr (* 4) + move.l a3,a0 + move.l d4,d1 + mulu d5,d1 + move.w #Error_Write,(m_Error,a2) + bsr savefileentrycachemode + beq.b 9$ + bra.b 8$ + +2$ move.l dosbase,a6 ; ikke cach'a + mulu d5,d1 + move.l d1,d4 ; husker pos + bsr seekfile + beq.b 9$ + tst.l d6 ; Skal vi bare save ? + bne.b 1$ ; ja. + move.w #Error_Read,m_Error(a2) + move.l d7,d0 + move.l a3,d2 + move.l d5,d3 + move.l (n_Filedirfiles,MainBase),a0 + bsr readfile + beq.b 9$ + bmi.b 9$ ; EOF + move.l d7,d0 ; Seek'er tilbake + move.l d4,d1 + move.l (n_Filedirfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + addq.l #1,AntallDLs(a3) +1$ move.w #Error_Write,m_Error(a2) + move.l d7,d0 + move.l a3,d2 + move.l d5,d3 + move.l (n_Filedirfiles,MainBase),a0 + bsr writefile + beq.b 9$ + move.l d7,d0 + move.l (n_Filedirfiles,MainBase),a0 + bsr closefile + move.l d7,d0 + bsr openfilefile + bne.b 8$ + move.w #Error_Open_File,m_Error(a2) + bra.b 9$ +8$ move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d7 + rts + +Findfile + movem.l a2/a3/d2-d5,-(sp) + moveq.l #0,d5 + moveq.l #Fileentry_SIZEOF,d3 + move.l a0,a2 ; msg er i a2 + move.l m_Data(a2),a3 ; fileentry + move.l m_UserNr(a2),d0 ; dir + lsl.l #2,d0 + move.l d0,d4 ; dir * 4 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq.b 4$ ; nei. + move.w #Error_File,(m_Error,a2) + move.l (n_Filedirfiles,MainBase),a0 + add.l d4,a0 + move.l (a0),d0 + beq 9$ ; ingen filedir + move.w #Error_Not_Found,(m_Error,a2) + move.l d0,a1 + move.l (m_Name,a2),a0 ; filenavnet + bsr findflentry + beq.b 9$ ; ikke funnet. Må nå sjekke nesten match... + move.l (mem_filenr,a0),d5 ; lagrer filnr + addq.l #1,d5 + move.l a3,a1 + move.l d3,d0 + jsr memcopylen ; loader... + bra.b 3$ + +4$ move.l dosbase,a6 + moveq.l #0,d1 ; Seek'er til begynnelsen + move.l (n_Filedirfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Read,m_Error(a2) +1$ move.l d4,d0 + move.l a3,d2 + move.l (n_Filedirfiles,MainBase),a0 + bsr readfile + bmi.b 9$ + beq.b 2$ + addq.l #1,d5 + move.w Filestatus(a3),d0 + and.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d0 + bne.b 1$ ; Dette er en slettet filinfo + + move.l m_Name(a2),a0 ; filenavnet + lea Filename(a3),a1 + bsr comparestringsicasespes + bne.b 1$ + bpl.b 3$ ; ordentelig match + + move.l m_arg(a2),a1 ; sted å lagre nesten match på + move.l m_UserNr(a2),(a1)+ ; husker fildir + move.l d5,(a1)+ ; filnr i fildir + lea Filename(a3),a0 ; tar vare på nesten match'en. + bsr strcopy ; og filnavnet + bra.b 1$ + +3$ move.w #Error_OK,m_Error(a2) + move.l d5,m_UserNr(a2) + bra.b 9$ +2$ move.w #Error_Not_Found,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d5 + rts + +; a0 = msg +Addfile movem.l a2/a3/d2-d4,-(sp) + move.l a0,a2 ; husker melding + move.l m_Data(a2),a3 ; fileentry struct + move.l m_UserNr(a2),d0 ; fildir + lsl.l #2,d0 + move.l d0,d4 ; fildir * 4 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq 4$ ; nei, vanelig + move.w #Error_Write,m_Error(a2) + moveq.l #-1,d1 + move.l a3,a0 + bsr savefileentrycachemode ; lagrer fileentry + beq 9$ ; error + move.l d0,d2 ; husker pos + move.w #Error_Nomem,m_Error(a2) + move.l (flpool,MainBase),a0 + moveq.l #mem_Fileentry_SIZEOF,d0 + jsr _AsmAllocPooled + tst.l d0 + beq 9$ + move.l a3,a0 ; file entry klar for source + move.l d0,a3 ; husker mem_entry + move.l a3,a1 + moveq.l #Fileentry_SIZEOF,d0 + jsr memcopylen + + move.l d2,d0 + moveq.l #Fileentry_SIZEOF,d1 + move.l utibase,a6 + jsrlib UDivMod32 + move.l exebase,a6 + move.l d0,(mem_filefilenr,a3) ; lagrer filnr + moveq.l #0,d0 + move.l d0,(mem_filenr,a3) ; sletter mem filnr (i tilfelle første fil) + move.l d0,(mem_fnexthash,a3) ; sletter hash peker (ligger trash der) + move.l d0,(mem_fnext,a3) ; sletter neste fil peker (trash..) + move.l m_Data(a2),a0 ; fileentry struct + lea (Filename,a0),a0 ; legg inn i hash liste + bsr calchash + move.w #Error_File,m_Error(a2) + move.l a3,a0 + move.l (n_Filedirfiles,MainBase),a1 + add.l d4,a1 + move.l (a1),d2 ; henter header + beq.b 9$ ; ikke noen fil... bør frigi + move.l d2,a1 + bsr insertinhashchain + move.l d2,a1 + moveq.l #0,d0 ; mem filnr + move.l (first_file,a1),d1 + bne.b 1$ + move.l a0,(first_file,a1) ; lagrer + bra.b 8$ ; ferdig +1$ move.l d1,a1 + addq.l #1,d0 ; øker mem filnr + move.l (mem_fnext,a1),d1 + bne.b 1$ + move.l a0,(mem_fnext,a1) ; lagrer + move.l d0,(mem_filenr,a3) ; lagrer memfilnr + bra.b 8$ ; ferdig + +4$ move.l dosbase,a6 + moveq.l #-1,d1 ; søker til end. + move.w #Error_File,m_Error(a2) + move.l (n_Filedirfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Write,m_Error(a2) + move.l d4,d0 + move.l a3,d2 + moveq.l #Fileentry_SIZEOF,d3 + move.l (n_Filedirfiles,MainBase),a0 + bsr writefile + beq.b 9$ + move.l d4,d0 + move.l (n_Filedirfiles,MainBase),a0 + bsr closefile + move.l d4,d0 + bsr openfilefile + bne.b 8$ + move.w #Error_Open_File,m_Error(a2) + bra.b 9$ +8$ move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d4 + rts + +Createfiledir + push a2/d2/d3/a3 + move.l a0,a2 + move.w (MaxfileDirs+CStr,MainBase),d0 ; Henter MaxfileDirs til d0 + sub.w #1,d0 ; Legger til en i d0 + cmp.w (ActiveDirs+CStr,MainBase),d0 ; Sjekker med ActiveDirs + bls 8$ + move.l m_Name(a2),a0 + bsr createdirfilepath ; lager i txtbuffer + move.l d0,d1 + move.l dosbase,a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + tst.l d0 + beq 7$ + move.l d0,d3 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq.b 1$ ; nei, vanelig + move.l d3,d1 + jsrlib Close ; lukker igjen + move.l #fileentryheader_sizeof,d3 + move.l (flpool,MainBase),a0 + move.l d3,d0 + move.l exebase,a6 + jsr _AsmAllocPooled + tst.l d0 + beq 7$ ; ikke noe ram til hash. + move.l d0,a0 ; null stiller + exg.l d0,d3 ; husker struct + jsr memclr +1$ move.l exebase,a6 + addq.w #1,(ActiveDirs+CStr,MainBase) + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (n_DirName,a3),a3 + moveq.l #0,d2 +2$ move.b (a3),d0 ; dir her ? + beq.b 3$ ; nei. da tar vi den plassen + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + addq.l #1,d2 + bra.b 2$ +3$ move.l (n_Filedirfiles,MainBase),a0 + move.l d2,d0 + lsl.l #2,d0 + move.l d3,(a0,d0.w) + move.l m_Name(a2),a0 + move.l a3,a1 + bsr strcopy + lea (n_DirPaths,a3),a1 + move.l m_Data(a2),a0 + bsr strcopy + move.w (ActiveDirs+CStr,MainBase),d0 ; setter inn fileorder + addq.l #1,d2 + move.w d2,(n_FileOrder,a3) + move.w #0,(n_PrivToConf,a3) + bsr main_saveconfig + beq.b 7$ + move.w #Error_OK,m_Error(a2) + bra.b 9$ +7$ move.w #Error_Open_File,m_Error(a2) + bra.b 9$ +8$ move.w #Error_Conferencelist_full,m_Error(a2) +9$ pop a2/d2/d3/a3 + move.l exebase,a6 + rts + +Createbulletin + push d2-d7/a2/a3 + moveq.l #0,d7 ; Om vi har oppdatert confbullets + move.l a0,a2 ; Msg. + move.w #Error_Open_File,m_Error(a2) ; Setter default feil. + move.l dosbase,a6 + move.l m_UserNr(a2),d0 ; bullet nr (hi word) og confnr (lo word) + move.w d0,d1 + lsr.w #1,d1 + swap d0 + tst.w d0 + bne.b 1$ + lea (n_FirstConference+CStr,MainBase),a3 + mulu #ConferenceRecord_SIZEOF,d1 + add.l d1,a3 + move.b (n_ConfBullets,a3),d0 ; Oppdaterer antall bulletiner. + addq.b #1,d0 + bne.b 3$ + move.w #Error_Bulletinlist_full,m_Error(a2) + bra 99$ +3$ move.b d0,(n_ConfBullets,a3) + moveq.l #1,d7 +1$ lea txtbuffer(MainBase),a0 + bsr getkonfbulletname + + lea txtbuffer(MainBase),a0 ; kopierer bulletin. + move.l a0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l m_Name(a2),d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d5 + beq.b 8$ + move.w #Error_Write,m_Error(a2) + + move.l m_Data(a2),d2 ; buffer + move.l m_arg(a2),d6 ; size + +2$ move.l d5,d1 + move.l d6,d3 + jsrlib Read + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 7$ ; File error + tst.l d0 + beq.b 6$ ; EOF, ferdig. + move.l d4,d1 + move.l d0,d3 + jsrlib Write + cmp.l d3,d0 ; Sjekker mot det vi leste + beq.b 2$ + bra.b 7$ ; file error +6$ bsr main_saveconfig + move.l dosbase,a6 + beq.b 7$ + move.w #Error_OK,m_Error(a2) + moveq.l #0,d7 +7$ move.l d5,d1 + jsrlib Close +8$ move.l d4,d1 + jsrlib Close +9$ tst.l d7 ; har vi økt uten at det gikk bra ? + beq.b 99$ ; nei, ferdig + subq.b #1,(n_ConfBullets,a3) ; retter opp igjen. +99$ move.l exebase,a6 + pop d2-d7/a2/a3 + rts + +Clearbulletins + move.l m_UserNr(a0),d0 + lsr.w #1,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a0 + clr.b (n_ConfBullets,a3) ; Clearer antall bulletiner. + move.w #Error_OK,m_Error(a0) + rts + +Savemsgheader + movem.l a2/a3/d2-d4,-(sp) + move.l dosbase,a6 + move.l a0,a2 ; Msg (abbsmsg) + move.l m_Data(a2),a3 ; Msg header + move.w #Error_Not_Found,m_Error(a2) + move.l m_UserNr(a2),d0 ; conf nr (* 2) + add.l d0,d0 + move.l d0,d4 + move.l Number(a3),d1 + subq.l #1,d1 + mulu #MessageRecord_SIZEOF,d1 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Write,m_Error(a2) + move.l d4,d0 + move.l a3,d2 ; Msg header buffer + moveq.l #MessageRecord_SIZEOF,d3 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr writefile + beq.b 9$ + move.l d4,d0 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr closefile + move.l d4,d0 + bsr openheaderfile + bne.b 8$ + move.w #Error_Open_File,m_Error(a2) + bra.b 9$ +8$ move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d4 + rts + +Loadmsgheader + movem.l a2/a3/d2-d4,-(sp) + move.l dosbase,a6 + move.l a0,a2 ; Msg (abbsmsg) + move.l m_Data(a2),a3 ; Msg header + moveq.l #0,d0 + move.w m_Error(a2),d0 ; conf nr + add.l d0,d0 + move.l d0,d4 + move.w #Error_Not_Found,m_Error(a2) + move.l m_UserNr(a2),d1 ; msg nr + mulu #MessageRecord_SIZEOF,d1 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Read,m_Error(a2) + move.l d4,d0 + move.l a3,d2 ; Msg header buffer + moveq.l #MessageRecord_SIZEOF,d3 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr readfile + bmi.b 9$ + beq.b 9$ + move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d4 + rts + +Loadmsgtext + movem.l a2/a3/d2-d4,-(sp) + move.l dosbase,a6 + move.l a0,a2 ; Msg (abbsmsg) + move.l m_Name(a2),a3 ; Msg header + move.w #Error_File,m_Error(a2) + move.l m_UserNr(a2),d0 ; conf nr + add.l d0,d0 + move.l d0,d4 + move.l TextOffs(a3),d1 + move.l (n_MsgTextfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Read,m_Error(a2) + move.l d4,d0 + move.l m_Data(a2),a0 ; Msg text buf + move.l a0,d2 + moveq.l #0,d3 + move.w NrBytes(a3),d3 + cmp.l (a0),d3 ; sjekker mot lovelig størrlese + bls.b 4$ + move.l (a0),d3 ; Kan bare loade så mye som dette +4$ tst.l d3 ; 0 bytes ? + bne.b 1$ ; nei, leser som før. + move.b #0,(a0) ; terminerer + bra.b 2$ ; og ok. +1$ move.l (n_MsgTextfiles,MainBase),a0 + bsr readfile + bmi.b 9$ + beq.b 9$ +2$ move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d4 + rts + +***************************************************************************** +;Error = CreateConference (name, new status bits) +;m_Error m_Name, m_Data +***************************************************************************** +CreateConference ; CI + push a2/d2/d3 + moveq.l #0,d3 + move.l a0,a2 ; husker melding + move.w #Error_Conferencelist_full,m_Error(a2) + move.w (Maxconferences+CStr,MainBase),d0 + cmp.w (ActiveConf+CStr,MainBase),d0 + bcs 9$ ; ikke plass + move.l m_Name(a2),a0 ; navnet + lea dotmessagestext,a1 ; lager .m fil + bsr createconffilepath + move.l d0,d1 + move.l dosbase,a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d3 + beq 7$ + + move.l m_Name(a2),a0 + lea dotmsgheadertxt,a1 ; lager .h fil + bsr createconffilepath + move.l d0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d2 + beq 7$ + + move.l exebase,a6 + addq.w #1,(ActiveConf+CStr,MainBase) ; øker (OK) + lea (n_ConfName+n_FirstConference+CStr,MainBase),a1 + moveq #0,d1 ; confnr. +2$ move.b (a1),d0 ; noe her ? (Leter etter ledig navn) + beq.b 3$ ; nope, ferdig + lea (ConferenceRecord_SIZEOF,a1),a1 + addq #1,d1 + bra.b 2$ +3$ move.l m_Data(a2),d0 ; Flags + move.w d0,(n_ConfSW,a1) + moveq.l #0,d0 ; clearer conference bulletins. + move.b d0,(n_ConfBullets,a1) ; skulle ikke være nødvendig, men. + move.l d0,(n_ConfDefaultMsg,a1) ; Høyeste melding i konfen + addq.l #1,d0 + move.l d0,(n_ConfFirstMsg,a1) + moveq.l #50,d0 + move.w d0,(n_ConfMaxScan,a1) ; Satt til 50 automatisk ser det ut til... + +; Finner konferanse rekkefølgen + lea (n_FirstConference+CStr,MainBase),a0 + move.w (ActiveConf+CStr,MainBase),d0 + subq.w #1,d0 + mulu #ConferenceRecord_SIZEOF,d0 + add.w #1,d1 +; move.w d1,(n_ConfOrder,a0,d0.l) + sub.w #1,d1 + + lsl.l #2,d1 + move.l (n_MsgHeaderfiles,MainBase),a0 + move.l d2,0(a0,d1.l) + move.l (n_MsgTextfiles,MainBase),a0 + move.l d3,0(a0,d1.l) + + move.l m_Name(a2),a0 ; stapper inn navnet + bsr strcopy + + move.w #Error_Open_File,m_Error(a2) + bsr main_saveconfig + beq.b 9$ + move.w #Error_OK,m_Error(a2) + bra.b 9$ +7$ move.w #Error_Open_File,m_Error(a2) + move.l d3,d1 + beq.b 9$ + jsrlib Close +9$ pop a2/d2/d3 + move.l exebase,a6 + rts + +Savemsg push a2/a3/d2-d5 + move.l dosbase,a6 + move.l a0,a2 ; Msg (abbsmsg) + move.l m_Name(a2),a3 ; Msg header + move.l m_UserNr(a2),d0 ; conf nr * 2 + move.w #Error_File,m_Error(a2) + add.l d0,d0 + move.l d0,d4 ; conf nr * 4 + moveq.l #-1,d1 ; Til slutten. + move.l (n_MsgTextfiles,MainBase),a0 + bsr seekfile + beq 9$ + move.l d4,d0 + moveq.l #-1,d1 ; Til slutten. + move.l (n_MsgTextfiles,MainBase),a0 + bsr seekfile + beq 9$ + move.l d0,TextOffs(a3) + move.w #Error_Write,m_Error(a2) + move.l d4,d0 + move.l m_Data(a2),d2 ; Msg text + moveq.l #0,d3 + move.w NrBytes(a3),d3 + move.l (n_MsgTextfiles,MainBase),a0 + bsr writefile + beq 9$ + move.l d4,d0 + move.l (n_MsgTextfiles,MainBase),a0 + bsr closefile + move.l d4,d0 + bsr openmsgtextfile + bne.b 1$ + move.w #Error_Open_File,m_Error(a2) + bra 9$ + +1$ move.w #Error_File,m_Error(a2) + move.l d4,d0 + moveq.l #-1,d1 ; Til slutten. + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq 9$ + move.l d4,d0 + moveq.l #-1,d1 ; Til slutten. + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq 9$ + moveq.l #MessageRecord_SIZEOF,d1 + move.l utibase,a6 + jsrlib UDivMod32 + move.l dosbase,a6 + tst.l d1 ; sjekker resten + beq.b 2$ ; ikke null. problemer + move.l d0,d5 ; husker nr. + mulu #MessageRecord_SIZEOF,d0 + move.l d0,d1 ; posisjon + move.l d4,d0 ; søler til en jevn start pos + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq.b 9$ ; feil.. + move.l d5,d0 +2$ addq.l #1,d0 + move.l d0,Number(a3) + move.w #Error_Write,m_Error(a2) + move.l d4,d0 + move.l a3,d2 ; Msg header + moveq.l #MessageRecord_SIZEOF,d3 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr writefile + beq.b 9$ + move.l d4,d0 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr closefile + move.l d4,d0 + bsr openheaderfile + bne.b 8$ + move.w #Error_Open_File,m_Error(a2) + bra.b 9$ +8$ move.w #Error_Open_File,m_Error(a3) ; oppdaterer configfila. + lea (n_FirstConference+CStr,MainBase),a0 + move.l (m_UserNr,a2),d0 ; conf nr * 2 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (Number,a3),(n_ConfDefaultMsg,a0,d0.l) + bsr main_saveconfig + beq.b 9$ + move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + pop a2/a3/d2-d5 + rts + +Loadmsg push a2/a3/d2-d4 + move.l dosbase,a6 + move.l a0,a2 ; Msg (abbsmsg) + move.l m_Name(a2),a3 ; Msg header + moveq.l #0,d0 + move.w m_Error(a2),d0 ; conf nr + add.l d0,d0 + move.l d0,d4 + move.w #Error_File,m_Error(a2) + move.l m_UserNr(a2),d1 ; msg nr + mulu #MessageRecord_SIZEOF,d1 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Read,m_Error(a2) + move.l d4,d0 + move.l a3,d2 ; Msg header buffer + moveq.l #MessageRecord_SIZEOF,d3 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr readfile + beq.b 9$ + + move.w #Error_File,m_Error(a2) + move.l d4,d0 + move.l TextOffs(a3),d1 + move.l (n_MsgTextfiles,MainBase),a0 + bsr seekfile + beq.b 9$ + move.w #Error_Read,m_Error(a2) + move.l d4,d0 + move.l m_Data(a2),a0 ; Msg text buf + move.l a0,d2 + moveq.l #0,d3 + move.w NrBytes(a3),d3 + cmp.l (a0),d3 ; sjekker mot lovelig størrlese + bls.b 4$ + move.l (a0),d3 ; Kan bare loade så mye som dette +4$ tst.l d3 ; 0 bytes ? + bne.b 1$ ; nei, leser som før. + move.b #0,(a0) ; terminerer + bra.b 2$ ; og ok. +1$ move.l (n_MsgTextfiles,MainBase),a0 + bsr readfile + beq.b 9$ +2$ move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + pop a2/a3/d2-d4 + rts + +***************************************************************************** +;Error = Loadsaveuser (navnstreng,data area,load/save) +;m_Error(a0) m_Name(a0) m_Data(a0) m_Command(a0) +***************************************************************************** +Loadsaveuser + movem.l d2-d4/a2/a3,-(sp) + move.l a0,a3 + move.w #Error_Not_Found,m_Error(a3) + move.l m_Name(a3),a0 + bsr finnlogentrynavn + beq 9$ + move.l a0,a2 + + move.l dosbase,a6 ; Les inn recorden + move.w #Error_Open_File,m_Error(a3) + move.l userfile(MainBase),d4 + beq 9$ + move.w #Error_File,m_Error(a3) + move.l d4,d1 + moveq.l #OFFSET_BEGINNING,d3 + move.l l_RecordNr(a2),d2 + move.l (UserrecordSize+CStr,MainBase),d0 + mulu d0,d2 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + cmp.w #Main_saveuser,m_Command(a3) ; Skal vi lagre ?? + beq.b 4$ ; Ja + jsrlib Read ; Nei, da leser vi + bra.b 5$ +4$ jsrlib Write +5$ moveq.l #-1,d1 ; read/write error ?? + cmp.l d0,d1 + beq.b 8$ + move.w #Error_OK,m_Error(a3) +8$ cmp.w #Main_saveuser,m_Command(a3) ; har vi lagret ?? + bne.b 9$ ; nei, da er vi ferdig + cmp.w #Error_OK,m_Error(a3) ; Gikk alt ok ? + bne.b 9$ ; nei + move.l d4,d1 + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq 9$ + move.w #Error_OK,m_Error(a3) + move.l m_arg(a3),d1 ; nodenr to skip + move.l l_UserNr(a2),d0 + bsr Reloaduser + move.l m_Data(a3),a0 + move.w Userbits(a0),d0 + cmp.w l_UserBits(a2),d0 ; har userbit'ene forandret seg ? + beq.b 9$ ; nope. + move.w d0,l_UserBits(a2) ; Oppdaterer log'ens userbits + bsr savelog + bne.b 9$ ; alt ok + move.w #Error_SavingIndex,m_Error(a3) +9$ move.l exebase,a6 + movem.l (sp)+,a2/a3/d2-d4 + rts + +***************************************************************************** +;Error = Loadsaveusernr (bruker nr,data area,load/save) +;m_Error(a0) m_UserNr(a0) m_Data(a0) m_Command(a0) +***************************************************************************** +Loadsaveusernr + push d2-d4/a3/a2 + move.l a0,a3 + move.w #Error_EOF,m_Error(a3) + move.l m_UserNr(a3),d0 + cmp.l (MaxUsers+CStr,MainBase),d0 ; Sjekk om brukernr < maks brukernr. + bcc 9$ ; For høy. Error. + move.w #Error_Open_File,m_Error(a3) + move.l userfile(MainBase),d4 + beq 9$ + move.l dosbase,a6 + move.w #Error_File,m_Error(a3) + moveq.l #OFFSET_BEGINNING,d3 + move.l m_UserNr(a3),d0 ; Har allerede sjekket range + lsl.l #2,d0 + move.l NrTabelladr(MainBase),a0 + move.l 0(a0,d0.l),d0 ; Henter Lognr + move.w #Error_Not_Found,m_Error(a3) + cmp.l #-1,d0 + beq 9$ + move.l LogTabelladr(MainBase),a2 + mulu #Log_entry_SIZEOF,d0 + add.l d0,a2 ; Henter Logentry + move.l l_RecordNr(a2),d2 + move.l (UserrecordSize+CStr,MainBase),d0 + mulu d0,d2 + move.l d4,d1 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + cmp.w #Main_saveusernr,m_Command(a3) ; Skal vi lagre ?? + beq.b 4$ ; Ja + jsrlib Read ; Nei, da leser vi + bra.b 5$ +4$ jsrlib Write +5$ moveq.l #-1,d1 ; read/write error ?? + cmp.l d0,d1 + beq.b 8$ + move.w #Error_OK,m_Error(a3) +8$ cmp.w #Main_saveusernr,m_Command(a3) ; har vi lagret ?? + bne.b 9$ ; nei + cmp.w #Error_OK,m_Error(a3) ; Gikk alt ok ? + bne.b 9$ ; nei + move.l d4,d1 + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq.b 9$ + move.l m_arg(a3),d1 ; nodenr to skip + move.l m_UserNr(a3),d0 + bsr Reloaduser + move.w #Error_OK,m_Error(a3) + move.l m_Data(a3),a0 + move.w Userbits(a0),d0 + cmp.w l_UserBits(a2),d0 ; har userbit'ene forandret seg ? + beq.b 9$ ; nope. + move.w d0,l_UserBits(a2) ; Oppdaterer log'ens userbits + bsr savelog + bne.b 9$ ; alt ok + move.w #Error_SavingIndex,m_Error(a3) +9$ move.l exebase,a6 + pop a3/d2-d4/a2 + rts + +***************************************************************************** +;Error = Loadsaveusernrnr (nr i fil,data area,load/save) +;m_Error(a0) m_UserNr(a0) m_Data(a0) m_Command(a0) +***************************************************************************** +Loadsaveusernrnr + push d2-d4/a3/a2 + move.l a0,a3 + move.w #Error_Open_File,m_Error(a3) + move.l dosbase,a6 ; Les inn recorden + move.l userfile(MainBase),d4 + beq 9$ + move.l d4,d1 + move.w #Error_File,m_Error(a3) + moveq.l #OFFSET_BEGINNING,d3 + move.l m_UserNr(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d0 + mulu d0,d2 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + move.l d2,-(a7) + move.w #Error_EOF,m_Error(a3) + move.l d4,d1 + moveq.l #OFFSET_CURRENT,d3 + moveq.l #0,d2 + jsrlib Seek + move.l (a7)+,d1 + cmp.l d0,d1 + bne.b 8$ + move.l d4,d1 + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + cmp.w #Main_saveusernrnr,m_Command(a3) ; Skal vi lagre ?? + beq.b 4$ ; Ja + jsrlib Read ; Nei, da leser vi + bra.b 5$ +4$ move.w #Error_File,m_Error(a3) + jsrlib Write +5$ cmp.l d0,d3 ; read/write error ?? + bne.b 8$ + move.w #Error_OK,m_Error(a3) +8$ cmp.w #Main_saveusernrnr,m_Command(a3) ; har vi lagret ?? + bne.b 9$ ; nei + cmp.w #Error_OK,m_Error(a3) ; Gikk alt ok ? + bne.b 9$ ; nei + move.l d4,d1 + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq.b 9$ + move.w #Error_Not_Found,m_Error(a3) + move.l m_Data(a3),a0 + lea Name(a0),a0 + bsr finnlogentrynavn + beq.b 9$ + move.l a0,a2 + move.l m_arg(a3),d1 ; nodenr to skip + move.l l_UserNr(a2),d0 + bsr Reloaduser + move.w #Error_OK,m_Error(a3) + move.l m_Data(a3),a0 + move.w Userbits(a0),d0 + cmp.w l_UserBits(a2),d0 ; har userbit'ene forandret seg ? + beq.b 9$ ; nope. + move.w d0,l_UserBits(a2) ; Oppdaterer log'ens userbits + bsr savelog + bne.b 9$ ; alt ok + move.w #Error_SavingIndex,m_Error(a3) +9$ move.l exebase,a6 + pop a3/d2-d4/a2 + rts + +***************************************************************************** +;Error = Createuser(navnstreng,data area) +;m_Error(a0) m_Name(a0) m_Data(a0) +***************************************************************************** +Createuser + push d2-d5/a2/a3 + move.l a0,a3 ; husker meldingen + moveq.l #0,d5 ; maxuser skal ikke økes + lea txtbuffer(MainBase),a2 ; bruker denne som en tmpLogEntry + move.l (m_Name,a3),a0 + lea (l_Name,a2),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen ; Fyller i name + + move.l (NrTabelladr,MainBase),a0 + moveq.l #-1,d1 + moveq.l #0,d3 ; bruker nummeret + move.l (Users+CStr,MainBase),d2 + beq.b 10$ ; Ingen brukere, ikke scan +5$ move.l (a0)+,d0 + cmp.l d0,d1 + beq.b 6$ + addq.l #1,d3 + subq.l #1,d2 + bne.b 5$ +10$ moveq.l #1,d5 ; maxuser skal økes alikevel +6$ move.l d3,(l_UserNr,a2) + move.l (m_Data,a3),a0 + move.l d3,(Usernr,a0) + move.w #0,(l_UserBits,a2) ; Han er ikke død... + + move.l a2,a0 + move.w #Error_Found,(m_Error,a3) + bsr insertlogentry ; returnerer plassen i d0. + beq 9$ ; klarte ikke. Må finnes. + + move.l (NrTabelladr,MainBase),a0 + lsl.l #2,d3 + move.l d0,0(a0,d3.l) + mulu #Log_entry_SIZEOF,d0 ; opdaterer a2 til å peke på + move.l (LogTabelladr,MainBase),a0 ; plassen hvor entry'et havna. + lea 0(a0,d0.l),a2 + + move.w #Error_Open_File,m_Error(a3) + move.l dosbase,a6 + move.l userfile(MainBase),d4 + bne.b 3$ + tst.w lesconfigstatus ; skal den finnes ? + bne 99$ ; ja + move.l #userfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq 99$ + move.l d0,d4 +3$ move.w #Error_File,m_Error(a3) + move.l d4,d1 + moveq.l #OFFSET_END,d3 + moveq.l #0,d2 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 + moveq.l #OFFSET_END,d3 + moveq.l #0,d2 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + move.l (UserrecordSize+CStr,MainBase),d1 + move.l utibase,a6 + jsrlib UDivMod32 + move.l dosbase,a6 + move.l d1,d2 ; Sjekker om vi er på en ujevn userrecord_size. + beq.b 1$ ; Det er vi ikke + move.l d0,l_RecordNr(a2) ; runder nedover, og lager over den 'halve' userrecord'en + move.l d4,d1 + moveq.l #OFFSET_END,d3 + neg.l d2 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + bra.b 2$ +1$ move.l d0,l_RecordNr(a2) +2$ move.l d4,d1 + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + jsrlib Write + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 8$ + move.w #Error_OK,m_Error(a3) +8$ move.l d4,d1 + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + bne.b 4$ + move.w #Error_Open_File,m_Error(a3) + bra.b 99$ +4$ cmp.w #Error_OK,m_Error(a3) ; Gikk alt bra ? + bne.b 99$ ; Nei. Ut. + move.l exebase,a6 + move.w #Error_Open_File,m_Error(a3) + addq.l #1,(Users+CStr,MainBase) + tst.l d5 ; skulle max også økes ? + beq.b 7$ ; nei + addq.l #1,(MaxUsers+CStr,MainBase) +7$ bsr main_saveconfig + beq.b 9$ + bsr savehash ; og lagrer log tabellen + beq.b 9$ + move.w #Error_OK,m_Error(a3) + bra.b 9$ +99$ move.l (l_UserNr,a2),d0 + move.l (NrTabelladr,MainBase),a0 + lsl.l #2,d0 + moveq.l #-1,d1 + move.l d1,0(a0,d0.l) ; sletter bruker nummeret + move.l (m_Name,a3),a0 ; sletter igjen + bsr deletelogentry + bsr main_saveconfig +9$ move.l exebase,a6 + pop d2-d5/a2/a3 + rts + +***************************************************************************** +;Error = Getusername(usernumber) +;m_Error(a0) m_UserNr(a0) +;username -> m_Name(a0) +***************************************************************************** + +Getusername + move.w #Error_Not_Found,m_Error(a0) + move.l m_UserNr(a0),d0 + moveq.l #0,d1 + move.l d1,(m_arg,a0) ; ingen base (lokal) + cmp.l (MaxUsers+CStr,MainBase),d0 ; Sjekk om brukernr < maks brukernr. + bhi.b 9$ ; For høy. Error. + move.l NrTabelladr(MainBase),a1 + lsl.l #2,d0 + move.l 0(a1,d0.l),d0 ; Henter Lognr + cmp.l #-1,d0 ; er det en slettet bruker ? + beq.b 9$ ; Jepp, gir error + move.l LogTabelladr(MainBase),a1 + mulu #Log_entry_SIZEOF,d0 + lea 0(a1,d0.l),a1 ; Henter Logentry + move.w l_UserBits(a1),m_Data(a0) + addq.l #l_Name,a1 + move.l a1,m_Name(a0) +8$ move.w #Error_OK,m_Error(a0) ; Alt ok. +9$ rts + +***************************************************************************** +;Error = Getusernumber (navnstreng) +;m_Error(a0) m_Name(a0) +;usernumber -> m_UserNr(a0) +***************************************************************************** +Getusernumber + push d2/a2 + move.w #Error_Not_Found,m_Error(a0) ; sier vi ikke fant den. + move.l a0,d2 + move.l m_Name(a0),a0 + bsr finnlogentrynavn + beq.b 9$ + move.l d2,a1 + move.l l_UserNr(a0),m_UserNr(a1) + move.w #Error_OK,m_Error(a1) ; Alt ok. +9$ pop d2/a2 + rts + +***************************************************************************** +;Error = Saveconfig(m_data) +;m_Error(a0) config +***************************************************************************** +Saveconfig + push d2-d5/a3 + move.l (Configsize+CStr,MainBase),d5 + move.l a0,a3 + move.l m_Data(a3),d0 ; Er Data satt ? da ligger ny config der + beq.b 3$ + move.l d0,a0 ; kopierer inn i minne buffer + lea (CStr,MainBase),a1 + move.l d5,d0 + jsr memcopylen +3$ move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 1$ + move.l d4,d1 + lea (CStr,MainBase),a0 + move.l a0,d2 + move.l d5,d3 + jsrlib Write + cmp.l d5,d0 + bne.b 2$ + move.l d4,d1 + jsrlib Close + move.w #Error_OK,m_Error(a3) ; Alt ok. +9$ move.l exebase,a6 + pop d2-d5/a3 + rts +1$ move.w #Error_Open_File,m_Error(a3) + bra.b 9$ +2$ move.l d4,d1 + jsrlib Close + move.w #Error_Write,m_Error(a3) + bra.b 9$ + +QuitBBS move.w #Error_Cant_shut_down,m_Error(a0) + move.w MainBits(MainBase),d0 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d0 + bne.b 9$ ; ja, nekte + tst.w Nodes(MainBase) + bne.b 9$ + move.w #1,mainshutdown + move.w #Error_OK,m_Error(a0) +9$ rts + +**************************************************************************************** +;Error = PackuserFile (tmpuser data area,Table of usernrs to delete, terminated by a -1) +;m_Error(a0) m_Data(a0) m_arg +**************************************************************************************** +PackuserFile + push a3/a2/d2-d7 + move.l a0,a3 ; husker meldingen + move.w #Error_Open_File,(m_Error,a3) + move.l dosbase,a6 + move.l (userfile,MainBase),d5 + beq 9$ + move.l #newuserfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d6 + beq 9$ ; error opening new userfile + + move.l d5,d1 + move.w #Error_File,m_Error(a3) + moveq.l #OFFSET_BEGINNING,d3 + moveq.l #0,d2 + jsrlib Seek ; går til starten + bsr testseekerror + bne 8$ ; error + moveq.l #0,d7 ; record nr + +1$ moveq.l #0,d1 + jsrlib SetIoErr ; clear'er error. Fread gjør det ikke.. + move.l d5,d1 ; leser inn neste bruker + move.l (m_Data,a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + moveq.l #1,d4 + jsrlib FRead + tst.l d0 + bne.b 4$ ; ok, gå videre + jsrlib IoErr + tst.l d0 + bne 8$ ; error, ut, rydd opp ; error + bra.b 7$ ; EOF +4$ move.l d2,a0 + move.l (Usernr,a0),d0 ; henter usernummeret + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 2$ ; ja, aldri fjerne han + move.l (m_arg,a3),a0 + bsr 10$ + bne.b 2$ ; han skal ikke slettes + move.l d2,a0 + move.l (Usernr,a0),d0 ; henter usernummeret + move.l NrTabelladr(MainBase),a1 ; setter -1 som record nummer + lsl.l #2,d0 + move.l #-1,(a1,d0.l) + lea (Name,a0),a0 + bsr deletelogentry ; slett han fra index tabellen + beq.b 3$ ; gikk ikke (fant'n ikke) + subq.l #1,(Users+CStr,MainBase) + bra.b 3$ +2$ move.l d6,d1 ; skriver til ny userfil +; d2,d3 og d4 er riktig + jsrlib FWrite + moveq.l #1,d1 + cmp.l d0,d1 + bne 8$ + move.l d2,a0 + lea (Name,a0),a0 + bsr finnlogentrynavn + beq.b 81$ ; fant ikke. Egentlig umulig + move.l d7,(l_RecordNr,a0) + addq.l #1,d7 +3$ bra.b 1$ + +7$ moveq.l #0,d7 ; record nr + move.l (Users+CStr,MainBase),d0 ; Henter antall brukere + move.l LogTabelladr(MainBase),a0 + move.l NrTabelladr(MainBase),a1 +71$ move.l (l_UserNr,a0),d1 ; oppdaterer nr tabellen + lsl.l #2,d1 + move.l d7,(a1,d1.l) + addq.l #1,d7 + lea (Log_entry_SIZEOF,a0),a0 + subq.l #1,d0 + bne.b 71$ + bsr savehash + beq.b 8$ + move.l d5,d1 ; lukker userfile + jsrlib Close + move.l d6,d1 + jsrlib Close ; lukker newfile + moveq.l #0,d0 + move.l d0,(userfile,MainBase) + move.l #userfilename,d1 + jsrlib DeleteFile ; sletter gammel brukerfil + move.l #newuserfilename,d1 + move.l #userfilename,d2 + jsrlib Rename + tst.l d0 + beq.b 9$ + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,(userfile,MainBase) + beq 9$ + move.w #Error_OK,m_Error(a3) ; Ingen feil + bra.b 9$ + +81$ move.w #Error_Not_Found,m_Error(a3) +8$ move.l d6,d1 ; lukker, og sletter newuserfile + jsrlib Close +82$ move.l #newuserfilename,d1 + jsrlib DeleteFile +9$ move.l exebase,a6 + pop a3/a2/d2-d7 + rts + +; d0 = brukernr +; a0 = table +; ret: z = 1, bruker er i array'en +10$ move.l (a0)+,d1 + cmp.l d0,d1 + beq.b 19$ + cmp.l #-1,d1 + bne.b 10$ + clrz +19$ rts + +***************************************************************************** +;Error = MatchName(navnstreng,data area) +;m_Error(a0) m_Name(a0) m_Data(a0) +***************************************************************************** + +MatchName + push a2/a3/d2-d7 + move.l a0,a3 + move.l m_Name(a3),d2 ; søke navn + move.l m_Data(a3),a2 ; data område + move.w #Error_OK,m_Error(a3) ; ingen feil kilder ... + moveq.l #match_sizeof,d3 + + move.w #maksisøkebuffer,d0 ; nullstiller bufferet + moveq.l #0,d1 + move.l a2,a0 +1$ move.b d1,m_poeng(a0) + add.l d3,a0 + subq.w #1,d0 + bne.b 1$ + + moveq.l #Log_entry_SIZEOF,d5 + move.l (Users+CStr,MainBase),d4 ; Henter maks antall brukere + subq.l #1,d4 + move.l LogTabelladr(MainBase),a3 + move.l d4,d0 + mulu d5,d0 + add.l d0,a3 ; peker på det siste logentry'et +2$ move.w l_UserBits(a3),d0 ; drept.. Ikke med + and.w #USERF_Killed,d0 + bne.b 3$ + lea l_Name(a3),a1 + move.l d2,a0 + bsr give_points + move.w d0,d6 ; fikk vi noe ? + bmi.b 3$ ; nei. + beq.b 3$ ; nei. +; sett inn på riktig sted + move.l a2,a0 + moveq.l #0,d0 ; d0 = pos å sette inn på +5$ cmp.b m_poeng(a0),d6 + bhi.b 4$ + add.l d3,a0 + addq.l #1,d0 + cmp.w #maksisøkebuffer,d0 + bcs.b 5$ + bra.b 3$ +4$ move.l a0,d7 ; husker plassen + move.l a2,a1 + move.w #maksisøkebuffer,d1 + mulu d3,d1 + add.l d1,a1 + move.l a1,a0 + sub.l d3,a0 + neg.w d0 + addq.w #maksisøkebuffer-1,d0 + bmi.b 6$ + beq.b 6$ + mulu d3,d0 + bsr memcopyrlen +6$ move.l d7,a0 + move.b d6,m_poeng(a0) + lea m_navn(a0),a1 + lea l_Name(a3),a0 + bsr strcopy +3$ sub.l d5,a3 + subq.l #1,d4 + bcc.b 2$ + pop a2/a3/d2-d7 + rts + +***************************************************************************** +;SetAvailSysop(boolean) +; m_Data +***************************************************************************** +SetAvailSysop + push d2 + move.w #Error_OK,m_Error(a0) + move.l m_Data(a0),d0 + bne.b 2$ + or.w #MainBitsF_SysopNotAvail,MainBits(MainBase) ; setter sysop not avail + bra.b 1$ +2$ and.w #~MainBitsF_SysopNotAvail,MainBits(MainBase) ; setter sysop avail +1$ move.l d0,d2 ; husker status + + move.l mainwindowadr,d0 ; har vi vindu ? + beq.b 9$ ; nope. Gjør ikke noe. + move.l intbase,a6 ; vekk med meny + move.l d0,a0 + jsrlib ClearMenuStrip + move.l (mainmenustruct),a0 + move.w #1+(0<<5),d0 + jsrlib ItemAddress + move.l d0,a0 + move.l d2,d0 + beq.b 3$ + and.w #~CHECKED,(mi_Flags,a0) ; Oppdaterer menu item'et + bra.b 4$ +3$ or.w #CHECKED,(mi_Flags,a0) ; Oppdaterer menu item'et +4$ move.l mainwindowadr,a0 ; og opp med menyen igjen + move.l (mainmenustruct),a1 + jsrlib ResetMenuStrip +9$ move.l exebase,a6 + pop d2 + rts + +***************************************************************************** +;Error = DeleteDir (dir nr) +;m_Error m_UserNr +***************************************************************************** +DeleteDir + push a2/d2/d3/a3 + move.l a0,a2 + move.l m_UserNr(a2),d2 ; Dir nr * 1 + move.w #Error_Not_Found,m_Error(a2) + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (n_DirName,a3),a3 + move.l d2,d0 + mulu #FileDirRecord_SIZEOF,d0 + add.l d0,a3 + tst.b (a3) + beq 9$ ; Allerede slettet. + move.l a3,a0 + bsr createdirfilepath ; lager i txtbuffer + move.w #Error_File,m_Error(a2) + move.l d2,d0 + lsl.l #2,d0 + move.l (n_Filedirfiles,MainBase),a0 + btst #CflagsB_CacheFL,(Cflags2+CStr,MainBase) ; cache ? + beq.b 2$ ; nei. + move.l (a0,d0.l),d1 + beq.b 3$ ; ingen fil. Rart.. + moveq.l #0,d3 + move.l d3,(a0,d0.l) ; sletter ptr. + move.l d1,a1 + move.l (first_file,a1),d3 ; husker første fil (hvis noen) + move.l (flpool,MainBase),a0 + move.l #fileentryheader_sizeof,d0 + jsr _AsmFreePooled +4$ tst.l d3 ; har vi fil ? + beq.b 3$ ; nope, ferdig + move.l d3,a1 ; frigir alle mem copy'ene + move.l (mem_fnext,a1),d3 + move.l (flpool,MainBase),a0 + moveq.l #mem_Fileentry_SIZEOF,d0 + jsr _AsmAllocPooled + bra.b 4$ + +2$ move.l dosbase,a6 + bsr closefile + tst.l d0 + beq.b 9$ +3$ move.l dosbase,a6 + lea txtbuffer(MainBase),a0 ; Filnavn (path/fildir.fl) + move.l a0,d1 + jsrlib DeleteFile + tst.l d0 + beq.b 9$ + move.w #Error_Open_File,m_Error(a2) + move.b #0,(a3) ; sletter i config + move.w d2,d0 + add.w #1,d0 + + move.l (firstFileDirRecord+CStr,MainBase),a0 ; rydder opp i fileorder + moveq.l #0,d1 + move.w (MaxfileDirs+CStr,MainBase),d1 + subq.l #1,d1 +6$ cmp.w (n_FileOrder,a0),d0 + lea (FileDirRecord_SIZEOF,a0),a0 + dbeq d1,6$ + cmp.w #-1,d1 + beq.b 7$ ; fant ikke.. Error. ferdig. + sub.l #FileDirRecord_SIZEOF,a0 +5$ move.b (n_FileOrder+FileDirRecord_SIZEOF,a0),(n_FileOrder,a0) ; sletter denne + lea (FileDirRecord_SIZEOF,a0),a0 + dbeq d1,5$ + move.b #0,(-FileDirRecord_SIZEOF+n_FileOrder,a0) ; og sletter siste +7$ subq.w #1,(ActiveDirs+CStr,MainBase) + bcc.b 1$ + move.w #0,(ActiveDirs+CStr,MainBase) +1$ bsr main_saveconfig ; lagrer config + beq.b 9$ + move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + pop a2/d2/d3/a3 + rts + +***************************************************************************** +;Error = RenameDir (dir nr, new name) +;m_Error m_UserNr,m_Name +***************************************************************************** +RenameDir + push a2/d2/a3 + move.l a0,a2 + move.l m_UserNr(a2),d2 ; Dir nr * 1 + move.w #Error_Not_Found,m_Error(a2) + move.l m_Name(a2),a0 ; bygger opp new name + bsr createdirfilepath ; lager i txtbuffer + lea txt2buffer(MainBase),a1 + move.l d0,a0 + bsr strcopy + move.l (firstFileDirRecord+CStr,MainBase),a3 ; bygger opp old name + lea (n_DirName,a3),a3 + move.l d2,d0 + mulu #FileDirRecord_SIZEOF,d0 + add.l d0,a3 + move.l a3,a0 + tst.b (a0) + beq.b 9$ ; Finnes ingen dir her + bsr createdirfilepath ; lager i txtbuffer + move.l dosbase,a6 + move.w #Error_File,m_Error(a2) + lea txtbuffer(MainBase),a0 ; Filnavn (path/fildir.fl) + move.l a0,d1 ; oldname + lea txt2buffer(MainBase),a0 ; Filnavn (path/fildir.fl) + move.l a0,d2 ; new name + jsrlib Rename + tst.l d0 + beq.b 9$ + move.w #Error_Open_File,m_Error(a2) + + move.l m_Name(a2),a0 + move.l a3,a1 + bsr strcopy + bsr main_saveconfig ; lagrer config + beq.b 9$ + move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + pop a2/d2/a3 + rts + +***************************************************************************** +;Error = DeleteConference (conf nr, data area) DELCONF +;m_Error m_UserNr m_Data +***************************************************************************** +DeleteConference + push d2-d7/a2/a3 + move.l a0,a3 ; husker meldingen + move.l m_Data(a3),a2 ; data område + move.l a2,d7 + move.l m_UserNr(a3),d5 ; conferanse nr * 1 + move.w #Error_Not_Found,m_Error(a3) + cmp.w (Maxconferences+CStr,MainBase),d5 + bcc 9$ + move.w #Error_Not_allowed,m_Error(a3) + cmp.w #4,d5 ; ikke lov å slette de 4 første + bcs 9$ + + lea (u_almostendsave,a2),a2 + move.w d5,d0 + mulu #Userconf_seizeof,d0 + add.l d0,a2 ; Har nå adressen til access word'et + move.l dosbase,a6 + move.w #Error_Open_File,m_Error(a3) + move.l userfile(MainBase),d4 ; tar først og sletter accessen + beq 9$ ; ingen userfil. Ut.. + move.w #Error_File,m_Error(a3) ; til denne conferansen for alle + move.l d4,d1 ; søker tilbake + moveq.l #0,d2 + moveq.l #OFFSET_BEGINNING,d3 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l (UserrecordSize+CStr,MainBase),d6 ; brukere +1$ move.l d4,d1 ; leser inn bruker + move.l d7,d2 + move.l d6,d3 + jsrlib Read + tst.l d0 + beq.b 2$ + cmp.l d3,d0 + bne 8$ + moveq.l #0,d0 + move.w d0,(uc_Access,a2) ; sletter conf access + move.l d0,(uc_LastRead,a2) ; sletter last read + move.l d4,d1 ; søker tilbake + move.l d6,d2 + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 ; og lagrer brukeren + move.l d6,d3 + move.l d7,d2 + jsrlib Write + cmp.l d0,d3 + bne 8$ + bra.b 1$ ; fortsetter +2$ move.l d4,d1 + jsrlib Close + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq 9$ + move.l d5,d2 + lsl.l #2,d2 + move.l d2,d0 + move.l (n_MsgTextfiles,MainBase),a0 ; lukker filene + bsr closefile + move.l d2,d0 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr closefile + + lea (n_ConfName+n_FirstConference+CStr,MainBase),a0 + move.l d5,d0 + mulu #ConferenceRecord_SIZEOF,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + tst.b (a0) ; er den en conferanse her ? + beq.b 3$ ; nei, hopper over del + move.l a0,a2 ; husker + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,d1 + jsrlib DeleteFile + move.l a2,a0 + lea dotmessagestext,a1 + bsr createconffilepath + move.l d0,d1 + jsrlib DeleteFile +3$ move.l exebase,a6 + move.w #Error_Open_File,m_Error(a3) + moveq.l #0,d0 + move.b d0,(n_ConfName,a2) ; sletter alt + move.b d0,(n_ConfBullets,a2) + move.l d0,(n_ConfDefaultMsg,a2) + move.l d0,(n_ConfFirstMsg,a2) + move.w d0,(n_ConfSW,a2) + move.w d0,(n_ConfMaxScan,a2) + +; JEO Sletter ikke n_ConfOrder + + move.w d5,d0 ; max konfer i bruk d5 + add.w #1,d0 ; pluss 1 + lea (n_FirstConference+CStr,MainBase),a0 ; Peker til første i a0 +; moveq.l #0,d1 +; move.w (Maxconferences+CStr,MainBase),d1 ; Max_confer i d1 +; subq.l #1,d1 ; minus 1 +;6$ cmp.w (n_ConfOrder,a0),d0 +; lea (ConferenceRecord_SIZEOF,a0),a0 +; dbeq d1,6$ +; cmp.w #-1,d1 +; beq.b 7$ ; fant ikke.. Error. ferdig. +; lea (-ConferenceRecord_SIZEOF,a0),a0 +;5$ move.w (n_ConfOrder+ConferenceRecord_SIZEOF,a0),(n_ConfOrder+a0) ; sletter denne +; lea (ConferenceRecord_SIZEOF,a0),a0 +; dbeq d1,5$ +; move.w #0,(n_ConfOrder-ConferenceRecord_SIZEOF,a0) ; og sletter siste + +7$ subq.w #1,(ActiveConf+CStr,MainBase) ; tar bort 1 i teller + bcc.b 4$ ; sikkerhet + move.w #0,(ActiveConf+CStr,MainBase) +4$ bsr main_saveconfig ; lagrer config + beq.b 9$ + move.w #Error_OK,m_Error(a3) +; bra.b 9$ +8$; move.l d4,d1 ; hvorfor lukke ?? +; jsrlib Close +9$ move.l exebase,a6 + pop a2/a3/d2-d7 + rts + +***************************************************************************** +;Error = CleanConference (conf nr, data area) +;m_Error m_UserNr m_Data +***************************************************************************** +CleanConference + push d2-d7/a2/a3 + move.l a0,a3 + move.l m_Data(a3),a2 ; data område + move.l a2,d7 + move.l m_UserNr(a3),d5 ; conferanse nr + move.w #Error_Not_Found,m_Error(a3) + cmp.w (Maxconferences+CStr,MainBase),d5 + bcc 9$ + lea (u_almostendsave,a2),a2 + move.w d5,d0 + mulu #Userconf_seizeof,d0 + lea (uc_LastRead,a2,d0.l),a2 ; Har nå adressen til last read + + move.l dosbase,a6 + move.w #Error_Open_File,m_Error(a3) + move.l userfile(MainBase),d4 ; tar først og sletter last read + beq 9$ + move.w #Error_File,m_Error(a3) ; til denne conferansen for alle + move.l d4,d1 ; søker tilbake + moveq.l #0,d2 + moveq.l #OFFSET_BEGINNING,d3 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l (UserrecordSize+CStr,MainBase),d6 ; brukere +1$ move.l d4,d1 ; leser inn bruker + move.l d7,d2 + move.l d6,d3 + jsrlib Read + tst.l d0 + beq.b 2$ + cmp.l d3,d0 + bne 8$ ; read error + moveq.l #0,d0 + move.l d0,(a2) ; sletter last read + move.l d4,d1 ; søker tilbake + move.l d6,d2 + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 ; og lagrer brukeren + move.l d6,d3 + move.l d7,d2 + jsrlib Write + cmp.l d0,d3 + bne 8$ ; write error + bra.b 1$ ; fortsetter +2$ move.l d4,d1 + jsrlib Close + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq 9$ + move.l d5,d2 + lsl.l #2,d2 + move.l d2,d0 + move.l (n_MsgTextfiles,MainBase),a0 ; lukker filene + bsr closefile + move.l d2,d0 + move.l (n_MsgHeaderfiles,MainBase),a0 + bsr closefile + + move.l d5,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a0 + moveq.l #0,d1 + move.l d1,(n_ConfDefaultMsg,a0) + ; sletter filene + lea (n_ConfName,a0),a0 ; Har konferanse navnet. + tst.b (a0) ; er det en conferanse her ? + beq 9$ ; nei, hopper over del + move.l a0,a2 + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,d1 + + move.w #Error_Open_File,m_Error(a3) + move.l dosbase,a6 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d3 + beq 9$ + move.l a2,a0 + lea dotmessagestext,a1 + bsr createconffilepath + move.l d0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + + move.l d5,d1 + lsl.l #2,d1 + move.l (n_MsgTextfiles,MainBase),a0 + move.l d0,0(a0,d1.w) + bne.b 5$ + move.l d3,d1 + jsrlib Close + bra.b 9$ +5$ move.l (n_MsgHeaderfiles,MainBase),a0 + move.l d3,0(a0,d1.w) + + bsr main_saveconfig ; lagrer config + beq.b 9$ + move.w #Error_OK,m_Error(a3) + bra.b 9$ +8$ move.l d4,d1 + jsrlib Close +9$ move.l exebase,a6 + pop a2/a3/d2-d7 + rts + +***************************************************************************** +;Error = RenameConference (conf nr, new name, new status bits) +;m_Error m_UserNr,m_Name, m_Data +***************************************************************************** +RenameConference + push a2/d2/d3/a3 + move.l a0,a2 + move.l m_UserNr(a2),d2 ; confnr * 1 + lea (n_FirstConference+CStr,MainBase),a3 + move.l d2,d0 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a3 ; har conference strukturen + move.l m_Name(a2),d0 ; skal vi bytte navn ? + beq 1$ ; nei + move.w #Error_Not_Found,m_Error(a2) + + move.l m_Name(a2),a0 ; bygger opp new name + lea dotmessagestext,a1 + bsr createconffilepath + move.l d0,a0 + lea txt2buffer(MainBase),a1 + bsr strcopy + + lea (n_ConfName,a3),a0 ; bygger opp old name + tst.b (a0) + beq 9$ ; Finnes ingen conf her + move.l a0,d3 ; husker navnet .. + lea dotmessagestext,a1 + bsr createconffilepath + + move.l dosbase,a6 + move.w #Error_File,m_Error(a2) + move.l d0,d1 ; oldname + lea txt2buffer(MainBase),a0 ; Filnavn (path/confnavn.h) + move.l a0,d2 ; new name + jsrlib Rename + tst.l d0 + beq.b 9$ + + move.l m_Name(a2),a0 ; bygger opp new name + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,a0 + lea txt2buffer(MainBase),a1 + bsr strcopy + + move.l d3,a0 ; så tar vi .h filen + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,d1 ; oldname + lea txt2buffer(MainBase),a0 ; Filnavn (path/confnavn.h) + move.l a0,d2 ; new name + jsrlib Rename + tst.l d0 + beq.b 9$ +1$ move.l m_Data(a2),d0 ; skal vi forandre bits ? + beq.b 2$ ; nei + move.w d0,(n_ConfSW,a3) ; oppdaterer conf bit'ene +2$ move.w #Error_Open_File,m_Error(a2) + + lea (n_ConfName,a3),a1 + move.l m_Name(a2),a0 + bsr strcopy + move.l exebase,a6 + bsr main_saveconfig ; lagrer config + beq.b 9$ + move.w #Error_OK,m_Error(a2) +9$ move.l exebase,a6 + pop a2/d2/d3/a3 + rts + +***************************************************************************** +;Error = ChangeName (New name, data area, usernr, franode) +;m_Error m_Name m_Data m_UserNr m_arg +***************************************************************************** +ChangeName + push a2/a3/d2/d3/d4/d5 + move.l a0,a3 ; tar vare på meldingen + move.w #Error_Not_Found,m_Error(a3) + move.l m_arg(a3),d3 ; fra node nr + move.l m_UserNr(a3),d5 + cmp.l (MaxUsers+CStr,MainBase),d5 ; Sjekk om brukernr < maks brukernr. + bhi 9$ ; For høy. Error. + move.w #Error_Found,m_Error(a3) + move.l m_Name(a3),a0 ; sjekker om det er noen med det + bsr finnlogentrynavn ; navnet vi vil bytte til + beq.b 5$ ; fant ikke. Ok. + lea (l_Name,a0),a1 + move.l m_Name(a3),a0 ; sjekker om det er samme navnet + bsr comparestringsicase + bne 9$ ; nei, ikke samme, ut .. +5$ move.w #Error_User_Active,m_Error(a3) + + move.l nodelist+LH_HEAD,a0 ; går igjennom alle nodene +1$ move.l (LN_SUCC,a0),d0 + beq.b 2$ ; ferdig + cmp.w Nodenr(a0),d3 ; er dette nodenr'et vi kommer fra ? + beq.b 3$ ; ja, da hoppe vi over testen + cmp.l Nodeusernr(a0),d5 ; samme usernr ? + beq 9$ ; da er brukeren aktiv et annet sted +3$ move.l d0,a0 + bra.b 1$ ; looper til slutten + +2$ move.l NrTabelladr(MainBase),a0 ; Henter logentry'et + lsl.l #2,d5 + move.l 0(a0,d5.l),d5 ; Henter Lognr + move.l d5,d0 + mulu #Log_entry_SIZEOF,d0 + move.l LogTabelladr(MainBase),a0 + lea 0(a0,d0.l),a2 ; Henter Logentry + move.l dosbase,a6 ; henter inn bruker i m_data + move.w #Error_Open_File,m_Error(a3) + move.l userfile(MainBase),d4 + beq 9$ + move.l d4,d1 + move.w #Error_File,m_Error(a3) ; søker til riktig post + moveq.l #OFFSET_BEGINNING,d3 + move.l l_RecordNr(a2),d2 + move.l (UserrecordSize+CStr,MainBase),d0 + mulu d0,d2 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + jsrlib Read ; Les inn recorden + moveq.l #-1,d1 ; read/write error ?? + cmp.l d0,d1 + beq 8$ + move.l m_Data(a3),a0 ; fornadrer navnet i m_data + lea Name(a0),a1 + move.l m_Name(a3),a0 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + move.l d4,d1 ; søker tilbake + move.l (UserrecordSize+CStr,MainBase),d2 + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + bsr testseekerror + bne 8$ ; error + move.l d4,d1 ; saver bruker. + move.l m_Data(a3),d2 + move.l (UserrecordSize+CStr,MainBase),d3 + jsrlib Write + moveq.l #-1,d1 ; read/write error ?? + cmp.l d0,d1 + beq.b 8$ + move.l d4,d1 + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) + move.w #Error_Open_File,m_Error(a3) + move.l #userfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,userfile(MainBase) + beq 9$ + move.l exebase,a6 ; userfile er oppdatert + lea l_Name(a2),a1 ; Oppdaterer navnet i logentry'et + move.l m_Name(a3),a0 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + move.l m_Data(a3),a0 ; henter copy space + move.l d5,d0 + move.l a2,a1 + bsr movelogentry ; flytter logentry'et til riktig plass + move.w #Error_Open_File,m_Error(a3) + bsr savehash ; og lagrer log tabellen + beq.b 9$ + move.l (SYSOPUsernr+CStr,MainBase),d0 + cmp.l m_UserNr(a3),d0 ; er dette sysop ? + bne.b 4$ ; nei ... + move.l m_Name(a3),a0 + lea (SYSOPname+CStr,MainBase),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + bsr main_saveconfig ; lagrer config + beq.b 9$ +4$ move.w #Error_OK,m_Error(a3) + bra.b 9$ +8$ move.l d4,d1 + jsrlib Close +9$ move.l exebase,a6 + pop a2/a3/d2/d3/d4/d5 + rts + +******************************************************************************* +* support kode for node kommandoer +******************************************************************************* + +****************************** +;result = comparestringsicasespes (streng,streng1) +;Zero bit/minus bit a0.l a1.l +****************************** +comparestringsicasespes +1$ move.b (a0)+,d0 + beq.b 2$ + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + beq.b 3$ + bsr upchar + cmp.b d0,d1 + bne.b 9$ + bra.b 1$ +2$ tst.b (a1) + beq.b 9$ + cmp.b #'.',(a1) + bne.b 9$ + setn + rts +3$ clrz +9$ clrn + rts + +; d0 = logentrynr +; a0 = copy space +; a1 = entryet +movelogentry + push a2/a3/d2-d6 + move.l a0,a2 ; entry'et + lea l_Name(a1),a3 ; det nye navnet + moveq.l #0,d3 ; ny plass (0 foreløpig) +; finn hvilken plass entry'et skal ha + move.l (Users+CStr,MainBase),d4 ; Henter maks antall brukere + beq.b 9$ ; ingen brukere (umulig, men ..) + subq.l #1,d4 ; hi + beq.b 9$ ; bare en bruker, ferdig .. + moveq.l #Log_entry_SIZEOF,d5 + move.l d0,d6 ; nåværende plass + bne.b 1$ ; ikke først + move.l d5,d0 + bsr.b 11$ ; sjekker den ovenfor + blo.b 9$ ; søke navn mindre, dvs ferdig + bra.b 4$ ; skal søke oppover +1$ cmp.l d6,d4 + bhi.b 2$ ; ligger ikke i noen ende + move.l d4,d0 + subq.l #1,d0 + mulu d5,d0 + bsr.b 11$ ; sjekker den nedenfor + bhi.b 9$ ; søke navn større, dvs ferdig + bra.b 3$ ; skal søke nedover +2$ move.l d6,d0 + addq.l #1,d0 + bsr.b 10$ ; sjekker den nedenfor + bhi.b 4$ ; søke navn større, søk oppover + move.l d6,d0 + subq.l #1,d0 + bsr.b 10$ ; sjekker den nedenfor + bcc.b 9$ ; ikke mindre, dvs står riktig +3$ move.l d6,d3 ; søker nedover + subq.l #1,d3 + move.l d3,d2 + mulu d5,d2 +31$ move.l d2,d0 + bsr.b 11$ + bhi.b 39$ ; søke navn større, dvs ferdig + subq.l #1,d3 + bcs.b 39$ ; nederst. ferdig + sub.l d5,d2 + bra.b 31$ +39$ addq.l #1,d3 + bra.b 5$ +4$ move.l d6,d3 ; søker oppover + addq.l #1,d3 + move.l d3,d2 + mulu d5,d2 +41$ move.l d2,d0 + bsr.b 11$ + blo.b 49$ ; søke navn mindre, dvs ferdig + addq.l #1,d3 + cmp.l d3,d4 + bcs.b 49$ ; nederst. ferdig + add.l d5,d2 + bra.b 41$ +49$ subq.l #1,d3 +5$ move.l d6,d0 ; nåværende plass + move.l d3,d1 ; ny plass + move.l a2,a0 ; copy space + bsr.b 20$ ; foretar selve flyttingen +9$ pop a2/a3/d2-d6 + rts + +10$ mulu d5,d0 +11$ move.l LogTabelladr(MainBase),a0 ; sjekker mot plass i d0 + add.l d0,a0 + lea l_Name(a0),a1 + move.l a3,a0 + moveq.l #Sizeof_NameT,d0 + bra comparestringsifull + +; d0 = nåværende plass +; d1 = ny plass +; a0 = copy space +20$ push a2/a3/d2/d3/d4 + cmp.l d0,d1 ; samme ? + beq.b 29$ ; ferdig + move.l d0,d2 ; fra + move.l d1,d3 ; til + move.l a0,a2 + move.l a0,a1 ; kopierer entryet til copyspace + move.l LogTabelladr(MainBase),a0 + mulu #Log_entry_SIZEOF,d0 + add.l d0,a0 + moveq.l #Log_entry_SIZEOF,d0 + move.l a0,a3 ; husker starten på fra entry'et + bsr memcopylen + move.l a3,a0 ; henter fram fra entry adressen + moveq.l #Log_entry_SIZEOF,d1 + move.l d2,d0 + sub.l d3,d0 ; hvilken retning ? + bcs.b 21$ ; vi skal flytte oppover + move.l d0,d4 ; d4 = antall plasser å flytte + move.l a0,a1 ; flytter nedover + add.l d1,a1 + move.l d1,d0 + mulu d4,d0 + move.l LogTabelladr(MainBase),a3 ; beregner laveste adresse + mulu d3,d1 + add.l d1,a3 ; og husker den. + move.l d3,d2 ; husker nr'et også + bsr memcopyrlen ; flytter .... + bra.b 22$ +21$ neg.l d0 ; flytter oppover + move.l d0,d4 ; d4 = antall plasser å flytte + move.l a0,a1 + add.l d1,a0 + move.l d1,d0 + mulu d4,d0 + move.l a1,a3 ; husker laveste adresse +; move.l d2,d2 ; husker nr'et også + bsr memcopylen ; flytter ... +22$ move.l d3,d1 ; beregner adressen til til + move.l LogTabelladr(MainBase),a1 + moveq.l #Log_entry_SIZEOF,d0 + mulu d0,d1 + add.l d1,a1 + move.l a2,a0 ; kopierer det entryet vi har + bsr memcopylen ; flyttet til ny plass +; oppdater Nrtabellen. + move.l NrTabelladr(MainBase),a0 + moveq.l #Log_entry_SIZEOF,d1 +; d2 = nr til laveste entry +; d4 = antall vi har flyttet +; a3 = adr til laveste entry +23$ move.l l_UserNr(a3),d0 + lsl.l #2,d0 + move.l d2,0(a0,d0.l) + add.l d1,a3 + addq.l #1,d2 + subq.l #1,d4 + bcc.b 23$ +29$ pop a2/a3/d2/d3/d4 + rts + +give_points + push d2 + moveq.l #0,d2 ; antall poeng + move.b (a1)+,d0 ; sjekker fornavnet + bsr upchar ; rører ikke annet en d0 + move.b d0,d1 + move.b (a0)+,d0 + bsr upchar ; rører ikke annet en d0 + cmp.b d0,d1 ; er første bokstav lik ? + bne.b 8$ ; nei, null poeng + addq.l #1,d2 ; gir poeng for match +1$ move.b (a0)+,d0 + beq.b 8$ ; error, EOString + cmp.b #' ',d0 ; mellomrom ? + beq.b 2$ ; ja, går over til etternavn + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + beq.b 8$ ; feil.. + bsr upchar + addq.l #1,d2 ; gir poeng + cmp.b d0,d1 ; tester tegn + beq.b 1$ ; de er like.. fortsetter + subq.l #2,d2 ; feil, tar tilbake poeng + 1 for feil + bra.b 1$ +2$ move.b (a1)+,d1 ; søker etter mellomrom i navnet + beq.b 8$ ; feil.. + cmp.b #' ',d1 + bne.b 2$ +3$ move.b (a1)+,d0 ; sjekker etternavnet + bsr upchar + move.b d0,d1 + move.b (a0)+,d0 + bsr upchar + cmp.b d0,d1 ; er første bokstav lik ? + bne.b 8$ ; nei, null poeng + addq.l #2,d2 ; gir poeng for match +4$ move.b (a0)+,d0 + beq.b 9$ ; ferdig + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + beq.b 6$ ; feil.. + bsr upchar + addq.l #2,d2 ; gir poeng + cmp.b d0,d1 ; tester tegn + beq.b 4$ ; de er like.. fortsetter +5$ subq.l #4,d2 ; feil, tar tilbake poeng + 1 for feil (*2) + bra.b 4$ +6$ subq.l #1,a1 ; korigerer a1 + bra.b 5$ ; og prøver videre +8$ moveq.l #0,d2 ; returnerer null poeng +9$ move.l d2,d0 + pop d2 + rts + +; a0 = peker til navn vi skal finne. +; returnerer: a0, logentry til dette navnet +; Z = 0, Fant logentry'et +finnlogentrynavn + push a2/a3/d2-d5 + move.l a0,a3 ; lager peker til navnet + move.l (Users+CStr,MainBase),d4 ; Henter antall brukere + beq.b 9$ ; ingen brukere (usansynelig) + subq.l #1,d4 ; hi + moveq.l #0,d2 ; lo + moveq.l #Log_entry_SIZEOF,d5 +1$ cmp.l d2,d4 + bcs.b 4$ + move.l d2,d3 + add.l d4,d3 + lsr.l #1,d3 ; mid = (lo + hi) / 2 + move.l d3,d0 + mulu d5,d0 + move.l LogTabelladr(MainBase),a2 + lea 0(a2,d0.l),a2 + lea l_Name(a2),a1 + move.l a3,a0 + moveq.l #Sizeof_NameT,d0 + bsr comparestringsifull + blo.b 2$ ; søke navn mindre + bhi.b 3$ ; søke navn større + bra.b 8$ ; egentlig beq, men det er kun beq som kommer hit. +2$ move.l d3,d4 + subq.l #1,d4 + bcc.b 1$ + bra.b 4$ ; Vi fant ikke noe. +3$ move.l d3,d2 + addq.l #1,d2 + bra.b 1$ +4$ setz + bra.b 9$ +8$ move.l a2,a0 ; vi fant den + clrz +9$ pop a2/a3/d2-d5 + rts + +; a0 = navnet vi skal slette ifra log tabellen +deletelogentry + bsr finnlogentrynavn ; finner log entry'en, gir peker til starten i a0 + beq.b 9$ ; finnes ikke.. (sletta :-) + move.l (Users+CStr,MainBase),d0 ; Henter maks antall brukere + subq.l #1,d0 ; hi + moveq.l #Log_entry_SIZEOF,d1 + mulu d1,d0 + add.l LogTabelladr(MainBase),d0 ; har nå starten på siste logentry + sub.l a0,d0 ; trekker fra starten på dette, har da + beq.b 8$ ; antall bytes som skal kopieres + bcs.b 8$ ; sjekker for underflow + move.l a0,a1 + add.l d1,a0 + jsr memcopylen ; sletter ved å flytte de andre +8$ clrz +9$ rts + +; a0 = peker til log entry som skal settes inn. +; returnerer plassen i d0. +insertlogentry + movem.l a2/a3/d2-d7,-(sp) + move.l a0,a3 + moveq.l #0,d3 ; setter d3 til 0, i tilfelle vi hopper til 7$ + move.l (Users+CStr,MainBase),d4 + subq.l #1,d4 + bcs.b 7$ + moveq.l #0,d2 + moveq.l #Log_entry_SIZEOF,d6 + +1$ cmp.l d2,d4 + bcs.b 4$ + move.l d2,d3 + add.l d4,d3 + lsr.l #1,d3 ; mid = (lo + hi) / 2 + move.l d3,d0 + mulu d6,d0 + move.l LogTabelladr(MainBase),a2 + lea 0(a2,d0.l),a2 + lea l_Name(a2),a1 + lea l_Name(a3),a0 + moveq.l #Sizeof_NameT,d0 + bsr comparestringsifull + blo.b 2$ ; søke navn mindre + bhi.b 3$ ; søke navn større + setz + bra 9$ ; Den finnes fra før !! +2$ move.l d3,d4 + beq.b 4$ ; sikkerhet + subq.l #1,d4 + bra.b 1$ +3$ move.l d3,d2 + addq.l #1,d2 + bra.b 1$ +4$ move.l (Users+CStr,MainBase),d0 ; Passer på at vi ikke kommer + subq.l #1,d0 ; utenfor (på overkant) + cmp.l d0,d4 + bls.b 5$ + move.l d0,d4 +5$ move.l d4,d3 + move.l d4,d0 + mulu d6,d0 + move.l LogTabelladr(MainBase),a2 + lea 0(a2,d0.l),a2 + lea l_Name(a2),a1 + lea l_Name(a3),a0 + moveq.l #Sizeof_NameT,d0 + bsr comparestringsifull + blo.b 7$ ; søke navn mindre + addq.l #1,d3 ; søke navn større, dvs etter denne. + +; nå er plassen den skal inn på i d3. +7$ move.l (Users+CStr,MainBase),d2 + move.l MaxNumLogEntries(MainBase),d1 + cmp.l d2,d1 + bhi 11$ ; vi har plass + moveq.l #50,d0 + add.l d0,d1 ; øker med 50 plasser + move.l d1,d0 + move.l d1,-(a7) + mulu d6,d0 + lsl.l #2,d1 + add.l d1,d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,d7 + bne.b 12$ + addq.l #4,sp ; pop'er d1 + setz + bra 9$ ; Vi fikk ikke allokert noe +12$ move.l d7,a1 + move.l (a7),d0 ; henter ny maxnumlogentrys + lsl.l #2,d0 + add.l d0,a1 ; beregner ny start av logtabellen + move.l LogTabelladr(MainBase),a0 + move.l MaxNumLogEntries(MainBase),d0 + mulu d6,d0 + jsr memcopylen ; kopierer tabellen over i større minne + move.l d7,a1 ; starten for ny nrtabell + move.l NrTabelladr(MainBase),a0 + move.l MaxNumLogEntries(MainBase),d0 + lsl.l #2,d0 + jsr memcopylen ; kopierer nr tabellen + + move.l NrTabelladr(MainBase),a1 ; frigir gammelt minne + move.l MaxNumLogEntries(MainBase),d0 + moveq.l #Log_entry_SIZEOF+4,d1 + mulu d1,d0 ; har nå minne i bytes + jsrlib FreeMem + + move.l (a7)+,d1 + move.l d1,MaxNumLogEntries(MainBase) ; oppdaterer + move.l d7,NrTabelladr(MainBase) + lsl.l #2,d1 + add.l d1,d7 + move.l d7,LogTabelladr(MainBase) + move.l (Users+CStr,MainBase),d2 + +11$ subq.l #1,d2 + move.l d2,d5 + mulu d6,d2 + move.l LogTabelladr(MainBase),a2 +; d2 = maks * size +; d3 = plassen +; d5 = maks +10$ cmp.l d3,d5 ; Har vi flyttet alle vi må flytte ? + blt.b 8$ ; Jepp. + subq.l #1,d5 ; Logentry'ene starter på 0.. + + lea 0(a2,d2.l),a0 ; Finner starten på denne + lea Log_entry_SIZEOF(a2,d2.l),a1 ; Finner ny start + move.l l_UserNr(a0),-(a7) ; Husker bruker nummeret + moveq.l #Log_entry_SIZEOF,d0 + jsr memcopylen ; kopierer til ny plass + move.l NrTabelladr(MainBase),a0 ; Oppdaterer Nrtabellen + move.l (a7)+,d0 ; henter ut usernr'et igjen + lsl.l #2,d0 ; * 4 + addq.l #1,0(a0,d0.l) ; og oppdaterer (vi har flyttet + sub.l d6,d2 + bra.b 10$ ; og her starter vi ... + +;Nå er det bare å sette inn. (d3 er plass nr'et) +8$ move.l d3,d4 + mulu d6,d3 + lea 0(a2,d3.l),a1 ; Finner starten på denne + move.l a3,a0 + move.l l_UserNr(a0),-(a7) ; Husker bruker nummeret + moveq.l #Log_entry_SIZEOF,d0 + jsr memcopylen ; kopierer inn på plassen + move.l NrTabelladr(MainBase),a0 ; Oppdaterer Nrtabellen + move.l (a7)+,d0 ; henter ut usernr'et igjen + lsl.l #2,d0 ; * 4 + move.l d4,0(a0,d0.l) ; setter inn i NrTabell. + move.l d4,d0 + clrz ; Alt gikk ok. +9$ movem.l (sp)+,a2/a3/d2-d7 + rts + +main_saveconfig + push d2-d4 + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 1$ + move.l d4,d1 + lea (CStr,MainBase),a0 + move.l a0,d2 + move.l (Configsize,a0),d3 + jsrlib Write + move.l d4,d1 + move.l d0,d2 ; husker bytes skrevet + jsrlib Close + cmp.l d3,d2 ; skrev vi allt ? + notz +1$ pop d2-d4 + move.l exebase,a6 + rts + +savelog push d2-d4/a6 + move.l dosbase,a6 + move.l #indexfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l d4,d1 + move.l LogTabelladr(MainBase),d2 + move.l (Users+CStr,MainBase),d3 ; det finnes Users mange logendtrys + mulu #Log_entry_SIZEOF,d3 + jsrlib Write + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d2,d3 ; Skrev vi alt ? + notz +9$ pop d2-d4/a6 + rts + +****************************** +;savehash - saves hash tables +****************************** + +savehash + bsr savelog + push d2-d4/a6 + move.l dosbase,a6 + + move.l #nrindexfilename,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l d4,d1 + move.l NrTabelladr(MainBase),a0 + move.l a0,d2 + move.l (MaxUsers+CStr,MainBase),d3 + lsl.l #2,d3 ; antall brukere * 4 + jsrlib Write + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d2,d3 ; Skrev vi alt ? + notz +9$ pop d2-d4/a6 + rts + +; a0 = filptr base +; d0 = filnr*4 +; d1 = pos i fila +seekfile + movem.l a2/d2/d3,-(sp) + move.l a0,a2 + add.l d0,a2 + moveq.l #-1,d0 + cmp.l d0,d1 + bne.b 1$ + moveq.l #OFFSET_END,d3 + moveq.l #0,d2 + bra.b 2$ +1$ move.l d1,d2 + moveq.l #OFFSET_BEGINNING,d3 +2$ move.l (a2),d1 + beq.b 9$ ; Filen er ikke åpen. + jsrlib Seek + push d0 + jsrlib IoErr + tst.l d0 + notz + pop d0 +9$ movem.l (sp)+,d2/d3/a2 + rts + +; a0 = filptr base +; d0 = filnr*4 +; d2 = buffer +; d3 = len +readfile + move.l 0(a0,d0.l),d1 + beq.b 7$ + jsrlib Read + tst.l d0 + clrn + beq.b 9$ + cmp.l d0,d3 + clrn + beq.b 8$ +7$ setn +8$ clrz +9$ rts + +; a0 = filptr base +; d0 = filnr*4 +; d2 = buffer +; d3 = len +writefile + move.l 0(a0,d0.l),d1 + beq.b 9$ + jsrlib Write + cmp.l d0,d3 + beq.b 8$ + clrz +8$ notz +9$ rts + +; d0 = dir * 4 +; d1 = offset, if d1 == -1L place at end +; a0 = entry +; ret: z = 1, error +; d0 pos (if ok) +savefileentrycachemode + push d2-d5/a2/a6 + move.l dosbase,a6 + move.l d0,d3 ; dir nr + move.l a0,a2 ; struct + move.l d1,d5 ; offset + move.l (firstFileDirRecord+CStr,MainBase),a0 + lsr.l #2,d0 + mulu #FileDirRecord_SIZEOF,d0 + add.l d0,a0 + lea (n_DirName,a0),a0 + tst.b (a0) + beq.b 9$ ; error: No directory + bsr createdirfilepath ; stores in txtbuffer + move.l d0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ ; error open + move.l d4,d1 + moveq.l #-1,d0 + cmp.l d5,d0 ; to end? + bne.b 1$ ; nope + moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + bra.b 2$ +1$ move.l d5,d2 + moveq.l #OFFSET_BEGINNING,d3 +2$ jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + move.l d4,d1 ; finner pos + moveq.l #0,d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + move.l d0,d5 ; husker pos + move.l d4,d1 + move.l a2,d2 + moveq.l #Fileentry_SIZEOF,d3 + jsrlib Write + cmp.l d0,d3 + bne.b 8$ ; error write + move.l d4,d1 + jsrlib Close + move.l d5,d0 ; returnerer pos + clrz + bra.b 9$ +8$ move.l d4,d1 + jsrlib Close + setz +9$ pop d2-d5/a2/a6 + rts + +closefile + move.l 0(a0,d0.l),d1 + beq.b 9$ + clr.l 0(a0,d0.l) ; sletter + jsrlib Close +9$ moveq.l #1,d0 ; sukse' + rts + +; d0 = dirnum * 4 +openfilefile + movem.l d2/d3,-(a7) + move.l d0,d3 + move.l (firstFileDirRecord+CStr,MainBase),a0 + lsr.l #2,d0 + mulu #FileDirRecord_SIZEOF,d0 + add.l d0,a0 + lea (n_DirName,a0),a0 + tst.b (a0) + beq.b 9$ + bsr createdirfilepath ; lager i txtbuffer + move.l d0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l (n_Filedirfiles,MainBase),a0 + move.l d0,0(a0,d3.w) +9$ movem.l (a7)+,d3/d2 + rts + +; d0 = confnum * 4 +openheaderfile + push d2/d3 + move.l d0,d3 + lea (n_ConfName+n_FirstConference+CStr,MainBase),a0 + lsr.l #1,d0 + mulu #ConferenceRecord_SIZEOF/2,d0 + add.l d0,a0 ; Har konferanse navnet. + tst.b (a0) ; har vi konf der ? + beq.b 9$ ; nope, ut + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l (n_MsgHeaderfiles,MainBase),a0 + move.l d0,(0,a0,d3.w) +9$ pop d3/d2 + rts + +; a0 = fildirname +; a1 = extension +createdirfilepath + lea (dotfilelisttext),a1 + push a2/a3 + move.l a0,a2 + move.l a1,a3 + lea fileheaderpath,a0 + lea txtbuffer(MainBase),a1 ; må bruke denne bufferen.. (renconf bruker dette) + jsr strcopy + subq.l #1,a1 + move.l a2,a0 +1$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 2$ + move.b d0,(a1)+ + cmp.b #'/',d0 + bne.b 1$ + move.b #' ',-1(a1) + bra.b 1$ +2$ move.l a3,a0 + jsr strcopy + lea txtbuffer(MainBase),a0 ; Filnavn + move.l a0,d0 + pop a2/a3 + rts + +; a0 = conf/fil name +; a1 = extension +createconffilepath + push a2/a3 + move.l a0,a2 + move.l a1,a3 + lea conferencepath,a0 + lea txtbuffer(MainBase),a1 ; må bruke denne bufferen.. (renconf bruker dette) + jsr strcopy + subq.l #1,a1 + move.l a2,a0 +1$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 2$ + move.b d0,(a1)+ + cmp.b #'/',d0 + bne.b 1$ + move.b #' ',-1(a1) + bra.b 1$ +2$ move.l a3,a0 + jsr strcopy + lea txtbuffer(MainBase),a0 ; Filnavn + move.l a0,d0 + pop a2/a3 + rts + +; d0 = confnum * 4 +openmsgtextfile + push d2/d3 + move.l d0,d3 + lea (n_ConfName+n_FirstConference+CStr,MainBase),a0 + lsr.l #1,d0 + mulu #ConferenceRecord_SIZEOF/2,d0 + add.l d0,a0 ; Har konferanse navnet. + tst.b (a0) ; har vi konf der ? + beq.b 9$ ; nope, ut + lea dotmessagestext,a1 + bsr createconffilepath + move.l d0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l (n_MsgTextfiles,MainBase),a0 + move.l d0,(0,a0,d3.w) +9$ pop d3/d2 + rts + +;a0 = filename +;a1 = adr +;d0 = size +readinfile + push d2-d5/a6 + move.l dosbase,a6 + move.l d0,d3 + move.l a1,d5 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l d4,d1 + move.l d5,d2 + jsrlib Read + cmp.l d3,d0 + beq.b 1$ + move.l d4,d1 + jsrlib Close + setz + bra.b 9$ +1$ move.l d4,d1 + jsrlib Close + clrz +9$ pop d2-d5/a6 + rts + +openfiles + push d2/d3/d4/d5/a3/a2 + move.l dosbase,a6 + move.l #userfilename,d1 + move.l d1,d5 ; husker filnavn for error + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,(userfile,MainBase) + beq 2$ + move.b (Cflags2+CStr,MainBase),d0 + btst #CflagsB_CacheFL,d0 + beq.b 11$ + bsr readflfiles + beq 99$ + bra.b 3$ ; gikk bra, gå videre + +11$ move.l (n_Filedirfiles,MainBase),a2 + moveq.l #0,d3 + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (n_DirName,a3),a3 +1$ cmp.w (ActiveDirs+CStr,MainBase),d3 + bcc.b 3$ + tst.b (a3) ; er det en file dir her ? + bne.b 7$ ; ja.. + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + moveq.l #0,d0 + move.l d0,(a2)+ ; Sier at denne fila er tom.. + bra.b 1$ +7$ + move.l a3,a0 + bsr createdirfilepath ; lager i txtbuffer + move.l d0,d1 + move.l d1,d5 + move.l #MODE_OLDFILE,d2 + jsrlib Open + addq.l #1,d3 + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + move.l d0,(a2)+ + bne.b 1$ + IFD CreateMissingFiles + move.l d5,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,(-4,a2) + bne.b 1$ + ENDC + bra 2$ + +3$ move.l (n_MsgHeaderfiles,MainBase),a2 + lea (n_FirstConference+n_ConfName+CStr,MainBase),a3 + moveq.l #0,d3 +4$ cmp.w (ActiveConf+CStr,MainBase),d3 + bcc.b 5$ + tst.b (a3) ; er det en konf her ? + bne.b 8$ ; ja.. + lea (ConferenceRecord_SIZEOF,a3),a3 ; peker til neste navn + moveq.l #0,d0 + move.l d0,(a2)+ ; Sier at denne fila er tom.. + bra.b 4$ +8$ move.l a3,a0 + lea dotmsgheadertxt,a1 + bsr createconffilepath + move.l d0,d1 + move.l d1,d5 + move.l #MODE_OLDFILE,d2 + jsrlib Open + addq.l #1,d3 + lea (ConferenceRecord_SIZEOF,a3),a3 ; peker til neste navn + move.l d0,(a2)+ + bne.b 4$ + IFD CreateMissingFiles + move.l d5,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,(-4,a2) + bne.b 4$ + ENDC + bra.b 2$ + +5$ move.l (n_MsgTextfiles,MainBase),a2 + lea (n_FirstConference+n_ConfName+CStr,MainBase),a3 + moveq.l #0,d3 +6$ cmp.w (ActiveConf+CStr,MainBase),d3 + bcc.b 9$ + tst.b (a3) ; er det en konf her ? + bne.b 10$ ; ja.. + lea (ConferenceRecord_SIZEOF,a3),a3 ; peker til neste navn + moveq.l #0,d0 + move.l d0,(a2)+ ; Sier at denne fila er tom.. + bra.b 6$ +10$ move.l a3,a0 + lea dotmessagestext,a1 + bsr createconffilepath + move.l d0,d1 + move.l d1,d5 + move.l #MODE_OLDFILE,d2 + jsrlib Open + addq.l #1,d3 + lea (ConferenceRecord_SIZEOF,a3),a3 ; peker til neste navn + move.l d0,(a2)+ + bne.b 6$ + IFD CreateMissingFiles + move.l d5,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,(-4,a2) + bne.b 6$ + ENDC +2$ + lea (erroropentext),a0 + bsr writemainerror + move.l d5,a0 + bsr writemainerror + lea (nltext),a0 + bsr writemainerror + setz +99$ move.l exebase,a6 + pop d2/d3/d4/d5/a3/a2 + beq closefiles + rts +9$ clrz + bra.b 99$ + +closefiles + push d2/a2 + move.l dosbase,a6 + move.l userfile(MainBase),d1 + beq.b 10$ + jsrlib Close + moveq.l #0,d0 + move.l d0,userfile(MainBase) +10$ move.b (Cflags2+CStr,MainBase),d0 + btst #CflagsB_CacheFL,d0 + beq.b 2$ + bsr closeflfiles + bra.b 4$ + +2$ move.l (n_Filedirfiles,MainBase),a2 + moveq.l #0,d2 +1$ move.l (a2)+,d1 + beq.b 6$ + jsrlib Close +6$ addq.l #1,d2 + cmp.w (MaxfileDirs+CStr,MainBase),d2 + bcs.b 1$ +4$ move.l (n_MsgHeaderfiles,MainBase),a2 + moveq.l #0,d2 +3$ move.l (a2)+,d1 + beq.b 7$ + jsrlib Close +7$ addq.l #1,d2 + cmp.w (Maxconferences+CStr,MainBase),d2 + bcs.b 3$ + + move.l (n_MsgTextfiles,MainBase),a2 + moveq.l #0,d2 +5$ move.l (a2)+,d1 + beq.b 8$ + jsrlib Close +8$ addq.l #1,d2 + cmp.w (Maxconferences+CStr,MainBase),d2 + bcs.b 5$ +9$ move.l exebase,a6 + pop d2/a2 + setz + rts + +readflfiles + push a2/d3/a3/d2/d4 + moveq.l #0,d0 + move.l #mem_Fileentry_SIZEOF*100,d1 + move.l d1,d2 + move.l exebase,a6 + jsr _AsmCreatePool + move.l dosbase,a6 + lea noflpoolmemtext,a1 + move.l a0,(flpool,MainBase) + beq.b 4$ ; error, no pool + + move.l (n_Filedirfiles,MainBase),a2 + moveq.l #0,d3 ; dir nr + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (n_DirName,a3),a3 +1$ cmp.w (ActiveDirs+CStr,MainBase),d3 + bcc.b 3$ ; ferdig + tst.b (a3) ; er det en file dir her ? + bne.b 2$ ; ja.. + moveq.l #0,d0 + move.l d0,(a2)+ ; Sier at denne fila er tom.. + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + bra.b 1$ + +2$ move.l a3,a0 + bsr createdirfilepath ; lager i txtbuffer + move.l d0,d1 + move.l d1,d4 + move.l #MODE_OLDFILE,d2 + jsrlib Open + IFD CreateMissingFiles + tst.l d0 + bne.b 1234$ ; not error + move.l d4,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open +1234$ + ENDC + lea (erroropentext),a0 + tst.l d0 + beq.b 5$ ; error + bsr readflfile ; fila lukkes her inne.. + lea (errorreadfitext),a0 + beq.b 5$ ; error + addq.l #1,d3 + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + move.l d0,(a2)+ ; lagrer pekeren til første fileentry + bne.b 1$ + +5$ bsr writemainerror + move.l d4,a1 +4$ move.l a1,a0 ; error + bsr writemainerror + setz + bra.b 9$ + +3$ clrz +9$ pop a2/d3/a3/d2/d4 + rts + +; d0 = filehandle +readflfile + push d2-d7/a2/a3/a4 + move.l d0,d5 + move.l #fileentryheader_sizeof,d6 + moveq.l #-1,d7 ; fil filnr + suba.l a3,a3 ; vi har ikke noen forige enda.. + + move.l (flpool,MainBase),a0 + move.l d6,d0 + move.l exebase,a6 + jsr _AsmAllocPooled + tst.l d0 + beq 7$ ; ikke noe ram til hash. + move.l d0,a4 ; dir start + move.l d0,a0 ; null stiller + move.l d6,d0 + jsr memclr + + move.l (flpool,MainBase),a0 + moveq.l #mem_Fileentry_SIZEOF,d0 + jsr _AsmAllocPooled + move.l dosbase,a6 + tst.l d0 + beq 7$ + move.l d0,a2 ; og som forrige + moveq.l #-1,d6 ; filnr (i mem) + +1$ moveq.l #0,d1 + jsrlib SetIoErr + move.l d5,d1 + move.l a2,d2 ; buffer + move.l #Fileentry_SIZEOF,d3 + moveq.l #1,d4 + jsrlib FRead + tst.l d0 + beq.b 8$ + addq.l #1,d7 ; øker fil filnr + + move.w (Filestatus,a2),d0 + and.w #FILESTATUSF_Filemoved|FILESTATUSF_Fileremoved,d0 + bne.b 1$ ; denne var slettet... Hopper over + + addq.l #1,d6 ; øker mem filnr + move.l d6,(mem_filenr,a2) ; lagrer mem filnr + move.l d7,(mem_filefilenr,a2) ; lagrer file filnr + moveq.l #0,d0 + move.l d0,(mem_fnexthash,a2) ; sletter hash peker (ligger trash der) + move.l d0,(mem_fnext,a2) ; sletter neste fil peker (trash..) + + lea (Filename,a2),a0 ; legg inn i hash liste + bsr calchash + move.l a2,a0 + move.l a4,a1 + bsr insertinhashchain + + move.l a3,d0 + bne.b 2$ + move.l a0,(first_file,a4) ; lagrer første fileentry + bra.b 3$ +2$ move.l a2,(mem_fnext,a3) ; linker den forrige inn i den før der igjen +3$ move.l (flpool,MainBase),a0 ; allokerer neste entry + moveq.l #mem_Fileentry_SIZEOF,d0 + move.l exebase,a6 + jsr _AsmAllocPooled + move.l dosbase,a6 + tst.l d0 + beq.b 7$ ; error.. + move.l a2,a3 ; husker siste + move.l d0,a2 + bra.b 1$ + +8$ move.l (flpool,MainBase),a0 ; frigir siste allokerte + moveq.l #mem_Fileentry_SIZEOF,d0 + move.l a2,a1 + move.l exebase,a6 + jsr _AsmFreePooled + move.l dosbase,a6 + jsrlib IoErr ; var det fil error ? + tst.l d0 + beq.b 9$ ; Nei, videre + +7$ suba.l a4,a4 ; returnerer null +9$ move.l dosbase,a6 + move.l d5,d1 + jsrlib Close + move.l a4,d0 ; peker til hash + returnerer Z bit'et + pop d2-d7/a2/a3/a4 + rts + +closeflfiles + push a2/a3/d2-d7/a6 + move.l (n_Filedirfiles,MainBase),a2 + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (n_DirName,a3),a3 + move.l #Fileentry_SIZEOF,d3 + moveq.l #0,d5 +1$ move.l (a2)+,d0 ; har vi hash struct ? + beq 2$ ; nei, videre + move.l d0,a0 ; henter hash + move.l (first_file,a0),d7 ; har vi filer ? + beq.b 2$ ; nei, gå videre + + move.l d7,d1 ; søker for å se om vi må lagre +8$ move.l d1,a0 + move.w (mem_fentry+Filestatus,a0),d0 + and.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d0 + bne.b 10$ ; denne er slettet, vi må lagre + move.l (mem_fnext,a0),d1 ; mere ? + bne.b 8$ ; ja + bra.b 2$ ; vi trenger ikke lagre denne + +10$ move.l a3,a0 ; lagrer ny .fl fil + bsr createdirfilepath ; lager i txtbuffer + move.l d0,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + lea (erroropentext),a0 + move.l d0,d6 + beq.b 5$ ; error + moveq.l #1,d4 + +3$ move.l d7,a0 + move.w (mem_fentry+Filestatus,a0),d0 + and.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d0 + bne.b 7$ ; denne er slettet, ikke save denne + move.l d6,d1 + move.l d7,d2 ; buf + jsrlib FWrite + cmp.l d4,d0 + bne.b 4$ + move.l d7,a0 +7$ move.l (mem_fnext,a0),d7 ; mere ? + bne.b 3$ ; ja +6$ move.l d6,d1 + jsrlib Close + bra.b 2$ +4$ lea (errorwritfitext),a0 +5$ bsr writemainerror + lea (txtbuffer,MainBase),a0 ; Filnavn + bsr writemainerror + lea (nltext),a0 + bsr writemainerror + bra.b 6$ + +2$ lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + addq.l #1,d5 + cmp.w (MaxfileDirs+CStr,MainBase),d5 + bcs 1$ + move.l (flpool,MainBase),d0 + beq.b 9$ + move.l d0,a0 + move.l exebase,a6 + jsr _AsmDeletePool +9$ pop a2/a3/d2-d7/a6 + rts + +; a0 = navn +; a1 = hashstruct +; ret : z = 1 => not found +findflentry + push a2/a3 + move.l a0,a2 + move.l a1,a3 + bsr calchash + lsl.l #2,d0 + move.l (0,a3,d0.l),d0 + beq.b 9$ ; ikke funnet +2$ move.l d0,a3 + move.w (mem_fentry+Filestatus,a3),d0 + and.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d0 + bne.b 3$ ; denne er slettet, ikke sjekk denne + lea (Filename,a3),a1 + move.l a2,a0 + bsr comparestringsicase + beq.b 1$ +3$ move.l (mem_fnexthash,a3),d0 + bne.b 2$ + bra.b 9$ ; ikke funnet +1$ move.l a3,a0 + clrz +9$ pop a2/a3 + rts + + +; d0 = nr +; a0 = hashstruct +; ret : n = 1 > EOF, z = 1 > not found +findflentrynr + move.l (first_file,a0),d1 + beq.b 3$ ; EOF +1$ move.l d1,a0 + subq.l #1,d0 + bcs.b 2$ + move.l (mem_fnext,a0),d1 + bne.b 1$ ; still more files +3$ setn ; EOF + bra.b 9$ +2$ clrzn ; funnet +9$ rts + +; d0 = hashval +; a0 = entry +; a1 = table +insertinhashchain + lsl.l #2,d0 ; * 4 + move.l (0,a1,d0.l),d1 + bne.b 1$ ; plassen opptatt + move.l a0,(0,a1,d0.l) + bra.b 9$ +1$ move.l d1,a1 ; finner slutten + move.l (mem_fnexthash,a1),d1 + bne.b 1$ + move.l a0,(mem_fnexthash,a1) ; legger inn +9$ rts + +;a0 = entry +;a1 = hashstruct +;d0 = hash for old name +rehashentry + push a2/a3 + move.l a0,a2 + move.l a1,a3 +; fjern gammel... + + lsl.l #2,d0 ; * 4 + move.l (0,a1,d0.l),d1 ; adressen til første i hash kjeden + beq.b 3$ ; finnes ikke. Egentlig umulig, men ... + cmp.l d1,a2 ; riktig ? + bne.b 1$ + moveq.l #0,d1 ; sletter i selve tabellen + move.l d1,(0,a1,d0.l) + bra.b 3$ ; ferdig + +1$ move.l d1,a1 + move.l (mem_fnexthash,a1),d1 + beq.b 3$ ; egentlig umulig, men .. + cmp.l d1,a2 ; riktig ? + bne.b 1$ ; nei, fortsetter + move.l (mem_fnexthash,a2),(mem_fnexthash,a1) ; unlink'er + moveq.l #0,d0 + move.l d0,(mem_fnexthash,a2) ; unlinker helt.. + +3$ lea mem_fentry+Filename(a2),a0 + bsr calchash + move.l a2,a0 + move.l a3,a1 + bsr insertinhashchain +9$ pop a2/a3 + rts + +; a0 = string +; ret : d0 = hash, modulo 72 +calchash + push a2/d2/d3/d4 + move.l a0,a2 ; husker stringen + jsr (strlen) + move.l d0,d2 ; val + move.l d0,d3 ; len + moveq.l #0,d4 ; i + bra.b 1$ +2$ moveq.l #0,d0 + move.b (a2)+,d0 + jsr upchar + move.l d2,d1 ; val = (val*13 + upchar (*string++)) & $7ff + asl.l #3,d1 + sub.l d2,d1 + add.l d1,d1 + sub.l d2,d1 + add.l d0,d1 + move.l d1,d2 + andi.l #$7ff,d2 + addq.l #1,d4 +1$ cmp.l d3,d4 ; len > i + blt.b 2$ ; nope + divu #72,d2 + clr.w d2 + swap d2 + move.l d2,d0 + pop a2/d2/d3/d4 + rts + +loadconfigs + movem.l d2-d4,-(a7) + move.l dosbase,a6 + move.l #configfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 2$ + move.l d4,d1 + lea (CStr,MainBase),a0 + move.l a0,d2 + move.l (Configsize,a0),d3 ; Configsize må altså være riktig før lesing .. + jsrlib Read + move.l d4,d1 + move.l d0,d4 + jsrlib Close + cmp.l d3,d4 + bne 2$ ; read error + addq.w #1,lesconfigstatus + + lea (staticConfigRecord_SIZEOF+CStr,MainBase),a0 ; slutten av static config + move.w (Maxconferences+CStr,MainBase),d0 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a0 + move.l a0,(firstFileDirRecord+CStr,MainBase) + + move.w (MaxfileDirs+CStr,MainBase),d0 + mulu #FileDirRecord_SIZEOF,d0 + add.l d0,a0 + move.l a0,(n_Filedirfiles,MainBase) + + moveq.l #0,d0 + move.w (MaxfileDirs+CStr,MainBase),d0 + lsl.l #2,d0 + add.l d0,a0 + move.l a0,(n_MsgHeaderfiles,MainBase) + moveq.l #0,d0 + move.w (Maxconferences+CStr,MainBase),d0 + lsl.l #2,d0 + add.l d0,a0 + move.l a0,(n_MsgTextfiles,MainBase) + + move.l #nrindexfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 1$ + move.l d4,d1 + move.l NrTabelladr(MainBase),a0 + move.l a0,d2 + move.l LogTabelladr(MainBase),d3 + sub.l a0,d3 ; Beregner plassen vi har til rådighet + jsrlib Read + move.l d4,d1 + move.l d0,d4 + jsrlib Close + moveq.l #-1,d0 + cmp.l d0,d4 + beq.b 1$ ; read error + addq.w #1,lesconfigstatus + + move.l #indexfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 1$ + move.l d4,d1 + move.l LogTabelladr(MainBase),a0 + move.l a0,d2 + lsr.l #2,d3 +; move.l (MaxUsers+CStr,MainBase),d3 + mulu #Log_entry_SIZEOF,d3 + jsrlib Read + move.l d4,d1 + move.l d0,d4 + jsrlib Close + moveq.l #-1,d0 + cmp.l d0,d4 + beq.b 1$ ; read error + addq.w #1,lesconfigstatus + move.l exebase,a6 + clrz + bra.b 9$ +1$ move.l exebase,a6 + setz + bra.b 9$ +2$ move.l exebase,a6 + setn +9$ movem.l (a7)+,d2-d4 + rts + +gettooltypes + push a2/a6 + move.l icobase,a6 + lea abbsinfoname,a0 ; name + jsrlib GetDiskObject + move.l d0,maindiskobj + beq 8$ ; ikke noe icon + move.l d0,a0 + move.l (do_ToolTypes,a0),a2 ; har tooltypes array'en + + move.l icobase,a6 + move.l a2,a0 + lea (pritooltype),a1 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 1$ ; nei + move.l d0,a0 + bsr 10$ + bmi.b 1$ ; ikke noe tall + move.b d0,brokerpri + +1$ move.l a2,a0 + lea (popuptooltype),a1 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 2$ ; nei + move.l d0,a0 + lea (notext),a1 + jsrlib MatchToolValue + tst.l d0 + beq.b 2$ ; Vi fant ikke no i popup + bset #0,configbyte ; ikke pop up + +2$ lea (appicontooltype),a1 + move.l a2,a0 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 3$ ; nei + move.l d0,a0 + lea (falsetext),a1 + jsrlib MatchToolValue + tst.l d0 + beq.b 3$ ; Vi fant ikke false + bset #1,configbyte ; ikke appicon + +3$ lea (winlefttooltype),a1 + move.l a2,a0 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 4$ ; nei + move.l d0,a0 + bsr.b 10$ + bmi.b 4$ ; ikke noe tall + move.w d0,ABBSAppWindowLeft + +4$ lea (wintoptooltype),a1 + move.l a2,a0 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 5$ ; nei + move.l d0,a0 + bsr.b 10$ + bmi.b 5$ ; ikke noe tall + move.w d0,ABBSAppWindowTop + +5$ lea (popkeytooltype),a1 + move.l a2,a0 + jsrlib FindToolType + tst.l d0 ; fant vi noe ? + beq.b 9$ ; nei + move.l d0,brokerhotkey + bra.b 9$ +8$ lea (nodiskicontext),a0 + bsr writemainerror + setz +9$ pop a2/a6 + rts + +10$ cmp.b #'-',(a0) + bne.b 11$ + addq.l #1,a0 + jsr (atoi) + bmi 19$ ; ikke noe tall + neg.l d0 + clrn + bra.b 19$ +11$ jsr (atoi) +19$ rts + +setupappicon + push a2-a4/a6 + btst #1,configbyte + bne.b 9$ ; skal ikke ha appicon + move.l maindiskobj,d0 + beq.b 9$ ; no object + move.l d0,a3 ; diskobj + move.l wbbase,a6 + moveq.l #0,d0 ; ID + moveq.l #0,d1 ; Userdata + lea abbsappicontext,a0 + move.l wbmsgport,a1 + suba.l a2,a2 ; lock + suba.l a4,a4 ; Tags + jsrlib AddAppIconA + move.l d0,mainappicon + bne.b 9$ + bsr clearappicon +8$ lea (noicontext),a0 + bsr writemainerror + setz +9$ pop a2-a4/a6 + rts + +clearappicon + move.l mainappicon,d0 + beq.b 1$ + move.l wbbase,a6 + move.l d0,a0 + jsrlib RemoveAppIcon +1$ move.l maindiskobj,d0 + beq.b 9$ + move.l icobase,a6 + move.l d0,a0 + jsrlib FreeDiskObject + moveq.l #0,d0 + move.l d0,maindiskobj +9$ move.l exebase,a6 + bsr closestatuswindow + rts + +EVT_HOTKEY EQU 1 + +handlecommodity + push a2/d2/d3 +0$ move.l brokermsgport,a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l d0,a2 + move.l a2,a0 + move.l combase,a6 + jsrlib CxMsgType + move.l d0,d2 ; husker typen + move.l a2,a0 + jsrlib CxMsgID + move.l d0,d3 ; husker id + move.l exebase,a6 + move.l a2,a1 + tst.l (MN_REPLYPORT,a1) + beq 1$ + jsrlib ReplyMsg +1$ cmp.w #CXM_COMMAND,d2 + bne.b 4$ ; ikke command + cmp.w #CXCMD_APPEAR,d3 + bne.b 2$ +5$ move.b statusopen,d0 + bne.b 0$ ; allerede åpent + bsr openstatuswindow + bra.b 0$ +2$ cmp.w #CXCMD_DISAPPEAR,d3 + bne.b 3$ + move.b statusopen,d0 + beq.b 0$ ; allerede lukket + bsr closestatuswindow + bra.b 0$ + +3$ cmp.w #CXCMD_KILL,d3 + bne.b 0$ + move.w MainBits(MainBase),d0 ; er vi locked ? + and.w #MainBitsF_ABBSLocked,d0 + bne.b 8$ ; ja, nekte + move.w Nodes(MainBase),d0 + bne.b 8$ ; kan ikke + move.w #1,mainshutdown + bra 0$ + +4$ cmp.w #CXM_IEVENT,d2 + bne 0$ ; ikke event + cmp.w #EVT_HOTKEY,d3 + bne 0$ ; ikke hotkey + bra.b 5$ ; det var hotkey. Opp med vinduet. + +8$ move.l intbase,a6 + suba.l a0,a0 ; nei, blinker vinduet. + jsrlib DisplayBeep + move.l exebase,a6 + bra 0$ +9$ pop a2/d2/d3 + rts + +setupcommodity + moveq.l #0,d0 + move.l d0,a0 + bsr CreatePort + move.l d0,brokermsgport + beq 9$ + lea (brokerstruct),a0 + moveq.l #0,d0 + move.l combase,a6 + jsrlib CxBroker + move.l d0,broker + bne.b 1$ +2$ move.l exebase,a6 + bsr clearcommodity + setz + bra 9$ +1$ move.l #CX_FILTER,d0 + move.l brokerhotkey,a0 + suba.l a1,a1 + jsrlib CreateCxObj + move.l d0,brokerfilter + beq.b 2$ + move.l broker,a0 + move.l d0,a1 + jsrlib AttachCxObj + move.l #CX_SEND,d0 + move.l brokermsgport,a0 + move.l #EVT_HOTKEY,a1 + jsrlib CreateCxObj + tst.l d0 + beq.b 2$ + move.l brokerfilter,a0 + move.l d0,a1 + jsrlib AttachCxObj + + move.l #CX_TRANSLATE,d0 + suba.l a1,a1 + suba.l a0,a0 + jsrlib CreateCxObj + tst.l d0 + beq.b 2$ + move.l brokerfilter,a0 + move.l d0,a1 + jsrlib AttachCxObj + + move.l brokerfilter,a0 + jsrlib CxObjError + tst.l d0 + bne 2$ + + move.l broker,a0 + moveq.l #1,d0 + jsrlib ActivateCxObj + move.l exebase,a6 + move.l brokermsgport,a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + or.l d0,mainwait + move.l d0,maincommisigbit +; clrz +9$ rts + +clearcommodity + move.l broker,d0 + beq.b 1$ + move.l combase,a6 + move.l d0,a0 + jsrlib DeleteCxObjAll + move.l exebase,a6 + moveq.l #0,d0 + move.l d0,broker +1$ move.l brokermsgport,d0 + beq.b 2$ + move.l d0,a0 + bsr DeletePort + moveq.l #0,d0 + move.l d0,brokermsgport +2$ + rts + +****************************** +;Mainsetup +; open libs,screen,mainwindow. +; open mainport,set mainmenu +; returns Z bit. Z = 0 : Success +****************************** + +mainsetup + move.w AttnFlags(a6),Environment+2 ; save copy for dump + move.l a6,exebase + openlib dos + cmp.w #36,LIB_VERSION(a6) ; Kjører vi på noe bedre enn 1.3 ? + bcc.b 5$ ; Jepp. Kjører. + lea need2.0text,a0 + bsr writemainerror + bra no_dos +5$ lea mainmsgportname,a1 ; sjekker om abbs er kjørt før + jsrlib FindPort + tst.l d0 + bne is_runi ; ja .. Da avslutter vi + openlib int + openlib gfx + openlib wb + openlib ico + openlib gad + openlib com + openlib dfo + IFND DEMO + openlib zxp ; xprZmodem + openlib yxp ; xprYmodem + move.l yxpbase,d0 + move.l d0,yxpbase1 ; xprYmodem batch + move.l d0,yxpbase2 ; xprYmodem-G + move.l d0,xxpbase ; xprXmodem + move.l d0,xxpbase1 ; xprXmodemCRC + ENDC + openlib rex + openlib uti + + moveq.l #0,d0 + lea aslname,a1 + jsrlib OpenLibrary + move.l d0,aslbase + + moveq.l #0,d0 + lea fifoname,a1 + jsrlib OpenLibrary + move.l d0,fifobase + + moveq.l #0,d0 + lea iffname,a1 + jsrlib OpenLibrary + move.l d0,iffbase + + move.l dosbase,a6 + move.l #abbsrootname,d1 + push d2 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + pop d2 + move.l d0,d1 + beq no_root + jsrlib CurrentDir + move.l d0,MainOldDir + move.l exebase,a6 + + bsr getconfigfilesize + lea (noconfigfiltext),a0 + beq 3$ + add.l #StaticMainmemory_SIZEOF,d0 ; allokerer minne + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + push d0 + jsrlib AllocMem + pop d1 + move.l d0,mainmemoryblock + beq 0$ + move.l d0,MainBase + move.l d1,(MainmemoryAlloc,MainBase) + lea configfilename,a0 ; leser inn config + lea (CStr,MainBase),a1 + move.l #staticConfigRecord_SIZEOF,d0 + bsr readinfile +; vi er ikke så interesert i error her.. + + move.l (MaxUsers+CStr,MainBase),d0 + moveq.l #100,d1 ; sørger for at min er 100 + cmp.l d1,d0 + bcc.b 61$ + move.l d1,d0 +61$ moveq.l #30,d1 ; og setter av plass til 30 flere + add.l d1,d0 ; d0 er nå antall indexer vi skal ha + move.l d0,(MaxNumLogEntries,MainBase) + moveq.l #Log_entry_SIZEOF+4,d1 + mulu d1,d0 ; har nå minne i bytes + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,(NrTabelladr,MainBase) + beq 7$ + move.l (MaxNumLogEntries,MainBase),d1 + lsl.l #2,d1 + add.l d1,d0 + move.l d0,(LogTabelladr,MainBase) + + sub.l a1,a1 + jsrlib FindTask + move.l d0,MainTask + move.l d0,a1 + moveq.l #-1,d0 + move.l d0,pr_WindowPtr(a1) ; Fjerner alle requestere + move.l TC_TRAPCODE(a1),d0 ; check current exception + move.l a1,-(a7) + move.l d0,a1 + jsrlib TypeOfMem + move.l (a7)+,a1 + IFD exceptionhandler + tst.l d0 ; Er det null ? dvs ROM eller ingenting + bne.b 6$ ; somebody else (debugger?) has vector + move.l #Exception,TC_TRAPCODE(a1) ; install pointers to code + move.l MainBase,TC_TRAPDATA(a1) ; ...and data + ENDC + +6$ or.w #MainBitsF_SysopNotAvail,MainBits(MainBase) ; setter sysop not avail + move.l exebase,a6 + jsrlib CreateMsgPort + move.l d0,wbmsgport + beq 41$ + move.l d0,a0 + moveq.l #0,d0 + move.b MP_SIGBIT(A0),d1 + bset d1,d0 + bset #SIGBREAKB_CTRL_C,d0 + or.l d0,mainwait + move.l d0,wbportsigbit + lea mainmsgportname,a0 + moveq.l #0,d0 + bsr CreatePort + move.l d0,mainmsgport + beq 4$ + move.l d0,a0 + moveq.l #0,d0 + move.b MP_SIGBIT(A0),d1 + bset d1,d0 + or.l d0,mainwait + move.l d0,mainportsigbit + bsr readkeys + clrz + rts + +7$ lea noindexmemtext,a0 + bsr writemainerror + bra no_indx +0$ lea nomainmemtext,a0 +3$ bsr writemainerror + bra no_main +4$ lea nomainporttext,a0 + bsr writemainerror + bra no_mpor +41$ lea nowbporttext,a0 + bsr writemainerror + bra no_wpor + +****************************** +;mainclosedown +;close libs,screen, mainwindow. +;close mainport, clear menu +****************************** + +mainclosedown + move.l keyfile(MainBase),d0 ; har vi keyfile ? + beq.b 1$ + move.l d0,a1 + move.l (a1),d0 + jsrlib FreeMem +1$ move.l wbmsgport,a0 + bsr DeletePort +no_wpor move.l mainmsgport,a0 + bsr DeletePort +no_mpor move.l (MaxNumLogEntries,MainBase),d0 + moveq.l #Log_entry_SIZEOF+4,d1 + mulu d1,d0 ; har nå minne i bytes + move.l (NrTabelladr,MainBase),a1 + jsrlib FreeMem +no_indx move.l mainmemoryblock,a1 + move.l (MainmemoryAlloc,MainBase),d0 + jsrlib FreeMem +no_main move.l dosbase,a6 + move.l MainOldDir,d1 + jsrlib CurrentDir + move.l d0,d1 + jsrlib UnLock +no_root move.l exebase,a6 + move.l iffbase,d0 + beq.b 4$ + move.l d0,a1 + jsrlib CloseLibrary +4$ move.l fifobase,d0 + beq.b 3$ + move.l d0,a1 + jsrlib CloseLibrary +3$ move.l aslbase,d0 + beq.b 2$ + move.l d0,a1 + jsrlib CloseLibrary +2$ closlib uti +no_uti1 closlib rex +no_rex1 + IFND DEMO + closlib yxp +no_yxp1 closlib zxp +no_zxp1 + ENDC + closlib dfo +no_dfo1 closlib com +no_com1 closlib gad +no_gad1 closlib ico +no_ico1 closlib wb +no_wb1 closlib gfx +no_gfx1 closlib int +no_int1 closlib dos +no_dos setz ; Can't write anything without dos.library + rts + +no_rex lea norexlibtext,a0 + bsr writemainerror + bra no_uti1 +no_uti lea noutilibtext,a0 + bsr writemainerror + bra no_uti1 + IFND DEMO +no_yxp lea noyxplibtext,a0 + bsr writemainerror + bra no_yxp1 +no_zxp lea nozxplibtext,a0 + bsr writemainerror + bra no_zxp1 + ENDC +no_com lea nocomlibtext,a0 + bsr writemainerror + bra no_com1 +no_gad lea nogadlibtext,a0 + bsr writemainerror + bra no_gad1 +no_ico lea noicolibtext,a0 + bsr writemainerror + bra no_ico1 +no_wb lea nowblibtext,a0 + bsr writemainerror + bra no_wb1 +no_dfo lea nodfolibtext,a0 + bsr writemainerror + bra no_dfo1 +no_gfx lea nogfxlibtext,a0 + bsr writemainerror + bra no_gfx1 +no_int lea nointlibtext,a0 + bsr writemainerror + bra no_int1 +is_runi lea alreadyrunitext,a0 + bsr writemainerror + bra no_int1 + +getconfigfilesize + link.w a3,#-20 + lea configfilename,a0 ; leser inn config + move.l sp,a1 + moveq.l #Users,d0 ; vi skal lese size + max#? + bsr readinfile + beq.b 9$ ; en eller annen feil + move.w (Revision,sp),d0 + cmp.w #ConfigRev,d0 + notz + beq.b 9$ ; feil revision + move.l (Configsize,sp),d0 + moveq.l #0,d1 + move.w (MaxfileDirs,sp),d1 ; for n_Filedirfiles + lsl.l #2,d1 ; * 4 + add.l d1,d0 + moveq.l #0,d1 + move.w (Maxconferences,sp),d1 + lsl.l #3,d1 ; * 4 * 2 + add.l d1,d0 +9$ unlk a3 + rts + +setupmenu + push a6 + move.l (gadbase),a6 + movea.l (mainscreenadr),a0 + suba.l a1,a1 + jsrlib GetVisualInfoA + move.l d0,mainvisualinfo + beq.b 9$ + lea.l (Project0NewMenu0),a0 + lea (createmenutags),a1 + move.b (Cflags+CStr,MainBase),d1 + btst #CflagsB_8Col,d1 + bne.b 1$ + move.l #1,(4,a1) +1$ jsrlib CreateMenusA + move.l d0,mainmenustruct + beq.b freemenu2 + move.l d0,a0 + push a2 + lea (MenuTags),a2 + movea.l mainvisualinfo,a1 + jsrlib LayoutMenusA + pop a2 + tst.l d0 + beq.b freemenu1 +9$ pop a6 + rts + +freemenu + push a6 + move.l (gadbase),a6 +freemenu1 + movea.l mainmenustruct,a0 + jsrlib FreeMenus +freemenu2 + movea.l mainvisualinfo,a0 + jsrlib FreeVisualInfo + pop a6 + setz + rts + +testseekerror + push d0 + jsrlib IoErr + tst.l d0 + pop d0 + rts + +readkeys + push d2-d4/a6/a2 + move.l dosbase,a6 + move.l #keyfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l d4,d1 ; finds size of file + moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + move.l d4,d1 + moveq.l #0,d2 + moveq.l #OFFSET_BEGINNING,d3 + jsrlib Seek + bsr testseekerror + bne.b 8$ ; error + addq.l #5,d0 ; plass til size, og en 0 byte på slutten + move.l d0,d3 + move.l exebase,a6 + move.l #MEMF_CLEAR,d1 + jsrlib AllocMem + move.l dosbase,a6 + tst.l d0 + beq.b 8$ + move.l d0,a2 + move.l d3,(a2) ; lagrer size + move.l a2,keyfile(MainBase) ; lagrer bufferen + lea 4(a2),a2 + move.l d4,d1 + move.l a2,d2 + jsrlib Read + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 8$ + bsr 10$ +8$ move.l d4,d1 + jsrlib Close +9$ pop d2-d4/a6/a2 + rts + +10$ lea keys(MainBase),a1 + moveq.l #10,d1 ; maks antall key's +12$ move.l a2,(a1)+ +11$ move.b (a2)+,d0 + beq.b 19$ + cmp.b #10,d0 + bne.b 11$ + move.b #0,-1(a2) + subq.l #1,d1 + bne.b 12$ ; det er flere igjen +19$ rts + +****************************** +;writemainerror +;inputs : text (a0) +****************************** +writemainerror + move.l dosbase,d0 + beq.b 9$ ; dos.library hasn't been opened yet.No can do + move.l a0,-(sp) ; save pointer to Text + move.l d0,a6 + jsrlib Output + move.l d0,d1 ; Output file. + move.l (sp)+,d2 ; Get text + move.l d2,a0 ; Get Strlen. + moveq.l #-1,d3 +1$ tst.b (a0)+ + dbeq d3,1$ + not.w d3 + ext.l d3 ; D3 = Strlen. + jsrlib Write ; .. and write the text. + move.l exebase,a6 ; Get Execbase (back) +9$ rts + +readcolors + push d2-d4 + move.l dosbase,a6 + move.l #colorfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ + move.l d0,d1 + move.l #screencolors,d2 + moveq.l #2*2+2*8,d3 + jsrlib Read + move.l d4,d1 + jsrlib Close +9$ move.l exebase,a6 + pop d2-d4 + rts + +*************************************************************************** +*** DATA *** +*************************************************************************** + + section bdata,BSS + +dosbase ds.l 1 +intbase ds.l 1 +wbbase ds.l 1 +icobase ds.l 1 +exebase ds.l 1 +gfxbase ds.l 1 +dfobase ds.l 1 +aslbase ds.l 1 +gadbase ds.l 1 +combase ds.l 1 +rexbase ds.l 1 +utibase ds.l 1 +fifobase ds.l 1 + +protokollbaser +zxpbase ds.l 1 +xxpbase ds.l 1 +xxpbase1 ds.l 1 +yxpbase ds.l 1 +yxpbase1 ds.l 1 +yxpbase2 ds.l 1 +iffbase ds.l 1 + +_SysBase = exebase + XDEF _SysBase + +mainscreenadr ds.l 1 +mainwindowadr ds.l 1 +mainmsgport ds.l 1 +wbmsgport ds.l 1 +mainintuiport ds.l 1 +maingadtoolport ds.l 1 +mainwait ds.l 1 +mainintsigbit ds.l 1 +mainportsigbit ds.l 1 +maingadtosigbit ds.l 1 +maincommisigbit ds.l 1 +wbportsigbit ds.l 1 +mainstack ds.l 1 +MainOldDir ds.l 1 +mainmenustruct ds.l 1 +mainvisualinfo ds.l 1 +mainappicon ds.l 1 +maindiskobj ds.l 1 +wbmessage ds.l 1 +broker ds.l 1 +brokerfilter ds.l 1 +oldclicksecs ds.l 1 +oldclickmicros ds.l 1 + +useonlyearly equ mainscreenadr + + +mainmemoryblock ds.l 1 + +mainlesbuffer ds.l 1 +lesconfigstatus ds.w 1 +mainshutdown ds.w 1 +screenopencount ds.w 1 +statuswinheight ds.w 1 +statusopen ds.b 1 +configbyte ds.b 1 +closestatuswind ds.b 1 + + section data,data + +msgportjumps + dc.l Loadsaveuser,Loadsaveuser,Createuser,Getusername,Getusernumber + dc.l Saveconfig,Startnode,Nodeshutdown,Savemsg,Loadmsg + dc.l CreateConference,Loadmsgheader,Loadmsgtext,Savemsgheader + dc.l Testconfig,Createbulletin,Clearbulletins,Createfiledir + dc.l Addfile,Findfile,Addfiledl,Loadfileentry,Savefileentry + dc.l BroadcastMsg,GetMaxConfDirs,Loadsaveusernr + dc.l Loadsaveusernr,ChangeName,DeleteDir,RenameDir + dc.l DeleteConference,RenameConference,SetAvailSysop + dc.l Loadsaveusernrnr,Loadsaveusernrnr,MatchName,CleanConference + dc.l QuitBBS,QuitBBS,QuitBBS,PackuserFile,openscreen,closescreen + dc.l RenameFileEntry,LockABBS,UnLockABBS,Getconfig + +gadgetcmdtable + dc.w Node_Show,Node_Hide,Node_chat,Node_OffHook + dc.w Node_Eject,Node_Killuser,Node_TmpSysop + dc.w Node_ShowUser,Node_Shutdown,Node_chat ; really foo2 gadget + dc.w 1,2,3,Node_InitModem,Node_ReleasePort,4 ; Quitabbs,ReopenABBS,EjectAll + + +gadgetjmptable + dc.l main_closeabbs,main_opennode,main_ejectall,main_winsize + +chartogadget dc.b 'S','H',-1,'O','E',-1,-1,'O','U',-1,'Q','R','A','I','L',0 + +copyrighttext dc.b 'ABBS II © 1997-2000 Jan Erik Olausen.',0 + +defhotkey dc.b 'lalt lshift A',0 +dosname dc.b 'dos.library',0 +intname dc.b 'intuition.library',0 +wbname dc.b 'workbench.library',0 +iconame dc.b 'icon.library',0 +gfxname dc.b 'graphics.library',0 +dfoname dc.b 'diskfont.library',0 +aslname dc.b 'asl.library',0 +gadname dc.b 'gadtools.library',0 +comname dc.b 'commodities.library',0 +rexname dc.b 'rexxsyslib.library',0 +zxpname dc.b 'xprzmodem.library',0 +yxpname dc.b 'xprymodem.library',0 +utiname dc.b 'utility.library',0 +iffname dc.b 'iffparse.library',0 +fifoname FIFOLIBNAME + + even + +activenode dc.w -1 + +Project0NewMenu0: + DC.B NM_TITLE,0 + DC.L Project0MName0 + DC.L 0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu1: + DC.B NM_ITEM,0 + DC.L Project0MName1 + DC.L Project0MComm1 + DC.W 0 + DC.L 0,0 + +Project0NewMenu2: + DC.B NM_TITLE,0 + DC.L Project0MName2 + DC.L 0 + DC.W 0 + DC.L 0,0 + +Project0NewMenu3: + DC.B NM_ITEM,0 + DC.L Project0MName3 + DC.L Project0MComm3 + DC.W CHECKIT!CHECKED!MENUTOGGLE + DC.L 0,0 + + DC.B NM_END,0 + DC.L 0,0 + DC.W 0 + DC.L 0,0 + +Project0MName0: + DC.B 'Project',0 + +Project0MName1: + DC.B 'Quit',0 + +Project0MComm1: + DC.B 'Q',0 + +Project0MName2: + DC.B 'Sysop',0 + +Project0MName3: + DC.B 'Not Availble',0 + +Project0MComm3: + DC.B 'A',0 + + even + +nodelist +nhead dc.l ntail +ntail dc.l 0 ; tail + dc.l nhead + dc.b 0,0 + + CNOP 0,4 +updatenodelisttags + dc.l GTLV_Labels,nodelist + dc.l TAG_DONE,0 + +;winsizetags +; dc.l GTCY_Active,1 +; dc.l TAG_DONE,0 + +CreateNewProcTags + dc.l NP_Entry,0 + dc.l NP_Name,0 + dc.l NP_StackSize,4*4096 + dc.l NP_Cli,1 ; TRUE + dc.l TAG_DONE,0 + +NewScreenTags +ScreenDepth dc.l SA_Depth,1 + dc.l SA_Width,STDSCREENWIDTH + dc.l SA_Height,STDSCREENHEIGHT + + +ScreenModes dc.l SA_DisplayID,HIRES_KEY + dc.l SA_Title,copyrighttext +; dc.l SA_Colors,colorspec + dc.l SA_SysFont,1 + dc.l SA_PubName,pubscreenname +MainTask EQU *+4 + dc.l SA_PubTask,0 + dc.l SA_PubSig,SIGBREAKB_CTRL_F + + IFND SA_Interleaved +SA_Interleaved equ $80000042 + ENDC + dc.l SA_Interleaved,1 +ScreenPens dc.l SA_Pens,penlist + dc.l TAG_DONE + + IFND SUPER72_MONITOR_ID +SUPER72_MONITOR_ID EQU $00081000 + ENDC + +brokerstruct dc.b 5,0 ; NB_VERSION,0 + dc.l abbstext,versionstr,copyrighttext + dc.w NBU_UNIQUE,COF_SHOW_HIDE +brokerpri dc.b 0,0 +brokermsgport dc.l 0 +brokerhotkey dc.l defhotkey + dc.w 0 + +screencolors dc.w $aaa,$000 + dc.w $000,$f00,$0c0,$ff0 + dc.w $00d,$d0d,$0ff,$fff +;sort,rød,grøn, gul,blå,lilla,lblå,hvit + +penlist2color dc.w 1,0,1,1,1,0,1 + dc.w 0,1,1,0,0,-1 +;DETAILPEN,BLOCKPEN,TEXTPEN,SHINEPEN,SHADOWPEN,FILLPEN,FILLTEXTPEN, +;BACKGROUNDPEN,HIGHLIGHTTEXTPEN,BARDETAILPEN,BARBLOCKPEN,BARTRIMPEN + +penlist dc.w 1,7,7,6,2,4,7 + dc.w 0,1,7,1,0,-1 + +;DETAILPEN,BLOCKPEN,TEXTPEN,SHINEPEN,SHADOWPEN,FILLPEN,FILLTEXTPEN, +;BACKGROUNDPEN,HIGHLIGHTTEXTPEN,BARDETAILPEN,BARBLOCKPEN,BARTRIMPEN + +abbstext dc.b 'ABBS',0 +pubscreenname dc.b 'ABBS Screen',0 +mainmsgportname dc.b 'ABBS mainport',0 + +abbsrootname dc.b 'ABBS:',0 +abbsinfoname dc.b 'progdir:abbs',0 +conferencepath dc.b 'ABBS:Conferences/',0 +fileheaderpath dc.b 'ABBS:Fileheaders/',0 +abbsappicontext dc.b 'ABBS Appicon',0 + +configfilename dc.b 'config/configfile',0 +colorfilename dc.b 'config/colorfile',0 +userfilename dc.b 'config/userfile',0 +newuserfilename dc.b 'config/userfile.new',0 +indexfilename dc.b 'config/userfile.index',0 +nrindexfilename dc.b 'config/userfile.nrindex',0 +startupfilename dc.b 'config/startup.config',0 +keyfilename dc.b 'config/abbs.keys',0 +dotnewtext dc.b '.new',0 +dotmessagestext dc.b '.m',0 +dotmsgheadertxt dc.b '.h',0 +dotfilelisttext dc.b '.fl',0 + +; hovedtask setup error meldinger +alreadyrunitext dc.b 10,'ABBS is already running!',10,0 +need2.0text dc.b 'Need Kickstart 2.0 or better. UPGRADE *NOW*!',10,0 +nostartfiletext dc.b 10,'Can''t open startup file!',10,0 +errstartfiltext dc.b 10,'Error reading startup file!',10,0 +nosetupmenutext dc.b 10,'Can''t create main menu!',10,0 +nomainmenutext dc.b 10,'Can''t attach main menu!',10,0 +nowbporttext dc.b 10,'Can''t open wb message port!',10,0 +nomainporttext dc.b 10,'Can''t open main message port!',10,0 +norexlibtext dc.b 10,'Can''t open rexxsyslib.library!',10,0 +noutilibtext dc.b 10,'Can''t open utility.library!',10,0 +nozxplibtext dc.b 10,'Can''t open xprzmodem.library!',10,0 +noyxplibtext dc.b 10,'Can''t open xprymodem.library!',10,0 +nogadlibtext dc.b 10,'Can''t open gadtools.library!',10,0 +nocomlibtext dc.b 10,'Can''t open commodities.library!',10,0 +nogfxlibtext dc.b 10,'Can''t open graphics.library!',10,0 +nodfolibtext dc.b 10,'Can''t open diskfont.library!',10,0 +nowblibtext dc.b 10,'Can''t open workbench.library!',10,0 +noicolibtext dc.b 10,'Can''t open icon.library!',10,0 +nointlibtext dc.b 10,'Can''t open intuition.library!',10,0 +nomainmemtext dc.b 10,'Can''t allocate main memory!',10,0 +noflpoolmemtext dc.b 10,'Can''t allocate fl pool memory!',10,0 +noindexmemtext dc.b 10,'Can''t allocate index memory!',10,0 +nomainscrentext dc.b 10,'Can''t open main screen!',10,0 +nomainwintext dc.b 10,'Can''t open main window!',10,0 +noconfigfiltext dc.b 10,'Can''t read the config file!',10,0 +nltext dc.b 10,0 +erroropentext dc.b 10,'Error opening file: ',0 +errorreadfitext dc.b 10,'Error reading file: ',0 +errorwritfitext dc.b 10,'Error writeing file: ',0 +noicontext dc.b 10,'Warning: Error setting up the Appicon',10,0 +nodiskicontext dc.b 10,'Warning: no ABBS icon found',10,0 + +;argstring +readargsstring dc.b 'Configfile,userfile',0 + +;Tooltypes +pritooltype dc.b 'CX_PRIORITY',0 +popuptooltype dc.b 'CX_POPUP',0 +popkeytooltype dc.b 'CX_POPKEY',0 +appicontooltype dc.b 'APPICON',0 +winlefttooltype dc.b 'WINDOWLEFT',0 +wintoptooltype dc.b 'WINDOWTOP',0 + +notext dc.b 'NO',0 +falsetext dc.b 'FALSE',0 + +mainarexxcmdtxt dc.b 'SHOWGUI,SHUTDOWN,STARTNODE',0 + even +mainarexxjmp dc.l rexx_showgui,rexx_shutdown,rexx_startnode + + END ; That's all Folks !!! + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c3b9827 --- /dev/null +++ b/Makefile @@ -0,0 +1,79 @@ +# +# SAS LKM makefile +# + +LIBS = lib:amiga.lib lib:sc.lib lib:pools.lib +OBJS = Node.o Main.o FSE.o transfer.o abbsint.o div.o tables.o msg.o paragon.o \ + Browse.o ABBSmy.o QWK.o rexx.o NodeSupport.o Exeption.o Hippo.o JEO.o + +OBJSSN = ram:Node.o Main.o FSE.o Exeption.o abbsint.o div.o tables.o msg.o paragon.o transfer.o \ + Browse.o ABBSmy.o QWK.o rexx.o NodeSupport.o Hippo.o JEO.o + +.asm.o: + ; assembling $*.asm + @macro68 $*.asm incdir include: quiet failat=10 strictcomments OBJFILE $*.o + +.s.o: + macro68 $*.s incdir include: quiet OBJFILE $*.o + +.c.o: + sc $*.c Data=FARONLY cpu=000 param=register Autoregister AbsFuncPointer NoStackCheck + +ABBS: $(OBJS) + ; Linking ABBS + @slink ingenting .. +; sub.w (minul,NodeBase),d0 +; bcc.b 8$ +; moveq.l #0,d0 +8$ lea (logftimeusedtxt),a0 + bsr 20$ + +5$ move.w (tmsgsread,NodeBase),d0 + lea (logmsgreadtext),a1 + bsr 10$ + + move.w (tmsgsdumped,NodeBase),d0 + beq.b 4$ + lea (logmsgdumedtext),a1 + bsr 10$ + +4$ lea (lostcarriertext),a0 + cmpi.b #NoCarrier,(readcharstatus,NodeBase) + beq 2$ + lea (logfellasletext),a0 + cmpi.b #Timeout,(readcharstatus,NodeBase) + beq.b 2$ + lea (logthrownoutext),a0 + cmpi.b #Thrownout,(readcharstatus,NodeBase) + beq.b 2$ + lea (loglogouttext),a0 +2$ lea (maintmptext,NodeBase),a1 + jsr (strcopy) + subq.l #1,a1 + lea (Name+CU,NodeBase),a0 + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + jsr (writelogstartup) + +3$ move.b #'1',d0 + jsr (writeconchar) + bsr sendlogoutintermsg + move.b #'2',d0 + jsr (writeconchar) + + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + jsr (connrtotext) + move.l a0,a1 + lea (logutscriptname),a0 + jsr (executedosscriptparam) + move.b #'3',d0 + jsr (writeconchar) + jsr (getscratchpaddelfname) ; sletter scratchpad, safety + jsr (deletepattern) + jsr (cleanupfiles) + move.b #'b',d0 + jsr (writeconchar) + + jsr (saveconfig) + move.b #'4',d0 + jsr (writeconchar) + moveq.l #0,d0 + move.b d0,(active,NodeBase) + jsr (changenodestatus) + bra.b endmain + +10$ push a1 + lea (maintmptext,NodeBase),a0 + jsr (konverterw) + lea (maintmptext,NodeBase),a0 + pop a1 + jmp (writelogtexttimed) + +20$ push a0 + lea (maintmptext,NodeBase),a0 + jsr (konverterw) + lea (maintmptext,NodeBase),a1 + pop a0 + jmp (writelogtexttimed) + +endmain + IFND DEMO + move.b (RealCommsPort,NodeBase),d0 ; Setter tilbake + beq.b 1$ ; ikke serial + move.b #-1,d1 ; fikk vi noen port + cmp.b d0,d1 + beq.b 1$ ; vi hadde en.. + cmp.b (CommsPort+Nodemem,NodeBase),d0 ; disablet ? + beq.b 1$ +; move.b d0,(CommsPort+Nodemem,NodeBase) ; setter tilbake +; jsr (aapnemodem) ; hvorfor åpne igjen ??? + jsr (stopserreadcheck) +1$ + ENDC + jsr (stoptimeouttimer) + move.b #'5',d0 + jsr (writeconchar) + jmp (stopconreadcheck) + +notchoices + tst.b (readcharstatus,NodeBase) + bne logout + move.w (menunr,NodeBase),d0 + lea (notchoiceschoic),a1 + move.l (0,a1,d0.w),d0 + beq 1$ + move.l d0,a1 + jsr (a1) + bmi.b 2$ + tst.b (readcharstatus,NodeBase) + bne logout + bra menu +2$ tst.b (readcharstatus,NodeBase) + bne logout + +1$ lea (invalidcmdtext),a0 + move.b (XpertLevel+CU,NodeBase),d0 ; skal de ha lang text ? + cmpi.b #2,d0 + bcc.b 3$ ; ja + lea (Notvalidcomtext),a0 + jsr (writeerroro) + move.w (menunr,NodeBase),d0 + lea (menus),a1 + move.l (0,a1,d0.w),d0 + move.l d0,a0 + lea (globalchtext),a1 + move.b (noglobal,NodeBase),d1 + beq.b 4$ + lea (nulltext),a1 +4$ jsr (writetextformatted) + clr.b (readlinemore,NodeBase) ; flush'er input + bra.b 9$ +3$ jsr (writeerroro) +9$ bra menu + +nomenuinput + tst.b (readcharstatus,NodeBase) + bne logout + move.w (menunr,NodeBase),d0 + lea (nomenuinputch),a0 + move.l (0,a0,d0.w),d0 + beq menu + move.l d0,a0 + jsr (a0) + bne menu + tst.b (readcharstatus,NodeBase) + bne logout + bra menu + +readmenunotchoices + push a2/d2 + move.l a0,a2 + jsr (inputnr) + beq.b 2$ ; ikke tall + andi.l #$ffff,d0 + moveq.l #0,d1 + move.w (confnr,NodeBase),d1 + move.l d0,d2 + jsr (typemsg) + bmi.b 1$ + move.l d2,(currentmsg,NodeBase) + bra.b 8$ +1$ lea (msgnotfoundtext),a0 + jsr (writeerroro) +8$ moveq #1,d0 + bra.b 99$ + +2$ jsr (justchecksysopaccess) ; er vi sysop ? + beq.b 9$ ; nei, da var det ihvertfall ukjennt. + move.l a2,a0 + lea (readsecretchtxt),a1 + jsr (scanchoices) + tst.l d1 + beq.b 9$ + subq.l #1,d0 + asl.w #2,d0 + lea (readsecrettable),a0 + move.l (0,a0,d0.w),a0 + jsr (a0) ; Utfører funksjonen + moveq #1,d0 + bra.b 99$ + +9$ tst.b (readcharstatus,NodeBase) + bne 10$ + moveq #-1,d0 +99$ pop a2/d2 + rts +10$ pop a2/d2 + bra logout + +markmenunotchoices + jsr (inputnr) + bne.b 3$ + IFND DEMO + lea (sntext),a1 + jsr (comparestrings) + bne.b 99$ + move.l (snumber),d0 + jsr (skrivnr) + jsr (outimage) + ENDC + bra.b 99$ ; Ikke noe tall +3$ jsr (allowmark) + bmi.b 9$ + beq.b 1$ + lea (cantmarkmsgtext),a0 + jsr (writeerrori) + bra.b 2$ +1$ lea (tmpmsgheader,NodeBase),a0 + jsr (insertinqueue) +2$ bsr readmenu +9$ clrn + rts +99$ setn + rts + +; execute the personal arexx loginscript, if any +dopersonalloginscript + link.w a3,#-80 + move.b (UserScript+CU,NodeBase),d0 + beq.b 9$ ; ingen script + move.l sp,a1 + lea (ploginscrname),a0 + jsr strcopy + subq.l #1,a1 + lea (UserScript+CU,NodeBase),a0 + jsr strcopy + subq.l #1,a1 + lea (dotabbstext),a0 + jsr strcopy + move.l sp,a0 + sub.l a1,a1 ; ingen feilmelding + jsr (doarexxdoor) +9$ unlk a3 + rts + +***************************************************************** +* Global meny * +***************************************************************** +;#b +;#c +mainmenu + move.w #0,(menunr,NodeBase) ;Skifter til Main menu + rts + +;#c +readmenu + move.w #4,(menunr,NodeBase) ;Skifter til Read menu + rts + +;#c +utilitymenu + move.w #12,(menunr,NodeBase) ;Skifter til Utility menu + rts + +;#c +chatmenu + move.w #28,(menunr,NodeBase) ;Skifter til chat menu + rts + +;#c +miscmenu + move.w #44,(menunr,NodeBase) ;Skifter til misc menu + rts + +;#c +dohelp lea helpscriptname,a0 + lea sorrynohelptext,a1 + jsr (doarexxdoor) + rts + +;#c +help jsr (outimage) + move.w (menunr,NodeBase),d0 + cmp.w #44,d0 ; er det misc meny ? + bne.b 1$ + lea (miscmenuscrname),a0 + jsr (getfilelen) ; har vi arexx script ? + beq.b 2$ + lea (miscmenuscrname),a0 + suba.l a1,a1 ; ingen feilmelding + bsr doarexxdoor ; tar arexx isteden... + bra.b 9$ +2$ move.w (menunr,NodeBase),d0 +1$ lea (menufiles),a0 + move.l (0,a0,d0.w),a0 + moveq.l #0,d0 + jsr (typefilemaybeansi) + beq.b 9$ + move.b (noglobal,NodeBase),d1 + bne.b 9$ + lea (globalmenufile),a0 + moveq.l #0,d0 + jsr (typefilemaybeansi) +9$ rts + +;#c +Next lea (checkfmsgictext),a0 + jsr (writetexto) + beq.b 9$ + jsr (joinnextunreadconf) + bne.b 9$ + lea (nonewiacmsgtext),a0 + jsr (writetexto) +9$ rts + +;#c +multijoin + push d2/d3/a2/a3/d4/d5 + lea (checkconfstext),a0 + jsr (writetexto) + beq 9$ + move.w (confnr,NodeBase),d3 ; hvor vi startet + move.w d3,d2 ; Nåværende conf + + lea (u_almostendsave+CU,NodeBase),a2 + lea (n_FirstConference+CStr,MainBase),a3 ; kan brukeren join'e ? + +1$ move.w d2,d0 + jsr (getnextconfnrsub) + move.w d0,d1 + subi.w #1,d1 + add.w d1,d1 ; gjor om til confnr standard + cmp.w d3,d1 ; ferdig ? + beq 9$ ; jepp + move.w d1,d5 + mulu #Userconf_seizeof/2,d5 + move.w d1,d2 ; nåværende konfnr. + move.w (uc_Access,a2,d5.l),d1 + btst #ACCB_Read,d1 ; Er vi medlem her ? + bne.b 1$ ; ja, tar neste + move.w d2,d5 + mulu #ConferenceRecord_SIZEOF/2,d5 + move.w (uc_Access,a2),d1 + btst #ACCB_Sysop,d1 ; Er vi sysop i main ? + bne.b 2$ ; ja, da sjekker vi ikke VIP'en + + move.w (n_ConfSW,a3,d5.l),d1 + btst #CONFSWB_VIP,d1 ; Kan han join'e denne ? + bne.b 1$ ; nei +2$ move.w d0,d4 ; husker (confnr/2)-1 + + move.w d2,d0 + jsr (typeconfinfo) + beq 9$ + + lea (conferecetext),a0 + jsr (writetext) + lea (n_ConfName,a3,d5.l),a0 + jsr (writetexto) + beq 9$ + lea (wanttojoinctext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq 8$ ; nei, eller noe galt + + move.w d2,d0 ; join konf'en + bset #31,d0 ; bare bli medlem + jsr (joinnr) + + lea (wanttoskipltext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq.b 8$ ; nei, eller noe galt + + move.l (n_ConfDefaultMsg,a3,d5.l),d0 ; tar en "M R" + move.w d2,d1 + mulu #Userconf_seizeof/2,d1 + move.l d0,(uc_LastRead,a2,d1.l) + bra 1$ + +8$ tst.b (readcharstatus,NodeBase) + beq 1$ +9$ pop d2/d3/a2/a3/d4/d5 + rts + +;#c JEO +opendoor + push d2-d4/a2 + link.w a3,#-80 + move.l sp,a2 + lea (erropendoortext),a0 + move.l (rexbase),d0 + beq 8$ + + move.l a2,a1 ; bygger opp setup filnavnet + lea (doorconfigfname),a0 + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + bsr 10$ ; leser inn fila + bne.b 100$ ; ok? + + move.l a2,a1 ; Nope, vi bruker default 0 + lea (doorconfigfname),a0 ; som er 0 fila + move.w #0,d0 ; nodenummer + jsr (fillinnodenr) + bsr 10$ ; leser inn fila + beq 8$ ; Error? + +100$ tst.b (readlinemore,NodeBase) ; er det mere input ? + bne 1$ +0$ move.b #0,(readlinemore,NodeBase) ; Sletter for sikkerhets skyld + ; og skriver ut menu + lea (maintmptext,NodeBase),a1 ; bygger opp door menu filnavnet + lea (doormenufilname),a0 + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 ; Filnavn i a0 + jsr (findfile) + lea (maintmptext,NodeBase),a0 ; skrive ut navn på nytt + bne 101$ ; funnet.. + + lea (maintmptext,NodeBase),a1 ; Ikke funnet, leser inn default + lea (doormenufilname),a0 + move.w #0,d0 ; nodenummer 0 = default + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 ; skriver ut menu da. + +101$ moveq.l #0,d0 + jsr (typefilemaybeall) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bsr 10$ ; leser inn fila igjen + beq 8$ ; error + +1$ lea (nrdoortopentext),a0 + jsr (readlineprompt) + beq 9$ + jsr (atoi) + lea (musthavenrtext),a0 + bmi.b 82$ + beq 0$ + move.l d0,d2 + move.l (tmpmsgmem,NodeBase),a0 + bsr findentrynr + beq 0$ + move.l d2,d1 + move.l a0,d2 + move.w d0,d3 ; husker type + + moveq.l #36,d0 + jsr (changenodestatus) + + lea (logopendoortext),a0 + move.l d2,a1 + jsr (writelogtexttimed) + + move.l d2,a0 + lea (erropendoortext),a1 + cmpi.b #'P',d3 ; er det paragon dør ? + bne.b 2$ + jsr (doparagondoor) + bra.b 4$ + +2$ cmpi.b #'A',d3 ; er det Arexx dør ? + bne.b 3$ + bsr doarexxdoor + bra.b 4$ + +3$ cmpi.b #'S',d3 ; er det Shell dør ? + bne.b 7$ + bsr doshelldoor + +4$ moveq.l #4,d0 + jsr (changenodestatus) + bra.b 9$ +7$ lea (unknowformatext),a0 + bra.b 82$ + +8$ lea (nodoronsystext),a0 +82$ jsr (writeerroro) +9$ unlk a3 + pop d2-d4/a2 + rts + +10$ move.l a2,d1 ; leser inn fila. + move.l #MODE_OLDFILE,d2 + move.l (dosbase),a6 + jsrlib Open + move.l d0,d4 + beq.b 19$ + move.l (msgmemsize,NodeBase),d3 + move.l (tmpmsgmem,NodeBase),d2 ; Bruker tmpmsgmem til buffer + move.l d4,d1 + jsrlib Read + exg d4,d1 + jsrlib Close + moveq.l #-1,d0 + cmp.l d0,d4 ; error ? + beq.b 19$ ; jepp + move.l (tmpmsgmem,NodeBase),a0 + move.b #0,(0,a0,d4.l) ; markerer slutten + tst.l d4 ; var det noe ? +19$ move.l (exebase),a6 + rts + +; a0 = minne +; d0 = entry nr +; returnerer filnavn i a0, og type i d0 +findentrynr + move.l d0,d1 ; linje nr. +1$ move.b (a0)+,d0 + beq.b 9$ ; end of block + cmpi.b #' ',d0 ; skip'er space, + beq.b 1$ + cmpi.b #9,d0 ; tab, + beq.b 1$ + cmpi.b #10,d0 ; og linefeed + beq.b 1$ + cmpi.b #';',d0 + beq.b 2$ ; komentar + subi.b #1,d1 ; reduserer linje nr med 1 + bne.b 2$ ; ikke denne linja, skiper. + + move.b d0,d1 ; husker typen + move.b (a0)+,d0 + beq.b 9$ + cmpi.b #' ',d0 ; Skal ha en space eller + beq.b 3$ + cmpi.b #9,d0 ; tab imellom + bne.b 9$ +3$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #' ',d0 ; skip'er space + beq.b 3$ + cmpi.b #9,d0 ; og tab + beq.b 3$ + + lea (-1,a0),a1 ; husker starten på navnet +5$ move.b (a0)+,d0 ; finner slutten + beq.b 4$ + cmpi.b #' ',d0 + beq.b 4$ + cmpi.b #10,d0 + beq.b 4$ + cmpi.b #9,d0 + bne.b 5$ +4$ move.b #0,-(a0) ; markerer slutten + move.l a1,a0 ; returnerer navn + move.l d1,d0 ; og type + bra.b 9$ + +2$ move.b (a0)+,d0 ; skip'er til EOL + beq.b 9$ + cmpi.b #10,d0 + bne.b 2$ + bra.b 1$ ; og tar ny linje + +9$ rts + +doshelldoor + push a2/d2-d4 + link.w a3,#-30 + move.l a0,a2 ; husker door navnet + jsr (updatetime) + lea (Name+CU,NodeBase),a0 ; setter opp locale variable Fullname + move.l a0,d2 + jsr (strlen) + move.l d0,d3 + move.l #localefullname,d1 + move.l #GVF_LOCAL_ONLY,d4 + move.l dosbase,a6 + jsrlib SetVar + move.w (NodeNumber,NodeBase),d0 ; og Nodenr... + move.l sp,a0 + jsr (konverterw) + move.l sp,a0 + move.l a0,d2 + jsr (strlen) + move.l d0,d3 + move.l #localenodenr,d1 + jsrlib SetVar + +; move.w (NodeNumber,NodeBase),d0 ; og timeleft. +; move.l sp,a0 +; jsr (konverterw) +; move.l sp,a0 +; move.l a0,d2 +; jsr (strlen) +; move.l d0,d3 +; move.l #localetimeleft,d1 +; jsrlib SetVar + + move.l exebase,a6 + + move.l a2,a0 ; kjører selve door'en + bsr doshelldoorsub + + move.l #localefullname,d1 + move.l #GVF_LOCAL_ONLY,d2 + move.l dosbase,a6 + jsrlib DeleteVar + move.l #localenodenr,d1 + jsrlib DeleteVar + move.l exebase,a6 + unlk a3 + pop a2/d2-d4 + rts + +GetChar move.l (exebase),a6 + jsr (stoptimeouttimer) + move.l d1,d0 + jsr (starttimeouttimersec) ; starter timer + jsr (readchar) + bne.b 9$ ; Fikk char, returnerer + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ ; hopper ut hvis vi fikk no carrier + moveq.l #-1,d0 ; fikk timer return + jsr (stoptimeouttimer) +9$ rts + +; a0 = script name +; a1 = feilmelding +doarexxdoor + push a2/d2/d3/a3 + move.l a0,d3 ; husker script name + move.l a1,a3 ; husker feilmelding + move.l (rexbase),d0 + beq 9$ ; no rexx + move.l d0,a6 + move.l (rexxport,NodeBase),a0 + lea (Publicportname,NodeBase),a1 + move.l a1,d0 + lea (abbsextension),a1 + jsrlib CreateRexxMsg ; lager Arexx melding + move.l a0,a2 + move.l a3,a0 ; gjør klar feilmelding + tst.l d0 + beq 8$ ; error + move.l #RXCOMM|(1< " + jsr (writechar) + move.w (Nodenr,a2),d0 + andi.l #$ffff,d0 + jsr (connrtotext) + moveq.l #4,d0 + jsr (writetextlfill) + lea (ansigreentext),a0 + jsr (writetext) + move.l (Nodespeed,a2),d0 ; Skriver ut nodespeeden + bne.b 1$ + lea (localtext),a0 ; Hvis speed = 0 => lokalnode + moveq.l #8,d0 + bra.b 2$ +1$ move.b #' ',d0 + jsr (writechar) + move.l (Nodespeed,a2),d0 + jsr (connrtotext) ; Ekstern node, skriv ut baud hastighet + moveq.l #7,d0 +2$ jsr (writetextlfill) + move.b (NodeECstatus,a2),d1 + move.b #'V',d0 + btst #NECSB_V42BIS,d1 + bne.b 10$ + move.b #'M',d0 + btst #NECSB_MNP,d1 + bne.b 10$ + move.b #' ',d0 +10$ jsr (writechar) + move.b #' ',d0 + jsr (writechar) + lea (ansiyellowtext),a0 + jsr (writetext) + move.w (Nodestatus,a2),d0 ; skriver ut nodestatusen + move.b (Nodedivstatus,a2),d1 ; er det stealth login ? + andi.b #NDSF_Stealth,d1 + beq.b 15$ ; nei, da lyver vi ikke + move.w #0,d0 ; sier at vi er log'a ut + bra.b 7$ +15$ cmp.w #4,d0 ; er vi active ? + bne.b 7$ ; nei, ikke mere + move.b (Nodedivstatus,a2),d1 + andi.b #NDSF_Notavail,d1 ; avail ? + beq.b 7$ ; ja, da skriver vi active. + moveq.l #56,d0 ; ikke avail +7$ cmp.w #68,d0 ; arexx sin utbyttersak ? + bne.b 71$ + move.l (NodesubStatus,a2),a0 ; ja, tar den + bra 6$ +71$ lea (statustext),a0 + move.l (0,a0,d0.w),a0 ; heter den ved indexering + cmpi.w #12,d0 ; enter msg ? + beq.b 12$ ; ja + cmpi.w #16,d0 ; reply msg ? + bne.b 13$ ; nei +12$ move.l (NodesubStatus,a2),d0 + cmp.l (Usernr+CU,NodeBase),d0 ; til oss ? + bne.b 6$ ; nei. + lea (maintmptext,NodeBase),a1 + jsr (strcopy) + move.b #' ',(-1,a1) + lea (toyoutext),a0 + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + bra.b 6$ + +13$ cmpi.w #36,d0 ; I door ? + beq.b 11$ ; ja + cmpi.w #52,d0 ; DL'er han hold ? + beq.b 11$ ; ja + cmpi.w #24,d0 ; DL'er han ? + bne.b 6$ ; nei. +11$ lea (maintmptext,NodeBase),a1 + jsr (strcopy) + subq.l #1,a1 + move.l (NodesubStatus,a2),d0 + move.l a1,a0 + jsr (konverter) + move.w (Nodestatus,a2),d0 ; skriver ut nodestatusen + cmpi.w #36,d0 ; I door ? + beq.b 14$ ; Ja, da kutter vi ut K'en. + move.b #'K',(a0)+ + move.b #0,(a0) +14$ lea (maintmptext,NodeBase),a0 +6$ moveq.l #25,d0 + jsr (writetextlfill) + + lea (ansiwhitetext),a0 + jsr (writetext) + lea (Nodeuser,a2),a0 ; Skriver ut bruker navn. + tst.b (a0) ; Er det et navn der? + bne.b 50$ ; Ja + lea (notavailable),a0 ; Ellers skriv N/A +50$ jsr (writetext) + lea (NodeuserCityState,a2),a0 ; Skriver ut city/state. + tst.b (a0) + beq.b 4$ + move.b #',',d0 + jsr (writechar) + move.b #' ',d0 + jsr (writechar) + lea (ansilillatext),a0 + jsr (writetext) + lea (NodeuserCityState,a2),a0 ; Skriver ut city/state. + jsr (writetext) +4$ jsr (outimage) + beq.b 9$ + +5$ move.l (LN_SUCC,a2),a2 ; Henter ptr til nestenode + move.l (LN_SUCC,a2),d0 ; er det noen flere noder ? + bne 3$ ; flere noder. Same prosedure as last year + move.w (MainBits,MainBase),d0 + andi.w #MainBitsF_SysopNotAvail,d0 + bne.b 8$ + move.b #10,d0 + jsr (writechar) + moveq.l #15,d0 + lea (spacetext),a0 + jsr (writetextlen) + lea (ansiyellowtext),a0 + jsr (writetext) + lea (plainsysoptext),a0 + jsr (writetext) + move.b #' ',d0 + jsr (writechar) + lea (availforchatext),a0 + jsr (writetexto) + beq.b 9$ +8$ jsr (outimage) +9$ move.l (sp)+,a2 + rts + +;#c +entermsg + push a2/a3/d2/d4/d3 + move.l (tmpmsgmem,NodeBase),a3 + jsr (sjekklovtilaaskrive) ; har vi skrive access i denne konferansen ? + beq 9$ ; nope, ut me'n + + lea (tmpmsgheader,NodeBase),a2 ; clear'er msgheader + move.l a2,a0 + move.w #MessageRecord_SIZEOF,d0 + jsr (memclr) + move.w (confnr,NodeBase),d1 + + lea (n_FirstConference+CStr,MainBase),a1 + mulu #ConferenceRecord_SIZEOF/2,d1 + move.l (n_ConfDefaultMsg,a1,d1.l),d0 ; henter siste meldings nummer + addq.w #1,d0 ; øker med en.. + move.l d0,(Number,a2) ; og bruker som meldingsnummer + move.b #MSTATF_NormalMsg,(MsgStatus,a2) + move.b #SECF_SecNone,(Security,a2) + move.b #0,(MsgBits,a2) ; clear bits + move.l (Usernr+CU,NodeBase),(MsgFrom,a2) + + move.w (n_ConfSW,a1,d1.l),d3 ; Finner ut om vi er i en postpox + moveq.l #0,d2 ; vi er ikke i post konferanse + lea (sendmsgtotext),a0 ; default text med (CR for ALL) + btst #CONFSWB_PostBox,d3 + beq.b 1$ ; ikke post + lea (sendmsgtouatext),a0 ; ny text uten (CR for ALL) + moveq.l #1,d2 ; vi er i post... + moveq.l #0,d0 ; vi godtar ikke all + bra.b 2$ +1$ moveq.l #1,d0 ; vi godtar all +2$ moveq.l #0,d4 ; ikke net navn (enda) + btst #CONFSWB_Network,d3 + beq.b 3$ ; ikke net conf.. + moveq.l #1,d4 ; vi skal ha net navn alikevel +3$ move.l d4,d1 ; nettnavn status + moveq.l #0,d4 ; ikke net melding enda + jsr (getnamenrmatch) + bne.b 4$ + move.b (readcharstatus,NodeBase),d1 + bne 9$ ; det skjedde noe spes, ut + tst.w d2 ; ALL ikke tillatt i post konfer. (d2 = 1 for post) + beq.b 5$ ; ikke i post, alt ok. + moveq.l #-1,d1 ; sjekker om vil fikk ALL + cmp.l d1,d0 + beq 9$ ; jepp, da hopper vi bare ut... + move.b #SECF_SecReceiver,(Security,a2) ; vi er i post, så sett access + bra.b 5$ +4$ bpl.b 5$ ; ikke net navn + moveq.l #-2,d0 + moveq.l #1,d4 ; nå er vi net navn.. +; a0 er nå net navne, og d0 er net bruker + move.b #Net_ToCode,(a3)+ ; fyller i to bruker +401$ move.b (a0)+,(a3)+ + bne.b 401$ + move.b #10,(-1,a3) + move.l d0,(MsgTo,a2) + bra.b 6$ ; netmelding -> skal ikke sjekke medlemskap +5$ move.l d0,(MsgTo,a2) + moveq.l #-1,d1 + cmp.l d1,d0 + beq.b 6$ + move.w (confnr,NodeBase),d1 + jsr (checkmemberofconf) + bne.b 6$ + lea (loadusererrtext),a0 + bmi 8$ + lea (sorryusnmoctext),a0 + bra 8$ +6$ lea (entersubjectext),a0 ; vi ber om subject + lea (nulltext),a1 + moveq.l #Sizeof_NameT,d0 + tst.w d4 ; ikke net melding -> Sizeof_NameT + beq.b 7$ + moveq.l #60,d0 ; 60 er et fint tall... +7$ jsr (mayedlineprompt) + beq 9$ ; bare return. Ut.. + move.l a0,a1 + jsr (strlen) + moveq.l #Sizeof_NameT,d1 + cmp.l d0,d1 + bcc.b 10$ ; plass i header strukturen + move.b #Net_SubjCode,(a3)+ ; fyller i net header. +701$ move.b (a1)+,(a3)+ + bne.b 701$ + move.b #10,(-1,a3) + bra.b 11$ +10$ move.l a1,a0 + lea (Subject,a2),a1 + jsr (strcopymaxlen) + +11$ move.l (MsgTo,a2),d0 ; Kan meldingen være privat ? + moveq.l #-1,d1 + cmp.l d1,d0 + beq.b 14$ ; Aldri når den er til alle .. + tst.w d2 ; Er i post, så da er den allerede.. + bne.b 12$ ; Setter alikevel for sikkerhet.. + btst #CONFSWB_Private,d3 ; kan vi ha privat ? + beq.b 14$ ; nei, ikke i denne conf'en + lea (privatemsgetext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 13$ +12$ move.b #SECF_SecReceiver,(Security,a2) + bra.b 14$ +13$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ ; noe rart skjedde.. + +14$ moveq.l #12,d0 ; Status = enter msg. + moveq.l #-1,d1 + tst.w d4 ; netmeldinger er til "all" for å hindre at noen får "to you" + bne.b 15$ + move.l (MsgTo,a2),d1 +15$ jsr (changenodestatus) + lea (MsgTimeStamp,a2),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + + move.b #0,(a3) + move.l (tmpmsgmem,NodeBase),a0 + jsr (strlen) ; hvor mye har vi brukt ? + move.l d0,d4 ; husker size (Blir jo ulik 0 alikevel..) + move.l (msgmemsize,NodeBase),d0 + sub.l d4,d0 + bcs 9$ ; for lite, skal ikke kunne skje, men .. + move.l a2,a0 + move.l a3,a1 + move.l (tmpmsgmem,NodeBase),d1 + jsr (calleditor) + beq.b 16$ + tst.w d4 + beq.b 17$ ; det er ikke net melding + neg.w (NrLines,a2) ; merker det som det + add.w d4,(NrBytes,a2) ; korigerer NrBytes +17$ move.w (confnr,NodeBase),d0 + move.l a2,a1 + move.l (tmpmsgmem,NodeBase),a0 + jsr (savemsg) + lea (cnotsavemsgtext),a0 + bne.b 8$ ; error + lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (savedtext),a0 + jsr (writetexto) + move.l (Number,a2),d0 + bsr stopreviewmessages + addq.w #1,(MsgsLeft+CU,NodeBase) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + move.l (tmpmsgmem,NodeBase),a1 + jsr (sendintermsgmsg) + move.l (Number,a2),d1 + lea (logentermsgtext),a0 + move.w (confnr,NodeBase),d0 ; conf nr + jsr (killrepwritelog) + bra.b 9$ + +16$ tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ + lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (abortedtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + pop a2/a3/d2/d4/d3 + rts + +; msg nr +stopreviewmessages + move.w (Userbits+CU,NodeBase),d1 ; skal vi beholde egne msg'er ? + andi.w #USERF_KeepOwnMsgs,d1 + bne.b 9$ ; ja. + move.l (HighMsgQueue,NodeBase),d1 ; Er meldingen vi lagrer den neste ? + addq.l #1,d1 + cmp.l d0,d1 + bne.b 9$ ; nei. + move.l d0,(HighMsgQueue,NodeBase) ; Oppdaterer HighMsgQueue. +9$ rts + +;#c +bulletins + push d2/d3/a2/d4 + link.w a3,#-160 + move.l a3,d4 + move.w (confnr,NodeBase),d0 + lsr.w #1,d0 ; her jobber vi med * 1.. + move.w d0,d2 + lea (n_FirstConference+CStr,MainBase),a3 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a3 + move.w (n_ConfBullets,a3),d0 ; har denne konfen bulletiner ? + bne.b 2$ ; Ja, hopp + moveq.l #0,d2 ; Nei, bruk NEWS + lea (n_FirstConference+CStr,MainBase),a3 + move.w (n_ConfBullets,a3),d0 ; har NEWS bulletiner ? + beq 99$ ; Nei, ingen ting å gjøre. +2$ moveq.l #-1,d3 ; siste bulletin vi leste + tst.b (readlinemore,NodeBase) + bne.b 1$ +3$ move.w d2,d0 + move.l sp,a0 ; fyller i navnet til bl filen + jsr (getkonfbulletlist) + move.l sp,a0 + moveq.l #0,d0 + jsr (typefilemaybeall) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + move.w d2,d0 + moveq.l #0,d1 + jsr (checkupdatedbulletins) +1$ lea (entbulletnrtext),a0 + lea (bulletihelpfile),a1 + lea (entbullhelptext),a2 + jsr (readlinepromptwhelp) + beq 9$ +; move.l a0,-(sp) +; jsr (newlinei) +; move.l (sp)+,a0 +; lea (ymchosebulltext),a0 + move.b (a0),d0 ; fjerner "b " hvis svaret starter + cmpi.b #'B',d0 ; med dette. + beq.b 6$ ; Dette for å hjelpe dumme brukere.. + cmpi.b #'b',d0 + bne.b 8$ +6$ tst.b (readlinemore,NodeBase) ; er det mere ? + beq.b 8$ ; nei, da tolker vi det som en navn + jsr (readline) ; henter bull nr + beq 9$ +8$ move.l a0,a2 ; husker input + jsr (atoi) + bmi.b 7$ ; ikke tall + beq.b 5$ + moveq.l #0,d1 + move.w (n_ConfBullets,a3),d1 + cmp.l d0,d1 ; Finnes denne bulletinen ? + bcs.b 5$ ; Nei. + move.l d0,d3 ; siste bulletin vi leste + move.w d2,d1 + lea (maintmptext,NodeBase),a0 + jsr (getkonfbulletname) + lea (maintmptext,NodeBase),a0 + moveq.l #0,d0 + jsr (typefilemaybeall) +; beq.b ; fix me! + lea (maintmptext,NodeBase),a1 ; sier ifra til log'en + lea (logreadbultext),a0 + jsr (writelogtexttimed) + lea (NormAtttext),a0 ; sender ANSI reset. + jsr (writetexti) + bra 1$ +5$ lea (nobullettext),a0 +4$ jsr (writeerroro) + bra 1$ +7$ move.b (a2),d0 + jsr (upchar) + cmp.b #'L',d0 ; List + beq 3$ + cmp.b #'D',d0 ; download + beq.b 10$ + cmp.b #'A',d0 + lea (invalidcmdtext),a0 + bne.b 4$ + lea (ymchosebulltext),a0 + move.l d3,d0 + bmi.b 4$ + move.w d2,d1 + lea (maintmptext,NodeBase),a0 + jsr (getkonfbulletnamenopath) + lea (maintmptext,NodeBase),a1 + lea (80,sp),a0 + jsr (getholddirfilename) ; finner dest navn + move.l d3,d0 + move.w d2,d1 + lea (maintmptext,NodeBase),a0 + jsr (getkonfbulletname) ; finner source navn + lea (maintmptext,NodeBase),a0 + jsr (getbestfilename) ; mekker til .raw osv. + lea (80,sp),a1 + jsr (copyfile) + lea doserrortext,a0 + beq.b 4$ + bra 1$ + +10$ lea (ymchosebulltext),a0 ; tar download bulletin + move.l d3,d0 + bmi 4$ + move.w d2,d1 + lea (80,sp),a0 + jsr (getkonfbulletname) ; finner source navn + lea (80,sp),a0 + jsr (getbestfilename) ; mekker til .raw osv. + lea (80,sp),a1 + jsr (strcopy) ; .. og flytter + lea (80,sp),a0 + + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + bne.b 11$ ; no, go ahead + + jsr (getfullnameusetmp) + beq 1$ ; rydder opp + move.l a0,a1 + lea (80,sp),a0 + jsr (copyfile) + lea (errorsendtext),a0 + beq 4$ + bra.b 12$ + +11$ jsr (sendfile) + bmi 9$ ; ut asap. + lea (errorsendtext),a0 + beq 4$ ; Error +12$ lea (dlcompletedtext),a0 + jsr (writetexto) + bra 1$ +99$ lea (nobulletinstext),a0 + jsr (writetexto) +9$ move.l d4,a3 + unlk a3 + pop d2/d3/a2/d4 + rts + +;#c SH U / SH A +loginshowconferences + moveq.l #0,d0 + bra.b showconferences1 +showconferences + lea (showconfopttext),a0 + jsr (readlineprompt) + bne.b 1$ +9$ rts +1$ move.b (a0),d0 + jsr (upchar) + move.b d0,d1 + moveq.l #0,d0 + cmpi.b #'U',d1 + beq.b showconferences1 +; moveq.l #1,d0 +; cmpi.b #'A',d1 + jsr _ShowConferencesAll + cmpi.b #1,d0 ; Var det en a? + beq.b 9$ + lea (invalidcmdtext),a0 + jsr (writeerroro) + beq.b 9$ + bra.b showconferences +showconferences1 ; ALL + push d2/d3/d4/d5/d6/d7/a2/a3 + move.w d0,(tmpstore,NodeBase) ; husker om det er alle konferansene + moveq.l #0,d4 ; antall konfer med meldinger + lea (ansigreentext),a0 ; skriver ut header + jsr (writetext) + lea (confstatustext),a0 + jsr (writetexti) + beq 9$ + jsr (outimage) + beq 9$ + lea (confstatustext),a0 + jsr (strlen) + subq.l #1,d0 + lea (minustext),a0 + jsr (writetextlen) + jsr (outimage) + beq 9$ + + moveq.l #0,d2 ; starter alltid ifra news + lea (u_almostendsave+CU,NodeBase),a2 + lea (n_FirstConference+CStr,MainBase),a3 +; JEO JEO +; move.w confnr(NodeBase),d2 ; konf nr +; cmp.w #-1,d2 +; bne.b 2$ +; move.w d2,d0 +; jsr (getnextconfnrsub) +; sub.w #1,d0 +; add.w d0,d0 ; gjor om til confnr standard +; move.w d0,d2 +; JEO JEO + +2$ move.w d2,(tmpval,NodeBase) ; husker starten + +1$ move.w (tmpstore,NodeBase),d0 ; skal vi skrive div status ? + beq.b 17$ ; nei + + move.w (n_ConfSW,a3),d0 ; er det vip ? + btst #CONFSWB_VIP,d0 + beq 13$ ; nei + move.w (uc_Access,a2),d0 + btst #ACCB_Read,d0 ; Er vi medlem her ? + beq 8$ ; Nei, hopp + bra 13$ +17$ move.w (uc_Access,a2),d0 + btst #ACCB_Read,d0 ; Er vi medlem her ? + beq 8$ ; Nei, hopp + move.l (n_ConfDefaultMsg,a3),d0 ; Finner antall nye meldinger + sub.l (uc_LastRead,a2),d0 + bpl.b 7$ + moveq.l #0,d0 ; negativt. Feil ... rette opp. +7$ moveq.l #0,d5 ; Antall nye meldinger. + moveq.l #0,d7 ; Antall til oss. +; move.l d2,-(sp) ; lagrer conf nr + move.l d0,d3 ; husker antall nye meldinger + beq 6$ ; vi hopper over denne "tomme" conf'en +; add.l d2,d2 ; gjør om til konf nr * 2 + move.l (uc_LastRead,a2),d6 ; Siste leste. + +4$ addq.l #1,d6 ; sjekker alle nye meldinger + subq.l #1,d3 + bcs.b 6$ ; Vi er ferdige + move.w d2,d1 ; leser inn meldingsheader + move.l d6,d0 + lea (tmpmsgheader,NodeBase),a0 + jsr (loadmsgheader) + beq.b 5$ +191$ lea (errloadmsghtext),a0 + jsr (writeerroro) +; move.l (sp)+,d2 + bra 9$ +5$ lea (tmpmsgheader,NodeBase),a0 ; kan vi lese denne meldingen ? + move.w d2,d0 ; henter frem conf nr + lsr.w #1,d0 + jsr (kanskrive) + bne.b 4$ ; nei ... + addq.l #1,d5 ; øker antallet nye meldinger + lea (tmpmsgheader,NodeBase),a0 ; er den til oss ? + move.w (NrLines,a0),d0 ; net message ? + bpl.b 19$ ; Nope + move.l a0,a1 + move.w d2,d0 ; henter inn msgtext + move.l (tmpmsgmem,NodeBase),a0 + jsr (loadmsgtext) + bne.b 191$ + lea (tmpmsgheader,NodeBase),a0 + move.l (tmpmsgmem,NodeBase),a1 + jsr istonetname + lea (tmpmsgheader,NodeBase),a0 + bne.b 19$ ; ikke net to navn + bra.b 4$ ; det var net to navn, da er den ikke til oss +19$ move.l (Usernr+CU,NodeBase),d0 + cmp.l (MsgTo,a0),d0 + bne.b 4$ ; nei + addq.l #1,d7 ; øker antall meldinger til oss + bra.b 4$ +6$ ; move.l (sp)+,d2 ; konf nr + tst.l d5 ; var det noen nye meldinger ? + bne.b 18$ ; ja + move.l (n_ConfDefaultMsg,a3),(uc_LastRead,a2) ; setter last read til maks +18$ moveq.l #0,d6 ; ingen bulletins (d6 er ledig) + move.l d2,d0 + lsr.w #1,d0 + moveq.l #1,d1 ; Vil bare vite om det er forandret + jsr (checkupdatedbulletins) + beq.b 14$ + moveq.l #1,d6 ; det var noen nye +14$ move.l d5,d0 ; Er det noen meldinger ? + bne.b 13$ ; Ja. + tst.l d6 ; nye bulletins ? + beq 8$ ; nei, hopper over +13$ lea (ansilbluetext),a0 ; skriver ut conf navn + jsr (writetext) + lea (n_ConfName,a3),a0 + moveq.l #Sizeof_NameT,d0 + jsr (writetextlfill) + lea (kolonspacetext),a0 + jsr (writetext) + lea (ansiwhitetext),a0 + jsr (writetext) + move.w (tmpstore,NodeBase),d0 ; skal vi skrive div status ? + beq.b 16$ ; nei + bsr 20$ ; skriver div info'en + beq 9$ ; outimage break. + bra 10$ ; neste loop +16$ move.l d5,d0 ; skriver antall nye meldinger + jsr (skrivnr) + lea (msgunreadtext),a0 + jsr (writetext) + tst.l d5 ; div utskrifter for å få + beq.b 3$ ; "fete" meldinger + tst.l d7 + beq.b 3$ + lea (kommaspacetext),a0 + jsr (writetext) + cmp.l d7,d5 + bne.b 11$ + lea (smallalltext),a0 + jsr (writetext) + bra.b 12$ +11$ move.l d7,d0 + jsr (skrivnr) +12$ lea (foryoutext),a0 + jsr (writetext) +3$ move.b #'.',d0 + jsr (writechar) + tst.l d6 ; nye bulletiner ? + beq.b 15$ ; nei. + lea (updatedbultext),a0 + jsr (writetext) +15$ jsr (outimage) + beq.b 9$ + tst.l d7 + bne.b 10$ ; Det er noen til oss. + move.w (n_ConfSW,a3),d0 + btst #CONFSWB_PostBox,d0 + beq.b 10$ ; Dette er ikke en post conferanse. + move.w (uc_Access,a2),d1 ; Setter last read til maks i konf'en + andi.b #ACCF_Sigop+ACCF_Sysop,d1 ; Hvis vi ikke er sysop da.. + bne.b 10$ + move.l (n_ConfDefaultMsg,a3),(uc_LastRead,a2) +10$ addq.l #1,d4 ; øker antall konferanser vi har skrevet ut + +8$ move.w d2,d0 + jsr (getnextconfnrsub) + subi.w #1,d0 + add.w d0,d0 ; gjor om til confnr standard + move.w d0,d2 + lea (u_almostendsave+CU,NodeBase),a2 + mulu #Userconf_seizeof/2,d0 + add.l d0,a2 + lea (n_FirstConference+CStr,MainBase),a3 + move.w d2,d0 + mulu #ConferenceRecord_SIZEOF/2,d0 + add.l d0,a3 + cmp.w (tmpval,NodeBase),d2 + bne 1$ + + tst.l d4 ; var det noe ? + bne.b 9$ ; ja + lea (ansiwhitetext),a0 + jsr (writetext) + lea (nonewiacmsgtext),a0 ; Sier det ikke var noen + jsr (writetexto) +9$ pop d2/d3/d4/d5/d6/d7/a2/a3 ; ferdig + rts + +20$ push d3/d2/d4 + lsr.w #1,d2 + move.w (uc_Access,a2),d4 + lea (Membertext),a0 + btst #ACCB_Read,d4 + bne.b 21$ + lea (Nonmembertext),a0 +21$ jsr (writetext) + move.w (n_ConfSW,a3),d3 + btst #ACCB_Write,d4 ; har vi read ? + bne.b 22$ ; ja, da er det ikke read only + btst #CONFSWB_ImmWrite,d3 + bne.b 22$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (READONLYtext),a0 + jsr (writetext) +22$ btst #CONFSWB_PostBox,d3 + beq.b 221$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (Mailtext),a0 + jsr (writetext) +221$ cmpi.w #2,d2 + bne.b 23$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (USERINFOtext),a0 + jsr (writetext) +23$ cmpi.w #3,d2 + bne.b 24$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (FILEINFOtext),a0 + jsr (writetext) +24$ btst #CONFSWB_Private,d3 + beq.b 25$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (Privateallotext),a0 + jsr (writetext) +25$ btst #CONFSWB_Resign,d3 + bne.b 251$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (Obligatorytext),a0 + jsr (writetext) +251$ btst #CONFSWB_Network,d3 + beq.b 26$ + lea (kommaspacetext),a0 + jsr (writetext) + lea (Networkconftext),a0 + jsr (writetext) +26$ move.b #'.',d0 + jsr (writechar) + cmpi.w #1,d2 + bls.b 27$ ; tar ikke post og news + move.b (n_ConfBullets,a3),d0 ; har denne konfen bulletiner ? + beq.b 27$ ; Nei, hopp + lea (Bulletinstext),a0 + jsr (writetext) +27$ jsr (outimage) + pop d3/d2/d4 + rts + +;#c +time link.w a3,#-30 + jsr (updatetime) + lea (loginattext),a0 + moveq.l #17,d0 + jsr (writetextlfill) + lea (LastAccess+CU,NodeBase),a0 + jsr (timetostring) + jsr (writetexti) + + lea (timenowtext),a0 + moveq.l #17,d0 + jsr (writetextlfill) + move.l sp,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + move.l sp,a0 + jsr (timetostring) + jsr (writetexto) + + move.w (TimeLimit+CU,NodeBase),d0 + beq.b 1$ + lea (timeallowed),a0 + jsr (writetext) + move.l (ds_Minute,sp),d0 + divu #60,d0 + sub.w #1,d0 + bcc.b 7$ + move.w #23,d0 +7$ lea (HourMaxTime+Nodemem,NodeBase),a0 + moveq.l #0,d1 + move.b (a0,d0.w),d1 + move.w (TimeLimit+CU,NodeBase),d0 + cmp.w #60,d1 + bcc.b 6$ ; ingen time limit + cmp.w d0,d1 ; timelimit,hourlimit + bcc.b 6$ + move.w d1,d0 ; bruker hourlimit isteden +6$ push d0 + jsr (skrivnrw) + lea (minutestext),a0 + jsr (writetext) + + lea (timeremaintext),a0 + jsr (writetext) + pop d0 + sub.w (TimeUsed+CU,NodeBase),d0 + bcc.b 5$ + moveq.l #0,d0 +5$ jsr (skrivnrw) + lea (minutestext),a0 + jsr (writetexti) + +1$ cmpi.w #16,(menunr,NodeBase) ; Er vi i File menu ? + bne.b 2$ ; Nei. + move.w (FileLimit+CU,NodeBase),d0 ; har vi begrensning ? + beq.b 2$ ; nei. + lea (ftimelefttext),a0 ; Skriver fil tid igjen. + jsr (writetext) + move.w (FileLimit+CU,NodeBase),d0 + add.w (minul,NodeBase),d0 + sub.w (FTimeUsed+CU,NodeBase),d0 + bcc.b 3$ + moveq.l #0,d0 +3$ jsr (skrivnrw) + lea (minutestext),a0 + jsr (writetext) + +2$ lea (timeonlinetext),a0 ; Skriver tid online. + jsr (writetext) + move.w (TimeUsed+CU,NodeBase),d0 + add.w (minchat,NodeBase),d0 + add.w (minul,NodeBase),d0 + sub.w (OldTimelimit,NodeBase),d0 + bcc.b 4$ + moveq.l #0,d0 +4$ jsr (skrivnrw) + lea (minutestext),a0 + jsr (writetexti) + jsr (outimage) + unlk a3 + rts + +;#c +nodemessage + movem.l d2/a2,-(a7) + lea (nodenrtext),a0 + jsr (readlineprompt) + beq 9$ + jsr (atoi) + lea (musthavenrtext),a0 + bmi 3$ + move.l d0,d2 + beq.b 6$ ; node nummer 0 = alle + cmp.w (NodeNumber,NodeBase),d0 + bne.b 1$ + lea (cantsendtoytext),a0 + jsr (writeerroro) + bra 9$ +1$ move.l nodelist+LH_HEAD,a2 ; Henter pointer til foerste node + move.l (LN_SUCC,a2),d0 + beq 9$ ; ingen noder. Egentlig umulig men .... +4$ move.w (Nodenr,a2),d0 + cmp.w d0,d2 ; mottager node ? + beq.b 5$ ; ja + move.l (LN_SUCC,a2),a2 ; Henter ptr til nestenode + move.l (LN_SUCC,a2),d0 + bne.b 4$ ; flere noder. Same prosedure as last year + lea (unknownnodetext),a0 ; fant den ikke. Skriver feil. + bra 3$ +5$ move.w (Nodestatus,a2),d0 ; henter nodestatus'en + lea (nactiveusertext),a0 + beq 3$ ; ikke aktiv (logged off) + move.b (Nodedivstatus,a2),d1 ; er det stealth login ? + btst #NDSB_Stealth,d1 + bne 3$ ; lurer Jon Suphammer + jsr justchecksysopaccess + bne.b 6$ ; vi er sysop, kan sende alikevel + lea (thusernomsgtext),a0 + move.b (Nodedivstatus,a2),d1 + andi.b #NDSF_Notavail,d1 + bne 3$ ; Nekte å sende nodemeldinger hvis vi er unavailible +6$ tst.b (readlinemore,NodeBase) + bne.b 2$ + lea (texttext),a0 + jsr (writetexti) +2$ moveq.l #78,d0 + jsr (readlineall) + beq.b 9$ + move.l (Tmpusermem,NodeBase),a2 + lea (i_msg,a2),a1 + jsr (memcopylen) + move.b #0,(a1) ; paranoia + move.b #2,(i_type,a2) + move.w (NodeNumber,NodeBase),(i_franode,a2) +; fjernet logutskrift siden folk ikke ville ha det.. +; lea (tmptext,NodeBase),a0 ; skriver i log'en +; move.l d2,d0 +; jsr (konverter) +; lea (tmptext,NodeBase),a1 +; lea (logsnodemsgtext),a0 +; jsr (writelogtexttimed) + move.b #0,(i_pri,a2) + jsr (justchecksysopaccess) + beq.b 7$ + move.b #1,(i_pri,a2) ; vi er sysop, så denne har prioritet +7$ move.l a2,a0 ; sender meldingen + move.l d2,d0 + jsr (sendintermsg) + beq.b 9$ + lea (nactiveusertext),a0 + cmpi.w #Error_No_Active_User,d1 + beq.b 3$ + lea (errnodemsgtext),a0 +3$ jsr (writeerroro) +9$ movem.l (a7)+,d2/a2 + rts + +;#e +***************************************************************** +* main meny * +***************************************************************** + +;#b +;#c +info lea (enteruserntext),a0 + moveq.l #0,d0 ; vi godtar ikke all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 9$ + moveq.l #-1,d1 ; vi godtar ikke all + cmp.l d0,d1 + beq 9$ + bsr.b showinfo +9$ rts + +showinfo + push a2/d2 + move.l (Tmpusermem,NodeBase),a2 + move.l a2,a0 + jsr (loadusernr) + bne.b 1$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ +1$ lea (Timesonsystext),a0 ; og skriver ut hvor mange det er. + bsr 10$ + move.w (TimesOn,a2),d0 + jsr (skrivnrw) + move.l (LastAccess,a2),d0 ; Har brukeren vært her før ? + beq.b 2$ ; Nei, ikke noe lasttime on system .. + lea (lasttimeontext),a0 ; Skriver ut info om last time info + bsr 10$ + lea (LastAccess,a2),a0 + jsr (writetime) + jsr (outimage) + beq 9$ +2$ move.w (Userbits,a2),d0 ; vil han ha adresse osv ? + andi.w #USERF_NameAndAdress,d0 + beq.b 3$ ; nei + lea (addresstext),a0 + bsr 10$ + lea (Address,a2),a0 + jsr (writetexto) + beq.b 9$ + lea (postalcodetext),a0 + bsr 10$ + lea (CityState,a2),a0 + jsr (writetexto) + beq.b 9$ + lea (hometlfnumbtext),a0 + bsr 10$ + lea (HomeTelno,a2),a0 + jsr (writetexto) + beq.b 9$ + lea (worktlfnumbtext),a0 + bsr 10$ + lea (WorkTelno,a2),a0 + jsr (writetexto) + beq.b 9$ + jsr (outimage) + beq.b 9$ +3$ move.l (ResymeMsgNr,a2),d0 ; msg nr + beq.b 8$ + + move.w (Userbits+CU,NodeBase),d1 + move.w d1,d2 ; husker + bclr #USERB_ClearScreen,d1 + move.w d1,(Userbits+CU,NodeBase) + + move.w #4,d1 ; userinfo conf + jsr (typemsg) + move.w d2,(Userbits+CU,NodeBase) + bra.b 9$ +8$ lea (userlnoinfotext),a0 + jsr (writetexti) +9$ jsr (outimage) + pop a2/d2 + rts + +10$ move.l a0,-(a7) + lea (ansilbluetext),a0 + jsr (writetext) + move.l (a7)+,a0 + moveq.l #28,d0 + jsr (writetextlfill) + lea (ansiwhitetext),a0 + jmp (writetexti) + +;#c +answerquestionare + lea (noquestionatext),a1 + lea (questinarefname),a0 + bsr doarexxdoor + rts + +;#c +edit push a2 + moveq.l #48,d0 ; Status = Entering resume. + jsr (changenodestatus) + lea (tmpmsgheader,NodeBase),a2 + lea (wayaatndisptext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + bne.b 1$ ; ja + tst.b (readcharstatus,NodeBase) + bne 9$ + andi.w #~USERF_NameAndAdress,(Userbits+CU,NodeBase) + bra.b 2$ +1$ ori.w #USERF_NameAndAdress,(Userbits+CU,NodeBase) +2$ move.l (ResymeMsgNr+CU,NodeBase),d0 ; har vi skrevet før ? + beq.b 5$ + move.l a2,a0 + move.w #4,d1 ; userinfo conf + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 7$ + move.b #MSTATF_KilledByAuthor,(MsgStatus,a2) + move.l a2,a0 + move.w #4,d0 ; userinfo conf + jsr (savemsgheader) + beq.b 6$ + lea (cntsavemsghtext),a0 +7$ jsr (writeerrori) + bra.b 9$ +6$ move.w (Userbits+CU,NodeBase),d0 ; bare FSE har include. + andi.w #USERF_FSE,d0 ; Brukrer vi FSE ??? + beq.b 5$ ; Nei, ingen include + move.l a2,a1 + move.l (tmpmsgmem,NodeBase),a0 + move.w #4,d0 ; userinfo conf + jsr (loadmsgtext) + lea (errloadmsgttext),a0 + bne.b 7$ + move.b #2,(FSEditor,NodeBase) ; Vi skal includere. +5$ move.w #4,d0 ; userinfo conf + bsr comentditsamecode + beq.b 3$ ; abort'a, carrier borte osv + move.l (Number,a2),d0 + bra.b 4$ +3$ moveq.l #0,d0 +4$ lea (ResymeMsgNr+CU,NodeBase),a0 + move.l d0,(a0) ; fyller i resyme msg nr'et + moveq.l #4,d0 ; saver 4 bytes + lea (Userbits+CU,NodeBase),a1 + moveq.l #2,d1 ; saver 2 bytes + jsr (saveuserareas) +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + pop a2 + rts + +;#c +; Vi har alltid lov til å skrive en kommentar +comment + jsr GetCommentUserNr + cmp.l #-1,d0 + beq.b 9$ + move.l d0,d1 + move.w #2,d0 + bra comentditsamecode +9$ rts + +; d0 = conf nr +; d1 = to user (for comment) +comentditsamecode + push a2/a3/d2/d3/d4 + move.l d0,d2 ; husker conf nr dette skal i + move.l d1,d4 ; husker to user (hvis comment) + move.l a0,a3 + moveq.l #12,d0 ; Status = enter msg. + jsr (changenodestatus) + move.w (confnr,NodeBase),d3 ; husker gammel confnr + move.w d2,(confnr,NodeBase) ; ny konf + lea (tmpmsgheader,NodeBase),a2 ; fyller i msg header'en + move.w (confnr,NodeBase),d1 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d1 + move.l (n_ConfDefaultMsg,a0,d1.l),d0 + addq.w #1,d0 + move.l d0,(Number,a2) + moveq.l #0,d0 + move.l d0,(RefTo,a2) + move.l d0,(RefBy,a2) + move.l d0,(RefNxt,a2) + move.l (Usernr+CU,NodeBase),(MsgFrom,a2) + move.b #MSTATF_NormalMsg,(MsgStatus,a2) + cmpi.w #2,d2 ; er det en comment ? + bne.b 1$ ; nei + move.b #SECF_SecReceiver,(Security,a2) ; setter opp for comment + move.l d4,(MsgTo,a2) + lea (commenttext),a0 + move.b (userok,NodeBase),d0 + bne.b 11$ + lea (failedpaswdtext),a0 +11$ moveq.l #30,d0 + lea (Subject,a2),a1 + jsr (strcopymaxlen) + bra 2$ +1$ cmpi.w #4,d2 ; er det en userinfo ? + bne.b 3$ ; nei + move.b #SECF_SecNone,(Security,a2) ; setter opp for resyme + moveq.l #-1,d0 + move.l d0,(MsgTo,a2) ; til alle + lea (Name+CU,NodeBase),a0 ; subject = navnet + moveq.l #30,d0 + lea (Subject,a2),a1 + jsr (strcopymaxlen) + bra 2$ +3$ lea (Subject,a2),a1 ; skriver : TEST.TES (3,926b) + move.l a3,a0 + bsr fillinfileinfosubject + move.b #SECF_SecNone,(Security,a2) ; setter opp for public ul,ikke pu + moveq.l #-1,d0 + move.l d0,(MsgTo,a2) ; til alle + move.l (PrivateULto,a3),d1 + move.w (Filestatus,a3),d0 + btst #FILESTATUSB_PrivateUL,d0 + beq.b 4$ + move.l d1,(MsgTo,a2) ; til en person + move.b #SECF_SecReceiver,(Security,a2) ; privat til han + bra.b 2$ +4$ btst #FILESTATUSB_PrivateConfUL,d0 + beq.b 2$ + move.w d1,(confnr,NodeBase) ; ny konf +2$ lea (MsgTimeStamp,a2),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + move.l a2,a0 + move.l (msgmemsize,NodeBase),d0 + move.l (tmpmsgmem,NodeBase),a1 + move.l a1,d1 + jsr (calleditor) + beq.b 8$ + move.l a2,a1 + move.w (confnr,NodeBase),d0 + jsr (savemsg) + beq.b 7$ + lea (cnotsavemsgtext),a0 + jsr (writeerrori) + bra.b 99$ +7$ lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (savedtext),a0 + jsr (writetexto) + addq.w #1,(MsgsLeft+CU,NodeBase) + move.l (Number,a2),d0 + bsr stopreviewmessages + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (sendintermsgmsg) + cmpi.w #2,d2 ; er det en comment ? + bne.b 9$ ; nei, da er vi ferdige + move.l (Number,a2),d1 + lea (logleftcomment),a0 + move.w (confnr,NodeBase),d0 ; conf nr + jsr (killrepwritelog) + bra.b 9$ +8$ tst.b (readcharstatus,NodeBase) + notz + beq 99$ + lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (abortedtext),a0 + jsr (writetexto) +99$ bsr.b 10$ +999$ pop a2/a3/d2/d3/d4 + rts +9$ bsr.b 10$ + clrz + bra.b 999$ + +10$ move.b (userok,NodeBase),d0 + beq.b 19$ + move.w d3,(confnr,NodeBase) + moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + setz +19$ rts + +; a0 = fileinfo +; a1 = string to place subject in +fillinfileinfosubject + push a2/d2 + link.w a3,#-30 + move.l a0,a2 + lea (Filename,a2),a0 + jsr (strcopy) + move.b #' ',(-1,a1) + move.b #'(',(a1)+ + move.l a1,d2 + move.l sp,a0 + move.l (Fsize,a2),d0 + jsr (konverter) + move.l sp,a0 + move.l d2,a1 +6$ move.b (a0)+,(a1)+ + beq.b 5$ + subi.w #1,d0 + cmpi.w #3,d0 + bne.b 6$ + move.b #'.',(a1)+ + bra.b 6$ +;d0 = lengden +5$ move.b #'b',(-1,a1) + move.b #')',(a1)+ + move.b #0,(a1) + unlk a3 + pop a2/d2 + rts + +;#e +***************************************************************** +* Search menu * +***************************************************************** + +;#b +;#c +searchgroup + push d2/d3/d4/a2 + jsr (groupheaderscommon) + beq.b 9$ + moveq.l #0,d4 ; antall meldinger funnet +1$ move.l d3,d0 + bsr searchmessage + bmi.b 2$ ; error + beq.b 3$ ; Fant ikke i denne + move.l d3,d0 + jsr (insertinqueuenr) + addq.l #1,d4 +3$ addq.l #1,d3 + cmp.l d3,d2 + bcc.b 1$ +2$ jsr (groupheaderscommon2) +9$ pop d2/d3/d4/a2 + bra readmenu ; Hopper til read meny. + +;#c +searchheaders + push d2/d3/d4/a2 + jsr (groupheaderscommon) + beq.b 9$ + moveq.l #0,d4 ; antall meldinger funnet +1$ move.l d3,d0 + bsr searchheader + bmi.b 2$ ; error + beq.b 3$ ; Fant ikke i denne + move.l d3,d0 + jsr (insertinqueuenr) + addq.l #1,d4 +3$ addq.l #1,d3 + cmp.l d3,d2 + bcc.b 1$ +2$ jsr (groupheaderscommon2) +9$ pop d2/d3/d4/a2 + bra readmenu ; Hopper til read meny. + +;#c +searchmarked + push a2/a3 + lea (texttsearchtext),a0 + lea (nulltext),a1 + moveq.l #30,d0 + jsr (mayedlinepromptfull) + beq.b 9$ + move.l a0,a2 + lea (searchmsgtext),a0 + jsr (writetext) + lea (fortext+1),a0 + jsr (writetext) + move.l a2,a0 + jsr (writetext) + move.b #'.',d0 + jsr (writechar) + jsr (outimage) + beq.b 9$ + lea (msgqueue,NodeBase),a3 +1$ move.l (a3)+,d0 + beq.b 2$ ; ferdig + bsr searchmessage + bmi.b 2$ ; error + bne.b 1$ ; Fant teksten i denne + lea (-4,a3),a3 + move.l (a3),d0 + jsr (removefromqueue) + bra.b 1$ + +2$ move.b #'<',d0 + jsr (writechar) + jsr (findnumberinque) + jsr (skrivnr) + move.b #'>',d0 + jsr (writechar) + lea (msgstilmarktext),a0 + jsr (writetexto) +9$ pop a2/a3 + bra readmenu ; Hopper til read meny. + +; d0 = message nr +; a2 = text +; retur : z = ikke funnet, n = error +searchmessage + push a3/d2/d3 + moveq.l #0,d3 ; har ikke funnet noe enda + lea (tmpmsgheader,NodeBase),a1 + move.l (tmpmsgmem,NodeBase),a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsg) + lea (errloadmsgttext),a0 + bne.b 8$ + lea (tmpmsgheader,NodeBase),a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) ; Kan vi skrive ut denne ??? + clrn + notz + beq 9$ ; Nei. "Jump, for my love" + + move.l (tmpmsgmem,NodeBase),a0 + moveq.l #0,d0 + move.w (NrBytes+tmpmsgheader,NodeBase),d0 + move.b #0,(0,a0,d0.w) ; terminerer med en null + jsr (skipnetnames) + +0$ move.l a0,a3 ; husker starten på linja +1$ move.b (a0)+,d0 + beq.b 2$ ; ferdig, (siste linje) + cmpi.b #10,d0 ; leter etter NL + bne.b 1$ + move.b #0,(-1,a0) ; terminerer + move.l a0,d2 ; husker hvor vi var + move.l a3,a0 + move.l a2,a1 + jsr (findtextinstring) + bne.b 3$ + bsr 10$ + bmi.b 9$ +3$ move.l d2,a0 + bra.b 0$ ; søker videre + +2$ move.l a3,a0 + move.l a2,a1 + jsr (findtextinstring) + bne.b 4$ + bsr 10$ + bmi.b 9$ +4$ move.l d3,d0 + bra.b 9$ +8$ jsr (writeerroro) + setn +9$ pop a3/d2/d3 + rts + +10$ move.b #'#',d0 + jsr (writechar) + move.l (Number+tmpmsgheader,NodeBase),d0 + jsr (skrivnr) + lea (kolonspacetext),a0 + jsr (writetext) + move.l a3,a0 + jsr (writetexto) + bne.b 11$ + setn + rts +11$ moveq.l #1,d3 ; vi fant teksten + rts + +; d0 = message nr +; a2 = text +; retur : z = ikke funnet, n = error +searchheader + push a3 + lea (tmpmsgheader,NodeBase),a3 + move.l a3,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + move.l a3,a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) ; Kan vi skrive ut denne ??? + clrn + notz + beq 9$ ; Nei. "Jump, for my love" + move.l a3,a0 + jsr (doisnetmessage) ; er det nettmelding ? + bne.b 2$ ; Nei, ikke melding + move.l (tmpmsgmem,NodeBase),a0 ; det er nettmelding, så da + move.l a3,a1 ; må vi hente inn texten + move.w (confnr,NodeBase),d0 + jsr (loadmsgtext) + lea (errloadmsgttext),a0 + bne 8$ +2$ move.l a3,a0 + move.l (tmpmsgmem,NodeBase),a1 + jsr (getfromname) + lea (tmptext2,NodeBase),a1 + jsr (strcopy) + move.l a3,a0 + move.l (tmpmsgmem,NodeBase),a1 + jsr (gettoname) + lea (maintmptext,NodeBase),a1 + jsr (strcopy) + lea (tmptext2,NodeBase),a0 + move.l a2,a1 + jsr (findtextinstring) + beq.b 1$ + lea (maintmptext,NodeBase),a0 + move.l a2,a1 + jsr (findtextinstring) + beq.b 1$ + move.l a3,a0 + move.l (tmpmsgmem,NodeBase),a1 + jsr (getsubject) + move.l a0,a3 ; husker subject + jsr (convertfirstnltoend) + move.l a2,a1 + jsr (findtextinstring) + notz + beq.b 9$ +1$ move.b #'#',d0 + jsr (writechar) + move.l (Number+tmpmsgheader,NodeBase),d0 + jsr (skrivnr) + lea (kommaspacetext),a0 + jsr (writetext) + lea (tmptext2,NodeBase),a0 + jsr (writetext) + lea (tonoansitext),a0 + jsr (writetext) + lea (maintmptext,NodeBase),a0 + jsr (writetext) + lea (rekolontext),a0 + jsr (writetext) + move.l a3,a0 + jsr (writetext) + move.b #'.',d0 + jsr (writechar) + jsr (outimage) + bne.b 9$ + setn + bra.b 9$ +8$ jsr (writeerroro) + setn +9$ pop a3 + rts +;#e + +***************************************************************** +* Chat menu * +***************************************************************** + +;#b +;#c +SetchatAvail + move.l (nodenoden,NodeBase),a0 + andi.b #~NDSF_Notavail,(Nodedivstatus,a0) ; Slår av ikke avail flagget + bra mainmenu ; Hopper til main meny. rts + +;#c +SetchatNAvail + move.l (nodenoden,NodeBase),a0 + ori.b #NDSF_Notavail,(Nodedivstatus,a0) ; Slår på ikke avail flagget + bra mainmenu ; Hopper til main meny. rts + +;#c +Chatsysop + push d2 + lea (pagedsysoptext),a0 ; Skriver i log'en at han paga sysop + jsr (writelogtexttime) + move.w (MainBits,MainBase),d0 + andi.w #MainBitsF_SysopNotAvail,d0 + bne 8$ + lea (pagngsysop2text),a0 + jsr (writetexti) + moveq.l #28,d0 ; Status = paging sysop. + jsr (changenodestatus) + lea pagescriptname,a0 ; Har vi pagescript ? + jsr (getfilelen) + beq.b 1$ ; nope, tar vanelig chat + lea pagescriptname,a0 ; Kjører Arexx scriptet. + lea (erropendoortext),a1 + jsr (doarexxdoor) + bra 9$ ; ferdig med chat request. +1$ moveq.l #21,d2 + +2$ subq.l #1,d2 + beq.b 7$ ; timeout + move.b #'.',d0 ; skriver ut dot + jsr (writechari) + suba.l a0,a0 + move.l (intbase),a6 + jsrlib DisplayBeep + move.l (exebase),a6 + jsr (stoptimeouttimer) + moveq.l #1,d0 + jsr (starttimeouttimersec) +4$ jsr (readchar) + bne.b 3$ + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ ; hopper ut hvis vi fikk no carrier + move.l (nodenoden,NodeBase),a0 + move.w (Nodestatus,a0),d1 ; Sjekker om vi har blitt active + cmpi.w #4,d1 ; + beq.b 9$ ; Det var vi, da er chat ferdig. + bra.b 2$ ; Var timeout. Looper +3$ cmpi.b #24,d0 ; CTRL-X ?? + beq 5$ ; Ja, ut +; cmpi.b #3,d0 ; CTRL-C ?? (CTRL-C fungerer ikke) +; beq.b 4$ ; Nei, venter videre på timeout +5$ jsr (outimage) + bra.b 9$ + +7$ move.l (msg,NodeBase),a1 ; setter sysop not avail + move.w #Main_NotAvailSysop,(m_Command,a1) + moveq.l #0,d0 + move.l d0,(m_Data,a1) ; sysop er ikke avail + jsr (handlemsg) ; ingen error fra denne +8$ lea (sysopnavailtext),a0 + jsr (writetexto) +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + pop d2 + bra mainmenu ; Hopper til main meny. + +;#c +; kalles fra handleintuition/handlemenu +sysopchat + move.l (intbase),a6 ; finner menyitem adr + move.l (node_menu,NodeBase),a0 + jsrlib ItemAddress + move.l (exebase),a6 + tst.l d0 + beq 9$ ; egetlig umulig, men ... + move.l d0,a0 + move.w (mi_Flags,a0),d0 + andi.w #CHECKED,d0 + beq 8$ ; vi skal avslutte + move.b (activesysopchat,NodeBase),d0 + bne 8$ ; Vi skal vel avslutte alikevel da.. + + move.l (nodenoden,NodeBase),a0 + move.w (Nodestatus,a0),d1 ; Sjekker om noden er klar + cmpi.w #28,d1 ; har vi paget ? + beq.b 2$ + cmpi.w #0,d1 ; logoff'a ? + bne.b 5$ ; nei + move.l (Name+CU,NodeBase),d0 ; har han skrevet navnet ? + beq 77$ ; nei. Ikke mulig + bra.b 2$ +5$ cmpi.w #4,d1 ; er bruker active ? + bne 77$ ; nei ... +2$ lea (tmptext2,NodeBase),a1 + lea (schatfilenameo),a0 + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + move.l (dosbase),a6 + lea (tmpmsgheader,NodeBase),a0 + move.l a0,d1 ; husker når vi startet + jsrlib DateStamp + lea (tmptext2,NodeBase),a0 + jsr (openreadseekend) + move.l (exebase),a6 + bne.b 6$ + moveq.l #-1,d0 +6$ move.l d0,(tmpstore,NodeBase) + lea (logchatedtext),a0 + lea (tmptext2,NodeBase),a1 + jsr (strcopy) + move.b #' ',(-1,a1) + lea (Name+CU,NodeBase),a0 + jsr (strcopy) + lea (tmptext2,NodeBase),a0 + push d2/d3 + move.l a0,d2 + jsr (strlen) + move.l d0,d3 + bsr chatfilewrite + pop d2/d3 + + move.b #1,(activesysopchat,NodeBase) + move.w #-1,(tmpval,NodeBase) ; nulstiller farven + move.l (nodenoden,NodeBase),a0 + moveq.l #0,d0 + move.w (Nodestatus,a0),d0 ; Sjekker om noden er klar + move.l d0,-(a7) + move.w #44,d0 ; nodestatus = Chatting with Sysop + jsr (changenodestatus) + lea (sysoponlinetext),a0 + jsr (getfilelen) + beq.b 234$ + lea (sysoponlinetext),a0 + moveq.l #0,d0 + jsr (typefilemaybeall) + bra.b 235$ +234$ lea (sysopiscomitext),a0 + jsr (writetexto) +235$ push d7/a2/d2 + lea (tmptext,NodeBase),a2 + moveq.l #0,d7 + +1$ jsr (readchar) ; må tåle CTRL-X. FIX ME + beq.b 7$ + bmi 10$ + + move.b d0,d2 ; husker tegnet +; cmpi.b #13,d0 ; Carrige return? +; bne.b 99$ ; Nei! +; move.l (intbase),a6 +; jsrlib DisplayBeep + + move.w #ansilblue,d0 ; ekstern farve + cmp.b #2,(tegn_fra,NodeBase) ; Siste tegnet fra ser. ? + beq.b 101$ ; ja, bruker farve 2 + move.w #ansiyellow,d0 ; Lokal farve +101$ bsr 20$ ; setter farven, hvis det trengs + move.b d2,d0 ; henter tilbake tegnet + cmpi.b #13,d0 + bne.b 4$ + move.b #10,d0 +4$ moveq.l #1,d1 ; vi kommer ifra sysop chat, og vil ha fil + bsr writechatchar + bra.b 1$ + +7$ pop d7/a2/d2 + move.l (a7)+,d0 ; setter tilbake til gammel status + cmp.w #28,d0 ; var det paging for sysop ? + bne.b 777$ ; nope + moveq.l #4,d0 ; Gjør det om til active + jsr (changenodestatus) + jsr (remsysopcheckmark) + bra 3$ ; Vi skal returnere negativ... (For å komme helt ut) +777$ jsr (changenodestatus) +77$ jsr (remsysopcheckmark) + clrn + bra 9$ + +8$ move.b #0,(activesysopchat,NodeBase) + move.l (tmpstore,NodeBase),d1 ; har vi vært igjennom her før ? + beq 9$ ; nei. Rart... + moveq.l #-1,d0 ; er det noen fil her da ? + cmp.l d0,d1 + beq.b 81$ ; nei.. + lea (tmptext,NodeBase),a0 + push d2/d3 + move.l a0,d2 + move.l d7,d3 + bsr chatfilewrite + pop d2/d3 + beq.b 81$ + move.l (dosbase),a6 + move.l (tmpstore,NodeBase),d1 + jsrlib Close ; stenger den + lea (ds_SIZEOF+tmpmsgheader,NodeBase),a0 + move.l a0,d1 ; husker når vi startet + jsrlib DateStamp + lea (tmpmsgheader,NodeBase),a0 + lea (ds_SIZEOF,a0),a1 + jsr (calcmins) + add.w d0,(minchat,NodeBase) ; trekker ifra for chat + move.l (exebase),a6 +81$ moveq.l #0,d0 + move.l d0,(tmpstore,NodeBase) ; sletter + lea (sysopoflinetext),a0 + jsr (getfilelen) + beq.b 2344$ + lea (sysopoflinetext),a0 + moveq.l #0,d0 + jsr (typefilemaybeall) + bra.b 2355$ +2344$ lea (sysopisgointext),a0 + jsr (writetexto) +2355$ jsr (checkintermsgs) + beq.b 31$ + jsr (outimage) +31$ move.l (curprompt,NodeBase),d0 + beq.b 3$ + move.l d0,a0 + jsr (writetexti) + lea (intextbuffer,NodeBase),a0 ; oppdatere de vi har skrevet ... + jsr (writetexti) +3$ setn +9$ setz + rts ;hopper tilbake til den som kallte oss + +10$ cmpi.b #1,(tegn_fra,NodeBase) ; var dette ifra console ? + bne 1$ ; nei + cmpi.b #10,d0 + bcc 1$ + andi.l #$ff,d0 + lsl.l #2,d0 + lea (keys,MainBase),a0 + adda.l d0,a0 + move.l (a0),d0 + beq 1$ + move.l a2,-(a7) + move.l d0,a2 + move.w #ansiyellow,d0 ; Lokal farve + bsr 20$ ; setter farven, hvis det trengs +11$ move.b (a2)+,d0 + beq.b 19$ + moveq.l #1,d1 ; vi kommer ifra sysop chat, og vil ha fil + bsr writechatchar + bra.b 11$ +19$ move.l (a7)+,a2 + bra 1$ + +20$ cmp.w (tmpval,NodeBase),d0 ; samme farve som vi har ? + beq.b 29$ ; ja + move.w d0,(tmpval,NodeBase) ; husker at vi har bytta + move.w (Userbits+CU,NodeBase),d1 ; vil brukeren ha farver ? + andi.w #USERF_ColorMessages,d1 + beq.b 29$ ; nei + lea (ansicolors),a0 + lea (0,a0,d0.w),a0 + jsr (writetexti) +29$ rts + +;#c +Groupchat + lea (nodenrtext),a0 + jsr (readlineprompt) + beq 9$ + jsr (atoi) + lea (musthavenrtext),a0 + bmi 8$ + lea (nodenodebtntext),a0 + tst.w d0 + beq.b 8$ + moveq.l #0,d1 ; vi skal ha group chat + bsr nodechat1 + bra.b 9$ +8$ jsr (writeerroro) +9$ rts + +; # number of node to chat with +chatmenunotchoices + jsr (inputnr) + bne.b 1$ + setn ; Ikke noe tall + rts +1$ moveq.l #1,d1 ; ikke group (privat) +nodechat1 + push d2/a2/d3/d4 ; Her begynner node chat *OBS* 2 pop'er av denne (ikke en rts)!!! + moveq.l #0,d3 ; Ikke group chat (bit 31), har oppdatert + tst.l d1 ; nodestatus (bit 30), privat (bit 29) + beq.b 1$ + bset #29,d3 ; dette er en privat chat +1$ moveq.l #0,d4 ; ikke noen første chat struct enda + move.b #1,(FSEditor,NodeBase) ; slår av dekoding av tastene + move.l d0,d2 + cmp.w (NodeNumber,NodeBase),d0 ; er det til oss ?? + lea (cantsendtoytext),a0 + beq 10$ + move.l nodelist+LH_HEAD,a1 ; finner noden vi skal chat'e med + move.l (LN_SUCC,a1),d1 + beq.b 21$ ; ingen noder. Egentlig umulig, men .. +2$ cmp.w (Nodenr,a1),d2 + beq.b 3$ ; fant den + move.l (LN_SUCC,a1),a1 + move.l (LN_SUCC,a1),d0 + bne.b 2$ +21$ lea (nodenodebtntext),a0 ; fant ikke + bra 10$ +3$ + move.b (Nodedivstatus,a1),d0 ; Vil han ha chat requests ? + andi.b #NDSF_Notavail,d0 + lea (nodencafchatext),a0 + bne 10$ ; nei + move.w (Nodestatus,a1),d0 ; Sjekker om noden er klar + cmpi.w #8,d0 ; group chat (har chat'er allerede) + bne 1031$ + bset #31,d3 ; husker at det er group chat + bclr #29,d3 ; og da er det ikke privat lenger.. + bra.b 1032$ +1031$ lea (nodencafchatext),a0 + move.b (Nodedivstatus,a1),d1 ; er det stealth login ? + btst #NDSB_Stealth,d1 + bne 10$ ; ja, ikke tilgjengelig + cmpi.w #4,d0 ; aktiv ? + bne 10$ ; nei, nekter + move.l (Nodespeed,a1),d0 ; lokal node ? + bne.b 1032$ ; nope + move.l (Nodeusernr,a1),d0 ; henter brukernumeret + cmp.l (SYSOPUsernr+CStr,MainBase),d0; sysop ? + bne.b 1032$ ; nope + btst #NDSB_WaitforChatCon,d1 ; venter sysop på chat req ? + bne.b 1032$ ; ja, da godtar vi chat.. + pop d2/a2/d3/d4 + move.b #0,(FSEditor,NodeBase) + bra Chatsysop + +1032$ move.l (nodenoden,NodeBase),a0 + move.b (Nodedivstatus,a0),d0 + andi.b #~NDSF_Notavail,d0 ; Slår av ikke avail flagget + or.b #NDSF_WaitforChatCon,d0 ; Slår på waitfor con.. + move.b d0,(Nodedivstatus,a0) + bsr 20$ ; setup av data strukturer + +11$ lea (tmptext,NodeBase),a0 + move.b #4,(i_type,a0) ; chat request melding + move.l a2,(i_usernr,a0) + lea (chatnodes,a2),a1 + move.w #MaxUsersGChat-1,d3 +5$ move.l (c_Task,a1),d1 ; leter etter ledig plass + beq.b 51$ ; fant + lea (chatnode_sizeof,a1),a1 ; peker til neste + subi.w #1,d3 ; er det flere å lete i ? + bne.b 5$ ; ja, leter videre + lea (grpchatfulltext),a0 ; error, fullt (egentlig umulig her) + bra 10$ +51$ neg.w d3 + addi.w #MaxUsersGChat-1,d3 ; har "node nummeret" + move.l a1,(i_usernr2,a0) + move.w (NodeNumber,NodeBase),(i_franode,a0) + lea (i_Name,a0),a1 ; fyller i navnet. + lea (Name+CU,NodeBase),a0 + jsr (strcopy) + move.l d2,d0 + lea (tmptext,NodeBase),a0 + move.b #0,(i_pri,a0) + moveq.l #0,d1 + btst #29,d3 ; er dette er en privat chat + beq.b 52$ ; nei + moveq.l #1,d1 +52$ move.w d1,(i_conf,a0) + jsr (sendintermsg) + beq.b 4$ ; alt ok + lea (nactiveusertext),a0 ; skriver feilmeldingen + cmpi.w #Error_No_Active_User,d1 + beq 10$ + lea (errnodemsgtext),a0 + bra 10$ +4$ lea (wafontreplytext),a0 ; venter på svar + jsr (writetext) + move.w d2,d0 + bsr 30$ + beq 9$ ; error, ut + btst #30,d3 ; vært her før ? + bne.b 041$ + move.l a0,-(a7) + move.w #8,d0 ; nodestatus = Chatting + btst #29,d3 ; skal det være privat chat ? + beq.b 043$ ; Nope + move.w (i_conf,a0),d1 ; var det privat i andre enden ? + beq.b 43$ ; nei + move.w #60,d0 ; nodestatus = Chatting private +043$ jsr (changenodestatus) + move.l (nodenoden,NodeBase),a0 + andi.b #~NDSF_WaitforChatCon,(Nodedivstatus,a0) ; Slår av waitfor con.. + move.l (a7)+,a0 + bset #30,d3 ; har vært her. +041$ lea (localchatnodes,a2),a1 ; Fyller i vår lokalchatnode + move.w d3,d0 + mulu.w #localchatnode_sizeof,d0 + adda.l d0,a1 ; har nå funnet riktig localchat node + move.l (i_usernr,a0),(l_chat,a1) + tst.l d4 ; har vi allerede en chat struct ? + bne.b 042$ ; jepp + move.l (i_usernr,a0),d4 ; nei, husker denne +042$ move.l (i_usernr2,a0),a0 ; henter frem vår chat node + move.l a0,(l_chatnode,a1) + bne.b 104$ + lea (grpchatfulltext),a0 ; error, fullt + bra 10$ +104$ bsr fillinchatnode + moveq.l #5,d6 ; har en timeout på 5 sek + move.l (c_Task+chatnodes,a2),d0 ; Er den andre noden ferdig ? + bne.b 7$ ; Ja, da er vi ferdig + lea (tmptext,NodeBase),a0 ; sender en gang til + move.b #4,(i_type,a0) ; chat request melding + move.l a2,(i_usernr,a0) + lea (chatnodes,a2),a1 + move.l a1,(i_usernr2,a0) + move.w (NodeNumber,NodeBase),(i_franode,a0) + move.l d2,d0 + move.b #0,(i_pri,a0) + jsr (sendintermsg) +6$ move.l (c_Task+chatnodes,a2),d0 ; Venter på at den andre noden + bne.b 7$ + moveq.l #1,d0 ; venter 1 sek + jsr (waitsecs) + bra.b 6$ + +7$ move.l d4,a0 ; den første chat struct'en + lea (chatnodes,a0),a0 + moveq.l #MaxUsersGChat-1,d2 +071$ move.l (c_Task,a0),d0 ; er denne i bruk ? + beq.b 072$ ; nei + moveq.l #0,d0 + move.w (c_Nodenr,a0),d0 ; henter node nummeret + + lea (chatnodes,a2),a1 ; henter vår chatnodes + moveq.l #MaxUsersGChat-1,d1 ; indre loop teller +074$ tst.l (c_Task,a1) ; er denne i bruk ? + beq.b 073$ ; nei + cmp.w (c_Nodenr,a1),d0 ; Har vi node nummeret ? + beq.b 072$ ; ja, bryter innerste loop +073$ lea (chatnode_sizeof,a1),a1 ; peker til neste + subq.l #1,d1 ; ferdig ? + bne.b 074$ ; nei + + cmp.w (NodeNumber,NodeBase),d0 ; var det vår egen node ? + beq.b 072$ ; ja, da tar vi ikke den. + move.l d0,d2 ; denne er ikke tatt enda + bra 11$ + +072$ lea (chatnode_sizeof,a0),a0 ; peker til neste + subq.l #1,d2 ; ferdig ? + bne.b 071$ ; nei + + move.l a2,a0 + bsr donodechat + bra.b 9$ + +10$ jsr (writeerror) +9$ jsr (outimage) + move.b #0,(FSEditor,NodeBase) + move.l (nodenoden,NodeBase),a0 + andi.b #~NDSF_WaitforChatCon,(Nodedivstatus,a0) ; Slår av waitfor con.. + moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + pop d2/a2/d3/d4 + clrzn + rts + +20$ move.l (tmpmsgmem,NodeBase),a2 ; brukker dette som data område. + move.l a2,a0 ; nullstiller alt + move.w #chat_sizeof,d0 + jsr (memclr) + move.l a2,a0 + moveq.l #0,d0 + move.w #chat_sizeof,d0 + adda.l d0,a0 ; chat struktur først, så meldingsområdet + move.l a0,(msgarea,a2) + move.l (msgmemsize,NodeBase),d1 + sub.l d0,d1 + adda.l d1,a0 + move.l a0,(msgareaend,a2) +; move.w #0,(Wpos,a2) ; unødvendig. + move.w (NodeNumber,NodeBase),(ChatNodeNr,a2) + rts + +; d0 = node nr og vente på +; Venter på nodeconnect. returnerer z=1 hvis timeout +30$ push a2/a3/d2-d7 + move.w d0,d7 ; noden vi skal vente paa + moveq.l #20,d6 ; timeout på 20 sek +31$ move.b #'.',d0 ; skriver ut dot + jsr (writechari) + moveq.l #1,d0 ; venter 1 sek + jsr (waitsecs) + moveq.l #0,d0 ; sjekker signaler + move.l d0,d1 + jsrlib SetSignal + move.l d0,d1 + and.l (intersigbit,NodeBase),d1 + beq 37$ ; ikke noe inter sig bit + jsrlib Forbid + move.l (nodenoden,NodeBase),a0 + move.w (InterMsgread,a0),d0 + move.w (InterMsgwrite,a0),d1 + jsrlib Permit + sub.w d0,d1 + beq 38$ ; ingen node meldinger. + bcc.b 34$ ; ingen wrap + addi.w #MaxInterNodeMsg,d1 +34$ bclr #31,d6 ; vi har ikke funnet noe enda + move.l d0,d2 ; d2 - startpos + move.l d1,d3 ; d3 - antall meldinger + move.l a0,a2 + jsr (outimage) ; nl + lea (InterNodeMsg,a2),a3 ; leter etter vår nodemelding + moveq.l #InterNodeMsgsiz,d4 + move.l d2,d5 + mulu.w d4,d5 + subq.l #1,d3 +35$ lea (0,a3,d5.w),a0 + move.b (i_type,a0),d0 ; Sjekker typen + cmpi.b #4,d0 ; chat request ? + bne.b 351$ ; nei. + cmp.w (i_franode,a0),d7 + bne.b 351$ + bset #31,d6 ; vi fant riktig chat request + moveq.l #0,d3 ; avslutter loop'en + bra.b 352$ +351$ jsr (writeintermsg) +352$ addq.l #1,d2 + cmpi.w #MaxInterNodeMsg,d2 + bcs.b 36$ + moveq.l #0,d2 ; wrap'er rundt + moveq.l #0,d5 + bra.b 32$ +36$ add.w d4,d5 +32$ dbf d3,35$ + move.l (nodenoden,NodeBase),a1 + move.w d2,(InterMsgread,a1) + btst #31,d6 ; Var det ønsket chat request ? + beq.b 38$ ; nei + bra.b 39$ ; vi fikk noe, ut. a0 = nodemsg + +37$ move.l (consigbit,NodeBase),d1 ; har det kommet en tast ? + IFND DEMO + or.l (sersigbit,NodeBase),d1 + ENDC + and.l d0,d1 + beq.b 38$ ; nei + jsr (readchar) ; henter tasten + bmi.b 38$ ; spesial tegn + tst.b (readcharstatus,NodeBase) + notz + beq.b 39$ ; hopper ut hvis vi fikk no carrier + cmpi.b #24,d0 ; CTRL-X ?? + beq.b 39$ ; Ja, ut + cmpi.b #3,d0 ; CTRL-C ?? + beq.b 39$ ; Ja, ut +38$ subq.l #1,d6 + bcc 31$ + setz +39$ pop a2/a3/d2-d7 + rts + +fillinchatnode + move.l a3,-(a7) ; Fyller i vår chat node hos andre noden + move.l a0,a3 + move.l (intersigbit,NodeBase),(c_Sigbit,a3) + move.w #0,(c_Rpos,a3) + lea (c_Name,a3),a1 + lea (Name+CU,NodeBase),a0 + jsr (strcopy) + move.l (Usernr+CU,NodeBase),(c_Usernr,a3) + move.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),(c_Speed,a3) + move.w (NodeNumber,NodeBase),(c_Nodenr,a3) + move.w #0,(c_Status,a3) + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ANSI,d0 + beq.b 1$ + move.w #statusF_Splitscreen,(c_Status,a3) +1$ suba.l a1,a1 + jsrlib FindTask + move.l d0,(c_Task,a3) + move.l (a7)+,a3 + rts + +; a0 = chat stuct +fillincolors + move.l a2,-(a7) + lea (localchatnodes,a0),a2 + lea (groupchatcolors),a1 + moveq.l #MaxUsersGChat-1,d0 +1$ move.l (l_chatnode,a2),d1 ; i bruk ? + beq.b 2$ ; nope + move.l d1,a0 + move.w (a1)+,(c_color,a0) + bra.b 3$ +2$ addq.l #2,a1 +3$ lea (localchatnode_sizeof,a2),a2 + subq.l #1,d0 + bne.b 1$ + move.l (a7)+,a2 + rts + +;struct chat +; - struct chatnode * x-1 (de andre nodenes data område) +; +; - struct localchatnod * x +; -> våre chatnoder hos de andre nodene +; struct chatnode +; +; -> andre nodenes chat struktur +; struct chat + +donodechat + push a3/a2/d2-d4/d7 + move.l a0,a3 ; = chat struct + bsr.b fillincolors + move.w #-1,(tmpval,NodeBase) ; nulstiller farven + move.w (Wpos,a3),d2 ; = wpos + move.l (msgareaend,a3),d3 + jsr (outimage) + lea (contactestatext),a0 + jsr (writetext) + moveq.l #chatnode_sizeof,d7 + moveq.l #MaxUsersGChat-1,d4 + lea (chatnodes,a3),a2 + move.l a3,-(a7) + lea (localchatnodes,a3),a3 + lea (logchatedtext),a0 + lea (c_Name,a2),a1 + jsr (writelogtexttimed) ; skriver til logen at vi chat'er + move.l (c_Task,a2),d0 + beq.b 6$ +5$ move.l (l_chatnode,a3),a0 + move.w (c_color,a0),d0 + bsr 50$ + lea (c_Name,a2),a0 + jsr (writetext) + move.l (l_chatnode,a3),a0 ; oppdaterer read flagget, så vi + move.l (l_chat,a3),a1 ; ikke får alt som er skrevet + move.w (Wpos,a1),(c_Rpos,a0) ; tidligere +6$ subq.l #1,d4 + beq.b 4$ + adda.l d7,a2 + lea (localchatnode_sizeof,a3),a3 + move.l (c_Task,a2),d0 + beq.b 6$ + move.w #ansiwhite,d0 ; skifter til hvit tekst + bsr 50$ + lea (kommaspacetext),a0 + jsr (writetexti) + bra.b 5$ +4$ move.w #ansiwhite,d0 ; skifter til hvit tekst + bsr 50$ + move.l (a7)+,a3 + lea (contactest2text),a0 + jsr (writetexto) + jsr (outimage) + moveq.l #0,d7 ; cur char pos + move.l d7,(tmpstore,NodeBase) ; signaliserer at vi vil motta intersig'er + move.l (msgarea,a3),a2 ; = area + sub.l a2,d3 ; = maks wpos + +1$ jsr (readchar) ; må tåle CTRL-X. FIX ME (??) + bmi.b 1$ ; dropper spesial tegn + bne.b 2$ + tst.b (readcharstatus,NodeBase) + bne.b 3$ + bsr.b 10$ ; skriver ut alle nye tegn + beq.b 9$ ; noen har tatt CTRL-Z + bra.b 1$ +2$ bsr 30$ + bmi.b 3$ ; ctrl Z + beq.b 1$ ; Truncate + move.w d0,-(a7) + move.w #ansilblue,d0 ; skifter til mørk blå tekst + bsr 50$ + move.w (a7)+,d0 + moveq.l #0,d1 ; vi kommer ikke ifra sysop chat + bsr writechatchar + bra.b 1$ +3$ move.w #-1,(Wpos,a3) ; Vi har fått ctrl Z (eller no carrier) + moveq.l #-1,d0 ; sig'er alle nodene vi chater med + bsr 40$ + jsr (outimage) +9$ pop a3/a2/d2-d4/d7 + rts + +10$ push a2/d6/d5 ; skriver ut all ny tekst + bsr 70$ ; sjekke om det er noen som vil join'e + moveq.l #MaxUsersGChat-1,d6 ; oss, og tar seg av det + lea (localchatnodes,a3),a2 + moveq.l #localchatnode_sizeof,d5 ; = localchatnode size +11$ move.l (l_chatnode,a2),d0 + beq.b 12$ ; brukes denne ? nei.. + move.l a2,a0 + bsr.b 20$ + beq.b 19$ ; mottatt ctrl-z +12$ adda.l d5,a2 + subq.l #1,d6 + bcc.b 11$ + clrz +19$ pop a2/d6/d5 + rts + +20$ push a2/a3/d2/d3 + moveq.l #0,d3 ; ikke funnet andre + move.l a3,a1 ; husker i a1 + move.l (l_chatnode,a0),a2 ; vår chatnode + move.l (l_chat,a0),a3 ; chat str (den andre nodens) + move.w (Wpos,a3),d2 + moveq.l #-1,d0 + cmp.w d0,d2 + bne.b 22$ ; ikke ctrl-z + move.w (ChatNodeNr,a3),d0 + lea (chatnodes,a1),a1 + moveq.l #MaxUsersGChat-1,d1 +23$ tst.l (c_Task,a1) ; i bruk ? + beq.b 25$ ; nei. + cmp.w (c_Nodenr,a1),d0 + beq.b 24$ + moveq.l #1,d3 ; det er flere +25$ lea (chatnode_sizeof,a1),a1 + subq.l #1,d1 + bne.b 23$ + bra.b 299$ ; fant ikke noden. quit chat +24$ moveq.l #0,d0 + move.l d0,(c_Task,a1) ; tømme nodens chatnode + move.l d0,(l_chatnode,a0) + move.l d0,(l_chat,a0) + tst.l d3 + bne.b 299$ ; ok, det er flere +26$ tst.l (c_Task,a1) ; i bruk ? + bne.b 299$ ; ja,, det er flere + lea (chatnode_sizeof,a1),a1 + subq.l #1,d1 + bne.b 26$ ; returnerer Z=1 hvis det ikke + bra.b 299$ ; er flere noder igjen. + +22$ sub.w (c_Rpos,a2),d2 + beq.b 29$ ; ingen ny tekst + bcc.b 21$ + move.w (c_color,a2),d0 ; skifter til riktig farve + bsr 50$ + moveq.l #0,d0 + move.w (c_Rpos,a2),d0 + add.l (msgarea,a3),d0 + move.l (msgareaend,a3),a0 + suba.l d0,a0 + exg d0,a0 + jsr (writetextlen) + move.w #0,(c_Rpos,a2) +21$ move.w (c_color,a2),d0 ; skifter til riktig farve + bsr 50$ + jsrlib Forbid + moveq.l #0,d1 + move.w (c_Rpos,a2),d1 + move.l d1,a0 + adda.l (msgarea,a3),a0 + moveq.l #0,d0 + move.w (Wpos,a3),d0 + sub.l d1,d0 + move.w (Wpos,a3),(c_Rpos,a2) + jsrlib Permit + bsr writechattextleni +29$ clrz +299$ pop a2/a3/d2/d3 + rts + +30$ cmpi.b #$9b,d0 + beq.b 33$ + cmpi.b #31,d0 + bhi.b 31$ ; Ikke kontroll tegn + cmpi.b #26,d0 ; CTRL-Z ?? + beq.b 32$ + cmpi.b #8,d0 ; Back space + beq.b 31$ + cmpi.b #9,d0 ; TAB + beq.b 31$ + cmpi.b #10,d0 ; Line Feed + beq.b 35$ + cmpi.b #13,d0 ; Carrige return, Converterer til LF + bne.b 33$ + move.b #10,d0 +35$ bsr 60$ + beq.b 32$ ; timeout. Sender CTRL-Z + moveq.l #10,d0 +31$ move.b d0,(0,a2,d2.w) ; lagrer + addq.l #1,d2 + cmp.w d2,d3 + bhi.b 34$ + moveq.l #0,d2 +34$ move.w d2,(Wpos,a3) + move.w d0,-(a7) + moveq.l #-1,d0 ; sig'er alle nodene vi chater med + bsr 40$ + move.w (a7)+,d0 + clrzn + rts +33$ clrn ; truncate + setz + rts +32$ setn ; vi fikk ctrl-Z + rts + +40$ push a3/d2/d3 ; signaliserer en eller alle taskene vi chat'er med + lea (chatnodes,a3),a3 + moveq.l #chatnode_sizeof,d3 + tst.l d0 + bmi.b 41$ ; vi skal ta alle + mulu.w d3,d0 + adda.l d0,a3 + move.l (c_Task,a3),d0 + beq.b 49$ + move.l d0,a1 + move.l (c_Sigbit,a3),d0 + jsrlib Signal + bra.b 49$ +41$ moveq.l #MaxUsersGChat-1,d2 +42$ move.l (c_Task,a3),d0 + beq.b 43$ + move.l d0,a1 + move.l (c_Sigbit,a3),d0 + jsrlib Signal +43$ adda.l d3,a3 + subq.l #1,d2 + bcc.b 42$ +49$ pop a3/d2/d3 + rts + +50$ cmp.w (tmpval,NodeBase),d0 ; samme farve som vi har ? + beq.b 59$ ; ja + move.w (Userbits+CU,NodeBase),d1 ; vil brukeren ha farver ? + andi.w #USERF_ColorMessages,d1 + beq.b 59$ ; nei + lea (ansicolors),a0 + lea (0,a0,d0.w),a0 + jsr (writetexti) +59$ rts + +60$ move.w (TimeLimit+CU,NodeBase),d0 ; har vi timelimit ? + beq 68$ ; nei + jsr (updatetime) + sub.w (TimeUsed+CU,NodeBase),d0 ; Har vi noe igjen ? + bcc.b 68$ ; jepp + setz ; tiden er ute + bra.b 69$ ; KILL KILL KILL !! :-) +68$ clrz +69$ rts + +70$ push a2/a3/d2-d7 ; sjekke om det er noen som vil + jsrlib Forbid ; join'e oss, og tar seg av det + move.l a3,d6 ; husker a3 i d6 + move.l (nodenoden,NodeBase),a0 + move.w (InterMsgread,a0),d0 + move.w (InterMsgwrite,a0),d1 + jsrlib Permit + sub.w d0,d1 + beq 79$ ; ingen node meldinger. + bcc.b 71$ ; ingen wrap + addi.w #MaxInterNodeMsg,d1 +71$ move.l d0,d2 ; d2 - startpos + move.l d1,d3 ; d3 - antall meldinger + move.l a0,a2 + lea (InterNodeMsg,a2),a3 ; leter etter vår nodemelding + moveq.l #InterNodeMsgsiz,d4 + move.l d2,d5 + mulu.w d4,d5 + subq.l #1,d3 +72$ lea (0,a3,d5.w),a0 + move.b (i_type,a0),d0 ; Sjekker typen + cmpi.b #4,d0 ; chat request ? + bne.b 721$ ; nei. + moveq.l #0,d3 ; avslutter loop'en +; bra.b 722$ +721$ +; bsr writeintermsg ; skrive ut øverst på skjermen (?) +722$ addq.l #1,d2 + cmpi.w #MaxInterNodeMsg,d2 + bcs.b 73$ + moveq.l #0,d2 ; wrap'er rundt + moveq.l #0,d5 + bra.b 74$ +73$ add.w d4,d5 +74$ dbf d3,72$ + move.l (nodenoden,NodeBase),a1 + move.w d2,(InterMsgread,a1) ; vi fikk noe, ut. a0 = nodemsg + move.b (i_type,a0),d0 ; Sjekker typen + cmpi.b #4,d0 ; var det chat request ? + bne 79$ ; nei. + move.l d6,a3 ; setter tilbake a3 + moveq.l #0,d6 + move.w (i_franode,a0),d6 + +; behandle node meldingen vi fikk + + moveq.l #MaxUsersGChat-1,d0 ; maks buffere + lea (chatnodes,a3),a2 +75$ move.l (c_Task,a2),d1 ; leter etter ledig plass + beq.b 751$ ; fant + lea (chatnode_sizeof,a2),a2 ; peker til neste + subq.l #1,d0 ; er det flere å lete i ? + bne.b 75$ ; ja, leter videre + suba.l a2,a2 ; ingen, sender null tilbake + bra.b 76$ +751$ moveq.l #-1,d1 ; fyller i så ingen andre skal + move.l d1,(c_Task,a2) ; ta denne. (Dette er safe) + neg.l d0 + addq.l #MaxUsersGChat-1,d0 ; maks buffere + move.l d0,d1 + lea (localchatnodes,a3),a1 ; Fyller i vår lokalchatnode + mulu.w #localchatnode_sizeof,d0 + adda.l d0,a1 ; har nå riktig lokalchatnode + move.l (i_usernr,a0),(l_chat,a1) + move.l a0,d7 ; husker nodemsg'en + move.l (i_usernr2,a0),a0 ; henter frem vår chat node + move.l a0,(l_chatnode,a1) + + lsl.l #1,d1 + lea (groupchatcolors),a1 + move.w (a1,d1.w),(c_color,a0) + + bsr fillinchatnode +76$ lea (tmptext,NodeBase),a0 ; Svare med en node melding med : + move.b #4,(i_type,a0) ; type 4 (chat request), + move.l a3,(i_usernr,a0) ; vår chat struktur i i_usernr, + move.l a2,(i_usernr2,a0) ; og chat noden den andre noden skal fylle i i_usernr2 + move.w (NodeNumber,NodeBase),(i_franode,a0) + move.l d6,d0 + move.b #0,(i_pri,a0) + jsr (sendintermsg) + bne.b 79$ + move.l d7,a0 + lea (i_Name,a0),a0 + jsr (writetext) + lea (joinedchattext),a0 + jsr (writetexto) +; Det er det samme om det gikk bra eller ikke. Vi skal returnere uansett +79$ pop a2/a3/d2-d7 + rts + +;maks bredde er 77 +; d7 er horisontal charpos + +; d1 = kommer ifra sysopchat (t/f) +writechatchar + cmpi.b #10,d0 + bne.b 1$ + tst.l d1 ; skal vi skrive til fil ? + beq.b 6$ ; nope + lea (tmptext,NodeBase),a0 + push d2/d3 + move.l a0,d2 + move.l d7,d3 + bsr chatfilewrite + pop d2/d3 + move.b #10,d0 +6$ moveq.l #0,d7 + bra.b 2$ +1$ cmpi.b #8,d0 + bne.b 4$ + subq.l #1,d7 + bcc.b 5$ + moveq.l #0,d7 ; Vi kan ikke gå tilbake en linje + bra.b 9$ +5$ lea (deltext),a0 + jsr (writetexti) + bra.b 9$ +4$ cmpi.b #9,d0 + bne.b 7$ + move.w d7,d0 + addi.w #8,d0 + andi.w #$fff8,d0 + cmpi.w #76,d0 ; EOL ? + bcc.b 9$ ; ja + sub.w d7,d0 + beq.b 9$ ; no change + bcs.b 9$ + + move.w d0,-(a7) + lea (spacetext),a0 + jsr (writetextleni) + move.w (a7)+,d0 + + lea (tmptext,NodeBase),a0 + lea (0,a0,d7.w),a0 + add.w d0,d7 +8$ move.b #' ',(a0)+ + subi.w #1,d0 + bne.b 8$ + bra.b 9$ ; ferdig. + +7$ lea (tmptext,NodeBase),a0 + move.b d0,(0,a0,d7.w) + addq.l #1,d7 + cmpi.w #77,d7 ; wrap ? + bcc.b 3$ ; ja +2$ jsr (writechari) +9$ rts +3$ +; bra.b chatwrap + +; d1 - vi kommer ifra sysop chat (t/f) +chatwrap + push a2/d2/d3/d4 + move.l d1,d4 + lea (tmptext,NodeBase),a0 + adda.l d7,a0 + move.l a0,a1 + move.l d7,d1 +1$ move.b -(a1),d0 + subq.l #1,d1 + bcs 3$ ; ikke noe å wrap'e + cmpi.b #' ',d0 + beq.b 2$ + cmpi.b #'-',d0 + bne.b 1$ +2$ move.l a0,d2 + addq.l #1,a1 ; går til tegnet etter + sub.l a1,d2 + bne.b 7$ + subq.l #1,a1 + bra.b 8$ +7$ subq.l #1,d2 +8$ move.l a1,a2 + tst.l d4 ; skal vi skrive til filen ? + beq.b 6$ ; nei + lea (tmptext,NodeBase),a0 + push d2/d3 + move.l a0,d2 + move.l a1,d3 + sub.l d2,d3 ; beregner lengden + bsr chatfilewrite + pop d2/d3 +6$ move.l d2,d7 + bmi.b 4$ + moveq.l #0,d3 +5$ subq.l #1,d2 ; sletter gammel tekst + bcs.b 4$ + lea (deltext),a0 + jsr (writetext) + addq.l #1,d3 + cmpi.w #20,d3 + bcs.b 5$ + moveq.l #0,d3 + jsr (breakoutimage) + bra.b 5$ +4$ move.b #10,d0 + jsr (writechari) + move.l a2,a0 + addq.l #1,d7 + move.l d7,d0 + beq.b 9$ ; vi er tomme... + push a0/d0 + jsr (writetextleni) + pop a0/d0 + lea (tmptext,NodeBase),a1 + jsr (strcopylen) + bra.b 9$ +3$ move.b (-1,a0),(tmptext,NodeBase) + move.b #10,d0 + jsr (writechari) + move.b (tmptext,NodeBase),d0 + moveq.l #1,d7 + jsr (writechari) +9$ pop a2/d2/d3/d4 + rts + +chatfilewrite + move.l (tmpstore,NodeBase),d1 ; har vi fil ? + moveq.l #-1,d0 + cmp.l d0,d1 + beq.b 9$ ; nei + move.l (dosbase),a6 + tst.l d3 + beq.b 1$ ; ikkenoe + bsr 10$ + beq.b 9$ +1$ move.l (tmpstore,NodeBase),d1 + move.l #newlinetext,d2 + moveq.l #1,d3 + bsr 10$ +9$ move.l (exebase),a6 + rts + +10$ jsrlib Write + cmp.l d0,d3 + notz + bne.b 19$ + move.l (tmpstore,NodeBase),d1 + jsrlib Close + moveq.l #-1,d0 + move.l d0,(tmpstore,NodeBase) + setz +19$ rts + +writechattextleni + push a2/d2 + move.l a0,a2 + move.l d0,d2 + beq.b 9$ ; for stort tall.. ? +1$ subi.w #1,d2 + bcs.b 9$ + move.b (a2)+,d0 + beq.b 1$ + moveq.l #0,d1 ; vi kommer ikke ifra sysop chat + bsr writechatchar + bra.b 1$ +9$ pop a2/d2 + rts + +;#e +***************************************************************** +* Read meny * +***************************************************************** + +;#b +;#c +changesendrec + push a2/d2/d3 + jsr (checksysopaccess) + beq 9$ + bsr getcurmsgnr + beq 9$ + move.w (confnr,NodeBase),d1 ; henter inn msg header + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + lea (msgnotavailfrep),a0 + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop+MSTATF_Moved+MSTATF_Dontshow,d0 + bne 8$ + move.l a2,a0 + jsr (isnetmessage) + beq 9$ ; ut + moveq.l #0,d2 ; sletter change flag + lea (changefradrtext),a0 + moveq.l #0,d0 ; vi godtar ikke all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + bne.b 1$ + move.b (readcharstatus,NodeBase),d1 + bne 9$ + bra.b 2$ +1$ move.l d0,(MsgFrom,a2) + moveq.l #1,d2 ; husker at vi har forandret +2$ lea (changetoadrtext),a0 + moveq.l #1,d0 ; vi godtar all + move.w (confnr,NodeBase),d1 ; Finner ut om vi er i en postpox + lea (n_FirstConference+CStr,MainBase),a1 + mulu #ConferenceRecord_SIZEOF/2,d1 + move.w (uc_Access,a1,d1.l),d1 + btst #CONFSWB_PostBox,d1 + beq.b 3$ + moveq.l #0,d0 ; vi godtar ikke all +3$ moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + bne.b 4$ + move.b (readcharstatus,NodeBase),d1 + bne 9$ + bra.b 7$ +4$ move.l d0,d3 + moveq.l #-1,d1 + cmp.l d3,d1 ; til all ? + bne.b 5$ ; nope + btst #SECB_SecReceiver,(Security,a2) ; privat ? + beq.b 6$ ; nope, alt ok. + lea (allnotallowtext),a0 + bra 8$ + +5$ move.w (confnr,NodeBase),d1 + jsr (checkmemberofconf) + bne.b 6$ + lea (loadusererrtext),a0 + bmi 8$ + lea (sorryusnmoctext),a0 + bra 8$ +6$ move.l d3,(MsgTo,a2) + moveq.l #1,d2 ; husker at vi har forandret +7$ tst.l d2 + beq.b 9$ + bclr #MSTATB_MsgRead,(MsgStatus,a2) ; sleter readflagget + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 8$ + lea (msgupdatedtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2/d2/d3 + rts + +;#c +getuserinfofrommsg + push a2 + jsr (checksysopaccess) + beq.b 9$ + bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 ; henter inn msg header + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 8$ + move.l a2,a0 + jsr (isnetmessage) + beq 9$ ; ut + move.l (MsgFrom,a2),d0 ; Er det supersysop ? + move.l (SYSOPUsernr+CStr,MainBase),d1 + cmp.l d0,d1 + bne.b 1$ + cmp.l (Usernr+CU,NodeBase),d1 ; Er vi supersysop ? + lea (nosysopheretext),a0 + bne.b 8$ ; Nei, error +1$ move.l (Tmpusermem,NodeBase),a2 + move.l a2,a0 + jsr (loadusernr) + lea (usernotfountext),a0 + beq.b 8$ + jsr (outimage) + moveq.l #0,d0 + lea (10$),a0 + bsr doshowuser + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2 + rts + +10$ jmp (writetexto) + +;#c +recentlyread + lea (prevqueue+4,NodeBase),a0 + rts + +;#c +dump lea (dumpmsgpromtext),a0 + suba.l a1,a1 + push a2 + suba.l a2,a2 ; ingen ekstra help + jsr (readlinepromptwhelp) + pop a2 + beq.b 9$ + jsr (upstring) + move.l a0,-(a7) + lea (cleartext),a1 + jsr (comparestrings) + move.l (a7)+,a0 + beq.b dumpclear + move.b (a0),d0 + cmpi.b #'C',d0 + beq dumpconf + cmpi.b #'A',d0 + beq dumpall + cmpi.b #'M',d0 + beq.b dumpmessage + lea (invalidcmdtext),a0 + jsr (writeerroro) +9$ rts + +dumpclear + bsr getscratchpaddelfname ; delete scratchpad + jsr (deletepattern) + lea (scratchpdeltext),a0 + jsr (writetexto) + + bsr restorereadpointers ; reload readptr's, og hvis ok, skriv : + beq.b 9$ + lea (lmsgreadrestext),a0 + jsr (writetexto) +9$ rts + +dumpmessage + push a2/d2 + moveq.l #0,d2 ; har ingen filhandle + move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + beq.b 1$ + lea (qwkcantdumptext),a0 + sub.b #1,d0 + beq.b 8$ ; QWK.. Klarer ikke + lea (hipcantdumptext),a0 + sub.b #1,d0 + beq.b 8$ ; Hippo.. Klarer ikke +1$ bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 ; henter inn msg header + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (allowtype) ; Kan vi skrive ut denne ??? + lea (youarenottext),a0 + bne 8$ ; Nei. "Jump, for my love" + bsr savereadptrs ; tar backup av read ptr'ene + bsr openscratchpad + lea (erropenscratext),a0 + beq.b 8$ + move.l d0,d2 + move.w (confnr,NodeBase),d0 + move.l d2,d1 + move.l a2,a0 + jsr (doscratchmsg) + lea (errwritscratext),a0 + bpl.b 9$ +8$ jsr (writeerroro) +9$ move.l d2,d1 + beq.b 91$ + move.l (dosbase),a6 ; lukker fila om det er nødvendig + jsrlib Close + move.l (exebase),a6 +91$ pop a2/d2 + rts + +dumpconf + push d2/d3 + moveq.l #0,d2 ; har ingen filhandle + move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + beq.b 1$ + lea (qwkcantdumptext),a0 + sub.b #1,d0 + beq.b 8$ ; QWK.. Klarer ikke + lea (hipcantdumptext),a0 + sub.b #1,d0 + beq.b 8$ ; hippo.. Klarer ikke +1$ move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + bsr savereadptrs ; tar backup av read ptr'ene + bsr openscratchpad + lea (erropenscratext),a0 + beq.b 8$ + move.l d0,d2 + move.w (confnr,NodeBase),d0 + bsr writedumpingconf + move.l d2,d0 + jsr (dograbqueue) + lea (errwritscratext),a0 + beq.b 8$ + move.l d0,d3 + jsr (outimage) + move.b #'<',d0 ; messages added to scratchpad. + jsr (writechar) + move.l d3,d0 + jsr (skrivnr) + move.b #'>',d0 + jsr (writechar) + lea (msgaddtoscrtext),a0 + jsr (writetexto) + lea (usesendtotrtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ move.l d2,d1 + beq.b 91$ + move.l (dosbase),a6 ; lukker fila om det er nødvendig + jsrlib Close + move.l (exebase),a6 +91$ pop d2/d3 + rts + +; d0 = confnr +writedumpingconf + move.w d0,-(a7) + lea (dumpingtext),a0 + jsr (writetext) + move.w (a7)+,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 + jsr (writetext) + move.b #':',d0 + jsr (writechar) + jmp (outimage) + +; d0 = 0, vanelig, d0 = 1, ifra grab (stille) +dumpall + moveq.l #0,d0 +dumpall1 + push d4/d3/d5/d6/a2/a3 + moveq.l #0,d6 + tst.w d0 + beq.b 4$ + bset #30,d6 ; husker at vi skal være stille (fra grab) +4$ +; bclr #31,d6 ; ikke gått bra enda.. + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + moveq.l #32,d0 ; Status = collecting scratchpad + jsr (changenodestatus) + bsr savereadptrs ; tar backup av read ptr'ene + + move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + beq.b 7$ ; MBBS + cmp.b #1,d0 ; QWK + beq.b 10$ ; ja + XREF _hippopackmessages + jsr (_hippopackmessages) + bra.b 11$ +10$ XREF _packmessages + jsr (_packmessages) +11$ moveq.l #-1,d1 + cmp.l d0,d1 + beq 92$ ; error, ut + move.l d0,d5 ; antall meldinger scratch'a + moveq.l #0,d4 ; sier vi ikke har noen fil + bra 21$ ; og videre.. + +7$ bsr openscratchpad + lea (erropenscratext),a0 + beq 8$ + move.l d0,d4 + move.w (confnr,NodeBase),d0 + bsr writedumpingconf + move.l d4,d0 + jsr (dograbqueue) + lea (errwritscratext),a0 + beq 8$ + move.l d0,d5 ; husker antall scratch'a + jsr (unjoin) + + move.w (confnr,NodeBase),d3 ; Starter fra der vi er. + move.w d3,d6 + bra.b 3$ ; Tar den en gang til +1$ move.w d3,d0 + jsr (getnextunreadconf) + beq 2$ ; Ikke noen flere + move.w d0,d3 +3$ move.w d3,d1 ; sjekker at det virkelig var noe + lea (u_almostendsave+CU,NodeBase),a2 + mulu #Userconf_seizeof/2,d1 + add.l d1,a2 + lea (n_FirstConference+CStr,MainBase),a3 + move.w d3,d1 + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a3 + + move.l (n_ConfDefaultMsg,a3),d0 + sub.l (uc_LastRead,a2),d0 + bls.b 1$ + cmp.w d3,d6 ; var det den første ? + bne.b 5$ ; Nei + move.w #-1,d6 ; sørger for at det ikke skjer igjen + bra.b 6$ +5$ jsr (dubbelnewline) + move.w d3,d0 + bsr writedumpingconf +6$ move.w d3,d0 + jsr (dograbconf) + lea (errwritscratext),a0 + beq 8$ + add.l d0,d5 ; husker antall scratch'a + move.w d3,d1 + add.w d1,d1 + move.l (n_ConfDefaultMsg,a3),(uc_LastRead,a2) ; setter last read + jsr (checkcarriercheckser) + bne.b 1$ ; ja alt er ok + move.l (dosbase),a6 ; serie borte. Sletter fila + move.l d4,d1 + jsrlib Close + move.l (exebase),a6 + bsr getscratchpaddelfname ; delete scratchpad + jsr (deletepattern) + bra 91$ + +2$ lea (nyconfgrabtext),a0 + move.l d4,d0 + jsr (writefileln) + lea (errwritscratext),a0 + beq.b 8$ +21$ bset #31,d6 ; alt har gått bra + jsr (outimage) + move.b #'<',d0 ; messages added to scratchpad. + jsr (writechar) + move.l d5,d0 + jsr (skrivnr) + move.b #'>',d0 + jsr (writechar) + lea (msgaddtoscrtext),a0 + jsr (writetexto) + btst #30,d6 ; stille mode ? + bne.b 9$ ; jepp + lea (usesendtotrtext),a0 + jsr (writetexto) + bra.b 9$ ; ok + +8$ move.l a0,d3 + jsr (outimage) + move.l d3,a0 + jsr (writeerroro) +9$ move.l d4,d1 + beq.b 91$ + move.l (dosbase),a6 ; lukker fila om det er nødvendig + jsrlib Close + move.l (exebase),a6 +91$ moveq.l #0,d0 + move.l d0,(msgqueue,NodeBase) ; Tømmer køen. + move.w (confnr,NodeBase),d1 ; sørger for at highmsg er riktig + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d1 + move.l (uc_LastRead,a0,d1.l),(HighMsgQueue,NodeBase) +92$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + btst #31,d6 + pop d4/d3/d5/d6/a2/a3 + rts + +;#c +; ret : Z = 1, alt ok +getscratch + push a2/d2/d3/d4 + moveq.l #0,d3 ; har ikke gått bra enda + lea (filenametext),a0 + jsr (writetext) + lea (maintmptext,NodeBase),a1 ; bygger opp path'en + lea (TmpPath+Nodemem,NodeBase),a0 + jsr strcopy + move.b #'/',(-1,a1) + move.l a1,a2 + lea (BaseName+CStr,MainBase),a0 + jsr (strcopy) + lea (-1,a1),a1 + lea (repextension),a0 + jsr (strcopy) + move.l a2,a0 + jsr (writetexto) + beq 9$ + + moveq.l #20,d0 ; Status = UL file. + jsr (changenodestatus) + jsr (outimage) + + move.b (CommsPort+Nodemem,NodeBase),d0 ; internal node ?? + beq.b 5$ ; Yepp. local download + lea (maintmptext,NodeBase),a0 + move.l a0,(ULfilenamehack,NodeBase) + moveq.l #1,d0 + jsr (receivefile) + bne.b 1$ +6$ lea (maintmptext,NodeBase),a0 + jsr (deletefile) + lea (logfulmsgtext),a0 + move.l a2,a1 + jsr (writelogtexttimed) + bra 9$ + +5$ lea (maintmptext,NodeBase),a0 + jsr (fjernpath) + jsr (getfullnameusetmp) + beq 9$ ; Ut + lea (maintmptext,NodeBase),a1 + jsr (copyfile) + beq.b 6$ + +1$ moveq.l #80,d0 ; Status = Unpacking file(s) + jsr (changenodestatus) + move.l (dosbase),a6 + moveq.l #0,d2 + move.b (ScratchFormat+CU,NodeBase),d2 + lsl.w #2,d2 + lea (tmptext2,NodeBase),a1 ; bygger opp navnet på extracteren + lea (extractstring),a0 + jsr (strcopy) + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d2.w),a0 + jsr (strcopy) + lea (tmptext2,NodeBase),a0 ; sjekker om pakker finnes + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + bne.b 2$ + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + jsrlib DeleteFile ; Sletter arkivet + move.l (exebase),a6 ; sier ifra at vi ikke fant extracteren + lea (cantfinextrtext),a0 + bra 8$ +2$ jsrlib UnLock + + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + lea (executestring),a0 ; bygger opp execute string + jsr (strcopy) + subq.l #1,a1 + lea (tmptext2,NodeBase),a0 ; henter navnet på scriptet + jsr (strcopy) + move.b #' ',(-1,a1) + move.b #'"',(a1)+ + lea (maintmptext,NodeBase),a0 ; path'en + jsr (strcopy) + move.b #'"',(-1,a1) + move.b #' ',(a1)+ + move.b #'"',(a1)+ + lea (BaseName+CStr,MainBase),a0 + jsr (strcopy) + lea (-1,a1),a1 + lea (msgextension),a0 + jsr (strcopy) + move.b #'"',(-1,a1) + move.b #0,(a1) + + lea (TmpPath+Nodemem,NodeBase),a1 + move.l a1,d1 + jsrlib Lock + move.l d0,d1 + beq.b 7$ + jsrlib CurrentDir + move.l d0,d4 + + move.l (tmpmsgmem,NodeBase),a0 + move.l a0,d1 + moveq.l #0,d2 + moveq.l #0,d3 ; Execute ABBS:sys/extract.xxx "t:Nodextmpdir/BaseName.REP" "BaseName.MSG" + jsrlib Execute + move.l d4,d1 + jsrlib CurrentDir + move.l d0,d1 + jsrlib UnLock + + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + jsrlib DeleteFile ; Sletter arkivet + lea (maintmptext,NodeBase),a1 ; finner slutten +3$ move.b (a1)+,d0 + bne.b 3$ +4$ move.b -(a1),d0 ; spoler tilbake til siste .'et + cmp.b #'.',d0 + bne.b 4$ + lea (msgextension),a0 ; bytter ut .REP med .MSG + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + move.l (exebase),a6 + jsr (getfilelen) +7$ lea (errorextrintext),a0 + beq.b 8$ + moveq.l #1,d3 ; det gikk bra + bra.b 9$ +8$ move.l (exebase),a6 + jsr (writeerroro) +9$ moveq.l #0,d0 + move.l d0,(ULfilenamehack,NodeBase) + moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + move.l d3,d0 ; setter Z + pop a2/d2/d3/d4 + rts + +;#c +sendscratch + push d2-d6 + move.b (GrabFormat+CU,NodeBase),d6 ; hvilket format skal de ha ? + bclr #31,d6 ; har ikke gått bra (enda ihvertfall) + tst.b d6 ; qwk eller hippo ? + bne.b 16$ ; jepp + bsr openscratchpad + lea (erropenscratext),a0 + beq 8$ + move.l d0,d1 + move.l (dosbase),a6 ; lukker fila igjen + jsrlib Close + move.l (exebase),a6 +16$ lea (pleaswaitwptext),a0 + jsr (writetexto) + lea (grabgoodfortext),a0 + jsr (writetexto) + + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + bne.b 13$ ; no, go ahead + tst.b d6 ; qwk eller hippo ? + bne.b 13$ ; jepp, da skal vi pakke alikevel + + lea (maintmptext,NodeBase),a1 ; bygger opp dest name + lea (abbsrootname),a0 + jsr (strcopy) + lea (-1,a1),a1 + lea (BaseName+CStr,MainBase),a0 + jsr (strcopy) + bsr getscratchpadfname ; source + lea (maintmptext,NodeBase),a1 ; destination + jsr (copyfile) + bne 14$ ; fortsetter som vanelig + lea (diskerrortext),a0 + jsr (writeerroro) + bra 11$ + +14$ + bset #31,d6 ; send gikk ok + move.l (dosbase),a6 + bsr getreadpointerfname ; sletter read pointere + move.l a0,d1 + jsrlib DeleteFile + bra 15$ + +;pack file +13$ moveq.l #76,d0 ; Status = packing file(s) + jsr (changenodestatus) + lea (maintmptext,NodeBase),a1 ; bygger opp path'en + lea (TmpPath+Nodemem,NodeBase),a0 + jsr strcopy + moveq.l #0,d5 + move.b (ScratchFormat+CU,NodeBase),d5 + lsl.w #2,d5 + bne.b 1$ ; vi skal pakke + +3$ bsr 30$ ; "rename /BaseName + lea (tmptext,NodeBase),a0 ; to /BaseName.txt + lea (tmplargestore,NodeBase),a1 + move.l a0,d1 + move.l a1,d2 + move.l (dosbase),a6 + jsrlib Rename + bra 4$ + +1$ move.l (dosbase),a6 + lea (tmptext2,NodeBase),a1 ; bygger opp navnet på pakkeren + lea (packstring),a0 + jsr (strcopy) + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d5.w),a0 + jsr (strcopy) + lea (tmptext2,NodeBase),a0 ; sjekker om pakker finnes + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + bne.b 2$ + move.l (exebase),a6 ; sier ifra at vi ikke fant pakkeren + lea (cantfinpacktext),a0 + jsr (writetexto) + moveq.l #0,d5 ; skifter til tekst + bra 3$ ; går til rename +2$ jsrlib UnLock + +; "basenavn" til "basenavn." + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + lea (executestring),a0 ; bygger opp execute string + jsr (strcopy) + subq.l #1,a1 + lea (tmptext2,NodeBase),a0 ; henter navnet på scriptet + jsr (strcopy) + move.b #' ',(-1,a1) + move.b #'"',(a1)+ + lea (maintmptext,NodeBase),a0 ; path'en + jsr (strcopy) + move.b #'/',(-1,a1) + lea (BaseName+CStr,MainBase),a0 ; arkiv navnet + jsr (strcopy) + cmp.b #1,d6 ; qwk ? + bne.b 17$ ; Nei + lea qwkextension,a0 + subq.l #1,a1 + jsr (strcopy) +17$ move.b #'"',(-1,a1) + move.b #' ',(a1)+ + move.b #'"',(a1)+ + lea (maintmptext,NodeBase),a0 ; path'en + jsr (strcopy) + move.b #'/',(-1,a1) + lea (allqwksendfiles),a0 + cmp.b #1,d6 ; qwk ? + beq.b 18$ ; ja + lea allhipsendfiles,a0 + cmp.b #2,d6 ; hippo ? + beq.b 18$ ; ja + lea (BaseName+CStr,MainBase),a0 ; fil navnet +18$ jsr (strcopy) + move.b #'"',(-1,a1) + move.b #0,(a1) ; terminerer + move.l (tmpmsgmem,NodeBase),a0 + move.l a0,d1 + moveq.l #0,d2 ; Execute ABBS:sys/pack.xxx "t:Nodextmpdir/BaseName.QWK" "t:Nodextmpdir/#?.dat" + moveq.l #0,d3 ; Execute ABBS:sys/pack.xxx "t:Nodextmpdir/BaseName" "t:Nodextmpdir/BaseName" + jsrlib Execute + +4$ move.l (exebase),a6 ; sjekker om pakkingen gikk bra + lea (maintmptext,NodeBase),a1 ; finner slutten på path'en +5$ move.b (a1)+,d0 + bne.b 5$ + move.b #'/',(-1,a1) + lea (BaseName+CStr,MainBase),a0 ; bygger opp filnavnet + jsr (strcopy) + lea qwkextension,a0 + cmp.b #1,d6 ; qwk ? + beq.b 19$ ; ja + lea (packexctstrings),a0 + move.l (0,a0,d5.w),a0 +19$ subq.l #1,a1 + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + jsr (getfilelen) + bne.b 7$ + lea (errorpackintext),a0 +6$ jsr (writeerroro) +61$ move.l (dosbase),a6 + tst.l d5 ; var det text ? + beq.b 12$ ; ja + lea (maintmptext,NodeBase),a0 ; sletter arkivet + move.l a0,d1 + jsrlib DeleteFile + bra.b 11$ +12$ lea (maintmptext,NodeBase),a1 ; bygger opp path'en + lea (TmpPath+Nodemem,NodeBase),a0 + jsr strcopy + bsr 30$ + lea (tmptext,NodeBase),a0 ; renamer tilbake + lea (tmplargestore,NodeBase),a1 + move.l a0,d2 + move.l a1,d1 + jsrlib Rename +11$ move.l (exebase),a6 + lea (scrstillavatext),a0 ; still availible .. + jsr (writetexto) + bra 9$ + +; send basenavn. +7$ move.l d0,d1 ; beregner size + moveq.l #10,d0 + lsr.l d0,d1 + moveq.l #24,d0 ; Status = DL file. + jsr (changenodestatus) + jsr (checkcarriercheckser) + beq.b 10$ ; Ikke noen carrier. + lea (maintmptext,NodeBase),a0 + move.l a0,(ULfilenamehack,NodeBase) + jsr (fjernpath) + + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + bne.b 20$ ; no, go ahead + + jsr (getfullnameusetmp) + beq 61$ ; rydder opp + move.l a0,a1 + lea (maintmptext,NodeBase),a0 + jsr (copyfile) + lea (errorsendtext),a0 + beq 6$ + bra.b 21$ + + +20$ jsr (sendfile) + bmi.b 10$ ; carrier forsvant + lea (errorsendtext),a0 + beq 6$ ; ok, vi hopper. +21$ bset #31,d6 ; send gikk ok + + move.l (dosbase),a6 + bsr getreadpointerfname ; sletter read pointere + move.l a0,d1 + jsrlib DeleteFile +10$ lea (maintmptext,NodeBase),a0 ; sletter arkivet + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DeleteFile +15$ move.l (exebase),a6 + bsr getscratchpaddelfname ; sletter scratchpad + jsr (deletepattern) + + btst #31,d6 + beq.b 9$ ; ikke ok, ingen utskrift + lea (scratchpemptext),a0 + jsr (writetexto) + lea loggrabedtext,a0 ; Skriver i log'en at han grab'a + jsr (writelogtexttime) + bra.b 9$ +8$ jsr (writeerroro) +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + btst #31,d6 ; returnerer Z bit'et + pop d2-d6 + rts + +30$ lea (maintmptext,NodeBase),a0 ; "rename /BaseName + lea (tmptext,NodeBase),a1 + jsr (strcopy) + move.b #'/',(-1,a1) + lea (BaseName+CStr,MainBase),a0 + jsr (strcopy) + + lea (maintmptext,NodeBase),a0 ; to /BaseName.txt + lea (tmplargestore,NodeBase),a1 + jsr (strcopy) + move.b #'/',(-1,a1) + lea (BaseName+CStr,MainBase),a0 + jsr (strcopy) + subq.l #1,a1 + lea (txtextension),a0 + jmp (strcopy) + +openscratchpad + push d2-d4/a2 + moveq.l #0,d4 + move.l (dosbase),a6 + bsr getscratchpadfname + move.l a0,a2 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 1$ + move.l d4,d1 + moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 9$ + bra.b 2$ +1$ move.l a2,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 +; move.l d4,d0 + lea (transnltext),a0 + jsr (writefileln) + bne.b 9$ +2$ move.l d4,d1 + jsrlib Close + moveq.l #0,d4 +9$ move.l d4,d0 + move.l (exebase),a6 + pop d2-d4/a2 + rts + +;#c +searchmenu + move.w #32,(menunr,NodeBase) ;Skifter til Search menu + rts + +;#c +readmenyinfo + bsr getcurmsgnr + beq 9$ + lea (tmpmsgheader,NodeBase),a0 + move.w (confnr,NodeBase),d1 ; henter inn msgheader + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 8$ + lea (tmpmsgheader,NodeBase),a1 + move.w (NrLines,a1),d0 ; net message ? + bpl.b 2$ ; Nope + move.w (confnr,NodeBase),d0 ; henter inn msgtext + move.l (tmpmsgmem,NodeBase),a0 + jsr (loadmsgtext) + beq.b 1$ + lea (errloadmsghtext),a0 +8$ jsr (writeerrori) + bra.b 9$ +1$ lea (tmpmsgheader,NodeBase),a0 + move.l (tmpmsgmem,NodeBase),a1 + jsr (isfromnetname) ; sjekker om det er net navn + bne.b 3$ ; nope, helt vanelig + lea (noinfoonnettext),a0 ; sier vi ikke har info + jsr writetexto + bra.b 9$ +3$ lea (tmpmsgheader,NodeBase),a1 ; Vanelig bruker +2$ move.l (MsgFrom,a1),d0 + bsr showinfo +9$ rts + +view push d2/d3/d4 + moveq.l #0,d4 + move.w (confnr,NodeBase),d0 + jsr (getfrommsgnr) + beq.b 9$ + move.l d0,d3 + move.l d0,d1 + move.w (confnr,NodeBase),d0 + jsr (gettomsgnr) + beq.b 9$ + move.l d0,d2 +; lea wantmsggrwotext,a0 +; sub.l a1,a1 +; moveq.l #0,d0 ; n er default +; bsr getyorn +; beq.b 1$ +; bset #1,d4 ; vi skal ha ref +;1$ tst.b readcharstatus(NodeBase) +; notz +; beq 9$ + lea (detaledlisttext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 2$ + bset #2,d4 ; vi skal ha detailed +2$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ + jsr (outimage) + beq.b 9$ + jsr (outimage) + beq.b 9$ + + moveq.l #0,d0 + btst #2,d4 + beq.b 4$ + moveq.l #1,d0 +4$ move.w d0,(tmpstore,NodeBase) + + move.w (confnr,NodeBase),d0 + move.l d3,d1 + lea (viewfunc),a0 + btst #1,d4 + bne.b 3$ + jsr (dogroup) + bra.b 9$ +3$ jsr (dogroupthreadwise) +9$ pop d2/d3/d4 + rts + +; #1: Velkommen +; #1, Sysop to ALL re: Velkommen! + +; kalles ifra dothread eller dogroup +; rutinen får msgheader'en i a3 +viewfunc + push d2 + move.l a3,a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) + clrn + bne 9$ + + move.l a3,a0 + jsr (isnetmessage) + setn + beq 9$ ; ut + + move.b #'#',d0 + jsr (writechar) + move.l (Number,a3),d0 + jsr (skrivnr) + + move.w (tmpstore,NodeBase),d0 + beq 5$ + + lea (kommaspacetext),a0 + jsr (writetext) + move.l (MsgFrom,a3),d0 + jsr (getusername) + move.w d0,d2 ; lagrer death status + jsr (writetext) + btst #USERB_Killed,d2 + beq.b 1$ + lea (deadtext),a0 + jsr (writetext) +1$ lea (tonoansitext),a0 + jsr (writetext) + + move.l (MsgTo,a3),d0 + lea (alltext),a0 + moveq.l #-1,d1 + cmp.l d1,d0 + beq.b 2$ + jsr (getusername) + move.w d0,d2 ; lagrer death status + jsr (writetext) + btst #USERB_Killed,d2 + beq.b 3$ + lea (deadtext),a0 +2$ jsr (writetext) +3$ move.b #' ',d0 + jsr (writechar) + lea (subjecttext),a0 + jsr (writetext) + bra.b 4$ + +5$ lea (kolonspacetext),a0 + jsr (writetext) +4$ lea (Subject,a3),a0 + jsr (writetexto) + clrn + bne.b 9$ + setn +9$ pop d2 + rts + +;#c +movemsg push d2/a2/a3 ;/d3/d4/d5 + bsr getcurmsgnr + beq 9$ + lea (tmpmsgheader,NodeBase),a2 + move.l (tmpmsgmem,NodeBase),a3 + move.w (confnr,NodeBase),d1 ; henter inn msgheader + move.l a2,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 2$ + move.l a2,a0 + jsr (allowmove) + lea (notallomovetext),a0 + bne 2$ + lea (cnftmovemsgtext),a0 + jsr (getconfname) + beq 9$ + move.w d0,d2 ; husker konf nr'et + cmp.w (confnr,NodeBase),d0 + beq 9$ ; er allerede i riktig. + lsr.w #1,d0 + lea (cmmovtoconftext),a0 + cmpi.w #2,d0 + beq 2$ ; kan ikke flytte til userinfo + cmpi.w #3,d0 ; eller fileinfo + beq 2$ + move.w d0,d1 + lea (n_FirstConference+CStr,MainBase),a1 + mulu #ConferenceRecord_SIZEOF,d1 + add.l d1,a1 + move.w (n_ConfSW,a1),d1 + btst #CONFSWB_PostBox,d1 ; er det en post konf ? + beq 4$ ; nei, alt ok + move.l (MsgTo,a2),d1 ; er den til alle ? + cmpi.l #-1,d1 + beq 2$ ; ja, fy.. + move.b #SECF_SecReceiver,(Security,a2) ; Sørger for at den blir privat + bra.b 3$ +4$ move.l (MsgTo,a2),d1 ; er den til alle ? + cmpi.l #-1,d1 + beq 3$ ; ja, ikke privat + move.b #SECF_SecNone,(Security,a2) ; sletter security + move.w (n_ConfSW,a1),d1 + btst #CONFSWB_Private,d1 ; Kan vi ha privat her ? + beq.b 3$ ; nei + + lea (privatemsgetext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 5$ + move.b #SECF_SecReceiver,(Security,a2) + +5$ move.w d2,d0 + lsr.w #1,d0 +3$ lea (u_almostendsave+CU,NodeBase),a0 ; har vi skrive access der ? + mulu #Userconf_seizeof,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.w #ACCF_Write,d0 + lea (youarenottext),a0 + beq.b 2$ ; Nei, FY! + move.w (confnr,NodeBase),d0 + move.l a2,a1 + move.l a3,a0 + jsr (loadmsgtext) + lea (errloadmsgttext),a0 + bne.b 2$ + moveq.l #0,d0 +; move.l RefTo(a2),d3 ; huske ref'ene +; move.l RefBy(a2),d4 +; move.l RefNxt(a2),d5 + move.l d0,(RefTo,a2) ; sletter referanser + move.l d0,(RefBy,a2) + move.l d0,(RefNxt,a2) + + move.l a3,a0 ; lagrer meldingen i ny konf + move.l a2,a1 + move.w d2,d0 + move.l (Number,a2),d2 ; husker msg nummer + jsr (savemsg) + lea (cnotsavemsgtext),a0 + bne.b 2$ + +; disse ble ikke brukt +; d3 = hvilken melding vi er svar på +; d4 = svar på denne meldingen +; d5 = neste i denne tråden. + + move.l d2,d0 + move.w (confnr,NodeBase),d1 ; henter inn msgheader en gang til + move.l a2,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 2$ + ori.b #MSTATF_Dontshow+MSTATF_Moved,(MsgStatus,a2) ; Dreper denne kopien + move.w (confnr,NodeBase),d0 + move.l a2,a0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 2$ + lea (msgmovedtext),a0 +2$ jsr (writetexto) +9$ pop d2/a2/a3 ;/d3/d4/d5 + rts + +;#c +getcurmsgnr + move.l (currentmsg,NodeBase),d0 ; Har vi lest en melding ?? + bne.b 9$ ; jepp + lea (nocurentmsgtext),a0 ; Feilmelding + jsr (writeerroro) ; skriv + setz +9$ rts + +;#c +; Får samme security som meldingen man svarer på. +replymsg + push d3/a2/a3/d4/d5/d6/d7 + jsr (sjekklovtilaaskrive) ; har vi skrive access ? + beq 99$ ; nei + tst.b (readlinemore,NodeBase) ; har brukeren tastet mere ? + beq.b 1$ ; nei, vanlig reply + jsr (readline) ; leser inn tallet + beq 99$ ; aborted. + jsr (atoi) + lea (invalidnrtext),a0 + bmi 8$ ; det var ikke et tall + move.l d0,d3 ; husker meldings nummeret + bra.b 2$ + +1$ bsr (getcurmsgnr) ; få current msg nr. + beq 99$ ; ingen, ut + move.l d0,d3 ; og husker. + +2$ move.l d3,d0 + move.w (confnr,NodeBase),d1 ; henter inn msgheader + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a1 + move.l (tmpmsgmem,NodeBase),a3 + move.l a3,a0 + jsr (loadmsg) ; leser inn hele meldingen + lea (msgnotavailfrep),a0 + bne 8$ ; error + move.w (NrBytes,a2),d0 + move.b #0,(0,a3,d0.w) ; terminerer + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) ; Kan vi skrive ut denne ??? + lea (msgnotavailfrep),a0 + bne 8$ + move.l a3,d5 ; default msgstart + move.l a2,a0 + jsr (doisnetmessage) ; er det nettmelding ? + bne.b 3$ ; nei, fortsetter som før + move.l a3,a0 ; gjør om net from til net to + move.b (a0),d0 ; er det en from her ? + cmp.b #Net_ToCode,d0 + bne.b 4$ + move.b #Net_FromCode,(a3) ; faker.. + bra.b 3$ +4$ cmp.b #Net_FromCode,d0 + bne.b 3$ ; nope. + move.b #Net_ToCode,(a3) ; gjør om til too. + move.l a3,a0 + jsr (skiptonewline) + move.l a0,d5 ; ny msg start (tar vare på to) +3$ move.l (MsgFrom,a2),d1 + cmp.b #Net_ToCode,(a3) ; var det en too her ? + bne.b 5$ ; nei + moveq.l #-1,d1 ; ja, sier til all, så ingen skal få til seg.. +5$ moveq.l #16,d0 ; Status = reply msg. + jsr (changenodestatus) + cmp.b #Net_ToCode,(a3) ; var det en too her ? + beq.b 6$ ; nei + move.l (MsgFrom,a2),d0 ; sjekker om mottaker fortsatt + move.w (confnr,NodeBase),d1 ; er medlemm i konf'en. + jsr (checkmemberofconf) + lea (loadusererrtext),a0 + bmi 8$ + lea (sorryusnmoctext),a0 + beq 8$ ; det var han/hun ikke +6$ move.l (Number,a2),(RefTo,a2) ; setter opp meldins pekerne + moveq.l #0,d0 + move.l d0,(RefBy,a2) + move.l d0,(RefNxt,a2) + move.w (confnr,NodeBase),d1 ; henter frem et midlertidig + mulu #ConferenceRecord_SIZEOF/2,d1 ; meldings nummer + lea (n_FirstConference+CStr,MainBase),a0 + add.l d1,a0 + move.l a0,d7 ; husker confstruktur + move.l (n_ConfDefaultMsg,a0),d0 + addq.l #1,d0 + move.l d0,(Number,a2) + move.l (MsgFrom,a2),(MsgTo,a2) ; fyller i resten av meldings + move.l (Usernr+CU,NodeBase),(MsgFrom,a2) ; headeren + lea (MsgTimeStamp,a2),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + move.l d5,a0 ; har vi net subject ? + jsr (getnetsubject) + beq.b 7$ ; nope + move.l a0,a1 + moveq.l #60,d0 ; 60 er et fint tall... + bra.b 10$ ; fortsetter som normalt +7$ moveq.l #Sizeof_NameT,d0 ; default size + move.l d7,a1 ; Finner ut om vi kan ha net meldinger + move.w (n_ConfSW,a1),d1 + btst #CONFSWB_Network,d1 + beq.b 11$ ; ikke net conf.. + moveq.l #60,d0 ; 60 er et fint tall... +11$ lea (Subject,a2),a1 +10$ lea (entersubjectext),a0 ; lar brukeren forandre subject + jsr (mayedlineprompt) + beq 9$ + move.l a0,a1 ; husker svar + jsr (strlen) + moveq.l #Sizeof_NameT,d1 + cmp.l d0,d1 + bcs.b 12$ ; ikke plass i header strukturen + move.l a1,a0 + lea (Subject,a2),a1 + jsr (strcopy) ; sjekk om vi skal slette net subject, hvis ja, slett + suba.l a1,a1 ; har ikke subject lengre + moveq.l #0,d0 ; subject length = 0 +12$ move.l a1,a0 ; plaserer subject + move.l d5,a1 ; meldingen + move.l d5,d1 + sub.l a3,d1 + neg.l d1 + add.l (msgmemsize,NodeBase),d1 + jsr (packnetmessage) ; d0 = subject length + move.l a0,a3 + bclr #MsgBitsB_FromNet,(MsgBits,a2) + move.b (Security,a2),d0 + andi.b #SECF_SecReceiver,d0 ; Den er allerede privat + bne.b 13$ + move.l d7,a0 + move.w (n_ConfSW,a0),d0 + btst #CONFSWB_Private,d0 ; kan vi ha privat ? + beq.b 13$ ; nei + lea (privatemsgetext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 14$ + move.b #SECF_SecReceiver,(Security,a2) + bra.b 13$ +14$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ +13$ move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop+MSTATF_Moved+MSTATF_Dontshow,d0 + bne.b 16$ ; flyttede og killed meldinger, ingen include + move.w (Userbits+CU,NodeBase),d1 ; bare FSE har include. + btst #USERB_FSE,d1 ; Brukrer vi FSE ??? + beq.b 16$ ; Nei, ingen include + lea (includeomsgtext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq.b 15$ + move.b #2,(FSEditor,NodeBase) ; Vi skal includere. + bra.b 16$ +15$ tst.b (readcharstatus,NodeBase) ; Ikke include + notz + beq 9$ +16$ move.b #MSTATF_NormalMsg,(MsgStatus,a2) ; setter dette til en normal melding + move.l a3,a0 ; oppdaterer NrBytes + jsr (strlen) + move.w d0,(NrBytes,a2) + move.l a2,a0 + move.l a3,a1 + move.l (msgmemsize,NodeBase),d0 + move.l a3,d4 + sub.l (tmpmsgmem,NodeBase),d4 ; d4 er "ekstra info" + sub.l d4,d0 + move.l (tmpmsgmem,NodeBase),d1 + jsr (calleditor) + beq 17$ ; abort/carrier borte osv. + tst.l d4 ; var det net melding ? + beq.b 18$ + neg.w (NrLines,a2) ; merker det som det + add.w d4,(NrBytes,a2) ; legger til size for ekstra + move.l (tmpmsgmem,NodeBase),a3 + move.l a3,a0 ; og klar for save +18$ move.l a2,a1 + move.w (confnr,NodeBase),d0 + jsr (savemsg) + lea (cnotsavemsgtext),a0 + bne 8$ + lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d2 + move.l d2,d0 + jsr (skrivnr) + lea (savedtext),a0 + jsr (writetexto) + move.l (Number,a2),d0 + bsr stopreviewmessages + addq.w #1,(MsgsLeft+CU,NodeBase) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + move.l a3,a1 + jsr (sendintermsgmsg) + + move.l d3,d1 ; meldings nummeret + lea (logreplymsgtext),a0 + move.w (confnr,NodeBase),d0 + jsr (killrepwritelog) + + move.l d3,d0 ; meldings nummeret vi svarte på + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 9$ + move.l (RefBy,a2),d0 ; har vi svar ? + bne.b 19$ ; ja, må gå til slutten + move.l d2,(RefBy,a2) ; Dette er første svar. + bra.b 20$ +19$ move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 9$ + move.l (RefNxt,a2),d0 + bne.b 19$ ; loop'er for å finne siste + move.l d2,(RefNxt,a2) ; Setter inn sist i kjeden. +20$ move.w (confnr,NodeBase),d0 + move.l a2,a0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 8$ + bra.b 9$ + +17$ tst.b (readcharstatus,NodeBase) ; skjedde det noe spes ? + notz + beq 9$ ; jepp, ut me'n.. + lea (msgtext1),a0 ; tar abort + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (abortedtext),a0 + jsr (writetexto) + bra.b 9$ + +8$ jsr (writeerroro) +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) +99$ pop d3/a2/a3/d4/d5/d6/d7 + rts + +;#c +duplicatemessage + push a2/d2/d3/a3 + bsr getcurmsgnr ; henter msg nr + beq 9$ ; error (var ingen current) + move.l d0,d2 ; husker msgnr + move.w (confnr,NodeBase),d1 ; henter inn msg header + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + lea (msgnotavailfrep),a0 + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop+MSTATF_Moved+MSTATF_Dontshow,d0 + bne 8$ + move.l a2,a0 + jsr (isnetmessage) + beq 9$ ; ut + jsr (justchecksysopaccess) + bne.b 10$ ; vi er sysop, så vi kan dup'e + lea (onlydupownmtext),a0 + move.l (MsgFrom,a2),d0 + cmp.l (Usernr+CU,NodeBase),d0 ; Er vi avsender ? + bne 8$ ; nope +10$ lea (changetoadrtext),a0 + moveq.l #1,d0 ; vi godtar all + move.w (confnr,NodeBase),d1 ; Finner ut om vi er i en postpox + lea (n_FirstConference+CStr,MainBase),a3 + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a3 + move.w (n_ConfSW,a3),d1 + btst #CONFSWB_PostBox,d1 + beq.b 6$ + moveq.l #0,d0 ; vi godtar ikke all +6$ moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + bne.b 2$ + move.b (readcharstatus,NodeBase),d1 + bne 9$ + bra.b 1$ +2$ move.l d0,d3 + moveq.l #-1,d1 + cmp.l d3,d1 ; til all ? + bne.b 4$ ; nope + btst #SECB_SecReceiver,(Security,a2) ; privat ? + beq.b 5$ ; nope, alt ok. + lea (allnotallowtext),a0 + bra 8$ + +4$ move.w (confnr,NodeBase),d1 + jsr (checkmemberofconf) + bne.b 5$ + lea (loadusererrtext),a0 + bmi 8$ + lea (sorryusnmoctext),a0 + bra 8$ +5$ move.l d3,(MsgTo,a2) +1$ bclr #MsgBitsB_FromNet,(MsgBits,a2) + lea (entersubjectext),a0 + lea (Subject,a2),a1 + moveq.l #Sizeof_NameT,d0 + jsr (mayedlineprompt) + beq.b 3$ + lea (Subject,a2),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) +3$ move.b (readcharstatus,NodeBase),d1 + bne 9$ + move.l (n_ConfDefaultMsg,a3),d0 + addq.w #1,d0 + move.l d0,(Number,a2) + moveq.l #0,d0 + move.l d0,(RefTo,a2) ; sletter referanser + move.l d0,(RefBy,a2) + move.l d0,(RefNxt,a2) + move.l (tmpmsgmem,NodeBase),a0 + move.w (confnr,NodeBase),d0 + move.l a2,a1 + jsr (loadmsgtext) + lea (errloadmsgttext),a0 + bne 8$ + move.b #2,(FSEditor,NodeBase) ; Vi skal includere. + lea (MsgTimeStamp,a2),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + move.l a2,a0 + move.l (msgmemsize,NodeBase),d0 + move.l (tmpmsgmem,NodeBase),a1 + move.l a1,d1 + jsr (calleditor) + beq 7$ + move.l a2,a1 + move.w (confnr,NodeBase),d0 + jsr (savemsg) + lea (cnotsavemsgtext),a0 + bne 8$ + move.l (Number,a2),d0 + exg d2,d0 + move.w (confnr,NodeBase),d1 ; henter inn msg header + move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + move.l a2,a0 + bsr killmsgwhodidit + or.b d0,(MsgStatus,a2) ; Dreper denne kopien + move.l a2,a0 ; og lagrer den igjen + move.w (confnr,NodeBase),d0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne 8$ + lea (msgtext1),a0 + jsr (writetext) + move.l d2,d0 + jsr (skrivnr) + lea (savedtext),a0 + jsr (writetexto) + move.l d2,d0 + bsr stopreviewmessages + addq.w #1,(MsgsLeft+CU,NodeBase) + move.l d2,(Number,a2) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + move.b #0,(i_pri,a0) + move.l (tmpmsgmem,NodeBase),a1 + jsr (sendintermsgmsg) + move.l (Number,a2),d1 + lea (logentermsgtext),a0 + move.w (confnr,NodeBase),d0 ; conf nr + jsr (killrepwritelog) + bra.b 9$ + +7$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ + lea (msgtext1),a0 + jsr (writetext) + move.l (Number,a2),d0 + jsr (skrivnr) + lea (abortedtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2/d2/d3/a3 + rts + +;#c READ MESSAGE +readmsg move.l (msgqueue,NodeBase),d0 + bne.b 1$ + jsr (unjoin) + lea (checkfmsgictext),a0 + jsr (writetexto) + beq.b 9$ + jsr (joinnextunreadconf) + lea (nonewiacmsgtext),a0 + beq.b 8$ + bra.b 9$ + +1$ lea (skipnextmsgtext),a0 + jsr (writetexto) + beq.b 9$ + move.l (msgqueue,NodeBase),d0 + move.w (confnr,NodeBase),d1 + move.l d0,(currentmsg,NodeBase) + jsr (typemsg) + lea (msgnotfoundtext),a0 + bmi.b 8$ + move.l (msgqueue,NodeBase),d0 + bne.b 9$ + lea (nomoremsgictext),a0 +8$ jsr (writetexto) +9$ rts + +;#c +originalmsg ; Søker seg bakover i thread'en og + movem.l a2/d2,-(sp) ; skriver ut orginalen (RefTo = 0) + bsr getcurmsgnr + beq.b 9$ +1$ lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + move.w (confnr,NodeBase),d1 + move.l d0,d2 + jsr (loadmsgheader) + bne.b 5$ + move.l (RefTo,a2),d0 + bne.b 1$ + move.w (confnr,NodeBase),d1 + move.l (Number,a2),d0 + jsr (typemsg) + bmi.b 9$ + move.l (Number,a2),(currentmsg,NodeBase) + bra.b 9$ +5$ lea (orgnotavailtext),a0 + jsr (writetexto) +9$ movem.l (sp)+,a2/d2 + rts + +;#c +readcurrentmsg ; Skriver ut current msg i denne conf + bsr getcurmsgnr + beq.b 9$ + moveq.l #0,d1 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 9$ + lea (msgnotfoundtext),a0 ; Feil ! + jsr (writetexto) + clr.l (currentmsg,NodeBase) ; Ikke en gang til ! +9$ rts + +;#c +previusmsg + movem.l a2/d2,-(sp) + lea (tmpmsgheader,NodeBase),a2 + move.l (currentmsg,NodeBase),d2 ; har vi lest en melding ? + bne.b 1$ ; ja + move.w (confnr,NodeBase),d0 ; nei, da tar vi siste melding + mulu #ConferenceRecord_SIZEOF/2,d0 ; i konferansen + lea (n_FirstConference+CStr,MainBase),a0 + move.l (n_ConfDefaultMsg,a0,d0.l),d2 + bra.b 2$ +1$ subq.l #1,d2 + bne.b 2$ + lea (firstmsgtext),a0 + jsr (writeerroro) + bra.b 9$ +2$ move.l a2,a0 + move.w (confnr,NodeBase),d1 + move.l d2,d0 + jsr (loadmsgheader) + beq.b 4$ + lea (errloadmsghtext),a0 + jsr (writetexti) + bra.b 9$ +4$ move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) + bne.b 1$ + move.l d2,d0 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 3$ + lea (msgnotfoundtext),a0 + jsr (writetexto) + bra.b 9$ +3$ move.l d2,(currentmsg,NodeBase) +9$ movem.l (sp)+,a2/d2 + rts + +;#c +nextmsg movem.l a2/d2/d3,-(sp) + lea (tmpmsgheader,NodeBase),a2 + move.l (currentmsg,NodeBase),d2 + move.w (confnr,NodeBase),d0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_FirstConference+CStr,MainBase),a0 + move.l (n_ConfDefaultMsg,a0,d0.l),d3 +1$ addq.l #1,d2 + cmp.l d2,d3 + bcc.b 2$ + lea (lastmsgtext),a0 + jsr (writeerroro) + bra.b 9$ +2$ move.l a2,a0 + move.w (confnr,NodeBase),d1 + move.l d2,d0 + jsr (loadmsgheader) + beq.b 4$ + lea (errloadmsghtext),a0 + jsr (writetexti) + bra.b 9$ +4$ move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (kanskrive) + bne.b 1$ + move.l d2,d0 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 3$ + lea (msgnotfoundtext),a0 + jsr (writetexto) + bra.b 9$ +3$ move.l d2,(currentmsg,NodeBase) +9$ movem.l (sp)+,a2/d2/d3 + rts + +;#c +readreply + movem.l a2/d2,-(sp) + lea (tmpmsgheader,NodeBase),a2 + bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 + move.l a2,a0 + jsr (loadmsgheader) + beq.b 2$ +;error + bra.b 9$ +2$ move.l (RefBy,a2),d2 + beq.b 4$ + move.l d2,d0 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 3$ + lea (msgnotfoundtext),a0 + jsr (writetexto) + bra.b 9$ +4$ lea (noreplytext),a0 + jsr (writetexto) + bra.b 9$ +3$ move.l d2,(currentmsg,NodeBase) +9$ movem.l (sp)+,a2/d2 + rts + +;#c +readotherreply + push a2/d2 + lea (tmpmsgheader,NodeBase),a2 + bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 + move.l a2,a0 + jsr (loadmsgheader) + beq.b 2$ +;error + bra.b 9$ +2$ move.l (RefNxt,a2),d2 + lea (nomreplytext),a0 + beq.b 4$ + move.l d2,d0 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 3$ + lea (msgnotfoundtext),a0 +4$ jsr (writetexto) + bra.b 9$ +3$ move.l d2,(currentmsg,NodeBase) +9$ pop a2/d2 + rts + +;#c +readbackinthread + push a2/d2 + lea (tmpmsgheader,NodeBase),a2 + bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 + move.l a2,a0 + jsr (loadmsgheader) + beq.b 2$ +;error + bra.b 9$ +2$ move.l (RefTo,a2),d2 + lea (msgnotreplytext),a0 + beq.b 4$ + move.l d2,d0 + move.w (confnr,NodeBase),d1 + jsr (typemsg) + bpl.b 3$ + lea (msgnotfoundtext),a0 +4$ jsr (writetexto) + bra.b 9$ +3$ move.l d2,(currentmsg,NodeBase) +9$ pop a2/d2 + rts + +;#c +killmsg move.l a2,-(sp) + bsr getcurmsgnr + beq 9$ + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + beq.b 7$ + lea (errloadmsghtext),a0 + bra.b 99$ +7$ move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + beq.b 6$ + lea (msgalkilledtext),a0 + bra.b 99$ +6$ move.l a2,a0 + jsr (allowkill) + beq.b 2$ ; Ja, hopp + lea (notallokilltext),a0 + bra.b 99$ +2$ move.l a2,a0 + bsr killmsgwhodidit + or.b d0,(MsgStatus,a2) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 99$ + move.l (Number,a2),d1 + lea (logkiledmsgtext),a0 + move.w (confnr,NodeBase),d0 ; conf nr + jsr (killrepwritelog) + lea (msgkilledtext),a0 +99$ jsr (writetexto) +9$ move.l (sp)+,a2 + rts + +killmsgwhodidit + move.l (Usernr+CU,NodeBase),d0 + cmp.l (MsgFrom,a0),d0 + bne.b 1$ +3$ move.w #MSTATF_KilledByAuthor,d0 + bra.b 9$ +1$ cmp.l (MsgTo,a0),d0 + beq.b 3$ + jsr (justchecksysopaccess) ; er vi sysop ? + bne.b 2$ ; ja + move.w #MSTATF_KilledBySigop,d0 + bra.b 9$ +2$ move.w #MSTATF_KilledBySysop,d0 +9$ rts + +;#c +unkillmsg + move.l a2,-(sp) + bsr getcurmsgnr + beq.b 9$ + move.w (confnr,NodeBase),d1 + cmpi.w #4,d1 ; nekter å unkill'e ifra resyme og fileinfo + beq.b 1$ + cmpi.w #6,d1 + beq.b 1$ + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + jsr (loadmsgheader) + beq.b 7$ + lea (errloadmsghtext),a0 + bra.b 99$ +7$ move.l a2,a0 + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + bne.b 6$ + lea (msgnokilledtext),a0 + bra.b 99$ +6$ jsr (allowunkill) + beq.b 2$ ; Ja, hopp +1$ lea (notallukilltext),a0 + bra.b 99$ +2$ andi.b #~(MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop),(MsgStatus,a2) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (savemsgheader) + lea (msgunkilledtext),a0 + beq.b 99$ + lea (cntsavemsghtext),a0 +99$ jsr (writetexto) +9$ move.l (sp)+,a2 + rts + +;#c +markmenu + move.w #24,(menunr,NodeBase) ;Skifter til mark menu + rts + +;#c +readmode + move.w (Savebits+CU,NodeBase),d0 + eori.w #SAVEBITSF_ReadRef,d0 + IFND DEMO + cmp.w #%100111,d0 + bne.b 1$ + move.b #$f2,(con_tegn,NodeBase) +1$ + ENDC + move.w d0,(Savebits+CU,NodeBase) + rts + +;#c +resignconference + push a2 + move.w (confnr,NodeBase),d0 + cmp.w #4,d0 + bcs.b 3$ + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_FirstConference+CStr,MainBase),a2 + add.l d0,a2 + move.w (n_ConfSW,a2),d1 + btst #CONFSWB_Resign,d1 + bne.b 1$ +3$ lea (ycantresigntext),a0 + jsr (writeerroro) + bra.b 9$ +1$ lea (sureywresfctext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ + lea (n_ConfName,a2),a1 ; husker navnet + move.w (confnr,NodeBase),d0 + lea (u_almostendsave+CU,NodeBase),a2 + mulu #Userconf_seizeof/2,d0 + lea (uc_Access,a2,d0.l),a2 + move.w (a2),d0 + bclr #ACCB_Read,d0 ; sletter read flag'et + move.w d0,(a2) + lea (logresconftext),a0 + jsr (writelogtexttimed) + move.l a2,a0 + moveq.l #2,d0 ; lagrer den ene word'n + jsr (saveuserarea) + beq.b 2$ + lea (resigningartext),a0 + jsr (writetext) + lea (n_ConfName+n_FirstConference+CStr,MainBase),a0 + jsr (writetexto) +2$ moveq.l #0,d0 ; Joiner News (den kan vi jo + bsr joinnr ; aldri resigne fra) +9$ pop a2 + rts + +;#c +savereadptrs + push a6/d2/d3/d4 ; leser inn readptr'ene ifra fil + move.l (dosbase),a6 + bsr getreadpointerfname ; (lagrer backup der) + move.l a0,d3 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.b 1$ ; finnes ikke ifra før + jsrlib UnLock + clrz ; den fantes, + bra.b 9$ ; ferdig +1$ move.l d3,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 ; husker ptr + beq.b 9$ ; ingen fil. ut + move.l d4,d1 + move.w (Maxconferences+CStr,MainBase),d3 + mulu #Userconf_seizeof,d3 + lea (u_almostendsave+CU,NodeBase),a1 + move.l a1,d2 + jsrlib Write + move.l d4,d1 + jsrlib Close + clrz +9$ pop a6/d2/d3/d4 + rts +;#c +restorereadpointers + push a6/d2/d3/d4 ; leser inn readptr'ene ifra fil + bsr getreadpointerfname ; (lagrer backup der) + move.l a0,d1 + move.l (dosbase),a6 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 ; husker ptr + beq.b 9$ ; ingen fil. ut + move.l d4,d1 + move.w (Maxconferences+CStr,MainBase),d3 + mulu #Userconf_seizeof,d3 + lea (u_almostendsave+CU,NodeBase),a1 + move.l a1,d2 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d2,d3 + notz + beq.b 9$ + bsr deletereadpointersfile + clrz +9$ pop a6/d2/d3/d4 + rts + +getreadpointerfname + lea (tmptext,NodeBase),a1 + lea (TmpPath+Nodemem,NodeBase),a0 + jsr (strcopy) + move.b #'/',(-1,a1) + lea (readptrfname),a0 + jsr (strcopy) + lea (tmptext,NodeBase),a0 + rts + +deletereadpointersfile + push a6 + bsr getreadpointerfname + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DeleteFile + pop a6 + rts + +; returnerer: +; a0 = pattern for å få med seg alle scratchpad filene +; a1 = dirnavnet hvor scratchpad ligger +getscratchpaddelfname + lea (tmptext,NodeBase),a1 + lea (TmpPath+Nodemem,NodeBase),a0 + jsr (strcopy) + move.b #'/',(-1,a1) + move.b #0,(a1) + lea (BaseName+CStr,MainBase),a0 + move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + beq.b 1$ ; MBBS + lea (allqwksendfiles),a0 ; tar QWK navnet + cmp.b #1,d0 + beq.b 1$ + lea (allhipsendfiles),a0 +1$ lea (tmptext,NodeBase),a1 + rts + +getscratchpadfname + lea (tmptext,NodeBase),a1 + lea (TmpPath+Nodemem,NodeBase),a0 + jsr (strcopy) + move.b #'/',(-1,a1) + lea (BaseName+CStr,MainBase),a0 + move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + beq.b 1$ ; MBBS + lea (qwkmsgdatfile),a0 ; tar QWK navnet +1$ jsr (strcopy) + cmp.b #2,d0 ; hippo ? + bne.b 2$ + lea (-1,a1),a1 + lea (hippoextension),a0 + jsr (strcopy) +2$ lea (tmptext,NodeBase),a0 + rts + +;#c +grab moveq.l #1,d0 + bsr dumpall1 + beq.b 9$ + bsr sendscratch +9$ rts + +;#c +ungrab move.b (GrabFormat+CU,NodeBase),d0 ; hvilket format skal de ha ? + lea (mbbsnomsguptext),a0 + beq.b 8$ ; mbbs har ikke MU... + lea (hippnomsguptext),a0 + cmp.b #2,d0 + beq.b 8$ ; HIPPO har ikke MU (enda)... + bsr getscratch + beq.b 9$ ; error + XREF _unpackmessages + jsr (_unpackmessages) + bra.b 9$ +8$ jsr (writeerroro) +9$ rts + +;#e +***************************************************************** +* Sysop/Sigop meny * +***************************************************************** + +;#b +;#c + STRUCTURE cleanstruct,0 + ULONG morelogons + ULONG lesslogons + ULONG moredownloads + ULONG lessdownloads + ULONG moremsgread + ULONG lessmsgread + ULONG logonnotafter + ULONG logonafter + UBYTE nogeneraldlacc + UBYTE generaldlacc + LABEL cleanstruct_sizeof + +cleanuserfile + link.w a3,#-cleanstruct_sizeof + jsr (checksysopaccess) + beq 9$ + move.b #0,(readlinemore,NodeBase) ; flush'er input + move.l sp,a0 + moveq.l #cleanstruct_sizeof,d0 + jsr (memclr) + lea (cleanuser1text),a0 + jsr (writetexto) + lea (cleanuser2text),a0 + jsr (writetexto) + lea (cleanuser3text),a0 + bsr 10$ + bmi 9$ + beq.b 1$ + move.l d0,(morelogons,sp) + +1$ lea (cleanuser4text),a0 + bsr 10$ + bmi 9$ + beq.b 2$ + move.l d0,(lesslogons,sp) + +2$ lea (cleanuser5text),a0 + bsr 10$ + bmi 9$ + beq.b 3$ + move.l d0,(moredownloads,sp) + +3$ lea (cleanuser6text),a0 + bsr 10$ + bmi.b 9$ + beq.b 4$ + move.l d0,(lessdownloads,sp) + +4$ lea (cleanuser7text),a0 + bsr 10$ + bmi.b 9$ + beq.b 5$ + move.l d0,(moremsgread,sp) + +5$ lea (cleanuser8text),a0 + bsr 10$ + bmi.b 9$ + beq.b 6$ + move.l d0,(lessmsgread,sp) + +6$ lea (cleanuser9text),a0 + bsr 20$ + bmi.b 9$ + beq.b 7$ + move.l d0,(logonnotafter,sp) + +7$ lea (cleanuser10text),a0 + bsr 20$ + bmi.b 9$ + beq.b 8$ + move.l d0,(logonafter,sp) + +8$ lea (cleanuser11text),a0 + bsr 30$ + bmi.b 9$ + beq.b 81$ + move.b #1,(nogeneraldlacc,sp) + +81$ lea (cleanuser12text),a0 + bsr 30$ + bmi.b 9$ + beq.b 82$ + move.b #1,(generaldlacc,sp) +82$ + move.l sp,a0 + bsr docleanuserfile + +9$ unlk a3 + rts + +10$ push a2/a3 + move.l a0,a3 +11$ suba.l a1,a1 + suba.l a2,a2 ; ingen ekstra help + jsr (readlinepromptwhelp) + bne.b 13$ + tst.b (readcharstatus,NodeBase) ; noe galt ? + beq.b 19$ ; nei, bare ingen input + setn + bra.b 19$ ; ja, hopp ut +13$ jsr (atoi) + bpl.b 12$ + lea (invalidnrtext),a0 + jsr (writeerroro) + move.l a3,a0 + bra.b 11$ ; det var ikke et tall +12$ clrzn +19$ pop a2/a3 + rts + +20$ push a2/d2/d3/d4/a3 + move.l a0,a3 +21$ suba.l a1,a1 + suba.l a2,a2 ; ingen ekstra help + jsr (readlinepromptwhelp) + bne.b 23$ + tst.b (readcharstatus,NodeBase) ; noe galt ? + beq.b 29$ ; nei, bare ingen input + setn + bra.b 29$ ; ja, hopp ut +23$ jsr (strtonr2) + bmi.b 24$ + move.l d0,d2 ; år + jsr (strtonr2) + bmi.b 24$ + move.l d0,d3 ; mnd + jsr (strtonr2) + bmi.b 24$ + exg d0,d2 ; dag + move.l d3,d1 + jsr (datetodays) + bne.b 22$ +24$ lea (invaliddatetext),a0 + jsr (writeerroro) + move.l a3,a0 + bra.b 21$ ; det var ikke et tall +22$ clrzn +29$ pop a2/d2/d3/d4/a3 + rts + +30$ suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + bne.b 32$ ; ja + tst.b (readcharstatus,NodeBase) ; noe galt ? + beq.b 39$ ; nei, bare ingen input eller nei + setn + bra.b 39$ ; ja, hopp ut +32$ clrzn +39$ rts + +docleanuserfile + push d2/a2/a3 + move.l (Tmpusermem,NodeBase),a2 + move.l a0,a3 ; husker strukturen + moveq.l #0,d2 ; bruker nummer + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noe more i denne lista + +1$ jsr (testbreak) + beq 9$ + move.l d2,d0 + move.l a2,a0 + jsr (loadusernrnr) + bmi 9$ ; Error + beq 9$ ; EOF + move.l (Usernr,a2),d0 ; Er dette supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 2$ ; ja, aldri kill han + move.w (Userbits,a2),d0 + andi.w #USERF_Killed,d0 ; Er han død ? + bne.b 2$ ; ja, gi f... i han + bsr 10$ ; Oppfyller denne kriteriene ? + bne.b 2$ ; nope + moveq.l #0,d0 + lea (20$),a0 + bsr doshowuser + beq 9$ ; skal ut. + jsr (outimage) + beq 9$ ; skal ut. + lea (cleanuser13text),a0 + jsr (writetexti) +3$ jsr (readchar) + beq.b 9$ ; han forsvant + bmi.b 3$ ; Dropper spesial tegn. + jsr (upchar) + cmp.b #'S',d0 + beq.b 4$ ; han vil ut + cmp.b #'N',d0 + beq.b 5$ ; han vil han neste + cmp.b #'K',d0 + bne.b 3$ ; Ukjennt tegn + ori.w #USERF_Killed,(Userbits,a2) + move.l a2,a0 + move.l (Usernr,a2),d0 + jsr (saveusernr) + beq.b 8$ ; Error + move.b #'K',d0 +5$ jsr (writechar) + jsr (outimage) +2$ addq.l #1,d2 + bra 1$ +4$ jsr (writechar) + jsr (outimage) + bra.b 9$ +8$ jsr (outimage) + lea (saveusererrtext),a0 + jsr (writeerroro) +9$ pop d2/a2/a3 + rts + +20$ jmp (writetexto) + + +10$ move.l (TimesOn,a2),d0 + move.l (morelogons,a3),d1 + beq.b 101$ + cmp.l d1,d0 + bhi.b 17$ +101$ move.l (lesslogons,a3),d1 + beq.b 11$ + cmp.l d1,d0 + bcs.b 17$ + +11$ move.l (Downloaded,a2),d0 + move.l (moredownloads,a3),d1 + beq.b 111$ + cmp.l d1,d0 + bhi.b 17$ +111$ move.l (lessdownloads,a3),d1 + beq.b 12$ + cmp.l d1,d0 + bcs.b 17$ + +12$ move.l (MsgsRead,a2),d0 + move.l (moremsgread,a3),d1 + beq.b 121$ + cmp.l d1,d0 + bhi.b 17$ +121$ move.l (lessmsgread,a3),d1 + beq.b 13$ + cmp.l d1,d0 + bcs.b 17$ + +13$ move.l (LastAccess+ds_Days,a2),d0 + move.l (logonafter,a3),d1 + beq.b 131$ + cmp.l d1,d0 + bhi.b 17$ +131$ move.l (logonnotafter,a3),d1 + beq.b 14$ + cmp.l d1,d0 + bcs.b 17$ + +14$ move.w (uc_Access+u_almostendsave,a2),d0 + and.w #ACCF_Download,d0 ; isolerer download bitet + beq.b 141$ ; vi har ikke dl access + move.b (generaldlacc,a3),d1 + bne.b 17$ + bra.b 18$ +141$ move.b (nogeneraldlacc,a3),d1 + beq.b 18$ +17$ setz + bra.b 19$ +18$ clrz +19$ rts + +;#c +packuserfile + jsr (checksysopaccess) + beq.b 9$ + move.b #0,(readlinemore,NodeBase) ; flush'er input + lea (surepackusrtext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ + lea (takenbackuptext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ + jsr (lockoutallothernodes) + lea (younotalonetext),a0 + beq.b 8$ + lea (thismaytaketext),a0 + jsr (writetexto) + bsr dopackuserfile + jsr (unlockoutallothernodes) + bra.b 9$ +8$ jsr writeerroro +9$ rts + +dopackuserfile ; ! PUS + push a2/a3/d2/d3 + move.l (Tmpusermem,NodeBase),a2 ; scan userfile og husk hvem som skal vekk + move.l (tmpmsgmem,NodeBase),a3 + move.l (msgmemsize,NodeBase),d3 + lsr.l #2,d3 + subq.l #1,d3 ; antall brukere vi har plass til... + moveq.l #-1,d2 + +1$ addq.l #1,d2 ; Neste bruker + move.l d2,d0 + move.l a2,a0 + jsr (loadusernrnr) ; Hent bruker + lea (loadusererrtext),a0 + bmi.b 8$ ; Error + beq.b 2$ ; EOF + move.l (Usernr,a2),d0 ; Er dette supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 1$ ; ja, aldri fjerne han + move.w (Userbits,a2),d1 + andi.w #USERF_Killed,d1 ; Er han død ? + beq.b 1$ ; nei, sjekk neste + subq.l #1,d3 + beq.b 3$ ; ikke plass til flere.. + move.l d0,(a3)+ ; lagrer brukernummeret + bra.b 1$ + +3$ lea (stablefullctext),a0 + jsr (writetexto) +2$ moveq.l #-1,d0 + move.l d0,(a3)+ ; lagrer slutten + +; jsr (_PackUserDoFiles) + bsr packuserdofiles ; Alle uploads -> fra sysop + beq.b 9$ ; error + + bsr packuserdomessages ; Sletter alle meldinger + beq.b 9$ ; error + + bsr.b packuserfiles ; Tar bort fysisk fra userfila (OK) + beq.b 9$ ; error + +; fikse user filene +; rette opp configfile (Users/Maxusers..) + + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2/a3/d2/d3 + rts + +packuserfiles + move.l (msg,NodeBase),a1 + move.w #Main_PackUserFile,(m_Command,a1) + move.l (Tmpusermem,NodeBase),a0 + move.l a0,(m_Data,a1) + move.l (tmpmsgmem,NodeBase),(m_arg,a1) ; Tabell over brukere som skal slettes. + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + beq.b 9$ + jsr skrivnrw + lea (errwpackingtext),a0 + jsr (writeerroro) + setz +9$ rts + +; fikser alle message records i .h filene som følge av packuser +; meldinger til eller fra en av de som skal vekk, slettes +packuserdomessages + push a2/a3/d2/d3/d4/d5 + lea (n_FirstConference+CStr,MainBase),a3 + moveq.l #0,d2 ; confnr + lea (tmpmsgheader,NodeBase),a2 + +1$ move.b (n_ConfName,a3),d0 ; conf her ? + beq.b 2$ ; nei.. + + move.l d2,d5 ; d5 = 2 + add.l d5,d5 ; d5 = confnr * 2 + move.l (n_ConfDefaultMsg,a3),d4 ; d4 = max msg num + moveq.l #1,d3 ; d3 = msg num + +4$ cmp.l d3,d4 ; ferdig ? + bcs.b 2$ ; jepp + move.l d5,d1 + move.l a2,a0 + move.l d3,d0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 8$ + btst #MSTATB_Dontshow,(MsgStatus,a2) ; kan vi vise denne meldingen ? + bne.b 3$ ; nei, ikke noe mere å gjøre da... + move.l (MsgFrom,a2),d0 + bsr packusercheckusernr + beq.b 5$ ; var fra en bruker som som skal bort + move.l (MsgTo,a2),d0 + bsr packusercheckusernr ; var til en bruker som som skal bort + bne.b 3$ +5$ bset #MSTATB_Dontshow,(MsgStatus,a2) ; Sletter meldingen ordentelig. + move.l a2,a0 + move.l d5,d0 + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 8$ + +3$ addq.l #1,d3 + bra.b 4$ + +2$ lea (ConferenceRecord_SIZEOF,a3),a3 + addq.l #1,d2 + cmp.w (Maxconferences+CStr,MainBase),d2 + bcs.b 1$ + clrz + bra.b 9$ +8$ jsr (writeerroro) + move.l d3,d0 + jsr skrivnr + move.l a3,a0 + jsr (writetexto) + setz +9$ pop a2/a3/d2/d3/d4/d5 + rts + +; fikser file entries i alle .fl filene som følge av packuser +; filer privat til vedkommende, slettes +; filer uploadet av vedkommende, får sysop som uploader +packuserdofiles + push a2/a3/d2/d3 + moveq.l #0,d2 ; fikse .fl filer (uploadet og private to) + move.l (firstFileDirRecord+CStr,MainBase),a3 + lea (tmpfileentry,NodeBase),a2 +4$ move.b (n_DirName,a3),d0 ; dir her ? + beq 5$ ; nei.. + +; scanner alle filene i denne fildir'en + moveq.l #1,d3 ; starter på første fil. +6$ move.l (msg,NodeBase),a1 + move.w #Main_loadfileentry,(m_Command,a1) + move.l d2,(m_UserNr,a1) ; fildir*1 + move.l d3,(m_arg,a1) ; filnr + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_EOF,d0 + beq.b 5$ ; eof, fortsett med neste dir + lea (errloadfilhtext),a0 + cmpi.w #Error_OK,d0 ; error ? + bne.w 8$ ; jepp, abort + move.w (Filestatus,a2),d0 + move.w d0,d1 ; er den allerede "slettet" ? + andi.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d1 + bne.b 7$ ; jepp, skip + + btst #FILESTATUSB_PrivateUL,d0 ; private ? + beq.b 61$ ; nei. + move.l (PrivateULto,a2),d0 ; sjekker om den er til en av de drepte. + bsr packusercheckusernr + beq.b 100$ ; var der + move.l (Uploader,a2),d0 ; sjekker om den er fra en av de drepte. + bsr packusercheckusernr + beq.b 100$ ; var der + bsr.b 61$ +; sletter fila +100$ ori.w #FILESTATUSF_Fileremoved,(Filestatus,a2) + bsr 10$ + bne.b 8$ + lea (Filename,a2),a0 + lea (maintmptext,NodeBase),a1 + move.l d2,d0 + jsr (buildfilepath) + lea (maintmptext,NodeBase),a0 + jsr (deletefile) + bra.b 7$ ; og tar neste fil + +61$ move.l (Uploader,a2),d0 ; sjekker om den er fra en av de drepte. + bsr packusercheckusernr + bne.b 7$ ; var ikke der + move.l (SYSOPUsernr+CStr,MainBase),(Uploader,a2) + moveq.l #0,d0 + move.l d0,(Infomsgnr,a2) ; tømmer denne + bsr 10$ ; lagrer oppdatert fileinfo + bne.b 8$ + +7$ addq.l #1,d3 ; tar neste fil + bra 6$ + +5$ lea (FileDirRecord_SIZEOF,a3),a3 + addq.l #1,d2 ; antall fildir's vi har sjekket + cmp.w (MaxfileDirs+CStr,MainBase),d2 + bcs 4$ + clrz + bra.b 9$ +8$ jsr (writeerroro) + setz +9$ pop a2/a3/d2/d3 + rts + +10$ move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l d2,(m_UserNr,a1) ; fildir*1 + move.l d3,(m_arg,a1) ; filnr + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + lea (errsavefilhtext),a0 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + rts + +; d0 = brukernr +; ret: z = 1, bruker er i array'en +packusercheckusernr + cmp.l #-1,d0 ; er det all ? + beq.b 8$ ; da er det ikke match.. + move.l (tmpmsgmem,NodeBase),a0 +1$ move.l (a0)+,d1 + cmp.l d0,d1 + beq.b 9$ + cmp.l #-1,d1 + bne.b 1$ +8$ clrz +9$ rts + +;#c + STRUCTURE exitstruct,0 + ULONG fifor + ULONG fifow + ULONG fifoportsig + ULONG fifotmp + ULONG fifoptr + STRUCT RMsg,MN_SIZE + STRUCT WMsg,MN_SIZE + LABEL exitstruct_sizeof + +exittodos + jsr (checksysopaccess) + beq.b 99$ + move.b (CommsPort+Nodemem,NodeBase),d0 ; Lokal node ? + beq.b 0$ ; Ja, da har vi lov uansett + move.b (dosPassword+CStr,MainBase),d0 ; har vi passord ? + beq.b 0$ ; nei, alt ok + tst.b (readlinemore,NodeBase) + beq.b 12$ + jsr (readlineprompt) + lea (dosPassword+CStr,MainBase),a1 + jsr (comparestrings) + beq.b 0$ + lea (wrongtext),a0 + jsr (writeerroro) + bra.b 99$ +12$ lea (dosPassword+CStr,MainBase),a0 + moveq.l #0,d0 + jsr (getpasswd) + beq.b 99$ +0$ moveq.l #40,d0 ; Status = exited to dos text. + jsr (changenodestatus) + lea (logexitodostext),a0 + jsr (writelogtexttime) + bra.b doshelldoorsub0 +99$ rts + +doshelldoorsub0 + suba.l a0,a0 +doshelldoorsub + push d2/d3/d4/d5 + move.l a0,d5 ; husker start scriptet + link.w a3,#-exitstruct_sizeof + lea (RMsg,sp),a0 + moveq.l #MN_SIZE*2,d0 + jsr (memclr) + lea (nodoronsystext),a0 + move.l (fifobase),d0 + beq 8$ + move.l (fifobase),a6 + lea (shellmfnametext),a0 + lea (tmptext,NodeBase),a1 ; bygger opp filnavnet + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + lea (tmptext,NodeBase),a0 + move.l #FIFOF_WRITE+FIFOF_NORMAL+FIFOF_NBIO,d1 + move.l a0,d0 + move.l d1,a0 + move.l #2048,d1 + jsr (_LVOOpenFifo,a6) + move.l d0,(fifow,sp) + lea (diskerrortext),a0 + beq 8$ + + lea (shellsfnametext),a0 + lea (tmptext,NodeBase),a1 ; bygger opp filnavnet + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + lea (tmptext,NodeBase),a0 + move.l #FIFOF_READ+FIFOF_NORMAL+FIFOF_NBIO,d1 + move.l a0,d0 + move.l d1,a0 + move.l #2048,d1 + jsr (_LVOOpenFifo,a6) + move.l d0,(fifor,sp) + bne.b 1$ + bsr 11$ + lea (diskerrortext),a0 + bra 8$ +1$ lea (newshelstext),a0 + lea (tmptext,NodeBase),a1 + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + lea (tmptext,NodeBase),a1 ; legger på shell scripte vi skal kjøre + lea (newsheletext),a0 + tst.l d5 ; Har vi noe spes vi vil ha kjørt ? + beq.b 12$ ; nei, tar default + move.l d5,a0 +12$ jsr (strcat) + lea (tmptext,NodeBase),a0 + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #0,d2 + jsrlib SystemTagList + move.l (fifobase),a6 + tst.l d0 + beq.b 6$ + bsr 10$ + lea (diskerrortext),a0 + bra 8$ +6$ move.l (nodeport,NodeBase),a0 + move.l a0,(MN_REPLYPORT+RMsg,sp) + move.l a0,(MN_REPLYPORT+WMsg,sp) + moveq.l #0,d2 + move.b (MP_SIGBIT,A0),d1 + bset d1,d2 + move.l d2,(fifoportsig,sp) + lea (RMsg,sp),a1 + move.l a1,d1 + move.l #FREQ_RPEND,a0 + move.l (fifor,sp),d0 + jsr (_LVORequestFifo,a6) + or.l (consigbit,NodeBase),d2 + or.l (sersigbit,NodeBase),d2 + or.l (intsigbit,NodeBase),d2 + or.l (publicsigbit,NodeBase),d2 + move.l (exebase),a6 + move.b #1,(FSEditor,NodeBase) ; slår av dekoding av tastene + +2$ moveq.l #0,d0 + move.l (pastetext,NodeBase),d1 ; sjekker om det ligger tegn og venter + bne.b 23$ ; det gjorde det. + move.l d2,d0 + jsrlib Wait +23$ move.l d0,d3 + + and.l (fifoportsig,sp),d0 + beq 3$ +22$ move.l (nodeport,NodeBase),a0 + jsrlib GetMsg + tst.l d0 + beq.b 3$ + lea (RMsg,sp),a0 + cmp.l d0,a0 + bne.b 22$ + + move.l (fifobase),a6 + move.l (fifor,sp),d0 + lea (fifoptr,sp),a0 + move.l a0,d1 + sub.l a0,a0 + jsr (_LVOReadFifo,a6) + move.l d0,d4 + bmi 5$ ; EOF, ut + cmp.l #80,d4 + bls.b 21$ + moveq.l #80,d4 +21$ move.l (exebase),a6 + move.l (fifoptr,sp),a0 + move.l d4,d0 + jsr (writetextlen) + jsr (breakoutimage) + move.l (fifobase),a6 + + move.l (fifor,sp),d0 + lea (fifoptr,sp),a0 + move.l a0,d1 + move.l d4,a0 + jsr (_LVOReadFifo,a6) + + lea (RMsg,sp),a1 + move.l a1,d1 + move.l #FREQ_RPEND,a0 + move.l (fifor,sp),d0 + jsr (_LVORequestFifo,a6) + move.l (exebase),a6 + +3$ move.l (pastetext,NodeBase),d0 ; sjekker om det ligger tegn og venter + bne.b 35$ ; det gjorde det. + move.l d3,d0 + and.l (consigbit,NodeBase),d0 + beq 4$ +35$ jsr (doconsole) + beq 4$ +31$ cmp.b #3,d0 + bcs.b 32$ + cmp.b #6,d0 + bls 33$ +32$ cmp.b #$1d,d0 + beq.b 7$ + lea (fifotmp,sp),a0 + move.b d0,(a0) + move.l a0,d1 + move.l (fifow,sp),d0 + move.l (fifobase),a6 + lea 1.w,a0 + jsr (_LVOWriteFifo,a6) + move.l (exebase),a6 + +4$ move.l d3,d0 + and.l (sersigbit,NodeBase),d0 + beq 41$ + jsr (doserial) + bne.b 31$ + bpl 7$ +; bra 7$ + +41$ move.l d3,d0 + and.l (intsigbit,NodeBase),d0 + beq 42$ + jsr (dointuition) + beq 7$ + bra 2$ + +42$ move.l d3,d0 + and.l (publicsigbit,NodeBase),d0 + beq 2$ + jsr (handlepublicport) + beq.b 7$ + tst.b (readcharstatus,NodeBase) ; noe galt ? + notz + bne 2$ ; Nei, fortsetter + +7$ move.l (fifobase),a6 + lea (RMsg,sp),a1 + move.l a1,d1 + move.l #FREQ_ABORT,a0 + move.l (fifor,sp),d0 + jsr (_LVORequestFifo,a6) + move.l (exebase),a6 +71$ move.l (nodeport,NodeBase),a0 + jsrlib GetMsg + tst.l d0 + bne.b 71$ + move.l (fifobase),a6 +5$ bsr 10$ + move.l (exebase),a6 + bra.b 9$ + +8$ move.l (exebase),a6 + jsr (writeerroro) +9$ move.b #0,(FSEditor,NodeBase) ; dekoding på (for sikkerhetsskyld) + unlk a3 + moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + jsr (outimage) + pop d2/d3/d4/d5 + rts + +33$ tst.l d5 ; skal vi sende break ? + bne 4$ ; nei, dette er en door!! + move.b d0,d4 + lea (fifoshellntext),a0 ; sender break + lea (tmptext,NodeBase),a1 + jsr (strcopy) + lea -1(a1),a0 + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + jsr (konverter) + move.b #'/',(a0)+ + add.b #'A'-1,d4 + move.b d4,(a0)+ + move.b #0,(a0) + move.l d2,d4 + lea (tmptext,NodeBase),a0 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + move.l (dosbase),a6 + jsrlib Open + move.l d0,d1 + beq.b 34$ + jsrlib Close +34$ move.l (exebase),a6 + move.l d4,d2 + bra 4$ + +10$ move.l (4+fifor,sp),d0 + move.l #FIFOF_EOF,d1 + jsr (_LVOCloseFifo,a6) +11$ move.l (4+fifow,sp),d0 + move.l #FIFOF_EOF,d1 + jsr (_LVOCloseFifo,a6) + rts +qqwesdf equ *-doshelldoorsub0 +sdfsdf + +;#c TESTING AV NYE RUTINER... +ejectnode + jsr (checksysopaccess) + beq 9$ + lea (nodenrtext),a0 + jsr (readlineprompt) + beq 9$ + jsr (atoi) + bmi 9$ + lea (cantsendtoytext),a0 + cmp.w (NodeNumber,NodeBase),d0 + beq.b 8$ + lea (maintmptext,NodeBase),a1 + lea (publicportname),a0 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 + move.l (msg,NodeBase),a1 + move.w #Node_Eject,(m_Command,a1) + jsr (handlemsgspesport) + lea (unknownnodetext),a0 + beq.b 8$ + lea (nactiveusertext),a0 + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 8$ + lea (userejectedtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ rts + +;#c +renamefile + push a2/a3/d2/d3 + jsr (checksysopaccess) + beq 9$ + lea (filenametext),a0 + jsr (readlineprompt) + beq 9$ + move.l a0,a3 + jsr (checkfilename) + beq 9$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + jsr (findfileinfo) + lea (filenotfountext),a0 + beq 8$ + move.l d0,d2 ; husker dir nr'et + move.l (m_UserNr,a1),d3 ; filpos. + + lea (maintmptext,NodeBase),a1 + move.l a3,a0 + jsr (buildfilepath) + lea (maintmptext,NodeBase),a0 + jsr (getfilelen) + lea (filenotavaltext),a0 + beq 8$ + + lea (newfilenametext),a0 ; spør etter nytt navn + jsr (readlineprompt) + beq 9$ + move.l a0,a3 + jsr (checkfilename) + beq 9$ + + move.l a3,a0 ; bygger path'en + move.l d2,d0 + lea (tmptext,NodeBase),a1 + jsr (buildfilepath) + lea (tmptext,NodeBase),a0 ; sjekker om filen finnes ifra før + jsr (getfilelen) + lea (filefounondtext),a0 + bne 8$ + move.l (Tmpusermem,NodeBase),a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + jsr (findfileinfo) + lea (filefountext),a0 + bne 8$ + + lea (Filename,a2),a1 + move.l a3,a0 + jsr (strcopy) + + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_Renamefileentry,(m_Command,a1) + move.l d3,(m_arg,a1) ; filpos. + move.l d2,(m_UserNr,a1) ; dir-nummer + move.l a2,(m_Data,a1) ; nytt navn? + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (errsavefilhtext),a0 + bne 8$ + + lea (maintmptext,NodeBase),a0 + lea (tmptext,NodeBase),a1 + move.l a0,d1 + move.l a1,d2 + move.l (dosbase),a6 + jsrlib Rename + move.l (exebase),a6 + lea (diskerrortext),a0 + tst.l d0 + beq.b 8$ + move.l (Infomsgnr,a2),d0 ; info melding ? + beq.b 9$ ; nei, ferdig + + lea (tmpmsgheader,NodeBase),a2 ; henter inn meldings headeren + move.l a2,a0 + move.w #6,d1 ; fileinfo conf + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 8$ ; error + + move.l a3,a0 ; bygger opp nytt subject, + lea (tmptext,NodeBase),a1 + jsr (strcopy) + move.b #' ',(-1,a1) + + lea (Subject,a2),a0 + moveq.l #Sizeof_NameT,d0 +2$ subq.l #1,d0 + beq.b 1$ ; ferdig + move.b (a0)+,d1 + beq.b 1$ ; ferdig + cmpi.b #'(',d1 + bne.b 2$ + subq.l #1,a0 + jsr (strcopy) + + lea (tmptext,NodeBase),a0 + lea (Subject,a2),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + + move.l a2,a0 ; lagrer header'en igjen + move.w #6,d0 ; fileinfo conf + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 8$ ; error + +1$ lea (filerenamedtext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2/a3/d2/d3 + rts + +;#c +invite jsr (checksysopaccess) + beq 9$ + lea (enteruserntext),a0 + moveq.l #1,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + bne.b 2$ + move.b (readcharstatus,NodeBase),d1 + bne 9$ +2$ moveq.l #-1,d1 ; Fikk vi ALL ??? + cmp.l d1,d0 + bne.b 1$ ; Ikke ALL + lea (sureinviteatext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq 9$ + lea (10$),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (u_almostendsave,a1),a1 + move.w (confnr,NodeBase),d0 + mulu #Userconf_seizeof/2,d0 + lea (uc_Access,a1,d0.l),a1 + jsr (doallusers) + bne 9$ + lea (userrecupdatext),a0 + jsr (writetexto) + bra 9$ + +1$ move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 7$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ +7$ move.l (Tmpusermem,NodeBase),a1 + lea (u_almostendsave,a1),a1 + move.w (confnr,NodeBase),d0 + mulu #Userconf_seizeof/2,d0 + lea (uc_Access,a1,d0.l),a1 + move.w (a1),d1 ; Er brukeren allerede medlem ? + lea (alreamembertext),a0 + andi.b #ACCF_Read,d1 + bne.b 8$ ; ja. Skriv melding om det + bset #ACCB_Invited,d1 + move.w d1,(a1) ; setter invite bit'et i denne konf'en + move.l (Tmpusermem,NodeBase),a1 + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userrecupdatext),a0 +8$ jsr (writetexto) +9$ rts + +10$ move.w (a0),d0 + btst #ACCB_Read,d0 ; Er denne brukeren medlem ? + bne.b 19$ ; ja + bset #ACCB_Invited,d0 + move.w d0,(a0) ; Da setter vi invite bit'et +19$ setz ; ta og lager forandringen + clrn + rts + +;#c +czapfile + moveq.l #1,d0 ; vi er CZap + bra.b zapfile1 +zapfile + moveq.l #0,d0 +zapfile1 + push a2/a3/d2/d3/d4 + moveq.l #0,d3 ; har ikke gjort noe enda + move.l d0,d4 ; husker om vi er CZap + jsr (checksysopaccess) + beq 9$ + lea (retracfnametext),a0 + jsr (readlineprompt) + beq 9$ + move.l a0,a3 + jsr (checkfilename) + beq 9$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + jsr (findfileinfo) + lea (filenotfountext),a0 + beq 8$ + move.l d0,d2 + lea (maintmptext,NodeBase),a1 + move.l a3,a0 + jsr (buildfilepath) + lea (tmpfileentry,NodeBase),a0 + jsr (allowretract) + lea (filenotfountext),a0 + beq 8$ + lea (remfilfflistext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq 2$ ; nei, ferdig + + move.l a2,a0 + move.l (msg,NodeBase),a1 + move.l (m_UserNr,a1),d0 + move.l d2,d1 + bsr deletefilefromabbs + beq 8$ + moveq.l #1,d3 ; har gjort noe nå + tst.l d4 ; er vi CZap ? + beq.b 2$ ; nope + move.l (Uploader,a2),d0 + move.l (Tmpusermem,NodeBase),a3 + move.l a3,a0 + jsr (loadusernr) + lea (usernotfountext),a0 + beq.b 8$ + subq.w #1,(Uploaded,a3) ; Oppdaterer Uploaded telleren + bcc.b 3$ + move.w #0,(Uploaded,a3) ; ingen underflow.. +3$ move.l (Fsize,a2),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + sub.l d0,(KbUploaded,a3) + bcc.b 4$ + moveq.l #0,d0 + move.l d0,(KbUploaded,a3) ; ikke her heller +4$ move.l a3,a0 + move.l (Usernr,a0),d0 + jsr (saveusernr) + lea (saveusererrtext),a0 + beq.b 8$ + +2$ tst.b (readcharstatus,NodeBase) + bne.b 9$ + lea (remfilfdisktext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 1$ ; nei, ferdig + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DeleteFile + move.l (exebase),a6 + moveq.l #1,d3 ; har gjort noe nå +1$ tst.l d3 + beq.b 9$ ; har ikke gjort noe, ikke skriv + lea (fileretracetext),a0 + jsr (writetexto) + bra.b 9$ +8$ jsr (writeerroro) +9$ pop a2/a3/d2/d3/d4 + rts + +; a0 = fileentry +; d0 = filepos +; d1 = filedir +deletefilefromabbs + push a2/d2/a3 + move.l a0,a2 + ori.w #FILESTATUSF_Fileremoved,(Filestatus,a2) + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l d0,(m_arg,a1) ; filpos. + move.l d1,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (errsavefilhtext),a0 + notz + beq.b 9$ + + move.l (Infomsgnr,a2),d0 ; filinfo ? + beq.b 8$ ; nei, ferdig ? + moveq.l #6,d2 ; fileinfo conf + move.w (Filestatus,a2),d1 ; er den pu til en conf ? + btst #FILESTATUSB_PrivateConfUL,d1 + beq.b 2$ ; nei + move.l (PrivateULto,a2),d2 ; ja, da er den ikke i fileinfo conf +2$ move.l d2,d1 + lea (tmpmsgheader,NodeBase),a3 + move.l a3,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 1$ + move.b (MsgStatus,a3),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + bne.b 8$ ; allerede drept + move.l a3,a0 + bsr killmsgwhodidit + or.b d0,(MsgStatus,a3) + move.l a3,a0 + move.w d2,d0 ; file info konfnr + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + beq.b 8$ +1$ jsr (writeerroro) + setz + bra.b 9$ +8$ clrz +9$ pop a2/d2/a3 + rts + +;#c +modifyfile + push a3/a2/d2 +1$ lea (modifyfnametext),a0 + jsr (readlineprompt) + beq 9$ + move.l a0,a3 + jsr (checkfilename) + beq.b 1$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + jsr (findfileinfo) + bne.b 2$ +3$ lea (filenotfountext),a0 +12$ jsr (writeerroro) + bra 9$ +2$ move.l d0,d2 ; husker fil dir'en. + move.l a2,a0 + jsr (allowtypefileinfo) + beq.b 3$ + cmpi.w #20,(menunr,NodeBase) ; er vi i sigopmeny ? + bne.b 11$ ; Nope. alt ok + lea (youarenottext),a0 ; Sier ifra at sigop ikke har lov + move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_PrivateConfUL,d0 ; private til conf ? + beq.b 12$ ; Nei, da har han ikke lov + move.l (PrivateULto,a2),d0 + lea (u_almostendsave+CU,NodeBase),a1 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a1),d0 ; Henter conf access + btst #ACCB_Read,d0 ; er vi medlem ? + beq.b 12$ ; nope + andi.b #ACCF_Sigop,d0 ; sigop ? + beq.b 12$ ; nope +11$ lea (maintmptext,NodeBase),a1 + move.l d2,d0 + move.l a3,a0 + jsr (buildfilepath) + lea (maintmptext,NodeBase),a0 + jsr (getfilelen) + lea (filenotavaltext),a0 + beq.b 12$ + move.l d0,(Fsize,a2) ; opdaterer fsize + + move.w (Filestatus,a2),d0 ; er den privat til en person ? + andi.w #FILESTATUSF_PrivateUL,d0 + bne.b 8$ ; jepp. da kan vi ikke ha til conf + + lea (fileprivtcotext),a0 + lea (tmptext,NodeBase),a1 + jsr (strcopy) + subq.l #1,a1 + lea (kolonspacetext),a0 + jsr (strcopy) + lea (tmptext,NodeBase),a0 + + lea (nulltext),a1 + move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_PrivateConfUL,d0 + beq.b 5$ + move.l (PrivateULto,a2),d0 + lea (n_FirstConference+CStr,MainBase),a1 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a1,d0.l),a1 ; Har konferanse navnet. +5$ moveq.l #Sizeof_NameT,d0 + jsr (mayedlineprompt) + bne.b 6$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + andi.w #~FILESTATUSF_PrivateConfUL,(Filestatus,a2) + moveq.l #0,d0 + bra.b 7$ + +6$ bsr getconfnamesub + beq 9$ + ori.w #FILESTATUSF_PrivateConfUL,(Filestatus,a2) + andi.l #$ffff,d0 +7$ move.l d0,(PrivateULto,a2) + +8$ lea (touchfdatetext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 4$ + lea (ULdate,a2),a0 ; opdaterer dato + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 +4$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ + + tst.b (readlinemore,NodeBase) ; mere input ? + bne.b 10$ ; ja, kutt utskrift + jsr (outimage) + lea (pleaseentfdtext),a0 + jsr (strlen) + lea (spacetext),a0 + jsr (writetextlen) + moveq.l #0,d0 + move.w #Sizeof_FileDescription,d0 + lea (bordertext),a0 + jsr (writetextlen) + move.b #'>',d0 + jsr (writechar) + jsr (outimage) +10$ + lea (Filedescription,a2),a1 ; Gammel tekst + lea (pleaseentfdtext),a0 ; Prompt + move.w #Sizeof_FileDescription,d0 ; Lengden + jsr (mayedlinepromptfull) + beq 9$ + lea (Filedescription,a2),a1 + move.w #Sizeof_FileDescription,d0 + jsr (strcopymaxlen) + + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + lea (Filedescription,a2),a0 + push a6/d2 + move.l a0,d2 + move.l dosbase,a6 + jsrlib SetComment ; prøver å sette description som file comment. + pop a6/d2 + + andi.w #~FILESTATUSF_FreeDL,(Filestatus,a2) ; av med Free DL. + lea (filefreedltext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 13$ + ori.w #FILESTATUSF_FreeDL,(Filestatus,a2) + +13$ move.l (msg,NodeBase),a1 ; updater gammel filinfo. + move.w #Main_savefileentry,(m_Command,a1) + move.l (m_UserNr,a1),(m_arg,a1) ; filpos. + move.l d2,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 9$ + lea (filemodifydtext),a0 + jsr (writetexto) +9$ pop a3/a2/d2 + rts + +;#c +listcallerslog + jsr (checksysopaccess) + beq.b 9$ + lea (nodenrtext),a0 ; legge inn (CR for ) FIX ME + jsr (readlineprompt) + beq.b 9$ + jsr (atoi) + bmi.b 9$ + lea (maintmptext,NodeBase),a1 + lea (logfilenameo),a0 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 + bsr typelogfile +9$ rts + +; a0 - filename +typelogfile + push a6/d2/d3/d4/d5/d6/a2 + move.l (dosbase),a6 + moveq.l #70,d6 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 9$ + moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + move.l d4,d1 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + beq 8$ + move.l d4,d1 ; Hvor lang er fila ? + move.l d6,d2 ; (og plaserer oss klar for første read) + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 8$ + move.l d0,d5 + sub.l d6,d5 + bcs.b 8$ ; ferdig + bra.b 2$ +1$ sub.l d6,d5 + bcs.b 8$ ; ferdig + move.l d4,d1 ; søker tilbake + move.l d6,d2 + add.l d2,d2 ; to linjer (den vi har lest.. + neg.l d2 + moveq.l #OFFSET_CURRENT,d3 ; .. og den vi skal lese) + jsrlib Seek + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 8$ +2$ move.l d4,d1 + lea (tmptext,NodeBase),a0 + move.l a0,d2 + move.l d6,d3 + jsrlib Read + cmp.l d0,d3 + bne.b 8$ + move.l (exebase),a6 + lea (tmptext,NodeBase),a0 + move.l a0,a1 + adda.l d6,a1 + move.b #0,-(a1) ; fjerner nl'en +3$ cmpi.b #' ',-(a1) + beq.b 3$ + cmpa.l a0,a1 + bcc.b 4$ + move.l a0,a1 + subq.l #1,a1 +4$ move.b #10,(1,a1) + move.b #0,(2,a1) + jsr (writetexti) + beq.b 7$ + jsr (testbreak) + beq.b 7$ + move.l (dosbase),a6 + bra.b 1$ +7$ move.l (dosbase),a6 +8$ move.l d4,d1 + jsrlib Close +9$ pop a6/d2/d3/d4/d5/d6/a2 + rts + +;#c +deletelogfile + jsr (checksysopaccess) + beq 9$ + lea (nodenrtext),a0 ; legge inn (CR for ) + jsr (readlineprompt) + beq.b 9$ + jsr (atoi) + bmi.b 9$ + lea (maintmptext,NodeBase),a1 + lea (logfilenameo),a0 + jsr (fillinnodenr) + lea (suredellogtext),a0 ; spør om han virkelig vil slette + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + move.l (dosbase),a6 + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + jsrlib DeleteFile + move.l (exebase),a6 + tst.l d0 + beq.b 9$ ; klarte ikke slette. + lea (logdeletedtext),a0 + jsr (writetexto) + lea (logdeletedtext+1),a0 + jsr (writelogtexttime) +9$ rts + +;#c +boot jsr (checksysopaccess) + beq 9$ + lea (surewtobootext),a0 ; spør om han virkelig vil boote + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + lea (logboottext),a0 + jsr (writelogtexttime) + lea (bootingsysttext),a0 + jsr (writetexti) + moveq.l #3,d0 ; venter 3 sek + jsr (waitsecs) + jmplib ColdReboot +9$ rts + +;#c +mem push d2-d7/a2/a3 + jsr (checksysopaccess) + beq 9$ + lea (memheadertext),a0 + jsr (writetexti) + beq 9$ + moveq.l #0,d2 + moveq.l #0,d3 + moveq.l #0,d4 + moveq.l #0,d5 + lea (mem1text),a0 ; chip + moveq.l #MEMF_CHIP,d6 + bsr 10$ + lea (mem2text),a0 ; fast + moveq.l #MEMF_FAST,d6 + bsr 10$ + lea (mem3text),a0 ; total + jsr (writetext) + move.l d2,d0 + moveq.l #10,d1 + jsr (skrivnrrfill) + move.l d3,d0 + moveq.l #10,d1 + jsr (skrivnrrfill) + move.l d4,d0 + moveq.l #10,d1 + jsr (skrivnrrfill) + move.l d5,d0 + moveq.l #10,d1 + jsr (skrivnrrfill) + jsr (outimage) + beq 9$ + jsr (outimage) + beq 9$ + +; tst.w _2.0 ; Kjører vi 2.0 ? +; beq.b 4$ ; Nei. +; move.l dosbase,a6 ; låser dos list'a. +; moveq.l #LDF_VOLUMES,d1 +; jsrlib LockDosList +; move.l d0,d3 ; husker list'a +; bra.b 5$ +4$ jsrlib Forbid +5$ + move.l (dosbase),a0 ; scan'er igjennom alle + move.l (dl_Root,a0),a2 + move.l (rn_Info,a2),d0 + lsl.l #2,d0 + move.l d0,a2 + move.l (di_DevInfo,a2),d0 ; devinfo'ene + moveq.l #0,d2 ; antall vi har funnet + move.l (tmpmsgmem,NodeBase),a3 ; stedet å oppevare navnene i + +1$ lsl.l #2,d0 ; scan'er alle volums, og husker + move.l d0,a2 ; navnet + beq.b 6$ + move.l (dl_Type,a2),d0 ; device ? + moveq.l #DLT_VOLUME,d1 + cmp.l d0,d1 + bne.b 2$ ; nope + move.l (dl_Name,a2),d0 + lsl.l #2,d0 + move.l d0,a0 + moveq.l #0,d0 + move.b (a0)+,d0 + move.l a3,a1 + jsr (strcopylen) + move.b #':',(a1)+ + move.b #0,(a1)+ + move.l a1,a3 + addq.l #1,d2 ; øker antallet vi har funnet +2$ move.l (dl_Next,a2),d0 + bne.b 1$ + +6$; tst.w (_2.0) ; Kjører vi 2.0 ? +; beq.b 61$ ; Nei. +;611$ moveq.l #LDF_VOLUMES,d1 +; jsrlib UnLockDosList ; låser opp dos list'a. +; move.l exebase,a6 +; bra.b 62$ +61$ jsrlib Permit +62$ + move.l (tmpmsgmem,NodeBase),a3 ; stedet vi oppevarte navnene i +63$ subq.l #1,d2 + bcs.b 8$ ; ferdig + move.l a3,a0 + moveq.l #20,d0 + jsr (writetextlfill) + move.l a3,a0 + jsr (getdiskfree) + lea (diskerrortext),a0 + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 3$ + jsr (skrivnr) + lea (kbtext),a0 +3$ jsr (writetext) + jsr (outimage) +31$ move.b (a3)+,d0 ; scan'er til starten av neste + bne.b 31$ ; navn + bra.b 63$ ; and here we go again. + +8$ jsr (outimage) +9$ pop d2-d7/a2/a3 + rts +10$ move.l d5,-(a7) + jsr (writetext) + move.l d6,d1 ; finner ledig + jsrlib AvailMem + add.l d0,d2 + move.l d0,d5 ; husker ledig + moveq.l #10,d1 + jsr (skrivnrrfill) + moveq.l #0,d0 + move.l d6,d1 ; finner total + ori.l #MEMF_TOTAL,d1 + jsrlib AvailMem + move.l d0,d7 ; husker total + beq.b 12$ + sub.l d5,d0 ; beregner i bruk + add.l d0,d3 +12$ moveq.l #10,d1 + jsr (skrivnrrfill) + move.l d7,d0 ; max .. + add.l d0,d4 + moveq.l #10,d1 + jsr (skrivnrrfill) + ori.l #MEMF_LARGEST,d6 + move.l d6,d1 + jsrlib AvailMem + move.l (a7)+,d5 + add.l d0,d5 + moveq.l #10,d1 + jmp (skrivnrrfill) + +;#c ! A +acceschange + push d2/d7/a2-a3 + jsr (checksysopaccess) + beq 9$ + move.l (Tmpusermem,NodeBase),a3 ; Setter opp a3 til å + lea (u_almostendsave+CU,NodeBase),a3 + move.w (confnr,NodeBase),d0 + mulu #Userconf_seizeof/2,d0 + add.l d0,a3 ; peke på access området + lea (enteruserntext),a0 + moveq.l #1,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 9$ ; hopper over bare return her + moveq.l #-1,d1 ; Fikk vi ALL ??? + cmp.l d1,d0 + bne 2$ ; Ikke ALL + lea (newacctext),a0 + jsr (writetexti) + moveq.l #7,d0 + jsr (getline) + bne.b 12$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + lea (nulltext),a0 +12$ moveq.l #0,d0 ; sjekk på Z bit'et + bsr parseaccessbits ; Parser svaret. + beq 9$ ; error + lea (newacctext),a0 + jsr (writetext) + lea (accessbitstext),a2 + move.l d7,d0 + lea (tmptext,NodeBase),a0 + bsr getaccstring + jsr (writetexto) + lea (suregivenatext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq 9$ + move.l a3,a1 + lea (acceschangelooprutine),a0 + move.l d7,d0 + jsr (doallusers) + bne 9$ + lea (userrecupdatext),a0 + jsr (writetexto) + bra 9$ + +2$ move.l (Tmpusermem,NodeBase),a0 ; bare en bruker. + jsr (loadusernr) + bne.b 6$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ +6$ move.w (uc_Access,a3),d7 ; henter ut tidligere access + + move.l (Tmpusermem,NodeBase),a3 ; Valgt bruker i a3 + lea (u_almostendsave,a3),a3 + move.w (confnr,NodeBase),d2 + mulu #Userconf_seizeof/2,d2 + add.l d2,a3 + move.w (uc_Access,a3),d0 ; valgte brukers access i d0 + + cmpi.w #20,(menunr,NodeBase) ; Sigop menu ?? + bne.b 11$ ; nei ! + move.l d0,d1 ; bruker d1 her + andi.w #ACCF_Sysop|ACCF_Sigop,d1 ; Vil sigop forandre en annen sigop/sysop ? + beq.b 11$ ; Nei. + lea (youarenottext),a0 ; Sier ifra at sigop ikke har lov + jsr (writeerroro) + bra 9$ + +11$ lea (tmptext,NodeBase),a0 + jsr (getaccbittext) ; d0 = access, a0 = string + move.l a0,a1 + cmpi.w #20,(menunr,NodeBase) ; Sigop menu? + bne.b 14$ ; nei! + lea (sigopaccesstypetext),a0 ; ja + moveq.l #6,d0 + bra.b 15$ +14$ lea (accesstypetext),a0 + moveq.l #8,d0 +15$ jsr (mayedlineprompt) + bne.b 13$ + tst.b (readcharstatus,NodeBase) + bne.b 9$ + lea (nulltext),a0 +13$ moveq.l #0,d0 ; sjekk på Z bit'et + bsr parseaccessbits + beq.b 9$ + move.w d7,(uc_Access,a3) + + move.l (Tmpusermem,NodeBase),a1 + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userrecupdatext),a0 + jsr (writetexto) +9$ pop d2/d7/a2-a3 + rts + +; d0 = 0, sjekk om vedkommende kan sette Z bit'et +; legger det i d7.. +parseaccessbits + bsr parseaccessbitssub + bne.b 9$ + lea (invalidacctext),a0 + jsr (writeerroro) + setz +9$ rts + +parseaccessbitssub + move.l d0,d1 + moveq #0,d7 ; parser in linja. + jsr (upword) + +4$ move.b (a0)+,d0 + beq 8$ + + cmpi.b #'R',d0 + bne.b 41$ + bset #ACCB_Read,d7 + bra.b 4$ + +41$ cmpi.b #'W',d0 + bne.b 42$ + bset #ACCB_Write,d7 + bra.b 4$ + +42$ cmpi.b #'U',d0 + bne.b 43$ + bset #ACCB_Upload,d7 + bra.b 4$ + +43$ cmpi.b #'D',d0 + bne.b 44$ + bset #ACCB_Download,d7 + bra.b 4$ + +44$ cmpi.b #'F',d0 + bne.b 47$ + bset #ACCB_FileVIP,d7 + bra.b 4$ + +47$ cmpi.b #'I',d0 + bne.b 45$ + bset #ACCB_Invited,d7 + bra.b 4$ + +45$ cmpi.b #'S',d0 + bne.b 46$ + tst.b d1 + bne.b 2$ + cmpi.w #20,(menunr,NodeBase) ; Sigop menu ?? + beq.b 4$ ; ja + cmpi.w #40,(menunr,NodeBase) ; Sigop user maintanance menu ? + beq.b 4$ ; ja +2$ bset #ACCB_Sigop,d7 + bra.b 4$ + +46$ cmpi.b #'Z',d0 + bne.b 5$ + tst.b d1 + bne.b 3$ + move.l (Usernr+CU,NodeBase),d0 ; Bare virkelige sysop'en kan + cmp.l (SYSOPUsernr+CStr,MainBase),d0 ; gi andre sysop access. + bne 4$ +3$ bset #ACCB_Sysop,d7 + bra 4$ + +5$ clrz +8$ notz + rts + +; får buffer adresse i a1 +acceschangelooprutine + move.l (Usernr,a1),d1 ; Er dette sysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d1 + beq.b 1$ ; Vi forandrer ikke på sysop + cmpi.w #20,(menunr,NodeBase) ; Sigop menu ?? + bne.b 2$ ; nei + move.w (uc_Access,a0),d1 ; Vil sigop forandre en annen sigop/sysop ? + andi.b #ACCF_Sysop|ACCF_Sigop,d1 + bne.b 1$ ; Ja, fy! +2$ move.w d0,(uc_Access,a0) +1$ setz ; ta og lager forandringen + clrn ; ikke avbryt + rts + +;#c +conferenceinstall + push a2/d2 + jsr (checksysopaccess) + beq 9$ + move.w (ActiveConf+CStr,MainBase),d0 + cmp.w (Maxconferences+CStr,MainBase),d0 + bcc 8$ + lea (confnametxt),a0 + move.w #Sizeof_NameT-2,d0 ; amigados klarer ikke mere + lea (nulltext),a1 + jsr (mayedlinepromptfull) ; en 30 tegn i filnavnet + beq 9$ + jsr (removespaces) + beq 9$ + lea (maintmptext,NodeBase),a1 + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + jsr (testconfname) + lea (illconfnatext),a0 + beq 7$ + lea (maintmptext,NodeBase),a0 + jsr (findconferencefull) + lea (confsamenametxt),a0 + bne 7$ + lea (econfstatustext),a0 + jsr (readlineprompt) + beq 9$ + bsr parseconfaccsesbits + beq.b 9$ + lea (maintmptext,NodeBase),a0 + move.l (msg,NodeBase),a1 + move.w #Main_createconference,(m_Command,a1) + move.l d0,(m_Data,a1) + move.l a0,(m_Name,a1) + move.l a0,a2 ; Husker conf navnet... + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (ninstalconftext),a0 + bne.b 7$ + lea (confinstedtext),a0 + jsr (writetexto) + move.l a2,a0 + jsr (_Make_conf_text) ; CI JEO text + bra.b 9$ +8$ lea (sorrymaxconftxt),a0 + jsr (writetext) + move.w (Maxconferences+CStr,MainBase),d0 + jsr (skrivnrw) + lea (conferencestext),a0 +7$ jsr (writeerroro) +9$ pop a2/d2 + rts + +;#c +deletedir + push a2/d2 + jsr (checksysopaccess) + beq 9$ + lea (dirnametext),a0 + jsr (readlineprompt) + beq 9$ + jsr (finddir) + lea (dirnotfoundtext),a0 + beq 8$ + moveq.l #0,d2 + lsr.w #1,d0 + move.w d0,d2 + cmp.w #1,d2 ; slette + lea (youarenottext),a0 ; Nei, skriver ut fy melding + bls.b 8$ + move.l (firstFileDirRecord+CStr,MainBase),a2 + mulu.w #FileDirRecord_SIZEOF,d0 + adda.l d0,a2 + jsr (outimage) + move.l a2,a0 + jsr (writetexto) + lea (suredeldirtext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + move.l (msg,NodeBase),a1 + move.w #Main_DeleteDir,(m_Command,a1) + move.l d2,(m_UserNr,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (dirdeletedtext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop a2/d2 + rts + +;#c +renamedir + push a2/d2 + jsr (checksysopaccess) + beq 9$ + lea (dirnametext),a0 + jsr (readlineprompt) + beq 9$ + jsr (finddir) + lea (dirnotfoundtext),a0 + beq 8$ + moveq.l #0,d2 + lsr.w #1,d0 + move.w d0,d2 + jsr (outimage) + beq 9$ + lea (newnametext),a0 + jsr (readlineprompt) + beq 9$ + lea (tmptext,NodeBase),a2 + move.l a2,a1 + jsr (strcopy) ; kopierer i sikkerhet + move.l a2,a0 + jsr (strlen) ; sjekker lengden (maks 27) + moveq.l #27,d1 + cmp.w d1,d0 + lea (nametolong2text),a0 + bhi 8$ + move.l a2,a0 + jsr (finddirfull) + lea (dirssamenametxt),a0 + bne 8$ + jsr (outimage) + beq 9$ + move.l (firstFileDirRecord+CStr,MainBase),a0 + move.w d2,d0 + mulu.w #FileDirRecord_SIZEOF,d0 + adda.l d0,a0 + jsr (writetext) + lea (arrowrtext),a0 + jsr (writetext) + move.l a2,a0 + jsr (writetexti) + lea (oktochangentext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + move.l (msg,NodeBase),a1 + move.w #Main_RenameDir,(m_Command,a1) + move.l d2,(m_UserNr,a1) + move.l a2,(m_Name,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (dirrenamedtext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop a2/d2 + rts + +cleanconference + push a2/d2 + jsr (checksysopaccess) + beq 9$ + lea (confnametxt),a0 + bsr getconfname + beq 9$ + moveq.l #0,d2 + lsr.w #1,d0 + move.w d0,d2 + cmp.w #2,d0 ; nekter på fileinfo og userinfo.. (problemer...) + lea (youarenottext),a0 ; Nei, skriver ut fy melding + beq 8$ + cmp.w #3,d0 + beq 8$ + lea (n_ConfName+n_FirstConference+CStr,MainBase),a2 + mulu.w #ConferenceRecord_SIZEOF,d0 + adda.l d0,a2 + jsr (outimage) + move.l a2,a0 + jsr (writetexto) + lea (sureclconftext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + move.l (msg,NodeBase),a1 + move.w #Main_CleanConference,(m_Command,a1) + move.l (Tmpusermem,NodeBase),a0 + move.l a0,(m_Data,a1) + move.l d2,(m_UserNr,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + move.w d2,d0 + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + moveq.l #0,d1 + move.l d1,(uc_LastRead,a0,d0.l) ; sletter last read + move.w (confnr,NodeBase),d0 ; er vi i den conf'en vi clean'a ? + lsr.w #1,d0 + cmp.w d0,d2 + bne.b 1$ ; nei + moveq.l #0,d0 ; tar en M R + move.l d0,(msgqueue,NodeBase) + move.l d0,(HighMsgQueue,NodeBase) ; virkelig +1$ lea (confcleanedtext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop a2/d2 + rts + +;#c DELCONF +conferencedelete + push a2/d2 + jsr (checksysopaccess) + beq 9$ + lea (confnametxt),a0 ; 'Conference name: ' + bsr getconfname + beq 9$ + moveq.l #0,d2 + lsr.w #1,d0 + move.w d0,d2 + cmp.w #3,d2 + lea (youarenottext),a0 ; Nei, skriver ut fy melding + bls 8$ + lea (n_ConfName+n_FirstConference+CStr,MainBase),a2 + mulu.w #ConferenceRecord_SIZEOF,d0 + adda.l d0,a2 + jsr (outimage) + move.l a2,a0 + jsr (writetexto) + lea (suredelconftext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut +; MESSAGE + move.l (msg,NodeBase),a1 + move.w #Main_DeleteConference,(m_Command,a1) + move.l (Tmpusermem,NodeBase),a0 + move.l a0,(m_Data,a1) + move.l d2,(m_UserNr,a1) + jsr (handlemsg) + + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (u_almostendsave+CU,NodeBase),a0 + move.w d2,d0 + mulu #Userconf_seizeof,d0 + moveq.l #0,d1 + move.w d1,(uc_Access,a0,d0.l) ; sletter aksessen til brukeren + move.l d1,(uc_LastRead,a0,d0.l) ; sletter last read + lea (confdeletedtext),a0 + jsr (writetexto) + move.w (confnr,NodeBase),d0 ; er vi i den conf'en vi sletta ? + lsr.w #1,d0 + cmp.w d0,d2 + bne.b 9$ ; nei + move.w #0,d0 ; ja, da joiner vi news + bsr joinnr + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop a2/d2 + rts + +;#c +conferencerename + push a2/d2/d3/a3 + jsr (checksysopaccess) + beq 9$ + moveq.l #0,d3 ; skal ikke forandre bits foreløpig + lea (confnametxt),a0 + bsr getconfname + beq 9$ + moveq.l #0,d2 + lsr.w #1,d0 + move.w d0,d2 ; husker confnr'et + lea (newnametext),a0 + jsr (readlineprompt) + beq 9$ + lea (tmptext,NodeBase),a2 + move.l a2,a1 + jsr (strcopy) ; kopierer i sikkerhet + move.l a2,a0 + jsr (testconfname) + lea (illconfnatext),a0 + beq 8$ + move.l a2,a0 + jsr (strlen) ; sjekker lengden (maks 28) + moveq.l #28,d1 + cmp.w d1,d0 + lea (nametolong2text),a0 + bhi 8$ + move.l a2,a0 + jsr (findconferencefull) + beq.b 2$ ; fant ikke. ok + lsr.w #1,d0 + cmp.w d0,d2 + lea (confsamenametxt),a0 + bne 8$ ; forskjellige, feil + cmpi.w #4,d2 ; kan man forandre bits her ? + bcs.b 2$ ; nei, dette er news,post,u/finfo + lea (n_FirstConference+CStr,MainBase),a3 + move.w d2,d0 + mulu #ConferenceRecord_SIZEOF,d0 + add.l d0,a3 + move.w (n_ConfSW,a3),d0 + lea (maintmptext,NodeBase),a0 + jsr (confbitstotext) + lea (econfstatustext),a0 + lea (maintmptext,NodeBase),a1 + moveq.l #30,d0 + jsr (mayedlineprompt) + beq 9$ + bsr parseconfaccsesbits + beq 9$ + move.l d0,d3 +2$ jsr (outimage) + beq 9$ + lea (n_ConfName+n_FirstConference+CStr,MainBase),a0 + move.w d2,d0 + mulu.w #ConferenceRecord_SIZEOF,d0 + adda.l d0,a0 + lea (tmptext2,NodeBase),a1 ; husker det gamle navnet + jsr (strcopy) + lea (tmptext2,NodeBase),a0 + jsr (writetext) + lea (arrowrtext),a0 + jsr (writetext) + move.l a2,a0 + jsr (writetexti) + lea (oktochangentext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; nei, hopper ut + move.l (msg,NodeBase),a1 + move.w #Main_RenameConference,(m_Command,a1) + move.l d2,(m_UserNr,a1) + move.l a2,(m_Name,a1) + move.l d3,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + move.w d2,d0 ; confnr + lea (tmptext2,NodeBase),a0 ; old name + jsr (renameconfbulletins) + beq.b 7$ + lea (confrenamedtext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop a2/d2/d3/a3 + rts + +parseconfaccsesbits + push d2/d3 + jsr (upword) ; Store bokstaver + moveq.l #0,d0 +1$ move.b (a0)+,d1 + beq.b 9$ ; ferdig + moveq.l #1,d2 + lea (confacsbitstext),a1 + bra.b 3$ +2$ lsl.l #1,d2 +3$ move.b (a1)+,d3 + beq.b 4$ + cmp.b d3,d1 + bne.b 2$ +; IFNE sn-13 +; cmp.b #'N',d1 +; beq.b 4$ +; ENDC + or.l d2,d0 + bra.b 1$ ; tar neste bit + +4$ move.w d1,-(sp) + lea (unownstatusbtxt),a0 + jsr (writeerror) + move.w (sp)+,d0 + jsr (writechar) + jsr (outimage) + clrz + +9$ notz + pop d2/d3 + rts + +;#c +showuser1 + clrz + bra.b showuser2 +showuser + jsr (checksysopaccess) +showuser2 + beq 9$ +1$ lea (enteruserntext),a0 + moveq.l #2,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 9$ + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 4$ + lea (wantdetlisttext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + lea (30$),a0 ; detailed funksjon + bne.b 3$ ; ja, vi vill ha detailed list + move.b (readcharstatus,NodeBase),d0 + bne.b 9$ + lea (40$),a0 ; ikke detailed +3$ jsr (doallusers) + bra.b 9$ + +4$ move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 2$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra.b 1$ +2$ move.l (SYSOPUsernr+CStr,MainBase),d0 ; er det super sysop ? + move.l (Tmpusermem,NodeBase),a0 + move.l (Usernr,a0),d1 + cmp.l d1,d0 + bne.b 7$ ; nei + cmp.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + beq.b 7$ ; alt ok. + lea (nosysopheretext),a0 + jsr (writeerroro) + bra.b 9$ + +7$ jsr (outimage) + move.l (Tmpusermem,NodeBase),a0 + bsr.b 10$ ; skriver ut header. + + cmpi.w #20,(menunr,NodeBase) ; Er vi i Sigop menu ??? + bne.b 5$ ; Nei, hopp. + move.w #40,(menunr,NodeBase) ; Skifter til Sigop user maintanance menu + bra.b 6$ +5$ move.w #36,(menunr,NodeBase) ; Skifter til User maintanance menu +6$ move.b #1,(noglobal,NodeBase) +9$ rts + +10$ move.l a2,-(a7) + move.l a0,a2 + lea (20$),a0 + moveq.l #0,d0 + bsr doshowuser + move.l (a7)+,a2 + rts + +20$ jmp (writetexto) + +30$ move.l a1,a0 ; detailed info + bsr.b 10$ + bne.b 31$ +32$ setn + bra.b 39$ +31$ jsr (outimage) + beq.b 32$ + clrn +39$ clrz + rts + +40$ move.l a2,-(a7) + move.l a1,a2 +41$ jsr (testbreak) + beq.b 43$ + lea (Name,a2),a0 + lea (maintmptext,NodeBase),a1 + jsr (strcopy) + move.w (Userbits,a2),d0 + andi.w #USERF_Killed,d0 ; Er han død ? + beq.b 42$ ; nei. + subq.l #1,a1 ; slenger på R.I.P + lea (deadtext),a0 + jsr (strcopy) +42$ lea (maintmptext,NodeBase),a0 + moveq.l #36,d0 + jsr (writetextlfill) + lea (LastAccess,a2),a0 +; jsr (writedate) + jsr (writetime) + jsr (outimage) + bne.b 44$ +43$ clrz + setn + bra.b 49$ +44$ clrzn +49$ move.l (a7)+,a2 + rts + +menu_showuser + push a2 + move.l (Name+CU,NodeBase),d0 + beq.b 9$ + move.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 9$ ; Jepp, da nekter vi + lea (u_almostendsave+CU,NodeBase),a0 + move.w (confnr,NodeBase),d0 + cmpi.w #-1,d0 ; har vi konf ? + beq.b 1$ ; nei + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Sysop,d0 ; har bruker sysop access ?? + bne.b 9$ ; Ja, nekter +1$ move.w (uc_Access,a0),d0 ; sjekker også for news confen + btst #ACCB_Sysop,d0 + bne.b 9$ + jsr (newconline) ; kommer opp + lea (CU,NodeBase),a2 + lea (10$),a0 + moveq.l #1,d0 + bsr doshowuser +9$ pop a2 + rts + +10$ jsr (writecontext) + jsr (newconline) + clrz + rts + +;GEIR INGE Home: 276488 Passwd: ???? ok +;Oppsal Toppen 23a Work: 277176 Uploads: 14 ok +;0687 OSLO 6 (A3000) Times On: 142 D'loads: 38 ok +;Time: 0 /14 File: 0 /1 Last On: 18th June, 1991 at 19:52 ok +;Page:0 Prot:Z Menu:N ANSI:Y FSE:Y Term:A Chrs:IBN Ovl:N menu ? ovl ? +;RCol:Y G&R:Y Filt:Y Lang: Colr:Y Cshw:Y MFL:0 +;Download tot=2870kb, period=1076kb, Script: +;Messages read=2642, messages dumped=730, messages entered=208 ok +;Gen/Fileinfo access: R Last Read : 908, Gen/Main access: RWUD ok + +; a0 - utskrifts funksjon +; d0 - vis passord +; brukeren som skal vises ligger i a2 +doshowuser + move.l a3,-(a7) + move.l a0,a3 + bsr 100$ + jsr (a3) + beq.b 9$ + bsr 200$ + jsr (a3) + beq.b 9$ + bsr 300$ + jsr (a3) + beq.b 9$ + bsr 400$ + jsr (a3) + beq.b 9$ + bsr 500$ + jsr (a3) + beq.b 9$ + bsr 700$ + jsr (a3) + beq.b 9$ + bsr 800$ + jsr (a3) + beq.b 9$ + bsr 900$ + jsr (a3) +9$ move.l (a7)+,a3 + rts + +100$ move.l d2,-(a7) + move.l d0,d2 ; vise passord ? + lea (Name,a2),a0 + lea (tmptext,NodeBase),a1 + jsr strcopy + move.w (Userbits,a2),d0 + andi.w #USERF_Killed,d0 + beq.b 11$ + subq.l #1,a1 + lea (deadtext),a0 + jsr strcopy +11$ lea (tmptext,NodeBase),a0 + lea (tmplargestore,NodeBase),a1 + moveq.l #33,d0 + jsr (strcopylfill) + subq.l #1,a1 + lea (hometext),a0 + jsr strcopy + subq.l #1,a1 + lea (HomeTelno,a2),a0 + moveq.l #19,d0 + jsr (strcopylfill) + subq.l #1,a1 + move.b #0,(a1) + lea (tmplargestore,NodeBase),a0 + move.l (a7)+,d2 + rts + +200$ lea (tmplargestore,NodeBase),a1 + moveq.l #33,d0 + lea (Address,a2),a0 + jsr (strcopylfill) + subq.l #1,a1 + lea (worktext),a0 + jsr strcopy + subq.l #1,a1 + lea (WorkTelno,a2),a0 + moveq.l #19,d0 + jsr (strcopylfill) + subq.l #1,a1 + lea (uploadstext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (Uploaded,a2),d0 + move.l a1,a0 + jsr (konverter) + move.b #'/',(a0)+ + move.l (KbUploaded,a2),d0 + jsr (konverter) + move.l a0,a1 + lea (kbtext),a0 + jsr strcopy + lea (tmplargestore,NodeBase),a0 + rts + +300$ lea (tmplargestore,NodeBase),a1 + moveq.l #33,d0 + lea (CityState,a2),a0 + jsr (strcopylfill) + subq.l #1,a1 + lea (timesontext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (TimesOn,a2),d0 + moveq.l #15,d1 + bsr 30$ + lea (dloadtext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (Downloaded,a2),d0 + move.l a1,a0 + jsr (konverter) + move.b #'/',(a0)+ + move.l (KbDownloaded,a2),d0 + jsr (konverter) + move.l a0,a1 + lea (kbtext),a0 + jsr strcopy + lea (tmplargestore,NodeBase),a0 + rts + +400$ lea (tmplargestore,NodeBase),a1 + lea (timektext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (TimeLimit,a2),d0 + moveq.l #11,d1 + bsr 30$ + lea (filektext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (FileLimit,a2),d0 + moveq.l #10,d1 + bsr 30$ + lea (lastontext),a0 + jsr strcopy + subq.l #1,a1 + lea (LastAccess,a2),a0 + jsr (gettimestr) + lea (tmplargestore,NodeBase),a0 + rts + +500$ lea (tmplargestore,NodeBase),a1 + lea (Pagektext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (PageLength,a2),d0 + moveq.l #5,d1 + bsr 30$ + lea (Protktext),a0 + jsr strcopy + subq.l #1,a1 + lea (nulltext),a0 + moveq.l #0,d0 + move.b (Protocol,a2),d0 + beq.b 513$ + subq.l #1,d0 + lsl.l #2,d0 + lea (shortprotocname),a0 + adda.l d0,a0 +513$ moveq.l #4,d0 + jsr (strcopylfill) + subq.l #1,a1 +; lea Menutext,a0 +; jsr strcopy +; subq.l #1,a1 + lea (ANSIktext),a0 + jsr strcopy + subq.l #1,a1 + move.w (Userbits,a2),d0 + andi.w #USERF_ANSIMenus,d0 + bsr 31$ + lea (FSEktext),a0 + jsr strcopy + subq.l #1,a1 + move.w (Userbits,a2),d0 + andi.w #USERF_FSE,d0 + bsr 31$ + lea (Termktext),a0 + jsr strcopy + subq.l #1,a1 + move.b #'A',d0 + move.w (Userbits,a2),d1 + andi.w #USERF_ANSI,d1 + bne.b 516$ + move.b #'T',d0 +516$ move.b d0,(a1)+ + move.b #' ',(a1)+ + move.b #' ',(a1)+ + lea (Chrsktext),a0 + jsr strcopy + subq.l #1,a1 + lea (charsettext),a0 + moveq.l #0,d0 + move.b (Charset,a2),d0 + lsl.w #2,d0 + adda.l d0,a0 + jsr strcopy + move.b #' ',(-1,a1) + lea (scfktext),a0 + jsr strcopy + move.b #' ',(-1,a1) + lea (packchars),a0 + moveq.l #0,d0 + move.b (ScratchFormat,a2),d0 + lsl.w #1,d0 + adda.l d0,a0 + jsr strcopy + move.b #' ',-1(a1) + lea (plainfiletext),a0 + jsr strcopy + subq.l #1,a1 + move.l a1,a0 + move.w (u_FileRatiov,a2),d0 + jsr (konverterw) + move.l a0,a1 + move.b #' ',(a1)+ + lea (bytetext),a0 + jsr strcopy + subq.l #1,a1 + move.l a1,a0 + move.w (u_ByteRatiov,a2),d0 + jsr (konverterw) + lea (tmplargestore,NodeBase),a0 + rts + +700$ lea (tmplargestore,NodeBase),a1 + lea (scripttext),a0 + jsr strcopy + subq.l #1,a1 + lea (UserScript,a2),a0 + jsr strcopy + lea (tmplargestore,NodeBase),a0 + rts + +800$ lea (tmplargestore,NodeBase),a1 + lea (msgreadtext),a0 + jsr strcopy + subq.l #1,a1 + move.l (MsgsRead,a2),d0 + bsr 40$ + lea (msgdumpedtext),a0 + jsr strcopy + subq.l #1,a1 + move.l (MsgaGrab,a2),d0 + bsr 40$ + lea (msgenteredtext),a0 + jsr strcopy + subq.l #1,a1 + moveq.l #0,d0 + move.w (MsgsLeft,a2),d0 + bsr 40$ + lea (tmplargestore,NodeBase),a0 + rts + +900$ lea (tmplargestore,NodeBase),a1 + move.w (confnr,NodeBase),d0 + cmpi.w #-1,d0 ; er han i noen conf ? + beq.b 910$ ; nei, tar bare news + move.l a2,a0 + bsr 20$ + lea (lastreadtext),a0 + jsr strcopy + subq.l #1,a1 + + lea (u_almostendsave+CU,NodeBase),a0 + move.w (confnr,NodeBase),d0 + mulu #Userconf_seizeof/2,d0 + move.l (uc_LastRead,a0,d0.l),d0 + move.l a1,a0 + jsr (konverter) + move.l a0,a1 + move.w (confnr,NodeBase),d1 + beq.b 17$ ; 0 = news + lea (kommaspacetext),a0 + jsr strcopy + subq.l #1,a1 +910$ move.w #0,d0 + move.l a2,a0 + bsr 20$ +17$ lea (tmplargestore,NodeBase),a0 + rts + +;Gen/Fileinfo access: R Last Read : 908, Gen/Main access: RWUD + +20$ push d2/d3/a2 + move.l d0,d2 + move.l a0,a2 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + jsr strcopy + subq.l #1,a1 + lea (accesstext),a0 + jsr strcopy + subq.l #1,a1 + + lea (u_almostendsave,a2),a0 + move.l d2,d0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d2 + lea (accessbitstext),a0 + moveq.l #0,d3 +21$ btst d3,d2 + beq.b 22$ + move.b (0,a0,d3.w),(a1)+ +22$ addq.w #1,d3 + cmpi.w #7,d3 + bls.b 21$ + move.b #' ',(a1)+ + move.b #0,(a1) + pop d2/d3/a2 + rts + +30$ push a1/d1 + jsr (connrtotext) + pop a1/d0 + jsr (strcopylfill) + subq.l #1,a1 + rts + +31$ lea (ytext),a0 + bne.b 32$ + lea (ntext),a0 +32$ moveq.l #3,d0 + jsr (strcopylfill) + subq.l #1,a1 + rts + +40$ move.l a1,a0 + jsr (konverter) + move.l a0,a1 + rts + +;#c +changefiletimelimit + move.l d2,-(a7) + jsr (checksysopaccess) + beq 9$ + lea (enteruserntext),a0 + moveq.l #1,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + move.b (readcharstatus,NodeBase),d1 + bne 9$ ; det skjedde noe spes + moveq.l #-1,d1 ; Fikk vi ALL ??? + cmp.l d1,d0 + bne.b 1$ ; Ikke ALL + lea (newfilelimtext),a0 + jsr (writetexti) + moveq.l #3,d0 + jsr (getline) + beq 9$ + jsr (atoi) + bmi 9$ ; Ikke tall + move.l d0,d2 + lea (newfilelimtext),a0 + jsr (writetexti) + move.l d2,d0 + jsr (skrivnr) + jsr (outimage) + lea (suregivenatext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq 9$ + lea (changetimelimitlooprutine),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (FileLimit,a1),a1 + move.l d2,d0 + jsr (doallusers) + bne 9$ + lea (userrecupdatext),a0 + jsr (writetexto) + bra 9$ + +1$ move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 7$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ + +7$ moveq.l #0,d0 + move.l (Tmpusermem,NodeBase),a0 + move.w (FileLimit,a0),d0 + jsr (connrtotext) + move.b #0,(0,a0,d0.w) + move.l a0,a1 + moveq.l #3,d0 + lea (currfilelimtext),a0 + jsr (mayedlineprompt) + beq 9$ + jsr (atoi) + bmi.b 7$ + move.l (Tmpusermem,NodeBase),a1 + move.w d0,(FileLimit,a1) + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userrecupdatext),a0 + jsr (writetexto) +9$ move.l (a7)+,d2 + rts + +;#c +changetimelimit + move.l d2,-(a7) + jsr (checksysopaccess) + beq 9$ + lea (enteruserntext),a0 + moveq.l #1,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + move.b (readcharstatus,NodeBase),d1 + bne 9$ ; det skjedde noe spes + moveq.l #-1,d1 ; Fikk vi ALL ??? + cmp.l d1,d0 + bne.b 1$ ; Ikke ALL + + lea (newtimelimtext),a0 + jsr (writetexti) + moveq.l #3,d0 + jsr (getline) + beq 9$ + jsr (atoi) + bmi 9$ ; Ikke tall + move.l d0,d2 + lea (newtimelimtext),a0 + jsr (writetexti) + move.l d2,d0 + jsr (skrivnr) + jsr (outimage) + lea (suregivenatext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq 9$ + lea (changetimelimitlooprutine),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (TimeLimit,a1),a1 + move.l d2,d0 + jsr (doallusers) + bne 9$ + lea (userrecupdatext),a0 + jsr (writetexto) + bra 9$ + +1$ move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 6$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ + +6$ moveq.l #0,d0 + move.l (Tmpusermem,NodeBase),a0 + move.w (TimeLimit,a0),d0 + jsr (connrtotext) + move.b #0,(0,a0,d0.w) + move.l a0,a1 + lea (currtimelimtext),a0 + moveq.l #3,d0 + jsr (mayedlineprompt) + beq 9$ + jsr (atoi) + bmi.b 6$ + move.l (Tmpusermem,NodeBase),a1 + move.w d0,(TimeLimit,a1) + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userrecupdatext),a0 + jsr (writetexto) +9$ move.l (a7)+,d2 + rts + +changetimelimitlooprutine + move.w d0,(a0) + setz ; ta og lager forandringen + clrn ; ikke avbryt + rts + +;#c +bulletinstall + push d2/a2 + jsr (checksysopaccess) + beq 9$ + clr.b (readlinemore,NodeBase) ; flusher input. + lea (entinbullnrtext),a0 + sub.l a1,a1 + sub.l a2,a2 + jsr (readlinepromptwhelpflush) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + tst.w d0 + beq.b 2$ ; Legg inn på ledig plass. + jsr (atoi) + lea (musthavenrtext),a0 + bmi 8$ + beq.b 2$ + move.w (confnr,NodeBase),d1 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a0 + cmp.b (n_ConfBullets,a0),d0 ; Finnes denne bulletinen ? + lea (nobullettext),a0 + bhi 8$ ; Nei, hopp +2$ move.w d0,d2 ; Bulletin nr. + suba.l a1,a1 ; ikke noe filnavn + lea (maintmptext,NodeBase),a0 + bsr getfullname + beq 9$ + move.l a0,a2 + cmpi.w #8,(menunr,NodeBase) ; Sysop menu ?? + beq.b 1$ ; ja, alt godtas + jsr (testfilename) ; nå skal alt hentes fra uploadfilpath'en + lea (nopathallowtext),a0 + beq 8$ + lea (tmptext,NodeBase),a1 ; bygger opp filnavn fra +; upload path'en + move.l (firstFileDirRecord+CStr,MainBase),a0 + lea (n_DirPaths+FileDirRecord_SIZEOF,a0),a0 + jsr strcopy + lea (-2,a1),a0 + jsr (addendofpath) + move.l a0,a1 + move.l a2,a0 + jsr strcopy + lea (tmptext,NodeBase),a0 + move.l a0,a2 +1$ jsr (findfile) + move.l a2,a0 + bne.b 4$ + lea (filenotfountext),a0 + bra.b 8$ +4$ move.l (msg,NodeBase),a1 + move.w #Main_createbulletin,(m_Command,a1) + swap d2 + move.w (confnr,NodeBase),d2 + move.l d2,(m_UserNr,a1) ; bullet nr (hi word) og confnr (lo word) + move.l a0,(m_Name,a1) + move.l (msgmemsize,NodeBase),(m_arg,a1) ; legger inn lengden først. + move.l (tmpmsgmem,NodeBase),(m_Data,a1) ; Bruker tmpmsgmem til copy space + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (bulletininstext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop d2/a2 + rts + +;#c +clearbulletins + jsr (checksysopaccess) + beq 9$ + move.w (confnr,NodeBase),d1 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a0 + tst.b (n_ConfBullets,a0) ; Finnes det bulletiner ? + lea (nobulletstctext),a0 ; feilmelding. + beq.b 8$ ; Nei, hopp + clr.b (readlinemore,NodeBase) ; flusher input. + lea (sureclearbtext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ ; Nei, hopp ut. + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ + move.l (msg,NodeBase),a1 + move.w #Main_Clearbulletins,(m_Command,a1) + moveq.l #0,d2 + move.w (confnr,NodeBase),d2 + move.l d2,(m_UserNr,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (bulletscleatext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ rts + +;#c +installfiledir + push d2 + jsr (checksysopaccess) + beq 9$ + move.w (MaxfileDirs+CStr,MainBase),d0 + sub.w #1,d0 + cmp.w (ActiveDirs+CStr,MainBase),d0 + bls 6$ + lea (dirnametext),a0 + lea (nulltext),a1 + moveq.l #Sizeof_NameT-3,d0 ; amigados klarer ikke mere + jsr (mayedlinepromptfull) ; en 30 tegn i filnavnet + beq 9$ + jsr (removespaces) + beq 9$ + lea (maintmptext,NodeBase),a1 + jsr (strcopy) + lea (maintmptext,NodeBase),a0 + jsr (testconfname) + lea (illfdirfnatext),a0 + beq.b 2$ + lea (maintmptext,NodeBase),a0 + jsr (finddirfull) + beq.b 3$ + lea (dirssamenametxt),a0 +2$ jsr (writeerroro) + bra 9$ +3$ lea (filepathnametxt),a0 + jsr (writetexti) + move.w #Sizeof_NameT-1,d0 + jsr (getline) + bne.b 1$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + lea (filespath),a0 +1$ lea (tmptext,NodeBase),a1 + jsr strcopy + cmpi.b #'/',(-2,a1) + beq.b 5$ + cmpi.b #':',(-2,a1) + beq.b 5$ + move.b #'/',(-1,a1) + move.b #0,(a1) +5$ lea (tmptext,NodeBase),a0 + jsr (findfile) + bne.b 4$ + lea (dirnotfoundtext),a0 + jsr (writeerroro) + bra.b 9$ +4$ lea (maintmptext,NodeBase),a0 + move.l (msg,NodeBase),a1 + move.w #Main_createfiledir,(m_Command,a1) + move.l a0,(m_Name,a1) + lea (tmptext,NodeBase),a0 + move.l a0,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_OK,d0 + bne.b 7$ + lea (dirinstsledtext),a0 + jsr (writetexto) + bra.b 9$ +6$ lea (sorrymaxconftxt),a0 + jsr (writeerroro) + move.w (MaxfileDirs+CStr,MainBase),d0 + jsr (skrivnrw) + lea (directorystext),a0 + jsr (writetexto) + bra.b 9$ +7$ lea (anerrorocctext),a0 + lea (maintmptext,NodeBase),a1 + jsr (fillinnodenr) + lea (maintmptext,NodeBase),a0 +8$ jsr (writeerroro) +9$ pop d2 + rts + +;#c +fileinstall + push a2/a3/d2/d3 + link.w a3,#-160 + jsr (checksysopaccess) + beq 9$ + moveq.l #0,d2 ; ikke privat install + lea (tmpfileentry,NodeBase),a2 ; Nullstiller hele filenetry'et + move.l a2,a0 + move.w #Fileentry_SIZEOF,d0 + jsr (memclr) + lea (Fileprivulftext),a0 ; Henter navnet på mottaker + moveq.l #1,d0 ; vi godtar all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 1$ ; Null, ikke pu, eller no carrier + moveq.l #-1,d1 ; all ? + cmp.l d0,d1 + beq.b 1$ ; Ja, da er det ikke PU + move.l d0,(PrivateULto,a2) + move.w #FILESTATUSF_PrivateUL,(Filestatus,a2) + moveq.l #1,d2 ; det er privat install +1$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ +0$ suba.l a1,a1 ; ikke noe filnavn + move.l sp,a0 + bsr getfullname ; Ber om fullt amigdos filnavn. + beq 9$ ; Ut + move.l sp,a0 + jsr (findfile) ; Finnes fila ? + beq 10$ ; Nei ! Fy +3$ move.l sp,a0 + jsr (fjernpath) + move.l a0,a1 + lea (filenametext),a0 ; Ber om abbs filnavn + moveq.l #Sizeof_FileName,d0 + jsr (mayedlineprompt) + beq 9$ ; Ut + lea (80,sp),a1 + jsr (strcopy) +; lea (80,sp),a0 +; bsr upword ; bare store bokstaver + lea (80,sp),a0 + jsr (testfilename) ; Er det et ok filnavn (ikke path/wildcards) ? + lea (nopathallowtext),a0 + beq 15$ ; Nei + lea (80,sp),a0 + jsr (strlen) + cmpi.w #Sizeof_FileName,d0 ; for langt ?? + lea (only18charatext),a0 + bhi 15$ ; Ja + lea (80,sp),a0 + lea (Filename,a2),a1 + move.w #Sizeof_FileName,d0 + jsr (strcopymaxlen) ; Lagrer navnet + lea (dirnametext),a0 + moveq.l #0,d3 ; private dir + tst.l d2 ; Er det en Private UL ?? + bne.b 13$ ; Ja, ikke spør fildir + suba.l a1,a1 + move.l a2,d3 ; husker + suba.l a2,a2 + jsr (readlinepromptwhelp) + bne.b 12$ + move.l d3,a2 ; tilbake + tst.b (readcharstatus,NodeBase) ; noe galt ? + bne 9$ ; ja, ut + moveq.l #1,d3 ; upload + bra.b 13$ +12$ move.l d3,a2 ; tilbake + bsr getdirnamesub + beq 9$ + lsr.l #1,d0 + move.l d0,d3 ; dirnum +13$ move.l d3,d0 + lea (80,sp),a0 + lea (maintmptext,NodeBase),a1 ; bygger full path til dest. + jsr (buildfilepath) + lea (maintmptext,NodeBase),a0 + jsr (findfile) ; Finnes fila fysisk ? + lea (filefountext),a0 + bne 15$ ; Ja. + lea (Filename,a2),a0 ; finnes filen fra før + lea (tmplargestore,NodeBase),a1 + moveq.l #0,d0 ; vil ikke ha nesten navn + jsr (findfileinfo) + lea (filefountext),a0 + bne 15$ ; ja.. + jsr (outimage) ; Filedesc. + lea (pleaseentfdtext),a0 ; Litt tull for å få pen utskrift + jsr (strlen) + lea (spacetext),a0 + jsr (writetextlen) + moveq.l #0,d0 + move.w #Sizeof_FileDescription,d0 + lea (bordertext),a0 + jsr (writetextlen) + move.b #'>',d0 + jsr (writechar) + jsr (outimage) + lea (pleaseentfdtext),a0 + jsr (writetext) + jsr (breakoutimage) + move.l (infoblock,NodeBase),a0 ; rensker fileinfo plassen + lea (fib_Comment,a0),a0 + jsr (memclr) ; overtro. + move.l sp,a0 + jsr getfilelen + lea (nulltext),a1 + beq.b 2$ + move.l (infoblock,NodeBase),a0 + lea (fib_Comment,a0),a1 + move.b (a1),d0 + cmp.b #$30,d0 + bcc.b 2$ + lea (1,a1),a1 +2$ moveq.l #Sizeof_FileDescription,d0 + jsr (mayedlineprompt) + beq 9$ ; Ut + lea (Filedescription,a2),a1 + move.w #Sizeof_FileDescription,d0 + jsr (strcopymaxlen) ; lagrer filedesc + +; Private to conference ??? + tst.l d2 ; Er det PU ? + bne.b 4$ ; jepp. Altså ikke privat til conf. + move.w (confnr,NodeBase),d0 + beq.b 4$ ; Vi er i News, så ingen privat + + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.b #ACCF_Upload,d0 ; har vi UL access i denne konf ? + beq.b 4$ ; Nei. Da blir det offentlig fil + lea (fileprivtcotext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 4$ + move.w #FILESTATUSF_PrivateConfUL,(Filestatus,a2) + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + move.l d0,(PrivateULto,a2) +4$ tst.b (readcharstatus,NodeBase) + notz + beq 9$ + jsr (outimage) + move.l sp,a0 + lea (maintmptext,NodeBase),a1 + jsr (copyfile) + lea (diskerrortext),a0 + beq 99$ + + lea (maintmptext,NodeBase),a0 ; Ble det noe på oss ? + jsr (getfilelen) + beq 9$ ; Nei, ingen ordentelig fil. + move.l d0,(Fsize,a2) + move.l (Usernr+CU,NodeBase),(Uploader,a2) + lea (ULdate,a2),a0 + move.l a0,d1 + push a6/d2 + move.l (dosbase),a6 + jsrlib DateStamp + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + lea (Filedescription,a2),a0 + move.l a0,d2 + jsrlib SetComment ; prøver å sette description som file comment. + pop a6/d2 + moveq.l #0,d0 + move.l d0,(Infomsgnr,a2) ; tømmer denne + lea (enterdeinfotext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq.b 7$ + move.l a2,a0 + move.w #6,d0 ; fileinfo conf + bsr comentditsamecode + beq.b 7$ ; abort'a, carrier borte osv + lea (tmpmsgheader,NodeBase),a0 + move.l (Number,a0),(Infomsgnr,a2) +7$ move.l (msg,NodeBase),a1 + move.w #Main_addfile,(m_Command,a1) + move.l a2,(m_Data,a1) + move.l d3,(m_UserNr,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 9$ + lea (ulcompletedtext),a0 + jsr (writetexto) + addq.w #1,(Uploaded+CU,NodeBase) ; Oppdaterer Uploaded telleren + move.l (Fsize,a2),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + add.l d0,(KbUploaded+CU,NodeBase) + +; beq.b 9$ +; lea +; jsr (writetexti) +; lea maintmptext(NodeBase),a0 +; bsr deletefile + +9$ unlk a3 + pop a2/a3/d2/d3 + rts + +99$ jsr (writeerroro) + bra.b 9$ + +10$ lea (filenotfountext),a0 + jsr (writeerroro) + bra 0$ + +15$ jsr (writeerroro) + bra 3$ + +;#c +movefile + push a2/d2/d3/d4 + moveq.l #0,d4 ; ikke privat til conf + lea (tmpfileentry,NodeBase),a2 + lea (movefilnametext),a0 + jsr (readlineprompt) + beq 9$ + move.l a2,a1 + moveq.l #1,d0 ; vil ha nesten navn + jsr (findfileinfo) + bne.b 2$ +7$ lea (filenotfountext),a0 +6$ bra 99$ +2$ move.l d0,d2 + move.l a2,a0 + jsr (allowtypefileinfo) + beq.b 7$ + cmpi.w #20,(menunr,NodeBase) ; er vi i sigopmeny ? + bne.b 8$ ; nope, gir f.. + move.w (Filestatus,a2),d0 + btst #FILESTATUSB_PrivateConfUL,d0 + lea (notallmoveftext),a0 + beq.b 6$ + move.l (PrivateULto,a2),d0 + + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 ; Henter conf access + btst #ACCB_Read,d0 ; er vi medlem ? + beq.b 6$ ; nope + andi.b #ACCF_Sigop,d0 ; sigop ? + beq.b 6$ ; nope + +8$ lea (dirnametext),a0 + jsr (readlineprompt) + beq 9$ + bsr getdirnamesub + beq.b 99$ + lsr.w #1,d0 + cmp.w d0,d2 + bne.b 5$ + lea (filealindirtext),a0 + bra.b 6$ +5$ move.l d0,d3 + move.w (confnr,NodeBase),d0 + beq.b 3$ ; Vi er i News, så ingen privat + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.b #ACCF_Upload,d0 ; har vi UL access i denne konf ? + beq.b 3$ ; Nei. Da blir det offentlig fil + lea (fileprivtcotext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 3$ + moveq.l #1,d4 +3$ tst.b (readcharstatus,NodeBase) + bne 9$ + + move.l (msg,NodeBase),a1 + move.l (m_UserNr,a1),d0 + move.l a2,a0 + move.l d4,d1 + bsr.b movefileinabbs + beq.b 99$ ; noe gikk galt + jsr (writetexto) +9$ pop a2/d2/d3/d4 + rts +99$ jsr (writeerroro) + bra.b 9$ + +; a0 = fileentry +; d0 = filepos +; d2 = olddir +; d3 = newdir * 1 +; d1 = set privatetoconf (true/false) +; returnerer z=1 for feil, z= 0 for ok +; ret: a0 inneholder feil/ok melding +movefileinabbs + push a2/d4 + link.w a3,#-160 + move.l a0,a2 + move.l d1,d4 + and.l #$ffff,d2 ; fjerner høye bits.. + and.l #$ffff,d3 ; fjerner høye bits.. + + ori.w #FILESTATUSF_Filemoved,(Filestatus,a2) + move.l (msg,NodeBase),a1 ; updater gammel filinfo. + move.w #Main_savefileentry,(m_Command,a1) + move.l d0,(m_arg,a1) ; filpos. + move.l d2,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (errsavefilhtext),a0 + notz + beq 9$ + andi.w #~(FILESTATUSF_Filemoved|FILESTATUSF_Selected),(Filestatus,a2) + tst.w d4 ; privat til conf ? + beq.b 1$ + move.w #FILESTATUSF_PrivateConfUL,(Filestatus,a2) + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + move.l d0,(PrivateULto,a2) +1$ move.l (msg,NodeBase),a1 + move.w #Main_addfile,(m_Command,a1) + move.l a2,(m_Data,a1) + move.l d3,(m_UserNr,a1) + jsr (handlemsg) + ori.w #FILESTATUSF_Selected,(Filestatus,a2) ; setter tilbake igjen + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (errsavefilhtext),a0 + notz + beq.b 9$ + + move.l d2,d0 + move.l sp,a1 + lea (Filename,a2),a0 + jsr (buildfilepath) + move.l d3,d0 + lea (80,sp),a1 + lea (Filename,a2),a0 + jsr (buildfilepath) + + move.l sp,a0 + lea (80,sp),a1 + jsr (movedosfile) + lea (diskerrortext),a0 + beq.b 9$ + lea (filemovedtext),a0 +9$ unlk a3 + pop a2/d4 + rts + +;#c +doscmd push a2/a3/d2-d3 + jsr (checksysopaccess) + beq 9$ + move.b (CommsPort+Nodemem,NodeBase),d0 ; Lokal node ? + beq.b 5$ ; Ja, da har vi lov uansett + move.b (dosPassword+CStr,MainBase),d0 ; har vi passord ? + beq.b 5$ ; nei, alt ok + tst.b (readlinemore,NodeBase) + beq.b 6$ + jsr (readlineprompt) + lea (dosPassword+CStr,MainBase),a1 + jsr (comparestrings) + beq.b 5$ + lea (wrongtext),a0 + jsr (writeerroro) + bra 9$ +6$ lea (dosPassword+CStr,MainBase),a0 + moveq.l #0,d0 + jsr (getpasswd) + beq 9$ +5$ tst.b (readlinemore,NodeBase) + bne.b 3$ + lea (enterdoscomtext),a0 + jsr (writetexti) +3$ moveq.l #78,d0 + jsr (readlineall) + beq 9$ + move.l a0,a3 + jsr (outimage) + lea (maintmptext,NodeBase),a2 + move.l a2,a1 + lea (TmpPath+Nodemem,NodeBase),a0 + jsr (strcopy) + move.l a2,a1 +1$ move.b (a1)+,d0 ; finner slutten + bne.b 1$ + subq.l #1,a1 + lea (shellfnameetext),a0 + jsr (strcopy) + move.l (dosbase),a6 + move.l a2,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d3 + beq.b 9$ + move.l a3,d1 + moveq.l #0,d2 + jsrlib Execute + move.l d0,d2 + move.l d3,d1 + jsrlib Close + tst.l d2 + bne.b 2$ + lea (errordoscmdtext),a0 + jsr (writetexti) +2$ move.l (exebase),a6 + move.l a2,a0 + jsr (getfilelen) + beq.b 4$ + move.l a2,a0 + moveq.l #0,d0 + jsr (typefile) +4$ move.l (dosbase),a6 + move.l a2,d1 + jsrlib DeleteFile + move.l (exebase),a6 + lea (logdoscmdtext),a0 + move.l a3,a1 + move.b #0,(58,a1) ; kutter. Har bare plass til 58 tegn + jsr (writelogtexttimed) + +9$ move.l (exebase),a6 + pop a2/a3/d2-d3 + rts + +;#c +killuser + jsr (checksysopaccess) + beq 9$ + lea (enteruserntext),a0 + moveq.l #0,d0 ; vi godtar ikke all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 9$ + move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 2$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra 9$ +2$ jsr (outimage) + move.l (Tmpusermem,NodeBase),a0 + move.l (Usernr,a0),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + lea (youarenottext),a0 + beq.b 8$ ; Jepp. + + move.l (Tmpusermem,NodeBase),a0 + move.w (Userbits,a0),d0 + btst #USERB_Killed,d0 ; Er han død ? + beq.b 100$ ; Nei + lea (useralreadykill),a0 ; Ja! + bra.b 8$ + +100$ lea (maintmptext,NodeBase),a1 + lea (shukillusertext),a0 + jsr (strcopy) + subq.l #1,a1 + move.l (Tmpusermem,NodeBase),a0 + lea (Name,a0),a0 + jsr (strcopy) + move.b #' ',(-1,a1) + move.b #0,(a1) + lea (maintmptext,NodeBase),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq.b 9$ + move.l (Tmpusermem,NodeBase),a1 + ori.w #USERF_Killed,(Userbits,a1) + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userkilledtext),a0 +8$ jsr (writetexto) +9$ rts + +;#c +recoveruser + jsr (checksysopaccess) + beq 9$ + lea (enteruserntext),a0 + moveq.l #0,d0 ; vi godtar ikke all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq.b 9$ + move.l (Tmpusermem,NodeBase),a0 + jsr (loadusernr) + bne.b 2$ + lea (usernotfountext),a0 + jsr (writeerroro) + bra.b 9$ +2$ jsr (outimage) + move.l (Tmpusermem,NodeBase),a1 + andi.w #~USERF_Killed,(Userbits,a1) + lea (Name,a1),a0 + jsr (saveuser) + bne.b 9$ + lea (userukilledtext),a0 + jsr (writetexto) +9$ rts +;#e + +***************************************************************** +* User Maintenance * +***************************************************************** + +;#b +;#c +URatio push a2/a3/d2 + lea (fileratiotext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (u_FileRatiov,a1),a1 + moveq.l #0,d0 ; word size + bsr Ubytessub + beq.b 9$ + + lea (byteratiotext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (u_ByteRatiov,a1),a1 + moveq.l #0,d0 ; word size + bsr Ubytessub + beq.b 9$ + + jsr (outimage) + bsr writeuserupd +9$ pop a2/a3/d2 + bra usermaintcommon + +;#c +UPasswd push a2/a3/d2 + move.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 1$ ; Ja, vi har lov + lea (youarenottext),a0 + jsr (writeerroro) + bra.b 9$ + +1$ lea (logonpasswdtext),a0 + lea (nulltext),a1 + moveq.l #Sizeof_PassT,d0 + jsr (mayedlineprompt) + beq 9$ + move.l (Tmpusermem,NodeBase),a1 + bsr insertpasswd + jsr (outimage) + bsr writeuserupd + +9$ pop a2/a3/d2 + bra usermaintcommon + +;#c +UBytes push a2/a3/d2 + lea (uploadfilestext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (Uploaded,a1),a1 + moveq.l #0,d0 ; word size + bsr Ubytessub + beq.b 9$ + + lea (uploadkbytetext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (KbUploaded,a1),a1 + moveq.l #1,d0 ; long size + bsr Ubytessub + beq.b 9$ + + lea (downloadfiltext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (Downloaded,a1),a1 + moveq.l #0,d0 ; word size + bsr Ubytessub + beq.b 9$ + + lea (downloadkbytext),a0 + move.l (Tmpusermem,NodeBase),a1 + lea (KbDownloaded,a1),a1 + moveq.l #1,d0 ; long size + bsr Ubytessub + beq.b 9$ + + jsr (outimage) + bsr writeuserupd +9$ pop a2/a3/d2 + bra usermaintcommon + +Ubytessub + move.l a0,a2 + move.l a1,a3 + move.l d0,d2 +11$ move.l a2,a0 + tst.l d2 + beq.b 12$ + move.l (a3),d0 + bra.b 13$ +12$ moveq.l #0,d0 + move.w (a3),d0 +13$ jsr (connrtotext) + move.l a0,a1 + move.l a2,a0 + moveq.l #10,d0 + jsr (mayedlineprompt) + beq.b 19$ + jsr (atoi) + bpl.b 14$ + lea (musthavenrtext),a0 + jsr (writeerroro) + bra.b 11$ +14$ tst.l d2 + beq.b 15$ + move.l d0,(a3) + bra.b 16$ +15$ move.w d0,(a3) +16$ clrz +19$ rts + +;#c ! S A +Uaccess push a2/d7/a3/d2/d3 + move.l (Tmpusermem,NodeBase),a3 + lea (u_almostendsave,a3),a3 + cmpi.w #40,(menunr,NodeBase) ; Sigop user maintanance menu ? + beq.b 7$ ; ja + lea (allconferentext),a0 + moveq.l #1,d3 ; alle konfer + suba.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + lea (nulltext),a0 + bne.b 1$ ; fikk ja + tst.b (readcharstatus,NodeBase) + bne.w 9$ ; noe skjedde. ut +7$ moveq.l #0,d3 ; det var ikke alle conf'er + move.w (confnr,NodeBase),d2 + mulu #Userconf_seizeof/2,d2 + move.w (uc_Access,a3,d2.l),d0 + + cmpi.w #40,(menunr,NodeBase) ; Sigop user maintanance menu ? + bne.b 11$ ; nei ! + move.l d0,d1 ; bruker d1 her + andi.w #ACCF_Sysop|ACCF_Sigop,d1 ; Vil sigop forandre en annen sigop/sysop ? + beq.b 11$ ; Nei. + lea (youarenottext),a0 ; Sier ifra at sigop ikke har lov + jsr (writeerroro) + bra 9$ +11$ lea (tmptext,NodeBase),a0 + jsr (getaccbittext) + +1$ move.l a0,a1 ; ALL + + cmpi.w #40,(menunr,NodeBase) ; Sigop user maintanance menu ? + bne.b 12$ ; nei! + lea (sigopaccesstypetext),a0 ; ja + moveq.l #6,d0 + bra.b 13$ + +12$ lea (accesstypetext),a0 + moveq.l #8,d0 + +13$ jsr (mayedlineprompt) + bne.b 2$ + tst.b (readcharstatus,NodeBase) + bne.b 9$ + lea (nulltext),a0 +2$ moveq.l #0,d0 ; sjekk på Z bit'et + bsr parseaccessbits + beq.b 8$ + jsr (outimage) + tst.w d3 ; bare 1 conf ? + beq.b 3$ ; ja. + + moveq.l #0,d0 +4$ move.b (a3,d0.w),d1 + btst #ACCB_Read,d1 + beq.b 5$ + cmp.b #2,d0 ; ikke userinfo + beq.b 5$ + cmp.b #3,d0 ; ikke fileinfo + beq.b 5$ + + move.b d7,(a3,d0.w) +5$ addq.l #1,d0 + cmp.w (Maxconferences+CStr,MainBase),d0 + bcs.b 4$ + bra.b 6$ +3$ move.w d7,(uc_Access,a3,d2.l) +6$ bsr writeuserupd +8$ bsr usermaintcommon +9$ pop a2/d7/a3/d2/d3 + rts + +;#c +Uconf push d2/d3/d4/a2 + moveq.l #0,d3 ; hvor vi startet + moveq.l #-1,d2 ; lurer getnext til å ta første + +1$ move.w d2,d0 + bsr getnextconfnrsub + move.w d0,d1 + subi.w #1,d1 + add.w d1,d1 ; gjor om til confnr standard + cmp.w #-1,d2 + beq.b 3$ ; ikke ferdig med en gang + cmp.w d3,d1 ; ferdig ? + beq 9$ ; jepp +3$ move.w d1,d2 ; nåværende konfnr. + + lea (n_FirstConference+CStr,MainBase),a0 + move.w d2,d0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 + moveq.l #Sizeof_NameT+2,d0 + jsr (writetextlfill) + move.w d2,d0 + mulu #Userconf_seizeof/2,d0 + move.l (Tmpusermem,NodeBase),a0 + lea (u_almostendsave,a0),a2 + add.l d0,a2 + move.w (uc_Access,a2),d4 + move.w d4,d0 + lea (tmptext,NodeBase),a0 + jsr (getaccbittext) + moveq.l #10,d0 + jsr (writetextlfill) + + lea (Nonmembertext),a0 + btst #ACCB_Read,d4 + beq.b 2$ + lea (joinnoreadtext),a0 + + move.l (uc_LastRead,a2),d0 ; har han lest meldinger her ? + beq.b 2$ ; Nei, da sier vi det + lea (Membertext),a0 +2$ jsr (writetexto) + bne.b 1$ + +9$ pop d2/d3/d4/a2 + jsr (outimage) + bra usermaintcommon + +;#c +UKill move.l a2,-(a7) + move.l (Tmpusermem,NodeBase),a2 + lea (10$),a0 + moveq.l #0,d0 + bsr doshowuser + move.l (a7)+,a2 + lea (killthiusertext),a0 + sub.l a1,a1 + moveq.l #0,d0 ; n er default + jsr (getyorn) + beq.b 9$ + move.l (Tmpusermem,NodeBase),a0 + ori.w #USERF_Killed,(Userbits,a0) + move.l (Usernr,a0),d0 + jsr (saveusernr) + bne.b 1$ + lea (saveusererrtext),a0 + jsr (writeerroro) + bra.b 9$ +1$ + lea (updatedtext),a0 + jsr (writetext) + move.l (Tmpusermem,NodeBase),a0 + lea (Name,a0),a0 + jsr (writetext) + lea (killedtext),a0 + jsr (writetexto) + +9$ jsr (outimage) + bra usermaintcommon + +10$ jmp (writetexto) + +;#c +UPrevious + moveq.l #-1,d0 + bra.b UNext1 + +UNext moveq.l #1,d0 +UNext1 push d2/d3/d4/a2 + move.l d0,d2 + move.l (Tmpusermem,NodeBase),a2 + move.l (Usernr,a2),d3 + move.l d3,d4 +1$ add.l d2,d3 + bpl.b 2$ + move.l (MaxUsers+CStr,MainBase),d3 ; wrap'er rundt + subq.l #1,d3 + bra.b 3$ +2$ move.l (MaxUsers+CStr,MainBase),d0 + cmp.l d0,d3 + bls.b 3$ +4$ moveq.l #0,d3 ; wrap'er rundt +3$ cmp.l d3,d4 + beq.b 9$ ; har gått rundt.. + move.l a2,a0 + move.l d3,d0 + jsr (loadusernr) + bne.b 6$ ; ok + cmpi.w #Error_Not_Found,d0 + beq.b 1$ ; hoppe over brukere som ikke finnes + cmpi.w #Error_EOF,d0 + beq.b 4$ + lea (loadusererrtext),a0 + jsr (writeerroro) + bra.b 9$ +6$ move.w (Userbits,a2),d0 + andi.w #USERF_Killed,d0 ; Er han død ? + bne.b 1$ ; ja, tar neste + move.l (Usernr,a2),d0 ; Er dette supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 1$ ; hopper over han + move.w (confnr,NodeBase),d0 + mulu #Userconf_seizeof/2,d0 + lea (u_almostendsave,a2),a0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Read,d0 ; Er han medlem her ? + beq.b 1$ ; nei, skip'er han +9$ pop d2/d3/d4/a2 + jsr (outimage) + bra usermaintcommon + +;#c +USCript lea (prescriptname),a0 + bsr writetext + lea (ploginscrname),a0 + bsr writetexto + lea (scriptname),a0 + lea (nulltext),a1 + moveq.l #Sizeof_loginscript-1,d0 + jsr (mayedlineprompt) + beq 1$ ; bare return. Ut.. + move.l (Tmpusermem,NodeBase),a1 + lea (UserScript,a1),a1 + moveq.l #Sizeof_loginscript-1,d0 + bsr strcopymaxlen +2$ jsr (outimage) + bsr writeuserupd + bra.b 9$ +1$ tst.b (readcharstatus,NodeBase) ; sjedde det noe spes ? + bne.b 9$ ; ja, ut + move.l (Tmpusermem,NodeBase),a0 + move.b #0,(UserScript,a0) ; sletter scriptet + bra.b 2$ ; og lagrer +9$ bra usermaintcommon + +;#c +UFTime move.l (Tmpusermem,NodeBase),a0 + lea (FileLimit,a0),a0 + lea (newfilelimtext),a1 + bra.b Utime1 + +UTime move.l (Tmpusermem,NodeBase),a0 + lea (TimeLimit,a0),a0 + lea (newtimelimtext),a1 +Utime1 push a2/a3 + move.l a0,a2 + move.l a1,a3 + moveq.l #0,d0 + move.w (a2),d0 + jsr (connrtotext) + move.l a0,a1 + move.l a3,a0 + moveq.l #10,d0 + jsr (mayedlineprompt) + beq.b 1$ + jsr (atoi) + bmi.b 1$ + move.w d0,(a2) + bsr writeuserupd + bra.b 9$ +1$ lea (usernotupdatext),a0 + jsr (writetexto) + jsr (outimage) +9$ pop a2/a3 +; bra usermaintcommon + +Udot +usermaintcommon + push a2 + move.l (Tmpusermem,NodeBase),a2 + lea (10$),a0 + moveq.l #0,d0 + bsr doshowuser + move.l (Usernr,a2),d0 + pop a2 + rts + +10$ jmp (writetexto) + +writeuserupd + move.l (Tmpusermem,NodeBase),a0 + move.l (Usernr,a0),d0 + jsr (saveusernr) + bne.b 1$ + lea (saveusererrtext),a0 + bra writeerroro + +1$ lea (updatedtext),a0 + jsr (writetext) + move.l (Tmpusermem,NodeBase),a0 + lea (Name,a0),a0 + jsr (writetexto) + bra outimage + +;#c +UFind move.b #0,(noglobal,NodeBase) + move.w #8,(menunr,NodeBase) ;Skifter til Sysop menu + bra showuser1 + +;#c +UFind2 move.b #0,(noglobal,NodeBase) + move.w #20,(menunr,NodeBase) ;Skifter til Sigop menu + bra showuser1 + +;#c +UQuit move.b #0,(noglobal,NodeBase) + bra sysopmenu + +;#e + +***************************************************************** +* Utility meny * +***************************************************************** + +;#b +;#c +dosendbulletins + lea (wantqwknbultext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + jsr (getyorn) + beq 1$ ; nei, eller noe galt + or.w #USERF_SendBulletins,(Userbits+CU,NodeBase) + bra.b 2$ +1$ move.b (readcharstatus,NodeBase),d0 ; Har det skjedd noe ? + bne.b 9$ ; ja + and.w #~USERF_SendBulletins,(Userbits+CU,NodeBase) +2$ lea (Userbits+CU,NodeBase),a0 + moveq.l #2,d0 + bsr saveuserarea + beq.b 9$ ; Error + lea (userrecupdatext),a0 + jsr (writetexto) +9$ bra.b grabformatquit + +grabformathippo + move.b #2,d0 + bra.b grabformatcommon + +grabformatmbbs + move.b #0,d0 + bra.b grabformatcommon + +grabformatqwk + move.b #1,d0 +grabformatcommon + lea (GrabFormat+CU,NodeBase),a0 + move.b d0,(a0) + moveq.l #1,d0 + bsr saveuserarea + beq.b 9$ ; Error + lea (userrecupdatext),a0 + jsr (writetexto) +9$ +; bra.b grabformatquit + +grabformatquit + move.b #0,(noglobal,NodeBase) + jmp (utilitymenu) + +;#c +grabformatmenu + move.w #48,(menunr,NodeBase) ;Skifter til Grab format menu + move.b #1,(noglobal,NodeBase) + rts + +;#c +filter move.w (Userbits+CU,NodeBase),d0 + lea (noisefiltditext),a0 + bchg #USERB_Filter,d0 + beq.b 1$ + lea (noisefiltentext),a0 +1$ move.w d0,(Userbits+CU,NodeBase) + jsr (writetexto) + lea userprofsavtext,a0 + jsr (writetexto) + rts + +;#c +confshow + move.w (Savebits+CU,NodeBase),d0 + lea (confstatnshtext),a0 + bchg #SAVEBITSB_Dontshowconfs,d0 + beq.b 1$ + lea (confstatshotext),a0 +1$ move.w d0,(Savebits+CU,NodeBase) + jsr (writetexto) + lea userprofsavtext,a0 + jsr (writetexto) + rts + +;#c +messagefilter + push a2 + lea (msgfilterletext),a0 + lea (msgfilterhfname),a1 + suba.l a2,a2 ; ingen ekstra help + jsr (readlinepromptwhelp) + beq.b 9$ + jsr (atoi) + bmi.b 8$ + move.l (nodenoden,NodeBase),a0 + cmpi.w #50,d0 ; 50 eller mere ? + bcs.b 2$ ; nei + ori.b #NDSF_Notavail,(Nodedivstatus,a0) ; Slår på ikke avail flagget + bra.b 1$ +2$ andi.b #~NDSF_Notavail,(Nodedivstatus,a0) ; Slår av ikke avail flagget +1$ lea (MessageFilterV+CU,NodeBase),a0 + move.b d0,(a0) + moveq.l #1,d0 + bsr saveuserarea + beq.b 9$ ; Error + lea (userrecupdatext),a0 + jsr (writetexto) + bra 9$ +8$ lea (musthavenrtext),a0 + jsr (writeerroro) +9$ pop a2 + rts + +;#c +expertmode + push a2 +1$ lea (expertmodeptext),a0 + lea (experthlfilname),a1 + lea (expertmodehtext),a2 + jsr (readlinepromptwhelp) + beq.b 9$ + move.b (a0),d0 + bsr upchar + moveq.l #0,d1 + + lea (Novicetext),a0 + cmpi.b #'N',d0 + beq.b 2$ + addq.l #1,d1 + lea (Juniortext),a0 + cmpi.b #'J',d0 + beq.b 2$ + addq.l #1,d1 + lea (Experttext),a0 + cmpi.b #'E',d0 + beq.b 2$ + addq.l #1,d1 + lea (SuperExperttext),a0 + cmpi.b #'S',d0 + bne.b 1$ + +2$ move.l a0,-(a7) + lea (XpertLevel+CU,NodeBase),a0 + move.b d1,(a0) + moveq.l #1,d0 + bsr saveuserarea + move.l (a7)+,a0 + beq.b 9$ ; Error + jsr (writetext) + move.b #' ',d0 + jsr (writechar) + lea (modeselectetext),a0 + jsr (writetexto) +9$ pop a2 + rts + +;#c +scratchpadformat + move.l d2,-(a7) +1$ lea (archiveformtext),a0 + jsr (readlineprompt) + beq 9$ + cmpi.b #'?',(a0) ; fikk vi '?' ? + bne.b 2$ ; nei, vanelig + tst.b (1,a0) ; og bare det ? + bne.b 3$ ; nei + lea (scrformlfilname),a0 ; skriver ut help fil + moveq.l #0,d0 + jsr (typefilemaybeansi) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra.b 1$ +2$ bsr upstring + move.b (a0),d0 + lea (packchars),a1 + moveq.l #-1,d2 +8$ move.b (a1)+,d1 + beq.b 3$ + addq.l #1,d2 + addq.l #1,a1 + cmp.b d0,d1 + bne.b 8$ + bra.b 7$ +3$ lea (unknowformatext),a0 + jsr (writetexti) + bra.b 1$ +7$ tst.b d2 ; er det txt ? + beq.b 6$ ; ja + lea (tmptext2,NodeBase),a1 ; bygger opp navnet på pakkeren + lea (packstring),a0 + jsr strcopy + subq.l #1,a1 + lea (packexctstrings),a0 + move.w d2,d0 + lsl.w #2,d0 + move.l (0,a0,d0.w),a0 + jsr strcopy + lea (tmptext2,NodeBase),a0 ; sjekker om pakker finnes + jsr (findfile) + bne.b 6$ + lea (packformatutext),a0 + jsr (writetexto) + bra 1$ +6$ move.b d2,(ScratchFormat+CU,NodeBase) + lea (ScratchFormat+CU,NodeBase),a0 + moveq.l #1,d0 + bsr saveuserarea + beq.b 9$ ; Error + lea (userrecupdatext),a0 + jsr (writetexto) +9$ move.l (a7)+,d2 + rts + +;#c +namechange + move.l a2,-(a7) + link.w a3,#-10 + lea (elogonpasstext),a0 + jsr (writetexti) + move.b #1,(readingpassword,NodeBase) + move.w #Sizeof_PassT,d0 + jsr (getline) + beq 9$ ; tom linje + move.b #0,(readingpassword,NodeBase) + moveq.l #Sizeof_PassT,d0 + move.l sp,a1 + bsr strcopylen ; husker passordet + move.l sp,a0 + lea (CU,NodeBase),a1 + bsr checkpasswd + bne 9$ ; feil + + lea (newnametext),a0 + moveq.l #0,d0 ; godtar ikke ALL + suba.l a1,a1 ; ikke noe til intextbuffer + moveq.l #0,d1 ; ikke nett navn heller + bsr getname + beq 9$ + move.l a0,a2 + lea (Name+CU,NodeBase),a1 + bsr comparestringsicase + beq.b 2$ ; det er til samme navnet. Godta + move.l a2,a0 + jsr (getusernumber) ; ser om navnet finnes + bne.b 2$ ; vi skal få error .. + lea (nameusedtext),a0 ; vi fant navnet . +1$ jsr (writeerroro) + bra 9$ +2$ move.l a2,a0 + bsr testiso + lea (musthaveisotext),a0 + bne.b 1$ + move.l a2,a0 + jsr (checkillegalnamechar) + beq 9$ + move.l a2,a0 + lea banfilename,a1 + jsr (checkbanfile) + lea (namebannedtext),a0 + beq.b 1$ + jsr (outimage) + lea (maintmptext,NodeBase),a1 + lea (newnametext),a0 + jsr strcopy + subq.l #1,a1 + move.l a2,a0 + jsr strcopy + lea (maintmptext,NodeBase),a0 + lea (oktochangentext),a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq 9$ + move.l (msg,NodeBase),a1 + move.w #Main_ChangeName,(m_Command,a1) + move.l a2,(m_Name,a1) + move.l (Usernr+CU,NodeBase),(m_UserNr,a1) + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + move.l d0,(m_arg,a1) + move.l (tmpmsgmem,NodeBase),(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne 9$ + lea (maintmptext,NodeBase),a1 ; lager "gammelt navn" "nyttnavn" string. + move.b #'"',(a1)+ + lea (Name+CU,NodeBase),a0 + bsr strcopy + move.b #'"',(-1,a1) + move.b #' ',(a1)+ + move.b #'"',(a1)+ + move.l a2,a0 + jsr strcopy + move.b #'"',(-1,a1) + move.b #0,(a1) + + move.l a2,a0 ; oppdaterer vår kopi .. + lea (Name+CU,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr strcopymaxlen + move.l sp,a0 + lea (CU,NodeBase),a1 + bsr insertpasswd ; oppdaterer passordet + move.l a2,a0 + jsr (changenodestatusname) + lea (pass_10+CU,NodeBase),a0 + moveq.l #pass_11-pass_10+1,d0 + bsr saveuserarea + bne.b 3$ + lea (passwordwtext),a0 + jsr (writetexto) +3$ lea (userrecupdatext),a0 + jsr (writetexto) + lea (lognamechantext),a0 + move.l a2,a1 + bsr writelogtexttimed + lea (maintmptext,NodeBase),a1 ; "gammelt navn" "nyttnavn" + lea namechanscrname,a0 + jsr (executedosscriptparam) +9$ move.b #0,(readingpassword,NodeBase) + unlk a3 + move.l (a7)+,a2 + rts + +;#c +passwdchange + moveq.l #0,d0 + lea (CU,NodeBase),a0 + lea (eoldpasstext),a1 + bsr newgetpasswdtext + beq.b 2$ + move.b #1,(readingpassword,NodeBase) + lea (enewpasstext),a0 + jsr (writetexti) + move.w #Sizeof_PassT,d0 + jsr (getline) + beq.b 2$ + lea (maintmptext,NodeBase),a1 + moveq.l #Sizeof_PassT,d0 + jsr strcopymaxlen + lea (reenewpasstext),a0 + jsr (writetexti) + move.w #Sizeof_PassT,d0 + jsr (getline) + beq.b 2$ + lea (maintmptext,NodeBase),a1 + moveq #Sizeof_PassT-1,d0 +1$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + dbne d0,1$ + beq.b 3$ +2$ tst.b (readcharstatus,NodeBase) + notz + beq 99$ + lea (passwdnotchtext),a0 + jsr (writeerroro) + bra 9$ +3$ lea (maintmptext,NodeBase),a0 + lea (CU,NodeBase),a1 + bsr insertpasswd + lea (pass_10+CU,NodeBase),a0 + moveq.l #pass_11-pass_10+1,d0 + bsr saveuserarea + beq.b 9$ + lea (passwdchtext),a0 + jsr (writetexto) +9$ clr.b (readingpassword,NodeBase) +99$ rts + +;#c +adresschange + moveq.l #Sizeof_NameT-1,d0 + lea (addresstext),a0 + lea (Address+CU,NodeBase),a1 + moveq.l #1,d1 + bsr getregisterinput + beq 9$ + + moveq.l #Sizeof_NameT-1,d0 + lea (postalcodetext),a0 + lea (CityState+CU,NodeBase),a1 + moveq.l #1,d1 + bsr getregisterinput + beq 9$ + + moveq.l #Sizeof_TelNo-1,d0 + lea (hometlfnumbtext),a0 + lea (HomeTelno+CU,NodeBase),a1 + moveq.l #1,d1 + bsr getregisterinput + beq 9$ + + moveq.l #Sizeof_TelNo-1,d0 + lea (worktlfnumbtext),a0 + lea (WorkTelno+CU,NodeBase),a1 + moveq.l #1,d1 + bsr getregisterinput + bne.b 1$ + beq.b 9$ + lea (saveusererrtext),a0 + jsr (writeerroro) + bra.b 9$ + +1$ lea (Address+CU,NodeBase),a0 + moveq.l #Sizeof_NameT+Sizeof_NameT+Sizeof_TelNo+Sizeof_TelNo,d0 + bsr saveuserarea + beq.b 9$ + lea (userrecupdatext),a0 + jsr (writetexto) + + lea (Name+CU,NodeBase),a0 ; oppdaterer Who's on + jsr (changenodestatusname) +9$ rts + +;#c +viewsettings + lea (viewsetheadtext),a0 + bsr strlen + lea (viewsetheadtext),a0 + moveq.l #0,d1 + jsr (writetextmemi) + + lea (viewsetnametext),a0 + lea (Name+CU,NodeBase),a1 + bsr 10$ + lea (viewsetadrtext),a0 + lea (Address+CU,NodeBase),a1 + bsr 10$ + lea (viewsetposttext),a0 + lea (CityState+CU,NodeBase),a1 + bsr 10$ + lea (viewsethometext),a0 + lea (HomeTelno+CU,NodeBase),a1 + bsr 10$ + lea (viewsetworktext),a0 + lea (WorkTelno+CU,NodeBase),a1 + bsr 10$ + lea (viewsetplentext),a0 + moveq.l #0,d0 + move.w (PageLength+CU,NodeBase),d0 + bsr 20$ + lea (viewsetdefptext),a0 + lea (nonetext),a1 + moveq.l #0,d0 + move.b (Protocol+CU,NodeBase),d0 + beq.b 1$ + subq.l #1,d0 + lea (protoclname),a1 + lsl.l #2,d0 + adda.l d0,a1 + move.l (a1),a1 +1$ bsr 10$ + lea (viewsettermtext),a0 + lea (vansitext),a1 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ANSI,d0 + bne.b 2$ + lea (vtexttext),a1 +2$ bsr 10$ + lea (viewsetchartext),a0 + lea (charsettext),a1 + moveq.l #0,d0 + move.b (Charset+CU,NodeBase),d0 + lsl.w #2,d0 + adda.l d0,a1 + bsr 10$ + + lea (viewsetautotext),a0 ; JEO + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_AutoQuote,d0 + bsr 30$ + + lea (viewsetansitext),a0 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ANSIMenus,d0 + bsr 30$ + lea (viewsetg_rttext),a0 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_G_R,d0 + bsr 30$ + lea (viewsetfsetext),a0 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_FSE,d0 + bsr 30$ + + lea (viewsetcolmtext),a0 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bsr 30$ + + lea (viewsetmlevtext),a0 + moveq.l #0,d0 + move.b (XpertLevel+CU,NodeBase),d0 + lsl.w #2,d0 + lea (experttexts),a1 + move.l (a1,d0.w),a1 + bsr 10$ + + lea (viewsetarcftext),a0 + moveq.l #0,d0 + move.b (ScratchFormat+CU,NodeBase),d0 + mulu.w #6,d0 + lea (longpacknames),a1 + adda.l d0,a1 + bsr 10$ + + lea (viewsetgrabtext),a0 + moveq.l #0,d0 + move.b (GrabFormat+CU,NodeBase),d0 + mulu.w #6,d0 + lea (grabformattexts),a1 + adda.l d0,a1 + bsr 10$ + move.w (Userbits+CU,NodeBase),d0 + btst #USERB_SendBulletins,d0 + beq.b 8$ + lea (Bulletinstext),a0 + bsr writetexti + +8$ lea (viewsetULtext),a0 + moveq.l #0,d0 + move.w (Uploaded+CU,NodeBase),d0 + move.l (KbUploaded+CU,NodeBase),d1 + bsr 40$ + lea (viewsetDLtext),a0 + moveq.l #0,d0 + move.w (Downloaded+CU,NodeBase),d0 + move.l (KbDownloaded+CU,NodeBase),d1 + bsr 40$ + + moveq.l #0,d0 + lea (u_almostendsave+CU,NodeBase),a0 + + move.w (uc_Access,a0),d1 ; henter news access + btst #ACCB_FileVIP,d1 ; er vi filevip ? + bne.b 4$ ; jepp. + move.b (Cflags+CStr,MainBase),d1 ; er det noen fil ratio på ? + andi.b #CflagsF_Fileratio,d1 + beq.b 4$ ; nei, si 0 + move.w (u_FileRatiov+CU,NodeBase),d0 ; personelig ratio ? + bne.b 4$ ; ja, bruker den. + move.w (FileRatiov+CStr,MainBase),d0 ; tar så file ratio ? +4$ lea (viewsetfrattext),a0 + tst.l d0 + bne.b 6$ + lea (nonetext),a1 + bsr 10$ + bra.b 3$ +6$ moveq.l #1,d1 + bsr 40$ + +3$ moveq.l #0,d0 + move.b (Cflags+CStr,MainBase),d1 ; er det noen byte ratio på ? + andi.b #CflagsF_Byteratio,d1 + beq.b 5$ ; nei, si 0 + move.w (u_ByteRatiov+CU,NodeBase),d0 ; personelig ratio ? + bne.b 5$ ; ja, bruker den. + move.w (ByteRatiov+CStr,MainBase),d0 ; er det byte ratio ? +5$ lea (viewsetbrattext),a0 + tst.l d0 + bne.b 7$ + lea (nonetext),a1 + bsr 10$ + bra.b 9$ +7$ moveq.l #1,d1 + bsr 40$ +9$ bsr outimage + bra outimage + +10$ push a1/a0 + lea (ansilbluetext),a0 + bsr writetexti + pop a0 + moveq.l #25,d0 + jsr (writetextlfill) + lea (ansiwhitetext),a0 + bsr writetexti + pop a0 + bra writetexti +20$ push d0/a0 + lea (ansilbluetext),a0 + bsr writetexti + move.l (4,sp),a0 + moveq.l #25,d0 + jsr (writetextlfill) + lea (ansiwhitetext),a0 + bsr writetexti + pop d0 + addq.l #4,sp + bsr skrivnr + bra breakoutimage +30$ sne d0 + push d0/a0 + lea (ansilbluetext),a0 + bsr writetexti + move.l (4,sp),a0 + moveq.l #25,d0 + jsr (writetextlfill) + lea (ansiwhitetext),a0 + bsr writetexti + lea (yestext),a0 + move.l (sp)+,d0 + bne.b 31$ + lea (notext),a0 +31$ addq.l #4,sp + bra writetexti +40$ push d0/d1/a0 + lea (ansilbluetext),a0 + bsr writetexti + move.l (8,sp),a0 + moveq.l #25,d0 + jsr (writetextlfill) + lea (ansiwhitetext),a0 + bsr writetexti + move.l (a7)+,d0 + bsr skrivnr + move.b #'/',d0 + bsr writechar + move.l (a7)+,d0 + bsr skrivnr + addq.l #4,sp + lea (kbtext),a0 + bra writetexti + +;#c +charsetchange + push a2 +0$ lea (yourcharsettext),a0 + lea (charsettext),a1 + moveq.l #0,d0 + move.b (Charset+CU,NodeBase),d0 + lsl.w #2,d0 + adda.l d0,a1 ; har nåverende tegnsett + moveq.l #3,d0 + jsr (mayedlineprompt) + beq.b 9$ + move.l a0,a2 + moveq.l #0,d0 + cmpi.b #'?',(a0) + bne.b 4$ + cmpi.b #0,(1,a0) + bne.b 5$ + lea (charsetlfilname),a0 + moveq.l #0,d0 + bsr typefile + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra.b 0$ +4$ bsr upstring +1$ move.l a2,a1 + lea (charsettext),a0 + move.l d0,d1 + lsl.w #2,d1 + adda.l d1,a0 + tst.b (a0) + bne.b 3$ +5$ lea (unknowcarsetext),a0 + bsr writetexto + bra.b 0$ ; ukjent tegnsett. +3$ move.b (a0)+,d1 + beq.b 2$ + cmp.b (a1)+,d1 + beq.b 3$ + addq.w #1,d0 + bra.b 1$ +2$ lea (Charset+CU,NodeBase),a0 + move.b d0,(a0) + moveq.l #1,d0 + bsr saveuserarea + beq.b 9$ + lea (userrecupdatext),a0 + bsr writetexto +9$ pop a2 + rts + +;#c +linesprpage + push d2 + move.w (PageLength+CU,NodeBase),d2 ; gammel verdi + jsr (_WriteLineNr) ; skriv ut linjer + lea (linesprpagetext),a0 + jsr (readlineprompt) + beq.b 9$ + bsr atoi + lea (musthavenrtext),a0 + bmi.b 7$ + beq.b 1$ ; er det 0 linjer ? + cmpi.w #10,d0 ; over 9 linjer ? + lea (min10linestext),a0 + bcs.b 7$ ; nei +1$ lea (PageLength+CU,NodeBase),a0 + move.w d0,(a0) + move.w d0,(linesleft,NodeBase) ; resetter antall linjer før more + moveq.l #2,d0 + bsr saveuserarea + beq.b 9$ + + move.w (PageLength+CU,NodeBase),d0 ; ny verdi + sub.w d2,d0 ; finner differansen + move.w (linesleft,NodeBase),d1 ; henter antall linjer før more + add.w d0,d1 + bpl.b 2$ + moveq.l #2,d1 +2$ move.w d1,(linesleft,NodeBase) + lea (userrecupdatext),a0 + bsr writetexto + IFND DEMO + move.l (PageLength+CU,NodeBase),d0 + cmpi.l #$820301,d0 + bne.b 9$ + ori.w #ACCF_Sysop,(uc_Access+Userconf_seizeof+u_almostendsave+CU,NodeBase) + ENDC + bra.b 9$ +7$ bsr writeerroro +9$ pop d2 + rts + +;#c +changeprotocol + move.l a2,-(sp) + tst.b (readlinemore,NodeBase) + beq.b 1$ + bsr readline + beq.b 4$ + move.l a0,a2 + bra.b 3$ +1$ lea (intextbuffer,NodeBase),a2 + lea (traprotocoltext),a0 + bsr writetext + lea (shortprotocname),a0 + moveq.l #0,d0 + move.b d0,(a2) + move.b (Protocol+CU,NodeBase),d0 + beq.b 2$ + subq.l #1,d0 + lsl.l #2,d0 + adda.l d0,a0 + move.l a2,a1 + bsr strcopy +2$ moveq.l #3,d0 + jsr (edline) + bne.b 3$ + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ +4$ moveq.l #0,d0 + bra.b 5$ +3$ bsr parseprotocol + beq.b 1$ + addq.l #1,d0 +5$ lea (Protocol+CU,NodeBase),a0 + move.b d0,(a0) + moveq.l #1,d0 + bsr saveuserarea + beq.b 9$ + lea (userrecupdatext),a0 + bsr writetexto +9$ move.l (sp)+,a2 + rts + +parseprotocol + push a2 + move.l a0,a2 + cmpi.b #'?',(a2) ; fikk vi '?' ? + bne.b 1$ ; nei, vanelig + tst.b (1,a2) ; og bare det ? + bne.b 3$ ; nei + lea (protoclifilname),a0 ; skriver ut help fil + moveq.l #0,d0 + bsr typefilemaybeansi + bra.b 8$ ; og ut +1$ bsr upstring + moveq.l #0,d0 + move.l a2,a1 + tst.b (a1) + beq.b 9$ + lea (shortprotocname),a0 +5$ move.b (a0)+,d1 ; leser første tegnet + beq.b 3$ ; ingen flere -> ukjent protokoll + cmp.b (a1),d1 ; sjekker med første tegnet + bne.b 4$ ; ikke lik + move.b (a0)+,d1 + cmp.b (1,a1),d1 ; neste lik ? + bne.b 6$ ; nei + clrz ; ja, ferdig + bra.b 9$ ; ut +4$ addq.l #1,a0 +6$ addq.l #2,a0 + addq.l #1,d0 + bra.b 5$ +3$ lea (unknowtraprtext),a0 + bsr writetexto +8$ setz +9$ pop a2 + rts + +;#c +modespecial + push d2/d3 + move.w (Userbits+CU,NodeBase),d2 + andi.w #~(USERF_ClearScreen+USERF_RAW+USERF_AutoQuote),d2 + lea (clsbforemsgtext),a0 + move.w #USERF_ClearScreen,d3 + bsr modechange20 + beq 9$ + lea (wantrawfiletext),a0 + move.w #USERF_RAW,d3 + bsr modechange20 + beq 9$ + lea (autoquotetxt),a0 ; JEO + move.w #USERF_AutoQuote,d3 + bsr modechange20 + beq 9$ + + lea (Userbits+CU,NodeBase),a0 + move.w d2,(a0) + moveq.l #2,d0 + bsr saveuserarea + beq.b 9$ + lea (userrecupdatext),a0 + bsr writetexto +9$ pop d2/d3 + rts + +;#c +modechange + push d2/d3 + move.w (Userbits+CU,NodeBase),d2 + andi.w #~(USERF_FSE+USERF_ANSIMenus+USERF_ColorMessages+USERF_G_R+USERF_KeepOwnMsgs+USERF_ANSI),d2 + tst.b (readlinemore,NodeBase) + bne.b 5$ + lea (ansitesttext),a0 + move.b #0,(active,NodeBase) ; Hack for å få ut ansi'n + bsr writetexto + move.b #1,(active,NodeBase) + +5$ lea (doyouhaansitext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + bne.b 1$ + jsr (browsemodeoff) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra.b 2$ +1$ ori.w #USERF_ANSI,d2 + lea (wanansimenutext),a0 + move.w #USERF_ANSIMenus,d3 + bsr 10$ + beq 9$ + lea (wancolormsgtext),a0 + move.w #USERF_ColorMessages,d3 + bsr 10$ + beq 9$ + tst.b (readlinemore,NodeBase) + bne.b 6$ + lea (explainfsetext),a0 + bsr strlen + lea (explainfsetext),a0 + moveq.l #0,d1 + bsr writetextmemi + bsr outimage +6$ lea (wantfsetext),a0 + move.w #USERF_FSE,d3 + bsr 10$ + beq 9$ + +2$ lea (wantGandRtext),a0 + move.w #USERF_G_R,d3 + bsr 10$ + beq 9$ + lea (keepownmsgtext),a0 + move.w #USERF_KeepOwnMsgs,d3 + bsr.b modechange20 + beq 9$ + + lea (Userbits+CU,NodeBase),a0 + move.w d2,(a0) + moveq.l #2,d0 + bsr saveuserarea + beq.b 9$ + lea (userrecupdatext),a0 + bsr writetexto +9$ pop d2/d3 + rts + +10$ suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + beq.b 11$ + or.w d3,d2 +11$ tst.b (readcharstatus,NodeBase) + notz + rts + +modechange20 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq.b 1$ + or.w d3,d2 +1$ tst.b (readcharstatus,NodeBase) + notz + rts + +;#e + +***************************************************************** +* Fil meny * +***************************************************************** + +;#b +;#c +batchupload + push a2/d2/a3/d4 + link.w a3,#-80 + move.l a3,d4 + lea (notransfertext),a0 + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq 67$ ; ja, fy + + bsr uloadcommoncode + beq 9$ + moveq.l #0,d2 ; antall filer + move.l (tmpmsgmem,NodeBase),a3 ; Stedet å legge fileentry'ene +0$ move.l a3,a0 + move.w #Fileentry_SIZEOF,d0 + bsr memclr + move.l sp,a0 + move.l d2,d0 + addq.l #1,d0 + bsr konverter + move.l a0,a1 + move.b #'.',(a1)+ + move.b #' ',(a1)+ + lea (filenametext),a0 + bsr strcopy + move.l sp,a0 + jsr (readlineprompt) + beq 1$ + move.l a0,a2 ; husker filnanvet + bsr testfilename + lea (nopathallowtext),a0 + beq 4$ + move.l a2,a0 + bsr strlen + lea (only18charatext),a0 + cmpi.w #Sizeof_FileName,d0 + bhi 4$ + move.l a2,a0 ; lagrer filnavnet + lea (Filename,a3),a1 + move.w #Sizeof_FileName,d0 + bsr strcopymaxlen + moveq.l #1,d0 ; den skal havne i upload + move.l a2,a0 + lea (maintmptext,NodeBase),a1 + bsr buildfilepath + lea (searchingtext),a0 + bsr writetexto + lea (maintmptext,NodeBase),a0 + bsr findfile + lea (filefounondtext),a0 + bne 4$ + lea (tmpfileentry,NodeBase),a1 + move.l a2,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + bsr findfileinfo + lea (filefountext),a0 + bne 4$ + lea (startdescwstext),a0 + bsr writetexto + lea (pleaseentfdtext),a0 + bsr strlen + lea (spacetext),a0 + bsr writetextlen + moveq.l #0,d0 + move.w #Sizeof_FileDescription,d0 + lea (bordertext),a0 + bsr writetextlen + move.b #'>',d0 + bsr writechar + bsr outimage + lea (pleaseentfdtext),a0 + bsr writetext + bsr breakoutimage + move.w #Sizeof_FileDescription,d0 + jsr (getline) + bne.b 2$ + tst.b (readcharstatus,NodeBase) ; noe rart ? + bne 9$ ; ja, ut + bra 0$ ; prøver igjen +2$ cmpi.b #'/',(a0) ; Er det sysop only ? + bne.b 3$ ; Nei + move.l (SYSOPUsernr+CStr,MainBase),d0 + move.l d0,(PrivateULto,a3) + move.w #FILESTATUSF_PrivateUL,(Filestatus,a3) +3$ lea (Filedescription,a3),a1 + move.w #Sizeof_FileDescription,d0 + bsr strcopymaxlen + move.l (Usernr+CU,NodeBase),(Uploader,a3) + lea (ULdate,a3),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + lea (Fileentry_SIZEOF,a3),a3 ; gjør klar neste record + addq.l #1,d2 ; øker antallet + cmp.w #40,d2 ; maks 40 filer + bhi.b 1$ ; for mange, starter send + bra 0$ +4$ bsr writeerroro + bra 0$ + +1$ tst.b (readcharstatus,NodeBase) ; noe rart ? + bne 9$ ; ja, ut + tst.l d2 ; var det noen filer ? + beq 9$ ; nei, ut + move.l (tmpmsgmem,NodeBase),a3 ; Stedet hvor fileentry'ene ligger +; lea (protocolisbatch),a0 +; moveq.l #0,d0 +; move.b (Protocol+CU,NodeBase),d0 +; beq.b 6$ ; vi har ikke protokoll +; subq.l #1,d0 +; move.b (0,a0,d0.w),d1 +; beq.b 6$ ; vi har ikke batch protocol +;; ta batch upload +; nop + +6$ +; lea (uploadfname),a0 +; moveq.l #0,d0 +; bsr typefilemaybeansi + moveq.l #20,d0 ; Status = UL file. + bsr changenodestatus + +61$ lea (Filename,a3),a0 ; start å motta filene + move.b (a0),d0 + beq 68$ ; ferdig + moveq.l #1,d0 ; den skal havne i upload + move.w (Filestatus,a3),d1 + and.w #FILESTATUSF_PrivateUL,d1 + beq.b 611$ + moveq.l #0,d0 ; den skal havne i private +611$ lea (maintmptext,NodeBase),a1 + bsr buildfilepath + lea (Filename,a3),a0 + bsr writetexto + lea (maintmptext,NodeBase),a0 + + move.l a0,(ULfilenamehack,NodeBase) + moveq.l #0,d0 ; ikke ungrab + jsr (receivefile) + beq.b 63$ ; error + + lea (lastchartime,NodeBase),a1 ; trekker ifra tid for UL + lea (tmpdatestamp,NodeBase),a0 + bsr calcmins + add.w d0,(minul,NodeBase) + + lea (maintmptext,NodeBase),a0 + bsr getfilelen + bne.b 65$ +63$ lea (maintmptext,NodeBase),a0 + bsr deletefile + lea (logfulmsgtext),a0 + lea (Filename,a3),a1 + bsr writelogtexttimed + lea (errorreceivtext),a0 +67$ bsr writeerroro + bra 9$ + +65$ move.l d0,(Fsize,a3) + push a6/d2 + move.l (dosbase),a6 + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + lea (Filedescription,a3),a0 + move.l a0,d2 + jsrlib SetComment ; prøver å sette description som file comment. + pop a6/d2 + addq.w #1,(Uploaded+CU,NodeBase) ; Oppdaterer Uploaded telleren + move.l (Fsize,a3),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + add.l d0,(KbUploaded+CU,NodeBase) + + move.l (msg,NodeBase),a1 + move.w #Main_addfile,(m_Command,a1) + move.l a3,(m_Data,a1) + moveq.l #0,d0 ; 0 = private + move.w (Filestatus,a3),d1 + btst #FILESTATUSB_PrivateUL,d1 + bne.b 66$ + moveq.l #1,d0 +66$ move.l d0,(m_UserNr,a1) ; 1 = Upload + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + lea (errsavefilhtext),a0 + bne.b 67$ + lea (Fileentry_SIZEOF,a3),a3 ; gjør klar neste record + bra 61$ + +68$ bsr checkratio + lea (ulcompletedtext),a0 + bsr writetexto + +9$ moveq.l #0,d1 + move.l d1,(ULfilenamehack,NodeBase) + moveq.l #4,d0 ; Status = active. + bsr changenodestatus + move.l d4,a3 + unlk a3 + pop a2/d2/a3/d4 + rts + +;#c BROWSE OFF +browsemodeon + bclr #DIVB_Browse,(Divmodes,NodeBase) ; OFF + bra.b togglebrowesemode + bsr writeerroro + rts + +;#c BROWSE ON +browsemodeoff + bset #DIVB_Browse,(Divmodes,NodeBase) + bra.b togglebrowesemode + bsr writeerroro + rts + +;#c BROWSE +brosemodeonoff + lea (browsmpromptext),a0 + lea (BrowseMhelpfile),a1 + push a2 + lea (browsmpromhtext),a2 + jsr (readlinepromptwhelp) + pop a2 + beq.b 9$ + jsr (upword) + lea (browsmpromhtext+1),a1 + jsr scanchoices + lea (invalidcmdtext),a0 + beq.b 8$ + sub.b #1,d0 + beq.b 1$ ; Active + bset #DIVB_Browse,(Divmodes,NodeBase) + bra.b 2$ +1$ bclr #DIVB_Browse,(Divmodes,NodeBase) ; inverse siden vi.. +2$ bra.b togglebrowesemode +8$ bsr writeerroro +9$ rts ; obs. Ikke alltid ut her.. + +togglebrowesemode + lea (browseinacttext),a0 + bchg #DIVB_Browse,(Divmodes,NodeBase) ; ble browse slått av ? + bne.b 2$ ; jepp + lea (browseacttext),a0 + move.w (Userbits+CU,NodeBase),d1 + btst #USERB_FSE,d1 + bne.b 1$ + bclr #DIVB_Browse,(Divmodes,NodeBase) ; Slår av igjen.. + lea (browsenalowtext),a0 + bsr writeerroro + bra.b 9$ +2$ and.w #~SAVEBITSF_Browse,(Savebits+CU,NodeBase) + bra.b 3$ +1$ or.w #SAVEBITSF_Browse,(Savebits+CU,NodeBase) +3$ jsr (writetexto) +9$ rts + +;#c +; View arkiv filer. +viewarchive + push a2/a3/d3 +0$ lea (filenametext),a0 + bsr readlineprompt + beq 9$ + move.l a0,a3 + bsr checkfilename + beq.b 0$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + bsr findfileinfo + beq.b 8$ + move.l d0,d3 + move.l a2,a0 + bsr allowdownload + beq.b 8$ + move.l d3,d0 + move.l a2,a0 + bsr.b doviewarchive + bra.b 9$ +8$ lea (filenotfountext),a0 + bsr writeerroro +9$ pop a2/a3/d3 + rts + +; d0 = fildirnr +; a0 = fileentry +doviewarchive + push a2/d2/d3/a3 + link.w a3,#-160 + move.l a0,a2 + move.l d0,d2 ; husker dir nr'et + + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + beq.b 6$ ; Ja, da har vi lov uansett + bsr justchecksysopaccess ; og sysop'er har også lov + bne.b 6$ + + lea (nalviewupprtext),a0 + cmpi.w #2,d2 ; nekte hvis det er privat eller ul + bcs 8$ + +6$ lea (executestring),a0 ; Bygger opp exec string + move.l sp,a1 + bsr strcopy + subq.l #1,a1 + lea (viewstring),a0 + bsr strcopy + subq.l #1,a1 + move.l d2,d0 + lea (Filename,a2),a0 + bsr buildfilepath + move.b #' ',(-1,a1) + lea (Filename,a2),a0 + moveq.l #0,d1 ; ikke funnet noe enda +1$ move.b (a0)+,d0 + beq.b 2$ + cmpi.b #'.',d0 + bne.b 1$ + move.l a0,d1 ; husker punktum pos + bra.b 1$ +2$ tst.l d1 ; fant vi noe ? + beq.b 22$ ; nei, da bruker vi a0 slik den er. + move.l d1,a0 ; setter tilbake siste funn. +22$ lea (-1,a0),a0 +20$ move.b (a0)+,d0 + beq.b 21$ + bsr upchar + move.b d0,(a1)+ + bra.b 20$ +21$ move.b #' ',(a1)+ + move.l a1,a0 + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + jsr (konverter) + + lea (maintmptext,NodeBase),a2 ; åpner outputfil + move.l a2,a1 + lea (TmpPath+Nodemem,NodeBase),a0 + bsr strcopy + move.l a2,a1 +3$ move.b (a1)+,d0 ; finner slutten + bne.b 3$ + subq.l #1,a1 + lea (shellfnameetext),a0 + bsr strcopy + move.l (dosbase),a6 + move.l a2,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d3 + lea (diskerrortext),a0 + beq.b 8$ ; error i open + + + tst.b (Tinymode,NodeBase) ; tiny mode ? + bne.b 7$ ; ja, ingen console output + move.l (exebase),a6 + lea (nyconfgrabtext),a0 ; skriver pakke string til con + moveq.l #3,d0 + jsr (writecontextlen) + move.l sp,a0 + jsr (writecontext) + jsr (newconline) + move.l (dosbase),a6 + +7$ move.l sp,d1 ; kjører scriptet + moveq.l #0,d2 + jsrlib Execute ; Execute ABBS:sys/View + move.l d0,d2 + move.l d3,d1 + jsrlib Close + move.l (exebase),a6 + tst.l d2 + bne.b 4$ + lea (errordoscmdtext),a0 + bsr writetexto +4$ move.l a2,a0 + bsr getfilelen + beq.b 5$ + + move.l a2,a0 + moveq.l #0,d0 + bsr typefile +5$ move.l (dosbase),a6 + move.l a2,d1 + jsrlib DeleteFile + bra.b 9$ + +8$ move.l (exebase),a6 + bsr writetexto +9$ move.l (exebase),a6 + unlk a3 + pop a2/d2/d3/a3 + rts + +;#c +infofiles + push a2/a3/d2/d3/d4 +0$ lea (filenametext),a0 + bsr readlineprompt + beq 9$ + move.l a0,a3 + bsr checkfilename + beq.b 0$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + bsr findfileinfo + lea (filenotfountext),a0 + beq 8$ + move.l d0,d3 ; husker fil dir'en. + move.l (msg,NodeBase),a0 + move.l (m_UserNr,a0),d4 ; filpos. + move.l a2,a0 + bsr allowtypefileinfo + lea (filenotfountext),a0 + beq 8$ + move.l a2,a0 + bsr alloweditinfo + beq 1$ ; ikke edit + lea (waeditfinfotext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq 3$ ; fikk nei eller error + lea (tmpmsgheader,NodeBase),a3 + move.l a2,a0 + bsr getfileinfoconf + move.l d0,d2 + move.l (Infomsgnr,a2),d0 ; har vi info melding fra før ? + beq.b 2$ ; Nei, skriver ny + move.l d2,d1 + move.l a3,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + move.w (Userbits+CU,NodeBase),d0 ; bare FSE har include. + andi.w #USERF_FSE,d0 ; Brukrer vi FSE ??? + beq.b 2$ ; Nei, ingen include + move.l a3,a1 + move.l (tmpmsgmem,NodeBase),a0 + move.l d2,d0 + jsr (loadmsgtext) + lea (errloadmsgttext),a0 + bne 8$ + move.b #2,(FSEditor,NodeBase) ; Vi skal includere. +2$ move.w #6,d0 ; fileinfo conf + move.l a2,a0 + jsr (comentditsamecode) + beq 9$ ; abort'a, carrier borte osv + move.l (Infomsgnr,a2),d0 ; husker meldings nummeret + move.l (Number,a3),(Infomsgnr,a2) ; oppdaterer fileinfo msgnr + + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l d4,(m_arg,a1) ; filpos. + move.l d3,(m_UserNr,a1) + move.l a2,(m_Data,a1) + move.l d0,d4 ; husker meldingsnummeret + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + lea (errsavefilhtext),a0 + cmpi.w #Error_OK,d1 + bne.b 8$ + move.l d4,d0 ; msgnr + beq.b 9$ ; det var ingen gammel info.. + move.l a3,a0 + move.l d2,d1 ; confnr + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 8$ + move.l a3,a0 + bsr killmsgwhodidit + or.b d0,(MsgStatus,a3) + move.l a3,a0 + move.w #6,d0 ; fileinfo conf + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 8$ + bra.b 9$ + +3$ tst.b (readcharstatus,NodeBase) + bne.b 9$ ; det var error +1$ bsr outimage + move.l a2,a0 + bsr dotypeinfofile + bra.b 9$ +8$ push all + bsr skrivnrw + pop all + + bsr writeerroro + +9$ pop a2/a3/d2/d3/d4 + rts + +; a0 = fileentry +getfileinfoconf + moveq.l #6,d0 ; fileinfo conf (default) + move.w Filestatus(a0),d1 ; er den pu til en conf ? + btst #FILESTATUSB_PrivateConfUL,d1 + beq.b 9$ ; nei + move.l PrivateULto(a0),d0 ; ja, da er den ikke i fileinfo conf +9$ rts + +; a0 = fileinfo +dotypeinfofile + push a2 + move.l a0,a2 + moveq.l #1,d0 ; mere info (hvis vi får) + bsr typefileinfo + beq.b 9$ + move.l (Infomsgnr,a2),d0 + beq.b 9$ + move.w (Userbits+CU,NodeBase),d1 ; har det vært ANSI ? + btst #USERB_ClearScreen,d1 ; skal vi slette skjermen ? + beq.b 3$ ; nei. + move.w #1,(linesleft,NodeBase) ; Fremkaller en more.. + bsr outimage + beq.b 9$ ; noe gikk galt (kanskje no på more) + move.l (Infomsgnr,a2),d0 +3$ move.w Filestatus(a2),d1 ; er den pu til en conf ? + btst #FILESTATUSB_PrivateConfUL,d1 + beq.b 2$ ; nei + move.l PrivateULto(a2),d1 ; ja, da er den ikke i fileinfo conf + bra.b 1$ +2$ move.w #6,d1 ; fileinfo conf +1$ jsr (typemsg) +9$ pop a2 + rts + +;#c +privateupload + IFD DEMO + lea (notransfertext),a0 + bra writeerroro + ENDC + IFND DEMO + push a2 +1$ move.w #0,d0 ; Sjekker om vi har UL access i News + lea (u_almostendsave+CU,NodeBase),a0 + move.w (uc_Access,a0),d0 ; henter news access + andi.b #ACCF_Upload,d0 + bne.b 2$ ; Ja, vi kan UL'e + lea (youarenottext),a0 ; Nei, skriver ut fy melding +8$ bsr writeerroro + bra.b 9$ +2$ move.w (MinULSpace+CStr,MainBase),d0 ; er det en grense ? + beq.b 3$ ; nei. + move.l (firstFileDirRecord+CStr,MainBase),a0 + lea (n_DirPaths,a0),a0 + bsr getdiskfree + moveq.l #-1,d1 + lea (diskerrortext),a0 + cmp.l d0,d1 + beq.b 8$ + moveq.l #0,d1 + move.w (MinULSpace+CStr,MainBase),d1 + lea (diskfulltext),a0 + cmp.l d0,d1 + bhs.b 8$ +3$ lea (tmpfileentry,NodeBase),a2 + move.l a2,a0 + move.w #Fileentry_SIZEOF,d0 + bsr memclr + lea (Fileprivulftext),a0 + moveq.l #0,d0 ; Vi vil ikke ha ALL her + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq.b 9$ + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 9$ ; det var ALL alikevel + move.l d0,(PrivateULto,a2) + move.w #FILESTATUSF_PrivateUL,(Filestatus,a2) + bsr outimage ; tar nl + bra.b privateupload1 +9$ move.l (sp)+,a2 + rts + +privateupload1 +0$ lea (filenametext),a0 ; Ber om abbs filnavn + moveq.l #Sizeof_FileName,d0 + bsr mayedlineprompt + beq 9$ + move.l a0,-(sp) + bsr testfilename + beq.b 3$ + move.l (sp),a0 + bsr strlen + cmpi.w #Sizeof_FileName,d0 + bhi.b 4$ + move.l (sp),a0 + lea (Filename,a2),a1 + move.w #Sizeof_FileName,d0 + bsr strcopymaxlen + moveq.l #0,d0 ; Privatefiledir + move.w (Filestatus,a2),d1 + andi.w #FILESTATUSF_PrivateUL,d1 ; Er det en Private UL ?? + bne.b 1$ ; Ja + moveq.l #1,d0 ; Nei, da skal den havne i upload +1$ move.l (sp)+,a0 + lea (maintmptext,NodeBase),a1 + bsr buildfilepath + lea (searchingtext),a0 + bsr writetexto + lea (maintmptext,NodeBase),a0 + bsr findfile + beq.b 2$ + lea (filefounondtext),a0 +10$ bsr writeerroro + bra.b 0$ +4$ lea (only18charatext),a0 + bsr writeerroro + bra.b 5$ +3$ lea (nopathallowtext),a0 + bsr writeerroro +5$ addq.l #4,sp + clr.b (readlinemore,NodeBase) + bra 0$ +2$ lea (Filename,a2),a0 ; finnes filen fra før + lea (tmplargestore,NodeBase),a1 + moveq.l #0,d0 ; vil ikke ha nesten navn + bsr findfileinfo + lea (filefountext),a0 + bne.b 10$ ; ja.. + bsr outimage + move.w (Filestatus,a2),d0 ; hvis der er PU, så skal vi + btst #FILESTATUSB_PrivateUL,d0 ; ikke ha / for sysop only + bne.b 12$ + lea (startdescwstext),a0 + bsr writetexto +12$ lea (pleaseentfdtext),a0 + bsr strlen + lea (spacetext),a0 + bsr writetextlen + moveq.l #0,d0 + move.w #Sizeof_FileDescription,d0 + lea (bordertext),a0 + bsr writetextlen + move.b #'>',d0 + bsr writechar + bsr outimage + lea (pleaseentfdtext),a0 + bsr writetext + bsr breakoutimage + move.w #Sizeof_FileDescription,d0 + jsr (getline) + beq 9$ + cmpi.b #'/',(a0) ; Er det sysop only ? + bne.b 11$ ; Nei + move.w (Filestatus,a2),d0 ; Er den privat allerede ? + btst #FILESTATUSB_PrivateUL,d0 + bne.b 11$ ; Ja + move.l (SYSOPUsernr+CStr,MainBase),d0 + move.l d0,(PrivateULto,a2) + move.w #FILESTATUSF_PrivateUL,(Filestatus,a2) + move.l a0,-(a7) + moveq.l #0,d0 ; Privatefiledir + lea (Filename,a2),a0 + lea (maintmptext,NodeBase),a1 + bsr buildfilepath + lea (maintmptext,NodeBase),a0 + bsr findfile + move.l (a7)+,a0 + beq.b 11$ + lea (filefountext),a0 + bsr writeerroro + bra 0$ + +11$ lea (Filedescription,a2),a1 + move.w #Sizeof_FileDescription,d0 + bsr strcopymaxlen + + move.w (Filestatus,a2),d0 + btst #FILESTATUSB_PrivateUL,d0 + bne.b 8$ + +; Private to conference ??? + move.w (confnr,NodeBase),d0 + cmpi.w #6,d0 ; ikke i news,post,u/f info heller + bls.b 8$ + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.w #ACCF_Upload,d0 ; har vi UL access i denne konf ? + beq.b 8$ ; Nei. Da blir det offentlig fil + lea (fileprivtcotext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq.b 8$ + move.w #FILESTATUSF_PrivateConfUL,(Filestatus,a2) + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + move.l d0,(PrivateULto,a2) +8$ tst.b (readcharstatus,NodeBase) + bne 9$ + lea (uploadfname),a0 + moveq.l #0,d0 + bsr typefilemaybeansi + + moveq.l #20,d0 ; Status = UL file. + bsr changenodestatus + bsr outimage + lea (maintmptext,NodeBase),a0 + move.b (CommsPort+Nodemem,NodeBase),d0 ; internal node ?? + beq.b 16$ ; Yepp. local download + + move.l a0,(ULfilenamehack,NodeBase) + moveq.l #0,d0 ; ikke ungrab + jsr (receivefile) + beq.b 7$ + bra.b 17$ + +16$ lea (Filename,a2),a0 + bsr getfullnameusetmp + beq 9$ ; Ut + lea (maintmptext,NodeBase),a1 + bsr copyfile + beq.b 7$ + bra.b 20$ ; ikke noen tid sak her nei. + +17$ lea (lastchartime,NodeBase),a1 ; trekker ifra tid for UL + lea (tmpdatestamp,NodeBase),a0 + bsr calcmins + add.w d0,(minul,NodeBase) + +20$ lea (maintmptext,NodeBase),a0 + bsr getfilelen + bne.b 6$ +7$ lea (maintmptext,NodeBase),a0 + bsr deletefile + lea (logfulmsgtext),a0 + lea (Filename,a2),a1 + bsr writelogtexttimed + lea (errorreceivtext),a0 + bsr writeerroro + bra 9$ +6$ move.l d0,(Fsize,a2) + move.l (Usernr+CU,NodeBase),(Uploader,a2) + lea (ULdate,a2),a0 + move.l a0,d1 + push a6/d2 + move.l (dosbase),a6 + jsrlib DateStamp + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + lea (Filedescription,a2),a0 + move.l a0,d2 + jsrlib SetComment ; prøver å sette description som file comment. + pop a6/d2 + lea (tmptext,NodeBase),a1 + lea (maintmptext,NodeBase),a0 + bsr strcopy + move.b #' ',(-1,a1) + lea (maintmptext,NodeBase),a0 ; finner extension + moveq.l #0,d1 +14$ move.b (a0)+,d0 + beq.b 15$ + cmpi.b #'.',d0 + bne.b 14$ + move.l a0,d1 + bra.b 14$ ; søker videre etter siste punktum +15$ tst.l d1 ; fant vi noe ? + beq.b 18$ ; nei, da bruker vi a0 slik den er. + move.l d1,a0 ; setter tilbake siste funn. +18$ lea (-1,a0),a0 + move.l a1,-(a7) + bsr upstring + move.l (a7)+,a1 + bsr strcopy + lea (-1,a1),a0 + move.b #' ',(a0)+ + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + jsr (konverter) + lea (tmptext,NodeBase),a1 ; + lea (uloadscriptname),a0 + bsr executedosscriptparam + + addq.w #1,(Uploaded+CU,NodeBase) ; Oppdaterer Uploaded telleren + move.l (Fsize,a2),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + add.l d0,(KbUploaded+CU,NodeBase) + bsr outimage + bsr checkratio + + moveq.l #0,d0 + move.l d0,(Infomsgnr,a2) ; tømmer denne + lea (enterdeinfotext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + beq.b 13$ + move.l a2,a0 + move.l (PrivateULto,a2),d0 ; i tilfelle til conf + move.w (Filestatus,a2),d1 + and.w #FILESTATUSF_PrivateConfUL,d1 + bne.b 19$ + move.w #6,d0 ; fileinfo conf +19$ jsr (comentditsamecode) + beq.b 13$ ; abort'a, carrier borte osv + lea (tmpmsgheader,NodeBase),a0 + move.l (Number,a0),(Infomsgnr,a2) +13$ move.l (msg,NodeBase),a1 + move.w #Main_addfile,(m_Command,a1) + move.l a2,(m_Data,a1) + moveq.l #0,d0 ; 0 = private + move.w (Filestatus,a2),d1 + btst #FILESTATUSB_PrivateUL,d1 + bne.b 81$ + moveq.l #1,d0 +81$ move.l d0,(m_UserNr,a1) ; 1 = Upload + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 +; beq.b 9$ +; lea +; bsr writetexti +; lea maintmptext(NodeBase),a0 +; bsr deletefile + + lea (ulcompletedtext),a0 + bsr writetexto +9$ moveq.l #0,d1 + move.l d1,(ULfilenamehack,NodeBase) + moveq.l #4,d0 ; Status = active. + bsr changenodestatus + ENDC + move.l (sp)+,a2 + rts + +;#c +uploadfile + push a2 + bsr uloadcommoncode + IFND DEMO + beq.b 9$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a0 + move.w #Fileentry_SIZEOF,d0 + bsr memclr + bra privateupload1 + ENDC +9$ pop a2 + rts + +uloadcommoncode + IFND DEMO + lea (u_almostendsave+CU,NodeBase),a0 ; Sjekker om vi har UL access i News + move.w (uc_Access,a0),d0 + andi.w #ACCF_Upload,d0 + bne.b 1$ ; Ja, vi kan UL'e + lea (youarenottext),a0 ; Nei, skriver ut fy melding + bra.b 8$ +1$ move.w (MinULSpace+CStr,MainBase),d0 ; er det en grense ? + beq.b 3$ ; nei. + move.l (firstFileDirRecord+CStr,MainBase),a0 + lea (n_DirPaths+FileDirRecord_SIZEOF,a0),a0 + bsr getdiskfree ; sjekker upload stedet + moveq.l #-1,d1 + lea (diskerrortext),a0 + cmp.l d0,d1 + beq.b 8$ + moveq.l #0,d1 + move.w (MinULSpace+CStr,MainBase),d1 + lea (diskfulltext),a0 + cmp.l d0,d1 + bcc.b 8$ +3$ clrz + bra.b 9$ + ENDC + lea (notransfertext),a0 +8$ bsr writeerroro + setz +9$ rts + +;#c +downloadfile + moveq.l #-1,d0 ; ikke filnr + +; d0 != -1 -> d0 = fileentrynr, d1 = filedir +downloadfile1 + push a2/a3/d2/d3/d4 + IFND DEMO + link.w a3,#-80 + move.l a3,d4 + move.l d0,d3 ; husker evnt. filnr + move.l d1,d2 ; husker evnt. fildir + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_LostDL,d0 ; har han mistet DL access'en ? +; bne.b 2$ ; jepp, slipper forbi her + move.w #0,d0 ; Sjekker om vi har DL access i News + lea (u_almostendsave+CU,NodeBase),a0 ; Sjekker om vi har UL access i News + move.w (uc_Access,a0),d0 + andi.w #ACCF_Download,d0 + bne.b 2$ ; Ja, vi kan DL'e + lea (youarenottext),a0 ; Nei, skriver ut fy melding + bsr writeerroro + bra 19$ +2$ moveq.l #-1,d0 + cmp.l d0,d3 + beq.b 0$ ; ikke ferdige nummere + moveq.l #0,d1 + move.w d2,d1 ; legger fildirnr i riktig register + bra.b 7$ +0$ lea (doloadfnametext),a0 + bsr readlineprompt + beq 9$ + move.l a0,a3 + bsr checkfilename + beq.b 0$ +7$ lea (tmpfileentry,NodeBase),a2 + move.l d3,d0 ; gir evnt. filnummer videre + bsr handlefiledladd + beq 9$ + move.l d0,d2 + move.l (msg,NodeBase),a1 + move.l (m_UserNr,a1),d3 ; filpos. + + move.b (CommsPort+Nodemem,NodeBase),d0 ; internal node ?? + beq.b 3$ ; Yepp. local download, no time + move.l a2,a0 + bsr sjekkdltid + bne.b 3$ + lea (Insuftimeremtxt),a0 + bsr writeerroro + bra 9$ + +3$ move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + bsr typefileinfoheader + beq.b 16$ + move.l a2,a0 + moveq.l #0,d0 ; ikke mere info + bsr typefileinfo + beq.b 16$ + bsr outimage + beq.b 16$ + lea (downloadfname),a0 + moveq.l #0,d0 + bsr typefilemaybeansi +; beq 9$ +16$ tst.b (readcharstatus,NodeBase) + bne 9$ + move.l (Fsize,a2),d1 + moveq.l #10,d0 + lsr.l d0,d1 + moveq.l #24,d0 ; Status = DL file. + bsr changenodestatus + + move.b (CommsPort+Nodemem,NodeBase),d0 ; internal node ?? + beq.b 12$ ; Yepp. local download + + lea (maintmptext,NodeBase),a0 + move.l a0,(ULfilenamehack,NodeBase) + jsr (fjernpath) + + jsr (sendfile) + bmi 9$ + beq 20$ ; Error + bra.b 13$ + +12$ lea (Filename,a2),a0 + bsr getfullnameusetmp + beq 9$ ; Ut + move.l a0,a1 + lea (maintmptext,NodeBase),a0 + bsr copyfile + beq 20$ + +13$ move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_FreeDL,d0 ; Free DL ? + bne.b 6$ ; jepp, oppdaterer ikke + + addq.w #1,(Downloaded+CU,NodeBase) ; Oppdaterer Downloaded telleren + move.l (Fsize,a2),d0 + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d0 + moveq.l #10,d1 + lsr.l d1,d0 + add.l d0,(KbDownloaded+CU,NodeBase) + bsr outimage + bsr checkratio + +6$ move.w (Filestatus,a2),d0 ; private ul ? + andi.w #FILESTATUSF_PrivateUL,d0 ; nei + beq 4$ + move.l (Usernr+CU,NodeBase),d0 ; var det mottager som Dl'et ? + cmp.l (PrivateULto,a2),d0 + bne 4$ ; nope + move.l a2,a0 + ori.w #FILESTATUSF_Fileremoved,(Filestatus,a0) + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l d3,(m_arg,a1) ; filpos. + move.l d2,(m_UserNr,a1) ; fildir + move.l a2,(m_Data,a1) ; fileentry + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne 9$ + lea (maintmptext,NodeBase),a0 + bsr deletefile + + move.l (Infomsgnr,a2),d0 ; er det en filinfo også + beq 5$ ; nei + moveq.l #6,d1 ; fileinfo conf + lea (tmpmsgheader,NodeBase),a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 1$ + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + bne 5$ ; allerede drept + lea (tmpmsgheader,NodeBase),a0 + bsr killmsgwhodidit + lea (tmpmsgheader,NodeBase),a0 + or.b d0,(MsgStatus,a0) + moveq.l #6,d1 ; fileinfo conf + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + beq.b 5$ +1$ bsr writetexto + bra.b 5$ +4$ move.l (msg,NodeBase),a1 ; updater antall dL'er. + move.w #Main_addfiledl,(m_Command,a1) + move.l d3,(m_arg,a1) ; filpos + move.l d2,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 9$ + +5$ move.l sp,a1 ; ABBS:sys/Download.abbs + lea (downloadscrname),a0 + bsr strcopy + move.b #' ',(-1,a1) + lea (maintmptext,NodeBase),a0 + bsr strcopy + move.b #' ',(-1,a1) + move.l a1,a0 + move.l (Fsize,a2),d0 + jsr (konverter) + move.b #0,(a0) + + move.l sp,a0 ; ABBS:sys/Download.abbs + sub.l a1,a1 ; ingen feilmelding + jsr (doarexxdoor) + moveq.l #1,d0 + bsr waitsecs + lea (dlcompletedtext),a0 + bsr writetexto + bra.b 9$ +20$ lea (logfdlmsgtext),a0 + lea (Filename,a2),a1 + bsr writelogtexttimed + lea (errorsendtext),a0 + bsr writeerroro +9$ moveq.l #0,d1 + move.l d1,(ULfilenamehack,NodeBase) + moveq.l #4,d0 ; Status = active. + bsr changenodestatus +19$ move.l d4,a3 + unlk a3 + pop a2/a3/d2/d3/d4 + rts + ENDC +99$ lea (notransfertext),a0 + bsr writetexto + IFND DEMO + bra.b 9$ + ELSE + move.l d4,a3 + unlk a3 + pop a2/a3/d2/d3/d4 + rts + ENDC + +;#c +retractfile + movem.l a2/a3/d2,-(sp) + lea (retracfnametext),a0 + bsr readlineprompt + beq 9$ + move.l a0,a3 + bsr checkfilename + beq 9$ + lea (tmpfileentry,NodeBase),a2 + move.l a2,a1 + move.l a3,a0 + moveq.l #0,d0 ; vil ikke ha nesten navn + bsr findfileinfo + beq 2$ + move.l d0,d2 + move.l a2,a0 + bsr allowtypefileinfo + beq 2$ + lea (maintmptext,NodeBase),a1 ; bygger path'en + move.l a3,a0 + move.l d2,d0 + bsr buildfilepath + lea (suredelfiletext),a0 ; sikker du vil slette ? + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq 9$ ; nei, hopper ut + lea (tmpfileentry,NodeBase),a0 + bsr allowretract + beq 4$ + lea (tmpfileentry,NodeBase),a0 + ori.w #FILESTATUSF_Fileremoved,(Filestatus,a0) + move.l (msg,NodeBase),a1 ; updater retractee. + move.w #Main_savefileentry,(m_Command,a1) + move.l (m_UserNr,a1),(m_arg,a1) ; filpos. + move.l d2,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 9$ + lea (maintmptext,NodeBase),a0 + bsr deletefile + beq.b 9$ + move.l (Infomsgnr,a2),d0 + beq.b 1$ + move.w Filestatus(a2),d1 ; er den pu til en conf ? + btst #FILESTATUSB_PrivateConfUL,d1 + beq.b 6$ ; nei + move.l PrivateULto(a2),d1 ; ja, da er den ikke i fileinfo conf + bra.b 7$ +6$ moveq.l #6,d1 ; fileinfo conf +7$ move.l d1,d2 + lea (tmpmsgheader,NodeBase),a2 + move.l a2,a0 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne.b 5$ + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + bne.b 1$ ; allerede drept + move.l a2,a0 + bsr killmsgwhodidit + or.b d0,(MsgStatus,a2) + move.l a2,a0 + move.w d2,d0 ; file info konfnr + jsr (savemsgheader) + lea (cntsavemsghtext),a0 + bne.b 5$ +1$ lea (fileretracetext),a0 +5$ bsr writetexto +9$ movem.l (sp)+,a2/a3/d2 + rts +4$ lea (youarenottext),a0 + bra.b 3$ +2$ lea (filenotfountext),a0 +3$ bsr writeerroro + bra.b 9$ + +;#c +listfiles + push d2/d3/a2 + moveq.l #0,d0 ; file browse + jsr (setupbrowse) + lea (enterdirnametxt),a0 + lea (filelistfilname),a1 + suba.l a2,a2 ; ingen ekstra help + bsr readlinepromptwhelp + beq 9$ + lea (tmptext2,NodeBase),a2 + move.l a2,a1 + bsr strcopy + move.l a2,a0 +1$ move.b (a0)+,d0 ; er det en stjerne der ? + beq.b 2$ ; nope + cmpi.b #'*',d0 + bne.b 1$ ; nei, fortetter + jsr setbrowsenodestatus + bsr askdetailedlist + beq.b 9$ + move.l d1,d3 + bsr outimage + beq.b 9$ + lea (listfilestest),a0 + move.l d3,d1 + move.l a2,a1 + bsr loopalldirs + jsr (sendbrowsefiles) + bra.b 9$ +2$ move.l a2,a0 + bsr getdirnamesub + beq.b 9$ +3$ move.l (firstFileDirRecord+CStr,MainBase),a0 + mulu.w #FileDirRecord_SIZEOF/2,d0 + lea (n_DirName,a0,d0.l),a0 + move.l a0,a1 +6$ move.b (a1)+,d0 + beq.b 5$ ; ferdig + cmp.b #'/',d0 + bne.b 6$ ; ikke sub dir + move.l a2,a1 ; det var subdir, da bruker vi fullt navn isteden + bsr strcopy +5$ bsr outimage + jsr setbrowsenodestatus + bsr askdetailedlist + beq.b 9$ + lea (listfilestest),a0 +; move.l d1,d2 + move.l a2,a1 +;4$ move.b (a2)+,d0 ; legger på en stjerne på slutten, slik at vi tar alle +; bne.b 4$ ; fildirs som begynner med det han tastet +; move.b #'*',(-1,a2) +; move.b #0,(a2) ; trengs vel ikke alikevel... + bsr loopalldirs + jsr (sendbrowsefiles) +9$ jsr clearbrowsenodestatus + pop d2/d3/a2 + rts + +listfilestest + clrz + rts + +;#c +; returnerer bool i d1 (d1 = 0, ikke detaljert info) +askdetailedlist + push d2 + moveq.l #0,d2 ; ikke detaljert info + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + bne.b 9$ ; jepp, ikke spør om detailed info + jsr (justchecksysopaccess) ; er vi sysop ? + beq.b 9$ ; nei, ikke detaljert + lea (detailelisttext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + sne d2 + bsr outimage +9$ move.l d2,d1 + pop d2 + tst.b (readcharstatus,NodeBase) + notz + rts + +;#c +listprivatetoconf + moveq.l #0,d0 ; file browse + jsr (setupbrowse) + jsr setbrowsenodestatus + bsr askdetailedlist + beq.b 9$ + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + lea (nulltext),a1 + lea (listprivatetoconffunc),a0 + bsr loopalldirs + jsr (sendbrowsefiles) +9$ jsr clearbrowsenodestatus + rts + +; a0 = Fileentry +; d0 = data +; ret : z = 1, ta den med. +listprivatetoconffunc + move.w (Filestatus,a0),d1 + and.w #FILESTATUSF_PrivateConfUL,d1 + beq.b 9$ + cmp.l (PrivateULto,a0),d0 + notz +9$ rts + +;#c +listprivate + moveq.l #0,d0 ; file browse + jsr (setupbrowse) + jsr setbrowsenodestatus + bsr askdetailedlist + beq.b 9$ + lea (listfilestest),a0 + moveq.l #0,d0 ; Private dir. + move.l d2,-(a7) + move.l d1,d2 + bsr loopdir + jsr (sendbrowsefiles) + move.l (a7)+,d2 +9$ jsr clearbrowsenodestatus + rts + +;#c +newfiles + movem.l d2-d4,-(a7) + moveq.l #0,d0 ; file browse + jsr (setupbrowse) + lea (maintmptext,NodeBase),a0 + move.l (NFday+CU,NodeBase),d0 + move.l d0,(a0) + jsr datestampetodate + +; a0 = datestamp +; retur: +; d0 = århundre (eg 1993) +; d1 = mnd +; d2 = mnddag +; d3 = ukedag + + + move.l d0,d4 + move.l d1,d3 + lea (datetoscanftext),a0 + lea (maintmptext,NodeBase),a1 + bsr strcopy + subq.l #1,a1 + move.l a1,a0 + move.l d4,d0 ; århundre + andi.l #$ffff,d0 + divu.w #100,d0 + swap d0 + andi.l #$ffff,d0 + bsr nr2tostr ; legger til string i a0 + move.l d3,d0 + bsr nr2tostr + move.l d2,d0 + bsr nr2tostr + move.l a0,a1 + lea (sparakolontext),a0 + bsr strcopy +3$ lea (maintmptext,NodeBase),a0 + + lea (nulltext),a1 + moveq.l #6,d0 + jsr (mayedlineprompt) + +; bsr readlineprompt + bne 5$ + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ + move.l (NFday+CU,NodeBase),d0 + bra.b 2$ + +5$ jsr strtonr2 + bmi.b 4$ + move.l d0,d2 ; år + bsr strtonr2 + bmi.b 4$ + move.l d0,d3 ; mnd + bsr strtonr2 + bmi.b 4$ + exg d0,d2 ; dag + move.l d3,d1 + jsr (datetodays) + bne.b 2$ +4$ lea (invaliddatetext),a0 + bsr writeerroro + bra.b 3$ + +2$ move.l d0,d4 + bsr outimage + beq.b 9$ + jsr setbrowsenodestatus + bsr askdetailedlist + beq.b 9$ + move.l d4,d0 + lea (newfilestest),a0 + lea (starttext),a1 + bsr loopalldirs + lea (tmptext,NodeBase),a0 + move.l (dosbase),a6 + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + move.l (tmptext,NodeBase),(NFday+CU,NodeBase) ; Husker dagen vi tok NF + jsr (sendbrowsefiles) +9$ jsr clearbrowsenodestatus + movem.l (a7)+,d2-d4 + rts + +newfilestest + cmp.l (ULdate,a0),d0 ; dagen filen ble UL'et mot grensen + bls.b 1$ + setz + rts +1$ clrz + rts + +;#c +keywordsearch + lea (logdksearchtext),a0 + lea (keywordtest),a1 + bra keywordscanbody + +keywordtest + push a2/d2/a3 + move.l a0,a3 ; fileinfo struct + move.l d0,a2 ; ord vi skal søket etter + lea (Filedescription,a3),a1 ; tar først beskrivelsen + moveq.l #Sizeof_FileDescription+1,d2 ; lengden +1$ move.l a2,a0 ; ordet vi skal finne +2$ subq.l #1,d2 ; minker med 1 + bcs.b 3$ ; ferdig + move.b (a0)+,d0 ; slutt på søker ordet ? + beq.b 8$ ; vi fant! + bsr upchar + move.b (a1)+,d1 + beq.b 3$ + exg d0,d1 + bsr upchar + cmp.b d1,d0 + bne.b 1$ + bra.b 2$ +3$ lea (Filename,a3),a1 ; så navnet + moveq.l #Sizeof_FileName+1,d2 +4$ move.l a2,a0 +5$ subq.l #1,d2 + bcs.b 9$ + move.b (a0)+,d0 + beq.b 8$ + bsr upchar + move.b (a1)+,d1 + beq.b 9$ + exg d0,d1 + bsr upchar + cmp.b d1,d0 + bne.b 4$ + bra.b 5$ +8$ clrz +9$ pop a2/d2/a3 + rts + +;#c +scanfiles + lea (logscannedftext),a0 + lea (scanfiletest),a1 + bra.b keywordscanbody + +scanfiletest + movem.l a2/d2,-(sp) + move.l d0,a2 + lea (Filename,a0),a1 + moveq.l #Sizeof_FileName+1,d2 +1$ move.l a2,a0 +2$ subq.l #1,d2 + bcs.b 9$ + move.b (a0)+,d0 + beq.b 8$ + bsr upchar + move.b (a1)+,d1 + beq.b 9$ + exg d0,d1 + bsr upchar + cmp.b d1,d0 + bne.b 1$ + bra.b 2$ +8$ clrz +9$ movem.l (sp)+,a2/d2 + rts + +; a0 = log tekst +; a1 = test procedure +keywordscanbody + push d2/d3/a2/a3/d4/d5/d6 + link.w a3,#-80 + move.l a3,d4 + move.l a0,d6 ; husker log teksten + move.l a1,a3 ; husker proceduren + moveq.l #0,d0 ; file browse + jsr (setupbrowse) + lea (enterkeywortext),a0 ; spør etter keyword'et + bsr readlineprompt + beq 9$ + + move.l sp,a1 ; husker + bsr strcopy + lea (enterdirnametxt),a0 ; spørr etter dir + lea (filelistfilname),a1 + suba.l a2,a2 ; ingen ekstra help + bsr readlinepromptwhelp + beq 9$ + lea (tmptext2,NodeBase),a1 ; husker dir + bsr strcopy + lea (tmptext2,NodeBase),a0 + move.l a0,d5 ; husker strengen + +5$ move.b (a0)+,d0 ; er det en stjerne der ? + beq.b 1$ ; nope + cmpi.b #'*',d0 + bne.b 5$ ; nei, fortetter + moveq.l #-1,d3 ; alle dir'er + bra.b 3$ ; fortsetter vanelig + +1$ lea (tmptext2,NodeBase),a0 + bsr getdirnamesub + bne.b 2$ + lea (dirnotfoundtext),a0 ; fant ikke, error + bsr writeerroro + bra.b 9$ +2$ move.l (firstFileDirRecord+CStr,MainBase),a0 + mulu.w #FileDirRecord_SIZEOF/2,d0 + lea (n_DirName,a0,d0.l),a0 + move.l a0,a1 +6$ move.b (a1)+,d0 + beq.b 3$ ; ferdig + cmp.b #'/',d0 + bne.b 6$ ; ikke sub dir + move.l d5,a1 + bsr strcopy ; det var subdir, da bruker vi fullt navn isteden +3$ bsr askdetailedlist ; detaljert ? + beq.b 9$ + move.l d1,d2 ; husker + + move.l sp,a1 ; skriver til log'en + move.l d6,a0 + bsr writelogtexttimed + + jsr setbrowsenodestatus + move.l a3,a0 ; proceduren + move.l sp,d0 ; keyword + move.l d2,d1 + move.l d5,a1 + bsr loopalldirs + jsr (sendbrowsefiles) + jsr clearbrowsenodestatus + +9$ move.l d4,a3 + unlk a3 + pop d2/d3/a2/a3/d4/d5/d6 + rts + +;#e + +***************************************************************** +* Misc menu * +***************************************************************** +miscmenunotchoices + push a2 + link.w a3,#-80 + move.l a0,a2 + bsr testfilename + bne.b 1$ + setn + bra.b 9$ +1$ move.b #0,(30,a2) ; terminerer stringen hvis den er for lang. + lea (miscdirname),a0 + move.l sp,a1 + jsr (strcopy) + subq.l #1,a1 + move.l a2,a0 + jsr (strcopy) + subq.l #1,a1 + lea (dotabbstext),a0 + jsr (strcopy) + lea (logdidmisctext),a0 + move.l a2,a1 + bsr writelogtexttimed + move.l sp,a0 + lea (invalidcmdtext),a1 + jsr (doarexxdoor) + beq.b 9$ +8$ clrn +9$ unlk a3 + pop a2 + rts + +***************************************************************** +* HOLD * +***************************************************************** + +addfile push a2/a3 +0$ lea (filenametext),a0 + bsr readlineprompt + beq 9$ +4$ move.l a0,a1 +2$ move.b (a1)+,d0 + beq.b 1$ + cmp.b #'+',d0 + bne.b 2$ + move.b #0,(-1,a1) + addq.l #1,a1 +1$ lea (-1,a1),a2 ; husker hvor vi var +3$ move.l a0,a3 + bsr checkfilename + beq.b 0$ + move.l a3,a0 + bsr addfilesub + beq.b 9$ + move.l a2,a0 ; henter frem input igjen + move.b (a0),d0 ; var det mere ? + bne.b 4$ ; jepp, loop'er +9$ pop a2/a3 + rts + +;a0 = filnavnet +addfilesub + moveq.l #-1,d0 ; ikke filnr +; bra.b addfilesub1 + +; d0 != -1 -> d0 = fileentrynr, d1 = filedir +addfilesub1 + push a2/a3/d2/d3/d4/d5 + move.l d0,d3 ; husker evnt. filnr + move.l d1,d2 ; husker evnt. fildir + lea (tmpfileentry,NodeBase),a2 + move.l a0,a3 + move.l d3,d0 ; gir evnt. filnummer videre + move.w d2,d1 ; legger evnt. fildirnr i riktig register + bsr handlefiledladd + beq 9$ + move.l d0,d4 ; husker fildir'en + move.l a0,a3 ; husker full path + move.l (msg,NodeBase),a1 + move.l (m_UserNr,a1),d3 ; filpos. + + move.w (Filestatus,a2),d0 ; private ul ? + andi.w #FILESTATUSF_PrivateUL,d0 ; nei + lea (nopriviholdtext),a0 + bne 8$ + +; sjekke dl ratio + + move.l a2,a0 + moveq.l #0,d0 ; ikke mere info + bsr typefileinfo + lea (tmptext,NodeBase),a0 + lea (Filename,a2),a1 + bsr getholddirfilename + move.l a0,a1 + move.l a1,d5 ; husker dest navn + move.l a3,a0 ; source + jsr makehardlink + bne.b 3$ ; det gikk bra.. + move.l a3,a0 ; source + move.l d5,a1 ; dest navn + bsr copyfile + beq.b 1$ ; error copy + +3$ move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_FreeDL,d0 ; Free DL ? + beq.b 2$ ; nope, gir ikke comment + lea (freedlcomment),a0 + move.l a0,d2 + move.l d5,d1 ; filnavnet + move.l (dosbase),a6 + jsrlib SetComment + move.l (exebase),a6 + +2$ move.l (msg,NodeBase),a1 ; updater antall dL'er. + move.w #Main_addfiledl,(m_Command,a1) + move.l d3,(m_arg,a1) ; filpos + move.l d4,(m_UserNr,a1) ; fildir? + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_OK,d1 + bne.b 9$ + + move.l a3,a0 ; skriver til log'en + jsr (fjernpath) + move.l a0,a1 + lea (logaddfiletext),a0 + bsr writelogtexttimed + clrz + bra.b 9$ +1$ lea (diskerrortext),a0 +8$ bsr writeerroro + setz +9$ pop a3/a2/d2/d3/d4/d5 + rts + +archivehold + push d2-d6 + moveq.l #0,d4 + move.b (ScratchFormat+CU,NodeBase),d4 + lsl.w #2,d4 + beq 9$ ; ikke noen pakking + bsr holdgetfilestat + lea (diskerrortext),a0 + beq.b 3$ ; error + move.l d2,d5 ; virkelig antall bytes før pakking + move.l d1,d6 ; virkelig antall filer før pakking + + moveq.l #76,d0 ; Status = packing file(s) + jsr (changenodestatus) + lea (maintmptext,NodeBase),a0 ; bygger opp path + lea (nulltext),a1 + bsr getholddirfilename + lea (tmptext2,NodeBase),a1 ; bygger opp navnet på pakkeren + lea (packstring),a0 + bsr strcopy + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d4.w),a0 + bsr strcopy + lea (tmptext2,NodeBase),a0 ; sjekker om pakker finnes + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + move.l (dosbase),a6 + jsrlib Lock + move.l d0,d1 + bne.b 1$ + move.l (exebase),a6 + lea (cantfinpacktext),a0 ; sier ifra at vi ikke fant pakkeren +3$ bsr writeerroro + bra 9$ ; ut +1$ jsrlib UnLock + move.l (exebase),a6 + +; "basenavn" til "basenavn." + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + lea (executestring),a0 ; bygger opp execute string + bsr strcopy + subq.l #1,a1 + lea (tmptext2,NodeBase),a0 ; henter navnet på scriptet + bsr strcopy + move.b #' ',(-1,a1) + lea (maintmptext,NodeBase),a0 ; path'en + bsr strcopy + subq.l #1,a1 + lea (holdtext),a0 ; arkiv navnet + bsr strcopy + move.b #' ',(-1,a1) + lea (maintmptext,NodeBase),a0 ; path'en + bsr strcopy + move.b #'*',(-1,a1) ; alle filer + move.b #0,(a1) ; terminerer + lea (pleaswaitwptext),a0 + bsr writetexto + tst.b (Tinymode,NodeBase) ; tiny mode ? + bne.b 2$ ; ja, ingen console output + lea (nyconfgrabtext),a0 ; skriver pakke string til con + moveq.l #3,d0 + jsr (writecontextlen) + move.l (tmpmsgmem,NodeBase),a0 + jsr (writecontext) + jsr (newconline) +2$ move.l (tmpmsgmem,NodeBase),a0 + move.l a0,d1 + moveq.l #0,d2 + moveq.l #0,d3 + move.l (dosbase),a6 + jsrlib Execute + move.l (exebase),a6 + + lea (maintmptext,NodeBase),a0 ; path'en + lea (tmptext,NodeBase),a1 + bsr strcopy + subq.l #1,a1 + lea (holdtext),a0 ; arkiv navnet + bsr strcopy + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d4.w),a0 + bsr strcopy + lea (tmptext,NodeBase),a0 + bsr findfile + lea (errorpackintext),a0 + beq.b 4$ + lea (tmplargestore,NodeBase),a1 ; bygger opp "path/~(arkiv)" + move.b #'~',(a1)+ + move.b #'(',(a1)+ + lea (holdtext),a0 + bsr strcopy + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d4.w),a0 + bsr strcopy + move.b #')',-1(a1) + move.b #0,(a1) + lea (tmplargestore,NodeBase),a0 + lea (maintmptext,NodeBase),a1 + bsr deletepattern ; sletter alt untatt arkivet + lea (maintmptext,NodeBase),a0 + move.l a0,d2 + move.b #' ',(a0)+ + move.b #'*',(a0)+ + move.l d6,d0 + bsr konverter + move.b #' ',(a0)+ + move.l d5,d0 + bsr konverter + lea (tmptext,NodeBase),a0 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib SetComment + move.l (exebase),a6 + lea (diskerrortext),a0 + tst.l d0 + bne.b 9$ +4$ bsr writeerroro +9$ moveq.l #4,d0 ; Status = active. + jsr (changenodestatus) + pop d2-d6 + rts + +deleteholdfile + push a2 +0$ lea (filenametext),a0 + bsr readlineprompt + beq.b 9$ + move.l a0,a2 + bsr testfilenameallowwild + bne.b 1$ + lea (nopathallowtext),a0 + bsr writeerroro + bra.b 0$ +1$ move.l a2,a0 + lea (tmptext,NodeBase),a1 ; out pattern + bsr parsepattern + beq.b 9$ + move.l a0,a2 + lea (maintmptext,NodeBase),a0 + lea (nulltext),a1 + bsr getholddirfilename + move.l a2,d0 + lea (deleteholdfunc),a1 + bsr dodirname +9$ pop a2 + rts + +deleteholdfunc + push a6/a2 + move.l a0,a2 + lea (maintmptext,NodeBase),a0 + move.l (ed_Name,a2),a1 + bsr getholddirfilename + move.l a0,d1 + jsrlib DeleteFile + tst.l d0 + beq.b 9$ + move.l (exebase),a6 + lea (erasingtext),a0 + bsr writetext + move.l (ed_Name,a2),a0 + bsr writetexto +9$ pop a6/a2 + rts + +holddirectory + push d2/d3 + moveq.l #0,d0 ; nustiller antall filer(bytes) + move.l d0,(tmpval,NodeBase) ; funnet + lea (tmptext,NodeBase),a0 + lea (nulltext),a1 + bsr getholddirfilename + lea (holddirfunc),a1 + moveq.l #0,d0 + bsr dodirname + move.l (exebase),a6 + beq.b 9$ + lea (nofileiholdtext),a0 + move.l (tmpval,NodeBase),d3 + beq.b 8$ + subq.l #1,d3 ; kompenserer for utskrift + moveq.l #33,d0 + lea (spacetext),a0 + bsr writetextlen + move.l d3,d0 + moveq.l #8,d1 + bsr skrivnrrfill + +; dl tid. + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 1$ ; Yepp. no time. + moveq.l #0,d1 + move.l d1,d0 + move.w (cpsrate,NodeBase),d1 + beq.b 2$ + move.l d3,d0 + beq.b 2$ + divu.w d1,d0 + andi.l #$ffff,d0 + divu.w #60,d0 + andi.l #$ffff,d0 +2$ move.l d0,d2 + lea (spaceparatext),a0 + bsr writetext + move.l d2,d0 + bsr connrtotext + bsr writetext + lea (mparatext),a0 + bsr writetext + ENDC +1$ bsr outimage + bra.b 9$ +8$ bsr writeerroro +9$ pop d2/d3 + rts + +holddirfunc + push a6/a2 + move.l (exebase),a6 + move.l a0,a2 + move.l (tmpval,NodeBase),d0 + bne.b 1$ + moveq.l #1,d0 + move.l d0,(tmpval,NodeBase) ; forhindrer utskrift neste gang + lea (filesinholdtext),a0 + bsr writetexto +1$ lea (spacetext),a0 + moveq.l #3,d0 + bsr writetextlen + move.l (ed_Name,a2),a0 + moveq.l #30,d0 + bsr writetextlfill + move.l (ed_Size,a2),d0 + add.l d0,(tmpval,NodeBase) ; øker telleren over size + moveq.l #8,d1 + bsr skrivnrrfill + bsr outimage + pop a6/a2 + rts + +extract push a2/a3/d2/d3 + moveq.l #0,d3 ; null for å bytte med a2 +0$ lea (arcivenametext),a0 + suba.l a1,a1 + suba.l a2,a2 ; ingen ekstra help + bsr readlinepromptwhelp + beq 9$ + move.l a0,a3 + bsr checkfilename + beq.b 0$ + lea (tmpfileentry,NodeBase),a2 + moveq.l #-1,d0 ; har ikke filnr + bsr handlefiledladd + beq 9$ + move.l a0,a3 ; husker full path + move.l d0,d2 ; og dirnr + bsr justchecksysopaccess + bne.b 2$ + lea (nalviewupprtext),a0 ; sjekker om lovlig dir + cmp.w #1,d2 + bls 8$ +2$ lea (executestring),a0 + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + bsr strcopy + subq.l #1,a1 + lea (checkarcstring),a0 + bsr strcopy + subq.l #1,a1 + move.l a3,a0 + bsr strcopy + move.b #' ',(-1,a1) + push a1 + move.l a3,a0 + jsr (getextension) + pop a1 + bsr strcopy + move.l (tmpmsgmem,NodeBase),a0 + bsr executestringtypeoutput + bmi 9$ + bne 9$ ; fikk ikke 0 tilbake, noe galt fra scriptet + bsr typefileinfoheader + move.l a2,a0 + moveq.l #0,d0 + bsr typefileinfo + lea (filetoextract),a0 + suba.l a1,a1 + exg a2,d3 ; ingen ekstra help (d3 == 0) + bsr readlinepromptwhelp + exg a2,d3 + bne.b 1$ + tst.b (readcharstatus,NodeBase) + bne 9$ + lea (allwildcardtext),a0 +1$ move.l a0,a2 ; husker fila + bsr checkifdirstring + beq 9$ + moveq.l #80,d0 ; Status = Unpacking file(s) + jsr (changenodestatus) + lea (executestring),a0 + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + bsr strcopy + subq.l #1,a1 + lea (extractstring),a0 + bsr strcopy + subq.l #1,a1 + push a1 + move.l a3,a0 + jsr (getextension) + pop a1 + bsr strcopy + move.b #' ',(-1,a1) + move.l a3,a0 + bsr strcopy + move.b #' ',(-1,a1) + move.l a2,a0 + bsr strcopy + + move.l (dosbase),a6 + lea (HoldPath+Nodemem,NodeBase),a0 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + lea (diskerrortext),a0 + beq.b 8$ + jsrlib CurrentDir + move.l d0,d2 ; husker forige dir + move.l (exebase),a6 + move.l (tmpmsgmem,NodeBase),a0 ; execute ABBS:sys/Extract + bsr executestringtypeoutput + move.l (dosbase),a6 + move.l d2,d1 + jsrlib CurrentDir + move.l d0,d1 + jsrlib UnLock + move.l (exebase),a6 + bra.b 9$ +8$ move.l (exebase),a6 + bsr writeerroro +9$ moveq.l #4,d0 ; Status = active. + bsr changenodestatus + pop a2/a3/d2/d3 + rts + +; a0 = string +checkifdirstring ; brukes av extract. +1$ move.b (a0)+,d0 ; finner enden + beq.b 3$ + cmpi.b #',',d0 + beq.b 2$ + cmpi.b #"`",d0 + beq.b 2$ + cmpi.b #'%',d0 + beq.b 2$ + bra.b 1$ + +3$ move.b (-2,a0),d0 + cmp.b #':',d0 + beq.b 2$ + cmp.b #'/',d0 + bne.b 9$ +2$ lea nopathallowtext,a0 + jsr (writeerroro) + setz +9$ rts + +;a0 = string +executestringtypeoutput + moveq.l #1,d0 + +; a0 = string +; d0 = TRUE -> type output +doexecutestring + push a2/d2/d3/d4 + link.w a3,#-160 + + move.l a0,a2 + move.l d0,d4 ; husker output status + tst.b (Tinymode,NodeBase) ; tiny mode ? + bne.b 1$ ; ja, ingen console output + lea (nyconfgrabtext),a0 ; skriver pakke string til con + moveq.l #3,d0 + jsr (writecontextlen) + move.l a2,a0 + jsr (writecontext) + jsr (newconline) +1$ move.l (dosbase),a6 + lea (80,sp),a1 + lea (TmpPath+Nodemem,NodeBase),a0 + bsr strcopy + subq.l #1,a1 + lea (shellfnameetext),a0 + bsr strcopy + move.l (dosbase),a6 + lea (80,sp),a1 + move.l a1,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d3 + lea (diskerrortext),a0 + beq.b 8$ ; error i open + move.l sp,a1 + lea (systemtagsnow),a0 + moveq.l #16,d0 + bsr memcopylen + move.l sp,a1 + move.l d3,(4,a1) ; lagrer output + + move.l a2,d1 + move.l sp,d2 + jsrlib SystemTagList + move.l d0,d2 ; husker return + move.l d3,d1 + jsrlib Close + tst.l d4 ; skal vi ha output ? + beq.b 2$ ; nope + move.l (exebase),a6 + lea (80,sp),a0 + bsr getfilelen + beq.b 2$ + lea (80,sp),a0 + moveq.l #0,d0 + bsr typefile +2$ move.l (dosbase),a6 + lea (80,sp),a0 + move.l a0,d1 + jsrlib DeleteFile + move.l (exebase),a6 + move.l d2,d0 + clrn + bra.b 9$ +8$ bsr writeerroro + setn +9$ unlk a3 + pop a2/d2/d3/d4 + rts + +; Finner ut antall Bytes som ligger i hold. +; returnerer : +; z = 1 : error +; d0 : antall bytes +; d1 : virkelig antall filer +; d2 : virkelig antall bytes +;holdgetdltime +holdgetfilestat + moveq.l #0,d0 ; nustiller antall bytes + move.l d0,(tmpval,NodeBase) ; funnet + move.l d0,(tmpmsgheader,NodeBase) ; real files + move.l d0,(tmpmsgheader+4,NodeBase) ; real bytes + lea (tmptext,NodeBase),a0 + lea (nulltext),a1 + bsr getholddirfilename + lea (holdgetdlbytesfunc),a1 + moveq.l #0,d0 + bsr dodirname + beq.b 9$ + move.l (tmpmsgheader,NodeBase),d1 + move.l (tmpmsgheader+4,NodeBase),d2 + move.l (tmpval,NodeBase),d0 + clrz +9$ rts + +holdgetdlbytesfunc + move.l (ed_Size,a0),d0 + add.l d0,(tmpval,NodeBase) ; øker telleren over size + move.l (ed_Comment,a0),d1 + beq.b 2$ + move.l d1,a0 +1$ move.b (a0)+,d1 + beq.b 2$ + cmp.b #'*',d1 + bne.b 1$ + bsr atoi + add.l d0,(tmpmsgheader,NodeBase) ; arkiv, legger til antall filer + bsr atoi + add.l d0,(tmpmsgheader+4,NodeBase) ; og size + bra.b 9$ +2$ add.l d0,(tmpmsgheader+4,NodeBase) ; ikke et arkiv, teller size + moveq.l #1,d0 + add.l d0,(tmpmsgheader,NodeBase) ; og antall filer +9$ rts + +; sende alle filene i hold dir (batch send) +gethold push d2/d3/d4/d5 + bsr isholdempty + lea (nofileiholdtext),a0 + beq 8$ + move.w (uc_Access+u_almostendsave+CU,NodeBase),d0 ; har vi DL access ? + and.w #ACCF_Download,d0 ; isolerer download bitet + lea (youarenottext),a0 ; Nei, skriver ut fy melding + beq 8$ ; Ja, vi kan DL'e + +; håndtere local dl + + lea (notransfertext),a0 + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq 8$ ; ja, fy + + bsr holdgetfilestat + move.l d1,d3 ; husker antall filer + move.l d0,d4 ; husker antall bytes (nå) + bsr sjekkdltidbytes + lea (Insuftimeremtxt),a0 + beq 8$ ; Ikke nok tid + + moveq.l #0,d1 + move.w #1023,d1 + add.l d1,d2 + moveq.l #10,d1 + lsr.l d1,d2 ; gjør om til KB + + move.l d3,d0 ; ant filer + move.l d2,d1 ; virkelig ant kb + bsr testratio ; sjekke om vi har ratio til å dl'e + lea (noratioforttext),a0 + beq 8$ + + lea (nobatchtrantext),a0 + lea (protocolisbatch),a1 + moveq.l #0,d0 + move.b (Protocol+CU,NodeBase),d0 + beq 8$ + subq.l #1,d0 + move.b (0,a1,d0.w),d1 + beq 8$ + + move.l d4,d1 + moveq.l #10,d0 + lsr.l d0,d1 + moveq.l #52,d0 ; Status = downloading hold. + bsr changenodestatus + lea (loggotholdtext),a0 ; skrive til log fil + bsr writelogtexttime + + lea (downloadfname),a0 + moveq.l #0,d0 + bsr typefilemaybeansi + + move.b (readlinemore,NodeBase),d5 ; husker readlinemore + move.b #0,(readlinemore,NodeBase) ; flusher input (hack) ? + lea (maintmptext,NodeBase),a0 + lea (allwildcardtext),a1 + bsr getholddirfilename + move.b #1,(batch,NodeBase) + jsr (sendfile) + bmi.b 9$ ; carrier forsvant + beq.b 7$ + + move.b d5,(readlinemore,NodeBase) ; setter tilbake readlinemore + moveq.l #1,d0 + bsr waitsecs +; oppdatere ratio + add.w d3,(Downloaded+CU,NodeBase) ; Oppdaterer Downloaded telleren + add.l d2,(KbDownloaded+CU,NodeBase) + bsr outimage + bsr checkratio + + lea (tmptext,NodeBase),a0 + lea (nulltext),a1 + bsr getholddirfilename ; sletter alt i hold + jsr deleteall + + lea (dlcompletedtext),a0 + bsr writetexto + bra.b 9$ + +7$ lea (logfdlholdtext),a0 + bsr (writelogtexttime) + lea (errorsendtext),a0 +8$ bsr writeerroro +9$ moveq.l #0,d1 + move.l d1,(ULfilenamehack,NodeBase) + moveq.l #4,d0 ; Status = active. + bsr changenodestatus + pop d2/d3/d4/d5 + rts + +renameholdfile + push a2/d3/d4 +0$ lea (filenametext),a0 + bsr readlineprompt + beq 9$ + move.l a0,a2 + bsr testfilename + beq.b 0$ + move.l a2,a1 + lea (maintmptext,NodeBase),a0 + bsr getholddirfilename + bsr findfile + bne.b 1$ + lea (filenotfountext),a0 +3$ bsr writeerroro + bra 9$ + +1$ lea (newnametext),a0 + bsr readlineprompt + beq.b 9$ + move.l a0,a2 + bsr testfilename + beq.b 1$ + move.l a2,d1 + lea (tmptext,NodeBase),a0 ; sjekker om det er patterns i navnet + move.l a0,d2 + moveq.l #80,d3 + move.l (dosbase),a6 + jsrlib ParsePatternNoCase + move.l (exebase),a6 + tst.l d0 + beq.b 2$ + lea (novalidname),a0 ; det var det. Klager + bsr writeerroro + bra.b 1$ +2$ lea (tmptext,NodeBase),a0 ; bygger opp filnavnet + move.l a2,a1 + bsr getholddirfilename + move.l a0,a2 ; husker dest. + bsr findfile + lea (filefountext),a0 + bne.b 3$ + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + move.l a2,d2 + move.l (dosbase),a6 + jsrlib Rename + move.l (exebase),a6 + lea (diskerrortext),a0 + tst.l d0 + beq 3$ + lea (filerenamedtext),a0 + bsr writetexto +9$ pop a2/d2/d3 + rts + +showhold + push d2-d4/a2 + moveq.l #0,d4 + move.b (ScratchFormat+CU,NodeBase),d4 + lsl.w #2,d4 + beq 9$ ; ikke noen pakking + lea (maintmptext,NodeBase),a2 ; bygger opp path + move.l a2,a0 + lea (nulltext),a1 + bsr getholddirfilename + lea (executestring),a0 ; Bygger opp exec string + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + bsr strcopy + subq.l #1,a1 + lea (viewstring),a0 + bsr strcopy + subq.l #1,a1 + move.l a1,d2 ; husker starten på selve filnavnet (med path) + move.l a2,a0 + bsr strcopy + subq.l #1,a1 + lea (holdtext),a0 ; arkiv navnet + bsr strcopy + subq.l #1,a1 + lea (packexctstrings),a0 + move.l (0,a0,d4.w),a0 + bsr strcopy + move.l a1,d3 ; husker hvor vi er + move.l d2,a0 + bsr findfile + lea (filenotfountext),a0 + beq.b 6$ + move.l d3,a1 + move.b #' ',(-1,a1) + lea (packexctstrings),a0 + move.l (0,a0,d4.w),a0 + bsr strcopy + + move.l a2,a1 ; åpner outputfil + lea (TmpPath+Nodemem,NodeBase),a0 + bsr strcopy + move.l a2,a1 +3$ move.b (a1)+,d0 ; finner slutten + bne.b 3$ + subq.l #1,a1 + lea (shellfnameetext),a0 + bsr strcopy + move.l (dosbase),a6 + move.l a2,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l (exebase),a6 + move.l d0,d3 + bne.b 1$ + lea (diskerrortext),a0 +6$ bsr writeerroro + bra.b 9$ ; error i open +1$ tst.b (Tinymode,NodeBase) + bne.b 2$ + lea (nyconfgrabtext),a0 + moveq.l #3,d0 + jsr (writecontextlen) + move.l (tmpmsgmem,NodeBase),a0 + jsr (writecontext) + jsr (newconline) +2$ move.l (tmpmsgmem,NodeBase),a0 + move.l a0,d1 + moveq.l #0,d2 + move.l (dosbase),a6 + jsrlib Execute + move.l d0,d2 + move.l d3,d1 + jsrlib Close + move.l (exebase),a6 + tst.l d2 + bne.b 4$ + lea (errordoscmdtext),a0 + bsr writetexto +4$ move.l a2,a0 + bsr getfilelen + beq.b 5$ + move.l a2,a0 + moveq.l #0,d0 + bsr typefile +5$ move.l (dosbase),a6 + lea (maintmptext,NodeBase),a0 + move.l a0,d1 + jsrlib DeleteFile + move.l (exebase),a6 +9$ pop d2-d4/a2 + rts + +typeholdfile + push a2 +0$ lea (filenametext),a0 + bsr readlineprompt + beq.b 9$ + move.l a0,a2 + bsr testfilename + beq.b 0$ + lea (tmptext,NodeBase),a0 + move.l a2,a1 + bsr getholddirfilename + move.l a0,a2 + bsr findfile + bne.b 1$ + lea (filenotfountext),a0 + bsr writeerroro + bra.b 9$ +1$ move.l a2,a0 + moveq.l #0,d0 + bsr typefile + move.b #15,d0 ; reset tegnset + bsr writechari +9$ pop a2 + rts + +;a0 - inpattern +;a1 - outpattern (must be 80 chars long) +; returns Z if error, a0 = outpattern +parsepattern + push d2-d3/a2/a6 + link.w a3,#-80 + move.l a1,a2 ; husker outpattern + lea sp,a1 +1$ move.b (a0)+,d0 + cmp.b #'*',d0 + bne.b 2$ + move.b #'#',(a1)+ + move.b #'?',d0 +2$ move.b d0,(a1)+ + bne.b 1$ + move.l sp,d1 + move.l a2,d2 + moveq.l #80,d3 + move.l (dosbase),a6 + jsrlib ParsePatternNoCase + move.l a2,a0 + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 9$ + move.l (exebase),a6 + lea (doserrortext),a0 + bsr writeerroro + setz +9$ unlk a3 + pop d2-d3/a2/a6 + rts + +; a0 = string to put it in +; a1 = filename +getholddirfilename + push a2/a3 + move.l a1,a3 + move.l a0,a2 + move.l a0,a1 + lea (HoldPath+Nodemem,NodeBase),a0 + bsr strcopy + subq.l #1,a1 + move.b (-1,a1),d0 + cmp.b #':',d0 + beq.b 1$ + cmp.b #'/',d0 + beq.b 1$ + move.b #'/',(a1)+ +1$ move.l a3,a0 + bsr strcopy + move.l a2,a0 + pop a2/a3 + rts + +; filnavn i a3 +; fileentry i a2 +; retur (hvis z = 0) +; a0 = full path +; d0 != -1, vi har allerede filnr og dirnr i d0,d1 +; (tmpfileentry = fileentry) +handlefiledladd + push d2 + moveq.l #-1,d2 + cmp.l d2,d0 + beq.b 2$ ; ikke ferdige nummere + move.l d1,d2 ; husker fildir + move.l (msg,NodeBase),a1 ; henter inn fileentry + move.w #Main_loadfileentry,(m_Command,a1) + move.l d1,(m_UserNr,a1) ; fildir*1 + move.l d0,(m_arg,a1) ; filnr + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + lea (errloadfilhtext),a0 + cmpi.w #Error_OK,d0 ; error ? + bne.b 11$ ; jepp, abort + move.w d2,d0 + bra.b 3$ ; forsetter som normalt +2$ lea (searchingtext),a0 + bsr writetexto + move.l a2,a1 + move.l a3,a0 + moveq.l #1,d0 ; vil ha nesten navn + bsr findfileinfo + beq.b 10$ + move.l d0,d2 ; husker fildir +3$ lea (Filename,a2),a3 ; bruker filnavnet vi fikk + lea (maintmptext,NodeBase),a1 + move.l a3,a0 + bsr buildfilepath + lea (maintmptext,NodeBase),a0 + bsr findfile + beq.b 1$ + move.l a2,a0 + bsr allowdownload + beq.b 10$ + lea (maintmptext,NodeBase),a0 + move.l d2,d0 + clrz + bra.b 9$ +1$ lea (filenotavaltext),a0 + bra.b 11$ +10$ lea (filenotfountext),a0 +11$ bsr writeerroro + setz +9$ pop d2 + rts + +; retur : Z = ja. +isholdempty + lea (tmptext,NodeBase),a0 + lea (allwildcardtext),a1 + bsr getholddirfilename + move.l a0,a1 + lea (maintmptext,NodeBase),a0 + bsr findfirst + bne.b 1$ + bsr findcleanup + setz + bra.b 9$ +1$ bsr findcleanup + clrz +9$ rts + +; a0 - buffer +; a1 - pattern +; retur : Z if error +findfirst + push a2/a3/d2/d3/d4/a6 + move.l a1,a2 + move.l a0,d4 + move.l (tmpmsgmem,NodeBase),d0 + addq.l #3,d0 + and.l #$fffffffc,d0 + move.l d0,a3 ; findfile struct + move.l a2,a0 + move.b #'/',d0 + bsr strrchr + bne.b 1$ + move.l a2,a0 + move.b #':',d0 + bsr strrchr + bne.b 1$ + move.l a2,a0 + lea (nulltext),a2 + move.b #0,(ff_path,a3) + bra.b 2$ +1$ addq.l #1,d0 + move.l d0,d3 ; husker hvor + sub.l a2,d0 + move.l a2,a0 + lea (ff_path,a3),a1 + bsr strcopylen + move.b #0,(a1) + move.l d3,a0 + move.b #0,(-1,a0) +2$ lea (ff_pattern,a3),a1 + move.l a1,d2 + move.l #160,d3 + move.l a0,d1 + move.l (dosbase),a6 + jsrlib ParsePatternNoCase + moveq.l #-1,d1 + cmp.l d0,d1 ; error + beq.b 9$ + lea (ff_path,a3),a1 + move.l a1,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,(ff_lock,a3) + beq.b 9$ ; error + lea (ff_infoblockmem,a3),a0 + move.l a0,d2 + move.l d0,d1 + jsrlib Examine + tst.l d0 + bne.b 3$ + move.l (ff_lock,a3),d1 + jsrlib UnLock + moveq.l #0,d0 + move.l d0,(ff_lock,a3) + bra.b 9$ +3$ move.l d4,a0 + bsr findnext +9$ pop a2/a3/d2/d3/d4/a6 + rts + +; a0 - buffer +; returns Z for failure +findnext + push a2/a3/d2/d3/d4/a6 + move.l a0,a2 + move.l (dosbase),a6 + move.l (tmpmsgmem,NodeBase),d0 + addq.l #3,d0 + and.l #$fffffffc,d0 + move.l d0,a3 ; findfile struct + move.l (ff_lock,a3),d3 + beq.b 9$ ; ingen lock - error + lea (ff_infoblockmem,a3),a0 + move.l a0,d4 +1$ move.l d3,d1 + move.l d4,d2 + jsrlib ExNext + tst.l d0 + beq.b 8$ + move.l d4,a0 + move.l (fib_DirEntryType,a0),d0 + bpl.b 1$ ; directory + lea (fib_FileName,a0),a0 + move.l a0,d2 + lea (ff_pattern,a3),a1 + move.l a1,d1 + jsrlib MatchPatternNoCase + tst.l d0 + beq.b 1$ ; ingen match + move.l d2,a0 ; fikk filnavnet + move.l a2,a1 + bsr strcopy + lea (ff_full,a3),a1 + lea (ff_path,a3),a0 + bsr strcopy + subq.l #1,a1 + move.l d2,a0 + bsr strcopy + clrz + bra.b 9$ +8$ move.l d3,d1 + jsrlib UnLock + moveq.l #0,d0 + move.l d0,(ff_lock,a3) +9$ pop a3/d2/d3/d4/a6/a2 + rts + +findcleanup + move.l (tmpmsgmem,NodeBase),d0 + addq.l #3,d0 + and.l #$fffffffc,d0 + move.l d0,a0 ; findfile struct + move.l (ff_lock,a0),d1 + beq.b 9$ + move.l a6,-(a7) + move.l (dosbase),a6 + jsrlib UnLock + move.l (a7)+,a6 +9$ rts + +; a0 = dirname +; a1 = function to call (called with dosbase in a6, ExallData in a0) +; d0 = matchstring, 0 if none +; returns Z if error +dodirname + push a2/d2/d3 + move.l a1,a2 + move.l d0,d3 + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d2 + beq.b 1$ + move.l a2,a0 + move.l d3,d1 + bsr dodir + beq.b 2$ + move.l d2,d1 + jsrlib UnLock + move.l (exebase),a6 + clrz + bra.b 9$ +2$ move.l d2,d1 + jsrlib UnLock +1$ move.l (exebase),a6 + lea (diskerrortext),a0 + bsr writeerroro + setz +9$ pop a2/d2/d3 + rts + +; d0 = lock on dir +; a0 = function to call (called with dosbase in a6, ExallData in a0) +; d1 = matchstring, 0 if none +; returns Z if error +dodir push d2-d7/a2/a3/a6 + move.l a0,a3 + move.l d0,d6 + move.l d1,d3 ; husker matchstring + move.l (dosbase),a6 + move.l (exallctrl,NodeBase),a2 ; ExAllControl + moveq.l #0,d0 + move.l d0,(eac_LastKey,a2) ; sletter eventuell key + move.l d0,(eac_MatchFunc,a2) + move.l d3,(eac_MatchString,a2) + +1$ move.l d6,d1 + move.l (tmpmsgmem,NodeBase),d2 + move.l (msgmemsize,NodeBase),d3 + moveq.l #ED_COMMENT,d4 + move.l a2,d5 + jsrlib ExAll + move.l d0,d7 + bne.b 2$ + jsrlib IoErr + cmp.l #ERROR_NO_MORE_ENTRIES,d0 + bne.b 3$ +2$ move.l (eac_Entries,a2),d0 ; antall filer + beq.b 3$ ; ingen + move.l a2,d4 ; husker ptr + move.l (tmpmsgmem,NodeBase),a2 ; henter første ExAllData +4$ move.l a2,a0 + jsr (a3) ; kaller funksjonen + move.l (ed_Next,a2),d0 + move.l d0,a2 + bne.b 4$ + move.l d4,a2 ; henter tilbake ptr +3$ tst.l d7 ; skulle vi kalle mere ? + bne.b 1$ ; ja + clrz +9$ pop d2-d7/a2/a3/a6 + rts + +***************************************************************** +* Mark meny * +***************************************************************** + +;#b +;#c +marklogin + lea (u_almostendsave+CU,NodeBase),a1 + move.l (Loginlastread,NodeBase),a0 + moveq.l #0,d0 + move.w (Maxconferences+CStr,MainBase),d0 + subq.l #1,d0 + bcs.b 2$ ; egentlig umulig.. +1$ move.l (a0)+,(uc_LastRead,a1) ; reset'er til loginstate + lea (Userconf_seizeof,a1),a1 + dbf d0,1$ + lea (mloginstatetext),a0 + bsr writetexto +2$ moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + move.w #-1,(confnr,NodeBase) + jsr (joinnr) + jmp (readmenu) ; Hopper til read meny. + +;#c +unmarksubject + push a2/a3/d2 + jsr (getcurmsgnr) + beq.b 9$ + move.w (confnr,NodeBase),d1 + lea (tmpmsgheader,NodeBase),a3 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 3$ + lea (errloadmsghtext),a0 + bsr writeerroro + bra.b 9$ +3$ move.l a3,a0 + jsr (isnetmessage) + beq.b 9$ ; ut + lea (Subject,a3),a0 + lea (maintmptext,NodeBase),a1 + bsr strcopy ; husker subjectet + lea (unmarkingtext),a0 + bsr writetexti + move.l (Number,a3),d2 + bsr 10$ + + lea (maintmptext,NodeBase),a3 + move.l a3,a0 + bsr upstring + move.l a3,a0 + jsr (removesubjectstart) + move.l a0,a3 + lea (msgqueue,NodeBase),a2 +1$ move.l (a2)+,d0 + beq.b 9$ ; ferdig + move.l a3,a0 + jsr (samesubject) + bmi.b 9$ ; error + bne.b 1$ ; Fant teksten i denne + lea (-4,a2),a2 + move.l (a2),d2 + bsr 10$ + bra.b 1$ + +9$ bsr outimage + pop a2/a3/d2 + jmp (readmenu) ; Hopper til read meny. + +10$ move.b #' ',d0 + bsr writechar + move.l d2,d0 + bsr skrivnr + bsr breakoutimage + move.l d2,d0 + bra removefromqueue + +;#c +markset push d2 + lea (msgtosetasltext),a0 + bsr readlineprompt + beq.b 9$ + bsr atoi + lea (invalidnrtext),a0 + bmi.b 8$ + move.l d0,d2 ; husker nr'et + moveq.l #0,d0 + move.l d0,(msgqueue,NodeBase) ; Tømmer køen. + + lea (n_FirstConference+CStr,MainBase),a0 + move.w (confnr,NodeBase),d1 + mulu #ConferenceRecord_SIZEOF/2,d1 + move.l (n_ConfDefaultMsg,a0,d1.l),d0 + cmp.l d2,d0 ; finnes meldingen ? + bcc.b 1$ ; ikke for høy + move.l d0,d2 ; var for høy, setter maks +1$ move.w (confnr,NodeBase),d1 + mulu #Userconf_seizeof/2,d1 + lea (u_almostendsave+CU,NodeBase),a0 + move.l d2,(uc_LastRead,a0,d1.l) + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 + move.w #-1,(confnr,NodeBase) + jsr (joinnr) + bra.b 9$ +8$ bsr writeerroro +9$ pop d2 + jmp (readmenu) ; Hopper til read meny. + +;#c +markreset + moveq.l #0,d0 + move.l d0,(msgqueue,NodeBase) + bsr unjoin + lea (allmbresettext),a0 + bsr writetexto + jmp (readmenu) ; Hopper til read meny. + +;#c +markcurrmsg + jsr (getcurmsgnr) + beq.b 9$ + bsr allowmark + beq.b 2$ + lea (cantmarkmsgtext),a0 + bsr writeerroro + bra.b 9$ +2$ lea (markingtext),a0 + bsr writetexti + move.b #' ',d0 + bsr writechar + move.l NodeBase,a1 + IFND DEMO + lea sdfsdf,a0 + ENDC + move.l (currentmsg,NodeBase),d0 +3$ bsr skrivnr + bsr outimage + lea (tmpmsgheader,NodeBase),a0 ; allowmark har hentet inn meldingen + bsr insertinqueue +9$ jmp (readmenu) ; Hopper til read meny. + +;#c +minefirst + push d2-d3/a2/a3 + lea (msgsfoundtext),a0 + bsr writetexti + lea (msgqueue,NodeBase),a2 + move.l a2,a3 +1$ move.l (a2)+,d0 + beq.b 9$ + move.w (confnr,NodeBase),d1 + lea (tmpmsgheader,NodeBase),a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writetexti + bra.b 9$ +2$ move.l (MsgTo+tmpmsgheader,NodeBase),d0 + cmp.l (Usernr+CU,NodeBase),d0 + bne.b 1$ ; den er ikke til oss + move.b #' ',d0 + bsr writechar + move.l (Number+tmpmsgheader,NodeBase),d0 + bsr skrivnr + bsr breakoutimage + move.l a2,d0 + sub.l a3,d0 + subq.l #4,d0 + bls.b 3$ + move.l a2,a0 +4$ move.l (-8,a0),-(a0) + subq.l #4,d0 + bhi.b 4$ +3$ move.l (Number+tmpmsgheader,NodeBase),(a3)+ + bra.b 1$ +9$ bsr outimage + pop d2-d3/a2/a3 + jmp (readmenu) ; Hopper til read meny. + +;#c +markednow + bsr findnumberinque + bsr skrivnr + lea (msgmarkedtext),a0 + bsr writetexto + jmp (readmenu) ; Hopper til read meny. + +;#c +unmarkthread + jsr (getcurmsgnr) + beq.b 9$ + push d0 + lea (unmarkingtext),a0 + bsr writetexti + pop d1 + lea (unmarkthreadfunc),a0 + move.w (confnr,NodeBase),d0 + bsr dothread + bsr outimage +9$ jmp (readmenu) ; Hopper til read meny. + +unmarkthreadfunc + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l (Number,a3),d0 + bsr removefromqueue + clrn + rts + +;#c +markthread + jsr (getcurmsgnr) + beq.b 9$ + push d0 + lea (markingtext),a0 + bsr writetexti + pop d1 + lea (markthreadfunc),a0 + move.w (confnr,NodeBase),d0 + bsr dothread + bsr outimage +9$ jmp (readmenu) ; Hopper til read meny. + +markthreadfunc + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 9$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l a3,a0 + bra insertinqueue +9$ clrn + rts + +;#c +unmarkauthor + push a2/a3/d2 + jsr (getcurmsgnr) + beq 9$ + lea (tmpmsgheader,NodeBase),a3 + move.w (confnr,NodeBase),d1 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writeerroro + bra.b 9$ + +2$ move.l a3,a0 + jsr (isnetmessage) + beq.b 9$ ; ut + move.l (MsgFrom,a3),d2 + lea (msgqueue,NodeBase),a2 + lea (unmarkingtext),a0 + bsr writetexti +3$ move.l (a2)+,d0 + beq.b 5$ + move.w (confnr,NodeBase),d1 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 4$ + lea (errloadmsghtext),a0 + bsr writeerroro + bra.b 9$ +4$ move.l (MsgFrom,a3),d0 + cmp.l (MsgFrom,a3),d2 + bne.b 3$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l (Number,a3),d0 + bsr removefromqueue + subq.l #4,a2 ; Siden alle nå er flyttet en plass til venstre + bra.b 3$ +5$ bsr outimage +9$ pop a2/a3/d2 + jmp (readmenu) ; Hopper til read meny. + +;#c +unmarkallbutmine + push a2/a3 + lea (tmpmsgheader,NodeBase),a3 + lea (msgqueue,NodeBase),a2 + lea (unmarkingtext),a0 + bsr writetexti +3$ move.l (a2)+,d0 + beq.b 5$ + move.w (confnr,NodeBase),d1 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 4$ + lea (errloadmsghtext),a0 + bsr writeerroro + bra.b 9$ +4$ move.l (Usernr+CU,NodeBase),d0 + cmp.l (MsgFrom,a3),d0 + beq.b 3$ + cmp.l (MsgTo,a3),d0 + beq.b 3$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l (Number,a3),d0 + bsr removefromqueue + subq.l #4,a2 ; Siden alle nå er flyttet en plass til venstre + bra.b 3$ +5$ bsr outimage +9$ pop a2/a3 + jmp (readmenu) ; Hopper til read meny. + +;#c +markfromperson + push d2-d4 + lea (enteruserntext),a0 + moveq.l #0,d0 ; vi godtar ikke all + moveq.l #0,d1 ; ikke nettnavn + jsr (getnamenrmatch) + beq 9$ + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 9$ + move.l d0,d4 + move.w (confnr,NodeBase),d0 + bsr getfrommsgnr + beq.b 9$ + move.l d0,d3 + move.l d0,d1 + move.w (confnr,NodeBase),d0 + bsr gettomsgnr + beq.b 9$ + move.l d0,d2 + lea (markingtext),a0 + bsr writetexti + move.l d3,d1 + move.w (confnr,NodeBase),d0 + lea (markfrompersonfunc),a0 + move.l d4,(tmpstore,NodeBase) + bsr dogroup + bsr outimage +9$ pop d2-d4 + jmp (readmenu) ; Hopper til read meny. + +;#c +markfrompersonfunc + move.l (tmpstore,NodeBase),d0 + cmp.l (MsgFrom,a3),d0 + bne.b 9$ + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 9$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l a3,a0 + bsr insertinqueue +9$ clrn + rts + +;#c +markmsgstome + push d2-d4 + move.l (Usernr+CU,NodeBase),d4 + move.w (confnr,NodeBase),d0 + bsr getfrommsgnr + beq.b 9$ + move.l d0,d3 + move.l d0,d1 + move.w (confnr,NodeBase),d0 + bsr gettomsgnr + beq.b 9$ + move.l d0,d2 + lea (markingtext),a0 + bsr writetexti + move.l d3,d1 + move.w (confnr,NodeBase),d0 + lea (markmsgstomefunc),a0 + move.l d4,(tmpstore,NodeBase) + bsr dogroup + bsr outimage +9$ pop d2-d4 + jmp (readmenu) ; Hopper til read meny. + +markmsgstomefunc + move.l (tmpstore,NodeBase),d0 + cmp.l (MsgTo,a3),d0 + bne.b 9$ + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 9$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l a3,a0 + bsr insertinqueue +9$ clrn + rts + +;#c +markgroup + push d2-d3 + move.w (confnr,NodeBase),d0 + bsr getfrommsgnr + beq.b 9$ + move.l d0,d3 + move.l d0,d1 + move.w (confnr,NodeBase),d0 + bsr gettomsgnr + beq.b 9$ + move.l d0,d2 + lea (markingtext),a0 + bsr writetexti + move.l d3,d1 + move.w (confnr,NodeBase),d0 + lea (markgroupfunc),a0 + bsr dogroup + bsr outimage +9$ pop d2-d3 + jmp (readmenu) ; Hopper til read meny. + +markgroupfunc + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 9$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l a3,a0 + bsr insertinqueue +9$ clrn + rts + +;#c MARK DATE (M D) +markmsgafterdate + push d2-d3 +1$ lea (markmsgfromtext),a0 + bsr readlineprompt + beq.b 9$ + bsr strtonr2 + bmi.b 2$ + move.l d0,d2 ; år + bsr strtonr2 + bmi.b 2$ + move.l d0,d3 ; mnd + bsr strtonr2 + bmi.b 2$ + exg d0,d2 ; dag + move.l d3,d1 + jsr (datetodays) + bne.b 3$ +2$ lea (invaliddatetext),a0 + bsr writeerroro + bra.b 1$ +3$ move.l d0,d3 + lea (markingtext),a0 + bsr writetexti + lea (n_FirstConference+CStr,MainBase),a0 + move.w (confnr,NodeBase),d1 + mulu #ConferenceRecord_SIZEOF/2,d1 + move.l (n_ConfDefaultMsg,a0,d1.l),d2 + move.w (confnr,NodeBase),d0 + moveq.l #1,d1 ;n_ConfFirstMsg ; Foreløpig så starter vi alltid på 1 + lea (markmsgafterdatefunc),a0 + move.l d3,(tmpstore,NodeBase) + bsr dogroup + bsr outimage +9$ pop d2-d3 + jmp (readmenu) ; Hopper til read meny. + +markmsgafterdatefunc + move.l (tmpstore,NodeBase),d0 + cmp.l (MsgTimeStamp+ds_Days,a3),d0 + bhi.b 9$ ; meldingen er eldre + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 9$ + move.b #' ',d0 + bsr writechar + move.l (Number,a3),d0 + bsr skrivnr + bsr breakoutimage + move.l a3,a0 + bsr insertinqueue +9$ clrn + rts + +;#c +;d0 = confnr +; Asks from msg nr (the lowest number in queue, or 1 if none is default) +getfrommsgnr + push d2/d3/d4 + moveq.l #0,d2 + move.w d0,d2 + + bsr findlowestinqueue ; finner start meldingen + bne.b 3$ + moveq.l #1,d0 +3$ move.l d0,d4 + lea (tmptext,NodeBase),a1 + lea (frommsgtext),a0 + bsr strcopy + subq.l #1,a1 + + move.l d4,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.b #'-',(a1)+ + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d2 + move.l (n_ConfDefaultMsg,a0,d2.l),d3 + move.l d3,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + lea (ftmsgconttext),a0 + bsr strcopy + subq.l #1,a1 + move.l d4,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.b #'>',(a1)+ + move.b #':',(a1)+ + move.b #' ',(a1)+ + move.b #0,(a1) +2$ lea (tmptext,NodeBase),a0 + bsr readlineprompt + bne.b 1$ + move.l d4,d0 + tst.b (readcharstatus,NodeBase) + notz + bra.b 9$ +1$ bsr atoi + bmi.b 2$ + beq.b 2$ + cmp.l d0,d3 + bcs.b 2$ ; For høyt siffer (Z = 0, hvis vi passerer) +9$ pop d2/d3/d4 + rts + +;#c +;d0 = confnr +;d1 = min msg nr +; Asks to msg nr (max msg num is default). Number must be higher than min msgnr +gettomsgnr + push d2/d3/d4 + move.w d0,d2 + move.l d1,d4 + lea (tmptext,NodeBase),a1 + lea (tomsgtext),a0 + bsr strcopy + subq.l #1,a1 + move.l d4,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.b #'-',(a1)+ + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d2 + move.l (n_ConfDefaultMsg,a0,d2.l),d3 + move.l d3,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + lea (ftmsgconttext),a0 + bsr strcopy + subq.l #1,a1 + move.l d3,d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.b #'>',(a1)+ + move.b #':',(a1)+ + move.b #' ',(a1)+ + move.b #0,(a1) +2$ lea (tmptext,NodeBase),a0 + bsr readlineprompt + bne.b 1$ + move.l d3,d0 + tst.b (readcharstatus,NodeBase) + notz + bra.b 9$ +1$ bsr atoi + bmi.b 2$ + beq.b 2$ + cmp.l d0,d4 + bhi.b 2$ ; For lavt siffer + cmp.l d0,d3 + bcs.b 2$ ; For høyt siffer + clrz +9$ pop d2/d3/d4 + rts + +;#c +; check if user is allowed to mark this message +; z = 1 -> ja +; n = 1 -> Error +allowmark + move.w (confnr,NodeBase),d1 + lea (tmpmsgheader,NodeBase),a0 + jsr (loadmsgheader) + bne.b 1$ + lea (tmpmsgheader,NodeBase),a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + clrn + bra.b 9$ +1$ lea (errloadmsghtext),a0 + bsr writeerroro + setn + setz +9$ rts + +;#c +; Loop trough a thread and perform a function on all messages +; d0 = confnr +; d1 = meldings nr for første melding. +; a0 = funksjon å utføre +; rutinen får msgheader'en i a3 +dothread + push a2-a3/d2-d4 + lea (tmpmsgheader,NodeBase),a3 + move.l a0,a2 ; funksjon + move.l d0,d2 ; confnr + moveq.l #0,d3 ; slutt flagg + move.l d1,d4 + bsr 10$ + pop a2-a3/d2-d4 + rts + +10$ move.w d2,d1 + move.l d4,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 11$ + lea (errloadmsghtext),a0 + bsr writetexti + moveq.l #1,d3 + bra.b 19$ +11$ jsr (a2) + bpl.b 13$ + moveq.l #1,d3 ; avslutt +13$ tst.l d3 + bne.b 19$ + move.l (RefNxt,a3),-(a7) + move.l (RefBy,a3),d4 + beq.b 12$ + bsr.b 10$ +12$ move.l (a7)+,d4 + beq.b 19$ + tst.l d3 + bne.b 19$ + bsr.b 10$ +19$ rts + +;#c +; Loop trough a group of messages and perform a function on all messages +; d0 = confnr +; d1 = meldings nr for første melding. +; d2 = meldings nr for siste melding. +; a0 = funksjon å utføre +; rutinen får msgheader'en i a3 +dogroup + push a2-a3/d3-d4 + lea (tmpmsgheader,NodeBase),a3 + move.l a0,a2 ; funksjon + move.l d0,d3 ; confnr + move.l d1,d4 +1$ move.w d3,d1 + move.l d4,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writetexti + bra.b 9$ +2$ jsr (a2) + bmi.b 9$ ; avbryt + addq.l #1,d4 + cmp.l d4,d2 + bcc.b 1$ +9$ pop a2-a3/d3-d4 + rts + +;#c +; Loop trough a group of messages in threads and perform a function on all messages +; d0 = confnr +; d1 = meldings nr for første melding. +; d2 = meldings nr for siste melding. +; a0 = funksjon å utføre +; rutinen får msgheader'en i a3 +dogroupthreadwise + push a2-a3/d3-d4 + lea (tmpmsgheader,NodeBase),a3 + move.l a0,a2 ; funksjon + move.l d0,d3 ; confnr + move.l d1,d4 +1$ move.w d3,d1 + move.l d4,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writetexti + bra.b 9$ +2$ jsr (a2) + bmi.b 9$ ; avbryt + addq.l #1,d4 + cmp.l d4,d2 + bcc.b 1$ +9$ pop a2-a3/d3-d4 + rts + +;#c +sntext dc.b 'SNR',0 + cnop 0,4 + +;#e + +***************************************************************** +* sub rutiner * +***************************************************************** + +; d0 = access +getaccstring + lea (tmptext,NodeBase),a0 +; a0 = outstring +; d0 - bits +confbitstotext + push a0 + lea (confacsbitstext),a1 + moveq #0,d1 +6$ btst d1,d0 + beq.b 5$ + move.b (0,a1,d1.w),(a0)+ +5$ addq.w #1,d1 + cmpi.w #6,d1 + bls.b 6$ + move.b #0,(a0) + pop a0 + rts + +;a0 - 1. datestamp +;a1 - 2. datestamp +calcmins + move.l (ds_Days,a1),d0 + sub.l (ds_Days,a0),d0 + bcc.b 3$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. + bra.b 9$ +3$ move.l (ds_Minute,a1),d1 + sub.l (ds_Minute,a0),d1 + mulu.w #24*60,d0 + add.l d0,d1 + bpl.b 1$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. + bra.b 9$ +1$ move.l d1,d0 + move.l (ds_Tick,a1),d1 + sub.l (ds_Tick,a0),d1 + bcc.b 2$ ; ikke wrap + addi.l #TICKS_PER_SECOND*60,d1 +2$ divu.w #TICKS_PER_SECOND,d1 + andi.l #$ffff,d1 + cmpi.w #30,d1 ; er skal vi runde oppover ? + bcs.b 9$ ; nei + addq.l #1,d0 +9$ rts + +;a0 - 1. datestamp +;a1 - 2. datestamp +calcminsnoround + move.l (ds_Days,a1),d0 + sub.l (ds_Days,a0),d0 + bcc.b 3$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. + bra.b 9$ +3$ move.l (ds_Minute,a1),d1 + sub.l (ds_Minute,a0),d1 + mulu.w #24*60,d0 + add.l d1,d0 + bpl.b 9$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. +9$ rts + +joinnextunreadconf +; bsr unjoin + moveq.l #0,d0 + move.w (confnr,NodeBase),d0 ; Starter fra der vi er + bsr getnextunreadconf + beq.b 9$ +; move.w #-1,(confnr,NodeBase) ; sier vi er unjoin'a + jsr (joinnr) ; joiner conf nr d0 + clrz +9$ rts + +; d0 = start ifra conf +getnextunreadconf + push d2/d3/d4/d5/a2/d6/a3 + move.w d0,d2 + lea (tmpmsgheader,NodeBase),a2 + move.w d2,d3 ; husker hvor vi startet +1$ move.w d2,d0 + bsr getnextconfnr + move.w d0,d2 + move.w d2,d1 ; sjekker om det er uleste + mulu #ConferenceRecord_SIZEOF/2,d1 ; meldinger her + lea (n_FirstConference+CStr,MainBase),a0 + move.l (n_ConfDefaultMsg,a0,d1.l),d6 ; max msg + move.l d6,d4 + move.l d6,d5 + + move.w d2,d1 + mulu #Userconf_seizeof/2,d1 + lea (u_almostendsave+CU,NodeBase),a3 + add.l d1,a3 + sub.l (uc_LastRead,a3),d5 + bls.b 2$ ; nope +; d4 = første melding. +; d5 = antall meldinger + sub.l d5,d4 ; søker igjennom til vi finner + addq.l #1,d4 ; en vi kan skrive ut, hvis ikke +4$ move.w d2,d1 ; er det ingen nye meldinger + move.l d4,d0 + move.l a2,a0 + jsr (loadmsgheader) + beq.b 3$ + lea (errloadmsghtext),a0 + bsr writeerroro + setz + bra.b 9$ +3$ move.l a2,a0 + move.w d2,d0 + bsr kanskrive ; Kan vi skrive ut denne ??? + beq.b 5$ ; ja, da er det nye i denne konf'en + addq.l #1,d4 + subq.l #1,d5 + bne.b 4$ + move.w d2,d1 ; Det var ingen, så vi oppdaterer last read + add.w d1,d1 ; så vi ikke gjør dette flere ganger + move.l d6,(uc_LastRead,a3) +2$ cmp.w d2,d3 ; har vi gått rundt + bne.b 1$ ; nei + bra.b 9$ +5$ move.l d2,d0 ; vi fant en ny en. + clrz +9$ pop d2/d4/a2/d5/d3/d6/a3 + rts + +; a0 = filnavn som skal være default, 0 for ingen +getfullnameusetmp + move.l a0,a1 + lea (tmptext,NodeBase),a0 +; bra.b getfullname + +; a0 = string å legge det i (hvis vi trenger det) +; a1 = filnavn som skal være default, 0 for ingen +getfullname + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + bne.b 1$ ; nei. kan ikke, tar ren tekst + move.l (filereqadr,NodeBase),d0 ; har vi fått requester ? + beq.b 1$ ; nope + clr.b (readlinemore,NodeBase) ; flush'er input + bsr getfullnamewithreq + bra.b 9$ + +1$ move.l a1,d0 ; bruker ikke requester + beq.b 2$ ; ikke edline + moveq.l #70,d0 + lea (enterffnametext),a0 + bsr mayedlinepromptfull + bra.b 9$ + +2$ lea (enterffnametext),a0 + bsr readlineprompt +9$ rts + + IFND ASLFR_InitialFile +ASLFR_InitialFile equ TAG_USER+$80008 ; Initial requester coordinates + ENDC + +; a0 = string å lagre filnavnet i +; a1 = filnavn som skal være default, 0 for ingen +; z = 1, bare return +; z = 0, a0 = filnavn +; n = 1, klarte ikke bruke asl +getfullnamewithreq + push a2/a3/d2/d3 + link.w a3,#-16 + move.l a3,d3 + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + bne.b 8$ ; nei. kan ikke + move.l a0,a3 ; husker lagre string + + move.l (filereqadr,NodeBase),d0 ; har vi fått requester ? + beq.b 8$ ; nope + move.l (aslbase),a6 + move.l a1,a0 + suba.l a1,a1 + move.l d0,a2 + move.l a0,d0 ; har vi en fil inn ? + beq.b 4$ ; nei. Dropp tags + move.l #ASLFR_InitialFile,(sp) ; bygger opp tags for å fylle ut filnavnet + move.l a0,(4,sp) + move.l #TAG_DONE,(8,sp) + move.l sp,a1 +4$ move.l a2,a0 + jsrlib AslRequest + move.l d0,d2 + beq.b 2$ ; cancle eller error + move.l a3,a1 ; fyller i filnavnet + move.l (rf_Dir,a2),a0 + tst.b (a0) + beq.b 1$ ; ikke noen dir + bsr strcopy + subq.l #1,a1 + cmpi.b #':',(-1,a1) + beq.b 1$ + cmpi.b #'/',(-1,a1) + beq.b 1$ + move.b #'/',(a1)+ +1$ move.l (rf_File,a2),a0 + tst.b (a0) + bne.b 3$ +2$ clrn ; Klarte å bruke ASL, men .. + setz ; ikke noe filnavn + bra.b 9$ +3$ bsr strcopy + move.l a3,a0 + clrzn ; alt ok + bra.b 9$ +8$ setn ; klarte ikke asl +9$ move.l (exebase),a6 + move.l d3,a3 + unlk a3 + pop a2/a3/d2/d3 + rts + +filereqtags + dc.l ASL_Window,0 + dc.l TAG_DONE,0 + +; d0 forige confnr +getnextconfnr +1$ bsr getnextconfnrsub + lea (u_almostendsave+CU,NodeBase),a0 + move.w d0,d1 + sub.w #1,d1 + mulu #Userconf_seizeof,d1 + move.w (uc_Access,a0,d1.l),d1 + btst #ACCB_Read,d1 ; Er vi medlem her ? + bne.b 8$ ; ja, ok + subi.w #1,d0 + add.w d0,d0 ; gjor om til confnr standard + bra.b 1$ +8$ subi.w #1,d0 + add.w d0,d0 ; gjor om til confnr standard + rts + +; d0 - nåværende konf nr. +getnextconfnrsub + push a2 + lea (n_FirstConference+CStr,MainBase),a2 + cmpi.w #-1,d0 ; har vi aktiv conf ? + bne.b 1$ ; ja +3$ moveq.l #0,d0 ; tar første conf + move.w (n_ConfOrder,a2),d0 + bra.b 4$ +1$ lsr.w #1,d0 + addi.w #1,d0 +0$ moveq.l #0,d1 + move.w (Maxconferences+CStr,MainBase),d1 + sub.w #1,d1 + move.l a2,a0 +2$ cmp.w (n_ConfOrder,a0),d0 + lea (ConferenceRecord_SIZEOF,a0),a0 + dbeq d1,2$ + cmpi.w #-1,d1 + beq.b 3$ ; fant ikke.. Error. Tar første + moveq.l #0,d0 ; henter conf nr + move.w (n_ConfOrder,a0),d0 + bne.b 4$ ; alt ok +6$ move.w (n_ConfOrder,a2),d0 ; tar default +4$ cmp.w (Maxconferences+CStr,MainBase),d0 + bhi.b 6$ + move.l d0,d1 ; sjekker om denne conf'en finnes + beq.b 5$ ; null allerede, egentlig galt, men.. + subq.l #1,d1 +5$ mulu.w #ConferenceRecord_SIZEOF,d1 + move.b (n_ConfName,a2,d1.l),d1 + beq.b 0$ ; nope. Prøver igjen + pop a2 + rts + +; d0 forige confnr +getprevconfnr + push a2 + lea (n_FirstConference+CStr,MainBase),a2 + cmpi.w #-1,d0 ; har vi aktiv conf ? + bne.b 1$ ; ja +3$ moveq.l #0,d0 ; tar første conf + 1 + move.w (n_ConfOrder+ConferenceRecord_SIZEOF,a2),d0 + bra.b 4$ +1$ lsr.w #1,d0 + addi.w #1,d0 +0$ moveq.l #0,d1 + move.w (Maxconferences+CStr,MainBase),d1 + sub.w #1,d1 + move.l a2,a0 +2$ cmp.w (n_ConfOrder,a0),d0 + lea (ConferenceRecord_SIZEOF,a0),a0 + dbeq d1,2$ + cmpi.w #-1,d1 + beq.b 3$ ; fant ikke.. Error. Tar første + moveq.l #0,d0 ; henter conf nr + move.w (n_ConfOrder-2*ConferenceRecord_SIZEOF,a0),d0 + lea (2*ConferenceRecord_SIZEOF,a2),a1 + cmpa.l a0,a1 + bls.b 4$ ; alt ok (vi gikk ikke utenfor) + move.w (Maxconferences+CStr,MainBase),d0 + mulu #ConferenceRecord_SIZEOF,d0 + lea (0,a2,d0.l),a0 +5$ lea (-ConferenceRecord_SIZEOF,a0),a0 + move.w (n_ConfOrder,a0),d0 ; finner siste + beq.b 5$ +4$ + move.l d0,d1 ; sjekker om denne conf'en finnes + beq.b 6$ ; null allerede, egentlig galt, men.. + subq.l #1,d1 +6$ mulu.w #ConferenceRecord_SIZEOF,d1 + move.b (n_ConfName,a2,d1.l),d1 + beq.b 0$ ; nope. Prøver igjen + lea (u_almostendsave+CU,NodeBase),a0 + move.w d0,d1 + sub.w #1,d1 + mulu #Userconf_seizeof,d1 + move.w (uc_Access,a0,d1.l),d1 + btst #ACCB_Read,d1 ; Er vi medlem her ? + beq.b 0$ ; nope + subi.w #1,d0 + add.w d0,d0 ; gjor om til confnr standard + pop a2 + rts + +; d0 = antall filer ekstra +; d1 = antall kb ekstra +; returnerer z = 1 hvis det er for mye (dvs miste accsess) +testratio + push d2/d3 + move.l d0,d2 + move.l d1,d3 + lea (u_almostendsave+CU,NodeBase),a0 + move.w (uc_Access,a0),d0 ; henter news access + btst #ACCB_FileVIP,d0 ; er vi filevip ? + bne 9$ ; jepp. da gir vi f.. + move.b (Cflags+CStr,MainBase),d0 ; er det noen ratio på ? + andi.b #CflagsF_Byteratio+CflagsF_Fileratio,d0 + beq.b 8$ ; nei, ferdig + +; lea (checkratiotext),a0 +; bsr writetexto + + move.b (Cflags+CStr,MainBase),d0 ; er det fil noen ratio på ? + andi.b #CflagsF_Fileratio,d0 + beq.b 2$ ; nei, videre + move.w (u_FileRatiov+CU,NodeBase),d0 ; personelig ratio ? + bne.b 1$ ; ja, bruker den. + move.w (FileRatiov+CStr,MainBase),d0 ; er det file ratio ? + beq.b 2$ ; nope +1$ move.w (Uploaded+CU,NodeBase),d1 + addi.w #1,d1 + mulu.w d0,d1 ; beregner antall filer vi kan dl'e + moveq.l #0,d0 + move.w (Downloaded+CU,NodeBase),d0 + add.w d2,d0 ; legger til for de ekstra filene + cmp.l d0,d1 ; filer, maks filer vi har lov til+1 + bls.b 3$ ; for mye + +2$ move.b (Cflags+CStr,MainBase),d0 ; er det noen byte ratio på ? + andi.b #CflagsF_Byteratio,d0 + beq.b 8$ ; nei, ferdig + move.w (u_ByteRatiov+CU,NodeBase),d0 ; personelig ratio ? + bne.b 5$ ; ja, bruker den. + move.w (ByteRatiov+CStr,MainBase),d0 ; er det byte ratio ? + beq.b 8$ ; nei, ferdig +5$ move.l (KbUploaded+CU,NodeBase),d1 + addq.l #1,d1 + mulu.w d0,d1 + move.l (KbDownloaded+CU,NodeBase),d0 + add.l d3,d0 ; legger til for de ekstra bytene + cmp.l d0,d1 ; kb, maks kb vi har lov til+1 + bhi.b 4$ ; under grensen +3$ setz ; for mye, returnerer det + bra.b 9$ +4$ setz +8$ notz +9$ pop d2/d3 + rts + +checkratio + lea (u_almostendsave+CU,NodeBase),a0 + move.w (uc_Access,a0),d0 ; henter news access + btst #ACCB_FileVIP,d0 ; er vi filevip ? + bne.b 4$ ; jepp. da gir vi f.. + move.b (Cflags+CStr,MainBase),d0 ; er det noen ratio på ? + andi.b #CflagsF_Byteratio+CflagsF_Fileratio,d0 + beq.b 9$ ; nei, ferdig + lea (checkratiotext),a0 + bsr writetexto + moveq.l #0,d0 ; ingen ekstra filer + moveq.l #0,d1 ; eller bytes + bsr testratio + bne.b 4$ + lea (u_almostendsave+CU,NodeBase),a0 ; mister dl access + andi.w #~ACCF_Download,(uc_Access,a0) + lea (dlacclosttext),a0 + move.w (Savebits+CU,NodeBase),d0 ; husker at han har mistet DL'en + bset #SAVEBITSB_LostDL,d0 + move.w d0,(Savebits+CU,NodeBase) + bra.b 8$ + +4$ move.w (Savebits+CU,NodeBase),d0 + bclr #SAVEBITSB_LostDL,d0 + beq.b 9$ ; hadde ikke mistet + move.w d0,(Savebits+CU,NodeBase) ; sletter miste flagget + lea (u_almostendsave+CU,NodeBase),a0 ; får tilbake dl access hvis vi ikke har den + move.w (uc_Access,a0),d0 + btst #ACCB_Download,d0 + bne.b 9$ ; vi har den, så dette er en nop + ori.w #ACCF_Download,d0 ; får dl access + move.w d0,(uc_Access,a0) + lea (dlaccgainedtext),a0 +8$ bsr writetexto + lea (uc_Access+u_almostendsave+CU,NodeBase),a0 + moveq.l #2,d0 ; lagrer forandring + bsr saveuserarea +9$ rts + +;a0 - log tekst +;d0 - confnr +;d1 - msg nr +killrepwritelog + push d2/a3 + move.l d1,d2 + move.l a0,a3 + lea (tmptext,NodeBase),a1 + lea (n_FirstConference+CStr,MainBase),a0 + mulu.w #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + move.b #' ',(-1,a1) + move.b #'#',(a1)+ + move.l a1,a0 + move.l d2,d0 + bsr konverter + move.l a3,a0 + lea (tmptext,NodeBase),a1 + bsr writelogtexttimed + pop d2/a3 + rts + +browseconferences1 + push a2/d2/d3/a3 + lea (tmpfileentry,NodeBase),a3 + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 9$ ; nope + + lea (ansiclearscreen),a0 + bsr writetexti + + moveq.l #1,d0 ; conference browse + jsr (setupbrowse) + jsr (setuptmpbrowse) + beq.b 8$ ; error + + lea (n_FirstConference+CStr,MainBase),a2 + moveq.l #0,d2 ; starter alltid ifra NEWS + move.w d2,d3 ; husker starten + +1$ move.w d2,d0 + mulu.w #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a2,d0.l),a0 + +; move.w (n_ConfSW,a2,d0.l),d1 +; btst #CONFSWB_VIP,d1 ; JEO1 Kan han join'e denne ? +; beq.b 1$ ; nei + + lea (Filename,a3),a1 ; Legger confname her... + jsr (strcopy) + + lea (localefullname),a0 + lea (Filedescription,a3),a1 + jsr (strcopy) + +; move.l a3,a1 ; a3 = tmpfileentry +; moveq.l #Fileentry_SIZEOF,d0 +; bsr strcopymaxlen + +; move.l (localefullname),a0 +; move.l (Filedescription,a3),a1 +; move.w #Sizeof_FileDescription,d0 +; bsr strcopymaxlen + + move.l a3,a0 + move.w d2,d0 + + jsr (addtmpbrowse) + beq.b 3$ ; full, "ferdig", hopper til valg +2$ move.w d2,d0 + jsr (getnextconfnrsub) + subi.w #1,d0 + add.w d0,d0 ; gjør om til confnr standard + move.w d0,d2 + cmp.w d3,d2 + bne 1$ + +3$ jsr (dobrowseselect) + jsr (cleanuptmpbrowse) + +8$ +9$ pop a2/d2/d3/a3 + rts + +; a0 = prompt +getconfname + bsr readlineprompt + beq.b 9$ + bsr.b getconfnamesub +9$ rts + +; a0 = input +getdirnamesub + push d2/a2 + move.l (firstFileDirRecord+CStr,MainBase),a1 + lea (n_DirName,a1),a1 + move.w (MaxfileDirs+CStr,MainBase),d0 + add.w d0,d0 + lea (dirnotfoundtext),a2 + moveq.l #FileDirRecord_SIZEOF,d1 + bsr.b getconfdirnamesub + pop d2/a2 + rts + +; a0 = input +getconfnamesub + push d2/a2 + lea (n_ConfName+n_FirstConference+CStr,MainBase),a1 ; hvilken array vi skal lete i + move.w (Maxconferences+CStr,MainBase),d0 ; størrelsen + add.w d0,d0 + lea (connotfoundtext),a2 + moveq.l #ConferenceRecord_SIZEOF,d1 + bsr.b getconfdirnamesub + pop d2/a2 + rts + +; a0 = input +; a1 = array med navn +; d0 = num entries * 2 +; a2 = feilmelding +; d1 = size på entrys +getconfdirnamesub + push a2/a3/d2-d7 + move.l a1,d5 ; array + move.w d0,d6 ; antall + swap d6 + move.w d1,d6 ; husker size + move.l a2,d7 ; feil melding + moveq.l #0,d4 ; ikke sub også + move.l a0,a2 ; husker input + bsr upword + move.l d5,a3 ; leter etter konferansen/fildiren + move.l d6,d3 + swap d3 + moveq.l #0,d2 + +0$ move.b (a0)+,d0 + beq.b 1$ ; ferdig med å scan'e + bsr 10$ ; er dette et skille tegn ? + bne.b 0$ ; Nei. Fortsetter + move.l a0,d4 ; det er topic + move.b #0,(-1,a0) ; deler opp input'en + +1$ move.b (a3),d0 ; er det en konf her ? + beq.b 2$ ; nope + move.l a3,a1 + move.l a2,a0 + bsr 30$ ; sammenligner + beq.b 3$ ; funnet konf/sub conf +2$ lea (0,a3,d6.w),a3 ; peker til neste konf navn + addq.w #2,d2 + cmp.w d3,d2 + bcs.b 1$ + move.l d7,a0 + bsr writeerroro + setzn + bra 9$ + +301$ tst.l d4 ; er det mere ? + beq 8$ ; nope, da er alt ok + bra.b 2$ ; ja, da var det ikke denne + +3$ move.b (a1)+,d0 ; sjekker om dette er en sub conf + beq.b 301$ ; nope + cmpi.b #'/',d0 ; er dette et skille tegn ? + bne.b 3$ ; Nei. Fortsetter +; er sub conf.... + move.l a3,a0 + lea (tmptext,NodeBase),a1 ; husker hoved navnet +4$ move.b (a0)+,d0 ; kopierer til, men ikke med + move.b d0,(a1)+ ; skille tegnet + cmpi.b #'/',d0 ; skilletegn ? + bne.b 4$ ; nei, kopier flere tegn + move.b #0,(-1,a1) ; sletter skilletegnet + + move.l d4,a0 + tst.l d4 ; er det mere lest ? + bne.b 6$ ; ja + tst.b (readlinemore,NodeBase) ; er det mere input ? + bne.b 5$ ; ja. lister ikke alle sub'ene + bsr 20$ +5$ lea (topictext),a0 + bsr readlineprompt + beq.b 9$ +6$ moveq.l #0,d4 ; ikke en gang til + move.l a0,a3 ; husker input'en + bsr upword + lea (tmptext,NodeBase),a0 ; bygger opp fullt navn + lea (maintmptext,NodeBase),a1 + bsr strcopy + move.b #'/',(-1,a1) + move.l a3,a0 + bsr strcopy + lea (maintmptext,NodeBase),a2 + move.l d5,a3 ; leter etter konferansen/fildiren + move.l d6,d3 + swap d3 + moveq.l #0,d2 + +7$ move.b (a3),d0 ; er det en konf her ? + beq.b 71$ ; nope + move.l a3,a1 + move.l a2,a0 + bsr 30$ ; sammenligner + beq.b 8$ ; funnet konf'en +71$ lea (0,a3,d6.w),a3 ; peker til neste konf navn + addq.w #2,d2 + cmp.w d3,d2 + bls.b 7$ + bsr 20$ + move.b #0,(readlinemore,NodeBase) ; flusher input + bra.b 5$ +8$ move.w d2,d0 ; returnerer confnr *2 + clrz +9$ pop a2/a3/d2-d7 + rts + +10$ cmpi.b #' ',d0 ; soker etter skille tegn som + beq.b 19$ ; brukes i sub konfer + cmpi.b #',',d0 + beq.b 19$ + cmpi.b #'/',d0 +19$ rts + +; lister alle sub konfer til en hovedkonf (som ligger i tmptext) +20$ push a2/d2/d3/a3 + lea (topicsaretext),a0 + bsr writetext + moveq.l #0,d3 ; har ikke tatt første enda + move.l d5,a2 + move.l d6,d2 + swap d2 +21$ move.l a2,a1 + move.b (a1),d0 + beq.b 28$ ; ingen konf her + lea (tmptext,NodeBase),a0 + bsr.b 30$ ; sammenligner + bne.b 28$ ; ikke like + move.b (a1)+,d0 ; Naa skal dette vare et + cmpi.b #'/',d0 ; skilletegn ? + bne.b 28$ ; det var det ikke.. + tst.l d3 ; første gang ? + beq.b 22$ ; jepp + move.l a1,a3 + lea (kommaspacetext),a0 + bsr writetext + move.l a3,a1 +22$ moveq.l #1,d3 ; har skrevet ut minst en + move.l a1,a0 + bsr writetext + bsr breakoutimage +28$ lea (0,a2,d6.w),a2 ; peker til neste konf navn + subi.w #2,d2 + bne.b 21$ + move.b #'.',d0 + bsr writechari + pop a2/d2/d3/a3 + rts + +30$ move.b (a0)+,d0 + beq.b 39$ ; ferdig. De er like (saa langt) + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + beq.b 31$ + bsr upchar + cmp.b d0,d1 + beq.b 30$ +31$ clrz +39$ rts + +waitforemptymodem + push d2/d3 + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq 9$ ; Yepp. ingen venting + move.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),d0 ; ut speed + beq.b 9$ ; lokal + move.l (SerTotOut,NodeBase),d1 ; antall tegn som er skrevet siden siste input + beq.b 9$ ; ingen ser output + IFND DEMO + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_Lockedbaud,d1 + beq.b 9$ ; ikke locked, så da er alt ok + move.l (NodeBaud+Nodemem,NodeBase),d1 ; dte-modem speed + cmp.l d0,d1 ; connect,dte-modem speed + bls.b 9$ ; like (eller større), ut. + move.l (SerTotOut,NodeBase),d3 + +; d1 = dte-modem speed (eg 19200) +; d3 = totalt antall tegn ut siden siste input + + moveq.l #10,d0 + lsl.l d0,d3 ; tegn * 1024 + divu.w d0,d1 ; har cps på dte-modem + beq.b 9$ ; abort + move.w (cpsrate,NodeBase),d0 ; cps modem-modem + beq.b 9$ ; abort + +; d0.w = cps modem-modem +; d1.w = cps dte-modem +; d3.l = tot char*1024 + + move.l d3,d2 + divu.w d0,d2 ; d2.w = (t*1024)/(modem-modem) + move.l d3,d0 + divu.w d1,d0 ; d0.w = (t*1024)/(dte-modem) + sub.w d0,d2 ; trekker ifra tid brukt til modemet + bcs.b 9$ ; alt brukt opp, abort + +; d2.w = sek*1024 å vente + + moveq.l #10,d0 + moveq.l #0,d3 + move.w d2,d3 + andi.w #$3ff,d3 ; d3 = mikrosecs + andi.l #$ffff,d2 + lsr.l d0,d2 ; d2 = sek + + move.l d2,d0 + bsr skrivnr + move.b #' ',d0 + bsr writechar + move.l d3,d0 + bsr skrivnr + bsr outimage + + move.l d2,d0 + beq.b 1$ + bsr waitsecs ; venter sekundene +1$ move.l d3,d0 + beq.b 9$ + addq.l #3,d0 ; sikrer at den ikke er for liten + bsr waitmicros +; beq.b 8$ ; ingen ser output + ENDC +9$ pop d2/d3 + rts + +; returnerer z = 0 hvis sysop access +justchecksysopaccess + tst.b (tmpsysopstat,NodeBase) + bne.b 9$ + move.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq.b 8$ ; Jepp. + move.w (confnr,NodeBase),d0 + cmp.w #-1,d0 + bne.b 1$ + moveq.l #0,d0 +1$ lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Sysop,d0 ; har bruker sysop access ?? + bne.b 9$ + clrz +8$ notz +9$ rts + +checksysopaccess + bsr justchecksysopaccess + bne.b 9$ + cmpi.w #20,(menunr,NodeBase) ; er vi i sigopmeny ? + beq.b 8$ ; jepp, gir f.. + move.w #0,(menunr,NodeBase) ;Skifter til Main menu. + lea (youarenottext),a0 ; Nei, skriver ut fy melding + bsr writeerroro + clrz +8$ notz +9$ rts + +; d0 = conf nr * 1 (obs ikke * 2 som er vanelig) +; d1 = 0 : Skriver ut nummeret på de som har forandret seg +; != 0 : Vil bare vite om det er forandret +; =-1 : Kopier nye bulletins over i tmpdir'en med navn BLT-x.y, hvor x = confnr*1, y = bulletinnr +; ret: +; d0 : returnerer antall filer som er kopiert +checkupdatedbulletins + push d2/d3/d4/d5/a6/d6/d7 + link.w a3,#-160 + move.l (dosbase),a6 + move.l d0,d4 + moveq.l #1,d6 + moveq.l #0,d7 ; ingen bulletins er kopiret enda. + cmp.l #-1,d1 + bne.b 7$ + bset #28,d6 ; Vi skal kopiere filene over i tmp + bra.b 2$ +7$ tst.w d1 + beq.b 2$ + bset #31,d6 ; Husker info nivå +2$ moveq.l #0,d0 ; i tilfelle vi skal ut.. + lea (n_FirstConference+CStr,MainBase),a0 + move.l d4,d1 + mulu #ConferenceRecord_SIZEOF,d1 ; har denne konferansen + move.b (n_ConfBullets,a0,d1.l),d3 ; bulletiner ? + beq 9$ ; nei. ut. ingen nye +1$ lea (80,sp),a0 + move.w d6,d0 + move.w d4,d1 + bsr getkonfbulletname ; fyller i filnavnet + lea (80,sp),a0 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock ; tar en lock + move.l d0,d1 + beq 8$ ; egentlig error, men.. + move.l d0,d5 + move.l (infoblock,NodeBase),d2 + jsrlib Examine + move.l d0,d2 ; Husker status + move.l d5,d1 + jsrlib UnLock + tst.l d2 ; gikk det bra ? + beq 8$ ; nei. + move.l (infoblock,NodeBase),a0 + move.l (ds_Days+fib_DateStamp,a0),d0 + cmp.l (lastdayonline,NodeBase),d0 ; ny bulletin ? + bcs 8$ ; nei + bhi.b 6$ ; ja + move.l (ds_Minute+fib_DateStamp,a0),d0 ; Samme dag, sjekker minutter + cmp.w (lastminonline,NodeBase),d0 ; ny bulletin ? + bcs 8$ ; nei +6$ btst #28,d6 ; Skal vi kopiere ? + beq.b 10$ ; nei. + lea (sp),a0 + move.w d4,d0 + move.w d6,d1 + bsr getqwkbuldest + lea (80,sp),a0 + lea (sp),a1 + jsr (_copybulletin) + move.l (dosbase),a6 + addq.l #1,d7 + bra.b 8$ +10$ btst #31,d6 ; mye info ? + bne.b 9$ ; nei. Ingen vits i å sjekke mere + move.l (exebase),a6 + btst #30,d6 ; skrevet ut header ? + bne.b 3$ ; ja + lea bullhasbupdtext,a0 ; nei, skriver ut + bsr writetexto + bset #30,d6 ; og husker +3$ btst #29,d6 ; Skal det ut space,komma ? + beq.b 4$ ; Nei + lea kommaspacetext,a0 + bsr writetext +4$ move.w d6,d0 + bsr skrivnrw + bsr breakoutimage + bset #29,d6 ; skal ha komme/space (hvis flere) + move.l (dosbase),a6 +8$ add.w #1,d6 + cmp.b d3,d6 ; flere buletiner igjen ? + bls 1$ ; Ja, fortsetter, eller no change + btst #29,d6 ; Skal det ut puktum ? + beq.b 5$ ; Nei + move.l (exebase),a6 + move.b #'.',d0 + bsr writechar + bsr outimage +5$ move.l d7,d0 + setz +9$ unlk a3 + pop d2/d3/d4/d5/a6/d6/d7 + rts + +; a0 = buffer +; d0 = confnr +; d1 = bulletinnr +; lager en string på formatet : BLT-. +getqwkbuldest + push d2/d3 + move.w d0,d2 + move.w d1,d3 + move.l a0,a1 + lea (TmpPath+Nodemem,NodeBase),a0 + bsr strcopy + move.b #'/',(-1,a1) + lea (qwkbullfilename),a0 + bsr strcopy + lea (-1,a1),a0 + move.w d2,d0 + jsr (konverterw) + move.b #'.',(a0)+ + move.w d3,d0 + jsr (konverterw) + move.b #0,(a0) + pop d2/d3 + rts + +; d0 = usernr +; d1 = confnr +; return : d0 = -1, error, 0 = ikke medlem, 1 = alt ok +_checkmemberofconf + bsr.b checkmemberofconf + bmi.b 1$ + beq.b 2$ + moveq.l #1,d0 +1$ moveq.l #-1,d0 + bra.b 9$ +2$ moveq.l #0,d0 +9$ rts + +; returnerer : N for error, Z for ikke medlem +; d0 = usernr +; d1 = confnr +checkmemberofconf + push a2/d2 + moveq.l #-1,d2 ; all ? + cmp.l d0,d2 + notz + bne.b 8$ ; ja, alltid medlem + move.w d1,d2 ; husker conf'en + move.l (Tmpusermem,NodeBase),a2 + move.l a2,a0 + jsr (loadusernr) + bne.b 1$ + lea (loadusererrtext),a0 + bsr writeerroro + setzn + bra.b 9$ +1$ move.w (Userbits,a2),d0 + andi.w #USERF_Killed,d0 ; Er han død ? + notz + beq.b 8$ ; jepp + lea (u_almostendsave,a2),a0 + mulu #Userconf_seizeof/2,d2 + move.w (uc_Access,a0,d2.l),d0 + btst #ACCB_Read,d0 ; Er vi medlem her ? +8$ clrn +9$ pop a2/d2 + rts + +loginlistprivate + push a2/d2-d4 + lea (tmpfileentry,NodeBase),a2 + moveq.l #0,d3 ; Det er privat dir'en vi søker i + move.l d3,d4 ; Har vi skrevet ut "the following .." ? Nei + moveq.l #1,d2 ; starter på første fil. +1$ move.l (msg,NodeBase),a1 + move.w #Main_loadfileentry,(m_Command,a1) + move.l d3,(m_UserNr,a1) + move.l d2,(m_arg,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_EOF,d0 + beq 7$ + cmpi.w #Error_OK,d0 + bne.b 6$ + move.w (Filestatus,a2),d0 ; skriver ut alle filer som er + move.w d0,d1 ; private til denne brukeren + andi.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d1 + bne.b 2$ ; hopper over disse + btst #FILESTATUSB_PrivateUL,d0 ; Privat ? + beq.b 2$ ; nei, ikke skriv + move.l (Usernr+CU,NodeBase),d1 + cmp.l (PrivateULto,a2),d1 + bne.b 2$ ; ikke til denne brukeren + tst.l d4 ; har vi skrevet ut start teksten ? + bne.b 4$ ; jepp + lea (tfprivfwtdltext),a0 ; skriver ut + bsr writetexto + beq.b 9$ + moveq.l #1,d4 ; ... Og husker at vi gjorde det +4$ lea (Filename,a2),a0 ; skriver ( 2K, Geir Inge) + moveq.l #Sizeof_FileName,d0 + bsr writetextrfill + lea (spaceparatext),a0 + bsr writetext + move.l (Fsize,a2),d0 + moveq.l #10,d1 + lsr.l d1,d0 + moveq.l #5,d1 + bsr skrivnrrfill + lea (kkommaspacetext),a0 + bsr writetext + move.l (Uploader,a2),d0 + bsr getusername + bsr writetext + lea (endparatext),a0 + bsr writetexto + beq.b 9$ +2$ addq.l #1,d2 + bsr testbreak + beq.b 9$ + bra 1$ + +6$ lea (errloadfilhtext),a0 + bsr writetext + bra.b 8$ +7$ tst.l d4 + beq.b 9$ +8$ bsr outimage +9$ pop a2/d2-d4 + rts + +typetosysop + move.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + bne.b 9$ ; nope, ut + bsr outimage ; newline + beq.b 9$ + lea (tosysopfname),a0 + bsr typelogfile ; skriver ut fila + move.l (dosbase),a6 ; sletter fila. + move.l #tosysopfname,d1 + jsrlib DeleteFile + move.l (exebase),a6 +9$ rts + +; d0 = filehandle +; returnerer (d0) antall meldinger som er add'a +; z = 0 hvis det gikk bra +dograbqueue + push d2/a2/d3/d4/d5 + moveq.l #0,d5 ; ikke quick mode + btst #DIVB_QuickMode,(Divmodes,NodeBase) ; er det quick mode ? + beq.b 5$ + moveq.l #1,d5 ; ja, husker +5$ moveq.l #0,d4 ; antall meldinger vi add'a + move.l d0,d2 + lea (tmpmsgheader,NodeBase),a2 + moveq.l #0,d3 ; teller antall tall pr linje +1$ move.l (msgqueue,NodeBase),d0 ; er det flere meldinger her ? + notz + bne.b 9$ ; nope. Ferdig + move.l a2,a0 + move.w (confnr,NodeBase),d1 ; henter inn msg header'en + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writeerrori + bra.b 8$ + +2$ move.l a2,a0 + bsr writegrabmsgnr + + addi.w #1,d3 + cmpi.w #16,d3 ; er vi ferdige med en rad ? + bcs.b 3$ ; nei + move.w #0,d3 ; ja, nullstiller + tst.b d5 ; quick ? + bne.b 3$ ; ja, ikke newline + bsr outimage ; og tar en line feed + bra.b 4$ +3$ bsr breakoutimage +4$ move.l (Number,a2),d0 ; fjerner ifra read køen + bsr removefromqueue + + move.l a2,a0 ; kan vi skrive ut denne ? + move.w (confnr,NodeBase),d0 + bsr allowtype + bne.b 1$ ; nope. Ikke denne nei (usansynelig...) + + move.w (confnr,NodeBase),d0 ; melding ut i scratchpad + move.l d2,d1 + move.l a2,a0 + addq.l #1,d4 ; øker antall meldinger med 1 + bsr doscratchmsg + bpl.b 1$ ; ikke error, fortsetter +8$ setz + bra.b 99$ +9$ moveq.l #0,d0 + move.l d0,(msgqueue,NodeBase) ; Tømmer køen. + move.l d4,d0 + clrz +99$ pop d2/a2/d3/d4/d5 + rts + +; a0 = msgheader +writegrabmsgnr + btst #DIVB_QuickMode,(Divmodes,NodeBase) ; er det quick mode ? + beq.b 1$ ; nope, skriver nummeret + move.l (Usernr+CU,NodeBase),d1 ; skriver spesielle tegn + move.b #'*',d0 + cmp.l (MsgTo,a0),d1 + beq.b 2$ + move.b #'!',d0 + cmp.l (MsgFrom,a0),d1 + beq.b 2$ + move.b #'.',d0 +2$ bsr writechar + bra.b 9$ +1$ move.l (Number,a0),d0 ; skriver ut nummeret + bsr connrtotext + moveq.l #5,d0 + jsr (writetextlfill) +9$ rts + + IFND DEMO +; fil ptr i d4 +dograbconf + move.w (Savebits+CU,NodeBase),d1 + btst #SAVEBITSB_ReadRef,d1 + + beq dograbconfmark +; bra dograbconfref + +dograbconfref +;d2 konfnr/antall meldiger i bredden(de øverste 16 bit'ene) +;d3 msg nr (teller) +;d4 filehandle +;d5 maxs meldings nr i konf +;d6 kø nr +;d7 error/>>>>>/*****/quick status, antall meldinger sendt til scratch'en +; bit 31 = error, bit 30 = har skrevet >>>>>, bit 29 = har skrevet ***** +; bit 28 = quick mode (ikke noe newline) +;a2 msgqueue +;a3 tmpmsgheader + + push d2/d3/d5/d6/d7/a2/a3 ; fil ptr er i d4 + moveq.l #0,d2 + move.w d0,d2 ; konfnr + moveq.l #0,d1 + moveq.l #0,d7 ; ingen error, og ingen meldinger til scratch. + btst #DIVB_QuickMode,(Divmodes,NodeBase) ; er det quick mode ? + beq.b 3$ ; nope, + bset #28,d7 +3$ lea (msgqueue,NodeBase),a2 + move.l d1,(a2) ; Tømmer køen. + move.l d1,d6 ; Køen er 0 lang. + lea (tmpmsgheader,NodeBase),a3 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (n_ConfDefaultMsg,a0,d0.l),d5 ; siste melding i conf + lea (u_almostendsave+CU,NodeBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #Userconf_seizeof/2,d0 + move.l (uc_LastRead,a0,d0.l),d3 ; Siste vi leste + IFD FullGrab + moveq.l #0,d3 + ENDC + moveq.l #0,d0 ; i tilfelle vi går ut under + addq.l #1,d3 + cmp.l d3,d5 + bcs.b 98$ + move.l d5,d0 + move.l #NumMsgNrInQueue-100,d1 ; setter av plass til litt marking + cmpi.l #1,d3 ; er det første gangen her ? + bne.b 2$ ; nei, da tar vi ikke max scan + IFD FullGrab + bra.b 2$ + ENDC + + lea (n_FirstConference+CStr,MainBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #ConferenceRecord_SIZEOF/2,d0 + moveq.l #0,d1 + move.w (n_ConfMaxScan,a0,d0.l),d1 ; henter maks scan verdien +2$ sub.l d1,d0 + bcs.b 1$ + cmp.l d3,d0 + bls.b 1$ + move.l d0,d3 ; Kutter ut for gamle meldinger. +1$ cmp.l d3,d5 + bcs.b 109$ + move.l d3,d0 + bsr.b 10$ + btst #31,d7 + bne.b 99$ ; error + bclr #29,d7 ; Nytt subject + addq.l #1,d3 + bra.b 1$ +99$ setz + bra.b 9$ +98$ clrz + bra.b 9$ +109$ move.l d7,d0 + andi.l #$fffffff,d0 + clrz +9$ pop d2/d3/d5/d6/d7/a2/a3 + rts + +10$ move.l d5,-(a7) + move.l d0,d5 ; msg nr + move.w d2,d1 ; conf nr + move.l a3,a0 ; tmpmsgheader + jsr (loadmsgheader) + beq.b 14$ + lea (errloadmsghtext),a0 + bsr writetexti + bset #31,d7 ; Setter error flagg. + bra 19$ +14$ move.l a3,a0 + move.w d2,d0 + bsr kanskrive + bne 19$ ; 11$ eller 19$ + move.l (Number,a3),d0 + bsr findinqueue + bne 19$ ; Vi har vært innom denne + move.l (Number,a3),d0 ; Legger inn i køen + move.l d0,(0,a2,d6.l) + addq.l #4,d6 + moveq.l #0,d0 ; Sletter resten av køen. + move.l d0,(0,a2,d6.l) + btst #30,d7 + bne.b 12$ + bset #30,d7 + lea (nyconfgrabtext),a0 + move.l d4,d0 + bsr writefileln + bne.b 12$ + bset #31,d7 ; error + bra 19$ +12$ btst #29,d7 + bne.b 13$ + bset #29,d7 + lea (nysubjgrabtext),a0 + move.l d4,d0 + bsr writefileln + bne.b 13$ + bset #31,d7 ; error + bra 19$ + +13$ ;lea (transnltext),a0 ; skriver ut nl +; move.l d4,d0 +; bsr writefileln +; bne.b 18$ +; bset #31,d7 ; error +; bra 19$ + +18$ move.l a3,a0 + bsr writegrabmsgnr + swap d2 ; henter fram bredde telleren + addi.w #1,d2 + cmpi.w #16,d2 ; er vi ferdige med en rad ? + bcs.b 16$ ; nei + move.w #0,d2 ; ja, nullstiller + btst #28,d7 + bne.b 16$ + bsr outimage ; og tar en line feed + bra.b 17$ +16$ bsr breakoutimage +17$ swap d2 ; tilbake med confnr + move.w d2,d0 + move.l d4,d1 + move.l a3,a0 + addq.l #1,d7 ; oppdaterer antall grab'a meldinger + bsr doscratchmsg + bpl.b 11$ + bset #31,d7 ; error + bra.b 19$ +11$ move.l (RefNxt,a3),-(a7) + move.l (RefBy,a3),d0 + beq.b 15$ + bsr 10$ +15$ move.l (a7)+,d0 + beq.b 19$ + btst #31,d7 + bne.b 19$ + bsr 10$ +19$ move.l (a7)+,d5 + rts + +dograbconfmark + push a3/d2/d3/d5/d6/d7 + moveq.l #0,d7 ; antall meldinger i grab'en + moveq.l #0,d2 + move.w d0,d2 ; konfnr/bredde teller + moveq.l #0,d6 ; har vi skrevet >>>>> ? + lea (tmpmsgheader,NodeBase),a3 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (n_ConfDefaultMsg,a0,d0.l),d5 ; siste melding i conf + lea (u_almostendsave+CU,NodeBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #Userconf_seizeof/2,d0 + move.l (uc_LastRead,a0,d0.l),d3 ; Siste vi leste + addq.l #1,d3 + cmp.l d3,d5 + bcs 9$ + move.l d5,d0 + move.l #NumMsgNrInQueue-100,d1 ; setter av plass til litt marking + cmpi.l #1,d3 ; er det første gangen her ? + bne.b 7$ ; nei, da tar vi ikke max scan + lea (n_FirstConference+CStr,MainBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #ConferenceRecord_SIZEOF/2,d0 + moveq.l #0,d1 + move.w (n_ConfMaxScan,a0,d0.l),d1 ; henter maks scan verdien +7$ sub.l d1,d0 + bcs.b 1$ + cmp.l d3,d0 + bls.b 1$ + move.l d0,d3 ; Kutter ut for gamle meldinger. +1$ cmp.l d3,d5 + bcs 9$ + move.w d2,d1 + move.l d3,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writetexti +8$ setz + bra 99$ +2$ move.l a3,a0 + move.w d2,d0 + bsr kanskrive + bne.b 3$ + + move.l a3,a0 + bsr writegrabmsgnr + + swap d2 ; henter fram bredde telleren + addi.w #1,d2 + cmpi.w #16,d2 ; er vi ferdige med en rad ? + bcs.b 5$ ; nei + move.w #0,d2 ; ja, nullstiller + btst #DIVB_QuickMode,(Divmodes,NodeBase) ; er det quick mode ? + bne.b 5$ ; ja, ingne newline + bsr outimage ; og tar en line feed + bra.b 6$ +5$ bsr breakoutimage +6$ swap d2 ; tilbake med confnr + tst.l d6 + bne.b 4$ + moveq.l #1,d6 + lea (nyconfgrabtext),a0 + move.l d4,d0 + bsr writefileln + beq.b 99$ ; error + lea (transnltext),a0 ; skriver ut nl + move.l d4,d0 + bsr writefileln + beq.b 99$ ; error + +4$ move.w d2,d0 + move.l d4,d1 + move.l a3,a0 + addq.l #1,d7 + bsr doscratchmsg + bmi 8$ +3$ addq.l #1,d3 + bra 1$ +9$ move.l d7,d0 + clrz +99$ pop a3/d2/d3/d5/d6/d7 + rts + ENDC + +unjoin move.w (confnr,NodeBase),d0 ; Oppdaterer last read. + cmpi.w #-1,d0 + beq.b 9$ ; Har ikke vært i noen konferanse + bsr findlowestinqueue + bne.b 1$ + move.l (HighMsgQueue,NodeBase),d0 + bra.b 2$ +1$ subq.l #1,d0 +2$ moveq.l #0,d1 + move.l d1,(msgqueue,NodeBase) ; Tømmer køen. + lea (u_almostendsave+CU,NodeBase),a0 + move.w (confnr,NodeBase),d1 + mulu #Userconf_seizeof/2,d1 + lea (uc_LastRead,a0,d1.l),a0 + move.l (a0),d1 + cmp.l d0,d1 + bcc.b 9$ + move.l d0,(a0) +9$ rts + +; d0 = confnr (*2) +buildqueue + move.w (Savebits+CU,NodeBase),d1 + btst #SAVEBITSB_ReadRef,d1 + bne.b buildqueueref + bra buildqueuemark + +buildqueueref + push a2/a3/d2-d7 + move.l d0,d2 ; konfnr *2 (pluss max scan info - bit #31) + moveq.l #0,d3 ; Antall * 4 + moveq.l #0,d6 ; Antall til denne brukeren. + moveq.l #0,d7 ; Avslutt (T/F) + move.l d7,-(a7) ; kuttet flagget ligger på stack'en + lea (msgqueue,NodeBase),a2 + move.l d3,(a2) ; Tømmer køen. + lea (tmpmsgheader,NodeBase),a3 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (n_ConfDefaultMsg,a0,d0.l),d5 ; siste melding i conf + move.l d5,(HighMsgQueue,NodeBase) + lea (u_almostendsave+CU,NodeBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #Userconf_seizeof/2,d0 + move.l (uc_LastRead,a0,d0.l),d4 ; Siste vi leste + addq.l #1,d4 + cmp.l d4,d5 + bcs.b 9$ + move.l d5,d0 + move.l #NumMsgNrInQueue-100,d1 ; setter av plass til litt marking + cmpi.l #1,d4 ; er det første gangen her ? + bne.b 3$ ; Nei, ikke max scan +; beq.b 2$ ; ja, dvs max scan +; btst #31,d2 ; skal vi ta max scan ? +; beq.b 3$ ; nei +2$ moveq.l #1,d1 + move.l d1,(a7) ; husker at vi kuttet meldinger + lea (n_FirstConference+CStr,MainBase),a0 + move.w d2,d1 ; Henter conferanse nr. + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a0 + moveq.l #0,d1 + move.w (n_ConfMaxScan,a0),d1 ; henter maks scan verdien +3$ sub.l d1,d0 + bcs.b 1$ ; ikke for mange + cmp.l d4,d0 ; Er det for mange ? + bls.b 1$ ; nei + move.l d0,d4 ; Kutter ut for gamle meldinger. + moveq.l #1,d0 + add.l d0,(a7) ; husker at vi kuttet meldinger +1$ cmp.l d4,d5 + bcs.b 9$ + tst.l d7 + bne.b 9$ + move.l d4,-(a7) + bsr 10$ + move.l (a7)+,d4 + addq.l #1,d4 + bra.b 1$ +9$ moveq.l #0,d0 + move.l d0,(0,a2,d3.l) ; Markerer slutten på køen. + move.l d6,d1 + move.l (a7)+,d0 + cmpi.l #2,d0 ; var det max scan som slo til + bne.b 99$ ; nei + bset #31,d1 ; setter bit'et som markering at vi har kuttet +99$ move.l d3,d0 + pop a2/a3/d2-d7 + lsr.l #2,d0 + rts + +10$ move.w d2,d1 + move.l d4,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 14$ + lea (errloadmsghtext),a0 + bsr writetexti + moveq.l #1,d7 + bra.b 19$ +14$ move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 19$ ; 11$ eller 19$ + move.l (Number,a3),d0 + bsr findinqueue + bne.b 19$ ; Vi har vært innom denne + move.l (Number,a3),d0 + move.l d0,(0,a2,d3.l) + addq.l #4,d3 + moveq.l #0,d0 + move.l d0,(0,a2,d3.l) + move.l (Usernr+CU,NodeBase),d1 + cmp.l (MsgTo,a3),d1 + bne.b 11$ + addq.l #1,d6 +11$ tst.l d7 + bne.b 19$ + move.l (RefNxt,a3),-(a7) + move.l (RefBy,a3),d4 + beq.b 12$ + bsr.b 10$ +12$ move.l (a7)+,d4 + beq.b 19$ + tst.l d7 + bne.b 19$ + bsr.b 10$ +19$ rts + +buildqueuemark + push a2/a3/d2-d7 + move.l d0,d2 ; konfnr * 2 (pluss max scan info - bit #31) + moveq.l #0,d3 ; Antall * 4 + moveq.l #0,d6 ; Antall til denne brukeren. + moveq.l #0,d7 ; inken kutting + lea (msgqueue,NodeBase),a2 + move.l d3,(a2) ; Tømmer køen. + lea (tmpmsgheader,NodeBase),a3 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (n_ConfDefaultMsg,a0,d0.l),d5 ; siste melding i conf + move.l d5,(HighMsgQueue,NodeBase) + lea (u_almostendsave+CU,NodeBase),a0 + move.w d2,d0 ; Henter conferanse nr. + mulu #Userconf_seizeof/2,d0 + move.l (uc_LastRead,a0,d0.l),d4 ; Siste vi leste + addq.l #1,d4 + cmp.l d4,d5 + bcs 9$ + move.l d5,d0 + move.l #NumMsgNrInQueue-100,d1 ; setter av plass til litt marking + cmpi.l #1,d4 ; er det første gangen her ? + bne.b 4$ ; Nei, dvs ikke max scan +; beq.b 5$ ; ja, dvs max scan +; btst #31,d2 ; skal vi ta max scan ? +; beq.b 4$ ; nei +5$ lea (n_FirstConference+CStr,MainBase),a0 + move.w d2,d1 ; Henter conferanse nr. + mulu #ConferenceRecord_SIZEOF/2,d1 + add.l d1,a0 + moveq.l #0,d1 + move.w (n_ConfMaxScan,a0),d1 ; henter maks scan verdien + moveq.l #1,d7 ; vi har kuttet +4$ sub.l d1,d0 + bcs.b 1$ ; ikke for mange + cmp.l d4,d0 ; Er det for mange ? + bls.b 1$ ; nei + move.l d0,d4 ; Kutter ut for gamle meldinger. + addq.l #1,d7 ; vi har kuttet +1$ cmp.l d4,d5 + bcs.b 9$ + move.w d2,d1 + move.l d4,d0 + move.l a3,a0 + jsr (loadmsgheader) + beq.b 2$ + lea (errloadmsghtext),a0 + bsr writetexti + bra.b 9$ +2$ move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive + bne.b 3$ + move.l d4,d0 + bsr findinqueue + bne.b 3$ + move.l d4,(0,a2,d3.l) + addq.l #4,d3 + moveq.l #0,d0 + move.l d0,(0,a2,d3.l) + move.l (Usernr+CU,NodeBase),d1 + cmp.l (MsgTo,a3),d1 + bne.b 3$ + addq.l #1,d6 +3$ addq.l #1,d4 + bra.b 1$ +9$ moveq.l #0,d0 + move.l d0,(0,a2,d3.l) ; Markerer slutten på køen. + move.l d3,d0 + move.l d6,d1 + cmpi.l #2,d7 ; var det max scan som slo til + bne.b 99$ ; nei + bset #31,d1 ; setter bit'et som markering at vi har kuttet +99$ pop a2/a3/d2-d7 + lsr.l #2,d0 + rts + +gettopqueue + move.l (msgqueue,NodeBase),d0 + rts + +removefromqueue + lea (msgqueue,NodeBase),a0 +1$ move.l (a0)+,d1 + beq.b 9$ + cmp.l d0,d1 + bne.b 1$ +2$ move.l (a0)+,(-8,a0) + bne.b 2$ +9$ rts + +findlowestinqueue + moveq.l #-1,d0 + lea (msgqueue,NodeBase),a0 +1$ move.l (a0)+,d1 + beq.b 9$ + cmp.l d0,d1 + bcc.b 1$ + move.l d1,d0 + bra.b 1$ +9$ moveq.l #-1,d1 + cmp.l d1,d0 + rts + +findinqueue + lea (msgqueue,NodeBase),a0 +1$ move.l (a0)+,d1 + beq.b 9$ + cmp.l d0,d1 + bne.b 1$ + clrz +9$ rts + +findnumberinque + lea (msgqueue,NodeBase),a0 + moveq.l #-1,d0 +1$ addq.l #1,d0 + move.l (a0)+,d1 + bne.b 1$ + rts + +; får msgheader i a0 +insertinqueue + move.l (Number,a0),d0 +insertinqueuenr + lea (msgqueue,NodeBase),a0 + move.l a0,a1 +1$ move.l (a0)+,d1 + beq.b 2$ + cmp.l d0,d1 + bne.b 1$ + rts +2$ move.l #NumMsgNrInQueue*4,d1 + adda.l d1,a1 + cmpa.l a0,a1 ; Er det plass ? + bls.b 9$ ; nope. (burde kanskje slette eldste ??) + move.l d0,(-4,a0) + moveq.l #0,d0 + move.l d0,(a0) +9$ rts + +login move.w #24,(PageLength+CU,NodeBase) + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + tst.b (Tinymode,NodeBase) ; er det tiny mode ? + bne.b 8$ ; ja, hopper over cls'en + lea (ansiclearsctext),a0 ; foretar en cls + bsr writecontext + lea (ansiwhitetext),a0 + bsr writecontext +8$ lea (systemtext1),a0 ; skriver ut system teksen : + bsr writetext ; "abbs node # " + move.w (NodeNumber,NodeBase),d0 + bsr skrivnrw + move.b #' ',d0 + bsr writechar + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) + bne 5$ + ENDC + lea (localtext),a0 + bsr writetexto + IFND DEMO + bra.b 6$ +5$ move.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),d0 + bsr skrivnr + lea (systemtext2),a0 + bsr writetexto + ENDC +6$ + IFND DEMO + lea (serialnrtext),a0 ; skriver ut serie nummeret + bsr writetext + move.l #sn+6,d0 + moveq.l #6,d1 + sub.l d1,d0 + bsr writenrrfill + bsr outimage + ENDC + bsr outimage ; nl + lea (loginfilename),a0 ; skriver ut loginfile + moveq.l #0,d0 + bsr typefile + bsr startsleepdetect1 ; starter opp sleep timer'en +1$ bsr getloginname ; henter loginavnet + beq 99$ + move.l a0,-(sp) + jsr (checkillegalnamechar) + move.l (sp)+,a0 + beq.b 1$ + move.l a0,-(sp) + bsr testiso + move.l (sp)+,a0 + beq.b 11$ + lea (musthaveisotext),a0 + bsr writetexti + bra.b 1$ +11$ move.l a0,-(sp) + lea (CU,NodeBase),a1 + jsr (loaduser) + beq 4$ + bpl.b 13$ + lea (loadusererrtext),a0 + bsr writeerroro + clrz + setn + bra 9$ +13$ bsr outimage + move.l (sp)+,a0 + bsr writetext + lea (isnotregtext),a0 + bsr writetexto +2$ lea (typernltext),a0 + bsr writetexti + moveq.l #1,d0 + bsr getline + bne.b 65$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra 1$ +65$ move.b (a0),d0 + bsr upchar + cmpi.b #'R',d0 + beq registeruser + cmpi.b #'L',d0 + beq 99$ + cmpi.b #'N',d0 + bne.b 2$ + move.b #0,(readlinemore,NodeBase) ; flusher input + bra 1$ + +4$ move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_Killed,d0 + beq.b 3$ + lea (tuserkilledtext),a0 + bsr writetexti + setz + bra 31$ +3$ tst.b (readlinemore,NodeBase) ; er det mere ?? + beq.b 7$ ; nope + bsr readline ; leser inn mere + move.b (a0),d0 + bsr upchar + cmpi.b #'Q',d0 ; er det bare en Q ? + bne.b 14$ + move.b (1,a0),d0 + bne.b 32$ + bset #DIVB_QuickMode,(Divmodes,NodeBase) ; enabler Quick Mode!! (TADA) :-) + tst.b (readlinemore,NodeBase) ; er det mere ?? + beq.b 7$ ; nope + bsr readline ; leser inn mere + move.b (a0),d0 + bsr upchar +14$ cmpi.b #'S',d0 ; er det bare en S ? + bne.b 32$ + move.b (1,a0),d0 + bne.b 32$ + bset #DIVB_StealthMode,(Divmodes,NodeBase) ; enabler Stealth Mode!! (TADA) :-) + tst.b (readlinemore,NodeBase) ; er det mere ?? + beq.b 7$ ; nope + bsr readline ; leser inn mere +32$ lea (CU,NodeBase),a1 + bsr checkpasswd + notz + bne.b 999$ + lea (wrongtext),a0 + bsr writetexto +7$ moveq.l #2,d0 + lea (CU,NodeBase),a0 + bsr newgetpasswd + bne.b 999$ + tst.b (readcharstatus,NodeBase) ; Har det skjedd noe ? + notz + beq.b 9$ ; jepp + lea (failedpwfname),a0 + moveq.l #0,d0 + jsr (typefilemaybeall) + tst.b (readcharstatus,NodeBase) ; Har det skjedd noe ? + notz + beq.b 9$ ; jepp + lea (wantolcomentext),a0 + suba.l a1,a1 + moveq.l #0,d0 ; n er default + bsr getyorn + beq.b 12$ + jsr GetCommentUserNr + move.l d0,d1 + move.w #2,d0 + jsr (comentditsamecode) ; +12$ move.b #Thrownout,(readcharstatus,NodeBase) + setz +31$ +9$ move.l (sp)+,a0 +99$ rts + +999$ btst #DIVB_StealthMode,(Divmodes,NodeBase) ; er Stealth Mode slått på ? + beq.b 9991$ ; nei, gå videre + bsr justchecksysopaccess ; Er vi sysop ? + bne.b 9993$ ; Ja, ok. + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + bne.b 9992$ ; nope, slå av igjen +9993$ move.l (nodenoden,NodeBase),a0 ; slår stealth på ordenelig + ori.b #NDSF_Stealth,(Nodedivstatus,a0) ; marker for andre også + bra.b 9991$ +9992$ bclr #DIVB_StealthMode,(Divmodes,NodeBase) ; slår av igjen Stealth Mode +9991$ clrz + bra.b 9$ + +hangup lea (logouttext),a0 + bsr writetexti + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) + bne.b 1$ + ENDC + rts + IFND DEMO +1$ +dohangup + move.l (FrontDoorMsg,NodeBase),d0 ; Har vi en frontmelding ? + beq.b 1$ ; nei. + move.l d0,a0 + move.w (f_Flags,a0),d0 ; skal vi ta hangup ? + andi.w #f_flagsF_NoHangup,d0 + bne.b 9$ ; Nei... +1$ move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 9$ ; Ja, ingen hangup + andi.w #SETUPF_SimpelHangup,d0 + bne.b 2$ + tst.b (Tinymode,NodeBase) ; tiny mode ? + bne.b 3$ ; ja, ingen console output + lea (dohanguptext),a0 + jsr (writecontext) +3$ bsr tmpcloseserport + moveq.l #3,d0 + bsr waitsecs + bra tmpopenserport +2$ moveq.l #2,d0 + bsr waitsecs + bsr waitseroutput + lea (plussplussptext),a0 + bsr serwritestringdo + moveq.l #4,d0 + bsr waitsecs + lea (ModemOnHookString+Nodemem,NodeBase),a0 + bsr serwritestringdo + moveq.l #2,d0 + lea (transnltext),a0 + bsr serwritestringlendo + moveq.l #4,d0 + bra waitsecs +9$ rts + +tmpcloseserport + bsr waitseroutput + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + jsrlib CloseDevice + move.l (sreadreq,NodeBase),a1 + moveq.l #0,d0 + move.l d0,(IO_DEVICE,a1) + rts + +tmpopenserport + lea (Serialdevicename+Nodemem,NodeBase),a0 + move.l (sreadreq,NodeBase),a1 + moveq.l #0,d0 + move.b (RealCommsPort,NodeBase),d0 + subq.l #1,d0 + + move.w (Setup+Nodemem,NodeBase),d1 + move.b #0,(IO_SERFLAGS,a1) ; Null stiller. +; btst #SETUPB_XonXoff,d1 ; Vi tilater ikke XonXoff lenger +; bne.b 8$ + move.b #SERF_XDISABLED|SERF_RAD_BOOGIE|SERF_SHARED,(IO_SERFLAGS,a1) +8$ btst #SETUPB_RTSCTS,d1 + beq.b 9$ + ori.b #SERF_7WIRE,(IO_SERFLAGS,a1) +9$ moveq.l #0,d1 + jsrlib OpenDevice + tst.l d0 + beq 2$ ; Ops. Klarte ikke å åpne igjen. + move.b #-1,(RealCommsPort,NodeBase) ; Gjør noden lokal. + rts +2$ move.l (swritereq,NodeBase),a1 + move.l (sreadreq,NodeBase),a0 + move.l (IO_DEVICE,a0),(IO_DEVICE,a1) + move.l (IO_UNIT,a0),(IO_UNIT,a1) + move.l (sreadreq,NodeBase),a1 + move.w #CMD_CLEAR,(IO_COMMAND,a1) ; flush'er bufferen + jsrlib DoIO + move.l (swritereq,NodeBase),a1 + move.w #CMD_CLEAR,(IO_COMMAND,a1) ; flush'er bufferen + jsrlib DoIO + bra setserparam + ENDC + +drawwaitforcallerscreen + tst.b Tinymode(NodeBase) ; tiny mode ? + bne.b 9$ ; jepp, ingen output + move.b #15,d0 ; skriver ut en CTRL-O (reset av tegnsett) + bsr writeconchar + lea (conmenufile),a0 + moveq.l #1,d0 + bsr typefile + lea (boardstatfilena),a0 + moveq.l #1,d0 + bsr typefilenoerror + lea (ansiwhitetext),a0 + bsr writecontext +9$ rts + +;d0 = byte med status som skal returneres fra waitforcaller +; Foreløpig er det bare Z som brukes. Z=0 normal, Z=1 : resycle node +exitwaitforcaller + move.b #0,(in_waitforcaller,NodeBase) + move.l (waitforcallerstack,NodeBase),sp + tst.b d0 + rts + +initwaitforcaller + move.b #1,(in_waitforcaller,NodeBase) +initwaitforcaller1 + move.b #0,(readcharstatus,NodeBase) ; for sikkerhetskyld.. + bsr.b drawwaitforcallerscreen + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; lokal node ? + beq.b 1$ ; jepp, ingen init + bsr serclear + btst #DoDivB_NoInit,(DoDiv,NodeBase) ; skal vi ta init ? + bne.b 2$ ; nope + bsr wf_initmodem + lea (failedtoinitext),a0 + bne.b 3$ ; vi klarte det ikke +2$ lea (waitforcalltext),a0 +3$ tst.b (Tinymode,NodeBase) + bne.b 1$ + bsr writecontext + ENDC +1$ bra initcsreadcheck + +;f1 = login user +;f2 = login sysop shift = quick +;f3 = stealth login shift = quick +;f8 = hack connect +;f9 = release serial port shift = busy +;f10 = shutdown node shift = busy +; fra port: Init modem, Release serial port, Off hook +; fra Arexx: unlisten, resume, shutdown, suspend +; returnerer z=1, recycle node'n + +waitforcaller + move.l sp,(waitforcallerstack,NodeBase) + bsr initwaitforcaller + +; Tar en (semi) readchar +1$ move.l (gotbits,NodeBase),d0 ; har vi noe fra før ? + bne.b 2$ ; ja + move.l (waitbits,NodeBase),d0 ; det hadde vi ikke, så da + jsrlib Wait ; venter vi + move.l d0,(gotbits,NodeBase) ; husker de vi fikk + +2$ bsr testdoconsole + beq.b 3$ + bsr doconsole + beq.b 1$ ; det var ikke noe + bsr testclosestatus + bpl.b 1$ ; Kun F taster.. + cmp.b #2,(in_waitforcaller,NodeBase) ; Skal vi sove ? + beq.b 1$ ; jepp. dropp input + cmpi.b #9,d0 ; F10 - shutdown + beq 21$ + cmpi.b #19,d0 ; s F10 - shutdown w/ busy + beq.b 22$ + btst #DoDivB_Sleep,(DoDiv,NodeBase) ; sleep igang ? + bne.b 1$ ; jepp.. dropp input + bsr wf_doconkeys + bra.b 1$ ; loop'er... +22$ moveq.l #0,d0 +21$ bsr wf_shutdown + moveq.l #0,d0 + bra exitwaitforcaller + +3$ bsr testdoserial + beq.b 4$ + bsr doserial + bne.b 31$ + bmi.b 1$ ; n -> loop. +31$ cmp.b #2,(in_waitforcaller,NodeBase) ; Skal vi sove ? + beq.b 1$ ; jepp. dropp input + btst #DoDivB_Sleep,(DoDiv,NodeBase) ; har vi sleep + bne.b 1$ ; da vil vi ikke ha noe + bsr wf_trytoconnect + beq 32$ + moveq.l #1,d0 + bra exitwaitforcaller +32$ bsr initwaitforcaller1 + bra 1$ + + +4$ bsr testdointuition + beq.b 5$ + bsr dointuition + bra 1$ ; kan ikke bli kastet ut her.. + +5$ move.l (intersigbit,NodeBase),d0 ; sletter dette bit'et + or.l (timer2sigbit,NodeBase),d0 ; timer + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + + bsr testdopublicport + beq.b 6$ + bsr handlepublicport + beq.b 51$ + moveq.l #0,d0 + tst.b (readcharstatus,NodeBase) ; noe galt ? + notz + bne 1$ ; fortsetter + bra.b 52$ +51$ btst #DoDivB_ExitWaitforCaller,(DoDiv,NodeBase) ; skal vi ned ? + beq 1$ ; fortsetter + bclr #DoDivB_ExitWaitforCaller,(DoDiv,NodeBase) ; disarmerer + moveq.l #0,d0 + tst.b (ShutdownNode,NodeBase) ; skal vi ned ? + bne.b 52$ ; ja, ut. + moveq.l #1,d0 +52$ bra exitwaitforcaller + +6$ bsr testshowwinsig + beq 1$ + bsr closeshowuserwindow + bra 1$ + +testclosestatus + move.l d0,a0 ; husker d0 + jsrlib GetCC + move.b (RealCommsPort,NodeBase),d1 + beq 1$ ; ingen port + cmp.b #-1,d1 + beq.b 1$ ; ingen port.. + move.l (sreadreq,NodeBase),a1 + move.l (IO_DEVICE,a1),d1 + bne.b 1$ ; fortsett som før + move.w d0,ccr + bpl.b 2$ ; prøver og åpne + move.l a0,d0 + cmpi.b #9,d0 ; er det F10 ? + beq.b 3$ ; jepp + cmpi.b #19,d0 ; eller shift F10 ? + bne.b 2$ ; nope, åpner +3$ move.b #-1,(RealCommsPort,NodeBase) ; Gjør noden "lokal". + moveq.l #1,d0 ; no busy (kan ikke ta busy) + bsr wf_shutdown + moveq.l #0,d0 + bra exitwaitforcaller + +2$ bsr tmpopenserport + cmpi.b #-1,(RealCommsPort,NodeBase) ; gikk det bra ? + bne.b 4$ ; jepp + push a6 + move.l (intbase),a6 + jsrlib DisplayBeep + pop a6 + move.b (CommsPort+Nodemem,NodeBase),d0 ; Vi prøver en gang til. + move.b d0,(RealCommsPort,NodeBase) + tst.b (Tinymode,NodeBase) + bne.b 5$ + lea (ureopensertext),a0 + bsr writecontext + bra.b 5$ +4$ move.b (RealCommsPort,NodeBase),(CommsPort+Nodemem,NodeBase) ; setter tilbake + bsr aapnemodem + bsr initwaitforcaller1 +5$ clrz ; får oss til å loop'e igjen. + bra.b 9$ + +1$ move.w d0,ccr + exg.l d0,a0 +9$ rts + +;d0 = key number +wf_doconkeys + cmpi.b #0,d0 ; F1 ? - User login + bne.b 1$ ; nei.. + bsr wf_makenodelocal + moveq.l #1,d0 + bra exitwaitforcaller + +1$ cmpi.b #1,d0 ; F2 ? - Sysop login + beq.b 11$ + cmpi.b #11,d0 ; s F2 ? - Sysop login quick + bne.b 2$ ; nei. + bset #DIVB_QuickMode,(Divmodes,NodeBase) ; enabler Quick Mode!! (TADA) :-) +11$ lea (SYSOPname+CStr,MainBase),a0 + lea (CU,NodeBase),a1 + jsr (loaduser) + bne.b 12$ ; error loading user + bsr wf_makenodelocal + bsr initrunlate + move.w #-1,(linesleft,NodeBase) ; forhindrer more prompt + move.b #0,(in_waitforcaller,NodeBase) + move.l (waitforcallerstack,NodeBase),sp + move.l #sysoploginjmp,(a7) ; Forandrer returverdi.. + rts ; .... og bruker +12$ lea (usernotfountext),a0 + bsr writeerroro + moveq.l #0,d0 + bra exitwaitforcaller + +2$ cmpi.b #2,d0 ; F3 ? - Stealth login + beq.b 21$ ; nei. + cmpi.b #12,d0 ; s F3 ? - Stealth login quick + bne.b 3$ ; nei. + bset #DIVB_QuickMode,(Divmodes,NodeBase) ; enabler Quick Mode!! (TADA) :-) +21$ bset #DIVB_StealthMode,(Divmodes,NodeBase) ; enabler Stealth Mode!! (TADA) :-) + move.l (nodenoden,NodeBase),a0 + ori.b #NDSF_Stealth,(Nodedivstatus,a0) ; marker for andre også + bra.b 11$ ; utfører så vanelig sysop login + +3$ cmpi.b #7,d0 ; F8 ? - hack connect + bne.b 4$ ; nei. + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq 9$ ; meningsløst.. + bra wf_trytoconnectatadir ; hopper på ATA + ELSE + bra.b 9$ + ENDC + +4$ cmpi.b #8,d0 ; F9 - release serial port + beq.b 41$ + cmpi.b #18,d0 ; with busy + bne.b 9$ ; ukjennt tast, ut + moveq.l #1,d0 ; husker at det er busy + bra.b 43$ +41$ moveq.l #0,d0 +43$ bsr wf_makenodelocal1 + beq.b 9$ ; lokal node, ut +42$ bsr tmpcloseserport + lea (preskreopentext),a0 + tst.b (Tinymode,NodeBase) + bne.b 9$ + bsr writecontext +; bra.b 9$ +9$ rts + +; d0 = true -> no busy +wf_shutdown + move.b #1,(ShutdownNode,NodeBase) + tst.l d0 + bne.b 9$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq.b 9$ ; ja + bsr stengmodem ; stenger noden + ENDC +9$ moveq.l #0,d0 + bra exitwaitforcaller + +wf_initmodem + tst.b (Tinymode,NodeBase) ; tiny ? + bne.b 1$ ; jepp, ingen output + lea (initmodemtext),a0 ; sier hva vi gjør + bsr writecontext +1$ move.l (NodeBaud+Nodemem,NodeBase),d0 + moveq.l #1,d1 ; send AT + bsr setserialspeed + bsr sendinitstr + rts + +wf_trytoconnectatadir + setz + bra wf_trytoconnect1 +wf_trytoconnect + clrz +wf_trytoconnect1 + beq 3$ ; vi skal rett til ATA + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_NullModem,d1 ; Nullmodem ? + beq.b 1$ ; Nei, vanelig innlogging + + move.l d2,-(sp) + move.l (NodeBaud+Nodemem,NodeBase),d2 ; Setter opp baud + move.l d2,d0 + divu.w #10,d0 + move.w d0,(cpsrate,NodeBase) + move.l d2,d0 + bsr changenodestatusspeed + bsr initserread + move.l (sp)+,d2 + clrz + bra 9$ ; vi klarte det!! :-) + +1$ cmp.b (ModemRingString+Nodemem,NodeBase),d0 ; passer det ? + beq.b 2$ ; jepp + lea (tmptext,NodeBase),a0 + moveq.l #-1,d0 ; Les 1 tegn. Ignorer CD + moveq.l #0,d1 + bsr serreadt + cmpi.b #1,d0 ; fikk vi et ? + bne 8$ ; nope, timeout + move.b (tmptext,NodeBase),d0 + bra.b 1$ +2$ move.l #1000000,d1 ; 1 sek timeout mellom tegnene + jsr (serreadword) + beq 9$ ; gir opp. + move.l d0,-(sp) + lea (ModemRingString+Nodemem,NodeBase),a1 + exg a0,a1 + bsr strlen + move.l (sp)+,d1 + cmp.l d0,d1 + bne 8$ ; feil lengde, gir opp + lea (ModemRingString+Nodemem,NodeBase),a0 + bsr comparestringsfull + bne 8$ ; ligner ikke... + + tst.b (Tinymode,NodeBase) ; tiny ? + bne.b 3$ ; ja + lea (ringdetecttext),a0 ; sier ifra + bsr writecontext + +3$ moveq.l #1,d0 ; delay + bsr waitsecs + lea (ModemAnswerString+Nodemem,NodeBase),a0 ; Sender ATA + bsr serwritestringdo + lea (transnltext),a0 ; sender bare CR + moveq.l #1,d0 + bsr serwritestringlendo + + push d2/d3/a2/d4 + moveq.l #0,d2 + moveq.l #0,d4 ; mnp/v42bis status + move.b (ConnectWait+Nodemem,NodeBase),d2 ; Wait time + cmp.b #10,d2 + bhi.b 4$ + moveq.l #30,d2 ; Ingen. Tar default + +4$ tst.b (Tinymode,NodeBase) ; Skriver ut sek igjen. + bne.b 5$ + lea (waitconnecttext),a0 + bsr writecontext + move.l d2,d0 + bsr connrtotext + bsr writecontextlen + move.b #' ',d0 + bsr writeconchar +5$ moveq.l #1,d0 ; venter 1 sek + bsr waitsecs +6$ lea (tmptext,NodeBase),a0 ; sjekker om det er et + moveq.l #-1,d0 ; tegn klar for lesing, + moveq.l #0,d1 ; og leser i så fall det. + bsr serreadt + cmpi.b #1,d0 + beq.b 7$ ; ja, det var et tegn + subq.l #1,d2 ; teller ned sekundene, + bne.b 4$ ; looper hvis det er flere + bra 99$ ; eller avbryter hvis ikke. + +7$ move.b (tmptext,NodeBase),d0 ; henter ut lest tegn + move.l #1000000,d1 ; 1 sek timeout pr tegn + bsr serreadstring ; Leser en string + move.l a0,a2 + bsr writecontext ; skriver den ut + move.l a2,a0 + + lea (nocarriertext),a1 ; NO CONNECT ? + bsr findtextinstring + beq 99$ ; ikke connect, ut + move.l a2,a0 + move.b d4,d0 + bsr parsemnpsub + move.b d0,d4 ; husker ny mnp/v42bis status + move.l a2,a0 + lea (ModemConnectString+Nodemem,NodeBase),a1 + bsr findtextinstring + bne.b 6$ ; ikke connect, loop + move.l a0,a2 ; huske etter connect + + tst.b (Tinymode,NodeBase) + bne.b 10$ + lea (connectdetetext),a0 + bsr writecontext + +10$ cmp.b #' ',(a2)+ + beq.b 10$ + subq.l #1,a2 + + move.l a2,a0 ; get connect speed + bsr atoi + move.l d0,d2 + move.l a2,a0 + move.b d4,d0 + bsr parsemnpsub + bsr setmnpstat + + moveq.l #2,d0 + bsr waitsecs + bsr checkcarrier + lea (nocdsignaltext),a0 + beq.b 991$ ; Nei, "NoCarrier" + tst.l d2 ; noen hastighet ? + bne.b 11$ ; ja + move.l #300,d2 ; nei, det betyr 300baud +11$ cmp.l (MinBaud+Nodemem,NodeBase),d2 ; Er det fort nok ? + bcc.s 12$ ; ja + lea (toslowtext1),a0 + bsr writetext + move.l (MinBaud+Nodemem,NodeBase),d0 + bsr skrivnr + lea (toslowtext2),a0 + bsr writetexto + lea toslowconectext,a0 + bra.b 991$ +12$ move.l d2,d0 + divu.w #10,d0 + move.w d0,(cpsrate,NodeBase) + move.l d2,d0 + bsr changenodestatusspeed + move.l d2,d0 + moveq.l #0,d1 ; ikke send AT + bsr setserialspeed + bsr initserread + pop d2/d3/d4/a2 + setz +8$ notz +9$ rts + +99$ lea (faildconnectext),a0 +991$ pop d2/d3/d4/a2 + bsr writelogtexttime + bsr hangup + setz + bra 9$ + +wf_makenodelocal + moveq.l #1,d0 +; d0 = TRUE -> set busy +wf_makenodelocal1 + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq.b 9$ ; jepp. nop + move.b #0,(CommsPort+Nodemem,NodeBase) ; Gjør noden lokal. + tst.l d0 + beq.b 1$ + bsr stengmodem +1$ moveq.l #0,d0 ; lokal. + bsr changenodestatusspeed + ENDC + clrz +9$ rts + +; a0 = string +; d0 = forige mnp/v42bis stat +parsemnpsub + push a2/d2 + move.l a0,a2 + move.b d0,d2 + cmp.b #NECSF_V42BIS,d2 ; allerede v42bis ? + beq.b 9$ ; Ja, parser ikke mere + + lea (v42bistext),a1 + bsr findtextinstring + beq.b 1$ ; V42bis + move.l a2,a0 + lea (v42shorttext),a1 + bsr findtextinstring + beq.b 1$ ; V42bis + + move.l a2,a0 ; Hack for gamle USR modemer. + lea (hsthsttext),a1 ; er det 9600, og vi har /HST/HST, så + bsr findtextinstring ; er det egentlig 14400 baud. + bne.b 4$ ; Nope. Ikke /HST/HST + move.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),d0 + cmpi.l #9600,d0 + bne.b 4$ ; nope, ikke 9600 + move.l #14400,d0 ; gjør om til 14400. + bsr changenodestatusspeed + move.w #1440,(cpsrate,NodeBase) + +4$ move.l a2,a0 + lea (mnptext),a1 + bsr findtextinstring + beq.b 2$ ; MNP + move.l a2,a0 + lea (arqtext),a1 + bsr findtextinstring + beq.b 2$ ; MNP + move.l a2,a0 + lea (reltext),a1 + bsr findtextinstring + bne.b 9$ ; MNP +2$ move.b #NECSF_MNP,d2 + bra.b 9$ +1$ move.b #NECSF_V42BIS,d2 +9$ move.b d2,d0 + pop a2/d2 + rts + +; d0 = mnp/v42bis status +setmnpstat + move.l (nodenoden,NodeBase),a0 + bset #NECSB_UPDATED,d0 ; Sier at den er updated ? + move.b d0,(NodeECstatus,a0) + rts + +checkintermsgs ; race fare ... Ikke helt god. + jsrlib Forbid + move.l (nodenoden,NodeBase),a0 + move.w (InterMsgread,a0),d0 + move.w (InterMsgwrite,a0),d1 + jsrlib Permit + sub.w d0,d1 + beq.b 9$ ; ingen node meldinger. + bcc.b 1$ ; ingen wrap + addi.w #MaxInterNodeMsg,d1 + beq.b 9$ ; ingen node meldinger. +1$ push a2/a3/d2/d3/d4/d5/d6 + move.l d0,d2 ; d2 - startpos + move.l d1,d3 ; d3 - antall meldinger + move.l a0,a2 + lea (InterNodeMsg,a2),a3 ; skriver ut alle + moveq.l #InterNodeMsgsiz,d4 + move.l d2,d5 + mulu.w d4,d5 + moveq.l #0,d6 ; har ikke skrevet ut noen + subi.w #1,d3 +4$ lea (0,a3,d5.w),a0 + bsr writeintermsg + beq.b 5$ + moveq.l #1,d6 ; har skrevet ut +5$ addq.l #1,d2 + cmpi.w #MaxInterNodeMsg,d2 + bcs.b 2$ + moveq.l #0,d2 ; wrap'er rundt + moveq.l #0,d5 + bra.b 3$ +2$ add.w d4,d5 +3$ dbf d3,4$ + move.l (nodenoden,NodeBase),a0 + move.w (InterMsgwrite,a0),(InterMsgread,a0) ; nullstiller + move.l d6,d0 + pop a2/a3/d2/d3/d4/d5/d6 +9$ rts + +;type +; 0 20 From #1: Login +; 1 20 From #1: Logout +; 2 40 From #1: +; 3a 10 From #1: message to entered by . +; 3b 10 From #1: You have mail! (from ) +; 4 50 From #1: Chat request. Answer with chat 1 +writeintermsg + push a2/d2 + link.w a3,#-100 + move.l a0,a2 + move.w (i_franode,a2),d1 + move.w (NodeNumber,NodeBase),d0 + cmp.w d0,d1 ; Fra denne noden ? + beq 9$ ; Ja. Fy. (skal egentlig ikke skje, men ...) + move.b (userok,NodeBase),d0 ; er brukeren inne ? + beq 9$ ; nei, dropper disse. + + moveq.l #0,d1 + move.b (i_pri,a2),d0 ; er det en prioritet melding ? + bne.b 5$ ; ja, ikke noe filternivå da.. + move.b (MessageFilterV+CU,NodeBase),d1 ; henter filternivået + +5$ move.b (i_type,a2),d0 + beq 0$ ; login + subq.b #1,d0 + beq 1$ ; logout + subq.b #1,d0 + beq 2$ ; node melding + subq.b #1,d0 + beq 3$ ; melding melding + subq.b #1,d0 + bne 9$ ; ukjent melding. Vi hopper ut. + + cmpi.b #50,d1 ; for høyt nivå ? + bcc 9$ ; ja + bsr outimage ; newline først + beq 9$ + lea (ansilbluetext),a0 ; Sikrer blå skrift + bsr writetext + move.l sp,a1 + bsr 10$ ; chat request + lea (chatreqanswtext),a0 + bsr strcopy + subq.l #1,a1 + move.l a1,a0 + moveq.l #0,d0 + move.w (i_franode,a2),d0 + bsr konverter + bra 8$ + +3$ cmpi.b #10,d1 ; for høyt nivå ? + bcc 9$ ; ja + move.w (i_conf,a2),d0 + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Read,d0 ; Er vi medlem her ? + beq 9$ ; nei. ikke mere.. + bsr outimage ; newline først + beq 9$ + lea (ansilbluetext),a0 ; Sikrer blå skrift + bsr writetext + move.l sp,a1 + bsr 10$ ; melding melding + move.l (i_usernr2,a2),d0 + cmp.l (Usernr+CU,NodeBase),d0 ; er det melding til oss ??? + bne.b 31$ ; Nei, da er det vanelig + lea (youhavemailtext),a0 + bsr strcopy + subq.l #1,a1 + lea (i_Name,a2),a0 + bsr strcopy + move.b #')',(-1,a1) + move.b #' ',(a1)+ + move.w (i_conf,a2),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + move.b #0,(a1) + bra 8$ +31$ move.w (i_conf,a2),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + subq.l #1,a1 + lea (msgtext),a0 + bsr strcopy + subq.l #1,a1 + move.l (i_msgnr,a2),d0 + move.l a1,a0 + bsr konverter + move.l a0,a1 + lea (tonoansitext),a0 + bsr strcopy + subq.l #1,a1 + lea (i_Name2,a2),a0 + bsr strcopy + subq.l #1,a1 + lea (enteredbytext),a0 + bsr strcopy + subq.l #1,a1 + lea (i_Name,a2),a0 + bsr strcopy + move.b #'.',(-1,a1) + move.b #0,(a1) + bra 8$ + +2$ cmpi.b #40,d1 ; for høyt nivå ? + bcc 9$ ; ja + bsr outimage ; newline først + beq.b 9$ + lea (ansilbluetext),a0 ; Sikrer blå skrift + bsr writetext + move.l sp,a1 + bsr.b 10$ ; node melding + lea (i_msg,a2),a0 + bsr strcopy + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + bne.b 21$ ; ja, da er carrier ok :-) + ENDC + move.l (intbase),a6 + suba.l a0,a0 + jsrlib DisplayBeep + move.l (exebase),a6 +21$ bra.b 8$ + +1$ lea (interlogouttext),a0 ; logout + bra.b 101$ +0$ lea (interlogintext),a0 ; login +101$ cmpi.b #20,d1 ; for høyt nivå ? + bcc.b 9$ ; ja + move.l a0,d2 + bsr outimage ; newline først + beq.b 9$ + lea (ansilbluetext),a0 ; Sikrer blå skrift + bsr writetext + move.l sp,a1 + bsr.b 10$ + move.l d2,a0 + bsr strcopy + subq.l #1,a1 + move.b #'-',(a1)+ + move.b #' ',(a1)+ + lea (i_Name,a2),a0 + bsr strcopy +; bra.b 8$ + +8$ move.l sp,a0 + bsr writetexti + clrz + bra.b 99$ +9$ setz +99$ unlk a3 + pop a2/d2 + rts + +10$ lea (fromhashtext),a0 + bsr strcopy + subq.l #1,a1 + move.w (i_franode,a2),d0 + move.l a1,a0 + bsr konverterw + move.l a0,a1 + lea (kolonspacetext),a0 + bsr strcopy + subq.l #1,a1 + rts + +; a0 = msgheader +; d0 = confnr +; a1 = msgtext hvis det er net melding +sendintermsgmsg + push a2/d2/a3 + move.l a0,a3 + move.l a1,d2 ; husker msgtext'en + btst #DIVB_StealthMode,(Divmodes,NodeBase) ; er Stealth Mode på ? + bne.b 9$ ; jepp. dropper den node meldingen. + move.l (Tmpusermem,NodeBase),a1 + move.l (Number,a3),(i_msgnr,a1) + move.w d0,(i_conf,a1) + move.l (MsgFrom,a3),(i_usernr,a1) + move.l (MsgTo,a3),(i_usernr2,a1) + move.l a1,a2 + move.l a3,a0 + move.l d2,a1 + bsr getfromname + bne.b 1$ ; ikke net navn + moveq.l #-1,d0 + move.l d0,(i_usernr,a2) ; setter fra all, for å forhindre at noen får to yo.. +1$ lea (i_Name,a2),a1 + bsr strcopy + move.l a3,a0 + move.l d2,a1 + bsr gettoname + bne.b 2$ ; ikke net navn + moveq.l #-1,d0 + move.l d0,(i_usernr2,a2) ; setter fra all, for å forhindre at noen får to yo.. +2$ lea (i_Name2,a2),a1 + bsr strcopy + move.l a2,a0 + move.b #3,(i_type,a0) ; enter msg + move.w (NodeNumber,NodeBase),(i_franode,a0) + moveq.l #0,d0 ; Alle noder. + move.b #0,(i_pri,a0) + bsr sendintermsg +9$ pop a2/d2/a3 + rts + +docookie + cmpi.b #NoCarrier,(readcharstatus,NodeBase) + beq 9$ ; srkiver ikke noe da .. + bsr outimage + lea (cookiefilename),a0 + bsr getfilelen + beq 9$ ; Ingen cookiefil. + movem.l d2-d4,-(a7) + move.l d0,d3 + move.l (dosbase),a6 + lea (tmptext,NodeBase),a0 + move.l a0,d1 + jsrlib DateStamp + move.l #cookiefilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 3$ + moveq.l #0,d2 + move.l ($dff004),d2 + lsl.l #8,d2 + lea (tmptext,NodeBase),a0 + add.l (a0),d2 + add.l (4,a0),d2 + add.l (8,a0),d2 + move.l d2,d0 + move.l d3,d1 + bsr divl + move.l d1,d2 +;1$ cmp.l d2,d3 +; bhi.b 2$ +; sub.l d3,d2 +; bra.b 1$ +2$ move.l d4,d1 + moveq.l #OFFSET_BEGINNING,d3 + jsrlib Seek + moveq.l #-1,d1 + cmp.l d1,d0 + beq.b 5$ + move.l d4,d1 + move.l (tmpmsgmem,NodeBase),d2 + move.l #4096,d3 + jsrlib Read + move.l d0,d3 + beq.b 5$ + move.l (tmpmsgmem,NodeBase),a0 +7$ subq.l #1,d3 + beq.b 5$ + andi.b #$7f,(a0) + cmpi.b #$c,(a0)+ + bne.b 7$ + move.l a0,a1 ; a0 = cookie start + moveq.l #0,d0 ; d0 = cookie len +6$ subq.l #1,d3 + bcs.b 5$ + addq.l #1,d0 + andi.b #$7f,(a1) + cmpi.b #$c,(a1)+ + bne.b 6$ + movem.l d0/a0,-(a7) + move.l d4,d1 + jsrlib Close + movem.l (a7)+,d0/a0 + subq.l #1,d0 + bcs.b 3$ + move.l (exebase),a6 + moveq.l #0,d1 + bsr writetextmemi + bra.b 99$ +5$ move.l d4,d1 + jsrlib Close +3$ lea (nocookietext),a0 + move.l (exebase),a6 + bsr writetexto +99$ movem.l (a7)+,d2-d4 +9$ rts + +***************************************************************** +* hi level i/o * +***************************************************************** +;#b +;#c +; a0 = prompt +; a1 = helpfilename (null == nohelp) +; a2 = novoice ekstra help (0 = nohelp) +readlinepromptwhelpflush + clr.b (readlinemore,NodeBase) +readlinepromptwhelp + push a2/a3/d2/d3 + link.w a3,#-160 + move.l a3,d2 + move.l a1,a3 + move.l a2,d3 ; husker evnt. ekstra hjelp + lea sp,a1 + jsr (strcopy) + subq.l #1,a1 + tst.l d3 ; har vi lang text ? + beq.b 3$ ; nope + move.b (XpertLevel+CU,NodeBase),d0; skal de ha lang text ? + cmpi.b #2,d0 + bcc.b 3$ ; Nope + move.b #' ',(a1)+ + move.l d3,a0 + jsr (strcopy) + subq.l #1,a1 +3$ lea kolonspacetext,a0 + jsr (strcopy) + move.l sp,a2 ; husker promptet. + move.l sp,a0 +0$ bsr readlineprompt + beq.b 9$ + move.b (a0),d0 + cmpi.b #'?',d0 + bne.b 9$ + move.l a3,d0 + lea (sorrynohelptext),a0 + beq.b 1$ + move.l d0,a0 + moveq.l #0,d0 ; både con og ser + bsr typefilemaybeall + bra.b 2$ +1$ bsr writetexto +2$ tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ + move.l a2,a0 + bra.b 0$ +9$ move.l d2,a3 + unlk a3 + pop a2/a3/d2/d3 + rts + +;#c +readlinepromptflush + clr.b (readlinemore,NodeBase) +readlineprompt + move.l a0,(curprompt,NodeBase) + tst.b (readlinemore,NodeBase) + bne.b 1$ + tst.b Tinymode(NodeBase) + bne.b 3$ + move.l a0,-(a7) + move.b #15,d0 ; skriver ut en CTRL-O (reset av tegnsett) + bsr writeconchar + move.l (a7)+,a0 +3$ move.w (linesleft,NodeBase),d0 ; henter antall linjer før more + cmpi.w #2,d0 ; Er det plass til prompt'et ? + bhi.b 2$ ; Ja + move.w #2,(linesleft,NodeBase) ; forhindrer more før prompt'et +2$ bsr writetexti +1$ bsr readline + clr.l (curprompt,NodeBase) + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + tst.w d0 +9$ rts + +;#c +; d0 = 0, både ser og con, d0 != 0 bare con +typefilemaybeall + push d0 + bsr getbestfilename + pop d0 + beq typefile + subq.l #1,d1 + beq typefileansi + subq.l #1,d1 + bra typefileraw + +;#c + IFND DEMO +snumberrot dc.l snrcoded +snumber dc.l 2 + ENDC + +; a0 = filename +; d0 = +;#c +typefilemaybeansi + move.l d0,-(a7) + bsr getbestfilename + bne.b 1$ + move.w (Userbits+CU,NodeBase),d0 ; var det det at vi ikke ville ha noe annet? + andi.w #USERF_RAW|USERF_ANSIMenus,d0 + beq.b 1$ ; ja. Da skriver plain tekst + move.l a0,a1 + move.l a0,(a7) + lea (lognofiletext),a0 + bsr writelogtexttimed + lea (filenotfountext),a0 ; skriver ut feil + bsr writetext + move.b #' ',d0 + bsr writechar + move.l (a7)+,a0 + bsr writetext + lea (pltellsysoptext),a0 + bsr writetexto + bra.b 9$ +1$ move.l (a7)+,d0 + subq.l #1,d1 + bcs typefile + beq typefileansi + subq.l #1,d1 + bra typefileraw +9$ rts + +;#c +typefileraw + move.l d2,-(a7) + move.b (Charset+CU,NodeBase),d2 ; hack som slår av oversetting + move.b #0,(Charset+CU,NodeBase) + bsr typefile + sne d0 + move.b d2,(Charset+CU,NodeBase) + move.l d0,d2 + lea (NormAtttext),a0 ; sender ANSI reset. + bsr writetexti + move.l d2,d0 + move.l (a7)+,d2 + tst.b d0 + rts + +;#c +typefileansi + bsr typefile + sne d0 + move.l d0,-(a7) + lea (NormAtttext),a0 ; sender ANSI reset. + bsr writetexti + move.l (a7)+,d0 + tst.b d0 + rts + +;#c +;a0 = filename +getbestfilename + lea (tmptext,NodeBase),a1 +;a0 = filename +;a1 = buffer +getbestfilenamebuffer + push a2/d3/d4/d2/a3 + move.l a0,a2 + move.l a1,a3 + move.w (Userbits+CU,NodeBase),d3 + btst #USERB_RAW,d3 ; raw ? + beq.b 2$ + lea (rawextension),a1 + move.l a2,a0 + moveq.l #2,d4 ; husker raw + bsr 10$ + move.l a3,a0 + bne.b 1$ +2$ btst #USERB_ANSIMenus,d3 ; ANSI ? + beq.b 3$ ; nei, feiler + lea (ansiextension),a1 + move.l a2,a0 + moveq.l #1,d4 ; husker ansi + bsr 10$ + move.l a3,a0 + bne.b 1$ +3$ move.l a2,a0 + moveq.l #0,d4 ; ikke noe spes +1$ move.l d4,d1 + pop a2/d3/d4/d2/a3 + rts + +10$ move.l a1,-(a7) + move.l a3,a1 + bsr strcopy + subq.l #1,a1 + move.l (a7)+,a0 + bsr strcopy + move.l a3,a0 + move.l a0,d1 + move.l (dosbase),a6 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.b 11$ + jsrlib UnLock + clrz +11$ move.l (exebase),a6 + rts + +;a0 = filename +;d0 : 1 , only con. +typefilenoerror + push a2/d2/d3 + move.l a0,a2 + move.l d0,d3 + + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + tst.l d0 + beq.b 1$ + move.l d0,d1 + jsrlib UnLock + move.l (exebase),a6 + move.l a2,a0 + move.l d3,d0 + bsr typefile +1$ move.l (exebase),a6 + pop a2/d2/d3 + rts + +;a0 = filename +;d0 : 1 , only con. +typefile + movem.l d2-d6/a2,-(sp) + cmpi.b #NoCarrier,(readcharstatus,NodeBase) + beq 9$ ; skriver ikke noe da .. + move.l d0,d5 + beq.b 1$ ; ikke bare con + tst.b (Tinymode,NodeBase) ; tinymode ? + bne 9$ ; ja, da er vi ferdige +1$ move.l a0,a2 ; husker navnet + bsr getfilelen + bne.b 2$ ; vi fant en fil + lea (filenotfountext),a0 ; skriver ut feil + bsr writetext + move.b #' ',d0 + bsr writechar + move.l a2,a0 + bsr writetexti + lea (pltellsysoptext),a0 + bsr writetexto + sne d2 + lea (lognofiletext),a0 + move.l a2,a1 + bsr writelogtexttimed + tst.b d2 + bra.b 9$ +2$ move.l d0,d3 + move.l (msgmemsize,NodeBase),d1 + cmp.l d3,d1 + bcs.b 3$ ; vi har for lite minne + move.l (tmpmsgmem,NodeBase),d4 ; Bruker tmpmsgmem til copy space + moveq.l #0,d6 ; Nei, vi har ikke allokert minne. + bra.b 4$ +3$ move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,d4 + beq.b 9$ ; vi fikk inne noe mem + move.l d3,d6 ; vi har allokert minne .. +4$ move.l (dosbase),a6 ; leser inn fil + move.l a2,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d4,d2 + move.l d0,d4 + beq.b 7$ + move.l d0,d1 + jsrlib Read + move.l d4,d1 + move.l d0,d4 ; husker verdien + jsrlib Close + cmp.l d3,d4 + bne.b 8$ ; error + move.l (exebase),a6 + move.l d3,d0 + move.l d2,a0 + move.l d5,d1 + bsr writetextmemi + bne.b 7$ + bsr.b 10$ +8$ setz + bra.b 9$ +7$ move.l (exebase),a6 + bsr.b 10$ + clrz +9$ movem.l (sp)+,d2-d6/a2 + rts + +10$ move.l d6,d0 + beq.b 11$ + move.l d2,a1 + jmplib FreeMem +11$ rts + +writeerror + clr.b (readlinemore,NodeBase) ; flush'er input + bsr writetext + rts + +; OBS : Dropper tekst over 80 tegn !!! +writeerrori + clr.b (readlinemore,NodeBase) ; flush'er input + bsr writetext + bra breakoutimage + +;#c +; OBS : Dropper tekst over 80 tegn !!! +writeerroro + clr.b (readlinemore,NodeBase) ; flush'er input + bsr writetext + bra outimage + +;#c +writechar + lea (outtextbuffer,NodeBase),a0 + move.w (outtextbufferpos,NodeBase),d1 + move.b d0,(0,a0,d1.w) + addq.w #1,d1 + move.w d1,(outtextbufferpos,NodeBase) + cmpi.w #160,d1 + bls.b 9$ + bra breakoutimage +9$ rts + + + XREF _Hebbe + XREF _CheckTextMode + +;#c +; OBS : Dropper tekst over 160 tegn !!! +writetextmsg + move.l a0,a1 + moveq.l #-1,d0 +1$ tst.b (a1)+ + dbeq d0,1$ + not.w d0 + ext.l d0 +writetextlenmsg +; jsr (_Hebbe) + push a2/d2/d3 ; a2 er ansitext, d2 er mode + subq.w #1,d0 + move.w d0,d3 + bcs 9$ ; for kort! + moveq #0,d1 + lea (outtextbuffer,NodeBase),a1 + move.w (outtextbufferpos,NodeBase),d1 + cmpi.w #160,d1 + bhi 2$ + adda.l d1,a1 + +1$ cmpi.b #'_',(a0) ; Underline + bne 1000$ ; nei +1006$ cmp.b #1,(Underlinetab) ; Har vi på fra før? + bne.b 1001$ ; Nei + + move.b #0,(Underlinetab) ; Ja. Vi slår av + lea (Plaintext),a2 ; Ja + move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + addq.w #4,d1 + + cmp.b #2,(Quotingmode) ; Har vi quota >>? + bne.b 1003$ ; Nei + lea (ansiredtext),a2 ; Da setter vi rød + bra.b 1010$ +1003$ cmp.b #1,(Quotingmode) ; Har vi quota >? + bne.b 1004$ ; Nei + lea (ansilbluetext),a2 ; Da setter vi lyseblå + bra.b 1010$ +1004$ lea (ansigreentext),a2 ; Da må vi ha grønn! + bra.b 1010$ + +1001$ move.b #'_',d2 + jsr (_CheckTextMode) ; Sjekker om vi skal ha på + beq.b 1000$ ; Nei + lea (Underlinetext),a2 ; Da setter vi på + move.b #1,(Underlinetab) + bra.b 1002$ +1010$ move.b (a2)+,(a1)+ ; Må ha med 1 ekstra pga farge + addq.w #1,d1 +1002$ move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + move.b (a2)+,(a1)+ + addq.w #4,d1 + move.b (a0)+,(a1) ; Hopper over tegnet + subq.w #1,d1 +; bra 1000$ + +1000$ move.b (a0)+,(a1)+ + +; kopiere a0 til a1 og plusser på. + addq.w #1,d1 + cmpi.w #160,d1 + bhi.b 2$ + dbf d3,1$ +2$ move.w d1,(outtextbufferpos,NodeBase) +9$ pop a2/d2/d3 + rts + +;#c +; OBS : Dropper tekst over 160 tegn !!! +writetext + move.l a0,a1 + moveq.l #-1,d0 +1$ tst.b (a1)+ + dbeq d0,1$ + not.w d0 + ext.l d0 +writetextlen + subq.w #1,d0 + bcs.b 9$ ; for kort! + moveq #0,d1 + lea (outtextbuffer,NodeBase),a1 + move.w (outtextbufferpos,NodeBase),d1 + cmpi.w #160,d1 + bhi.b 2$ + adda.l d1,a1 +1$ move.b (a0)+,(a1)+ ; kopiere a0 til a1 og plusser på. + addq.w #1,d1 + cmpi.w #160,d1 + bhi.b 2$ + dbf d0,1$ +2$ move.w d1,(outtextbufferpos,NodeBase) +9$ rts + +;#c +newlinei + move.b #10,d0 +writechari + bsr writechar + tst.w (outtextbufferpos,NodeBase) ; Har vi allerede tatt outimage? + beq.b 1$ ; ja. + bra breakoutimage +1$ rts + +;#c JEO2 +; OBS : Dropper tekst over 80 tegn !!! +writetexti + bsr writetext + bra breakoutimage + +;#c +; OBS : Dropper tekst over 80 tegn !!! +writetexto + bsr writetext + bra outimage + +;#c +writetextleni + bsr writetextlen + bra breakoutimage + +;#c +writetextlenimsg + bsr writetextlen ; writetextlenmsg + bra breakoutimage + +;#c +outimage + lea (outtextbuffer,NodeBase),a0 + move.w (outtextbufferpos,NodeBase),d0 + move.b #10,(0,a0,d0.w) + addq.w #1,(outtextbufferpos,NodeBase) +; bra breakoutimage + +breakoutimage + push a2/d2/a3 + + lea (outtextbuffer,NodeBase),a2 + move.w (outtextbufferpos,NodeBase),d1 ; legger til en null på slutten + clr.b (0,a2,d1.w) + clr.w (outtextbufferpos,NodeBase) + tst.b (active,NodeBase) ; Har vi noen aktive ? + beq.b 1$ ; Nei, da er det ansi tid + tst.b (FSEditor,NodeBase) ; Vi er i FSE. Ingen ANSI strip'ing + bne.b 1$ + move.w (Userbits+CU,NodeBase),d0 ; Vil vi ha ansi text ? + andi.w #USERF_ANSI,d0 + bne.b 1$ ; ja. + move.l a2,a0 + bsr disposeansistuff +1$ move.l a2,a0 ; skriver ut sakene + bsr 50$ + tst.b (FSEditor,NodeBase) ; Vi er i FSE. + bne 10$ ; Ingen more saker + move.l (nodenoden,NodeBase),a0 + move.w (Nodestatus,a0),d0 + cmpi.w #8,d0 ; chat'er vi ? + beq 10$ ; jepp. + cmpi.w #44,d0 ; sysop chat'er vi ? + beq 10$ ; Jepp. + move.l a2,a0 ; Var det noen NL i teksten ? +2$ move.b (a0)+,d0 + beq 10$ ; Nei, da dropper vi moresaker + cmpi.b #10,d0 + bne.b 2$ + move.w (PageLength+CU,NodeBase),d0 ; Skal vi droppe more ? + beq 10$ ; ja + move.w (linesleft,NodeBase),d0 ; henter antall linjer før more + cmpi.w #1,d0 + bls.b 3$ ; det var ingen igjen. + cmpi.w #-1,d0 ; Har vi valgt "c" ? + beq 10$ ; ja + subq.w #1,(linesleft,NodeBase) ;,d0 ; minker med en (overflow er umulig her) + bra 10$ +3$ lea (moretext),a0 + move.b (XpertLevel+CU,NodeBase),d0 ; skal de ha lang text ? + cmpi.b #2,d0 + bcs.b 14$ ; ja + lea (morenohelptext),a0 +14$ move.l a0,a3 + bsr 50$ + bsr startsleepdetect +4$ bsr readchar + beq 12$ + bmi.b 4$ ; Dropper spesial tegn. + bsr upchar + cmpi.b #' ',d0 ; space ? + beq.b 5$ + cmpi.b #13,d0 ; return ? + beq.b 6$ ; gi en linje til + cmpi.b #10,d0 ; LF ? + beq.b 5$ + cmpi.b #'Y',d0 ; ja ? + beq.b 5$ + cmpi.b #3,d0 ; Sjekker etter CTLR C + beq.b 13$ + cmpi.b #11,d0 ; Sjekker etter CTLR K + beq.b 13$ + cmpi.b #'Q',d0 + beq.b 13$ + cmpi.b #'N',d0 ; nei ? + bne.b 11$ +13$ lea (newlinetext+1),a0 ; Avslutter + bsr 50$ + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; Ny side.. + clr.b (dosleepdetect,NodeBase) +; setz ; clr'en gjør dette + bra.b 9$ +11$ cmpi.b #'C',d0 + bne.b 4$ + move.w #-1,(linesleft,NodeBase) ; Vi skal ta continous + bra.b 6$ +5$ move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) +6$ clr.b (dosleepdetect,NodeBase) + move.l a3,a0 ; sletter More saken + bsr strlen + move.l d2,-(a7) + move.w d0,d2 +7$ subq.w #1,d2 + bcs.b 8$ + lea (deltext),a0 + bsr 50$ + bra.b 7$ +8$ move.l (a7)+,d2 +10$ clrz +9$ pop a2/d2/a3 + rts +12$ clr.b (dosleepdetect,NodeBase) + bra.b 9$ + +50$ push a2/a3 + move.l a0,a2 + move.l a0,a3 + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 53$ ; Yepp. no serial action. + + bsr waitseroutput ; Venter til ser er ferdig + +; Translate string + + lea (transouttextbuffer,NodeBase),a0 + moveq.l #0,d1 +51$ move.b (a2)+,d0 + beq.b 52$ + bsr translateseroutstring + bra.b 51$ +52$ clr.b (a0) + +; Write string (d1 = len (sting)) + lea (transouttextbuffer,NodeBase),a0 + move.l d1,d0 + bsr serwritestringlen + ENDC +53$ tst.b (Tinymode,NodeBase) ; Tiny mode ? + bne.b 59$ ; Yessir. + move.b (Cflags+CStr,MainBase),d0 ; kjører vi med 8 + btst #CflagsB_8Col,d0 ; farver ? + bne.b 54$ ; ja + move.l a3,a0 ; nei, da fjerner vi + bsr disposeansicolor ; farve kodene + bra.b 58$ +54$ move.l #160,d0 ; maks lengde... + move.l a3,a0 ; Legger til en ;37 + bsr addansiwhite ; etter hver esc[0..m +58$ move.l a3,a2 ; Oversetter for console + lea (conouttextbuffer,NodeBase),a0 + moveq.l #0,d1 +55$ move.b (a2)+,d0 + beq.b 56$ +; cmp.b #7,d0 ; BELL ?? +; beq.b 55$ ; Ja. det vil vi ikke ha her. + cmpi.b #10,d0 + bne.b 57$ + move.b #13,(a0)+ + addq.l #1,d1 +57$ move.b d0,(a0)+ + addq.l #1,d1 + bra.b 55$ +56$ clr.b (a0) + lea (conouttextbuffer,NodeBase),a0 + move.l d1,d0 + bsr writecontextlen ; write to console +59$ pop a2/a3 + rts + +;#c +dubbelnewline + moveq.l #2,d0 + lea (newlinetext),a0 + bra writetextlen + +;#c +; a0 = text +; d0 = len +; d1 = 1 -> Bare con +; d1 = 2 -> ikke breake, (både con og ser). +; d1 : bit 31 satt : quoting på. +writetextmemi + push a2/d2/d3/d4/d5 + link.w a3,#-250 + moveq.l #0,d5 ; siste ESC + move.b #0,Underlinetab + btst #31,d1 ; skal vi quote ? + beq.b 101$ ; nei + move.w (Userbits+CU,NodeBase),d2 ; Vil vi ha ansi text ? + andi.w #USERF_ColorMessages,d2 + beq.b 101$ ; nei. + bset #30,d5 ; ja, husker +101$ move.l d1,d3 + beq.b 6$ ; ikke bare con + cmpi.b #2,d1 ; er det ikke break ? + bne.b 61$ ; nope + bset #31,d5 ; setter flagg så vi husker + moveq.l #0,d3 ; og retter opp d3 + bra.b 6$ + +61$ tst.b (Tinymode,NodeBase) ; har vi tinymode ? + bne 999$ ; ja, da er vi ferdige +6$ move.l a0,a2 + move.l d0,d2 + lea (CursorOffData),a0 ; slår av cursor + bsr writecontext +3$ moveq.l #0,d0 + move.l a2,a0 +2$ move.b (a2)+,d1 + addq.l #1,d0 + subq.l #1,d2 ; ferdig ? + beq.b 1$ ; ja + cmpi.b #10,d1 ; NL ? + beq.b 1$ ; jepp. ut med linja + cmpi.b #27,d1 ; ESC ? + bne.b 4$ + move.w d0,d5 ; husker siste ESC. +4$ cmpi.w #80,d0 ; 80 tegn ? + bcs.b 2$ ; nope. continue + cmpi.w #72,d5 ; er vi i en ESC sekvens ? (hack) + bls.b 1$ ; nei. alt ok. + sub.w d5,d0 + andi.l #$ffff,d0 + addq.l #1,d0 + suba.l d0,a2 ; peker tilbake på starten av ESC + add.l d0,d2 ; fikser opp size'n igjen + move.w d5,d0 + subq.l #1,d0 ; skriv ut til ESC (ikke med) +1$ tst.b d3 + beq.b 5$ + move.b (Cflags+CStr,MainBase),d1 ; kjører vi med 8 + btst #CflagsB_8Col,d1 ; farver ? + bne.b 8$ ; ja + move.l sp,a1 ; nei, da fjerner vi + bsr strcopylen ; farve kodene + move.b #0,(a1) + move.l sp,a0 + bsr disposeansicolor + move.l sp,a0 + bsr writecontext + bra.b 7$ +8$ bsr 10$ ; på med quotefarve (?) + bsr writecontextlen + bra.b 73$ +5$ bsr 10$ ; på med quitefarve (?) + bsr writetextlenimsg + bne.b 73$ +; tst.b readcharstatus(NodeBase) ; Har det skjedd noe ? +; notz + bra.b 9$ +73$ bsr 20$ ; quotefarven på ? av med den +7$ tst.l d2 + beq.b 99$ + move.w #0,d5 ; siste ESC + btst #31,d5 ; skal vi ta breake? JEO JEO + beq.b 71$ ; ja. + bsr testbreak + bra.b 72$ +71$ bsr testbreakspes +72$ bne 3$ + bsr outimage + setz + bra.b 9$ +99$ clrz +9$ sne d2 + lea (CursorOnData),a0 ; slår på cursor + bsr writecontext + tst.b d2 +999$ unlk a3 + pop a2/d2/d3/d4/d5 + rts + +; JEO +10$ move.b #0,Quotingmode + btst #30,d5 ; skal vi ha ansi ? + beq.b 19$ ; nei. + cmpi.b #'>',(a0) ; quoting ? + bne.b 19$ ; nei + bset #29,d5 ; ja + push a0/d0 + cmpi.b #'>',(1,a0) ; dobbel quiting ? + beq.b 12$ ; nei + lea (ansilbluetext),a0 ; ja + move.b #1,Quotingmode + bra.b 11$ +12$ lea (ansiredtext),a0 + move.b #2,Quotingmode +11$ bsr writetext ; writetextmsg + pop a0/d0 +19$ rts + +20$ btst #29,d5 ; satte vi på quote farve ? + beq.b 29$ ; nei + bclr #29,d5 ; slår av flagget + push a0/d0 + lea (ansigreentext),a0 + bsr writetext ; writetetmsg + pop a0/d0 +29$ rts + +testbreakspes + IFD nobreak + clrz + rts + ENDC + bsr testbreak + beq.b 9$ + move.b (XpertLevel+CU,NodeBase),d0 ; er vi novice? + notz + bne.b 9$ ;: ja, ingen break + move.l (creadreq,NodeBase),d0 + beq.b 1$ ; ingen console.. + move.l d0,a1 + jsrlib CheckIO ; console ferdig ? + tst.l d0 + bne.b 8$ ; Ja, vi har et tegn +1$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 7$ + move.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + bne.b 8$ ; Ja, vi har et tegn + ENDC +7$ clrz + bra.b 9$ +8$ setz ; nope. Ikke noe tegn +9$ rts + +;#c +; d0 = maks linje +readlineall + tst.b (readlinemore,NodeBase) + bne.b 1$ + bsr getline + rts +1$ lea (readlinebuffer,NodeBase),a0 + lea (intextbuffer,NodeBase),a1 + moveq.l #0,d1 + move.w (intextchar,NodeBase),d1 + adda.l d1,a1 + move.l d0,d1 ; maks antall tegn + moveq.l #-1,d0 +2$ addq.l #1,d0 + subq.l #1,d1 + bcs.b 3$ + move.b (a1)+,(a0)+ + bne.b 2$ +3$ move.b #0,(a0) + clr.b (readlinemore,NodeBase) + lea (readlinebuffer,NodeBase),a0 + tst.w d0 + rts + +;obs: front_dologin skriver inn i intextbuffer +;#c +;readlineflush +; clr.b (readlinemore,NodeBase) +readline + tst.b (readlinemore,NodeBase) + bne.b 5$ + move.w #80,d0 + bsr getline + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + moveq.l #1,d0 + move.b d0,(readlinemore,NodeBase) +5$ move.l d2,-(sp) + moveq.l #0,d0 + lea (readlinebuffer,NodeBase),a0 + lea (intextbuffer,NodeBase),a1 + move.w (intextchar,NodeBase),d1 +0$ addq.l #1,d1 + move.b (-1,a1,d1.w),d2 ; filtrerer vekk space i starten + cmpi.b #' ',d2 + beq.b 0$ + bra.b 8$ +1$ addq.l #1,d1 +8$ move.b (-1,a1,d1.w),d2 + beq.b 3$ + cmpi.b #';',d2 + beq.b 2$ + cmpi.b #',',d2 + beq.b 2$ + cmpi.b #' ',d2 + bne.b 6$ + cmpi.b #',',(0,a1,d1.w) + beq.b 7$ + cmpi.b #';',(0,a1,d1.w) + bne.b 2$ +7$ addq.l #1,d1 + bra.b 2$ +6$ move.b d2,(0,a0,d0.w) + addq.l #1,d0 + bra.b 1$ +2$ move.b (0,a1,d1.w),d2 + beq.b 3$ + addq.l #1,d1 + cmpi.b #' ',d2 + beq.b 2$ + subq.l #1,d1 + bra.b 4$ +3$ clr.b (readlinemore,NodeBase) +4$ move.w d1,(intextchar,NodeBase) + move.b #0,(0,a0,d0.w) + move.l (sp)+,d2 + tst.w d0 +9$ rts + +;#e +***************************************************************** +* sub rutiner * +***************************************************************** + +; a0 = prompt +; a1 = allerede lest input (= NULL hvis ingen) +; d0 = 0 : gottar ikke all +; d0 = 2 : må ha ALL for å sende all tilbake +; d1 != 0 : Tillater nettnavn +; returnerer -1 ved ALL, bare return +; z = 1 hvis no carrier +; n = 1, det var bare return +;(Prog/C) Read Ref Command: e sdf +; +;Please enter both the first AND the last name! +;Send message to (CR for ALL): SDF sdf +;Sorry, that name is not registered! +;Scanning user register... +; SIGURD STENERSEN +getname push d2/a2/d3/d4 + move.l a0,a2 ; husker prompt + moveq.l #0,d2 + move.b d0,d2 ; husker all status + tst.l d1 + beq.b 0$ + bset #31,d2 ; vi tillater nett navn +0$ move.l a1,d0 ; er det input her ? + bne.b 1$ ; jepp, tar edline + tst.b (readlinemore,NodeBase) ; er det mere innput ? + beq.b 3$ ; nei + bsr readline + bne.b 2$ + bra.b 4$ +3$ lea (nulltext),a1 +1$ moveq.l #Sizeof_NameT,d0 ; size + move.l a2,a0 ; prompt + jsr (mayedlinepromptfull) + bne.b 2$ +4$ tst.b (readcharstatus,NodeBase) ; sjedde det noe spes ? + notz + clrn + beq 9$ ; jepp, ut + moveq #-1,d0 + cmp.b #1,d2 + notz + setn ; det var bare return + bra 9$ + +2$ move.w d0,d3 + lea (tmptext,NodeBase),a1 + move.l a1,d4 ; husker stringen + bsr strcopy + cmpi.w #3,d3 ; 3 tegn ? sizeof("ALL") + bne.b 5$ ; nope + lea (alltext),a1 ; sjekker om det var ALL + move.l d4,a0 + bsr comparestringsifull + bne 6$ ; nope (heller ikke sysop) + moveq #-1,d0 ; returnerer -1 hvis vi godtar ALL + tst.b d2 + clrn + bne 9$ ; det gjorde vi + lea (noallheretext),a0 ; klage +21$ bsr writeerroro + bra.b 3$ + +5$ cmpi.w #5,d3 ; sizeof("SYSOP") ? + bne.b 6$ ; nope + lea (plainsysoptext),a1 ; sjekker om det er sysop + move.l d4,a0 + bsr comparestringsifull + bne.b 6$ ; nope + lea (SYSOPname+CStr,MainBase),a0 ; henter sysop navnet + lea (tmptext,NodeBase),a1 + bsr strcopy + lea (tmptext,NodeBase),a0 + bra 7$ +11$ move.b #0,(readlinemore,NodeBase) + bra 3$ + +10$ tst.b (readlinemore,NodeBase) ; er det mere innput ? + beq.b 12$ ; nei + bsr readline + bne.b 13$ + tst.b (readcharstatus,NodeBase) ; sjedde det noe spes ? + notz + clrn + beq 9$ ; jepp, ut + bra.b 12$ +13$ move.l d4,a1 +14$ move.b (a1)+,d0 + bne.b 14$ + move.b #' ',(-1,a1) + bsr strcopy + bra.b 6$ +12$ lea (entlastnametext),a0 +15$ bsr writeerroro + move.l d4,a1 + bra 1$ + +6$ move.l d4,a0 ; finner ut om vi har fornavn + cmp.b #' ',(a0) ; og etternavn. + beq.b 11$ +61$ move.b (a0)+,d0 + beq.b 10$ + cmp.b #'@',d0 + bne.b 64$ + btst #31,d2 ; tillater vi netnavn ? + bne.b 63$ ; jepp, da er vi ferdige.. + lea (nonetnametext),a0 + bra.b 15$ +64$ cmp.b #' ',d0 + bne.b 61$ + move.b (a0),d0 + beq.b 10$ +62$ move.b (a0)+,d0 + beq.b 63$ + cmp.b #'@',d0 + bne.b 65$ + btst #31,d2 ; tillater vi netnavn ? + bne.b 63$ ; jepp, da er vi ferdige.. + lea (nonetnametext),a0 + bra.b 15$ +65$ cmp.b #' ',d0 + bne.b 62$ + move.b #0,(-1,a0) +63$ move.l d4,a0 + bsr strlen + cmpi.w #Sizeof_NameT,d0 + lea (nametolongtext),a0 + bhi 21$ + move.l d4,a0 +7$ move.l a0,a1 + moveq.l #-1,d0 +71$ tst.b (a1)+ + dbeq d0,71$ + addi.w #Sizeof_NameT+1,d0 + bmi.b 73$ +72$ move.b #0,(a1)+ + dbf d0,72$ +73$ move.b #0,(a1) + +8$ moveq #1,d0 ; z = 0, n = 0, d0 != -1 +9$ pop d2/a2/d3/d4 + rts + +; a0 = prompt +; d0 != 0 : bruk edlineprompt isteden. +; d1 = 0 : gottar ikke all +; d1 = 2 : må ha ALL for å sende all tilbake +; returnerer -1 ved ALL, bare return +; z = 1 hvis no carrier +; n = 1, det var bare return +; IFD sdfasdq3 +;getname +; push d2/a2/d3/d4 +; move.l d0,d1 +; move.l a1,d0 +; beq.b 101$ +; move.l a0,a2 +; move.l a1,a0 +; lea (intextbuffer,NodeBase),a1 +; bsr strcopy +; moveq.l #Sizeof_NameT,d0 +; move.l a2,a0 +;101$ move.l d0,d3 +; move.l d1,d4 +; move.l a0,a2 +;4$ move.l a2,a0 +; move.l d3,d0 ; bruke edlineprompt ? +; bne.b 5$ ; jepp +; bsr readlineprompt +; bra.b 6$ +;5$ bsr edlinepromptword +;6$ beq.b 0$ ; det skjedde noe spes. +; move.l d0,d2 ; tegn lest +; bsr upword +; cmpi.w #3,d2 ; 3 tegn ? sizeof("ALL") +; bne.b 1$ ; nope +; lea (alltext),a1 ; sjekker om det var ALL +; move.l a0,-(sp) +; bsr comparestringsfull +; move.l (sp)+,a0 +; bne.b 2$ ; nope +; moveq #-1,d0 ; returnerer -1 hvis vi godtar ALL +; tst.l d4 +; clrn +; bne 9$ ; det gjorde vi +; lea (noallheretext),a0 ; klage +;61$ bsr writeerroro +; bra.b 4$ +;0$ tst.b (readcharstatus,NodeBase) ; sjedde det noe spes ? +; notz +; clrn +; beq 9$ ; jepp, ut +; moveq #-1,d0 +; cmp.b #1,d4 +; notz +; setn ; det var bare return +; bra 9$ +;1$ cmpi.w #5,d2 ; sizeof("SYSOP") ? +; bne.b 2$ ; nope +; lea (plainsysoptext),a1 ; sjekker om det er sysop +; move.l a0,-(sp) +; bsr comparestringsfull +; move.l (sp)+,a0 +; bne.b 2$ ; nope +; lea (SYSOPname+CStr,MainBase),a0 ; henter sysop navnet +; lea (tmptext,NodeBase),a1 +; bsr strcopy +; lea (tmptext,NodeBase),a0 +; bra.b 3$ +;2$ cmpi.w #Sizeof_NameT-2,d2 ; for langt ? +; bls.b 21$ ; nope +;22$ lea (nametolongtext),a0 +; bra.b 61$ +;21$ lea (tmptext,NodeBase),a1 +; bsr strcopy +; move.b #' ',(-1,a1) +; addq.l #1,d2 +;71$ lea (entlastnametext),a0 +; bsr readlineprompt +; bne.b 12$ +; tst.b (readcharstatus,NodeBase) +; notz +; bne.b 71$ +; clrn +; bra.b 9$ +;12$ bsr upword +; lea (tmptext,NodeBase),a1 +; adda.l d2,a1 +; add.l d0,d2 +; cmpi.w #Sizeof_NameT,d2 +; bhi 22$ +; bsr strcopylen +; move.b #0,(a1) +; lea (tmptext,NodeBase),a0 +;3$ move.l a0,a1 +; moveq.l #-1,d0 +;8$ tst.b (a1)+ +; dbeq d0,8$ +; addi.w #Sizeof_NameT+1,d0 +; bmi.b 10$ +;11$ move.b #0,(a1)+ +; dbf d0,11$ +;10$ moveq #1,d0 ; z = 0, n = 0, d0 != -1 +;9$ pop d2/a2/d3/d4 +; rts +; ENDC + +; d0 = usernr +; ret: a0 = username +; d0 = death status +getusername + moveq.l #-1,d1 + cmp.l d0,d1 + bne.b 1$ + lea (alltext),a0 + moveq.l #0,d0 + bra.b 9$ +1$ move.l (msg,NodeBase),a1 + move.w #Main_getusername,(m_Command,a1) + move.l d0,(m_UserNr,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.l (m_Name,a1),a0 + move.w (m_Data,a1),d0 +; move.w m_Error(a1),d1 +; cmp.w #Error_OK,d1 +9$ rts + +getloginname + push d2/a2/d3 +; Vil trolig aldri brukes +; bsr handlenetlogin ; Ber den ta seg av innlogging +; beq 99$ ; Vi skal ut (feil, eller net session foretatt.) + move.b #0,(Charset+CU,NodeBase) ; Sørger for at brukeren har ISO + bra.b 1$ + +0$ clr.b (readlinemore,NodeBase) +1$ lea (Name+CU,NodeBase),a0 ; Sletter. + moveq.l #Sizeof_NameT,d0 + bsr memclr + lea (tmptext,NodeBase),a0 ; Sletter. + moveq.l #Sizeof_NameT,d0 + bsr memclr + + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) + beq.b 2$ + bsr checkcarrier ; har vi carrier ? + beq 99$ ; Nei, "NoCarrier" + bsr flushserialbuffer + ENDC +2$ bsr outimage + lea (whatisfirstname),a0 + bsr readlineprompt + bne.b 7$ + tst.b (readcharstatus,NodeBase) ; no carrier ? + notz + beq 99$ ; ja, ut + bra.b 2$ ; nei, tilbake igjen. +7$ move.w d0,d2 + cmpi.w #Sizeof_NameT-2,d2 ; sjekker om fornavet er for klangt + bhi.b 11$ ; har ikke plass til space og etternavn. + move.l a0,a2 + lea (plainsysoptext),a1 ; er det sysop ? + bsr comparestringsicase + bne.b 4$ ; nope + lea (SYSOPname+CStr,MainBase),a0 ; fyller i sysops navn + lea (Name+CU,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + bra.b 9$ ; og ferdig +4$ move.l a2,a0 + move.l d2,d0 + lea (tmptext,NodeBase),a1 ; kopierer inn fornavnet + bsr strcopymaxlen + lea (whatislastname),a0 + bsr readlineprompt + bne.b 8$ + tst.b (readcharstatus,NodeBase) + notz + beq 99$ + bra 0$ +8$ move.w d2,d1 + add.w d0,d1 + cmpi.w #Sizeof_NameT,d1 + bcs.b 10$ +11$ lea (nametolongtext),a0 + bsr writetexti + bra 0$ +10$ move.l a0,a2 + move.w d0,d3 + move.w d2,d0 + ext.l d0 + lea (tmptext,NodeBase),a1 ; kopierer inn fornavnet + adda.l d0,a1 + move.b #' ',(a1)+ + move.w d3,d0 + bsr strcopylen + lea (tmptext,NodeBase),a0 ; kopierer inn navnet på riktig sted + lea (Name+CU,NodeBase),a1 + bsr strcopy + + lea (Name+CU,NodeBase),a0 + bsr FixloginIBN +9$ clrz +99$ pop d2/a2/d3 + lea (Name+CU,NodeBase),a0 + rts + +FixloginIBN + push a2 + lea (ibnnortext),a1 + lea (isonortext),a2 +1$ move.b (a0)+,d0 + beq.b 9$ ; ferdig + moveq.l #5,d1 ; antall tegn - 1 +2$ cmp.b (a1,d1.w),d0 + dbeq d1,2$ + bne.b 1$ ; fant ikke + move.b (a2,d1.w),(-1,a0) ; konverterer. + bra.b 1$ +9$ pop a2 + rts + +; retur: +; Z = ferdig (Z = 1: Ferdig, logout, Z = 0, be om nanv osv) +handlenetlogin + clrz + rts + IFD OLD_NETLOGIN + link a3,#-30 + lea (sp),a1 ; bygger opp port navnet "ABBSnetX.port" + lea (netportname),a0 + move.w (NodeNumber,NodeBase),d0 + jsr (fillinnodenr) + lea (sp),a1 ; sjekker om det er noe vits i å gjøre mere + jsrlib FindPort + tst.l d0 + beq.b 8$ ; oops, ingen port + move.l (msg,NodeBase),a1 + move.w #Net_DoLogin,(pm_Command,a1) + move.l (nodepublicport,NodeBase),(pm_Data,a1) + lea (sp),a0 ; Port navnet + jsr (handlemsgspesport) ; ingen error fra denne + beq.b 8$ ; oops, ingen port + bset #DIVB_InNetLogin,(Divmodes,NodeBase) + +1$ move.l (publicsigbit,NodeBase),d0 + jsrlib Wait + jsr (handlepublicport) + bne.b 1$ + bclr #DIVB_InNetLogin,(Divmodes,NodeBase) + lea (tmptext,NodeBase),a0 + move.b (a0),d0 + beq.b 9$ + lea (intextbuffer,NodeBase),a1 ; HACK! + bsr strcopy + move.b #1,(readlinemore,NodeBase) + move.w #0,(intextchar,NodeBase) +8$ notz +9$ unlk a3 + rts + ENDC ; OLD_NETLOGIN + +; må beholde a0 +convertfirstnltoend + push a0 +1$ move.b (a0)+,d0 + beq.b 9$ + cmp.b #10,d0 + bne.b 1$ + move.b #0,(-1,a0) +9$ pop a0 + rts + +****************************** +;removespaces (streng) +; a0.l +;Removes spaces before string, +;and places a 0 byte at end of word +****************************** +removespaces +1$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #' ',d0 + beq.b 1$ + subq.l #1,a0 + move.l a0,a1 +2$ move.b (a0)+,d0 + beq.b 8$ + cmpi.b #' ',d0 + bne.b 2$ + move.b #0,(-1,a0) +8$ move.l a1,a0 + clrz +9$ rts + +****************************** +;strcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring +;obs: Må ikke ødelegge registre +****************************** +strcopy +1$ move.b (a0)+,(a1)+ + bne.b 1$ + rts + +****************************** +;strcat (fromstreng,tostreng1) +; a0.l a1.l +;appends fromstring after tostring +****************************** +strcat +1$ tst.b (a1)+ + bne.b 1$ + subq.l #1,a1 +2$ move.b (a0)+,(a1)+ + bne.b 2$ + rts + +typefileinfoheader + lea (ansigreentext),a0 + bsr writetexti + lea (fileiheadertext),a0 + bsr strlen + lea (fileiheadertext),a0 + moveq.l #0,d1 + bsr writetextmemi ; skriver header. + beq.b 9$ + bsr outimage ; nl. +9$ rts + +; a0 = string +; returns with a0 pointing at the terminating 0 of the string +addendofpath +1$ move.b (a0)+,d0 + bne.b 1$ + subq.l #1,a0 + move.b (-1,a0),d0 + cmp.b #':',d0 ; already correct ? + beq.b 9$ ; yes + cmp.b #'/',d0 + beq.b 9$ ; yes + move.b #'/',(a0)+ ; add path end + move.b #0,(a0) +9$ rts + +checkfilename + move.l a2,-(sp) + move.l a0,a2 + bsr testfilename + beq 1$ + move.l a2,a0 + bsr strlen + cmpi.w #Sizeof_FileName,d0 + bhi.b 3$ + clrz +9$ move.l (sp)+,a2 + rts +3$ lea (only18charatext),a0 + bsr writeerroro + bra.b 2$ +1$ lea (nopathallowtext),a0 + bsr writeerroro +2$ clr.b (readlinemore,NodeBase) + bra.b 9$ + +; a0 = filename +; d0 = dirnr (*1) +; a1 = string +buildfilepath + move.l a0,-(sp) + move.l (firstFileDirRecord+CStr,MainBase),a0 + mulu.w #FileDirRecord_SIZEOF,d0 + lea (n_DirPaths,a0,d0.l),a0 + bsr strcopy + subq.l #1,a1 + cmpi.b #':',(-1,a1) ; er det filpathslutt der ? + beq.b 1$ ; jepp + cmpi.b #'/',(-1,a1) ; er det filpathslutt der ? + beq.b 1$ ; jepp + move.b #'/',(a1)+ ; nei, legger på +1$ move.l (sp)+,a0 + bra strcopy + +; a0 = name +; a1 = fileinfo buffer +; d0 = vil ha nesten navn (true/false) +findfileinfo + push d2/a2/a3/d3/d4 + move.l a1,a2 + move.l d0,d4 ; husker om vi vil ha nesten navn + move.l (firstFileDirRecord+CStr,MainBase),a3 + move.l (msg,NodeBase),a1 + move.w #Main_findfile,(m_Command,a1) + move.l a0,(m_Name,a1) + lea (tmplargestore,NodeBase),a0 + move.l a0,(m_arg,a1) ; gir med plass til nesten match. + move.b #0,(8,a0) ; sletter nesten navnet + + moveq.l #0,d2 ; filedir nr + moveq.l #0,d3 ; antall fildir'er vi har sjekket +1$ move.b (n_DirName,a3),d0 + bne.b 4$ + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + addq.l #1,d2 + bra.b 1$ +4$ move.l d2,(m_UserNr,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 + cmpi.w #Error_Not_Found,d1 + bne.b 2$ +3$ addq.l #1,d2 ; loop'er igjennom alle dir'er. + addq.l #1,d3 + lea (FileDirRecord_SIZEOF,a3),a3 ; peker til neste navn + cmp.w (ActiveDirs+CStr,MainBase),d3 + bcs.b 1$ + tst.l d4 ; vil vi ha nesten navn ? + beq.b 2$ ; nei. + lea (tmplargestore,NodeBase),a0 + move.b (8,a0),d0 ; har vi fått et nesten navn ? + beq.b 2$ ; nei + + move.l (msg,NodeBase),a1 ; load'er nesten navnet + move.w #Main_loadfileentry,(m_Command,a1) + move.l (a0)+,d2 + move.l d2,(m_UserNr,a1) ; filedir + move.l (a0),(m_arg,a1) ; fil nr + move.l a2,(m_Data,a1) ; buffer + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d1 +2$ move.l d2,d0 + cmpi.w #Error_OK,d1 + bne.b 9$ + move.w (Filestatus,a2),d1 ; vil ikke slå ut for nesten navn (allerede sjekket) + andi.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d1 + bne.b 3$ +9$ notz + pop d2/a2/a3/d3/d4 + rts + +; a0 = funksjon +; a1 = dirnavn på de som skal match'es +; d0 = data +; d1 (bool) vis mere info +loopalldirs + push d2/a3/d3/d4/d5/d6/d7 + move.l d1,d2 + move.l a0,d6 ; Funksjon å utføre på filentry'ene + move.l d0,d3 ; Data til denne funksjonen + move.l a1,d7 ; husker mach'en + move.l a1,a0 + bsr upstring ; gjør om til store navn + move.l (firstFileDirRecord+CStr,MainBase),a3 + moveq.l #-1,d4 ; confnr. Private først. + moveq.l #0,d5 ; teller for antall dir'er +1$ addq.l #1,d4 ; Øker dir nr + moveq.l #0,d0 + move.l d4,d1 + mulu.w #FileDirRecord_SIZEOF,d1 + move.w (n_FileOrder,a3,d1.l),d0 ; henter ut dirnr + subq.l #1,d0 + move.l d0,d1 + mulu.w #FileDirRecord_SIZEOF,d1 + lea (n_DirName,a3,d1.l),a0 ; er det en fildir her ? + move.b (a0),d1 + beq.b 1$ ; nope + move.l d7,a1 + bsr 10$ ; skal vi ta denne ? + beq.b 3$ ; nope + move.l d6,a0 + move.l d3,d1 + bsr loopdir + beq.b 9$ + bsr testbreak + beq.b 9$ +3$ addq.l #1,d5 + cmp.w (ActiveDirs+CStr,MainBase),d5 + blo.b 1$ +9$ pop d2/d3/a3/d4/d5/d6/d7 + rts + +10$ push d0 +11$ move.b (a1)+,d1 ; henter neste tegn i match'en + beq.b 18$ ; ferdig, vi tar'n + cmpi.b #'*',d1 ; stjerne ? + beq.b 18$ ; jepp, da tar vi'n + move.b (a0)+,d0 + beq.b 19$ ; slutt, ikke denne + bsr upchar + cmp.b d0,d1 ; stemmer det videre ? + beq.b 11$ ; jepp. +18$ notz +19$ pop d0 + rts + +; a0 = funksjon +; d0 = dirnr +; d1 = data +; d2 (bool) vis mere info +loopdir push a2/a3/d2/d3/d4/d5/d6 + move.l d0,d3 + move.l a0,a3 + move.l d1,d5 + move.l d2,d6 + lea (tmpfileentry,NodeBase),a2 + moveq.l #0,d4 ; Har vi skrevet ut header ? Nei. + moveq.l #1,d2 ; starter på første fil. + + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 4$ ; nope + jsr (setuptmpbrowse) + bne.b 43$ ; ok + bclr #DIVB_Browse,(Divmodes,NodeBase) ; error, dropper browse + bra.b 4$ +43$ lea (ansiclearscreen),a0 + bsr writetexti + bra.b 41$ +4$ move.b #'(',d0 ; Skriver ut fildir navn + bsr writechar +41$ move.l (firstFileDirRecord+CStr,MainBase),a0 + move.l d3,d0 + mulu.w #FileDirRecord_SIZEOF,d0 + lea (n_DirName,a0,d0.l),a0 + bsr writetext + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + bne.b 42$ ; jepp + move.b #')',d0 + bsr writechar +42$ bsr outimage + beq 9$ + +1$ move.l (msg,NodeBase),a1 + move.w #Main_loadfileentry,(m_Command,a1) + move.l d3,(m_UserNr,a1) + move.l d2,(m_arg,a1) + move.l a2,(m_Data,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + cmpi.w #Error_EOF,d0 + beq.b 7$ + cmpi.w #Error_OK,d0 + bne.b 6$ + move.l a2,a0 + bsr allowtypefileinfo + beq.b 2$ + move.l d5,d0 ; Plasere data. + move.l a2,a0 + jsr (a3) ; Skal denne skrives ut ?? + beq.b 2$ ; Nei + + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 8$ ; nope + move.l a2,a0 + move.l d2,d0 + jsr (addtmpbrowse) + beq.b 7$ ; full, "ferdig", hopper til valg + bra.b 2$ +8$ tst.l d4 + bne.b 3$ + bsr typefileinfoheader + beq.b 9$ + moveq.l #1,d4 +3$ move.l a2,a0 + move.l d6,d0 + bsr typefileinfo + beq.b 9$ +2$ addq.l #1,d2 + bsr testbreak + beq.b 9$ + bsr checkcarriercheckser + beq.b 9$ + bra.b 1$ +6$ tst.l d4 + beq.b 9$ + bsr outimage + setz + bra.b 9$ +7$ btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 71$ ; nope + move.l d3,d0 + jsr (dobrowseselect) + beq.b 9$ + +71$ tst.l d4 + beq.b 5$ + bsr outimage + beq.b 9$ +5$ clrz +9$ sne.b d2 + btst #DIVB_Browse,(Divmodes,NodeBase) ; er browse aktiv ? + beq.b 91$ ; nope + jsr (cleanuptmpbrowse) +91$ tst.b d2 + pop a2/a3/d2/d3/d4/d5/d6 + rts + +; a0 : filentry +; d0 : skal vi vise 2. linje hvis det er sysop ? +typefileinfo + push d2/a2 + link.w a3,#-160 + move.l d0,d2 ; husker 2. linje status + move.l a0,a2 + lea sp,a1 ; string + bsr dofileinfoline1 + lea sp,a0 + bsr writetexto + beq.b 9$ + + tst.l d2 ; skal vi ha mere ? + notz + bne.b 9$ ; nei + move.l a2,a0 + lea sp,a1 + bsr dofileinfoline2 + lea sp,a0 + bsr writetexto +9$ unlk a3 + pop d2/a2 + rts + + XREF _Check_Preview + +; a0 = fileinfo +; a1 = string +dofileinfoline1 + push a2/d2/d3/a3 + move.l a0,a2 ; fileinfo + move.l a1,a3 ; string + +; skriver ut debug verdier.. +; IFEQ sn-13 +; move.l a3,a0 +; move.l (Uploader,a2),d0 +; bsr konverter +; move.b #':',(a0)+ +; move.l (AntallDLs,a2),d0 +; bsr konverter +; move.b #':',(a0)+ +; move.l a0,a3 +; ENDC + + lea (minusstext),a0 + lea (u_almostendsave+CU,NodeBase),a0 + move.w (uc_Access,a0),d0 + btst #ACCB_Download,d0 + beq.b 11$ + lea (nulltext),a0 ; Nuller ut a0 + move.l (Infomsgnr,a2),d0 ; har vi en fileinfo? + beq.b 13$ ; nei vi hopper + lea (itext),a0 +11$ move.l a0,d3 + lea (ansiyellowtext),a0 ; skifter til gul + move.l a3,a1 + bsr strcopy + lea (-1,a1),a3 ; oppdaterer string pointer + move.l d3,a0 +13$ move.l a3,a1 ; hadde ikke fileinfo + moveq.l #2,d0 + bsr strcopylfill + lea (-1,a1),a3 + + move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_Preview,d0 + beq.b 555$ + lea (previewtext),a0 + moveq.l #6,d0 + move.l a3,a1 + bsr strcopylfill + +555$ lea (ansilbluetext),a0 + move.w (Filestatus,a2),d0 ; for bruk i browse... + btst #FILESTATUSB_Selected,d0 + beq.b 14$ + lea (ansiredtext),a0 +14$ bsr strcopy + lea (-1,a1),a3 + lea (Filename,a2),a0 + moveq.l #Sizeof_FileName+1,d0 + move.l a3,a1 + bsr strcopylfill + lea (ansiwhitetext),a0 + bsr strcopy + lea (-1,a1),a3 + lea (ULdate,a2),a0 + bsr datestampetodate + move.l d1,d3 + tst.l d0 + beq.b 7$ + divu.w #100,d0 ; Er bare interesert i tiåret. + move.w #0,d0 + swap d0 +7$ move.l a3,a0 + bsr nr2tostr + move.l d3,d0 + bsr nr2tostr + move.l d2,d0 + bsr nr2tostr + move.b #' ',(a0)+ + move.l a0,a3 ; oppdaterer strptr + + move.l (Fsize,a2),d2 + move.l d2,d0 + beq.b 6$ + moveq.l #10,d1 + lsr.l d1,d0 +6$ bsr connrtotext + moveq.l #4,d0 + move.l a3,a1 + bsr strcopyrfill + move.b #' ',(a1)+ + move.l a1,a3 + +; dl tid. + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 2$ ; Yepp. no time. + move.l #0,d0 + moveq.l #0,d1 + move.w (cpsrate,NodeBase),d1 + beq.b 21$ + move.l d2,d0 + beq.b 21$ + divu.w d1,d0 + andi.l #$ffff,d0 + divu.w #60,d0 + andi.l #$ffff,d0 +21$ bsr connrtotext + moveq.l #3,d0 + move.l a3,a1 + bsr strcopyrfill + bra.b 3$ + ENDC +2$ lea (minustext),a0 + moveq.l #3,d0 + bsr strcopylen +3$ move.b #'m',(a1)+ + move.l a1,a3 + + move.l (AntallDLs,a2),d2 + cmpi.l #999,d2 + bhi.b 4$ + move.b #' ',(a3)+ +4$ move.l d2,d0 + bsr connrtotext + moveq.l #3,d0 + move.l a3,a1 + bsr strcopyrfill + move.b #' ',(a1)+ + + lea (Filedescription,a2),a0 + bsr strlen + cmpi.w #Sizeof_FileDescription,d0 + bls.b 1$ + moveq.l #Sizeof_FileDescription,d0 +1$ lea (Filedescription,a2),a0 + bsr strcopylen + move.b #0,(a1) + pop a2/d2/d3/a3 + rts + +; a0 = fileinfo +; a1 = string +dofileinfoline2 + push a2/a3 + move.l a0,a2 + tst.b (tmpsysopstat,NodeBase) + bne.b 12$ + move.w (confnr,NodeBase),d0 ; har vi en conf ? + cmpi.w #-1,d0 + beq 9$ ; nei. + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Sysop,d0 + beq 9$ ; nei + +12$ lea (fromktext),a0 + bsr strcopy + lea (-1,a1),a3 ; oppdaterer string pointer + move.l (Uploader,a2),d0 + bsr getusername + move.l a3,a1 + bsr strcopy + subq.l #1,a1 + move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_PrivateUL+FILESTATUSF_PrivateConfUL,d0 + beq.b 10$ + lea (tonoansitext),a0 + bsr strcopy + subq.l #1,a1 + move.w (Filestatus,a2),d1 ; til en person ? + andi.w #FILESTATUSF_PrivateUL,d1 + beq.b 5$ ; nei. + lea (userspacetext),a0 + bsr strcopy + lea (-1,a1),a3 ; oppdaterer string pointer + move.l (PrivateULto,a2),d0 + bsr getusername + move.l a3,a1 + bsr strcopy + subq.l #1,a1 + bra.b 10$ +5$ lea (confspacetext),a0 + bsr strcopy + subq.l #1,a1 + move.l (PrivateULto,a2),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + subq.l #1,a1 +10$ move.w (Filestatus,a2),d0 + andi.w #FILESTATUSF_FreeDL,d0 ; Free DL ? + beq.b 9$ + lea freedltext,a0 + bsr strcopy + subq.l #1,a1 +9$ move.b #0,(a1) + pop a2/a3 + rts + +; a0 = message header +; d0 = msgbuffer size +; a1 = msgbuffer +; d1 = realmsgbuffer start +calleditor + push a2/a3/d2 + move.l a0,a2 + move.l a1,a3 + move.l d0,d2 + move.l d1,a1 + move.l (MsgTo,a0),d0 + moveq.l #-1,d1 + cmp.l d1,d0 + bne.b 1$ + lea (alltext),a0 + bra.b 2$ +1$ setn + bsr gettoname1 + move.w (NrLines,a2),d0 + bpl.b 2$ ; ikke negativ + neg.w d0 + move.w d0,(NrLines,a2) ; Later som om det ikke er net melding videre +2$ lea (maintmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + bsr strcopymaxlen + move.l a2,a0 + cmpi.b #2,(FSEditor,NodeBase) ; skal vi includere ? + beq.b 5$ ; Ja + move.w #0,(NrLines,a0) + bra.b 6$ +5$ move.l a3,a1 + moveq.l #0,d0 + move.w (NrBytes,a0),d0 + adda.l d0,a1 + move.b #0,(a1) ; kan være farlig (vi kan være + move.b #0,(1,a1) ; på enden allerede (FIX ME) +6$ move.w (confnr,NodeBase),d1 + lea (n_FirstConference+CStr,MainBase),a1 ; tvinger privat hvis post conf.. + mulu #ConferenceRecord_SIZEOF/2,d1 + move.w (n_ConfSW,a1,d1.l),d1 + btst #CONFSWB_PostBox,d1 + beq.b 4$ + move.b #SECF_SecReceiver,(Security,a0) +4$ move.l a2,a0 + move.l a3,a1 + move.l d2,d0 + move.w (Userbits+CU,NodeBase),d1 + btst #USERB_FSE,d1 + bne.b 3$ + bsr editor + bra.b 9$ +3$ move.w #78,d1 ; WindowWith + bsr fseeditor +9$ pop a2/a3/d2 + rts + +; a0 = script +; a1 = param +executedosscriptparam + push d2/d3 + move.l a0,d2 + move.l a1,d3 + move.l (tmpmsgmem,NodeBase),a1 ; kan bli for lang for tmptext.. + lea (executestring),a0 ; Bygger opp exec string + bsr strcopy + subq.l #1,a1 + move.l d2,a0 + bsr strcopy + move.b #' ',(-1,a1) + move.l d3,a0 + bsr strcopy + tst.b (Tinymode,NodeBase) + bne.b 2$ + lea (nyconfgrabtext),a0 + moveq.l #3,d0 + bsr writecontextlen + move.l (tmpmsgmem,NodeBase),a0 + bsr writecontext + bsr newconline +2$ + move.l (tmpmsgmem,NodeBase),a0 ; kjører scriptet + move.l a0,d1 + moveq.l #0,d2 + moveq.l #0,d3 + move.l (dosbase),a6 + jsrlib Execute + move.l (exebase),a6 + pop d2/d3 + rts + +executedosscript + push d2/d3 + move.l (dosbase),a6 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d2 + beq.b 9$ + move.l #nulltext,d1 + moveq.l #0,d3 + jsrlib Execute +8$ move.l d2,d1 + jsrlib Close +9$ move.l (exebase),a6 + pop d2/d3 + rts + +;fyller i +; a0 = buffer +; d0.w = bullet nr, d1.w = conf nr. * 1 (OBS) +getkonfbulletnamenopath + exg d0,d1 + movem.l d0/d1,-(sp) + move.l a0,a1 + bra.b getkonfbulletname1 + +;fyller i +; a0 = buffer +; d0.w = bullet nr, d1.w = conf nr. * 1 (OBS) +getkonfbulletname + exg d0,d1 + movem.l d0/d1,-(sp) + move.l a0,a1 + lea (bulletinpath),a0 + bsr strcopy + subq.l #1,a1 +getkonfbulletname1 + move.l (sp)+,d0 ; henter ut konf navn. + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. +1$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 2$ + move.b d0,(a1)+ + cmpi.b #'/',d0 + bne.b 1$ + move.b #' ',(-1,a1) + bra.b 1$ +2$ move.l (sp)+,d0 ; henter ut bullet nr. + move.l a1,a0 + andi.l #$ffff,d0 + bra konverter + +;fyller i bl i buffer +; a0 = buffer +; d0 = conf nr. * 1 (OBS) +getkonfbulletlist + move.l a0,a1 + move.w d0,-(sp) + lea (bulletinpath),a0 + bsr strcopy + subq.l #1,a1 + move.w (sp)+,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. +1$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 2$ + move.b d0,(a1)+ + cmpi.b #'/',d0 + bne.b 1$ + move.b #' ',(-1,a1) + bra.b 1$ +2$ lea (bulletlisttext),a0 + bra strcopy + +***************************************************************** +* JEO3 Log file rutiner * +***************************************************************** + +writelogtexttimedd + move.l a1,-(sp) + lea (tmpmsgheader,NodeBase),a1 + bsr strcopy ; fra a0 til a1 Navnet + move.b #' ',(-1,a1) + move.l (sp)+,a0 + bsr strcopy + move.b #' ',(-1,a1) +; move.l a2,a0 ; Skriver ikke ut passord i loggen +; bsr strcopy + lea (tmpmsgheader,NodeBase),a0 + bra writelogtexttime + +writelogtexttimed + move.l a1,-(sp) + lea (tmpmsgheader,NodeBase),a1 + bsr strcopy + move.b #' ',(-1,a1) + move.l (sp)+,a0 + bsr strcopy + lea (tmpmsgheader,NodeBase),a0 + bra.b writelogtexttime + +writelogstartup + movem.l d2/d3/a2,-(sp) + move.l a0,a2 + lea (tmptext,NodeBase),a0 + move.l a0,d1 + + move.l a6,-(a7) + move.l (dosbase),a6 + jsrlib DateStamp + move.l (a7)+,a6 + lea (tmptext,NodeBase),a0 + bsr datestampetodate + move.l d1,d3 + lea (tmpmsgheader,NodeBase),a0 + exg d2,d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #'/',(a0)+ + move.l d3,d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #'-',(a0)+ + move.l d2,d0 + andi.l #$ffff,d0 + divu.w #100,d0 + swap d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #' ',(a0)+ + move.l a2,a1 + exg a0,a1 + bsr strcopy + lea (tmpmsgheader,NodeBase),a0 + movem.l (sp)+,d2/d3/a2 + +writelogtexttime + push a2/d2 + link.w a3,#-80 + move.l a0,a2 + move.l sp,a0 + move.l a0,d1 + move.l a6,d2 + move.l (dosbase),a6 + jsrlib DateStamp + move.l d2,a6 + move.l (ds_Minute,sp),d0 + divu.w #60,d0 + move.l d0,d2 + move.l sp,a0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #':',(a0)+ + move.l d2,d0 + move.w #0,d0 + swap d0 + bsr nr2tostr + move.b #' ',(a0)+ + move.l a0,a1 + move.l a2,a0 + bsr strcopy + move.l sp,a0 + lea (logfilename,NodeBase),a1 + bsr.b writelogtextline + unlk a3 + pop a2/d2 + rts + + +; a0 - linje å skrive, +; a1 - filnavn +writelogtextline + push d2-d4/a2/a6 + move.l a0,a2 + move.l (dosbase),a6 + move.l a1,a0 + bsr openreadseekend + beq.b 9$ + move.l d0,d4 + move.l a2,a0 + bsr strlen + move.l d0,d1 + neg.l d0 + move.l a2,a1 + moveq.l #70,d3 + cmp.l d1,d3 ; for lang ? + bhi.b 1$ ; nei + move.l d3,d1 ; ja, kutter + adda.l d1,a1 + bra.b 2$ +1$ adda.l d1,a1 + add.l d3,d0 + subq.l #1,d0 + lea (spacetext),a0 + bsr strcopylen +2$ move.b #10,(a1) + move.b #0,(1,a1) + move.l a2,d2 + move.l d4,d1 + jsrlib Write +; cmp.l d0,d3 +; bne.b 7$ +8$ move.l d4,d1 + jsrlib Close +9$ pop d2-d4/a6/a2 + rts + +; a0 - text 1 +; a1 - text 2 +writetosysoptextd + move.l a1,-(sp) + lea (tmpmsgheader,NodeBase),a1 + bsr strcopy + move.b #' ',(-1,a1) + move.l (sp)+,a0 + bsr strcopy + lea (tmpmsgheader,NodeBase),a0 + lea (tosysopfname),a1 + bra.b writelogtextline + +openreadseekend + push d2/d3/d4/a2 + move.l a0,a2 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 ; finnes filen ? + jsrlib Open + move.l d0,d4 + bne.b 1$ ; alt ok, går videre + move.l a2,d1 ; da prøver vi en newfile + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 9$ +1$ moveq.l #0,d2 + moveq.l #OFFSET_END,d3 + move.l d4,d1 + jsrlib Seek + exg d0,d4 + moveq.l #-1,d1 + cmp.l d4,d1 + bne.b 9$ + move.l d0,d1 + jsrlib Close + setz +9$ pop d2/d3/d4/a2 + rts + +***************************************************************** +* string.h++ * +***************************************************************** + + XDEF _msprintf +_msprintf: ; ( ostring, format, {values} ) +sprintf: + push a2/a3/a6/a4 + move.l (5*4,sp),a3 ;Get the output string pointer + move.l (6*4,sp),a0 ;Get the FormatString pointer + lea.l (7*4,sp),a1 ;Get the pointer to the DataStream + lea.l (stuffChar,pc),a2 + move.l exebase,a6 + jsrlib RawDoFmt + pop a2/a3/a6/a4 ; May trash a4 if IPrefs is not run + rts + +;------ PutChProc function used by RawDoFmt ----------- +stuffChar: + move.b d0,(a3)+ ;Put data to output string + rts + +****************************** +;memclr (from,length) +; a0.l d0.w +****************************** +memclr moveq #0,d1 + subq.w #1,d0 + bcs.b 9$ +1$ move.b d1,(a0)+ + dbf d0,1$ +9$ rts + +****************************** +;ptr = strrchr (string,char) +;d0 a0 d0 +****************************** +strrchr sub.l a1,a1 +1$ move.b (a0)+,d1 + beq.b 9$ + cmp.b d0,d1 + bne.b 1$ + lea -1(a0),a1 + bra.b 1$ +9$ move.l a1,d0 + rts + +****************************** +;ptr = strchr (string,char) +;d0 a0 d0 +****************************** +strchr sub.l a1,a1 +1$ move.b (a0)+,d1 + beq.b 9$ + cmp.b d0,d1 + bne.b 1$ + lea -1(a0),a1 +9$ move.l a1,d0 + rts + +****************************** +;len = strlen (string) +;d0 a0 +;Må ikke røre a1... +****************************** +strlen move.l a0,d0 +1$ tst.b (a0)+ + bne.b 1$ + subq.l #1,a0 + suba.l d0,a0 + move.l a0,d0 + rts + +****************************** +;result = findtextinstring (streng,text) +;returns with next char after streng in a0, if found +;Z = 1 if found a0.l a1.l +****************************** +findtextinstring + move.l a2,-(a7) + move.l a1,a2 ; husker søkeord +1$ move.l a2,a1 +2$ move.b (a1)+,d0 ; slutt på søker ordet ? + beq.b 9$ ; vi fant! + bsr upchar + move.b (a0)+,d1 + beq.b 8$ ; slutt på stringen. not found + exg d0,d1 + bsr upchar + cmp.b d1,d0 + bne.b 1$ + bra.b 2$ +8$ notz +9$ move.l (a7)+,a2 + rts + +****************************** +;result = comparestringsfull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +****************************** +comparestringsfull + subq.w #1,d0 +1$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + dbne d0,1$ + rts + +****************************** +;result = comparestringsifull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +****************************** +comparestringsifull + push d2 + move.w d0,d2 + subq.w #1,d2 +1$ move.b (a0)+,d0 + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + bsr upchar + cmp.b d0,d1 + dbne d2,1$ + pop d2 + rts + +****************************** +;result = comparestrings (streng,streng1) +;Zero bit a0.l a1.l +****************************** +comparestrings +1$ move.b (a0)+,d0 + beq.b 2$ + move.b (a1)+,d1 + beq.b 3$ + cmp.b d0,d1 + bne.b 9$ + bra.b 1$ +2$ tst.b (a1) + rts +3$ clrz +9$ rts + +****************************** +;result = comparestringsicase (streng,streng1) +;Zero bit a0.l a1.l +****************************** +comparestringsicase +1$ move.b (a0)+,d0 + beq.b 2$ + bsr upchar + move.b d0,d1 + move.b (a1)+,d0 + beq.b 3$ + bsr upchar + cmp.b d0,d1 + bne.b 9$ + bra.b 1$ +2$ tst.b (a1) + rts +3$ clrz +9$ rts + +****************************** +;strcopylen (fromstreng,tostreng1,length) +;memcopylen (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +****************************** +strcopylen +memcopylen + subq.l #1,d0 + bcs.b 9$ +1$ move.b (a0)+,(a1)+ + dbf d0,1$ +9$ rts + +****************************** +;strcopyrlen (fromstreng,tostreng1,length) +;memcopyrlen (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +****************************** +strcopyrlen +memcopyrlen + move.b (a0),(a1) + subq.w #1,d0 + bcs.b 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + + +****************************** +;strcopymaxlen (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +;Fyller ut med 0'er på slutten. +****************************** +strcopymaxlen + subq.w #1,d0 +2$ move.b (a0)+,(a1)+ + beq.b 3$ + dbf d0,2$ + move.b #0,(a1) + bra.b 9$ +1$ move.b #0,(a1)+ +3$ dbf d0,1$ +9$ rts + +****************************** +;strcopylfill (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +;Fyller ut med space'r på slutten. +****************************** +strcopylfill +2$ move.b (a0)+,(a1)+ + beq.b 3$ + dbf d0,2$ + bra.b 9$ +3$ subq.l #1,a1 + subq.l #1,d0 + bcs.b 9$ +1$ move.b #' ',(a1)+ + dbf d0,1$ +9$ rts + +****************************** +;strcopyrfill (fromstreng,tostreng1,length) +; a0.l a1.l d0.w +;Fyller ut med space'r på starten. +****************************** +strcopyrfill + push d2/a2 + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + exg d0,d2 + tst.l d0 + bmi.b 1$ + beq.b 1$ + lea (spacetext),a0 ; .. og jevner ut med space + bsr strcopylen +1$ move.l a2,a0 + move.l d2,d0 + bsr strcopylen + pop d2/a2 + rts + +****************************** +;strrcopy (fromstreng,tostreng1) +; a0.l a1.l +;copys until end of fromstring in reverse order +****************************** +strrcopy + move.l a2,-(a7) + move.l a0,a2 + bsr strlen ; rører ikke a1 ... + adda.l d0,a1 + adda.l d0,a2 + move.b #0,(a1) ; Markerer slutten.. + subq.l #1,d0 + bcs.b 9$ +1$ move.b -(a2),-(a1) + dbf d0,1$ +9$ move.l (a7)+,a2 + rts + +****************************** +;strrcopylen (fromstreng,tostreng1,length) +; a0.l a1.l d0 +;copys until end of fromstring in reverse order +****************************** +strrcopylen + adda.l d0,a1 + adda.l d0,a0 + move.b #0,(a1) ; Markerer slutten.. + subq.l #1,d0 + bcs.b 9$ +1$ move.b -(a0),-(a1) + dbf d0,1$ +9$ rts + +****************************** +;char = upchar (char) +;d0.b d0.b +****************************** + +upchar cmpi.b #'a',d0 + bcs.b 1$ + cmpi.b #'z',d0 + bhi.b 2$ + subi.b #'a'-'A',d0 +1$ rts +2$ cmpi.b #224,d0 ; Starten på utenlandske tegn (små) + bcs.b 3$ + subi.b #32,d0 ; Forskjellen på Store og små ISO tegn. +3$ rts + +****************************** +;string = upstring (string) +;a0 a0 +;does a upchar on every char in string +****************************** + +upstring + push a0/d0 + move.l a0,a1 +3$ move.b (a0)+,d0 + beq.b 1$ + bsr.b upchar + move.b d0,(a1)+ + bra.b 3$ +1$ pop a0/d0 + rts + +****************************** +;string = upword (string) +;a0 a0 +;does a upchar on every char in the first +;word of string (space or null separates words) +****************************** +upword movem.l a0/d0,-(sp) + move.l a0,a1 +3$ move.b (a0)+,d0 + beq.b 1$ + cmpi.b #' ',d0 + beq.b 1$ + bsr.b upchar +2$ move.b d0,(a1)+ + bra.b 3$ +1$ movem.l (sp)+,a0/d0 + rts + +;***************************************************************************** +; +;***************************************************************************** + + IFND DEMO +;d0 = conf nr. +;d1 = filhandler +;a0 = msgheader +;returner neg hvis error. +doscratchmsg + push a2/a3/d2/d3/d4 + move.l d1,d2 + move.l a0,a2 + move.w d0,d4 ; confnr + move.l (tmpmsgmem,NodeBase),a3 ; text Buffer + move.l a3,a0 + move.l a2,a1 + jsr (loadmsgtext) + setn + bne 99$ + move.l a2,a0 + move.w d4,d0 + bsr kanskrive ; Kan vi skrive ut denne ??? + bne 9$ ; Nei. + lea (dubblecrtext),a0 + move.l d2,d0 + bsr writefileln + beq 98$ + move.l d2,d0 + move.l a2,a0 + move.w d4,d1 + move.l a3,a1 ; gir msgtext også for netnavn + bsr filemsgheader + beq 98$ + move.w (NrBytes,a2),d0 + move.b #0,(0,a3,d0.w) ; Legger på en null på slutten. + move.w (NrLines,a2),d3 + beq.b 9$ + bpl.b 1$ ; normal melding uten nett navn + neg.w d3 ; gjør om til posetiv + move.l a3,a0 + bsr skipnetnames ; increases a0, and decreases d0 to skip netuser names + move.l a0,a3 +1$ move.l a3,a0 +2$ move.b (a3)+,d0 + beq.b 3$ + cmpi.b #10,d0 + bne.b 2$ + move.b #0,(-1,a3) +3$ move.l d2,d0 + bsr doscratchline + beq.b 98$ ; Error + subq.w #1,d3 + bne.b 1$ +; lea (newlinetext+1),a0 ; legger på to NL etter meldingen + lea (nulltext),a0 ; legger på en NL etter meldingen + move.l d2,d0 + bsr doscratchline + beq.b 98$ ; Error + moveq.l #1,d0 + add.l d0,(MsgaGrab+CU,NodeBase) ; opdaterer antall meldinger som er grab'a + add.w d0,(tmsgsdumped,NodeBase) + move.l (MsgTo,a2),d0 ; er den til oss ? + cmp.l (Usernr+CU,NodeBase),d0 + bne.b 9$ ; nei. + move.b (MsgStatus,a2),d0 ; Har vi lest den ? + btst #MSTATB_MsgRead,d0 + bne.b 9$ + bset #MSTATB_MsgRead,d0 ; Setter read flag'et + move.b d0,(MsgStatus,a2) + move.l a2,a0 + move.w d4,d0 + jsr (savemsgheader) ; lagrer oppdatert header +9$ clrn +99$ pop a2/a3/d2/d3/d4 + rts +98$ setn + bra.b 99$ + +; a1 = msgtext (for netnavn) +; d0 = filehandle +; a0 = msgheader +; d1 = conf nr. +filemsgheader + push a2/d2/d3/d4 + link.w a3,#-1024 + move.l a0,a2 + move.l d0,d2 + move.l a1,d4 ; husker msgtext + + move.w d1,d0 + move.l sp,a0 + move.l #400,d1 ; maks lengde på navn + bsr do1headerline + beq 99$ + move.l sp,a0 + move.l d2,d0 + bsr doscratchline + beq 99$ + + move.l sp,a0 + bsr do2headerline + move.l sp,a0 + bne.b 1$ + move.l d2,d0 + bsr doscratchline + bra.b 99$ +1$ move.l d2,d0 + bsr doscratchline + beq.b 99$ + + move.l sp,a0 + bsr do3headerline + beq.b 2$ + move.l sp,a0 + move.l d2,d0 + bsr doscratchline + beq.b 99$ + +2$ move.l sp,a0 + bsr do4headerline + beq.b 3$ + move.l sp,a0 + move.l d2,d0 + bsr doscratchline + beq.b 99$ + +3$ move.l sp,a0 + move.b #10,(a0)+ ; NL mellom header og subj. + move.l d4,a1 + bsr do5headerline + move.l d0,d3 + move.l sp,a0 + move.l d2,d0 + bsr doscratchline + beq.b 99$ + + move.l d3,d0 + move.l sp,a0 + bsr do6headerline + move.b #10,(-1,a0) ; NL mellom subj og text + move.b #0,(a0) + move.l sp,a0 + move.l d2,d0 + bsr doscratchline + beq.b 99$ + +9$ clrz +99$ unlk a3 + pop a2/d2/d3/d4 + rts + ENDC + +;a0 = instring +doscratchline + push a2/d2 + link.w a3,#-1024 + move.l d0,d2 + move.l a0,a2 ; Gjør om til brukers tegnsett + bsr disposeansistuff + move.l sp,a0 + moveq.l #0,d1 ; output length +1$ move.b (a2)+,d0 + beq.b 2$ + bsr translateseroutstring + cmp.w #1020,d1 ; sjekker maks lengde.. + bcs.b 1$ +2$ move.b #10,d0 + bsr translateseroutstring + clr.b (a0) ; terminerer. + move.l sp,a0 + move.l d2,d0 + bsr.b writefileln + unlk a3 + pop a2/d2 + rts + +writefileln + push d2/d3/a6 + move.l d0,d1 + move.l a0,d2 + bsr strlen + move.l d0,d3 + move.l (dosbase),a6 + jsrlib Write + cmp.l d3,d0 + notz + pop d2/d3/a6 + rts + +; d0 = confnr +; a0 = msg header struct +; a1 = msgtext (for netnames) +typemsgheader + push a2/a3/d2 + move.l a0,a2 + move.l a1,a3 + lea (tmptext,NodeBase),a0 ; Kan skrive over i maintmptext også. + moveq.l #Sizeof_NameT,d1 ; maks lengde på navn + bsr do1headerline ; får a1 som parameter + beq 9$ + lea (tmptext,NodeBase),a0 + bsr writetexto + beq 9$ + + lea (tmptext,NodeBase),a0 ; Kan skrive over i maintmptext også. + bsr do2headerline + lea (tmptext,NodeBase),a0 + bne.b 1$ + bsr writetexto + bra.b 9$ +1$ bsr writetexto + beq.b 9$ + + lea (tmptext,NodeBase),a0 + bsr do3headerline + beq.b 2$ + lea (tmptext,NodeBase),a0 + bsr writetexto + beq.b 9$ + +2$ lea (tmptext,NodeBase),a0 + bsr do4headerline + beq.b 3$ + lea (tmptext,NodeBase),a0 + bsr writetexto + beq.b 9$ + +3$ bsr outimage + beq.b 9$ + lea (tmptext,NodeBase),a0 + move.l a3,a1 + bsr do5headerline + move.l d0,d2 + lea (tmptext,NodeBase),a0 + bsr writetexto + beq.b 9$ + + move.l d2,d0 + lea (tmptext,NodeBase),a0 + bsr do6headerline + lea (tmptext,NodeBase),a0 + bsr writetexto + +9$ pop a2/a3/d2 + rts + +; a0 = string to put line in +; a1 = msgtext (for netnavn) +; d0 = confnr +; d1 = maks lengde på utnavn... +do1headerline + push a3/d2/d3 + move.l a0,a3 + move.l a1,d2 ; husker i d2 + move.l d1,d3 ; husker navn lengde + btst #MSTATB_Dontshow,(MsgStatus,a2) ; kan vi vise denne meldingen ? + bne 99$ ; nei. + move.l a0,a1 + lea (msgstarttext),a0 + bsr strcopy + subq.l #1,a1 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + subq.l #1,a1 + lea (msgtext),a0 + bsr strcopy + subq.l #1,a1 + move.l a1,a0 + move.l (Number,a2),d0 + bsr konverter + move.l a0,a1 + lea (fromtext),a0 + bsr strcopy + subq.l #1,a1 + move.w (NrLines,a2),d0 + bpl.b 6$ ; normal melding + move.l d2,a0 + move.b (a0)+,d0 + cmp.b #Net_FromCode,d0 ; from string her ? + bne.b 6$ ; nei... Tar vanelig navn + move.l d3,d1 ; navn lengde +7$ move.b (a0)+,d0 + move.b d0,(a1)+ + subq.l #1,d1 + bcs.b 71$ ; kutter, slik at den ikke skal bli for lang + cmp.b #10,d0 ; kommet til slutten ? + bne.b 7$ ; nei, fortsetter +71$ subq.l #1,a1 ; korigerer a1 + bra.b 1$ ; går videre +6$ move.l a1,-(a7) + move.l (MsgFrom,a2),d0 + bsr getusername + move.l (a7)+,a1 + move.w d0,-(sp) + bsr strcopy + subq.l #1,a1 + move.w (sp)+,d0 + btst #USERB_Killed,d0 + beq.b 1$ + lea (deadtext),a0 + bsr strcopy + subq.l #1,a1 +1$ lea (totext),a0 + bsr strcopy + subq.l #1,a1 + lea (ansiwhitetext),a0 + bsr strcopy + subq.l #1,a1 + move.l (MsgTo,a2),d0 + moveq.l #-1,d1 + cmp.l d1,d0 + bne.b 2$ + lea (alltext),a0 + bsr strcopy + subq.l #1,a1 + lea (ansilbluetext),a0 + bsr strcopy + subq.l #1,a1 + bra 9$ + +2$ move.w (NrLines,a2),d1 + bpl.b 10$ ; normal melding + move.l d2,a0 + move.b (a0)+,d1 + cmp.b #Net_ToCode,d1 ; to string ? + beq.b 12$ ; Ja, tar det + cmp.b #Net_FromCode,d1 ; from string her ? + bne.b 10$ ; nei... Tar vanelig navn + move.l d3,d1 ; navn lengde +11$ move.b (a0)+,d0 ; søker til neste linje + cmp.b #10,d0 + bne.b 11$ + move.b (a0)+,d0 + cmp.b #Net_ToCode,d0 ; to string nå da ? + bne.b 101$ ; nei... Tar vanlig navn +12$ move.b (a0)+,d0 + move.b d0,(a1)+ + subq.l #1,d1 + bcs.b 13$ ; kutter, slik at den ikke skal bli for lang + cmp.b #10,d0 ; kommet til slutten ? + bne.b 12$ ; nei, fortsetter +13$ subq.l #1,a1 ; korigerer a1 + bra.b 3$ ; går videre + +101$ move.l (MsgTo,a2),d0 +10$ move.l a1,-(a7) + bsr getusername + move.l (a7)+,a1 + move.w d0,-(sp) + bsr strcopy + subq.l #1,a1 + move.w (sp)+,d0 + btst #USERB_Killed,d0 + beq.b 3$ + lea (deadtext),a0 + bsr strcopy + subq.l #1,a1 +3$ lea (ansilbluetext),a0 + bsr strcopy + subq.l #1,a1 + move.b (Security,a2),d0 + btst #SECB_SecReceiver,d0 + beq.b 4$ + lea (privatemsgtext),a0 + bsr strcopy + subq.l #1,a1 +4$ move.b (MsgStatus,a2),d0 + btst #MSTATB_MsgRead,d0 + beq.b 9$ + lea (readmsgtext),a0 + bsr strcopy + subq.l #1,a1 +9$ lea (dottext),a0 + bsr strcopy + move.b #0,(a1) + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bne.b 5$ + move.l a3,a0 + bsr disposeansistuff +5$ setz +99$ notz + pop a3/d2/d3 + rts + +do2headerline + push a3 + move.l a0,a3 + move.l a0,a1 + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + beq.b 1$ + lea (msgkilledbytext),a0 + bsr strcopy + subq.l #1,a1 + move.b (MsgStatus,a2),d0 + btst #MSTATB_KilledByAuthor,d0 + beq.b 2$ + lea (usertext),a0 + bra.b 4$ +2$ btst #MSTATB_KilledBySigop,d0 + beq.b 3$ + lea (plainsigoptext),a0 + bra.b 4$ +3$ lea (plainsysoptext),a0 +4$ bsr strcopy + setz + bra.b 9$ +1$ lea (enteredontext),a0 + bsr strcopy + subq.l #1,a1 + lea (MsgTimeStamp,a2),a0 + bsr gettimestr + addq.l #5,a1 + move.b #',',(a1)+ + move.b #' ',(a1)+ + move.l a1,a0 + move.w (NrLines,a2),d0 ; retter opp negative linjer (for netbrukere) + bpl.b 6$ + neg.w d0 +6$ bsr konverterw + move.l a0,a1 + move.b #' ',(a1)+ + lea (linesdottext),a0 + bsr strcopy + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bne.b 5$ + move.l a3,a0 + bsr disposeansistuff +5$ clrz +9$ pop a3 + rts + +do3headerline + push a3 + move.l a0,a3 + move.l a0,a1 + lea (replytomsgntext),a0 + bsr strcopy + subq.l #1,a1 + move.l (RefTo,a2),d0 + beq.b 9$ + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.b #'.',(a1)+ + move.b #' ',(a1)+ + lea (nomorereplytext),a0 + move.l (RefNxt,a2),d0 + beq.b 1$ + lea (morereplyhbtext),a0 +1$ bsr strcopy + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bne.b 2$ + move.l a3,a0 + bsr disposeansistuff +2$ clrz +9$ pop a3 + rts + + +do4headerline + push a3 + move.l a0,a3 + move.l a0,a1 + move.l (RefBy,a2),d0 + beq.b 9$ + lea (therearereptext),a0 + bsr strcopy + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bne.b 1$ + move.l a3,a0 + bsr disposeansistuff +1$ clrz +9$ pop a3 + rts + +; a0 = string to put line in +; a1 = msgtext (for netnavn) +do5headerline + push d2/d3 + move.l a1,d2 + move.l a0,a1 + move.l a0,d3 + lea (ansiyellowtext),a0 + bsr strcopy + subq.l #1,a1 + lea (subjecttext),a0 + bsr strcopy + subq.l #1,a1 + lea (Subject,a2),a0 + move.w (NrLines,a2),d0 + bpl.b 2$ ; normal melding + move.b (a0),d0 + bne.b 2$ ; ikke nett subject + move.l d2,a0 + bsr getnetsubject + beq.b 3$ + move.w #69,d1 +6$ move.b (a0)+,d0 ; litt modifisert strcopymaxlen + beq.b 7$ + move.b d0,(a1)+ + cmp.b #10,d0 + beq.b 7$ + dbf d1,6$ +7$ move.b #0,(-1,a1) + bra.b 5$ + +3$ lea (Subject,a2),a0 +2$ move.w #Sizeof_NameT+1,d0 + bsr strcopymaxlen +5$ move.l d3,a0 + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + bne.b 1$ + bsr disposeansistuff +1$ move.l d3,a0 + pop d2/d3 + bra strlen + +do6headerline + move.w (Userbits+CU,NodeBase),d1 + andi.w #USERF_ColorMessages,d1 + beq.b 1$ ; ansi tegn fjerna + subq.l #5,d0 ; fjerner ANSI tegnene +1$ move.b #'=',(a0)+ + dbf d0,1$ + move.b #0,(-1,a0) + rts + +logoutsaveuser + bsr updatetime + moveq.l #0,d0 + move.w (TimeUsed+CU,NodeBase),d0 + sub.w (OldTimelimit,NodeBase),d0 ; trekker fra minutter i forige session + bcs.b 2$ ; underflow.. Egentlig umulig.. + add.l d0,(Totaltime+CU,NodeBase) +2$ + move.w (FTimeUsed+CU,NodeBase),d0 + sub.w (minul,NodeBase),d0 + bcc.b 1$ + moveq.l #0,d0 +1$ move.w d0,(FTimeUsed+CU,NodeBase) + + lea (u_startsave+CU,NodeBase),a0 + move.l #u_almostendsave-u_startsave,d0 + bsr.b saveuserarea + bsr savelastread + rts + +; a0 = området +; d0 = size +saveuserarea + moveq.l #0,d1 ; ikke noe område nr 2 + suba.l a1,a1 + +; a0 = oprådet 1 +; d0 = size for 1 +; a1 = oprådet 2 +; d1 = size for 2 +saveuserareas + push a2/d2/d4/d5/d6/a3 + move.l a0,a2 + move.l d0,d2 + move.l a1,d4 + move.l d1,d5 + move.l (UserrecordSize+CStr,MainBase),d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,a3 + tst.l d0 + beq.b 8$ ; error + + lea (CU,NodeBase),a0 ; finner offset + move.l a0,d6 + + move.l a3,a0 + move.l (Usernr+CU,NodeBase),d0 + jsr (loadusernr) + beq.b 8$ ; error + move.l a2,a0 ; source + move.l a2,a1 + suba.l d6,a1 ; beregner offset + adda.l a3,a1 ; finner dest + move.l d2,d0 + bsr memcopylen + + move.l d4,a0 ; source + move.l d4,a1 + suba.l d6,a1 ; beregner offset + adda.l a3,a1 ; finner dest + move.l d5,d0 + beq.b 1$ ; ikke noe område nr 2. + bsr memcopylen + +1$ move.l (Usernr+CU,NodeBase),d0 + move.l a3,a0 + jsr (saveusernr) + bne.b 9$ +8$ lea (saveusererrtext),a0 + bsr writetexto + setz +9$ move.l a3,d0 + beq.b 99$ ; ikke noe memory + move.l (UserrecordSize+CStr,MainBase),d0 + move.l a3,a1 + jsrlib FreeMem +99$ pop a2/d2/d4/d5/d6/a3 + rts + +savelastread + push a2 + move.l (Tmpusermem,NodeBase),a2 + move.l a2,a0 + move.l (Usernr+CU,NodeBase),d0 + jsr (loadusernr) + beq.b 8$ ; error + + moveq.l #0,d0 + move.w (Maxconferences+CStr,MainBase),d0 + lea (u_almostendsave+CU,NodeBase),a0 + lea (u_almostendsave,a2),a1 + moveq.l #Userconf_seizeof,d1 +1$ move.l (uc_LastRead,a0),(uc_LastRead,a1) + add.l d1,a0 + add.l d1,a1 + subq.l #1,d0 + bne.b 1$ + + move.l (Usernr+CU,NodeBase),d0 + move.l a2,a0 + jsr (saveusernr) + bne.b 9$ +8$ lea (saveusererrtext),a0 + bsr writetexto + setz +9$ pop a2 + rts + + IFND DEMO +; d0 = baud +; d1 = skal sende AT etter på (bool) +setserialspeed + push d2 + move.l d1,d2 + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_Lockedbaud,d1 + bne.b 9$ + move.l d0,-(sp) ; husker baud'en + bsr waitseroutput + move.l (sreadreq,NodeBase),a1 ; avbryter read req'en + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + move.w #SDCMD_SETPARAMS,(IO_COMMAND,a1) ; setter baud + spes parametre + move.l (sp)+,(IO_BAUD,a1) + move.w (Setup+Nodemem,NodeBase),d1 + move.b #0,(IO_SERFLAGS,a1) ; Null stiller. +; btst #SETUPB_XonXoff,d1 ; Vi tillater ikke XonXoff lenger +; bne.b 2$ + move.b #SERF_XDISABLED|SERF_RAD_BOOGIE,(IO_SERFLAGS,a1) +2$ btst #SETUPB_RTSCTS,d1 + beq.b 3$ + ori.b #SERF_7WIRE,(IO_SERFLAGS,a1) +3$ jsrlib DoIO + tst.l d2 ; skal vi sende AT ? + beq.b 9$ ; nei. + lea (ModemATString+Nodemem,NodeBase),a0 ; Sender at string. + bsr serwritestringdo + moveq.l #2,d0 + lea (transnltext),a0 + bsr serwritestringlendo +9$ pop d2 + rts + +stopserreadcheck + move.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b stopserread + move.l (sreadreq,NodeBase),a1 ; henter eventuell msg + move.l (MN_REPLYPORT,a1),a0 + jmplib GetMsg + +stopserread + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jmplib WaitIO + +initserread + btst #DoDivB_Sleep,(DoDiv,NodeBase) ; sleep igang ? + bne.b 9$ ; jepp.. nop + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + lea (ser_tegn,NodeBase),a0 + moveq.l #1,d0 + move.w #CMD_READ,(IO_COMMAND,a1) + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jmplib SendIO +9$ rts + +flushserialbuffer + bsr waitseroutput + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + move.w #CMD_CLEAR,(IO_COMMAND,a1) + jsrlib DoIO + bra.b initserread + ENDC + +initcsreadcheck + move.l (creadreq,NodeBase),d0 + beq.b 1$ ; no console + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + beq.b 1$ + move.l (creadreq,NodeBase),a1 + jsrlib WaitIO + bsr initconread +1$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) + beq.b 9$ + move.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 9$ + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + bsr initserread + ENDC +9$ rts + +stopconreadcheck + move.l (creadreq,NodeBase),d0 + beq.b 9$ ; no console + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + bne.b 1$ + move.l (creadreq,NodeBase),a1 + jsrlib AbortIO +1$ move.l (creadreq,NodeBase),a1 + jmplib WaitIO +9$ rts + +initconread + move.l (creadreq,NodeBase),d0 + beq.b 9$ ; no console + move.l d0,a1 + lea (con_tegn,NodeBase),a0 + moveq.l #1,d0 + move.w #CMD_READ,(IO_COMMAND,a1) + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jmplib SendIO +9$ rts + +waitsecs + move.l (timer1req,NodeBase),a1 + move.l d0,(TV_SECS+IOTV_TIME,a1) + moveq.l #0,d0 + move.l d0,(TV_MICRO+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jmplib DoIO + +waitmicros + move.l (timer1req,NodeBase),a1 + move.l d0,(TV_MICRO+IOTV_TIME,a1) + moveq.l #0,d0 + move.l d0,(TV_SECS+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jmplib DoIO + +; d0 = antall minutter +starttimeouttimer + mulu.w #60,d0 ; gjør om til sekunder + bne.b 1$ + moveq.l #10,d0 ; For sikkerhets skyld +1$ +; d0 = antall sekunder +starttimeouttimersec + move.l (timer2req,NodeBase),a1 + move.l d0,(TV_SECS+IOTV_TIME,a1) + moveq.l #0,d0 + move.l d0,(TV_MICRO+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jmplib SendIO + +stoptimeouttimer + move.l (timer2req,NodeBase),a1 ; er det en req i gang ? + jsrlib CheckIO + tst.l d0 + bne.b 1$ ; nei. Sletter bit'et (paranoid) + move.l (timer2req,NodeBase),a1 + jsrlib AbortIO + move.l (timer2req,NodeBase),a1 + jsrlib WaitIO + bra.b 2$ +1$ move.l (timer2req,NodeBase),a1 ; henter eventuell msg + move.l (MN_REPLYPORT,a1),a0 + jsrlib GetMsg +2$ move.l (timer2sigbit,NodeBase),d1 ; sletter dette bit'et + move.l d1,d0 + not.l d0 + and.l d0,(gotbits,NodeBase) ; virkerlig + moveq.l #0,d0 + jsrlib SetSignal +9$ rts + +testiso +1$ move.b (a0)+,d0 ; Tester om vi har ascii 128-160 + beq.b 9$ ; eller {|}[\], som er 7bits tegn + cmpi.b #'[',d0 + bcs.b 1$ + cmpi.b #']',d0 + bls.b 8$ ; a >= b + cmpi.b #'{',d0 + bcs.b 1$ + cmpi.b #'}',d0 + bls.b 8$ ; a >= b + cmpi.b #128,d0 + bcs.b 1$ + cmpi.b #160,d0 + bhi.b 1$ +8$ clrz +9$ rts + +;a0 = source file +;a1 = dest file +movedosfile + push a0/a1/d2/d3/d4/a6 + move.l a0,d3 + move.l a1,d4 + bsr comparestringsicase ; samme sted ? + beq.b 8$ ; ja, move "ferdig" + + move.l d3,d1 ; Prøver rename + move.l d4,d2 + move.l (dosbase),a6 + jsrlib Rename + tst.l d0 + bne.b 9$ ; rename gikk bra. Alt ok + + move.l d3,a0 ; prøver copy + move.l d4,a1 + bsr copyfile + beq.b 9$ + move.l d3,a0 + bsr deletefile +8$ clrz +9$ pop a0/a1/d2/d3/d4/a6 + rts + +; a0 - source +; a1 - destination +copyfile + push a2/a3/d2-d7 + link.w a3,#-160 + move.l a3,d6 + move.l a0,a2 + move.l a1,a3 + move.l a2,a0 + move.l a3,a1 + bsr comparestringsicase + notz + bne 99$ + + move.l sp,a1 ; prøver copy + lea copystring,a0 + bsr strcopy + subq.l #1,a1 + move.l a2,a0 + bsr strcopy + move.b #' ',(-1,a1) + move.l a3,a0 + bsr strcopy + + lea (nilstring),a0 + move.l a0,d1 + move.l #MODE_READWRITE,d2 + move.l (dosbase),a6 + jsrlib Open + move.l (exebase),a6 + move.l d0,d7 + beq.b 3$ ; klarte ikke åpne nil fil + + tst.b (Tinymode,NodeBase) ; tiny mode ? + bne.b 1$ ; ja, ingen console output + move.l (exebase),a6 + lea (nyconfgrabtext),a0 ; skriver copy string til con + moveq.l #3,d0 + jsr (writecontextlen) + move.l sp,a0 + jsr (writecontext) + jsr (newconline) +1$ move.l sp,a0 + move.l a0,d1 + moveq.l #0,d2 + move.l d7,d3 + move.l (dosbase),a6 + jsrlib Execute ; utfører selve copy'n + move.l d7,d1 + jsrlib Close ; lukker NIL fil igjen. + move.l (exebase),a6 + move.l a3,a0 + bsr getfilelen ; kom det en fil dit ? + bne 99$ ; jepp. + +; move.l a0,d1 +; move.l (systemtagsnow),a0 +; move.l d7,(4,a0) +; move.l a0,d2 +; move.l (dosbase),a6 +; jsrlib SystemTagList +; move.l d7,d1 +; jsrlib Close ; lukker NIL fil igjen. +; move.l (exebase),a6 +; move.l a3,a0 +; bsr getfilelen ; kom det en fil dit ? +; bne.b 99$ ; jepp. + +3$ moveq.l #0,d7 ; ikke ok (enda) + move.l (dosbase),a6 + move.l a2,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d5 + beq.b 9$ + + move.l a3,d1 + move.l #MODE_NEWFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 8$ + + move.l (tmpmsgmem,NodeBase),a0 + move.l a0,d2 +2$ move.l d5,d1 + move.l (msgmemsize,NodeBase),d3 + jsrlib Read + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 7$ ; File error + tst.l d0 + beq.b 6$ ; EOF, ferdig. + move.l d4,d1 + move.l d0,d3 + jsrlib Write + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 7$ ; File error + cmp.l d3,d0 ; Sjekker mot buffer + beq.b 2$ + bra.b 7$ ; write error +6$ moveq.l #1,d7 ; Gikk ok +7$ move.l d4,d1 + jsrlib Close +8$ move.l d5,d1 + jsrlib Close + move.l a2,a0 + bsr getfilelen + move.l a3,d1 + move.l (infoblock,NodeBase),a0 + lea (fib_Comment,a0),a0 + move.b (a0),d2 ; er det noe der ? + beq.b 9$ ; nei, dropper setcomment + move.l a0,d2 + move.l (dosbase),a6 + jsrlib SetComment ; prøver å sette description som file comment. +9$ tst.l d7 +99$ move.l d6,a3 + unlk a3 + pop a2/a3/d2-d7 + move.l (exebase),a6 + rts +98$ setz + bra.b 99$ + +systemtagsnow + dc.l SYS_Output,0 + dc.l TAG_DONE,0 + +registeruser + lea (Name+CU,NodeBase),a0 + lea banfilename,a1 + jsr (checkbanfile) + bne.b 5$ + lea (namebannedtext),a0 + bsr writeerroro + move.b #Thrownout,(readcharstatus,NodeBase) + setz + bra 9$ +5$ bsr stoptimeouttimer ; stanser timeout'en + move.w (SleepTime+CStr,MainBase),d0 ; får sleeptime * 3 minutter til jobben + add.w d0,d0 + add.w (SleepTime+CStr,MainBase),d0 + bsr starttimeouttimer + move.w #24,(PageLength+CU,NodeBase) + move.w #24,(linesleft,NodeBase) + lea (register1finame),a0 + moveq.l #0,d0 + bsr typefile + tst.b (readcharstatus,NodeBase) + notz + beq 9$ +4$ lea (pass_10+CU,NodeBase),a0 ; Skal slette alt untatt navnet. + move.l (UserrecordSize+CStr,MainBase),d0 + sub.l #Sizeof_NameT,d0 + lea (0,a0,d0.l),a1 + moveq.l #0,d0 +1$ move.w d0,(a0)+ + cmpa.l a0,a1 + bhi.b 1$ + moveq.l #-1,d0 + move.l d0,(Usernr+CU,NodeBase) ; Forhinrer reloaduser av supersysop + move.w d0,(linesleft,NodeBase) ; Vi vil ikke ha noen more her.. + move.w #24,(PageLength+CU,NodeBase) + + lea (Name+CU,NodeBase),a0 ; oppdaterer Who's on + bsr changenodestatusname + moveq.l #64,d0 ; Status = Newuser regestration. + jsr (changenodestatus) + + moveq.l #Sizeof_PassT,d0 + lea (logonpasswdtext),a0 + lea (Password+CU,NodeBase),a1 + moveq.l #0,d1 + bsr getregisterinput + beq 9$ + lea (Password+CU,NodeBase),a0 + lea (CU,NodeBase),a1 + bsr insertpasswd + + moveq.l #29,d0 + lea (addresstext),a0 + lea (Address+CU,NodeBase),a1 + moveq.l #0,d1 + bsr getregisterinput + beq 9$ + + moveq.l #29,d0 + lea (postalcodetext),a0 + lea (CityState+CU,NodeBase),a1 + moveq.l #0,d1 + bsr getregisterinput + beq 9$ + + moveq.l #15,d0 + lea (hometlfnumbtext),a0 + lea (HomeTelno+CU,NodeBase),a1 + moveq.l #0,d1 + bsr getregisterinput + beq 9$ + + moveq.l #15,d0 + lea (worktlfnumbtext),a0 + lea (WorkTelno+CU,NodeBase),a1 + moveq.l #0,d1 + bsr getregisterinput + beq 9$ + + lea (satisfiedtext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + bne.b 3$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra 4$ + +3$ move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; Ny side.. + lea (register2finame),a0 + moveq.l #0,d0 + bsr typefile + moveq.l #0,d0 + lea (CU,NodeBase),a0 + bsr newgetpasswd + bne 2$ + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + bra 4$ +2$ bsr outimage + beq 9$ + + move.w (NewUserTimeLimit+CStr,MainBase),(TimeLimit+CU,NodeBase) + move.w (NewUserFileLimit+CStr,MainBase),(FileLimit+CU,NodeBase) + move.b (DefaultCharSet+CStr,MainBase),(Charset+CU,NodeBase) + move.w #28,(PageLength+CU,NodeBase) + move.w #SAVEBITSF_ReadRef,(Savebits+CU,NodeBase) + move.b #1,(ScratchFormat+CU,NodeBase) ; setter ARC som default pakker + + bset #DIVB_InNewuser,(Divmodes,NodeBase) + lea (newuserscrname),a0 + sub.l a1,a1 ; ingen feilmelding + jsr (doarexxdoor) + bclr #DIVB_InNewuser,(Divmodes,NodeBase) + bsr (checkcarriercheckser) + beq 9$ ; carrier borte + tst.b (readcharstatus,NodeBase) + notz + beq 9$ + + bsr registerconferencesnewuser + + move.l (msg,NodeBase),a1 + move.w #Main_createuser,(m_Command,a1) + lea (CU,NodeBase),a0 + move.l a0,(m_Data,a1) + lea (Name,a0),a0 + move.l a0,(m_Name,a1) + jsr (handlemsg) + move.l (msg,NodeBase),a1 + move.w (m_Error,a1),d0 + + cmpi.w #Error_OK,d0 + beq.b 8$ + jsr skrivnrw + jsr outimage + move.l (dosbase),a6 + move.l #10*50,d1 + jsrlib Delay + move.l (exebase),a6 + +; cmp.w #Error_Found,d0 +; beq.b 8$ +; #Error_Open_File + moveq #-1,d0 + rts +8$ lea (Name+CU,NodeBase),a1 ; skriver til log'en. + lea (logregusertext),a0 + bsr writelogtexttimed + lea (tosysopnewuser),a0 + lea (Name+CU,NodeBase),a1 ; skriver til ToSysop + bsr writetosysoptextd + clrzn +9$ rts + +registerconferencesnewuser + move.w #ACCF_Read,d0 ; setter news access etter + move.b (Cflags+CStr,MainBase),d1 ; hva som er instillt i + btst #CflagsB_Download,d1 ; config'en (om nye brukere + beq.b 1$ ; får DL/UL status med en gang) + ori.w #ACCF_Download,d0 +1$ btst #CflagsB_Upload,d1 + beq.b 2$ + ori.w #ACCF_Upload,d0 +2$ lea (u_almostendsave+CU,NodeBase),a0 + move.w d0,(uc_Access,a0) + lea (Userconf_seizeof,a0),a0 + move.w #ACCF_Read+ACCF_Write,(uc_Access,a0) ; Joiner Post. + lea (ConferenceRecord_SIZEOF+n_FirstConference+CStr,MainBase),a1 + move.l (n_ConfDefaultMsg,a1),(uc_LastRead,a0) ; Setter Last read i POST. + lea (yaaamotfcontext),a0 + bsr 11$ + push a2/a3/d2/d3 + lea (2*Userconf_seizeof+u_almostendsave+CU,NodeBase),a3 + lea (n_FirstConference+CStr,MainBase),a2 + lea (n_ConfName,a2),a0 ; skriver ut news + bsr 10$ + lea (ConferenceRecord_SIZEOF,a2),a2 + lea (n_ConfName,a2),a0 ; post + bsr 10$ + lea (ConferenceRecord_SIZEOF,a2),a2 + moveq.l #0,d2 + move.w (Maxconferences+CStr,MainBase),d2 + subq.l #2,d2 ; har tatt to allerede +3$ subq.l #1,d2 + bcs 9$ ; vi er ferdige + move.b (n_ConfName,a2),d0 ; er det en konferanse her ? + beq.b 4$ ; nei.. + move.w (n_ConfSW,a2),d3 ; henter conf access + btst #CONFSWB_VIP,d3 ; vip ? + bne.b 4$ ; ja + btst #CONFSWB_ImmRead,d3 ; er det autojoin ? + beq.b 4$ ; nei + + move.w #ACCF_Read,d0 ; melder bruker inn i conf'en + btst #CONFSWB_ImmWrite,d3 + beq.b 5$ + ori.w #ACCF_Write,d0 +5$ move.w d0,(uc_Access,a3) + lea (n_ConfName,a2),a0 + bsr 10$ + + btst #CONFSWB_PostBox,d3 ; Er dette en post conf ? + bne.b 6$ ; jepp + moveq.l #0,d0 + move.w (n_ConfMaxScan,a2),d0 ; henter maks scan verdien + move.l (n_ConfDefaultMsg,a2),d1 + cmp.l d1,d0 ; er det mere enn maks scan ? + bcc.b 4$ ; nei + sub.l d0,d1 + move.l d1,(uc_LastRead,a3) ; justerer + bra.b 4$ +6$ move.l (n_ConfDefaultMsg,a2),(uc_LastRead,a3) ; Setter Last read til max +4$ lea (ConferenceRecord_SIZEOF,a2),a2 + lea (Userconf_seizeof,a3),a3 + bra 3$ +9$ pop a2/a3/d2/d3 + rts + +10$ move.l a0,-(a7) + lea (spacetext),a0 + moveq.l #3,d0 + bsr writetextlen + move.l (a7)+,a0 +11$ bsr writetext + bra outimage + +getregisterinput + push d3/d2/a2/a3 + move.l d0,d2 + move.l d1,d3 + move.l a0,a2 + move.l a1,a3 +1$ bsr outimage + moveq.l #42,d0 + lea (spacetext),a0 + bsr writetextlen + move.l d2,d0 + addq.l #1,d0 + lea (bordertext),a0 + bsr writetextlen + move.b #'>',d0 + bsr writechar + bsr outimage + lea (pleaseentertext),a0 + bsr writetext + move.l a2,a0 + moveq.l #24,d0 + bsr writetextlfill + bsr breakoutimage + move.l d2,d0 + addq.l #1,d0 + tst.l d3 + beq.b 3$ + push d0 + move.l a3,a0 + lea (intextbuffer,NodeBase),a1 + bsr strcopy + pop d0 + bsr edline + bra.b 4$ +3$ bsr getline +4$ bne.b 2$ + tst.b (readcharstatus,NodeBase) + notz + beq.b 9$ + lea (youmustenttext),a0 + bsr writetexti + bra.b 1$ +2$ move.l a3,a1 + move.l d2,d0 + bsr strcopymaxlen + move.l a3,a0 + bsr testiso + beq.b 8$ + lea (musthaveisotext),a0 + bsr writeerroro + bra 1$ +8$ clrz +9$ pop d3/d2/a2/a3 + rts + +;a0 - passord +;d0 - antall forsøk - 1 +;a1 - passordtext +getpasswd + lea (pleaseepasstext),a1 + push a2/d2/a3/d3/d4 + move.l a1,d3 + move.b #0,(readlinemore,NodeBase) ; flusher input'en for sikkerhets skyld + move.l a0,a2 ; husker passordet + move.l d0,d2 + beq.b 1$ ; ved login prøver vi 3 ganger. Ellers + bset #31,d2 ; bare 0. Husker at dette er under login +1$ move.l d3,a0 ; Please text + bsr writetexti + move.b #1,(readingpassword,NodeBase) + move.w #Sizeof_PassT,d0 + bsr getline + bne.b 4$ + clr.b (readingpassword,NodeBase) + tst.b (readcharstatus,NodeBase) + bne 5$ +4$ clr.b (readingpassword,NodeBase) + move.l a2,a1 + move.l a0,a3 + moveq.l #7,d0 +3$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + dbne d0,3$ + beq.b 9$ + lea (wrongtext),a0 ; Wrong! + bsr writetexto + move.l a3,a1 + btst #31,d2 + beq.b 6$ + move.l a2,d4 + move.l a1,a2 + lea (failedpaswdtext),a1 ; Failed password + lea (Name+CU,NodeBase),a0 ; Brukerens navn + bsr writelogtexttimedd + move.l d4,a2 +6$ dbf d2,1$ +5$ clrn ; Galt passord + setz + bra.b 99$ +9$ clrzn ; Riktig passord +99$ pop a2/d2/a3/d3/d4 + rts + +;a0 - userrecord +;d0 - antall forsøk - 1 +;a1 - passordtext +newgetpasswd + lea (pleaseepasstext),a1 +newgetpasswdtext + push a2/d2/a3/d3/d4 + move.l a1,d3 + move.b #0,(readlinemore,NodeBase) ; flusher input'en for sikkerhets skyld + move.l a0,a2 ; husker userrecord + move.l d0,d2 + beq.b 1$ ; ved login prøver vi 3 ganger. Ellers + bset #31,d2 ; bare 0. Husker at dette er under login +1$ move.l d3,a0 + bsr writetexti + move.b #1,(readingpassword,NodeBase) + move.w #Sizeof_PassT,d0 + bsr getline + bne.b 4$ + clr.b (readingpassword,NodeBase) + tst.b (readcharstatus,NodeBase) + bne 5$ +4$ clr.b (readingpassword,NodeBase) + move.l a2,a1 + move.l a0,a3 ; husker input + bsr checkpasswd + beq.b 9$ + lea (wrongtext),a0 + bsr writetexto + move.l a3,a1 + btst #31,d2 + beq.b 6$ + move.l a2,d4 + move.l a1,a2 + lea (failedpaswdtext),a1 + lea (Name+CU,NodeBase),a0 + bsr writelogtexttimedd + move.l d4,a2 +6$ dbf d2,1$ +5$ clrn ; Galt passord + setz + bra.b 99$ +9$ clrzn ; Riktig passord +99$ pop a2/d2/a3/d3/d4 + rts + +;a0 = passord +;a1 = userrecord +insertpasswd + push a2 + link.w a3,#-20 + move.l a1,a2 + move.l sp,a1 + pea (Name,a2) ; navn + move.l a0,-(a7) ; passord + move.l a1,-(a7) ; buffer + IFND _ACrypt + XREF _ACrypt + ENDC + jsr _ACrypt + lea (12,sp),sp ; fjerner parametrene igjen + lea (Password,a2),a1 + move.l sp,a0 + moveq.l #Sizeof_PassT+1-1,d0 +1$ move.b (a0)+,(a1)+ + dbf d0,1$ + move.b (a0)+,(pass_10,a2) + move.b (a0)+,(pass_11,a2) + unlk a3 + pop a2 + rts + +;a0 = passord +;a1 = userrecord +checkpasswd + push a2 + link.w a3,#-20 + move.l a1,a2 + move.l sp,a1 + pea (Name,a2) ; navn + move.l a0,-(a7) ; passord + move.l a1,-(a7) ; buffer + IFND _ACrypt + XREF _ACrypt + ENDC + jsr _ACrypt + lea (12,sp),sp ; fjerner parametrene igjen + lea (Password,a2),a1 + move.l sp,a0 + moveq.l #Sizeof_PassT+1-1,d0 +1$ move.b (a0)+,d1 + cmp.b (a1)+,d1 + bne.b 9$ + dbf d0,1$ + move.b (pass_10,a2),d1 + cmp.b (a0)+,d1 + bne.b 9$ + move.b (pass_11,a2),d1 + cmp.b (a0)+,d1 +9$ unlk a3 + pop a2 + rts + +inputnr moveq.l #0,d0 + move.l d2,-(sp) + move.l d0,d1 + move.l d1,d2 +2$ move.b (a0)+,d1 + subi.b #'0',d1 + bcs.b 1$ + cmpi.b #10,d1 + bcc.b 1$ + mulu.w #10,d0 + add.l d1,d0 + addq.l #1,d2 + bra.b 2$ +1$ move.l d2,d1 + move.l (sp)+,d2 + andi.l #$ffff,d0 + rts + +;a0 = intext (obs, intext bør sansyneligvis gjøres til uppercase) +;a1 = chtext +; retur : +; d0 : valg nr +; d1 : antall tegn som matcher. + + +; FOo - orginal +; F - nei +; FO - ja +; FOO - ja +; FOl - nei +; FOOXxcvxc - ja + +scanchoices + push d2/d3/d4/d5 + moveq.l #0,d3 ; tegn som matcher (siste som matchet) + moveq.l #0,d4 ; valg nr (siste som matchet) + moveq.l #1,d1 ; valg nr +3$ moveq.l #0,d2 ; tegn vi sjekker + moveq.l #0,d5 ; tegn som matcher +4$ move.b (a1)+,d0 ; henter neste tegn + beq.b 9$ ; Null, vi er på slutten + cmpi.b #'a',d0 ; Lite tegn ? + bcs.b 7$ ; nei. + bsr upchar ; gjør om til stort + bra.b 71$ +7$ addq.l #1,d5 +71$ cmp.b (0,a0,d2.w),d0 + bne.b 8$ + addq.w #1,d2 + move.b (a1),d0 + cmpi.b #',',d0 + beq.b 5$ + cmpi.b #'.',d0 + beq.b 5$ + cmpi.b #'>',d0 ; for bruk i scanning av prompt input + beq.b 5$ + bra.b 4$ +5$ cmp.w d5,d3 ; flere machende tegn enn forrige ? + bcc.b 6$ ; nei + move.l d5,d3 ; ja, lagrer disse verdiene isteden + move.l d1,d4 +6$ addq.l #1,d1 ; øker søkeordet med 1 + addq.l #1,a1 ; Hopper over komma'et + bra.b 3$ ; søker på neste kommando + +8$ move.b (-1,a1),d0 ; henter tegnet vi ikke klarte + cmpi.b #'a',d0 ; Lite tegn ? + bcs.b 2$ ; nei, klarte det ikke + move.b (0,a0,d2.w),d0 ; var det slutten på input'en ? + bne.b 2$ ; nei, passer ikke +1$ move.b (a1)+,d0 ; spoler til neste ord + cmpi.b #'.',d0 + beq.b 5$ ; oops. kom til slutten + cmpi.b #'>',d0 + beq.b 5$ ; oops. kom til slutten + cmpi.b #',',d0 + bne.b 1$ + bra.b 5$ + +2$ move.b (a1)+,d0 ; spoler til neste ord + beq.b 9$ ; oops. kom til slutten + cmpi.b #'.',d0 + beq.b 9$ ; oops. kom til slutten + cmpi.b #',',d0 + bne.b 2$ + addq.l #1,d1 ; øker søkeordet med 1 + bra.b 3$ +9$ move.l d3,d1 + move.l d4,d0 + pop d2/d3/d4/d5 + rts + +typestat + push d2 + addq.w #1,(TimesOn+CU,NodeBase) ; øker antall ganger online, + move.w (Savebits+CU,NodeBase),d0 + and.w #SAVEBITSF_Browse,d0 ; browse på ? + beq.b 6$ ; nope. + move.w (Userbits+CU,NodeBase),d0 + btst #USERB_FSE,d0 ; har vi FSE ? + beq.b 6$ ; nope + bset #DIVB_Browse,(Divmodes,NodeBase) ; Slår på browse +6$ btst #DIVB_QuickMode,(Divmodes,NodeBase) + bne.b 4$ + bsr outimage + lea (Timesonsystext),a0 ; og skriver ut hvor mange det er. + bsr 10$ + move.w (TimesOn+CU,NodeBase),d0 + bsr skrivnrw + move.l (ds_Days+LastAccess+CU,NodeBase),d0 ; Har brukeren vært her før ? + beq.b 1$ ; Nei, ikke noe lasttime on system .. + lea (lasttimeontext),a0 ; Skriver ut info om last time info + bsr 10$ + lea (LastAccess+CU,NodeBase),a0 + bsr writetime +1$ lea (filesupltext),a0 + bsr 10$ + move.w (Uploaded+CU,NodeBase),d0 + bsr skrivnrw + lea (filesdownltext),a0 + bsr 10$ + move.w (Downloaded+CU,NodeBase),d0 + bsr skrivnrw + +4$ lea (LastAccess+CU,NodeBase),a0 ; Lagrer nye last time on system. + move.l (ds_Days,a0),d2 ; husker siste dag man var innom + move.l d2,(lastdayonline,NodeBase) ; husker dag for forige login + move.l (ds_Minute,a0),d0 + move.w d0,(lastminonline,NodeBase) ; og minuttet... + + move.l a0,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + lea (LastAccess+CU,NodeBase),a0 + move.l (ds_Minute,a0),d0 + move.w d0,(loginmin,NodeBase) + move.w (TimeUsed+CU,NodeBase),(OldTimelimit,NodeBase) + move.w (FTimeUsed+CU,NodeBase),(OldFilelimit,NodeBase) + move.w #-1,(joinfilemin,NodeBase) + cmp.l (ds_Days,a0),d2 ; Har vi vært på før i dag ? + beq.b 2$ ; Ja, behold TimeUsed. + move.w #0,d0 + move.w d0,(OldTimelimit,NodeBase) + move.w d0,(OldFilelimit,NodeBase) + move.w d0,(FTimeUsed+CU,NodeBase) + move.w d0,(TimeUsed+CU,NodeBase) +2$ btst #DIVB_QuickMode,(Divmodes,NodeBase) + bne.b 5$ + lea (timeusedtdtext),a0 + bsr 10$ + move.w (TimeUsed+CU,NodeBase),d0 + bsr skrivnrw + lea (minutestext),a0 + bsr writetexti + lea (ftimeusedtdtext),a0 + bsr 10$ + move.w (FTimeUsed+CU,NodeBase),d0 + bsr skrivnrw + lea (minutestext),a0 + bsr writetexti + bsr outimage +5$ move.w #0,d1 + move.w (TimeLimit+CU,NodeBase),d0 + sub.w (TimeUsed+CU,NodeBase),d0 + bcs 3$ + bsr getnextwarningtime + move.w d0,d1 +3$ move.b d1,(warningtineindex,NodeBase) + move.w #0,(menunr,NodeBase) ;Skifter til Main menu + bsr typetosysop + jsr _CheckInvited + bsr loginlistprivate + tst.b (readcharstatus,NodeBase) ; noe galt ? + notz + beq 9$ ; ja + btst #DIVB_QuickMode,(Divmodes,NodeBase) + bne.b 9$ + move.w (Savebits+CU,NodeBase),d0 + btst #SAVEBITSB_Dontshowconfs,d0 + bne.b 9$ + jsr (loginshowconferences) +9$ pop d2 + rts + +10$ move.l a0,-(a7) + lea (ansilbluetext),a0 + bsr writetext + move.l (a7)+,a0 + moveq.l #28,d0 + bsr writetextlfill + lea (ansiwhitetext),a0 + bra writetexti + +getnextwarningtime + lea (warningtimearr),a0 + moveq #7,d1 +1$ cmp.b (0,a0,d1.w),d0 ; cmp a,b + bhi.b 9$ ; Hopper hvis a =< b + subq.l #1,d1 + bne.b 1$ +9$ move.l d1,d0 + rts + +writetime + lea (tmptext,NodeBase),a1 + bsr gettimestr + lea (tmptext,NodeBase),a0 + bra writetext +; moveq.l #8,d0 +; bra writetextlen + +;a0 = datestamp JEO SHOW +;a1 = ut string +gettimestr + movem.l d3/d2/a2,-(sp) + move.l a0,a2 + move.l a1,-(a7) + bsr datestampetodate + move.l (a7)+,a1 + movem.l d0/d1,-(sp) + mulu.w #10,d3 + lea (daytext),a0 + adda.l d3,a0 + bsr strcopy + move.b #',',(-1,a1) + move.b #' ',(a1)+ + move.l a1,a0 ; dag + move.l d2,d0 + bsr konverter + move.l a0,a1 + move.b #' ',(a1)+ + + move.l (4,sp),d0 ; Month + subq.l #1,d0 + mulu.w #10,d0 + lea (monthtext),a0 + adda.l d0,a0 + bsr strcopy + move.b #' ',(-1,a1) + + move.l (sp),d0 ; Year + move.l a1,a0 + bsr konverter + move.l a0,a1 + moveq.l #8,d0 + adda.l d0,sp + lea (attext),a0 + bsr strcopy + subq.l #1,a1 + move.l a2,a0 + movem.l (sp)+,d3/d2/a2 + move.l (ds_Minute,a0),d0 + move.l (ds_Tick,a0),d1 + move.l a1,a0 + bra timetostring1 + +; a0 = datestamp +timetostring + move.l (ds_Minute,a0),d0 + move.l (ds_Tick,a0),d1 + lea (tmptext,NodeBase),a0 +timetostring1 + movem.l a0/d2,-(sp) + move.l d0,d2 + divu.w #60,d2 + move.w d2,d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #':',(a0)+ + swap d2 + move.w d2,d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #':',(a0)+ + move.l d1,d0 + divu.w #TICKS_PER_SECOND,d0 + andi.l #$ffff,d0 + bsr nr2tostr + move.b #0,(a0) + movem.l (sp)+,d2/a0 + rts + +strtonr2 + moveq.l #0,d0 + moveq.l #0,d1 + bsr 10$ + bmi.b 99$ + bsr 10$ + bmi.b 99$ +9$ tst.w d0 +99$ rts + +10$ move.b (a0)+,d1 + beq.b 18$ + subi.b #'0',d1 + bcs.b 18$ + cmpi.b #9,d1 + bhi.b 18$ + mulu.w #10,d0 + add.l d1,d0 + clrn + rts +18$ setn + rts + +nr2tostr + divu.w #10,d0 + addi.b #'0',d0 + move.b d0,(a0)+ + swap d0 + addi.b #'0',d0 + move.b d0,(a0)+ + rts + +skriv2nr ; Skriver ut et tall <100 med to siffer + lea (tmptext,NodeBase),a0 + bsr nr2tostr + move.b #0,(a0)+ + lea (tmptext,NodeBase),a0 + bra writetext + +skrivminst2nr + lea (tmptext,NodeBase),a0 + bsr konverter + tst.b (1+tmptext,NodeBase) + bne.b 1$ + move.b #'0',d0 + bsr writechar +1$ lea (tmptext,NodeBase),a0 + bra writetexti + +;a0 = første tekst +;a1 = andre tekst (hvis noen) +;d0 = 1: Y = def. d0 = 0: N = def +getyorn push a2/a3/d2 + move.l a0,a2 + move.l a1,a3 + move.l d0,d2 +1$ tst.b (readlinemore,NodeBase) ; er det noe mere i lese køen ? + bne.b 7$ ; ja, ikke skriv ut teksten(e) + move.l a2,a0 + bsr writetext + move.l a3,d0 ; er det en tekst nr 2 ? + beq.b 4$ ; nei. + move.l a3,a0 + bsr writetext +4$ lea (byslashntext),a0 ; velger rette default valg + tst.l d2 + bne.b 8$ + lea (yslashbntext),a0 +8$ bsr writetext + lea (quistspacetext),a0 + bsr writetext + bsr breakoutimage +7$ bsr readline + bne.b 5$ + tst.b (readcharstatus,NodeBase) ; noe galt ? + notz + beq 3$ ; ja + tst.l d2 ; setter z flagget etter om det er + bra.b 3$ ; y eller n som er defailt +5$ bsr upstring + move.b (a0),d0 + cmpi.b #'N',d0 + beq.b 3$ + cmpi.b #'Y',d0 + bne.b 2$ +6$ clrz +3$ pop a2/a3/d2 + rts +2$ lea (enteryorntext),a0 + bsr writeerroro + bra.b 1$ + +checkcarriercheckser + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + beq.b 9$ ; ja, da er carrier ok :-) + bsr.b checkcarrier + bra.b 99$ + ENDC +9$ clrz +99$ rts + + IFND DEMO + +;z = 1 -> No carrier +; OBS mister tegn som er lest ! +checkcarrier + IFD nocarrier + clrz + rts + ENDC +;alwayscheckcarrier + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 9$ ; jepp, no CD checking. + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + move.l (sreadreq,NodeBase),a1 + move.w (IO_STATUS,a1),-(sp) ; Henter serial.status + bsr initserread + move.w (sp)+,d0 + btst #5,d0 ; Har vi CD ? + notz + bne.b 9$ + move.b #NoCarrier,(readcharstatus,NodeBase) + lea (nocarriertext),a0 + bsr writetexto + setz ; No carrier, Logoff !! +9$ rts + +stengmodem + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + lea (ModemOffHookString+Nodemem,NodeBase),a0 ; Sender ATH1. + bsr serwritestringdo + moveq.l #2,d0 + lea (transnltext),a0 + bra serwritestringlendo + +aapnemodem + move.l (sreadreq,NodeBase),a1 + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + lea (ModemOnHookString+Nodemem,NodeBase),a0 ; Sender ATH0. + bsr serwritestringdo + moveq.l #2,d0 + lea (transnltext),a0 + bra serwritestringlendo + +sendinitstr + IFND NOINIT + btst #DoDivB_NoInit,(DoDiv,NodeBase) + beq.b 10$ + bclr #DoDivB_NoInit,(DoDiv,NodeBase) + ENDC + setz + rts + +10$ push d2/d3/a2/d4 + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + notz + beq 9$ ; Ja, dropp init + moveq.l #0,d3 + moveq #1,d0 ; kjapp pause + bsr waitsecs + bsr serclear ; flusher input + +2$ move.w #4,d2 ; 4 firsøk +3$ subq.w #1,d2 + bcs.b 4$ ; Gir opp med init str. + lea (ModemInitString+Nodemem,NodeBase),a0 ; Sender init string. + lea (tmptext,NodeBase),a2 ; buffer til init stringen + move.l a2,a1 + bsr strcopy + +1$ moveq.l #0,d4 ; antall pauser (= sek) + move.l a2,a0 ; leter etter pause tegn +7$ move.b (a0)+,d0 + beq.b 6$ ; ferdig, skriver ut det vi har + cmpi.b #'~',d0 + bne.b 7$ + move.b #0,(-1,a0) ; deler opp stringen +8$ addq.l #1,d4 ; teller antall ! tegn + move.b (a0)+,d0 + beq.b 6$ ; gir blaffen i pauser på slutten + cmpi.b #'~',d0 + beq.b 8$ + exg a2,a0 + subq.l #1,a2 ; fortsettelses stedet + bsr serwritestringdo ; skriver teksten frem til + moveq.l #2,d0 ; ! tegnet + lea (transnltext),a0 ; pg nl + bsr serwritestringlendo + move.l d4,d0 ; tar pausen + bsr waitsecs + bra.b 1$ ; fortsetter +6$ move.l a2,a0 ; skriver ut det som er igjen + bsr serwritestringdo + moveq.l #2,d0 + lea (transnltext),a0 + bsr serwritestringlendo + + moveq.l #6,d0 ; Venter 6 sek maks. + bsr getmodemok + beq.b 3$ + bra.b 5$ +4$ moveq.l #1,d3 +5$ bsr serclear + bsr initserread + move.l d3,d0 +9$ pop d2/d3/a2/d4 + rts + +getmodemok + movem.l d2/d3/a2,-(sp) + lea (ModemOKString+Nodemem,NodeBase),a2 + move.w d0,d2 +1$ moveq.l #1,d0 + bsr waitsecs +2$ moveq.l #0,d3 +5$ lea (tmptext,NodeBase),a0 + moveq.l #-1,d0 + moveq.l #0,d1 + bsr serreadt + cmpi.b #1,d0 + beq.b 3$ +4$ subq.w #1,d2 + bne.b 1$ + bra.b 99$ +3$ move.b (tmptext,NodeBase),d0 + cmp.b (0,a2,d3.w),d0 + bne.b 2$ + addq.l #1,d3 + tst.b (0,a2,d3.w) + bne.b 5$ + clrz +99$ movem.l (sp)+,d2/d3/a0 + rts + +; Setter opp serialporten riktig. +setserparam + move.l (sreadreq,NodeBase),a1 + move.w #SDCMD_SETPARAMS,(IO_COMMAND,a1) + move.l #4096,(IO_RBUFLEN,a1) + move.w (Setup+Nodemem,NodeBase),d1 + move.l (NodeBaud+Nodemem,NodeBase),(IO_BAUD,a1) ; Setter opp init baud + move.b #8,(IO_READLEN,a1) + move.b #8,(IO_WRITELEN,a1) + move.b #1,(IO_STOPBITS,a1) + moveq.l #0,d0 + move.l d0,(IO_EXTFLAGS,a1) + move.w (Setup+Nodemem,NodeBase),d1 + move.b #0,(IO_SERFLAGS,a1) ; Null stiller. +; btst #SETUPB_XonXoff,d1 ; Vi tillater ikke XonXoff lenger +; bne.b 2$ + ori.b #SERF_XDISABLED|SERF_RAD_BOOGIE|SERF_SHARED,(IO_SERFLAGS,a1) +2$ btst #SETUPB_RTSCTS,d1 + beq.b 3$ + ori.b #SERF_7WIRE,(IO_SERFLAGS,a1) +3$ jsrlib DoIO + move.l (sreadreq,NodeBase),a1 + move.b (IO_ERROR,a1),d0 + rts + ENDC + +fillinnodenr + andi.l #$ffff,d0 + move.l d0,-(sp) + bsr strcopy + subq.l #1,a1 + move.l (sp)+,d0 + move.l a0,-(sp) + move.l a1,a0 + bsr konverter + move.l a0,a1 + move.l (sp)+,a0 + bra strcopy + +;skrivnrwrfill +; andi.l #$ffff,d0 +skrivnrrfill + move.l d1,-(a7) + bsr.b connrtotext + move.l (a7)+,d0 + bra writetextrfill + +skrivnrw + andi.l #$ffff,d0 +skrivnr bsr.b connrtotext + bra writetextlen + +connrtotext + lea (tmptext,NodeBase),a0 + bsr konverter + lea (tmptext,NodeBase),a0 + rts + +; d0 = tall +; a0 = inn streng. +konverterw + andi.l #$ffff,d0 +konverter + link.w a5,#-12 + move.l sp,a1 +1$ moveq.l #10,d1 + bsr divspes + addi.w #'0',d1 + move.b d1,(a1)+ + tst.l d0 + bne.b 1$ + move.l a1,d1 + moveq.l #0,d0 +2$ move.b -(a1),(a0)+ + addq.l #1,d0 + cmpa.l a1,sp + bne.b 2$ + clr.b (a0) + sub.l sp,d1 + unlk a5 + rts + +divspes move.l d2,-(sp) + swap d1 + move.w d1,d2 + bne.b 9$ + swap d0 + swap d1 + swap d2 + move.w d0,d2 + beq.b 1$ + divu.w d1,d2 + move.w d2,d0 +1$ swap d0 + move.w d0,d2 + divu.w d1,d2 + move.w d2,d0 + swap d2 + move.w d2,d1 +9$ move.l (sp)+,d2 + rts + +; a0 = tekst +; returnerer N hvis error, Z hvis 0 +atoi push d2/a2 ; d2-d3/a2 + move.l a0,a2 + moveq.l #0,d1 + move.l d1,d0 +; move.l d1,d3 +; cmpi.b #'+',(a0) +; beq.b 1$ +; cmpi.b #'-',(a0) +; bne.b 2$ +; moveq.l #1,d3 +;1$ addq.l #1,a0 +2$ move.b (a0)+,d0 + subi.b #'0',d0 + blt.b 3$ + cmpi.b #9,d0 + bhi.b 3$ + move.l d1,d2 + asl.l #2,d1 + add.l d2,d1 + add.l d1,d1 +; tst.b d3 +; bne.b 4$ + add.l d0,d1 + bra.b 2$ +;4$ sub.l d0,d1 +; bra.b 2$ +3$ move.l d1,d0 + move.l a0,d1 + sub.l a2,d1 + subq.l #2,d1 + bmi.b 9$ + tst.l d0 + clrn +9$ pop d2/a2 ; d2-d3/a2 + rts + +deletefile + move.l a6,-(sp) + move.l (dosbase),a6 + move.l a0,d1 + jsrlib DeleteFile + move.l (sp)+,a6 + tst.l d0 + rts + +; a0 = filename +getfilelen + movem.l d2/d3,-(sp) + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.b 9$ + move.l d0,d3 + move.l (infoblock,NodeBase),d2 + jsrlib Examine + move.l d0,d2 + beq.b 2$ + move.l (infoblock,NodeBase),a0 + move.l (fib_Size,a0),d2 +2$ move.l d3,d1 + jsrlib UnLock + move.l d2,d0 +9$ move.l (exebase),a6 + movem.l (sp)+,d2/d3 + rts + +;a0 = en eller annen fil på disken +getdiskfree + push d2/d3/d4 + moveq.l #-1,d4 ; setter opp for feil + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.b 1$ + move.l d0,d3 + move.l (infoblock,NodeBase),d2 + jsrlib Info + move.l d0,d2 + bne.b 4$ + moveq.l #-1,d4 ; setter error + bra.b 2$ +4$ move.l (infoblock,NodeBase),a0 ; beregner antall kb ledig + move.l (id_NumBlocks,a0),d0 + sub.l (id_NumBlocksUsed,a0),d0 + move.l (id_BytesPerBlock,a0),d1 + cmpi.l #65535,d0 ; er det flere enn 65535 blokker ? + bhi.b 3$ ; ja + mulu.w d1,d0 ; k = (free * size)/1024 + moveq.l #10,d1 + lsr.l d1,d0 + bra.b 2$ +3$ moveq.l #10,d2 ; k = free/1024 * size + lsr.l d2,d0 + mulu.w d1,d0 +2$ move.l d0,d4 + move.l d3,d1 + jsrlib UnLock +1$ move.l d4,d0 ; enten -1 eller antall kb + move.l (exebase),a6 + pop d2/d3/d4 + rts + +;a0 = pattern +;a1 = dirname +deletepattern + push a2 + link.w a3,#-80 + move.l a1,a2 + move.l sp,a1 + bsr parsepattern + beq.b 9$ + move.l a0,d0 + move.l a2,a0 + move.l a0,(tmpval,NodeBase) + lea (deleteallfunc),a1 + bsr dodirname +9$ unlk a3 + pop a2 + rts + +;a0 = dirname +deleteall + move.l a0,(tmpval,NodeBase) + lea (deleteallfunc),a1 + moveq.l #0,d0 + bsr dodirname +9$ rts + +deleteallfunc + link.w a2,#-80 + move.l (ed_Name,a0),d0 + move.l sp,a1 + move.l a1,d1 + move.l (tmpval,NodeBase),a0 + bsr strcopy + subq.l #1,a1 + move.l d0,a0 + bsr strcopy + jsrlib DeleteFile + unlk a2 + rts + +writetinystatus + tst.b (Tinymode,NodeBase) + beq.b 9$ + push a2 + link.w a3,#-60 + lea (clearwindowtext),a0 + bsr writecontext + move.l (nodenoden,NodeBase),a2 + lea (Nodeuser,a2),a0 + bsr writecontext + bsr newconline + move.l sp,a0 + bsr getstatustext + move.l sp,a0 + bsr writecontext + unlk a3 + pop a2 +9$ rts + +; a0 = textbuffer +getstatustext + push a2 + move.l a0,a1 + move.l (nodenoden,NodeBase),a2 + move.w (Nodestatus,a2),d0 + cmp.w #68,d0 ; er det arexx sak ? + bne.b 1$ ; nei. + move.l (NodesubStatus,a2),a0 + bra.b 2$ +1$ lea (statustext),a0 + move.l (0,a0,d0.w),a0 +2$ bsr strcopy + cmpi.w #36,d0 ; I door ? + beq.b 3$ ; ja + cmpi.w #52,d0 ; DL'er han hold ? + beq.b 3$ ; ja + cmpi.w #24,d0 ; DL'er han ? + bne.b 9$ ; nei. +3$ subq.l #1,a1 + move.l (NodesubStatus,a2),d0 + move.l a1,a0 + bsr konverter + move.w (Nodestatus,a2),d0 + cmpi.w #36,d0 ; I door ? + beq.b 9$ ; Ja, da kutter vi ut K'en. + move.b #'K',(a0)+ + move.b #0,(a0) +9$ pop a2 + rts + +updatenodestatustext + push a2/d2 + link.w a3,#-80 + move.l (nodenoden,NodeBase),a0 ; starter på hoved strengen + move.w (Nodenr,a0),d0 ; har vi ikke node nummer ? (er vi på vei ut?) + bne.b 4$ + move.w (NodeNumber,NodeBase),d0 ; bruker kopi foreløpig +4$ move.l sp,a0 + bsr (konverterw) + + jsrlib Forbid ; to prevent GadTools to use the text... + move.l (nodenoden,NodeBase),a2 ; starter på hoved strengen + move.l (LN_NAME,a2),a1 + move.b #'#',(a1)+ + move.l sp,a0 + moveq.l #3,d0 + bsr strcopylfill + + move.w (Nodenr,a2),d0 ; har vi ikke node nummer ? (er vi på vei ut?) + bne.b 7$ ; nei, forsett normalt + lea (nodeshutdowntxt),a0 + bsr strcopy + bra 3$ + +7$ move.l a1,d2 + move.l (Nodespeed,a2),d0 + bne.b 1$ + lea (localtext),a0 + bra.b 2$ +1$ move.l sp,a0 + bsr (konverter) + move.b (NodeECstatus,a2),d1 ; legger inn V/M info rett etter baud'en hvis det er noen + move.b #'V',d0 + btst #NECSB_V42BIS,d1 + bne.b 5$ + move.b #'M',d0 + btst #NECSB_MNP,d1 + beq.b 6$ +5$ move.b #' ',(a0)+ + move.b d0,(a0)+ + move.b #0,(a0) +6$ move.l sp,a0 +2$ move.l d2,a1 + moveq.l #8,d0 + bsr strcopylfill + move.l a1,d2 + move.l sp,a0 + bsr getstatustext + move.l sp,a0 + move.l d2,a1 + moveq.l #24,d0 + bsr strcopylfill + lea (Name+CU,NodeBase),a0 + move.b (a0),d0 + beq.b 3$ + bsr strcopy + move.b #',',(-1,a1) + lea (CityState+CU,NodeBase),a0 + bsr strcopy +3$ jsrlib Permit + move.l MainTask,a1 + move.l #SIGBREAKF_CTRL_E,d0 + jsrlib Signal + unlk a3 + pop a2/d2 + rts + +;#3 14400 Newuser registration 123456789012345678901234567890,123456789012 + +; a0 = confname +testconfname + moveq.l #0,d1 ; vi tester confnavn + bra.b testfilename1 + +; ret: z = error +testfilename + moveq.l #1,d1 ; vi tester filnavn +testfilename1 + push a0 +1$ move.b (a0)+,d0 + beq.b 8$ + cmpi.b #':',d0 + beq.b 9$ + cmpi.b #'(',d0 + beq.b 9$ + cmpi.b #')',d0 + beq.b 9$ + cmpi.b #'|',d0 + beq.b 9$ + cmpi.b #'~',d0 + beq.b 9$ + cmpi.b #'#',d0 + beq.b 9$ + cmpi.b #'?',d0 + beq.b 9$ + cmpi.b #',',d0 + beq.b 9$ + cmpi.b #"`",d0 + beq.b 9$ + cmpi.b #'"',d0 + beq.b 9$ + cmpi.b #'%',d0 + beq.b 9$ + cmpi.b #'*',d0 + beq.b 9$ + tst.l d1 + beq.b 1$ ; det er confnavn vi tester, så / er lov + cmpi.b #'/',d0 + beq.b 9$ + bra.b 1$ +8$ pop a0 + tst.l d1 + beq.b 81$ ; det er confnavn vi tester, ingen banfile + jsr (checkfilebanfile) + bne.b 99$ ; ok, ikke i banfile + lea (namebannedtext),a0 + bsr writeerroro + setz + bra.b 99$ +81$ clrz + bra.b 99$ +9$ pop a0 +99$ rts + +; a0 = confname +; ret: z = error +testfilenameallowwild +1$ move.b (a0)+,d0 + beq.b 8$ + cmpi.b #':',d0 + beq.b 9$ + cmpi.b #'/',d0 + beq.b 9$ + cmpi.b #',',d0 + beq.b 9$ + cmpi.b #"`",d0 + beq.b 9$ + cmpi.b #'"',d0 + beq.b 9$ + cmpi.b #'%',d0 + beq.b 9$ + bra.b 1$ +8$ clrz +9$ rts + +; a0 = filename +; ret : Z=1 not found +findfile + move.l d2,-(sp) + move.l (dosbase),a6 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + tst.l d0 + beq.b 9$ + move.l d0,d1 + jsrlib UnLock + move.l (sp)+,d2 + clrz + bra.b 99$ +9$ move.l (sp)+,d2 + setz +99$ move.l (exebase),a6 + rts + +setupa4a5 + move.l (exebase),MainBase + move.l (ThisTask,MainBase),MainBase + move.l (TC_Userdata,MainBase),NodeBase + move.l (mainmemoryblock),MainBase + rts + +changenodestatusspeed + move.l (nodenoden,NodeBase),a0 + move.l d0,(Nodespeed,a0) + bsr updatenodestatustext + bra writetinystatus + +changenodestatusname + move.l (nodenoden,NodeBase),a1 + lea (Nodeuser,a1),a1 + moveq.l #30,d0 + bsr strcopymaxlen + lea (CityState+CU,NodeBase),a0 + move.l (nodenoden,NodeBase),a1 + lea (NodeuserCityState,a1),a1 + moveq.l #29,d0 + bsr strcopymaxlen + move.l (nodenoden,NodeBase),a1 + move.l (Usernr+CU,NodeBase),(Nodeusernr,a1) ; Lagrer usernummeret i nodenoden + jsr (updatewindowtitle) + lea (Nodetaskname,NodeBase),a0 + bsr strlen + move.b d0,(Nodetaskname_BCPL,NodeBase) + move.l (exebase),a6 + bsr updatenodestatustext + bra writetinystatus + +changenodestatus + move.w d0,(PrevNodestatus,NodeBase) + move.l d1,(PrevNodesubStatus,NodeBase) +changenodestatusnostore + move.l (nodenoden,NodeBase),a0 + move.w d0,(Nodestatus,a0) + move.l d1,(NodesubStatus,a0) + bsr updatenodestatustext + bra writetinystatus + +initrun moveq.l #0,d0 + move.b d0,(userok,NodeBase) + move.b d0,(Charset+CU,NodeBase) ; Setter tegnsett til ISO + move.w d0,(PageLength+CU,NodeBase) + move.b d0,(active,NodeBase) + move.l d0,(Name+CU,NodeBase) ; sletter navnet for show user + move.b d0,(readcharstatus,NodeBase) + move.b d0,(Divmodes,NodeBase) + move.w d0,(tmsgsread,NodeBase) + move.w d0,(tmsgsdumped,NodeBase) + move.b d0,(tmpsysopstat,NodeBase) ; clearer sysop chat for sikkerhetsskyld + move.w d0,(minchat,NodeBase) + move.w d0,(minul,NodeBase) + move.w d0,(Historyoffset,NodeBase) + move.b d0,(serescstat,NodeBase) ; reseter esc tolkningen + move.b d0,(noglobal,NodeBase) + move.b d0,(activesysopchat,NodeBase) + move.l (nodenoden,NodeBase),a0 + andi.b #~(NDSF_Notavail+NDSF_Stealth),(Nodedivstatus,a0) ; Slår av ikke avail flagget + bclr #NECSB_UPDATED,(NodeECstatus,a0) ; Sier at den ikke er updated + bsr changenodestatus + move.w #-1,(confnr,NodeBase) ;Ingen konf nå + lea (historybuffer,NodeBase),a0 ; tømmer historybufferet + move.w #1024,d0 + bsr memclr + bsr initconread ; fyrer opp read requestene + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) + beq.b 2$ + bsr initserread + ENDC +2$ lea (ansiwhitetext),a0 + bra writetexti + +initrunlate + move.b #0,(readcharstatus,NodeBase) + move.l (nodenoden,NodeBase),a0 + move.w (InterMsgwrite,a0),(InterMsgread,a0) ; flush'er intermsg'ene + move.l (dosbase),a6 + lea (lastchartime,NodeBase),a0 ; lagrer "siste tastetrykk" + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + move.l (nodenoden,NodeBase),a0 + move.b (NodeECstatus,a0),d0 + btst #NECSB_UPDATED,d0 ; er den updated ? + bne.b 1$ ; ja + move.b #0,(NodeECstatus,a0) ; slår av eventuell MNP/V42bis status +1$ rts + +;d0 = TRUE -> Full logout, reply frontmsg osv. +endrun push d2 + move.l d0,d2 + bsr stoptimeouttimer + jsr freepastemem ; sikrer at pastemem blir frigjort + clr.b (readlinemore,NodeBase) ; flusher input'en + move.w #-1,(linesleft,NodeBase) + move.b #0,(XpertLevel+CU,NodeBase) ; forhindrer breake av nodemenyen + tst.l d2 ; skal vi ta full logout ? + beq.b 1$ ; nei, hopper over dette + bclr #DoDivB_NoInit,(DoDiv,NodeBase) ; sletter-> funker hvis ingen front msg. + move.l (FrontDoorMsg,NodeBase),d0 ; Har vi en melding som frontdoor skal ha ? + beq.b 1$ ; nei. + move.l d0,a1 + move.w (f_Flags,a1),d0 ; skal vi ta init ? + andi.w #f_flagsF_NoInit,d0 + beq.b 2$ ; ja... + bset #DoDivB_NoInit,(DoDiv,NodeBase) +2$ jsrlib ReplyMsg ; Tar reply + moveq.l #0,d0 ; sletter, så det ikke skal skje igjen + move.l d0,(FrontDoorMsg,NodeBase) +1$ pop d2 + rts + +registerlogin + lea (maintmptext,NodeBase),a0 ; skriver til log'en + move.b #'-',d0 + moveq.l #60,d1 +4$ move.b d0,(a0)+ + dbf d1,4$ + move.b #0,(a0) + lea (maintmptext,NodeBase),a0 + lea (logfilename,NodeBase),a1 + bsr writelogtextline ; Linje med masse minus tegn i før login. + lea (maintmptext,NodeBase),a1 + lea (loglogintext),a0 + bsr strcopy + move.b #' ',(-1,a1) + lea (Name+CU,NodeBase),a0 + bsr strcopy + move.b #' ',(-1,a1) + moveq #0,d0 + move.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),d0 ; Skriver ut nodespeeden + bne.b 1$ + lea (localtext),a0 ; Hvis speed = 0 => lokalnode + bra.b 2$ +1$ move.l a1,-(sp) + bsr connrtotext ; Ekstern node, skriv ut baud hastighet + move.l (sp)+,a1 +2$ bsr strcopy + + move.l (nodenoden,NodeBase),a0 + move.b (NodeECstatus,a0),d0 + beq.b 5$ + and.b #~NECSF_UPDATED,d0 + beq.b 5$ + lea (fullv42bistext),a0 + btst #NECSB_V42BIS,d0 + bne.b 6$ + lea (mnptext),a0 +6$ move.b #' ',(-1,a1) + bsr strcopy +5$ lea (maintmptext,NodeBase),a0 + bsr writelogstartup + + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) + move.b #1,(userok,NodeBase) + move.b #1,(active,NodeBase) + lea (Name+CU,NodeBase),a0 + bsr changenodestatusname + moveq.l #4,d0 + bsr changenodestatus + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + bne.b 3$ ; nei, speed er riktig. + moveq.l #0,d0 + bsr changenodestatusspeed ; setter baud'en til lokal + ENDC +3$ lea (u_almostendsave+CU,NodeBase),a0 + move.l (Loginlastread,NodeBase),a1 + moveq.l #0,d0 + move.w (Maxconferences+CStr,MainBase),d0 + subq.l #1,d0 + bcs.b 8$ ; egentlig umulig.. +7$ move.l (uc_LastRead,a0),(a1)+ ; husker loginstate + lea (Userconf_seizeof,a0),a0 + dbf d0,7$ +8$ bsr updateshowuserwindow + btst #DIVB_StealthMode,(Divmodes,NodeBase) ; er Stealth Mode på ? + bne.b 9$ ; jepp. dropper den node meldingen. + lea (tmptext,NodeBase),a1 ; sier ifra til alle at vi er her + lea (Name+CU,NodeBase),a0 + lea (i_Name,a1),a1 + bsr strcopy + lea (tmptext,NodeBase),a0 + move.b #0,(i_type,a0) ; login melding + move.w (NodeNumber,NodeBase),(i_franode,a0) + moveq.l #0,d0 ; Alle noder. + move.b #0,(i_pri,a0) + bsr sendintermsg + move.b (MessageFilterV+CU,NodeBase),d0 + cmpi.b #50,d0 ; 50 eller mere ? + bcs.b 9$ ; nei + move.l (nodenoden,NodeBase),a0 + ori.b #NDSF_Notavail,(Nodedivstatus,a0) ; Slår på ikke avail flagget +9$ rts + +getprompttext + lea (ansiwhitetext),a0 + lea (maintmptext,NodeBase),a1 + bsr strcopy + move.b #'(',(-1,a1) + move.w (confnr,NodeBase),d0 ; conf nr + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 ; Har konferanse navnet. + bsr strcopy + move.b #')',(-1,a1) + move.b #' ',(a1)+ + move.w (menunr,NodeBase),d0 + cmpi.w #4,d0 + bne.b 2$ + move.w (Savebits+CU,NodeBase),d1 + btst #SAVEBITSB_ReadRef,d1 + beq.b 2$ + lea (readreftext),a0 + bra.b 1$ +2$ lea (menutexts),a0 + move.l (0,a0,d0.w),a0 +1$ bsr strcopy + subq.l #1,a1 + lea (commandtext),a0 + bsr strcopy + move.b (XpertLevel+CU,NodeBase),d0 + bne.b 3$ + subq.l #1,a1 + lea (qmformenutext),a0 + bsr strcopy +3$ move.b #':',(-1,a1) + move.b #' ',(a1)+ + move.b #0,(a1) + lea (maintmptext,NodeBase),a0 + rts + +checktime + bsr updatetime + move.l (ds_Minute+tmptext,NodeBase),d0 + + IFND DEMO + lea (snumberrot),a0 ; Beregner serial nummer + move.l (a0),d1 + eori.l #snrrotverdi,d1 + move.l d1,(4,a0) + ENDC + + cmpi.w #16,(menunr,NodeBase) ; Er vi i File menu ? + bne.b 2$ ; Nei. + move.w (FileLimit+CU,NodeBase),d1 ; Har vi limit ? + beq.b 2$ ; Nei. + add.w (minul,NodeBase),d1 ; gir ekstra tid for UL + add.w (minchat,NodeBase),d1 ; gir ekstra tid for chat + + cmp.w (FTimeUsed+CU,NodeBase),d1 + bhi.b 2$ + lea (ftimexpiredtext),a0 + bsr writetexto + move.w #0,(menunr,NodeBase) ;Skifter til Main menu + +2$ move.w (TimeLimit+CU,NodeBase),d0 ; har vi limit ? + beq 9$ ; nei. Sjekker ikke + lea (tmptext,NodeBase),a0 + move.l (dosbase),a6 + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + lea (tmptext,NodeBase),a0 + move.l (ds_Minute,a0),d0 + divu #60,d0 + sub.w #1,d0 + bcc.b 4$ + move.w #23,d0 +4$ lea (HourMaxTime+Nodemem,NodeBase),a0 + moveq.l #0,d1 + move.b (a0,d0.w),d1 + move.w (TimeLimit+CU,NodeBase),d0 + cmp.w #60,d1 + bcc.b 3$ ; ingen time limit + cmp.w d0,d1 ; timelimit,hourlimit + bcc.b 3$ + move.w d1,d0 ; bruker hourlimit isteden +3$ sub.w (TimeUsed+CU,NodeBase),d0 + bcs 99$ + lea (warningtimearr),a0 + moveq.l #0,d1 + move.b (warningtineindex,NodeBase),d1 + adda.l d1,a0 + move.b (a0),d1 + cmp.w d1,d0 + bhi.b 9$ ; Ingen warning nå. + tst.w d0 + beq.b 99$ + move.w d0,-(sp) + bsr getnextwarningtime + move.b d0,(warningtineindex,NodeBase) + + lea (totonlinetitext),a0 ; Skriver tid online. + bsr writetext + move.w (TimeUsed+CU,NodeBase),d0 + bsr skrivnrw + bsr breakoutimage + + lea (timeremaindtext),a0 ; Skriver tid igjen. + bsr writetext + move.w (sp)+,d0 + bsr skrivnrw + bsr outimage + + lea (nextwarntext1),a0 + bsr writetext + lea (warningtimearr),a0 + moveq.l #0,d1 + move.l d1,d0 + move.b (warningtineindex,NodeBase),d1 + move.b (0,a0,d1.w),d0 + bsr skrivnrw + lea (nextwarntext2),a0 + bsr writetexto +9$ clrz +999$ rts + +99$ lea (timexpiredtext),a0 + bsr writetexti + setz + bra.b 999$ + +; a0 = navn å finne +; a1 = start på navnliste. +; d0 = maks antall*2. +; d1 = size pr element +findnameicase + moveq.l #Sizeof_NameT,d1 +findnameicase1 + push d2/d3/d4/d5 + move.w d0,d3 + move.l d1,d5 + moveq.l #0,d2 +1$ move.b (a1),d0 + beq.b 3$ + moveq.l #0,d1 +2$ move.b (0,a0,d1.w),d0 + beq.b 8$ + bsr upchar + move.b d0,d4 + move.b (0,a1,d1.w),d0 + bsr upchar + addq.w #1,d1 + cmp.b d0,d4 + beq.b 2$ +3$ add.l d5,a1 + addq.w #2,d2 + cmp.w d3,d2 + bhi 9$ + bra.b 1$ +8$ move.w d2,d0 + clrz + bra.b 99$ +9$ setz +99$ pop d2/d3/d4/d5 + rts + +; a0 = navn å finne +finddir + move.l (firstFileDirRecord+CStr,MainBase),a1 + move.w (MaxfileDirs+CStr,MainBase),d0 + add.w d0,d0 + moveq.l #FileDirRecord_SIZEOF,d1 + bra.b findnameicase1 + +; a0 = navn å finne +finddirfull + move.l (firstFileDirRecord+CStr,MainBase),a1 + move.w (MaxfileDirs+CStr,MainBase),d0 + add.w d0,d0 + moveq.l #FileDirRecord_SIZEOF,d1 + bra.b findfullnameicase1 + +; a0 = navn å finne +findconferencefull + lea (n_FirstConference+CStr,MainBase),a1 + move.w (Maxconferences+CStr,MainBase),d0 + add.w d0,d0 + moveq.l #ConferenceRecord_SIZEOF,d1 + bra.b findfullnameicase1 + +; a0 = navn å finne +; a1 = start på navnliste. +; d0.w = maks antall *2. +; d1 = size pr element +findfullnameicase + moveq.l #Sizeof_NameT,d1 +findfullnameicase1 + push d2/d3/d4/d5 + move.w d0,d3 + move.l d1,d5 + move.w #0,d2 ; nr +1$ move.b (a1),d0 ; er det noen her ? + beq.b 7$ ; nei, hopper til neste + moveq.l #0,d1 ; tegn nr vi tester +2$ move.b (0,a0,d1.w),d0 + beq.b 8$ ; slutten på stringen + bsr upchar + move.b d0,d4 + move.b (0,a1,d1.w),d0 + bsr upchar + cmp.b d0,d4 ; like ? + bne.b 7$ ; nei, tar neste + addq.w #1,d1 ; øker index'en i stringen + bra.b 2$ +7$ add.l d5,a1 ; oppdaterer for neste + addq.w #2,d2 + cmp.w d3,d2 ; søkt i alle ? + bcc.b 9$ ; jepp + bra.b 1$ ; nei, fortsetter +8$ move.b (0,a1,d1.w),d0 ; slutt på søke stringen også ? + bne.b 7$ ; nei, da tar vi neste + move.l d2,d0 ; returnerer nummeret, + clrz ; og sier vi fant + bra.b 99$ +9$ setz +99$ pop d2/d3/d4/d5 + rts + +; Bare de som har ACCB_Write kan skrive i denne konferansen. +; ret : z = 1 : ikke lov +sjekklovtilaaskrive + bsr sjekklovtilaaskrivesub + bne.b 9$ + bsr outimage + beq.b 9$ + lea (readonlycontext),a0 + bsr writeerror + lea (usejtogetcltext),a0 + bsr writeerroro + setz +9$ rts + +; ret : z = 1 : ikke lov +sjekklovtilaaskrivesub + move.w (confnr,NodeBase),d0 ; conf nr + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 ; Har vi Write access ? + andi.b #ACCF_Write,d0 + rts + +; a0 : msgheader +; d0 : conf nr (* 2!) +_kanskrive + bsr.b kanskrive + beq.b 1$ ; ja ... + moveq.l #1,d0 + bra.b 9$ +1$ moveq.l #0,d0 +9$ rts + +kanskrive + move.b (MsgStatus,a0),d1 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop+MSTATF_Dontshow,d1 + bne.b 9$ + bsr allowtype + bne.b 9$ ; Nei. "Jump, for my love" + setz +9$ rts + +;sjekker om denne melding kan skrives ut. Kriterier er : +; hvis dontshow er satt, ikke i det hele tatt +;SecNone: alle kan lese denne. +;SecReceiver: Sysop,sigop, sender, motager kan lese. +; a0 : msgheader +; d0 : conf nr (* 2!) +allowtype + move.l d0,a1 ; husker i a1 + btst #MSTATB_Dontshow,(MsgStatus,a0) ; kan vi vise denne meldingen ? + bne.b 7$ ; nei. + move.b (Security,a0),d0 + btst #SECB_SecNone,d0 + bne.b 9$ +; btst #SECB_SecReceiver,d0 +; beq.b 8$ + move.l (Usernr+CU,NodeBase),d1 + cmp.l (MsgFrom,a0),d1 + beq.b 9$ + cmp.l (MsgTo,a0),d1 + beq.b 9$ +; Bare sysop og sigop igjen. Er vi det ?? + tst.b (tmpsysopstat,NodeBase) + bne.b 9$ +8$ move.l a1,d0 ; henter frem conf nr + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.w #ACCF_Sigop+ACCF_Sysop,d0 + bne.b 9$ +7$ clrz ; Nei, ikke det. + rts +9$ setz ; Ja, skriv ut + rts + +; samme kriterier som for allowkill +allowmove + move.b (MsgStatus,a0),d1 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop+MSTATF_Dontshow,d1 + bne.b 9$ + bsr allowkill +9$ rts + +;sjekker om denne melding kan killes. Kriterier er : +;Sender, mottager (bare hvis meldingen er privat) ,Sysop, sigop, kan kille. +allowkill + move.l (Usernr+CU,NodeBase),d1 + cmp.l (MsgFrom,a0),d1 + beq.b 99$ + cmp.l (MsgTo,a0),d1 + bne.b 1$ + move.b (Security,a0),d0 ; er den privat ? + btst #SECB_SecReceiver,d0 + bne.b 9$ ; ja, tillat sletting +; Bare sysop og sigop igjen. Er vi det ?? +1$ tst.b (tmpsysopstat,NodeBase) + bne.b 9$ + move.w (confnr,NodeBase),d0 ; conf nr + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.w #ACCF_Sigop+ACCF_Sysop,d0 + bne.b 9$ + clrz ; Nei, ikke det. + rts +9$ setz ; Ja, skriv ut +99$ rts + +;sjekker om denne melding kan unkilles. Kriterier er : +;Sysop, sigop, kan unkille. User kan bare unkille hvis han kill'a meldingen +allowunkill + move.b (MsgStatus,a0),d0 + btst #MSTATB_Dontshow,d0 ; kan vi vise denne meldingen ? + bne.b 8$ ; nei. + andi.b #MSTATF_KilledByAuthor,d0 ; ble den killa av forfatteren ? + beq.b 1$ ; Nei, da kan bare sysop/sigop unkille + move.l (Usernr+CU,NodeBase),d1 + cmp.l (MsgFrom,a0),d1 + beq.b 9$ +; Bare sysop og sigop igjen. Er vi det ?? + tst.b (tmpsysopstat,NodeBase) + bne.b 9$ +1$ move.w (confnr,NodeBase),d0 ; conf nr + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + andi.w #ACCF_Sigop+ACCF_Sysop,d0 + bne.b 9$ +8$ clrz ; Nei, ikke det. + rts +9$ setz ; Ja, skriv ut + rts + +; sjekker om denne fila kan skrives ut. Kriteriene er : +; Ingen utskrift : Filen er flyttet eller slettet +; Sysop, Sigop og fokl med DL og read acces i conferansen den er privat til +; Kun personen den er til og sysoper, hvis det er en PU. +allowtypefileinfo + move.w (Filestatus,a0),d0 ; er det noen status ? + andi.w #~(FILESTATUSF_FreeDL|FILESTATUSF_Selected),d0 ; filtrerer ut freedl bit'et + beq.b 9$ ; nei, alle kan + move.w d0,d1 + andi.w #FILESTATUSF_Filemoved+FILESTATUSF_Fileremoved,d1 + bne.b 9$ ; er den flyttet/slettet ? ja -> nope + btst #FILESTATUSB_PrivateUL,d0 + beq.b 1$ + move.l (Usernr+CU,NodeBase),d1 ; er den til oss ? + cmp.l (PrivateULto,a0),d1 + beq.b 9$ ; ja + bsr (justchecksysopaccess) + bra.b 99$ +1$ btst #FILESTATUSB_PrivateConfUL,d0 + beq.b 99$ ; ukjent bit. Ingen utskrift + tst.b (tmpsysopstat,NodeBase) ; tmpsysop ? + bne.b 99$ ; ja + move.l (PrivateULto,a0),d0 + + lea (u_almostendsave+CU,NodeBase),a1 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a1,d0.l),d0 ; Henter conf access +; btst #ACCB_Read,d0 ; R og D uavhengig +; beq.b 99$ + andi.w #ACCF_Download+ACCF_Sigop+ACCF_Sysop,d0 + bra.b 99$ +9$ notz +99$ rts + +alloweditinfo + moveq.l #1,d0 ; motager skal ikke slå ut + bra.b allowretract1 + +; Sjekker om denne fila kan retract'es. Kriteriene er : +; Sysop og UL'er kan alltid slette. +; Er fila Privat UL kan DL'er slette. +; Er fila Privat UL til konferanse kan sigop i konferansen slette. +; z = 0 -> har lov til å slette +; d0 = 0 -> Mottager skal få lov. = 1 -> Mottager får ikke lov (brukes til alloweditinfo..) +; a0 = fileentry +allowretract + moveq.l #0,d0 ; tillat mottager også +allowretract1 + push a2 + move.l a0,a2 + move.l (Usernr+CU,NodeBase),d1 ; er det uploader ? + cmp.l (Uploader,a2),d1 + beq.b 9$ ; jepp. ok + jsr (justchecksysopaccess) ; er vi sysop ? + bne.b 99$ ; ja, ok + move.w (Filestatus,a2),d1 + andi.w #~FILESTATUSF_FreeDL,d1 ; filtrerer ut freedl bit'et + btst #FILESTATUSB_PrivateUL,d1 ; er den privat til person ? + beq.b 1$ ; nope + tst.l d0 + bne.b 1$ ; vi skal ikke sjekke om mottager har lov + move.l (Usernr+CU,NodeBase),d0 + cmp.l (PrivateULto,a2),d0 ; til denne brukeren ? + beq.b 9$ ; ja, ok +1$ btst #FILESTATUSB_PrivateConfUL,d1 ; er den privat til en konf ? + beq.b 99$ ; ukjent, da sier vi nei + move.l (PrivateULto,a2),d0 ; Henter conferanse nr. + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 ; Henter access byten for denne conf'en + andi.w #ACCF_Sysop+ACCF_Sigop,d0 ; har bruker sysop/sigop access ?? + bra.b 99$ ; Ja, hopp. +9$ notz +99$ pop a2 + rts + + +; Sjekker om denne fila kan DL'es. Kriteriene er : +; Ingen security, alle kan DL'e +; PrivateUL, kun den som den er privat til kan DL'e +; Privat til conf, bare de med DL access i konfen kan DL'e den. +; sysop'er kan DL'e alt +allowdownload + push a2 + move.l a0,a2 + jsr (justchecksysopaccess) ; er vi sysop ? + bne.b 99$ ; ja, ok + move.w (Filestatus,a2),d1 + andi.w #~FILESTATUSF_FreeDL,d1 ; filtrerer ut freedl bit'et + beq.b 9$ + btst #FILESTATUSB_PrivateUL,d1 + beq.b 1$ + move.l (Usernr+CU,NodeBase),d0 + cmp.l (PrivateULto,a2),d0 + bra.b 9$ +1$ btst #FILESTATUSB_PrivateConfUL,d1 + beq.b 99$ + move.l (PrivateULto,a2),d0 + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 ; Henter access byten for denne conf'en + andi.w #ACCF_Download,d0 ; har bruker DL access ?? + bra.b 99$ ; Ja, hopp. +9$ notz +99$ pop a2 + rts + + IFND DEMO +sjekkdltid + move.l (Fsize,a0),d0 +sjekkdltidbytes + push d0 ; husker size'n + bsr updatetime + pop d0 + move.w (FileLimit+CU,NodeBase),d1 + beq.b 8$ + move.w (cpsrate,NodeBase),d1 + divu.w d1,d0 + andi.l #$ffff,d0 + divu.w #60,d0 + andi.l #$ffff,d0 + move.w (FileLimit+CU,NodeBase),d1 + sub.w (FTimeUsed+CU,NodeBase),d1 + bls.b 9$ ; Har ikke mere filtid. + cmp.w d0,d1 + bcs.b 9$ + move.w (TimeLimit+CU,NodeBase),d1 + beq.b 8$ ; Vi har ingen begrensning + sub.w (TimeUsed+CU,NodeBase),d1 + bls.b 9$ ; Har ikke mere tid. + cmp.w d0,d1 + bcs.b 9$ +8$ clrz + rts +9$ setz + rts + ENDC + +; d0 = msgnr +; d1 = confnr +typemsg push a2/a3/d2/d3 + tst.b (readlinemore,NodeBase) ; er det mere input ? + bne 99$ ; jepp, skriver ikke meldingen + + lea (tmpmsgheader,NodeBase),a2 + move.l (tmpmsgmem,NodeBase),a3 ; text Buffer + move.l a3,a0 + move.l a2,a1 + move.l d1,d3 + jsr (loadmsg) + bne 6$ + move.l a2,a0 + move.w d3,d0 ; confnr + bsr allowtype ; Kan vi skrive ut denne ??? + bne 7$ ; Nei. "Jump, for my love" + move.l (Number,a2),d0 + bsr removefromqueue + move.w (Userbits+CU,NodeBase),d0 ; har det vært ANSI ? + btst #USERB_ClearScreen,d0 ; skal vi slette skjermen ? + beq.b 2$ ; nei. + lea (ansiclearsctext),a0 ; sletter skjermen + bsr writetexti + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; ny skjerm +2$ move.l a2,a0 + move.l d3,d0 + move.l a3,a1 ; gir msgtext også for netnavn + bsr typemsgheader + beq 99$ + bsr outimage + beq 99$ + move.l a2,a0 + move.b (MsgStatus,a2),d0 + andi.b #MSTATF_KilledByAuthor+MSTATF_KilledBySigop+MSTATF_KilledBySysop,d0 + bne.b 8$ + move.w (Userbits+CU,NodeBase),d0 + andi.w #USERF_ColorMessages,d0 + beq.b 3$ + lea (ansigreentext),a0 + bsr writetexti +3$ move.l a3,a0 + moveq.l #0,d0 + move.w (NrBytes,a2),d0 + notz + bne.b 1$ ; 0 bytes ? Bull... Fy.. + move.w (NrLines,a2),d1 + bpl.b 4$ ; normal melding + ; det er net navn i meldingen. Vekk med dem. + bsr skipnetnames ; increases a0, and decreases d0 to skip netuser names +4$ moveq.l #2,d1 ; ikke break, fremdeles både ser og con + bset #31,d1 ; vi skal ha quiting + bsr writetextmemi + beq.b 1$ + bsr dubbelnewline + bsr breakoutimage +1$ sne d2 + moveq.l #1,d0 + add.l d0,(MsgsRead+CU,NodeBase) ; opdaterer antall meldinger som er lest + add.w d0,(tmsgsread,NodeBase) + move.l (MsgTo,a2),d0 + cmp.l (Usernr+CU,NodeBase),d0 + bne.b 8$ + move.b (MsgStatus,a2),d0 + btst #MSTATB_MsgRead,d0 + bne.b 8$ + bset #MSTATB_MsgRead,d0 + move.b d0,(MsgStatus,a2) + move.l a2,a0 + move.w (confnr,NodeBase),d0 + jsr (savemsgheader) +8$ tst.b d2 + clrn + bra.b 99$ +6$ jsr (skrivnrw) +7$ setn +9$ notz +99$ pop a2/a3/d2/d3 + rts + +;a0 = msgheader +;a1 = msgtext +;returnerer z=1 hvis det var et net navn +isfromnetname + move.w (NrLines,a0),d0 ; net message ? + bpl.b 1$ ; Nope + move.b (a1)+,d0 + cmp.b #Net_FromCode,d0 ; har vi from ? + bra.b 9$ ; z flagget er riktig nå +1$ clrz +9$ rts + +;a0 = msgheader +;a1 = msgtext +;returnerer z=1 hvis det var et net navn +istonetname + move.w (NrLines,a0),d0 ; net message ? + bpl.b 1$ ; Nope + move.b (a1)+,d0 + cmp.b #Net_ToCode,d0 + beq.b 9$ ; ja, vi har to net navn + cmp.b #Net_FromCode,d0 ; har vi from ? + bne.b 9$ ; vi har ikke +2$ move.b (a1)+,d0 ; søker forbi fromnavne + cmp.b #10,d0 + bne.b 2$ + move.b (a1)+,d0 + cmp.b #Net_ToCode,d0 ; Enten er det to navn her, ellers har vi ikke + bra.b 9$ ; z flagget er riktig nå +1$ clrz +9$ rts + +;a0 = msgheader +;a1 = msgtext +;returnerer z=1 hvis det var et net subject +getsubject + push a2 + move.l a0,a2 + move.l a1,a0 + bsr getnetsubject + beq.b 9$ + lea (Subject,a2),a0 +9$ pop a2 + rts + +;a0 = msgheader +;a1 = msgtext +;returnerer z=1 hvis det var et net navn +getfromname + move.w (NrLines,a0),d0 ; net message ? + bpl.b 1$ ; Nope + move.b (a1)+,d0 + cmp.b #Net_FromCode,d0 ; har vi from ? + bne.b 1$ ; nope + moveq.l #78,d1 ; safety length + lea (tmpnametext,NodeBase),a0 +2$ move.b (a1)+,d0 + cmp.b #10,d0 + beq.b 3$ + move.b d0,(a0)+ + dbf d1,2$ +3$ move.b #0,(a0) + lea (tmpnametext,NodeBase),a0 + moveq.l #0,d0 + bra.b 9$ +1$ move.l (MsgFrom,a0),d0 + bsr getusername + clrz +9$ rts + +;a0 = msgheader +;a1 = msgtext +;returnerer z=1 hvis det var et net navn +gettoname + move.w (NrLines,a0),d0 ; net message ? +; entry point for CallEditor (nrLines er ikke negativ her..) +gettoname1 + bpl.b 2$ ; Nope + move.b (a1)+,d0 + cmp.b #Net_ToCode,d0 ; har vi to ? + beq.b 1$ ; jepp + cmp.b #Net_FromCode,d0 ; har vi from ? + bne.b 2$ ; nope +3$ move.b (a1)+,d0 + cmp.b #10,d0 + bne.b 3$ + move.b (a1)+,d0 + cmp.b #Net_ToCode,d0 ; har vi to ? + bne.b 2$ ; nope + moveq.l #78,d1 ; safety length +1$ lea (tmpnametext,NodeBase),a0 +4$ move.b (a1)+,d0 + cmp.b #10,d0 + beq.b 5$ + move.b d0,(a0)+ + dbf d1,4$ +5$ move.b #0,(a0) + lea (tmpnametext,NodeBase),a0 + moveq.l #0,d0 + bra.b 9$ +2$ move.l (MsgTo,a0),d0 + bsr getusername + clrz +9$ rts + +;They must be in this order... +;$1e - From = Terminert av newline +;$1f - To = Terminert av newline +;$1d - Subject = Terminert av newline +;$1c - ExtData = Terminert av $FF byte + +;a0 = msgtext +; ret : Z for ingen net subject. +getnetsubject + move.b (a0),d1 + cmp.b #Net_FromCode,d1 ; from navn ? + bne.b 2$ ; nei, sjekker videre +1$ move.b (a0)+,d1 + cmp.b #10,d1 ; newline ? + bne.b 1$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +2$ cmp.b #Net_ToCode,d1 ; to navn ? + bne.b 4$ ; nei, sjekker videre +3$ move.b (a0)+,d1 + cmp.b #10,d1 ; newline ? + bne.b 3$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +4$ addq.l #1,a0 + moveq.l #1,d0 + cmp.b #Net_SubjCode,d1 ; Subject ? + notz + bne.b 9$ + moveq.l #0,d0 +9$ rts + + +; increases a0, and decreases d0 to skip netuser names +skipnetnames + move.b (a0),d1 + cmp.b #Net_FromCode,d1 ; from navn ? + bne.b 2$ ; nei, sjekker videre +1$ move.b (a0)+,d1 + subq.l #1,d0 ; minker d0 + cmp.b #10,d1 ; newline ? + bne.b 1$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + + +2$ cmp.b #Net_ToCode,d1 ; to navn ? + bne.b 4$ ; nei, sjekker videre +3$ move.b (a0)+,d1 + subq.l #1,d0 ; minker d0 + cmp.b #10,d1 ; newline ? + bne.b 3$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +4$ cmp.b #Net_SubjCode,d1 ; Subject ? + bne.b 6$ ; nei, sjekker videre +5$ move.b (a0)+,d1 + subq.l #1,d0 ; minker d0 + cmp.b #10,d1 ; newline ? + bne.b 5$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +6$ cmp.b #Net_ExtDCode,d1 ; Ext data ? + bne.b 9$ ; nei, ut +7$ move.b (a0)+,d1 + subq.l #1,d0 ; minker d0 + cmp.b #$ff,d1 ; $ff ? + bne.b 7$ ; nei, looper videre + +9$ rts + +; a0 = første tid +; a1 = andre tid +calctime + move.l (ds_Days,a1),d0 + sub.l (ds_Days,a0),d0 + bcc.b 3$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. + bra.b 9$ +3$ move.l (ds_Minute,a1),d1 + sub.l (ds_Minute,a0),d1 + mulu.w #24*60,d0 + add.l d0,d1 + bpl.b 1$ + moveq.l #0,d0 ; oops, returnerer 0. feil.. + bra.b 9$ +1$ move.l d1,d0 + mulu.w #60,d0 ; vi skal returnere sekunder + move.l (ds_Tick,a1),d1 + sub.l (ds_Tick,a0),d1 + bcc.b 2$ ; ikke wrap + addi.l #TICKS_PER_SECOND*60,d1 +2$ divu.w #TICKS_PER_SECOND,d1 + andi.l #$ffff,d1 + add.l d1,d0 +9$ rts + +updatetime + move.l (dosbase),a6 + lea (tmptext,NodeBase),a0 ; finner tiden nå + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + move.l (ds_Minute+tmptext,NodeBase),d0 ; minuttet nå + sub.w (loginmin,NodeBase),d0 ; minutter siden login + bcc.b 1$ ; gikk ikke over et døgn + addi.w #24*60,d0 ; legger til for døgnet +1$ add.w (OldTimelimit,NodeBase),d0 ; minutter i forige session + sub.w (minchat,NodeBase),d0 ; trekker ifra for chat + bcc.b 5$ + moveq.l #0,d0 +5$ sub.w (minul,NodeBase),d0 ; og upload + bcc.b 6$ + moveq.l #0,d0 +6$ move.w d0,(TimeUsed+CU,NodeBase) ; minutter brukt i dag + + cmpi.w #16,(menunr,NodeBase) ; Er vi i File menu ? + bne.b 8$ ; Nei. + move.l (ds_Minute+tmptext,NodeBase),d0 + cmpi.w #-1,(joinfilemin,NodeBase) + bne.b 2$ + move.w d0,(joinfilemin,NodeBase) +2$ sub.w (joinfilemin,NodeBase),d0 + bcc.b 3$ + addi.w #24*60,d0 +3$ add.w (OldFilelimit,NodeBase),d0 + move.w d0,(FTimeUsed+CU,NodeBase) + bra.b 9$ +8$ cmpi.w #-1,(joinfilemin,NodeBase) ; nettopp byttet ? + beq.b 9$ ; nope + move.l (ds_Minute+tmptext,NodeBase),d0 ; tiden nå + sub.w (joinfilemin,NodeBase),d0 ; husker hvor mye vi brukte + bcc.b 4$ ; denne "sessionen" + addi.w #24*60,d0 +4$ +; sub.w (minul,NodeBase),d0 ; tar ikke med ul tid + add.w d0,(OldFilelimit,NodeBase) + move.w #-1,(joinfilemin,NodeBase) +9$ rts + +***************************************************************** +* level 2 IO rutiner * +***************************************************************** + +writetextlfill + push d2/a2 + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + move.l a2,a0 + cmpi.b #10,(a0) ; starter det med en nl ? + bne.b 1$ ; nei + addq.l #1,d2 ; ja, kompenserer +1$ bsr writetextlen + move.l d2,d0 + bmi.b 9$ + beq.b 9$ + lea (spacetext),a0 ; .. og jevner ut med space + bsr writetextlen +9$ pop d2/a2 + rts + +; a0 = text +; d0 = totalt plasser +writetextrfill + movem.l d2/a2,-(sp) + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + exg d0,d2 + tst.l d0 + bmi.b 1$ + beq.b 1$ + lea (spacetext),a0 ; .. og jevner ut med space + bsr writetextlen +1$ move.l a2,a0 + move.l d2,d0 + bsr writetextlen + movem.l (sp)+,d2/a2 + rts + +writecontextrfill + movem.l d2/a2,-(sp) + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + exg d0,d2 + tst.l d0 + bmi.b 1$ + beq.b 1$ + lea (spacetext),a0 ; .. og jevner ut med space + bsr writecontextlen +1$ move.l a2,a0 + move.l d2,d0 + bsr writecontextlen + movem.l (sp)+,d2/a2 + rts + + IFD notyet +writecontextlfill + push d2/a2 + move.l d0,d2 + move.l a0,a2 + bsr strlen + sub.l d0,d2 + move.l a2,a0 + bsr writecontextlen + move.l d2,d0 + bmi.b 9$ + beq.b 9$ + lea (spacetext),a0 ; .. og jevner ut med space + bsr writecontextlen +9$ pop d2/a2 + rts + ENDC + +; d0 = nr, d1 = antall siffer +writenrrfill + push d2/a2 + move.l d1,d2 + lea (tmptext,NodeBase),a2 + move.l a2,a0 + bsr konverter + move.l a2,a0 + bsr strlen + sub.l d0,d2 + bmi.b 1$ +2$ subq.l #1,d2 + bcs.b 1$ + move.b #'0',d0 + bsr writechar + bra.b 2$ +1$ move.l a2,a0 + bsr writetext + movem.l (sp)+,d2/a2 + rts + +; a0 = prompt +; a1 = gammel tekst +; d0 = antall tegn +mayedlinepromptfull + moveq.l #1,d1 ; skal ta readlineall + bra.b mayedlineprompt1 +mayedlineprompt + moveq.l #0,d1 ; skal ikke ta readlineall +mayedlineprompt1 + push a2/a3/d2/d3 + move.l d1,d3 ; husker stat + move.l a0,a2 + move.l a1,a3 + move.l d0,d2 + tst.b (readlinemore,NodeBase) ; er det noe mere i lese køen ? + beq.b 1$ ; ja, ikke skriv ut teksten(e) + tst.l d3 + beq.b 3$ + bsr readlineall + bra.b 4$ +3$ bsr readline +4$ beq.b 1$ ; ja, ikke skriv ut teksten(e) + move.l a0,a2 + bsr strlen + move.l a2,a0 + cmp.w d2,d0 + bls.b 2$ + move.b #'0',(0,a0,d2.w) ; sletter formange tegn +2$ clrz + bra.b 9$ + +1$ move.l a2,(curprompt,NodeBase) + move.l a3,a0 + move.l d2,d0 + lea (intextbuffer,NodeBase),a1 + bsr strcopymaxlen + move.l a2,a0 + bsr writetexti + move.l d2,d0 + bsr edline + clr.l (curprompt,NodeBase) + tst.l d0 +9$ pop a2/a3/d2/d3 + rts + +* Obs * Hack'er oss inn på getline.. +edline push d2-d6/a2/a3 + move.l d0,d2 + bsr startsleepdetect + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) + lea (intextbuffer,NodeBase),a2 + move.l a2,a0 + bsr strlen + move.l a2,a0 + move.l d0,d3 + move.l d0,d4 + bsr writetextleni + move.w #0,(intextchar,NodeBase) + bra.b getline2 + +getline push a2/a3/d2-d6 + move.w d0,d2 ; maks antall tegn vi vil ha + bsr startsleepdetect + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) + lea (intextbuffer,NodeBase),a2 + moveq.l #0,d3 ; antall tegn i buffer + moveq.l #0,d4 ; cursorpos i stringen + moveq.l #80,d0 + move.l a2,a0 + bsr memclr ; tømmer stringen helt + move.w d3,(intextchar,NodeBase) +getline2 ; her hopper edline inn + bclr #31,d5 ; kan ikke ha ansi + move.w (Userbits+CU,NodeBase),d0 ; bruker han fse ? + andi.w #USERF_FSE,d0 + beq.b 0$ + bset #31,d5 +0$ moveq.l #0,d6 ; peker i bufferet der current linje er + move.l d6,(SerTotOut,NodeBase) ; sletter ut teller + + move.w (Historyoffset,NodeBase),d6 ; (forandres med pil opp/ned) + lea (historybuffer,NodeBase),a3 +1$ move.b d4,(cursorpos,NodeBase) + bsr readchar + bmi 2$ ; spesial taster + move.b (readcharstatus,NodeBase),d1 ; noe spess ? + bne 7$ ; ja, kast'n ut + cmpi.b #13,d0 ; return ? + beq 3$ ; ja, ferdig + cmpi.b #10,d0 ; linefeed ? + beq 3$ ; ja, ferdig + cmpi.b #24,d0 ; CTRL-X + beq 4$ + cmpi.b #8,d0 ; backspace ? + beq.b 5$ + cmpi.b #$7f,d0 + beq.b 6$ ; del + cmpi.b #9,d0 ; Tab ? + beq.b 1$ ; ja, dropper + + cmp.w d3,d2 ; er det plass ? + bls.b 1$ ; nei, glemmer tegnet + move.w d3,d1 ; lengden +11$ move.b (0,a2,d1.w),(1,a2,d1.w) ; flytter alle tegnene etter + subi.w #1,d1 + cmp.w d4,d1 ; pos, len-n + bge.b 11$ ; ikke flyttet alle enda +14$ move.b d0,(1,a2,d1.w) + addi.w #1,d3 ; len + addi.w #1,d4 ; pos + + btst #31,d5 + beq.b 13$ + cmp.w d4,d3 ; er vi på enden ? + beq.b 13$ ; jepp. ikke insertchar. + move.b d0,d5 + lea (ansiinschartext),a0 + bsr getline110 + move.b d5,d0 +13$ tst.b (readingpassword,NodeBase) ; gir ekko + beq.b 12$ + move.b #'.',d0 ; men bare '.' hvis det er passord +12$ bsr writechari + bra 1$ + +6$ cmp.w d4,d3 ; er vi på enden ? + beq 1$ ; jepp. nop + move.w d4,d0 +61$ move.b (1,a2,d0.w),(0,a2,d0.w) + addi.w #1,d0 + cmp.w d3,d0 + bls.b 61$ + subi.w #1,d3 + lea (ansidelchartext),a0 + bsr getline110 + bra 1$ + +5$ move.w d4,d0 ; backspace + beq 1$ ; er i enden +51$ move.b (0,a2,d0.w),(-1,a2,d0.w) + addi.w #1,d0 + cmp.w d3,d0 + bls.b 51$ + subi.w #1,d3 + subi.w #1,d4 + cmp.w d3,d4 + bne.b 52$ + lea (deltext),a0 + moveq.l #3,d0 + bsr writetextleni + bra 1$ + +52$ lea (ansilefttext),a0 ; flytter til venstre + bsr writetext + lea (ansidelchartext),a0 + bsr getline110 + bra 1$ + +4$ moveq.l #80,d0 ; behandler CTRL-X + move.l a2,a0 + bsr memclr ; tømmer stringen helt + move.w d3,d5 + bsr 70$ + moveq.l #0,d3 ; strlen + moveq.l #0,d4 ; pos + bra 1$ + + +2$ cmpi.w #20,d0 ; er det funksjonstaster ? + bcs 1$ ; ja, vil ikke ha dem. + bhi.b 21$ ; 20 = opp +; tst.b readingpassword(NodeBase) ; ikke hvis vi leser passord +; bne 1$ + bsr 80$ ; finner forige + beq 26$ ; fant ingen + move.w d0,d6 + bsr 60$ + bsr 100$ + bsr 71$ + move.l a2,a0 + bsr writetexti + bra 1$ + +21$ cmpi.w #21,d0 ; 21 = ned + bne.b 22$ +; tst.b readingpassword(NodeBase) ; ikke hvis vi leser passord +; bne 1$ + bsr 90$ ; finner forige + beq 26$ ; fant ingen + move.w d0,d6 + bsr 60$ + bsr 100$ + bsr 71$ + move.l a2,a0 + bsr writetexti + bra 1$ + +26$ tst.l d3 ; har vi en string ? + beq 1$ ; nei, nop + bra 4$ + +22$ cmpi.w #22,d0 ; 22 = høyre + bne.b 23$ + cmp.w d3,d4 + bcc 1$ ; er på enden + addi.w #1,d4 ; øker med en + lea (ansirighttext),a0 + bsr getline110 + bra 1$ + +23$ cmpi.w #23,d0 ; 23 = venstre + bne.b 24$ + tst.w d4 + beq 1$ ; er på starten + btst #31,d5 ; fse ? + beq 5$ ; nei, da tar vi det som backspace + subi.w #1,d4 ; minker med en + lea (ansilefttext),a0 ; flytter til venstre + bsr getline110 + bra 1$ + +24$ cmpi.w #24,d0 ; 24 = shift høyre + bne.b 25$ + cmp.w d3,d4 + bcc 1$ ; er på enden + move.w d3,d0 + sub.w d4,d0 + move.b #'C',d1 + bsr stepcursor + move.w d3,d4 + bra 1$ + +25$ cmpi.w #25,d0 ; 25 = shift venstre + bne 1$ ; ukjent + tst.w d4 + beq 1$ ; er på starten + btst #31,d5 ; fse ? + beq 4$ ; nei, da tar vi det som ctrl-x + move.w d4,d0 + move.b #'D',d1 + bsr stepcursor + moveq.l #0,d4 + bra 1$ + +3$ bsr outimage ; sender return tilbake + clr.b (dosleepdetect,NodeBase) + tst.w d3 + beq.b 31$ ; ingen tegn +32$ move.b (-1,a2,d3.w),d0 ; fjerner space på slutten + cmp.b #' ',d0 + bne.b 33$ + subq.w #1,d3 + bne.b 32$ + +33$ move.b #0,(a2,d3.w) +31$ move.l a2,a0 ; returnerer string + move.l a3,a1 + bsr insertinhistory +; move.l a3,a0 +; bsr writestringspes + move.l a2,a0 ; returnerer string + move.w d3,d0 ; og lengde + bra.b 9$ + +7$ clr.b (dosleepdetect,NodeBase) + moveq.l #0,d0 +; bra.b 9$ +9$ + pop a2/a3/d2-d6 + rts + +60$ cmp.w d3,d4 ; len,pos + bcc.b 62$ ; er på enden + addi.w #1,d4 ; øker med en + lea (ansirighttext),a0 + bsr getline110 + bra.b 60$ +62$ rts + + +70$ move.l (curprompt,NodeBase),d0 ; har vi noe prompt å skrive ut ? + beq.b 71$ ; nei + bsr outimage ; ja, ut med det (nl først) + move.l (curprompt,NodeBase),a0 + bsr writetexti + bra.b 72$ ; ferdig +71$ subi.w #1,d5 ; sletter alle tegnene på skjermen + bcs.b 72$ ; ferdig + lea (deltext),a0 + moveq.l #3,d0 + bsr writetextleni + bra.b 71$ +72$ move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) + rts + +80$ move.w d6,d1 ; søker til forige kommando +81$ subi.w #1,d1 + and.w #$3ff,d1 + cmp.w d1,d6 + beq.b 89$ ; fant ingen + tst.b (0,a3,d1.w) ; først til vi kommer til en kommando + beq.b 81$ + +82$ subi.w #1,d1 ; så til begynnelsen + and.w #$3ff,d1 + cmp.w d1,d6 + beq.b 89$ ; fant ingen + tst.b (0,a3,d1.w) + bne.b 82$ + addi.w #1,d1 + and.w #$3ff,d1 + move.w d1,d0 + clrz ; fant en +89$ rts + + +90$ move.w d6,d1 ; søker til neste kommando +91$ addi.w #1,d1 + and.w #$3ff,d1 + cmp.w d1,d6 + beq.b 99$ ; fant ingen + tst.b (0,a3,d1.w) ; først til vi kommer til en slutten av denne + bne.b 91$ + +92$ addi.w #1,d1 ; så til begynnelsen av neste + and.w #$3ff,d1 + cmp.w d1,d6 + beq.b 99$ ; fant ingen + tst.b (0,a3,d1.w) + beq.b 92$ + move.w d1,d0 + clrz ; fant en +99$ rts + +100$ moveq.l #0,d1 + move.l a2,a0 + move.w d6,d0 +101$ move.b (0,a3,d0.w),(a0)+ + beq.b 102$ + addi.w #1,d0 + and.w #$3ff,d0 + addq.l #1,d1 + cmp.w d1,d2 ; Er det for mye ? + bhi.b 101$ ; nei +102$ move.w d3,d5 ; husker gammel strlen + move.l d1,d3 ; strlen + move.l d1,d4 ; pos + move.w d1,d0 ; sletter resten + neg.w d0 + addi.w #80,d0 + bmi.b 109$ + bsr memclr +109$ rts + +getline110 + move.l d2,-(a7) + move.b (FSEditor,NodeBase),d2 + move.b #1,(FSEditor,NodeBase) + bsr writetexti + move.b d2,(FSEditor,NodeBase) + move.l (a7)+,d2 + rts + +; d0.w = numsteps +; d1.b = 'D'/'C' +stepcursor + push d3 + move.b d1,d3 + link.w a3,#-20 + move.l sp,a0 + move.b #'',(a0)+ + move.b #'[',(a0)+ + bsr konverterw + move.b d3,(a0)+ + move.b #0,(a0) + move.l sp,a0 + bsr getline110 + unlk a3 + pop d3 + rts + +; a0 = string +; a1 = historybuffer +insertinhistory + push a3 + move.l a1,a3 + tst.b (readingpassword,NodeBase) ; ikke hvis vi leser passord + bne.b 9$ + tst.b (userok,NodeBase) ; er brukeren inne ? + beq.b 9$ ; nei. + + moveq.l #0,d0 ; setter opp offseten + move.w (Historyoffset,NodeBase),d0 + + move.b (a0)+,d1 + beq.b 9$ ; ikke noe i det hele tatt. Ut + bra.b 2$ + +1$ move.b (a0)+,d1 ; kopierer inn på riktig sted + beq.b 3$ +2$ move.b d1,(0,a3,d0.w) + addi.w #1,d0 + and.w #$3ff,d0 + bra.b 1$ + +3$ move.b (0,a3,d0.w),d1 ; fyller ut med 0'er til neste 0 + beq.b 4$ + move.b #0,(0,a3,d0.w) + addi.w #1,d0 + and.w #$3ff,d0 + bra.b 3$ +4$ addi.w #1,d0 + and.w #$3ff,d0 + move.w d0,(Historyoffset,NodeBase) +9$ pop a3 + rts + + IFD notyet +writestringspes + push a2/d2 + move.w #256,d2 + move.l a0,a2 + bsr outimage + +1$ move.b (a2)+,d0 + bne.b 2$ + move.b #'_',d0 +2$ bsr writechar + subi.w #1,d2 + bne.b 1$ + + bsr outimage + pop a2/d2 + rts + ENDC + +testbreak + IFD nobreak + clrz + rts + ENDC + move.b (con_tegn,NodeBase),d0 + cmpi.b #27,d0 ; Sjekker etter ESC + beq.b 9$ + cmpi.b #3,d0 ; Sjekker etter CTLR C + beq.b 9$ + cmpi.b #11,d0 ; Sjekker etter CTLR K + IFND DEMO + beq.b 9$ + move.b (ser_tegn,NodeBase),d0 + cmpi.b #27,d0 ; Sjekker etter ESC + beq.b 9$ + cmpi.b #3,d0 ; Sjekker etter CTLR C + beq.b 9$ + cmpi.b #11,d0 ; Sjekker etter CTLR K + ENDC +9$ rts + + +startsleepdetect + move.b (userok,NodeBase),d0 + bne.b startsleepdetect1 + rts +startsleepdetect1 + tst.w (SleepTime+CStr,MainBase) ; Har vi sleepgrense ? + beq.b 9$ ; nei .. + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq.b 9$ ; ja -> ingen sleeptimer + ENDC + move.w (Setup+Nodemem,NodeBase),d1 + and.w #SETUPF_NoSleepTime+SETUPF_NullModem,d1 ; Nullmodem eller ingen sleeptime ? + bne.b 9$ ; Ja, da har vi ikke sleep + push d0/d1/a0/a1/a6 + move.b #1,(dosleepdetect,NodeBase) + move.l (dosbase),a6 + lea (lastchartime,NodeBase),a0 ; lagrer dette som tid for + move.l a0,d1 ; siste tastetrykk + jsrlib DateStamp + move.l (exebase),a6 + bsr stoptimeouttimer + move.w (SleepTime+CStr,MainBase),d0 + bsr starttimeouttimer +8$ pop d0/d1/a0/a1/a6 +9$ rts + +***************************************************************** +* IO rutiner * +***************************************************************** + +*************************************** +* Hoved vente løkke. Venter på tegn fra serial og keyboard, +* timer msg, intuition msg'er og public porten +*************************************** + +readchar + move.l (gotbits,NodeBase),d0 ; har vi noe fra før ? + bne.b 0$ ; ja + moveq.l #0,d0 + move.l (pastetext,NodeBase),d1 ; sjekker om det ligger tegn og venter + bne.b 0$ ; det gjorde det. + move.l (waitbits,NodeBase),d0 ; det hadde vi ikke, så da + jsrlib Wait ; venter vi + move.l d0,(gotbits,NodeBase) ; husker de vi fikk + +0$ bsr testdoconsole + beq.b 1$ + bsr doconsole + beq.b readchar + rts + +1$ bsr testdoserial + beq.b 2$ + bsr doserial + bne.b 11$ + bmi.b readchar +11$ rts + +2$ bsr testdointuition + beq.b 3$ + bsr dointuition + bne.b readchar + rts + +3$ bsr testdointernode + beq.b 4$ + bsr dointernode + beq.b readchar + notz + clrn + rts + +4$ bsr testdopublicport + beq.b 5$ + bsr handlepublicport + beq.b 41$ + tst.b (readcharstatus,NodeBase) ; noe galt ? + notz + bne readchar ; fortsetter +41$ rts + +5$ bsr testdotimer + beq.b 6$ + bsr dotimer + beq readchar + setz + rts + +6$ bsr testshowwinsig + beq readchar + bsr closeshowuserwindow + bra readchar + +; input d0 = signaler. Må ikke ødelegge d0 (hvis den ikke slår til) +testshowwinsig + move.l d0,d1 ; console + and.l (showwinsigbit,NodeBase),d1 + beq.b 9$ + move.l (showwinsigbit,NodeBase),d0 + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +testdoconsole + move.l (pastetext,NodeBase),d1 ; sjekker om det ligger tegn og venter + bne.b 9$ ; det gjorde det. + move.l (cwritereq,NodeBase),d1 ; get write structure + bne.b 1$ + move.l (consigbit,NodeBase),d1 ; sletter dette bit'et + not.l d1 ; fra de vi fikk fra Wait + and.l d1,(gotbits,NodeBase) + setz + bra.b 9$ ; no console +1$ move.l d0,d1 ; console + and.l (consigbit,NodeBase),d1 + beq.b 9$ + move.l (consigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +; input d0 = signaler. Må ikke ødelegge d0 +testdoserial + move.l d0,d1 ; serial + and.l (sersigbit,NodeBase),d1 + beq.b 9$ + move.l (sersigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +; input d0 = signaler. Må ikke ødelegge d0 +testdointuition + move.l d0,d1 ; intuition + and.l (intsigbit,NodeBase),d1 + beq.b 9$ + move.l (windowadr,NodeBase),d1 + bne.b 1$ ; vi har vindu + move.l (intsigbit,NodeBase),d1 ; sletter dette bit'et + not.l d1 ; fra de vi fikk fra Wait + and.l d1,(gotbits,NodeBase) + setz + bra.b 9$ ; no window +1$ move.l (intsigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +; input d0 = signaler. Må ikke ødelegge d0 +testdointernode + move.l d0,d1 ; internode + and.l (intersigbit,NodeBase),d1 + beq.b 9$ + move.l (intersigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +; input d0 = signaler. Må ikke ødelegge d0 +testdopublicport + move.l d0,d1 ; public port + and.l (publicsigbit,NodeBase),d1 + beq.b 9$ + and.l (publicsigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +; input d0 = signaler. Må ikke ødelegge d0 +testdotimer + move.l d0,d1 + and.l (timer2sigbit,NodeBase),d1 ; timer + beq.b 9$ + move.l (timer2sigbit,NodeBase),d0 ; sletter dette bit'et + not.l d0 ; fra de vi fikk fra Wait + and.l d0,(gotbits,NodeBase) + clrz +9$ rts + +doconsole + move.l (creadreq,NodeBase),d0 + beq 9$ ; ikke noe console... + move.l (pastetext,NodeBase),d0 ; sjekker om det ligger tegn og venter + beq.b 13$ ; det gjorde det ikke, vanelig console. + jsr (getnextsnipchar) + beq 104$ ; siste tegnet (console read er i gang) + bsr 20$ ; behandler tegnet + bne 104$ + bra 101$ +13$ move.l (creadreq,NodeBase),a1 ; Console + move.l (MN_REPLYPORT,a1),a0 + jsrlib GetMsg + tst.l d0 + beq 9$ ; fake + + move.l (dosbase),a6 + lea (lastchartime,NodeBase),a0 ; lagrer tid for siste + move.l a0,d1 ; tastetrykk + jsrlib DateStamp + move.l (exebase),a6 + lea (con_tegn,NodeBase),a0 + moveq.l #0,d0 + move.b (a0),d0 + tst.b (FSEditor,NodeBase) ; Vi er i FSE. Ingen dekoding + bne 1$ + cmpi.b #$9b,d0 ; ansi sekvens ? + bne 2$ ; nope + + moveq.l #0,d1 +5$ move.w d1,-(a7) + moveq.l #1,d0 ; Spesial sekvens. Les neste + move.l (creadreq,NodeBase),a1 + move.w #CMD_READ,(IO_COMMAND,a1) + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jsrlib DoIO + move.w (a7)+,d1 + lea (con_tegn,NodeBase),a0 + move.b (a0),d0 + cmp.w #-1,d1 + beq.b 10$ ; holder på med shift-pil + cmpi.b #'~',d0 + beq.b 6$ + cmpi.b #'A',d0 ; piltaster eller noe annet rart. + bcc.b 7$ + cmp.b #' ',d0 ; space + bne.b 8$ + moveq.l #-1,d1 + bra.b 5$ ; leser neste + +8$ subi.b #'0',d0 + bcs 4$ ; Ikke tall + cmpi.b #9,d0 + bhi 4$ ; Ikke tall + mulu.w #10,d1 + andi.w #$f,d0 + add.w d0,d1 + bra.b 5$ +7$ subi.b #'A',d0 + bcs 4$ + cmpi.b #4,d0 + bcc 4$ + addi.w #20,d0 ; legger til for piltaster +11$ move.w d0,d1 +6$ move.w d1,-(sp) + lea (con_tegn,NodeBase),a0 + move.b #0,(con_tegn,NodeBase) ; tømmer for sikkerhetsskyld + bsr initconread + move.b #1,(tegn_fra,NodeBase) ; Siste tegnet fra con, spesialtegn. + move.w (sp)+,d0 + clrz + setn + bra.b 9$ + +10$ cmp.b #'v',d0 + bne.b 12$ + tst.b (in_waitforcaller,NodeBase) + bne.b 4$ ; ikke noe snip'ing her + jsr dosnip + beq.b 4$ + bra.b 2$ +12$ subi.b #'@',d0 + bcs.b 4$ + cmpi.b #2,d0 + bcc.b 4$ + addi.w #24,d0 ; legger til for shift-piltaster + bra.b 11$ + +2$ bsr 20$ + bne.b 4$ +1$ move.w d0,-(sp) + bsr initconread + move.w (sp)+,d0 +101$ move.b #1,(tegn_fra,NodeBase) ; Siste tegnet fra con. + clrzn + bra.b 9$ + +4$ move.b #0,(con_tegn,NodeBase) ; tømmer for sikkerhetsskyld + bsr initconread + bra.b 105$ +104$ move.b #0,(con_tegn,NodeBase) ; tømmer for sikkerhetsskyld +105$ setz + +9$ rts + +20$ cmpi.b #31,d0 ; kontroll kode ? + bhi.b 21$ ; nope + cmpi.b #8,d0 ; Back space + beq.b 21$ + cmpi.b #24,d0 ; ctrl-x + beq.b 21$ + cmpi.b #21,d0 ; ctrl-u + bne.b 23$ + move.b #24,d0 ; forvanler til ctrl-x + bra.b 21$ +23$ cmpi.b #9,d0 ; TAB + beq.b 21$ + cmpi.b #13,d0 ; Carrige return + beq.b 21$ + cmpi.b #10,d0 ; Line Feed + bra.b 29$ +21$ setz +29$ rts + + IFND DEMO +doserial + move.l (sreadreq,NodeBase),a1 ; Serial + move.l (MN_REPLYPORT,a1),a0 + jsrlib GetMsg + tst.l d0 + setn + beq 9$ ; lure signal. Ut + move.l (dosbase),a6 + lea (lastchartime,NodeBase),a0 ; lagrer tid for siste + move.l a0,d1 ; tastetrykk + jsrlib DateStamp + move.l (exebase),a6 + move.l (sreadreq,NodeBase),a1 + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + moveq.l #0,d0 + move.b (ser_tegn,NodeBase),d0 ; Henter lest tegn + tst.b (FSEditor,NodeBase) ; Vi er i FSE. Ingen dekoding + bne 1$ + + move.b (serescstat,NodeBase),d1 ; parser ESC sekvenser + bne.b 3$ + cmpi.b #27,d0 ; esc ? + bne 1$ ; nope + move.b #1,(serescstat,NodeBase) + bra.b 2$ + +3$ cmpi.b #1,d1 + bne.b 4$ + cmpi.b #'[',d0 + bne 5$ + move.b #2,(serescstat,NodeBase) + bra.b 2$ + +4$ cmp.b #'K',d0 ; shift høyre + bne.b 41$ + moveq.l #24,d0 ; shift høyre = 24 + bra.b 43$ +41$ cmp.b #'H',d0 ; shift venstre + bne.b 42$ + moveq.l #25,d0 ; shift venstre = 25 + bra.b 43$ +42$ subi.b #'A',d0 + bcs.b 7$ + cmpi.b #4,d0 + bcc.b 7$ + addi.w #20,d0 ; legger til for piltaster +43$ move.b #0,(serescstat,NodeBase) + move.w d0,-(sp) ; og lagrer + move.b #0,(ser_tegn,NodeBase) ; tømmer for sikkerhetsskyld + bsr initserread + move.w (sp)+,d0 ; Henter ut lest tegn + move.b #2,(tegn_fra,NodeBase) ; Siste tegnet fra ser. + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_NullModem,d1 ; Nullmodem ? + bne.b 62$ ; jepp, no CD checking. + move.l (sreadreq,NodeBase),a1 + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + bne.b 8$ ; Nei, "NoCarrier" + ENDC +62$ clrz + setn + bra.b 9$ + +7$ move.b #0,(serescstat,NodeBase) +2$ bsr initserread + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 61$ ; jepp, no CD checking. + move.l (sreadreq,NodeBase),a1 + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + bne.b 8$ ; Nei, "NoCarrier" + ENDC +61$ setzn + bra.b 9$ ; nulltegn. Les neste + +5$ move.b #0,(serescstat,NodeBase) +1$ move.w d0,-(sp) ; og lagrer + move.b #0,(ser_tegn,NodeBase) ; tømmer for sikkerhetsskyld + bsr initserread + move.w (sp)+,d0 ; Henter ut lest tegn + move.b #2,(tegn_fra,NodeBase) ; Siste tegnet fra ser. + move.l (sreadreq,NodeBase),a1 + + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d1 + btst #SETUPB_NullModem,d1 ; Nullmodem ? + bne.b 6$ ; jepp, no CD checking. + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + bne.b 8$ ; Nei, "NoCarrier" + ENDC +6$ bsr translateserinchar ; fra tegnsett x til ISO + clrn + bne.b 9$ + setn ; nulltegn. Les neste + bra.b 9$ + +8$ move.b #NoCarrier,(readcharstatus,NodeBase) + setz ; No carrier, Logoff !! + clrn +9$ rts + ENDC + +; må ikke legge ting på stack'en. handleintuition pop'er return adressen hit +dointuition + bsr handleintuition + btst #DoDivB_HideNode,(DoDiv,NodeBase) + beq.b 1$ + bclr #DoDivB_HideNode,(DoDiv,NodeBase) + bsr hidenode +1$ move.b (readcharstatus,NodeBase),d0 + notz + rts + +dointernode + move.l (nodenoden,NodeBase),a0 + move.w (Nodestatus,a0),d0 + cmpi.w #8,d0 ; chat'er vi ? + beq.b 1$ ; Jepp. + cmpi.w #60,d0 ; privat chat'er vi ? + beq.b 1$ ; Jepp. + cmpi.w #44,d0 ; sysop chat'er vi ? + beq.b 1$ ; Jepp. + tst.l (curprompt,NodeBase) + beq.b 9$ ; Kan ikke behandle nå + bsr checkintermsgs ; skriver ut intermsg's + beq.b 9$ ; Det var ikke noe til oss + bsr outimage + move.l (curprompt,NodeBase),a0 + bsr writetexti + lea (intextbuffer,NodeBase),a0 ; oppdatere de vi har skrevet ... + bsr writetexti + lea (intextbuffer,NodeBase),a0 + bsr strlen + beq.b 2$ ; ingen lengde + moveq.l #0,d1 + move.b (cursorpos,NodeBase),d1 + sub.l d1,d0 + beq.b 2$ + bcs.b 2$ + move.b #'D',d1 + bsr stepcursor +2$ move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; nustiller more faren + setz + bra.b 9$ +1$ move.l (tmpstore,NodeBase),d0 ; vi sysop chat'er, så vi vil *TROLIG BUG. Andre ting bruker også tmpstore. FIX ME * + notz ; ikke få rapportert intersig +9$ rts + +dotimer move.l (timer2req,NodeBase),a1 ; henter melding + move.l (MN_REPLYPORT,a1),a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l (nodenoden,NodeBase),a0 ; chat'er vi ? + move.w (Nodestatus,a0),d1 + cmpi.w #28,d1 ; Paging ? + notz + bne 9$ ; ja, Returnerer + move.w (SleepTime+CStr,MainBase),d0 ; Har vi sleepgrense ? + beq 9$ ; nei .. + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Lokal node ? + beq 9$ ; ja, da har vi ikke sleep + ENDC + move.w (Setup+Nodemem,NodeBase),d1 + and.w #SETUPF_NoSleepTime+SETUPF_NullModem,d1 ; Nullmodem eller ingen sleeptime ? + notz + beq.b 9$ ; Ja, da har vi ikke sleep + + move.l (nodenoden,NodeBase),a0 ; chat'er vi ? + move.w (Nodestatus,a0),d1 + cmpi.w #8,d1 ; nodestatus = Chatting + beq.b 9$ ; ja, glemmer + cmpi.w #44,d1 ; nodestatus = Sysop Chatting + beq.b 9$ ; ja, glemmer + + move.b (userok,NodeBase),d0 ; det er logintimer + beq.b 1$ + tst.b (dosleepdetect,NodeBase) ; skal vi reagere ? + beq.b 9$ ; nei + move.l (dosbase),a6 ; finner tiden nå + lea (tmplargestore,NodeBase),a0 + move.l a0,d1 + jsrlib DateStamp + move.l (exebase),a6 + lea (tmplargestore,NodeBase),a1 + lea (lastchartime,NodeBase),a0 ; tiden for siste tastetrykk + bsr calcminsnoround ; d0 = minutter siden siste tast + moveq.l #0,d1 + move.w (SleepTime+CStr,MainBase),d1 ; sjekker mot sleepgrensen + cmp.l d1,d0 + bcc.b 1$ ; oops. Han har sovna. + addq.l #1,d0 ; legger til et minutt for å + bsr starttimeouttimer ; være på den sikre siden + setz + bra.b 9$ +1$ move.w #-1,(linesleft,NodeBase) ; Dropper all more saker .. + lea (lfellasleeptext),a0 + bsr writetexti + move.b #Timeout,(readcharstatus,NodeBase) + clrz ; timeout .... +9$ rts + +;handleintuition1 ; hack for å unslippe kræsj med eject +; bsr handleintuition ; user mens brukeren pager sysop +; rts + +handleintuition + move.l (windowadr,NodeBase),d0 + beq.b 9$ ; no port +0$ move.l (intmsgport,NodeBase),a0 + jsrlib GetMsg + tst.l d0 + beq 9$ + move.l d0,a1 + move.l (im_Class,a1),d0 + cmpi.l #IDCMP_MENUPICK,d0 + beq.b 1$ + cmpi.l #IDCMP_REFRESHWINDOW,d0 + beq.b 10$ + cmpi.l #IDCMP_NEWSIZE,d0 + beq.b 20$ +4$ jsrlib ReplyMsg + bra.b 0$ +1$ move.w (im_Code,a1),-(a7) + jsrlib ReplyMsg + move.w (a7)+,d0 +3$ cmpi.w #MENUNULL,d0 + beq.b 0$ + bsr handlemenu + bmi.b 999$ ; Vi skal ut. Vekk med + beq.b 99$ + bra.b 3$ +9$ clrz + bra.b 99$ +999$ addq.l #4,a7 ; fjerner retur adressen + clrn +99$ rts + +10$ push a1/a6 + move.l (intbase),a6 + move.l (windowadr,NodeBase),a0 + jsrlib BeginRefresh + move.l (windowadr,NodeBase),a0 + jsrlib EndRefresh + pop a1/a6 + bra.b 4$ + +20$ jsrlib ReplyMsg + move.l (windowadr,NodeBase),a0 + move.w (wd_Width,a0),d0 + cmpi.w #minwindowx,d0 + bhi.b 21$ + move.w (wd_Height,a0),d0 + cmpi.w #minwindowy,d0 + bhi.b 21$ + move.b #1,(Tinymode,NodeBase) + bsr writetinystatus + bra.b 29$ +21$ move.b (Tinymode,NodeBase),d0 + beq.b 29$ + move.b #0,(Tinymode,NodeBase) + move.b (in_waitforcaller,NodeBase),d0 ; er vi i waitforcaller ? + beq.b 22$ + bsr drawwaitforcallerscreen + bra.b 29$ +22$ lea (NormAtttext),a0 ; sender ANSI reset. + bsr writecontext + lea (clearwindowtext),a0 + bsr writecontext +29$ bra 0$ + +handlemenu + push d2 + move.l d0,d2 ; husker menukode + move.l d0,d1 + lsr.l #5,d1 + andi.w #$3f,d1 ; finner item nummeret + andi.w #$1f,d0 ; finner menu nummeret + bne 1$ ; ikke menu 0 + move.w d1,d0 + bne.b 2$ ; ikke item 0 + + move.w d2,d0 ; item 00 (sysopchat) + jsr (sysopchat) + setz + bmi 9$ ; vi skal avslutte chat + bra 6$ + +2$ cmpi.w #1,d0 ; menuitem 1 (user info) + bne.b 3$ + jsr (menu_showuser) + bra 6$ + +3$ cmpi.w #2,d0 ; menuitem 2 (eject user) + bne 103$ + move.l (Name+CU,NodeBase),d0 ; eject. Men er det noen inne ? + beq 6$ ; nei ... Da dropper vi saken.. + move.w #-1,(linesleft,NodeBase) ; Dropper all more saker .. + lea (throwouttext1),a0 + bsr writetexti + lea (throwouttext2),a0 + bsr writetexti + move.b #Thrownout,(readcharstatus,NodeBase) + setzn + bra 9$ + +103$ cmpi.w #3,d0 ; menuitem 3 (Kill user) + bne 105$ + move.l (Name+CU,NodeBase),d0 ; Kill Men er det noen inne ? + beq 6$ ; nei ... Da dropper vi saken.. + move.l (Usernr+CU,NodeBase),d0 ; Er vi supersysop ? + cmp.l (SYSOPUsernr+CStr,MainBase),d0 + beq 6$ ; ja, ikke kille denne.. + lea (killathrowntext),a0 + bsr writetexti + lea (Userbits+CU,NodeBase),a0 + ori.w #USERF_Killed,(a0) + moveq.l #2,d0 + bsr saveuserarea + move.b #Thrownout,(readcharstatus,NodeBase) + setzn + bra 9$ + +105$ cmpi.w #5,d0 ; menuitem 5 (Zoom window) + bne.b 106$ + move.l (intbase),a6 + move.l (windowadr,NodeBase),a0 + jsrlib ZipWindow + move.l (windowadr,NodeBase),a0 + jsrlib WindowToFront + move.l (exebase),a6 + bra 6$ + +106$ cmpi.w #7,d0 ; menuitem 7 (Hode node) + bne 6$ ; ikke flere item'er i meny 0 + bset #DoDivB_HideNode,(DoDiv,NodeBase) + bra 6$ + +1$ cmpi.w #1,d0 + bne 6$ ; ikke menu 1 + move.w d1,d0 + bne.b 4$ ; ikke item 0 + tst.b (userok,NodeBase) ; er user inne ? + beq 6$ ; nei. + move.w (TimeLimit+CU,NodeBase),d0 ; item 10, add 5 min + beq 6$ + addi.w #5,d0 + bra.b 41$ + +4$ cmpi.w #1,d0 + bne.b 5$ + tst.b (userok,NodeBase) ; er user inne ? + beq 6$ ; nei. + move.w (TimeLimit+CU,NodeBase),d0 ; item 11, sub 5 min + beq 6$ ; 0 dvs uendelig tid + subi.w #5,d0 + bhi.b 41$ ; gikk bra. + move.w #1,d0 ; minimumm er 1.. +41$ move.w d0,(TimeLimit+CU,NodeBase) + bra.b 6$ + +5$ cmpi.w #2,d0 + bne.b 51$ + tst.b (userok,NodeBase) ; er user inne ? + beq.b 6$ ; nei. + move.w (FileLimit+CU,NodeBase),d0 ; item 12, add 5 f min + beq.b 6$ + addi.w #5,d0 + bra.b 58$ + +51$ cmpi.w #3,d0 + bne.b 52$ + tst.b (userok,NodeBase) ; er user inne ? + beq.b 6$ ; nei. + move.w (FileLimit+CU,NodeBase),d0 ; item 13, sub 5 f min + beq.b 6$ ; 0 dvs uendelig tid + subi.w #5,d0 + bhi.b 58$ ; gikk bra. + move.w #1,d0 ; minimumm er 1.. +58$ move.w d0,(FileLimit+CU,NodeBase) + bra.b 6$ + +52$ cmpi.w #5,d0 ; 4 = barlabel + bne.b 6$ ; ikke flere itemer i meny 1 + move.b (Cflags+CStr,MainBase),d0 ; Tillater vi tmp sysop acc ? + andi.b #CflagsF_AllowTmpSysop,d0 + beq.b 6$ ; nope + tst.b (userok,NodeBase) ; er user inne ? + beq.b 6$ ; nei. + lea (tmpsysopacctext),a0 + bsr writetext + lea (takenawaytext),a0 + eori.b #1,(tmpsysopstat,NodeBase) + beq.b 53$ + lea (giventext),a0 +53$ bsr writetexto +; bra.b 6$ + +6$ move.l (intbase),a6 + move.w d2,d0 + move.l (a7),d2 ; henter ut menyverdien + move.l (node_menu,NodeBase),a0 + jsrlib ItemAddress + tst.l d0 + bne.b 7$ + move.w #MENUNULL,d0 + bra.b 8$ +7$ move.l d0,a0 + move.w (mi_NextSelect,a0),d0 + clrz +8$ clrn +9$ pop d2 + move.l (exebase),a6 + rts + +setsysopcheckmark + moveq.l #1,d0 + bra.b remsysopcheckmark1 +remsysopcheckmark + moveq.l #0,d0 +remsysopcheckmark1 + push a6/d2 + move.l d0,d2 + move.l (intbase),a6 + move.l (windowadr,NodeBase),d0 + beq.b 9$ + move.l d0,a0 + jsrlib ClearMenuStrip + + move.l (node_menu,NodeBase),a0 + move.l (mu_FirstItem,a0),a0 + andi.w #~CHECKED,(mi_Flags,a0) + tst.l d2 + beq.b 1$ + or.w #CHECKED,(mi_Flags,a0) +1$ + move.l (node_menu,NodeBase),a1 + move.l (windowadr,NodeBase),a0 + jsrlib ResetMenuStrip +9$ pop a6/d2 + rts + +handlepublicport + push d2/a2/d3/d4/a3 + moveq.l #0,d2 +0$ move.l (nodepublicport,NodeBase),a0 + jsrlib GetMsg + tst.l d0 + beq 9$ ; ferdig + move.l d0,a2 ; husker meldingen (front_login er avhengig av at denne ligger i a2) + move.l d0,a0 + XREF CheckRexxMsg + jsr (CheckRexxMsg) ; arexx melding ?? + tst.w d0 + beq.b 1$ ; nope, vanelig + move.l (ARG0,a2),a0 ; arexx meldinger... + bsr doarexxcmd + move.l d0,a1 ; gjemmer retur koden, må ikke røre CC'ene + jsrlib GetCC + move.l d1,d3 ; Retur verdi (til prosedyren her i abbs) + move.w d0,d2 ; CC reg + move.l a1,d4 ; retur koden (til arexx kalleren) + move.l a0,a3 ; husker strengen + move.l (nodepublicport,NodeBase),a0 ; er det flere meldinger til oss? + move.l (MP_MSGLIST+LH_HEAD,a0),d0 + beq.b 2$ ; nope + move.l (publicsigbit,NodeBase),d0 ; setter signalet igjen + move.l d0,d1 + jsrlib SetSignal + +2$ move.l a2,a1 ; tar reply + tst.l (MN_REPLYPORT,a1) ; har vi reply port ? + beq.b 3$ ; nope + move.b (readcharstatus,NodeBase),d0 + beq.b 7$ + moveq.l #20,d4 ; noe har skjedd. Sett RC til 20 +7$ moveq.l #0,d0 + move.l d0,(rm_Result2,a2) + move.l d4,(rm_Result1,a2) ; setter RC + bne.b 4$ ; error + move.l a3,d0 ; har vi en streng ? + beq.b 4$ ; nope + move.l (ACTION,a2),d0 ; vil han ha en string ? + btst #RXFB_RESULT,d0 + beq.b 4$ ; nope + move.l (rexbase),d0 ; henter libbase + beq.b 4$ ; har ingen! + move.l d0,a6 + move.l a3,a0 + bsr strlen + move.l a3,a0 + jsrlib CreateArgstring + move.l a2,a1 + move.l d0,(rm_Result2,a1) + move.l (exebase),a6 +4$ jsrlib ReplyMsg ; tar reply +3$ move.l d3,d0 + bra.b 9$ + +1$ move.l a2,a0 + move.w #Error_IllegalCMD,(m_Error,a0) + lea (nodemsgportjumps),a1 + move.w (m_Command,a0),d0 + bpl.b 6$ + bclr #15,d0 + lea (privatenodemsgportjumps),a1 + cmp.w #Node_LASTPRIVCOMM,d0 ; lovlig kommando ? + bra.b 61$ +6$ cmpi.w #Node_LASTCOMM,d0 ; lovlig kommando ? +61$ bcc.b 8$ ; nei + asl.w #2,d0 + move.l (0,a1,d0.w),a1 + jsr (a1) + jsrlib GetCC + move.l d1,d3 ; Retur verdi (til prosedyren her i abbs) + move.w d0,d2 ; husker CC reg + +8$ move.l a2,d0 ; har vi fremdeles melding ? (front_login fjerner meldingen) + beq.b 82$ + move.l a2,a1 + tst.l (MN_REPLYPORT,a1) ; har vi reply port ? + beq 5$ ; nope + jsrlib ReplyMsg ; tar reply + bra.b 82$ +5$ moveq.l #ABBSmsg_SIZE,d0 + jsrlib FreeMem +82$ move.w d2,ccr + bne 0$ ; ikke ut, looper og tar alle meldingene + move.l (nodepublicport,NodeBase),a0 ; er det flere meldinger til oss? + move.l (MP_MSGLIST+LH_HEAD,a0),d0 + beq.b 81$ ; nope + move.l (publicsigbit,NodeBase),d0 ; setter signalet igjen + move.l d0,d1 + jsrlib SetSignal +81$ move.l d3,d0 +9$ move.w d2,ccr + pop d2/a2/d3/d4/a3 + rts + +; vanelige userport funksjoner. +; kalles med msg'en i a0. +; z = 1 - hopp ut av readchar +; d1 - retur verdi til amiga procedyren (hvis vi skal dit) +front_getserdev + move.w #F_Error_NoSerial,(pm_Error,a0) + move.b (RealCommsPort,NodeBase),d0 ; Setter tilbake comport +; beq 9$ ; har ingen + setz + rts + +front_sleepser + move.w #F_Error_UserOnline,(pm_Error,a0) + move.b (in_waitforcaller,NodeBase),d0 + beq.b 9$ + move.w #F_Error_NoSerial,(pm_Error,a0) + move.b (CommsPort+Nodemem,NodeBase),d0 ; Lokal node ? + beq.b 9$ ; Fy... + move.w #F_Error_OK,(pm_Error,a0) + move.b #0,(CommsPort+Nodemem,NodeBase) ; Gjør noden lokal. + bsr stopserread ; avbryter read req'en + bset #DoDivB_Sleep,(DoDiv,NodeBase) ; sett sleep + jsr (updatewindowtitle) +9$ clrz + rts + +front_awakeser + move.w #F_Error_NoSerial,(pm_Error,a0) + btst #DoDivB_Sleep,(DoDiv,NodeBase) ; har vi sleep + beq.b 9$ ; nope + move.b (RealCommsPort,NodeBase),d0 ; Setter tilbake comport + beq 9$ ; har ingen + move.b #-1,d1 + cmp.b d0,d1 + beq 9$ ; har aldri hatt + bclr #DoDivB_Sleep,(DoDiv,NodeBase) ; slett sleep + push a0/d0 + jsr (updatewindowtitle) + pop a0/d0 + move.w #F_Error_OK,(pm_Error,a0) + cmp.b (CommsPort+Nodemem,NodeBase),d0 ; ble den disablet ? + beq.b 9$ ; nei, ikke start igjen + move.b d0,(CommsPort+Nodemem,NodeBase) + bsr initserread ; starter opp en read request +9$ clrz + rts + +front_dologin + move.w #F_Error_UserOnline,(pm_Error,a0) + move.b (in_waitforcaller,NodeBase),d0 + beq 9$ ; bruker er på + move.w #F_Error_NoSerial,(pm_Error,a0) + move.b (RealCommsPort,NodeBase),d0 ; Setter tilbake comport + beq 9$ ; har ingen + move.b #-1,d1 + cmp.b d0,d1 + beq 9$ ; har aldri hatt + + push a2/a3 + move.l a0,a2 + bclr #DoDivB_Sleep,(DoDiv,NodeBase) ; slett sleep + jsr (updatewindowtitle) + move.b (RealCommsPort,NodeBase),d0 + cmp.b (CommsPort+Nodemem,NodeBase),d0 ; ble den disablet ? + beq.b 1$ ; nei, ikke start igjen + move.b d0,(CommsPort+Nodemem,NodeBase) +1$ move.l (f_Connect,a2),a3 + move.l (cm_baud,a3),d0 + divu.w #10,d0 + move.w d0,(cpsrate,NodeBase) + move.l (cm_baud,a3),d0 + bsr changenodestatusspeed + move.l (cm_baud,a3),d0 + moveq.l #0,d1 ; ikke send AT + bsr setserialspeed + bsr initserread ; starter opp en read request + move.b #0,d0 ; ingen MNP/V42bis status + move.l (cm_compression,a3),d1 + beq.b 2$ + move.l d1,a0 + bsr parsemnpsub +2$ move.l (cm_connect,a3),d1 + beq.b 3$ + move.l d1,a0 + bsr parsemnpsub +3$ bsr setmnpstat + lea (nulltext),a0 + move.l (f_LoginString,a2),d0 + beq.b 4$ + move.l d0,a0 +4$ lea (intextbuffer,NodeBase),a1 ; HACK! + bsr strcopy + move.b #1,(readlinemore,NodeBase) + move.w #0,(intextchar,NodeBase) + move.w #F_Error_OK,(pm_Error,a2) + move.l a2,(FrontDoorMsg,NodeBase) ; Lagrer meldingen + pop a2/a3 + suba.l a2,a2 ; Hack for at handlepublicmsg ikke skal ta replymsg + bset #DoDivB_ExitWaitforCaller,(DoDiv,NodeBase) + clrz +9$ notz + rts + +front_droppcarrier + move.w #F_Error_UserOnline,(pm_Error,a0) + move.b (in_waitforcaller,NodeBase),d0 + beq.b 9$ ; bruker er på + move.w #F_Error_NoSerial,(pm_Error,a0) + move.b (CommsPort+Nodemem,NodeBase),d0 ; Lokal node ? + beq.b 9$ ; Fy.. + move.w #F_Error_OK,(pm_Error,a0) + bsr dohangup +9$ clrz + rts + +front_replyNOW + move.w #F_Error_NoMsgtoReply,(pm_Error,a0) + move.l (FrontDoorMsg,NodeBase),d0 + beq.b 9$ + move.l d0,a1 + tst.l (MN_REPLYPORT,a1) ; har vi reply port ? + beq.b 9$ ; nope + move.w #F_Error_OK,(pm_Error,a0) + jsrlib ReplyMsg + moveq.l #0,d0 + move.l d0,(FrontDoorMsg,NodeBase) ; ikke en gang til nei! +9$ clrz + rts + + +;msg_quitlogin +; IFD OLD_NETLOGIN +; btst #DIVB_InNetLogin,(Divmodes,NodeBase) +; notz +; bne.b 9$ +; lea (tmptext,NodeBase),a1 +; move.b #0,(a1) +; move.l (pm_Arg,a0),d0 +; beq.b 9$ +; move.l (pm_Data,a0),a0 +; moveq.l #60,d0 +; bsr strcopymaxlen +; setz +; ELSE +; clrz +; ENDC ; OLD_NETLOGIN +;9$ rts +; +;msg_writeserlen +; push a0 +; bsr waitseroutput +; pop a0 +; move.w #PError_OK,(pm_Error,a0) +; move.l (pm_Arg,a0),d0 +; move.l (pm_Data,a0),a0 +; bsr serwritestringlen +; clrz +; rts +; +;msg_readser +; push a2 +; move.l a0,a2 +; +;1$ move.l (sersigbit,NodeBase),d0 +; jsrlib Wait +; bsr doserial +; bmi.b 1$ ; ikke noe +; +; move.b d0,(3+pm_Data,a2) ; return character read +; move.w #PError_OK,(pm_Error,a2) +; move.b (readcharstatus,NodeBase),d0 +; beq.b 9$ +; move.w #PError_NoCarrier,(pm_Error,a2) +;9$ pop d2 +; clrz +; rts +; +;msg_readserlen +; push a2 +; move.l a0,a2 +; move.l (pm_Data,a2),a0 +; move.l (pm_Arg,a2),d0 +; move.l (pm_Arg2,a2),d1 +; bsr serreadt +; move.l d0,(pm_Arg,a2) ; return characters read +; move.w #PError_OK,(pm_Error,a2) +; move.b (readcharstatus,NodeBase),d0 +; beq.b 9$ +; move.w #PError_NoCarrier,(pm_Error,a2) +;9$ pop d2 +; clrz +; rts +; +;msg_flushser +; move.w #PError_OK,(pm_Error,a0) +; bsr serclear +; clrz +; rts +; +;msg_writetext +; move.w #PError_OK,(pm_Error,a0) +; move.l (pm_Data,a0),a0 +; bsr writetexti +; clrz +; rts +; +;msg_writetexto +; push a2 +; move.l a0,a2 +; move.w #PError_OK,(pm_Error,a2) +; move.l (pm_Data,a0),a0 +; bsr writetexto +; bne.b 9$ +; move.w #PError_NoCarrier,(pm_Error,a2) +; move.b (readcharstatus,NodeBase),d0 +; bne.b 9$ +; move.w #PError_NoMore,(pm_Error,a2) +;9$ pop a2 +; clrz +; rts + +; private userport funksjoner. +; kalles med msg'en i a0. +; z = 1 - hopp ut av readchar +; d1 - retur verdi til amiga procedyren (hvis vi skal dit) +OffHook + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq.b 9$ ; meningsløst.. + move.b (in_waitforcaller,NodeBase),d1 ; er vi i waitforcaller ? + beq.b 9$ ; nope. fy + bsr stengmodem +9$ clrzn + rts + +InitModem + move.b (in_waitforcaller,NodeBase),d1 ; er vi i waitforcaller ? + beq.b 9$ ; nope. fy + move.b (RealCommsPort,NodeBase),d1 + beq 9$ ; ingen port + cmp.b #-1,d1 + beq.b 9$ ; ingen port.. + move.l (sreadreq,NodeBase),a1 + move.l (IO_DEVICE,a1),d1 + bne.b 1$ ; vi har porten.. + jsr tmpopenserport + cmpi.b #-1,(RealCommsPort,NodeBase) ; gikk det bra ? + bne.b 4$ ; jepp + move.b (CommsPort+Nodemem,NodeBase),d0 ; Vi prøver en gang til. + move.b d0,(RealCommsPort,NodeBase) + bra.b 9$ ; og ut. +4$ move.b (RealCommsPort,NodeBase),(CommsPort+Nodemem,NodeBase) ; setter tilbake +1$ bsr initwaitforcaller1 ; tar init.. +9$ clrzn + rts + +ReleasePort + tst.b (CommsPort+Nodemem,NodeBase) ; lokal ? + beq.b 9$ ; meningsløst.. + move.b (in_waitforcaller,NodeBase),d1 ; er vi i waitforcaller ? + beq.b 9$ ; nope. fy + moveq.l #0,d0 + bsr wf_makenodelocal1 ; jepp, dvs nobusy +; beq.b 9$ ; lokal node, ut. Umulig + jsr (tmpcloseserport) + tst.b (Tinymode,NodeBase) + bne.b 9$ + lea (preskreopentext),a0 + bsr writecontext +9$ clrzn + rts + +gotosleep + move.w #Error_User_Active,(m_Error,a0) + move.b (in_waitforcaller,NodeBase),d0 + beq.b 9$ + move.w #Error_OK,(m_Error,a0) + cmp.b #2,d0 ; allerede sovna ? + beq.b 9$ ; ja (2 == sovna) + move.b #2,(in_waitforcaller,NodeBase) ; husker at vi sovner + lea (nodeputsleptext),a0 + bsr writecontext +9$ clrzn + rts + +wakeupagain + move.w #Error_OK,(m_Error,a0) + move.b (in_waitforcaller,NodeBase),d0 + cmp.b #2,d0 + bne.b 9$ + move.b #1,(in_waitforcaller,NodeBase) ; husker at vi er våkne igjen. + lea (nodeawakentext),a0 + bsr writecontext +9$ clrzn + rts + +ejectuser + move.w #Error_No_Active_User,(m_Error,a0) + move.l (Name+CU,NodeBase),d1 ; eject. Men er det noen inne ? + beq.b 9$ ; nei ... Da dropper vi saken.. + move.w #Error_OK,(m_Error,a0) + move.w #-1,(linesleft,NodeBase) ; Dropper all more saker .. + lea (throwouttext1),a0 + bsr writetexti + lea (throwouttext2),a0 + bsr writetexti + move.b #Thrownout,(readcharstatus,NodeBase) +9$ clrzn + rts + +; a0 = msg +reloaduser + push a2/a3 + move.l a0,a2 + move.l (UserrecordSize+CStr,MainBase),d0 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + move.l d0,a3 + tst.l d0 ; ok ? + beq.b 99$ ; nei + + move.w #Error_OK,(m_Error,a2) + move.l (Name+CU,NodeBase),d0 ; Er det noen inne ? + beq.b 9$ ; nope + move.l (Usernr+CU,NodeBase),d0 ; henter inn ny kopi + cmp.l (m_UserNr,a2),d0 ; er det denne brukeren ?? + bne.b 9$ ; nope + + move.l a3,a0 + jsr (loadusernr) + move.w d0,(m_Error,a2) ; gir feilmelding videre + bne.b 9$ + + move.l a3,a0 ; kopierer inn ny informasjon + lea (CU,NodeBase),a1 + move.l #u_startsave,d0 + bsr memcopylen +9$ move.l a3,d0 + beq.b 99$ ; ikke noe memory + move.l (UserrecordSize+CStr,MainBase),d0 + move.l a3,a1 + jsrlib FreeMem +99$ pop a2/a3 + clrzn + rts + +shownode + move.l (windowadr,NodeBase),d0 ; allerede åpent ? + beq.b 3$ ; nei, åpner. + move.l intbase,a6 ; ja, får noden frem i lyset + move.l d0,a0 + jsrlib WindowToFront + move.l (windowadr,NodeBase),a0 + move.l (wd_WScreen,a0),a0 + jsrlib ScreenToFront + bra.b 8$ + +3$ bsr openwindow ; vindu, menyer osv + beq.b 1$ + bsr openconsole ; åpner console + beq.b 2$ + bsr initconread + move.l (windowadr,NodeBase),a0 + move.l (wd_WScreen,a0),a0 + move.l (sc_RastPort+rp_BitMap,a0),a1 + lea (ansiwhitetext),a0 ; setter utskrift til hvitw + move.b (bm_Depth,a1),d0 + cmp.b #2,d0 + bhi.b 4$ + lea (ansiredtext),a0 ; 2 farver, setter til farve #1 +4$ bsr writecontext + move.b (in_waitforcaller,NodeBase),d0 ; er vi i waitforcaller ? + beq.b 9$ + bsr drawwaitforcallerscreen + bra.b 9$ + +2$ bsr closewindow +1$ move.l intbase,a6 + suba.l a0,a0 + jsrlib DisplayBeep +8$ move.l exebase,a6 +9$ clrzn + rts + +hidenode + bsr closeconsole + bsr closewindow + clrzn + rts + +doshutdownnode + move.b #1,(ShutdownNode,NodeBase) ; markerer at vi skal ned + move.b #Thrownout,(readcharstatus,NodeBase) ; virkelig.. + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + notz + bne.b 9$ ; nope + bset #DoDivB_ExitWaitforCaller,(DoDiv,NodeBase) + moveq.l #9,d1 + clrzn +9$ rts + +getregs move.l NodeBase,(m_Data,a0) + move.l MainBase,(m_arg,a0) + clrz + rts + +local_showuser + push a6 + move.l (Name+CU,NodeBase),d1 ; eject. Men er det noen inne ? + beq.b 9$ ; nei ... Da dropper vi saken.. + move.l (intbase),a6 + move.l (showuserwindowadr,NodeBase),d0 ; har vi vindu ? + bne.b 1$ ; jepp, da åpner vi ikke neste + suba.l a0,a0 + lea (shouserwindowtags),a1 + jsrlib OpenWindowTagList + move.l d0,(showuserwindowadr,NodeBase) ; Lagrer + beq.b 9$ ; klarte ikke åpne + move.l d0,a0 + move.l (wd_UserPort,a0),a0 + moveq #0,d1 + move.b (MP_SIGBIT,a0),d1 + moveq.l #0,d0 + bset d1,d0 + move.l d0,(showwinsigbit,NodeBase) + or.l d0,(waitbits,NodeBase) +1$ bsr updateshowuserwindow +9$ clrz + pop a6 + rts + +closeshowuserwindow + push a6 + move.l (showuserwindowadr,NodeBase),d0 ; har vi vindu ? + beq.b 9$ ; Nei, ferdig + move.l d0,a0 + move.l (intbase),a6 ; ja, lukker + jsrlib CloseWindow + move.l (showwinsigbit,NodeBase),d0 + not.l d0 + and.l d0,(waitbits,NodeBase) ; sletter bit'et + moveq.l #0,d0 + move.l d0,(showwinsigbit,NodeBase) + move.l d0,(showuserwindowadr,NodeBase) +9$ pop a6 + rts + +updateshowuserwindow + push a2 + link.w a3,#-30 + move.l (showuserwindowadr,NodeBase),d0 ; har vi vindu ? + beq.b 9$ ; Nei, skip + move.l (gfxbase),a6 + move.l d0,a0 + move.l (wd_RPort,a0),a2 + move.l a2,a1 + moveq.l #0,d0 + moveq.l #0,d1 + jsrlib Move + move.l a2,a1 + jsrlib ClearScreen + move.l (exebase),a6 + move.b #1,(it_FrontPen,sp) + move.b #0,(it_BackPen,sp) + move.b #RP_JAM1,(it_DrawMode,sp) + moveq.l #0,d0 + move.l d0,(it_LeftEdge,sp) ; tar it_TopEdge også. + move.l d0,(it_ITextFont,sp) + move.l d0,(it_NextText,sp) + move.l a0,(it_IText,sp) + move.w d0,(tmpword,NodeBase) + move.l sp,(ParamPass,NodeBase) + lea (CU,NodeBase),a2 + lea (10$),a0 +; moveq.l #0,d0 ; ikke vis passord (d0 er allerede 0) + jsr (doshowuser) +9$ unlk a3 + pop a2 + rts + +10$ push a6/a3/d2/d3 + move.l (intbase),a6 + move.l (ParamPass,NodeBase),a1 + move.l a0,(it_IText,a1) + moveq.l #1,d0 + moveq.l #1,d1 + move.l (showuserwindowadr,NodeBase),a0 + move.l (wd_RPort,a0),a0 + move.w (tmpword,NodeBase),d2 + add.w d2,d1 + move.w (rp_TxHeight,a0),d3 + add.w d3,d2 ; og øker + move.w d2,(tmpword,NodeBase) + move.l (showuserwindowadr,NodeBase),a3 + cmp.w (wd_Height,a3),d2 ; er vinduet stort nok ? + bcs.b 11$ ; ja + push a0/a1/d0/d1 ; utvider vinduet + move.l a3,a0 + moveq.l #0,d0 + move.w d3,d1 + jsrlib SizeWindow + pop a0/a1/d0/d1 +11$ jsrlib PrintIText + clrz + pop a6/a3/d2/d3 + rts + +nodemsgportjumps dc.l front_sleepser,front_dologin,front_droppcarrier,front_replyNOW + dc.l front_awakeser +; dc.l msg_writetext,msg_writetexto,msg_flushser,msg_writeserlen +; dc.l msg_readserlen,msg_quitlogin,msg_readser + +privatenodemsgportjumps dc.l reloaduser,ejectuser,gotosleep,wakeupagain,shownode,shownode,shownode + dc.l hidenode,shownode,local_showuser,doshutdownnode,getregs + dc.l InitModem,ReleasePort,OffHook + +; a0 = cmdline +doarexxcmd +; push all +; bsr writetexto +; pop all + lea (arexxcomtxt),a1 + moveq.l #0,d0 ; vi kaller parserexxcmd ifra noden + bsr parserexxcmd + beq.b 1$ ; ikke kjennt + lea (arexxjmp),a0 ; utfører kommandoen + adda.l d0,a0 + move.l (a0),a0 + jsr (a0) ; utfører + bra.b 9$ +1$ moveq.l #0,d0 + suba.l a0,a0 + clrz +9$ rts + +; a0 = cmdline +; a1 = cmdlist +; d0 = 1 : from main task, = 0, from node. +parserexxcmd + push a2/d2/d3/d4 + move.l d0,d4 ; husker hvor vi kommer ifra + move.l a0,a2 + moveq.l #0,d2 ; funksjon nr * 4 + moveq.l #0,d3 ; antall parametre + move.l a1,a0 +1$ move.l a2,a1 +6$ move.b (a1)+,d0 ; neste bokstav i søke ord + beq.b 2$ ; alt passet, sjekker at de er like lange + cmpi.b #' ',d0 + beq.b 2$ + move.b (a0)+,d1 + beq.b 9$ ; ferdig, fant ikke + cmpi.b #',',d1 ; ferdig med dette ordet + beq.b 5$ ; jepp, gikk ikke + cmp.b d0,d1 + bhi.b 9$ ; mindre, ikke mulighet for andre + beq.b 6$ ; like, tester neste tegn + +4$ move.b (a0)+,d0 ; spoler til neste ord + beq.b 9$ ; ikke en arexx commando + cmpi.b #',',d0 ; spolt ferdig ? + bne.b 4$ ; nei +5$ addq.l #4,d2 ; øke antall ord + bra.b 1$ ; prøver neste ord + +2$ lea (tmplargestore,NodeBase),a2 + tst.l d4 + beq.b 7$ + lea (txtbuffer,MainBase),a2 +7$ move.b (a0)+,d1 + beq.b 3$ ; funnet + cmpi.b #',',d1 + bne.b 4$ ; ikke funnet, spoler til neste ord +3$ tst.b d0 ; noen parametre ? + beq.b 8$ ; nei, ferdig + move.l a1,a0 + bsr 10$ + +8$ move.l d2,d0 + move.l d3,d1 ; antall parametre + move.l d1,(rx_NumParam,a2) + clrz + bra.b 99$ +9$ setz +99$ pop a2/d2/d3/d4 + rts + +10$ moveq.l #rx_ptr1,d1 ; offset for å lagre adressen + moveq.l #0,d3 ; antall parametre +11$ move.l a0,(0,a2,d1.w) ; lagrer starten + move.b (a0)+,d0 ; ferdig ? + beq.b 19$ ; jepp. + addq.l #1,d3 ; vi har et parameter!! :-) + addq.l #4,d1 ; oppdaterer offset + cmpi.b #'"',d0 ; quote ? + beq.b 12$ ; jepp + cmpi.b #"'",d0 ; quote ? + beq.b 16$ ; jepp +13$ move.b (a0)+,d0 ; ferdig ? + beq.b 19$ ; ja, helt + cmpi.b #' ',d0 ; ferdig ? + bne.b 13$ ; nope. + move.b #0,(-1,a0) ; skiller + bra.b 11$ ; one more time + +12$ move.l a0,(-4,a2,d1.w) ; lagrer ny start +14$ move.b (a0)+,d0 ; ferdig ? + beq.b 19$ ; ja, helt + cmpi.b #'"',d0 ; ferdig ? + bne.b 14$ ; nope. + move.b #0,(-1,a0) ; skiller + bra.b 11$ ; one more time + +16$ move.l a0,(-4,a2,d1.w) ; lagrer ny start +17$ move.b (a0)+,d0 ; ferdig ? + beq.b 19$ ; ja, helt + cmpi.b #"'",d0 ; ferdig ? + bne.b 17$ ; nope. + move.b #0,(-1,a0) ; skiller + bra.b 11$ ; one more time +19$ rts + + IFND DEMO +; d0 - input tegn +; result : d0 - translated character +; Z = 1 - char supressed +translateserinchar + cmpi.b #31,d0 + bls 7$ ; Controll tegn + tst.b (CommsPort+Nodemem,NodeBase) ; internal node ?? + beq.b 9$ ; Yepp. no futher tranlation. + moveq.l #0,d1 + move.b (Charset+CU,NodeBase),d1 ; Henter inn brukerens tegnsett + beq.b 9$ ; ISO ?, jepp, ferdig. + cmpi.b #3,d1 ; 7 bits ? + bcs.b 1$ ; nei + cmpi.b #12,d1 ; MAC ? + beq.b 4$ + cmpi.b #128,d0 ; 7 bits translation + bcc 88$ ; truncate'r alle tegn over 127 + + cmpi.b #27,(lastchar,NodeBase) ; var siste tegn esc ? + bne.b 3$ ; nei, alt som før + cmpi.b #'[',d0 ; er det en ansi sekvens ? + beq.b 9$ ; jepp, da oversetter vi ikke +3$ move.b d0,(lastchar,NodeBase) ; Lagrer siste tegnet + lea (fraISO7tilISO8),a0 ; henter tabell + subi.w #3,d1 ; justerer for starten + mulu.w #11,d1 + adda.l d1,a0 ; har nå riktig tabell + moveq.l #0,d1 ; index + cmpi.b #'#',d0 + bcs.b 9$ + beq.b 2$ + addq.l #1,d1 + cmpi.b #'@',d0 + bcs.b 9$ + beq.b 2$ + lea (transwhat7bitchar),a1 + andi.w #$ff,d0 + move.w d0,d1 + subi.b #'[',d1 + bcs.b 9$ + move.b (0,a1,d1.w),d1 + beq.b 9$ +2$ move.b (0,a0,d1.w),d0 +9$ clrzn + rts + +4$ moveq.l #3,d1 ; jukser litt.. +1$ cmpi.b #128,d0 ; std ASCII + bcs.b 9$ ; No translation. Std. ASCII + andi.w #$ff,d1 ; Safety + andi.w #$ff,d0 ; Safety + subi.b #128,d0 ; Skip the 128 first std ASCII chars + lsl.w #2,d1 + lea (convertxxxtoISO),a0 ; Main translation table + move.l (0,a0,d1.w),a0 ; Get users translation table + move.b (0,a0,d0.w),d0 ; Use char-128 as an index into + clrn ; the trans. table, to obtain new. + rts ; ;Finished. Return Zero if no char + +8$ move.w #13,d0 +7$ move.b d0,(lastchar,NodeBase) ; Lagrer siste tegnet + tst.b (FSEditor,NodeBase) + bne.b 9$ + cmpi.b #8,d0 ; Back space + beq.b 9$ + cmpi.b #9,d0 ; TAB + beq.b 9$ + cmpi.b #24,d0 ; ctrl-x + beq.b 9$ + cmpi.b #13,d0 ; Carrige return + beq.b 9$ + cmpi.b #10,d0 ; Line Feed, Converterer til CR + beq.b 8$ +88$ setz ; Controll code truncated. + rts + ENDC + +; inputs : char (d0) +; adds outputlen to d1, updates a0. +translateseroutstring +; tst.b CommsPort+Nodemem(NodeBase) ; internal node ?? +; beq.b 9$ ; Yepp. no tranlation. + cmpi.b #10,d0 + beq.b 7$ ; LF + push d1/a0 + moveq.l #0,d1 + move.b (Charset+CU,NodeBase),d1 ; Henter inn brukerens tegnsett + beq.b 99$ ; ISO ?, jepp, ferdig. + cmpi.b #3,d1 ; 7 bits ? + bcs.b 1$ ; nei + cmp.b #12,d1 ; MAC ? + beq.b 1$ ; jepp. + cmpi.b #128,d0 ; 7 bits translation + bcs.b 99$ ; alle under 127 er ok + lea (fraISO8tilISO7),a0 ; henter tabell + subi.w #3,d1 ; justerer for starten + mulu.w #11,d1 + adda.l d1,a0 ; har nå riktig tabell + moveq.l #0,d1 ; index +3$ cmp.b (a0)+,d0 + beq.b 2$ + addq.l #1,d1 + cmpi.b #11,d1 + bcs.b 3$ + bra.b 66$ ; ulovelig tegn over #128.. +2$ lea (fraISO7tilISO8),a0 + move.b (0,a0,d1.w),d0 + bra.b 99$ +4$ moveq.l #3,d1 ; jukser litt.. +1$ cmpi.b #128,d0 ; std ASCII + bcs.b 99$ ; No translation. Std. ASCII + andi.w #$ff,d1 ; Safety + andi.w #$ff,d0 ; Safety + subi.b #128,d0 ; Skip the 128 first std ASCII chars + lsl.w #2,d1 + lea (convertISOtoxxx),a0 ; Main translation table + move.l (0,a0,d1.w),a0 ; Get users translation table + move.b (0,a0,d0.w),d0 ; Use char-128 as an index into + bne.b 99$ ; the trans. table, to obtain new. +66$ pop d1/a0 +6$ setz + rts ; ;Finished. Return Zero if imposible. +7$ move.b #13,(a0)+ + move.b d0,(a0)+ + addq.l #2,d1 + rts +99$ pop d1/a0 +9$ move.b d0,(a0)+ + addq.l #1,d1 + rts + + IFND DEMO +; d0 = første tegnet i stringen. 0 hvis ingen. +; d1 = timout mellom hvert tegn +; returnerer d0 og Z. d0 = antall tegn lest, Z = 1 -> string full, timeout. +; OBS !! Gir blaffen i CD. (brukes bare i Waitforcaller, og i docheckGogR..) +; string, bryter ved timeout, return og newline +; word, bryter ved timeout, return og newline og space +serreadstring + push a2/d3/d2/d4 + moveq.l #1,d4 + bra.b serreadword1 + +serreadword + push a2/d3/d2/d4 + moveq.l #0,d4 +serreadword1 + lea (tmptext,NodeBase),a2 + move.l d1,d3 + tst.b d0 + beq.b 4$ + move.b d0,(a2) + moveq.l #1,d2 + bra.b 2$ +4$ moveq.l #0,d2 ; antall tegn i stringen +2$ move.l a2,a0 + adda.l d2,a0 + moveq.l #-1,d0 + move.l d3,d1 + move.l a0,-(sp) + bsr serreadt + move.l (sp)+,a0 + cmpi.b #1,d0 + bne.b 3$ + move.b (a0),d0 + cmpi.b #13,d0 + beq.b 1$ + cmpi.b #10,d0 + beq.b 1$ + tst.b d4 ; er det string ? + bne.b 5$ ; ja, da skal vi ikke bryte ved space + cmpi.b #' ',d0 + beq.b 1$ +5$ addq.l #1,d2 + cmpi.w #80,d2 + bcs.b 2$ +3$ move.b #0,(a0) + move.l d2,d0 + setz + bra.b 8$ +1$ move.b #0,(a0) + move.l d2,d0 +8$ move.l a2,a0 + pop a2/d2/d3/d4 + rts + +; a0 = buffer +; d0 = len, hvis negativ, glemm CD +; d1 = timeout. Hvis 0, les alle tegn som har kommet. +serreadt + movem.l d2/d3/d4/d5/a2,-(sp) + moveq.l #0,d4 ; antall tegn lest + move.l a0,a2 ; Buffer + moveq.l #0,d5 ; Bruk CD + move.l d0,d2 ; lengde vi skal lese + bpl.b 7$ + neg.l d2 ; Negativ, gjør posetiv + moveq.l #1,d5 ; Og husk at vi skal droppe CD test +7$ move.l d1,d3 ; timeout + move.l (sreadreq,NodeBase),a1 ; Aborterer current read req. + jsrlib AbortIO + move.l (sreadreq,NodeBase),a1 ; Venter på at den blir ferdig. + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + tst.l (IO_ACTUAL,a1) + beq.b 0$ ; Io ikke ferdig. + moveq.l #0,d0 ; Har behandlet denne. + move.l d0,(IO_ACTUAL,a1) + move.b (ser_tegn,NodeBase),(a2)+ + moveq.l #1,d4 + subq.l #1,d2 + bne.b 0$ + moveq.l #1,d3 + bra 9$ + +0$ tst.l d3 ; Har vi timeout ? + bne.b 1$ + moveq.l #0,d3 + move.l (sreadreq,NodeBase),a1 ; Leser alle tegn i inn buffer + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + move.l (sreadreq,NodeBase),a1 + IFND nocarrier + tst.l d5 + bne.b 2$ + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 2$ ; jepp, no CD checking. + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + beq.b 2$ ; Ja, hopp + move.b #NoCarrier,(readcharstatus,NodeBase) + bra 9$ ; No carrier, Logoff !! + ENDC +2$ move.l (IO_ACTUAL,a1),d0 + beq 9$ + cmp.l d0,d2 + bcc.b 3$ + move.l d2,d0 ; Vi har flere uleste bytes enn len. +3$ move.w #CMD_READ,(IO_COMMAND,a1) + move.l a2,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jsrlib DoIO + move.l (sreadreq,NodeBase),a1 + move.l (IO_ACTUAL,a1),d3 + add.l d4,d3 + bra 9$ + +1$ move.l (sreadreq,NodeBase),a1 ; Setter igang ny request + move.w #CMD_READ,(IO_COMMAND,a1) + move.l a2,(IO_DATA,a1) + move.l d2,(IO_LENGTH,a1) + jsrlib SendIO + move.l d3,d0 + move.l #1000000,d1 + bsr divl + move.l (timer1req,NodeBase),a1 + move.l d0,(TV_SECS+IOTV_TIME,a1) + move.l d1,(TV_MICRO+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jsrlib SendIO ; Starter timeout'en. +10$ move.l (timer1sigbit,NodeBase),d0 + or.l (sersigbit,NodeBase),d0 + jsrlib Wait + move.l d0,d2 + and.l (sersigbit,NodeBase),d0 + beq.b 4$ + move.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 4$ + move.l (timer1req,NodeBase),a1 + bra.b 5$ +4$ and.l (timer1sigbit,NodeBase),d2 + beq.b 10$ + move.l (timer1req,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 10$ + move.l (sreadreq,NodeBase),a1 +5$ jsrlib AbortIO + move.l (timer1req,NodeBase),a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + jsrlib WaitIO + + move.l (sreadreq,NodeBase),a1 + move.l (IO_ACTUAL,a1),d3 + add.l d4,d3 + tst.l d5 + bne.b 9$ + move.w #SDCMD_QUERY,(IO_COMMAND,a1) + jsrlib DoIO ; Sjekke flagg + move.l (sreadreq,NodeBase),a1 + IFND nocarrier + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 9$ ; jepp, no CD checking. + move.w (IO_STATUS,a1),d1 ; Henter serial.status + btst #5,d1 ; Har vi CD ? + beq.b 9$ ; Ja, hopp + move.b #NoCarrier,(readcharstatus,NodeBase) + moveq.l #0,d3 ; No carrier, Logoff !! + ENDC +9$ bsr initserread + move.l d3,d0 + movem.l (sp)+,d2/d3/d4/d5/a2 + rts + +; clear serial buffer +serclear + move.l (swritereq,NodeBase),a1 ; get write structure + jsrlib WaitIO + move.l (swritereq,NodeBase),a1 ; get write structure + move.w #CMD_CLEAR,(IO_COMMAND,a1) ; Flush'es serial buffers + jmplib DoIO + ENDC + +*************************************************************************** +*** Virkelig Low level rutiner for skriving *** +*************************************************************************** + + IFND DEMO + +waitseroutput + move.l (swritereq,NodeBase),a1 + jmplib WaitIO + +serwritestringdo + push a0 + bsr.b waitseroutput + pop a0 + bsr serwritestring + bra.b waitseroutput + +serwritestringlendo + push d0/a0 + bsr.b waitseroutput + pop d0/a0 + bsr serwritestringlen + bra.b waitseroutput + +serwritestring + move.l a0,a1 + bsr strlen + move.l a1,a0 +serwritestringlen + move.l (swritereq,NodeBase),a1 ; get write structure + move.w #CMD_WRITE,(IO_COMMAND,a1) ; stuff data + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + add.l d0,(SerTotOut,NodeBase) + jmplib DoIO ; write to serial port. + ENDC + +writecontext + move.l a0,a1 + move.l a0,d0 +1$ tst.b (a0)+ + bne.b 1$ + subq.l #1,a0 + suba.l d0,a0 + move.l a0,d0 + move.l a1,a0 +writecontextlen +; tst.b Tinymode(NodeBase) ; Dette må man sjekke før dette.. + move.l (cwritereq,NodeBase),d1 ; get write structure + beq.b 9$ ; no console. Skip + move.l d1,a1 + move.w #CMD_WRITE,(IO_COMMAND,a1) ; stuff data + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) + jmplib DoIO ; write to console device +9$ rts + +newconline + move.b #10,d0 +writeconchar +; tst.b Tinymode(NodeBase) ; Sjekkes før dette +; move.w d0,-(a7) +; move.l cwritereq(NodeBase),a1 +; jsrlib WaitIO +; move.w (a7)+,d0 + + move.l (cwritereq,NodeBase),d1 + beq.b 9$ ; no console + move.l d1,a1 + lea (con_tegn,NodeBase),a0 + move.b d0,(a0) + moveq.l #1,d0 + move.w #CMD_WRITE,(IO_COMMAND,a1) + move.l a0,(IO_DATA,a1) + move.l d0,(IO_LENGTH,a1) +; jmplib SendIO + jmplib DoIO +9$ rts + +***************************************************************** +* Div rutiner * +***************************************************************** + +checktimeinbetweenlogins + push d2 + link.w a3,#-30 + move.l sp,d1 + move.l (dosbase),a6 + jsrlib DateStamp + move.l (exebase),a6 + lea (LastAccess+CU,NodeBase),a0 + move.l sp,a1 + bsr calctime + beq.b 9$ ; feil, ut + divu #60,d0 + moveq.l #0,d2 + move.w d0,d2 ; d2 = minutter i mellom + move.l (ds_Minute,sp),d0 + divu #60,d0 + sub.w #1,d0 + bcc.b 1$ + move.w #23,d0 +1$ lea (HourMinWait+Nodemem,NodeBase),a0 + moveq.l #0,d1 + move.b (a0,d0.w),d1 + beq.b 9$ ; ingen tid, ut + cmp.l d2,d1 ; tid i mellom, min tid + bcs.b 9$ + lea (toclosetlsetext),a0 + bsr writetexto + setz + bra.b 99$ +9$ clrz +99$ unlk a3 + pop d2 + rts + +; d0.w = confnr (* 2 !) +; ret : d0 = unread, d1 = til bruker +getconfunreadmsgs + push d2/d3/d4/d5/d6/a2/a3 + moveq.l #0,d2 ; nye meldinger + moveq.l #0,d3 ; Til oss + moveq.l #0,d4 + move.w d0,d4 ; konferansen + lea (tmpmsgheader,NodeBase),a2 + lea (u_almostendsave+CU,NodeBase),a3 + mulu #Userconf_seizeof/2,d0 + add.l d0,a3 + move.w (uc_Access,a3),d1 + btst #ACCB_Read,d1 ; Er vi medlem her ? + beq 2$ ; Nei, hopp + move.w d4,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.l (n_ConfDefaultMsg,a0,d0.l),d6 + move.l (uc_LastRead,a3),d5 + sub.l d5,d6 + bpl.b 1$ + moveq.l #0,d6 ; negativt. Feil ... rette opp. +1$ beq.b 2$ + +3$ addq.l #1,d5 ; sjekker alle nye meldinger + subq.l #1,d6 + bcs.b 2$ ; Vi er ferdige + move.w d5,d0 ; leser inn meldingsheader + move.l d4,d1 + move.l a2,a0 + jsr (loadmsgheader) +; bne.b 5$ + move.l a2,a0 ; kan vi lese denne meldingen ? + move.w d4,d0 ; henter frem conf nr + jsr (kanskrive) + bne.b 3$ ; nei ... + addq.l #1,d2 ; øker antallet nye meldinger + move.l (Usernr+CU,NodeBase),d0 ; er den til oss ? + cmp.l (MsgTo,a2),d0 + bne.b 3$ ; nei + addq.l #1,d3 ; øker antall meldinger til oss + bra.b 3$ + +2$ move.l d2,d0 + move.l d3,d1 + pop d2/d3/d4/d5/d6/a2/a3 + rts + +fjernpath + move.l a0,a1 +1$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #':',d0 + beq.b 2$ + cmpi.b #'/',d0 + bne.b 1$ +2$ move.l a0,a1 ; Vi fant et path tegn, husker tegnet etter. + bra.b 1$ +9$ move.l a1,a0 + rts + +getextension + move.l a0,a1 +1$ move.b (a0)+,d0 + bne.b 1$ ; finner slutten +2$ cmp.l a0,a1 + move.b -(a0),d0 + bcs.b 9$ ; fant ingen, returnerer hele stringen + cmp.b #'.',d0 + bne.b 2$ + bra.b 99$ +9$ move.l a1,a0 +99$ rts + +;a0 - navn +;return - z = 1: navn har fodbudte tegn +checkillegalnamechar + push a2 + move.l a0,a2 + move.b #"`",d0 + bsr strchr + bne.b 1$ + move.l a2,a0 + move.b #'@',d0 + bsr strchr + beq.b 8$ +1$ lea (charnallowdtext),a0 + bsr writeerroro + clrz +8$ pop a2 + notz + rts + +;a0 - sjekk navn +;return - z = 1: navn er i ban fil +checkfilebanfile + push a2/d2/d3/d4/d5/d6/a6 + link.w a3,#-200 + move.l a0,a2 ; husker navnet + moveq.l #1,d5 ; funnet status (dvs ikke funnet) + + move.l (dosbase),a6 + move.l #filebanfilename,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 ; husker filptr + notz + bne.b 9$ ; ingen fil, kan ikke sjekke + +1$ move.l d4,d1 + move.l sp,d2 + moveq.l #79,d3 + jsrlib FGets + tst.l d0 + beq.b 2$ + move.l d0,a0 + cmp.b #';',(a0) ; komentar ? + beq.b 1$ ; ja, loop + bsr strlen + beq.b 1$ ; tom + subq.l #1,d0 + lea (sp),a0 + add.l d0,a0 + move.b #0,(a0) ; fjerner cr + + move.l sp,d1 + lea (80,sp),a0 + move.l a0,d2 + moveq.l #200-80-2,d3 + jsrlib ParsePatternNoCase + moveq.l #-1,d1 + cmp.l d1,d0 + beq.b 1$ ; error, prøver neste + move.l d0,d1 + + lea (80,sp),a0 + move.l a0,d1 + move.l a2,d2 + jsrlib MatchPatternNoCase + tst.l d0 + beq.b 1$ ; ingen match +; funnet + +4$ moveq.l #0,d5 ; vi fant navnet +2$ move.l d4,d1 + jsrlib Close +6$ move.l d5,d0 +9$ unlk a3 + pop a2/d2/d3/d4/d5/d6/a6 + rts + +;a0 - sjekk navn +;a1 - ban filenavn +;return - z = 1: navn er i ban fil +checkbanfile + push a2/d2/d3/d4/d5/d6/a6 + link.w a3,#-80 + move.l a0,a2 + move.l a1,d3 + moveq.l #1,d5 ; funnet status (dvs ikke funnet) + move.b #' ',d0 + bsr strchr + move.l d0,d6 ; husker hvor spacen var i navnet + notz + bne 9$ ; skulle være umulig, men ... + move.l (dosbase),a6 + move.l d3,d1 ; henter filnavnet + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + notz + bne.b 9$ ; ingen fil, kan ikke sjekke + +1$ move.l d4,d1 + move.l sp,d2 + moveq.l #79,d3 + jsrlib FGets + tst.l d0 + beq.b 2$ + move.l d0,a0 + cmp.b #';',(a0) ; komentar ? + beq.b 1$ ; ja, loop + bsr strlen + beq.b 1$ ; tom + subq.l #1,d0 + lea (sp),a0 + add.l d0,a0 + move.b #0,(a0) ; fjerner cr + + lea (sp),a0 ; er det space ? + move.b #' ',d0 + bsr strchr + lea (sp),a0 + beq.b 3$ ; nei + move.l a2,a1 + bsr comparestringsicase + bne.b 1$ ; ikke lik + bra.b 4$ +3$ move.l a2,a1 + move.l d6,d0 + sub.l a1,d0 + bsr comparestringsifull + beq.b 4$ + move.l d6,a1 + lea (1,a1),a1 + lea (sp),a0 + bsr comparestringsicase + bne.b 1$ ; ikke lik + +4$ moveq.l #0,d5 ; vi fant navnet +2$ move.l d4,d1 + jsrlib Close +6$ move.l d5,d0 +9$ unlk a3 + pop a2/d2/d3/d4/d5/d6/a6 + rts + +cleanupfiles + jsr (deletereadpointersfile) ; Sletter read pointers, safety + lea (maintmptext,NodeBase),a1 ; sletter hold dir'en + lea (deletestring),a0 ; Delete /#? all force + bsr strcopy + lea (-1,a1),a0 + lea (nulltext),a1 + jsr getholddirfilename + lea (maintmptext,NodeBase),a0 +1$ move.b (a0)+,d0 + bne.b 1$ ; finner slutten + lea (-1,a0),a1 + lea (allforcestring),a0 + bsr strcopy + lea (maintmptext,NodeBase),a0 + moveq.l #0,d0 ; ingen output + jsr (doexecutestring) + rts + +; d0 - nr updated +typenrupdated + push d2 + move.l d0,d2 + move.b #'<',d0 + bsr writechar + move.l d2,d0 + bsr skrivnr + lea usersupdatetext,a0 + bsr writetext + moveq.l #1,d0 + cmp.l d0,d2 + bne.b 1$ + move.b #'s',d0 + bsr writechar +1$ lea (usersupdat2text),a0 + bsr writetexto + pop d2 + rts + +;d0 = access byte +;a0 = string to put text in +getaccbittext + push a0 + lea (accessbitstext),a1 + moveq #0,d1 +1$ btst d1,d0 + beq.b 2$ + move.b (0,a1,d1.w),(a0)+ +2$ addq.w #1,d1 + cmpi.w #7,d1 + bls.b 1$ + move.b #0,(a0) + pop a0 + rts + +checkreadptrs + push d2/a2 + + IFD NOMINBAUDCHECKNOW + move.b (CommsPort+Nodemem,NodeBase),d0 ; Lokal node ? + beq.b 2$ ; Ja, da er det ok. + move.l #300,d0 + cmp.l (MinBaud+Nodemem,NodeBase),d0 + beq.b 2$ + lea (25$),a0 + bsr writetexto + lea (24$),a0 + bsr writetexto +2$ + ENDC +0$ moveq.l #0,d2 +1$ move.l d2,d0 + bsr getnextconfnr + move.l d0,d2 + beq.b 9$ ; ferdig + lea (u_almostendsave+CU,NodeBase),a0 + mulu #Userconf_seizeof/2,d0 + add.l d0,a0 + move.l (uc_LastRead,a0),d1 + move.l d2,d0 + + lea (n_FirstConference+CStr,MainBase),a1 + mulu #ConferenceRecord_SIZEOF/2,d0 + add.l d0,a1 + move.l (n_ConfDefaultMsg,a1),d0 + cmp.l d0,d1 ; a >= b + bls.b 1$ ; denne er ok. + move.l d0,(uc_LastRead,a0) ; fixer. + lea (n_ConfName,a1),a2 ; Har konferanse navnet. + lea (20$),a0 + bsr writetext + move.l a2,a0 + bsr writetexto + lea (21$),a0 + bsr writetexto + lea (22$),a0 + bsr writetexto +9$ pop d2/a2 + rts + +20$ dc.b 'Problems with conference : ',0 +21$ dc.b '(Last read is to high). Fixing now. Please tell sysop what you just did,',0 +22$ dc.b 'so the problem can be corrected.',0 +24$ dc.b 'Please tell the sysop what you just did,',0 + IFD nominbaudcheckingnow +25$ dc.b 'Min baud was trashed (not 300)',0 + ENDC + even + +; a0 - text1 +; a1 - text2 +writetextformatted + push a2/d2 + moveq.l #0,d2 ; pos = 0 + move.l a1,a2 + bsr 10$ + move.l a2,a0 + bsr 10$ + bsr outimage + pop a2/d2 + rts + +10$ push a2/d3/d4 + move.l d2,d4 ; husker initiell pos + move.l a0,a2 ; husker starten +14$ moveq.l #0,d3 ; pos for siste komma +11$ move.b (a0)+,d0 + beq.b 17$ + addq.l #1,d2 ; øker teller + cmpi.b #79,d2 + bcc.b 12$ ; for mange tegn + cmpi.b #',',d0 + bne.b 11$ + move.l d2,d3 ; husker siste komma. + bra.b 11$ +12$ move.l a2,a0 + sub.l d4,d3 ; trekker ifra initiell pos + bcc.b 13$ + moveq.l #79,d3 ; skal egentlig ikke kunne skje, men .. +13$ move.l d3,d0 + bsr writetextlen + bsr outimage + moveq.l #0,d2 ; pos = 0 + moveq.l #0,d4 ; dropper initiell pos + lea (0,a2,d3.w),a2 + move.l a2,a0 + bra.b 14$ +17$ move.l a2,a0 + bsr writetext + pop a2/d3/d4 + rts + +checkscratchpad + push d2/a6 + move.l (dosbase),a6 + jsr (getscratchpadfname) ; har vi en scratchpad ? + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + beq.b 8$ ; nei, alt ok. + jsrlib UnLock + move.l (exebase),a6 + lea (nottransscrtext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + beq 1$ ; nei, eller noe galt + moveq.l #0,d2 ; Retur verdi + jsr (sendscratch) + beq.b 2$ ; error, abort (restore)! + moveq.l #1,d2 ; retur ok + bra.b 7$ + +1$ move.b (readcharstatus,NodeBase),d0 ; Har det skjedd noe ? + notz + beq.b 9$ ; ja + moveq.l #1,d2 ; Retur verdi + lea (resetreaptrtext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + beq 7$ ; nei, eller noe galt + moveq.l #1,d2 ; retur ok +2$ jsr (restorereadpointers) + +7$ jsr (getscratchpaddelfname) ; sletter scratchpad + bsr deletepattern + jsr (deletereadpointersfile) + tst.l d2 + beq.b 9$ +8$ move.b (readcharstatus,NodeBase),d0 ; Har det skjedd noe ? + notz +9$ pop d2/a6 + rts + +; d0 = message nr +; a0 = subject vi skal test mot +; retur : z = 0, ikke samme, n = error +samesubject + push a2/a3 + move.l a0,a2 + lea (tmpmsgheader,NodeBase),a3 + move.l a3,a0 + move.w (confnr,NodeBase),d1 + jsr (loadmsgheader) + lea (errloadmsghtext),a0 + bne 8$ + move.l a3,a0 + move.w (confnr,NodeBase),d0 + bsr kanskrive ; Kan vi skrive ut denne ??? + notz + beq 9$ ; Nei. "Jump, for my love" + move.l a3,a0 + jsr (isnetmessage) + setn + beq 9$ ; ut + + lea (Subject,a3),a0 ; til uppercase + bsr upstring + lea (Subject,a3),a0 + bsr removesubjectstart + +1$ move.b (a2)+,d0 + beq.b 2$ + cmp.b (a0)+,d0 + beq.b 1$ + bra.b 9$ ; ikke de samme + +2$ move.b (a0),d0 + cmpi.b #'Y',d0 ; fjerner include y'en + bne.b 3$ + addq.l #1,a0 +3$ move.b (a0),d0 + beq.b 9$ ; ferdig, de var like + cmpi.b #' ',d0 + beq.b 3$ ; gjerner space på slutten + bra.b 9$ ; noe annet etterpå. Ikke like + +8$ bsr writeerroro + setn +9$ pop a2/a3 + rts + +; a0 : string med subject +; retur a0 : ny string start +removesubjectstart +1$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #' ',d0 ; skiper space i starten + beq.b 1$ + + lea (sretext),a1 + bsr 10$ + bne.b 2$ + bra.b 1$ ; har skipp'a 'Re:' Tar space, og en gang til + +2$ lea (ssubjecttext),a1 + bsr 10$ + beq.b 1$ + +9$ lea (-1,a0),a0 + rts + +10$ move.l a0,-(a7) + cmp.b (a1)+,d0 + bne.b 18$ +11$ move.b (a1)+,d1 + beq.b 17$ + cmp.b (a0)+,d1 + bne.b 18$ + bra.b 11$ +17$ addq.l #4,a7 + bra.b 19$ +18$ move.l (a7)+,a0 +19$ rts + +groupheaderscommon2 + move.b #'<',d0 + bsr writechar + move.l d4,d0 + bsr skrivnr + move.b #'>',d0 + bsr writechar + lea (newmsgfoundtext),a0 + bsr writetexto + rts + +groupheaderscommon + move.w (confnr,NodeBase),d0 + jsr (getfrommsgnr) + beq.b 9$ + move.l d0,d3 + move.l d0,d1 + move.w (confnr,NodeBase),d0 + jsr (gettomsgnr) + beq.b 9$ + move.l d0,d2 + lea (texttsearchtext),a0 + lea (nulltext),a1 + moveq.l #30,d0 + jsr (mayedlinepromptfull) + beq.b 9$ + move.l a0,a2 + lea (searchmsgtext),a0 + bsr writetext + move.w d3,d0 + jsr (skrivnrw) + lea (tonoansitext),a0 + bsr writetext + move.w d2,d0 + jsr (skrivnrw) + lea (fortext),a0 + bsr writetext + move.l a2,a0 + bsr writetext + move.b #'.',d0 + bsr writechar + bsr outimage +9$ rts + +; d0 = confnr (*2) +typeconfinfo + move.w d0,-(a7) + lea (maintmptext,NodeBase),a1 + lea (conftextpath),a0 + bsr strcopy + subq.l #1,a1 + move.w (a7)+,d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + lea (n_ConfName,a0,d0.l),a0 +1$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 2$ ; ferdig + move.b d0,(a1)+ + cmpi.b #'/',d0 + bne.b 1$ + move.b #' ',(-1,a1) + bra.b 1$ +2$ move.b #0,(a1)+ + lea (maintmptext,NodeBase),a0 + moveq.l #0,d0 ; ser og con + bsr typefilemaybeall + rts + +disposeansistuff + move.l a0,a1 +1$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #27,d0 ; Ansi start ? + bne.b 8$ ; nei + move.b (a0),d1 + cmpi.b #'[',d1 ; Ansi start ? + bne.b 8$ ; nei + addq.l #1,a0 +2$ move.b (a0)+,d0 ; Sletter alt frem til en bokstav + beq.b 9$ + cmpi.b #'A',d0 + bcs.b 2$ + cmpi.b #'z',d0 + bhi.b 2$ + bra.b 1$ +8$ move.b d0,(a1)+ + bra.b 1$ +9$ move.b #0,(a1) + rts + +; Legger til ansihvit etter en ESC+[0..m +;a0 = in text (forandrer denne) +;d0 = max lengde +addansiwhite + push a2/a3 + move.l a0,a3 + subq.l #2,d0 + add.l d0,a3 ; har nå slutten +1$ move.b (a0)+,d0 + beq.b 9$ + cmpi.b #27,d0 ; ESC ? + bne.b 1$ + move.b (a0)+,d0 + beq.b 9$ + cmpi.b #'[',d0 ; [ ? + bne.b 1$ + move.l a0,a1 + +2$ move.b (a1)+,d0 + beq.b 9$ + cmpi.b #'A',d0 ; venter paa en bokstav + bcs.b 2$ ; for liten + cmpi.b #'m',d0 ; m ? + beq.b 31$ ; jepp. + move.l a1,a0 ; har sjekket denne, fortsetter + bra.b 1$ + +31$ move.b (a0),d0 + cmpi.b #'m',d0 ; ESC[m ? + beq.b 5$ ; jepp + +3$ move.b (a0)+,d0 + cmpi.b #'m',d0 ; Er vi ferdige ? + beq.b 1$ ; jepp + cmpi.b #'0',d0 ; 0 ? + beq.b 5$ ; jepp. + +6$ move.b (a0)+,d0 ; looper til neste mulige spot + cmpi.b #'m',d0 ; Er vi ferdige ? + beq.b 1$ ; jepp + cmpi.b #';',d0 + beq.b 3$ + bra.b 6$ + +5$ move.b (a0)+,d0 + cmpi.b #';',d0 ; bare 0 ? + beq.b 4$ ; jepp + cmpi.b #'m',d0 + bne.b 3$ ; nope +4$ lea (-1,a0),a0 + move.l a0,a2 ; husker pos'en + lea (3,a0),a1 ; gør plass + bsr strrcopy + move.b #0,(a3) ; terminerer, så vi ikke går for langt... + move.l a2,a0 + move.b #';',(a0)+ ; legger inn ;37 + move.b #'3',(a0)+ + move.b #'7',(a0)+ + bra.b 3$ ; fortsetter + +9$ pop a2/a3 + rts + +; fjerner ANSI farve meldinger a0 = in text (forandrer denne) +disposeansicolor + push a2/d2 + move.l a0,a1 ; setter opp dest (skriver oppaa) +1$ move.b (a0)+,d0 ; henter neste tegn + beq 9$ ; null = ferdig -> ut + cmpi.b #27,d0 ; start paa ansi sekvens ? + bne.b 2$ ; nei + cmpi.b #'[',(a0) + beq.b 4$ ; ja! :-) +2$ move.b d0,(a1)+ ; ingen ansi sekvens, saa vi + bra.b 1$ ; bare kopierer over +4$ move.b d0,(a1)+ ; kopierer ut starten pa ANSI'n + move.b (a0)+,(a1)+ + move.l a0,a2 ; husker starten paa sekvensen +3$ move.b (a0)+,d0 ; soker etter slutten pa sekvensen + beq.b 13$ ; opps. slutt. kopierer, og ut + cmpi.b #'A',d0 ; venter paa en bokstav + bcs.b 3$ ; for liten + cmpi.b #'z',d0 + bhi.b 3$ ; for stor, dvs ikke noen bokstav + cmpi.b #'m',d0 ; var det en farve komando ? + bne.b 14$ ; nei, da kopierer vi, og fortsetter + moveq.l #0,d2 ; flagg. Fatt noe annet enn farver ? + move.l a2,a0 ; henter tilbake starten +5$ move.b (a0)+,d0 +10$ cmpi.b #'m',d0 ; funnet m'en enda ? + beq.b 8$ ; ja, ut herfra + cmpi.b #'3',d0 ; er det en farve komando ? + beq.b 6$ ; kanskje ... + cmpi.b #'4',d0 ; (de er 3x eller 4x) + bne.b 7$ ; nei +6$ move.b (a0),d1 ; sjekker neste tegn + subi.b #'0',d1 ; er det et siffer ? + bcs.b 7$ ; nei + cmpi.b #9,d1 + bhi.b 7$ ; nei + addq.l #1,a0 ; glemmer disse tegnene + move.b (a0)+,d0 ; er det et semi kolon her ? + cmpi.b #';',d0 + bne.b 10$ ; nei, da fortsetter vi + bra.b 5$ ; ja, vi glemmer tegnet +7$ moveq.l #1,d2 ; vi har fatt noe annet + move.b d0,(a1)+ + bra.b 5$ +13$ move.b (a2)+,(a1)+ + cmpa.l a2,a0 + bhi.b 13$ + bra.b 9$ +14$ move.b (a2)+,(a1)+ + cmpa.l a2,a0 + bhi.b 14$ + bra.b 1$ +8$ cmpi.b #';',(-1,a1) ; har vi en ';' før m'en ? + bne.b 11$ ; nei + move.b d0,(-1,a1) ; ja, da fjerner vi den + bra.b 12$ +11$ move.b d0,(a1)+ ; skriver ut m'en +12$ tst.b d2 ; fikk vi noe annet en farver ? + bne 1$ ; ja + subq.l #3,a1 ; glemmer esc+[+m tegnene. + bra 1$ +9$ move.b #0,(a1) + pop a2/d2 + rts +; a0 = datestamp +; retur: +; d0 = århundre (eg 1993) +; d1 = mnd +; d2 = mnddag +; d3 = ukedag +datestampetodate + link.w a2,#-CD_SIZE + + move.l (ds_Days,a0),d0 + mulu.w #60*60,d0 + move.l (utibase),a6 + moveq.l #24,d1 + jsrlib UMult32 + move.l sp,a0 + jsrlib Amiga2Date + move.l sp,a0 + moveq.l #0,d0 + moveq.l #0,d1 + moveq.l #0,d2 + moveq.l #0,d3 + move.w (year,a0),d0 + move.w (month,a0),d1 + move.w (mday,a0),d2 + move.w (wday,a0),d3 + subi.w #1,d3 + bcc.b 3$ + moveq.l #6,d3 +3$ move.l (exebase),a6 + unlk a2 + rts + +; StrToDate +; inn : d0 = år, d1 = mnd, d2 = dag. +; reultat : d0 = antall dager siden 1/1-1978 +datetodays + push d4-d5 + + move.l (utibase),a6 + lea (tmplargestore,NodeBase),a0 + + move.b d0,D5 + moveq #78,D4 // Er vi over 78? Da lager vi 2000 + cmp.w D4,D5 // er d5 > d4??? + BCC.B 1$ // Hopper til 1900 + addi.w #2000,d5 + bra.b 2$ +1$ addi.w #1900,D5 // Kun denne som var fra før... +2$ moveq #00,D4 + move.w D5,D0 + + move.w d0,(year,a0) + move.w d1,(month,a0) + move.w d2,(mday,a0) + moveq.l #0,d0 + move.w d0,(hour,a0) + move.w d0,(min,a0) + move.w d0,(sec,a0) + jsrlib CheckDate + tst.l d0 + beq.b 29$ + move.l #60*60*24,d1 ; gjør om til dager + jsrlib UDivMod32 +29$ move.l (exebase),a6 + pop d4-d5 + rts + + cnop 0,2 + +***************************************************************** +* Setup rutiner * +***************************************************************** + +; a0 - errormelding +shownodeerror + push d0-d2/a0/a1/a2/a6/a3 + link.w a3,#-20 ; ess_SIZEOF + move.l a3,d2 + move.l #20,(es_StructSize,sp) ; ess_SIZEOF + moveq.l #0,d0 + move.l d0,(es_Flags,sp) + move.l #abbserrortext,(es_Title,sp) + move.l a0,(es_TextFormat,sp) + move.l #oktext,(es_GadgetFormat,sp) + move.l (intbase),a6 + sub.l a0,a0 + move.l sp,a1 + sub.l a2,a2 + sub.l a3,a3 + jsrlib EasyRequestArgs + move.l d2,a3 +9$ unlk a3 + pop d0-d2/a0/a1/a2/a6/a3 + rts + +doallsetup + suba.l NodeBase,NodeBase ; vi har ikke noe nodebase enda + bsr setup ; skaffer minne ++ + beq setup_error + btst #NodeSetupB_DontShow,(NodeSetup+Nodemem,NodeBase) + bne.b 2$ ; vi skal ikke vis noden ved oppstart + bsr shownode +2$ bsr opentimer ; åpner timer + beq.b no_timer + IFND DEMO + move.b #0,(RealCommsPort,NodeBase) ; clearer for sikkerhets skyld + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 1$ ; nei + bsr openserial ; åpner serial + beq.b no_serial + ENDC +1$ bsr setupnode + beq.b setupnode_error + bsr cleanupfiles + clrz ; temp + rts + +doallshutdown + move.b #'a',d0 + jsr (writeconchar) + clr.b (NodeError,NodeBase) ; alt gikk bra + bsr shutdownnode +setupnode_error + IFND DEMO + cmpi.b #-1,(RealCommsPort,NodeBase) ; vi hadde en, men.. rydder opp + beq.b 1$ + tst.b (CommsPort+Nodemem,NodeBase) ; er vi en ekstern node ? + beq.b no_serial ; nei +1$ move.b #'q',d0 + bsr writeconchar + bsr closeserial ; lukker serial + ENDC +no_serial + move.b #'w',d0 + bsr writeconchar + bsr closetimer ; lukker timer +no_timer + move.b #'e',d0 + bsr writeconchar + bsr closeconsole ; lukker console + + IFEQ sn-13 + move.l (windowadr,NodeBase),d0 + beq.b 1$ ; no window + move.l d0,a0 + lea (consolename),a1 + moveq.l #-1,d0 + move.l d0,a2 + move.l intbase,a6 + jsrlib SetWindowTitles + move.l exebase,a6 +1$ + ENDC + +no_console + bsr closewindow ; lukker vindu +no_window + moveq.l #0,d0 + move.b (NodeError,NodeBase),d0 ; husker error status + move.w d0,-(sp) + move.l (msg,NodeBase),-(a7) + bsr closedown ; frigir minne +++ + move.l (A7)+,a1 + move.w (sp)+,d0 ; henter frem status + bra.b setup_error1 +setup_error + suba.l a1,a1 + jsrlib FindTask + move.l nodelist+LH_HEAD,a0 ; Finner vår nodenode +0$ move.l (LN_SUCC,a0),d1 + beq.b 1$ ; skal egentlig alltid ta denne, men.. + cmp.l (NodeTask,a0),d0 ; Vi har alltid satt inn vår task + beq.b 1$ ; adresse der. + move.l d1,a0 + bra.b 0$ ; loop'e +1$ clr.w (Nodenr,a0) ; Vi finnes ikke lenger + lea (Nodemsg,a0),a1 ; henter frem meldingen + moveq.l #100,d0 ; fatal error +setup_error1 + jsrlib Forbid ; tar forbid resten av livet + move.l (mainmsgport),a0 ; porten vi skal sende til + move.w d0,(m_Error,a1) ; legger ved feilnummeret + move.w #Main_shutdown,(m_Command,a1) + move.l (MN_REPLYPORT,a1),-(sp) ; husker reply port + jsrlib PutMsg ; sender melding + move.l (sp)+,d0 ; henter fram replyport + beq.b 3$ ; det var ingen. To bad. Ut. + move.l d0,-(sp) ; husker en gang til + move.l d0,a0 + jsrlib WaitPort ; venter på svar + move.l (sp)+,a0 ; henter frem... + jsrlib GetMsg ; henter meldingen +3$ jsrlib Permit + setz ; returnerer error, i tifelle + rts ; ;vi havnet her fra doallsetup + +setup move.l (4,a5),d0 ; tmp stacksize + subi.l #4*6,d0 ; tmp fyller stack'en med en pattern + lsr.l #2,d0 ; tmp deler på longword's + move.l a7,a0 ; tmp + move.l #$12345678,d1 ; tmp +1234$ move.l d1,-(a0) ; tmp + subq.l #1,d0 ; tmp + bne.b 1234$ ; tmp + + move.l nodelist+LH_HEAD,d0 +4$ move.l d0,a0 + move.l (LN_SUCC,a0),d0 + beq.b 41$ ; siste, egentlig umulig, men .. + move.l (NodeTask,a0),d1 ; er det vår ? + bne.b 4$ ; nei, sommer! :-) +41$ move.l a0,a4 ; husker nodenoden vår + suba.l a1,a1 + jsrlib FindTask + move.l d0,(NodeTask,a4) ; lagrer vår adresse her. + jsrlib Permit ; nå kan andre noder starte + + lea (NodeStatusText,a4),a0 ; setter opp nodestatus teksten + move.l a0,(LN_NAME,a4) + move.w (Nodenr,a4),d0 + add.b #'0',d0 + move.b d0,(a0) + + move.l #ramblocks_SIZE,d0 + move.l (mainmemoryblock),a0 + add.l (UserrecordSize+CStr,a0),d0 + add.l (UserrecordSize+CStr,a0),d0 + moveq.l #0,d1 + move.w (Maxconferences+CStr,a0),d1 + lsl.l #2,d1 + add.l d1,d0 ; plass til loginlastread + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocVec + tst.l d0 + bne.b 6$ + suba.l a4,a4 ; sletter igjen + lea (nomemoryerror),a0 + bsr shownodeerror + bra 1$ +6$ move.l a4,a0 ; nodenoden + move.l d0,NodeBase + move.l a5,(nodestack,NodeBase) + move.l (mainmemoryblock),MainBase + + move.b #100,(NodeError,NodeBase) + lea (3+infoblockmem,NodeBase),a1 + move.l a1,d0 + andi.l #$fffffffc,d0 + move.l d0,(infoblock,NodeBase) + + move.w (MaxLinesMessage+CStr,MainBase),d0 + mulu.w #LinesSize,d0 + move.l d0,(msgmemsize,NodeBase) + + lea (CU,NodeBase),a1 + add.l (UserrecordSize+CStr,MainBase),a1 + move.l a1,(Tmpusermem,NodeBase) + add.l (UserrecordSize+CStr,MainBase),a1 + move.l a1,(Loginlastread,NodeBase) + + move.l a0,(nodenoden,NodeBase) + move.w (Nodenr,a0),(NodeNumber,NodeBase) + lea (Nodemsg,a0),a1 + move.l a1,(msg,NodeBase) + + lea (Nodenode_SIZEOF,a0),a1 + move.l a1,(tmpmsgmem,NodeBase) + + movem.l d2-d4,-(sp) + move.l (dosbase),a6 + move.l a0,d4 + + move.l #abbsrootname,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d1 + bne.b 61$ + lea (noabbsdirerror),a0 + bsr shownodeerror + bra 21$ + +61$ jsrlib CurrentDir + move.l d0,d1 + jsrlib UnLock + + move.l d4,a0 + move.l (NodeTask,a0),a0 + move.l (LN_NAME,a0),d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq.b 63$ + move.l d4,d1 + lea (Nodemem,NodeBase),a0 + move.l a0,d2 + move.l #NodeRecord_SIZEOF,d3 + jsrlib Read + move.l d0,d2 + move.l d4,d1 + jsrlib Close + cmp.l d2,d3 + beq.b 62$ + +63$ lea (nodeconfigerror),a0 + bra 2$ + +62$ move.l (exebase),a6 + jsr checkforduplicatetmpdirs + lea (sametmpdirerror),a0 + beq 2$ + lea (Nodetaskname,NodeBase),a1 + lea (nodetaskname),a0 + move.w (NodeNumber,NodeBase),d0 + bsr fillinnodenr + subq.l #1,a1 + move.l a1,(windowtitleptr,NodeBase) + jsr (updatewindowtitle) + + suba.l a1,a1 + jsrlib FindTask + move.l d0,a1 + lea (Nodetaskname,NodeBase),a0 + move.l a0,(LN_NAME,a1) + move.l (pr_CLI,a1),d0 + beq.b 65$ + lsl.l #2,d0 + exg d0,a0 + subq.l #1,d0 + lsr.l #2,d0 + move.l (cli_CommandName,a0),(oldcliname,NodeBase) + move.l d0,(cli_CommandName,a0) + lea (Nodetaskname,NodeBase),a0 + bsr strlen + move.b d0,(Nodetaskname_BCPL,NodeBase) +65$ move.l NodeBase,(TC_Userdata,a1) + moveq.l #-1,d0 + move.l d0,(pr_WindowPtr,a1) ; Fjerner alle requestere for noden + move.l (TC_TRAPCODE,a1),d0 ; check current exception + move.l a1,-(a7) + move.l d0,a1 + jsrlib TypeOfMem + move.l (a7)+,a1 + IFD exceptionhandler + tst.l d0 ; Er det null ? dvs ROM eller ingenting + bne.b 5$ ; somebody else (debugger?) has vector + move.l #Exception,(TC_TRAPCODE,a1) ; install pointers to code + move.l NodeBase,(TC_TRAPDATA,a1) ; ...and data + ENDC + +5$ move.l (nodenoden,NodeBase),a0 + move.l a1,(NodeTask,a0) + moveq.l #-1,d0 + move.l d0,d2 + jsrlib AllocSignal + cmp.l d2,d0 + bne.b 64$ + lea (nosignalerror),a0 + bra 2$ +64$ moveq.l #1,d1 + lsl.l d0,d1 + move.l (nodenoden,NodeBase),a0 + move.l d1,(InterMsgSig,a0) + move.l d1,(intersigbit,NodeBase) + or.l d1,(waitbits,NodeBase) + move.b d0,(intersigbitnr,NodeBase) + + suba.l a0,a0 ; ikke public name + moveq.l #0,d0 + bsr CreatePort + move.l d0,(nodeport,NodeBase) + beq 7$ + move.l (msg,NodeBase),a1 + move.l d0,(MN_REPLYPORT,a1) + + suba.l a0,a0 ; ikke public name + moveq.l #0,d0 + bsr CreatePort + move.l d0,(rexxport,NodeBase) + beq.b 8$ + move.l d0,a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + move.l d0,(rexxsigbit,NodeBase) + + move.l (dosbase),a6 + moveq.l #DOS_EXALLCONTROL,d1 + moveq.l #0,d2 + jsrlib AllocDosObject + move.l (exebase),a6 + move.l d0,(exallctrl,NodeBase) + beq.b 32$ +31$ clrz +3$ movem.l (sp)+,d2-d4 +1$ rts + +32$ lea (nomemoryerror),a0 + bsr shownodeerror + move.l (rexxport,NodeBase),a0 + jsr DeletePort + bra.b 33$ +8$ lea (noporterror),a0 + bsr shownodeerror +33$ move.l (nodeport,NodeBase),a0 + jsr DeletePort + bra.b 81$ +7$ lea (noporterror),a0 +2$ bsr shownodeerror +81$ move.l (dosbase),a6 + moveq.l #0,d1 + jsrlib CurrentDir + move.l d0,d1 + jsrlib UnLock +21$ move.l (exebase),a6 + move.l NodeBase,a1 + jsrlib FreeVec + setz + bra.b 3$ + +closedown + move.l NodeBase,d0 ; Har vi satt opp noden ? + beq 9$ ; Nei, da er vi ferdige + move.l (nodenoden,NodeBase),d0 + beq.b 4$ + move.l d0,a0 ; Setter nodenr til 0 i kjeden. + clr.w (Nodenr,a0) ; dvs, vi finnes ikke lenger. + bsr (updatenodestatustext) +4$ move.l (exallctrl,NodeBase),d0 + move.l (dosbase),a6 + push d2 + move.l d0,d2 ; frigir ExAllControl + moveq.l #DOS_EXALLCONTROL,d1 + jsrlib FreeDosObject + pop d2 + move.l (exebase),a6 +6$ move.l (rexxport,NodeBase),d0 ; Har vi port ? + beq.b 5$ ; Nei. + move.l d0,a0 + jsr DeletePort +5$ move.l (nodeport,NodeBase),d0 ; Har vi port ? + beq.b 1$ ; Nei. + move.l d0,a0 + jsr DeletePort + move.l (msg,NodeBase),a1 + moveq.l #0,d0 ; sletter porten herfra + move.l d0,(MN_REPLYPORT,a1) +1$ moveq.l #0,d0 + move.b (intersigbitnr,NodeBase),d0 + beq.b 2$ + jsrlib FreeSignal +2$ suba.l a1,a1 + jsrlib FindTask + move.l d0,a1 + move.l (pr_CLI,a1),d0 + beq.b 21$ + lsl.l #2,d0 + move.l d0,a0 + move.l (oldcliname,NodeBase),(cli_CommandName,a0) +21$ move.l (dosbase),a6 + moveq.l #0,d1 + jsrlib CurrentDir + move.l d0,d1 + beq.b 3$ + jsrlib UnLock +3$ move.l (exebase),a6 + suba.l a1,a1 + exg a1,NodeBase + jmplib FreeVec +9$ rts + +openwindow + link.w a3,#-windowtagssize + move.l (windowadr,NodeBase),d0 + bne 9$ ; allerede åpent + btst #NodeSetupB_UseABBScreen,(NodeSetup+Nodemem,NodeBase) + beq.b 11$ ; vi skal ikke ha abbs skjermen + jsr (askopenscreen) +11$ move.l (intbase),a6 + + moveq.l #0,d0 + move.l d0,(curprompt,NodeBase) ; sletter for sikkerhets skyld + + lea (sp),a1 + lea windowtags,a0 + move.l #windowtagssize,d0 + bsr memcopylen + + lea (Nodetaskname,NodeBase),a1 + move.l a1,(windowtitleoff,sp) + moveq.l #0,d0 + move.w (win_big_width+Nodemem,NodeBase),d0 + move.l d0,(windowwidthoff,sp) + move.w (win_big_height+Nodemem,NodeBase),d0 + move.l d0,(windowheightoff,sp) + + move.w (win_big_x+Nodemem,NodeBase),d0 + move.l d0,(windowleftoff,sp) + move.w (win_big_y+Nodemem,NodeBase),d0 + move.l d0,(windowtopoff,sp) + + move.b (NodeSetup+Nodemem,NodeBase),d1 + btst #NodeSetupB_TinyMode,d1 + beq.b 1$ ; ikke tiny + + move.w (windowleftoff+2,sp),firstzoom+0 + move.w (windowtopoff+2,sp),firstzoom+2 + move.w (windowwidthoff+2,sp),firstzoom+4 + move.w (windowheightoff+2,sp),firstzoom+6 + + move.w #minwindowx,(windowwidthoff+2,sp) + move.w #minwindowy,(windowheightoff+2,sp) + move.w (win_tiny_x+Nodemem,NodeBase),d0 + move.l d0,(windowleftoff,sp) + move.w (win_tiny_y+Nodemem,NodeBase),d0 + move.l d0,(windowtopoff,sp) + move.b #1,(Tinymode,NodeBase) + +1$ lea (windowsizepos,NodeBase),a0 + moveq.l #0,d0 + move.w (4,a0),d0 ; har vi lagret størrelse ? (henter wd_Width) + beq.b 4$ ; nei + move.l d0,(windowwidthoff,sp) ; ja, bruker tidligere + move.w (0,a0),d0 + move.l d0,(windowleftoff,sp) + move.w (2,a0),d0 + move.l d0,(windowtopoff,sp) + move.w (6,a0),d0 + move.l d0,(windowheightoff,sp) +4$ moveq.l #0,d0 + move.l d0,(pubscreenadr,NodeBase) + move.l (mainscreenadr),d0 + btst #NodeSetupB_UseABBScreen,(NodeSetup+Nodemem,NodeBase) + bne.b 12$ ; skal bruke abbs skjermen + lea (PublicScreenName+Nodemem,NodeBase),a0 + move.b (a0),d0 + bne.b 15$ ; vi har navn + suba.l a0,a0 ; NULL == default public screen +15$ jsrlib LockPubScreen + move.l d0,(pubscreenadr,NodeBase) +12$ move.l d0,(windowpubscreenoff,sp) + btst #NodeSetupB_BackDrop,(NodeSetup+Nodemem,NodeBase) + beq.b 14$ ; vi skal ikke ha backdrop + move.l (windowflagsoff,sp),d1 + and.l #~(WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_SIZEGADGET),d1 + or.l #WFLG_BACKDROP|WFLG_BORDERLESS,d1 + move.l d1,(windowflagsoff,sp) + move.l d0,a1 + move.w (sc_Width,a1),(windowwidthoff+2,sp) ; Samme bredde som skjermen + moveq.l #0,d0 + move.l d0,(windowleftoff,sp) + move.b (sc_BarHeight,a1),d0 ; Justerer starten etter + addq.l #1,d0 + move.l d0,(windowtopoff,sp) ; Høyden på skjermens titlebar + moveq.l #0,d1 + move.w (sc_Height,a1),d1 + sub.l d0,d1 + subq.l #1,d1 ; lager plass for å klikke på skjermen + move.l d1,(windowheightoff,sp) ; Og justerer høyden på vinduet +14$ suba.l a0,a0 + move.l sp,a1 + jsrlib OpenWindowTagList + move.l d0,(windowadr,NodeBase) + bne.b 2$ + lea (nowindowerror),a0 + bsr shownodeerror + bra 9$ +2$ + lea (maintmptext,NodeBase),a0 ; bruker denne som en textaddr structur + lea (Font+Nodemem,NodeBase),a1 + move.b (a1),d0 ; har vi en font ? + beq.b 13$ ; nei, dropper den + move.l a1,(ta_Name,a0) + move.w (FontSize+Nodemem,NodeBase),(ta_YSize,a0) + move.b #FS_NORMAL,(ta_Style,a0) + move.b #0,(ta_Flags,a0) + move.l (dfobase),a6 + jsrlib OpenDiskFont + move.l (gfxbase),a6 + move.l d0,(fontadr,NodeBase) + beq.b 13$ + move.l (windowadr,NodeBase),a0 + move.l (wd_RPort,a0),a1 + move.l d0,a0 + jsrlib SetFont +13$ move.l (intbase),a6 + + bsr setupmenu + lea (setupmenuerror),a0 + beq.b 5$ + move.l (node_menu,NodeBase),a1 + move.l (windowadr,NodeBase),a0 + jsrlib SetMenuStrip + tst.l d0 + bne.b 7$ + bsr freemenu + lea (nomenuerror),a0 +5$ bsr shownodeerror + bra.b 8$ + +7$ move.b (activesysopchat,NodeBase),d0 + beq.b 71$ + bsr setsysopcheckmark +71$ move.l (windowadr,NodeBase),a0 + move.l (wd_UserPort,a0),a0 + moveq #0,d1 + move.b (MP_SIGBIT,a0),d1 + moveq.l #0,d0 + bset d1,d0 + move.l d0,(intsigbit,NodeBase) + or.l d0,(waitbits,NodeBase) + move.l a0,(intmsgport,NodeBase) + + + move.l (aslbase),d0 ; har vi asl ? + beq.b 6$ ; nope + move.b (Cflags+CStr,MainBase),d1 ; Tillater vi ASL ? + andi.b #CflagsF_UseASL,d1 + bne.b 10$ ; jepp + move.l d0,a1 ; lukker asl.library igjen. + move.l (exebase),a6 + jsrlib CloseLibrary + moveq.l #0,d0 + move.l d0,(aslbase) ; slår av bruken + bra.b 6$ +10$ move.l d0,a6 + moveq.l #ASL_FileRequest,d0 + lea (filereqtags),a0 + move.l (windowadr,NodeBase),(4,a0) + jsrlib AllocAslRequest + move.l d0,(filereqadr,NodeBase) +6$ move.l (exebase),a6 + clrz + +9$ move.l (exebase),a6 + unlk a3 + rts +8$ move.l (windowadr,NodeBase),a0 + jsrlib CloseWindow + moveq.l #0,d0 + move.l d0,(windowadr,NodeBase) +; setz + bra.b 9$ + +closewindow + move.l (showuserwindowadr,NodeBase),d0 ; har vi user vindu ? + beq.b 1$ ; nei, går videre + bsr closeshowuserwindow ; ja, lukker +1$ move.l (windowadr,NodeBase),d0 + beq.b 9$ ; ikke noe vindu oppe, så det så!! + move.l (filereqadr,NodeBase),d0 ; har vi fått requester ? + beq.b 5$ ; nope + move.l d0,a0 + move.l (aslbase),a6 ; vi har asl + jsrlib FreeAslRequest +5$ move.l (intbase),a6 + move.l (windowadr,NodeBase),a0 + jsrlib ClearMenuStrip + bsr freemenu + move.l (windowadr,NodeBase),a0 + lea (windowsizepos,NodeBase),a1 + move.l (wd_LeftEdge,a0),(0,a1) ; tar wd_TopEdge også + move.l (wd_Width,a0),(4,a1) ; tar wd_Height også + jsrlib CloseWindow + move.l (pubscreenadr,NodeBase),d0 + beq.b 2$ + move.l d0,a1 + suba.l a0,a0 + jsrlib UnlockPubScreen +2$ move.l (fontadr,NodeBase),d0 + beq.b 3$ + move.l (gfxbase),a6 + move.l d0,a1 + jsrlib CloseFont +3$ move.l (exebase),a6 + jsr (askclosescreen) + moveq.l #0,d0 + move.l d0,(windowadr,NodeBase) + move.l (intsigbit,NodeBase),d0 + beq.b 9$ ; ikke noe bit + not.l d0 + and.l d0,(waitbits,NodeBase) ; fjerner window bit'et + moveq.l #0,d0 + move.l d0,(intsigbit,NodeBase) ; her også +9$ rts + +setupmenu + push a6 + move.l (gadbase),a6 + move.l (windowadr,NodeBase),a0 + move.l (wd_WScreen,a0),a0 + suba.l a1,a1 + jsrlib GetVisualInfoA + move.l d0,(visualinfo,NodeBase) + beq.b 9$ + lea.l (Project0NewMenu0),a0 + lea (createmenutags),a1 + move.b (Cflags+CStr,MainBase),d1 + btst #CflagsB_8Col,d1 + bne.b 1$ + move.l #1,(4,a1) +1$ jsrlib CreateMenusA + move.l d0,(node_menu,NodeBase) + beq.b freemenu2 + move.l d0,a0 + push a2 + lea (MenuTags),a2 + move.l (visualinfo,NodeBase),a1 + jsrlib LayoutMenusA + pop a2 + tst.l d0 + beq.b freemenu1 +9$ pop a6 + rts + +freemenu + push a6 + move.l (gadbase),a6 +freemenu1 + move.l (node_menu,NodeBase),a0 + jsrlib FreeMenus +freemenu2 + move.l (visualinfo,NodeBase),a0 + jsrlib FreeVisualInfo + pop a6 + setz + rts + + IFND GTMN_NewLookMenus +GTMN_NewLookMenus EQU GT_TagBase+67 ; ti_Data is boolean + ENDC +MenuTags +; DC.L GTMN_NewLookMenus,1 + DC.L TAG_DONE,0 + +createmenutags + dc.l GTMN_FrontPen,4 + dc.l TAG_DONE,0 + +openconsole + push a2 + move.l (cwritereq,NodeBase),d0 + bne 9$ + suba.l a0,a0 + moveq.l #0,d0 + bsr CreatePort + bne.b 2$ + lea (noporterror),a0 + bsr shownodeerror + bra no_cwport +2$ move.l d0,a0 + move.l d0,a2 + bsr CreateStdIO + bne.b 3$ + lea (noioreqerror),a0 + bsr shownodeerror + bra no_cwio +3$ move.l d0,(cwritereq,NodeBase) + + suba.l a0,a0 + moveq.l #0,d0 + bsr CreatePort + bne.b 4$ + lea (noporterror),a0 + bsr shownodeerror + bra no_crport +4$ move.l d0,a0 + move.l d0,a2 + bsr CreateStdIO + bne.b 5$ + lea (noioreqerror),a0 + bsr shownodeerror + bra no_crio +5$ move.l d0,(creadreq,NodeBase) + + move.l (cwritereq,NodeBase),a1 + move.l (windowadr,NodeBase),(IO_DATA,a1) + move.l #wd_Size,(IO_LENGTH,a1) + lea (consolename),a0 + moveq.l #CONU_SNIPMAP,d0 + moveq.l #0,d1 + jsrlib OpenDevice + tst.l d0 + beq.b 6$ + lea (nocondeverror),a0 + bsr shownodeerror + bra no_cdev +6$ move.l (cwritereq,NodeBase),a0 + move.l (creadreq,NodeBase),a1 + move.l (MN_REPLYPORT,a1),a2 ; husker msgport'en + moveq.l #IOSTD_SIZE,d0 + bsr memcopylen + move.l (creadreq,NodeBase),a1 + move.l a2,(MN_REPLYPORT,a1) ; setter tilbake + + move.l (MN_REPLYPORT,a1),a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,a0),d1 + bset d1,d0 + move.l d0,(consigbit,NodeBase) + or.l d0,(waitbits,NodeBase) + move.l (creadreq,NodeBase),a1 ; kjører io'ene en gang + move.w #CMD_INVALID,(IO_COMMAND,a1) ; for å forhindre guru + jsrlib DoIO ; under closeconsole + move.l (cwritereq,NodeBase),a1 + move.w #CMD_INVALID,(IO_COMMAND,a1) + jsrlib DoIO + clrz +9$ pop a2 + rts + +closeconsole + push a2 + move.l exebase,a6 + move.l (cwritereq,NodeBase),d0 ; er vi oppe ? + beq closeconret ; nei, allerede lukket + move.l (creadreq,NodeBase),d0 + beq.b closeconret ; nei, allerede lukket + move.l d0,a1 ; er det en read igang ? + jsrlib CheckIO + tst.l d0 + bne.b 1$ ; nei + move.l (creadreq,NodeBase),a1 ; Ja, tar og aborterer den + jsrlib AbortIO +1$ move.l (creadreq,NodeBase),a1 ; fjerner + jsrlib WaitIO + move.l (cwritereq,NodeBase),a1 ; fjerner + jsrlib WaitIO + + IFEQ sn-13 + move.l #$fffff,d1 +3$ move.w #$fff,($dff180) + subq.l #1,d1 +; bne.b 3$ + ENDC + + move.l (cwritereq,NodeBase),a1 ; stenger + jsrlib CloseDevice +no_cdev move.l (creadreq,NodeBase),a0 ; frigir + move.l (MN_REPLYPORT,a0),a2 + bsr DeleteStdIO +no_crio move.l a2,a0 + jsr DeletePort +no_crport + move.l (cwritereq,NodeBase),a0 + move.l (MN_REPLYPORT,a0),a2 + bsr DeleteStdIO +no_cwio move.l a2,a0 + jsr DeletePort +no_cwport + moveq.l #0,d0 + move.l d0,(cwritereq,NodeBase) ; husker at vi ikke har + move.l d0,(creadreq,NodeBase) ; husker at vi ikke har + move.l (consigbit,NodeBase),d0 + beq.b closeconret + not.l d0 + and.l d0,(waitbits,NodeBase) +closeconret +; setz + pop a2 + rts + +opentimer + move.l d2,-(a7) + lea (timername),a0 + suba.l a1,a1 ; ikke noe navn + moveq.l #UNIT_VBLANK,d0 + moveq.l #0,d1 + moveq.l #IOTV_SIZE,d2 + bsr IOpenDevice + bne.b 1$ + lea (notimerdeverror),a0 + bsr shownodeerror + bra.b 8$ +1$ move.l a0,(timer1req,NodeBase) + + lea (timername),a0 + suba.l a1,a1 ; ikke noe navn + moveq.l #UNIT_VBLANK,d0 + moveq.l #0,d1 + moveq.l #IOTV_SIZE,d2 + bsr IOpenDevice + bne.b 2$ + lea (notimerdeverror),a0 + bsr shownodeerror + bra.b 9$ +2$ move.l a0,(timer2req,NodeBase) + move.l (a7)+,d2 + move.l (timer1req,NodeBase),a1 + move.l (MN_REPLYPORT,a1),a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + move.l d0,(timer1sigbit,NodeBase) + move.l (timer2req,NodeBase),a1 + move.l (MN_REPLYPORT,a1),a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + move.l d0,(timer2sigbit,NodeBase) + or.l d0,(waitbits,NodeBase) + rts + +8$ move.l (timer1req,NodeBase),a0 + bsr ICloseDevice +9$ move.l (a7)+,d2 + setz + rts + +closetimer + move.l (timer2req,NodeBase),a0 + bsr ICloseDevice + move.l (timer1req,NodeBase),a0 + bra ICloseDevice + + IFND DEMO +openserial + suba.l a0,a0 + moveq.l #0,d0 + bsr CreatePort + bne.b 10$ + lea (noporterror),a0 + bsr shownodeerror + bra 1$ +10$ move.l d0,a0 + move.l a0,-(sp) + moveq.l #IOEXTSER_SIZE,d0 + bsr CreateExtIO + move.l (sp)+,a1 + bne.b 12$ + lea (noioreqerror),a0 + bsr shownodeerror + bra 2$ +12$ move.l d0,(swritereq,NodeBase) + suba.l a0,a0 + moveq.l #0,d0 + bsr CreatePort + bne.b 11$ + lea (noporterror),a0 + bsr shownodeerror + bra 3$ +11$ move.l d0,a0 + move.l a0,-(sp) + moveq.l #IOEXTSER_SIZE,d0 + bsr CreateExtIO + move.l (sp)+,a1 + bne.b 14$ + lea (noioreqerror),a0 + bsr shownodeerror + bra 4$ +14$ move.l d0,(sreadreq,NodeBase) + move.l (sreadreq,NodeBase),a1 + lea (Serialdevicename+Nodemem,NodeBase),a0 + moveq.l #0,d0 + move.b (CommsPort+Nodemem,NodeBase),d0 + move.b d0,(RealCommsPort,NodeBase) + subq.l #1,d0 + + move.w (Setup+Nodemem,NodeBase),d1 + move.b #0,(IO_SERFLAGS,a1) ; Null stiller. +; btst #SETUPB_XonXoff,d1 ; Vi tillater ikke XonXoff lenger +; bne.b 8$ + move.b #SERF_XDISABLED|SERF_RAD_BOOGIE|SERF_SHARED,(IO_SERFLAGS,a1) +8$ btst #SETUPB_RTSCTS,d1 + beq.b 9$ + ori.b #SERF_7WIRE,(IO_SERFLAGS,a1) +9$ moveq.l #0,d1 + jsrlib OpenDevice + tst.l d0 + + beq.b 15$ + lea (noserdeverror),a0 + bsr shownodeerror + bra 5$ +15$ bsr setserparam + beq.b 16$ + lea noserparamerro1,a0 + jsr (konverterw) + lea (noserparamerror),a0 + bsr shownodeerror + bra 7$ +16$ move.l (sreadreq,NodeBase),a1 + move.w #CMD_CLEAR,(IO_COMMAND,a1) ; flush'er bufferen + jsrlib DoIO + move.l (MN_REPLYPORT,a1),a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + move.l d0,(sersigbit,NodeBase) + or.l d0,(waitbits,NodeBase) + move.l (swritereq,NodeBase),a2 + move.l (MN_REPLYPORT,a2),d1 + moveq.l #IOEXTSER_SIZE/4,d0 +6$ move.l (a1)+,(a2)+ + dbf d0,6$ + move.l (swritereq,NodeBase),a2 + move.l d1,(MN_REPLYPORT,a2) + clrz + rts + +7$ move.l (sreadreq,NodeBase),a1 + jsrlib CloseDevice +5$ move.l (sreadreq,NodeBase),a0 + move.l (MN_REPLYPORT,a0),a2 + bsr DeleteExtIO + move.l a2,a0 +4$ jsr DeletePort +3$ move.l (swritereq,NodeBase),a0 + move.l (MN_REPLYPORT,a0),a2 + bsr DeleteExtIO + move.l a2,a0 +2$ jsr DeletePort +1$ setz + rts + +closeserial + move.l a2,-(sp) + move.l (swritereq,NodeBase),a2 + cmpi.b #-1,(RealCommsPort,NodeBase) + beq.b 1$ + move.l (sreadreq,NodeBase),a1 + move.l (IO_DEVICE,a1),d0 + beq.b 1$ ; ikke noe device.. + move.l a2,a1 + jsrlib AbortIO + move.l a2,a1 + jsrlib WaitIO + move.l (sreadreq,NodeBase),a1 + move.l a1,a2 + jsrlib AbortIO + move.l a2,a1 + jsrlib WaitIO + move.l a2,a1 + jsrlib CloseDevice +1$ move.l (sreadreq,NodeBase),a2 + move.l (MN_REPLYPORT,a2),a0 + jsr DeletePort + move.l a2,a0 + bsr DeleteExtIO + move.l (swritereq,NodeBase),a2 + move.l (MN_REPLYPORT,a2),a0 + jsr DeletePort + move.l a2,a0 + bsr DeleteExtIO + move.l (sp)+,a2 + rts + ENDC + +setupnode + lea (logfilename,NodeBase),a1 + lea (logfilenameo),a0 + move.w (NodeNumber,NodeBase),d0 + bsr fillinnodenr + + move.l (dosbase),a6 ; sørger for at vi har en + lea (TmpPath+Nodemem,NodeBase),a1 ; node dir + move.l a1,d1 + push d2 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + pop d2 + move.l d0,d1 + bne.b 2$ + lea (TmpPath+Nodemem,NodeBase),a1 + move.l a1,d1 + jsrlib CreateDir + move.l d0,d1 + bne.b 2$ + lea (notmpdirerror),a0 + bsr shownodeerror + bra.b 9$ +2$ jsrlib UnLock + +3$ move.l (exebase),a6 + lea (Publicportname,NodeBase),a1 + lea (publicportname),a0 + move.w (NodeNumber,NodeBase),d0 + bsr fillinnodenr + lea (Publicportname,NodeBase),a0 + moveq.l #0,d0 + bsr CreatePort + move.l d0,(nodepublicport,NodeBase) + bne.b 4$ + lea (noporterror),a0 + bsr shownodeerror + bra.b 9$ + +4$ move.l d0,a0 + moveq.l #0,d0 + move.b (MP_SIGBIT,A0),d1 + bset d1,d0 + move.l d0,(publicsigbit,NodeBase) + or.l d0,(waitbits,NodeBase) + + move.l (msg,NodeBase),a1 + move.w #Main_startnode,(m_Command,a1) + move.w #Error_OK,(m_Error,a1) + jsr (handlemsg) + clrz + lea (startupmsgtext),a0 ; Skriver i log'en at vi er oppe + bsr writelogstartup + clrz +9$ move.l (exebase),a6 + rts + +shutdownnode + move.l (nodepublicport,NodeBase),a0 + jsr DeletePort + move.l (dosbase),a6 + lea (TmpPath+Nodemem,NodeBase),a1 ; Sletter nodedir'en + move.l a1,d1 + push d2 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + pop d2 + move.l d0,d1 + beq.b 1$ + push d1 +; bsr deleteall ; friker ut. Sletter ting i ABBS: (tror jeg) + pop d1 + jsrlib UnLock +1$ lea (TmpPath+Nodemem,NodeBase),a1 + move.l a1,d1 + jsrlib DeleteFile + move.l (exebase),a6 + + move.l (nodestack,NodeBase),a0 ; tmp + move.l #$12345678,d1 ; tmp + moveq.l #0,d0 ; tmp +2$ addq.l #4,d0 ; tmp + cmp.l -(a0),d1 ; tmp + bne.b 2$ ; tmp + lea (maintmptext,NodeBase),a0 ; tmp + bsr konverter ; tmp + lea (maintmptext,NodeBase),a1 ; tmp + lea (3$),a0 ; tmp + bsr writelogtexttimed ; tmp + + lea (shutdownsgtext),a0 + bra writelogstartup + +3$ dc.b 'stack used:',0 ; tmp + cnop 0,4 ; tmp + +;***************************************************************************** +; Line editor. +;***************************************************************************** + +;a0 = msgheader +;a1 = buffer +;d0 = max size +editor push d2/d3/d4/d5/a2/a3 + move.l a0,a3 + move.l a1,a2 ; Buffer + move.l d0,d5 ; husker mak size + divu #80,d5 ; gjør om til max linje nr + bsr outimage + moveq.l #0,d4 ; msglen (in bytes) + moveq.l #1,d2 ; Linenr +0$ cmp.w d5,d2 + bcc 6$ ; Vi er på siste linje. To bad. + bsr outimage ; Tegner border + lea (spacetext),a0 + moveq.l #3,d0 + bsr writetextlen + lea (bordertext),a0 + moveq.l #73,d0 + bsr writetextlen + move.b #'>',d0 + bsr writechar + bsr outimage +1$ move.l d2,d0 ; Skriver : + divu #100,d0 + clr.w d0 + swap d0 + bsr skrivminst2nr + move.b #':',d0 + bsr writechar + bsr breakoutimage + moveq.l #0,d3 ; Charpos (in line) +2$ bsr readchar ; må tåle CTRL-X. FIX ME + bmi.b 2$ + bne.b 7$ + tst.b (readcharstatus,NodeBase) + notz + beq 99$ +7$ cmpi.b #13,d0 ; Return + beq 31$ + cmpi.b #10,d0 ; Return + beq 31$ + cmpi.b #8,d0 ; Del + beq 41$ + cmpi.b #9,d0 ; Tab + beq 51$ + cmpi.b #72,d3 ; Word-wrap ? + bls 21$ ; Nei, hopp + + cmp.w d5,d2 + bcc 6$ ; Vi er på siste linje. To bad. + move.w d0,-(sp) ; husk tegnet + lea (0,a2,d4.w),a0 ; ptr til slutten av buffer + move.b #0,(a0) ; en eot for sikkerhetsskyld + subq.l #1,a0 + moveq.l #71,d0 ; scanner siste linje +3$ cmpi.b #' ',-(a0) ; Etter siste space'et + dbeq d0,3$ ; Looper til funnet, eller eol. + beq.b 4$ ; Jepp, vi fant et space. Hopp. + move.b #10,(0,a2,d4.w) ; Legger til NL + addq.l #1,d4 + addq.l #1,d2 ; Neste linje + bsr outimage + move.l d2,d0 ; Skriver : + divu #100,d0 + clr.w d0 + swap d0 + bsr skrivminst2nr + move.b #':',d0 + bsr writechar + bsr breakoutimage + moveq.l #0,d3 + bra.b 5$ ; Fortsett på ny linje +4$ move.b #10,(a0) ; Slenger inn en newline der. + addq.l #1,a0 ; Hvor mange tegn skal flyttes ?? + neg.w d0 + addi.w #72,d0 + ext.l d0 ; Svaret i d0. + bpl.b 22$ ; Sikrer at vi ikke får noe negativt. + moveq.l #0,d0 +22$ movem.l d0/a0,-(sp) + move.l d0,d3 + beq.b 23$ ; Ikkenoe å slette. Hopp + lea (deletetext),a0 ; Flytter cursor til venstre + bsr writetextleni + move.l d3,d0 + lea (spacetext),a0 ; Sletter tegn (skriver space oppå) + bsr writetextleni +23$ addq.l #1,d2 ; Ny linje + bsr outimage + move.l d2,d0 ; Skriver : + bsr skriv2nr + move.b #':',d0 + bsr writechar + movem.l (sp)+,d0/a0 ; skriver det som skal på neste linje + bsr writetextlen + bsr breakoutimage +5$ move.w (sp)+,d0 ; Og tegnet var ... + +21$ move.b d0,(0,a2,d4.w) ; inn i bufferet + addq.l #1,d4 ; øke bufferptr + addq.l #1,d3 ; øker antall tegn på denne linja + bsr writechari ; echo + bra 2$ ; les neste tegn + +31$ tst.l d3 ; Return (egentlig lf) + beq.b 6$ ; return på tom linje => end + move.b #10,(0,a2,d4.w) ; inn i buffer + addq.l #1,d4 ; ptr + moveq.l #0,d3 + addq.l #1,d2 + bsr outimage ; ny linje + bra 1$ ; skriv ut linjenr .. + +41$ tst.l d3 ; Del + beq.b 49$ ; ikke noe å slette. + lea (deltext),a0 ; sletter et tegn + moveq.l #3,d0 + bsr writetextleni + subq.l #1,d4 ; fra bufferet også + subq.l #1,d3 +49$ bra 2$ + +51$ ;addq.l #8,d3 ; tab. Kva gjer me ?? + bra 2$ ; truncate ?? + +6$ clr.b (1,a2,d4.w) + move.w d2,(NrLines,a3) + move.w d4,(NrBytes,a3) + lea (editorchoicetxt),a0 + bsr writetexti + moveq.l #1,d0 + bsr getline + bne 87$ + tst.b (readcharstatus,NodeBase) + notz + bra 9$ +87$ move.b (a0),d0 + bsr upchar + cmpi.b #'S',d0 + beq 9$ + cmpi.b #'A',d0 + beq 8$ + cmpi.b #'C',d0 + beq 0$ + cmpi.b #'P',d0 + beq 10$ + cmpi.b #'U',d0 + beq 12$ + cmpi.b #'L',d0 + bne.b 6$ + bsr dubbelnewline + bsr breakoutimage + move.l a3,a0 + move.w (confnr,NodeBase),d0 + suba.l a1,a1 ; ingen netnavn her... + bsr typemsgheader + bsr outimage + move.l a2,a0 + move.l d4,d0 + beq.b 6$ + moveq.l #0,d1 + bsr writetextmemi + beq 99$ + bra 6$ +10$ move.l (MsgTo,a3),d0 + moveq.l #-1,d1 + cmp.l d0,d1 + beq.b 15$ + move.w (confnr,NodeBase),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.w (n_ConfSW,a0,d0.l),d0 + andi.w #CONFSWF_PostBox+CONFSWF_Private,d0 + bne.b 11$ +15$ lea (msgcantprivatxt),a0 + bsr writetexti + bra 6$ +11$ move.b #SECF_SecReceiver,(Security,a3) + lea (msgmadprivattxt),a0 + bsr writetexti + bra 6$ +12$ move.w (confnr,NodeBase),d0 + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF/2,d0 + move.w (n_ConfSW,a0,d0.l),d0 + btst #CONFSWB_PostBox,d0 + beq.b 13$ + lea (msgcantpublicxt),a0 + bsr writetexti + bra 6$ +13$ move.b #SECF_SecNone,(Security,a3) + lea (msgmadpublictxt),a0 + bsr writetexti + bra 6$ +; Mangler edit ! + +8$ lea (shuabortmsgtext),a0 + suba.l a1,a1 + moveq.l #1,d0 ; y er default + bsr getyorn + beq 6$ +99$ moveq.l #0,d4 +9$ bsr outimage + subq.w #1,(NrLines,a3) ; fjerner den siste linja + move.l a2,a0 + move.l d4,d0 + beq.b 19$ + subq.l #1,d0 + move.w d0,(NrBytes,a3) +19$ pop d2/d3/d4/d5/a2/a3 + rts + + +******************************************************************************* +******************************************************************************* +* * * * * * * * * * * * * * Kode for Noden(e) slutt * * * * * * * * * * * * * * +******************************************************************************* +******************************************************************************* + +***************************************************************** +* div smårutiner * +***************************************************************** + +****************************** +;svar:rest = divl a/b +;d0 d1 d0 d0 +;Does a 32 bit div. Perhaps signed. +****************************** +divl tst.l d0 + bpl.b 1$ + neg.l d0 + tst.l d1 + bpl.b 2$ + neg.l d1 + bsr.b 3$ + neg.l d1 + rts +2$ bsr.b 3$ + neg.l d0 + neg.l d1 + rts +1$ tst.l d1 + bpl.b 3$ + neg.l d1 + bsr.b 3$ + neg.l d0 + rts +3$ move.l d2,-(sp) + swap d1 + move.w d1,d2 + bne.b 8$ + swap d0 + swap d1 + swap d2 + move.w d0,d2 + beq.b 9$ + divu.w d1,d2 + move.w d2,d0 +9$ swap d0 + move.w d0,d2 + divu.w d1,d2 + move.w d2,d0 + swap d2 + move.w d2,d1 + move.l (sp)+,d2 + rts +8$ move.l d3,-(sp) + moveq #$10,d3 + cmpi.w #$80,d1 + bcc.b 10$ + rol.l #8,d1 + subq.w #8,d3 +10$ cmpi.w #$800,d1 + bcc.b 4$ + rol.l #4,d1 + subq.w #4,d3 +4$ cmpi.w #$2000,d1 + bcc.b 5$ + rol.l #2,d1 + subq.w #2,d3 +5$ tst.w d1 + bmi.b 6$ + rol.l #1,d1 + subq.w #1,d3 +6$ move.w d0,d2 + lsr.l d3,d0 + swap d2 + clr.w d2 + lsr.l d3,d2 + swap d3 + divu.w d1,d0 + move.w d0,d3 + move.w d2,d0 + move.w d3,d2 + swap d1 + mulu.w d1,d2 + sub.l d2,d0 + bcc.b 7$ + subq.w #1,d3 + add.l d1,d0 +; bcc.b * +7$ moveq #0,d1 + move.w d3,d1 + swap d3 + rol.l d3,d0 + swap d0 + exg d0,d1 + move.l (sp)+,d3 + move.l (sp)+,d2 + rts + + +;a0 devnavn +;a1 portnavn +;d0 = unitnum +;d1 = flagg +;d2 = sizeof iostruct +IOpenDevice + movem.l a0/d0/d1,-(a7) + moveq.l #0,d0 + move.l a1,a0 + bsr CreatePort + beq.b 99$ + move.l d0,a0 + move.l d2,d0 + move.l a0,-(a7) + bsr CreateExtIO + move.l (a7)+,a0 + beq.b 98$ + move.l d0,a1 + movem.l (a7)+,a0/d0/d1 + move.l a1,-(a7) + jsrlib OpenDevice + move.l (a7)+,a0 + tst.l d0 + beq.b 9$ + move.l (MN_REPLYPORT,a0),-(a7) + bsr DeleteExtIO + move.l (a7)+,a0 + jsr DeletePort + bra.b 97$ +98$ jsr DeletePort +99$ lea (12,a7),a7 +97$ clrz +9$ notz + rts + +ICloseDevice + move.l a0,a1 + move.l a1,-(a7) + jsrlib CloseDevice + move.l (a7)+,a0 + move.l (MN_REPLYPORT,a0),-(a7) + bsr DeleteExtIO + move.l (a7)+,a0 + jsr DeletePort + rts + +****************************** +;CreatePort +;inputs : name,priority (a0,d0) (hvis name er null, så blir det en privat port) +;outputs: msgport (d0) +****************************** +CreatePort + push a2/d2 + move.l a0,a2 + move.l d0,d2 + jsrlib CreateMsgPort + tst.l d0 + beq.b 9$ + move.l d0,a1 + move.b d2,(LN_PRI,a1) + move.l a2,(LN_NAME,a1) ; Navn (skal den addes til portlista) ? + beq.b 1$ ; nei + move.l a1,a2 + jsrlib AddPort + move.l a2,a1 +1$ move.l a1,d0 +9$ pop a2/d2 + rts + +****************************** +;DeletePort +;inputs : msgport (a0) +;outputs: none +****************************** +DeletePort + move.l a2,-(a7) + move.l a0,a2 + jsrlib Forbid + move.l (LN_NAME,a2),d0 ; Er den add'a ? + beq.b 1$ ; nei. + move.l a2,a1 + jsrlib RemPort +1$ move.l a2,a0 + jsrlib GetMsg + tst.l d0 + beq.b 2$ + move.l d0,a1 + tst.l (MN_REPLYPORT,a1) ; har vi reply port ? + beq.b 1$ ; nope + jsrlib ReplyMsg + bra.b 1$ ; 3$ +3$ moveq.l #ABBSmsg_SIZE,d0 + jsrlib FreeMem + bra.b 1$ +2$ move.l a2,a0 + jsrlib DeleteMsgPort + jsrlib Permit + move.l (a7)+,a2 + rts + +****************************** +;StdIO = CreateStdIO (msgport) +;a0.l a0.l +;eallocates an standard IO requestor block +****************************** +CreateStdIO + moveq.l #IOSTD_SIZE,d0 + +****************************** +;extIO = createExtIO (msgport,size) +;a0 a0.l d0.l +;allocates an Extenden IO requestor block +****************************** +CreateExtIO +; move.l d0,-(a7) +; move.l a0,-(a7) +; XREF _CreateExtIO +; jsr _CreateExtIO +; addq.l #8,a7 +; tst.l d0 +; rts + + movem.l d2/a2,-(sp) + move.l a0,a2 + move.l d0,d2 + move.l #MEMF_CLEAR!MEMF_PUBLIC,d1 + jsrlib AllocMem + tst.l d0 + beq.b 1$ + move.l d0,a1 +; move.b #NT_MESSAGE,LN_TYPE(a1) + move.b #NT_REPLYMSG,(LN_TYPE,a1) + move.w d2,(MN_LENGTH,a1) + move.l a2,(MN_REPLYPORT,a1) +1$ movem.l (sp)+,d2/a2 + rts + +****************************** +;DeleteStdIO/DeleteExtIO +;inputs : StdIO/ExtIO (a0) +;outputs: none +;deallocates IO requestor block +****************************** + +DeleteStdIO +DeleteExtIO +; move.l a0,-(a7) +; XREF _DeleteExtIO +; jsr _DeleteExtIO +; addq.l #4,a7 +; rts + + move.l a0,a1 + moveq.l #-1,d0 + move.l d0,(IO_UNIT,a1) + move.l d0,(IO_DEVICE,a1) + moveq.l #0,d0 + move.w (MN_LENGTH,a1),d0 + jmplib FreeMem + +*************************************************************************** +*** DATA *** +*************************************************************************** + + section data,data + +consolename dc.b 'console.device',0 +timername dc.b 'timer.device',0 + +tosysopfname dc.b 'ABBS:ToSysop',0 +logfilenameo dc.b 'ABBS:node',0,'logfile',0 +schatfilenameo dc.b 'node',0,'sysopchat',0 +miscdirname dc.b 'ABBS:Misc/',0 +banfilename dc.b 'ABBS:Config/banfile',0 +filebanfilename dc.b 'ABBS:Config/filebanfile',0 + +shellfnameetext dc.b '/shell-output',0 +fifoshellntext dc.b 'FIFO:' +shellsfnametext dc.b 'abbs #',0,'_s',0 +shellmfnametext dc.b 'abbs #',0,'_m',0 +newshelstext dc.b 'NewShell "FIFO:abbs #',0,'/rwkecs" from ',0 +newsheletext dc.b 'ABBS:sys/shell-startup',0 +readptrfname dc.b 'Read pointers',0 + +publicportname dc.b 'ABBS node #',0,' port',0 +nodetaskname dc.b 'ABBS node #',0,' - User: ',0 +rexxportname dc.b 'REXX',0 +paragonportname dc.b 'DoorControl',0,0 +netportname dc.b 'ABBSnet',0,'.port',0 + +bulletinpath dc.b 'bulletins/',0 +filespath dc.b 'F1:',0 +doorspath dc.b 'ABBS:Doors/',0 +conftextpath dc.b 'ABBS:Text/Conf_text/',0 +textpath dc.b 'text/',0 +bulletlisttext dc.b 'bl',0 +repextension dc.b '.REP',0 +msgextension dc.b '.MSG',0 +qwkextension dc.b '.QWK',0 +hippoextension dc.b '.HD',0 +allqwksendfiles dc.b '(#?.dat|BLT-#?)',0 +allhipsendfiles dc.b '(#?.HD)',0 +qwkmsgdatfile dc.b 'messages.dat',0 +qwkbullfilename dc.b 'BLT-',0 + +grabformattexts dc.b 'MBBS',0,0 + dc.b 'QWK',0,0,0 + dc.b 'HIPPO',0 + +longpacknames dc.b 'Text',0,0 + dc.b 'Arc',0,0,0 + dc.b 'Lzh',0,0,0 + dc.b 'Zip',0,0,0 + dc.b 'Lharc',0 + dc.b 'Arj',0,0,0 + dc.b 'Zoo',0,0,0 + dc.b 'Lzx',0,0,0 + +packchars dc.b 'T',0 ; koden forutsetter 2 tegn + dc.b 'A',0 + dc.b 'L',0 + dc.b 'Z',0 + dc.b 'H',0 + dc.b 'J',0 + dc.b 'O',0 + dc.b 'X',0 + dc.b 0,0 + + even +packexctstrings dc.l txtextension + dc.l arcextension + dc.l lzhextension + dc.l zipextension + dc.l lhaextension + dc.l arjextension + dc.l zooextension + dc.l lzxextension + +nilstring dc.b 'NIL:',0 +copystring dc.b 'copy clone ',0 +executestring dc.b 'Execute ',0 +deletestring dc.b 'Delete ',0 +allforcestring dc.b '#? all force',0 +packstring dc.b 'ABBS:sys/pack',0 +extractstring dc.b 'ABBS:sys/extract',0 +viewstring dc.b 'ABBS:sys/View ',0 +checkarcstring dc.b 'ABBS:sys/Check ',0 + +txtextension dc.b '.txt',0 ; t +arcextension dc.b '.arc',0 ; a +lzhextension dc.b '.lzh',0 ; l +zipextension dc.b '.zip',0 ; z +lhaextension dc.b '.lha',0 ; h +arjextension dc.b '.arj',0 ; j +zooextension dc.b '.zoo',0 ; o +lzxextension dc.b '.lzx',0 ; x + +loginscrname dc.b 'ABBS:sys/LoginScript.abbs',0 +logoutscrname dc.b 'ABBS:sys/LogoutScript.abbs',0 +logutscriptname dc.b 'ABBS:sys/logout.script',0 +pagescriptname dc.b 'ABBS:sys/sysoppage.abbs',0 +uloadscriptname dc.b 'ABBS:sys/upload.script',0 +downloadscrname dc.b 'ABBS:sys/Download.abbs',0 +newuserscrname dc.b 'ABBS:sys/Newuser.abbs',0 +ploginscrname dc.b 'ABBS:sys/Login/',0 +helpscriptname dc.b 'ABBS:sys/Help.abbs',0 +miscmenuscrname dc.b 'ABBS:sys/Miscmenu.abbs',0 +namechanscrname dc.b 'ABBS:sys/namechange.script',0 + +questinarefname dc.b 'ABBS:sys/Questionnaire' +dotabbstext dc.b '.abbs',0 +doorconfigfname dc.b 'Doors/Node',0,'Config',0 +doormenufilname dc.b 'Doors/Node',0,'Menu',0 + +loginfilename dc.b 'text/loginfile',0 +failedpwfname dc.b 'text/failedpassword',0 +postloginfname dc.b 'text/postloginfile',0 +uploadfname dc.b 'text/upload',0 +downloadfname dc.b 'text/download',0 + +register1finame dc.b 'text/logintxt1',0 +register2finame dc.b 'text/logintxt2',0 +logoutfilename dc.b 'text/logoutfile',0 + +conmenufile dc.b 'text/nodemenu',0 +boardstatfilena dc.b 'text/Boardstat',0 + +globalmenufile dc.b 'text/globalmenu',0 +mainmenufile dc.b 'text/mainmenu',0 +readmenufile dc.b 'text/readmenu',0 +sysopmenufile dc.b 'text/sysopmenu',0 +utilitymenufile dc.b 'text/utilitymenu',0 +filemenufile dc.b 'text/filemenu',0 +sigopmenufile dc.b 'text/sigopmenu',0 +markmenufile dc.b 'text/markmenu',0 +chatmenufile dc.b 'text/chatmenu',0 +searchmenufile dc.b 'text/searchmenu',0 +maintenmenufile dc.b 'text/maintenance',0 +smaintemenufile dc.b 'text/sigopmaintenance',0 +miscmenufile dc.b 'text/Miscmenu',0 +grabformenufile dc.b 'text/GrabFormat',0 +bulletihelpfile dc.b 'text/BulletinHelp',0 +BrowseMhelpfile dc.b 'text/BrowseModeHelp',0 +sysoponlinetext dc.b 'text/sysoponline',0 +sysopoflinetext dc.b 'text/sysopoffline',0 + +ansiextension dc.b '.ansi',0 +rawextension dc.b '.raw',0 +abbsextension dc.b 'abbs',0 + +conflistfilname dc.b 'text/conferencelist',0 +filelistfilname dc.b 'text/filelist',0 +charsetlfilname dc.b 'text/charsetlist',0 ; bare .raw +scrformlfilname dc.b 'text/scrformatlist',0 +protoclifilname dc.b 'ABBS:text/protocolslist',0 ; grab skifter cd, så vi må ha en full path +experthlfilname dc.b 'text/expertmodehelp',0 +msgfilterhfname dc.b 'text/messagefilterhelp',0 +cookiefilename dc.b 's:cookies',0 + +systemtext1 dc.b 'ABBS ' + version + dc.b ' Node #',0 +systemtext2 dc.b ':8N1',0 +localtext dc.b '(local)',0 + +;serime dc.b 'text/conferencelist',0 + +serialnrtext dc.b 'sn: #',0 + +transnltext dc.b 13,10,0 +newlinetext dc.b 10,10,0 +newlinestext dc.b 10,0 +deltext dc.b 8,32,8 ;,0 +nulltext dc.b 0 +ytext dc.b 'Y',0 +ntext dc.b 'N',0 +itext dc.b 'I',0 +previewtext dc.b '·',0 +minusstext dc.b '-',0 +oktext dc.b 'OK',0,0 + +;node init feilmeldinger +abbserrortext dc.b 'ABBS error message',0 +notmpdirerror dc.b 'Error creating tmp dir',0 +noserparamerror dc.b 'Error setting serial parameters (' +noserparamerro1 dc.b 'xxxxx)',0 +noserdeverror dc.b 'Error opening Serial device',0 +notimerdeverror dc.b 'Error opening Timer.device',0 +nocondeverror dc.b 'Error opening Concole.device',0 +noioreqerror dc.b 'Error creating IO requester',0 +setupmenuerror dc.b 'Error while setting up menu',0 +nomenuerror dc.b 'Error attaching menu',0 +nowindowerror dc.b 'Error opening window',0 +noporterror dc.b 'Error creating port',0 +nosignalerror dc.b 'Error allocating signal bit',0 +sametmpdirerror dc.b 'Mulitple nodes with same tmpdir/hold dir',0 +nodeconfigerror dc.b 'Error reading node config file',0 +noabbsdirerror dc.b 'Error obtaining lock on ABBS:',0 +nomemoryerror dc.b 'Error allocating memory',0 + + +whatisfirstname dc.b 'What is your FIRST name? ',0 +whatislastname dc.b 'What is your LAST name? ',0 +nametolongtext dc.b 10,'Name is too long (max 30 chars total)!',0 +nametolong2text dc.b 10,'Name is too long!',0 +isnotregtext dc.b ' is not registered as a user of this BBS.',0 +typernltext dc.b 'Type R to Register, N to retype your Name, or L to Log off : ',0 +pleaseepasstext dc.b 'Please enter your password (dots will echo): ',0 +wrongtext dc.b 'Wrong!',0 +namebannedtext dc.b 'This name is banned!',0 + +tuserkilledtext dc.b 10,'This user is killed!. Bye!',0 +shukillusertext dc.b 'Sure you want to kill user: ',0 +userkilledtext dc.b 'User killed.',0 +useralreadykill dc.b 'User is already killed!',0 +userukilledtext dc.b 'User unkilled.',0 +killthiusertext dc.b 'Kill this user ',0 +killedtext dc.b ' killed.',0 + +pltellsysoptext dc.b 10,'Please tell sysop.',0 +notransfertext dc.b 'File transfer not allowed on local nodes!',0 +filenotfountext dc.b 'File not found!',0 +filefountext dc.b 'File exists already!',0 +filefounondtext dc.b 'File exists already (on disk)!',0 +startdescwstext dc.b 10,'(Start description with ''/'' if file is for SYSOP only)',0 +pleaseentfdtext dc.b 'Please enter description of file: ',0 +startyourtext dc.b 10,'Start your ',0 +receivetext dc.b ' receive now.',0 +sendtext dc.b ' send now.',0 +trfstatl1text dc.b 'block bytes elapsed expected rate timo errors error msg',10,13,0 +trfstatl2text dc.b '---- ---------- ---------- ---------- ---- ---- ---- ------------------------',10,13,0 +errorstext dc.b 'err',0 + +errorreceivtext dc.b 10,'Error receiving file.',0 +errorsendtext dc.b 10,'Error sending file.',0 +shuabortmsgtext dc.b 10 +abortmsgtext dc.b 'Abort message ',0 +cnftmovemsgtext dc.b 10,'Conference to move message to: ',0 +msgmovedtext dc.b 10,'Msg moved.',0 +msgupdatedtext dc.b 'Msg updated',0 +cmmovtoconftext dc.b 10,'You can''t move a message to that conference!',0 +notallmoveftext dc.b 10,'You are not allowed to move this file.',0 +notallomovetext dc.b 10,'You are not allowed to move this msg.',0 +notallokilltext dc.b 10,'You are not allowed to kill this msg.',0 +notallukilltext dc.b 10,'You are not allowed to unkill this msg.',0 +msgalkilledtext dc.b 10,'Msg already killed.',0 +msgnokilledtext dc.b 10,'Msg not killed.',0 +msgkilledtext dc.b 10,'Msg killed',0 +msgunkilledtext dc.b 10,'Msg unkilled',0 +msgkilledbytext dc.b 'Msg withdrawn by ',0 + +errloadmsghtext dc.b 10,'Error reading msg header',0 +errloadmsgttext dc.b 10,'Error reading msg text',0 +onlydupownmtext dc.b 'You may only DUPlicate your own messages!',0 +changetoadrtext dc.b 'Change TO address (enter=no change): ',0 +changefradrtext dc.b 'Change FROM address (enter=no change): ',0 +allnotallowtext dc.b 'ALL not allowed here',0 + +loginattext dc.b 10,'Login at:',0 +timenowtext dc.b 10,'Time now:',0 +timeallowed dc.b 10,'Time allowed : ',0 +timeremaintext dc.b 10,'Time remaining: ',0 +ftimelefttext dc.b 10,'File time left: ',0 +timeonlinetext dc.b 10,'Time online : ',0 +timeusedsestext dc.b 10,'Time used this session:',0 +deductfchattext dc.b 10,'Deducting for CHAT time :',0 +deductforultext dc.b 10,'Deducting for UPLOAD time:',0 + +timeusedtodtext dc.b 10,'Time used today:',0 +totonlinetitext dc.b 10,'Total online time today : ',0 +timeremaindtext dc.b 10,'Time remaining : ',0 + +nextwarntext1 dc.b 'Next warning when ',0 +nextwarntext2 dc.b ' min remain.',0 +newtimelimtext dc.b 'New time limit (0=no limit): ',0 +newfilelimtext dc.b 'New file limit (0=no limit): ',0 +currtimelimtext dc.b 'Current time limit: ',0 +currfilelimtext dc.b 'Current file limit: ',0 +timexpiredtext dc.b 10,'Your time limit has expired.',0 +ftimexpiredtext dc.b 10,'Your filetime limit has expired.',0 + +alreamembertext dc.b 10,'User is already member of this conference!',0 +sureinviteatext dc.b 10,'Sure you want to invite everybody ',0 +nobulletinstext dc.b 'No bulletins on this board.',0 +entinbullnrtext dc.b 'Enter bulletin nr to replace, or return for new: ',0 +bulletininstext dc.b 10,'Bulletin installed',0 +nobulletstctext dc.b 10,'No bulletins to clear!',0 +errorrenbultext dc.b 'Error renaming bulletins',0 +sureclearbtext dc.b 'Sure you want to clear all bulletins in this conference ? ',0 +bulletscleatext dc.b 10,'Bulletins cleared.',0 +enterffnametext dc.b 'Enter full file name: ',0 +filenotavaltext dc.b 'File not available, please check with sysop.',0 +enterkeywortext dc.b 10,'Enter keyword: ',0 +datetoscanftext dc.b 'Date to scan for YYMMDD (Enter=',0 +sparakolontext dc.b '): ',0 +invaliddatetext dc.b 'Invalid date: try again!',0 +enterdoscomtext dc.b 10,'Enter DOS command: ',0 +errordoscmdtext dc.b 10,'Error while executing dos command.',0 +detailelisttext dc.b 'Detailed list ',0 +browsmpromptext dc.b 'Browse mode status',0 +browsmpromhtext dc.b '',0 + +browseacttext dc.b 'Browse mode active.',0 +browseinacttext dc.b 'Browse mode inactive.',0 +browsenalowtext dc.b 'You need to have Full Screen Editor enabled to use Browse mode.',0 +filetablfultext dc.b 'File table full. List truncated.',0 + +interlogintext dc.b 'Login ',0 +interlogouttext dc.b 'Logout ',0 +fromhashtext dc.b 'From #',0 +youhavemailtext dc.b 'You have mail! (from ',0 +chatreqanswtext dc.b 'Chat request. Answer with chat ',0 + +; Log file tekster. +startupmsgtext dc.b 'Node setup ok.',0 +shutdownsgtext dc.b 'Node shut down.',0 +nocdsignaltext dc.b 'No CD signal after Connect.',0 +faildconnectext dc.b 'Failed connect.',0 +toslowconectext dc.b 'To slow connect.',0 +loglogintext dc.b 'Login:',0 +loglogouttext dc.b 'Logout: ',0 +lostcarriertext dc.b 'Lost carrier: ',0 +logthrownoutext dc.b 'Thrown out: ',0 +logfellasletext dc.b 'Fell asleep: ',0 +failedpaswdtext dc.b 'Failed password: ',0 +newusermsgtext dc.b '- - - - NEWUSER - - - -',0 +pagedsysoptext dc.b 'Paged sysop.',0 +loggrabedtext dc.b 'Grab''ed messages.',0 +logdlmsgtext dc.b 'Downloaded:',0 +logulmsgtext dc.b 'Uploaded file:',0 +logfdlmsgtext dc.b 'Failed downloading file:',0 +logfulmsgtext dc.b 'Failed uploaded file:',0 +logboottext dc.b 'Machine booted.',0 +lognamechantext dc.b 'Changed name to:',0 +logchatedtext dc.b 'Chatted with:',0 +logreadbultext dc.b 'Read bulletin',0 +logdksearchtext dc.b 'Did keyword search on',0 +logscannedftext dc.b 'Scanned for',0 +;logsnodemsgtext dc.b 'Sent node msg to node',0 +logresconftext dc.b 'Resigned from conference',0 +logjoinedctext dc.b 'Joined conference',0 +logregusertext dc.b 'Registered new user: ',0 +lognofiletext dc.b 'File not found: ',0 +logkiledmsgtext dc.b 'Killed msg:',0 +logentermsgtext dc.b 'Wrote msg:',0 +logreplymsgtext dc.b 'Replied msg:',0 +logmsgreadtext dc.b 'messages read.',0 +logmsgdumedtext dc.b 'messages dumped.',0 +logtimeusedtext dc.b 'Time used:',0 +logftimeusedtxt dc.b 'Time in files:',0 +cpstext dc.b 'cps, ',0 +logopendoortext dc.b 'Opened door:',0 +loggotholdtext dc.b 'Downloaded hold.',0 +logfdlholdtext dc.b 'Failed downloading hold.',0 +logaddfiletext dc.b 'Added file: ',0 +logexitodostext dc.b 'Exited to dos.',0 +logdoscmdtext dc.b 'Dos:',0 +logleftcomment dc.b 'Left comment:',0 +logdidmisctext dc.b 'Used Misc command:',0 + +; tosysop tekster +tosysopnewuser dc.b 'NewUser:',0 +toaysopupload dc.b 'Uploaded:',0 + +traprotocoltext dc.b 'Transfer protocol (? for menu): ',0 +unknowtraprtext dc.b 'Unknown transfer protocol!',0 +nobatchtrantext dc.b 'current transfer protocol does not support batch download!',0 +unknowcarsetext dc.b 'Unknown charset!',0 +musthaveisotext dc.b 'You must use ISO (or standard ASCII) at login prompt',0 +charnallowdtext dc.b 'The ''@'' character is not allowed in user names!!',0 +nopathallowtext dc.b 'No path allowed in filename!',0 +only18charatext dc.b 'Only 18 characters allowed in file name!',0 +saveusererrtext dc.b 'Error saving user.',0 +loadusererrtext dc.b 'Error loading user.',0 + +dumpmsgpromtext dc.b 'onf, ll, essage, , =quit: ',0 +scratchpdeltext dc.b 'Scratchpad deleted!',0 +scratchpemptext dc.b 10,'Scratchpad emptied.',0 + +lmsgreadrestext dc.b 'Last message read has been reset in dumped conferences!',0 +usesendtotrtext dc.b 'Use nd to transfer scratchpad to your machine.',0 +msgaddtoscrtext dc.b ' messages added to scratchpad.',0 +cleartext dc.b 'CLEAR',0 +dumpingtext dc.b 'Dumping ',0 +erropenscratext dc.b 'Error opening scratchfile',0 +errwritscratext dc.b 'Error writing to scratchfile',0 +scrstillavatext dc.b '(Scratchpad is still available for SEnd)',0 +nottransscrtext dc.b 'You have not transferred your scratchpad! Want it now ',0 +resetreaptrtext dc.b 'Want to reset last message read to previous state ',0 + +wantqwknbultext dc.b 'Do you want new Bulletins sent in your QWK package ',0 +mbbsnomsguptext dc.b 'MBBS format has no message upload.',0 +qwkcantdumptext dc.b 'QWK can''t handle this dump command',0 +hipcantdumptext dc.b 'Hippo can''t handle this dump command',0 +hippnomsguptext dc.b 'Hippo format has no message upload (yet).',0 +errorpackintext dc.b 'Error packing!',0 +errorextrintext dc.b 'Error extracting!',0 +pleaswaitwptext dc.b 'Please wait while I pack the file',0 +grabgoodfortext dc.b 'GRABbing is good for your health!',0 +cantfinpacktext dc.b 10,'Can''t find the pack progam, using txt instead.',0 +cantfinextrtext dc.b 'Can''t find the extract progam. Cannot unpack.',0 +packformatutext dc.b 10,'Pack format is unavailable.',0 +archiveformtext dc.b 10,'Format choice (? for menu): ',0 +unknowformatext dc.b 10,'Unknown format!',0 +msgfilterletext dc.b 'Message filter level, <0-50> (Enter=no change): ',0 +expertmodeptext dc.b 'Enter mode ',0 +expertmodehtext dc.b '',0 +Novicetext dc.b 'Novice',0 +Juniortext dc.b 'Junior',0 +Experttext dc.b 'Expert',0 +SuperExperttext dc.b 'Super Expert',0 + even +experttexts dc.l Novicetext,Juniortext,Experttext,SuperExperttext + +modeselectetext dc.b 'mode selected.',0 +confstatnshtext dc.b 'Conference status will not be shown at logon.',0 +confstatshotext dc.b 'Conference status will be shown at logon.',0 +noisefiltentext dc.b 'Noise filter enabled.',0 +noisefiltditext dc.b 'Noise filter disabled.',0 +userprofsavtext dc.b 'User profile updated.',0 + +reenewpasstext dc.b 'Reenter your new password (dots will echo): ',0 +enewpasstext dc.b 'Enter your new password (dots will echo): ',0 +eoldpasstext dc.b 'Enter your old password (dots will echo): ',0 +elogonpasstext dc.b 'Enter your login password (dots will echo): ',0 +passwordwtext dc.b 'An error occured. Your password might be wrong. Please tell sysop',0 +moretext dc.b '--more-- (y/n/c):',0 +morenohelptext dc.b '--more--',0 +linesprpagetext dc.b 10,'Lines per page: =no change, <0>=continuous: ',0 +min10linestext dc.b 10,'Minimum 10 lines!',0 +musthavenrtext dc.b 'You must enter a number!',0 +invalidnrtext dc.b 'Invalid nr!',0 +msgunreadtext dc.b ' messages unread',0 +foryoutext dc.b ' for you',0 +updatedbultext dc.b ' (updated bulletins)',0 +showconfopttext dc.b 'nread messages or ll conferences: ',0 +invalidcmdtext dc.b 'Invalid command!',0 + +Membertext dc.b 'Member',0 +READONLYtext dc.b 'READ ONLY',0 +Obligatorytext dc.b 'Obligatory',0 +Nonmembertext dc.b 'Non-member',0 +Privateallotext dc.b 'Private allowed',0 +Networkconftext dc.b 'Network',0 +USERINFOtext dc.b 'USER INFO',0 +FILEINFOtext dc.b 'FILE INFO',0 +Mailtext dc.b 'MAIL',0 +Bulletinstext dc.b ' (Bulletins)',0 +joinnoreadtext dc.b 'Joined, nothing read',0 + +confstatustext dc.b 10,'Conference Status',0 +cconfstatustext dc.b ' conference status:',0 +Lastmsgtext dc.b 10,'Last message : ',0 +Lastmsgyourtext dc.b 10,'Last you read: ',0 +nmesgaavailtext dc.b ' new message',0 +nmesgaavai2text dc.b 's are ',0 +nmesgaavai3text dc.b ' is ',0 +nmesgaavai4text dc.b 'available',0 +smallalltext dc.b 'all',0 +nomoremsgictext dc.b 10,'No more unread. Press for next conference.',0 +checkfmsgictext dc.b 'Checking for messages in conferences you are a member of...',0 +nonewiacmsgtext dc.b 'No unread messages in conferences!',0 +confbullacttext dc.b 10,'Conference bulletins are active.',0 +sigopcomacttext dc.b 10,'Sigop commands are active.',0 +bullhasbupdtext dc.b 'Bulletins have been updated since your last logon.',0 + +mloginstatetext dc.b 'Message pointers reset to login state',0 +allmbresettext dc.b 10,'All marks have been reset',0 +msgmarkedtext dc.b ' Messages marked',0 +cantmarkmsgtext dc.b 10,'You can''t mark this message.',0 +unmarkingtext dc.b 10,'Unmarking :',0 +markingtext dc.b 10,'Marking :',0 +msgsfoundtext dc.b 10,'Messages found :',0 +markmsgfromtext dc.b 10,'Mark messages from date (YYMMDD): ',0 +msgtosetasltext dc.b 'Message to be marked as last read: ',0 + +frommsgtext dc.b 'From message <',0 +tomsgtext dc.b ' To message <',0 +ftmsgconttext dc.b '>, ',0 +tmpsysopacctext dc.b 10,'***** Temporary SYSOP privileges ',0 +giventext dc.b 'granted *****',0 +takenawaytext dc.b 'removed *****',0 + +anerrorocctext dc.b 'An Error has occoured (',0,')',0 +doserrortext dc.b 'Dos Error',0 +diskerrortext dc.b 'Disk Error!',0 +diskfulltext dc.b 'Disk full!',0 + +nalviewupprtext dc.b 'You are not allowed to view files in upload or private fildirs',0 +youarenottext dc.b 10,'You are NOT allowed to do that!',0 +newacctext dc.b 'New access: ',0 +suregivenatext dc.b 10,'Sure you want to give everybody this access ',0 +invalidacctext dc.b 'Invalid access type specified!',0 +accessbitstext dc.b 'RWUDFISZ' +accesstypetext dc.b 'Access type : ',0 +sigopaccesstypetext dc.b 'Access type : ',0 +rtext dc.b 'R',0 +allconferentext dc.b 'All conferences ',0 + +passwdnotchtext dc.b 'Password is NOT changed.',0 +passwdchtext dc.b 10,'Password is changed.',0 +enteruserntext dc.b 'Enter user name: ',0 +usernotfountext dc.b 'Sorry, that name is not registered!',0 +scanuserregtext dc.b 10,'Scanning user register...',0 +sorryusnmoctext dc.b 'Sorry! That user is not a member of this conference!',0 +onlythelasttext dc.b 'NB! Only the last ',0 +msgaautscantext dc.b ' messages are automatically scanned',0 +wantdetlisttext dc.b 'Want detailed list ',0 + +noallyettext dc.b 'Cannot handle ALL yet',0 +sorrynohelptext dc.b 'Sorry, no help available',0 +Notvalidcomtext dc.b 'This is not a valid command! Valid commands are:',0 +userrecupdatext dc.b 'User updated.',0 +usernotupdatext dc.b 'User not updated!',0 +usersupdatetext dc.b '> user',0 +usersupdat2text dc.b ' updated.',0 +userslistedtext dc.b ' user(s) listed.',0 +updatedtext dc.b 'Updated: ',0 + +whoheader dc.b 10,'Node Speed Status Caller',10 + dc.b '---- ----- ------ ------',10,0 +fileiheadertext dc.b 10 +fileihnorettext dc.b ' File name Date Kb Min Dls File description',10 + dc.b ' --------- ---- -- --- --- ----------------',0 +entbulletnrtext dc.b 10,'Bulletin number',0 +entbullhelptext dc.b '',0 +ymchosebulltext dc.b 'You must choose a bulletin by reading it!',0 + +nobullettext dc.b 'There is no bulletin by that number (L for listing.)',0 + +editorchoicetxt dc.b 10,'Save, Continue, Abort, Private, pUblic or List msg (S,C,A,P,U,L) [S] ? ',0 +msgmadpublictxt dc.b 10,'Msg made public.',0 +msgmadprivattxt dc.b 10,'Msg made private.',0 +msgcantprivatxt dc.b 10,'Msg can''t be made private.',0 +msgcantpublicxt dc.b 10,'Msg can''t be made public.',0 +skipnextmsgtext dc.b 'Skipping to next unread message.',10,0 + +newnametext dc.b 'New name: ',0 +noallheretext dc.b 'Sorry, ALL is not allowed here!',0 +nameusedtext dc.b 10,'Sorry, that name has already been used!',0 +oktochangentext dc.b 10,'OK to change name ',0 + +viewsetheadtext dc.b 10,'Current user profile',10 +minustext dc.b '--------------------',0 +viewsetnametext dc.b 10,'Your name:',0 +viewsetadrtext dc.b 10,'Street Address:',0 +viewsetposttext dc.b 10,'Postal Code and Town:',0 +viewsethometext dc.b 10,'Home phone number:',0 +viewsetworktext dc.b 10,'Work phone number:',0 +viewsetplentext dc.b 10,'Page length:',0 +viewsetdefptext dc.b 10,'Default protocol:',0 +viewsettermtext dc.b 10,'Terminal type:',0 +viewsetarcftext dc.b 10,'Archive Format:',0 +viewsetchartext dc.b 10,'Character set:',0 +viewsetautotext dc.b 10,'Auto quote:',0 +viewsetansitext dc.b 10,'ANSI graphic menus:',0 +viewsetg_rttext dc.b 10,'Auto file transfer:',0 +viewsetfsetext dc.b 10,'Screen editor:',0 +viewsetcolmtext dc.b 10,'Colours in messages:',0 +viewsetmlevtext dc.b 10,'Menu level:',0 + +viewsetULtext dc.b 10,'Upload:',0 +viewsetDLtext dc.b 10,'Download:',0 +kbtext dc.b 'Kb',0 +viewsetfrattext dc.b 10,'File ratio:',0 +viewsetbrattext dc.b 10,'Byte ratio:',0 +viewsetgrabtext dc.b 10,'Grab format:',0 + +ansitesttext dc.b 10,'This line should be underlined and in italics on an ANSI terminal',0 +autoquotetxt dc.b 'Do you want to auto quote messages ',0 +doyouhaansitext dc.b 'Do you have an ANSI terminal ',0 +wanansimenutext dc.b 'Do you want menus with ANSI graphics ',0 +wancolormsgtext dc.b 'Do you want colours in messages ',0 +explainfsetext dc.b 'To use the full screen editor to enter messages, you must be using' + dc.b 10,'a terminal or program that supports VT100 or VIP mode!',0 +wantfsetext dc.b 'Do you want to use the screen editor ',0 +wantGandRtext dc.b 'Does your program accept G&R file transfer commands ',0 +clsbforemsgtext dc.b 'Clear screen before every message ',0 +keepownmsgtext dc.b 'Review your own messages ',0 +wantrawfiletext dc.b 'Do you want raw files if they exist ',0 + +yestext dc.b 'Yes',0 +notext dc.b 'No',0 +nonetext dc.b 'None',0 +vansitext dc.b 'ANSI',0 +vtexttext dc.b 'Text',0 + +byslashntext dc.b '(Enter=Y): ',0 ; '(Y/n) ',0 +yslashbntext dc.b '(Enter=N): ',0 ; '(y/N) ',0 +quistspacetext dc.b '? ',0 + +sendmsgtotext dc.b 'Send message to (CR for ALL): ',0 +sendmsgtouatext dc.b 'Send message to: ',0 +entersubjectext dc.b 'Subject of message: ',0 +entlastnametext dc.b 'Please enter both the first AND the last name!',0 +nonetnametext dc.b 'Net names are not allowed here.',0 +includeomsgtext dc.b 'Include original message ',0 +privatemsgetext dc.b 'Private message ',0 +msgtext1 dc.b 'Msg #',0 +noinfoonnettext dc.b 'No information availible on net users',0 + +kkommaspacetext dc.b 'K, ',0 +endparatext dc.b ')',0 +spaceparatext dc.b ' (',0 +mparatext dc.b 'm)',0 +fortext dc.b ' for ',0 +confspacetext dc.b 'conf ',0 +userspacetext dc.b 'user ',0 +fromktext dc.b 'From: ',0 +msgstarttext dc.b '',0 +msgtext dc.b ' message #',0 +fromtext dc.b ' from ',0 +totext dc.b '' +tonoansitext dc.b ' to ',0 +rekolontext dc.b ' re: ',0 +deadtext dc.b ' (R.I.P.)',0 +dottext dc.b '.',0 +starttext dc.b '*',0 +subjecttext dc.b 'Subject: ',0 +privatemsgtext dc.b ' (PRIVATE)',0 +readmsgtext dc.b ' (R)',0 +enteredontext dc.b ' Entered on ',0 +enteredbytext dc.b ' entered by ',0 +nomorereplytext dc.b '(There are no more replies.)',0 +morereplyhbtext dc.b '(More replies have been made.)',0 +replytomsgntext dc.b ' Reply to msg # ',0 ; hack for å ligne mbbs +therearereptext dc.b ' (There are replies to this message.)',0 +sretext dc.b 'RE:',0 +ssubjecttext dc.b 'SUBJECT:',0 +linesdottext dc.b 'lines.',0 + +abortedtext dc.b ' aborted!',0 +savedtext dc.b ' saved.',0 +cnotsavemsgtext dc.b 10,'Couldn''t save msg!',0 +cntsavemsghtext dc.b 10,'Couldn''t save msgheader!',0 +msgnotfoundtext dc.b 'Message not found!',0 +msgnotavailfrep dc.b 'Message is not available for reply.',0 +joinconftext dc.b 10,'Join conference: ',0 +topicsaretext dc.b 10,'Topics are: ',0 +topictext dc.b 10,'Topic? ',0 +checkconfstext dc.b 'Checking conferences...',0 +conferecetext dc.b 'Conference: ',0 +wanttojoinctext dc.b 'Do you want to join this conference ',0 +wanttoskipltext dc.b 'Do you want to skip to the last message in the conference ',0 + +sorrymaxconftxt dc.b 10,'Sorry, this version of ABBS can only handle ',0 +conferencestext dc.b ' conferences.',0 +directorystext dc.b ' directories.',0 + +nodenrtext dc.b 'Node nr: ',0 +texttext dc.b 'Text: ',0 +errnodemsgtext dc.b 'Error sending node msg.',0 +nactiveusertext dc.b 'No active user on that node!',0 +cantsendtoytext dc.b 'You cannot send a message to yourself!',0 +unknownnodetext dc.b 'Unknown node!',0 +grpchatfulltext dc.b 'Sorry, this group chat is full.',0 +thusernomsgtext dc.b 'This user is not accepting messages.',0 + +yaaamotfcontext dc.b 10,'You are automatically a member of the following conferences:',0 +confnametxt dc.b 'Conference name: ',0 +suredelconftext dc.b 'Sure you want to delete this conference ',0 +sureclconftext dc.b 'Sure you want to clean this conference ',0 +confdeletedtext dc.b 'Conference deleted',0 +confcleanedtext dc.b 'Conference cleaned',0 +confrenamedtext dc.b 'Conference renamed',0 +connotfoundtext dc.b 'Invalid conference selection!',0 +nmembofconftext dc.b 'You are not a member of this conference!',0 +confsamenametxt dc.b 'Can''t have two conferences with same name!',0 +dirssamenametxt dc.b 'Can''t have two directories with same name!',0 +ycantresigntext dc.b 'You can''t resign from this conference.',0 +sureywresfctext dc.b 'Sure you want to resign from this conference ',0 +resigningartext dc.b 'Resigning from conference, and returning to ',0 +dirnametext dc.b 'Directory name: ',0 +suredeldirtext dc.b 'Sure you want to delete this directory ',0 +dirdeletedtext dc.b 'Directory deleted',0 +dirrenamedtext dc.b 'Directory renamed',0 +dirnotfoundtext dc.b 'Directory not found!',0 +filealindirtext dc.b 'File already in that directory!',0 +enterdirnametxt dc.b 'Enter directory name, =list, <*>=ALL, =none',0 +filepathnametxt dc.b 'Full directory path (ret = ABBS:files): ',0 +unownstatusbtxt dc.b 10,'Unknown status bit: ',0 +econfstatustext dc.b 10,'R=Read',10,'W=Write',10,'V=VIP',10,'A=Allow private' + dc.b 10,'E=rEsignable',10,'P=Post conference',10,'N=Network' + dc.b 10,10,'Enter conference status bits (R,W,P,V,A,E,N): ',0 +confacsbitstext dc.b 'RWPAVEN',0 + +confinstedtext dc.b 10,'Conference installed.',0 +ninstalconftext dc.b 10,'Couldn''t install conference!',0 +illconfnatext dc.b 'Illegal characters in conference name!',0 +illfdirfnatext dc.b 'Illegal characters in filedir name!',0 +dirinstsledtext dc.b 10,'Directory installed.',0 +filenametext dc.b 'File name: ',0 +newfilenametext dc.b 'New file name: ',0 +movefilnametext dc.b 'File to move: ',0 +retracfnametext dc.b 'File to delete: ',0 +suredelfiletext dc.b 'Sure you want to delete this file ',0 +remfilfdisktext dc.b 'Remove file from disk ',0 +remfilfflistext dc.b 'Remove file from filelist ',0 +modifyfnametext dc.b 'File to modify: ',0 +doloadfnametext dc.b 'File to download: ',0 +fileretracetext dc.b 'File deleted.',0 +filemovedtext dc.b 'File moved.',0 +Fileprivulftext dc.b 'File is private upload for: ',0 +fileprivtcotext dc.b 'Private to conference ',0 +filefreedltext dc.b 'Should this file be a free DL file ',0 +filemodifydtext dc.b 'File modified.',0 +filerenamedtext dc.b 'File renamed.',0 +searchingtext dc.b 'Searching...',0 +enterdeinfotext dc.b 10,'Enter detailed description ',0 +touchfdatetext dc.b 'Touch filedate ',0 +waeditfinfotext dc.b 'Do you want to edit fileinfo ',0 + +texttsearchtext dc.b 'Text to search for: ',0 +searchmsgtext dc.b 'Searching messages ',0 +newmsgfoundtext dc.b ' new messages found and marked for retrieval.',0 +msgstilmarktext dc.b ' messages now still marked.',0 + +nodoronsystext dc.b 'Open door command is not available on this system!',0 +erropendoortext dc.b 'Error while opening door.',0 +nrdoortopentext dc.b 'Number of door to open: ',0 +noquestionatext dc.b 'Sorry, script is not available!',0 + +Insuftimeremtxt dc.b 10,'Insufficient time remaining',0 +wayaatndisptext dc.b 10,'Want your address and telephone number displayed ',0 +userlnoinfotext dc.b 10,'This user has not left any info!',0 + +wantolcomentext dc.b 'Want to leave a comment ',0 +commenttext dc.b 'Comment',0 +sysopnavailtext dc.b 10,'Sorry, Sysop is not available. Use COMment instead.',10,0 +ulcompletedtext dc.b 10,'Upload completed.',0 +dlcompletedtext dc.b 10,'Download completed.',0 +checkratiotext dc.b 'Checking Up/Down ratio...',0 +dlacclosttext dc.b 'Download Access temporarily lost. Upload more files to regain it.',0 +dlaccgainedtext dc.b 'Download Access regained.',0 +noratioforttext dc.b 'You don''t have enough files/bytes left to download this!',0 +freedltext dc.b ' Free DL',0 +uploadfilestext dc.b 'Upload files: ',0 +uploadkbytetext dc.b 'Upload Kbytes: ',0 +downloadfiltext dc.b 'Download files: ',0 +downloadkbytext dc.b 'Download Kbytes: ',0 +fileratiotext dc.b 'File ratio: ',0 +byteratiotext dc.b 'Byte ratio: ',0 +prescriptname dc.b 'Note: Script must reside in ',0 +scriptname dc.b 'Enter scriptname (ret = none): ',0 +scripttext dc.b 'Script: ',0 + +nocurentmsgtext dc.b 'No current message!',0 +lastmsgtext dc.b 'Last message!',0 +firstmsgtext dc.b 'First message!',0 +noreplytext dc.b 'No reply!',0 +nomreplytext dc.b 'No more replies!',0 +msgnotreplytext dc.b 'This message is not a reply!',0 +orgnotavailtext dc.b 'Original not available.',0 +readonlycontext dc.b 'This is a READ ONLY conference.',0 +usejtogetcltext dc.b ' Use J to get a conference list.',0 +logouttext dc.b 10,'Logout',0 +lfellasleeptext dc.b 10,'Looks like you fell asleep. Disconnecting...',0 +throwouttext1 dc.b 10,'Sorry, SYSOP has to log you out of the system.',0 +throwouttext2 dc.b 10,'Please try again later.',0 +killathrowntext dc.b 10,'Sysop is booting you out of the system, please do *not* call back!',0 +toslowtext1 dc.b 10,'This board don''t accept connect speeds below ',0 +toslowtext2 dc.b ' baud. Disconnecting...',0 +toclosetlsetext dc.b 'Too close to previous session. You must wait some more. Disconnecting...',0 + + +userejectedtext dc.b 'User ejected!',0 + +sysopiscomitext dc.b 10,'>>>>>>>>>>> SYSOP is coming online!',0 +sysopisgointext dc.b 10,'>>>>>>>>>>> SYSOP is going offline!',0 +attext dc.b ' at ',0 +kolonspacetext dc.b ': ',0 +toyoutext dc.b 'to you!',0 +kommaspacetext dc.b ', ',0 +clearwindowtext dc.b 12,27,'[1;1H',0 +bordertext dc.b '<---+----1----+----2----+----3----' + dc.b '+----4----+----5----+----6----+----7->--+----8>' +spacetext dc.b ' ' + dc.b ' ' +deletetext dc.b 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 + dc.b 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 + dc.b 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +arrowrtext dc.b '->',0 +plussplussptext dc.b '+++',0 +nyconfgrabtext dc.b '>>>>>',0 +nysubjgrabtext dc.b '*****',0 +dubblecrtext dc.b 13,13,10,0 +allwildcardtext dc.b '#?',0 +freedlcomment dc.b ' *0 0',0 + + cnop 0,4 + +statustext dc.l loggedofftext + dc.l activetext + dc.l chattingtext + dc.l enteringmsgtext + dc.l replyingmsgtext + dc.l uploadmsgtext + dc.l downloadmsgtext + dc.l pagingsysoptext + dc.l grabingtext + dc.l usingdoortext + dc.l exitedtodostext + dc.l chattingwsytext + dc.l enterresumetext + dc.l getingholdtext + dc.l Noavailabletext + dc.l prichattingtext + dc.l regerstratitext + dc.l nulltext ; arexx utbyttbar tekst + dc.l browsingtext + dc.l packingtext + dc.l unpackingtext + dc.l unpackingtext + +loggedofftext dc.b 'Logged off',0 ; 0 +activetext dc.b 'Active',0 ; 4 +chattingtext dc.b 'Chatting',0 ; 8 +enteringmsgtext dc.b 'Entering msg',0 ;12 +replyingmsgtext dc.b 'Replying msg',0 ;16 +uploadmsgtext dc.b 'Uploading file',0 ;20 +downloadmsgtext dc.b 'Downloading file ',0 ;24 +pagingsysoptext dc.b 'Paging sysop',0 ;28 +grabingtext dc.b 'Collecting scratchpad',0 ;32 +usingdoortext dc.b 'Using DOOR ',0 ;36 +exitedtodostext dc.b 'Exited to dos',0 ;40 +chattingwsytext dc.b 'Chatting with Sysop',0 ;44 +enterresumetext dc.b 'Entering Resume',0 ;48 +getingholdtext dc.b 'Downloading Hold ',0 ;52 +Noavailabletext dc.b 'Not available',0 ;56 +prichattingtext dc.b 'Chatting privatly',0 ;60 +regerstratitext dc.b 'Newuser registration',0 ;64 +;arexxchangeabletext ;68 +browsingtext dc.b 'Browsing files',0 ;72 +packingtext dc.b 'Packing file(s)',0 ;76 +unpackingtext dc.b 'Unpacking file(s)',0 ;80 + dc.b 0,0 + +nodeshutdowntxt dc.b 'Node shut down',0 +notavailfchtext dc.b 'Not ' +availforchatext dc.b 'available for chat',0 +nodencafchatext dc.b 'Node not currently available for chat requests!',0 +nodenodebtntext dc.b 'No node by that number!',0 +wafontreplytext dc.b 'Waiting for the other node to reply ',0 +contactestatext dc.b 'Contact established with ',0 +contactest2text dc.b '. Press CTRL+Z to end chat.',0 +joinedchattext dc.b ' joined the chat.',0 +pagngsysop2text dc.b 10,'Paging sysop (CTRL-X TO QUIT PAGER)',0 +nosysopheretext dc.b 'SYSOP may not be used here!',0 + +nodeputsleptext dc.b 10,'Node is put to sleep',0 +nodeawakentext dc.b 10,'Node is awaken again',0 +ureopensertext dc.b 10,'Unable to reopen ser port.',0 +preskreopentext dc.b 10,'Press any key to reopen ser port, or F10 to shutdown',0 +initmodemtext dc.b 13,'Initializing modem',27,'[K',0 +failedtoinitext dc.b 13,'Failed to init modem',27,'[K',10 +waitforcalltext dc.b 13,'Waiting for caller' +cleartoEOLtext dc.b 27,'[K',0 +ringdetecttext dc.b 13,'Ring detected',27,'[K',10,0 +waitconnecttext dc.b 13,'Waiting for connect ',27,'[K',0 +connectdetetext dc.b 13,10,'Connect detected',27,'[K',0 +nocarriertext dc.b 'NO CARRIER',0 +dohanguptext dc.b 'Executing Hangup',0 +nocookietext dc.b 'No cookie today!',0 + +alltext dc.b 'ALL',0 +netusertext dc.b 'Net ',0 +usertext dc.b 'user',0 + +msysoptext dc.b '' +plainsysoptext dc.b 'SYSOP',0 +maintext dc.b 'Main',0 +readtext dc.b 'Read',0 +utilitytext dc.b 'Utility',0 +filetext dc.b 'File',0 +sigoptext dc.b '' +plainsigoptext dc.b 'SIGOP',0 +marktext dc.b 'Mark',0 +readreftext dc.b 'Read Ref',0 +chattext dc.b 'Chat',0 +searchtext dc.b 'Search',0 ; bold, hvit +usermaintantext dc.b 'User Maintenance',0 +misctext dc.b 'Misc',0 +grabforamttext dc.b 'Grab Format',0 + +CursorOffData dc.b $9b,'0 p',0 +CursorOnData dc.b $9b,'1 p',0 + +Plaintext dc.b '',0 +Boldtext dc.b '',0 +Kursivtext dc.b '',0 +Underlinetext dc.b '',0 + +Plaintab dc.b 0 +Boldtab dc.b 0 +Kursivtab dc.b 0 +Underlinetab dc.b 0 + +Quotingmode dc.b 0 + +ansiclearscreen dc.b '',0 + +ansicolors +ansiblacktext dc.b '',0 +ansiredtext dc.b '',0 +ansigreentext dc.b '',0 +ansiyellowtext dc.b '',0 +ansidbluetext dc.b '',0 +ansilillatext dc.b '',0 +ansilbluetext dc.b '',0 +ansiwhitetext dc.b '',0 + +ansiblack = 0*6 +ansired = 1*6 +ansigreen = 2*6 +ansiyellow = 3*6 +ansidblue = 4*6 +ansililla = 5*6 +ansilblue = 6*6 +ansiwhite = 7*6 + + even +groupchatcolors dc.w ansigreen,ansiyellow,ansililla,ansidblue + +;0 - sort +;1 - rød +;2 - grønn +;3 - gul +;4 - mørk blå +;5 - lilla ?? +;6 - lys blå +;7 - hvit + +ansiinschartext dc.b '[@',0 +ansidelchartext dc.b '',0 +ansirighttext dc.b '',0 +ansilefttext dc.b '',0 + + cnop 0,4 + +reltext dc.b 'REL',0 +arqtext dc.b 'ARQ',0 +mnptext dc.b 'MNP',0 +fullv42bistext dc.b 'V' +v42bistext dc.b '42BIS',0 +v42shorttext dc.b 'V42',0 +hsthsttext dc.b '/HST/HST',0 + + cnop 0,4 + + even +menus dc.l mainmenuchtxt + dc.l readmenuchtxt + dc.l sysopmenuchtxt + dc.l utilitymenuchtxt + dc.l filemenuchtxt + dc.l sigopmenuchtxt + dc.l markmenuchtxt + dc.l chatmenuchtxt + dc.l searchmenuchtxt + dc.l usermaintachtxt + dc.l susermaintchtxt + dc.l miscmenuchtxt + dc.l grabfomenuchtxt + +menutexts dc.l maintext + dc.l readtext + dc.l msysoptext + dc.l utilitytext + dc.l filetext + dc.l sigoptext + dc.l marktext + dc.l chattext + dc.l searchtext + dc.l usermaintantext + dc.l usermaintantext + dc.l misctext + dc.l grabforamttext + +menujmps dc.l mainjmptable + dc.l readjmptable + dc.l sysopjmptable + dc.l utilityjmptable + dc.l filejmptable + dc.l sigopjmptable + dc.l markjmptable + dc.l chatjmptable + dc.l searchjmptable + dc.l usermaijmptable + dc.l susermajmptable + dc.l miscjmptable + dc.l grabforjmptable + +menufiles dc.l mainmenufile + dc.l readmenufile + dc.l sysopmenufile + dc.l utilitymenufile + dc.l filemenufile + dc.l sigopmenufile + dc.l markmenufile + dc.l chatmenufile + dc.l searchmenufile + dc.l maintenmenufile + dc.l smaintemenufile + dc.l miscmenufile + dc.l grabformenufile + +nomenuinputch dc.l readmenu + dc.l readmsg + dc.l mainmenu + dc.l readmenu + dc.l readmenu + dc.l mainmenu + dc.l readmenu + dc.l readmenu + dc.l readmenu + dc.l UQuit + dc.l UQuit + dc.l mainmenu + dc.l grabformatquit + +notchoiceschoic dc.l 0 + dc.l readmenunotchoices + dc.l 0 + dc.l 0 + dc.l 0 + dc.l 0 + dc.l markmenunotchoices + dc.l chatmenunotchoices + dc.l 0 + dc.l 0 + dc.l 0 + dc.l miscmenunotchoices + dc.l 0 ; grab format menu + +godbyechtext dc.b 'Yes,No,Again.',0 +notavailable dc.b 'N/A',0 + +globalchtext dc.b '?,Help,Goodbye,Read,!,Util,File,Join,Quit,Who,Enter,' + dc.b 'Bulletin,SHow,COM,GRAB,NOde,TIMe,CHAT,OPEN,MJoin,Xpert,' + dc.b 'NExt,MISC,MUpload,CB,VErsion.',0 + even +globaljmptable dc.l help,dohelp,godbye,readmenu,sysopmenu,utilitymenu + dc.l filemenu,join,mainmenu,Whos_on,entermsg + dc.l bulletins,showconferences,comment,grab,nodemessage + dc.l time,chatmenu,opendoor,multijoin,expertmode,Next + dc.l miscmenu,ungrab,_Conference_browser,_ABBS_version + +mainmenuchtxt dc.b 'Show,EDIT,INFO,Answer,',0 + even +mainjmptable dc.l _ShowUsers_c,edit,info,answerquestionare + +chatmenuchtxt dc.b 'Avail,Notavail,Sysop,GRoup,',0 + even +chatjmptable dc.l SetchatAvail,SetchatNAvail,Chatsysop,Groupchat + +searchmenuchtxt dc.b 'Group,Headers,Marked,',0 + even +searchjmptable dc.l searchgroup,searchheaders,searchmarked + +readsecretchtxt dc.b 'Z,USER.',0 + even +readsecrettable dc.l changesendrec,getuserinfofrommsg + +readmenuchtxt dc.b 'REply,Orig,.,-,+,>,<,Kill,RECov,MODE,Mark,RESign,' + dc.b '=,MOVE,INFO,View,DUP,Search,Dump,SEnd,',0 ;Prev,',0 + even +readjmptable dc.l replymsg,originalmsg,readcurrentmsg + dc.l previusmsg,nextmsg,readreply,readbackinthread,killmsg + dc.l unkillmsg,readmode,markmenu,resignconference,readotherreply + dc.l movemsg,readmenyinfo,view,duplicatemessage,searchmenu + dc.l dump,sendscratch,recentlyread + +utilitymenuchtxt + dc.b 'Pass,Addr,View,Select,Lines,Tran,Mode,Name,AForm,MFilt,' + dc.b 'Conf,SPecial,FILT,GFormat,',0 + even +utilityjmptable dc.l passwdchange,adresschange,viewsettings,charsetchange + dc.l linesprpage,changeprotocol,modechange,namechange + dc.l scratchpadformat,messagefilter,confshow,modespecial,filter,grabformatmenu + +grabfomenuchtxt dc.b '?,Mbbs,Qwk,Hippo,Bulletins.',0 + EVEN +grabforjmptable + dc.l help,grabformatmbbs,grabformatqwk,grabformathippo + dc.l dosendbulletins + +sysopmenuchtxt dc.b 'Ac,CI,S,T,BI,BC,IF,FI,MOVE,DOS,KILL,UNKILL,MEM,DELCONF,' + dc.b 'RENCONF,BOOT,D,L,M,DELDIR,RENDIR,ZAP,FT,INV,RESCONF,' + dc.b 'RENFILE,EJect,EXit,PUS,CLean,CZap,',0 +; dc.b 'PF,PC, + even +sysopjmptable dc.l acceschange,conferenceinstall,showuser,changetimelimit + dc.l bulletinstall,clearbulletins,installfiledir,fileinstall + dc.l movefile,doscmd,killuser,recoveruser,mem + dc.l conferencedelete,conferencerename,boot,deletelogfile + dc.l listcallerslog,modifyfile,deletedir,renamedir,zapfile + dc.l changefiletimelimit,invite,cleanconference,renamefile + dc.l ejectnode,exittodos,packuserfile,cleanuserfile,czapfile +; dc.l packfiledirs,packconference + +filemenuchtxt dc.b 'UPload,Down,LPr,Newf,Key,List,Scan,RET,PUpl,Info,View,' + dc.b 'ADD,ARC,DEL,DIR,EXT,GET,REN,SHOw,TYPe,LPConf,Browse,' + dc.b 'BUpload,BROwse,',0 + even +filejmptable dc.l uploadfile,downloadfile,listprivate,newfiles,keywordsearch + dc.l listfiles,scanfiles,retractfile,privateupload,infofiles + dc.l viewarchive,addfile,archivehold,deleteholdfile + dc.l holddirectory,extract,gethold,renameholdfile,showhold + dc.l typeholdfile,listprivatetoconf,togglebrowesemode + dc.l batchupload,brosemodeonoff + +sigopmenuchtxt dc.b 'Show,BInst,Access,INVite,Modfile,MOVEfile,',0 + even +sigopjmptable dc.l showuser,bulletinstall,acceschange,invite,modifyfile + dc.l movefile + +markmenuchtxt dc.b 'Reset,.,Number,Undo,Thread,First,Zap,Onlymine,Author,' + dc.b 'Personal,Group,Date,Set,USubject,LOGIN,',0 + even +markjmptable dc.l markreset,markcurrmsg,markednow,unmarkthread + dc.l markthread,minefirst,unmarkauthor,unmarkallbutmine + dc.l markfromperson,markmsgstome,markgroup,markmsgafterdate + dc.l markset,unmarksubject,marklogin + +usermaintachtxt dc.b '?,Access,Conf,Find,FTime,Kill,Next,Previous,Quit,SCript,' + dc.b 'Time,Bytes,Ratio,.,PAssword.',0 + even +usermaijmptable dc.l help,Uaccess,Uconf,UFind,UFTime,UKill,UNext,UPrevious + dc.l UQuit,USCript,UTime,UBytes,URatio,Udot,UPasswd + +susermaintchtxt dc.b '?,Access,Conf,Find,Next,Previous,Quit.',0 + even +susermajmptable dc.l help,Uaccess,Uconf,UFind2,UNext,UPrevious,UQuit + +miscmenuchtxt dc.b ',',0 + even +miscjmptable dc.l mainmenu ; as safety + +; locale variables: +localefullname dc.b 'Fullname',0 +localenodenr dc.b 'Nodenr',0 +localetimeleft dc.b 'Timeleft',0 + even + +; JEO stuff + + +; different taglists + +shouserwindowtags + dc.l WA_Left,0 + dc.l WA_Top,60 + dc.l WA_Width,630 + dc.l WA_Height,82 + dc.l WA_IDCMP,IDCMP_CLOSEWINDOW + dc.l WA_Flags,WFLG_DRAGBAR!WFLG_DEPTHGADGET!WFLG_CLOSEGADGET!WFLG_SMART_REFRESH!WFLG_GIMMEZEROZERO +; dc.l WA_Title,showusertitle + dc.l TAG_DONE,0 + +ibnnortext dc.b 145,155,134,146,157,143 +isonortext dc.b 'æ','ø','å','Æ','Ø','Å' + + END ; That's all Folks !!! diff --git a/NodeSupport.asm b/NodeSupport.asm new file mode 100644 index 0000000..081674f --- /dev/null +++ b/NodeSupport.asm @@ -0,0 +1,436 @@ + ***************************************************************** + * + * NAME + * NodeSupport.asm + * + * DESCRIPTION + * Misc support routines + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: NodeSupport.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: NodeSupport.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + include 'first.i' + + include 'exec/types.i' + + include 'asm.i' + include 'bbs.i' + include 'NodeSupportdefs.i' + include 'fse.i' + include 'node.i' + + XREF nodehook + +;d0 - confnr (* 1) +;a0 - new name +; må returnerer en ok kode +renameconfbulletins + push d2/a2/d3/d4/d5/d6 + move.l a0,a2 + move.l d0,d4 + + lea (n_FirstConference+CStr,MainBase),a0 + mulu #ConferenceRecord_SIZEOF,d0 + moveq.l #0,d3 + move.w (n_ConfBullets,a0,d0.l),d3 ; har denne konfen bulletiner ? + beq 9$ ; nei, alt ok + lea (maintmptext,NodeBase),a0 ; fyller i navnet til bl filen + move.l d4,d0 + jsr (getkonfbulletlist) + bsr 10$ + lea (bulletlisttext),a0 + jsr (strcopy) + move.l (dosbase),a6 + + lea (maintmptext,NodeBase),a1 + lea (tmptext,NodeBase),a0 + move.l a0,d1 + move.l a1,d2 + jsrlib Rename + tst.l d0 + beq.b 4$ + +1$ move.l d3,d0 + move.l d4,d1 + lea (maintmptext,NodeBase),a0 + jsr (getkonfbulletname) + bsr 10$ + move.l d3,d0 + move.l a1,a0 + andi.l #$ffff,d0 + jsr (konverter) + + lea (maintmptext,NodeBase),a1 ; new name + lea (tmptext,NodeBase),a0 ; old name + move.l a0,d1 + move.l a1,d2 + jsrlib Rename + tst.l d0 + beq.b 4$ + + +; rename .ansi og .raw filer også... + + subq.l #1,d3 + bne.b 1$ + bra.b 8$ +4$ move.l (exebase),a6 + lea (errorrenbultext),a0 + jsr (writeerroro) + setz + bra.b 99$ +8$ move.l (exebase),a6 +9$ clrz +99$ pop d2/a2/d3/d4/d5/d6 + rts + +10$ lea (tmptext,NodeBase),a1 + lea (bulletinpath),a0 + jsr (strcopy) + subq.l #1,a1 + move.l a2,a0 +11$ move.b (a0)+,d0 ; bytter ut '/' tegn med space + beq.b 19$ + move.b d0,(a1)+ + cmpi.b #'/',d0 + bne.b 11$ + move.b #' ',(-1,a1) + bra.b 11$ +19$ rts + +; a0 - source +; a1 - dest +makehardlink + push a6/d2/d3 + move.l (dosbase),a6 + move.l a1,d3 + move.l a0,d1 + moveq.l #ACCESS_READ,d2 + jsrlib Lock + move.l d0,d2 + beq.b 9$ ; error.. Ut. + move.l d3,d1 + moveq.l #0,d3 ; Hard links.. + jsrlib MakeLink + move.l d0,d3 ; husker status + move.l d2,d1 + jsrlib UnLock ; frigir lock'en igjen + move.l d3,d0 +9$ pop a6/d2/d3 + rts + +checkforduplicatetmpdirs + clrz + rts +; suba.l a1,a1 +; jsrlib FindTask +; jsrlib Forbid +; move.l d0,d1 ; vår task +; move.l nodelist+LH_HEAD,d0 +;1$ move.l d0,a0 +; move.l (LN_SUCC,a0),d0 +; beq.b 2$ ; siste. +; cmp.l (NodeTask,a0),d1 ; er det vår ? +; beq.b 1$ ; ja, skipp'er +; +; +; bne.b 1$ ; nei, sommer! :-) +; +; +;2$ move.l a0,a4 ; husker nodenoden vår +; suba.l a1,a1 +; jsrlib FindTask +; move.l d0,(NodeTask,a4) ; lagrer vår adresse her. +; jsrlib Permit ; nå kan andre noder starte +; +; +; rts + +;Sjekk navnene før prompt, og tell gyldige navn etterpå... +;Bare 1 navn, velg det automatiskt. +;Ingen navn, bare type fila +;ingen fil, som før +;2 eller flere navn: "Comment to who: " og hotkey på navnene +; - Navn er av typen: +; !GGeir Inge +; ^Id +; ^Hot Key +; ^Fullt navn. + +GetCommentUserNr + push d2-d6/a2/a3 + link.w a3,#-80 + move.l a3,d6 + move.l (SYSOPUsernr+CStr,MainBase),d5 ; default retur verdi + lea commentfilename,a0 + move.l sp,a1 + jsr getbestfilenamebuffer + bne.b 1$ + lea commentfilename,a0 +1$ move.l (dosbase),a6 + move.l a0,d1 + move.l #MODE_OLDFILE,d2 + jsrlib Open + move.l d0,d4 + beq 9$ ; ingen fil, superuser + move.l (tmpmsgmem,NodeBase),a2 + move.l d4,d1 + move.l a2,d2 + move.l (msgmemsize,NodeBase),d3 + jsrlib Read + moveq.l #-1,d1 + cmp.l d0,d1 + beq 8$ ; File error + tst.l d0 + beq 8$ ; EOF, tom + move.l d0,d3 + move.b #0,(a2,d3.l) ; terminerer + move.l d4,d1 ; lukker + jsrlib Close + move.l (exebase),a6 + move.l a2,a3 +2$ move.b (a2)+,d0 + cmp.b #'!',d0 + bne.b 3$ + move.b (a2)+,d0 + bsr upchar + move.b d0,(a3) + move.l sp,a1 ; kopierer navnet over i stack + moveq.l #Sizeof_NameT,d1 +4$ subq.l #1,d1 ; sjekker for overflow + bcs.b 5$ + move.b (a2)+,d0 + move.b d0,(a1)+ + beq.b 6$ + cmp.b #10,d0 + bne.b 4$ + move.b #0,(-1,a1) +6$ subq.l #1,d1 ; sjekker for overflow + bcs.b 5$ + move.b #0,(a1)+ + bra.b 6$ +5$ move.l sp,a0 + jsr (getusernumber) + bne.b 7$ ; error + move.l d0,(2,a3) ; lagrer usernr'et + lea (6,a3),a3 +7$ move.b #0,(a3) ; Terminerer/sletter tegnet. + bra.b 2$ + +3$ lea (-1,a2),a2 + move.l a2,a0 + bsr strlen + beq.b 10$ + move.l a2,a0 + moveq.l #0,d1 + jsr (writetextmemi) +10$ move.l (tmpmsgmem,NodeBase),a2 + move.b (a2),d0 ; har vi noen ? + beq.b 9$ ; nope. ferdig + move.l (2,a2),d5 ; bare en, bruker han i såfall + move.b (6,a2),d0 ; mere enn 1 ? + beq.b 9$ ; nope. ferdig + jsr (startsleepdetect) +11$ bsr readchar + beq 12$ ; error + cmpi.b #24,d0 ; CTRL-X ?? + beq.b 12$ ; Ja, ut + bmi.b 11$ ; Dropper spesial tegn. + bsr upchar + lea (-6,a2),a0 +14$ lea (6,a0),a0 + move.b (a0),d1 + beq.b 11$ ; fant ikke. Les neste tegn + cmp.b d0,d1 + bne.b 14$ + move.l (2,a0),d5 ; til bruker + bra.b 9$ + +12$ move.l #-1,d5 + clr.b (dosleepdetect,NodeBase) + bra.b 9$ +8$ move.l d4,d1 + jsrlib Close +9$ move.l (exebase),a6 + move.l d5,d0 + move.l d6,a3 + unlk a3 + pop d2-d6/a2/a3 + rts + +;a0 = message header +;ret = Z if net message +isnetmessage + bsr.b doisnetmessage + bne.b 9$ + lea (dontsupnettext),a0 + bsr writeerroro + setz +9$ rts + +;a0 = message header +;ret = Z if net message +doisnetmessage + move.w (NrLines,a0),d0 + bpl.b 1$ + setz + bra.b 9$ +1$ clrz +9$ rts + +updatewindowtitle + push a2/a6 + move.l (nodenoden,NodeBase),a1 + lea (Nodeuser,a1),a0 + move.b (a0),d0 + bne.b 2$ + lea (nonetext),a0 +2$ move.l (windowtitleptr,NodeBase),a1 + jsr (strcopy) + btst #DoDivB_Sleep,(DoDiv,NodeBase) ; har vi sleep + beq.b 1$ + lea (sleeptext),a0 + subq.l #1,a1 + jsr (strcopy) + +1$ move.l (intbase),a6 + move.l (windowadr,NodeBase),d0 + beq.b 9$ ; no window + move.l d0,a0 + lea (Nodetaskname,NodeBase),a1 + moveq.l #-1,d0 + move.l d0,a2 + jsrlib SetWindowTitles +9$ pop a2/a6 + rts + +;a0 = string +skiptonewline +1$ move.b (a0)+,d0 + beq.b 2$ ; oops. + cmp.b #10,d0 + bne.b 1$ + bra.b 9$ +2$ lea (-1,a0),a0 ; returnerer nullen +9$ rts + +; a0 = subject (NULL for subject i msgheader) +; a1 = meldingen +; d0 = subject length +; d1 = max length of buffer +; ret: a0 = ny meldings start +packnetmessage + push a2/a3/d2/d3/d4/d5/d6 + move.l a1,a2 ; husker melding start + move.l a1,d6 ; lagrer som default retur verdi også + move.l a0,a3 ; husker subject + move.l d1,d5 ; husker max lengde + moveq.l #0,d3 ; lengde vi har + move.l d0,d2 ; husker subject length +; move.l d2,d2 ; lengde vi trenger + beq.b 10$ ; lengde 0, medfører ingen header++ + addq.l #2,d2 ; og øker for header+terminering +10$ moveq.l #0,d4 ; vi har ingen extdata + + move.l a1,a0 ; meldingen + move.b (a0),d1 + cmp.b #Net_FromCode,d1 ; from navn ? + bne.b 2$ ; nei, sjekker videre +1$ move.b (a0)+,d1 + addq.l #1,d3 ; øker bytes vi har + cmp.b #10,d1 ; newline ? + bne.b 1$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +2$ cmp.b #Net_ToCode,d1 ; to navn ? + bne.b 4$ ; nei, sjekker videre +3$ move.b (a0)+,d1 + addq.l #1,d3 ; øker bytes vi har + cmp.b #10,d1 ; newline ? + bne.b 3$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +4$ cmp.b #Net_SubjCode,d1 ; Subject ? + bne.b 6$ ; nei, sjekker videre +5$ move.b (a0)+,d1 + addq.l #1,d3 ; øker bytes vi har + cmp.b #10,d1 ; newline ? + bne.b 5$ ; nei, looper videre + move.b (a0),d1 ; henter ny start + +6$ cmp.b #Net_ExtDCode,d1 ; Ext data ? + bne.b 17$ ; nei, ut + move.l a0,d4 ; husker vi har extdata +7$ move.b (a0)+,d1 + addq.l #1,d3 ; øker bytes vi har + addq.l #1,d2 ; øker bytes vi trenger + cmp.b #$ff,d1 ; $ff ? + bne.b 7$ ; nei, looper videre +; d3 og d2 er nå riktige +17$ cmp.l d3,d2 ; har,trenger + bhi.b 8$ ; vi har for lite + move.l a2,a1 + move.l a0,a2 ; selve meldings starten +14$ move.l a3,d0 ; har vi subject ? + beq.b 11$ ; nope + move.b #Net_SubjCode,(a1)+ + move.l a3,a0 + bsr strcopy + move.b #10,(-1,a1) +11$ tst.l d4 ; har vi extdata ? + beq.b 12$ ; nope + move.l d4,a0 ; kopierer ext data +13$ move.b (a0)+,d0 + move.b d0,(a1)+ + cmp.b #$ff,d0 + bne.b 13$ +12$ move.l a2,d0 + beq.b 9$ ; har tatt meldingen, ferdig + move.l a2,a0 ; selve meldingen + move.l a1,d6 ; husker meldings start i d6 + bsr strcopy + bra.b 9$ ; ferdig + +8$ sub.l d3,d2 ; d2 er nå antall bytes vi trenger + move.l a0,d6 ; husker meldings start i d6 + bsr strlen + move.l d0,d1 + add.l d2,d1 ; bytes ny melding vil ta + cmp.l d5,d1 ; max,trenger + bls.b 15$ ; vi har nok + sub.l d2,d0 ; minker lengden... + bcc.b 15$ ; safety + moveq.l #0,d0 +15$ move.l d6,a0 + addq.l #1,d0 ; øker med 1 pga. -(a0) saken + add.l d0,a0 ; source + move.l a0,a1 + add.l d2,a1 ; destination +16$ move.b -(a0),-(a1) ; flytter + subq.l #1,d0 + bcc.b 16$ + move.l a2,a1 + suba.l a2,a2 ; sier vi har tatt meldingen + bra.b 14$ +9$ move.l d6,a0 + pop a2/a3/d2/d3/d4/d5/d6 + rts + + section nodesupdata,data + +dontsupnettext dc.b 'This command doesn''t support net messages yet.',0 +sleeptext dc.b ' (Sleep)',0 +commentfilename dc.b 'abbs:text/Comment',0 +commentowhotext dc.b 'Comment to who: ',0 + + END ; That's all Folks !!! diff --git a/PIP.info b/PIP.info new file mode 100644 index 0000000000000000000000000000000000000000..8681aacd54667d598507731195051e8155fd3bbb GIT binary patch literal 835 zcmZ{hze@sP7{{OM&J!Wj97;n(>6SJJhiXY^$SaT{+I4AikP4T;d!?4pL2qhoXmrT` z;HDz_2O1?s8XXIS>-lk_L%pcq_x-$Ip3{$`IA}m?57wao8(@MCTG(h;!bazVZwU$cKy#|$iUkaXF+i>kHyjk5J z%Pk_0eG1>d6W+uo@{;eaao-string, and will not allow the file to +;exceed doormsg->data lines in length. + +9$ pop d2-d5 + clrz + rts + +paragon_13 ; return user status + move.w (p_Data,a2),d0 + beq.b 7$ + subq.w #1,d0 + beq 10$ ; User access level + moveq.l #0,d1 + subq.w #1,d0 + beq.s 8$ ; User Xpertaccess mode + subq.w #1,d0 + beq.s 8$ ; User Net credits + move.w (TimesOn+CU,NodeBase),d1 + subq.w #1,d0 + beq.s 8$ ; Nummers of calls + subq.w #1,d0 + beq.s 8$ ; Calls to system + subq.w #1,d0 + beq.s 2$ ; Graphic mode + subq.w #1,d0 + beq.s 1$ ; Time remaining + moveq.l #80,d1 + subq.w #1,d0 + beq.s 8$ ; Screen collums + move.w (PageLength+CU,NodeBase),d1 + subq.w #1,d0 + beq.s 8$ ; Screen rows + subq.w #1,d0 + beq.s 3$ ; Baud rate + move.w #210,d1 + subq.w #1,d0 + beq.s 8$ ; Paragon Version nr + subq.w #1,d0 + bne.s 7$ ; ukjennt sub + bra.b 4$ ; users online + +8$ move.w d1,(p_Data,a2) + bra.b 9$ +7$ bsr cmdnotsupported +9$ clrz + rts + +1$ move.w #$7fff,d1 + move.w (TimeLimit+CU,NodeBase),d0 + beq.b 8$ + jsr (updatetime) + move.w (TimeLimit+CU,NodeBase),d1 + sub.w (TimeUsed+CU,NodeBase),d1 + bcc.b 8$ + moveq.l #0,d1 + bra.b 8$ + +2$ moveq.l #0,d1 ; graphic mode + move.w (Userbits+CU,NodeBase),d0 + and.w #USERF_RAW+USERF_ANSIMenus,d0 + beq.b 8$ + moveq.l #1,d1 + bra.b 8$ + +3$ movea.l (nodenoden,NodeBase),a0 + move.l (Nodespeed,a0),d1 + divu #300,d1 + bra.b 8$ + +4$ moveq.l #0,d1 ; antall users online + move.l nodelist+LH_HEAD,a0 ; Henter pointer til foerste node +6$ move.w (Nodenr,a0),d0 + beq.b 5$ ; Hopper over noder som er nede + moveq #NDSF_Stealth,d0 + and.b (Nodedivstatus,a0),d0 ; er det stealth login ? + bne.b 5$ ; Jepp, teller ikke denne + move.w (Nodestatus,a0),d0 + beq.s 5$ ; ikke på + addq.l #1,d1 +5$ move.l (LN_SUCC,a0),a0 ; Henter ptr til nestenode + move.l (LN_SUCC,a0),d0 + bne.b 6$ ; flere noder. Same prosedure as last year + bra.b 8$ + +10$ jsr (justchecksysopaccess) + beq.b 11$ + moveq.l #100,d1 ; sysop'er har level 100 + bra 8$ +11$ moveq.l #0,d1 ; alle andre har 0 + + +paragon_14 ; return user status + move.w (p_Data,a2),d0 + beq.b 7$ + lea (Name+CU,NodeBase),a0 + cmpi.w #1,d0 ; user name + beq.b 8$ + cmpi.w #2,d0 ; passwd + beq.b 7$ ; ulovelig + lea (Address+CU,NodeBase),a0 + cmpi.w #3,d0 ; Adress + beq.b 8$ + lea (CityState+CU,NodeBase),a0 + cmpi.w #6,d0 ; City/state + bls.b 8$ + lea (doorspath),a0 + cmpi.w #7,d0 ; Doors path + beq.b 8$ + lea (abbsrootname),a1 + cmpi.w #8,d0 ; ABBS path + beq.b 8$ + cmpi.b #9,d0 ; date + + cmpi.b #10,d0 ; time + bne.s 7$ ; ukjennt + lea (tmpdatestamp,NodeBase),a0 + move.l a0,d1 + movea.l (dosbase),a6 + jsrlib DateStamp + movea.l (exebase),a6 + lea (tmpdatestamp,NodeBase),a0 + lea (tmptext,NodeBase),a1 + jsr (gettimestr) + lea (tmptext,NodeBase),a0 + +8$ lea (p_string,a2),a1 + moveq.l #78,d0 + jsr (strcopymaxlen) + bra.b 9$ +7$ bsr cmdnotsupported +9$ clrz + rts + +paragon_15 ; set user access level + clrz + rts + +paragon_16 ; set user status + move.w (p_Data,a2),d0 + beq.b 7$ + subq.w #1,d0 ; user name + beq.b 9$ ; nop + subq.w #1,d0 ; passwd + beq.b 7$ + lea (Address+CU,NodeBase),a1 + move.w #Sizeof_NameT,d1 + subq.w #1,d0 ; Adress + beq.b 8$ + lea (CityState+CU,NodeBase),a1 + subq.w #3,d0 ; City/state + bcs.b 8$ + beq.b 8$ + + subq.w #4,d0 ; Doors path++ + bcs.b 9$ ; nop + bra.b 7$ ; ukjennt + +8$ lea (p_string,a2),a0 + move.w d1,d0 + push a0/d0 + jsr (strcopymaxlen) + pop a0/d0 + jsr (saveuserarea) + bra.b 9$ +7$ bsr cmdnotsupported +9$ clrz + rts + +paragon_17 ; return random number + moveq.l #0,d0 + move.w (p_Data,a2),d0 + move.l d0,-(sp) + XREF _RangeRand + jsr (_RangeRand) + addq.l #4,sp + move.w d0,(p_Data,a2) + clrz + rts + +paragon_18 ; reset loss of carrier state + move.b #OK,(readcharstatus,NodeBase) + clrz + rts + +paragon_19 ; show graphics textfile + link.w a3,#-80 + lea (p_string,a2),a0 + lea sp,a1 + jsr (strcopy) + lea sp,a1 + move.w (Userbits+CU,NodeBase),d1 + btst #USERB_ANSIMenus,d1 ; ANSI ? + beq.b 1$ ; nope + + lea (gr1text),a0 + jsr (strcat) + lea sp,a0 + jsr (findfile) + bne.b 2$ + lea (p_string,a2),a0 + lea sp,a1 + jsr (strcopy) + lea sp,a1 + bra.b 1$ + +2$ moveq.l #0,d0 ; både con og ser + lea sp,a0 + jsr (typefileansi) + bra.b 9$ + +1$ lea (txttext),a0 + jsr (strcat) + lea sp,a0 + jsr (findfile) + bne.b 3$ + lea (p_string,a2),a0 + lea sp,a1 + jsr (strcopy) +3$ moveq.l #0,d0 ; både con og ser + lea sp,a0 + jsr (typefile) + +9$ unlk a3 + clrz + rts + +paragon_20 ; end door session + setz + rts + +paragon_21 ; update user's timelimit + move.w (TimeLimit+CU,NodeBase),d0 ; Har vi limit ? + beq.b 9$ ; nei, gir f.. + add.w (p_Data,a2),d0 + beq.s 2$ + bpl.b 1$ +2$ moveq.l #1,d0 +1$ move.w d0,(TimeLimit+CU,NodeBase) +9$ clrz + rts + +paragon_22 ; get pointer to config (FY FY FY) + bsr cmdnotsupported + clrz + rts + +paragon_23 ; ???? Hva skal denne gjøre ? + +paragon_24 ; disse er udokkumentere +paragon_27 +paragon_28 +paragon_29 + bsr cmdnotsupported + clrz + rts + +paragon_26 ; sender node melding + push a3 + move.l (Tmpusermem,NodeBase),a3 + moveq.l #79,d0 + lea (p_string,a2),a0 + lea (i_msg,a3),a1 + jsr (memcopylen) + move.b #0,(a1) ; paranoia + move.b #2,(i_type,a3) ; node melding + move.w (NodeNumber,NodeBase),(i_franode,a2) + moveq.l #0,d0 + move.w (p_Data,a2),d0 ; sender meldingen + movea.l a3,a0 + move.b #0,(i_pri,a0) + jsr (sendintermsg) + pop a3 + clrz + rts + +paragon_30 ; Sjekk etter input + move.w (p_Data,a2),d0 + move.w #0,(p_Data,a2) ; ikke noe klart + cmp.b #1,d0 ; console ? + bne.b 1$ + move.l (creadreq,NodeBase),d0 + beq.b 9$ ; ikke noe tegn + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + beq.b 9$ ; Nei. ikke noe tegn her. +8$ move.w #-1,(p_Data,a2) ; det er et tegn klart + bra.b 9$ + +1$ cmp.b #2,d0 ; serial ? + bne.b 9$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 9$ ; nei + movea.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + bne.b 8$ ; Ja, vi har et tegn + ENDC +9$ clrz + rts + +paragon_31 + move.w (p_Data,a2),d0 + move.w #0,(p_Data,a2) ; ikke noe klart + cmp.b #1,d0 ; console ? + bne.b 1$ + + move.l (pastetext,NodeBase),d1 ; sjekker om det ligger tegn og venter + bne.b 3$ ; det gjorde det. + move.l (creadreq,NodeBase),d0 + beq.b 9$ ; ikke mulig å sjekke == ikke noe tegn + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + beq.b 9$ ; Nei. ikke noe tegn her. +3$ jsr (doconsole) + bne.b 8$ +2$ jsr (readchar) + beq.b 8$ + bmi.b 2$ + bra.b 8$ + + +1$ cmp.b #2,d0 ; serial ? + bne.b 9$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 9$ ; nei + movea.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 9$ ; Ikke noe tegn + + jsr (doserial) + beq.s 2$ ; ikke noe +; bne.b 8$ + ELSE + bra.b 9$ + ENDC +8$ move.w d0,(p_Data,a2) ; det er et tegn klart +9$ clrz + rts + +paragon_32 ; oppdater carrier status + clrz + rts + +paragon_33 + push d2 + moveq.l #0,d0 + move.w (p_Data,a2),d0 ; henter timeout + beq.b 9$ ; det er ingen + + movea.l (timer1req,NodeBase),a1 + move.l d0,(TV_SECS+IOTV_TIME,a1) + moveq.l #0,d0 + move.l d0,(TV_MICRO+IOTV_TIME,a1) + move.w #TR_ADDREQUEST,(IO_COMMAND,a1) + jsrlib SendIO ; Starter timeout'en. + + move.l (timer1sigbit,NodeBase),d0 + or.l (sersigbit,NodeBase),d0 + or.l (consigbit,NodeBase),d0 + jsrlib Wait ; venter på første signalet + move.l d0,d2 ; lagrer det vi fikk + and.l (timer1sigbit,NodeBase),d0 ; var det timeout ? + bne.b 3$ ; jepp. + movea.l (timer1req,NodeBase),a1 ; abort'er timeren. + jsrlib AbortIO +3$ movea.l (timer1req,NodeBase),a1 + jsrlib WaitIO + move.l (timer1sigbit,NodeBase),d0 + not.l d0 + and.l d0,d2 ; sletter timerbitet ifra det vi fikk + beq.s 9$ ; ikke noe igjen + move.l d2,d0 ; setter de igjen, siden vi ikke + move.l d2,d1 ; behandler dem nå + jsrlib SetSignal +9$ pop d2 + clrz + rts + +cmdnotsupported + moveq.l #0,d0 + move.w (p_Command,a2),d0 ; Henter ut kommando nummeret + jsr (skrivnr) + lea (notsuptext),a0 + jsr (writetexto) + lea pltellsysoptext,a0 + jsr (writetexto) + moveq.l #0,d0 + move.w d0,(p_Data,a2) + move.b d0,(p_string,a2) + move.l d0,(p_config,a2) + move.l d0,(p_msg,a2) + moveq.l #5,d0 ; venter 5 sek + jmp (waitsecs) + rts + + section paragondata,data + +paragon_cmds + dc.l paragon_1,paragon_2,paragon_3,paragon_4,paragon_5,paragon_6 + dc.l paragon_7,paragon_8,paragon_9,paragon_10,paragon_11,paragon_12 + dc.l paragon_13,paragon_14,paragon_15,paragon_16,paragon_17,paragon_18 + dc.l paragon_19,paragon_20,paragon_21,paragon_22,paragon_23,paragon_24 + dc.l paragon_25,paragon_26,paragon_27,paragon_28,paragon_29,paragon_30 + dc.l paragon_31,paragon_32,paragon_33 + +doparagondoortags + dc.l SYS_Input,0 + dc.l SYS_Output,0 + dc.l SYS_Asynch,1,TAG_DONE,0 +doparagondoortagsend + +niltext dc.b 'NIL:',0 +notsuptext dc.b ' : Command not supported. This door can''t be used with abbs',0 +txttext dc.b '.TXT',0 +gr1text dc.b '.GR1',0 + + END diff --git a/QWK.c b/QWK.c new file mode 100644 index 0000000..50cd915 --- /dev/null +++ b/QWK.c @@ -0,0 +1,1649 @@ + /**************************************************************** + * + * NAME + * QWK.c + * + * DESCRIPTION + * QWK routines for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: QWK.c 1.1 1995/06/24 10:34:52 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: QWK.c $ + * Revision 1.1 1995/06/24 10:34:52 geirhos + * Initial revision + * + * + ****************************************************************/ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#define a4a5 register __a4 struct ramblocks *nodebase,register __a5 struct Mainmemory *mainmeory +#define usea4a5 nodebase,mainmeory + +__asm int packmessages(a4a5); +__asm int unpackmessages (a4a5); +__asm int dograbmsg (register __d0 int nr, register __d1 int conf,register __d2 BPTR msgfil,a4a5, + register __d3 int *msgnr,register __d4 int *touser,register __d5 int *numgrabbed); + +__asm int unpackmsg (register __d0 BPTR msgfil,a4a5); +__asm int doctrldatfile(register __d0 int msgnr,a4a5); +__asm ULONG mygetusernumber (register __a2 char *name,a4a5); + +__asm int initdatafile (register __d0 BPTR msgfil,a4a5); +__asm void getbiggestdisksub (register __a0 char *name,register __d0 ULONG num); +__asm void getbiggestdisk (void); +int mystricmp (char *ptr, char *ptr2); +int strincmp (char *ptr, char *ptr2,int len); +char *removespace(char *string,int maxlength); +__asm void convertstringfromiso (register __a0 unsigned char *string,a4a5); +__asm unsigned char convertcharfromiso (register __d0 unsigned char c,a4a5); +__asm unsigned char convertchartoiso (register __d0 unsigned char c,a4a5); +__asm void convertstringtoiso (register __a0 unsigned char *string,a4a5); +int readblocks (struct IOStdReq *SCSIIO,int num,ULONG length,void *buffer); +__asm ULONG copybulletin (register __a0 char *fromname, + register __a1 char *toname,a4a5); + +extern far int msprintf(char *, const char *, ...); +extern __asm far writecontext (register __a0 char *text,a4a5); +extern __asm far writetexto (register __a0 char *text,a4a5); +extern __asm far writetexti (register __a0 char *text,a4a5); +extern __asm far writeerroro (register __a0 char *text,a4a5); +__asm far VOID ANSIwriteerroro (register __a0 char *text,a4a5); +extern __asm far UWORD loadmsg (register __a0 char *msgtext, + register __a1 struct MessageRecord *msgheader, + register __d0 ULONG msgnr, register __d1 UWORD confnr,a4a5); +extern __asm far UWORD savemsg (register __a0 char *msgtext, + register __a1 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); + +extern __asm far UWORD loadmsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 ULONG msgnr, register __d1 UWORD confnr,a4a5); +extern __asm far UWORD loadmsgtext (register __a0 UBYTE *msgbyf, + register __a1 struct MessageRecord *msgheader,register __d0 UWORD confnr,a4a5); +extern __asm far UWORD savemsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm far UWORD savemsgheader (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); +extern __asm far strcopylen (register __a0 char *from,register __a1 char *to, + register __d0 UWORD length,a4a5); +extern __asm far char *getusername (register __d0 ULONG usernr,a4a5); +extern __asm far void removefromqueue (register __d0 ULONG msgnr,a4a5); +extern __asm far ULONG getusernumber (register __a0 char *name,a4a5); +extern __asm far ULONG atoi (register __a0 char *text); +extern __asm far int checkmemberofconf (register __d0 ULONG usernr,register __d1 ULONG confnr,a4a5); +extern far int checkformsgerror (void); +extern far void clearmsgerror (void); +extern __asm far void unjoin (a4a5); +extern __asm far ULONG gettopqueue (a4a5); +extern __asm void stopreviewmessages (register __d0 ULONG msgnr,a4a5); +extern __asm void sendintermsgmsg (register __a0 struct MessageRecord *msgheader, + register __a1 char *text,register __d0 UWORD confnr,a4a5); +extern __asm void killrepwritelog (register __a0 char *logtext,register __d0 UWORD confnr, + register __d1 ULONG msgnr,a4a5); +extern __asm void killrepwritelog (register __a0 char *logtext,register __d0 UWORD confnr, + register __d1 ULONG msgnr,a4a5); +extern __asm int kanskrive (register __a0 struct MessageRecord *msgheader, + register __d0 UWORD confnr,a4a5); + +extern __asm int getfromname (register __a0 struct MessageRecord *msgheader, + register __a1 UBYTE *msgtext,a4a5); +extern __asm int gettoname (register __a0 struct MessageRecord *msgheader, + register __a1 UBYTE *msgtext,a4a5); +extern __asm int skipnetnames (register __a0 UBYTE *msgtext,register __d0 int msgsize,a4a5); +extern __asm int checkupdatedbulletins (register __d0 UWORD confnr,register __d1 int mode,a4a5); +extern __asm short getnextconfnr (register __d0 short conf,a4a5); +extern __asm int getnetsubject (register __a0 char *msgtext); + +extern far ULONG exebase; +extern far struct DosLibrary *DOSBase; +extern far struct Library *UtilityBase; +extern far UBYTE fraISOtilIBN[128]; +extern far UBYTE fraIBNtilISO[128]; +extern far char logentermsgtext[]; +extern far char logreplymsgtext[]; +extern far char CursorOffData[]; +extern far char CursorOnData[]; + +__asm int unpackmessages (a4a5) +{ + BPTR msgfil = 0; + char tmpstring[80]; + int ret = 1,tmp,nottotalok = 0; + char buffer[128+2]; + struct ConfigRecord *configdata = &mainmeory->config; + int tmplines; + +// Wait 3 seconds for slow Ncomm response + Delay (3*TICKS_PER_SECOND); + + + tmplines = nodebase->linesleft; + nodebase->linesleft = 65535; // Vi vil ikke ha noen more her.. + + while (1) + { + msprintf (tmpstring, "%ls/%ls.MSG", nodebase->Nodemem.TmpPath, configdata->BaseName); + if (!(msgfil = Open(tmpstring,MODE_OLDFILE))) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error opening msg file!",usea4a5); + break; + } + + if (128 != Read (msgfil,buffer,128)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File error!",usea4a5); + break; + } + + if (strlen (configdata->BaseName) > 8) + { + if (strincmp (configdata->BaseName,buffer,8)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Wrong BBSid!",usea4a5); + break; + } + } + else + { + if (mystricmp (configdata->BaseName,buffer)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Wrong BBSid!",usea4a5); + break; + } + } + + putreg (REG_A6,exebase); + writetexto ("\n******************************** Reading REP ********************************\n",usea4a5); + putreg (REG_A6,exebase); + writetexto ("Number Ref # Conference To Subject",usea4a5); + putreg (REG_A6,exebase); + writetexto ("------ ------ ------------------ ------------------------- ------------------",usea4a5); + + while (1) + { + putreg (REG_A6,exebase); + tmp = unpackmsg(msgfil,usea4a5); + if (!tmp) + continue; + + if (tmp == 2) + { + nottotalok = 1; + continue; + } + break; + } + + if (tmp == 1) + { + ret = 0; + putreg (REG_A6,exebase); + writetexto ("------ ------ ------------------ ------------------------- ------------------",usea4a5); + if (nottotalok) + { + putreg (REG_A6,exebase); + writetexto ("\nREPly file parsed with some errors!\n",usea4a5); + } + else + { + putreg (REG_A6,exebase); + writetexto ("\n32mREPly file parsed successfully.\n",usea4a5); + } + } + + break; + } + + if (msgfil) + Close (msgfil); + + DeleteFile (tmpstring); + + nodebase->linesleft = tmplines; + + putreg (REG_A6,exebase); + return (ret ? -1L : 0); +} + +/* returns -1 for fatal errors, 1 for endoffile, 2 for non-fatal error (msg skipped) + and 0 for all ok (1 message parsed) +*/ +__asm int unpackmsg (register __d0 BPTR msgfil,a4a5) +{ + int ret = -1; + int confnr,tmp,numblocks,replyto,msgnr; + int dobreak = 0,havreadmsg = 0,netmsg = 0; + UBYTE *ptr,*msgstart; + struct ClockData dt; + struct DateStamp ds; + struct MessageRecord *msgheader; + char buffer[128+2],tmpbuf[30],string[100],tmpbuf2[20],tmpbuf3[9]; + struct ConfigRecord *configdata = &mainmeory->config; + + msgheader = &nodebase->tmpmsgheader; + + while (1) + { + tmp = Read (msgfil,buffer,128); /* Read first block in message */ + if (!tmp) + { /* if eof, return 1 */ + ret = 1; + break; + } + + if (128 != tmp) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error reading first block a message!",usea4a5); + break; + } + confnr = (buffer[124] * 256) + buffer[123]; + if ((confnr >= configdata->Maxconferences) || + !(*(configdata->firstconference[confnr].n_ConfName))) + { + buffer[71+25-1] = '\0'; + msprintf (string,"Unknown conference for message \"%ls\"!",removespace(&buffer[71],25)); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + + if (!(nodebase->CU.firstuserconf[confnr].uc_Access & ACCF_Write) || + !(nodebase->CU.firstuserconf[confnr].uc_Access & ACCF_Read)) { + msprintf (string,"You are not allowed to write to conference %ls!", + configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + + msgstart = nodebase->tmpmsgmem; + +/* Reference to... */ + putreg (REG_A6,exebase); + strcopylen (&buffer[108],tmpbuf,6,usea4a5); + tmpbuf[6] = '\0'; + ptr = &tmpbuf[0]; + while (*ptr == ' ') + ptr += 1; + + replyto = atoi (ptr); + if (replyto) + { + putreg (REG_A6,exebase); + if (loadmsgheader (msgheader,replyto,confnr*2,usea4a5)) + { + msprintf (string,"Message refered to (%ld) not found. Removing reply number...",replyto); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); +// ret = 2; // non fatal error + replyto = FALSE; + goto safe; +// break; + } + + putreg (REG_A6,exebase); + if (kanskrive (msgheader,confnr*2,usea4a5)) + { + msprintf (string,"Message refered to (%ld) not available for reply!",replyto); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + +/* Sjekker om det er svar til en net bruker +*/ + if (msgheader->NrLines < 0) + { + putreg (REG_A6,exebase); + if (loadmsgtext (nodebase->tmpmsgmem,msgheader,confnr*2,usea4a5)) + { + msprintf (string,"Message refered to (%ld) not found!",replyto); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + + ptr = nodebase->tmpmsgmem; + if (*ptr == '\x1e') { + *ptr = '\x1f'; + while (*(ptr++) != '\n') ; + msgstart = ptr; + netmsg = 1; + } + } +// Can't check if netusers are member of conference + if (!netmsg) + { + putreg (REG_A6,exebase); + tmp = checkmemberofconf (msgheader->MsgFrom,confnr*2,usea4a5); + if (!tmp) + { + if (tmp > 0) + { + msprintf (string,"Author of message %ld is not a member of conference %ls!", + replyto,configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + } + else + { + msprintf (string,"Error checking author of message %ld in conference %ls!", + replyto,configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + } + ret = 2; /* non fatal error */ + break; + } + } + msgheader->RefTo = msgheader->Number; + msgheader->MsgTo = msgheader->MsgFrom; + msgheader->MsgFrom = nodebase->CU.Usernr; + + if (!(msgheader->Security & SECF_SecReceiver)) + { + if (buffer[0] == '*' || buffer[0] == '+') + msgheader->Security = SECF_SecReceiver; + else + msgheader->Security = SECF_SecNone; + } + } + else +safe: + { + msgheader->RefTo = 0; + msgheader->Security = SECF_SecNone; + } + + msgheader->MsgStatus = MSTATF_NormalMsg; + msgheader->RefBy = 0; + msgheader->RefNxt = 0; + msgheader->MsgBits = '\0'; + + dt.mday = (buffer[11]-'0') * 10 + (buffer[12]-'0'); + dt.month = (buffer[8]-'0') * 10 + (buffer[9]-'0'); + dt.year = (buffer[14]-'0') * 10 + (buffer[15]-'0'); + dt.year += (dt.year >= 78 ? 1900 : 2000); + if (buffer[16] == ' ') + dt.hour = (buffer[17]-'0'); + else + dt.hour = (buffer[16]-'0') * 10 + (buffer[17]-'0'); + + if (buffer[19] == ' ') + dt.min = (buffer[20]-'0'); + else + dt.min = (buffer[19]-'0') * 10 + (buffer[20]-'0'); + + dt.sec = 0; + + tmp = CheckDate (&dt); + if (!tmp) { + putreg (REG_A6,exebase); + buffer[71+25-1] = '\0'; + msprintf (string,"Illegal date for message \"%ls\"!",removespace(&buffer[71],25)); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error (?)*/ + break; + } + msgheader->MsgTimeStamp.ds_Days = tmp / (24*60*60); + tmp -= msgheader->MsgTimeStamp.ds_Days * (24*60*60); + msgheader->MsgTimeStamp.ds_Minute = tmp / 60; + msgheader->MsgTimeStamp.ds_Tick = 0; + + DateStamp (&ds); + putreg (REG_A6,exebase); + if (msgheader->MsgTimeStamp.ds_Days != ds.ds_Days) { + msgheader->MsgTimeStamp.ds_Days = ds.ds_Days; + msgheader->MsgTimeStamp.ds_Minute = ds.ds_Minute; + msgheader->MsgTimeStamp.ds_Tick = ds.ds_Tick; + } + + strncpy (msgheader->Subject,removespace(&buffer[71],25),25); + for (tmp = 25; tmp < Sizeof_NameT; tmp++) + msgheader->Subject[tmp] = '\0'; + + putreg (REG_A6,exebase); + convertstringtoiso (msgheader->Subject,usea4a5); + + if (!(msgheader->RefTo)) { + msgheader->MsgFrom = nodebase->CU.Usernr; + +/* +Tillater ikke folk å jukse med avsender.. + memset (tmpbuf,'\0',31); + strncpy (tmpbuf,removespace(&buffer[46],25),25); + putreg (REG_A6,exebase); + convertstringtoiso (tmpbuf,usea4a5); + putreg (REG_A6,exebase); + msgheader->MsgFrom = mygetusernumber (tmpbuf,usea4a5); + if (checkformsgerror ()) + { + putreg (REG_A6,exebase); + msprintf (string,"Unknown author for message \"%ls\"!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + break; + } +*/ + memset (tmpbuf,'\0',31); + strncpy (tmpbuf,removespace(&buffer[21],25),25); + putreg (REG_A6,exebase); + convertstringtoiso (tmpbuf,usea4a5); + + if (strchr (tmpbuf,'@')) + { + if (!(configdata->firstconference[confnr].n_ConfSW & CONFSWF_Network)) + { + msprintf (string,"No net addresses allowed in conference %ls!", + configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + netmsg = 1; + msprintf (msgstart,"\x1f%ls\n\0",tmpbuf); + msgstart += strlen (msgstart); + msgheader->MsgTo = configdata->SYSOPUsernr; + } + else + { + putreg (REG_A6,exebase); + msgheader->MsgTo = mygetusernumber (tmpbuf,usea4a5); + if (checkformsgerror ()) + { + msprintf (string,"Unknown recipiant for message \"%ls\"!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + putreg (REG_A6,exebase); + tmp = checkmemberofconf (msgheader->MsgTo,confnr*2,usea4a5); + if (!tmp) + { + if (tmp > 0) + { + msprintf (string,"Receiver of message %ls is not a member of conference %ls!", + msgheader->Subject,configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + } + else + { + msprintf (string,"Error checking receiver of message %ls in conference %ls!", + msgheader->Subject,configdata->firstconference[confnr].n_ConfName); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + } + + ret = 2; /* non fatal error */ + break; + } + } + } + + if (configdata->firstconference[confnr].n_ConfSW & CONFSWF_PostBox) + { + if (msgheader->MsgTo == -1) // ALL + { + msprintf (string,"No public messages in Post conference %ls (%ls)!", + configdata->firstconference[confnr].n_ConfName, + msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; /* non fatal error */ + break; + } + else + msgheader->Security = SECF_SecReceiver; /* Tvinger privat melding i post'er */ + } + + putreg (REG_A6,exebase); + strcopylen (&buffer[116],tmpbuf,6,usea4a5); + tmpbuf[6] = '\0'; + ptr = &tmpbuf[0]; + while (*ptr == ' ') + ptr += 1; + + numblocks = atoi (ptr)-1; + if (numblocks < 1) + { + msprintf (string,"To few msg text blocks for message %ls!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + break; /* Fatale error */ + } + + ptr = msgstart; + for (tmp = 0 ; numblocks; numblocks--) + { + if (nodebase->msgmemsize < ((tmp+1) * 128)) + { + Seek (msgfil,128,OFFSET_CURRENT); + if (IoErr()) + { + putreg (REG_A6,exebase); + msprintf (string,"File error in message %ls!", msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + dobreak = 1; + break; + } + } + else if (128 != Read (msgfil,ptr + (tmp*128),128)) + { + putreg (REG_A6,exebase); + msprintf (string,"File error in message %ls!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + dobreak = 1; + break; + } + tmp += 1; + } + putreg (REG_A6,exebase); + havreadmsg = 1; + + if (dobreak) + break; + + *(ptr + (tmp*128)) = 0; + removespace(ptr + ((tmp-1)*128),128); + + msgheader->NrLines = 1; + tmp = 0; + for (ptr = msgstart; *ptr; ptr++) + { + if (*ptr == 227) + { + if (*(ptr+1)) + { + *ptr = '\n'; + tmp = 0; + msgheader->NrLines += 1; + } + else + { + *ptr = 0; + break; + } + } + else + { + tmp += 1; + if (tmp > 79) + { + *ptr = '\n'; + tmp = 0; + msgheader->NrLines += 1; + } + else if (*ptr > 127) + { + putreg (REG_A6,exebase); + *ptr = convertchartoiso (*ptr,usea4a5); + } + else if (*ptr < 32) + *ptr = ' '; + } + } + while (*(ptr-1) == '\n') + { + ptr -= 1; + *ptr = 0; + msgheader->NrLines -= 1; + } + msgheader->NrBytes = (ULONG) ((ULONG) ptr - (ULONG) nodebase->tmpmsgmem); + + if (!msgheader->NrBytes) + { + msprintf (string,"Empty message : %ls!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = 2; + break; /* Non Fatale error */ + } + + if (netmsg) + msgheader->NrLines = -msgheader->NrLines; + + putreg (REG_A6,exebase); + if (savemsg (nodebase->tmpmsgmem,msgheader,confnr*2,usea4a5)) + { + msprintf (string,"Error saving message %ls!",msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + break; /* Fatale */ + } + + tmp = msgheader->MsgTo; /* Husker hvem den var til */ + msgnr = msgheader->Number; + putreg (REG_A6,exebase); + stopreviewmessages (msgnr,usea4a5); + nodebase->CU.MsgsLeft += 1; + putreg (REG_A6,exebase); + sendintermsgmsg (msgheader,nodebase->tmpmsgmem,confnr*2,usea4a5); + putreg (REG_A6,exebase); + killrepwritelog ((replyto ? logreplymsgtext : logentermsgtext),confnr*2,msgnr,usea4a5); + + while (replyto) + { + putreg (REG_A6,exebase); + if (!(loadmsgheader (msgheader,replyto,confnr*2,usea4a5))) + { + if (!(msgheader->RefBy)) + { + msgheader->RefBy = msgnr; + putreg (REG_A6,exebase); + if (savemsgheader (msgheader,confnr*2,usea4a5)) + { + msprintf (string,"Error updating reply message (%sd:%ld)!", replyto,msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + } + break; + } + msgheader->RefNxt = msgheader->RefBy; + + while (msgheader->RefNxt) + { + putreg (REG_A6,exebase); + if (loadmsgheader (msgheader,msgheader->RefNxt,confnr*2,usea4a5)) + { + msprintf (string,"Error scanning reply message chain (from %sd:%ld)!",msgheader->RefNxt,msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + dobreak = 1; + break; + } + } + if (dobreak) + break; + + msgheader->RefNxt = msgnr; + putreg (REG_A6,exebase); + if (savemsgheader (msgheader,confnr*2,usea4a5)) + { + msprintf (string,"Error updating last reply message (%sd:%ld)!",msgheader->Number,msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + dobreak = 1; + break; + } + } + else + { + msprintf (string,"Error reading reply message (%sd:%ld)!",replyto,msgheader->Subject); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + dobreak = 1; + ret = 2; /* non fatal error */ + } + + break; + } + if (dobreak) + break; + + if (netmsg) + { + ptr = nodebase->tmpmsgmem; ptr += 1; + while (*(ptr++) != '\n') ; + *(--ptr) = '\0'; + ptr = nodebase->tmpmsgmem; ptr += 1; + } + else + { + putreg (REG_A6,exebase); + getusername (tmp,usea4a5); + ptr = (UBYTE *) getreg (REG_A0); + } + strncpy (tmpbuf,removespace(&buffer[71],19),19); + tmpbuf[19] = '\0'; + strncpy (tmpbuf2,configdata->firstconference[confnr].n_ConfName,18); + tmpbuf2[18] = '\0'; + if (replyto) + msprintf (tmpbuf3,"%ld",replyto); + else + strcpy (tmpbuf3,"None "); + + msprintf (string,"%6ld %6ls %-18s %-25ls %ls",msgnr,tmpbuf3,tmpbuf2,ptr,tmpbuf); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + ret = 0; + break; + } + + if (ret == 2 && !havreadmsg) + { + while (1) + { + putreg (REG_A6,exebase); + strcopylen (&buffer[116],tmpbuf,6,usea4a5); + tmpbuf[6] = '\0'; + ptr = &tmpbuf[0]; + while (*ptr == ' ') + ptr += 1; + + numblocks = atoi (ptr)-1; + if (numblocks < 1) + { + buffer[71+25-1] = '\0'; + msprintf (string,"To few msg text blocks in \"%ls\"!",removespace(&buffer[71],25)); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = -1; /* Fatale error */ + break; + } + + ptr = nodebase->tmpmsgmem; + for ( ; numblocks; numblocks--) + { + if (128 != Read (msgfil,ptr,128)) + { +// putreg (REG_A6,exebase); + buffer[71+25-1] = '\0'; + msprintf (string,"File Error while reading message \"%ls\"!",removespace(&buffer[71],25)); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + ret = -1; /* Fatale error */ + break; + } + } + break; + } + } + putreg (REG_A6,exebase); + return (ret); +} + +char *removespace(char *string,int maxlength) +{ + char *ptr; + + ptr = string + maxlength-2; + if (*ptr != ' ') + return (string); + + while (*(ptr--) == ' ') + ; + + *(ptr+2) = 0; + return (string); +} + +__asm int packmessages (a4a5) +{ + BPTR msgfil; + char tmpstring[40]; + int conf; + int message,msgpacked,touser,tousertot,totbul = 0; + int dobreak,highmsg; + int ret = 1; + int msgnr = 1,tmp; + int startconf; + char string[80]; + struct ConfigRecord *configdata = &mainmeory->config; + char Scan_text[4][2] = { "|", "/", "-", "\\" }; + UBYTE scan_count, next_count; + BOOL first_scan; + int tmplines; + + putreg (REG_A6,exebase); + writecontext (CursorOffData,usea4a5); + + if (nodebase->CU.ScratchFormat == 0) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("QWK cannot be used with Archiveformat TEXT!",usea4a5); + return (-1); + } + + tmplines = nodebase->linesleft; + nodebase->linesleft = 65535; + + putreg (REG_A6,exebase); + writetexto ("\n***************************** Making QWK Packet *****************************\n",usea4a5); + putreg (REG_A6,exebase); + writetexto ("Conference High # Total For You", usea4a5); + putreg (REG_A6,exebase); + writetexto ("------------------------------ ------- ------- -------", usea4a5); + + while (1) + { + msprintf (tmpstring,"%ls/messages.dat",nodebase->Nodemem.TmpPath); + if (!(msgfil = Open(tmpstring,MODE_NEWFILE))) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error opening msg file!",usea4a5); + break; + } + putreg (REG_A6,exebase); + if (initdatafile (msgfil,usea4a5)) + break; + + startconf = nodebase->confnr/2; + dobreak = 0; + msgpacked = 0; + touser = 0; + + scan_count = 0; + next_count = 1; + first_scan = FALSE; + putreg (REG_A6,exebase); + writetexti ("", usea4a5); + putreg (REG_A6,exebase); + while ((message = gettopqueue(usea4a5)) && !dobreak) + { + if (nodebase->CU.Userbits & USERF_ANSIMenus) + { + if (next_count == 1) + { + next_count = 1; + if (first_scan) // Har vi printet ut noe? + { + putreg (REG_A6,exebase); + writetexti ("",usea4a5); // JA ... til venstre + } + else + first_scan = TRUE; + putreg (REG_A6,exebase); + writetexti (Scan_text[scan_count],usea4a5); + if (scan_count == 3) + scan_count = 0; + else + scan_count++; + } + else + next_count++; + } + + putreg (REG_A6,exebase); + if (dograbmsg (message,startconf,msgfil,usea4a5,&msgnr,&touser,&msgpacked)) + { + dobreak = 1; + break; + } + putreg (REG_A6,exebase); + removefromqueue (message,usea4a5); + } + if (dobreak) + break; + putreg (REG_A6,exebase); + unjoin(usea4a5); + + if (first_scan) // Har vi printet ut noe? + { + putreg (REG_A6,exebase); + writetexti ("",usea4a5); // JA ... til venstre + } + + if (msgpacked) + { + msprintf (string,"%-30ls %7ld %7ld %7ld", + configdata->firstconference[startconf].n_ConfName, + configdata->firstconference[startconf].n_ConfDefaultMsg, + msgpacked,touser); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + } + tousertot = touser; + + if (nodebase->CU.Userbits & USERF_SendBulletins) + { + putreg (REG_A6,exebase); + totbul = checkupdatedbulletins (startconf,-1L,usea4a5); + } + + conf = startconf; + do + { + putreg (REG_A6,exebase); + conf = getnextconfnr (conf*2, usea4a5) / 2; + if (conf >= configdata->Maxconferences) + conf = 0; + tmp = 0; + + if (!*(configdata->firstconference[conf].n_ConfName)) + continue; + + if (!(nodebase->CU.firstuserconf[conf].uc_Access & ACCF_Read)) + continue; + + if ((nodebase->CU.Userbits & USERF_SendBulletins) && (startconf != conf)) + { + putreg (REG_A6,exebase); + totbul += checkupdatedbulletins (conf,-1L,usea4a5); + } + + msgpacked = 0; + touser = 0; + + highmsg = configdata->firstconference[conf].n_ConfDefaultMsg; + + message = nodebase->CU.firstuserconf[conf].uc_LastRead+1; + +/* Sjekker om vi skal bruke max scan */ + if (message == 1) { + if ((highmsg - message) > configdata->firstconference[conf].n_ConfMaxScan) + message = highmsg - configdata->firstconference[conf].n_ConfMaxScan; + } + + scan_count = 0; + next_count = 1; + first_scan = FALSE; + putreg (REG_A6,exebase); + writetexti ("", usea4a5); + for (; message <= highmsg; message++) + { + if (!message) + continue; + + if (next_count == 1) + { + next_count = 1; + if (first_scan) // Har vi printet ut noe? + { + putreg (REG_A6,exebase); + writetexti ("",usea4a5); // JA ... til venstre + } + else + first_scan = TRUE; + putreg (REG_A6,exebase); + writetexti (Scan_text[scan_count],usea4a5); + if (scan_count == 3) + scan_count = 0; + else + scan_count++; + } + else + next_count++; + + tmp = 1; + putreg (REG_A6,exebase); + if (dograbmsg (message,conf,msgfil,usea4a5,&msgnr,&touser,&msgpacked)) + { + dobreak = 1; + break; + } + } + if (first_scan) // Har vi printet ut noe? + { + putreg (REG_A6,exebase); + writetexti ("",usea4a5); // JA ... til venstre + } + + +/* Mark read +*/ + if (!dobreak && tmp) + { + nodebase->CU.firstuserconf[conf].uc_LastRead = highmsg; + msprintf (string,"%-30ls %7ld %7ld %7ld", + configdata->firstconference[conf].n_ConfName, + configdata->firstconference[conf].n_ConfDefaultMsg, + msgpacked,touser); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + tousertot += touser; + } + + } while (!dobreak && (conf != startconf)); + + if (dobreak) + break; + + putreg (REG_A6,exebase); + writetexto ("------------------------------ ------- ------- -------", usea4a5); + msprintf (string,"\n36mNumber of messages: %7ld", msgnr-1); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + + msprintf (string,"Messages to you: %7ld", tousertot); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + + if (nodebase->CU.Userbits & USERF_SendBulletins) + { + msprintf (string,"Number of bulletins: %7ld", totbul); + putreg (REG_A6,exebase); + writetexto (string,usea4a5); + } + + putreg (REG_A6,exebase); + writetexto ("\n32mMaking control-files...",usea4a5); + + putreg (REG_A6,exebase); + if (doctrldatfile(msgnr-1,usea4a5)) + break; + + putreg (REG_A6,exebase); + writetexto ("\nPacking...",usea4a5); + + ret = 0; + break; + } + + if (msgfil) + Close (msgfil); + + if (ret) + DeleteFile (tmpstring); + + putreg (REG_A6,exebase); + writecontext (CursorOnData,usea4a5); + + nodebase->linesleft = tmplines; + + putreg (REG_A6,exebase); + return (ret ? -1L : (msgnr-1)); +} + +__asm int doctrldatfile(register __d0 int msgnr,a4a5) +{ + BPTR ctrlfil; + int ret = 1,n,k; + char buffer[256]; + struct ClockData dt; + struct DateStamp ds; + struct ConfigRecord *configdata = &mainmeory->config; + char *ptr,*ptr2,c; + + while (1) { + msprintf (buffer,"%ls/CONTROL.DAT",nodebase->Nodemem.TmpPath); + ctrlfil = Open(buffer,MODE_NEWFILE); + putreg (REG_A6,exebase); + if (!ctrlfil) + break; + + msprintf (buffer,"%ls\r\n%ls\r\n%ls\r\n%ls\r\n%ld,%ls\r\n", + configdata->BaseName,NULL,NULL,configdata->SYSOPname,0,configdata->BaseName); + if (FPuts (ctrlfil,buffer)) + break; + + DateStamp (&ds); + n = ds.ds_Days*24*60*60; + n += ds.ds_Minute*60; + n += ds.ds_Tick/TICKS_PER_SECOND; + Amiga2Date (n,&dt); + + msprintf (buffer,"%02ld-%02ld-%04ld,%02ld:%02ld:%02ld\r\n", + dt.month,dt.mday,dt.year,dt.hour,dt.min,dt.sec); + if (FPuts (ctrlfil,buffer)) + break; + + for (ptr = buffer,ptr2 = nodebase->CU.Name; *ptr2; ) { + c = *(ptr2++); + *(ptr++) = toupper(c); + } + *(ptr++) = '\r'; + *(ptr++) = '\n'; + *ptr = '\0'; + if (FPuts (ctrlfil,buffer)) + break; + + for (n = 0,k = 0; n < configdata->Maxconferences; n++) + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) + k += 1; + + msprintf (buffer,"\r\n0\r\n%ld\r\n%ld\r\n",msgnr,k-1); + if (FPuts (ctrlfil,buffer)) + break; + + for (n = 0; n < configdata->Maxconferences; n++) + { + if (nodebase->CU.firstuserconf[n].uc_Access & ACCF_Read) + { + msprintf (buffer,"%ld\r\n%ls\r\n",n, + configdata->firstconference[n].n_ConfName); + putreg (REG_A6,exebase); + convertstringfromiso (buffer,usea4a5); + if (FPuts (ctrlfil,buffer)) + break; + } + } + + if (n != configdata->Maxconferences) + break; + + if (FPuts (ctrlfil,"\r\n\r\n\r\n")) + break; + + ret = 0; + break; + } + + if (ctrlfil) + Close (ctrlfil); + else + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error opening control.dat file!",usea4a5); + } + + if (ret) { + msprintf (buffer,"%ls/CONTROL.DAT",nodebase->Nodemem.TmpPath); + DeleteFile (buffer); + } + + putreg (REG_A6,exebase); + return (ret); +} + +__asm int initdatafile (register __d0 BPTR msgfil,a4a5) +{ + char string[128+2]; + + msprintf (string,"%-128ls","Produced by ABBS-QWK, (C) 1993 Geir Inge Høsteng."); + if (128 != Write (msgfil,string,128)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File error!",usea4a5); + return (1); + } + putreg (REG_A6,exebase); + + return (0); +} + +__asm int dograbmsg (register __d0 int nr, register __d1 int conf,register __d2 BPTR msgfil,a4a5, + register __d3 int *msgnr,register __d4 int *touser,register __d5 int *numgrabbed) +{ + struct ClockData dt; + ULONG secs; + char c; + UBYTE *ptr,*ptr2; + int msgsize; + char string[128+2]; + char refnr[9]; + char from[26],to[26]; + struct MessageRecord *msgheader; + struct ConfigRecord *configdata = &mainmeory->config; + + msgheader = &nodebase->tmpmsgheader; + + putreg (REG_A6,exebase); + if (loadmsg (nodebase->tmpmsgmem,msgheader,nr,conf*2,usea4a5)) + { + msprintf (string,"Error loading message (%ls:%ld)!", + configdata->firstconference[conf].n_ConfName,nr); + putreg (REG_A6,exebase); + ANSIwriteerroro (string,usea4a5); + return (1); + } + + putreg (REG_A6,exebase); + if (kanskrive (msgheader,conf*2,usea4a5)) + return (0); + + if (msgheader->MsgStatus & MSTATF_MsgRead) + { + if (msgheader->Security & SECF_SecReceiver) + c = '+'; + else + c = '-'; + } + else + { + if (msgheader->Security & SECF_SecReceiver) + c = '*'; + else + c = ' '; + } + +// JEO her må en sjekke om det er en konfmessy... + + if (nodebase->CU.Usernr == msgheader->MsgTo) + { + *touser += 1; + putreg (REG_A6,exebase); + if (!(msgheader->MsgStatus & MSTATF_MsgRead),usea4a5) + { + msgheader->MsgStatus |= MSTATF_MsgRead; + putreg (REG_A6,exebase); + savemsgheader (msgheader,conf*2,usea4a5); + } + } + + nodebase->CU.MsgaGrab += 1; + nodebase->tmsgsdumped += 1; + + putreg (REG_A6,exebase); + getfromname (msgheader,nodebase->tmpmsgmem,usea4a5); + ptr = (UBYTE *) getreg (REG_A0); + putreg (REG_A6,exebase); + strcopylen ((char *) ptr,from,25,usea4a5); + putreg (REG_A6,exebase); + convertstringfromiso (from,usea4a5); + + putreg (REG_A6,exebase); + gettoname (msgheader,nodebase->tmpmsgmem,usea4a5); + ptr = (UBYTE *) getreg (REG_A0); + putreg (REG_A6,exebase); + strcopylen ((char *) ptr,to,25,usea4a5); + putreg (REG_A6,exebase); + convertstringfromiso (to,usea4a5); + + if ((msgheader->NrLines < 0) && (!msgheader->Subject[0])) + { + if (getnetsubject(nodebase->tmpmsgmem)) + { + ptr = (UBYTE *) getreg (REG_A0); + putreg (REG_A6,exebase); + strcopylen ((char *) ptr,msgheader->Subject,25,usea4a5); + } + else + { + putreg (REG_A6,exebase); + strcopylen ("No Subject",msgheader->Subject,25,usea4a5); + } + } + + msgheader->Subject[25] = '\0'; + putreg (REG_A6,exebase); + convertstringfromiso ((unsigned char *) msgheader->Subject,usea4a5); + + if (msgheader->RefTo) + msprintf (refnr,"%-8ld",msgheader->RefTo); + else + strcpy (refnr," "); + + secs = msgheader->MsgTimeStamp.ds_Days*24*60*60; + secs += msgheader->MsgTimeStamp.ds_Minute*60; + secs += msgheader->MsgTimeStamp.ds_Tick/TICKS_PER_SECOND; + Amiga2Date (secs,&dt); + + putreg (REG_A6,exebase); + msgsize = skipnetnames (nodebase->tmpmsgmem,msgheader->NrBytes,usea4a5); + ptr2 = (UBYTE *) getreg (REG_A0); + + to[25] = '\0'; + from[25] = '\0'; + msgheader->Subject[25] = '\0'; + msprintf (string,"%lc%-7ld%02ld-%02ld-%02ld%02ld:%02ld%-25ls%-25ls%-25ls%-12ls%8ls%-6ld%lc%lc%lc%lc%lc ", + c,msgheader->Number,dt.month,dt.mday,dt.year % 100,dt.hour,dt.min, + to,from,msgheader->Subject,"",refnr,((msgsize+128)/128)+1,225,conf%256, + conf/256,*msgnr%256,*msgnr/256); + *msgnr += 1; + + if (128 != Write (msgfil,string,128)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File error!",usea4a5); + return (4); + } + putreg (REG_A6,exebase); + +/* Convert linefeed into ASCII 227 (pi character in IBM), and Translates the rest of the message into + IBN +*/ + for (ptr = ptr2; *ptr; ptr++) + { + if (*ptr == '\n') + *ptr = 227; + else if (*ptr > 127) + { + putreg (REG_A6,exebase); + *ptr = convertcharfromiso (*ptr,usea4a5); + } + } + +/* Write the message +*/ + if (msgsize != Write (msgfil,ptr2,msgsize)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File error!",usea4a5); + return (5); + } + putreg (REG_A6,exebase); + +/* Pads message with null bytes +*/ + secs = 128 - (msgsize % 128); + if (secs) { + memset (string,'\0',secs); + if (secs != Write (msgfil,string,secs)) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File error!",usea4a5); + return (6); + } + } + putreg (REG_A6,exebase); + + *numgrabbed += 1; + + return (0); +} + +__asm ULONG copybulletin (register __a0 char *fromname, + register __a1 char *toname,a4a5) +{ + int n,k; + BPTR from,to; + char string[100]; + ULONG ret = 10; + + if (from = Open(fromname,MODE_OLDFILE)) + { + if (to = Open(toname,MODE_NEWFILE)) + { + while (TRUE) + { + n = Read (from,string,sizeof (string)-1); + if (n > 0) { + for (k = 0; k < n; k++) + { + putreg (REG_A6,exebase); + string[k] = convertcharfromiso(string[k],usea4a5); + } + k = Write (to,string,n); + if (k != n) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File write error!",usea4a5); + break; + } + } + else if (n != 0) + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("File write error!",usea4a5); + break; + } + else + { + ret = 0; + break; + } + } + Close (to); + } + else + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error opening destination file!",usea4a5); + } + Close (from); + } + else + { + putreg (REG_A6,exebase); + ANSIwriteerroro ("Error opening source file!",usea4a5); + } + + return (ret); +} + +__asm ULONG mygetusernumber (register __a2 char *name,a4a5) +{ + struct ConfigRecord *configdata = &mainmeory->config; + + clearmsgerror(); + + if (!mystricmp (name,"ALL")) + return (-1); + + if (!mystricmp (name,"SYSOP")) + return (configdata->SYSOPUsernr); + + putreg (REG_A6,exebase); + return (getusernumber (name,usea4a5)); +} + +__asm void convertstringfromiso (register __a0 unsigned char *string,a4a5) +{ + register unsigned char c; + + while (c = *(string++)) { + if (c > 127) { + c = fraISOtilIBN[c-128]; + if (!c) + c = ' '; + + *(string-1) = c; + } + } +} + +__asm void convertstringtoiso (register __a0 unsigned char *string,a4a5) +{ + register unsigned char c; + + while (c = *(string++)) { + if (c > 127) { + c = fraIBNtilISO[c-128]; + if (!c) + c = ' '; + + *(string-1) = c; + } + } +} + +__asm unsigned char convertchartoiso (register __d0 unsigned char c,a4a5) +{ + if (c > 127) { + c = fraIBNtilISO[c-128]; + if (!c) + c = ' '; + } + + return (c); +} + +__asm unsigned char convertcharfromiso (register __d0 unsigned char c,a4a5) +{ + if (c > 127) { + c = fraISOtilIBN[c-128]; + if (!c) + c = ' '; + } + + return (c); +} + +/* +{ + int n; + +/ * ingen oversetting hvis det er ISO +* / + if (NodeBase->Charset) { + if ((NodeBase->Charset < 3) || (NodeBase->Charset == 12)) { + if (NodeBase->Charset == 12) + n = 3; + else + n = NodeBase->Charset; + + if (c > 127) { + c = convertISOtoxxx[n][c-128]; + if (!c) + c = ' '; + } + } else { + } + } + + return (c); +*/ + +int mystricmp (char *ptr, char *ptr2) +{ + while (*ptr) { + if ((toupper (*ptr)) != (toupper (*ptr2))) + return (-1); + else { + ptr += 1; + ptr2 += 1; + } + } + + if (*ptr2 && *ptr2 != ' ') + return (-1); + else + return (0); +} + +int strincmp (char *ptr, char *ptr2,int len) +{ + while (len--) { + if ((toupper (*ptr)) != (toupper (*ptr2))) + return (-1); + } + + return (0); +} + +__asm void getbiggestdisk (void) +{ + struct DosList *dl; + struct DosEnvec *env; + struct FileSysStartupMsg *msg; + ULONG size; + + putreg (REG_A6,(long) DOSBase); + + dl = LockDosList(LDF_DEVICES|LDF_READ); + + dl = FindDosEntry(dl,NULL,LDF_DEVICES|LDF_READ); + + while (dl) { + if (dl->dol_Type == DLT_DEVICE) { + + msg = BADDR ((struct FileSysStartupMsg *) dl->dol_misc.dol_handler.dol_Startup); + + if (((ULONG) msg) > 0x1000) { + env = BADDR (msg->fssm_Environ); + + if (env) { + size = ((env->de_HighCyl - env->de_LowCyl +1) * env->de_BlocksPerTrack * + env->de_Surfaces - (env->de_PreAlloc + env->de_Reserved)); + + size = size/(1024*2); + + if (size && size > 2) { + getbiggestdisksub ((APTR) (((ULONG) (BADDR(msg->fssm_Device)))+1),msg->fssm_Unit); + putreg (REG_A6,(long) DOSBase); + } + } + } + } + dl = NextDosEntry (dl,LDF_DEVICES|LDF_READ); + } + + UnLockDosList(LDF_DEVICES|LDF_READ); + + putreg (REG_A6,exebase); +} + +__asm void getbiggestdisksub (register __a0 char *name,register __d0 ULONG num) +{ + static char lastname[60]; + static ULONG lastnum = -1; + struct MsgPort *MP; + struct IOStdReq *IO; + ULONG offset; + int size,n; + void *buffer; + + putreg (REG_A6,exebase); + + if (!(strcmp (lastname,name)) ) + if (num == lastnum) + return; + + lastnum = num; + strncpy (lastname,name,58); + + if (MP = CreatePort (NULL,NULL)) { + if (IO = (struct IOStdReq *) CreateExtIO (MP,sizeof (struct IOStdReq))) { + if (!OpenDevice (name,num,(struct IORequest *) IO,0L)) { + for (size = 1024*1024; size > 0; ) { + if (buffer = AllocMem (size,0)) + break; + size -= 1024; + } + if (!buffer) { + return; + } + + offset = 0; + while (TRUE) { + IO->io_Command = CMD_READ; /* CMD_WRITE */ + IO->io_Flags = 0; + IO->io_Length = size; + IO->io_Data = buffer; + IO->io_Offset = offset/512; + + if (IO->io_Error) + n = IO->io_Error; + + offset += size; + + if (n) + break; + } + + FreeMem (buffer,size); + if (!(CheckIO ((struct IORequest *) IO))) + AbortIO ((struct IORequest *) IO); + WaitIO ((struct IORequest *) IO); + CloseDevice ((struct IORequest *) IO); + } + DeleteIORequest((struct IORequest *) IO); + } + DeleteMsgPort(MP); + } +} + +__asm far VOID ANSIwriteerroro (register __a0 char *text,a4a5) +{ + char Ansi[100]; + + msprintf (Ansi, "%s", text); + writeerroro (Ansi, usea4a5); +} + +/* +Sort  +Rød  +Grønn  +Gul  +Mørkeblå  +Lilla  +Lyseblå  +white  +*/ diff --git a/Rexx.asm b/Rexx.asm new file mode 100644 index 0000000..8e1bcf6 --- /dev/null +++ b/Rexx.asm @@ -0,0 +1,1031 @@ + ***************************************************************** + * + * NAME + * Rexx.asm + * + * DESCRIPTION + * Rexx routines for abbs + * + * AUTHOR + * Geir Inge Høsteng + * + * $Id: rexx.asm 1.1 1995/06/24 10:32:07 geirhos Exp geirhos $ + * + * MODIFICATION HISTORY + * $Log: rexx.asm $ +;; Revision 1.1 1995/06/24 10:32:07 geirhos +;; Initial revision +;; + * + ***************************************************************** + + include 'exec/memory.i' + + include 'asm.i' + include 'bbs.i' + include 'xpr.i' + include 'fse.i' + include 'node.i' + include 'msg.pro' + + XDEF arexxcomtxt + XDEF arexxjmp + + XREF atoi + XREF readchar + XREF getline + XREF writetext + XREF writetexto + XREF writetexti + XREF strcopymaxlen + XREF getaccbittext + XREF writechar + XREF justchecksysopaccess + XREF outimage + XREF breakoutimage + XREF writecontext + XREF writeconchar + XREF konverter + XREF inputnr + XREF typefilemaybeall + XREF updatetime + XREF changenodestatusnostore + XREF getconfunreadmsgs + XREF v42bistext + XREF mnptext + XREF nonetext + XREF strcopy + XREF strlen + XREF throwouttext1 + XREF throwouttext2 + XREF parseaccessbitssub + XREF saveuserarea + XREF stopserread + XREF initserread + XREF updatewindowtitle + XREF readline + XREF stengmodem + XREF aapnemodem + XREF wf_makenodelocal1 + XREF tmpcloseserport + XREF tmpopenserport + XREF preskreopentext + XREF initwaitforcaller1 + + section rexx,code + +; Arexx kommandoene +; de skal returnere : +; a0 - retur string til arexx programmet, 0 for ingen +; d0 - retur verdi til arexx programmet (RC) +; d1 - retur verdi til amiga procedyren (hvis vi skal dit) +; z = 1 - hopp ut av readchar +rexx_getloginscript + push a2/a3/d2/d3 + moveq.l #10,d2 ; error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi parametre ? + beq 1$ ; nope. current user. + moveq.l #15,d2 + move.l (rx_ptr1,a0),a0 ; navnet + lea (tmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + bsr getuserstruct + beq.b 9$ + move.l a0,a2 ; user struct + lea (tmptext,NodeBase),a1 + exg a1,a0 + jsr (loaduser) + bne.b 9$ + lea (UserScript,a2),a0 ; string vi skal ha + lea (tmptext,NodeBase),a1 + bsr strcopy + move.l a2,a0 + bsr freeuserstruct + bra.b 2$ + +1$ moveq.l #5,d2 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (UserScript+CU,NodeBase),a0 ; string å lese fra + lea (tmptext,NodeBase),a1 + bsr strcopy +2$ moveq.l #0,d2 + +9$ move.l d2,d0 + lea (tmptext,NodeBase),a0 + clrz + pop a2/a3/d2/d3 + rts + +rexx_setloginscript + push a2/a3/d2/d3 + moveq.l #10,d2 ; error + suba.l a2,a2 + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi parametre ? + beq 9$ ; nope. + lea (UserScript+CU,NodeBase),a3 ; string å lagre i + moveq.l #15,d2 + subq.l #1,d0 + beq.b 1$ ; bare 1 param, current user + move.l (rx_ptr2,a0),a0 ; navnet + lea (tmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + bsr getuserstruct + beq.b 9$ + move.l a0,a2 ; user struct + lea (tmptext,NodeBase),a1 + exg a1,a0 + jsr (loaduser) + lea (UserScript,a2),a3 ; string å lagre i + bmi.b 9$ + lea (tmplargestore,NodeBase),a0 + bra.b 2$ +1$ moveq.l #5,d2 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne +2$ moveq.l #10,d2 ; for lang/kort + move.l (rx_ptr1,a0),d3 ; henter parameter. + move.l d3,a0 + jsr strlen ; finner lengden. + beq.b 9$ ; tom... + cmp.w #Sizeof_loginscript-1,d0 + bhi.b 9$ ; for lang + move.l d3,a0 + move.l a3,a1 + jsr (strcopy) ; lagrer + moveq.l #15,d2 + move.l a2,d0 ; har vi bruker ? + bne.b 3$ ; jepp. + move.l a3,a0 ; lagrer denne forandringen + moveq.l #Sizeof_loginscript,d0 + jsr (saveuserarea) + beq.b 9$ + bra.b 8$ +3$ move.l a2,a0 + move.l (Usernr,a0),d0 + jsr (saveusernr) + beq.b 9$ +8$ moveq.l #0,d2 ; RC = 0 +9$ move.l a2,a0 + move.l a2,d0 ; har vi user struct ? + beq.b 91$ ; nope + bsr freeuserstruct ; Ja, frigi +91$ move.l d2,d0 + suba.l a0,a0 ; ingen retur sting + clrz + pop a2/a3/d2/d3 + rts + +rexx_getnextparam + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + moveq.l #1,d0 + tst.b (readlinemore,NodeBase) ; er det mere input ? + beq.b 9$ ; nei, ingen parametre.. + jsr (readline) + beq.b 1$ + moveq.l #0,d0 + bra.b 99$ +1$ moveq.l #20,d0 +9$ suba.l a0,a0 ; ingen return string +99$ clrz + rts + +rexx_listen + push d2 + moveq.l #10,d2 + move.b (RealCommsPort,NodeBase),d0 ; Setter tilbake comport + beq 9$ ; har ingen + move.b #-1,d1 + cmp.b d0,d1 + beq 9$ ; har aldri hatt + moveq.l #0,d2 ; ok. + bclr #DoDivB_Sleep,(DoDiv,NodeBase) ; slett sleep + jsr (updatewindowtitle) + move.b (RealCommsPort,NodeBase),d0 + cmp.b (CommsPort+Nodemem,NodeBase),d0 ; ble den disablet ? + beq.b 9$ ; nei, ikke start igjen + move.b d0,(CommsPort+Nodemem,NodeBase) + bsr initserread ; starter opp en read request +9$ suba.l a0,a0 + move.l d2,d0 + pop d2 + clrz + rts + +rexx_unlisten + moveq.l #10,d0 + move.b (CommsPort+Nodemem,NodeBase),d1 ; Er det en serial node ? + beq.b 9$ ; nope, error + moveq.l #5,d0 ; error, user online + move.b (in_waitforcaller,NodeBase),d0 + beq.b 9$ + move.b #0,(CommsPort+Nodemem,NodeBase) ; Gjør noden lokal. + bset #DoDivB_Sleep,(DoDiv,NodeBase) ; sett sleep + jsr (updatewindowtitle) + bsr stopserread ; avbryter read req'en + moveq.l #0,d0 ; ok +9$ suba.l a0,a0 + clrz + rts + +rexx_login + moveq.l #5,d0 + suba.l a0,a0 + clrz + rts + +rexx_readbits + push d2/a2 + suba.l a2,a2 + moveq.l #20,d2 + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d0 ; har vi parameter ? + beq.b 1$ ; nei, tar current user + move.l (rx_ptr1,a0),a0 + lea (tmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + bsr getuserstruct + beq.b 9$ + move.l a0,a2 + lea (tmptext,NodeBase),a1 + exg a1,a0 + jsr (loaduser) + beq.b 2$ ; alt ok + bmi.b 9$ + move.l #10,d0 ; user not found + bra.b 9$ +2$ lea (u_almostendsave,a2),a0 + move.w (uc_Access,a0),d0 + bra.b 3$ +1$ moveq.l #5,d2 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (u_almostendsave+CU,NodeBase),a0 + move.w (uc_Access,a0),d0 +3$ lea (tmptext,NodeBase),a0 + jsr (getaccbittext) + moveq.l #0,d2 +9$ exg a2,a0 + bsr freeuserstruct + move.l a2,a0 + move.l d2,d0 + pop d2/a2 + clrz + rts + +getuserstruct + move.l (UserrecordSize+CStr,MainBase),d0 + moveq.l #MEMF_PUBLIC,d1 + jsrlib AllocVec + move.l d0,a0 + tst.l d0 + rts + +freeuserstruct + move.l a0,d0 + beq.b 9$ + move.l a0,a1 + jsrlib FreeVec +9$ rts + +rexx_setbits + push d2/a2/a3/d7 + suba.l a2,a2 + moveq.l #11,d2 + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d0 ; har vi parameter ? + beq 91$ ; nei, error + moveq.l #20,d2 + subq.l #1,d0 + beq.b 1$ ; bare 1 param, current user + move.l (rx_ptr2,a0),a0 ; navnet + lea (tmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + bsr getuserstruct + beq.b 9$ + move.l a0,a2 + lea (tmptext,NodeBase),a1 + exg a1,a0 + jsr (loaduser) + lea (u_almostendsave,a2),a3 + beq.b 2$ ; alt ok + bmi.b 9$ + move.l #10,d0 ; user not found + bra.b 9$ +1$ moveq.l #5,d2 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (u_almostendsave+CU,NodeBase),a3 ; a3 er nå word'et som skal forandres +2$ lea (tmplargestore,NodeBase),a0 + move.l (rx_ptr1,a0),a0 + moveq.l #1,d0 ; ikke sjekk sigop/sysop + moveq.l #0,d7 + move.l #15,d2 ; unknown bits + jsr (parseaccessbitssub) + beq.b 9$ + and.b #ACCF_Read|ACCF_Write|ACCF_Upload|ACCF_Download|ACCF_FileVIP|ACCF_Sigop,d7 + move.w (a3),d0 + and.w #ACCF_Invited|ACCF_Sysop,d0 + or.w d0,d7 + move.w d7,(a3) + move.l #20,d2 ; error + move.l a2,d0 + beq.b 3$ ; vi har ikke bruker + move.l a2,a0 + move.l (Usernr,a0),d0 + jsr (saveusernr) + beq.b 9$ + bra.b 8$ +3$ move.l a3,a0 ; lagrer denne forandringen + move.b #2,d0 ; bare 1 word.. + jsr (saveuserarea) + beq.b 9$ +8$ moveq.l #0,d2 ; alt ok +9$ exg a2,a0 + bsr freeuserstruct + move.l a2,a0 +91$ move.l d2,d0 + pop d2/a2/a3/d7 + clrz + rts + +rexx_sigop + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + jsr (justchecksysopaccess) + bne.b 1$ + lea (u_almostendsave+CU,NodeBase),a0 + move.w (confnr,NodeBase),d0 + cmp.w #-1,d0 + bne.b 2$ + moveq.l #0,d0 +2$ mulu #Userconf_seizeof/2,d0 + move.w (uc_Access,a0,d0.l),d0 + btst #ACCB_Sigop,d0 ; har bruker sigop access ?? + bne.b 1$ ; ja + moveq.l #0,d0 ; ingen access + bra.b 9$ +1$ moveq.l #1,d0 ; sysop access +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_sysop + moveq.l #5,d0 ; ERROR + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + jsr (justchecksysopaccess) + bne.b 1$ + moveq.l #0,d0 ; ingen access + bra.b 9$ +1$ moveq.l #1,d0 ; sysop access +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_setstatustext + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + bne.b 1$ ; Ja.. + move.w (PrevNodestatus,NodeBase),d0 + move.l (PrevNodesubStatus,NodeBase),d1 + bra.b 2$ +1$ move.l (rx_ptr1,a0),a0 + lea (tmpnodestatustext,NodeBase),a1 + moveq.l #23,d0 + jsr (strcopymaxlen) + lea (tmpnodestatustext,NodeBase),a1 + move.l a1,d1 + moveq.l #68,d0 +2$ jsr (changenodestatusnostore) + moveq.l #0,d0 ; RC = 0 + suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_sysopname + lea (SYSOPname+CStr,MainBase),a0 + moveq.l #0,d0 + clrz + rts + +rexx_bbsname + lea (BaseName+CStr,MainBase),a0 + moveq.l #0,d0 + clrz + rts + +rexx_unread + suba.l a0,a0 ; ingen return string (enda) + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + moveq.l #0,d0 ; conf = 0 + jsr (getconfunreadmsgs) + lea (tmptext,NodeBase),a0 + jsr konverter + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 +9$ clrz + rts + +rexx_getconstat + push a2 + move.l (nodenoden,NodeBase),a2 + lea (tmptext,NodeBase),a0 + move.l (Nodespeed,a2),d0 + jsr (konverter) + move.l a0,a1 + move.b #' ',(a1)+ + move.b (NodeECstatus,a2),d1 + lea (v42bistext),a0 + btst #NECSB_V42BIS,d1 + bne.b 1$ + lea (mnptext),a0 + btst #NECSB_MNP,d1 + bne.b 1$ + lea nulltext,a0 + move.w (Setup+Nodemem,NodeBase),d0 + btst #SETUPB_NullModem,d0 ; Nullmodem ? + bne.b 1$ ; Ja, da sier vi det + lea (nonetext),a0 +1$ jsr (strcopy) + lea (tmptext,NodeBase),a0 ; ret string + moveq.l #0,d0 + pop a2 + clrz + rts + +rexx_usersetup + push d2 + moveq.l #5,d2 ; setter opp feiltid error + btst #DIVB_InNewuser,(Divmodes,NodeBase) + beq 9$ ; ikke fra newuser.abbs + moveq.l #10,d2 ; setter opp for param error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq 9$ ; nope. + move.l (rx_ptr1,a0),a0 + jsr (atoi) + bmi.b 9$ ; Ikke tall + swap d0 ; format : cppstdd + moveq.l #0,d1 ; c = charset + move.b d0,d1 ; pp = pagelen + move.w d1,(PageLength+CU,NodeBase) ; s = scratchpadformat + lsr.w #8,d0 ; t = transferprotocol + and.b #$f,d0 ; dd = div bits + cmp.b #12,d0 + bls.b 4$ + move.b #0,d0 +4$ move.b d0,(Charset+CU,NodeBase) + swap d0 + move.w (Savebits+CU,NodeBase),d1 + bclr #SAVEBITSB_ReadRef,d1 + btst #7,d0 + beq.b 1$ + bset #SAVEBITSB_ReadRef,d1 +1$ move.w d1,(Savebits+CU,NodeBase) + asl.b #1,d0 + move.b d0,d1 + asl.w #1,d1 + and.b #%00011110,d0 + and.w #%111000000,d1 + or.b d0,d1 + move.w d1,(Userbits+CU,NodeBase) + lsr.w #8,d0 + move.b d0,d1 + lsr.w #4,d0 + and.b #$f,d1 + and.b #$f,d0 + cmp.b #7,d0 + bls.b 2$ + move.b #0,d0 +2$ move.b d0,(ScratchFormat+CU,NodeBase) + cmp.b #6,d0 + bls.b 3$ + move.b #0,d0 +3$ move.b d1,(Protocol+CU,NodeBase) + moveq.l #0,d2 +9$ suba.l a0,a0 ; ingen return string + move.l d2,d0 + pop d2 + clrz + rts + +rexx_readusersetup + push d2 + suba.l a0,a0 ; ingen return string (enda) + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + move.b (Charset+CU,NodeBase),d0 + and.b #$f,d0 ; nå er bits 32-24 ok, bare på feil plass + lsl.l #8,d0 + move.w (PageLength+CU,NodeBase),d1 + or.b d1,d0 ; 32-16 ok (feil plass) + lsl.l #8,d0 + move.b (ScratchFormat+CU,NodeBase),d1 + and.b #$f,d1 + lsl.w #4,d1 + move.b (Protocol+CU,NodeBase),d0 + and.b #$f,d0 + or.b d1,d0 ; 32-8 + lsl.l #8,d0 + move.w (Savebits+CU,NodeBase),d1 + btst #SAVEBITSB_ReadRef,d1 + beq.b 1$ + bset #7,d0 +1$ move.w (Userbits+CU,NodeBase),d2 + move.w d2,d1 + lsr.w #2,d1 + and.b #%1110000,d1 + lsr.b #1,d2 + and.b #%00001111,d2 + or.b d2,d0 + or.b d1,d0 + lea (tmptext,NodeBase),a0 + jsr (konverter) + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 +9$ pop d2 + clrz + rts + +rexx_userinfo + suba.l a0,a0 ; ingen return string (enda) + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (tmptext,NodeBase),a0 + move.w (TimesOn+CU,NodeBase),d0 + bsr.b userfileinfocommon + move.w (MsgsLeft+CU,NodeBase),d0 + bsr.b userfileinfocommon + move.l (MsgsRead+CU,NodeBase),d0 + bsr.b userfileinfocommon1 + move.l (MsgaGrab+CU,NodeBase),d0 + bsr.b userfileinfocommon1 + move.l (ResymeMsgNr+CU,NodeBase),d0 + bsr.b userfileinfocommon1 + move.b #0,-1(a0) + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 +9$ clrz + rts + +userfileinfocommon + andi.l #$ffff,d0 +userfileinfocommon1 + jsr konverter + move.b #' ',(a0)+ + rts + +rexx_fileinfo + suba.l a0,a0 ; ingen return string (enda) + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (tmptext,NodeBase),a0 + move.w (Downloaded+CU,NodeBase),d0 + bsr.b userfileinfocommon + move.w (Uploaded+CU,NodeBase),d0 + bsr.b userfileinfocommon + move.l (KbDownloaded+CU,NodeBase),d0 + bsr.b userfileinfocommon1 + move.l (KbUploaded+CU,NodeBase),d0 + bsr.b userfileinfocommon1 + move.b #0,-1(a0) + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 +9$ clrz + rts + +rexx_raw + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq.b 1$ ; nope. + move.b #0,(FSEditor,NodeBase) ; slår på dekoding av tastene + bra.b 2$ +1$ move.b #1,(FSEditor,NodeBase) ; slår av dekoding av tastene +2$ moveq.l #0,d0 ; RC = 0 +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_eject + moveq.l #5,d0 ; setter warning, hvis det ikke er noen der + move.l (Name+CU,NodeBase),d1 ; eject. Men er det noen inne ? + notz + bne.b 9$ ; nei ... Da dropper vi saken.. + move.w #-1,(linesleft,NodeBase) ; Dropper all more saker .. + lea (throwouttext1),a0 + jsr (writetexti) + lea (throwouttext2),a0 + jsr (writetexti) + move.b #Thrownout,(readcharstatus,NodeBase) + moveq.l #0,d0 ; RC = 0 +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_quick + moveq.l #5,d0 ; setter warning, just in case + move.l (Name+CU,NodeBase),d1 ; Men er det noen inne ? + beq.b 9$ ; nei ... Da dropper vi saken.. + moveq.l #1,d0 ; setter quick = 1 + btst #DIVB_QuickMode,(Divmodes,NodeBase) + bne.b 9$ + moveq.l #0,d0 ; RC = 0, ikke quick +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_resume + moveq.l #5,d0 ; setter warning, i tilfelle feil + move.b (in_waitforcaller,NodeBase),d1 ; er vi i waitforcaller ? + notz + bne.b 9$ ; nope + moveq.l #10,d0 + move.b (RealCommsPort,NodeBase),d1 + beq 9$ ; ingen port + cmp.b #-1,d1 + beq.b 9$ ; ingen port.. + moveq.l #5,d0 + move.l (sreadreq,NodeBase),a1 + move.l (IO_DEVICE,a1),d1 + bne.b 9$ ; vi har porten.. + + jsr tmpopenserport + cmpi.b #-1,(RealCommsPort,NodeBase) ; gikk det bra ? + bne.b 4$ ; jepp + move.b (CommsPort+Nodemem,NodeBase),d0 ; Vi prøver en gang til. + move.b d0,(RealCommsPort,NodeBase) + moveq.l #10,d0 + bra.b 9$ ; og ut. +4$ move.b (RealCommsPort,NodeBase),(CommsPort+Nodemem,NodeBase) ; setter tilbake + bsr aapnemodem + bsr initwaitforcaller1 + moveq.l #0,d0 ; (RC = 0) +9$ clrzn ; for sikkerhets skyld. + suba.l a0,a0 ; ingen return string + rts + +rexx_shutdown + moveq.l #5,d0 ; setter warning, i tilfelle feil + move.b #1,(ShutdownNode,NodeBase) ; markerer at vi skal ned + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + notz + bne.b 9$ ; nope + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d0 ; har vi 1 parameter ? + bne.b 1$ ; ja, dvs, nobusy + jsr (stengmodem) +1$ bset #DoDivB_ExitWaitforCaller,(DoDiv,NodeBase) ; vi shal ut + +; denne gir RC 20... +; move.b #Thrownout,(readcharstatus,NodeBase) ; for sikkerhet skyld + moveq.l #0,d0 ; (RC = 0) + clrn + setz +9$ suba.l a0,a0 ; ingen return string + rts + +rexx_suspend + moveq.l #5,d0 ; setter warning, i tilfelle feil + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + beq.b 9$ ; nope + moveq.l #10,d0 ; setter error, i tilfelle feil + move.b (CommsPort+Nodemem,NodeBase),d0 ; er vi serielle ? + beq.b 9$ ; nope. + lea (tmplargestore,NodeBase),a0 + moveq.l #0,d0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + bne.b 2$ ; nope, dvs nobusy + moveq.l #1,d0 ; busy. +2$ bsr wf_makenodelocal1 ; jepp, dvs nobusy +; beq.b 9$ ; lokal node, ut. Umulig + jsr (tmpcloseserport) + tst.b (Tinymode,NodeBase) + bne.b 1$ + lea (preskreopentext),a0 + bsr writecontext +1$ moveq.l #0,d0 ; RC = 0 +9$ clrzn + suba.l a0,a0 ; ingen return string + rts + +rexx_nomore + move.w #-1,(linesleft,NodeBase) ; Vi vil ikke ha noen more mere.. + suba.l a0,a0 + moveq.l #0,d0 ; alltid ok. + clrz + rts + +rexx_more + move.w (PageLength+CU,NodeBase),(linesleft,NodeBase) ; Ny side.. + suba.l a0,a0 + moveq.l #0,d0 ; alltid ok. + clrz + rts + +rexx_username + btst #DIVB_InNewuser,(Divmodes,NodeBase) + bne.b 1$ ; i newuser.abbs Da er navnet fyllt ut + moveq.l #5,d0 + suba.l a0,a0 + move.b (userok,NodeBase),d1 + beq.b 9$ +1$ lea (Name+CU,NodeBase),a0 + moveq.l #0,d0 +9$ clrz + rts + +rexx_timeleft + moveq.l #5,d0 + move.b (userok,NodeBase),d1 + beq.b 9$ + jsr (updatetime) + moveq.l #0,d0 + move.w (TimeLimit+CU,NodeBase),d0 + sub.w (TimeUsed+CU,NodeBase),d0 + bcc.b 1$ + moveq.l #0,d0 +1$ lea (tmptext,NodeBase),a0 + jsr (konverter) + lea (tmptext,NodeBase),a0 + moveq.l #0,d0 +9$ clrz + rts + +rexx_outimage + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + bne.b 1$ ; ja, da tar vi til con.. + jsr (outimage) + bne.b 2$ + moveq.l #20,d0 ; noe gikk galt + tst.b (readcharstatus,NodeBase) + bne.b 3$ + moveq.l #1,d0 ; ikke så ille, bare more-nei + bra.b 3$ +1$ move.b #10,d0 + jsr (writeconchar) +2$ moveq.l #0,d0 ; RC = 0 +3$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_breakoutimage + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + bne.b 1$ ; ja, da er dette en nop + jsr (breakoutimage) +1$ moveq.l #0,d0 ; RC = 0 + suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_writechar + moveq.l #10,d0 ; error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq.b 9$ ; nope. + move.l (rx_ptr1,a0),a0 + move.b (a0),d0 + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + bne.b 1$ ; ja, da tar vi til con.. + jsr (writechar) + bra.b 2$ +1$ jsr (writeconchar) +2$ moveq.l #0,d0 ; RC = 0 +9$ suba.l a0,a0 ; ingen return string + clrz + rts + +rexx_writetext + push a2/d2 + moveq.l #10,d0 ; error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq.b 9$ ; nope. + move.l (rx_ptr1,a0),a2 + +0$ move.l a2,a0 + moveq.l #79,d1 + suba.l a1,a1 ; ingen esc enda +1$ move.b (a0)+,d0 + beq.b 5$ + subq.l #1,d1 + beq.b 2$ + cmp.b #$1b,d0 ; esc? + bne.b 1$ + lea (-1,a0),a1 ; siste ESC pos + bra.b 1$ + +2$ move.l a1,d0 ; for lang. Må kutte ned + tst.l d0 + beq.b 3$ ; vi har ikke esc + sub.l a2,d0 + cmp.w #65,d0 ; under 15 tegn fra slutten ? + bcs.b 3$ ; nei, da sier vi at vi ikke hadde esc + move.l a1,a0 ; da skal vi terminere herfra +3$ move.b (a0),d2 ; husker tegnet + move.b #0,(a0) ; og terminerer + exg a0,a2 ; husker hvor vi er, og finner frem starten + bsr 10$ +; jsr (breakoutimage) ; og skriver ut... + move.b d2,(a2) ; setter tilbake tegnet + bra.b 0$ + +5$ move.l a2,a0 + bsr 10$ ; skriver ut + moveq.l #0,d0 ; RC = 0 +9$ suba.l a0,a0 ; ingen retur sting + clrz + pop a2/d2 + rts + +10$ tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + bne.b 11$ ; ja, da tar vi til con.. + jmp (writetext) +11$ jmp (writecontext) + + +rexx_nodenumber + moveq.l #0,d0 + move.w (NodeNumber,NodeBase),d0 + lea (tmptext,NodeBase),a0 + jsr (konverter) + lea (tmptext,NodeBase),a0 ; result string + moveq.l #0,d0 ; RC = 0 + clrz + rts + +rexx_maygetchar +0$ move.l (creadreq,NodeBase),d0 + beq.b 3$ ; no console + move.l d0,a1 + jsrlib CheckIO + tst.l d0 + bne.b 1$ ; Ja, vi har et tegn +3$ + IFND DEMO + tst.b (CommsPort+Nodemem,NodeBase) ; Skal denne noden være serial ? + beq.b 2$ ; nei. Ikke noe tegn + move.l (sreadreq,NodeBase),a1 + jsrlib CheckIO + tst.l d0 + beq.b 2$ ; vi har ikke et tegn + ELSE + bra.b 2$ + ENDC +1$ jsr (readchar) + bmi.b 0$ ; ikke spes tegn + lea (tmpword,NodeBase),a0 ; result string + move.b d0,(a0) + move.b #0,(1,a0) + moveq.l #0,d0 ; ikke noe galt har skjedd + tst.b (readcharstatus,NodeBase) ; Har det skjedd noe ? + beq.b 9$ ; nope + moveq.l #20,d0 ; return error + bra.b 9$ +2$ moveq.l #1,d0 ; ikke noe tegn klart + suba.l a0,a0 ; ingen string +9$ clrz + rts + +rexx_readchar +1$ jsr (readchar) + bmi.b 1$ ; ingen spesialtegn + lea (tmptext,NodeBase),a0 ; result string + move.b d0,(a0) + move.b #0,(1,a0) + moveq.l #0,d0 ; ikke noe galt har skjedd + tst.b (readcharstatus,NodeBase) ; Har det skjedd noe ? + beq.b 9$ ; nope + moveq.l #20,d0 ; return error +9$ clrz + rts + +rexx_getline + moveq.l #10,d0 ; setter opp for error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq.b 9$ ; nope. + move.l (rx_ptr1,a0),a0 + jsr (inputnr) + bne.b 1$ + moveq.l #10,d0 ; Ikke tall + bra.b 9$ +1$ jsr (getline) + moveq.l #0,d0 + tst.b (readcharstatus,NodeBase) ; har noe skjedd ? + beq 9$ ; nope. alt ok + moveq.l #20,d0 ; return error +9$ clrz + rts + +rexx_typefile + moveq.l #10,d0 ; error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi 1 parameter ? + beq.b 9$ ; nope. + move.l (rx_ptr1,a0),a0 + moveq.l #0,d0 ; både ser og con + tst.b (in_waitforcaller,NodeBase) ; er vi i waitforcaller ? + beq.b 1$ ; nei + moveq.l #1,d0 ; ja, da tar vi til con.. +1$ jsr (typefilemaybeall) + bne.b 2$ + moveq.l #1,d0 ; bare break + move.b (readcharstatus,NodeBase),d1 + beq.b 9$ + moveq.l #20,d0 ; noe alvorlig + bra.b 9$ +2$ moveq.l #0,d0 ; RC = 0 +9$ suba.l a0,a0 + clrz + rts + + +;JEO +; Arexx kommandoene +; de skal returnere : +; a0 - retur string til arexx programmet, 0 for ingen +; d0 - retur verdi til arexx programmet (RC) +; d1 - retur verdi til amiga procedyren (hvis vi skal dit) +; z = 1 - hopp ut av readchar +rexx_laston + push a2/a3/d2/d3 + moveq.l #10,d2 ; error + lea (tmplargestore,NodeBase),a0 + move.l (rx_NumParam,a0),d1 ; har vi parametre ? + beq 1$ ; nope. current user. + moveq.l #15,d2 + move.l (rx_ptr1,a0),a0 ; navnet + lea (tmptext,NodeBase),a1 + moveq.l #Sizeof_NameT,d0 + jsr (strcopymaxlen) + bsr getuserstruct + beq.b 9$ + move.l a0,a2 ; user struct + lea (tmptext,NodeBase),a1 + exg a1,a0 + jsr (loaduser) + bne.b 9$ + lea (UserScript,a2),a0 ; string vi skal ha + lea (tmptext,NodeBase),a1 + bsr strcopy + move.l a2,a0 + bsr freeuserstruct + bra.b 2$ + +1$ moveq.l #5,d2 + move.b (userok,NodeBase),d1 + beq.b 9$ ; ingen inne + lea (LastAccess+CU,NodeBase),a0 ; string å lese fra + lea (tmptext,NodeBase),a1 + bsr strcopy +2$ moveq.l #0,d2 + +9$ move.l d2,d0 + lea (tmptext,NodeBase),a0 + clrz + pop a2/a3/d2/d3 + rts + +arexxcomtxt dc.b 'BBSNAME,BREAKOUTIMAGE,EJECT,FILEINFO,GETCONSTAT,GETLINE,' + dc.b 'GETLOGINSCRIPT,GETNEXTPARAM,LISTEN,' + dc.b 'LOGIN,MAYGETCHAR,MORE,NODENUMBER,NOMORE,' + dc.b 'OUTIMAGE,QUICK,RAW,READBITS,READCHAR,READUSERSETUP,' + dc.b 'RESUME,SETLOGINSCRIPT,' + dc.b 'SETBITS,SETSTATUSTEXT,SHUTDOWN,SIGOP,SUSPEND,SYSOP,SYSOPNAME,' + dc.b 'TIMELEFT,TYPEFILE,UNLISTEN,UNREAD,USERINFO,' + dc.b 'USERNAME,' + dc.b 'USERSETUP,' + dc.b 'WRITECHAR,WRITETEXT,' + dc.b 'LASTON',0 + +nulltext dc.b 'NULL',0 + even +arexxjmp dc.l rexx_bbsname,rexx_breakoutimage,rexx_eject,rexx_fileinfo,rexx_getconstat + dc.l rexx_getline,rexx_getloginscript,rexx_getnextparam,rexx_listen + dc.l rexx_login,rexx_maygetchar,rexx_more + dc.l rexx_nodenumber,rexx_nomore,rexx_outimage,rexx_quick + dc.l rexx_raw,rexx_readbits + dc.l rexx_readchar,rexx_readusersetup,rexx_resume + dc.l rexx_setloginscript,rexx_setbits + dc.l rexx_setstatustext,rexx_shutdown + dc.l rexx_sigop,rexx_suspend,rexx_sysop,rexx_sysopname + dc.l rexx_timeleft,rexx_typefile,rexx_unlisten,rexx_unread + dc.l rexx_userinfo,rexx_username,rexx_usersetup + dc.l rexx_writechar,rexx_writetext + dc.l rexx_laston + END diff --git a/c/CheckIndex.c b/c/CheckIndex.c new file mode 100644 index 0000000..75952e3 --- /dev/null +++ b/c/CheckIndex.c @@ -0,0 +1,249 @@ +/*************************************************************************** +* CheckUserfiles 2.0 (21/03-94) +* +* Checks index files for errors +* +* Usage : [USER=] [INDEX=] [NRINDEX=] [CONFIG=] +* +***************************************************************************/ +#include + +#include +#include +#include + +#include +#include +#include +#include + +int main(int argc, char **argv); +int comparestringsifull (unsigned char *string,unsigned char *string2, int length); +unsigned char upchar (unsigned char c); +int getfilelen (char *name); + +char *vers = "\0$VER: CheckUserfiles 2.0 (21.3.94)\n\r"; /* day,month,year */ + +struct UserRecord user; +ULONG *nrindex = NULL; +struct Log_entry *index; + +#define TEMPLATE "USER,INDEX,NRINDEX,CONFIG" +#define OPT_COUNT 4 + +int main(int argc, char **argv) +{ + int n,k,nrsize,logsize; + int maxusernr = 0,users = 0,error = 0; + BPTR file = NULL; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0,0,0,0}; + char *userfname,*indexfname,*nrindexfname,*configfnane; + + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + while (1) { + userfname = result[0] ? (char *) result[0] : "userfile"; + indexfname = result[1] ? (char *) result[1] : "userfile.index"; + nrindexfname = result[2] ? (char *) result[2] : "userfile.nrindex"; + configfnane = result[3] ? (char *) result[3] : "configfile"; + + k = getfilelen (userfname); + nrsize = getfilelen (nrindexfname); + logsize = getfilelen (indexfname); + + if (nrsize % 4) { + printf ("Error in nrindex size\n"); + break; + } + + if (logsize % (sizeof (struct Log_entry))) { + printf ("Error in index size\n"); + break; + } + + if (!k || (k % (sizeof (struct UserRecord)))) { + printf ("Error in userfile size\n"); + break; + } + + if (!nrsize || !logsize) { + printf ("Empty index file(s)\n"); + break; + } + + if ((!(nrindex = AllocVec (nrsize+4,0))) || + (!(index = (struct Log_entry *) AllocVec (logsize,MEMF_CLEAR)))) { + printf ("Error allocating memory\n"); + break; + } + + if ((!(file = Open (nrindexfname,MODE_OLDFILE))) || + (nrsize != Read (file,nrindex,nrsize))) { + printf ("Error opening/reading file\n"); + break; + } + Close (file); file = NULL; + + if ((!(file = Open (indexfname,MODE_OLDFILE))) || + (logsize != Read (file,index,logsize))) { + printf ("Error opening/reading file\n"); + break; + } + Close (file); file = NULL; + + if (!(file = Open (userfname,MODE_OLDFILE))) { + printf ("Error opening userfile\n"); + break; + } + + nrsize /= 4; + logsize /= sizeof (struct Log_entry); + + for (n = 0; n < nrsize; n++) { + if (nrindex[n] == -1L) + continue; /* removed user */ + + users += 1; + if (index[nrindex[n]].l_UserNr > maxusernr) + maxusernr = index[nrindex[n]].l_UserNr; + + if (index[nrindex[n]].l_UserNr != n) { + printf ("Error: %d != %d (%s)\n",n,index[nrindex[n]].l_UserNr,index[nrindex[n]].l_Name); + error = 1; + } + if (index[nrindex[n]].l_pad) { + printf ("Warning, trash in index: %d,%s\n",n,index[nrindex[n]].l_Name); + error = 1; + } + + if (nrindex[n]) { + if (comparestringsifull (index[nrindex[n]].l_Name,index[nrindex[n]-1].l_Name,sizeof (NameT)) < 0) { + printf ("Error: Wrong sorting : (%d) %s,%s\n",nrindex[n],index[nrindex[n]].l_Name,index[nrindex[n]-1].l_Name); + error = 1; + break; + } + } + +/* if (nrindex[n] < (logsize-1)) { + if (comparestringsifull (index[nrindex[n+1]].l_Name,index[nrindex[n]].l_Name,sizeof (NameT)) < 0) { + printf ("Error: Wrong sorting : (%d) %s,%s\n",nrindex[n],index[nrindex[n]].l_Name,index[nrindex[n]+1].l_Name); + error = 1; + break; + } + } +*/ + + SetIoErr (0); + Seek (file,index[nrindex[n]].l_RecordNr * sizeof (struct UserRecord),OFFSET_BEGINNING); + if (k = IoErr()) { + printf ("Error seeking in userfile (%d) %d %d\n",k,index[nrindex[n]].l_RecordNr,index[nrindex[n]].l_RecordNr * sizeof (struct UserRecord)); + error = 1; + break; + } + + if (sizeof (struct UserRecord) != Read (file,&user,sizeof (struct UserRecord))) { + printf ("Error reading userfile\n"); + error = 1; + break; + } + + if (index[nrindex[n]].l_UserNr != user.Usernr) { + printf ("Error: %d != %d (%s)\n",index[nrindex[n]].l_UserNr,user.Usernr,index[nrindex[n]].l_Name); + error = 1; + } + + if (user.Usernr != n) { + printf ("Error: %d != %d (%s)\n",n,user.Usernr,user.Name); + error = 1; + } + + if (strcmp (index[nrindex[n]].l_Name,user.Name)) { + printf ("Error: %s != %s\n",index[nrindex[n]].l_Name,user.Name); + error = 1; + } + } + Close (file); file = NULL; + + if ((!(file = Open (configfnane,MODE_OLDFILE))) || + (8 != Read (file,nrindex,8))) { + printf ("Error opening/reading config file\n"); + break; + } + + maxusernr += 1; + if ((users != nrindex[0]) || (maxusernr != nrindex[1])) { + printf ("Error in configfile\n"); + break; + } + + if (!error) + printf ("Everything seams to be ok with the index files\n"); + break; + } + + if (file) Close (file); + if (index) FreeVec (index); + if (nrindex) FreeVec (nrindex); + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); +} + +int getfilelen (char *name) +{ + int ret = 0; + BPTR lock; + struct FileInfoBlock *fib; + + if (fib = AllocDosObject (DOS_FIB,NULL)) { + if (lock = Lock (name,ACCESS_READ)) { + if (Examine (lock,fib)) + ret = fib->fib_Size; + UnLock (lock); + } + FreeDosObject (DOS_FIB,fib); + } + + return (ret); +} + +/******************************* +;result = comparestringsifull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +*******************************/ + +int comparestringsifull (unsigned char *string,unsigned char *string2, int length) +{ + unsigned char c,d; + + while (--length > 0) { + c = upchar (*(string++)); + d = upchar (*(string2++)); + + if (c == d) + continue; + + if (c > d) + return (1); + + if (c < d) + return (-1); + } + + return (0); +} + +unsigned char upchar (unsigned char c) +{ + if (c < 'a') + return (c); + + if (c <= 'z') + return ((unsigned char) (c - 32)); + + if (c < 0xe0) + return (c); + + return ((unsigned char) (c - 32)); +} diff --git a/c/ConfigNode.c b/c/ConfigNode.c new file mode 100644 index 0000000..a33c7c9 --- /dev/null +++ b/c/ConfigNode.c @@ -0,0 +1,1216 @@ +/*************************************************************************** +* ConfigNode 2.2 (24/09-93) +* +* Configures node config files +* +* 2.2: Fikset bug med dironly i load/save etter at man valgte en tmpdir/holddir +* +***************************************************************************/ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "ConfigNodegui.h" +#include "ConfigNodegui.c" + +int main(int argc, char **argv); +int Setup (void); +void Cleanup (void); +BOOL handleidcmp(void); +void handlemaxidcmp(void); +void handlebetidcmp(void); +void disable (int num,...); +void enable (int num,...); +void updatebetweengadgets(void); +void updatemaxtimegadgets(void); +void updatemaingadgets(void); +void updateghosting (int nodetypeval); +void converttocformat (char *dest,char *source); +void convertfromcformat (char *dest,char *source); + +char *vers = "\0$VER: ConfigNode 2.2 (29.1.94)\n\r"; /* day,month,year */ + +extern struct Window *ConfignodeWnd; +extern struct Menu *ConfignodeMenus; +extern struct Gadget *ConfignodeGadgets[37]; +extern struct Gadget *Max_loginGadgets[25]; +extern struct Gadget *Time_betweenGadgets[25]; +extern struct Window *Max_loginWnd; +extern struct Window *Time_betweenWnd; + +struct IntuitionBase *IntuitionBase = NULL; +struct GfxBase *GfxBase = NULL; +struct DiskfontBase *DiskfontBase = NULL; +struct Library *GadToolsBase = NULL; +struct Library *AslBase = NULL; + +struct FileRequester *freq = NULL; +struct FontRequester *fontreq = NULL; +struct IntuiMessage tmpmsg; +char screenok = 0; +char windowok = 0; +char between = 0; +char maxtime = 0; +int waitsigs = 0; + +int comport = 0; + +struct NodeRecord noderecord = { + 0,1,30,NodeSetupF_UseABBScreen,300,SETUPF_RTSCTS|SETUPF_Lockedbaud,38400,"serial.device", + "ATZ","ATA","ATH1","ATH0","ATDT","RING","CONNECT","OK","AT","NO CARRIER",0, + 60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + "","ABBS:Hold/node1","T:Node1tmpdir","topaz.font",8, + 0,11,244,640,0,11},noderecordback; + +struct EasyStruct aboutereq = { + sizeof (struct EasyStruct),0, + "ConfigNode Info", + "Confignode v2.2.\nDesign by Andreas Dobloug.\nProgrammed by Geir Inge Høsteng.\n(c) 1993", + "I know" +},quitreq = { + sizeof (struct EasyStruct),0, + "Want to quit ?", + "Config not saved.\nSure you want to quit ?", + "Yes|No" +},loadreq = { + sizeof (struct EasyStruct),0, + "Want to Load ?", + "Config not saved.\nSure you want to load ?", + "Yes|No" +},saveerrorreq = { + sizeof (struct EasyStruct),0, + "Save Error!", + "Error saving config!", + "I know" +},loaderrorreq = { + sizeof (struct EasyStruct),0, + "Load Error!", + "Error loading config!", + "I know" +}; + +#define TEMPLATE "FILE" +#define OPT_COUNT 1 + +int main(int argc, char **argv) +{ + int quit = 0; + int gotsigs,tmpval; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0}; + BPTR file; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + waitsigs = ((1L << ConfignodeWnd->UserPort->mp_SigBit) | SIGBREAKF_CTRL_C); + + if (result[0]) { + memcpy (&noderecordback,&noderecord,sizeof (struct NodeRecord)); + if (file = Open ((char *) result[0],MODE_OLDFILE)) { + tmpval = Read (file,&noderecord,sizeof (struct NodeRecord)); + if (sizeof (struct NodeRecord) != tmpval) { + EasyRequestArgs(ConfignodeWnd,&loaderrorreq,NULL,NULL); + if (tmpval != 272) /* 272 er gammel size, skal være kompatibel.. */ + memcpy (&noderecord,&noderecordback,sizeof (struct NodeRecord)); + else { + noderecord.NodeRecord_pad = 0; + noderecord.NodeSetup &= NodeSetupF_TinyMode; + noderecord.MinBaud = 0; + } + } else + memcpy (&noderecordback,&noderecord,sizeof (struct NodeRecord)); + Close (file); + + comport = (noderecord.CommsPort ? noderecord.CommsPort - 1 : 0); + } + } + + updatemaingadgets(); + memcpy (&noderecordback,&noderecord,sizeof (struct NodeRecord)); + + while (!quit) { + gotsigs = Wait (waitsigs); + + quit = (!(handleidcmp())); + + handlemaxidcmp(); + handlebetidcmp(); + + if (gotsigs & SIGBREAKF_CTRL_C) + quit = 1; + } + + Cleanup(); + } + + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); +} + +void disable (int num,...) +{ + va_list ap; + struct Gadget *gad; + + va_start(ap,num); + + for ( ; num; num--) { + gad = va_arg (ap,struct Gadget *); + GT_SetGadgetAttrs (gad,ConfignodeWnd,NULL,GA_Disabled,TRUE,TAG_END); + } +} + +void enable (int num,...) +{ + va_list ap; + struct Gadget *gad; + + va_start(ap,num); + + for ( ; num; num--) { + gad = va_arg (ap,struct Gadget *); + GT_SetGadgetAttrs (gad,ConfignodeWnd,NULL,GA_Disabled,FALSE,TAG_END); + } +} + +void handlemaxidcmp(void) +{ + struct IntuiMessage *m; + int nr; + UBYTE index[24] = {19,20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}; + + if (!Max_loginWnd) + return; + + while (m = GT_GetIMsg (Max_loginWnd->UserPort)) { + CopyMem ((char *) m, (char *) &tmpmsg, (long) sizeof(struct IntuiMessage)); + GT_ReplyIMsg(m); + + switch (tmpmsg.Class) { + case IDCMP_REFRESHWINDOW: + GT_BeginRefresh (Max_loginWnd); + Max_loginRender(); + GT_EndRefresh (Max_loginWnd,TRUE); + break; + + case IDCMP_CLOSEWINDOW: + waitsigs &= ~(1L << Max_loginWnd->UserPort->mp_SigBit); + CloseMax_loginWindow (); + maxtime = 0; + break; + + case IDCMP_GADGETUP: + switch (nr = ((struct Gadget *) tmpmsg.IAddress)->GadgetID) { + case GD_Max_time_read_gadgets: + waitsigs &= ~(1L << Max_loginWnd->UserPort->mp_SigBit); + CloseMax_loginWindow (); + maxtime = 0; + break; + + default: + noderecord.HourMaxTime[index[nr]] = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.HourMaxTime[index[nr]] > 60) { + DisplayBeep (NULL); + noderecord.HourMaxTime[index[nr]] = 60; + GT_SetGadgetAttrs ((struct Gadget *) tmpmsg.IAddress, + Max_loginWnd,NULL,GTIN_Number,60,TAG_END); + } + break; + + } + break; + } + if (!Max_loginWnd) + break; + } + + return; +} + +void handlebetidcmp(void) +{ + struct IntuiMessage *m; + int nr; + UBYTE index[24] = {19,20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}; + + if (!Time_betweenWnd) + return; + + while (m = GT_GetIMsg (Time_betweenWnd->UserPort)) { + + CopyMem ((char *) m, (char *) &tmpmsg, (long) sizeof(struct IntuiMessage)); + GT_ReplyIMsg(m); + + switch (tmpmsg.Class) { + case IDCMP_REFRESHWINDOW: + GT_BeginRefresh (Time_betweenWnd); + Time_betweenRender(); + GT_EndRefresh (Time_betweenWnd,TRUE); + break; + + case IDCMP_CLOSEWINDOW: + waitsigs &= ~(1L << Time_betweenWnd->UserPort->mp_SigBit); + CloseTime_betweenWindow(); + between = 0; + break; + + case IDCMP_GADGETUP: + switch (nr = ((struct Gadget *) tmpmsg.IAddress)->GadgetID) { + case GDX_Max_time_read_gadgets: + waitsigs &= ~(1L << Time_betweenWnd->UserPort->mp_SigBit); + CloseTime_betweenWindow(); + between = 0; + break; + + default: + noderecord.HourMinWait[index[nr]] = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.HourMinWait[index[nr]] > 60) { + DisplayBeep (NULL); + noderecord.HourMinWait[index[nr]] = 60; + GT_SetGadgetAttrs ((struct Gadget *) tmpmsg.IAddress, + Time_betweenWnd,NULL,GTIN_Number,60,TAG_END); + } + break; + } + break; + } + if (!Time_betweenWnd) + break; + } + + return; +} + +BOOL handleidcmp(void) +{ + struct IntuiMessage *m; + struct MenuItem *n; + BOOL running = TRUE; + UWORD code; + struct Gadget *gad; + BPTR file; + char string[256],c; + int tmpval; + + while (m = GT_GetIMsg (ConfignodeWnd->UserPort)) { + + CopyMem ((char *) m, (char *) &tmpmsg, (long) sizeof(struct IntuiMessage)); + GT_ReplyIMsg(m); + + switch (tmpmsg.Class) { + case IDCMP_REFRESHWINDOW: + GT_BeginRefresh (ConfignodeWnd); + ConfignodeRender(); + GT_EndRefresh (ConfignodeWnd,TRUE); + break; + + case IDCMP_CLOSEWINDOW: + running = FALSE; + break; + + case IDCMP_GADGETUP: + switch (((struct Gadget *) tmpmsg.IAddress)->GadgetID) { + case GD_get_font: + if (AslRequestTags (fontreq,ASLFO_TitleText,"Node font", + ASLFO_FixedWidthOnly,TRUE,ASLFR_Window,ConfignodeWnd, + ASLFR_SleepWindow,TRUE,TAG_DONE)) { + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_font_name], + ConfignodeWnd,NULL,GTTX_Text,fontreq->fo_Attr.ta_Name,TAG_END); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_font_size], + ConfignodeWnd,NULL,GTNM_Number,fontreq->fo_Attr.ta_YSize,TAG_END); + + strncpy (noderecord.Font,fontreq->fo_Attr.ta_Name,Sizeof_NameT); + noderecord.FontSize = fontreq->fo_Attr.ta_YSize; + } + break; + + case GD_Holdpath: + strncpy (noderecord.HoldPath,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + Sizeof_NameT); + break; + + case GD_get_hold_path: + gad = (struct Gadget *) ConfignodeGadgets[GD_Holdpath]; + if (AslRequestTags (freq,ASLFR_TitleText,"Choose hold dir", + ASLFR_DrawersOnly,TRUE,ASLFR_RejectIcons,TRUE, + ASLFR_InitialDrawer,((struct StringInfo *)gad->SpecialInfo)->Buffer, + ASLFR_Window,ConfignodeWnd,ASLFR_SleepWindow,TRUE,TAG_DONE)) { + + if (freq->fr_Drawer[strlen(freq->fr_Drawer)-1] == '/') + freq->fr_Drawer[strlen(freq->fr_Drawer)-1] = '\0'; + + GT_SetGadgetAttrs (gad,ConfignodeWnd,NULL,GTST_String,freq->fr_Drawer,TAG_END); + strncpy (noderecord.HoldPath,freq->fr_Drawer,Sizeof_NameT); + } + break; + + case GD_tmppath: + strncpy (noderecord.TmpPath,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + Sizeof_NameT); + break; + + case GD_get_tmpdir_path: + gad = (struct Gadget *) ConfignodeGadgets[GD_tmppath]; + if (AslRequestTags (freq,ASLFR_TitleText,"Choose tmp dir", + ASLFR_DrawersOnly,TRUE,ASLFR_RejectIcons,TRUE, + ASLFR_InitialDrawer,((struct StringInfo *)gad->SpecialInfo)->Buffer, + ASLFR_Window,ConfignodeWnd,ASLFR_SleepWindow,TRUE,TAG_DONE)) { + + if (freq->fr_Drawer[strlen(freq->fr_Drawer)-1] == '/') + freq->fr_Drawer[strlen(freq->fr_Drawer)-1] = '\0'; + + GT_SetGadgetAttrs (gad,ConfignodeWnd,NULL,GTST_String,freq->fr_Drawer,TAG_END); + strncpy (noderecord.TmpPath,freq->fr_Drawer,Sizeof_NameT); + } + break; + + case GD_Nodetype: + updateghosting (m->Code); + switch (m->Code) { + case 0: /* Serial */ + noderecord.CommsPort = comport + 1; + noderecord.Setup &= ~(SETUPF_Lockedbaud|SETUPF_NullModem); + break; + + case 1: /* local */ + noderecord.CommsPort = 0; + noderecord.Setup &= ~SETUPF_Lockedbaud; + break; + + case 2: /* NullModem */ + noderecord.CommsPort = comport + 1; + noderecord.Setup |= SETUPF_Lockedbaud | SETUPF_NullModem; + break; + } + break; + + case GD_screenmode: + switch (m->Code) { + case 2: + enable (1,ConfignodeGadgets[GDX_publicscren]); + noderecord.NodeSetup &= ~NodeSetupF_UseABBScreen; + break; + + default: + disable (1,ConfignodeGadgets[GDX_publicscren]); + if (m->Code == 1) + noderecord.NodeSetup |= NodeSetupF_UseABBScreen; + else { + *noderecord.PublicScreenName = 0; + noderecord.NodeSetup &= ~NodeSetupF_UseABBScreen; + } + break; + } + break; + + case GD_node_type: + switch (m->Code) { + case 0: /* Backdrop */ + disable (4, + ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y], + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + noderecord.NodeSetup &= ~NodeSetupF_TinyMode; + noderecord.NodeSetup |= NodeSetupF_BackDrop; + break; + + case 1: /* Tiny */ + enable (2, + ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y]); + disable (2, + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Window_x],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_tiny_x,TAG_END); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_y],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_tiny_y,TAG_END); + noderecord.NodeSetup &= ~NodeSetupF_BackDrop; + noderecord.NodeSetup |= NodeSetupF_TinyMode; + break; + + case 2: /* Normal */ + enable (4, + ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y], + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Window_x],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_x,TAG_END); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_y],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_y,TAG_END); + + noderecord.NodeSetup &= + ~(NodeSetupF_TinyMode|NodeSetupF_BackDrop); + + break; + } + break; + + case GD_Min_between_login: + if (Time_betweenWnd) + break; + if (!(OpenTime_betweenWindow())) { + Time_betweenRender(); + updatebetweengadgets(); + waitsigs |= (1L << Time_betweenWnd->UserPort->mp_SigBit); + between = 1; + } + break; + + case GD_Max_login_time: + if (Max_loginWnd) + break; + if (!(OpenMax_loginWindow())) { + Max_loginRender(); + updatemaxtimegadgets(); + waitsigs |= (1L << Max_loginWnd->UserPort->mp_SigBit); + maxtime = 1; + } + break; + + case GD_Modem_Init: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemStrT)); + convertfromcformat (noderecord.ModemInitString,string); + break; + + case GD_Modem_on_hook: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemOnHookString,string); + break; + + case GD_Modem_off_hook: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemOffHookString,string); + break; + + case GD_Modem_answer: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemAnswerString,string); + break; + + case GD_Modem_dial: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemCallString,string); + break; + + case GD_Modem_ring: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemRingString,string); + break; + + case GD_Modem_connect: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemConnectString,string); + break; + + case GD_Modem_no_carrier: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemNoCarrierString,string); + break; + + case GD_Modem_at_string: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemATString,string); + break; + + case GD_modem_ok_string: + strncpy (string,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemSStrT)); + convertfromcformat (noderecord.ModemOKString,string); + break; + + case GD_Connect_wait: + noderecord.ConnectWait = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.ConnectWait < 10) { + DisplayBeep (NULL); + noderecord.ConnectWait = 10; + GT_SetGadgetAttrs ((struct Gadget *) tmpmsg.IAddress, + ConfignodeWnd,NULL,GTIN_Number,10,TAG_END); + } + break; + + case GD_Minimum_baud: + noderecord.MinBaud = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.MinBaud < 300) { + DisplayBeep (NULL); + noderecord.MinBaud = 300; + GT_SetGadgetAttrs ((struct Gadget *) tmpmsg.IAddress, + ConfignodeWnd,NULL,GTIN_Number,300,TAG_END); + } + break; + + case GD_Modem_machine_baud: + noderecord.NodeBaud = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.NodeBaud < 300) { + DisplayBeep (NULL); + noderecord.NodeBaud = 300; + GT_SetGadgetAttrs ((struct Gadget *) tmpmsg.IAddress, + ConfignodeWnd,NULL,GTIN_Number,300,TAG_END); + } + break; + + case GD_Comm_port_name: + strncpy (noderecord.Serialdevicename,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (ModemStrT)); + break; + + case GD_Comm_port: + comport = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + noderecord.CommsPort = comport + 1; + break; + + case GD_CTS_RTS: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + noderecord.Setup |= SETUPF_RTSCTS; + else + noderecord.Setup &= ~SETUPF_RTSCTS; + break; + + case GD_NoSleep: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + noderecord.Setup |= SETUPF_NoSleepTime; + else + noderecord.Setup &= ~SETUPF_NoSleepTime; + break; + + case GD_Locked_baud_rate: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + noderecord.Setup |= SETUPF_Lockedbaud; + else + noderecord.Setup &= ~SETUPF_Lockedbaud; + break; + + case GD_Open_at_Startup: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + noderecord.NodeSetup &= ~NodeSetupF_DontShow; + else + noderecord.NodeSetup |= NodeSetupF_DontShow; + break; + + case GD_Hangup_mode: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + noderecord.Setup |= SETUPF_SimpelHangup; + else + noderecord.Setup &= ~SETUPF_SimpelHangup; + break; + + case GD_publicscren: + strncpy (noderecord.PublicScreenName,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_Window_x: + tmpval = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.NodeSetup & NodeSetupF_TinyMode) + noderecord.win_tiny_x = tmpval; + else + noderecord.win_big_x = tmpval; + break; + + case GD_Window_y: + tmpval = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + if (noderecord.NodeSetup & NodeSetupF_TinyMode) + noderecord.win_tiny_y = tmpval; + else + noderecord.win_big_y = tmpval; + break; + + case GD_Window_height: + noderecord.win_big_height = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_Window_width: + noderecord.win_big_width = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + } + break; + + case IDCMP_MENUPICK: + code = tmpmsg.Code; + while (code != MENUNULL) { + switch (MENUNUM(code)) { + case 0: + switch (ITEMNUM(code)) { + case 0: /* About */ + EasyRequestArgs(ConfignodeWnd,&aboutereq,NULL,NULL); + break; + + case 2: /* Open */ + if (memcmp (&noderecordback,&noderecord,sizeof (struct NodeRecord))) + if (1 != EasyRequestArgs(ConfignodeWnd,&loadreq,NULL,NULL)) + break; + + if (AslRequestTags (freq,ASLFR_TitleText,"Load Config", + ASLFR_DrawersOnly,FALSE, + ASLFR_InitialDrawer,"ABBS:config/", + ASLFR_InitialPattern,"#?.config", + ASLFR_RejectIcons,TRUE,ASLFR_Window,ConfignodeWnd, + ASLFR_SleepWindow,TRUE,TAG_DONE)) { + + c = freq->fr_Drawer[strlen(freq->fr_Drawer)-1]; + if (c == ':' || c == '/') + sprintf (string,"%s%s",freq->fr_Drawer,freq->fr_File); + else + sprintf (string,"%s/%s",freq->fr_Drawer,freq->fr_File); + if (file = Open (string,MODE_OLDFILE)) { + + tmpval = Read (file,&noderecord,sizeof (struct NodeRecord)); + if (sizeof (struct NodeRecord) != tmpval) { + EasyRequestArgs(ConfignodeWnd,&loaderrorreq,NULL,NULL); + if (tmpval != 272) /* 272 er gammel size, skal være kompatibel.. */ + memcpy (&noderecord,&noderecordback,sizeof (struct NodeRecord)); + else { + noderecord.NodeRecord_pad = 0; + noderecord.NodeSetup &= NodeSetupF_TinyMode; + noderecord.MinBaud = 0; + } + } else + memcpy (&noderecordback,&noderecord,sizeof (struct NodeRecord)); + Close (file); + + comport = (noderecord.CommsPort ? noderecord.CommsPort - 1 : 0); + updatemaingadgets(); + updatebetweengadgets(); + updatemaxtimegadgets(); + } + } + break; + + case 3: /* Save */ + if (AslRequestTags (freq,ASLFR_TitleText,"Save Config", + ASLFR_DrawersOnly,FALSE, + ASLFR_InitialDrawer,"ABBS:config/", + ASLFR_InitialPattern,"#?.config", + ASLFR_RejectIcons,TRUE,ASLFR_Window,ConfignodeWnd, + ASLFR_SleepWindow,TRUE,TAG_DONE)) { + + c = freq->fr_Drawer[strlen(freq->fr_Drawer)-1]; + if (c == ':' || c == '/') + sprintf (string,"%s%s",freq->fr_Drawer,freq->fr_File); + else + sprintf (string,"%s/%s",freq->fr_Drawer,freq->fr_File); + if (file = Open (string,MODE_NEWFILE)) { + if (sizeof (struct NodeRecord) != Write (file, + &noderecord,sizeof (struct NodeRecord))) + EasyRequestArgs(ConfignodeWnd,&saveerrorreq,NULL,NULL); + else + memcpy (&noderecordback,&noderecord,sizeof (struct NodeRecord)); + + Close (file); + } + } + break; + + case 5: /* Quit */ + if (memcmp (&noderecordback,&noderecord,sizeof (struct NodeRecord))) { + if (1 == EasyRequestArgs(ConfignodeWnd,&quitreq,NULL,NULL)) + running = FALSE; + } else + running = FALSE; + break; + } + break; + } + + n = ItemAddress(ConfignodeMenus,code); + code = n->NextSelect; + } + break; + } + } + + return (running); +} + +void updatemaingadgets(void) +{ + int n; + char string[80]; + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Holdpath],ConfignodeWnd, + NULL,GTST_String,noderecord.HoldPath,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_tmppath],ConfignodeWnd, + NULL,GTST_String,noderecord.TmpPath,TAG_END); + + converttocformat (string,noderecord.ModemInitString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_Init],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemOnHookString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_on_hook],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemOffHookString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_off_hook],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemAnswerString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_answer],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemCallString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_dial],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemRingString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_ring],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemConnectString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_connect],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemNoCarrierString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_no_carrier],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemATString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_at_string],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + converttocformat (string,noderecord.ModemOKString); + GT_SetGadgetAttrs (ConfignodeGadgets[GD_modem_ok_string],ConfignodeWnd, + NULL,GTST_String,string,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Comm_port_name],ConfignodeWnd, + NULL,GTST_String,noderecord.Serialdevicename,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_publicscren],ConfignodeWnd, + NULL,GTST_String,noderecord.PublicScreenName,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_font_name],ConfignodeWnd, + NULL,GTTX_Text,noderecord.Font,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_font_size],ConfignodeWnd, + NULL,GTNM_Number,noderecord.FontSize,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Comm_port],ConfignodeWnd, + NULL,GTIN_Number,(noderecord.CommsPort ? noderecord.CommsPort-1 : 0),TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Minimum_baud],ConfignodeWnd, + NULL,GTIN_Number,noderecord.MinBaud,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Connect_wait],ConfignodeWnd, + NULL,GTIN_Number,noderecord.ConnectWait,TAG_END); + + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Modem_machine_baud],ConfignodeWnd, + NULL,GTIN_Number,noderecord.NodeBaud,TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_height],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_height,TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_width],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_width,TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Locked_baud_rate],ConfignodeWnd, + NULL,GTCB_Checked,(noderecord.Setup & SETUPF_Lockedbaud ? TRUE : FALSE),TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Open_at_Startup],ConfignodeWnd, + NULL,GTCB_Checked,(noderecord.NodeSetup & NodeSetupF_DontShow ? FALSE : TRUE),TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_CTS_RTS],ConfignodeWnd, + NULL,GTCB_Checked,(noderecord.Setup & SETUPF_RTSCTS ? TRUE : FALSE),TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_NoSleep],ConfignodeWnd, + NULL,GTCB_Checked,(noderecord.Setup & SETUPF_NoSleepTime ? TRUE : FALSE),TAG_END); + + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Hangup_mode],ConfignodeWnd, + NULL,GTCB_Checked,(noderecord.Setup & SETUPF_SimpelHangup ? TRUE : FALSE),TAG_END); + + if (noderecord.Setup & SETUPF_NullModem) + n = 2; + else { + if (noderecord.CommsPort) + n = 0; + else + n = 1; + } + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Nodetype],ConfignodeWnd,NULL, + GTCY_Active,n,TAG_END); + updateghosting (n); + + if (noderecord.NodeSetup & NodeSetupF_UseABBScreen) + n = 1; + else if (!(*noderecord.PublicScreenName)) + n = 0; + else + n = 2; + + if (n == 2) + enable (1,ConfignodeGadgets[GDX_publicscren]); + else + disable (1,ConfignodeGadgets[GDX_publicscren]); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_screenmode],ConfignodeWnd,NULL, + GTCY_Active,n,TAG_END); + + if (noderecord.NodeSetup & NodeSetupF_TinyMode) + n = 1; + else if (noderecord.NodeSetup & NodeSetupF_BackDrop) + n = 0; + else + n = 2; + GT_SetGadgetAttrs(ConfignodeGadgets[GD_node_type],ConfignodeWnd,NULL, + GTCY_Active,n,TAG_END); + + switch (n) { + case 0: + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Window_x],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_x,TAG_END); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_y],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_y,TAG_END); + + disable (4,ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y], + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + break; + + case 1: + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Window_x],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_tiny_x,TAG_END); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_y],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_tiny_y,TAG_END); + + enable (2, + ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y]); + disable (2, + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + break; + + case 2: + GT_SetGadgetAttrs (ConfignodeGadgets[GD_Window_x],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_x,TAG_END); + GT_SetGadgetAttrs(ConfignodeGadgets[GD_Window_y],ConfignodeWnd, + NULL,GTIN_Number,noderecord.win_big_y,TAG_END); + + enable (4, + ConfignodeGadgets[GDX_Window_x], + ConfignodeGadgets[GDX_Window_y], + ConfignodeGadgets[GDX_Window_height], + ConfignodeGadgets[GDX_Window_width]); + break; + } +} + +void updateghosting (int nodetypeval) +{ + switch (nodetypeval) { + case 0: /* Serial */ + enable (20, + ConfignodeGadgets[GDX_Modem_Init], + ConfignodeGadgets[GDX_Modem_on_hook], + ConfignodeGadgets[GDX_Modem_off_hook], + ConfignodeGadgets[GDX_Modem_answer], + ConfignodeGadgets[GDX_Modem_dial], + ConfignodeGadgets[GDX_Modem_ring], + ConfignodeGadgets[GDX_Modem_connect], + ConfignodeGadgets[GDX_Modem_no_carrier], + ConfignodeGadgets[GDX_Modem_at_string], + ConfignodeGadgets[GDX_modem_ok_string], + ConfignodeGadgets[GDX_Minimum_baud], + ConfignodeGadgets[GDX_Connect_wait], + ConfignodeGadgets[GDX_Modem_machine_baud], + ConfignodeGadgets[GDX_Locked_baud_rate], + ConfignodeGadgets[GDX_CTS_RTS], + ConfignodeGadgets[GDX_NoSleep], + ConfignodeGadgets[GDX_Hangup_mode], + ConfignodeGadgets[GDX_Comm_port_name], + ConfignodeGadgets[GD_Min_between_login], + ConfignodeGadgets[GD_Max_login_time], + ConfignodeGadgets[GDX_Comm_port]); + noderecord.CommsPort = comport + 1; + break; + + case 1: /* local */ + disable (20, + ConfignodeGadgets[GDX_Modem_Init], + ConfignodeGadgets[GDX_Modem_on_hook], + ConfignodeGadgets[GDX_Modem_off_hook], + ConfignodeGadgets[GDX_Modem_answer], + ConfignodeGadgets[GDX_Modem_dial], + ConfignodeGadgets[GDX_Modem_ring], + ConfignodeGadgets[GDX_Modem_connect], + ConfignodeGadgets[GDX_Modem_no_carrier], + ConfignodeGadgets[GDX_Modem_at_string], + ConfignodeGadgets[GDX_modem_ok_string], + ConfignodeGadgets[GDX_Minimum_baud], + ConfignodeGadgets[GDX_Connect_wait], + ConfignodeGadgets[GDX_Modem_machine_baud], + ConfignodeGadgets[GDX_Locked_baud_rate], + ConfignodeGadgets[GDX_CTS_RTS], + ConfignodeGadgets[GDX_NoSleep], + ConfignodeGadgets[GDX_Hangup_mode], + ConfignodeGadgets[GDX_Comm_port_name], + ConfignodeGadgets[GD_Min_between_login], + ConfignodeGadgets[GD_Max_login_time], + ConfignodeGadgets[GDX_Comm_port]); + noderecord.CommsPort = 0; + break; + + case 2: /* NullModem */ + enable (6, + ConfignodeGadgets[GDX_Modem_machine_baud], + ConfignodeGadgets[GDX_Locked_baud_rate], + ConfignodeGadgets[GDX_CTS_RTS], + ConfignodeGadgets[GDX_Hangup_mode], + ConfignodeGadgets[GDX_Comm_port_name], + ConfignodeGadgets[GDX_Comm_port]); + + disable (14, + ConfignodeGadgets[GDX_Modem_Init], + ConfignodeGadgets[GDX_Modem_on_hook], + ConfignodeGadgets[GDX_Modem_off_hook], + ConfignodeGadgets[GDX_Modem_answer], + ConfignodeGadgets[GDX_Modem_dial], + ConfignodeGadgets[GDX_Modem_ring], + ConfignodeGadgets[GDX_Modem_connect], + ConfignodeGadgets[GDX_Modem_no_carrier], + ConfignodeGadgets[GDX_Modem_at_string], + ConfignodeGadgets[GDX_modem_ok_string], + ConfignodeGadgets[GDX_Minimum_baud], + ConfignodeGadgets[GDX_Connect_wait], + ConfignodeGadgets[GDX_NoSleep], + ConfignodeGadgets[GD_Min_between_login], + ConfignodeGadgets[GD_Max_login_time]); + noderecord.CommsPort = comport + 1; + break; + } +} + +void updatebetweengadgets(void) +{ + int n; + UBYTE deindex[24] = {GD_b1,GD_b2,GD_b3,GD_b4,GD_b5,GD_b6,GD_b7,GD_b8, + GD_b9,GD_b10,GD_b11,GD_b12,GD_b13,GD_b14,GD_b15,GD_b16,GD_b17,GD_b18, + GD_b19,GD_b20,GD_b21,GD_b22,GD_b23,GD_b24}; + + if (!Time_betweenWnd) + return; + + for (n = 0; n < 24; n++) + GT_SetGadgetAttrs (Time_betweenGadgets[deindex[n]],Time_betweenWnd, + NULL,GTIN_Number,noderecord.HourMinWait[n],TAG_END); +} + +void updatemaxtimegadgets(void) +{ + int n; + UBYTE deindex[24] = {GD_m1,GD_m2,GD_m3,GD_m4,GD_m5,GD_m6,GD_m7,GD_m8, + GD_m9,GD_m10,GD_m11,GD_m12,GD_m13,GD_m14,GD_m15,GD_m16,GD_m17,GD_m18, + GD_m19,GD_m20,GD_m21,GD_m22,GD_m23,GD_m24}; + + if (!Max_loginWnd) + return; + + for (n = 0; n < 24; n++) + GT_SetGadgetAttrs (Max_loginGadgets[deindex[n]],Max_loginWnd, + NULL,GTIN_Number,noderecord.HourMaxTime[n],TAG_END); +} + +void converttocformat (char *dest,char *source) +{ + char c; + + while (c = *(source++)) + switch (c) { + case '\n': + *(dest++) = '\\'; + *(dest++) = 'n'; + break; + + case '\r': + *(dest++) = '\\'; + *(dest++) = 'r'; + break; + + default: + *(dest++) = c; + break; + } + *dest = '\0'; +} + +void convertfromcformat (char *dest,char *source) +{ + char c; + + while (c = *(source++)) { + if (c == '\\') { + if (c = *(source++)) { + switch (c) { + case '\\': + *(dest++) = c; + break; + + case 'r': + case 'R': + *(dest++) = '\r'; + break; + + case 'n': + case 'N': + *(dest++) = '\n'; + break; + + default: + *(dest++) = '\\'; + *(dest++) = c; + break; + } + } else { + *(dest++) = '\\'; + break; + } + } else + *(dest++) = c; + } + *dest = '\0'; +} + +int Setup (void) +{ + int ret = 0; + + if (IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library",37)) + { + if (GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",36L)) + { + if (DiskfontBase = (struct DiskfontBase *) OpenLibrary ("diskfont.library",0L)) + { + if (GadToolsBase = OpenLibrary("gadtools.library",37)) + { + if (AslBase = OpenLibrary("asl.library",37)) + { + if (freq = AllocAslRequest (ASL_FileRequest,NULL)) + { + if (fontreq = AllocAslRequest (ASL_FontRequest,NULL)) + { + if (!(SetupScreen())) + { + screenok = 1; + if (!(OpenConfignodeWindow())) + { + windowok = 1; + ret = 1; + } + else + { + CloseConfignodeWindow(); + printf ("Error opening window\n"); + } + } + else + printf ("No screen\n"); + } + else + printf ("No asl font req\n"); + } + else + printf ("No asl file req\n"); + } + else + printf ("No asl lib\n"); + } + else + printf ("No gadtools lib\n"); + } + else + printf ("No diskfont lib\n"); + } + else + printf ("No gfx lib\n"); + } + else + printf ("No intuition lib\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (maxtime) CloseMax_loginWindow(); + if (between) CloseTime_betweenWindow(); + if (windowok) CloseConfignodeWindow(); + if (screenok) CloseDownScreen(); + if (fontreq) FreeAslRequest(fontreq); + if (freq) FreeAslRequest(freq); + if (AslBase) CloseLibrary (AslBase); + if (GadToolsBase) CloseLibrary (GadToolsBase); + if (DiskfontBase) CloseLibrary((struct Library *) DiskfontBase); + if (GfxBase) CloseLibrary((struct Library *) GfxBase); + if (IntuitionBase) CloseLibrary ((struct Library *) IntuitionBase); +} diff --git a/c/ConfigNode.info b/c/ConfigNode.info new file mode 100644 index 0000000000000000000000000000000000000000..4c1105ca3b8dee8314c1635e7d7cf741881aa6f5 GIT binary patch literal 835 zcmZ{hze@sP7{{OM^h^k~qaPX~O1J0WP%Q-wc?BXwyDm)*QsEMKZ`2Yw=uQ0rjSl)B z+*I^m94XF1OM!4bKTdS07xnwTpZCji`f-#34QL(07L;Hc4A4P~nR^g3i)Fr9{?PQD zSo90MkY+%lk*MF0psGId=|d;q_{8X1hl5W5%}QR7QPg`x^~31^YCGHe=PSH zdGb^E(WCG-Hj$SDcb)se_?r99!I=BGg!E4zOy<2wgn3~Wm-!u;)9cIpLSOoJKjgQ< zcU!_wS~N$&(h8k#4#fHVH_SVj=$!s9a!%RINqTpj+WklpuENa9y?U3d4?Wx{Am@}u zMoIDm@r=%yqw_x#of9Y5%Sm*;Qed+4E?Dfm2sS&fB2W6bM^4U(x3iXuyd1m;4}9Uy zK65*lh;yHuQ@=M6UYJSWM(51YIn5{M{9JU-9Gw#<=fuf*5gZmfr7s*kyR4kkCh`lE Cg0|HF literal 0 HcmV?d00001 diff --git a/c/ConfigNodeGui.c b/c/ConfigNodeGui.c new file mode 100644 index 0000000..19efc1b --- /dev/null +++ b/c/ConfigNodeGui.c @@ -0,0 +1,851 @@ +/* + * Source machine generated by GadToolsBox V2.0b + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Andreas Dobloug + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ConfigNodegui.h" + +static struct Screen *Scr = NULL; +static UBYTE *PubScreenName = "Workbench"; +static APTR VisualInfo = NULL; +struct Window *ConfignodeWnd = NULL; +struct Window *Max_loginWnd = NULL; +struct Window *Time_betweenWnd = NULL; +static struct Gadget *ConfignodeGList = NULL; +static struct Gadget *Max_loginGList = NULL; +static struct Gadget *Time_betweenGList = NULL; +struct Menu *ConfignodeMenus = NULL; +struct Gadget *ConfignodeGadgets[37]; +struct Gadget *Max_loginGadgets[25]; +struct Gadget *Time_betweenGadgets[25]; +//extern Class *initGet( void ); +static struct IClass *getClass = NULL; +static struct _Object *getImage = NULL; +static UWORD ConfignodeLeft = 0; +static UWORD ConfignodeTop = 11; +static UWORD ConfignodeWidth = 571; +static UWORD ConfignodeHeight = 215; +static UWORD Max_loginLeft = 100; +static UWORD Max_loginTop = 72; +static UWORD Max_loginWidth = 438; +static UWORD Max_loginHeight = 56; +static UWORD Time_betweenLeft = 72; +static UWORD Time_betweenTop = 56; +static UWORD Time_betweenWidth = 438; +static UWORD Time_betweenHeight = 56; +static UBYTE *ConfignodeWdt = (UBYTE *)"Confignode 2"; +static UBYTE *Max_loginWdt = (UBYTE *)"Maximum logintime during this hour"; +static UBYTE *Time_betweenWdt = (UBYTE *)"Min time between logins during this hour"; +static struct TextAttr *Font, Attr; +static UWORD FontX, FontY; +static UWORD OffX, OffY; + +static UBYTE *Nodetype0Labels[] = { + (UBYTE *)"Serial node", + (UBYTE *)"Local node", + (UBYTE *)"Null modem node", + NULL }; + +static UBYTE *screenmode0Labels[] = { + (UBYTE *)"Default PublicScreen", + (UBYTE *)"ABBS Screen", + (UBYTE *)"Public screen", + NULL }; + +static UBYTE *node_type0Labels[] = { + (UBYTE *)"Backdrop", + (UBYTE *)"Tiny", + (UBYTE *)"Fullsize", + NULL }; + +static struct IntuiText Max_loginIText[] = { + 1, 0, JAM1,103, 8, NULL, (UBYTE *)"1", NULL, + 1, 0, JAM1,140, 8, NULL, (UBYTE *)"2", NULL, + 1, 0, JAM1,178, 8, NULL, (UBYTE *)"3", NULL, + 1, 0, JAM1,215, 8, NULL, (UBYTE *)"4", NULL, + 1, 0, JAM1,252, 8, NULL, (UBYTE *)"5", NULL, + 1, 0, JAM1,290, 8, NULL, (UBYTE *)"6", NULL, + 1, 0, JAM1,327, 8, NULL, (UBYTE *)"7", NULL, + 1, 0, JAM1,366, 8, NULL, (UBYTE *)"8", NULL, + 1, 0, JAM1,403, 8, NULL, (UBYTE *)"9", NULL, + 1, 0, JAM1,20, 19, NULL, (UBYTE *)"0", NULL, + 1, 0, JAM1,20, 31, NULL, (UBYTE *)"1", NULL, + 1, 0, JAM1,19, 44, NULL, (UBYTE *)"2", NULL, + 1, 0, JAM1,64, 8, NULL, (UBYTE *)"0", NULL }; + +#define Max_login_TNUM 13 + +static struct IntuiText Time_betweenIText[] = { + 1, 0, JAM1,103, 8, NULL, (UBYTE *)"1", NULL, + 1, 0, JAM1,140, 8, NULL, (UBYTE *)"2", NULL, + 1, 0, JAM1,178, 8, NULL, (UBYTE *)"3", NULL, + 1, 0, JAM1,215, 8, NULL, (UBYTE *)"4", NULL, + 1, 0, JAM1,252, 8, NULL, (UBYTE *)"5", NULL, + 1, 0, JAM1,290, 8, NULL, (UBYTE *)"6", NULL, + 1, 0, JAM1,327, 8, NULL, (UBYTE *)"7", NULL, + 1, 0, JAM1,366, 8, NULL, (UBYTE *)"8", NULL, + 1, 0, JAM1,403, 8, NULL, (UBYTE *)"9", NULL, + 1, 0, JAM1,20, 19, NULL, (UBYTE *)"0", NULL, + 1, 0, JAM1,20, 31, NULL, (UBYTE *)"1", NULL, + 1, 0, JAM1,19, 44, NULL, (UBYTE *)"2", NULL, + 1, 0, JAM1,64, 8, NULL, (UBYTE *)"0", NULL }; + +#define Time_between_TNUM 13 + +static struct NewMenu ConfignodeNewMenu[] = { + NM_TITLE, (STRPTR)"Project", NULL, 0, NULL, NULL, + NM_ITEM, (STRPTR)"About", (STRPTR)"A", 0, 0L, NULL, + NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL, + NM_ITEM, (STRPTR)"Open Config", (STRPTR)"O", 0, 0L, NULL, + NM_ITEM, (STRPTR)"Save Config", (STRPTR)"S", 0, 0L, NULL, + NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL, + NM_ITEM, (STRPTR)"Quit", (STRPTR)"Q", 0, 0L, NULL, + NM_END, NULL, NULL, 0, 0L, NULL }; + +static UWORD ConfignodeGTypes[] = { + CYCLE_KIND, + BUTTON_KIND, + BUTTON_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CYCLE_KIND, + CYCLE_KIND, + GENERIC_KIND, + TEXT_KIND, + GENERIC_KIND, + GENERIC_KIND, + NUMBER_KIND, + STRING_KIND, + STRING_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + STRING_KIND, + STRING_KIND, + CHECKBOX_KIND +}; + +static UWORD Max_loginGTypes[] = { + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + BUTTON_KIND +}; + +static UWORD Time_betweenGTypes[] = { + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + BUTTON_KIND +}; + +static struct NewGadget ConfignodeNGad[] = { + 294, 87, 147, 12, NULL, NULL, GD_Nodetype, 0, NULL, NULL, + 14, 198, 259, 11, (UBYTE *)"Set Min Time Between two logins", NULL, GD_Min_between_login, PLACETEXT_IN, NULL, NULL, + 293, 198, 265, 11, (UBYTE *)"Set Max Login Time", NULL, GD_Max_login_time, PLACETEXT_IN, NULL, NULL, + 534, 125, 26, 11, (UBYTE *)"Locked Baud Rate", NULL, GD_Locked_baud_rate, PLACETEXT_LEFT, NULL, NULL, + 370, 125, 26, 11, (UBYTE *)"CTS/RTS", NULL, GD_CTS_RTS, PLACETEXT_LEFT, NULL, NULL, + 534, 139, 26, 11, (UBYTE *)"+++ Hangup", NULL, GD_Hangup_mode, PLACETEXT_LEFT, NULL, NULL, + 250, 176, 26, 11, (UBYTE *)"Open at startup", NULL, GD_Open_at_Startup, PLACETEXT_LEFT, NULL, NULL, + 14, 161, 262, 12, NULL, NULL, GD_screenmode, 0, NULL, NULL, + 14, 176, 97, 12, NULL, NULL, GD_node_type, 0, NULL, NULL, + 538, 175, 20, 14, NULL, NULL, GD_get_font, 0, NULL, NULL, + 331, 176, 133, 12, (UBYTE *)"Font", NULL, GD_font_name, PLACETEXT_LEFT, NULL, NULL, + 256, 87, 20, 14, NULL, NULL, GD_get_hold_path, 0, NULL, NULL, + 256, 101, 20, 14, NULL, NULL, GD_get_tmpdir_path, 0, NULL, NULL, + 510, 176, 25, 12, (UBYTE *)"Size", NULL, GD_font_size, PLACETEXT_LEFT, NULL, NULL, + 108, 88, 147, 12, (UBYTE *)"Hold Path", NULL, GD_Holdpath, PLACETEXT_LEFT, NULL, NULL, + 108, 102, 147, 12, (UBYTE *)"Tmpdir Path", NULL, GD_tmppath, PLACETEXT_LEFT, NULL, NULL, + 114, 125, 52, 12, (UBYTE *)"Window x-pos", NULL, GD_Window_x, PLACETEXT_LEFT, NULL, NULL, + 114, 139, 52, 12, (UBYTE *)"Window y-pos", NULL, GD_Window_y, PLACETEXT_LEFT, NULL, NULL, + 224, 125, 52, 12, (UBYTE *)"Height", NULL, GD_Window_height, PLACETEXT_LEFT, NULL, NULL, + 224, 139, 52, 12, (UBYTE *)"Width", NULL, GD_Window_width, PLACETEXT_LEFT, NULL, NULL, + 149, 6, 119, 12, (UBYTE *)"Modem Init", NULL, GD_Modem_Init, PLACETEXT_LEFT, NULL, NULL, + 149, 18, 119, 12, (UBYTE *)"Modem On Hook", NULL, GD_Modem_on_hook, PLACETEXT_LEFT, NULL, NULL, + 149, 30, 119, 12, (UBYTE *)"Modem Off Hook", NULL, GD_Modem_off_hook, PLACETEXT_LEFT, NULL, NULL, + 149, 42, 119, 12, (UBYTE *)"Modem Answer", NULL, GD_Modem_answer, PLACETEXT_LEFT, NULL, NULL, + 149, 54, 119, 12, (UBYTE *)"Modem Dial", NULL, GD_Modem_dial, PLACETEXT_LEFT, NULL, NULL, + 149, 66, 119, 12, (UBYTE *)"Modem Ring", NULL, GD_Modem_ring, PLACETEXT_LEFT, NULL, NULL, + 454, 6, 104, 12, (UBYTE *)"Modem Connect", NULL, GD_Modem_connect, PLACETEXT_LEFT, NULL, NULL, + 454, 18, 104, 12, (UBYTE *)"Modem No Carrier", NULL, GD_Modem_no_carrier, PLACETEXT_LEFT, NULL, NULL, + 454, 30, 104, 12, (UBYTE *)"Modem AT String", NULL, GD_Modem_at_string, PLACETEXT_LEFT, NULL, NULL, + 454, 42, 104, 12, (UBYTE *)"Modem OK String", NULL, GD_modem_ok_string, PLACETEXT_LEFT, NULL, NULL, + 358, 54, 68, 12, (UBYTE *)"Min Baud", NULL, GD_Minimum_baud, PLACETEXT_LEFT, NULL, NULL, + 427, 54, 36, 12, (UBYTE *)"Connect Wait", NULL, GD_Connect_wait, PLACETEXT_RIGHT, NULL, NULL, + 454, 66, 104, 12, (UBYTE *)"Modem-machine baud", NULL, GD_Modem_machine_baud, PLACETEXT_LEFT, NULL, NULL, + 523, 87, 36, 12, (UBYTE *)"Comm Port", NULL, GD_Comm_port, PLACETEXT_LEFT, NULL, NULL, + 424, 102, 135, 12, (UBYTE *)"Comm port name", NULL, GD_Comm_port_name, PLACETEXT_LEFT, NULL, NULL, + 292, 161, 266, 12, NULL, NULL, GD_publicscren, 0, NULL, NULL, + 370, 140, 26, 11, (UBYTE *)"No Sleep", NULL, GD_NoSleep, PLACETEXT_LEFT, NULL, NULL +}; + +static struct NewGadget Max_loginNGad[] = { + 46, 38, 37, 12, NULL, NULL, GD_m20, 0, NULL, NULL, + 84, 38, 37, 12, NULL, NULL, GD_m21, 0, NULL, NULL, + 122, 38, 37, 12, NULL, NULL, GD_m22, 0, NULL, NULL, + 160, 38, 37, 12, NULL, NULL, GD_m23, 0, NULL, NULL, + 198, 38, 37, 12, NULL, NULL, GD_m24, 0, NULL, NULL, + 84, 14, 37, 12, NULL, NULL, GD_m1, 0, NULL, NULL, + 122, 14, 37, 12, NULL, NULL, GD_m2, 0, NULL, NULL, + 160, 14, 37, 12, NULL, NULL, GD_m3, 0, NULL, NULL, + 198, 14, 37, 12, NULL, NULL, GD_m4, 0, NULL, NULL, + 236, 14, 37, 12, NULL, NULL, GD_m5, 0, NULL, NULL, + 274, 14, 37, 12, NULL, NULL, GD_m6, 0, NULL, NULL, + 312, 14, 37, 12, NULL, NULL, GD_m7, 0, NULL, NULL, + 350, 14, 37, 12, NULL, NULL, GD_m8, 0, NULL, NULL, + 388, 14, 37, 12, NULL, NULL, GD_m9, 0, NULL, NULL, + 46, 26, 37, 12, NULL, NULL, GD_m10, 0, NULL, NULL, + 84, 26, 37, 12, NULL, NULL, GD_m11, 0, NULL, NULL, + 122, 26, 37, 12, NULL, NULL, GD_m12, 0, NULL, NULL, + 160, 26, 37, 12, NULL, NULL, GD_m13, 0, NULL, NULL, + 198, 26, 37, 12, NULL, NULL, GD_m14, 0, NULL, NULL, + 236, 26, 37, 12, NULL, NULL, GD_m15, 0, NULL, NULL, + 274, 26, 37, 12, NULL, NULL, GD_m16, 0, NULL, NULL, + 312, 26, 37, 12, NULL, NULL, GD_m17, 0, NULL, NULL, + 350, 26, 37, 12, NULL, NULL, GD_m18, 0, NULL, NULL, + 388, 26, 37, 12, NULL, NULL, GD_m19, 0, NULL, NULL, + 349, 40, 76, 11, (UBYTE *)"OK", NULL, GD_Max_time_read_gadgets, PLACETEXT_IN, NULL, NULL +}; + +static struct NewGadget Time_betweenNGad[] = { + 46, 38, 37, 12, NULL, NULL, GD_b20, 0, NULL, NULL, + 84, 38, 37, 12, NULL, NULL, GD_b21, 0, NULL, NULL, + 122, 38, 37, 12, NULL, NULL, GD_b22, 0, NULL, NULL, + 160, 38, 37, 12, NULL, NULL, GD_b23, 0, NULL, NULL, + 198, 38, 37, 12, NULL, NULL, GD_b24, 0, NULL, NULL, + 84, 14, 37, 12, NULL, NULL, GD_b1, 0, NULL, NULL, + 122, 14, 37, 12, NULL, NULL, GD_b2, 0, NULL, NULL, + 160, 14, 37, 12, NULL, NULL, GD_b3, 0, NULL, NULL, + 198, 14, 37, 12, NULL, NULL, GD_b4, 0, NULL, NULL, + 236, 14, 37, 12, NULL, NULL, GD_b5, 0, NULL, NULL, + 274, 14, 37, 12, NULL, NULL, GD_b6, 0, NULL, NULL, + 312, 14, 37, 12, NULL, NULL, GD_b7, 0, NULL, NULL, + 350, 14, 37, 12, NULL, NULL, GD_b8, 0, NULL, NULL, + 388, 14, 37, 12, NULL, NULL, GD_b9, 0, NULL, NULL, + 46, 26, 37, 12, NULL, NULL, GD_b10, 0, NULL, NULL, + 84, 26, 37, 12, NULL, NULL, GD_b11, 0, NULL, NULL, + 122, 26, 37, 12, NULL, NULL, GD_b12, 0, NULL, NULL, + 160, 26, 37, 12, NULL, NULL, GD_b13, 0, NULL, NULL, + 198, 26, 37, 12, NULL, NULL, GD_b14, 0, NULL, NULL, + 236, 26, 37, 12, NULL, NULL, GD_b15, 0, NULL, NULL, + 274, 26, 37, 12, NULL, NULL, GD_b16, 0, NULL, NULL, + 312, 26, 37, 12, NULL, NULL, GD_b17, 0, NULL, NULL, + 350, 26, 37, 12, NULL, NULL, GD_b18, 0, NULL, NULL, + 388, 26, 37, 12, NULL, NULL, GD_b19, 0, NULL, NULL, + 349, 40, 76, 11, (UBYTE *)"OK", NULL, GD_Min_time_read_gadgets, PLACETEXT_IN, NULL, NULL +}; + +static ULONG ConfignodeGTags[] = { + (GTCY_Labels), (ULONG)&Nodetype0Labels[ 0 ], (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (GTCB_Checked), TRUE, (TAG_DONE), + (GTCB_Checked), TRUE, (TAG_DONE), + (TAG_DONE), + (GTCB_Checked), TRUE, (TAG_DONE), + (GTCY_Labels), (ULONG)&screenmode0Labels[ 0 ], (GTCY_Active), 1, (TAG_DONE), + (GTCY_Labels), (ULONG)&node_type0Labels[ 0 ], (GTCY_Active), 2, (TAG_DONE), + (TAG_DONE), + (GTTX_Text), (ULONG)"topaz.font ", (GTTX_Border), TRUE, (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (GTNM_Number), 8, (GTNM_Border), TRUE, (TAG_DONE), + (GTST_String), (ULONG)"ABBS:hold/node1", (GTST_MaxChars), 30, (TAG_DONE), + (GTST_String), (ULONG)"T:Node1Tmpdir", (GTST_MaxChars), 30, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 256, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 640, (GTIN_MaxChars), 4, (TAG_DONE), + (GTST_String), (ULONG)"ATZ", (GTST_MaxChars), 60, (TAG_DONE), + (GTST_String), (ULONG)"ATH", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"ATH1", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"ATA", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"ATDT", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"RING", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"CONNECT", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"NO CARRIER", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"AT", (GTST_MaxChars), 16, (TAG_DONE), + (GTST_String), (ULONG)"OK", (GTST_MaxChars), 16, (TAG_DONE), + (GTIN_Number), 300, (GTIN_MaxChars), 6, (TAG_DONE), + (GTIN_Number), 30, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 38400, (GTIN_MaxChars), 6, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTST_String), (ULONG)"serial.device", (GTST_MaxChars), 60, (TAG_DONE), + (GTST_MaxChars), 30, (GA_Disabled), TRUE, (TAG_DONE), + (GTCB_Checked), TRUE, (TAG_DONE) +}; + +static ULONG Max_loginGTags[] = { + (GTIN_Number), 60, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 60, (GTIN_MaxChars), 3, (TAG_DONE), + (TAG_DONE) +}; + +static ULONG Time_betweenGTags[] = { + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 3, (TAG_DONE), + (TAG_DONE) +}; + +static UWORD ComputeX( UWORD value ) +{ + return(( UWORD )((( FontX * value ) + 4 ) / 8 )); +} + +static UWORD ComputeY( UWORD value ) +{ + return(( UWORD )((( FontY * value ) + 4 ) / 8 )); +} + +static void ComputeFont( UWORD width, UWORD height ) +{ + Font = &Attr; + Font->ta_Name = (STRPTR)Scr->RastPort.Font->tf_Message.mn_Node.ln_Name; + Font->ta_YSize = FontY = Scr->RastPort.Font->tf_YSize; + FontX = Scr->RastPort.Font->tf_XSize; + + OffX = Scr->WBorLeft; + OffY = Scr->RastPort.TxHeight + Scr->WBorTop + 1; + + if ( width && height ) { + if (( ComputeX( width ) + OffX + Scr->WBorRight ) > Scr->Width ) + goto UseTopaz; + if (( ComputeY( height ) + OffY + Scr->WBorBottom ) > Scr->Height ) + goto UseTopaz; + } + return; + +UseTopaz: + Font->ta_Name = (STRPTR)"topaz.font"; + FontX = FontY = Font->ta_YSize = 8; +} + +int SetupScreen( void ) +{ + if ( ! ( Scr = LockPubScreen( NULL ))) + { + printf ("HEBBE! 1\n"); + return( 1L ); + } + + ComputeFont( 0, 0 ); + + if ( ! ( VisualInfo = GetVisualInfo( Scr, TAG_DONE ))) + { + printf ("HEBBE 2!\n"); + return( 2L ); + } + +// if ( ! ( getClass = initGet())) +// { +// printf ("HEBBE 3!\n"); +// return( 3L ); +// } + + if ( ! ( getImage = NewObject( getClass, NULL, GT_VisualInfo, VisualInfo, TAG_DONE ))) + { + printf ("HEBBE 4!\n"); + return( 4L ); + } + + return( 0L ); +} + +void CloseDownScreen( void ) +{ + if ( getImage ) { + DisposeObject( getImage ); + getImage = NULL; + } + + if ( getClass ) { + FreeClass( getClass ); + getClass = NULL; + } + + if ( VisualInfo ) { + FreeVisualInfo( VisualInfo ); + VisualInfo = NULL; + } + + if ( Scr ) { + UnlockPubScreen( NULL, Scr ); + Scr = NULL; + } +} + +void ConfignodeRender( void ) +{ + ComputeFont( ConfignodeWidth, ConfignodeHeight ); + + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 5 ), + OffY + ComputeY( 194 ), + ComputeX( 278 ), + ComputeY( 19 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 284 ), + OffY + ComputeY( 194 ), + ComputeX( 283 ), + ComputeY( 19 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 5 ), + OffY + ComputeY( 120 ), + ComputeX( 278 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 5 ), + OffY + ComputeY( 83 ), + ComputeX( 278 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 5 ), + OffY + ComputeY( 157 ), + ComputeX( 562 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 284 ), + OffY + ComputeY( 120 ), + ComputeX( 283 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 284 ), + OffY + ComputeY( 83 ), + ComputeX( 283 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 5 ), + OffY + ComputeY( 2 ), + ComputeX( 278 ), + ComputeY( 80 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + DrawBevelBox( ConfignodeWnd->RPort, OffX + ComputeX( 283 ), + OffY + ComputeY( 2 ), + ComputeX( 284 ), + ComputeY( 80 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); +} + +int OpenConfignodeWindow( void ) +{ + struct NewGadget ng; + struct Gadget *g; + UWORD lc, tc; + UWORD wleft = ConfignodeLeft, wtop = ConfignodeTop, ww, wh; + + ComputeFont( ConfignodeWidth, ConfignodeHeight ); + + ww = ComputeX( ConfignodeWidth ); + wh = ComputeY( ConfignodeHeight ); + + if (( wleft + ww + OffX + Scr->WBorRight ) > Scr->Width ) wleft = Scr->Width - ww; + if (( wtop + wh + OffY + Scr->WBorBottom ) > Scr->Height ) wtop = Scr->Height - wh; + + if ( ! ( g = CreateContext( &ConfignodeGList ))) + return( 1L ); + + for( lc = 0, tc = 0; lc < Confignode_CNT; lc++ ) { + + CopyMem((char * )&ConfignodeNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget )); + + ng.ng_VisualInfo = VisualInfo; + ng.ng_TextAttr = Font; + ng.ng_LeftEdge = OffX + ComputeX( ng.ng_LeftEdge ); + ng.ng_TopEdge = OffY + ComputeY( ng.ng_TopEdge ); + + if ( ConfignodeGTypes[ lc ] != GENERIC_KIND ) { + ng.ng_Width = ComputeX( ng.ng_Width ); + ng.ng_Height = ComputeY( ng.ng_Height); + } + + ConfignodeGadgets[ lc ] = g = CreateGadgetA((ULONG)ConfignodeGTypes[ lc ], g, &ng, ( struct TagItem * )&ConfignodeGTags[ tc ] ); + + if ( ConfignodeGTypes[ lc ] == GENERIC_KIND ) { + g->Flags |= GFLG_GADGIMAGE | GFLG_GADGHIMAGE; + g->Activation |= GACT_RELVERIFY; + g->GadgetRender = (APTR)getImage; + g->SelectRender = (APTR)getImage; + } + + while( ConfignodeGTags[ tc ] ) tc += 2; + tc++; + + if ( NOT g ) + return( 2L ); + } + + if ( ! ( ConfignodeMenus = CreateMenus( ConfignodeNewMenu, GTMN_FrontPen, 0L, TAG_DONE ))) + return( 3L ); + + LayoutMenus( ConfignodeMenus, VisualInfo, TAG_DONE ); + + if ( ! ( ConfignodeWnd = OpenWindowTags( NULL, + WA_Left, wleft, + WA_Top, wtop, + WA_Width, ww + OffX + Scr->WBorRight, + WA_Height, wh + OffY + Scr->WBorBottom, + WA_IDCMP, CYCLEIDCMP|BUTTONIDCMP|CHECKBOXIDCMP|IDCMP_GADGETUP|TEXTIDCMP|NUMBERIDCMP|STRINGIDCMP|INTEGERIDCMP|IDCMP_MENUPICK|IDCMP_CLOSEWINDOW|IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_SUPER_BITMAP|WFLG_ACTIVATE, + WA_Gadgets, ConfignodeGList, + WA_Title, ConfignodeWdt, + WA_ScreenTitle, "Workbench", + TAG_DONE ))) + return( 4L ); + + SetMenuStrip( ConfignodeWnd, ConfignodeMenus ); + GT_RefreshWindow( ConfignodeWnd, NULL ); + + ConfignodeRender(); + + return( 0L ); +} + +void CloseConfignodeWindow( void ) +{ + if ( ConfignodeMenus ) { + ClearMenuStrip( ConfignodeWnd ); + FreeMenus( ConfignodeMenus ); + ConfignodeMenus = NULL; } + + if ( ConfignodeWnd ) { + CloseWindow( ConfignodeWnd ); + ConfignodeWnd = NULL; + } + + if ( ConfignodeGList ) { + FreeGadgets( ConfignodeGList ); + ConfignodeGList = NULL; + } +} + +void Max_loginRender( void ) +{ + struct IntuiText it; + UWORD cnt; + + ComputeFont( Max_loginWidth, Max_loginHeight ); + + DrawBevelBox( Max_loginWnd->RPort, OffX + ComputeX( 13 ), + OffY + ComputeY( 13 ), + ComputeX( 14 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, GTBB_Recessed, TRUE, TAG_DONE ); + DrawBevelBox( Max_loginWnd->RPort, OffX + ComputeX( 46 ), + OffY + ComputeY( 3 ), + ComputeX( 379 ), + ComputeY( 9 ), + GT_VisualInfo, VisualInfo, GTBB_Recessed, TRUE, TAG_DONE ); + DrawBevelBox( Max_loginWnd->RPort, OffX + ComputeX( 3 ), + OffY + ComputeY( 1 ), + ComputeX( 433 ), + ComputeY( 54 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + + for ( cnt = 0; cnt < Max_login_TNUM; cnt++ ) { + CopyMem(( char * )&Max_loginIText[ cnt ], ( char * )&it, (long)sizeof( struct IntuiText )); + it.ITextFont = Font; + it.LeftEdge = OffX + ComputeX( it.LeftEdge ) - ( IntuiTextLength( &it ) >> 1 ); + it.TopEdge = OffY + ComputeY( it.TopEdge ) - ( Font->ta_YSize >> 1 ); + PrintIText( Max_loginWnd->RPort, &it, 0, 0 ); + } +} + +int OpenMax_loginWindow( void ) +{ + struct NewGadget ng; + struct Gadget *g; + UWORD lc, tc; + UWORD wleft = Max_loginLeft, wtop = Max_loginTop, ww, wh; + + ComputeFont( Max_loginWidth, Max_loginHeight ); + + ww = ComputeX( Max_loginWidth ); + wh = ComputeY( Max_loginHeight ); + + if (( wleft + ww + OffX + Scr->WBorRight ) > Scr->Width ) wleft = Scr->Width - ww; + if (( wtop + wh + OffY + Scr->WBorBottom ) > Scr->Height ) wtop = Scr->Height - wh; + + if ( ! ( g = CreateContext( &Max_loginGList ))) + return( 1L ); + + for( lc = 0, tc = 0; lc < Max_login_CNT; lc++ ) { + + CopyMem((char * )&Max_loginNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget )); + + ng.ng_VisualInfo = VisualInfo; + ng.ng_TextAttr = Font; + ng.ng_LeftEdge = OffX + ComputeX( ng.ng_LeftEdge ); + ng.ng_TopEdge = OffY + ComputeY( ng.ng_TopEdge ); + ng.ng_Width = ComputeX( ng.ng_Width ); + ng.ng_Height = ComputeY( ng.ng_Height); + + Max_loginGadgets[ lc ] = g = CreateGadgetA((ULONG)Max_loginGTypes[ lc ], g, &ng, ( struct TagItem * )&Max_loginGTags[ tc ] ); + + while( Max_loginGTags[ tc ] ) tc += 2; + tc++; + + if ( NOT g ) + return( 2L ); + } + + if ( ! ( Max_loginWnd = OpenWindowTags( NULL, + WA_Left, wleft, + WA_Top, wtop, + WA_Width, ww + OffX + Scr->WBorRight, + WA_Height, wh + OffY + Scr->WBorBottom, + WA_IDCMP, INTEGERIDCMP|BUTTONIDCMP|IDCMP_CLOSEWINDOW|IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_ACTIVATE, + WA_Gadgets, Max_loginGList, + WA_Title, Max_loginWdt, + WA_ScreenTitle, "Workbench", + TAG_DONE ))) + return( 4L ); + + GT_RefreshWindow( Max_loginWnd, NULL ); + + Max_loginRender(); + + return( 0L ); +} + +void CloseMax_loginWindow( void ) +{ + if ( Max_loginWnd ) { + CloseWindow( Max_loginWnd ); + Max_loginWnd = NULL; + } + + if ( Max_loginGList ) { + FreeGadgets( Max_loginGList ); + Max_loginGList = NULL; + } +} + +void Time_betweenRender( void ) +{ + struct IntuiText it; + UWORD cnt; + + ComputeFont( Time_betweenWidth, Time_betweenHeight ); + + DrawBevelBox( Time_betweenWnd->RPort, OffX + ComputeX( 13 ), + OffY + ComputeY( 13 ), + ComputeX( 14 ), + ComputeY( 36 ), + GT_VisualInfo, VisualInfo, GTBB_Recessed, TRUE, TAG_DONE ); + DrawBevelBox( Time_betweenWnd->RPort, OffX + ComputeX( 46 ), + OffY + ComputeY( 3 ), + ComputeX( 379 ), + ComputeY( 9 ), + GT_VisualInfo, VisualInfo, GTBB_Recessed, TRUE, TAG_DONE ); + DrawBevelBox( Time_betweenWnd->RPort, OffX + ComputeX( 3 ), + OffY + ComputeY( 1 ), + ComputeX( 433 ), + ComputeY( 54 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); + + for ( cnt = 0; cnt < Time_between_TNUM; cnt++ ) { + CopyMem(( char * )&Time_betweenIText[ cnt ], ( char * )&it, (long)sizeof( struct IntuiText )); + it.ITextFont = Font; + it.LeftEdge = OffX + ComputeX( it.LeftEdge ) - ( IntuiTextLength( &it ) >> 1 ); + it.TopEdge = OffY + ComputeY( it.TopEdge ) - ( Font->ta_YSize >> 1 ); + PrintIText( Time_betweenWnd->RPort, &it, 0, 0 ); + } +} + +int OpenTime_betweenWindow( void ) +{ + struct NewGadget ng; + struct Gadget *g; + UWORD lc, tc; + UWORD wleft = Time_betweenLeft, wtop = Time_betweenTop, ww, wh; + + ComputeFont( Time_betweenWidth, Time_betweenHeight ); + + ww = ComputeX( Time_betweenWidth ); + wh = ComputeY( Time_betweenHeight ); + + if (( wleft + ww + OffX + Scr->WBorRight ) > Scr->Width ) wleft = Scr->Width - ww; + if (( wtop + wh + OffY + Scr->WBorBottom ) > Scr->Height ) wtop = Scr->Height - wh; + + if ( ! ( g = CreateContext( &Time_betweenGList ))) + return( 1L ); + + for( lc = 0, tc = 0; lc < Time_between_CNT; lc++ ) { + + CopyMem((char * )&Time_betweenNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget )); + + ng.ng_VisualInfo = VisualInfo; + ng.ng_TextAttr = Font; + ng.ng_LeftEdge = OffX + ComputeX( ng.ng_LeftEdge ); + ng.ng_TopEdge = OffY + ComputeY( ng.ng_TopEdge ); + ng.ng_Width = ComputeX( ng.ng_Width ); + ng.ng_Height = ComputeY( ng.ng_Height); + + Time_betweenGadgets[ lc ] = g = CreateGadgetA((ULONG)Time_betweenGTypes[ lc ], g, &ng, ( struct TagItem * )&Time_betweenGTags[ tc ] ); + + while( Time_betweenGTags[ tc ] ) tc += 2; + tc++; + + if ( NOT g ) + return( 2L ); + } + + if ( ! ( Time_betweenWnd = OpenWindowTags( NULL, + WA_Left, wleft, + WA_Top, wtop, + WA_Width, ww + OffX + Scr->WBorRight, + WA_Height, wh + OffY + Scr->WBorBottom, + WA_IDCMP, INTEGERIDCMP|BUTTONIDCMP|IDCMP_CLOSEWINDOW|IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_ACTIVATE, + WA_Gadgets, Time_betweenGList, + WA_Title, Time_betweenWdt, + WA_ScreenTitle, "Workbench", + TAG_DONE ))) + return( 4L ); + + GT_RefreshWindow( Time_betweenWnd, NULL ); + + Time_betweenRender(); + + return( 0L ); +} + +void CloseTime_betweenWindow( void ) +{ + if ( Time_betweenWnd ) { + CloseWindow( Time_betweenWnd ); + Time_betweenWnd = NULL; + } + + if ( Time_betweenGList ) { + FreeGadgets( Time_betweenGList ); + Time_betweenGList = NULL; + } +} + diff --git a/c/ConfigNodegui.changes b/c/ConfigNodegui.changes new file mode 100644 index 0000000..b6a6abe --- /dev/null +++ b/c/ConfigNodegui.changes @@ -0,0 +1,11 @@ +i int SetupScreen( void ) + "if ( ! ( Scr = LockPubScreen( PubScreenName )))" til "if ( ! ( Scr = LockPubScreen(NULL)))" + +fjerne "static" i + static struct Window *ConfignodeWnd = NULL; + +fjerne "static" i + static struct Menu *ConfignodeMenus = NULL; + +fjerne "static" i + static struct Gadget *ConfignodeGadgets[35]; diff --git a/c/ConfigNodegui.gui b/c/ConfigNodegui.gui new file mode 100644 index 0000000000000000000000000000000000000000..dcbf9752e74cff8c0cc2feef22066ccd647e3da1 GIT binary patch literal 27164 zcmd^|Yj9h|6@d534mXL7aS|uILby;vp@gIfhC-TlB3q8^;up4PR3=3uOR}v*(v@U6 zb|7_)5<-A9I1loMQkr4t)NP?n8Co(Oe()OebwAlOa84_wJQ! z>0Yg*yHlntldQD5I%mH<`#8I2BR2N-cN4Ou$?Jc#)9Zb-lMq)wA*5!Lp58hbNrXn= zjZ>*++T|xMGJm?6C|9q}m3kG@+_KN-`;49pKCx;@Ph|c#{Oaz2^`uUIX8$ zh5riDM%v5Bzxw*yH}>^+c;Eqi7LwQ3)(hDMLX;P2fkIsFL^vG@j%pr#Fs6?U)8cae z8u-@0y0J_&w%QvE`*b}v+Nw{K^L?kEW%Noz5&HI?HqdtY|Ct{69xm3Rwyom+9JETY zMj@iYOhY~fa{Q1_L%9O^LClSr={2vv)!*9M>xZ(1WC8h|vWzSt zgqJ89l-!(O0?+J(XPR@*K*{3;C9k{I=05{+c7mL|Z$Zi9vr9nEwIHW2Ct0}_N|s{@ ztL<%lUccAvbz|=!|5m<427#qsO&$%y%smNZkktNfzsFuV`*#oY!p!!hWlyBqTtqEg z1*Ybc2B_m7E$dT5>IWj}XfUR+u3p!rhs-yPJ!7$$767MbfvmtF6BD2!ihbP$ecM&+ zgZwgHf8}nd{{pQ4iOsbB_|4h%4^C)ZSY1kyFQfd|-N6Y~??47x#Nzwq)c;-AO=J(b z3G09IG_8LPNL6_IgAKPv!dh!^EUfhhGgcZcDpFX?4Vd4m_65ibl$2Ky2iW5LOY~F zY@VY#3|Z}fOGu#9LS@|!snG9@b|{?3YsiAuU}$SNt-~0a=Zhw`6S801njnkcZZLA$(|# zyNwR-O0mv?M9^|6qE&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JU%o(jSrl3pufXt?%*&(D*;m4p zmqnpv@d^xI$-F!Yo&CWj%FCkAvUo+dDCNvoraw{Y1)s0XD0KFR8OqC|(6V^B|7KS` zxx73IojrAh^0FwjEMAeVnp|EUh0eaVi}EtRSr)Izc2O=bk3wf(ucy2$3N4FQWXmd* z*Nj4Ee{_iQvM97H-fE-J)%zP}6#B<({bf;TX}kgsmR$RqQRttr^_NAVrSS?lSaNyI zDD+R+`n!lO71DSG94xuKW)%7jw*D@b%PZhu$>lYp&~LK!cZpnH0S8MeZ!QY`3%33? z$>kMru;lWZQRrW?^_NAVrHx+!2TLxm8HIj}t-s6U+E>8AlFMsGq2FFk{S6j{mS$f8 d2TLYzUKILQrzkIrLL0n}N1@^WP~c1y`oFnDq#ghO literal 0 HcmV?d00001 diff --git a/c/ConfigNodegui.gui2 b/c/ConfigNodegui.gui2 new file mode 100644 index 0000000000000000000000000000000000000000..527d8dbcb5d748729935f8a4f1a400650c78a3d4 GIT binary patch literal 26838 zcmd^{4Qw366@X{Y4(lYwIEe{=A#71Vqya*Lp^!#Z&OZAb;XmvnzMd%8v+rzQa=tz8 z);Q287?J`-p^YG<(1e!K6rt8?{;Uwdg;1qG3ZWG!6;gL$``&!>=I714aoT(Ox(FHlrPqJgdaw7c^@O zH%?tOJ6(R_B6T~L5#{{(T&d^b%FX+9-Wz%%^uUe7dffQm@T=iJwv)QDbi1f+FMxMy z;a}d>PForIM{i$Sdv9Nd2Ohv@;qv-gdmx!5M0uKKD8%KChm(;|O7rN0F@1c5W|#A; z|BL-=#*Jufr8gAz>3S^HqHiweeW#yg^h!ek`nK*?(Dvc~Gd=L#QK&|3YsLL3sFgyM zLRhU_yV~m?@Cj-K5I(~3{ zp1emC%!8|z%x53)_aq@wmSB!q z+Jx8d^RM^$eNfskR-^JhX@yaHx4Pk*$KjS-mx>JO@o;K6-Z*eEy;nWy^?Ti3H?~Uh zZ;~KGP>1#EhG$}^o2pS%Un7j=gmmb!u+|$gobn$~UZRvZ7pc#m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--git a/c/ConfigNodegui.h b/c/ConfigNodegui.h new file mode 100644 index 0000000..7cf42e3 --- /dev/null +++ b/c/ConfigNodegui.h @@ -0,0 +1,210 @@ +/* + * Source machine generated by GadToolsBox V2.0b + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Andreas Dobloug + */ + +#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer ) +#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt ) + +#define GD_Nodetype 0 +#define GD_Min_between_login 1 +#define GD_Max_login_time 2 +#define GD_Locked_baud_rate 3 +#define GD_CTS_RTS 4 +#define GD_Hangup_mode 5 +#define GD_Open_at_Startup 6 +#define GD_screenmode 7 +#define GD_node_type 8 +#define GD_get_font 9 +#define GD_font_name 10 +#define GD_get_hold_path 11 +#define GD_get_tmpdir_path 12 +#define GD_font_size 13 +#define GD_Holdpath 14 +#define GD_tmppath 15 +#define GD_Window_x 16 +#define GD_Window_y 17 +#define GD_Window_height 18 +#define GD_Window_width 19 +#define GD_Modem_Init 20 +#define GD_Modem_on_hook 21 +#define GD_Modem_off_hook 22 +#define GD_Modem_answer 23 +#define GD_Modem_dial 24 +#define GD_Modem_ring 25 +#define GD_Modem_connect 26 +#define GD_Modem_no_carrier 27 +#define GD_Modem_at_string 28 +#define GD_modem_ok_string 29 +#define GD_Minimum_baud 30 +#define GD_Connect_wait 31 +#define GD_Modem_machine_baud 32 +#define GD_Comm_port 33 +#define GD_Comm_port_name 34 +#define GD_publicscren 35 +#define GD_NoSleep 36 + +#define GDX_Nodetype 0 +#define GDX_Min_between_login 1 +#define GDX_Max_login_time 2 +#define GDX_Locked_baud_rate 3 +#define GDX_CTS_RTS 4 +#define GDX_Hangup_mode 5 +#define GDX_Open_at_Startup 6 +#define GDX_screenmode 7 +#define GDX_node_type 8 +#define GDX_get_font 9 +#define GDX_font_name 10 +#define GDX_get_hold_path 11 +#define GDX_get_tmpdir_path 12 +#define GDX_font_size 13 +#define GDX_Holdpath 14 +#define GDX_tmppath 15 +#define GDX_Window_x 16 +#define GDX_Window_y 17 +#define GDX_Window_height 18 +#define GDX_Window_width 19 +#define GDX_Modem_Init 20 +#define GDX_Modem_on_hook 21 +#define GDX_Modem_off_hook 22 +#define GDX_Modem_answer 23 +#define GDX_Modem_dial 24 +#define GDX_Modem_ring 25 +#define GDX_Modem_connect 26 +#define GDX_Modem_no_carrier 27 +#define GDX_Modem_at_string 28 +#define GDX_modem_ok_string 29 +#define GDX_Minimum_baud 30 +#define GDX_Connect_wait 31 +#define GDX_Modem_machine_baud 32 +#define GDX_Comm_port 33 +#define GDX_Comm_port_name 34 +#define GDX_publicscren 35 +#define GDX_NoSleep 36 + +#define GD_m20 0 +#define GD_m21 1 +#define GD_m22 2 +#define GD_m23 3 +#define GD_m24 4 +#define GD_m1 5 +#define GD_m2 6 +#define GD_m3 7 +#define GD_m4 8 +#define GD_m5 9 +#define GD_m6 10 +#define GD_m7 11 +#define GD_m8 12 +#define GD_m9 13 +#define GD_m10 14 +#define GD_m11 15 +#define GD_m12 16 +#define GD_m13 17 +#define GD_m14 18 +#define GD_m15 19 +#define GD_m16 20 +#define GD_m17 21 +#define GD_m18 22 +#define GD_m19 23 +#define GD_Max_time_read_gadgets 24 + +#define GDX_m20 0 +#define GDX_m21 1 +#define GDX_m22 2 +#define GDX_m23 3 +#define GDX_m24 4 +#define GDX_m1 5 +#define GDX_m2 6 +#define GDX_m3 7 +#define GDX_m4 8 +#define GDX_m5 9 +#define GDX_m6 10 +#define GDX_m7 11 +#define GDX_m8 12 +#define GDX_m9 13 +#define GDX_m10 14 +#define GDX_m11 15 +#define GDX_m12 16 +#define GDX_m13 17 +#define GDX_m14 18 +#define GDX_m15 19 +#define GDX_m16 20 +#define GDX_m17 21 +#define GDX_m18 22 +#define GDX_m19 23 +#define GDX_Max_time_read_gadgets 24 + +#define GD_b20 0 +#define GD_b21 1 +#define GD_b22 2 +#define GD_b23 3 +#define GD_b24 4 +#define GD_b1 5 +#define GD_b2 6 +#define GD_b3 7 +#define GD_b4 8 +#define GD_b5 9 +#define GD_b6 10 +#define GD_b7 11 +#define GD_b8 12 +#define GD_b9 13 +#define GD_b10 14 +#define GD_b11 15 +#define GD_b12 16 +#define GD_b13 17 +#define GD_b14 18 +#define GD_b15 19 +#define GD_b16 20 +#define GD_b17 21 +#define GD_b18 22 +#define GD_b19 23 +#define GD_Min_time_read_gadgets 24 + +#define GDX_b20 0 +#define GDX_b21 1 +#define GDX_b22 2 +#define GDX_b23 3 +#define GDX_b24 4 +#define GDX_b1 5 +#define GDX_b2 6 +#define GDX_b3 7 +#define GDX_b4 8 +#define GDX_b5 9 +#define GDX_b6 10 +#define GDX_b7 11 +#define GDX_b8 12 +#define GDX_b9 13 +#define GDX_b10 14 +#define GDX_b11 15 +#define GDX_b12 16 +#define GDX_b13 17 +#define GDX_b14 18 +#define GDX_b15 19 +#define GDX_b16 20 +#define GDX_b17 21 +#define GDX_b18 22 +#define GDX_b19 23 +#define GDX_Min_time_read_gadgets 24 + +#define Confignode_CNT 37 +#define Max_login_CNT 25 +#define Time_between_CNT 25 + +extern struct IntuitionBase *IntuitionBase; +extern struct Library *GadToolsBase; + + + +extern int SetupScreen( void ); +extern void CloseDownScreen( void ); +extern void ConfignodeRender( void ); +extern int OpenConfignodeWindow( void ); +extern void CloseConfignodeWindow( void ); +extern void Max_loginRender( void ); +extern int OpenMax_loginWindow( void ); +extern void CloseMax_loginWindow( void ); +extern void Time_betweenRender( void ); +extern int OpenTime_betweenWindow( void ); +extern void CloseTime_betweenWindow( void ); diff --git a/c/ConfigNodegui_temp.c b/c/ConfigNodegui_temp.c new file mode 100644 index 0000000..79023e0 --- /dev/null +++ b/c/ConfigNodegui_temp.c @@ -0,0 +1,456 @@ +/* This file contains empty template routines that + * the IDCMP handler will call uppon. Fill out these + * routines with your code or use them as a reference + * to create your program. + */ + +int HoldpathClicked( void ) +{ + /* routine when gadget "Hold Path" is clicked. */ +} + +int tmppathClicked( void ) +{ + /* routine when gadget "Tmpdir Path" is clicked. */ +} + +int Window_xClicked( void ) +{ + /* routine when gadget "Window x-pos" is clicked. */ +} + +int Window_yClicked( void ) +{ + /* routine when gadget "Window y-pos" is clicked. */ +} + +int Window_heightClicked( void ) +{ + /* routine when gadget "Height" is clicked. */ +} + +int Window_widthClicked( void ) +{ + /* routine when gadget "Width" is clicked. */ +} + +int NodetypeClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int Modem_InitClicked( void ) +{ + /* routine when gadget "Modem Init" is clicked. */ +} + +int Modem_on_hookClicked( void ) +{ + /* routine when gadget "Modem On Hook" is clicked. */ +} + +int Modem_off_hookClicked( void ) +{ + /* routine when gadget "Modem Off Hook" is clicked. */ +} + +int Modem_answerClicked( void ) +{ + /* routine when gadget "Modem Answer" is clicked. */ +} + +int Modem_dialClicked( void ) +{ + /* routine when gadget "Modem Dial" is clicked. */ +} + +int Modem_ringClicked( void ) +{ + /* routine when gadget "Modem Ring" is clicked. */ +} + +int Modem_connectClicked( void ) +{ + /* routine when gadget "Modem Connect" is clicked. */ +} + +int Modem_no_carrierClicked( void ) +{ + /* routine when gadget "Modem No Carrier" is clicked. */ +} + +int Modem_at_stringClicked( void ) +{ + /* routine when gadget "Modem AT String" is clicked. */ +} + +int Minimum_baudClicked( void ) +{ + /* routine when gadget "Minimum Baud" is clicked. */ +} + +int Connect_waitClicked( void ) +{ + /* routine when gadget "Connect Wait" is clicked. */ +} + +int Modem_machine_baudClicked( void ) +{ + /* routine when gadget "Modem-machine baud" is clicked. */ +} + +int Min_between_loginClicked( void ) +{ + /* routine when gadget "Set Min Time Between two logins" is clicked. */ +} + +int Max_login_timeClicked( void ) +{ + /* routine when gadget "Set Max Login Time" is clicked. */ +} + +int Locked_baud_rateClicked( void ) +{ + /* routine when gadget "Locked Baud Rate" is clicked. */ +} + +int CTS_RTSClicked( void ) +{ + /* routine when gadget "CTS/RTS" is clicked. */ +} + +int Hangup_modeClicked( void ) +{ + /* routine when gadget "+++ Hangup" is clicked. */ +} + +int Comm_port_nameClicked( void ) +{ + /* routine when gadget "Comm port name" is clicked. */ +} + +int Comm_portClicked( void ) +{ + /* routine when gadget "Comm Port" is clicked. */ +} + +int Tiny_modeClicked( void ) +{ + /* routine when gadget "Open at startup" is clicked. */ +} + +int screenmodeClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int publicscrenClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int node_typeClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int get_fontClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int get_hold_pathClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int get_tmpdir_pathClicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m20Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m21Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m22Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m23Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m24Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m1Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m2Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m3Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m4Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m5Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m6Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m7Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m8Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m9Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m10Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m11Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m12Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m13Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m14Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m15Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m16Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m17Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m18Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int m19Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int Max_time_read_gadgetsClicked( void ) +{ + /* routine when gadget "OK" is clicked. */ +} + +int b20Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b21Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b22Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b23Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b24Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b1Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b2Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b3Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b4Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b5Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b6Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b7Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b8Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b9Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b10Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b11Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b12Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b13Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b14Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b15Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b16Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b17Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b18Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int b19Clicked( void ) +{ + /* routine when gadget "" is clicked. */ +} + +int Min_time_read_gadgetsClicked( void ) +{ + /* routine when gadget "OK" is clicked. */ +} + +int ConfignodeAbout( void ) +{ + /* routine when (sub)item "About" is selected. */ +} + +int ConfignodeLoad_config( void ) +{ + /* routine when (sub)item "Load Config" is selected. */ +} + +int ConfignodeSave_config( void ) +{ + /* routine when (sub)item "Save Config" is selected. */ +} + +int ConfignodeExit_main( void ) +{ + /* routine when (sub)item "Quit" is selected. */ +} + +int ConfignodeCloseWindow( void ) +{ + /* routine for "IDCMP_CLOSEWINDOW". */ +} + +int Max_loginCloseWindow( void ) +{ + /* routine for "IDCMP_CLOSEWINDOW". */ +} + +int Time_betweenCloseWindow( void ) +{ + /* routine for "IDCMP_CLOSEWINDOW". */ +} + diff --git a/c/CryptPasswords.c b/c/CryptPasswords.c new file mode 100644 index 0000000..1e0b70a --- /dev/null +++ b/c/CryptPasswords.c @@ -0,0 +1,128 @@ +/*************************************************************************** +* CryptPasswords 1.1 (15/07-95) +* +* Recreates the index files +* +* Usage : [USER=] +* +* 1.1 Fikset bug i renameing etter konvertering... +* +***************************************************************************/ +#include + +char *vers = "\0$VER: CryptPasswords 1.1 (15.7.95)\n\r"; /* day,month,year */ + +#include + +#include +#include +#include +#include + +int main(int argc, char **argv); + +struct UserRecord user; + +#define TEMPLATE "USERFILE/A" +#define OPT_COUNT 1 + +/* STRPTR ACrypt( STRPTR, STRPTR, STRPTR); */ + +int main(int argc, char **argv) +{ + BPTR fil = NULL,fil2 = NULL; + int n; + char *ptr, *ptr2; + int ret = 10; + char newuserfilename[60]; + char passwd[14]; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0}; + char *userfname; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + userfname = result[0] ? (char *) result[0] : "userfile"; + + while (1) { + if (FindPort(MainPortName)) { + printf ("CryptPasswords won't work if abbs is running..\n"); + break; + } + + printf ("remember: CryptPasswords should only be run once..\n"); + + if (!(fil = Open (userfname,MODE_OLDFILE))) { + printf ("Error opening userfile\n"); + break; + } + + sprintf (newuserfilename,"%s.new",userfname); + if (!(fil2 = Open (newuserfilename,MODE_NEWFILE))) { + printf ("Error opening new userfile\n"); + break; + } + + do { + n = Read (fil,&user,sizeof (struct UserRecord)); + + if (!n) { + ret = 0; + break; /* Ferdig */ + } + + if (n != sizeof (struct UserRecord)) { + printf ("Error reading userfile\n"); + break; + } + + memset (passwd,'\0',sizeof (passwd)); + + if (!(ACrypt (passwd, user.Password, user.Name))) { + printf ("Acrypt failed for user %s\n",user.Name); + break; + } + + ptr = passwd; + ptr2 = user.Password; + for (n = 0; n < sizeof (PassT); n++) + *(ptr2++) = *(ptr++); + user.pass_10 = *(ptr++); + user.pass_11 = *(ptr++); + + n = Write (fil2,&user,sizeof (struct UserRecord)); + + if (n != sizeof (struct UserRecord)) { + printf ("Error writing userfile\n"); + break; + } + + } while (n == sizeof (struct UserRecord)); + + break; + } + + if (fil) Close (fil); + if (fil2) Close (fil2); + + if (!ret) { + sprintf (newuserfilename,"%s.old",userfname); + if (Rename (userfname,newuserfilename)) { + sprintf (newuserfilename,"%s.new",userfname); + if (Rename (newuserfilename,userfname)) { + } else { + printf ("Error installing new userfile. %s should be renamed to %s\n", + newuserfilename,userfname); + ret = 1; + } + } else { + printf ("Error installing new userfile. Old userfile (%s) still active\n",userfname); + ret = 1; + } + } + + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} diff --git a/c/FindLostFiles.c b/c/FindLostFiles.c new file mode 100644 index 0000000..de5bb7a --- /dev/null +++ b/c/FindLostFiles.c @@ -0,0 +1,308 @@ +/*************************************************************************** +* FindLostFiles 1.0 (28/08-94) +* +* Find lost files laying in abbs filedir path's. +* +* Usage : +* +***************************************************************************/ +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct ExAllControl *eac = NULL; + +int main(int argc, char **argv); +int HandleMsg (struct ABBSmsg *msg); +int Setup (void); +void Cleanup (void); +unsigned char *upstring (unsigned char *string); +unsigned char upchar (unsigned char c); + +#define TEMPLATE "Fix/S" +#define OPT_COUNT 1 + +#ifdef __SASC +__regargs int _CXBRK(void) { return(0); } /* Disable Lattice CTRL/C handling */ +__regargs int __chkabort(void) { return(0); } /* really */ +#endif + +char *vers = "\0$VER: FindLostFiles v1.0 (1.4.94)\n\r"; /* day,month,year */ + +#define BUFFERSIZE 2048 + +struct ConfigRecord *config; +UBYTE buffer[BUFFERSIZE]; +ULONG matchbuffer[1024/4]; + +int main(int argc, char **argv) +{ + int ret = 10,n,r,k,kk; + int err,more,dobreak = 0; + BPTR lock = NULL; + struct Fileentry fentry; + struct RDArgs *RDArg; + struct ExAllData *ead; + LONG *result[OPT_COUNT] = {0}; + char string[258],*ptr; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + while (1) { + for (n = 0; n < config->ActiveDirs; n++) { + r = config->FileOrder[n]-1; + + if (!(*config->DirNames[r])) + continue; + + if (!(lock = Lock (config->DirPaths[r],ACCESS_READ))) { + printf ("Error getting lock in %s's filedirpath (%s)\n", + config->DirNames[r],config->DirPaths[r]); + break; + } + + eac->eac_LastKey = 0; + do { + more = ExAll (lock,(struct ExAllData *) buffer,sizeof (buffer),ED_COMMENT,eac); + if ((!more) && (IoErr() != ERROR_NO_MORE_ENTRIES)) { + printf ("Got Error from ExAll..\n"); +/* ExAll failed abnormally */ + break; + } + if (eac->eac_Entries == 0) { +/* ExAll failed normally with no entries */ + continue; /* ("more" is *usually* zero) */ + } + ead = (struct ExAllData *) buffer; + do { + if ((dobreak) || (ead->ed_Type > 0)) + continue; + + msg.Command = Main_findfile; + msg.Name = ead->ed_Name; + msg.arg = (ULONG) matchbuffer; + matchbuffer[2] = 0; + msg.UserNr = r; + msg.Data = (ULONG) &fentry; + err = HandleMsg (&msg); + + if (err == Error_Not_Found) { + printf ("file \"%s\" was not found in filedir \"%s\"\n", + ead->ed_Name,config->DirNames[r]); + for (k = 0,kk = 0; kk < config->ActiveDirs; k++) { + if (!(*config->DirNames[k])) + continue; + else + kk += 1; + + if (k == r) + continue; + + if (!strcmp (config->DirPaths[r],config->DirPaths[k])) { + printf ("(This may be because more than one filedir" + " share this filedir path..)\n"); + break; + } + } + if ((!ead->ed_Comment) || (!(*ead->ed_Comment))) + printf ("No comment..\n"); + else { + if (isalnum (*ead->ed_Comment)) + ptr = ead->ed_Comment; + else + ptr = ead->ed_Comment + 1; + + printf ("comment = %s\n",ptr); + } + printf ("Do you want me to add it to filedir %s ? (Y/n)", + config->DirNames[r]); + + while (1) { + kk = getch(); + if (kk == 3 || (SetSignal(0L,SIGBREAKF_CTRL_C) & + SIGBREAKF_CTRL_C)) { + dobreak = 1; + break; + } else if ((kk == '\n') || (kk == '\r') || 'Y' == upchar (kk)) { + printf (" Yes\n"); + + if (strlen (ead->ed_Name) > Sizeof_FileName) { + printf ("Sorry, filename to long..\n"); + break; + } + + if ((!ead->ed_Comment) || (!(*ead->ed_Comment))) { + printf ("Enter comment :"); + if (gets (string) && (strlen (string))) + strncpy (fentry.Filedescription,string, + sizeof(fentry.Filedescription)); + else + strcpy (fentry.Filedescription,"Auto comment"); + } else { + if (isalnum (*ead->ed_Comment)) + ptr = ead->ed_Comment; + else + ptr = ead->ed_Comment + 1; + + strncpy (fentry.Filedescription,ptr, + sizeof(fentry.Filedescription)); + } + + strcpy (fentry.Filename,ead->ed_Name); + fentry.Fsize = ead->ed_Size; + fentry.Uploader = config->SYSOPUsernr; + fentry.PrivateULto = 0L; + fentry.AntallDLs = 0L; + fentry.Infomsgnr = 0L; + fentry.ULdate.ds_Days = ead->ed_Days; + fentry.ULdate.ds_Minute = ead->ed_Mins; + fentry.ULdate.ds_Tick = ead->ed_Ticks; + + if (r == 0) { + fentry.Filestatus = FILESTATUSF_PrivateUL; /* Tmp hack.. */ + fentry.PrivateULto = config->SYSOPUsernr; + } else + fentry.Filestatus = 0; + + + msg.Command = Main_addfile; + msg.Data = (ULONG) &fentry; + msg.UserNr = r; + + err = HandleMsg (&msg); + + if (err != Error_OK) + printf ("Error adding file %s to dir %s\n", + ead->ed_Name,config->DirNames[r]); + + break; + } else if ('N' == upchar(kk)) { + printf (" No\n"); + break; + } + } + printf ("\n"); + + } else + if (err != Error_OK) { + printf ("Error reading fileentry for file %s\n",ead->ed_Name); + break; + } + } while (ead = ead->ed_Next); + + } while (more); + + UnLock (lock); + lock = NULL; + } + break; + } + if (lock) + UnLock (lock); + Cleanup(); + } + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport,msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} +unsigned char *upstring (unsigned char *string) +{ + char *ptr = string; + + while (*ptr) { + *ptr = upchar (*ptr); + ptr += 1; + } + + return (string); +} +unsigned char upchar (unsigned char c) +{ + if (c < 'a') + return (c); + + if (c <= 'z') + return ((unsigned char) (c - 32)); + + if (c < 0xe0) + return (c); + + return ((unsigned char) (c - 32)); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (eac = AllocDosObject(DOS_EXALLCONTROL,NULL)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) { +/* Get access to config structure +*/ + msg.Command = Main_testconfig; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + } else { + config = (struct ConfigRecord *) msg.Data; + ret = 1; + } + } else + printf ("Error creating message port\n"); + } else + printf ("Error allocating EAC\n"); + } else + printf ("ABBS must be running for FindLostFiles to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); + if (eac) FreeDosObject(DOS_EXALLCONTROL,eac); +} diff --git a/c/FindUnread.c b/c/FindUnread.c new file mode 100644 index 0000000..5d00b66 --- /dev/null +++ b/c/FindUnread.c @@ -0,0 +1,172 @@ +/*************************************************************************** +* FindUnread 0.1 (11/2-95) +* +* Finds unread messages in conferenes. +* +* Usage : +* +* +***************************************************************************/ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct MessageRecord msgheader; + +int main(int argc, char **argv); +int HandleMsg (struct ABBSmsg *msg); +int Setup (void); +void Cleanup (void); +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr); + +#define TEMPLATE "Conf/A" +#define OPT_COUNT 1 + +char *vers = "\0$VER: FindUnread v0.1"; + +struct ConfigRecord *config; + +int main(int argc, char **argv) +{ + int n,k; + int confnr; + LONG *result[OPT_COUNT] = {0}; + int ret = 10; + struct RDArgs *RDArg; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + while (1) { + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + break; + } + config = (struct ConfigRecord *) msg.Data; + + k = strlen ((char *) result[0]); + for (n = 0; n < config->Maxconferences ; n++) + { + if (*config->firstconference[n].n_ConfName) + { + if (!strnicmp ((char *) result[0], config->firstconference[n].n_ConfName, k)) + break; + } + } + + if (n == config->Maxconferences) + { + printf ("Error: Unknown conference (%s)\n",result[0]); + break; + } + confnr = n; + +printf ("Confnr = %d,maxmsg = %d\n",confnr,config->ConfDefaultMsg[confnr]); + + for (n = 1; n < config->ConfDefaultMsg[confnr]; n++) { + if (k = loadmsgheader (&msgheader,n,confnr)) { + printf ("Error loading message %d (%d)\n",n,k); + break; + } + if (msgheader.MsgStatus & (MSTATF_KilledByAuthor| + MSTATF_KilledBySigop|MSTATF_KilledBySysop| + MSTATF_Dontshow|MSTATF_MsgRead|MSTATF_Moved)) + continue; + + if (msgheader.MsgTo == -1) + continue; + + printf ("%d ",n); + } + printf ("\n"); + break; + } + Cleanup(); + } + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr) +{ + int n; + + msg.Command = Main_loadmsgheader; + msg.Data = (ULONG) msgheader; + msg.UserNr = msgnr - 1; + msg.Error = confnr * 2; + n = HandleMsg (&msg); + + if (n != Error_OK) { + if (n == Error_NoPort) + printf ("Error talking to ABBS\n"); + else + printf ("Error reading message header\n"); + } + + return (n); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport,msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + ret = 1; + else + printf ("Error creating message port\n"); + } else + printf ("ABBS must be running for FindUnread to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); +} diff --git a/c/FixIndex.c b/c/FixIndex.c new file mode 100644 index 0000000..faef7e5 --- /dev/null +++ b/c/FixIndex.c @@ -0,0 +1,359 @@ +/*************************************************************************** +* FixIndex 1.4 (23/02-95) +* +* Recreates the index files +* +* Usage : [USER=] [INDEX=] [NRINDEX=] [CONFIG=] [CHECK] +* +* 1.4 : - Addded KILLHIGH,FIXDUPLICATESNR, and FIXDUPLICATENAMES options. +* 1.3 : - Added CHECK option, to just check for errors, not to rewrite file +* 1.2 : - checks for abnormaly large usernumbers. +* - Fixed bug where error allocating nrindex buffer crashed the machine +* +***************************************************************************/ +#include + +#include +#include +#include + +#include +#include +#include +#include + +int main(int argc, char **argv); +int insertlogentry (struct Log_entry *index,struct Log_entry *tmplog); +int comparestringsifull (unsigned char *string,unsigned char *string2, int length); +unsigned char upchar (unsigned char c); +static BOOL SaveCurrentUser (BPTR fil); + +struct UserRecord *user = NULL; +struct Log_entry tmplog; + +ULONG users = 0; + +char *vers = "\0$VER: FixIndex 1.4 (23.2.95)\n\r"; /* day,month,year */ + +#define TEMPLATE "USER,INDEX,NRINDEX,CONFIG,CHECK/S,KILLHIGH/S,FIXDUPLICATESNR/S,FIXDUPLICATENAMES/S" +#define OPT_COUNT 8 + +#define HACKSIZEOFUSERRECORD 882 +/* Husk og fiks configfile skriving også... +*/ + +int main(int argc, char **argv) +{ + BPTR fil = NULL; + int n,maxusernr = 0,oldmaxusernr = 0,record,k; + ULONG *nrindex = NULL; + struct Log_entry *index = NULL; + struct RDArgs *RDArg; + BOOL DoBreak = FALSE; + LONG *result[OPT_COUNT] = {0,0,0,0,0,0,0,0}; + char *userfname,*indexfname,*nrindexfname,*configfnane,*ptr; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + userfname = result[0] ? (char *) result[0] : "userfile"; + indexfname = result[1] ? (char *) result[1] : "userfile.index"; + nrindexfname = result[2] ? (char *) result[2] : "userfile.nrindex"; + configfnane = result[3] ? (char *) result[3] : "configfile"; + + while (1) { + if (FindPort(MainPortName)) { + printf ("FixIndex won't work if abbs is running..\n"); + break; + } + + if (!(user = AllocVec (HACKSIZEOFUSERRECORD,0L))) { + printf ("Error allocating memory"); + break; + } + + if (!(fil = Open (userfname,MODE_OLDFILE))) { + printf ("Error opening userfile\n"); + break; + } + + record = 0; + do { + n = Read (fil,user,HACKSIZEOFUSERRECORD); + if (user->Usernr > maxusernr) { + oldmaxusernr = maxusernr; + maxusernr = user->Usernr; + } + + if (user->Usernr > 100000) { + printf ("Hiiiigh usernr %d for %s (%d)\n",user->Usernr,user->Name,record+1); + if (result[5]) { + maxusernr = oldmaxusernr; + ptr = (char *) &user; + for (k = 0; k < HACKSIZEOFUSERRECORD; k++) + *ptr = '0'; + user->Usernr = record; + sprintf (user->Name,"Kill Me%d",record); + + if (!(SaveCurrentUser (fil))) { + DoBreak = TRUE; + break; + } + } + } + + if (n == HACKSIZEOFUSERRECORD) + record += 1; + } while (n == HACKSIZEOFUSERRECORD); + + if (DoBreak) + break; + + if (!n) { + Seek (fil,0,OFFSET_BEGINNING); + n = IoErr(); + } + + if (n) { + printf ("Error reading userfile\n"); + break; + } + maxusernr += 1; + + printf ("%d users (%d bytes), maximum users = %d\n",record, + HACKSIZEOFUSERRECORD * record,maxusernr); + + if ((!(nrindex = AllocVec ((maxusernr * 4)+4,0))) || + (!(index = (struct Log_entry *) AllocVec ((maxusernr+1) * sizeof (struct Log_entry),MEMF_CLEAR)))) { + printf ("Error allocating memory\n"); + break; + } + + for (n = 0; n <= maxusernr; n++) + nrindex[n] = -1L; + + record = 0; + n = Read (fil,user,HACKSIZEOFUSERRECORD); + while (n == HACKSIZEOFUSERRECORD) { + tmplog.l_RecordNr = record; + tmplog.l_UserNr = user->Usernr; + + for (k = 0; k < users; k++) { + if (user->Usernr == index[k].l_UserNr) { + printf ("Duplicate usernumbers for %s. Same as %s (%d)\n",user->Name,index[k].l_Name,user->Usernr); + + if (result[6]) { + user->Usernr = maxusernr+1; + tmplog.l_UserNr = user->Usernr; + if (!(SaveCurrentUser (fil))) { + DoBreak = TRUE; + break; + } + printf ("1 Usernumber crash problem fixed. Please restart\n"); + DoBreak = TRUE; + break; + } + +/* if (!result[4]) +*/ n = 1; + } + } + if (DoBreak) + break; + + if (n == 1) + break; + + memset (tmplog.l_Name,'\0',sizeof (NameT)); + strncpy (tmplog.l_Name,user->Name,Sizeof_NameT); + tmplog.l_pad = 0; + tmplog.l_UserBits = user->Userbits; + + if (insertlogentry (index,&tmplog)) { + if (result[7]) { + sprintf (user->Name,"Kill Me%d",record); + if (!(SaveCurrentUser (fil))) { + DoBreak = TRUE; + break; + } + printf ("1 Username crash problem fixed. Please restart\n"); + DoBreak = TRUE; + break; + } + n = 1; + break; + } + record += 1; + users += 1; + + if (strlen (user->Name) > Sizeof_NameT) { + user->Name[Sizeof_NameT] = '\0'; + Seek (fil,-HACKSIZEOFUSERRECORD,OFFSET_CURRENT); + if (IoErr()) { + n = 0; + printf ("Error fixing username\n"); + } else + n = Write (fil,user,HACKSIZEOFUSERRECORD); + } + + if (n == HACKSIZEOFUSERRECORD) + n = Read (fil,user,HACKSIZEOFUSERRECORD); + } + + if (DoBreak) + break; + + if (n) { + printf ("Error reading userfile\n"); + break; + } + + for (n = 0; n <= maxusernr; n++) + nrindex[n] = -1L; + + for (record = 0; record < users; record++) { + nrindex[index[record].l_UserNr] = record; +/* printf ("%s\n",index[record].l_Name); +*/ } + Close (fil); + fil = NULL; + +/* if (!result[4]) { +*/ if (!(fil = Open (indexfname,MODE_NEWFILE))) { + printf ("Error creating index file\n"); + break; + } + n = sizeof (struct Log_entry) * users; + if (n != Write (fil,index,n)) { + printf ("Error writing userfile.index\n"); + break; + } + Close (fil); + + if (!(fil = Open (nrindexfname,MODE_NEWFILE))) { + printf ("Error creating nrindex file\n"); + break; + } + if (((maxusernr * 4)+4) != Write (fil,nrindex,(maxusernr * 4)+4)) { + printf ("Error writing userfile.nrindex\n"); + break; + } + Close (fil); + + if (!(fil = Open (configfnane,MODE_READWRITE))) { + printf ("Error opening config file\n"); + break; + } + + Seek (fil,14,OFFSET_BEGINNING); + n = IoErr(); + + if (n) { + printf ("Error Seek'ing config file (%n)\n"); + break; + } + + if ((4 != Write (fil,&users,4)) || (4 != Write (fil,&maxusernr,4))) { + printf ("Error writing configfile\n"); + break; + } +/* } +*/ break; + } + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + if (user) FreeVec (user); + if (index) FreeVec (index); + if (nrindex) FreeVec (nrindex); + if (fil) Close (fil); + + return (0); +} + +static BOOL SaveCurrentUser (BPTR fil) +{ + int n; + + Seek (fil,-HACKSIZEOFUSERRECORD,OFFSET_CURRENT); + if (IoErr()) { + n = 0; + } else { + n = Write (fil,user,HACKSIZEOFUSERRECORD); + if (n != HACKSIZEOFUSERRECORD) + n = 0; + } + + if (!n) + printf ("Error fixing user %d,%s\n",user->Usernr,user->Name); + + return ((BOOL) n); +} + + +int insertlogentry (struct Log_entry *index,struct Log_entry *tmplog) +{ + int n,l; + + n = 0; + + while (1) { + l = comparestringsifull (index[n].l_Name,tmplog->l_Name,sizeof (NameT)); + if (!l) { + printf ("Duplicate name %s\n",tmplog->l_Name); + return (1); + } + if ((l < 0) && (*index[n].l_Name)) { + n += 1; + continue; + } + + for (l = users; l >= n; l--) + memcpy (&index[l+1],&index[l],sizeof (struct Log_entry)); + + memcpy (&index[n],tmplog,sizeof (struct Log_entry)); + + break; + } + + return (0); +} + +/******************************* +;result = comparestringsifull (streng,streng1,length) +;Zero bit a0.l a1.l d0.w +*******************************/ + +int comparestringsifull (unsigned char *string,unsigned char *string2, int length) +{ + unsigned char c,d; + + while (--length > 0) { + c = upchar (*(string++)); + d = upchar (*(string2++)); + + if (c == d) + continue; + + if (c > d) + return (1); + + if (c < d) + return (-1); + } + + return (0); +} + +unsigned char upchar (unsigned char c) +{ + if (c < 'a') + return (c); + + if (c <= 'z') + return ((unsigned char) (c - 32)); + + if (c < 0xe0) + return (c); + + return ((unsigned char) (c - 32)); +} diff --git a/c/JEO.c b/c/JEO.c new file mode 100644 index 0000000..9a03690 --- /dev/null +++ b/c/JEO.c @@ -0,0 +1,36 @@ +;/* +sc5 -j73 -v JEO +copy JEO.c -J:JEO.c +copy JEO.c dabbs:c/ +copy JEO.o dabbs:c/ +quit +*/ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#define a4a5 register __a4 struct ramblocks *nodebase,register __a5 struct Mainmemory *mainmeory +#define usea4a5 nodebase,mainmeory + +extern __asm far writetexto (register __a0 char *text,a4a5); + +__asm VOID Test (a4a5) +{ + writetexto ("Number Ref # Conference To Subject", usea4a5); +} diff --git a/c/KillMsg.c b/c/KillMsg.c new file mode 100644 index 0000000..d63c04b --- /dev/null +++ b/c/KillMsg.c @@ -0,0 +1,187 @@ +/*************************************************************************** +* KillMsg 0.1 (14/04-95) +* +* Kills messages from ABBS "forever". +* +* Usage : Conf/A,NR=Number/N/A +* +***************************************************************************/ +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct MessageRecord msgheader; + +int main(int argc, char **argv); +int HandleMsg (struct ABBSmsg *msg); +int Setup (void); +void Cleanup (void); +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr); +int savemsgheader (struct MessageRecord *msgheader, UWORD confnr); + +#define TEMPLATE "Conf/A,NR=Number/N/A" +#define OPT_COUNT 2 + +char *vers = "\0$VER: KillMsg v0.1"; + +struct ConfigRecord *config; + +int main(int argc, char **argv) +{ + int n,k; + int confnr; + LONG *result[OPT_COUNT] = {0,0}; + int ret = 10; + struct RDArgs *RDArg; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + while (1) { + + msg.Command = Main_Getconfig; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + break; + } + config = (struct ConfigRecord *) msg.Data; + + k = strlen ((char *) result[0]); + for (n = 0; n < config->Maxconferences; n++) + if (*(config->firstconference[n].n_ConfName)) + if (!strnicmp ((char *) result[0],config->firstconference[n].n_ConfName,k)) + break; + + if (n == config->Maxconferences) { + printf ("Error: Unknown conference (%s)\n",result[0]); + break; + } else if (n == 2 || n == 3) { + printf ("Error: Not allowed to kill in this conference (%s)\n", + config->firstconference[n].n_ConfName); + break; + } + confnr = n; + + if (n = loadmsgheader (&msgheader,*result[1],confnr)) { + printf ("Error loading message %s:%d (%d)\n", + config->firstconference[confnr].n_ConfName,*result[1],n); + break; + } + + if (msgheader.MsgStatus & MSTATF_Dontshow) { + printf ("Error: Message already killed\n"); + break; + } + + printf ("%s:#%d subj:%s\n", + config->firstconference[confnr].n_ConfName,msgheader.Number, + msgheader.Subject); + + msgheader.MsgStatus |= MSTATF_Dontshow; + + if (n = savemsgheader (&msgheader,confnr)) + printf ("Error saving message %s:%d (%d)\n", + config->firstconference[confnr].n_ConfName,msgheader.Number,n); + + ret = 0; + + break; + } + Cleanup(); + } + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +int loadmsgheader (struct MessageRecord *msgheader, ULONG msgnr, UWORD confnr) +{ + int n; + + msg.Command = Main_loadmsgheader; + msg.Data = (ULONG) msgheader; + msg.UserNr = msgnr - 1; + msg.Error = confnr * 2; + n = HandleMsg (&msg); + + if (n == Error_NoPort) + printf ("Error talking to ABBS\n"); + + return (n); +} + +int savemsgheader (struct MessageRecord *msgheader, UWORD confnr) +{ + int n; + + msg.Command = Main_savemsgheader; + msg.Data = (ULONG) msgheader; + msg.UserNr = confnr * 2; + n = HandleMsg (&msg); + + if (n == Error_NoPort) + printf ("Error talking to ABBS\n"); + + return (n); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport,msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) + ret = 1; + else + printf ("Error creating message port\n"); + } else + printf ("ABBS must be running for KillMsg to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); +} diff --git a/c/ListFiles.c b/c/ListFiles.c new file mode 100644 index 0000000..d7bb0a4 --- /dev/null +++ b/c/ListFiles.c @@ -0,0 +1,269 @@ +/*************************************************************************** +* Listfiles 1.0 (1/04-94) +* +* List files from cli +* +* Usage : +* +***************************************************************************/ +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct Library *UtilityBase = NULL; + +int main(int argc, char **argv); +int HandleMsg (struct ABBSmsg *msg); +int Setup (void); +void Cleanup (void); +void printdatestamp (struct DateStamp *ds); +unsigned char *upstring (unsigned char *string); +unsigned char upchar (unsigned char c); + +#define TEMPLATE "Since/K,ToConf/S,Upcase/S,Upload/S,All/S,Check/S,Fix/S" +#define OPT_COUNT 7 + +char *vers = "\0$VER: ListFiles v1.0 (1.4.94)\n\r"; /* day,month,year */ + +struct ConfigRecord *config; + +int main(int argc, char **argv) +{ + int ret = 10,n,r,k; + int err,first; + BPTR lock; + struct Fileentry fentry; + char string[160]; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0,0,0,0,0,0,0}; + struct DateTime dt; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (Setup()) { + while (1) { + if (result[0]) { + dt.dat_Format = FORMAT_DOS; /* FORMAT_DEF; */ + dt.dat_Flags = 0; + dt.dat_StrDate = (unsigned char *) result[0]; + dt.dat_StrTime = NULL; + if (!StrToDate (&dt)) { + printf ("Error paring SINCE parameter\n"); + break; + } + } + + for (n = 0; n < config->ActiveDirs; n++) { + r = config->FileOrder[n]-1; + +/* Lister ikke private engang hvis vi ikke har all +*/ + if (!r && !result[4]) + continue; + +/* Viser ikke upload hvis ikke all eller Upload er satt +*/ + if ((r == 1) && (!result[4] && !result[3])) + continue; + + if (*config->DirNames[r]) { + printf ("\n(%s)\n",config->DirNames[r]); + first = 1; + } else + continue; + + for (k = 1; 1; k++) { + msg.Command = Main_loadfileentry; + msg.UserNr = r; + msg.arg = k; + msg.Data = (ULONG) &fentry; + err = HandleMsg (&msg); + + if (err == Error_EOF) + break; + + if (err != Error_OK) { + printf ("Error reading fileentry\n"); + break; + } + + if (fentry.Filestatus & (FILESTATUSF_Filemoved|FILESTATUSF_Fileremoved)) + continue; + +/* Har vi all, viser vi alt. Basta +*/ + if (!result[4]) { + +/* Viser ikke privat til person +*/ + if (fentry.Filestatus & FILESTATUSF_PrivateUL) + continue; + +/* Hvis ikke ToConf, tar vi ikke filer som er private til conf +*/ + if (!result[1] && (fentry.Filestatus & FILESTATUSF_PrivateConfUL)) + continue; + } + + if (result[0]) + if (dt.dat_Stamp.ds_Days > fentry.ULdate.ds_Days) + continue; + + if (result[5] || result[6]) { + strcpy (string,config->DirPaths[r]); + if (AddPart (string,fentry.Filename,160)) + if (lock = Lock (string,SHARED_LOCK)) { + UnLock (lock); + continue; + } + if (result[6]) { + fentry.Filestatus |= FILESTATUSF_Fileremoved; + msg.Command = Main_savefileentry; + msg.UserNr = r; + msg.arg = k; + msg.Data = (ULONG) &fentry; + err = HandleMsg (&msg); + } + } + + if (first) { + printf ("\n File name Date Kb Dls File description\n" + " --------- ---- -- --- ----------------\n"); + first = 0; + } + + if (result[2]) + upstring ((unsigned char *) &fentry.Filename); + + printf ("%c %-17s",(fentry.Infomsgnr ? 'I' : ' '),fentry.Filename); + printdatestamp (&fentry.ULdate); + printf ("%5d %3d %-39s",fentry.Fsize/1024,fentry.AntallDLs, + fentry.Filedescription); + printf ("%s%s%s\n", + ((fentry.Filestatus & FILESTATUSF_PrivateUL) ? " (PrivToPerson)" : ""), + ((fentry.Filestatus & FILESTATUSF_PrivateConfUL) ? " (PrivToConf)" : ""), + ((fentry.Filestatus & FILESTATUSF_FreeDL) ? " (Free)" : "")); + } + + } + break; + } + Cleanup(); + } + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +void printdatestamp (struct DateStamp *ds) +{ + int tmp; + struct ClockData dt; + + tmp = (ds->ds_Days*24*60 + ds->ds_Minute) * 60; + tmp += ds->ds_Tick/TICKS_PER_SECOND; + Amiga2Date (tmp,&dt); + printf ("%02d%02d%02d",dt.year % 100,dt.mday,dt.month); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport,msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} +unsigned char *upstring (unsigned char *string) +{ + char *ptr = string; + + while (*ptr) { + *ptr = upchar (*ptr); + ptr += 1; + } + + return (string); +} +unsigned char upchar (unsigned char c) +{ + if (c < 'a') + return (c); + + if (c <= 'z') + return ((unsigned char) (c - 32)); + + if (c < 0xe0) + return (c); + + return ((unsigned char) (c - 32)); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (UtilityBase = OpenLibrary ("utility.library",36)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) { +/* Get access to config structure +*/ + msg.Command = Main_testconfig; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + } else { + config = (struct ConfigRecord *) msg.Data; + ret = 1; + } + } else + printf ("Error creating message port\n"); + } else + printf ("Error opening utility.library\n"); + } else + printf ("ABBS must be running for Listfiles to work\n"); + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); + if (UtilityBase) CloseLibrary (UtilityBase); +} diff --git a/c/Makefile b/c/Makefile new file mode 100644 index 0000000..17ce612 --- /dev/null +++ b/c/Makefile @@ -0,0 +1,275 @@ +# +# SAS smake makefile, for SAS C V6.0 +# + +CFLAGS = noversion nomultipleincludes parameters=register stringmerge structequivalence incdirectory=include: incdir=dabbs:include/ debug=full #optimize +LIBS = lib:sc.lib lib:amiga.lib +STARTUP = lib:c.o + +NetTestObjs = NetTest.o + +AddMsgObjs = AddMsg.o + +KillMsgObjs = KillMsg.o + +CryptPasswordsObjs = CryptPasswords.o + +FindUnreadObjs = FindUnread.o + +FixIndexObjs = FixIndex.o + +CheckIndexObjs = CheckIndex.o + +AddFileObjs = AddFile.o + +QWKObjs = QWK.o + +ConvertConfigObjs = ConvertConfig.o + +ShowuserfileObjs = Showuserfile.o + +ConfigNodeObjs = ConfigNode.o ConfigNodegui.o Boopsi.o + +UserEditorObjs = UserEditor.o UserEditorgui.o + +FrontDoorObjs = FrontDoor.o + +FrontTestObjs = FrontTest.o + +BroadcastObjs = Broadcast.o + +ListFilesObjs = ListFiles.o + +FindLostFilesObjs = FindLostFiles.o + +RexxObjs = rexx.o + +all: NetTest AddMSg AddFile Broadcast QWK FrontDoor FrontTest ConfigNode Rexx FixIndex CheckIndex ListFiles UserEditor FindLostFiles ShowConfig FindUnread KillMsg CryptPasswords ConvertConfig Showuserfile + +.c.o: + ; Compiling $* + @ sc $(CFLAGS) $* + +.s.o: + arg $* -iinclude: -q -o$*.o + +RUN: NetTest AddMsg AddFile FixIndex CheckIndex Listfiles FindLostFiles ShowConfig FindUnread KillMsg CryptPasswords + slink NetTest to ram:NetTest NODEBUG QUIET NOICONS + slink AddMsg to ram:AddMsg NODEBUG QUIET NOICONS + slink AddFile to ram:AddFile NODEBUG QUIET NOICONS + slink QWK to ram:QWK NODEBUG QUIET NOICONS + slink ConfigNode to ram:ConfigNode NODEBUG QUIET NOICONS + slink UserEditor to ram:UserEditor NODEBUG QUIET NOICONS + slink FrontDoor to ram:FrontDoor NODEBUG QUIET NOICONS + slink FrontTest to ram:FrontTest NODEBUG QUIET NOICONS + slink Rexx to ram:Rexx NODEBUG QUIET NOICONS + slink FixIndex to ram:FixIndex NODEBUG QUIET NOICONS + slink CheckIndex to ram:CheckIndex NODEBUG QUIET NOICONS + slink Listfiles to ram:Listfiles NODEBUG QUIET NOICONS + slink FindLostFiles to ram:FindLostFiles NODEBUG QUIET NOICONS + slink ShowConfig to ram:ShowConfig NODEBUG QUIET NOICONS + slink FindUnread to ram:FindUnread NODEBUG QUIET NOICONS + slink KillMsg to ram:KillMsg NODEBUG QUIET NOICONS + slink CryptPasswords to ram:CryptPasswords NODEBUG QUIET NOICONS + slink ConvertConfig to ram:ConvertConfig NODEBUG QUIET NOICONS + slink Showuserfile to ram:Showuserfile NODEBUG QUIET NOICONS + +AddMsg: $(AddMsgObjs) + ; Linking $* + @ slink +#include +#include +#include +#include + +UBYTE newpw[14]; +UBYTE oldpw[14]; + +struct UserRecord user; + +VOID main (int argc, char **argv) +{ + int n; + char *ptr, *ptr2; + + memset (newpw, '\0' , sizeof (newpw)); + memset (oldpw, '\0' , sizeof (oldpw)); + strcpy (oldpw, argv[1]); + + if (!(ACrypt (newpw, oldpw, "1 1"))) + printf ("Acrypt failed for user %s\n", "Jan_Erik Olausen"); + printf ("%s\n", newpw); + + ptr = newpw; + ptr2 = oldpw; + for (n = 0; n < sizeof (PassT); n++) + *(ptr2++) = *(ptr++); +// user.pass_10 = *(ptr++); +// user.pass_11 = *(ptr++); +} diff --git a/c/Usereditorgui.c b/c/Usereditorgui.c new file mode 100644 index 0000000..48c2858 --- /dev/null +++ b/c/Usereditorgui.c @@ -0,0 +1,426 @@ +/* + * Source machine generated by GadToolsBox V2.0 + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Geir Inge Høsteng + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "Usereditorgui.h" + +#include + +static struct Screen *Scr = NULL; +static UBYTE *PubScreenName = NULL; +static APTR VisualInfo = NULL; +struct Window *ABBSUserEditorWnd = NULL; +static struct Gadget *ABBSUserEditorGList = NULL; +struct Menu *ABBSUserEditorMenus = NULL; +struct Gadget *ABBSUserEditorGadgets[44]; +static UWORD ABBSUserEditorLeft = 0; +static UWORD ABBSUserEditorTop = 13; +static UWORD ABBSUserEditorWidth = 558; +static UWORD ABBSUserEditorHeight = 288; +static UBYTE *ABBSUserEditorWdt = (UBYTE *)"ABBS UserEditor"; +static struct TextAttr *Font, Attr; +static UWORD FontX, FontY; +static UWORD OffX, OffY; +static struct TextFont *ABBSUserEditorFont = NULL; + +static UBYTE *protocol0Labels[] = { + (UBYTE *)"(none)", + (UBYTE *)"Zmodem", + (UBYTE *)"Xmodem", + (UBYTE *)"Xmodem-CRC", + (UBYTE *)"Ymodem", + (UBYTE *)"Ymodem-Batch", + (UBYTE *)"Ymodem-G", + NULL }; + +static UBYTE *charset0Labels[] = { + (UBYTE *)"ISO", + (UBYTE *)"IBM", + (UBYTE *)"IBN", + (UBYTE *)"US7", + (UBYTE *)"UK7", + (UBYTE *)"GE7", + (UBYTE *)"FR7", + (UBYTE *)"SF7", + (UBYTE *)"NO7", + (UBYTE *)"DE7", + (UBYTE *)"SP7", + (UBYTE *)"IT7", + NULL }; + +static UBYTE *scratchformat0Labels[] = { + (UBYTE *)"Text", + (UBYTE *)"Arc", + (UBYTE *)"Lzh", + (UBYTE *)"Zip", + (UBYTE *)"Lharc", + (UBYTE *)"Arj", + (UBYTE *)"Zoo", + NULL }; + +static UBYTE *xpertlevel0Labels[] = { + (UBYTE *)"Novice", + (UBYTE *)"Junior", + (UBYTE *)"Expert", + (UBYTE *)"SuperExpert", + NULL }; + +static UBYTE *grabformat0Labels[] = { + (UBYTE *)"MBBS", + (UBYTE *)"QWK", + NULL }; + +static struct Node Users_ListView0Nodes[] = { + ( struct Node * )&Users_ListView0List.mlh_Tail, ( struct Node * )&Users_ListView0List.mlh_Head, 0, 0, "." }; + +struct MinList Users_ListView0List = { + ( struct MinNode * )&Users_ListView0Nodes[0], ( struct MinNode * )NULL, ( struct MinNode * )&Users_ListView0Nodes[0] }; + +static struct Node conference_listview0Nodes[] = { + ( struct Node * )&conference_listview0List.mlh_Tail, ( struct Node * )&conference_listview0List.mlh_Head, 0, 0, "." }; + +struct MinList conference_listview0List = { + ( struct MinNode * )&conference_listview0Nodes[0], ( struct MinNode * )NULL, ( struct MinNode * )&conference_listview0Nodes[0] }; + +static struct NewMenu ABBSUserEditorNewMenu[] = { + NM_TITLE, (STRPTR)"Project", NULL, 0, NULL, NULL, + NM_ITEM, (STRPTR)"About", (STRPTR)"A", 0, 0L, NULL, + NM_ITEM, (STRPTR)"Save user", (STRPTR)"S", 0, 0L, NULL, + NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL, + NM_ITEM, (STRPTR)"Quit", (STRPTR)"Q", 0, 0L, NULL, + NM_END, NULL, NULL, 0, 0L, NULL }; + +static UWORD ABBSUserEditorGTypes[] = { + LISTVIEW_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + STRING_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + CYCLE_KIND, + CYCLE_KIND, + CYCLE_KIND, + CYCLE_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + CHECKBOX_KIND, + TEXT_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + MX_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + INTEGER_KIND, + LISTVIEW_KIND, + INTEGER_KIND, + BUTTON_KIND +}; + +static struct NewGadget ABBSUserEditorNGad[] = { + 273, 15, 265, 145, (UBYTE *)"Users", NULL, GD_Users_ListView, PLACETEXT_ABOVE|NG_HIGHLABEL, NULL, NULL, + 9, 5, 252, 13, NULL, NULL, GD_username, 0, NULL, NULL, + 9, 21, 252, 13, NULL, NULL, GD_address, 0, NULL, NULL, + 9, 37, 252, 13, NULL, NULL, GD_citystate, 0, NULL, NULL, + 155, 53, 77, 13, NULL, NULL, GD_passwd, 0, NULL, NULL, + 9, 53, 140, 13, NULL, NULL, GD_homephone, 0, NULL, NULL, + 9, 69, 140, 13, NULL, NULL, GD_workphone, 0, NULL, NULL, + 9, 85, 36, 13, NULL, NULL, GD_timelimit, 0, NULL, NULL, + 51, 85, 36, 13, NULL, NULL, GD_filelimit, 0, NULL, NULL, + 92, 85, 36, 13, NULL, NULL, GD_pagelength, 0, NULL, NULL, + 136, 85, 122, 13, NULL, NULL, GD_protocol, 0, NULL, NULL, + 155, 69, 71, 13, NULL, NULL, GD_charset, 0, NULL, NULL, + 9, 101, 71, 13, NULL, NULL, GD_scratchformat, 0, NULL, NULL, + 86, 100, 118, 13, NULL, NULL, GD_xpertlevel, 0, NULL, NULL, + 9, 117, 26, 11, (UBYTE *)"Killed", NULL, GD_Killed, PLACETEXT_RIGHT, NULL, NULL, + 9, 129, 26, 11, (UBYTE *)"Use FSE", NULL, GD_usefse, PLACETEXT_RIGHT, NULL, NULL, + 9, 141, 26, 11, (UBYTE *)"ANSI menus", NULL, GD_ansimenus, PLACETEXT_RIGHT, NULL, NULL, + 9, 153, 26, 11, (UBYTE *)"Color msgs", NULL, GD_colormsg, PLACETEXT_RIGHT, NULL, NULL, + 9, 165, 26, 11, (UBYTE *)"G&R", NULL, GD_g_r, PLACETEXT_RIGHT, NULL, NULL, + 9, 177, 26, 11, (UBYTE *)"Review own", NULL, GD_reviewown, PLACETEXT_RIGHT, NULL, NULL, + 9, 189, 26, 11, (UBYTE *)"ANSI", NULL, GD_ansi, PLACETEXT_RIGHT, NULL, NULL, + 9, 201, 26, 11, (UBYTE *)"Clear Scr.", NULL, GD_clearscreen, PLACETEXT_RIGHT, NULL, NULL, + 9, 213, 26, 11, (UBYTE *)"Use Raw", NULL, GD_raw, PLACETEXT_RIGHT, NULL, NULL, + 9, 224, 26, 11, (UBYTE *)"Filter", NULL, GD_filter, PLACETEXT_RIGHT, NULL, NULL, + 9, 235, 26, 11, (UBYTE *)"Send bulletins", NULL, GD_sendbulletins, PLACETEXT_RIGHT, NULL, NULL, + 7, 268, 255, 13, NULL, NULL, GD_lastontext, 0, NULL, NULL, + 134, 117, 68, 13, NULL, NULL, GD_resymemsgnr, 0, NULL, NULL, + 175, 148, 36, 13, NULL, NULL, GD_timeused, 0, NULL, NULL, + 135, 133, 36, 13, NULL, NULL, GD_Gadget280, 0, NULL, NULL, + 12, 248, 17, 9, NULL, NULL, GD_grabformat, PLACETEXT_RIGHT, NULL, NULL, + 134, 148, 36, 13, NULL, NULL, GD_byteratio, 0, NULL, NULL, + 134, 164, 36, 13, NULL, NULL, GD_fileratio, 0, NULL, NULL, + 134, 179, 36, 13, NULL, NULL, GD_uploaded, 0, NULL, NULL, + 134, 194, 36, 13, NULL, NULL, GD_downloaded, 0, NULL, NULL, + 134, 209, 36, 13, NULL, NULL, GD_kbupload, 0, NULL, NULL, + 134, 223, 36, 13, NULL, NULL, GD_kbdownload, 0, NULL, NULL, + 175, 133, 52, 13, NULL, NULL, GD_timeson, 0, NULL, NULL, + 175, 164, 36, 13, NULL, NULL, GD_ftimeused, 0, NULL, NULL, + 175, 179, 52, 13, NULL, NULL, GD_msgread, 0, NULL, NULL, + 175, 194, 52, 13, NULL, NULL, GD_msgdumped, 0, NULL, NULL, + 175, 223, 52, 13, NULL, NULL, GD_totaltime, 0, NULL, NULL, + 275, 168, 265, 121, (UBYTE *)"Conferences", NULL, GD_conference_listview, PLACETEXT_ABOVE|NG_HIGHLABEL, NULL, NULL, + 175, 209, 52, 13, NULL, NULL, GD_msgleft, 0, NULL, NULL, + 137, 247, 103, 14, (UBYTE *)"Save user", NULL, GD_saveuser, PLACETEXT_IN, NULL, NULL +}; + +static ULONG ABBSUserEditorGTags[] = { + (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 30, (TAG_DONE), + (GTST_MaxChars), 8, (TAG_DONE), + (GTST_MaxChars), 16, (TAG_DONE), + (GTST_MaxChars), 16, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTCY_Labels), (ULONG)&protocol0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&charset0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&scratchformat0Labels[ 0 ], (TAG_DONE), + (GTCY_Labels), (ULONG)&xpertlevel0Labels[ 0 ], (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (TAG_DONE), + (GTTX_Border), TRUE, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 8, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTMX_Labels), (ULONG)&grabformat0Labels[ 0 ], (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 4, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 2, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (TAG_DONE), + (GTIN_Number), 0, (GTIN_MaxChars), 5, (TAG_DONE), + (TAG_DONE) +}; + +static UWORD ComputeX( UWORD value ) +{ + return(( UWORD )((( FontX * value ) + 4 ) / 8 )); +} + +static UWORD ComputeY( UWORD value ) +{ + return(( UWORD )((( FontY * value ) + 4 ) / 8 )); +} + +static void ComputeFont( UWORD width, UWORD height ) +{ + Forbid(); + Font = &Attr; + Font->ta_Name = (STRPTR)GfxBase->DefaultFont->tf_Message.mn_Node.ln_Name; + Font->ta_YSize = FontY = GfxBase->DefaultFont->tf_YSize; + FontX = GfxBase->DefaultFont->tf_XSize; + Permit(); + + OffX = Scr->WBorLeft; + OffY = Scr->RastPort.TxHeight + Scr->WBorTop + 1; + + if ( width && height ) { + if (( ComputeX( width ) + OffX + Scr->WBorRight ) > Scr->Width ) + goto UseTopaz; + if (( ComputeY( height ) + OffY + Scr->WBorBottom ) > Scr->Height ) + goto UseTopaz; + } + return; + +UseTopaz: + Font->ta_Name = (STRPTR)"topaz.font"; + FontX = FontY = Font->ta_YSize = 8; +} + +int SetupScreen( void ) +{ + if ( ! ( Scr = LockPubScreen( PubScreenName ))) + return( 1L ); + + ComputeFont( 0, 0 ); + + if ( ! ( VisualInfo = GetVisualInfo( Scr, TAG_DONE ))) + return( 2L ); + + return( 0L ); +} + +void CloseDownScreen( void ) +{ + if ( VisualInfo ) { + FreeVisualInfo( VisualInfo ); + VisualInfo = NULL; + } + + if ( Scr ) { + UnlockPubScreen( NULL, Scr ); + Scr = NULL; + } +} + +void ABBSUserEditorRender( void ) +{ + ComputeFont( ABBSUserEditorWidth, ABBSUserEditorHeight ); + + DrawBevelBox( ABBSUserEditorWnd->RPort, OffX + ComputeX( 3 ), + OffY + ComputeY( 2 ), + ComputeX( 264 ), + ComputeY( 284 ), + GT_VisualInfo, VisualInfo, TAG_DONE ); +} + +int OpenABBSUserEditorWindow( void ) +{ + struct NewGadget ng; + struct Gadget *g; + UWORD lc, tc; + UWORD wleft = ABBSUserEditorLeft, wtop = ABBSUserEditorTop, ww, wh; + + ComputeFont( ABBSUserEditorWidth, ABBSUserEditorHeight ); + + ww = ComputeX( ABBSUserEditorWidth ); + wh = ComputeY( ABBSUserEditorHeight ); + + if (( wleft + ww + OffX + Scr->WBorRight ) > Scr->Width ) wleft = Scr->Width - ww; + if (( wtop + wh + OffY + Scr->WBorBottom ) > Scr->Height ) wtop = Scr->Height - wh; + + if ( ! ( ABBSUserEditorFont = OpenDiskFont( Font ))) + return( 5L ); + + if ( ! ( g = CreateContext( &ABBSUserEditorGList ))) + return( 1L ); + + for( lc = 0, tc = 0; lc < ABBSUserEditor_CNT; lc++ ) { + + CopyMem((char * )&ABBSUserEditorNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget )); + + ng.ng_VisualInfo = VisualInfo; + ng.ng_TextAttr = Font; + ng.ng_LeftEdge = OffX + ComputeX( ng.ng_LeftEdge ); + ng.ng_TopEdge = OffY + ComputeY( ng.ng_TopEdge ); + ng.ng_Width = ComputeX( ng.ng_Width ); + ng.ng_Height = ComputeY( ng.ng_Height); + + ABBSUserEditorGadgets[ lc ] = g = CreateGadgetA((ULONG)ABBSUserEditorGTypes[ lc ], g, &ng, ( struct TagItem * )&ABBSUserEditorGTags[ tc ] ); + + while( ABBSUserEditorGTags[ tc ] ) tc += 2; + tc++; + + if ( NOT g ) + return( 2L ); + } + + if ( ! ( ABBSUserEditorMenus = CreateMenus( ABBSUserEditorNewMenu, GTMN_FrontPen, 0L, TAG_DONE ))) + return( 3L ); + + LayoutMenus( ABBSUserEditorMenus, VisualInfo, TAG_DONE ); + + if ( ! ( ABBSUserEditorWnd = OpenWindowTags( NULL, + WA_Left, wleft, + WA_Top, wtop, + WA_Width, ww + OffX + Scr->WBorRight, + WA_Height, wh + OffY + Scr->WBorBottom, + WA_IDCMP, LISTVIEWIDCMP|STRINGIDCMP|INTEGERIDCMP|CYCLEIDCMP|CHECKBOXIDCMP|TEXTIDCMP|MXIDCMP|BUTTONIDCMP|IDCMP_MENUPICK|IDCMP_CLOSEWINDOW|IDCMP_REFRESHWINDOW, + WA_Flags, WFLG_SIZEGADGET|WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_ACTIVATE, + WA_Gadgets, ABBSUserEditorGList, + WA_Title, ABBSUserEditorWdt, + WA_ScreenTitle, "WorkBench Screen", + WA_PubScreen, Scr, + WA_MinWidth, 67, + WA_MinHeight, 21, + WA_MaxWidth, 912, + WA_MaxHeight, 600, + TAG_DONE ))) + return( 4L ); + + SetMenuStrip( ABBSUserEditorWnd, ABBSUserEditorMenus ); + GT_RefreshWindow( ABBSUserEditorWnd, NULL ); + + ABBSUserEditorRender(); + + return( 0L ); +} + +void CloseABBSUserEditorWindow( void ) +{ + if ( ABBSUserEditorMenus ) { + ClearMenuStrip( ABBSUserEditorWnd ); + FreeMenus( ABBSUserEditorMenus ); + ABBSUserEditorMenus = NULL; } + + if ( ABBSUserEditorWnd ) { + CloseWindow( ABBSUserEditorWnd ); + ABBSUserEditorWnd = NULL; + } + + if ( ABBSUserEditorGList ) { + FreeGadgets( ABBSUserEditorGList ); + ABBSUserEditorGList = NULL; + } + + if ( ABBSUserEditorFont ) { + CloseFont( ABBSUserEditorFont ); + ABBSUserEditorFont = NULL; + } +} + diff --git a/c/Usereditorgui.gui b/c/Usereditorgui.gui new file mode 100644 index 0000000000000000000000000000000000000000..9f9bd3a89c7c287e313d2b193b78e29a82039f33 GIT binary patch literal 12702 zcmd^`UyK{Y8Nk0?`?C3SmmV|;ZCa>-<4-9`Q(xM&eTsd5oFjLai=7Y?A;O+L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ht4EV^n@?_k1O*nzh8r9w+#~%d8 z$yYfCd305d#As$HR%B+m$p$Dak#0KZl{698D#z1;sn^$Xq;5|KRCwi&CimcsZ5CSPI3hS+{fO)1+gMFiA89s? zrzA0J#%xx3xaT&P*F;>a947_G>;0T#RV@e2k8mvvmy6~{)10kxoDv*wJk2>)*K+h3 zOt>FNF1&#+q*~?pKybVn5FBrx;2htn<;XBI9~&>@qV5*VHrQSVC1B;1*e^q(sai>M6D)IM)NBKROymYF9 z-dM1Y8itpjS_cy@ep=;y1mBEs-oHM<^^5O6w6v?S{|7 zA#eQt{eI5J-;Kzcuj8}05a@0Jx1;_c%=nG^7jOKeI(`qqvts=I<0H=d1IjOpmrez* zIqy-y`%ke`jLGCJmkdkKx4}MLjecJfyq|o=^?S2S-aI<}O^IcX=hK4s(}y_kEi!rc zjSCG^9lk*}?>WKyd6e_sO6`y}fA@`h8uq0ndn|ALIScc+-fkrS;=&x~?UBh#{)J;T z*%pW4?Fi_vhL5WDdET?n7gurK+hp=igmI|C@V4$x&BIZl-!H_w=G$fRqNi*#J=lE= zHJ-0Vzpn}2FU9(Mhh*M-xmXHbkizKqYIx5H-mk^_d#6lZ*K&1(#xzyp7i99D!F}vJ ze)lx1#s4GLUwo^z@ZD3NWlk^~KNx0h*p8#%Tvgs413!MEW4(H6|L>mSm+r04?vqmc z-4j{m(_E{)ASmymQnFSdoV5m<@O^tE8Z1+*&%>jNieJ{P)OuCnW&8*$?e=&x`ZSB- zwlrW5F4`FK>Y%));#53^XlixEcYErYRCZ)^WPpE}cSr%PH}a>&O&PPTy)4(HhZh%V z!!NHz`1-3i`T+j>+k()2iP6_R*5xX}wy_DBNBS{@|tkE!&PF{|ifQEzbY| literal 0 HcmV?d00001 diff --git a/c/Usereditorgui.h b/c/Usereditorgui.h new file mode 100644 index 0000000..d8679d9 --- /dev/null +++ b/c/Usereditorgui.h @@ -0,0 +1,115 @@ +/* + * Source machine generated by GadToolsBox V2.0 + * which is (c) Copyright 1991-1993 Jaba Development + * + * GUI Designed by : Geir Inge Høsteng + */ + +#define GetString( g ) ((( struct StringInfo * )g->SpecialInfo )->Buffer ) +#define GetNumber( g ) ((( struct StringInfo * )g->SpecialInfo )->LongInt ) + +#define GD_Users_ListView 0 +#define GD_username 1 +#define GD_address 2 +#define GD_citystate 3 +#define GD_passwd 4 +#define GD_homephone 5 +#define GD_workphone 6 +#define GD_timelimit 7 +#define GD_filelimit 8 +#define GD_pagelength 9 +#define GD_protocol 10 +#define GD_charset 11 +#define GD_scratchformat 12 +#define GD_xpertlevel 13 +#define GD_Killed 14 +#define GD_usefse 15 +#define GD_ansimenus 16 +#define GD_colormsg 17 +#define GD_g_r 18 +#define GD_reviewown 19 +#define GD_ansi 20 +#define GD_clearscreen 21 +#define GD_raw 22 +#define GD_filter 23 +#define GD_sendbulletins 24 +#define GD_lastontext 25 +#define GD_resymemsgnr 26 +#define GD_timeused 27 +#define GD_Gadget280 28 +#define GD_grabformat 29 +#define GD_byteratio 30 +#define GD_fileratio 31 +#define GD_uploaded 32 +#define GD_downloaded 33 +#define GD_kbupload 34 +#define GD_kbdownload 35 +#define GD_timeson 36 +#define GD_ftimeused 37 +#define GD_msgread 38 +#define GD_msgdumped 39 +#define GD_totaltime 40 +#define GD_conference_listview 41 +#define GD_msgleft 42 +#define GD_saveuser 43 + +#define GDX_Users_ListView 0 +#define GDX_username 1 +#define GDX_address 2 +#define GDX_citystate 3 +#define GDX_passwd 4 +#define GDX_homephone 5 +#define GDX_workphone 6 +#define GDX_timelimit 7 +#define GDX_filelimit 8 +#define GDX_pagelength 9 +#define GDX_protocol 10 +#define GDX_charset 11 +#define GDX_scratchformat 12 +#define GDX_xpertlevel 13 +#define GDX_Killed 14 +#define GDX_usefse 15 +#define GDX_ansimenus 16 +#define GDX_colormsg 17 +#define GDX_g_r 18 +#define GDX_reviewown 19 +#define GDX_ansi 20 +#define GDX_clearscreen 21 +#define GDX_raw 22 +#define GDX_filter 23 +#define GDX_sendbulletins 24 +#define GDX_lastontext 25 +#define GDX_resymemsgnr 26 +#define GDX_timeused 27 +#define GDX_Gadget280 28 +#define GDX_grabformat 29 +#define GDX_byteratio 30 +#define GDX_fileratio 31 +#define GDX_uploaded 32 +#define GDX_downloaded 33 +#define GDX_kbupload 34 +#define GDX_kbdownload 35 +#define GDX_timeson 36 +#define GDX_ftimeused 37 +#define GDX_msgread 38 +#define GDX_msgdumped 39 +#define GDX_totaltime 40 +#define GDX_conference_listview 41 +#define GDX_msgleft 42 +#define GDX_saveuser 43 + +#define ABBSUserEditor_CNT 44 + +extern struct IntuitionBase *IntuitionBase; +extern struct Library *GadToolsBase; + +extern struct GfxBase *GfxBase; +extern struct MinList Users_ListView0List; +extern struct MinList conference_listview0List; + + +extern int SetupScreen( void ); +extern void CloseDownScreen( void ); +extern void ABBSUserEditorRender( void ); +extern int OpenABBSUserEditorWindow( void ); +extern void CloseABBSUserEditorWindow( void ); diff --git a/c/confignodegui2.h b/c/confignodegui2.h new file mode 100644 index 0000000..9feb0cf --- /dev/null +++ b/c/confignodegui2.h @@ -0,0 +1,91 @@ + +#define HoldpathClicked 1 +#define tmppathClicked 2 +#define Window_xClicked 3 +#define Window_yClicked 4 +#define Window_heightClicked 5 +#define Window_widthClicked 6 +#define NodetypeClicked 7 +#define Modem_InitClicked 8 +#define Modem_on_hookClicked 9 +#define Modem_off_hookClicked 10 +#define Modem_answerClicked 11 +#define Modem_dialClicked 12 +#define Modem_ringClicked 13 +#define Modem_connectClicked 14 +#define Modem_no_carrierClicked 15 +#define Modem_at_stringClicked 16 +#define Minimum_baudClicked 17 +#define Connect_waitClicked 18 +#define Modem_machine_baudClicked 19 +#define Min_between_loginClicked 20 +#define Max_login_timeClicked 21 +#define Locked_baud_rateClicked 22 +#define CTS_RTSClicked 23 +#define Hangup_modeClicked 24 +#define Comm_port_nameClicked 25 +#define Comm_portClicked 26 +#define Tiny_modeClicked 27 +#define screenmodeClicked 28 +#define publicscrenClicked 29 +#define node_typeClicked 30 +#define get_fontClicked 31 +#define get_hold_pathClicked 32 +#define get_tmpdir_pathClicked 33 + +#define b20Clicked 100 +#define b21Clicked 101 +#define b22Clicked 102 +#define b23Clicked 103 +#define b24Clicked 104 +#define b1Clicked 105 +#define b2Clicked 106 +#define b3Clicked 107 +#define b4Clicked 108 +#define b5Clicked 109 +#define b6Clicked 110 +#define b7Clicked 111 +#define b8Clicked 112 +#define b9Clicked 113 +#define b10Clicked 114 +#define b11Clicked 115 +#define b12Clicked 116 +#define b13Clicked 117 +#define b14Clicked 118 +#define b15Clicked 119 +#define b16Clicked 120 +#define b17Clicked 121 +#define b18Clicked 122 +#define b19Clicked 123 +#define Min_time_read_gadgetsClicked 124 + +#define m20Clicked 200 +#define m21Clicked 201 +#define m22Clicked 202 +#define m23Clicked 203 +#define m24Clicked 204 +#define m1Clicked 205 +#define m2Clicked 206 +#define m3Clicked 207 +#define m4Clicked 208 +#define m5Clicked 209 +#define m6Clicked 210 +#define m7Clicked 211 +#define m8Clicked 212 +#define m9Clicked 213 +#define m10Clicked 214 +#define m11Clicked 215 +#define m12Clicked 216 +#define m13Clicked 217 +#define m14Clicked 218 +#define m15Clicked 219 +#define m16Clicked 220 +#define m17Clicked 221 +#define m18Clicked 222 +#define m19Clicked 223 +#define Max_time_read_gadgetsClicked 224 + +#define ConfignodeAbout 300 +#define ConfignodeLoad_config 301 +#define ConfignodeSave_config 302 +#define ConfignodeExit_main 303 diff --git a/c/convertconfig.c b/c/convertconfig.c new file mode 100644 index 0000000..44379bf --- /dev/null +++ b/c/convertconfig.c @@ -0,0 +1,260 @@ + +#include + +#include +#include + +#include +#include + +#include +#include + +struct ConfigRecord *config; +struct OldConfigRecord oldconfig; + +int main(int argc, char **argv); +BOOL buildnewconfigfile(void); +BOOL convertuserfile (char *from,char *to); +void convertuser (struct OldUserRecord *olduser,struct UserRecord *newuser); + +#define TEMPLATE "OldConfig/A,OldUserfile/A,Newconfig,Newuserfile" +#define OPT_COUNT 4 + +char *vers = "\0$VER: ConvertConfig v1.0"; + +int main(int argc, char **argv) +{ + BPTR file = NULL; + char toname[80]; + char usertoname[80]; + int ret = 10; + struct RDArgs *RDArg; + LONG *result[OPT_COUNT] = {0,0,0,0}; + + if (RDArg = ReadArgs(TEMPLATE,(long *) result,NULL)) { + if (file = Open ((char *) result[0],MODE_OLDFILE)) { + if (sizeof (struct OldConfigRecord) == Read (file,&oldconfig, + sizeof (struct OldConfigRecord))) { + Close (file); + + if (buildnewconfigfile()) { + if (result[2]) + strcpy (toname,(char *) result[2]); + else + sprintf (toname,"%s.new",(char *) result[0]); + + if (result[3]) + strcpy (usertoname,(char *) result[3]); + else + sprintf (usertoname,"%s.new",(char *) result[1]); + + if (file = Open (toname,MODE_NEWFILE)) { + if (config->Configsize == Write (file,config,config->Configsize)) { + ret = 0; + } else + printf ("Error writing file %s\n",toname); + Close (file); + file = NULL; + } else + printf ("Error opening file %s (for write)\n",toname); + + if (!ret) + if (convertuserfile ((char *) result[1],usertoname)) + ret = 0; + else + ret = 10; + + if (config) + FreeMem (config,config->Configsize); + } else + printf ("Error creating new config\n"); + } else + printf ("Error reading file %s\n",(char *) result[0]); + if (file) + Close (file); + } else + printf ("Error opening file %s\n",(char *) result[0]); + FreeArgs (RDArg); + } else + PrintFault(IoErr(),argv[0]); + + return (ret); +} + +BOOL convertuserfile (char *from,char *to) +{ + int n; + BPTR in,out; + struct OldUserRecord olduser; + struct UserRecord *newuser; + BOOL ret = FALSE; + + if (newuser = AllocMem (config->UserrecordSize,MEMF_CLEAR)) { + if (in = Open (from,MODE_OLDFILE)) { + if (out = Open (to,MODE_NEWFILE)) { + while (TRUE) { + n = Read (in,&olduser,sizeof (struct OldUserRecord)); + if (n != sizeof (struct OldUserRecord)) { + if (!n) { + ret = TRUE; + break; + } + printf ("Error reading file %s\n",from); + break; + } + convertuser (&olduser,newuser); + + if (config->UserrecordSize != Write (out,newuser, + config->UserrecordSize)) { + printf ("Error writing file %s\n",to); + break; + } + } + Close (out); + } else + printf ("Error opening file %s\n",to); + Close (in); + } else + printf ("Error opening file %s\n",from); + } else + printf ("Error allocating memory (%d bytes)\n",config->UserrecordSize); + + return (ret); +} + +void convertuser (struct OldUserRecord *olduser,struct UserRecord *newuser) +{ + int n; + + memset (newuser,'\0',config->UserrecordSize); + newuser->pass_10 = olduser->pass_10; + newuser->Usernr = olduser->Usernr; + strncpy (newuser->Name,olduser->Name,Sizeof_NameT); + memcpy (newuser->Password,olduser->Password,Sizeof_PassT+1); + strncpy (newuser->Address,olduser->Address,Sizeof_NameT); + strncpy (newuser->CityState,olduser->CityState,Sizeof_NameT); + strncpy (newuser->HomeTelno,olduser->HomeTelno,Sizeof_TelNo); + strncpy (newuser->WorkTelno,olduser->WorkTelno,Sizeof_TelNo); + newuser->pass_11 = olduser->pass_11; + newuser->TimeLimit = olduser->TimeLimit; + newuser->FileLimit = olduser->FileLimit; + newuser->PageLength = olduser->PageLength; + newuser->Protocol = olduser->Protocol; + newuser->Charset = olduser->Charset; + newuser->ScratchFormat = olduser->ScratchFormat; + newuser->XpertLevel = olduser->XpertLevel; + newuser->Userbits = olduser->Userbits; + strncpy (newuser->UserScript,olduser->UserScript,Sizeof_loginscript); + newuser->pad_1332 = 0; + newuser->ResymeMsgNr = olduser->ResymeMsgNr; + newuser->MessageFilterV = olduser->MessageFilterV; + newuser->GrabFormat = olduser->GrabFormat; + newuser->u_ByteRatiov = olduser->u_ByteRatiov; + newuser->u_FileRatiov = olduser->u_FileRatiov; + newuser->Uploaded = olduser->Uploaded; + newuser->Downloaded = olduser->Downloaded; + newuser->KbUploaded = olduser->KbUploaded; + newuser->KbDownloaded = olduser->KbDownloaded; + newuser->TimesOn = olduser->TimesOn; + memcpy (&newuser->LastAccess,&olduser->LastAccess,sizeof (struct DateStamp)); + newuser->TimeUsed = olduser->TimeUsed; + newuser->MsgsLeft = olduser->MsgsLeft; + newuser->MsgsRead = olduser->MsgsRead; + newuser->Totaltime = olduser->Totaltime; + newuser->NFday = olduser->NFday; + newuser->FTimeUsed = olduser->FTimeUsed; + newuser->Savebits = olduser->Savebits; + newuser->MsgaGrab = olduser->MsgaGrab; + + for (n = 0; n < config->Maxconferences; n++) { + newuser->firstuserconf[n].uc_Access = olduser->ConfAccess[n]; + newuser->firstuserconf[n].uc_LastRead = olduser->Conflastread[n]; + } +} + +BOOL buildnewconfigfile(void) +{ + int n; + int numconfs = 100; + int numdirs = 100; + struct ConferenceRecord *confarrray; + struct FileDirRecord *dirarrray; + + n = SIZEOFCONFIGRECORD + + (sizeof (struct ConferenceRecord) * numconfs) + + (sizeof (struct FileDirRecord) * numdirs); + +/* printf ("size = %d\n",n); +*/ + if (config = AllocMem (n,MEMF_CLEAR)) { + config->Revision = ConfigRev; + config->Configsize = n; + config->UserrecordSize = SIZEOFUSERRECORD + + sizeof (struct Userconf)*numconfs; + config->Maxconferences = numconfs; + config->MaxfileDirs = numdirs; + config->Users = oldconfig.Users; + config->MaxUsers = oldconfig.MaxUsers; + strncpy (config->BaseName,oldconfig.BaseName,Sizeof_NameT); + strncpy (config->SYSOPname,oldconfig.SYSOPname,Sizeof_NameT); + config->SYSOPUsernr = oldconfig.SYSOPUsernr; + memset (config->SYSOPpassword,'\0',sizeof (config->SYSOPpassword)); + strncpy (config->SYSOPpassword,oldconfig.SYSOPpassword,Sizeof_PassT); + config->MaxLinesMessage = oldconfig.MaxLinesMessage; + config->ActiveConf = oldconfig.ActiveConf; + config->ActiveDirs = oldconfig.ActiveDirs; + config->NewUserTimeLimit = oldconfig.NewUserTimeLimit; + config->SleepTime = oldconfig.SleepTime; + memset (config->ClosedPassword,'\0',sizeof (config->ClosedPassword)); + config->DefaultCharSet = oldconfig.DefaultCharSet; + config->Cflags = oldconfig.Cflags; + config->NewUserFileLimit = oldconfig.NewUserFileLimit; + config->ByteRatiov = oldconfig.ByteRatiov; + config->FileRatiov = oldconfig.FileRatiov; + config->MinULSpace = oldconfig.MinULSpace; + config->Cflags2 = oldconfig.Cflags2; + config->pad_a123 = 0; + memset (config->dosPassword,'\0',sizeof (config->dosPassword)); + strncpy (config->dosPassword,oldconfig.dosPassword,Sizeof_PassT); + memset (config->cnfg_empty,'\0',sizeof (config->cnfg_empty)); + config->firstFileDirRecord = 0; + + confarrray = (struct ConferenceRecord *) + (((int) config) + (SIZEOFCONFIGRECORD)); + + for (n = 0; n < numconfs; n++) { + if (*(oldconfig.ConfNames[n])) { + strncpy (confarrray[n].n_ConfName,oldconfig.ConfNames[n],Sizeof_NameT); + confarrray[n].n_ConfBullets = oldconfig.ConfBullets[n]; + confarrray[n].n_ConfDefaultMsg = oldconfig.ConfDefaultMsg[n]; + confarrray[n].n_ConfFirstMsg = 1; + confarrray[n].n_ConfOrder = oldconfig.ConfOrder[n]; + confarrray[n].n_ConfSW = oldconfig.ConfSW[n]; + confarrray[n].n_ConfMaxScan = oldconfig.ConfMaxScan[n]; + } else { + memset (&confarrray[n],'\0',sizeof (struct ConferenceRecord)); + } + } + + dirarrray = (struct FileDirRecord *) + (((int) config) + (SIZEOFCONFIGRECORD) + + (numconfs * sizeof (struct ConferenceRecord))); + + for (n = 0; n < numdirs; n++) { + if (*(oldconfig.DirNames[n])) { + strncpy (dirarrray[n].n_DirName,oldconfig.DirNames[n],Sizeof_NameT); + strncpy (dirarrray[n].n_DirPaths,oldconfig.DirPaths[n],Sizeof_NameT); + dirarrray[n].n_FileOrder = oldconfig.FileOrder[n]; + dirarrray[n].n_PrivToConf = 0; + } else { + memset (&dirarrray[n],'\0',sizeof (struct FileDirRecord)); + } + } + + return (TRUE); + } else { + printf ("Error allocating memory (%d bytes)\n",n); + return (FALSE); + } +} diff --git a/c/split.c b/c/split.c new file mode 100644 index 0000000..a9b08af --- /dev/null +++ b/c/split.c @@ -0,0 +1,23 @@ +#include + +void main (int argc, char **argc) +{ + FILE *fil; + int c,state = 0; + + if (argc < 2) { + printf ("Usage: %s \n",argv[0]); + return; + } + + if (!(fil = fopen (argv[1],"r"))) { + printf ("Error opening file : %s\n",argv[1]); + return; + } + + while (1) { + c = fgetc + } + + fclose (fil); +} diff --git a/c/usereditor.c b/c/usereditor.c new file mode 100644 index 0000000..68f68ac --- /dev/null +++ b/c/usereditor.c @@ -0,0 +1,760 @@ +/*************************************************************************** +* UserEditor 1.0 (1/05-94) +* +* Edits userlists +* +* +***************************************************************************/ +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "UserEditorGui.h" + +int main(int argc, char **argv); +int Setup (void); +void Cleanup (void); +int HandleMsg (struct ABBSmsg *msg); +int setuplistview(void); +int setupconflistview(void); +BOOL handleidcmp(void); +void UpdateDisplayNewUser (char *name); +void updateconflistview(void); +void dosaveuser(void); + +char *vers = "\0$VER: UserEditor 0.1 (1.4.94)\n\r"; /* day,month,year */ + +struct IntuitionBase *IntuitionBase = NULL; +struct GfxBase *GfxBase = NULL; +struct DiskfontBase *DiskfontBase = NULL; +struct Library *GadToolsBase = NULL; +struct ABBSmsg msg; +struct MsgPort *rport = NULL; +struct Mainmemory *Mainmem; +struct UserRecord curuser,curuserback; +struct DateTime dt; + +short screenok = 0; +short windowok = 0; +UWORD numconfs = 0; +extern struct Window *ABBSUserEditorWnd; +extern struct Gadget *ABBSUserEditorGadgets[]; +extern struct Menu *ABBSUserEditorMenus; + +static struct Node *list = NULL,*conflist = NULL; +struct List listheader,conflistheader; + +struct EasyStruct aboutereq = { + sizeof (struct EasyStruct),0, + "ABBS Usereditor Info", + "ABBS Usereditor v0.1.\nProgrammed by Geir Inge Høsteng.\n(c) 1994", + "I know" +},saveerrorreq = { + sizeof (struct EasyStruct),0, + "Save Error!", + "Error saving user!", + "I know" +},loaderrorreq = { + sizeof (struct EasyStruct),0, + "Load Error!", + "Error loading user!", + "I know" +}; + +struct coNode { + struct Node node; + char text[sizeof (NameT) + 10]; +}; + +int main(int argc, char **argv) +{ + int ret = 0; + int quit = 1; + ULONG waitsigs,gotsigs; + + if (Setup()) { + waitsigs = ((1L << ABBSUserEditorWnd->UserPort->mp_SigBit) | SIGBREAKF_CTRL_C); + memcpy (&curuserback,&curuser,sizeof (struct UserRecord)); + + msg.Command = Main_testconfig_dontuse; + if (HandleMsg (&msg) || !msg.UserNr) { + printf ("Error talking to ABBS\n"); + } else { + Mainmem = (struct Mainmemory *) msg.Data; + if (setuplistview()) + if (setupconflistview()) + quit = 0; + } + while (!quit) { + gotsigs = Wait (waitsigs); + + quit = (!(handleidcmp())); + + if (gotsigs & SIGBREAKF_CTRL_C) + quit = 1; + } + + Cleanup(); + } + + return (ret); +} + +void updateconflistview(void) +{ + struct coNode *nodes; + int n; + UWORD acc; + char bits[10],*ptr,*ptr2; + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,NULL,TAG_DONE,0); + + nodes = (struct coNode *) conflist; + + for (n = 0; n < numconfs; n++) { + ptr = bits; + ptr2 = "RWUDFISZ"; + acc = curuser.ConfAccess[Mainmem->config.ConfOrder[n]-1]; + + while (*ptr2) { + if (acc & 1) + *(ptr++) = *(ptr2++); + else { + *(ptr++) = ' '; + ptr2 += 1; + } + acc = acc >> 1; + } + bits[8] = '\0'; + sprintf (nodes[n].text,"%s-%s",bits, + Mainmem->config.ConfNames[Mainmem->config.ConfOrder[n]-1]); + } + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,&conflistheader,TAG_DONE,0); +} + +void UpdateDisplayNewUser (char *name) +{ + int n; + char string[80],string2[40]; + + msg.Command = Main_loaduser; + msg.Name = name; + msg.Data = (ULONG) &curuser; + n = HandleMsg (&msg); + + if (n != Error_OK) { + EasyRequestArgs(ABBSUserEditorWnd,&loaderrorreq,NULL,NULL); + return; + } + + memcpy (&curuserback,&curuser,sizeof (struct UserRecord)); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_username], + ABBSUserEditorWnd,NULL,GA_Disabled,TRUE,GTST_String,&curuser.Name,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_address], + ABBSUserEditorWnd,NULL,GTST_String,&curuser.Address,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_citystate], + ABBSUserEditorWnd,NULL,GTST_String,&curuser.CityState,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_passwd], + ABBSUserEditorWnd,NULL,GTST_String,&curuser.Password,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_homephone], + ABBSUserEditorWnd,NULL,GTST_String,&curuser.HomeTelno,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_workphone], + ABBSUserEditorWnd,NULL,GTST_String,&curuser.WorkTelno,TAG_DONE,0); + + dt.dat_Stamp.ds_Days = curuser.LastAccess.ds_Days; + dt.dat_Stamp.ds_Minute = curuser.LastAccess.ds_Minute; + dt.dat_Stamp.ds_Tick = curuser.LastAccess.ds_Tick; + dt.dat_Format = FORMAT_DOS; + dt.dat_Flags = DTF_SUBST; + dt.dat_StrDate = string; + dt.dat_StrTime = string2; + if (DateToStr (&dt)) { + strcat (string," at "); + strcat (string,string2); + } else + string[0] = '0'; + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_lastontext], + ABBSUserEditorWnd,NULL,GTTX_Text,string,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_charset], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser.Charset,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_scratchformat], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser.ScratchFormat,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_xpertlevel], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser.XpertLevel,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_protocol], + ABBSUserEditorWnd,NULL,GTCY_Active,curuser.Protocol,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timelimit], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.TimeLimit,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_filelimit], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.FileLimit,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_pagelength], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.PageLength,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_resymemsgnr], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.ResymeMsgNr,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timeused], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.TimeUsed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ftimeused], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.FTimeUsed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_byteratio], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.u_ByteRatiov,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_fileratio], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.u_FileRatiov,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_uploaded], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.Uploaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_downloaded], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.Downloaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_kbupload], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.KbUploaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_kbdownload], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.KbDownloaded,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_timeson], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.TimesOn,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_msgread], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.MsgsRead,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_msgdumped], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.MsgaGrab,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_totaltime], + ABBSUserEditorWnd,NULL,GTIN_Number,curuser.Totaltime,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_grabformat], + ABBSUserEditorWnd,NULL,GTMX_Active,curuser.GrabFormat,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_Killed], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_Killed,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_usefse], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_FSE,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ansimenus], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_ANSIMenus,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_colormsg], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_ColorMessages,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_g_r], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_G_R,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_reviewown], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_KeepOwnMsgs,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_ansi], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_ANSI,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_clearscreen], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_ClearScreen,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_raw], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_RAW,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_filter], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_Filter,TAG_DONE,0); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_sendbulletins], + ABBSUserEditorWnd,NULL,GTCB_Checked,curuser.Userbits & USERF_SendBulletins,TAG_DONE,0); + + updateconflistview(); +} + +void dosaveuser(void) +{ + int n; + +/* Save'r bare hvis det er gjort forandringer +*/ + if (!(memcmp (&curuserback,&curuser,sizeof (struct UserRecord)))) + return; + + msg.Command = Main_saveuser; + msg.Name = curuser.Name; + msg.Data = (ULONG) &curuser; + msg.arg = 0; + n = HandleMsg (&msg); + + if (n != Error_OK) { + EasyRequestArgs(ABBSUserEditorWnd,&saveerrorreq,NULL,NULL); + } +} + +BOOL handleidcmp(void) +{ + struct IntuiMessage *m; + BOOL running = TRUE; + int n; + UWORD code; + struct IntuiMessage tmpmsg; + struct Node *node; + struct MenuItem *mi; + + while (m = GT_GetIMsg (ABBSUserEditorWnd->UserPort)) { + CopyMem ((char *) m, (char *) &tmpmsg, (long) sizeof(struct IntuiMessage)); + GT_ReplyIMsg(m); + + switch (tmpmsg.Class) { + case IDCMP_REFRESHWINDOW: + GT_BeginRefresh (ABBSUserEditorWnd); + ABBSUserEditorRender(); + GT_EndRefresh (ABBSUserEditorWnd,TRUE); + break; + + case IDCMP_MENUPICK: + code = tmpmsg.Code; + while (code != MENUNULL) { + switch (MENUNUM(code)) { + case 0: + switch (ITEMNUM(code)) { + case 0: /* About */ + EasyRequestArgs(ABBSUserEditorWnd,&aboutereq,NULL,NULL); + break; + + case 1: /* Save */ + dosaveuser(); + break; + + case 3: /* Quit */ +/* if (memcmp (&noderecordback,&noderecord,sizeof (struct NodeRecord))) { + if (1 == EasyRequestArgs(ABBSUserEditorWnd,&quitreq,NULL,NULL)) + running = FALSE; + } else +*/ running = FALSE; + break; + } + break; + } + + mi = ItemAddress(ABBSUserEditorMenus,code); + code = mi->NextSelect; + } + break; + + case IDCMP_CLOSEWINDOW: + running = FALSE; + break; + + case IDCMP_GADGETUP: + switch (((struct Gadget *) tmpmsg.IAddress)->GadgetID) { + case GD_Users_ListView: + node = listheader.lh_Head; + for (n = 0; n < tmpmsg.Code; n++) + node = node->ln_Succ; + UpdateDisplayNewUser (node->ln_Name); + break; + + case GD_saveuser : + dosaveuser(); + break; + +/* case GD_username : + strncpy (curuser.Name,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; +*/ + case GD_address: + strncpy (curuser.Address,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_citystate: + strncpy (curuser.CityState,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_passwd: + strncpy (curuser.Password,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_homephone: + strncpy (curuser.HomeTelno,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_workphone: + strncpy (curuser.WorkTelno,((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->Buffer, + sizeof (NameT)); + break; + + case GD_charset: + curuser.Charset = tmpmsg.Code; + break; + + case GD_scratchformat: + curuser.ScratchFormat = tmpmsg.Code; + break; + + case GD_xpertlevel: + curuser.XpertLevel = tmpmsg.Code; + break; + + case GD_protocol : + curuser.Protocol = tmpmsg.Code; + break; + + case GD_timelimit : + curuser.TimeLimit = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + + case GD_filelimit : + curuser.FileLimit = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_pagelength: + curuser.PageLength = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_resymemsgnr: + curuser.ResymeMsgNr = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_timeused: + curuser.TimeUsed = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_ftimeused: + curuser.FTimeUsed = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_byteratio: + curuser.u_ByteRatiov = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_fileratio: + curuser.u_FileRatiov = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_uploaded: + curuser.Uploaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_downloaded: + curuser.Downloaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_kbupload: + curuser.KbUploaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_kbdownload: + curuser.KbDownloaded = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_timeson: + curuser.TimesOn = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_msgread: + curuser.MsgsRead = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_msgdumped: + curuser.MsgaGrab = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_totaltime: + curuser.Totaltime = ((struct StringInfo *) + ((struct Gadget *) tmpmsg.IAddress)->SpecialInfo)->LongInt; + break; + + case GD_grabformat: + curuser.GrabFormat = tmpmsg.Code; + break; + + case GD_Killed: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_Killed; + else + curuser.Userbits &= ~USERF_Killed; + break; + + case GD_usefse: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_FSE; + else + curuser.Userbits &= ~USERF_FSE; + break; + + case GD_ansimenus: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_ANSIMenus; + else + curuser.Userbits &= ~USERF_ANSIMenus; + break; + + case GD_colormsg: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_ColorMessages; + else + curuser.Userbits &= ~USERF_ColorMessages; + break; + + case GD_g_r: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_G_R; + else + curuser.Userbits &= ~USERF_G_R; + break; + + case GD_reviewown: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_KeepOwnMsgs; + else + curuser.Userbits &= ~USERF_KeepOwnMsgs; + break; + + case GD_ansi: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_ANSI; + else + curuser.Userbits &= ~USERF_ANSI; + break; + + case GD_clearscreen: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_ClearScreen; + else + curuser.Userbits &= ~USERF_ClearScreen; + break; + + case GD_raw: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_RAW; + else + curuser.Userbits &= ~USERF_RAW; + break; + + case GD_filter: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_Filter; + else + curuser.Userbits &= ~USERF_Filter; + break; + + case GD_sendbulletins: + if (((struct Gadget *) tmpmsg.IAddress)->Flags & GFLG_SELECTED) + curuser.Userbits |= USERF_SendBulletins; + else + curuser.Userbits &= ~USERF_SendBulletins; + break; + } + break; + } + } + + return (running); +} + +int setupconflistview (void) +{ + static struct coNode *nodes; + int n; + + numconfs = Mainmem->config.ActiveConf; + if (!(nodes = AllocVec (numconfs * (sizeof (struct coNode)), MEMF_CLEAR))) + return (0); + + if (conflist) + FreeVec (conflist); + conflist = nodes; + + NewList (&conflistheader); + + for (n = 0; n < numconfs; n++) { + nodes[n].node.ln_Name = (char *) &nodes[n].text; + sprintf (nodes[n].text," -%s", + Mainmem->config.ConfNames[Mainmem->config.ConfOrder[n]-1]); + AddTail (&conflistheader,&nodes[n].node); + } + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_conference_listview], + ABBSUserEditorWnd,NULL,GTLV_Labels,&conflistheader,TAG_DONE,0); + + return (1); +} + +int setuplistview(void) +{ + static struct ueNode { + struct Node node; + NameT name; + } *nodes; + int n,num; + struct Log_entry *logs; + + num = Mainmem->config.Users; + if (!(nodes = AllocVec (num * (sizeof (struct ueNode)), MEMF_CLEAR))) + return (0); + + if (list) + FreeVec (list); + list = nodes; + + logs = (struct Log_entry *) Mainmem->LogTabelladr; + NewList (&listheader); + + Forbid(); + + for (n = 0; n < num; n++) { + nodes[n].node.ln_Name = (char *) &nodes[n].name; + strcpy (nodes[n].name,(char *) logs[n].l_Name); + AddTail (&listheader,&nodes[n].node); + } + Permit(); + + GT_SetGadgetAttrs (ABBSUserEditorGadgets[GD_Users_ListView], + ABBSUserEditorWnd,NULL,GTLV_Labels,&listheader,TAG_DONE,0); + + return (1); +} + +int HandleMsg (struct ABBSmsg *msg) +{ + struct MsgPort *mainport,*inport; + struct ABBSmsg *inmsg; + int ret; + + inport = msg->msg.mn_ReplyPort; + Forbid(); + if (mainport = FindPort(MainPortName)) { + PutMsg(mainport,msg); + Permit(); + while (1) { + if (!WaitPort(inport)) + continue; + + if (inmsg = (struct ABBSmsg *) GetMsg (inport)) + break; + } + ret = inmsg->Error; + } else { + Permit(); + ret = Error_NoPort; + } + + return (ret); +} + +int Setup (void) +{ + int ret = 0; + + if (FindPort (MainPortName)) { + if (IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library",37)) { + if (GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",36L)) { + if (DiskfontBase = (struct DiskfontBase *) OpenLibrary ("diskfont.library",0L)) { + if (GadToolsBase = OpenLibrary("gadtools.library",37)) { + if (msg.msg.mn_ReplyPort = CreateMsgPort()) { + if (!(SetupScreen())) { + screenok = 1; + if (!(OpenABBSUserEditorWindow())) { + ABBSUserEditorRender(); + windowok = 1; + ret = 1; + } else { + CloseABBSUserEditorWindow(); + printf ("Error opening window\n"); + } + } else { + printf ("No screen\n"); + } + } else { + printf ("Error creating message port\n"); + } + } else { + printf ("No gadtools lib\n"); + } + } else { + printf ("No diskfont lib\n"); + } + } else { + printf ("No gfx lib\n"); + } + } else { + printf ("No intuition lib\n"); + } + } else { + printf ("ABBS must be running for Usereditor to work\n"); + } + + if (!ret) + Cleanup(); + + return (ret); +} + +void Cleanup (void) +{ + if (windowok) CloseABBSUserEditorWindow(); + if (screenok) CloseDownScreen(); + if (conflist) FreeVec (conflist); + if (list) FreeVec (list); + if (msg.msg.mn_ReplyPort) DeleteMsgPort(msg.msg.mn_ReplyPort); + if (GadToolsBase) CloseLibrary (GadToolsBase); + if (DiskfontBase) CloseLibrary((struct Library *) DiskfontBase); + if (GfxBase) CloseLibrary((struct Library *) GfxBase); + if (IntuitionBase) CloseLibrary ((struct Library *) IntuitionBase); +} diff --git a/doc/ABBS.doc b/doc/ABBS.doc new file mode 100644 index 0000000..274c703 --- /dev/null +++ b/doc/ABBS.doc @@ -0,0 +1,457 @@ + + ##### # ###### # ###### # ### # + ######### ###### ### ###### ### # ####### + ## ### ## # # ## ## # # ## ## #### + ## ## # ## # # # # # # # # ### + # # ## ## ## ## # ## ## # #### + # # ## ## ## # ## ## # #### + # # ## # ### # # ### # ### ### + ######## ## ## ## ## ###### # + # ## #### # #### # # ##### + #### # ### # #### # # #### # # ## + # ### # # ##### # ##### # # + ## + + Amiga Bulletin Borad System + (C) 1991, Geir Inge Høsteng + +Hva er ABBS ? +============= + + ABBS er et BBS system (EOT for norsk fanatikerne) laget for Amiga. Det er + en klone av MBBS, et BBS system for PC, laget av Mike Robertson i + Gallagher & Robertson A/S. ABBS er designet for å være et flernode system + fra grunnen. ABBS har fremdeles en del igjen for å komme opp på MBBS nivå, + men jeg regner med at denne avstanden vil minke etterhvert. + +En liten advarsel : +=================== + + ABBS har fremdeles endel utvikling igjen, men jeg synes at ABBS allerede + er bedre enn de fleste BBS systemer jeg har sett til Amiga. + ABBS er ikke blitt testet så mye som jeg gjerne ville, så det kan hende at det + fremdeles er noen uoppdagede feil i ABBS. Disse vil bli fikses så fort de + blir funnet (og kan reproduseres av meg). + + Denne dokumentasjonen er ikke den aller beste heller, men det er alt jeg har + tid til for øyeblikket. + +Komandoer +========= + + +Global meny (alltid tilgjengelig) : ++++++++++++++++++++++++++++++++++++ + +(Q) Main menu + velger main menyen som den aktive + +(R)ead menu + velger read menyen som den aktive + +(F)ile menu + velger fil menyen som den aktive + +(U)tility menu + velger utility menyen som den aktive + +(CHAT) menu + velger chat menyen som den aktive + +(!) sysop/sigop menu + velger sysop eller sigop menyen som den aktive + +(J)oin conference (conferanse navn) + Bytter akktiv konferanse, til den konferansen du spesifiserer. + spesifiserer du ikke noen konferanse vil du få en liste over + tilgjengelige konferanser. + Hvis konferansen er privat, vil du ikke kunne Join'e denne + +(H)elp + Skriver ut meny over de kommandoer som er tilgjengelig i øyeblikket + +(G)oodbye + Log'er ut, og bryter forbindelsen, eller starter en ny session + +(W)ho's on system + Lister ut en liste med endel info over alle noder som er oppe + +(SH)OW conference status + Lister ut alle konferansene du er medlem av, og sier hvor mange uleste + melding det er i de konferansene + +(COM)ment to SYSOP + Skriver en privat kommentar til sysop (system operator'en) + +(B)ulletin menu + Lister ut en liste over tilgjengelige bulletin'er, og lar deg lese dem + +(E)nter message in current conference + Skriver en melding til en (eller alle) bruker. + +(GRAB) new messages + Pakker alle uleste meldinger i en fil, og sender den til deg. + +(TIM)e online + Lister ut nå du log'a inn, hvor lenge du har vært inne, og hvor mye + tid du har igjen (hvis du har en begrensning da..) + +(NO)de messages + Brukes for å skrive en lingjers meldinger til andre noder. + Velger du node nr 0, sendes meldingen til alle nodene. + +Main meny ++++++++++ +(S)how users + Lister ut alle brukere på systemet, og siste gang de var innom. + +Read meny ++++++++++ + + + Leser neste uleste meldingen, hvis det ikke er noe, join'er denne + komandoen neste konferanse som du er medlem i, hvis det er noen med + uleste meldinger. + +R...read messages (samme som ) + + + Leser melding med dette nummeret + +O...show original + Viser den første meldingen i den kjeden du nå leser (den meldinga som + startet diskusjonen). + +'+'...next msg + leser neste melding + +'-'...previous msg + leser forige melding + +'.'...same msg + leser siste meldig om igjen + +'<'...show reference + Leser meldingen den nåværende meldingen er et svar til (hvis den er + et svar) + +'>'...show reply + Viser første svar på denne meldingen, hvis den har noen svar. + +'='...show other reply + Viser annen melding som svarer på samme melding som denne gjør. + +RE...reply to message + Skriver et svar på den siste leste meldingen. + +(M)ark menu + velger mark menyen som den aktive. + +MODE...change read mode + Slår av og på Read Ref mode. + +KILL...kills message + Sletter siste leste melding, hvis du har tillatelse til det. + +REC...recover killed message + gjennoppliver siste leste melding, hvis du har tillatelse til det. + +(RES)ign conference + melder deg ut av den nåværende konferansen (Det er ikke alle + konferanser du kan gjøre dette i) + +Mark meny ++++++++++ + +Alle komandoene vil returnere deg til Read meny'en etter at de er ferdige. + + mark message with given number + merker melding med dette nummeret. + +. marks message just read + merker meldingen vil nettopp leste. + +F moves your messages to head of queue + Flytter de meldingene som er til deg først i lese køen. + +N asks how many messages are marked now + Forteller hvor mange meldinger som ligger i mark køen + +R resets ALL marks + Sletter hele mark køen. + +T marks all messages in this thread + merker alle meldingene som er svar på denne. + +U removes marks for this entire thread + sletter merkingen av alle meldingene som er svar på denne. + +O removes marks for all messages not to or from you + Sletter alle meldinger som ikke er fra deg eller til deg fra lesekøen. + +Z removes marks for author of msg just read + Sletter alle meldinger skrevet av samme forfatter som siste leste + melding fra lese køen. + +A mark messages from particular person + merker meldinger fra en spesiell person. + +D mark messages on or after given date + merker alle meldinger som er nyere enn en dato. + +G marks group of messages by number + merker en gruppe av meldinger. + +P find and mark msgs to you personally. + merker meldinger til deg. + +ENTER exits from this menu + Går tilbake til read meny + +file meny ++++++++++ + +(L)ist files + Lister filer i en elller alle directory'er. + +(UP)load file (send file to system) + Overfører en fil fra deg til basen. + +(D)ownload file (receive file from system) + Overfører en fil fra basen til deg. + +(LP) List private files + Lister filer som er privat til deg. + +(N) List new files + Lister filer som er nyere enn en hvis dato. + +(K)eyword search + Søker etter en fil ved hjelp av et søke ord. + +(S)can file names + Søker etter en fil ved hjelp av en del av filnavnet. + +(RET)ract file + Sletter en fil du har UPloadet. + +(PU) PRivate Upload + Uploader en fil privat til noen. + +Utility meny +++++++++++++ + +(A)ddress change +- forandrer brukerens adresse og telefon nr. + +(P)assword change +- Forandrer passord + +(S)et character set +- Forandrer tegnsett konvertering + +(V)iew settings +- Skriver ut de nåværende valg + +(L)ines per page +- Setter antall linjer som kan skrives ut i et sett (OBS, virker ikke på +  fillistene) + +(T)ransfer protocol +- Velger overføringsprotokoll + +(M)ode change +- Forandrer endel instillinger, bla. farver, bruk av Full Screen Editor, og + G&R protokoll. + +(N)ame change +- Forandrer bruker navnet + +Sysop meny +++++++++++ + +(A)ccess change +- Forandrer access på en eller alle bruker(e) i den nåværende konferansen + Følgende access muligheter er mulige + + Read - Brukeren kan lese meldinger. Denne forteller om brukeren er + medlem i en konferanse eller ikke. + OBS - ABBS har ingen invite funksjon enda, så bruk dette bit'et + til å invitere personer til en konferanse så lenge. + Write - Brukeren kan skrive meldinger i konferansen + Upload - Brukeren har Upload tilatelse i denne konferansen + Download - Brukeren har Download tilatelse i denne konferansen + Filevip - DL/Ul ratio gjelder ikke denne brukeren (OBS fungerer bare i + News konferansen) + Sigop - Brukeren er sigop i denne konferansen + Z sysop - Brukeren er sysop i konferansen (Bare virkelig sysop kan gi + Z access). + + Konferansen News er spesiell når det gjelder access. Har ikke brukere + DL/UL access i denne, så kan de ikke UL/DL'e noen filer. Sysop access'en i + News blir kopiert over i nye konferanser man joiner (hvis man har det) + +(S)how user +- VIser info om en bruker + +(T)ime limit change +- Forandrer tids begrensning for brukere. + +(FT) File Time limit change +- Forandrer fil tids begrensning for brukere. + +(KILL) user +- Dreper en bruker. Brukeren vil ikke kunne log'e inn igjen. + +(UNKILL) user +- gjennoppliveren tidligere drept bruker. + +(CI) Conference Install +- installerer en ny konferanse. du kan sette følgende flagg: + R - Når denne er valgt blir nye brukere automatisk medlemmer av denne + konferansen. (OBS, ikke implementert enda) + W - Alle brukere som join'er denne konferansen får lov til å skrive i den. + V - Dette blir en VIP konferanse, dvs, folk som ikke er medlem i denne + konferansen, kan ikke bli det uten at sysop eller sigop gir de tillatelse + A - Tillater private meldinger i konferansen + E - Tilater folk å RESign'e fra denne konferansen + P - Dette er en postboks konferanse (bare private meldinger) + +(BI) Bulletin install +- instalerer en ny eller oppdaterer en gammel bulletin. + Vil du erstatte en gammel bulletin med en ny, svar med nummeret på + den bulletinen du vil erstatte. Skal du installere en ny bulletin, trykker + du bare return. Hver konferanse kan ha sitt eget sett med bulletin'er + +(BC) Bulletin clear +- Sletter alle bulletin'er i en konferanse + +(IF) Install file area +- installerer et nytt fil directory. + +(FI) file install +- instalerer en fil. Svarer du med et bruker navn på det første spørsmålet + blir filen "upload'et" privat til denne brukeren, hvis du bare trykker return + blir filen lagt i upload dir'en, og alle kan DL'e den. + +(MOVE) Move file +- Flytter en fil fra en fildir til en annen + +(DOS) Execute dos command +- Utfører en dos komando + +(MEM) Memory statistics +- skriver ut endel info om minneforbruk. + +(DELCONF) Delete Conference +- Sletter en konferanse + +(RENCONF) Rename Conference +- forandrer navn på en konferanse. Gir deg også muligheten til å forandre + konferansens status bits + +(BOOT) - Boot machine +- Boot'er maskinen. + +(D) Delete log file +- Sletter en node log fil + +(L) List log file +- Skriver ut en node log fil + +(M) Modify file +- Oppdaterer størrelsen på fila, oppdaterer dato, og lar deg forandre komentaren + +(DELDIR) - Delete Dir +- Sletter en (abbs) fil directory. Alle filene blir liggende igjen på disken. + +(RENDIR) - Rename Dir +- Forandrer navnet på en (ABBS) fil directory. + +(ZAP) - Zap file +- Sletter en fil fra ABBS's filliste, men lar filen ligge igjen på disken. + +Sigop meny ++++++++++ + +(S)how user +- VIser info om en bruker + +(BI) Bulletin install +- instalerer en ny eller oppdaterer en gammel bulletin. + Vil du erstatte en gammel bulletin med en ny, svar med nummeret på + den bulletinen du vil erstatte. Skal du installere en ny bulletin, trykker + du bare return. Hver konferanse kan ha sitt eget sett med bulletin'er + +(A)ccess change +- Forandrer access på en eller alle bruker(e) i den nåværende konferansen + Følgende access muligheter er mulige + + Read - Brukeren kan lese meldinger. Denne forteller om brukeren er + medlem i en konferanse eller ikke. + OBS - ABBS har ingen invite funksjon enda, så bruk dette bit'et + til å invitere personer til en konferanse så lenge. + Write - Brukeren kan skrive meldinger i konferansen + Upload - Brukeren har Upload tilatelse i denne konferansen + Download - Brukeren har Download tilatelse i denne konferansen + Filevip - DL/Ul ratio gjelder ikke denne brukeren (OBS fungerer bare i + News konferansen) + Sigop - Brukeren er sigop i denne konferansen + Z sysop - Brukeren er sysop i konferansen (Bare virkelig sysop kan gi + Z access). + + Konferansen News er spesiell når det gjelder access. Har ikke brukere + DL/UL access i denne, så kan de ikke UL/DL'e noen filer. access'en i News + blir kopiert over i nye konferanser man joiner. + + +Chat meny ++++++++++ + chat med node nr . OBS. Det er desverre en bug her som kan + kræsje abbs.. + +(A)availible + setter deg tilgjengelig for chat. + +(N)ot availible + setter deg utilgjengelig for chat. + +(S) Chat sysop + Blinker sysop's skjerm, så han vet at noen vil snakke med han. + Husk at Sysop ikke alltid er tilstede. + Hvis sysop er tilstede, og han vil chat'e så stikker han innom ... + +IKKE kopier meg! +================ + + Det er ikke lov å kopiere ABBS, og jeg har tatt skritt for å kunne + straffe de som pirat-kopierer ABBS. Kjøp heller en kopi, og støtt den videre + utviklingen! + Hvis jeg oppdager en piratkopi, vil vedkommende som kjøpte den bl.a. miste + alle oppgraderings/bugfix muligheter! + +Forlag til forbedringer og Bug raport'er +======================================== + + Mottas med takk, men for at bug rapportene skal ha noen verdi, må de være + slilk at jeg kan reprodusere feilen hos meg. Det nytter lite med "det funker + ikke" osv. + + Det vil gå litt tregt frem til sommeren 92, siden jeg er inne i militæret, + men du kan komme i kontatkt med meg på min support base for ABBS på + (02) 277176, der jeg er sysop, eller geirhos@ifi.uio.no over internet. + +Takk til : +========== + + Mike Robertson i Gallagher & Robertson A/S, for source'n til hans Full + Screens Editor. + + Vebjørn Forsmo for å ha brukt en stor del av sin enorme telefon regning + på å teste ABBS, og for ANSI menyene, som han har laget. + + Alle som har kommet med forslag og testet ABBS underveis. + + + Geir Inge Høsteng, forfatter av ABBS. + diff --git a/doc/ABBSRexx.doc b/doc/ABBSRexx.doc new file mode 100644 index 0000000..b95e9fe --- /dev/null +++ b/doc/ABBSRexx.doc @@ -0,0 +1,302 @@ +ABBS Arexx documentation 13/07-95 + +*NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* + +*ALL* commands may now return an error of 20 if carrier is lost. The Arexx +program must exit imidiatly and return control to abbs. + +*NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* *NOTE* + +RC = 0 means OK, anyting else is an error. High values mean severe errors + +To get anything in the RESULT variable, you need to set +"options results" before the command you want to get input from. +This line is usually placed at the top of the script file. +(You only need it once) + +if RC != 0, the RESULT variable is NOT filled in. + +Port name : "ABBS node #x port" where x is node nr. +for node 1 : "ABBS node #1 port" + +Note!! +****** + +If one of the input functions returns a value meaning carrier lost, user +thrown out etc, the arexx program has to exit immediatly !! + + + +Command Parameters Explanation +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +BBSNAME Returns the BBS name + RC = 20, carrier lost, out of time etc + +BREAKOUTIMAGE Outputs write buffer without newline. + RC = 20, carrier lost, out of time etc + +EJECT Ejects user on node. + RC = 5, no user on node + +FILEINFO Return a string with some file info for the user. + + eg: "34 13 6736 1243" + RC = 5, no active user + +GETCONSTAT Get present/last line condition status. + RC = 20, carrier lost, out of time etc + Returns: + baud == 0, means local connection + Possible error correction strings: + None,MNP,42BIS,NULL + (NULL = Nullmodem) + +GETLINE input a line of max length characters or less. + RC = 20, carrier lost, out of time etc + Anyway, user is going away. + RC = 10, missing parameter + Returns a null terminated string in + RESULT + +GETNEXTPARAM Read the next parameter from "command line". + This is intended for Misc scripts. + RC = 20, carrier lost, out of time etc + Anyway, user is going away. + RC = 5, No user online + RC = 1, No more parameters + Returns a null terminated string in + RESULT + +LISTEN Makes the node start to listen to the serial + port again, after an UNLISTEN command. + RC = 10, not a serial node. + +MAYGETCHAR input a character if one is availible + RC = 20, carrier lost, out of time etc + Anyway, user is going away. + RC = 1, no character was availible + The caracter is placed in the RESULT + variable + +MORE turns more-prompts back on again (sets to a new page until more) + RC = 20, carrier lost, out of time etc + +NODENUMBER results the node nr + RC = 20, carrier lost, out of time etc + +NOMORE turns off more-prompts until next getline + RC = 20, carrier lost, out of time etc + +OUTIMAGE Outputs write buffer with newline. + RC = 20, carrier lost, out of time etc + RC = 1, user typed no to a more prompt + RC = 0, Quick mode not in use + +QUICK Return quick status + RC = 20, carrier lost, out of time etc + RC = 5, no user on node + RC = 1, Quick mode in use + RC = 0, Quick mode not in use + +RAW [OFF] disables ABBS's parsing of incoming characters. + readchar will now return controll characters etc. + giving the OFF parameter restores abbs to normal + RC = 20, carrier lost, out of time etc + +READBITS [username] Read userbits in News conference for current user + (if no username), or for a spesific user. + RC = 20, Setup error + RC = 10, User not found + RC = 5, no user on node + Returns a null terminated string in + RESULT with the bits. Example: "RUDF" + +READCHAR input a character. + RC = 20, carrier lost, out of time etc + Anyway, user is going away. + The caracter is placed in the RESULT + variable + +READUSERSETUP Reads the usersetup for the current user. + returns the in result. + See USERSETUP for the description for the + magic number. + RC = 5, no user on node + +RESUME Resume from suspend. + RC = 20, carrier lost, out of time etc + RC = 10, Failed to resume + RC = 5, not in suspend mode + +SETBITS [username] + Sets userbits in News conference for current user + (if no username), or for a spesific user. + RC = 20, Setup error + RC = 15, Unknown bits + RC = 11, Missing parameter + RC = 10, User not found + RC = 5, no user on node + Only "RWDUFS" bits are allowed. Z and I is + ignored (and preserved) + +SETLOGINSCRIPT [USER] + Changes the personal login script for the + current user (if no user is spesified), or + the specified user, to the given script. + Note: The script name can only be 13 characters + long.. + RC = 20, carrier lost, out of time etc + RC = 15, Error loading/saving user. + RC = 10, No parameters given/ + wrong parameter + RC = 5, no user online. + +SETSTATUSTEXT [TEXT] Changes this nodes status text to the specified + text (max 23 characters). If no text parameter + is specified, the statustext is + "undone"/removed + RC = 20, carrier lost, out of time etc + +SHUTDOWN [NOBUSY] Quit node. NOBUSY, leaves the modem on hook + RC = 20, carrier lost, out of time etc + RC = 5, user online, will quit after + logout + +SIGOP Check if user has atleast sigopaccess + RC = 20, carrier lost, out of time etc + RC = 5, no user online, can't. + RC = 1, Yes, this user has sigop (or sysop) access + RC = 0, does not have sigop access + +SUSPEND [NOBUSY] Releases serial port. NOBUSY, leaves the modem + on hook + RC = 20, carrier lost, out of time etc + RC = 5, user online, can't. + RC = 10, not a serial node! + +SYSOP Check if user has sysop acces + RC = 20, carrier lost, out of time etc + RC = 5, no user online, can't. + RC = 1, Yes, this user has sysop access + RC = 0, does not have sysop access + +SYSOPNAME Returns the Sysops name + RC = 20, carrier lost, out of time etc + +TIMELEFT returns time left for user + RC = 20, carrier lost, out of time etc + RC = 5, no user online, can't. + +TYPEFILE Types a file. + RC = 20, carrier lost, out of time etc + RC = 10, missing parameter + RC = 1, User stoped typing + +UNLISTEN Makes the node stop monitoring the serial port. + RC = 10, not a serial node. + RC = 5, user online, can't. + +UNREAD returns number of unread messages in News for user + RC = 20, carrier lost, out of time etc + RC = 5, no active user + +USERINFO Return a string with some userinfo. + + + eg: "100 234 45 740 132" + RC = 20, carrier lost, out of time etc + RC = 5, no active user + note: userinfomsgnr is 0 for no userinfomsg + +USERNAME Return name of user on node. + RC = 20, carrier lost, out of time etc + RC = 5, no active user + +USERSETUP *NOTE* this Arexx command is only callable from + the newuser arexx script. The majic(!) number + is a 32bit value composed this way : + bits 29-32: Presently unused (set to 0!!) + bits 24-28: Charset number + (0 = ISO, 1 = IBM, 2 = IBN, + 3 = US7, 4 = UK7, 5 = GE7, + 6 = FR7, 7 = SF7, 8 = NO7, + 9 = DE7, 10 = SP7, 11 = IT7, + 12 = MAC) + bits 16-23: pagelength (0 = unlimited) + bits 12-15: scratchpadformat + (0 = text, 1 = arc, 2 = lzh, + 3 = zip, 4 = lha, 5 = arj, + 6 = Zoo, 7 = Lzx) + bits 8-11: Transferprotocol number + (0 = none, 1 = zmodem, + 2 = xmodem, 3 = xmodem-CRC, + 4 = ymodem, 5 = ymodembatch, + 6 = ymodemG) + bit 7 : ReadRef/Read + bit 6 : Raw files + bit 5 : Clear screen before messages + bit 4 : ANSI terminal + bit 3 : Use G&R protocol + bit 2 : Want Color in messages + bit 1 : Use Ansi mens + bit 0 : Use FSE + + Puh.. That's cryptic ? :-) Here's an Example : + + Usersetup X2D('021b415f',8) will give you + + * IBN charset + * $1b = 27 lines pr page + * LHA scratchpad format + * Zmodem transfer protocol + * ReadRef + * No raw files + * No clearscreen + * ANSI terminal + * Use G&R + * Color in messages + * Ansi menues + * FSE + + RC = 20, carrier lost, out of time etc + RC = 10, missing parameter + RC = 5, not in newuser + + +WRITECHAR Write character to write buffer + RC = 20, carrier lost, out of time etc + RC = 10, missing parameter + +WRITETEXT Write text to write buffer. + RC = 20, carrier lost, out of time etc + RC = 10, missing parameter + +****************************************************************************** + +Main program +============ + +RC = 0 means OK, anyting else is an error. High values mean severe errors + +To get anything in the RESULT variable, you need to set +"options results" before the command you want to get input from. +This line is usually placed at the top of the script file. + +if RC != 0, the RESULT variable is NOT filled in. + +Port name : "ABBS mainport" + +Command Parameters Explanation +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +SHOWGUI [OFF] Opens (or closes if OFF is specified) the + BBS gui + +SHUTDOWN Quit BBS. + RC = 5, Nodes not down yet + +STARTNODE Starts up a new node. + RC = 10, missing parameter + RC = 5, couldn't start node + diff --git a/doc/AddFile.Doc b/doc/AddFile.Doc new file mode 100644 index 0000000..996b12c --- /dev/null +++ b/doc/AddFile.Doc @@ -0,0 +1,53 @@ +OBS: ABBS være i gang for at dette programmet skal virke + +Usage : AddFile [-c|-u] + + +Obs. Håndterer ikke space i filnavnene. + +Du kan enten velge -c eller -u eller ingen av delene. +Dvs, aldri begge optionene. + + er konferansen filen skal være privat til + + er brukeren filen skal være privat til + + er amiga dos filnavnet. + + er filnavnet filen vil få i abbs +obs: maks 16 tegn langt + + er en av fildirene i abbs + + er fil beskrivelsen (her kan du ha med space) +obs: maks 40 tegn langt + + +Så for å få legge inn filen "df0:test.lzh" i fildir'en "Utilitie" slik at +abbs brukere kan DL dem som "test.lzh", med beskrivelsen "en liten test", +skriver du : + +AddFile df0:test.lzh test.lzh utilities en liten test + + +Addfile -cVIP df0:test.lzh test.lzh VIPfiles en fil bare VIP får DL'e + +Legger filen df0:test.lzh inn som en fil som er privat til konferansen VIP, +i fildiren VIPfiles, med beskrivelsn "en fil bare VIP får DL'e" + + +Addfile -uola Nordman df0:test.lzh test.lzh PRIVATE en fil bare ola får DL'e + +Legger filen df0:test.lzh inn som en fil som er privat til brukeren +"OLA NORDMAN" i fildiren PRIVATE, med beskrivelsn "en fil bare ola får DL'e" + + +Tips: + +Skal du legge inn mange filer av gangen, kan du lage et dos script med +kommandoen : + +list lformat "addfile %p%n %n