More string and buffer functions.
[apps/madmutt.git] / lib-lib / url.c
index a5ee410..79bf79e 100644 (file)
  * A simple URL parser.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#include <ctype.h>
-
-#include <lib-lib/lib-lib.h>
+#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;