From: nishi Date: Fri, 26 Jan 2024 23:27:18 +0000 (+0000) Subject: adding gopher support, wip X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=d78632bcae6d0c50dff7d8454edcda4a0d754483;p=libw3.git adding gopher support, wip git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@98 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Library/Core.c b/Library/Core.c index 674c2ff..2dfac35 100644 --- a/Library/Core.c +++ b/Library/Core.c @@ -6,6 +6,7 @@ #include "W3File.h" #include "W3HTTP.h" +#include "W3Gopher.h" #include #include @@ -70,6 +71,7 @@ struct W3* W3_Create(const char* protocol, const char* hostname, int port) { #ifdef SSL_SUPPORT } else if(strcmp(protocol, "https") == 0) { #endif + }else if(strcmp(protocol, "gopher") == 0){ } else { __W3_Debug("Protocol", "Not suppported"); W3_Free(w3); @@ -105,8 +107,14 @@ void W3_Set_Path(struct W3* w3, const char* path) { } void W3_Send_Request(struct W3* w3) { - if(strcmp(w3->protocol, "http") == 0 || strcmp(w3->protocol, "https") == 0) { + if(strcmp(w3->protocol, "http") == 0 +#ifdef SSL_SUPPORT + || strcmp(w3->protocol, "https") == 0 +#endif + ) { __W3_HTTP_Request(w3); + }else if(strcmp(w3->protocol, "gopher") == 0){ + __W3_Gopher_Request(w3); } else if(strcmp(w3->protocol, "file") == 0) { __W3_File_Request(w3); } diff --git a/W3Version.h.p b/W3Version.h.p index c8f982c..ead9e3e 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "1.6" \ +#define LIBW3_VERSION "1.6A" \ SUFFIX #ifdef __cplusplus