home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
clarion
/
brfcla2.zip
/
CLAINITL.INC
< prev
next >
Wrap
Text File
|
1989-06-07
|
4KB
|
93 lines
;;* Macros to provide support for Clarion Compiler and error detection
;;* when compiling from within BRIEF. SEE ALSO CCOMPILE.M for further
;;* information on installation.
;;* Written by:
;;* Kevin Baradet
;;* Strategic Power Systems, Inc.
;;* 1717 Central Ave.
;;* Albany, NY 12205-4725
;;* (518) 452-7773 voice
;;*
;;* Revision History:
;;* =================
;;* 1-June-1989 Incept Date Kevin Baradet
;;*
;;* Installation
;;* ============
;;* 1) Load the replacement CCOMPILE macro to provide Clarion support
;;* Copy the following line into your initials macro above the (return)
;;* macro :
;;* (autoload "ccompile" "compile_it" "cc")
;;*
;;* 2) Copy the following include directive at the end of your initials
;;* source code file:
;;* #include "clainitl.inc"
;;* 3) Recompile your initals macro
;;* Setup tabs for CLARION Language files
(macro .cla
(
(tabs 9 17)
)
)
;;* Clarion .MDL files
(macro .mdl
(
(tabs 9 17)
)
)
;;***************************************************************************
;;*** Clarion specifc error_info macro follows:
;;***************************************************************************
(macro .cla_error_info ;;* Locates and parses CLARION CCMP
( ;;* error file msgs for (errorfix)
(string errtext) ;;* Declare string vars/parms
(int scol ecol errline errcol) ;;* Declare numeric vars/parms
(save_position) ;;* Save current pos onto stack
(= errtext (read)) ;;* Read the whole error line
(= scol (+ (index errtext "@") 1)) ;;* Where error line number starts
(= ecol (index errtext "/")) ;;* Line number ends here
;;* Extract substring containing
;;* line number and convert to an int
(= errline (atoi(substr errtext scol (- ecol scol))))
(= scol (+ ecol 1)) ;;* Error column number starts here
(= ecol (index errtext ":")) ;;* and end here
;;* Extract substring containing
;;* col number and convert to an int
(= errcol (atoi(substr errtext scol (- ecol scol))))
(move_abs NULL (+ ecol 1)) ;;* Skip over terminating colon
(search_fwd "[~ \\t]") ;;* Search for start of error message
(inq_position NULL scol) ;;* Save starting pos of error message
(= errtext (substr errtext scol)) ;;* Extract substring containing message
;(message "L%dC%d %s" errline errcol errtext) ;;* Diagnostic
(restore_position) ;;* Restore cursor to entry pos
;;* Return Parms to (errorfix)
(put_parm 1 errline) ;;* Line # of error as Parm 1
(put_parm 2 errcol) ;;* Col # of error as Parm 2
(put_parm 3 errtext) ;;* Text of error msg as Parm 3
(returns 2) ;;* For now, return a 'Type 2'
;;* error to caller
)
)
;;****************************************************************************
;;** Clarion .CLA file next error macro for ERRORFIX.M
;;****************************************************************************
(macro .cla_next_error ;;* Called by ERRORFIX.M
(returns (search_fwd "<[EW] \\c" 1 1)) ;;* Error file line start w/
) ;;* an 'E' or 'W'
;;****************************************************************************
;;** Clarion .CLA file previous error macro for ERRORFIX.M
;;****************************************************************************
(macro .cla_prev_error ;;* Called by ERRORFIX.M
(returns (search_back "<[EW] \\c" 1 1))
)
;;* Include File Ends