Regexp ignores are now compiled when they're created, not every time

they're checked (every time a new line is received). This should reduce
some CPU load when using them.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@812 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-07 00:06:35 +00:00 committed by cras
commit 4301e04791
2 changed files with 20 additions and 3 deletions

View file

@ -2,6 +2,9 @@
#define __IGNORE_H
#include "servers.h"
#ifdef HAVE_REGEX_H
# include <regex.h>
#endif
typedef struct {
char *mask; /* nick mask */
@ -18,6 +21,10 @@ typedef struct {
int regexp:1;
int fullword:1;
int replies:1; /* ignore replies to nick in channel */
#ifdef HAVE_REGEX_H
int regexp_compiled:1; /* should always be TRUE, unless regexp is invalid */
regex_t preg;
#endif
} IGNORE_REC;
extern GSList *ignores;