From 07b6e7363d910ad4828376d568a2f19fd8d64661 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Fri, 12 Oct 2007 13:36:37 +0000 Subject: Added per-protocol callback static tables, replacing callback ptr storage in the connectdata structure by a single handler table ptr. --- lib/dict.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'lib/dict.c') diff --git a/lib/dict.c b/lib/dict.c index 43bc72ebf..8266e2bb6 100644 --- a/lib/dict.c +++ b/lib/dict.c @@ -82,6 +82,33 @@ /* The last #include file should be: */ #include "memdebug.h" + +/* + * Forward declarations. + */ + +static CURLcode Curl_dict(struct connectdata *conn, bool *done); + +/* + * DICT protocol handler. + */ + +const struct Curl_handler Curl_handler_dict = { + "DICT", /* scheme */ + NULL, /* setup_connection */ + Curl_dict, /* do_it */ + NULL, /* done */ + NULL, /* do_more */ + NULL, /* connect_it */ + NULL, /* connecting */ + NULL, /* doing */ + NULL, /* proto_getsock */ + NULL, /* doing_getsock */ + NULL, /* disconnect */ + PORT_DICT, /* defport */ + PROT_DICT /* protocol */ +}; + static char *unescape_word(struct SessionHandle *data, const char *inp) { char *newp; @@ -115,7 +142,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inp) return dictp; } -CURLcode Curl_dict(struct connectdata *conn, bool *done) +static CURLcode Curl_dict(struct connectdata *conn, bool *done) { char *word; char *eword; -- cgit v1.2.3