summaryrefslogtreecommitdiff
path: root/setedit/setedit/include/loadcle.h
blob: 4022ef90d6b077518a927c595a2f4ad08f05e634 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Copyright (C) 1996-2005 by Salvador E. Tropea (SET),
   see copyrigh file for details */
/*****************************************************************************

 Command Line Errors

 This module handles the parsing of errors reported by external programs.

*****************************************************************************/

#include <ced_pcre.h>

struct strCLE
{
 // Name of the program
 char *Name;
 // Pattern to match
 pcre *Pattern;
 // Subexpressions:
 uchar File;
 uchar Line;
 uchar Severity;
 uchar Description;
 // Pattern to indicate the makefile changed the path
 pcre *EnterDirPat;
 uchar EnterDirDir;
 // Flag to indicate this structure was loaded
 char Loaded;
 // This falg indicates we must use the internal parser. That's for the GNU parser
 char UseInternal;
 // Pattern to indicate the makefile went back one dir level
 pcre *LeaveDir;
 // Pattern for the "Severity" when it means "error"
 pcre *SevError;
 // Pattern for the "Severity" when it means "warning"
 pcre *SevWarn;
};

extern strCLE *CLEValues;
const int maxCLEFileWidth=256;

class TStringCollection;

extern void CLESetFileName(const char *name);
extern void UnloadCLEFile();
extern TStringCollection *CLEGetList();
extern int CLEGetIndexOf(const char *name);
extern int CLEGetIndexOfLoad(const char *name);
extern int CLEDoSearch(char *search, int len, pcre *CompiledPCRE);
extern int  CLEGetMatch(int match, char *buf, int maxLen);
extern void CLEGetMatch(int match, int &offset, int &len);
extern pcre *CLECompileRegEx(char *text, int &subX);