20 #ifndef _NOMOS_REGEX_H 21 #define _NOMOS_REGEX_H 26 #include "_autodefs.h" 28 regex_t regc[NFOOTPRINTS];
30 void regexError(
int ret, regex_t *regc,
char *regex);
31 int endsIn(
char *
s,
char *suffix);
33 int textInFile(
char *pathname,
char *regex,
int flags);
34 int strGrep(
char *regex,
char *data,
int flags);
35 int idxGrep(
int index,
char *data,
int flags);
39 int idxGrep_base(
int index,
char *data,
int flags,
int mode);
40 int strNbuf(
char *data,
char *str);
41 int strNbuf_noGlobals(
char *data,
char *str , regmatch_t* matchPos,
int doSave ,
char* saveData);
42 int matchOnce(
int isPlain,
char *data,
char* regex, regex_t *rp, regmatch_t* regmatch );
regmatch_t * getRegmatch_t(GArray *in, int index)
From a given array, get regex match from a given index.
int idxGrep_base(int index, char *data, int flags, int mode)
compile a regex, and perform the search (on data?)
int idxGrep_recordPosition(int index, char *data, int flags)
compile a regex, perform the search and record findings
int s
The socket that the CLI will use to communicate.
int endsIn(char *s, char *suffix)
Check if a string ends with given suffix.
int textInFile(char *pathname, char *regex, int flags)
Check if a regex passes in a file.
int idxGrep_recordPositionDoctored(int index, char *data, int flags)
compile a regex, perform the search and record findings
int strNbuf(char *data, char *str)
Check if a string exists in buffer (case insensitive)
int lineInFile(char *pathname, char *regex)
Check if a line exists in a file.
int idxGrep(int index, char *data, int flags)
compile a regex, and perform the search (on data?)
void recordIndex(GArray *indexList, int index)
Add a given index to index list.
int strNbuf_noGlobals(char *data, char *str, regmatch_t *matchPos, int doSave, char *saveData)
This is our own internal, case-insensitive version of strstr().
void rememberWhatWeFound(GArray *highlight, GArray *regmatch_tArray, int index, int mode)
Store regex matches in highlight array.
int strGrep(char *regex, char *data, int flags)
General-purpose grep function, used for one-time-only searches.
int matchOnce(int isPlain, char *data, char *regex, regex_t *rp, regmatch_t *regmatch)
Perform a regex match on a given data and return only first match.
int idxGrep_recordIndex(int index, char *data, int flags)
compile a regex, perform the search and record index
void regexError(int ret, regex_t *regc, char *regex)
Log an error caused by regex.