Type representing a regular expression. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "regex2.h"
#include "set.h"
#include "types.h"
Go to the source code of this file.
Functions | |
bool | regex_equal (const struct Regex *a, const struct Regex *b) |
Compare two regexes. | |
void | regex_free (struct Regex **ptr) |
Free a Regex object. | |
static void | regex_destroy (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef) |
Destroy a Regex object - Implements ConfigSetType::destroy() -. | |
struct Regex * | regex_new (const char *str, uint32_t flags, struct Buffer *err) |
Create an Regex from a string. | |
static int | regex_string_set (const struct ConfigSet *cs, void *var, struct ConfigDef *cdef, const char *value, struct Buffer *err) |
Set a Regex by string - Implements ConfigSetType::string_set() -. | |
static int | regex_string_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *result) |
Get a Regex as a string - Implements ConfigSetType::string_get() -. | |
static int | regex_native_set (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err) |
Set a Regex config item by Regex object - Implements ConfigSetType::native_set() -. | |
static intptr_t | regex_native_get (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Get a Regex object from a Regex config item - Implements ConfigSetType::native_get() -. | |
static int | regex_reset (const struct ConfigSet *cs, void *var, const struct ConfigDef *cdef, struct Buffer *err) |
Reset a Regex to its initial value - Implements ConfigSetType::reset() -. | |
Variables | |
const struct ConfigSetType | CstRegex |
Config type representing a regular expression. | |
Type representing a regular expression.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file regex.c.
Compare two regexes.
a | First regex |
b | Second regex |
true | They are identical |
Definition at line 52 of file regex.c.
void regex_free | ( | struct Regex ** | ptr | ) |
Create an Regex from a string.
str | Regular expression |
flags | Type flags, e.g. D_REGEX_MATCH_CASE |
err | Buffer for error messages |
ptr | New Regex object |
NULL | Error |
Definition at line 102 of file regex.c.
const struct ConfigSetType CstRegex |
Config type representing a regular expression.