home *** CD-ROM | disk | FTP | other *** search
- /* Get Next Error -- for Aztec C "Quick Fix" mode */
-
- options results
-
- /* look for a buffer named "AztecC.Err */
-
- GetPort name AztecC.Err
- errport = RESULT
- if RC > 0 then do
- say "Can't find error file!"
- address command "Wait 6"
- exit
- end
-
- /* say 'errport = ' errport */
-
- address value errport /* go the the AztecC.Err port */
- MoveDown /* move cursor down */
- GetLine /* get the current line */
- errtext = RESULT /* the AztecC.err line */
-
- if LENGTH(errtext) <= 0 then exit /* if a NULL line, the do nothing... */
-
- /* Umm, need to insert a check for line number... */
-
- Parse var errtext errfile '>' errline ':' errcol ':' errtype ':' errnum ':' errdesc
-
- GetPort name errfile
- fileport = RESULT
-
- if (RC > 0) then do /* If the source file was not found... */
- OpenDoc name errfile /* Open a new window */
- fileport = RESULT /* get the port */
- if RC > 0 then do /* if not there, then error */
- say "Couldn't open source file!"
- address command "Wait 6"
- exit
- end
- end
-
- /* need to print the error line in the title bar... */
-
- address value fileport
- IconifyWindow OFF
- Window2front
- ActivateWindow
- SetStatusBar errdesc
- Move errline 0
- MoveRight errcol
- exit
-