Hopefully fix building when HAVE_REGCOMP is not defined.
Add debug message when trying to parse an error regex when HAVE_REGCOMP is undefined. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2992 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
bee27a12d1
commit
80538bb116
@ -1,3 +1,11 @@
|
||||
2008-09-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/filetypes.c:
|
||||
Hopefully fix building when HAVE_REGCOMP is not defined.
|
||||
Add debug message when trying to parse an error regex when
|
||||
HAVE_REGCOMP is undefined.
|
||||
|
||||
|
||||
2008-09-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
||||
* src/main.h, src/about.c, src/main.c, src/socket.c:
|
||||
|
@ -55,8 +55,10 @@ typedef struct GeanyFiletypePrivate
|
||||
{
|
||||
GtkWidget *menu_item; /* holds a pointer to the menu item for this filetype */
|
||||
gboolean keyfile_loaded;
|
||||
#ifdef HAVE_REGCOMP
|
||||
regex_t error_regex;
|
||||
gboolean error_regex_compiled;
|
||||
#endif
|
||||
}
|
||||
GeanyFiletypePrivate;
|
||||
|
||||
@ -852,11 +854,13 @@ static void set_error_regex(GeanyFiletype *ft, gchar *string)
|
||||
{
|
||||
setptr(ft->error_regex_string, string);
|
||||
|
||||
#ifdef HAVE_REGCOMP
|
||||
if (ft->priv->error_regex_compiled)
|
||||
regfree(&ft->priv->error_regex);
|
||||
|
||||
ft->priv->error_regex_compiled = FALSE;
|
||||
/* regex will be compiled when needed */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1208,6 +1212,8 @@ gboolean filetypes_parse_error_message(GeanyFiletype *ft, const gchar *message,
|
||||
gchar **filename, gint *line)
|
||||
{
|
||||
#ifndef HAVE_REGCOMP
|
||||
if (!NZV(ft->error_regex_string))
|
||||
geany_debug("No regex support - maybe you should configure with --enable-gnu-regex!");
|
||||
return FALSE;
|
||||
#else
|
||||
regex_t *regex = &ft->priv->error_regex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user