home *** CD-ROM | disk | FTP | other *** search
- /********************CYGCC***************/
- options results
- arg err_file,file_type
- nl='0A'X
- flag_char='9B'X
- esc_char='1B'X
- if ~FindWind('Compiler_Window') then do
- 'okay1 unable to find Compiler_Window'
- exit
- end
- if~open(infile,err_file,'READ') then do
- 'OKAY1 unable to open file:'err_file
- exit
- end
- line_count=0
- err_count=0
- column=0
- instring=readln(infile)
- do until eof(infile)
- line_count=line_count+1
- if line_count>2 then
- if file_type='LINK' then
- call ReadLinkError()
- else do
- flag_pos=index(instring,flag_char)
- if flag_pos>0 then
- call ProcessFlagLine()
- else
- call ProcessOtherLine()
- end
- instring=readln(infile)
- end
-
- cl_res=close(infile)
- address command 'delete' err_file
- return err_count
-
- ReadLinkError:
- if index(instring,esc_char)>0,
- | index(upper(instring),'ERROR')>0 then
- err_count=err_count+1
- if instring~='' then
- 'Text' instring||nl
- return
-
- ProcessFlagLine:
- if index(instring,'Stack Overflow')>0 then do
- 'Text System <<<STACK OVERFLOW>>>*'||nl
- err_count=err_count+1
- end;else do
- column=flag_pos
- end
- return
-
- ProcessOtherLine:
- if column>0 then do
- parse var instring fname line_num severity . message
- 'Text' left(severity,9) '<<<'||message'>>>',
- fname line_num column||nl
- if severity ~='Warning' then err_count=err_count+1
- column=0
- end ; else do
- parse var instring firstword .
- if firstword='Module' then
- 'Text' instring||nl
- else do
- err_count=err_count+1
- if firstword='CXERR:' then
- 'Text Internal <<<Error number:',
- line_num'>>> * '||nl
- else
- 'Text Operation <<<' instring '>>>*'||nl
- end
- end
- return
-