summaryrefslogtreecommitdiff
path: root/lib/dict.c
diff options
context:
space:
mode:
authorPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2007-10-12 13:36:37 +0000
committerPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2007-10-12 13:36:37 +0000
commit07b6e7363d910ad4828376d568a2f19fd8d64661 (patch)
tree1b61554caff5805e38ee72f2151e80c0675610ae /lib/dict.c
parent2741f97a69e79a8489e395f105bff0d92567bc21 (diff)
downloadcurl-07b6e7363d910ad4828376d568a2f19fd8d64661.tar.gz
Added per-protocol callback static tables, replacing callback ptr storage
in the connectdata structure by a single handler table ptr.
Diffstat (limited to 'lib/dict.c')
-rw-r--r--lib/dict.c29
1 files changed, 28 insertions, 1 deletions
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;