Use GLib's regexp interface (backed by PCRE)

This commit is contained in:
LemonBoy 2016-01-14 14:10:00 +01:00 committed by Ailin Nemui
commit 8e5db471e4
7 changed files with 43 additions and 88 deletions

View file

@ -1,10 +1,6 @@
#ifndef __HILIGHT_TEXT_H
#define __HILIGHT_TEXT_H
#ifdef HAVE_REGEX_H
# include <regex.h>
#endif
#include "formats.h"
struct _HILIGHT_REC {
@ -24,10 +20,8 @@ struct _HILIGHT_REC {
unsigned int fullword:1; /* match `text' only for full words */
unsigned int regexp:1; /* `text' is a regular expression */
unsigned int case_sensitive:1;/* `text' must match case */
#ifdef HAVE_REGEX_H
unsigned int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
regex_t preg;
#endif
GRegex *preg;
char *servertag;
};