summaryrefslogtreecommitdiff
path: root/src/tool_easysrc.h
diff options
context:
space:
mode:
authorColin Hogben <curl@pythontech.co.uk>2012-02-23 09:43:37 +0000
committerDaniel Stenberg <daniel@haxx.se>2012-02-23 22:32:57 +0100
commit995424298052fa02ac82a584ee4247939503f24a (patch)
treebefbe3a48f57edbdaf7fe33a5ec69d371a7c49c1 /src/tool_easysrc.h
parent2f1ad7d6e2192e64ca6a5187ecf44a80b0425389 (diff)
downloadcurl-995424298052fa02ac82a584ee4247939503f24a.tar.gz
Generate lists and use symbols in --libcurl code output.
This patch improves the output of curl's --libcurl option by generating code which builds curl_httppost and curl_slist lists, and uses symbolic names for enum and flag values. Variants of the my_setopt macro in tool_setopt.h are added in order to pass extra type information to the code-generation step in tool_setopt.c. If curl is configured with --disable-libcurl-option then the macros call curl_easy_setopt directly.
Diffstat (limited to 'src/tool_easysrc.h')
-rw-r--r--src/tool_easysrc.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/tool_easysrc.h b/src/tool_easysrc.h
index 8e81d5567..1d2c02765 100644
--- a/src/tool_easysrc.h
+++ b/src/tool_easysrc.h
@@ -26,12 +26,22 @@
/* global variable declarations, for easy-interface source code generation */
-extern struct curl_slist *easysrc;
-extern struct curl_slist *easysrc_remarks;
+extern struct curl_slist *easysrc_decl; /* Variable declarations */
+extern struct curl_slist *easysrc_data; /* Build slists, forms etc. */
+extern struct curl_slist *easysrc_code; /* Setopt calls etc. */
+extern struct curl_slist *easysrc_toohard; /* Unconvertible setopt */
+extern struct curl_slist *easysrc_clean; /* Clean up (reverse order) */
+extern int easysrc_form_count; /* Number of curl_httppost variables */
+extern int easysrc_slist_count; /* Number of curl_slist variables */
+
+extern CURLcode easysrc_init(void);
+extern CURLcode easysrc_add(struct curl_slist **plist, const char *bupf);
+extern CURLcode easysrc_addf(struct curl_slist **plist, const char *fmt, ...);
+extern CURLcode easysrc_perform(void);
+extern CURLcode easysrc_cleanup(void);
void dumpeasysrc(struct Configurable *config);
-#endif /* CURL_DISABLE_LIBCIRL_CMD */
+#endif /* CURL_DISABLE_LIBCURL_OPTION */
#endif /* HEADER_CURL_TOOL_EASYSRC_H */
-