More string and buffer functions.
[apps/madmutt.git] / lib-lib / url.c
index afc444b..79bf79e 100644 (file)
  * A simple URL parser.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <ctype.h>
-
-#include <lib-lib/mem.h>
-#include <lib-lib/ascii.h>
-#include <lib-lib/mapping.h>
-#include <lib-lib/url.h>
-
-#include <lib-mime/mime.h>
-
-#include "mutt.h"
+#include "lib-lib.h"
 
 static struct mapping_t UrlMap[] = {
     {"file",   U_FILE},
@@ -50,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}
 };
@@ -109,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;
@@ -160,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;