From: nishi Date: Tue, 13 Feb 2024 02:34:27 +0000 (+0000) Subject: finger protocol X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e54068e6019f5fcd89338b43e99651c97a4899aa;p=libw3.git finger protocol git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@206 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Library/Core.c b/Library/Core.c index 513c634..b466570 100644 --- a/Library/Core.c +++ b/Library/Core.c @@ -9,6 +9,7 @@ #include "W3Gopher.h" #include "W3HTTP.h" #include "W3POP3.h" +#include "W3Finger.h" #ifdef SSL_SUPPORT #include "W3Gemini.h" #endif @@ -86,6 +87,7 @@ struct W3* W3_Create(const char* protocol, const char* hostname, int port) { } else if(strcmp(protocol, "gemini") == 0) { } else if(strcmp(protocol, "gophers") == 0) { #endif + } else if(strcmp(protocol, "finger") == 0) { } else if(strcmp(protocol, "gopher") == 0) { } else if(strcmp(protocol, "pop3") == 0) { } else { @@ -153,6 +155,8 @@ void W3_Send_Request(struct W3* w3) { } else if(strcmp(w3->protocol, "gemini") == 0) { __W3_Gemini_Request(w3); #endif + } else if(strcmp(w3->protocol, "finger") == 0) { + __W3_Finger_Request(w3); } else if(strcmp(w3->protocol, "file") == 0) { __W3_File_Request(w3); } diff --git a/Library/Makefile b/Library/Makefile index f7a6592..5672b01 100644 --- a/Library/Makefile +++ b/Library/Makefile @@ -1,7 +1,7 @@ # $Id$ .PHONY: clean install -OBJS = ./Core.o ./Util.o ./DNS.o ./HTTP.o ./Gopher.o ./POP3.o ./File.o ./URL.o ./Tag.o +OBJS = ./Core.o ./Util.o ./DNS.o ./HTTP.o ./Gopher.o ./POP3.o ./Finger.o ./File.o ./URL.o ./Tag.o ifeq ($(TCL),YES) OBJS += ./Tcl.o diff --git a/Library/URL.c b/Library/URL.c index 459b1aa..45a579a 100644 --- a/Library/URL.c +++ b/Library/URL.c @@ -62,7 +62,10 @@ struct W3URL* W3_Parse_URL(const char* _url) { r->port = 70; } else if(strcmp(r->protocol, "gemini") == 0) { r->port = 1965; + } else if(strcmp(r->protocol, "finger") == 0) { + r->port = 79; } + } r->host = __W3_Strdup(url + start); str = malloc(strlen(r->host) + 64); diff --git a/W3Version.h.p b/W3Version.h.p index e235c3c..4bcd77a 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.7" \ +#define LIBW3_VERSION "2.8" \ SUFFIX #ifdef __cplusplus