X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fregex.h;h=e11d377e453ae7d8ddb7db83ce383d62414de226;hb=cd0cd0c3d22d7acba240ca10d8594621cc67ee34;hp=2a6608a80837652cadf9d99dbc6067b12b2f81a5;hpb=2fc54aadf1ae7cbd4b08442b7a933950a22c66af;p=i3%2Fi3 diff --git a/include/regex.h b/include/regex.h index 2a6608a8..e11d377e 100644 --- a/include/regex.h +++ b/include/regex.h @@ -1,9 +1,13 @@ /* * vim:ts=4:sw=4:expandtab * + * i3 - an improved dynamic tiling window manager + * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) + * + * regex.c: Interface to libPCRE (perl compatible regular expressions). + * */ -#ifndef _REGEX_H -#define _REGEX_H +#pragma once /** * Creates a new 'regex' struct containing the given pattern and a PCRE @@ -17,12 +21,16 @@ */ 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 - * be visible without any debug loglevel. + * be visible without debug logging. * */ bool regex_matches(struct regex *regex, const char *input); - -#endif