X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-lib%2Furl.c;h=79bf79eb10b6474570656d632ae11531eeb97030;hb=370334f0cfae3a5a9fe49b40df22e6753a87ac80;hp=a5ee4103ed76816d381b2e87590edffd49121549;hpb=230399f9632c37b66c1c117a17e8327eae6b3235;p=apps%2Fmadmutt.git diff --git a/lib-lib/url.c b/lib-lib/url.c index a5ee410..79bf79e 100644 --- a/lib-lib/url.c +++ b/lib-lib/url.c @@ -29,14 +29,7 @@ * A simple URL parser. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include +#include "lib-lib.h" static struct mapping_t UrlMap[] = { {"file", U_FILE}, @@ -44,10 +37,6 @@ static struct mapping_t UrlMap[] = { {"imaps", U_IMAPS}, {"pop", U_POP}, {"pops", U_POPS}, - {"nntp", U_NNTP}, - {"news", U_NNTP}, - {"nntps", U_NNTPS}, - {"snews", U_NNTPS}, {"mailto", U_MAILTO}, {NULL, U_UNKNOWN} }; @@ -103,7 +92,7 @@ static char *ciss_parse_userhost(ciss_url_t *ciss, char *src) ciss->host = NULL; ciss->port = 0; - if (strncmp(src, "//", 2)) + if (m_strncmp(src, "//", 2)) return src; src += 2; @@ -154,7 +143,7 @@ int url_parse_ciss(ciss_url_t *ciss, char *src) } /* url_ciss_tostring: output the URL string for a given CISS object. */ -int url_ciss_tostring(ciss_url_t *ciss, char *dst, ssize_t len, int flags) +int url_ciss_tostring(const ciss_url_t *ciss, char *dst, ssize_t len, int flags) { ssize_t l = 0;