/* ------------------------------------------------------------------------ :Program. Cmd.ced :Contents. Start Oberon tools with CygnusEd Professional :Author. Kai Bolay [kai] :Address. Snail-Mail: E-Mail: :Address. Hoffmannstraße 168 UUCP: kai@amokle.tynet.sub.org :Address. D-7250 Leonberg 1 FIDO: 2:247/706.3 :History. v1.0 [kai] 12-Mar-92 :History. v1.1 [kai] 26-Mar-92 (+ first error after compilation) :Copyright. FD :Language. ARexx :Translator. RexxMast :Remark. LibLink, OMake, etc. not supported yet :Bugs. Compile doesn't call "Err FIRST". How ca I do it? :Bugs. CygnusEd crashes when "address command execute" fails ------------------------------------------------------------------------ */ options results arg tool if (tool ~= "COMPILE") & (tool ~= "LINK") then do Okay1 "Fehler: Falscher Aufruf!" exit end if tool = "COMPILE" then do scriptname = "T:Compiler-Start" save end; else do scriptname = "T:Linker-Start" end status 21 /* Nur Filnamen (ohne Pfad) holen */ filename = result if filename = "" then do Okay1 "Fehler: Kein Filename" exit end if right(filename,4) ~= ".mod" then do Okay1 "Fehler: Filename endet nicht auf '.mod'" exit end filename = left(filename,length(filename)-4) status 20 /* Nur Pfad (ohne Filenamen) holen */ path = result if length(path) > 3 then do if right(path,3) = "txt" then do path = left(path,length(path)-3) end end if ~open(script,scriptname,'W') then do Okay1 "Fehler: Kann Script nicht öffnen" exit end call writeln(script,"FailAt 100") call writeln(script,"Stack 20000") call writeln(script,"CD" path) if tool = "COMPILE" then do cmd = "Oberon >CON:0/100//200/Oberon/SCREENCygnusEdScreen1" opts = GetClip("OberonOpts") end; else do cmd = "OLink >CON:0/100//200/OLink/SCREENCygnusEdScreen1" opts = GetClip("OLinkOpts") end if opts ~= "" then do cmd = cmd "-" || opts end cmd = cmd filename call writeln(script,cmd) if ~close(script) then do Okay1 "Fehler: Kann Script nicht schließen" exit end address command Execute scriptname if tool = "COMPILE" then do address REXX "OBERON:rexx/Err.ced FIRST" end