@ -148,7 +148,7 @@ struct Ignore_Event {
|
||||
*
|
||||
*/
|
||||
struct regex {
|
||||
const char *pattern;
|
||||
char *pattern;
|
||||
pcre *regex;
|
||||
pcre_extra *extra;
|
||||
};
|
||||
|
@ -28,4 +28,10 @@ void match_copy(Match *dest, Match *src);
|
||||
*/
|
||||
bool match_matches_window(Match *match, i3Window *window);
|
||||
|
||||
/**
|
||||
* Frees the given match. It must not be used afterwards!
|
||||
*
|
||||
*/
|
||||
void match_free(Match *match);
|
||||
|
||||
#endif
|
||||
|
@ -17,6 +17,12 @@
|
||||
*/
|
||||
struct regex *regex_new(const char *pattern);
|
||||
|
||||
/**
|
||||
* Frees the given regular expression. It must not be used afterwards!
|
||||
*
|
||||
*/
|
||||
void regex_free(struct regex *regex);
|
||||
|
||||
/**
|
||||
* Checks if the given regular expression matches the given input and returns
|
||||
* true if it does. In either case, it logs the outcome using LOG(), so it will
|
||||
|
Reference in New Issue
Block a user