diff --git a/po/de.po b/po/de.po index 51e81b4b..94eae9d5 100644 --- a/po/de.po +++ b/po/de.po @@ -1325,7 +1325,7 @@ msgstr "%C29*%O$t%C29MOTD übersprungen%O" #: src/common/textevents.h:277 msgid "%C23*%O$t%C28$1%C is already in use. Retrying with %C18$2%O..." -msgstr "%C23*%O$t%C28$1%C wird bereits verwendet. Erneurter Versuch mit %C18$2%O …" +msgstr "%C23*%O$t%C28$1%C wird bereits verwendet. Erneuter Versuch mit %C18$2%O …" #: src/common/textevents.h:280 msgid "%C23*%O$t%C28$1%C is erroneous. Retrying with %C18$2%O..." diff --git a/src/common/url.c b/src/common/url.c index f8dd38d1..0c43b8ef 100644 --- a/src/common/url.c +++ b/src/common/url.c @@ -35,20 +35,11 @@ GTree *url_btree = NULL; static gboolean regex_match (const GRegex *re, const char *word, int *start, int *end); static const GRegex *re_url (void); -static const GRegex *re_url_no_scheme (void); -static const GRegex *re_host (void); -static const GRegex *re_host6 (void); -static const GRegex *re_email (void); static const GRegex *re_nick (void); static const GRegex *re_channel (void); -static const GRegex *re_path (void); static gboolean match_nick (const char *word, int *start, int *end); static gboolean match_channel (const char *word, int *start, int *end); -static gboolean match_email (const char *word, int *start, int *end); static gboolean match_url (const char *word, int *start, int *end); -static gboolean match_host (const char *word, int *start, int *end); -static gboolean match_host6 (const char *word, int *start, int *end); -static gboolean match_path (const char *word, int *start, int *end); static int url_free (char *url, void *data) @@ -191,11 +182,7 @@ url_check_word (const char *word) int type; } m[] = { { match_url, WORD_URL }, - { match_email, WORD_EMAIL }, { match_channel, WORD_CHANNEL }, - { match_host6, WORD_HOST6 }, - { match_host, WORD_HOST }, - { match_path, WORD_PATH }, { match_nick, WORD_NICK }, { NULL, 0} }; @@ -268,43 +255,10 @@ match_channel (const char *word, int *start, int *end) return FALSE; } -static gboolean -match_email (const char *word, int *start, int *end) -{ - return regex_match (re_email (), word, start, end); -} - static gboolean match_url (const char *word, int *start, int *end) { - if (regex_match (re_url (), word, start, end)) - return TRUE; - - return regex_match (re_url_no_scheme (), word, start, end); -} - -static gboolean -match_host (const char *word, int *start, int *end) -{ - return regex_match (re_host (), word, start, end); -} - -static gboolean -match_host6 (const char *word, int *start, int *end) -{ - if (!regex_match (re_host6 (), word, start, end)) - return FALSE; - - if (word[*start] != '[') - return FALSE; - - return TRUE; -} - -static gboolean -match_path (const char *word, int *start, int *end) -{ - return regex_match (re_path (), word, start, end); + return regex_match (re_url (), word, start, end); } /* List of IRC commands for which contents (and thus possible URLs) @@ -451,34 +405,7 @@ make_re (const char *grist) return ret; } -/* HOST description --- */ -/* (see miscellaneous above) */ -static const GRegex * -re_host (void) -{ - static GRegex *host_ret; - - if (host_ret) return host_ret; - - host_ret = make_re ("(" "(" HOST_URL PORT ")|(" HOST ")" ")"); - - return host_ret; -} - -static const GRegex * -re_host6 (void) -{ - static GRegex *host6_ret; - - if (host6_ret) return host6_ret; - - host6_ret = make_re ("(" "(" IPV6ADDR ")|(" "\\[" IPV6ADDR "\\]" PORT ")" ")"); - - return host6_ret; -} - /* URL description --- */ -#define SCHEME "(%s)" #define LPAR "\\(" #define RPAR "\\)" #define NOPARENS "[^() \t]*" @@ -489,86 +416,18 @@ re_host6 (void) "(" NOPARENS ")" \ ")*" /* Zero or more occurrences of either of these */ \ "(?