The Aztec C compiler, in versions 5.0 and newer, has a feature called "QuikFix". This feature enables it to report compilation editors using the text editor that you were creating the source file with, rather than simply writing them to the screen. Unfortunately, the only editor they actually got this to work with was their own Z editor, a lame subset of vi, which has to be restarted by the compiler in order to show the errors. The manual breezily asserts that it can easily be gotten to work with most any other editor that has an ARexx port. When I tried to do this for Uedit, I ran into difficulties and shortcomings with the QuikFix feature. First of all, the Aztec manual says that the Z editor can only handle 25 errors at a time, and says that using a certain command will get the next 25 errors. This does NOT WORK. You can't get 25 more errors. Furthermore, the limitation of 25 is built into the compiler, not just the editor. So this Uedit version can only handle the first 25 errors; to see the rest you have to fix those first ones and then recompile. The second problem is that the compiler uses the dos Execute() function to run the QuikFix command, and uses the IoErr() function to tell whether it succeeded or failed. If the command that was run returned a nonzero dos error code (you know, like 103 = no memory, 205 = object not found, etc), then the compiler quits. If it returns zero, it recompiles the source file. The rx program, used for running rexx programs with a cli command, ALWAYS returns a dos error code of zero! The compiler is unable to tell what the return value of the command was (like 5 = warn, 10 = error, etc). This means that you can't just write a rexx script to use Uedit for QuikFix, because rx can't tell the compiler when it's not appropirate to recompile. Later I came up with not one but two ways around this: my alternative to rx called frx, and a tiny hack called R2E which returns an error code equal to the previous program's return code. R2E is a bit inconvenient because one has to set the QuikFix command to actually contain three commands separated by newlines: FailAt 999; rx whatever; R2E. But neither of these was written yet when I put together this Uedit QuikFix package, so what I did was to write the equivalent of a rexx program in C. It's called, imaginatively, QuikFix. It sends a rexx message to Uedit telling it to load a QuikFix error file and do the appropriate stuff with it, and then it sits and waits for Uedit to tell it whether to resume the compile or abandon it. If anything goes wrong, it quits with a nonzero error code and the compiler exits. Only if Uedit sends out the rexx command "ADDRESS QUIKFIX OK" will it allow the compiler to start over. The QuikFix program takes an argument in its command line: a command to start Uedit if it is not running, for example "RunBack UE". So one would set one's CCEDIT command string to be "QuikFix RunBack UE". Do not put quotes around the command after QuikFix. If Uedit does not start, QuikFix will wait forever, or until you give it a control-C to make it exit. What QuikFix does, after making sure that both ARexx and Uedit are up and running, is send the rexx command QUIKFIX to Uedit, which is then responsible for all the complicated parsing of the error file AztecC.Err. If Uedit's current directory is not the same as QuikFix's, it appends its current directory path onto the QUIKFIX rexx command. The function I have written for Uedit to handle that command with TEMPORARILY sets Uedit's current directory to be that given after the QUIKFIX command, and restores the previous current directory when you give the command to either resume or abort the compilation. It will only handle errors for one source file. If you are editing the source file outside of its home directory, and have it in a buffer with a path before its name, QuikFix will probably open a second buffer with another copy of the sourcefile, named without the path (or whatever path you gave to the C compiler). The command that handles the rexx QUIKFIX command is virtual-q. Put the following line in your REXXCOMM file: quikfix 1056+0 | Or you can use a different key if you want. When this command is run, Uedit loads the error file and turns its display colors funny to remind you that the compiler is waiting for you to either say "Okay, try again" or "never mind, forget about recompiling". It displays a message telling you how many errors there are (except it can't report more than 25). You can view the errors with two commands: alt-period shows the next error (putting the cursor at the point where the compiler found the error and displaying the error message at the top of the screen, and alt-comma shows the previous error. ShftAlt-period tells the compiler to try again, and shftAltCtl-comma tells it to abandon the compile. Either of these last two restores the screen colors to "normal". Unfortunately, since there is as yet no getRGB() function in Uedit, you have to edit the setRGB commands to get the right "normal" colors; they are written below for what *I* use for normal colors. ShftAlt-period, the recompile command, runs alt-f2 (save changed files), then goes into tiny window before telling the compiler to restart. If you've put "save all changed files" on a different key, you have to edit that. (I use normal-f2 for that.) These commands reserve several n-variables for as long as the compiler is waiting. You'll have to make sure these are available in your config, and if not, substitute others. They use number variables n92, n93, and n95, and buffers 77 and 78, and the keys virtual-q and virtual-period. This also uses the auxilliary commands shftAltCtl-f5, virtual-1, and virtual-f6, which are used by a lot of my other Uedit commands. It also calls shft-gadget3 to set bookmarks, and macronum 43 to go to them. This will not work with Uedit versions 2.4 and older. For 2.5 it will require a little editing; for instance you'll have to remove the first arg to the push and pop functions. The first eight errors get bookmarks put on them, so they won't get lost if you edit the file around them. After the first eight errors, the routine to go to the next/previous error works by counting the correct number of lines backwards from the end of the file. If you have lengthened or shortened the source file BELOW the error, it will end up on the wrong line. The correct line that the error is in is displayed with the error message, just in case. If you really need to see what column the compiler reported the error in, you can view the error message file directly by looking at buf78. The column number is the number right before the letter E or W, bracketed in colons. Note that Aztec counts columns from zero whereas Uedit counts from one. Another shortcoming of QuikFix is that unimportant warnings like "auto variable not used in function" are enough to set it off, so you can't just go ahead and use the result anyway when such a result comes up. All in all Aztec could stand to work a little more on this feature. Use of QuikFix is not recommended if you are short on memory. Having the compiler and Uedit both running at once needs like half a meg of available space to be comfortable. -- -- -- -- -- -- -- -- -- -- Handle Aztec QuikFix - usage: quikfix temporary_cd 5:24:E:41:initializer not a constant: .. (sLine) filename > line : column : E or W : error number : string : optional putmsg("Just a sec ...") freebuf(buf77) if (not is(buf61, eline)) { .. remember old CD runkey(shftaltctl-5) .. get new CD from rexx insertrgn(buf77, sfile, buf50, all) changedir(buf61) } movecursor(buf78, sfile) equateloc(buf78, sinvert, atcursor) while (not is(buf78, ">") & movecursor(buf78, echar)) nothing equateloc(buf78, einvert, atcursor) freebuf(buf50) insertrgn(buf50, sfile, buf78, invert) if (not runkey(virtual-f6)) { loadfile(buf50) if (not runkey(virtual-f6)) { runkey(shftaltctl-,) .. abandon compile putmsg("Can't find source file!") returnfalse } else editbuf(buf[n50]) } else editbuf(buf[n50]) push(n99, n94) equatenum(n94, 0) equatenum(n93, 0) movecursor(buf78, echar) while (tonumber(n0, buf78)) { movecursor(buf78, eword) movecursor(buf78, echar) tonumber(n1, buf78) .. column movecursor(buf78, sword) movecursor(buf78, downline) equateloc(buf78, loca, atcursor) if (not is(buf78, sline)) movecursor(buf78, sline) movecursor(buf78, schar) insertrgn(buf78, atcursor, " => ", all) linetoloc(curfile, atcursor, n0) do (n2, 1, n1) if (not is(curfile, eline)) movecursor(curfile, echar) if (gtnum(8, n93)) runkey(shft-gadget3) .. set bookmark incnum(n93) if (eqnum(n93, 1)) equateloc(curfile, mouseloc, atcursor) if (not is(curfile, sline)) movecursor(curfile, sline) while (is(curfile, " ") | is(curfile, 9)) movecursor(curfile, echar) insertrgn(buf78, atcursor, curfile, line) equateloc(buf78, atcursor, loca) } pop(n99, n94) equatenum(n95, -1) equateloc(curfile, atcursor, mouseloc) loctoline(curfile, n92, efile) freebuf(buf54) toword(buf54, n93) insertrgn(buf54, efile, " ERRORS! A-. = next err; A-, = prev; SA-. = recompile; SAC-, = quit CC", all) runkey(virtual-1) putmsg(buf54) updatedisplay while (not inputwaiting) delay(1) .. avoid refresh > .. macronum 1056 Go to next QuikFix error Go to previous QuikFix error Go to Quikfix error number n95 ") & movecursor(buf78, echar)) nothing movecursor(buf78, echar) if (not tonumber(n53, buf78)) { putmsg("AAGH! I'm all confused!") returnfalse } add(n53, n53, n54) linetoloc(curfile, atcursor, n53) movecursor(buf78, eword) movecursor(buf78, echar) if (not tonumber(n53, buf78)) { putmsg("AAGH! I'm all confused!") returnfalse } movecursor(buf78, sline) do (n54, 1, n53) if (not is(curfile, eline)) movecursor(curfile, echar) } do (n54, 1, 6) movecursor(buf78, eword) .. *** OPTIONAL freebuf(buf54) insertrgn(buf54, sfile, buf78, line) putmsg(buf54) > End QuikFix, tell Aztec C to recompile End QuikFix, tell Aztec C to abandon compilation Put Uedit's current directory in buf50 and show it Find a file buffer by name (supply name in buf50) return buffer in n50 VERSION FOR 2.6d OR NEWER: Send Uedit's screen to the front PRE-2.6d VERSION:::: Send Uedit's screen to the front .. for the above to work at all efficiently, you must make C:Run resident and be using SetPatch from AmigaDOS 1.3.2 or newer. Otherwise it will load the Run program from disk every time you call it. You should do so anyway, because otherwise ANY program that uses the AmigaDOS Execute() function to run other programs will be very inefficient. Also you should either make C:Endif resident and use AmigaShell (make L:Shell-Seg resident), or copy the endif program into ramdisk and change the command above to "ram:endif". Or you could call it "ram:DoNothing" or something because the endif program literally does nothing at all. Otherwise it will load c:Endif from disk. With everything resident virtual-1 will run in about a tenth of a second, moving Uedit's screen to the back and then back to the front. REMEMBER, EVEN IF YOU NEVER MAKE ANYTHING ELSE RESIDENT, DO make C:Run resident, and use SetPatch 1.3.2 or newer; not just for this but for everything.