* Commented out the 'PrintFlat' and 'PrintFile' functions
authorArt Cancro <ajc@citadel.org>
Wed, 21 May 2008 17:24:41 +0000 (17:24 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 21 May 2008 17:24:41 +0000 (17:24 +0000)
  because they are only used in debug tests that are also commented
  out.  Silences a compiler warning.
* Removed parse_url() from libcitadel.  No longer necessary because
  libcurl handles all this stuff for us now.

libcitadel/lib/libcitadel.h
libcitadel/lib/mime_parser.c
libcitadel/lib/tools.c

index 8c90357a96da565551aaae23fe14f895c67c6c88..e9e964807e11c37e7f5e142adbe3b8add4d4ebd9 100644 (file)
@@ -316,7 +316,6 @@ int GetCount(HashList *Hash);
 const void *GetSearchPayload(const void *HashVoid);
 void SortByPayload(HashList *Hash, CompareFunc SortBy);
 void convert_spaces_to_underscores(char *str);
-int parse_url(char *url, char *hostname, int *port, char *identifier);
 
 /*
  * Convert 4 bytes char into an Integer.
index 45a6fc700ea123c3f19a81e45fd8630e083815ab..0d9c66984f50046aba55b448ff2294049c0c44c3 100644 (file)
@@ -754,6 +754,7 @@ static void DeleteIcon(void *IconNamePtr)
        free(Icon->FileName);
 }
 
+/*
 static const char *PrintFlat(void *IconNamePtr)
 {
        IconName *Icon = (IconName*) IconNamePtr;
@@ -764,6 +765,8 @@ static const char *PrintFile(void *IconNamePtr)
        IconName *Icon = (IconName*) IconNamePtr;
        return Icon->FileName;
 }
+*/
+
 #define GENSTR "x-generic"
 #define IGNORE_PREFIX_1 "gnome-mime"
 int LoadIconDir(const char *DirName)
index 60168fe91e0ca0cb3cd8c21cc38d775623b43515..fac3cb5ad6644f08cd52efc4dca0659f633b1155 100644 (file)
@@ -1032,59 +1032,3 @@ void convert_spaces_to_underscores(char *str)
 }
 
 
-/* 
- * Parse a URL into host, port number, and resource identifier.
- * (This is used by various functions which might need to fetch web pages.)
- */
-int parse_url(char *url, char *hostname, int *port, char *identifier)
-{
-       char protocol[1024];
-       char scratch[1024];
-       char *ptr = NULL;
-       char *nptr = NULL;
-       
-       strcpy(scratch, url);
-       ptr = (char *)strchr(scratch, ':');
-       if (!ptr) {
-               return(1);      /* no protocol specified */
-       }
-
-       strcpy(ptr, "");
-       strcpy(protocol, scratch);
-       if (strcmp(protocol, "http")) {
-               return(2);      /* not HTTP */
-       }
-
-       strcpy(scratch, url);
-       ptr = (char *) strstr(scratch, "//");
-       if (!ptr) {
-               return(3);      /* no server specified */
-       }
-       ptr += 2;
-
-       strcpy(hostname, ptr);
-       nptr = (char *)strchr(ptr, ':');
-       if (!nptr) {
-               *port = 80;     /* default */
-               nptr = (char *)strchr(hostname, '/');
-       }
-       else {
-               sscanf(nptr, ":%d", port);
-               nptr = (char *)strchr(hostname, ':');
-       }
-
-       if (nptr) {
-               *nptr = '\0';
-       }
-
-       nptr = (char *)strchr(ptr, '/');
-       
-       if (!nptr) {
-               return(4);      /* no url specified */
-       }
-       
-       strcpy(identifier, nptr);
-       return(0);
-}
-
-