[Feature][ZXW-88]merge P50 version
Only Configure: No
Affected branch: master
Affected module: unknown
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I34667719d9e0e7e29e8e4368848601cde0a48408
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/.checksrc b/ap/lib/libcurl/curl-7.86.0/docs/examples/.checksrc
new file mode 100755
index 0000000..dea90aa
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/.checksrc
@@ -0,0 +1,3 @@
+disable TYPEDEFSTRUCT
+disable SNPRINTF
+disable BANNEDFUNC
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/10-at-a-time.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/10-at-a-time.c
new file mode 100755
index 0000000..1739a9e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/10-at-a-time.c
@@ -0,0 +1,152 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Download many files in parallel, in the same thread.
+ * </DESC>
+ */
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#ifndef WIN32
+# include <unistd.h>
+#endif
+#include <curl/curl.h>
+
+static const char *urls[] = {
+ "https://www.microsoft.com",
+ "https://opensource.org",
+ "https://www.google.com",
+ "https://www.yahoo.com",
+ "https://www.ibm.com",
+ "https://www.mysql.com",
+ "https://www.oracle.com",
+ "https://www.ripe.net",
+ "https://www.iana.org",
+ "https://www.amazon.com",
+ "https://www.netcraft.com",
+ "https://www.heise.de",
+ "https://www.chip.de",
+ "https://www.ca.com",
+ "https://www.cnet.com",
+ "https://www.mozilla.org",
+ "https://www.cnn.com",
+ "https://www.wikipedia.org",
+ "https://www.dell.com",
+ "https://www.hp.com",
+ "https://www.cert.org",
+ "https://www.mit.edu",
+ "https://www.nist.gov",
+ "https://www.ebay.com",
+ "https://www.playstation.com",
+ "https://www.uefa.com",
+ "https://www.ieee.org",
+ "https://www.apple.com",
+ "https://www.symantec.com",
+ "https://www.zdnet.com",
+ "https://www.fujitsu.com/global/",
+ "https://www.supermicro.com",
+ "https://www.hotmail.com",
+ "https://www.ietf.org",
+ "https://www.bbc.co.uk",
+ "https://news.google.com",
+ "https://www.foxnews.com",
+ "https://www.msn.com",
+ "https://www.wired.com",
+ "https://www.sky.com",
+ "https://www.usatoday.com",
+ "https://www.cbs.com",
+ "https://www.nbc.com/",
+ "https://slashdot.org",
+ "https://www.informationweek.com",
+ "https://apache.org",
+ "https://www.un.org",
+};
+
+#define MAX_PARALLEL 10 /* number of simultaneous transfers */
+#define NUM_URLS sizeof(urls)/sizeof(char *)
+
+static size_t write_cb(char *data, size_t n, size_t l, void *userp)
+{
+ /* take care of the data here, ignored in this example */
+ (void)data;
+ (void)userp;
+ return n*l;
+}
+
+static void add_transfer(CURLM *cm, int i)
+{
+ CURL *eh = curl_easy_init();
+ curl_easy_setopt(eh, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(eh, CURLOPT_URL, urls[i]);
+ curl_easy_setopt(eh, CURLOPT_PRIVATE, urls[i]);
+ curl_multi_add_handle(cm, eh);
+}
+
+int main(void)
+{
+ CURLM *cm;
+ CURLMsg *msg;
+ unsigned int transfers = 0;
+ int msgs_left = -1;
+ int still_alive = 1;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ cm = curl_multi_init();
+
+ /* Limit the amount of simultaneous connections curl should allow: */
+ curl_multi_setopt(cm, CURLMOPT_MAXCONNECTS, (long)MAX_PARALLEL);
+
+ for(transfers = 0; transfers < MAX_PARALLEL; transfers++)
+ add_transfer(cm, transfers);
+
+ do {
+ curl_multi_perform(cm, &still_alive);
+
+ while((msg = curl_multi_info_read(cm, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ char *url;
+ CURL *e = msg->easy_handle;
+ curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &url);
+ fprintf(stderr, "R: %d - %s <%s>\n",
+ msg->data.result, curl_easy_strerror(msg->data.result), url);
+ curl_multi_remove_handle(cm, e);
+ curl_easy_cleanup(e);
+ }
+ else {
+ fprintf(stderr, "E: CURLMsg (%d)\n", msg->msg);
+ }
+ if(transfers < NUM_URLS)
+ add_transfer(cm, transfers++);
+ }
+ if(still_alive)
+ curl_multi_wait(cm, NULL, 0, 1000, NULL);
+
+ } while(still_alive || (transfers < NUM_URLS));
+
+ curl_multi_cleanup(cm);
+ curl_global_cleanup();
+
+ return EXIT_SUCCESS;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.am b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.am
new file mode 100755
index 0000000..6759d97
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.am
@@ -0,0 +1,72 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+AUTOMAKE_OPTIONS = foreign nostdinc
+
+EXTRA_DIST = README.md Makefile.example Makefile.inc Makefile.m32 \
+ makefile.dj $(COMPLICATED_EXAMPLES) .checksrc
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_srcdir)/include is for libcurl's external include files
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+
+LIBDIR = $(top_builddir)/lib
+
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS += -DCURL_NO_OLDIES
+
+if USE_CPPFLAG_CURL_STATICLIB
+AM_CPPFLAGS += -DCURL_STATICLIB
+endif
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+
+# Dependencies
+if USE_EXPLICIT_LIB_DEPS
+LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
+else
+LDADD = $(LIBDIR)/libcurl.la
+endif
+
+# This might hold -Werror
+CFLAGS += @CURL_CFLAG_EXTRAS@
+
+# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
+include Makefile.inc
+
+all: $(check_PROGRAMS)
+
+CHECKSRC = $(CS_$(V))
+CS_0 = @echo " RUN " $@;
+CS_1 =
+CS_ = $(CS_0)
+
+checksrc:
+ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.c)
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.example b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.example
new file mode 100755
index 0000000..b05ca8e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.example
@@ -0,0 +1,55 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+# What to call the final executable
+TARGET = example
+
+# Which object files that the executable consists of
+OBJS= ftpget.o
+
+# What compiler to use
+CC = gcc
+
+# Compiler flags, -g for debug, -c to make an object file
+CFLAGS = -c -g
+
+# This should point to a directory that holds libcurl, if it isn't
+# in the system's standard lib dir
+# We also set a -L to include the directory where we have the openssl
+# libraries
+LDFLAGS = -L/home/dast/lib -L/usr/local/ssl/lib
+
+# We need -lcurl for the curl stuff
+# We need -lsocket and -lnsl when on Solaris
+# We need -lssl and -lcrypto when using libcurl with SSL support
+# We need -lpthread for the pthread example
+LIBS = -lcurl -lsocket -lnsl -lssl -lcrypto
+
+# Link the target with all objects and libraries
+$(TARGET) : $(OBJS)
+ $(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)
+
+# Compile the source files into object files
+ftpget.o : ftpget.c
+ $(CC) $(CFLAGS) $<
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.in b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.in
new file mode 100755
index 0000000..dc32d81
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.in
@@ -0,0 +1,2237 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@USE_CPPFLAG_CURL_STATICLIB_TRUE@am__append_1 = -DCURL_STATICLIB
+check_PROGRAMS = 10-at-a-time$(EXEEXT) altsvc$(EXEEXT) \
+ anyauthput$(EXEEXT) certinfo$(EXEEXT) chkspeed$(EXEEXT) \
+ cookie_interface$(EXEEXT) debug$(EXEEXT) \
+ externalsocket$(EXEEXT) fileupload$(EXEEXT) \
+ ftp-wildcard$(EXEEXT) ftpget$(EXEEXT) ftpgetinfo$(EXEEXT) \
+ ftpgetresp$(EXEEXT) ftpsget$(EXEEXT) ftpupload$(EXEEXT) \
+ ftpuploadfrommem$(EXEEXT) ftpuploadresume$(EXEEXT) \
+ getinfo$(EXEEXT) getinmemory$(EXEEXT) getredirect$(EXEEXT) \
+ getreferrer$(EXEEXT) headerapi$(EXEEXT) http-post$(EXEEXT) \
+ http2-download$(EXEEXT) http2-pushinmemory$(EXEEXT) \
+ http2-serverpush$(EXEEXT) http2-upload$(EXEEXT) http3$(EXEEXT) \
+ http3-present$(EXEEXT) httpcustomheader$(EXEEXT) \
+ httpput$(EXEEXT) httpput-postfields$(EXEEXT) https$(EXEEXT) \
+ imap-append$(EXEEXT) imap-authzid$(EXEEXT) imap-copy$(EXEEXT) \
+ imap-create$(EXEEXT) imap-delete$(EXEEXT) \
+ imap-examine$(EXEEXT) imap-fetch$(EXEEXT) imap-list$(EXEEXT) \
+ imap-lsub$(EXEEXT) imap-multi$(EXEEXT) imap-noop$(EXEEXT) \
+ imap-search$(EXEEXT) imap-ssl$(EXEEXT) imap-store$(EXEEXT) \
+ imap-tls$(EXEEXT) multi-app$(EXEEXT) \
+ multi-debugcallback$(EXEEXT) multi-double$(EXEEXT) \
+ multi-formadd$(EXEEXT) multi-legacy$(EXEEXT) \
+ multi-post$(EXEEXT) multi-single$(EXEEXT) parseurl$(EXEEXT) \
+ persistent$(EXEEXT) pop3-authzid$(EXEEXT) pop3-dele$(EXEEXT) \
+ pop3-list$(EXEEXT) pop3-multi$(EXEEXT) pop3-noop$(EXEEXT) \
+ pop3-retr$(EXEEXT) pop3-ssl$(EXEEXT) pop3-stat$(EXEEXT) \
+ pop3-tls$(EXEEXT) pop3-top$(EXEEXT) pop3-uidl$(EXEEXT) \
+ post-callback$(EXEEXT) postinmemory$(EXEEXT) postit2$(EXEEXT) \
+ postit2-formadd$(EXEEXT) progressfunc$(EXEEXT) \
+ resolve$(EXEEXT) sendrecv$(EXEEXT) sepheaders$(EXEEXT) \
+ sftpget$(EXEEXT) sftpuploadresume$(EXEEXT) \
+ shared-connection-cache$(EXEEXT) simple$(EXEEXT) \
+ simplepost$(EXEEXT) simplessl$(EXEEXT) smtp-authzid$(EXEEXT) \
+ smtp-expn$(EXEEXT) smtp-mail$(EXEEXT) smtp-mime$(EXEEXT) \
+ smtp-multi$(EXEEXT) smtp-ssl$(EXEEXT) smtp-tls$(EXEEXT) \
+ smtp-vrfy$(EXEEXT) sslbackend$(EXEEXT) url2file$(EXEEXT) \
+ urlapi$(EXEEXT)
+subdir = docs/examples
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/curl-amissl.m4 \
+ $(top_srcdir)/m4/curl-bearssl.m4 \
+ $(top_srcdir)/m4/curl-compilers.m4 \
+ $(top_srcdir)/m4/curl-confopts.m4 \
+ $(top_srcdir)/m4/curl-functions.m4 \
+ $(top_srcdir)/m4/curl-gnutls.m4 \
+ $(top_srcdir)/m4/curl-mbedtls.m4 $(top_srcdir)/m4/curl-nss.m4 \
+ $(top_srcdir)/m4/curl-openssl.m4 \
+ $(top_srcdir)/m4/curl-override.m4 \
+ $(top_srcdir)/m4/curl-reentrant.m4 \
+ $(top_srcdir)/m4/curl-rustls.m4 \
+ $(top_srcdir)/m4/curl-schannel.m4 \
+ $(top_srcdir)/m4/curl-sectransp.m4 \
+ $(top_srcdir)/m4/curl-sysconfig.m4 \
+ $(top_srcdir)/m4/curl-wolfssl.m4 $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/xc-am-iface.m4 \
+ $(top_srcdir)/m4/xc-cc-check.m4 \
+ $(top_srcdir)/m4/xc-lt-iface.m4 \
+ $(top_srcdir)/m4/xc-translit.m4 \
+ $(top_srcdir)/m4/xc-val-flgs.m4 \
+ $(top_srcdir)/m4/zz40-xc-ovr.m4 \
+ $(top_srcdir)/m4/zz50-xc-ovr.m4 \
+ $(top_srcdir)/m4/zz60-xc-ovr.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/lib/curl_config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+10_at_a_time_SOURCES = 10-at-a-time.c
+10_at_a_time_OBJECTS = 10-at-a-time.$(OBJEXT)
+10_at_a_time_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@10_at_a_time_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@10_at_a_time_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+altsvc_SOURCES = altsvc.c
+altsvc_OBJECTS = altsvc.$(OBJEXT)
+altsvc_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@altsvc_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@altsvc_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+anyauthput_SOURCES = anyauthput.c
+anyauthput_OBJECTS = anyauthput.$(OBJEXT)
+anyauthput_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@anyauthput_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@anyauthput_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+certinfo_SOURCES = certinfo.c
+certinfo_OBJECTS = certinfo.$(OBJEXT)
+certinfo_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@certinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@certinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+chkspeed_SOURCES = chkspeed.c
+chkspeed_OBJECTS = chkspeed.$(OBJEXT)
+chkspeed_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@chkspeed_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@chkspeed_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+cookie_interface_SOURCES = cookie_interface.c
+cookie_interface_OBJECTS = cookie_interface.$(OBJEXT)
+cookie_interface_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@cookie_interface_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@cookie_interface_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+debug_SOURCES = debug.c
+debug_OBJECTS = debug.$(OBJEXT)
+debug_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@debug_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@debug_DEPENDENCIES = $(LIBDIR)/libcurl.la
+externalsocket_SOURCES = externalsocket.c
+externalsocket_OBJECTS = externalsocket.$(OBJEXT)
+externalsocket_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@externalsocket_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@externalsocket_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+fileupload_SOURCES = fileupload.c
+fileupload_OBJECTS = fileupload.$(OBJEXT)
+fileupload_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@fileupload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@fileupload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftp_wildcard_SOURCES = ftp-wildcard.c
+ftp_wildcard_OBJECTS = ftp-wildcard.$(OBJEXT)
+ftp_wildcard_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftp_wildcard_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftp_wildcard_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpget_SOURCES = ftpget.c
+ftpget_OBJECTS = ftpget.$(OBJEXT)
+ftpget_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpgetinfo_SOURCES = ftpgetinfo.c
+ftpgetinfo_OBJECTS = ftpgetinfo.$(OBJEXT)
+ftpgetinfo_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpgetinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpgetinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpgetresp_SOURCES = ftpgetresp.c
+ftpgetresp_OBJECTS = ftpgetresp.$(OBJEXT)
+ftpgetresp_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpgetresp_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpgetresp_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpsget_SOURCES = ftpsget.c
+ftpsget_OBJECTS = ftpsget.$(OBJEXT)
+ftpsget_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpsget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpsget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpupload_SOURCES = ftpupload.c
+ftpupload_OBJECTS = ftpupload.$(OBJEXT)
+ftpupload_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpupload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpupload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpuploadfrommem_SOURCES = ftpuploadfrommem.c
+ftpuploadfrommem_OBJECTS = ftpuploadfrommem.$(OBJEXT)
+ftpuploadfrommem_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpuploadfrommem_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpuploadfrommem_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+ftpuploadresume_SOURCES = ftpuploadresume.c
+ftpuploadresume_OBJECTS = ftpuploadresume.$(OBJEXT)
+ftpuploadresume_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@ftpuploadresume_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@ftpuploadresume_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+getinfo_SOURCES = getinfo.c
+getinfo_OBJECTS = getinfo.$(OBJEXT)
+getinfo_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@getinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getinfo_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+getinmemory_SOURCES = getinmemory.c
+getinmemory_OBJECTS = getinmemory.$(OBJEXT)
+getinmemory_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@getinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+getredirect_SOURCES = getredirect.c
+getredirect_OBJECTS = getredirect.$(OBJEXT)
+getredirect_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@getredirect_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getredirect_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+getreferrer_SOURCES = getreferrer.c
+getreferrer_OBJECTS = getreferrer.$(OBJEXT)
+getreferrer_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@getreferrer_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@getreferrer_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+headerapi_SOURCES = headerapi.c
+headerapi_OBJECTS = headerapi.$(OBJEXT)
+headerapi_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@headerapi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@headerapi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http_post_SOURCES = http-post.c
+http_post_OBJECTS = http-post.$(OBJEXT)
+http_post_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http_post_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http_post_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http2_download_SOURCES = http2-download.c
+http2_download_OBJECTS = http2-download.$(OBJEXT)
+http2_download_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http2_download_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http2_download_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http2_pushinmemory_SOURCES = http2-pushinmemory.c
+http2_pushinmemory_OBJECTS = http2-pushinmemory.$(OBJEXT)
+http2_pushinmemory_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http2_pushinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http2_pushinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http2_serverpush_SOURCES = http2-serverpush.c
+http2_serverpush_OBJECTS = http2-serverpush.$(OBJEXT)
+http2_serverpush_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http2_serverpush_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http2_serverpush_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http2_upload_SOURCES = http2-upload.c
+http2_upload_OBJECTS = http2-upload.$(OBJEXT)
+http2_upload_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http2_upload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http2_upload_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+http3_SOURCES = http3.c
+http3_OBJECTS = http3.$(OBJEXT)
+http3_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http3_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http3_DEPENDENCIES = $(LIBDIR)/libcurl.la
+http3_present_SOURCES = http3-present.c
+http3_present_OBJECTS = http3-present.$(OBJEXT)
+http3_present_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@http3_present_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@http3_present_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+httpcustomheader_SOURCES = httpcustomheader.c
+httpcustomheader_OBJECTS = httpcustomheader.$(OBJEXT)
+httpcustomheader_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@httpcustomheader_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@httpcustomheader_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+httpput_SOURCES = httpput.c
+httpput_OBJECTS = httpput.$(OBJEXT)
+httpput_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@httpput_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@httpput_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+httpput_postfields_SOURCES = httpput-postfields.c
+httpput_postfields_OBJECTS = httpput-postfields.$(OBJEXT)
+httpput_postfields_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@httpput_postfields_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@httpput_postfields_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+https_SOURCES = https.c
+https_OBJECTS = https.$(OBJEXT)
+https_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@https_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@https_DEPENDENCIES = $(LIBDIR)/libcurl.la
+imap_append_SOURCES = imap-append.c
+imap_append_OBJECTS = imap-append.$(OBJEXT)
+imap_append_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_append_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_append_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_authzid_SOURCES = imap-authzid.c
+imap_authzid_OBJECTS = imap-authzid.$(OBJEXT)
+imap_authzid_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_copy_SOURCES = imap-copy.c
+imap_copy_OBJECTS = imap-copy.$(OBJEXT)
+imap_copy_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_copy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_copy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_create_SOURCES = imap-create.c
+imap_create_OBJECTS = imap-create.$(OBJEXT)
+imap_create_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_create_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_create_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_delete_SOURCES = imap-delete.c
+imap_delete_OBJECTS = imap-delete.$(OBJEXT)
+imap_delete_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_delete_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_delete_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_examine_SOURCES = imap-examine.c
+imap_examine_OBJECTS = imap-examine.$(OBJEXT)
+imap_examine_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_examine_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_examine_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_fetch_SOURCES = imap-fetch.c
+imap_fetch_OBJECTS = imap-fetch.$(OBJEXT)
+imap_fetch_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_fetch_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_fetch_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_list_SOURCES = imap-list.c
+imap_list_OBJECTS = imap-list.$(OBJEXT)
+imap_list_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_list_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_list_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_lsub_SOURCES = imap-lsub.c
+imap_lsub_OBJECTS = imap-lsub.$(OBJEXT)
+imap_lsub_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_lsub_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_lsub_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_multi_SOURCES = imap-multi.c
+imap_multi_OBJECTS = imap-multi.$(OBJEXT)
+imap_multi_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_noop_SOURCES = imap-noop.c
+imap_noop_OBJECTS = imap-noop.$(OBJEXT)
+imap_noop_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_noop_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_noop_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_search_SOURCES = imap-search.c
+imap_search_OBJECTS = imap-search.$(OBJEXT)
+imap_search_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_search_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_search_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_ssl_SOURCES = imap-ssl.c
+imap_ssl_OBJECTS = imap-ssl.$(OBJEXT)
+imap_ssl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_store_SOURCES = imap-store.c
+imap_store_OBJECTS = imap-store.$(OBJEXT)
+imap_store_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_store_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_store_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+imap_tls_SOURCES = imap-tls.c
+imap_tls_OBJECTS = imap-tls.$(OBJEXT)
+imap_tls_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@imap_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@imap_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_app_SOURCES = multi-app.c
+multi_app_OBJECTS = multi-app.$(OBJEXT)
+multi_app_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_app_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_app_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_debugcallback_SOURCES = multi-debugcallback.c
+multi_debugcallback_OBJECTS = multi-debugcallback.$(OBJEXT)
+multi_debugcallback_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_debugcallback_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_debugcallback_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_double_SOURCES = multi-double.c
+multi_double_OBJECTS = multi-double.$(OBJEXT)
+multi_double_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_double_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_double_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_formadd_SOURCES = multi-formadd.c
+multi_formadd_OBJECTS = multi-formadd.$(OBJEXT)
+multi_formadd_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_formadd_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_formadd_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_legacy_SOURCES = multi-legacy.c
+multi_legacy_OBJECTS = multi-legacy.$(OBJEXT)
+multi_legacy_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_legacy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_legacy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_post_SOURCES = multi-post.c
+multi_post_OBJECTS = multi-post.$(OBJEXT)
+multi_post_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_post_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_post_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+multi_single_SOURCES = multi-single.c
+multi_single_OBJECTS = multi-single.$(OBJEXT)
+multi_single_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@multi_single_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@multi_single_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+parseurl_SOURCES = parseurl.c
+parseurl_OBJECTS = parseurl.$(OBJEXT)
+parseurl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@parseurl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@parseurl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+persistent_SOURCES = persistent.c
+persistent_OBJECTS = persistent.$(OBJEXT)
+persistent_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@persistent_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@persistent_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_authzid_SOURCES = pop3-authzid.c
+pop3_authzid_OBJECTS = pop3-authzid.$(OBJEXT)
+pop3_authzid_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_dele_SOURCES = pop3-dele.c
+pop3_dele_OBJECTS = pop3-dele.$(OBJEXT)
+pop3_dele_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_dele_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_dele_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_list_SOURCES = pop3-list.c
+pop3_list_OBJECTS = pop3-list.$(OBJEXT)
+pop3_list_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_list_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_list_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_multi_SOURCES = pop3-multi.c
+pop3_multi_OBJECTS = pop3-multi.$(OBJEXT)
+pop3_multi_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_noop_SOURCES = pop3-noop.c
+pop3_noop_OBJECTS = pop3-noop.$(OBJEXT)
+pop3_noop_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_noop_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_noop_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_retr_SOURCES = pop3-retr.c
+pop3_retr_OBJECTS = pop3-retr.$(OBJEXT)
+pop3_retr_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_retr_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_retr_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_ssl_SOURCES = pop3-ssl.c
+pop3_ssl_OBJECTS = pop3-ssl.$(OBJEXT)
+pop3_ssl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_stat_SOURCES = pop3-stat.c
+pop3_stat_OBJECTS = pop3-stat.$(OBJEXT)
+pop3_stat_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_stat_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_stat_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_tls_SOURCES = pop3-tls.c
+pop3_tls_OBJECTS = pop3-tls.$(OBJEXT)
+pop3_tls_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_top_SOURCES = pop3-top.c
+pop3_top_OBJECTS = pop3-top.$(OBJEXT)
+pop3_top_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_top_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_top_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+pop3_uidl_SOURCES = pop3-uidl.c
+pop3_uidl_OBJECTS = pop3-uidl.$(OBJEXT)
+pop3_uidl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@pop3_uidl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@pop3_uidl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+post_callback_SOURCES = post-callback.c
+post_callback_OBJECTS = post-callback.$(OBJEXT)
+post_callback_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@post_callback_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@post_callback_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+postinmemory_SOURCES = postinmemory.c
+postinmemory_OBJECTS = postinmemory.$(OBJEXT)
+postinmemory_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@postinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@postinmemory_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+postit2_SOURCES = postit2.c
+postit2_OBJECTS = postit2.$(OBJEXT)
+postit2_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@postit2_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@postit2_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+postit2_formadd_SOURCES = postit2-formadd.c
+postit2_formadd_OBJECTS = postit2-formadd.$(OBJEXT)
+postit2_formadd_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@postit2_formadd_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@postit2_formadd_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+progressfunc_SOURCES = progressfunc.c
+progressfunc_OBJECTS = progressfunc.$(OBJEXT)
+progressfunc_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@progressfunc_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@progressfunc_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+resolve_SOURCES = resolve.c
+resolve_OBJECTS = resolve.$(OBJEXT)
+resolve_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@resolve_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@resolve_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+sendrecv_SOURCES = sendrecv.c
+sendrecv_OBJECTS = sendrecv.$(OBJEXT)
+sendrecv_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sendrecv_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sendrecv_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+sepheaders_SOURCES = sepheaders.c
+sepheaders_OBJECTS = sepheaders.$(OBJEXT)
+sepheaders_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sepheaders_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sepheaders_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+sftpget_SOURCES = sftpget.c
+sftpget_OBJECTS = sftpget.$(OBJEXT)
+sftpget_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sftpget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sftpget_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+sftpuploadresume_SOURCES = sftpuploadresume.c
+sftpuploadresume_OBJECTS = sftpuploadresume.$(OBJEXT)
+sftpuploadresume_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sftpuploadresume_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sftpuploadresume_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+shared_connection_cache_SOURCES = shared-connection-cache.c
+shared_connection_cache_OBJECTS = shared-connection-cache.$(OBJEXT)
+shared_connection_cache_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@shared_connection_cache_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@shared_connection_cache_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+simple_SOURCES = simple.c
+simple_OBJECTS = simple.$(OBJEXT)
+simple_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@simple_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simple_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+simplepost_SOURCES = simplepost.c
+simplepost_OBJECTS = simplepost.$(OBJEXT)
+simplepost_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@simplepost_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simplepost_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+simplessl_SOURCES = simplessl.c
+simplessl_OBJECTS = simplessl.$(OBJEXT)
+simplessl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@simplessl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@simplessl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_authzid_SOURCES = smtp-authzid.c
+smtp_authzid_OBJECTS = smtp-authzid.$(OBJEXT)
+smtp_authzid_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_authzid_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_expn_SOURCES = smtp-expn.c
+smtp_expn_OBJECTS = smtp-expn.$(OBJEXT)
+smtp_expn_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_expn_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_expn_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_mail_SOURCES = smtp-mail.c
+smtp_mail_OBJECTS = smtp-mail.$(OBJEXT)
+smtp_mail_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_mail_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_mail_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_mime_SOURCES = smtp-mime.c
+smtp_mime_OBJECTS = smtp-mime.$(OBJEXT)
+smtp_mime_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_mime_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_mime_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_multi_SOURCES = smtp-multi.c
+smtp_multi_OBJECTS = smtp-multi.$(OBJEXT)
+smtp_multi_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_multi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_ssl_SOURCES = smtp-ssl.c
+smtp_ssl_OBJECTS = smtp-ssl.$(OBJEXT)
+smtp_ssl_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_ssl_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_tls_SOURCES = smtp-tls.c
+smtp_tls_OBJECTS = smtp-tls.$(OBJEXT)
+smtp_tls_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_tls_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+smtp_vrfy_SOURCES = smtp-vrfy.c
+smtp_vrfy_OBJECTS = smtp-vrfy.$(OBJEXT)
+smtp_vrfy_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@smtp_vrfy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@smtp_vrfy_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+sslbackend_SOURCES = sslbackend.c
+sslbackend_OBJECTS = sslbackend.$(OBJEXT)
+sslbackend_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@sslbackend_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@sslbackend_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+url2file_SOURCES = url2file.c
+url2file_OBJECTS = url2file.$(OBJEXT)
+url2file_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@url2file_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@url2file_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+urlapi_SOURCES = urlapi.c
+urlapi_OBJECTS = urlapi.$(OBJEXT)
+urlapi_LDADD = $(LDADD)
+@USE_EXPLICIT_LIB_DEPS_FALSE@urlapi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_FALSE@ $(LIBDIR)/libcurl.la
+@USE_EXPLICIT_LIB_DEPS_TRUE@urlapi_DEPENDENCIES = \
+@USE_EXPLICIT_LIB_DEPS_TRUE@ $(LIBDIR)/libcurl.la
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES =
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = ./$(DEPDIR)/10-at-a-time.Po \
+ ./$(DEPDIR)/altsvc.Po ./$(DEPDIR)/anyauthput.Po \
+ ./$(DEPDIR)/certinfo.Po ./$(DEPDIR)/chkspeed.Po \
+ ./$(DEPDIR)/cookie_interface.Po ./$(DEPDIR)/debug.Po \
+ ./$(DEPDIR)/externalsocket.Po ./$(DEPDIR)/fileupload.Po \
+ ./$(DEPDIR)/ftp-wildcard.Po ./$(DEPDIR)/ftpget.Po \
+ ./$(DEPDIR)/ftpgetinfo.Po ./$(DEPDIR)/ftpgetresp.Po \
+ ./$(DEPDIR)/ftpsget.Po ./$(DEPDIR)/ftpupload.Po \
+ ./$(DEPDIR)/ftpuploadfrommem.Po ./$(DEPDIR)/ftpuploadresume.Po \
+ ./$(DEPDIR)/getinfo.Po ./$(DEPDIR)/getinmemory.Po \
+ ./$(DEPDIR)/getredirect.Po ./$(DEPDIR)/getreferrer.Po \
+ ./$(DEPDIR)/headerapi.Po ./$(DEPDIR)/http-post.Po \
+ ./$(DEPDIR)/http2-download.Po \
+ ./$(DEPDIR)/http2-pushinmemory.Po \
+ ./$(DEPDIR)/http2-serverpush.Po ./$(DEPDIR)/http2-upload.Po \
+ ./$(DEPDIR)/http3-present.Po ./$(DEPDIR)/http3.Po \
+ ./$(DEPDIR)/httpcustomheader.Po \
+ ./$(DEPDIR)/httpput-postfields.Po ./$(DEPDIR)/httpput.Po \
+ ./$(DEPDIR)/https.Po ./$(DEPDIR)/imap-append.Po \
+ ./$(DEPDIR)/imap-authzid.Po ./$(DEPDIR)/imap-copy.Po \
+ ./$(DEPDIR)/imap-create.Po ./$(DEPDIR)/imap-delete.Po \
+ ./$(DEPDIR)/imap-examine.Po ./$(DEPDIR)/imap-fetch.Po \
+ ./$(DEPDIR)/imap-list.Po ./$(DEPDIR)/imap-lsub.Po \
+ ./$(DEPDIR)/imap-multi.Po ./$(DEPDIR)/imap-noop.Po \
+ ./$(DEPDIR)/imap-search.Po ./$(DEPDIR)/imap-ssl.Po \
+ ./$(DEPDIR)/imap-store.Po ./$(DEPDIR)/imap-tls.Po \
+ ./$(DEPDIR)/multi-app.Po ./$(DEPDIR)/multi-debugcallback.Po \
+ ./$(DEPDIR)/multi-double.Po ./$(DEPDIR)/multi-formadd.Po \
+ ./$(DEPDIR)/multi-legacy.Po ./$(DEPDIR)/multi-post.Po \
+ ./$(DEPDIR)/multi-single.Po ./$(DEPDIR)/parseurl.Po \
+ ./$(DEPDIR)/persistent.Po ./$(DEPDIR)/pop3-authzid.Po \
+ ./$(DEPDIR)/pop3-dele.Po ./$(DEPDIR)/pop3-list.Po \
+ ./$(DEPDIR)/pop3-multi.Po ./$(DEPDIR)/pop3-noop.Po \
+ ./$(DEPDIR)/pop3-retr.Po ./$(DEPDIR)/pop3-ssl.Po \
+ ./$(DEPDIR)/pop3-stat.Po ./$(DEPDIR)/pop3-tls.Po \
+ ./$(DEPDIR)/pop3-top.Po ./$(DEPDIR)/pop3-uidl.Po \
+ ./$(DEPDIR)/post-callback.Po ./$(DEPDIR)/postinmemory.Po \
+ ./$(DEPDIR)/postit2-formadd.Po ./$(DEPDIR)/postit2.Po \
+ ./$(DEPDIR)/progressfunc.Po ./$(DEPDIR)/resolve.Po \
+ ./$(DEPDIR)/sendrecv.Po ./$(DEPDIR)/sepheaders.Po \
+ ./$(DEPDIR)/sftpget.Po ./$(DEPDIR)/sftpuploadresume.Po \
+ ./$(DEPDIR)/shared-connection-cache.Po ./$(DEPDIR)/simple.Po \
+ ./$(DEPDIR)/simplepost.Po ./$(DEPDIR)/simplessl.Po \
+ ./$(DEPDIR)/smtp-authzid.Po ./$(DEPDIR)/smtp-expn.Po \
+ ./$(DEPDIR)/smtp-mail.Po ./$(DEPDIR)/smtp-mime.Po \
+ ./$(DEPDIR)/smtp-multi.Po ./$(DEPDIR)/smtp-ssl.Po \
+ ./$(DEPDIR)/smtp-tls.Po ./$(DEPDIR)/smtp-vrfy.Po \
+ ./$(DEPDIR)/sslbackend.Po ./$(DEPDIR)/url2file.Po \
+ ./$(DEPDIR)/urlapi.Po
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = 10-at-a-time.c altsvc.c anyauthput.c certinfo.c chkspeed.c \
+ cookie_interface.c debug.c externalsocket.c fileupload.c \
+ ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c ftpsget.c \
+ ftpupload.c ftpuploadfrommem.c ftpuploadresume.c getinfo.c \
+ getinmemory.c getredirect.c getreferrer.c headerapi.c \
+ http-post.c http2-download.c http2-pushinmemory.c \
+ http2-serverpush.c http2-upload.c http3.c http3-present.c \
+ httpcustomheader.c httpput.c httpput-postfields.c https.c \
+ imap-append.c imap-authzid.c imap-copy.c imap-create.c \
+ imap-delete.c imap-examine.c imap-fetch.c imap-list.c \
+ imap-lsub.c imap-multi.c imap-noop.c imap-search.c imap-ssl.c \
+ imap-store.c imap-tls.c multi-app.c multi-debugcallback.c \
+ multi-double.c multi-formadd.c multi-legacy.c multi-post.c \
+ multi-single.c parseurl.c persistent.c pop3-authzid.c \
+ pop3-dele.c pop3-list.c pop3-multi.c pop3-noop.c pop3-retr.c \
+ pop3-ssl.c pop3-stat.c pop3-tls.c pop3-top.c pop3-uidl.c \
+ post-callback.c postinmemory.c postit2.c postit2-formadd.c \
+ progressfunc.c resolve.c sendrecv.c sepheaders.c sftpget.c \
+ sftpuploadresume.c shared-connection-cache.c simple.c \
+ simplepost.c simplessl.c smtp-authzid.c smtp-expn.c \
+ smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c smtp-tls.c \
+ smtp-vrfy.c sslbackend.c url2file.c urlapi.c
+DIST_SOURCES = 10-at-a-time.c altsvc.c anyauthput.c certinfo.c \
+ chkspeed.c cookie_interface.c debug.c externalsocket.c \
+ fileupload.c ftp-wildcard.c ftpget.c ftpgetinfo.c ftpgetresp.c \
+ ftpsget.c ftpupload.c ftpuploadfrommem.c ftpuploadresume.c \
+ getinfo.c getinmemory.c getredirect.c getreferrer.c \
+ headerapi.c http-post.c http2-download.c http2-pushinmemory.c \
+ http2-serverpush.c http2-upload.c http3.c http3-present.c \
+ httpcustomheader.c httpput.c httpput-postfields.c https.c \
+ imap-append.c imap-authzid.c imap-copy.c imap-create.c \
+ imap-delete.c imap-examine.c imap-fetch.c imap-list.c \
+ imap-lsub.c imap-multi.c imap-noop.c imap-search.c imap-ssl.c \
+ imap-store.c imap-tls.c multi-app.c multi-debugcallback.c \
+ multi-double.c multi-formadd.c multi-legacy.c multi-post.c \
+ multi-single.c parseurl.c persistent.c pop3-authzid.c \
+ pop3-dele.c pop3-list.c pop3-multi.c pop3-noop.c pop3-retr.c \
+ pop3-ssl.c pop3-stat.c pop3-tls.c pop3-top.c pop3-uidl.c \
+ post-callback.c postinmemory.c postit2.c postit2-formadd.c \
+ progressfunc.c resolve.c sendrecv.c sepheaders.c sftpget.c \
+ sftpuploadresume.c shared-connection-cache.c simple.c \
+ simplepost.c simplessl.c smtp-authzid.c smtp-expn.c \
+ smtp-mail.c smtp-mime.c smtp-multi.c smtp-ssl.c smtp-tls.c \
+ smtp-vrfy.c sslbackend.c url2file.c urlapi.c
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \
+ $(top_srcdir)/depcomp README.md
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AR_FLAGS = @AR_FLAGS@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLANK_AT_MAKETIME = @BLANK_AT_MAKETIME@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+
+# This might hold -Werror
+CFLAGS = @CFLAGS@ @CURL_CFLAG_EXTRAS@
+CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
+CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAG_CURL_STATICLIB = @CPPFLAG_CURL_STATICLIB@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CURLVERSION = @CURLVERSION@
+CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
+CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
+CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
+CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
+CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
+CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
+CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
+CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
+CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
+CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
+CURL_DISABLE_MQTT = @CURL_DISABLE_MQTT@
+CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
+CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
+CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
+CURL_DISABLE_SMB = @CURL_DISABLE_SMB@
+CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
+CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
+CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
+CURL_LT_SHLIB_VERSIONED_FLAVOUR = @CURL_LT_SHLIB_VERSIONED_FLAVOUR@
+CURL_NETWORK_AND_TIME_LIBS = @CURL_NETWORK_AND_TIME_LIBS@
+CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
+CURL_PLIST_VERSION = @CURL_PLIST_VERSION@
+CURL_WITH_MULTI_SSL = @CURL_WITH_MULTI_SSL@
+CYGPATH_W = @CYGPATH_W@
+DEFAULT_SSL_BACKEND = @DEFAULT_SSL_BACKEND@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+ENABLE_SHARED = @ENABLE_SHARED@
+ENABLE_STATIC = @ENABLE_STATIC@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILECMD = @FILECMD@
+FISH_FUNCTIONS_DIR = @FISH_FUNCTIONS_DIR@
+GCOV = @GCOV@
+GREP = @GREP@
+HAVE_BROTLI = @HAVE_BROTLI@
+HAVE_GNUTLS_SRP = @HAVE_GNUTLS_SRP@
+HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
+HAVE_LIBZ = @HAVE_LIBZ@
+HAVE_OPENSSL_SRP = @HAVE_OPENSSL_SRP@
+HAVE_PROTO_BSDSOCKET_H = @HAVE_PROTO_BSDSOCKET_H@
+HAVE_ZSTD = @HAVE_ZSTD@
+IDN_ENABLED = @IDN_ENABLED@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+IPV6_ENABLED = @IPV6_ENABLED@
+LCOV = @LCOV@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBCURL_LIBS = @LIBCURL_LIBS@
+LIBCURL_NO_SHARED = @LIBCURL_NO_SHARED@
+LIBOBJS = @LIBOBJS@
+
+# Prevent LIBS from being used for all link targets
+LIBS = $(BLANK_AT_MAKETIME)
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANOPT = @MANOPT@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+NROFF = @NROFF@
+NSS_LIBS = @NSS_LIBS@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKGADD_NAME = @PKGADD_NAME@
+PKGADD_PKG = @PKGADD_PKG@
+PKGADD_VENDOR = @PKGADD_VENDOR@
+PKGCONFIG = @PKGCONFIG@
+RANDOM_FILE = @RANDOM_FILE@
+RANLIB = @RANLIB@
+RC = @RC@
+REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSL_BACKENDS = @SSL_BACKENDS@
+SSL_ENABLED = @SSL_ENABLED@
+SSL_LIBS = @SSL_LIBS@
+STRIP = @STRIP@
+SUPPORT_FEATURES = @SUPPORT_FEATURES@
+SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
+USE_ARES = @USE_ARES@
+USE_BEARSSL = @USE_BEARSSL@
+USE_GNUTLS = @USE_GNUTLS@
+USE_HYPER = @USE_HYPER@
+USE_LIBRTMP = @USE_LIBRTMP@
+USE_LIBSSH = @USE_LIBSSH@
+USE_LIBSSH2 = @USE_LIBSSH2@
+USE_MBEDTLS = @USE_MBEDTLS@
+USE_MSH3 = @USE_MSH3@
+USE_NGHTTP2 = @USE_NGHTTP2@
+USE_NGHTTP3 = @USE_NGHTTP3@
+USE_NGTCP2 = @USE_NGTCP2@
+USE_NGTCP2_CRYPTO_GNUTLS = @USE_NGTCP2_CRYPTO_GNUTLS@
+USE_NGTCP2_CRYPTO_OPENSSL = @USE_NGTCP2_CRYPTO_OPENSSL@
+USE_NGTCP2_CRYPTO_WOLFSSL = @USE_NGTCP2_CRYPTO_WOLFSSL@
+USE_NSS = @USE_NSS@
+USE_OPENLDAP = @USE_OPENLDAP@
+USE_QUICHE = @USE_QUICHE@
+USE_RUSTLS = @USE_RUSTLS@
+USE_SCHANNEL = @USE_SCHANNEL@
+USE_SECTRANSP = @USE_SECTRANSP@
+USE_UNIX_SOCKETS = @USE_UNIX_SOCKETS@
+USE_WIN32_CRYPTO = @USE_WIN32_CRYPTO@
+USE_WIN32_LARGE_FILES = @USE_WIN32_LARGE_FILES@
+USE_WIN32_SMALL_FILES = @USE_WIN32_SMALL_FILES@
+USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
+USE_WOLFSSH = @USE_WOLFSSH@
+USE_WOLFSSL = @USE_WOLFSSL@
+VERSION = @VERSION@
+VERSIONNUM = @VERSIONNUM@
+ZLIB_LIBS = @ZLIB_LIBS@
+ZSH_FUNCTIONS_DIR = @ZSH_FUNCTIONS_DIR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libext = @libext@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = foreign nostdinc
+EXTRA_DIST = README.md Makefile.example Makefile.inc Makefile.m32 \
+ makefile.dj $(COMPLICATED_EXAMPLES) .checksrc
+
+
+# Specify our include paths here, and do it relative to $(top_srcdir) and
+# $(top_builddir), to ensure that these paths which belong to the library
+# being currently built and tested are searched before the library which
+# might possibly already be installed in the system.
+#
+# $(top_srcdir)/include is for libcurl's external include files
+
+# Avoid libcurl obsolete stuff
+AM_CPPFLAGS = -I$(top_srcdir)/include -DCURL_NO_OLDIES $(am__append_1)
+LIBDIR = $(top_builddir)/lib
+@USE_EXPLICIT_LIB_DEPS_FALSE@LDADD = $(LIBDIR)/libcurl.la
+
+# Dependencies
+@USE_EXPLICIT_LIB_DEPS_TRUE@LDADD = $(LIBDIR)/libcurl.la @LIBCURL_LIBS@
+
+# These examples require external dependencies that may not be commonly
+# available on POSIX systems, so don't bother attempting to compile them here.
+COMPLICATED_EXAMPLES = \
+ cacertinmem.c \
+ crawler.c \
+ curlgtk.c \
+ ephiperfifo.c \
+ evhiperfifo.c \
+ ghiper.c \
+ hiperfifo.c \
+ href_extractor.c \
+ htmltidy.c \
+ htmltitle.cpp \
+ multi-event.c \
+ multi-uv.c \
+ multithread.c \
+ opensslthreadlock.c \
+ sessioninfo.c \
+ smooth-gtk-thread.c \
+ synctime.c \
+ threaded-ssl.c \
+ usercertinmem.c \
+ version-check.pl \
+ xmlstream.c
+
+CHECKSRC = $(CS_$(V))
+CS_0 = @echo " RUN " $@;
+CS_1 =
+CS_ = $(CS_0)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/Makefile.inc $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/examples/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign docs/examples/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
+ esac;
+$(srcdir)/Makefile.inc $(am__empty):
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+10-at-a-time$(EXEEXT): $(10_at_a_time_OBJECTS) $(10_at_a_time_DEPENDENCIES) $(EXTRA_10_at_a_time_DEPENDENCIES)
+ @rm -f 10-at-a-time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(10_at_a_time_OBJECTS) $(10_at_a_time_LDADD) $(LIBS)
+
+altsvc$(EXEEXT): $(altsvc_OBJECTS) $(altsvc_DEPENDENCIES) $(EXTRA_altsvc_DEPENDENCIES)
+ @rm -f altsvc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(altsvc_OBJECTS) $(altsvc_LDADD) $(LIBS)
+
+anyauthput$(EXEEXT): $(anyauthput_OBJECTS) $(anyauthput_DEPENDENCIES) $(EXTRA_anyauthput_DEPENDENCIES)
+ @rm -f anyauthput$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(anyauthput_OBJECTS) $(anyauthput_LDADD) $(LIBS)
+
+certinfo$(EXEEXT): $(certinfo_OBJECTS) $(certinfo_DEPENDENCIES) $(EXTRA_certinfo_DEPENDENCIES)
+ @rm -f certinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(certinfo_OBJECTS) $(certinfo_LDADD) $(LIBS)
+
+chkspeed$(EXEEXT): $(chkspeed_OBJECTS) $(chkspeed_DEPENDENCIES) $(EXTRA_chkspeed_DEPENDENCIES)
+ @rm -f chkspeed$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(chkspeed_OBJECTS) $(chkspeed_LDADD) $(LIBS)
+
+cookie_interface$(EXEEXT): $(cookie_interface_OBJECTS) $(cookie_interface_DEPENDENCIES) $(EXTRA_cookie_interface_DEPENDENCIES)
+ @rm -f cookie_interface$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(cookie_interface_OBJECTS) $(cookie_interface_LDADD) $(LIBS)
+
+debug$(EXEEXT): $(debug_OBJECTS) $(debug_DEPENDENCIES) $(EXTRA_debug_DEPENDENCIES)
+ @rm -f debug$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(debug_OBJECTS) $(debug_LDADD) $(LIBS)
+
+externalsocket$(EXEEXT): $(externalsocket_OBJECTS) $(externalsocket_DEPENDENCIES) $(EXTRA_externalsocket_DEPENDENCIES)
+ @rm -f externalsocket$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(externalsocket_OBJECTS) $(externalsocket_LDADD) $(LIBS)
+
+fileupload$(EXEEXT): $(fileupload_OBJECTS) $(fileupload_DEPENDENCIES) $(EXTRA_fileupload_DEPENDENCIES)
+ @rm -f fileupload$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(fileupload_OBJECTS) $(fileupload_LDADD) $(LIBS)
+
+ftp-wildcard$(EXEEXT): $(ftp_wildcard_OBJECTS) $(ftp_wildcard_DEPENDENCIES) $(EXTRA_ftp_wildcard_DEPENDENCIES)
+ @rm -f ftp-wildcard$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftp_wildcard_OBJECTS) $(ftp_wildcard_LDADD) $(LIBS)
+
+ftpget$(EXEEXT): $(ftpget_OBJECTS) $(ftpget_DEPENDENCIES) $(EXTRA_ftpget_DEPENDENCIES)
+ @rm -f ftpget$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpget_OBJECTS) $(ftpget_LDADD) $(LIBS)
+
+ftpgetinfo$(EXEEXT): $(ftpgetinfo_OBJECTS) $(ftpgetinfo_DEPENDENCIES) $(EXTRA_ftpgetinfo_DEPENDENCIES)
+ @rm -f ftpgetinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpgetinfo_OBJECTS) $(ftpgetinfo_LDADD) $(LIBS)
+
+ftpgetresp$(EXEEXT): $(ftpgetresp_OBJECTS) $(ftpgetresp_DEPENDENCIES) $(EXTRA_ftpgetresp_DEPENDENCIES)
+ @rm -f ftpgetresp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpgetresp_OBJECTS) $(ftpgetresp_LDADD) $(LIBS)
+
+ftpsget$(EXEEXT): $(ftpsget_OBJECTS) $(ftpsget_DEPENDENCIES) $(EXTRA_ftpsget_DEPENDENCIES)
+ @rm -f ftpsget$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpsget_OBJECTS) $(ftpsget_LDADD) $(LIBS)
+
+ftpupload$(EXEEXT): $(ftpupload_OBJECTS) $(ftpupload_DEPENDENCIES) $(EXTRA_ftpupload_DEPENDENCIES)
+ @rm -f ftpupload$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpupload_OBJECTS) $(ftpupload_LDADD) $(LIBS)
+
+ftpuploadfrommem$(EXEEXT): $(ftpuploadfrommem_OBJECTS) $(ftpuploadfrommem_DEPENDENCIES) $(EXTRA_ftpuploadfrommem_DEPENDENCIES)
+ @rm -f ftpuploadfrommem$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpuploadfrommem_OBJECTS) $(ftpuploadfrommem_LDADD) $(LIBS)
+
+ftpuploadresume$(EXEEXT): $(ftpuploadresume_OBJECTS) $(ftpuploadresume_DEPENDENCIES) $(EXTRA_ftpuploadresume_DEPENDENCIES)
+ @rm -f ftpuploadresume$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(ftpuploadresume_OBJECTS) $(ftpuploadresume_LDADD) $(LIBS)
+
+getinfo$(EXEEXT): $(getinfo_OBJECTS) $(getinfo_DEPENDENCIES) $(EXTRA_getinfo_DEPENDENCIES)
+ @rm -f getinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(getinfo_OBJECTS) $(getinfo_LDADD) $(LIBS)
+
+getinmemory$(EXEEXT): $(getinmemory_OBJECTS) $(getinmemory_DEPENDENCIES) $(EXTRA_getinmemory_DEPENDENCIES)
+ @rm -f getinmemory$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(getinmemory_OBJECTS) $(getinmemory_LDADD) $(LIBS)
+
+getredirect$(EXEEXT): $(getredirect_OBJECTS) $(getredirect_DEPENDENCIES) $(EXTRA_getredirect_DEPENDENCIES)
+ @rm -f getredirect$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(getredirect_OBJECTS) $(getredirect_LDADD) $(LIBS)
+
+getreferrer$(EXEEXT): $(getreferrer_OBJECTS) $(getreferrer_DEPENDENCIES) $(EXTRA_getreferrer_DEPENDENCIES)
+ @rm -f getreferrer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(getreferrer_OBJECTS) $(getreferrer_LDADD) $(LIBS)
+
+headerapi$(EXEEXT): $(headerapi_OBJECTS) $(headerapi_DEPENDENCIES) $(EXTRA_headerapi_DEPENDENCIES)
+ @rm -f headerapi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(headerapi_OBJECTS) $(headerapi_LDADD) $(LIBS)
+
+http-post$(EXEEXT): $(http_post_OBJECTS) $(http_post_DEPENDENCIES) $(EXTRA_http_post_DEPENDENCIES)
+ @rm -f http-post$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http_post_OBJECTS) $(http_post_LDADD) $(LIBS)
+
+http2-download$(EXEEXT): $(http2_download_OBJECTS) $(http2_download_DEPENDENCIES) $(EXTRA_http2_download_DEPENDENCIES)
+ @rm -f http2-download$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http2_download_OBJECTS) $(http2_download_LDADD) $(LIBS)
+
+http2-pushinmemory$(EXEEXT): $(http2_pushinmemory_OBJECTS) $(http2_pushinmemory_DEPENDENCIES) $(EXTRA_http2_pushinmemory_DEPENDENCIES)
+ @rm -f http2-pushinmemory$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http2_pushinmemory_OBJECTS) $(http2_pushinmemory_LDADD) $(LIBS)
+
+http2-serverpush$(EXEEXT): $(http2_serverpush_OBJECTS) $(http2_serverpush_DEPENDENCIES) $(EXTRA_http2_serverpush_DEPENDENCIES)
+ @rm -f http2-serverpush$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http2_serverpush_OBJECTS) $(http2_serverpush_LDADD) $(LIBS)
+
+http2-upload$(EXEEXT): $(http2_upload_OBJECTS) $(http2_upload_DEPENDENCIES) $(EXTRA_http2_upload_DEPENDENCIES)
+ @rm -f http2-upload$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http2_upload_OBJECTS) $(http2_upload_LDADD) $(LIBS)
+
+http3$(EXEEXT): $(http3_OBJECTS) $(http3_DEPENDENCIES) $(EXTRA_http3_DEPENDENCIES)
+ @rm -f http3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http3_OBJECTS) $(http3_LDADD) $(LIBS)
+
+http3-present$(EXEEXT): $(http3_present_OBJECTS) $(http3_present_DEPENDENCIES) $(EXTRA_http3_present_DEPENDENCIES)
+ @rm -f http3-present$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(http3_present_OBJECTS) $(http3_present_LDADD) $(LIBS)
+
+httpcustomheader$(EXEEXT): $(httpcustomheader_OBJECTS) $(httpcustomheader_DEPENDENCIES) $(EXTRA_httpcustomheader_DEPENDENCIES)
+ @rm -f httpcustomheader$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(httpcustomheader_OBJECTS) $(httpcustomheader_LDADD) $(LIBS)
+
+httpput$(EXEEXT): $(httpput_OBJECTS) $(httpput_DEPENDENCIES) $(EXTRA_httpput_DEPENDENCIES)
+ @rm -f httpput$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(httpput_OBJECTS) $(httpput_LDADD) $(LIBS)
+
+httpput-postfields$(EXEEXT): $(httpput_postfields_OBJECTS) $(httpput_postfields_DEPENDENCIES) $(EXTRA_httpput_postfields_DEPENDENCIES)
+ @rm -f httpput-postfields$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(httpput_postfields_OBJECTS) $(httpput_postfields_LDADD) $(LIBS)
+
+https$(EXEEXT): $(https_OBJECTS) $(https_DEPENDENCIES) $(EXTRA_https_DEPENDENCIES)
+ @rm -f https$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(https_OBJECTS) $(https_LDADD) $(LIBS)
+
+imap-append$(EXEEXT): $(imap_append_OBJECTS) $(imap_append_DEPENDENCIES) $(EXTRA_imap_append_DEPENDENCIES)
+ @rm -f imap-append$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_append_OBJECTS) $(imap_append_LDADD) $(LIBS)
+
+imap-authzid$(EXEEXT): $(imap_authzid_OBJECTS) $(imap_authzid_DEPENDENCIES) $(EXTRA_imap_authzid_DEPENDENCIES)
+ @rm -f imap-authzid$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_authzid_OBJECTS) $(imap_authzid_LDADD) $(LIBS)
+
+imap-copy$(EXEEXT): $(imap_copy_OBJECTS) $(imap_copy_DEPENDENCIES) $(EXTRA_imap_copy_DEPENDENCIES)
+ @rm -f imap-copy$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_copy_OBJECTS) $(imap_copy_LDADD) $(LIBS)
+
+imap-create$(EXEEXT): $(imap_create_OBJECTS) $(imap_create_DEPENDENCIES) $(EXTRA_imap_create_DEPENDENCIES)
+ @rm -f imap-create$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_create_OBJECTS) $(imap_create_LDADD) $(LIBS)
+
+imap-delete$(EXEEXT): $(imap_delete_OBJECTS) $(imap_delete_DEPENDENCIES) $(EXTRA_imap_delete_DEPENDENCIES)
+ @rm -f imap-delete$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_delete_OBJECTS) $(imap_delete_LDADD) $(LIBS)
+
+imap-examine$(EXEEXT): $(imap_examine_OBJECTS) $(imap_examine_DEPENDENCIES) $(EXTRA_imap_examine_DEPENDENCIES)
+ @rm -f imap-examine$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_examine_OBJECTS) $(imap_examine_LDADD) $(LIBS)
+
+imap-fetch$(EXEEXT): $(imap_fetch_OBJECTS) $(imap_fetch_DEPENDENCIES) $(EXTRA_imap_fetch_DEPENDENCIES)
+ @rm -f imap-fetch$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_fetch_OBJECTS) $(imap_fetch_LDADD) $(LIBS)
+
+imap-list$(EXEEXT): $(imap_list_OBJECTS) $(imap_list_DEPENDENCIES) $(EXTRA_imap_list_DEPENDENCIES)
+ @rm -f imap-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_list_OBJECTS) $(imap_list_LDADD) $(LIBS)
+
+imap-lsub$(EXEEXT): $(imap_lsub_OBJECTS) $(imap_lsub_DEPENDENCIES) $(EXTRA_imap_lsub_DEPENDENCIES)
+ @rm -f imap-lsub$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_lsub_OBJECTS) $(imap_lsub_LDADD) $(LIBS)
+
+imap-multi$(EXEEXT): $(imap_multi_OBJECTS) $(imap_multi_DEPENDENCIES) $(EXTRA_imap_multi_DEPENDENCIES)
+ @rm -f imap-multi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_multi_OBJECTS) $(imap_multi_LDADD) $(LIBS)
+
+imap-noop$(EXEEXT): $(imap_noop_OBJECTS) $(imap_noop_DEPENDENCIES) $(EXTRA_imap_noop_DEPENDENCIES)
+ @rm -f imap-noop$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_noop_OBJECTS) $(imap_noop_LDADD) $(LIBS)
+
+imap-search$(EXEEXT): $(imap_search_OBJECTS) $(imap_search_DEPENDENCIES) $(EXTRA_imap_search_DEPENDENCIES)
+ @rm -f imap-search$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_search_OBJECTS) $(imap_search_LDADD) $(LIBS)
+
+imap-ssl$(EXEEXT): $(imap_ssl_OBJECTS) $(imap_ssl_DEPENDENCIES) $(EXTRA_imap_ssl_DEPENDENCIES)
+ @rm -f imap-ssl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_ssl_OBJECTS) $(imap_ssl_LDADD) $(LIBS)
+
+imap-store$(EXEEXT): $(imap_store_OBJECTS) $(imap_store_DEPENDENCIES) $(EXTRA_imap_store_DEPENDENCIES)
+ @rm -f imap-store$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_store_OBJECTS) $(imap_store_LDADD) $(LIBS)
+
+imap-tls$(EXEEXT): $(imap_tls_OBJECTS) $(imap_tls_DEPENDENCIES) $(EXTRA_imap_tls_DEPENDENCIES)
+ @rm -f imap-tls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(imap_tls_OBJECTS) $(imap_tls_LDADD) $(LIBS)
+
+multi-app$(EXEEXT): $(multi_app_OBJECTS) $(multi_app_DEPENDENCIES) $(EXTRA_multi_app_DEPENDENCIES)
+ @rm -f multi-app$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_app_OBJECTS) $(multi_app_LDADD) $(LIBS)
+
+multi-debugcallback$(EXEEXT): $(multi_debugcallback_OBJECTS) $(multi_debugcallback_DEPENDENCIES) $(EXTRA_multi_debugcallback_DEPENDENCIES)
+ @rm -f multi-debugcallback$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_debugcallback_OBJECTS) $(multi_debugcallback_LDADD) $(LIBS)
+
+multi-double$(EXEEXT): $(multi_double_OBJECTS) $(multi_double_DEPENDENCIES) $(EXTRA_multi_double_DEPENDENCIES)
+ @rm -f multi-double$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_double_OBJECTS) $(multi_double_LDADD) $(LIBS)
+
+multi-formadd$(EXEEXT): $(multi_formadd_OBJECTS) $(multi_formadd_DEPENDENCIES) $(EXTRA_multi_formadd_DEPENDENCIES)
+ @rm -f multi-formadd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_formadd_OBJECTS) $(multi_formadd_LDADD) $(LIBS)
+
+multi-legacy$(EXEEXT): $(multi_legacy_OBJECTS) $(multi_legacy_DEPENDENCIES) $(EXTRA_multi_legacy_DEPENDENCIES)
+ @rm -f multi-legacy$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_legacy_OBJECTS) $(multi_legacy_LDADD) $(LIBS)
+
+multi-post$(EXEEXT): $(multi_post_OBJECTS) $(multi_post_DEPENDENCIES) $(EXTRA_multi_post_DEPENDENCIES)
+ @rm -f multi-post$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_post_OBJECTS) $(multi_post_LDADD) $(LIBS)
+
+multi-single$(EXEEXT): $(multi_single_OBJECTS) $(multi_single_DEPENDENCIES) $(EXTRA_multi_single_DEPENDENCIES)
+ @rm -f multi-single$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(multi_single_OBJECTS) $(multi_single_LDADD) $(LIBS)
+
+parseurl$(EXEEXT): $(parseurl_OBJECTS) $(parseurl_DEPENDENCIES) $(EXTRA_parseurl_DEPENDENCIES)
+ @rm -f parseurl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(parseurl_OBJECTS) $(parseurl_LDADD) $(LIBS)
+
+persistent$(EXEEXT): $(persistent_OBJECTS) $(persistent_DEPENDENCIES) $(EXTRA_persistent_DEPENDENCIES)
+ @rm -f persistent$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(persistent_OBJECTS) $(persistent_LDADD) $(LIBS)
+
+pop3-authzid$(EXEEXT): $(pop3_authzid_OBJECTS) $(pop3_authzid_DEPENDENCIES) $(EXTRA_pop3_authzid_DEPENDENCIES)
+ @rm -f pop3-authzid$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_authzid_OBJECTS) $(pop3_authzid_LDADD) $(LIBS)
+
+pop3-dele$(EXEEXT): $(pop3_dele_OBJECTS) $(pop3_dele_DEPENDENCIES) $(EXTRA_pop3_dele_DEPENDENCIES)
+ @rm -f pop3-dele$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_dele_OBJECTS) $(pop3_dele_LDADD) $(LIBS)
+
+pop3-list$(EXEEXT): $(pop3_list_OBJECTS) $(pop3_list_DEPENDENCIES) $(EXTRA_pop3_list_DEPENDENCIES)
+ @rm -f pop3-list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_list_OBJECTS) $(pop3_list_LDADD) $(LIBS)
+
+pop3-multi$(EXEEXT): $(pop3_multi_OBJECTS) $(pop3_multi_DEPENDENCIES) $(EXTRA_pop3_multi_DEPENDENCIES)
+ @rm -f pop3-multi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_multi_OBJECTS) $(pop3_multi_LDADD) $(LIBS)
+
+pop3-noop$(EXEEXT): $(pop3_noop_OBJECTS) $(pop3_noop_DEPENDENCIES) $(EXTRA_pop3_noop_DEPENDENCIES)
+ @rm -f pop3-noop$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_noop_OBJECTS) $(pop3_noop_LDADD) $(LIBS)
+
+pop3-retr$(EXEEXT): $(pop3_retr_OBJECTS) $(pop3_retr_DEPENDENCIES) $(EXTRA_pop3_retr_DEPENDENCIES)
+ @rm -f pop3-retr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_retr_OBJECTS) $(pop3_retr_LDADD) $(LIBS)
+
+pop3-ssl$(EXEEXT): $(pop3_ssl_OBJECTS) $(pop3_ssl_DEPENDENCIES) $(EXTRA_pop3_ssl_DEPENDENCIES)
+ @rm -f pop3-ssl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_ssl_OBJECTS) $(pop3_ssl_LDADD) $(LIBS)
+
+pop3-stat$(EXEEXT): $(pop3_stat_OBJECTS) $(pop3_stat_DEPENDENCIES) $(EXTRA_pop3_stat_DEPENDENCIES)
+ @rm -f pop3-stat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_stat_OBJECTS) $(pop3_stat_LDADD) $(LIBS)
+
+pop3-tls$(EXEEXT): $(pop3_tls_OBJECTS) $(pop3_tls_DEPENDENCIES) $(EXTRA_pop3_tls_DEPENDENCIES)
+ @rm -f pop3-tls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_tls_OBJECTS) $(pop3_tls_LDADD) $(LIBS)
+
+pop3-top$(EXEEXT): $(pop3_top_OBJECTS) $(pop3_top_DEPENDENCIES) $(EXTRA_pop3_top_DEPENDENCIES)
+ @rm -f pop3-top$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_top_OBJECTS) $(pop3_top_LDADD) $(LIBS)
+
+pop3-uidl$(EXEEXT): $(pop3_uidl_OBJECTS) $(pop3_uidl_DEPENDENCIES) $(EXTRA_pop3_uidl_DEPENDENCIES)
+ @rm -f pop3-uidl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(pop3_uidl_OBJECTS) $(pop3_uidl_LDADD) $(LIBS)
+
+post-callback$(EXEEXT): $(post_callback_OBJECTS) $(post_callback_DEPENDENCIES) $(EXTRA_post_callback_DEPENDENCIES)
+ @rm -f post-callback$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(post_callback_OBJECTS) $(post_callback_LDADD) $(LIBS)
+
+postinmemory$(EXEEXT): $(postinmemory_OBJECTS) $(postinmemory_DEPENDENCIES) $(EXTRA_postinmemory_DEPENDENCIES)
+ @rm -f postinmemory$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(postinmemory_OBJECTS) $(postinmemory_LDADD) $(LIBS)
+
+postit2$(EXEEXT): $(postit2_OBJECTS) $(postit2_DEPENDENCIES) $(EXTRA_postit2_DEPENDENCIES)
+ @rm -f postit2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(postit2_OBJECTS) $(postit2_LDADD) $(LIBS)
+
+postit2-formadd$(EXEEXT): $(postit2_formadd_OBJECTS) $(postit2_formadd_DEPENDENCIES) $(EXTRA_postit2_formadd_DEPENDENCIES)
+ @rm -f postit2-formadd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(postit2_formadd_OBJECTS) $(postit2_formadd_LDADD) $(LIBS)
+
+progressfunc$(EXEEXT): $(progressfunc_OBJECTS) $(progressfunc_DEPENDENCIES) $(EXTRA_progressfunc_DEPENDENCIES)
+ @rm -f progressfunc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(progressfunc_OBJECTS) $(progressfunc_LDADD) $(LIBS)
+
+resolve$(EXEEXT): $(resolve_OBJECTS) $(resolve_DEPENDENCIES) $(EXTRA_resolve_DEPENDENCIES)
+ @rm -f resolve$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(resolve_OBJECTS) $(resolve_LDADD) $(LIBS)
+
+sendrecv$(EXEEXT): $(sendrecv_OBJECTS) $(sendrecv_DEPENDENCIES) $(EXTRA_sendrecv_DEPENDENCIES)
+ @rm -f sendrecv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sendrecv_OBJECTS) $(sendrecv_LDADD) $(LIBS)
+
+sepheaders$(EXEEXT): $(sepheaders_OBJECTS) $(sepheaders_DEPENDENCIES) $(EXTRA_sepheaders_DEPENDENCIES)
+ @rm -f sepheaders$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sepheaders_OBJECTS) $(sepheaders_LDADD) $(LIBS)
+
+sftpget$(EXEEXT): $(sftpget_OBJECTS) $(sftpget_DEPENDENCIES) $(EXTRA_sftpget_DEPENDENCIES)
+ @rm -f sftpget$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sftpget_OBJECTS) $(sftpget_LDADD) $(LIBS)
+
+sftpuploadresume$(EXEEXT): $(sftpuploadresume_OBJECTS) $(sftpuploadresume_DEPENDENCIES) $(EXTRA_sftpuploadresume_DEPENDENCIES)
+ @rm -f sftpuploadresume$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sftpuploadresume_OBJECTS) $(sftpuploadresume_LDADD) $(LIBS)
+
+shared-connection-cache$(EXEEXT): $(shared_connection_cache_OBJECTS) $(shared_connection_cache_DEPENDENCIES) $(EXTRA_shared_connection_cache_DEPENDENCIES)
+ @rm -f shared-connection-cache$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(shared_connection_cache_OBJECTS) $(shared_connection_cache_LDADD) $(LIBS)
+
+simple$(EXEEXT): $(simple_OBJECTS) $(simple_DEPENDENCIES) $(EXTRA_simple_DEPENDENCIES)
+ @rm -f simple$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(simple_OBJECTS) $(simple_LDADD) $(LIBS)
+
+simplepost$(EXEEXT): $(simplepost_OBJECTS) $(simplepost_DEPENDENCIES) $(EXTRA_simplepost_DEPENDENCIES)
+ @rm -f simplepost$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(simplepost_OBJECTS) $(simplepost_LDADD) $(LIBS)
+
+simplessl$(EXEEXT): $(simplessl_OBJECTS) $(simplessl_DEPENDENCIES) $(EXTRA_simplessl_DEPENDENCIES)
+ @rm -f simplessl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(simplessl_OBJECTS) $(simplessl_LDADD) $(LIBS)
+
+smtp-authzid$(EXEEXT): $(smtp_authzid_OBJECTS) $(smtp_authzid_DEPENDENCIES) $(EXTRA_smtp_authzid_DEPENDENCIES)
+ @rm -f smtp-authzid$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_authzid_OBJECTS) $(smtp_authzid_LDADD) $(LIBS)
+
+smtp-expn$(EXEEXT): $(smtp_expn_OBJECTS) $(smtp_expn_DEPENDENCIES) $(EXTRA_smtp_expn_DEPENDENCIES)
+ @rm -f smtp-expn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_expn_OBJECTS) $(smtp_expn_LDADD) $(LIBS)
+
+smtp-mail$(EXEEXT): $(smtp_mail_OBJECTS) $(smtp_mail_DEPENDENCIES) $(EXTRA_smtp_mail_DEPENDENCIES)
+ @rm -f smtp-mail$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_mail_OBJECTS) $(smtp_mail_LDADD) $(LIBS)
+
+smtp-mime$(EXEEXT): $(smtp_mime_OBJECTS) $(smtp_mime_DEPENDENCIES) $(EXTRA_smtp_mime_DEPENDENCIES)
+ @rm -f smtp-mime$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_mime_OBJECTS) $(smtp_mime_LDADD) $(LIBS)
+
+smtp-multi$(EXEEXT): $(smtp_multi_OBJECTS) $(smtp_multi_DEPENDENCIES) $(EXTRA_smtp_multi_DEPENDENCIES)
+ @rm -f smtp-multi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_multi_OBJECTS) $(smtp_multi_LDADD) $(LIBS)
+
+smtp-ssl$(EXEEXT): $(smtp_ssl_OBJECTS) $(smtp_ssl_DEPENDENCIES) $(EXTRA_smtp_ssl_DEPENDENCIES)
+ @rm -f smtp-ssl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_ssl_OBJECTS) $(smtp_ssl_LDADD) $(LIBS)
+
+smtp-tls$(EXEEXT): $(smtp_tls_OBJECTS) $(smtp_tls_DEPENDENCIES) $(EXTRA_smtp_tls_DEPENDENCIES)
+ @rm -f smtp-tls$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_tls_OBJECTS) $(smtp_tls_LDADD) $(LIBS)
+
+smtp-vrfy$(EXEEXT): $(smtp_vrfy_OBJECTS) $(smtp_vrfy_DEPENDENCIES) $(EXTRA_smtp_vrfy_DEPENDENCIES)
+ @rm -f smtp-vrfy$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(smtp_vrfy_OBJECTS) $(smtp_vrfy_LDADD) $(LIBS)
+
+sslbackend$(EXEEXT): $(sslbackend_OBJECTS) $(sslbackend_DEPENDENCIES) $(EXTRA_sslbackend_DEPENDENCIES)
+ @rm -f sslbackend$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sslbackend_OBJECTS) $(sslbackend_LDADD) $(LIBS)
+
+url2file$(EXEEXT): $(url2file_OBJECTS) $(url2file_DEPENDENCIES) $(EXTRA_url2file_DEPENDENCIES)
+ @rm -f url2file$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(url2file_OBJECTS) $(url2file_LDADD) $(LIBS)
+
+urlapi$(EXEEXT): $(urlapi_OBJECTS) $(urlapi_DEPENDENCIES) $(EXTRA_urlapi_DEPENDENCIES)
+ @rm -f urlapi$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(urlapi_OBJECTS) $(urlapi_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/10-at-a-time.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/altsvc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/anyauthput.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/certinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chkspeed.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie_interface.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/externalsocket.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileupload.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp-wildcard.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpget.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpgetresp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpsget.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpupload.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpuploadfrommem.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftpuploadresume.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinmemory.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getredirect.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getreferrer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/headerapi.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http-post.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-download.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-pushinmemory.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-serverpush.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http2-upload.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http3-present.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http3.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpcustomheader.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput-postfields.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpput.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/https.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-append.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-authzid.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-copy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-create.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-delete.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-examine.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-fetch.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-list.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-lsub.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-multi.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-noop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-search.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-store.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imap-tls.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-app.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-debugcallback.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-double.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-formadd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-legacy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-post.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-single.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseurl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persistent.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-authzid.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-dele.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-list.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-multi.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-noop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-retr.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-stat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-tls.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-top.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pop3-uidl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/post-callback.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postinmemory.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2-formadd.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postit2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progressfunc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resolve.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendrecv.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sepheaders.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpget.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpuploadresume.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shared-connection-cache.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplepost.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simplessl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-authzid.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-expn.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mail.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-mime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-multi.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-ssl.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-tls.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smtp-vrfy.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sslbackend.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url2file.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urlapi.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/10-at-a-time.Po
+ -rm -f ./$(DEPDIR)/altsvc.Po
+ -rm -f ./$(DEPDIR)/anyauthput.Po
+ -rm -f ./$(DEPDIR)/certinfo.Po
+ -rm -f ./$(DEPDIR)/chkspeed.Po
+ -rm -f ./$(DEPDIR)/cookie_interface.Po
+ -rm -f ./$(DEPDIR)/debug.Po
+ -rm -f ./$(DEPDIR)/externalsocket.Po
+ -rm -f ./$(DEPDIR)/fileupload.Po
+ -rm -f ./$(DEPDIR)/ftp-wildcard.Po
+ -rm -f ./$(DEPDIR)/ftpget.Po
+ -rm -f ./$(DEPDIR)/ftpgetinfo.Po
+ -rm -f ./$(DEPDIR)/ftpgetresp.Po
+ -rm -f ./$(DEPDIR)/ftpsget.Po
+ -rm -f ./$(DEPDIR)/ftpupload.Po
+ -rm -f ./$(DEPDIR)/ftpuploadfrommem.Po
+ -rm -f ./$(DEPDIR)/ftpuploadresume.Po
+ -rm -f ./$(DEPDIR)/getinfo.Po
+ -rm -f ./$(DEPDIR)/getinmemory.Po
+ -rm -f ./$(DEPDIR)/getredirect.Po
+ -rm -f ./$(DEPDIR)/getreferrer.Po
+ -rm -f ./$(DEPDIR)/headerapi.Po
+ -rm -f ./$(DEPDIR)/http-post.Po
+ -rm -f ./$(DEPDIR)/http2-download.Po
+ -rm -f ./$(DEPDIR)/http2-pushinmemory.Po
+ -rm -f ./$(DEPDIR)/http2-serverpush.Po
+ -rm -f ./$(DEPDIR)/http2-upload.Po
+ -rm -f ./$(DEPDIR)/http3-present.Po
+ -rm -f ./$(DEPDIR)/http3.Po
+ -rm -f ./$(DEPDIR)/httpcustomheader.Po
+ -rm -f ./$(DEPDIR)/httpput-postfields.Po
+ -rm -f ./$(DEPDIR)/httpput.Po
+ -rm -f ./$(DEPDIR)/https.Po
+ -rm -f ./$(DEPDIR)/imap-append.Po
+ -rm -f ./$(DEPDIR)/imap-authzid.Po
+ -rm -f ./$(DEPDIR)/imap-copy.Po
+ -rm -f ./$(DEPDIR)/imap-create.Po
+ -rm -f ./$(DEPDIR)/imap-delete.Po
+ -rm -f ./$(DEPDIR)/imap-examine.Po
+ -rm -f ./$(DEPDIR)/imap-fetch.Po
+ -rm -f ./$(DEPDIR)/imap-list.Po
+ -rm -f ./$(DEPDIR)/imap-lsub.Po
+ -rm -f ./$(DEPDIR)/imap-multi.Po
+ -rm -f ./$(DEPDIR)/imap-noop.Po
+ -rm -f ./$(DEPDIR)/imap-search.Po
+ -rm -f ./$(DEPDIR)/imap-ssl.Po
+ -rm -f ./$(DEPDIR)/imap-store.Po
+ -rm -f ./$(DEPDIR)/imap-tls.Po
+ -rm -f ./$(DEPDIR)/multi-app.Po
+ -rm -f ./$(DEPDIR)/multi-debugcallback.Po
+ -rm -f ./$(DEPDIR)/multi-double.Po
+ -rm -f ./$(DEPDIR)/multi-formadd.Po
+ -rm -f ./$(DEPDIR)/multi-legacy.Po
+ -rm -f ./$(DEPDIR)/multi-post.Po
+ -rm -f ./$(DEPDIR)/multi-single.Po
+ -rm -f ./$(DEPDIR)/parseurl.Po
+ -rm -f ./$(DEPDIR)/persistent.Po
+ -rm -f ./$(DEPDIR)/pop3-authzid.Po
+ -rm -f ./$(DEPDIR)/pop3-dele.Po
+ -rm -f ./$(DEPDIR)/pop3-list.Po
+ -rm -f ./$(DEPDIR)/pop3-multi.Po
+ -rm -f ./$(DEPDIR)/pop3-noop.Po
+ -rm -f ./$(DEPDIR)/pop3-retr.Po
+ -rm -f ./$(DEPDIR)/pop3-ssl.Po
+ -rm -f ./$(DEPDIR)/pop3-stat.Po
+ -rm -f ./$(DEPDIR)/pop3-tls.Po
+ -rm -f ./$(DEPDIR)/pop3-top.Po
+ -rm -f ./$(DEPDIR)/pop3-uidl.Po
+ -rm -f ./$(DEPDIR)/post-callback.Po
+ -rm -f ./$(DEPDIR)/postinmemory.Po
+ -rm -f ./$(DEPDIR)/postit2-formadd.Po
+ -rm -f ./$(DEPDIR)/postit2.Po
+ -rm -f ./$(DEPDIR)/progressfunc.Po
+ -rm -f ./$(DEPDIR)/resolve.Po
+ -rm -f ./$(DEPDIR)/sendrecv.Po
+ -rm -f ./$(DEPDIR)/sepheaders.Po
+ -rm -f ./$(DEPDIR)/sftpget.Po
+ -rm -f ./$(DEPDIR)/sftpuploadresume.Po
+ -rm -f ./$(DEPDIR)/shared-connection-cache.Po
+ -rm -f ./$(DEPDIR)/simple.Po
+ -rm -f ./$(DEPDIR)/simplepost.Po
+ -rm -f ./$(DEPDIR)/simplessl.Po
+ -rm -f ./$(DEPDIR)/smtp-authzid.Po
+ -rm -f ./$(DEPDIR)/smtp-expn.Po
+ -rm -f ./$(DEPDIR)/smtp-mail.Po
+ -rm -f ./$(DEPDIR)/smtp-mime.Po
+ -rm -f ./$(DEPDIR)/smtp-multi.Po
+ -rm -f ./$(DEPDIR)/smtp-ssl.Po
+ -rm -f ./$(DEPDIR)/smtp-tls.Po
+ -rm -f ./$(DEPDIR)/smtp-vrfy.Po
+ -rm -f ./$(DEPDIR)/sslbackend.Po
+ -rm -f ./$(DEPDIR)/url2file.Po
+ -rm -f ./$(DEPDIR)/urlapi.Po
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f ./$(DEPDIR)/10-at-a-time.Po
+ -rm -f ./$(DEPDIR)/altsvc.Po
+ -rm -f ./$(DEPDIR)/anyauthput.Po
+ -rm -f ./$(DEPDIR)/certinfo.Po
+ -rm -f ./$(DEPDIR)/chkspeed.Po
+ -rm -f ./$(DEPDIR)/cookie_interface.Po
+ -rm -f ./$(DEPDIR)/debug.Po
+ -rm -f ./$(DEPDIR)/externalsocket.Po
+ -rm -f ./$(DEPDIR)/fileupload.Po
+ -rm -f ./$(DEPDIR)/ftp-wildcard.Po
+ -rm -f ./$(DEPDIR)/ftpget.Po
+ -rm -f ./$(DEPDIR)/ftpgetinfo.Po
+ -rm -f ./$(DEPDIR)/ftpgetresp.Po
+ -rm -f ./$(DEPDIR)/ftpsget.Po
+ -rm -f ./$(DEPDIR)/ftpupload.Po
+ -rm -f ./$(DEPDIR)/ftpuploadfrommem.Po
+ -rm -f ./$(DEPDIR)/ftpuploadresume.Po
+ -rm -f ./$(DEPDIR)/getinfo.Po
+ -rm -f ./$(DEPDIR)/getinmemory.Po
+ -rm -f ./$(DEPDIR)/getredirect.Po
+ -rm -f ./$(DEPDIR)/getreferrer.Po
+ -rm -f ./$(DEPDIR)/headerapi.Po
+ -rm -f ./$(DEPDIR)/http-post.Po
+ -rm -f ./$(DEPDIR)/http2-download.Po
+ -rm -f ./$(DEPDIR)/http2-pushinmemory.Po
+ -rm -f ./$(DEPDIR)/http2-serverpush.Po
+ -rm -f ./$(DEPDIR)/http2-upload.Po
+ -rm -f ./$(DEPDIR)/http3-present.Po
+ -rm -f ./$(DEPDIR)/http3.Po
+ -rm -f ./$(DEPDIR)/httpcustomheader.Po
+ -rm -f ./$(DEPDIR)/httpput-postfields.Po
+ -rm -f ./$(DEPDIR)/httpput.Po
+ -rm -f ./$(DEPDIR)/https.Po
+ -rm -f ./$(DEPDIR)/imap-append.Po
+ -rm -f ./$(DEPDIR)/imap-authzid.Po
+ -rm -f ./$(DEPDIR)/imap-copy.Po
+ -rm -f ./$(DEPDIR)/imap-create.Po
+ -rm -f ./$(DEPDIR)/imap-delete.Po
+ -rm -f ./$(DEPDIR)/imap-examine.Po
+ -rm -f ./$(DEPDIR)/imap-fetch.Po
+ -rm -f ./$(DEPDIR)/imap-list.Po
+ -rm -f ./$(DEPDIR)/imap-lsub.Po
+ -rm -f ./$(DEPDIR)/imap-multi.Po
+ -rm -f ./$(DEPDIR)/imap-noop.Po
+ -rm -f ./$(DEPDIR)/imap-search.Po
+ -rm -f ./$(DEPDIR)/imap-ssl.Po
+ -rm -f ./$(DEPDIR)/imap-store.Po
+ -rm -f ./$(DEPDIR)/imap-tls.Po
+ -rm -f ./$(DEPDIR)/multi-app.Po
+ -rm -f ./$(DEPDIR)/multi-debugcallback.Po
+ -rm -f ./$(DEPDIR)/multi-double.Po
+ -rm -f ./$(DEPDIR)/multi-formadd.Po
+ -rm -f ./$(DEPDIR)/multi-legacy.Po
+ -rm -f ./$(DEPDIR)/multi-post.Po
+ -rm -f ./$(DEPDIR)/multi-single.Po
+ -rm -f ./$(DEPDIR)/parseurl.Po
+ -rm -f ./$(DEPDIR)/persistent.Po
+ -rm -f ./$(DEPDIR)/pop3-authzid.Po
+ -rm -f ./$(DEPDIR)/pop3-dele.Po
+ -rm -f ./$(DEPDIR)/pop3-list.Po
+ -rm -f ./$(DEPDIR)/pop3-multi.Po
+ -rm -f ./$(DEPDIR)/pop3-noop.Po
+ -rm -f ./$(DEPDIR)/pop3-retr.Po
+ -rm -f ./$(DEPDIR)/pop3-ssl.Po
+ -rm -f ./$(DEPDIR)/pop3-stat.Po
+ -rm -f ./$(DEPDIR)/pop3-tls.Po
+ -rm -f ./$(DEPDIR)/pop3-top.Po
+ -rm -f ./$(DEPDIR)/pop3-uidl.Po
+ -rm -f ./$(DEPDIR)/post-callback.Po
+ -rm -f ./$(DEPDIR)/postinmemory.Po
+ -rm -f ./$(DEPDIR)/postit2-formadd.Po
+ -rm -f ./$(DEPDIR)/postit2.Po
+ -rm -f ./$(DEPDIR)/progressfunc.Po
+ -rm -f ./$(DEPDIR)/resolve.Po
+ -rm -f ./$(DEPDIR)/sendrecv.Po
+ -rm -f ./$(DEPDIR)/sepheaders.Po
+ -rm -f ./$(DEPDIR)/sftpget.Po
+ -rm -f ./$(DEPDIR)/sftpuploadresume.Po
+ -rm -f ./$(DEPDIR)/shared-connection-cache.Po
+ -rm -f ./$(DEPDIR)/simple.Po
+ -rm -f ./$(DEPDIR)/simplepost.Po
+ -rm -f ./$(DEPDIR)/simplessl.Po
+ -rm -f ./$(DEPDIR)/smtp-authzid.Po
+ -rm -f ./$(DEPDIR)/smtp-expn.Po
+ -rm -f ./$(DEPDIR)/smtp-mail.Po
+ -rm -f ./$(DEPDIR)/smtp-mime.Po
+ -rm -f ./$(DEPDIR)/smtp-multi.Po
+ -rm -f ./$(DEPDIR)/smtp-ssl.Po
+ -rm -f ./$(DEPDIR)/smtp-tls.Po
+ -rm -f ./$(DEPDIR)/smtp-vrfy.Po
+ -rm -f ./$(DEPDIR)/sslbackend.Po
+ -rm -f ./$(DEPDIR)/url2file.Po
+ -rm -f ./$(DEPDIR)/urlapi.Po
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
+
+all: $(check_PROGRAMS)
+
+checksrc:
+ $(CHECKSRC)(@PERL@ $(top_srcdir)/scripts/checksrc.pl -D$(srcdir) $(srcdir)/*.c)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.inc b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.inc
new file mode 100755
index 0000000..42247fe
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.inc
@@ -0,0 +1,144 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+# These are all libcurl example programs to be test compiled
+check_PROGRAMS = \
+ 10-at-a-time \
+ altsvc \
+ anyauthput \
+ certinfo \
+ chkspeed \
+ cookie_interface \
+ debug \
+ externalsocket \
+ fileupload \
+ ftp-wildcard \
+ ftpget \
+ ftpgetinfo \
+ ftpgetresp \
+ ftpsget \
+ ftpupload \
+ ftpuploadfrommem \
+ ftpuploadresume \
+ getinfo \
+ getinmemory \
+ getredirect \
+ getreferrer \
+ headerapi \
+ http-post \
+ http2-download \
+ http2-pushinmemory \
+ http2-serverpush \
+ http2-upload \
+ http3 \
+ http3-present \
+ httpcustomheader \
+ httpput \
+ httpput-postfields \
+ https \
+ imap-append \
+ imap-authzid \
+ imap-copy \
+ imap-create \
+ imap-delete \
+ imap-examine \
+ imap-fetch \
+ imap-list \
+ imap-lsub \
+ imap-multi \
+ imap-noop \
+ imap-search \
+ imap-ssl \
+ imap-store \
+ imap-tls \
+ multi-app \
+ multi-debugcallback \
+ multi-double \
+ multi-formadd \
+ multi-legacy \
+ multi-post \
+ multi-single \
+ parseurl \
+ persistent \
+ pop3-authzid \
+ pop3-dele \
+ pop3-list \
+ pop3-multi \
+ pop3-noop \
+ pop3-retr \
+ pop3-ssl \
+ pop3-stat \
+ pop3-tls \
+ pop3-top \
+ pop3-uidl \
+ post-callback \
+ postinmemory \
+ postit2 \
+ postit2-formadd \
+ progressfunc \
+ resolve \
+ sendrecv \
+ sepheaders \
+ sftpget \
+ sftpuploadresume \
+ shared-connection-cache \
+ simple \
+ simplepost \
+ simplessl \
+ smtp-authzid \
+ smtp-expn \
+ smtp-mail \
+ smtp-mime \
+ smtp-multi \
+ smtp-ssl \
+ smtp-tls \
+ smtp-vrfy \
+ sslbackend \
+ url2file \
+ urlapi
+
+# These examples require external dependencies that may not be commonly
+# available on POSIX systems, so don't bother attempting to compile them here.
+COMPLICATED_EXAMPLES = \
+ cacertinmem.c \
+ crawler.c \
+ curlgtk.c \
+ ephiperfifo.c \
+ evhiperfifo.c \
+ ghiper.c \
+ hiperfifo.c \
+ href_extractor.c \
+ htmltidy.c \
+ htmltitle.cpp \
+ multi-event.c \
+ multi-uv.c \
+ multithread.c \
+ opensslthreadlock.c \
+ sessioninfo.c \
+ smooth-gtk-thread.c \
+ synctime.c \
+ threaded-ssl.c \
+ usercertinmem.c \
+ version-check.pl \
+ xmlstream.c
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.m32 b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.m32
new file mode 100755
index 0000000..0766082
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/Makefile.m32
@@ -0,0 +1,58 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1999 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+#***************************************************************************
+
+# Build libcurl via lib/Makefile.m32 first.
+
+PROOT := ../..
+
+LDFLAGS += -L$(PROOT)/lib
+LIBS += -lcurl
+
+ifeq ($(findstring -static,$(CFG)),)
+ curl_DEPENDENCIES += $(PROOT)/lib/libcurl.dll.a
+ DYN := 1
+else
+ curl_DEPENDENCIES := $(PROOT)/lib/libcurl.a
+ CPPFLAGS += -DCURL_STATICLIB
+ LDFLAGS += -static
+endif
+
+LIBS += -lws2_32
+
+### Sources and targets
+
+# Provides check_PROGRAMS
+include Makefile.inc
+
+TARGETS := $(patsubst %,%.exe,$(strip $(check_PROGRAMS) synctime))
+TOCLEAN := $(TARGETS:.exe=.o)
+
+### Local rules
+
+%.exe: %.o $(curl_DEPENDENCIES)
+ $(CC) $(LDFLAGS) $(CURL_LDFLAGS_BIN) -o $@ $< $(LIBS)
+
+### Global script
+
+include $(PROOT)/lib/Makefile.m32
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/README.md b/ap/lib/libcurl/curl-7.86.0/docs/examples/README.md
new file mode 100755
index 0000000..c74dc94
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/README.md
@@ -0,0 +1,41 @@
+<!--
+Copyright (C) 1998 - 2022 Daniel Stenberg, <daniel@haxx.se>, et al.
+
+SPDX-License-Identifier: curl
+-->
+
+# libcurl examples
+
+This directory is for libcurl programming examples. They are meant to show
+some simple steps on how you can build your own application to take full
+advantage of libcurl.
+
+If you end up with other small but still useful example sources, please mail
+them for submission in future packages and on the website.
+
+## Building
+
+The `Makefile.example` is an example Makefile that could be used to build
+these examples. Just edit the file according to your system and requirements
+first.
+
+Most examples should build fine using a command line like this:
+
+ `curl-config --cc --cflags --libs` -o example example.c
+
+Some compilers do not like having the arguments in this order but instead
+want you do reorganize them like:
+
+ `curl-config --cc` -o example example.c `curl-config --cflags --libs`
+
+**Please** do not use the `curl.se` site as a test target for your libcurl
+applications/experiments. Even if some of the examples use that site as a URL
+at some places, it does not mean that the URLs work or that we expect you to
+actually torture our website with your tests. Thanks.
+
+## Examples
+
+Each example source code file is designed to be and work stand-alone and
+rather self-explanatory. The examples may at times lack the level of error
+checks you need in a real world, but that is then only for the sake of
+readability: to make the code smaller and easier to follow.
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/altsvc.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/altsvc.c
new file mode 100755
index 0000000..7fa47c2
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/altsvc.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP with Alt-Svc support
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* cache the alternatives in this file */
+ curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc.txt");
+
+ /* restrict which HTTP versions to use alternatives */
+ curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)
+ CURLALTSVC_H1|CURLALTSVC_H2|CURLALTSVC_H3);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/anyauthput.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/anyauthput.c
new file mode 100755
index 0000000..b576432
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/anyauthput.c
@@ -0,0 +1,157 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP PUT upload with authentication using "any" method. libcurl picks the
+ * one the server supports/wants.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <curl/curl.h>
+
+#ifdef WIN32
+# define FILENO(fp) _fileno(fp)
+#else
+# define FILENO(fp) fileno(fp)
+#endif
+
+#if LIBCURL_VERSION_NUM < 0x070c03
+#error "upgrade your libcurl to no less than 7.12.3"
+#endif
+
+/*
+ * This example shows a HTTP PUT operation with authentication using "any"
+ * type. It PUTs a file given as a command line argument to the URL also given
+ * on the command line.
+ *
+ * Since libcurl 7.12.3, using "any" auth and POST/PUT requires a set seek
+ * function.
+ *
+ * This example also uses its own read callback.
+ */
+
+/* seek callback function */
+static int my_seek(void *userp, curl_off_t offset, int origin)
+{
+ FILE *fp = (FILE *) userp;
+
+ if(-1 == fseek(fp, (long) offset, origin))
+ /* couldn't seek */
+ return CURL_SEEKFUNC_CANTSEEK;
+
+ return CURL_SEEKFUNC_OK; /* success! */
+}
+
+/* read callback function, fread() look alike */
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+{
+ ssize_t retcode;
+ unsigned long nread;
+
+ retcode = fread(ptr, size, nmemb, stream);
+
+ if(retcode > 0) {
+ nread = (unsigned long)retcode;
+ fprintf(stderr, "*** We read %lu bytes from file\n", nread);
+ }
+
+ return retcode;
+}
+
+int main(int argc, char **argv)
+{
+ CURL *curl;
+ CURLcode res;
+ FILE *fp;
+ struct stat file_info;
+
+ char *file;
+ char *url;
+
+ if(argc < 3)
+ return 1;
+
+ file = argv[1];
+ url = argv[2];
+
+ /* get the file size of the local file */
+ fp = fopen(file, "rb");
+ fstat(FILENO(fp), &file_info);
+
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* which file to upload */
+ curl_easy_setopt(curl, CURLOPT_READDATA, (void *) fp);
+
+ /* set the seek function */
+ curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek);
+
+ /* pass the file descriptor to the seek callback as well */
+ curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *) fp);
+
+ /* enable "uploading" (which means PUT when doing HTTP) */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* specify target URL, and note that this URL should also include a file
+ name, not only a directory (as you can do with GTP uploads) */
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
+ /* and give the size of the upload, this supports large file sizes
+ on systems that have general support for it */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)file_info.st_size);
+
+ /* tell libcurl we can use "any" auth, which lets the lib pick one, but it
+ also costs one extra round-trip and possibly sending of all the PUT
+ data twice!!! */
+ curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
+
+ /* set user name and password for the authentication */
+ curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
+
+ /* Now run off and do what you have been told! */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ fclose(fp); /* close the local file */
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/cacertinmem.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/cacertinmem.c
new file mode 100755
index 0000000..a16d319
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/cacertinmem.c
@@ -0,0 +1,183 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * CA cert in memory with OpenSSL to get a HTTPS page.
+ * </DESC>
+ */
+
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+#include <curl/curl.h>
+#include <stdio.h>
+
+static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ fwrite(ptr, size, nmemb, (FILE *)stream);
+ return (nmemb*size);
+}
+
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
+{
+ CURLcode rv = CURLE_ABORTED_BY_CALLBACK;
+
+ /** This example uses two (fake) certificates **/
+ static const char mypem[] =
+ "-----BEGIN CERTIFICATE-----\n"
+ "MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE\n"
+ "AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw\n"
+ "CQYDVQQGEwJFUzAeFw0xMTA1MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQ\n"
+ "BgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwHUEtJQUNDVjENMAsGA1UECgwEQUND\n"
+ "VjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCb\n"
+ "qau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gMjmoY\n"
+ "HtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWo\n"
+ "G2ioPej0RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpA\n"
+ "0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDGWuzndN9wrqODJerWx5eH\n"
+ "k6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs78yM2x/47\n"
+ "JyCpZET/LtZ1qmxNYEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+m\n"
+ "AM/EKXMRNt6GGT6d7hmKG9Ww7Y49nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepD\n"
+ "vV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJTS+xJlsndQAJxGJ3KQhfnlms\n"
+ "tn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3sCPdK6jT2iWH\n"
+ "7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h\n"
+ "I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szA\n"
+ "h1xA2syVP1XgNce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xF\n"
+ "d3+YJ5oyXSrjhO7FmGYvliAd3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2H\n"
+ "pPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3pEfbRD0tVNEYqi4Y7\n"
+ "-----END CERTIFICATE-----\n"
+ "-----BEGIN CERTIFICATE-----\n"
+ "MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UE\n"
+ "AwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00x\n"
+ "CzAJBgNVBAYTAkVTMB4XDTA4MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEW\n"
+ "MBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZF\n"
+ "RElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC\n"
+ "AgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHkWLn7\n"
+ "09gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7\n"
+ "XBZXehuDYAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5P\n"
+ "gvoFNTPhNahXwOf9jU8/kzJPeGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKe\n"
+ "I6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1PwkzQSulgUV1qzOMPPKC8W64iLgpq0i\n"
+ "5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1ThCojz2GuHURwCRi\n"
+ "ipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oIKiMn\n"
+ "MCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZ\n"
+ "o5NjEFIqnxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6\n"
+ "zqylfDJKZ0DcMDQj3dcEI2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacN\n"
+ "GHk0vFQYXlPKNFHtRQrmjseCNj6nOGOpMCwXEGCSn1WHElkQwg9naRHMTh5+Spqt\n"
+ "r0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3otkYNbn5XOmeUwssfnHdK\n"
+ "Z05phkOTOPu220+DkdRgfks+KzgHVZhepA==\n"
+ "-----END CERTIFICATE-----\n";
+
+ BIO *cbio = BIO_new_mem_buf(mypem, sizeof(mypem));
+ X509_STORE *cts = SSL_CTX_get_cert_store((SSL_CTX *)sslctx);
+ int i;
+ STACK_OF(X509_INFO) *inf;
+ (void)curl;
+ (void)parm;
+
+ if(!cts || !cbio) {
+ return rv;
+ }
+
+ inf = PEM_X509_INFO_read_bio(cbio, NULL, NULL, NULL);
+
+ if(!inf) {
+ BIO_free(cbio);
+ return rv;
+ }
+
+ for(i = 0; i < sk_X509_INFO_num(inf); i++) {
+ X509_INFO *itmp = sk_X509_INFO_value(inf, i);
+ if(itmp->x509) {
+ X509_STORE_add_cert(cts, itmp->x509);
+ }
+ if(itmp->crl) {
+ X509_STORE_add_crl(cts, itmp->crl);
+ }
+ }
+
+ sk_X509_INFO_pop_free(inf, X509_INFO_free);
+ BIO_free(cbio);
+
+ rv = CURLE_OK;
+ return rv;
+}
+
+int main(void)
+{
+ CURL *ch;
+ CURLcode rv;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ ch = curl_easy_init();
+ curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
+ curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
+ curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
+ curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
+ curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
+ curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 1L);
+ curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+
+ /* Turn off the default CA locations, otherwise libcurl will load CA
+ * certificates from the locations that were detected/specified at
+ * build-time
+ */
+ curl_easy_setopt(ch, CURLOPT_CAINFO, NULL);
+ curl_easy_setopt(ch, CURLOPT_CAPATH, NULL);
+
+ /* first try: retrieve page without ca certificates -> should fail
+ * unless libcurl was built --with-ca-fallback enabled at build-time
+ */
+ rv = curl_easy_perform(ch);
+ if(rv == CURLE_OK)
+ printf("*** transfer succeeded ***\n");
+ else
+ printf("*** transfer failed ***\n");
+
+ /* use a fresh connection (optional)
+ * this option seriously impacts performance of multiple transfers but
+ * it is necessary order to demonstrate this example. recall that the
+ * ssl ctx callback is only called _before_ an SSL connection is
+ * established, therefore it will not affect existing verified SSL
+ * connections already in the connection cache associated with this
+ * handle. normally you would set the ssl ctx function before making
+ * any transfers, and not use this option.
+ */
+ curl_easy_setopt(ch, CURLOPT_FRESH_CONNECT, 1L);
+
+ /* second try: retrieve page using cacerts' certificate -> will succeed
+ * load the certificate by installing a function doing the necessary
+ * "modifications" to the SSL CONTEXT just before link init
+ */
+ curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
+ rv = curl_easy_perform(ch);
+ if(rv == CURLE_OK)
+ printf("*** transfer succeeded ***\n");
+ else
+ printf("*** transfer failed ***\n");
+
+ curl_easy_cleanup(ch);
+ curl_global_cleanup();
+ return rv;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/certinfo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/certinfo.c
new file mode 100755
index 0000000..381ee51
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/certinfo.c
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Extract lots of TLS certificate info.
+ * </DESC>
+ */
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ (void)stream;
+ (void)ptr;
+ return size * nmemb;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
+
+ res = curl_easy_perform(curl);
+
+ if(!res) {
+ struct curl_certinfo *certinfo;
+
+ res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &certinfo);
+
+ if(!res && certinfo) {
+ int i;
+
+ printf("%d certs!\n", certinfo->num_of_certs);
+
+ for(i = 0; i < certinfo->num_of_certs; i++) {
+ struct curl_slist *slist;
+
+ for(slist = certinfo->certinfo[i]; slist; slist = slist->next)
+ printf("%s\n", slist->data);
+
+ }
+ }
+
+ }
+
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/chkspeed.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/chkspeed.c
new file mode 100755
index 0000000..a467913
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/chkspeed.c
@@ -0,0 +1,222 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show transfer timing info after download completes.
+ * </DESC>
+ */
+/* Example source code to show how the callback function can be used to
+ * download data into a chunk of memory instead of storing it in a file.
+ * After successful download we use curl_easy_getinfo() calls to get the
+ * amount of downloaded bytes, the time used for the whole download, and
+ * the average download speed.
+ * On Linux you can create the download test files with:
+ * dd if=/dev/urandom of=file_1M.bin bs=1M count=1
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#include <curl/curl.h>
+
+#define URL_BASE "http://speedtest.your.domain/"
+#define URL_1M URL_BASE "file_1M.bin"
+#define URL_2M URL_BASE "file_2M.bin"
+#define URL_5M URL_BASE "file_5M.bin"
+#define URL_10M URL_BASE "file_10M.bin"
+#define URL_20M URL_BASE "file_20M.bin"
+#define URL_50M URL_BASE "file_50M.bin"
+#define URL_100M URL_BASE "file_100M.bin"
+
+#define CHKSPEED_VERSION "1.0"
+
+static size_t WriteCallback(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ /* we are not interested in the downloaded bytes itself,
+ so we only return the size we would have saved ... */
+ (void)ptr; /* unused */
+ (void)data; /* unused */
+ return (size_t)(size * nmemb);
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *curl_handle;
+ CURLcode res;
+ int prtall = 0, prtsep = 0, prttime = 0;
+ const char *url = URL_1M;
+ char *appname = argv[0];
+
+ if(argc > 1) {
+ /* parse input parameters */
+ for(argc--, argv++; *argv; argc--, argv++) {
+ if(argv[0][0] == '-') {
+ switch(argv[0][1]) {
+ case 'h':
+ case 'H':
+ fprintf(stderr,
+ "\rUsage: %s [-m=1|2|5|10|20|50|100] [-t] [-x] [url]\n",
+ appname);
+ exit(1);
+ case 'v':
+ case 'V':
+ fprintf(stderr, "\r%s %s - %s\n",
+ appname, CHKSPEED_VERSION, curl_version());
+ exit(1);
+ case 'a':
+ case 'A':
+ prtall = 1;
+ break;
+ case 'x':
+ case 'X':
+ prtsep = 1;
+ break;
+ case 't':
+ case 'T':
+ prttime = 1;
+ break;
+ case 'm':
+ case 'M':
+ if(argv[0][2] == '=') {
+ long m = strtol((*argv) + 3, NULL, 10);
+ switch(m) {
+ case 1:
+ url = URL_1M;
+ break;
+ case 2:
+ url = URL_2M;
+ break;
+ case 5:
+ url = URL_5M;
+ break;
+ case 10:
+ url = URL_10M;
+ break;
+ case 20:
+ url = URL_20M;
+ break;
+ case 50:
+ url = URL_50M;
+ break;
+ case 100:
+ url = URL_100M;
+ break;
+ default:
+ fprintf(stderr, "\r%s: invalid parameter %s\n",
+ appname, *argv + 3);
+ exit(1);
+ }
+ break;
+ }
+ /* FALLTHROUGH */
+ default:
+ fprintf(stderr, "\r%s: invalid or unknown option %s\n",
+ appname, *argv);
+ exit(1);
+ }
+ }
+ else {
+ url = *argv;
+ }
+ }
+ }
+
+ /* print separator line */
+ if(prtsep) {
+ printf("-------------------------------------------------\n");
+ }
+ /* print localtime */
+ if(prttime) {
+ time_t t = time(NULL);
+ printf("Localtime: %s", ctime(&t));
+ }
+
+ /* init libcurl */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* specify URL to get */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, url);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteCallback);
+
+ /* some servers do not like requests that are made without a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl_handle, CURLOPT_USERAGENT,
+ "libcurl-speedchecker/" CHKSPEED_VERSION);
+
+ /* get it! */
+ res = curl_easy_perform(curl_handle);
+
+ if(CURLE_OK == res) {
+ curl_off_t val;
+
+ /* check for bytes downloaded */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_SIZE_DOWNLOAD_T, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Data downloaded: %lu bytes.\n", (unsigned long)val);
+
+ /* check for total download time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_TOTAL_TIME_T, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Total download time: %lu.%06lu sec.\n",
+ (unsigned long)(val / 1000000), (unsigned long)(val % 1000000));
+
+ /* check for average download speed */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_SPEED_DOWNLOAD_T, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Average download speed: %lu kbyte/sec.\n",
+ (unsigned long)(val / 1024));
+
+ if(prtall) {
+ /* check for name resolution time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_NAMELOOKUP_TIME_T, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Name lookup time: %lu.%06lu sec.\n",
+ (unsigned long)(val / 1000000), (unsigned long)(val % 1000000));
+
+ /* check for connect time */
+ res = curl_easy_getinfo(curl_handle, CURLINFO_CONNECT_TIME_T, &val);
+ if((CURLE_OK == res) && (val>0))
+ printf("Connect time: %lu.%06lu sec.\n",
+ (unsigned long)(val / 1000000), (unsigned long)(val % 1000000));
+ }
+ }
+ else {
+ fprintf(stderr, "Error while fetching '%s' : %s\n",
+ url, curl_easy_strerror(res));
+ }
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ /* we are done with libcurl, so clean it up */
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/cookie_interface.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/cookie_interface.c
new file mode 100755
index 0000000..62e9dd7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/cookie_interface.c
@@ -0,0 +1,142 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Import and export cookies with COOKIELIST.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <time.h>
+
+#include <curl/curl.h>
+
+static void
+print_cookies(CURL *curl)
+{
+ CURLcode res;
+ struct curl_slist *cookies;
+ struct curl_slist *nc;
+ int i;
+
+ printf("Cookies, curl knows:\n");
+ res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "Curl curl_easy_getinfo failed: %s\n",
+ curl_easy_strerror(res));
+ exit(1);
+ }
+ nc = cookies;
+ i = 1;
+ while(nc) {
+ printf("[%d]: %s\n", i, nc->data);
+ nc = nc->next;
+ i++;
+ }
+ if(i == 1) {
+ printf("(none)\n");
+ }
+ curl_slist_free_all(cookies);
+}
+
+int
+main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curl = curl_easy_init();
+ if(curl) {
+ char nline[512];
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
+ res = curl_easy_perform(curl);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res));
+ return 1;
+ }
+
+ print_cookies(curl);
+
+ printf("Erasing curl's knowledge of cookies!\n");
+ curl_easy_setopt(curl, CURLOPT_COOKIELIST, "ALL");
+
+ print_cookies(curl);
+
+ printf("-----------------------------------------------\n"
+ "Setting a cookie \"PREF\" via cookie interface:\n");
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
+ /* Netscape format cookie */
+ snprintf(nline, sizeof(nline), "%s\t%s\t%s\t%s\t%.0f\t%s\t%s",
+ ".example.com", "TRUE", "/", "FALSE",
+ difftime(time(NULL) + 31337, (time_t)0),
+ "PREF", "hello example, i like you very much!");
+ res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "Curl curl_easy_setopt failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+
+ /* HTTP-header style cookie. If you use the Set-Cookie format and do not
+ specify a domain then the cookie is sent for any domain and will not be
+ modified, likely not what you intended. Starting in 7.43.0 any-domain
+ cookies will not be exported either. For more information refer to the
+ CURLOPT_COOKIELIST documentation.
+ */
+ snprintf(nline, sizeof(nline),
+ "Set-Cookie: OLD_PREF=3d141414bf4209321; "
+ "expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com");
+ res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "Curl curl_easy_setopt failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+
+ print_cookies(curl);
+
+ res = curl_easy_perform(curl);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res));
+ return 1;
+ }
+
+ curl_easy_cleanup(curl);
+ }
+ else {
+ fprintf(stderr, "Curl init failed!\n");
+ return 1;
+ }
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/crawler.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/crawler.c
new file mode 100755
index 0000000..1859c27
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/crawler.c
@@ -0,0 +1,228 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2018 - 2022 Jeroen Ooms <jeroenooms@gmail.com>
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ * To compile:
+ * gcc crawler.c $(pkg-config --cflags --libs libxml-2.0 libcurl)
+ *
+ */
+/* <DESC>
+ * Web crawler based on curl and libxml2 to stress-test curl with
+ * hundreds of concurrent connections to various servers.
+ * </DESC>
+ */
+
+/* Parameters */
+int max_con = 200;
+int max_total = 20000;
+int max_requests = 500;
+int max_link_per_page = 5;
+int follow_relative_links = 0;
+char *start_page = "https://www.reuters.com";
+
+#include <libxml/HTMLparser.h>
+#include <libxml/xpath.h>
+#include <libxml/uri.h>
+#include <curl/curl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <signal.h>
+
+int pending_interrupt = 0;
+void sighandler(int dummy)
+{
+ pending_interrupt = 1;
+}
+
+/* resizable buffer */
+typedef struct {
+ char *buf;
+ size_t size;
+} memory;
+
+size_t grow_buffer(void *contents, size_t sz, size_t nmemb, void *ctx)
+{
+ size_t realsize = sz * nmemb;
+ memory *mem = (memory*) ctx;
+ char *ptr = realloc(mem->buf, mem->size + realsize);
+ if(!ptr) {
+ /* out of memory */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+ mem->buf = ptr;
+ memcpy(&(mem->buf[mem->size]), contents, realsize);
+ mem->size += realsize;
+ return realsize;
+}
+
+CURL *make_handle(char *url)
+{
+ CURL *handle = curl_easy_init();
+
+ /* Important: use HTTP2 over HTTPS */
+ curl_easy_setopt(handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
+ curl_easy_setopt(handle, CURLOPT_URL, url);
+
+ /* buffer body */
+ memory *mem = malloc(sizeof(memory));
+ mem->size = 0;
+ mem->buf = malloc(1);
+ curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, grow_buffer);
+ curl_easy_setopt(handle, CURLOPT_WRITEDATA, mem);
+ curl_easy_setopt(handle, CURLOPT_PRIVATE, mem);
+
+ /* For completeness */
+ curl_easy_setopt(handle, CURLOPT_ACCEPT_ENCODING, "");
+ curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L);
+ curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L);
+ curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 2L);
+ curl_easy_setopt(handle, CURLOPT_COOKIEFILE, "");
+ curl_easy_setopt(handle, CURLOPT_FILETIME, 1L);
+ curl_easy_setopt(handle, CURLOPT_USERAGENT, "mini crawler");
+ curl_easy_setopt(handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ curl_easy_setopt(handle, CURLOPT_UNRESTRICTED_AUTH, 1L);
+ curl_easy_setopt(handle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+ curl_easy_setopt(handle, CURLOPT_EXPECT_100_TIMEOUT_MS, 0L);
+ return handle;
+}
+
+/* HREF finder implemented in libxml2 but could be any HTML parser */
+size_t follow_links(CURLM *multi_handle, memory *mem, char *url)
+{
+ int opts = HTML_PARSE_NOBLANKS | HTML_PARSE_NOERROR | \
+ HTML_PARSE_NOWARNING | HTML_PARSE_NONET;
+ htmlDocPtr doc = htmlReadMemory(mem->buf, mem->size, url, NULL, opts);
+ if(!doc)
+ return 0;
+ xmlChar *xpath = (xmlChar*) "//a/@href";
+ xmlXPathContextPtr context = xmlXPathNewContext(doc);
+ xmlXPathObjectPtr result = xmlXPathEvalExpression(xpath, context);
+ xmlXPathFreeContext(context);
+ if(!result)
+ return 0;
+ xmlNodeSetPtr nodeset = result->nodesetval;
+ if(xmlXPathNodeSetIsEmpty(nodeset)) {
+ xmlXPathFreeObject(result);
+ return 0;
+ }
+ size_t count = 0;
+ int i;
+ for(i = 0; i < nodeset->nodeNr; i++) {
+ double r = rand();
+ int x = r * nodeset->nodeNr / RAND_MAX;
+ const xmlNode *node = nodeset->nodeTab[x]->xmlChildrenNode;
+ xmlChar *href = xmlNodeListGetString(doc, node, 1);
+ if(follow_relative_links) {
+ xmlChar *orig = href;
+ href = xmlBuildURI(href, (xmlChar *) url);
+ xmlFree(orig);
+ }
+ char *link = (char *) href;
+ if(!link || strlen(link) < 20)
+ continue;
+ if(!strncmp(link, "http://", 7) || !strncmp(link, "https://", 8)) {
+ curl_multi_add_handle(multi_handle, make_handle(link));
+ if(count++ == max_link_per_page)
+ break;
+ }
+ xmlFree(link);
+ }
+ xmlXPathFreeObject(result);
+ return count;
+}
+
+int is_html(char *ctype)
+{
+ return ctype != NULL && strlen(ctype) > 10 && strstr(ctype, "text/html");
+}
+
+int main(void)
+{
+ signal(SIGINT, sighandler);
+ LIBXML_TEST_VERSION;
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+ CURLM *multi_handle = curl_multi_init();
+ curl_multi_setopt(multi_handle, CURLMOPT_MAX_TOTAL_CONNECTIONS, max_con);
+ curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 6L);
+
+ /* enables http/2 if available */
+#ifdef CURLPIPE_MULTIPLEX
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+#endif
+
+ /* sets html start page */
+ curl_multi_add_handle(multi_handle, make_handle(start_page));
+
+ int msgs_left;
+ int pending = 0;
+ int complete = 0;
+ int still_running = 1;
+ while(still_running && !pending_interrupt) {
+ int numfds;
+ curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds);
+ curl_multi_perform(multi_handle, &still_running);
+
+ /* See how the transfers went */
+ CURLMsg *m = NULL;
+ while((m = curl_multi_info_read(multi_handle, &msgs_left))) {
+ if(m->msg == CURLMSG_DONE) {
+ CURL *handle = m->easy_handle;
+ char *url;
+ memory *mem;
+ curl_easy_getinfo(handle, CURLINFO_PRIVATE, &mem);
+ curl_easy_getinfo(handle, CURLINFO_EFFECTIVE_URL, &url);
+ if(m->data.result == CURLE_OK) {
+ long res_status;
+ curl_easy_getinfo(handle, CURLINFO_RESPONSE_CODE, &res_status);
+ if(res_status == 200) {
+ char *ctype;
+ curl_easy_getinfo(handle, CURLINFO_CONTENT_TYPE, &ctype);
+ printf("[%d] HTTP 200 (%s): %s\n", complete, ctype, url);
+ if(is_html(ctype) && mem->size > 100) {
+ if(pending < max_requests && (complete + pending) < max_total) {
+ pending += follow_links(multi_handle, mem, url);
+ still_running = 1;
+ }
+ }
+ }
+ else {
+ printf("[%d] HTTP %d: %s\n", complete, (int) res_status, url);
+ }
+ }
+ else {
+ printf("[%d] Connection failure: %s\n", complete, url);
+ }
+ curl_multi_remove_handle(multi_handle, handle);
+ curl_easy_cleanup(handle);
+ free(mem->buf);
+ free(mem);
+ complete++;
+ pending--;
+ }
+ }
+ }
+ curl_multi_cleanup(multi_handle);
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/curlgtk.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/curlgtk.c
new file mode 100755
index 0000000..7568941
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/curlgtk.c
@@ -0,0 +1,119 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (c) 2000 - 2022 David Odin (aka DindinX) for MandrakeSoft
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * use the libcurl in a gtk-threaded application
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+
+#include <curl/curl.h>
+
+GtkWidget *Bar;
+
+static size_t my_write_func(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ return fwrite(ptr, size, nmemb, stream);
+}
+
+static size_t my_read_func(char *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ return fread(ptr, size, nmemb, stream);
+}
+
+static int my_progress_func(GtkWidget *bar,
+ double t, /* dltotal */
+ double d, /* dlnow */
+ double ultotal,
+ double ulnow)
+{
+/* printf("%d / %d (%g %%)\n", d, t, d*100.0/t);*/
+ gdk_threads_enter();
+ gtk_progress_set_value(GTK_PROGRESS(bar), d*100.0/t);
+ gdk_threads_leave();
+ return 0;
+}
+
+static void *my_thread(void *ptr)
+{
+ CURL *curl;
+
+ curl = curl_easy_init();
+ if(curl) {
+ gchar *url = ptr;
+ const char *filename = "test.curl";
+ FILE *outfile = fopen(filename, "wb");
+
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_write_func);
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, my_read_func);
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, my_progress_func);
+ curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, Bar);
+
+ curl_easy_perform(curl);
+
+ fclose(outfile);
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return NULL;
+}
+
+int main(int argc, char **argv)
+{
+ GtkWidget *Window, *Frame, *Frame2;
+ GtkAdjustment *adj;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Init thread */
+ g_thread_init(NULL);
+
+ gtk_init(&argc, &argv);
+ Window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ Frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(Frame), GTK_SHADOW_OUT);
+ gtk_container_add(GTK_CONTAINER(Window), Frame);
+ Frame2 = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(Frame2), GTK_SHADOW_IN);
+ gtk_container_add(GTK_CONTAINER(Frame), Frame2);
+ gtk_container_set_border_width(GTK_CONTAINER(Frame2), 5);
+ adj = (GtkAdjustment*)gtk_adjustment_new(0, 0, 100, 0, 0, 0);
+ Bar = gtk_progress_bar_new_with_adjustment(adj);
+ gtk_container_add(GTK_CONTAINER(Frame2), Bar);
+ gtk_widget_show_all(Window);
+
+ if(!g_thread_create(&my_thread, argv[1], FALSE, NULL) != 0)
+ g_warning("cannot create the thread");
+
+ gdk_threads_enter();
+ gtk_main();
+ gdk_threads_leave();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/debug.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/debug.c
new file mode 100755
index 0000000..aeef829
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/debug.c
@@ -0,0 +1,156 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show how CURLOPT_DEBUGFUNCTION can be used.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+struct data {
+ char trace_ascii; /* 1 or 0 */
+};
+
+static
+void dump(const char *text,
+ FILE *stream, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+ text, (unsigned long)size, (unsigned long)size);
+
+ for(i = 0; i<size; i += width) {
+
+ fprintf(stream, "%4.4lx: ", (unsigned long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i + c < size)
+ fprintf(stream, "%02x ", ptr[i + c]);
+ else
+ fputs(" ", stream);
+ }
+
+ for(c = 0; (c < width) && (i + c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
+ break;
+ }
+ fprintf(stream, "%c",
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
+ break;
+ }
+ }
+ fputc('\n', stream); /* newline */
+ }
+ fflush(stream);
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ struct data *config = (struct data *)userp;
+ const char *text;
+ (void)handle; /* prevent compiler warning */
+
+ switch(type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== Info: %s", data);
+ /* FALLTHROUGH */
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, stderr, (unsigned char *)data, size, config->trace_ascii);
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct data config;
+
+ config.trace_ascii = 1; /* enable ascii tracing */
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
+ curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
+
+ /* the DEBUGFUNCTION has no effect until we enable VERBOSE */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ephiperfifo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ephiperfifo.c
new file mode 100755
index 0000000..7079846
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ephiperfifo.c
@@ -0,0 +1,547 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi socket API usage with epoll and timerfd
+ * </DESC>
+ */
+/* Example application source code using the multi socket interface to
+ * download many files at once.
+ *
+ * This example features the same basic functionality as hiperfifo.c does,
+ * but this uses epoll and timerfd instead of libevent.
+ *
+ * Written by Jeff Pohlmeyer, converted to use epoll by Josh Bialkowski
+
+Requires a linux system with epoll
+
+When running, the program creates the named pipe "hiper.fifo"
+
+Whenever there is input into the fifo, the program reads the input as a list
+of URL's and creates some new easy handles to fetch each URL via the
+curl_multi "hiper" API.
+
+
+Thus, you can try a single URL:
+ % echo http://www.yahoo.com > hiper.fifo
+
+Or a whole bunch of them:
+ % cat my-url-list > hiper.fifo
+
+The fifo buffer is handled almost instantly, so you can even add more URL's
+while the previous requests are still being downloaded.
+
+Note:
+ For the sake of simplicity, URL length is limited to 1023 char's !
+
+This is purely a demo app, all retrieved data is simply discarded by the write
+callback.
+
+*/
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/epoll.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/timerfd.h>
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+ int epfd; /* epoll filedescriptor */
+ int tfd; /* timer filedescriptor */
+ int fifofd; /* fifo filedescriptor */
+ CURLM *multi;
+ int still_running;
+ FILE *input;
+} GlobalInfo;
+
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+
+/* Information associated with a specific socket */
+typedef struct _SockInfo
+{
+ curl_socket_t sockfd;
+ CURL *easy;
+ int action;
+ long timeout;
+ GlobalInfo *global;
+} SockInfo;
+
+#define mycase(code) \
+ case code: s = __STRING(code)
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code) {
+ const char *s;
+ switch(code) {
+ mycase(CURLM_BAD_HANDLE); break;
+ mycase(CURLM_BAD_EASY_HANDLE); break;
+ mycase(CURLM_OUT_OF_MEMORY); break;
+ mycase(CURLM_INTERNAL_ERROR); break;
+ mycase(CURLM_UNKNOWN_OPTION); break;
+ mycase(CURLM_LAST); break;
+ default: s = "CURLM_unknown"; break;
+ mycase(CURLM_BAD_SOCKET);
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ /* ignore this error */
+ return;
+ }
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ exit(code);
+ }
+}
+
+static void timer_cb(GlobalInfo* g, int revents);
+
+/* Update the timer after curl_multi library does it's thing. Curl will
+ * inform us through this callback what it wants the new timeout to be,
+ * after it does some work. */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+ struct itimerspec its;
+
+ fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
+
+ if(timeout_ms > 0) {
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0;
+ its.it_value.tv_sec = timeout_ms / 1000;
+ its.it_value.tv_nsec = (timeout_ms % 1000) * 1000 * 1000;
+ }
+ else if(timeout_ms == 0) {
+ /* libcurl wants us to timeout now, however setting both fields of
+ * new_value.it_value to zero disarms the timer. The closest we can
+ * do is to schedule the timer to fire in 1 ns. */
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0;
+ its.it_value.tv_sec = 0;
+ its.it_value.tv_nsec = 1;
+ }
+ else {
+ memset(&its, 0, sizeof(struct itimerspec));
+ }
+
+ timerfd_settime(g->tfd, /*flags=*/0, &its, NULL);
+ return 0;
+}
+
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
+ while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+}
+
+/* Called by libevent when we get action on a multi socket filedescriptor*/
+static void event_cb(GlobalInfo *g, int fd, int revents)
+{
+ CURLMcode rc;
+ struct itimerspec its;
+
+ int action = ((revents & EPOLLIN) ? CURL_CSELECT_IN : 0) |
+ ((revents & EPOLLOUT) ? CURL_CSELECT_OUT : 0);
+
+ rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+
+ check_multi_info(g);
+ if(g->still_running <= 0) {
+ fprintf(MSG_OUT, "last transfer done, kill timeout\n");
+ memset(&its, 0, sizeof(struct itimerspec));
+ timerfd_settime(g->tfd, 0, &its, NULL);
+ }
+}
+
+/* Called by main loop when our timeout expires */
+static void timer_cb(GlobalInfo* g, int revents)
+{
+ CURLMcode rc;
+ uint64_t count = 0;
+ ssize_t err = 0;
+
+ err = read(g->tfd, &count, sizeof(uint64_t));
+ if(err == -1) {
+ /* Note that we may call the timer callback even if the timerfd is not
+ * readable. It's possible that there are multiple events stored in the
+ * epoll buffer (i.e. the timer may have fired multiple times). The
+ * event count is cleared after the first call so future events in the
+ * epoll buffer will fail to read from the timer. */
+ if(errno == EAGAIN) {
+ fprintf(MSG_OUT, "EAGAIN on tfd %d\n", g->tfd);
+ return;
+ }
+ }
+ if(err != sizeof(uint64_t)) {
+ fprintf(stderr, "read(tfd) == %ld", err);
+ perror("read(tfd)");
+ }
+
+ rc = curl_multi_socket_action(g->multi,
+ CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+}
+
+
+
+/* Clean up the SockInfo structure */
+static void remsock(SockInfo *f, GlobalInfo* g)
+{
+ if(f) {
+ if(f->sockfd) {
+ if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL))
+ fprintf(stderr, "EPOLL_CTL_DEL failed for fd: %d : %s\n",
+ f->sockfd, strerror(errno));
+ }
+ free(f);
+ }
+}
+
+
+
+/* Assign information to a SockInfo structure */
+static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
+ GlobalInfo *g)
+{
+ struct epoll_event ev;
+ int kind = ((act & CURL_POLL_IN) ? EPOLLIN : 0) |
+ ((act & CURL_POLL_OUT) ? EPOLLOUT : 0);
+
+ if(f->sockfd) {
+ if(epoll_ctl(g->epfd, EPOLL_CTL_DEL, f->sockfd, NULL))
+ fprintf(stderr, "EPOLL_CTL_DEL failed for fd: %d : %s\n",
+ f->sockfd, strerror(errno));
+ }
+
+ f->sockfd = s;
+ f->action = act;
+ f->easy = e;
+
+ ev.events = kind;
+ ev.data.fd = s;
+ if(epoll_ctl(g->epfd, EPOLL_CTL_ADD, s, &ev))
+ fprintf(stderr, "EPOLL_CTL_ADD failed for fd: %d : %s\n",
+ s, strerror(errno));
+}
+
+
+
+/* Initialize a new SockInfo structure */
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+ SockInfo *fdp = (SockInfo*)calloc(1, sizeof(SockInfo));
+
+ fdp->global = g;
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ SockInfo *fdp = (SockInfo*) sockp;
+ const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
+
+ fprintf(MSG_OUT,
+ "socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+ if(what == CURL_POLL_REMOVE) {
+ fprintf(MSG_OUT, "\n");
+ remsock(fdp, g);
+ }
+ else {
+ if(!fdp) {
+ fprintf(MSG_OUT, "Adding data: %s\n", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else {
+ fprintf(MSG_OUT,
+ "Changing action from %s to %s\n",
+ whatstr[fdp->action], whatstr[what]);
+ setsock(fdp, s, e, what, g);
+ }
+ }
+ return 0;
+}
+
+
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ (void)ptr;
+ (void)data;
+ return size * nmemb;
+}
+
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+ (void)ult;
+ (void)uln;
+
+ fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
+ return 0;
+}
+
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = (ConnInfo*)calloc(1, sizeof(ConnInfo));
+ conn->error[0]='\0';
+
+ conn->easy = curl_easy_init();
+ if(!conn->easy) {
+ fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
+ exit(2);
+ }
+ conn->global = g;
+ conn->url = strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+ fprintf(MSG_OUT,
+ "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+/* This gets called whenever data is received from the fifo */
+static void fifo_cb(GlobalInfo* g, int revents)
+{
+ char s[1024];
+ long int rv = 0;
+ int n = 0;
+
+ do {
+ s[0]='\0';
+ rv = fscanf(g->input, "%1023s%n", s, &n);
+ s[n]='\0';
+ if(n && s[0]) {
+ new_conn(s, g); /* if we read a URL, go get it! */
+ }
+ else
+ break;
+ } while(rv != EOF);
+}
+
+/* Create a named pipe and tell libevent to monitor it */
+static const char *fifo = "hiper.fifo";
+static int init_fifo(GlobalInfo *g)
+{
+ struct stat st;
+ curl_socket_t sockfd;
+ struct epoll_event epev;
+
+ fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
+ if(lstat (fifo, &st) == 0) {
+ if((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+ unlink(fifo);
+ if(mkfifo (fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+ sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
+ if(sockfd == -1) {
+ perror("open");
+ exit(1);
+ }
+
+ g->fifofd = sockfd;
+ g->input = fdopen(sockfd, "r");
+
+ epev.events = EPOLLIN;
+ epev.data.fd = sockfd;
+ epoll_ctl(g->epfd, EPOLL_CTL_ADD, sockfd, &epev);
+
+ fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
+ return 0;
+}
+
+static void clean_fifo(GlobalInfo *g)
+{
+ epoll_ctl(g->epfd, EPOLL_CTL_DEL, g->fifofd, NULL);
+ fclose(g->input);
+ unlink(fifo);
+}
+
+
+int g_should_exit_ = 0;
+
+void sigint_handler(int signo)
+{
+ g_should_exit_ = 1;
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo g;
+ struct itimerspec its;
+ struct epoll_event ev;
+ struct epoll_event events[10];
+ (void)argc;
+ (void)argv;
+
+ g_should_exit_ = 0;
+ signal(SIGINT, sigint_handler);
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.epfd = epoll_create1(EPOLL_CLOEXEC);
+ if(g.epfd == -1) {
+ perror("epoll_create1 failed");
+ exit(1);
+ }
+
+ g.tfd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK | TFD_CLOEXEC);
+ if(g.tfd == -1) {
+ perror("timerfd_create failed");
+ exit(1);
+ }
+
+ memset(&its, 0, sizeof(struct itimerspec));
+ its.it_interval.tv_sec = 0;
+ its.it_value.tv_sec = 1;
+ timerfd_settime(g.tfd, 0, &its, NULL);
+
+ ev.events = EPOLLIN;
+ ev.data.fd = g.tfd;
+ epoll_ctl(g.epfd, EPOLL_CTL_ADD, g.tfd, &ev);
+
+ init_fifo(&g);
+ g.multi = curl_multi_init();
+
+ /* setup the generic multi interface options we want */
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ /* we do not call any curl_multi_socket*() function yet as we have no handles
+ added! */
+
+ fprintf(MSG_OUT, "Entering wait loop\n");
+ fflush(MSG_OUT);
+ while(!g_should_exit_) {
+ int idx;
+ int err = epoll_wait(g.epfd, events,
+ sizeof(events)/sizeof(struct epoll_event), 10000);
+ if(err == -1) {
+ if(errno == EINTR) {
+ fprintf(MSG_OUT, "note: wait interrupted\n");
+ continue;
+ }
+ else {
+ perror("epoll_wait");
+ exit(1);
+ }
+ }
+
+ for(idx = 0; idx < err; ++idx) {
+ if(events[idx].data.fd == g.fifofd) {
+ fifo_cb(&g, events[idx].events);
+ }
+ else if(events[idx].data.fd == g.tfd) {
+ timer_cb(&g, events[idx].events);
+ }
+ else {
+ event_cb(&g, events[idx].data.fd, events[idx].events);
+ }
+ }
+ }
+
+ fprintf(MSG_OUT, "Exiting normally.\n");
+ fflush(MSG_OUT);
+
+ curl_multi_cleanup(g.multi);
+ clean_fifo(&g);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/evhiperfifo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/evhiperfifo.c
new file mode 100755
index 0000000..3c9ca57
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/evhiperfifo.c
@@ -0,0 +1,450 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi socket interface together with libev
+ * </DESC>
+ */
+/* Example application source code using the multi socket interface to
+ * download many files at once.
+ *
+ * This example features the same basic functionality as hiperfifo.c does,
+ * but this uses libev instead of libevent.
+ *
+ * Written by Jeff Pohlmeyer, converted to use libev by Markus Koetter
+
+Requires libev and a (POSIX?) system that has mkfifo().
+
+This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
+sample programs.
+
+When running, the program creates the named pipe "hiper.fifo"
+
+Whenever there is input into the fifo, the program reads the input as a list
+of URL's and creates some new easy handles to fetch each URL via the
+curl_multi "hiper" API.
+
+
+Thus, you can try a single URL:
+ % echo http://www.yahoo.com > hiper.fifo
+
+Or a whole bunch of them:
+ % cat my-url-list > hiper.fifo
+
+The fifo buffer is handled almost instantly, so you can even add more URL's
+while the previous requests are still being downloaded.
+
+Note:
+ For the sake of simplicity, URL length is limited to 1023 char's !
+
+This is purely a demo app, all retrieved data is simply discarded by the write
+callback.
+
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/poll.h>
+#include <curl/curl.h>
+#include <ev.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#define DPRINT(x...) printf(x)
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+ struct ev_loop *loop;
+ struct ev_io fifo_event;
+ struct ev_timer timer_event;
+ CURLM *multi;
+ int still_running;
+ FILE *input;
+} GlobalInfo;
+
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+
+/* Information associated with a specific socket */
+typedef struct _SockInfo
+{
+ curl_socket_t sockfd;
+ CURL *easy;
+ int action;
+ long timeout;
+ struct ev_io ev;
+ int evset;
+ GlobalInfo *global;
+} SockInfo;
+
+static void timer_cb(EV_P_ struct ev_timer *w, int revents);
+
+/* Update the event timer after curl_multi library calls */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+ DPRINT("%s %li\n", __PRETTY_FUNCTION__, timeout_ms);
+ ev_timer_stop(g->loop, &g->timer_event);
+ if(timeout_ms >= 0) {
+ /* -1 means delete, other values are timeout times in milliseconds */
+ double t = timeout_ms / 1000;
+ ev_timer_init(&g->timer_event, timer_cb, t, 0.);
+ ev_timer_start(g->loop, &g->timer_event);
+ }
+ return 0;
+}
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code) {
+ const char *s;
+ switch(code) {
+ case CURLM_BAD_HANDLE:
+ s = "CURLM_BAD_HANDLE";
+ break;
+ case CURLM_BAD_EASY_HANDLE:
+ s = "CURLM_BAD_EASY_HANDLE";
+ break;
+ case CURLM_OUT_OF_MEMORY:
+ s = "CURLM_OUT_OF_MEMORY";
+ break;
+ case CURLM_INTERNAL_ERROR:
+ s = "CURLM_INTERNAL_ERROR";
+ break;
+ case CURLM_UNKNOWN_OPTION:
+ s = "CURLM_UNKNOWN_OPTION";
+ break;
+ case CURLM_LAST:
+ s = "CURLM_LAST";
+ break;
+ default:
+ s = "CURLM_unknown";
+ break;
+ case CURLM_BAD_SOCKET:
+ s = "CURLM_BAD_SOCKET";
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ /* ignore this error */
+ return;
+ }
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ exit(code);
+ }
+}
+
+
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
+ while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+}
+
+
+
+/* Called by libevent when we get action on a multi socket */
+static void event_cb(EV_P_ struct ev_io *w, int revents)
+{
+ DPRINT("%s w %p revents %i\n", __PRETTY_FUNCTION__, w, revents);
+ GlobalInfo *g = (GlobalInfo*) w->data;
+ CURLMcode rc;
+
+ int action = ((revents & EV_READ) ? CURL_POLL_IN : 0) |
+ ((revents & EV_WRITE) ? CURL_POLL_OUT : 0);
+ rc = curl_multi_socket_action(g->multi, w->fd, action, &g->still_running);
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+ if(g->still_running <= 0) {
+ fprintf(MSG_OUT, "last transfer done, kill timeout\n");
+ ev_timer_stop(g->loop, &g->timer_event);
+ }
+}
+
+/* Called by libevent when our timeout expires */
+static void timer_cb(EV_P_ struct ev_timer *w, int revents)
+{
+ DPRINT("%s w %p revents %i\n", __PRETTY_FUNCTION__, w, revents);
+
+ GlobalInfo *g = (GlobalInfo *)w->data;
+ CURLMcode rc;
+
+ rc = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0,
+ &g->still_running);
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+}
+
+/* Clean up the SockInfo structure */
+static void remsock(SockInfo *f, GlobalInfo *g)
+{
+ printf("%s \n", __PRETTY_FUNCTION__);
+ if(f) {
+ if(f->evset)
+ ev_io_stop(g->loop, &f->ev);
+ free(f);
+ }
+}
+
+
+
+/* Assign information to a SockInfo structure */
+static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
+ GlobalInfo *g)
+{
+ printf("%s \n", __PRETTY_FUNCTION__);
+
+ int kind = ((act & CURL_POLL_IN) ? EV_READ : 0) |
+ ((act & CURL_POLL_OUT) ? EV_WRITE : 0);
+
+ f->sockfd = s;
+ f->action = act;
+ f->easy = e;
+ if(f->evset)
+ ev_io_stop(g->loop, &f->ev);
+ ev_io_init(&f->ev, event_cb, f->sockfd, kind);
+ f->ev.data = g;
+ f->evset = 1;
+ ev_io_start(g->loop, &f->ev);
+}
+
+
+
+/* Initialize a new SockInfo structure */
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+ SockInfo *fdp = calloc(1, sizeof(SockInfo));
+
+ fdp->global = g;
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+ DPRINT("%s e %p s %i what %i cbp %p sockp %p\n",
+ __PRETTY_FUNCTION__, e, s, what, cbp, sockp);
+
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ SockInfo *fdp = (SockInfo*) sockp;
+ const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE"};
+
+ fprintf(MSG_OUT,
+ "socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+ if(what == CURL_POLL_REMOVE) {
+ fprintf(MSG_OUT, "\n");
+ remsock(fdp, g);
+ }
+ else {
+ if(!fdp) {
+ fprintf(MSG_OUT, "Adding data: %s\n", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else {
+ fprintf(MSG_OUT,
+ "Changing action from %s to %s\n",
+ whatstr[fdp->action], whatstr[what]);
+ setsock(fdp, s, e, what, g);
+ }
+ }
+ return 0;
+}
+
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ size_t realsize = size * nmemb;
+ ConnInfo *conn = (ConnInfo*) data;
+ (void)ptr;
+ (void)conn;
+ return realsize;
+}
+
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+ (void)ult;
+ (void)uln;
+
+ fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
+ return 0;
+}
+
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = calloc(1, sizeof(ConnInfo));
+ conn->error[0]='\0';
+
+ conn->easy = curl_easy_init();
+ if(!conn->easy) {
+ fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
+ exit(2);
+ }
+ conn->global = g;
+ conn->url = strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 3L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 10L);
+
+ fprintf(MSG_OUT,
+ "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+/* This gets called whenever data is received from the fifo */
+static void fifo_cb(EV_P_ struct ev_io *w, int revents)
+{
+ char s[1024];
+ long int rv = 0;
+ int n = 0;
+ GlobalInfo *g = (GlobalInfo *)w->data;
+
+ do {
+ s[0]='\0';
+ rv = fscanf(g->input, "%1023s%n", s, &n);
+ s[n]='\0';
+ if(n && s[0]) {
+ new_conn(s, g); /* if we read a URL, go get it! */
+ }
+ else
+ break;
+ } while(rv != EOF);
+}
+
+/* Create a named pipe and tell libevent to monitor it */
+static int init_fifo(GlobalInfo *g)
+{
+ struct stat st;
+ static const char *fifo = "hiper.fifo";
+ curl_socket_t sockfd;
+
+ fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
+ if(lstat (fifo, &st) == 0) {
+ if((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+ unlink(fifo);
+ if(mkfifo (fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+ sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
+ if(sockfd == -1) {
+ perror("open");
+ exit(1);
+ }
+ g->input = fdopen(sockfd, "r");
+
+ fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
+ ev_io_init(&g->fifo_event, fifo_cb, sockfd, EV_READ);
+ ev_io_start(g->loop, &g->fifo_event);
+ return (0);
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo g;
+ (void)argc;
+ (void)argv;
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.loop = ev_default_loop(0);
+
+ init_fifo(&g);
+ g.multi = curl_multi_init();
+
+ ev_timer_init(&g.timer_event, timer_cb, 0., 0.);
+ g.timer_event.data = &g;
+ g.fifo_event.data = &g;
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ /* we do not call any curl_multi_socket*() function yet as we have no handles
+ added! */
+
+ ev_loop(g.loop, 0);
+ curl_multi_cleanup(g.multi);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/externalsocket.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/externalsocket.c
new file mode 100755
index 0000000..dfdd1c2
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/externalsocket.c
@@ -0,0 +1,176 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * An example demonstrating how an application can pass in a custom
+ * socket to libcurl to use. This example also handles the connect itself.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <curl/curl.h>
+
+#ifdef WIN32
+#include <windows.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define close closesocket
+#else
+#include <sys/types.h> /* socket types */
+#include <sys/socket.h> /* socket definitions */
+#include <netinet/in.h>
+#include <arpa/inet.h> /* inet (3) functions */
+#include <unistd.h> /* misc. Unix functions */
+#endif
+
+#include <errno.h>
+
+/* The IP address and port number to connect to */
+#define IPADDR "127.0.0.1"
+#define PORTNUM 80
+
+#ifndef INADDR_NONE
+#define INADDR_NONE 0xffffffff
+#endif
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+static int closecb(void *clientp, curl_socket_t item)
+{
+ (void)clientp;
+ printf("libcurl wants to close %d now\n", (int)item);
+ return 0;
+}
+
+static curl_socket_t opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *address)
+{
+ curl_socket_t sockfd;
+ (void)purpose;
+ (void)address;
+ sockfd = *(curl_socket_t *)clientp;
+ /* the actual externally set socket is passed in via the OPENSOCKETDATA
+ option */
+ return sockfd;
+}
+
+static int sockopt_callback(void *clientp, curl_socket_t curlfd,
+ curlsocktype purpose)
+{
+ (void)clientp;
+ (void)curlfd;
+ (void)purpose;
+ /* This return code was added in libcurl 7.21.5 */
+ return CURL_SOCKOPT_ALREADY_CONNECTED;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct sockaddr_in servaddr; /* socket address structure */
+ curl_socket_t sockfd;
+
+#ifdef WIN32
+ WSADATA wsaData;
+ int initwsa = WSAStartup(MAKEWORD(2, 2), &wsaData);
+ if(initwsa) {
+ printf("WSAStartup failed: %d\n", initwsa);
+ return 1;
+ }
+#endif
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * Note that libcurl will internally think that you connect to the host
+ * and port that you specify in the URL option.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL, "http://99.99.99.99:9999");
+
+ /* Create the socket "manually" */
+ sockfd = socket(AF_INET, SOCK_STREAM, 0);
+ if(sockfd == CURL_SOCKET_BAD) {
+ printf("Error creating listening socket.\n");
+ return 3;
+ }
+
+ memset(&servaddr, 0, sizeof(servaddr));
+ servaddr.sin_family = AF_INET;
+ servaddr.sin_port = htons(PORTNUM);
+
+ servaddr.sin_addr.s_addr = inet_addr(IPADDR);
+ if(INADDR_NONE == servaddr.sin_addr.s_addr) {
+ close(sockfd);
+ return 2;
+ }
+
+ if(connect(sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) ==
+ -1) {
+ close(sockfd);
+ printf("client error: connect: %s\n", strerror(errno));
+ return 1;
+ }
+
+ /* no progress meter please */
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* call this function to get a socket */
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd);
+
+ /* call this function to close sockets */
+ curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closecb);
+ curl_easy_setopt(curl, CURLOPT_CLOSESOCKETDATA, &sockfd);
+
+ /* call this function to set options for the socket */
+ curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, sockopt_callback);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
+
+ res = curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ close(sockfd);
+
+ if(res) {
+ printf("libcurl error: %d\n", res);
+ return 4;
+ }
+ }
+
+#ifdef WIN32
+ WSACleanup();
+#endif
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/fileupload.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/fileupload.c
new file mode 100755
index 0000000..8d3e6cd
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/fileupload.c
@@ -0,0 +1,89 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Upload to a file:// URL
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct stat file_info;
+ curl_off_t speed_upload, total_time;
+ FILE *fd;
+
+ fd = fopen("debugit", "rb"); /* open file to upload */
+ if(!fd)
+ return 1; /* cannot continue */
+
+ /* to get the file size */
+ if(fstat(fileno(fd), &file_info) != 0)
+ return 1; /* cannot continue */
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* upload to this place */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "file:///home/dast/src/curl/debug/new");
+
+ /* tell it to "upload" to the URL */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* set where to read from (on Windows you need to use READFUNCTION too) */
+ curl_easy_setopt(curl, CURLOPT_READDATA, fd);
+
+ /* and give the size of the upload (optional) */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)file_info.st_size);
+
+ /* enable verbose for easier tracing */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /* now extract transfer info */
+ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed_upload);
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total_time);
+
+ fprintf(stderr, "Speed: %lu bytes/sec during %lu.%06lu seconds\n",
+ (unsigned long)speed_upload,
+ (unsigned long)(total_time / 1000000),
+ (unsigned long)(total_time % 1000000));
+ }
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ fclose(fd);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftp-wildcard.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftp-wildcard.c
new file mode 100755
index 0000000..9c1c913
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftp-wildcard.c
@@ -0,0 +1,152 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * FTP wildcard pattern matching
+ * </DESC>
+ */
+#include <curl/curl.h>
+#include <stdio.h>
+
+struct callback_data {
+ FILE *output;
+};
+
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains);
+
+static long file_is_downloaded(struct callback_data *data);
+
+static size_t write_it(char *buff, size_t size, size_t nmemb,
+ void *cb_data);
+
+int main(int argc, char **argv)
+{
+ /* curl easy handle */
+ CURL *handle;
+
+ /* help data */
+ struct callback_data data = { 0 };
+
+ /* global initialization */
+ int rc = curl_global_init(CURL_GLOBAL_ALL);
+ if(rc)
+ return rc;
+
+ /* initialization of easy handle */
+ handle = curl_easy_init();
+ if(!handle) {
+ curl_global_cleanup();
+ return CURLE_OUT_OF_MEMORY;
+ }
+
+ /* turn on wildcard matching */
+ curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
+
+ /* callback is called before download of concrete file started */
+ curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming);
+
+ /* callback is called after data from the file have been transferred */
+ curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
+
+ /* this callback will write contents into files */
+ curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_it);
+
+ /* put transfer data into callbacks */
+ curl_easy_setopt(handle, CURLOPT_CHUNK_DATA, &data);
+ curl_easy_setopt(handle, CURLOPT_WRITEDATA, &data);
+
+ /* curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L); */
+
+ /* set a URL containing wildcard pattern (only in the last part) */
+ if(argc == 2)
+ curl_easy_setopt(handle, CURLOPT_URL, argv[1]);
+ else
+ curl_easy_setopt(handle, CURLOPT_URL, "ftp://example.com/test/*");
+
+ /* and start transfer! */
+ rc = curl_easy_perform(handle);
+
+ curl_easy_cleanup(handle);
+ curl_global_cleanup();
+ return rc;
+}
+
+static long file_is_coming(struct curl_fileinfo *finfo,
+ struct callback_data *data,
+ int remains)
+{
+ printf("%3d %40s %10luB ", remains, finfo->filename,
+ (unsigned long)finfo->size);
+
+ switch(finfo->filetype) {
+ case CURLFILETYPE_DIRECTORY:
+ printf(" DIR\n");
+ break;
+ case CURLFILETYPE_FILE:
+ printf("FILE ");
+ break;
+ default:
+ printf("OTHER\n");
+ break;
+ }
+
+ if(finfo->filetype == CURLFILETYPE_FILE) {
+ /* do not transfer files >= 50B */
+ if(finfo->size > 50) {
+ printf("SKIPPED\n");
+ return CURL_CHUNK_BGN_FUNC_SKIP;
+ }
+
+ data->output = fopen(finfo->filename, "wb");
+ if(!data->output) {
+ return CURL_CHUNK_BGN_FUNC_FAIL;
+ }
+ }
+
+ return CURL_CHUNK_BGN_FUNC_OK;
+}
+
+static long file_is_downloaded(struct callback_data *data)
+{
+ if(data->output) {
+ printf("DOWNLOADED\n");
+ fclose(data->output);
+ data->output = 0x0;
+ }
+ return CURL_CHUNK_END_FUNC_OK;
+}
+
+static size_t write_it(char *buff, size_t size, size_t nmemb,
+ void *cb_data)
+{
+ struct callback_data *data = cb_data;
+ size_t written = 0;
+ if(data->output)
+ written = fwrite(buff, size, nmemb, data->output);
+ else
+ /* listing output */
+ written = fwrite(buff, size, nmemb, stdout);
+ return written;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpget.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpget.c
new file mode 100755
index 0000000..3229dbf
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpget.c
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+/* <DESC>
+ * Get a single file from an FTP server.
+ * </DESC>
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream)
+{
+ struct FtpFile *out = (struct FtpFile *)stream;
+ if(!out->stream) {
+ /* open file for writing */
+ out->stream = fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, cannot open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile = {
+ "curl.tar.gz", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works!
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "ftp://ftp.example.com/curl/curl-7.9.2.tar.gz");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetinfo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetinfo.c
new file mode 100755
index 0000000..d95753d
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetinfo.c
@@ -0,0 +1,93 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include <stdio.h>
+#include <string.h>
+
+#include <curl/curl.h>
+
+/* <DESC>
+ * Checks a single file's size and mtime from an FTP server.
+ * </DESC>
+ */
+
+static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ (void)ptr;
+ (void)data;
+ /* we are not interested in the headers itself,
+ so we only return the size we would have saved ... */
+ return (size_t)(size * nmemb);
+}
+
+int main(void)
+{
+ char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
+ CURL *curl;
+ CURLcode res;
+ long filetime = -1;
+ curl_off_t filesize = 0;
+ const char *filename = strrchr(ftpurl, '/') + 1;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, ftpurl);
+ /* No download if the file */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+ /* Ask for filetime */
+ curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, throw_away);
+ curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
+ /* Switch on full protocol/debug output */
+ /* curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); */
+
+ res = curl_easy_perform(curl);
+
+ if(CURLE_OK == res) {
+ /* https://curl.se/libcurl/c/curl_easy_getinfo.html */
+ res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
+ if((CURLE_OK == res) && (filetime >= 0)) {
+ time_t file_time = (time_t)filetime;
+ printf("filetime %s: %s", filename, ctime(&file_time));
+ }
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+ &filesize);
+ if((CURLE_OK == res) && (filesize>0))
+ printf("filesize %s: %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+ filename, filesize);
+ }
+ else {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetresp.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetresp.c
new file mode 100755
index 0000000..1bee903
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpgetresp.c
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+/* <DESC>
+ * Similar to ftpget.c but also stores the received response-lines
+ * in a separate file using our own callback!
+ * </DESC>
+ */
+static size_t
+write_response(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ FILE *writehere = (FILE *)data;
+ return fwrite(ptr, size, nmemb, writehere);
+}
+
+#define FTPBODY "ftp-list"
+#define FTPHEADERS "ftp-responses"
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ FILE *ftpfile;
+ FILE *respfile;
+
+ /* local file name to store the file as */
+ ftpfile = fopen(FTPBODY, "wb"); /* b is binary, needed on win32 */
+
+ /* local file name to store the FTP server's response lines in */
+ respfile = fopen(FTPHEADERS, "wb"); /* b is binary, needed on win32 */
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Get a file listing from sunet */
+ curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.example.com/");
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
+ /* If you intend to use this on windows with a libcurl DLL, you must use
+ CURLOPT_WRITEFUNCTION as well */
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, respfile);
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ fclose(ftpfile); /* close the local file */
+ fclose(respfile); /* close the response file */
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpsget.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpsget.c
new file mode 100755
index 0000000..521ad5c
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpsget.c
@@ -0,0 +1,101 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+/* <DESC>
+ * Get a single file from an FTPS server.
+ * </DESC>
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out = (struct FtpFile *)stream;
+ if(!out->stream) {
+ /* open file for writing */
+ out->stream = fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, cannot open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile = {
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works! Note that we use an
+ * FTP:// URL with standard explicit FTPS. You can also do FTPS:// URLs if
+ * you want to do the rarer kind of transfers: implicit.
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "ftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+ /* We activate SSL and we require it for both control and data */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, CURLUSESSL_ALL);
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpupload.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpupload.c
new file mode 100755
index 0000000..046166a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpupload.c
@@ -0,0 +1,142 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+#include <stdio.h>
+#include <string.h>
+
+#include <curl/curl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+/* <DESC>
+ * Performs an FTP upload and renames the file just after a successful
+ * transfer.
+ * </DESC>
+ */
+
+#define LOCAL_FILE "/tmp/uploadthis.txt"
+#define UPLOAD_FILE_AS "while-uploading.txt"
+#define REMOTE_URL "ftp://example.com/" UPLOAD_FILE_AS
+#define RENAME_FILE_TO "renamed-and-fine.txt"
+
+/* NOTE: if you want this example to work on Windows with libcurl as a
+ DLL, you MUST also provide a read callback with CURLOPT_READFUNCTION.
+ Failing to do so will give you a crash since a DLL may not use the
+ variable's memory when passed in to it from an app like this. */
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+{
+ unsigned long nread;
+ /* in real-world cases, this would probably get this data differently
+ as this fread() stuff is exactly what the library already would do
+ by default internally */
+ size_t retcode = fread(ptr, size, nmemb, stream);
+
+ if(retcode > 0) {
+ nread = (unsigned long)retcode;
+ fprintf(stderr, "*** We read %lu bytes from file\n", nread);
+ }
+
+ return retcode;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ FILE *hd_src;
+ struct stat file_info;
+ unsigned long fsize;
+
+ struct curl_slist *headerlist = NULL;
+ static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
+ static const char buf_2 [] = "RNTO " RENAME_FILE_TO;
+
+ /* get the file size of the local file */
+ if(stat(LOCAL_FILE, &file_info)) {
+ printf("Couldn't open '%s': %s\n", LOCAL_FILE, strerror(errno));
+ return 1;
+ }
+ fsize = (unsigned long)file_info.st_size;
+
+ printf("Local file size: %lu bytes.\n", fsize);
+
+ /* get a FILE * of the same file */
+ hd_src = fopen(LOCAL_FILE, "rb");
+
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* build a list of commands to pass to libcurl */
+ headerlist = curl_slist_append(headerlist, buf_1);
+ headerlist = curl_slist_append(headerlist, buf_2);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* enable uploading */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* specify target */
+ curl_easy_setopt(curl, CURLOPT_URL, REMOTE_URL);
+
+ /* pass in that last of FTP commands to run after the transfer */
+ curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
+
+ /* now specify which file to upload */
+ curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
+
+ /* Set the size of the file to upload (optional). If you give a *_LARGE
+ option you MUST make sure that the type of the passed-in argument is a
+ curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
+ make sure that to pass in a type 'long' argument. */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)fsize);
+
+ /* Now run off and do what you have been told! */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* clean up the FTP commands list */
+ curl_slist_free_all(headerlist);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ fclose(hd_src); /* close the local file */
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadfrommem.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadfrommem.c
new file mode 100755
index 0000000..b32020e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadfrommem.c
@@ -0,0 +1,126 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * FTP upload a file from memory
+ * </DESC>
+ */
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+static const char data[]=
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. "
+ "Nam rhoncus odio id venenatis volutpat. Vestibulum dapibus "
+ "bibendum ullamcorper. Maecenas finibus elit augue, vel "
+ "condimentum odio maximus nec. In hac habitasse platea dictumst. "
+ "Vestibulum vel dolor et turpis rutrum finibus ac at nulla. "
+ "Vivamus nec neque ac elit blandit pretium vitae maximus ipsum. "
+ "Quisque sodales magna vel erat auctor, sed pellentesque nisi "
+ "rhoncus. Donec vehicula maximus pretium. Aliquam eu tincidunt "
+ "lorem.";
+
+struct WriteThis {
+ const char *readptr;
+ size_t sizeleft;
+};
+
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct WriteThis *upload = (struct WriteThis *)userp;
+ size_t max = size*nmemb;
+
+ if(max < 1)
+ return 0;
+
+ if(upload->sizeleft) {
+ size_t copylen = max;
+ if(copylen > upload->sizeleft)
+ copylen = upload->sizeleft;
+ memcpy(ptr, upload->readptr, copylen);
+ upload->readptr += copylen;
+ upload->sizeleft -= copylen;
+ return copylen;
+ }
+
+ return 0; /* no more data left to deliver */
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ struct WriteThis upload;
+
+ upload.readptr = data;
+ upload.sizeleft = strlen(data);
+
+ /* In windows, this will init the winsock stuff */
+ res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* First set the URL, the target file */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "ftp://example.com/path/to/upload/file");
+
+ /* User and password for the FTP login */
+ curl_easy_setopt(curl, CURLOPT_USERPWD, "login:secret");
+
+ /* Now specify we want to UPLOAD data */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* pointer to pass to our read function */
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload);
+
+ /* get verbose debug output please */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Set the expected upload size. */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)upload.sizeleft);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadresume.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadresume.c
new file mode 100755
index 0000000..5014e3f
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ftpuploadresume.c
@@ -0,0 +1,163 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Upload to FTP, resuming failed transfers.
+ * </DESC>
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* parse headers for Content-Length */
+static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb,
+ void *stream)
+{
+ int r;
+ long len = 0;
+
+ r = sscanf(ptr, "Content-Length: %ld\n", &len);
+ if(r)
+ *((long *) stream) = len;
+
+ return size * nmemb;
+}
+
+/* discard downloaded data */
+static size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ (void)ptr;
+ (void)stream;
+ return size * nmemb;
+}
+
+/* read data to upload */
+static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream)
+{
+ FILE *f = stream;
+ size_t n;
+
+ if(ferror(f))
+ return CURL_READFUNC_ABORT;
+
+ n = fread(ptr, size, nmemb, f) * size;
+
+ return n;
+}
+
+
+static int upload(CURL *curlhandle, const char *remotepath,
+ const char *localpath, long timeout, long tries)
+{
+ FILE *f;
+ long uploaded_len = 0;
+ CURLcode r = CURLE_GOT_NOTHING;
+ int c;
+
+ f = fopen(localpath, "rb");
+ if(!f) {
+ perror(NULL);
+ return 0;
+ }
+
+ curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
+
+ curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
+
+ if(timeout)
+ curl_easy_setopt(curlhandle, CURLOPT_SERVER_RESPONSE_TIMEOUT, timeout);
+
+ curl_easy_setopt(curlhandle, CURLOPT_HEADERFUNCTION, getcontentlengthfunc);
+ curl_easy_setopt(curlhandle, CURLOPT_HEADERDATA, &uploaded_len);
+
+ curl_easy_setopt(curlhandle, CURLOPT_WRITEFUNCTION, discardfunc);
+
+ curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
+ curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
+
+ /* disable passive mode */
+ curl_easy_setopt(curlhandle, CURLOPT_FTPPORT, "-");
+ curl_easy_setopt(curlhandle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
+
+ curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, 1L);
+
+ for(c = 0; (r != CURLE_OK) && (c < tries); c++) {
+ /* are we resuming? */
+ if(c) { /* yes */
+ /* determine the length of the file already written */
+
+ /*
+ * With NOBODY and NOHEADER, libcurl will issue a SIZE
+ * command, but the only way to retrieve the result is
+ * to parse the returned Content-Length header. Thus,
+ * getcontentlengthfunc(). We need discardfunc() above
+ * because HEADER will dump the headers to stdout
+ * without it.
+ */
+ curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 1L);
+ curl_easy_setopt(curlhandle, CURLOPT_HEADER, 1L);
+
+ r = curl_easy_perform(curlhandle);
+ if(r != CURLE_OK)
+ continue;
+
+ curl_easy_setopt(curlhandle, CURLOPT_NOBODY, 0L);
+ curl_easy_setopt(curlhandle, CURLOPT_HEADER, 0L);
+
+ fseek(f, uploaded_len, SEEK_SET);
+
+ curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
+ }
+ else { /* no */
+ curl_easy_setopt(curlhandle, CURLOPT_APPEND, 0L);
+ }
+
+ r = curl_easy_perform(curlhandle);
+ }
+
+ fclose(f);
+
+ if(r == CURLE_OK)
+ return 1;
+ else {
+ fprintf(stderr, "%s\n", curl_easy_strerror(r));
+ return 0;
+ }
+}
+
+int main(void)
+{
+ CURL *curlhandle = NULL;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curlhandle = curl_easy_init();
+
+ upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file",
+ 0, 3);
+
+ curl_easy_cleanup(curlhandle);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/getinfo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/getinfo.c
new file mode 100755
index 0000000..d63b030
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/getinfo.c
@@ -0,0 +1,54 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Use getinfo to get content-type after completed transfer.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+ res = curl_easy_perform(curl);
+
+ if(CURLE_OK == res) {
+ char *ct;
+ /* ask for the content-type */
+ res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
+
+ if((CURLE_OK == res) && ct)
+ printf("We received Content-Type: %s\n", ct);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/getinmemory.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/getinmemory.c
new file mode 100755
index 0000000..085ece7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/getinmemory.c
@@ -0,0 +1,118 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Shows how the write callback function can be used to download data into a
+ * chunk of memory instead of storing it in a file.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+static size_t
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
+
+ char *ptr = realloc(mem->memory, mem->size + realsize + 1);
+ if(!ptr) {
+ /* out of memory! */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+
+ mem->memory = ptr;
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
+ mem->size += realsize;
+ mem->memory[mem->size] = 0;
+
+ return realsize;
+}
+
+int main(void)
+{
+ CURL *curl_handle;
+ CURLcode res;
+
+ struct MemoryStruct chunk;
+
+ chunk.memory = malloc(1); /* will be grown as needed by the realloc above */
+ chunk.size = 0; /* no data at this point */
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* specify URL to get */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "https://www.example.com/");
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+
+ /* we pass our 'chunk' struct to the callback function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
+
+ /* some servers do not like requests that are made without a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+
+ /* get it! */
+ res = curl_easy_perform(curl_handle);
+
+ /* check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+
+ printf("%lu bytes retrieved\n", (unsigned long)chunk.size);
+ }
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ free(chunk.memory);
+
+ /* we are done with libcurl, so clean it up */
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/getredirect.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/getredirect.c
new file mode 100755
index 0000000..85ea382
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/getredirect.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show how to extract Location: header and URL to redirect to.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ char *location;
+ long response_code;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* example.com is redirected, figure out the redirection! */
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ else {
+ res = curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
+ if((res == CURLE_OK) &&
+ ((response_code / 100) != 3)) {
+ /* a redirect implies a 3xx response code */
+ fprintf(stderr, "Not a redirect.\n");
+ }
+ else {
+ res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &location);
+
+ if((res == CURLE_OK) && location) {
+ /* This is the new absolute URL that you could redirect to, even if
+ * the Location: response header may have been a relative URL. */
+ printf("Redirected to: %s\n", location);
+ }
+ }
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/getreferrer.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/getreferrer.c
new file mode 100755
index 0000000..d320c10
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/getreferrer.c
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show how to extract referrer header.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+
+ curl = curl_easy_init();
+ if(curl) {
+ CURLcode res;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ else {
+ char *hdr;
+ res = curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
+ if((res == CURLE_OK) && hdr)
+ printf("Referrer header: %s\n", hdr);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/ghiper.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/ghiper.c
new file mode 100755
index 0000000..e18ca6e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/ghiper.c
@@ -0,0 +1,438 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi socket API usage together with with glib2
+ * </DESC>
+ */
+/* Example application source code using the multi socket interface to
+ * download many files at once.
+ *
+ * Written by Jeff Pohlmeyer
+
+ Requires glib-2.x and a (POSIX?) system that has mkfifo().
+
+ This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
+ sample programs, adapted to use glib's g_io_channel in place of libevent.
+
+ When running, the program creates the named pipe "hiper.fifo"
+
+ Whenever there is input into the fifo, the program reads the input as a list
+ of URL's and creates some new easy handles to fetch each URL via the
+ curl_multi "hiper" API.
+
+
+ Thus, you can try a single URL:
+ % echo http://www.yahoo.com > hiper.fifo
+
+ Or a whole bunch of them:
+ % cat my-url-list > hiper.fifo
+
+ The fifo buffer is handled almost instantly, so you can even add more URL's
+ while the previous requests are still being downloaded.
+
+ This is purely a demo app, all retrieved data is simply discarded by the write
+ callback.
+
+*/
+
+#include <glib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <curl/curl.h>
+
+#define MSG_OUT g_print /* Change to "g_error" to write to stderr */
+#define SHOW_VERBOSE 0 /* Set to non-zero for libcurl messages */
+#define SHOW_PROGRESS 0 /* Set to non-zero to enable progress callback */
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo {
+ CURLM *multi;
+ guint timer_event;
+ int still_running;
+} GlobalInfo;
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo {
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+/* Information associated with a specific socket */
+typedef struct _SockInfo {
+ curl_socket_t sockfd;
+ CURL *easy;
+ int action;
+ long timeout;
+ GIOChannel *ch;
+ guint ev;
+ GlobalInfo *global;
+} SockInfo;
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code) {
+ const char *s;
+ switch(code) {
+ case CURLM_BAD_HANDLE: s = "CURLM_BAD_HANDLE"; break;
+ case CURLM_BAD_EASY_HANDLE: s = "CURLM_BAD_EASY_HANDLE"; break;
+ case CURLM_OUT_OF_MEMORY: s = "CURLM_OUT_OF_MEMORY"; break;
+ case CURLM_INTERNAL_ERROR: s = "CURLM_INTERNAL_ERROR"; break;
+ case CURLM_BAD_SOCKET: s = "CURLM_BAD_SOCKET"; break;
+ case CURLM_UNKNOWN_OPTION: s = "CURLM_UNKNOWN_OPTION"; break;
+ case CURLM_LAST: s = "CURLM_LAST"; break;
+ default: s = "CURLM_unknown";
+ }
+ MSG_OUT("ERROR: %s returns %s\n", where, s);
+ exit(code);
+ }
+}
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ MSG_OUT("REMAINING: %d\n", g->still_running);
+ while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+}
+
+/* Called by glib when our timeout expires */
+static gboolean timer_cb(gpointer data)
+{
+ GlobalInfo *g = (GlobalInfo *)data;
+ CURLMcode rc;
+
+ rc = curl_multi_socket_action(g->multi,
+ CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+ return FALSE;
+}
+
+/* Update the event timer after curl_multi library calls */
+static int update_timeout_cb(CURLM *multi, long timeout_ms, void *userp)
+{
+ struct timeval timeout;
+ GlobalInfo *g = (GlobalInfo *)userp;
+ timeout.tv_sec = timeout_ms/1000;
+ timeout.tv_usec = (timeout_ms%1000)*1000;
+
+ MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n",
+ timeout_ms, timeout.tv_sec, timeout.tv_usec);
+
+ /*
+ * if timeout_ms is -1, just delete the timer
+ *
+ * For other values of timeout_ms, this should set or *update* the timer to
+ * the new value
+ */
+ if(timeout_ms >= 0)
+ g->timer_event = g_timeout_add(timeout_ms, timer_cb, g);
+ return 0;
+}
+
+/* Called by glib when we get action on a multi socket */
+static gboolean event_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
+{
+ GlobalInfo *g = (GlobalInfo*) data;
+ CURLMcode rc;
+ int fd = g_io_channel_unix_get_fd(ch);
+
+ int action =
+ ((condition & G_IO_IN) ? CURL_CSELECT_IN : 0) |
+ ((condition & G_IO_OUT) ? CURL_CSELECT_OUT : 0);
+
+ rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+
+ check_multi_info(g);
+ if(g->still_running) {
+ return TRUE;
+ }
+ else {
+ MSG_OUT("last transfer done, kill timeout\n");
+ if(g->timer_event) {
+ g_source_remove(g->timer_event);
+ }
+ return FALSE;
+ }
+}
+
+/* Clean up the SockInfo structure */
+static void remsock(SockInfo *f)
+{
+ if(!f) {
+ return;
+ }
+ if(f->ev) {
+ g_source_remove(f->ev);
+ }
+ g_free(f);
+}
+
+/* Assign information to a SockInfo structure */
+static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
+ GlobalInfo *g)
+{
+ GIOCondition kind =
+ ((act & CURL_POLL_IN) ? G_IO_IN : 0) |
+ ((act & CURL_POLL_OUT) ? G_IO_OUT : 0);
+
+ f->sockfd = s;
+ f->action = act;
+ f->easy = e;
+ if(f->ev) {
+ g_source_remove(f->ev);
+ }
+ f->ev = g_io_add_watch(f->ch, kind, event_cb, g);
+}
+
+/* Initialize a new SockInfo structure */
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+ SockInfo *fdp = g_malloc0(sizeof(SockInfo));
+
+ fdp->global = g;
+ fdp->ch = g_io_channel_unix_new(s);
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ SockInfo *fdp = (SockInfo*) sockp;
+ static const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
+
+ MSG_OUT("socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+ if(what == CURL_POLL_REMOVE) {
+ MSG_OUT("\n");
+ remsock(fdp);
+ }
+ else {
+ if(!fdp) {
+ MSG_OUT("Adding data: %s%s\n",
+ (what & CURL_POLL_IN) ? "READ" : "",
+ (what & CURL_POLL_OUT) ? "WRITE" : "");
+ addsock(s, e, what, g);
+ }
+ else {
+ MSG_OUT(
+ "Changing action from %d to %d\n", fdp->action, what);
+ setsock(fdp, s, e, what, g);
+ }
+ }
+ return 0;
+}
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ size_t realsize = size * nmemb;
+ ConnInfo *conn = (ConnInfo*) data;
+ (void)ptr;
+ (void)conn;
+ return realsize;
+}
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+ MSG_OUT("Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
+ return 0;
+}
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = g_malloc0(sizeof(ConnInfo));
+ conn->error[0]='\0';
+ conn->easy = curl_easy_init();
+ if(!conn->easy) {
+ MSG_OUT("curl_easy_init() failed, exiting!\n");
+ exit(2);
+ }
+ conn->global = g;
+ conn->url = g_strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, (long)SHOW_VERBOSE);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, SHOW_PROGRESS?0L:1L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_CONNECTTIMEOUT, 30L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 30L);
+
+ MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+/* This gets called by glib whenever data is received from the fifo */
+static gboolean fifo_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
+{
+#define BUF_SIZE 1024
+ gsize len, tp;
+ gchar *buf, *tmp, *all = NULL;
+ GIOStatus rv;
+
+ do {
+ GError *err = NULL;
+ rv = g_io_channel_read_line(ch, &buf, &len, &tp, &err);
+ if(buf) {
+ if(tp) {
+ buf[tp]='\0';
+ }
+ new_conn(buf, (GlobalInfo*)data);
+ g_free(buf);
+ }
+ else {
+ buf = g_malloc(BUF_SIZE + 1);
+ while(TRUE) {
+ buf[BUF_SIZE]='\0';
+ g_io_channel_read_chars(ch, buf, BUF_SIZE, &len, &err);
+ if(len) {
+ buf[len]='\0';
+ if(all) {
+ tmp = all;
+ all = g_strdup_printf("%s%s", tmp, buf);
+ g_free(tmp);
+ }
+ else {
+ all = g_strdup(buf);
+ }
+ }
+ else {
+ break;
+ }
+ }
+ if(all) {
+ new_conn(all, (GlobalInfo*)data);
+ g_free(all);
+ }
+ g_free(buf);
+ }
+ if(err) {
+ g_error("fifo_cb: %s", err->message);
+ g_free(err);
+ break;
+ }
+ } while((len) && (rv == G_IO_STATUS_NORMAL));
+ return TRUE;
+}
+
+int init_fifo(void)
+{
+ struct stat st;
+ const char *fifo = "hiper.fifo";
+ int socket;
+
+ if(lstat (fifo, &st) == 0) {
+ if((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+
+ unlink(fifo);
+ if(mkfifo (fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+
+ socket = open(fifo, O_RDWR | O_NONBLOCK, 0);
+
+ if(socket == -1) {
+ perror("open");
+ exit(1);
+ }
+ MSG_OUT("Now, pipe some URL's into > %s\n", fifo);
+
+ return socket;
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo *g;
+ GMainLoop*gmain;
+ int fd;
+ GIOChannel* ch;
+ g = g_malloc0(sizeof(GlobalInfo));
+
+ fd = init_fifo();
+ ch = g_io_channel_unix_new(fd);
+ g_io_add_watch(ch, G_IO_IN, fifo_cb, g);
+ gmain = g_main_loop_new(NULL, FALSE);
+ g->multi = curl_multi_init();
+ curl_multi_setopt(g->multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g->multi, CURLMOPT_SOCKETDATA, g);
+ curl_multi_setopt(g->multi, CURLMOPT_TIMERFUNCTION, update_timeout_cb);
+ curl_multi_setopt(g->multi, CURLMOPT_TIMERDATA, g);
+
+ /* we do not call any curl_multi_socket*() function yet as we have no handles
+ added! */
+
+ g_main_loop_run(gmain);
+ curl_multi_cleanup(g->multi);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/headerapi.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/headerapi.c
new file mode 100755
index 0000000..58c8586
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/headerapi.c
@@ -0,0 +1,81 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Extract headers post transfer with the header API
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+static size_t write_cb(char *data, size_t n, size_t l, void *userp)
+{
+ /* take care of the data here, ignored in this example */
+ (void)data;
+ (void)userp;
+ return n*l;
+}
+
+int main(void)
+{
+ CURL *curl;
+
+ curl = curl_easy_init();
+ if(curl) {
+ CURLcode res;
+ struct curl_header *header;
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ /* this example just ignores the content */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ if(CURLHE_OK == curl_easy_header(curl, "Content-Type", 0, CURLH_HEADER,
+ -1, &header))
+ printf("Got content-type: %s\n", header->value);
+
+ printf("All server headers:\n");
+ {
+ struct curl_header *h;
+ struct curl_header *prev = NULL;
+ do {
+ h = curl_easy_nextheader(curl, CURLH_HEADER, -1, prev);
+ if(h)
+ printf(" %s: %s (%u)\n", h->name, h->value, (int)h->amount);
+ prev = h;
+ } while(h);
+
+ }
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/hiperfifo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/hiperfifo.c
new file mode 100755
index 0000000..ea0cdb1
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/hiperfifo.c
@@ -0,0 +1,464 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi socket API usage with libevent 2
+ * </DESC>
+ */
+/* Example application source code using the multi socket interface to
+ download many files at once.
+
+Written by Jeff Pohlmeyer
+
+Requires libevent version 2 and a (POSIX?) system that has mkfifo().
+
+This is an adaptation of libcurl's "hipev.c" and libevent's "event-test.c"
+sample programs.
+
+When running, the program creates the named pipe "hiper.fifo"
+
+Whenever there is input into the fifo, the program reads the input as a list
+of URL's and creates some new easy handles to fetch each URL via the
+curl_multi "hiper" API.
+
+
+Thus, you can try a single URL:
+ % echo http://www.yahoo.com > hiper.fifo
+
+Or a whole bunch of them:
+ % cat my-url-list > hiper.fifo
+
+The fifo buffer is handled almost instantly, so you can even add more URL's
+while the previous requests are still being downloaded.
+
+Note:
+ For the sake of simplicity, URL length is limited to 1023 char's !
+
+This is purely a demo app, all retrieved data is simply discarded by the write
+callback.
+
+*/
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/poll.h>
+#include <curl/curl.h>
+#include <event2/event.h>
+#include <event2/event_struct.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <sys/cdefs.h>
+
+#define MSG_OUT stdout /* Send info to stdout, change to stderr if you want */
+
+
+/* Global information, common to all connections */
+typedef struct _GlobalInfo
+{
+ struct event_base *evbase;
+ struct event fifo_event;
+ struct event timer_event;
+ CURLM *multi;
+ int still_running;
+ FILE *input;
+ int stopped;
+} GlobalInfo;
+
+
+/* Information associated with a specific easy handle */
+typedef struct _ConnInfo
+{
+ CURL *easy;
+ char *url;
+ GlobalInfo *global;
+ char error[CURL_ERROR_SIZE];
+} ConnInfo;
+
+
+/* Information associated with a specific socket */
+typedef struct _SockInfo
+{
+ curl_socket_t sockfd;
+ CURL *easy;
+ int action;
+ long timeout;
+ struct event ev;
+ GlobalInfo *global;
+} SockInfo;
+
+#define mycase(code) \
+ case code: s = __STRING(code)
+
+/* Die if we get a bad CURLMcode somewhere */
+static void mcode_or_die(const char *where, CURLMcode code)
+{
+ if(CURLM_OK != code) {
+ const char *s;
+ switch(code) {
+ mycase(CURLM_BAD_HANDLE); break;
+ mycase(CURLM_BAD_EASY_HANDLE); break;
+ mycase(CURLM_OUT_OF_MEMORY); break;
+ mycase(CURLM_INTERNAL_ERROR); break;
+ mycase(CURLM_UNKNOWN_OPTION); break;
+ mycase(CURLM_LAST); break;
+ default: s = "CURLM_unknown"; break;
+ mycase(CURLM_BAD_SOCKET);
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ /* ignore this error */
+ return;
+ }
+ fprintf(MSG_OUT, "ERROR: %s returns %s\n", where, s);
+ exit(code);
+ }
+}
+
+
+/* Update the event timer after curl_multi library calls */
+static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
+{
+ struct timeval timeout;
+ (void)multi;
+
+ timeout.tv_sec = timeout_ms/1000;
+ timeout.tv_usec = (timeout_ms%1000)*1000;
+ fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
+
+ /*
+ * if timeout_ms is -1, just delete the timer
+ *
+ * For all other values of timeout_ms, this should set or *update* the timer
+ * to the new value
+ */
+ if(timeout_ms == -1)
+ evtimer_del(&g->timer_event);
+ else /* includes timeout zero */
+ evtimer_add(&g->timer_event, &timeout);
+ return 0;
+}
+
+
+/* Check for completed transfers, and remove their easy handles */
+static void check_multi_info(GlobalInfo *g)
+{
+ char *eff_url;
+ CURLMsg *msg;
+ int msgs_left;
+ ConnInfo *conn;
+ CURL *easy;
+ CURLcode res;
+
+ fprintf(MSG_OUT, "REMAINING: %d\n", g->still_running);
+ while((msg = curl_multi_info_read(g->multi, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ easy = msg->easy_handle;
+ res = msg->data.result;
+ curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
+ curl_easy_getinfo(easy, CURLINFO_EFFECTIVE_URL, &eff_url);
+ fprintf(MSG_OUT, "DONE: %s => (%d) %s\n", eff_url, res, conn->error);
+ curl_multi_remove_handle(g->multi, easy);
+ free(conn->url);
+ curl_easy_cleanup(easy);
+ free(conn);
+ }
+ }
+ if(g->still_running == 0 && g->stopped)
+ event_base_loopbreak(g->evbase);
+}
+
+
+
+/* Called by libevent when we get action on a multi socket */
+static void event_cb(int fd, short kind, void *userp)
+{
+ GlobalInfo *g = (GlobalInfo*) userp;
+ CURLMcode rc;
+
+ int action =
+ ((kind & EV_READ) ? CURL_CSELECT_IN : 0) |
+ ((kind & EV_WRITE) ? CURL_CSELECT_OUT : 0);
+
+ rc = curl_multi_socket_action(g->multi, fd, action, &g->still_running);
+ mcode_or_die("event_cb: curl_multi_socket_action", rc);
+
+ check_multi_info(g);
+ if(g->still_running <= 0) {
+ fprintf(MSG_OUT, "last transfer done, kill timeout\n");
+ if(evtimer_pending(&g->timer_event, NULL)) {
+ evtimer_del(&g->timer_event);
+ }
+ }
+}
+
+
+
+/* Called by libevent when our timeout expires */
+static void timer_cb(int fd, short kind, void *userp)
+{
+ GlobalInfo *g = (GlobalInfo *)userp;
+ CURLMcode rc;
+ (void)fd;
+ (void)kind;
+
+ rc = curl_multi_socket_action(g->multi,
+ CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+ mcode_or_die("timer_cb: curl_multi_socket_action", rc);
+ check_multi_info(g);
+}
+
+
+
+/* Clean up the SockInfo structure */
+static void remsock(SockInfo *f)
+{
+ if(f) {
+ if(event_initialized(&f->ev)) {
+ event_del(&f->ev);
+ }
+ free(f);
+ }
+}
+
+
+
+/* Assign information to a SockInfo structure */
+static void setsock(SockInfo *f, curl_socket_t s, CURL *e, int act,
+ GlobalInfo *g)
+{
+ int kind =
+ ((act & CURL_POLL_IN) ? EV_READ : 0) |
+ ((act & CURL_POLL_OUT) ? EV_WRITE : 0) | EV_PERSIST;
+
+ f->sockfd = s;
+ f->action = act;
+ f->easy = e;
+ if(event_initialized(&f->ev)) {
+ event_del(&f->ev);
+ }
+ event_assign(&f->ev, g->evbase, f->sockfd, kind, event_cb, g);
+ event_add(&f->ev, NULL);
+}
+
+
+
+/* Initialize a new SockInfo structure */
+static void addsock(curl_socket_t s, CURL *easy, int action, GlobalInfo *g)
+{
+ SockInfo *fdp = calloc(1, sizeof(SockInfo));
+
+ fdp->global = g;
+ setsock(fdp, s, easy, action, g);
+ curl_multi_assign(g->multi, s, fdp);
+}
+
+/* CURLMOPT_SOCKETFUNCTION */
+static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
+{
+ GlobalInfo *g = (GlobalInfo*) cbp;
+ SockInfo *fdp = (SockInfo*) sockp;
+ const char *whatstr[]={ "none", "IN", "OUT", "INOUT", "REMOVE" };
+
+ fprintf(MSG_OUT,
+ "socket callback: s=%d e=%p what=%s ", s, e, whatstr[what]);
+ if(what == CURL_POLL_REMOVE) {
+ fprintf(MSG_OUT, "\n");
+ remsock(fdp);
+ }
+ else {
+ if(!fdp) {
+ fprintf(MSG_OUT, "Adding data: %s\n", whatstr[what]);
+ addsock(s, e, what, g);
+ }
+ else {
+ fprintf(MSG_OUT,
+ "Changing action from %s to %s\n",
+ whatstr[fdp->action], whatstr[what]);
+ setsock(fdp, s, e, what, g);
+ }
+ }
+ return 0;
+}
+
+
+
+/* CURLOPT_WRITEFUNCTION */
+static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
+{
+ (void)ptr;
+ (void)data;
+ return size * nmemb;
+}
+
+
+/* CURLOPT_PROGRESSFUNCTION */
+static int prog_cb(void *p, double dltotal, double dlnow, double ult,
+ double uln)
+{
+ ConnInfo *conn = (ConnInfo *)p;
+ (void)ult;
+ (void)uln;
+
+ fprintf(MSG_OUT, "Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
+ return 0;
+}
+
+
+/* Create a new easy handle, and add it to the global curl_multi */
+static void new_conn(char *url, GlobalInfo *g)
+{
+ ConnInfo *conn;
+ CURLMcode rc;
+
+ conn = calloc(1, sizeof(ConnInfo));
+ conn->error[0]='\0';
+
+ conn->easy = curl_easy_init();
+ if(!conn->easy) {
+ fprintf(MSG_OUT, "curl_easy_init() failed, exiting!\n");
+ exit(2);
+ }
+ conn->global = g;
+ conn->url = strdup(url);
+ curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
+ curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
+ curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
+ curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
+ fprintf(MSG_OUT,
+ "Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
+ rc = curl_multi_add_handle(g->multi, conn->easy);
+ mcode_or_die("new_conn: curl_multi_add_handle", rc);
+
+ /* note that the add_handle() will set a time-out to trigger very soon so
+ that the necessary socket_action() call will be called by this app */
+}
+
+/* This gets called whenever data is received from the fifo */
+static void fifo_cb(int fd, short event, void *arg)
+{
+ char s[1024];
+ long int rv = 0;
+ int n = 0;
+ GlobalInfo *g = (GlobalInfo *)arg;
+ (void)fd;
+ (void)event;
+
+ do {
+ s[0]='\0';
+ rv = fscanf(g->input, "%1023s%n", s, &n);
+ s[n]='\0';
+ if(n && s[0]) {
+ if(!strcmp(s, "stop")) {
+ g->stopped = 1;
+ if(g->still_running == 0)
+ event_base_loopbreak(g->evbase);
+ }
+ else
+ new_conn(s, arg); /* if we read a URL, go get it! */
+ }
+ else
+ break;
+ } while(rv != EOF);
+}
+
+/* Create a named pipe and tell libevent to monitor it */
+static const char *fifo = "hiper.fifo";
+static int init_fifo(GlobalInfo *g)
+{
+ struct stat st;
+ curl_socket_t sockfd;
+
+ fprintf(MSG_OUT, "Creating named pipe \"%s\"\n", fifo);
+ if(lstat (fifo, &st) == 0) {
+ if((st.st_mode & S_IFMT) == S_IFREG) {
+ errno = EEXIST;
+ perror("lstat");
+ exit(1);
+ }
+ }
+ unlink(fifo);
+ if(mkfifo (fifo, 0600) == -1) {
+ perror("mkfifo");
+ exit(1);
+ }
+ sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0);
+ if(sockfd == -1) {
+ perror("open");
+ exit(1);
+ }
+ g->input = fdopen(sockfd, "r");
+
+ fprintf(MSG_OUT, "Now, pipe some URL's into > %s\n", fifo);
+ event_assign(&g->fifo_event, g->evbase, sockfd, EV_READ|EV_PERSIST,
+ fifo_cb, g);
+ event_add(&g->fifo_event, NULL);
+ return (0);
+}
+
+static void clean_fifo(GlobalInfo *g)
+{
+ event_del(&g->fifo_event);
+ fclose(g->input);
+ unlink(fifo);
+}
+
+int main(int argc, char **argv)
+{
+ GlobalInfo g;
+ (void)argc;
+ (void)argv;
+
+ memset(&g, 0, sizeof(GlobalInfo));
+ g.evbase = event_base_new();
+ init_fifo(&g);
+ g.multi = curl_multi_init();
+ evtimer_assign(&g.timer_event, g.evbase, timer_cb, &g);
+
+ /* setup the generic multi interface options we want */
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_SOCKETDATA, &g);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERFUNCTION, multi_timer_cb);
+ curl_multi_setopt(g.multi, CURLMOPT_TIMERDATA, &g);
+
+ /* we do not call any curl_multi_socket*() function yet as we have no handles
+ added! */
+
+ event_base_dispatch(g.evbase);
+
+ /* this, of course, will not get called since only way to stop this program
+ is via ctrl-C, but it is here to show how cleanup /would/ be done. */
+ clean_fifo(&g);
+ event_del(&g.timer_event);
+ event_base_free(g.evbase);
+ curl_multi_cleanup(g.multi);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/href_extractor.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/href_extractor.c
new file mode 100755
index 0000000..b73157b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/href_extractor.c
@@ -0,0 +1,88 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2012 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * Uses the "Streaming HTML parser" to extract the href pieces in a streaming
+ * manner from a downloaded HTML.
+ * </DESC>
+ */
+/*
+ * The HTML parser is found at https://github.com/arjunc77/htmlstreamparser
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+#include <htmlstreamparser.h>
+
+
+static size_t write_callback(void *buffer, size_t size, size_t nmemb,
+ void *hsp)
+{
+ size_t realsize = size * nmemb, p;
+ for(p = 0; p < realsize; p++) {
+ html_parser_char_parse(hsp, ((char *)buffer)[p]);
+ if(html_parser_cmp_tag(hsp, "a", 1))
+ if(html_parser_cmp_attr(hsp, "href", 4))
+ if(html_parser_is_in(hsp, HTML_VALUE_ENDED)) {
+ html_parser_val(hsp)[html_parser_val_length(hsp)] = '\0';
+ printf("%s\n", html_parser_val(hsp));
+ }
+ }
+ return realsize;
+}
+
+int main(int argc, char *argv[])
+{
+ char tag[1], attr[4], val[128];
+ CURL *curl;
+ HTMLSTREAMPARSER *hsp;
+
+ if(argc != 2) {
+ printf("Usage: %s URL\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ curl = curl_easy_init();
+
+ hsp = html_parser_init();
+
+ html_parser_set_tag_to_lower(hsp, 1);
+ html_parser_set_attr_to_lower(hsp, 1);
+ html_parser_set_tag_buffer(hsp, tag, sizeof(tag));
+ html_parser_set_attr_buffer(hsp, attr, sizeof(attr));
+ html_parser_set_val_buffer(hsp, val, sizeof(val)-1);
+
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, hsp);
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+
+ html_parser_cleanup(hsp);
+
+ return EXIT_SUCCESS;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltidy.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltidy.c
new file mode 100755
index 0000000..97e3eac
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltidy.c
@@ -0,0 +1,130 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Download a document and use libtidy to parse the HTML.
+ * </DESC>
+ */
+/*
+ * LibTidy => https://www.html-tidy.org/
+ */
+
+#include <stdio.h>
+#include <tidy/tidy.h>
+#include <tidy/tidybuffio.h>
+#include <curl/curl.h>
+
+/* curl write callback, to fill tidy's input buffer... */
+uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
+{
+ uint r;
+ r = size * nmemb;
+ tidyBufAppend(out, in, r);
+ return r;
+}
+
+/* Traverse the document tree */
+void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
+{
+ TidyNode child;
+ for(child = tidyGetChild(tnod); child; child = tidyGetNext(child) ) {
+ ctmbstr name = tidyNodeGetName(child);
+ if(name) {
+ /* if it has a name, then it's an HTML tag ... */
+ TidyAttr attr;
+ printf("%*.*s%s ", indent, indent, "<", name);
+ /* walk the attribute list */
+ for(attr = tidyAttrFirst(child); attr; attr = tidyAttrNext(attr) ) {
+ printf("%s", tidyAttrName(attr));
+ tidyAttrValue(attr)?printf("=\"%s\" ",
+ tidyAttrValue(attr)):printf(" ");
+ }
+ printf(">\n");
+ }
+ else {
+ /* if it does not have a name, then it's probably text, cdata, etc... */
+ TidyBuffer buf;
+ tidyBufInit(&buf);
+ tidyNodeGetText(doc, child, &buf);
+ printf("%*.*s\n", indent, indent, buf.bp?(char *)buf.bp:"");
+ tidyBufFree(&buf);
+ }
+ dumpNode(doc, child, indent + 4); /* recursive */
+ }
+}
+
+
+int main(int argc, char **argv)
+{
+ if(argc == 2) {
+ CURL *curl;
+ char curl_errbuf[CURL_ERROR_SIZE];
+ TidyDoc tdoc;
+ TidyBuffer docbuf = {0};
+ TidyBuffer tidy_errbuf = {0};
+ int err;
+
+ curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
+ curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_errbuf);
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
+
+ tdoc = tidyCreate();
+ tidyOptSetBool(tdoc, TidyForceOutput, yes); /* try harder */
+ tidyOptSetInt(tdoc, TidyWrapLen, 4096);
+ tidySetErrorBuffer(tdoc, &tidy_errbuf);
+ tidyBufInit(&docbuf);
+
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &docbuf);
+ err = curl_easy_perform(curl);
+ if(!err) {
+ err = tidyParseBuffer(tdoc, &docbuf); /* parse the input */
+ if(err >= 0) {
+ err = tidyCleanAndRepair(tdoc); /* fix any problems */
+ if(err >= 0) {
+ err = tidyRunDiagnostics(tdoc); /* load tidy error buffer */
+ if(err >= 0) {
+ dumpNode(tdoc, tidyGetRoot(tdoc), 0); /* walk the tree */
+ fprintf(stderr, "%s\n", tidy_errbuf.bp); /* show errors */
+ }
+ }
+ }
+ }
+ else
+ fprintf(stderr, "%s\n", curl_errbuf);
+
+ /* clean-up */
+ curl_easy_cleanup(curl);
+ tidyBufFree(&docbuf);
+ tidyBufFree(&tidy_errbuf);
+ tidyRelease(tdoc);
+ return err;
+
+ }
+ else
+ printf("usage: %s <url>\n", argv[0]);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltitle.cpp b/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltitle.cpp
new file mode 100755
index 0000000..b5c78f7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/htmltitle.cpp
@@ -0,0 +1,296 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Get a web page, extract the title with libxml.
+ * </DESC>
+
+ Written by Lars Nilsson
+
+ GNU C++ compile command line suggestion (edit paths accordingly):
+
+ g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
+ -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
+*/
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <string>
+#include <curl/curl.h>
+#include <libxml/HTMLparser.h>
+
+//
+// Case-insensitive string comparison
+//
+
+#ifdef _MSC_VER
+#define COMPARE(a, b) (!_stricmp((a), (b)))
+#else
+#define COMPARE(a, b) (!strcasecmp((a), (b)))
+#endif
+
+//
+// libxml callback context structure
+//
+
+struct Context
+{
+ Context(): addTitle(false) { }
+
+ bool addTitle;
+ std::string title;
+};
+
+//
+// libcurl variables for error strings and returned data
+
+static char errorBuffer[CURL_ERROR_SIZE];
+static std::string buffer;
+
+//
+// libcurl write callback function
+//
+
+static int writer(char *data, size_t size, size_t nmemb,
+ std::string *writerData)
+{
+ if(writerData == NULL)
+ return 0;
+
+ writerData->append(data, size*nmemb);
+
+ return size * nmemb;
+}
+
+//
+// libcurl connection initialization
+//
+
+static bool init(CURL *&conn, char *url)
+{
+ CURLcode code;
+
+ conn = curl_easy_init();
+
+ if(conn == NULL) {
+ fprintf(stderr, "Failed to create CURL connection\n");
+ exit(EXIT_FAILURE);
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_ERRORBUFFER, errorBuffer);
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to set error buffer [%d]\n", code);
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_URL, url);
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to set URL [%s]\n", errorBuffer);
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_FOLLOWLOCATION, 1L);
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to set redirect option [%s]\n", errorBuffer);
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_WRITEFUNCTION, writer);
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to set writer [%s]\n", errorBuffer);
+ return false;
+ }
+
+ code = curl_easy_setopt(conn, CURLOPT_WRITEDATA, &buffer);
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to set write data [%s]\n", errorBuffer);
+ return false;
+ }
+
+ return true;
+}
+
+//
+// libxml start element callback function
+//
+
+static void StartElement(void *voidContext,
+ const xmlChar *name,
+ const xmlChar **attributes)
+{
+ Context *context = static_cast<Context *>(voidContext);
+
+ if(COMPARE(reinterpret_cast<char *>(name), "TITLE")) {
+ context->title = "";
+ context->addTitle = true;
+ }
+ (void) attributes;
+}
+
+//
+// libxml end element callback function
+//
+
+static void EndElement(void *voidContext,
+ const xmlChar *name)
+{
+ Context *context = static_cast<Context *>(voidContext);
+
+ if(COMPARE(reinterpret_cast<char *>(name), "TITLE"))
+ context->addTitle = false;
+}
+
+//
+// Text handling helper function
+//
+
+static void handleCharacters(Context *context,
+ const xmlChar *chars,
+ int length)
+{
+ if(context->addTitle)
+ context->title.append(reinterpret_cast<char *>(chars), length);
+}
+
+//
+// libxml PCDATA callback function
+//
+
+static void Characters(void *voidContext,
+ const xmlChar *chars,
+ int length)
+{
+ Context *context = static_cast<Context *>(voidContext);
+
+ handleCharacters(context, chars, length);
+}
+
+//
+// libxml CDATA callback function
+//
+
+static void cdata(void *voidContext,
+ const xmlChar *chars,
+ int length)
+{
+ Context *context = static_cast<Context *>(voidContext);
+
+ handleCharacters(context, chars, length);
+}
+
+//
+// libxml SAX callback structure
+//
+
+static htmlSAXHandler saxHandler =
+{
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ StartElement,
+ EndElement,
+ NULL,
+ Characters,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ cdata,
+ NULL
+};
+
+//
+// Parse given (assumed to be) HTML text and return the title
+//
+
+static void parseHtml(const std::string &html,
+ std::string &title)
+{
+ htmlParserCtxtPtr ctxt;
+ Context context;
+
+ ctxt = htmlCreatePushParserCtxt(&saxHandler, &context, "", 0, "",
+ XML_CHAR_ENCODING_NONE);
+
+ htmlParseChunk(ctxt, html.c_str(), html.size(), 0);
+ htmlParseChunk(ctxt, "", 0, 1);
+
+ htmlFreeParserCtxt(ctxt);
+
+ title = context.title;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *conn = NULL;
+ CURLcode code;
+ std::string title;
+
+ // Ensure one argument is given
+
+ if(argc != 2) {
+ fprintf(stderr, "Usage: %s <url>\n", argv[0]);
+ exit(EXIT_FAILURE);
+ }
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ // Initialize CURL connection
+
+ if(!init(conn, argv[1])) {
+ fprintf(stderr, "Connection initializion failed\n");
+ exit(EXIT_FAILURE);
+ }
+
+ // Retrieve content for the URL
+
+ code = curl_easy_perform(conn);
+ curl_easy_cleanup(conn);
+
+ if(code != CURLE_OK) {
+ fprintf(stderr, "Failed to get '%s' [%s]\n", argv[1], errorBuffer);
+ exit(EXIT_FAILURE);
+ }
+
+ // Parse the (assumed) HTML code
+ parseHtml(buffer, title);
+
+ // Display the extracted title
+ printf("Title: %s\n", title.c_str());
+
+ return EXIT_SUCCESS;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http-post.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http-post.c
new file mode 100755
index 0000000..df0e5a7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http-post.c
@@ -0,0 +1,61 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * simple HTTP POST using the easy interface
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* First set the URL that is about to receive our POST. This URL can
+ just as well be a https:// URL if that is what should receive the
+ data. */
+ curl_easy_setopt(curl, CURLOPT_URL, "http://postit.example.com/moo.cgi");
+ /* Now specify the POST data */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl");
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-download.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-download.c
new file mode 100755
index 0000000..e88f578
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-download.c
@@ -0,0 +1,236 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Multiplexed HTTP/2 downloads over a single connection
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+#include <curl/mprintf.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we do not enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+struct transfer {
+ CURL *easy;
+ unsigned int num;
+ FILE *out;
+};
+
+#define NUM_HANDLES 1000
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
+ num, text, (unsigned long)size, (unsigned long)size);
+
+ for(i = 0; i<size; i += width) {
+
+ fprintf(stderr, "%4.4lx: ", (unsigned long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i + c < size)
+ fprintf(stderr, "%02x ", ptr[i + c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i + c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+ struct transfer *t = (struct transfer *)userp;
+ unsigned int num = t->num;
+ (void)handle; /* prevent compiler warning */
+
+ switch(type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== %u Info: %s", num, data);
+ /* FALLTHROUGH */
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+static void setup(struct transfer *t, int num)
+{
+ char filename[128];
+ CURL *hnd;
+
+ hnd = t->easy = curl_easy_init();
+
+ curl_msnprintf(filename, 128, "dl-%d", num);
+
+ t->out = fopen(filename, "wb");
+ if(!t->out) {
+ fprintf(stderr, "error: could not open file %s for writing: %s\n",
+ filename, strerror(errno));
+ exit(1);
+ }
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, t->out);
+
+ /* set the same URL */
+ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
+
+ /* please be verbose */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, t);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+}
+
+/*
+ * Download many transfers over HTTP/2, using the same connection!
+ */
+int main(int argc, char **argv)
+{
+ struct transfer trans[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running = 0; /* keep number of running handles */
+ int num_transfers;
+ if(argc > 1) {
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+ if((num_transfers < 1) || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+ }
+ else
+ num_transfers = 3; /* suitable default */
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i = 0; i < num_transfers; i++) {
+ setup(&trans[i], i);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, trans[i].easy);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+ } while(still_running);
+
+ for(i = 0; i < num_transfers; i++) {
+ curl_multi_remove_handle(multi_handle, trans[i].easy);
+ curl_easy_cleanup(trans[i].easy);
+ }
+
+ curl_multi_cleanup(multi_handle);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-pushinmemory.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-pushinmemory.c
new file mode 100755
index 0000000..78273c9
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-pushinmemory.c
@@ -0,0 +1,190 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP/2 server push. Receive all data in memory.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+struct Memory {
+ char *memory;
+ size_t size;
+};
+
+static size_t
+write_cb(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ struct Memory *mem = (struct Memory *)userp;
+ char *ptr = realloc(mem->memory, mem->size + realsize + 1);
+ if(!ptr) {
+ /* out of memory! */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+
+ mem->memory = ptr;
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
+ mem->size += realsize;
+ mem->memory[mem->size] = 0;
+
+ return realsize;
+}
+
+#define MAX_FILES 10
+static struct Memory files[MAX_FILES];
+static int pushindex = 1;
+
+static void init_memory(struct Memory *chunk)
+{
+ chunk->memory = malloc(1); /* grown as needed with realloc */
+ chunk->size = 0; /* no data at this point */
+}
+
+static void setup(CURL *hnd)
+{
+ /* set the same URL */
+ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+ /* write data to a struct */
+ curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, write_cb);
+ init_memory(&files[0]);
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, &files[0]);
+
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+}
+
+/* called when there's an incoming push */
+static int server_push_callback(CURL *parent,
+ CURL *easy,
+ size_t num_headers,
+ struct curl_pushheaders *headers,
+ void *userp)
+{
+ char *headp;
+ int *transfers = (int *)userp;
+ (void)parent; /* we have no use for this */
+ (void)num_headers; /* unused */
+
+ if(pushindex == MAX_FILES)
+ /* cannot fit anymore */
+ return CURL_PUSH_DENY;
+
+ /* write to this buffer */
+ init_memory(&files[pushindex]);
+ curl_easy_setopt(easy, CURLOPT_WRITEDATA, &files[pushindex]);
+ pushindex++;
+
+ headp = curl_pushheader_byname(headers, ":path");
+ if(headp)
+ fprintf(stderr, "* Pushed :path '%s'\n", headp /* skip :path + colon */);
+
+ (*transfers)++; /* one more */
+ return CURL_PUSH_OK;
+}
+
+
+/*
+ * Download a file over HTTP/2, take care of server push.
+ */
+int main(void)
+{
+ CURL *easy;
+ CURLM *multi;
+ int still_running; /* keep number of running handles */
+ int transfers = 1; /* we start with one */
+ int i;
+ struct CURLMsg *m;
+
+ /* init a multi stack */
+ multi = curl_multi_init();
+
+ easy = curl_easy_init();
+
+ /* set options */
+ setup(easy);
+
+ /* add the easy transfer */
+ curl_multi_add_handle(multi, easy);
+
+ curl_multi_setopt(multi, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+ curl_multi_setopt(multi, CURLMOPT_PUSHFUNCTION, server_push_callback);
+ curl_multi_setopt(multi, CURLMOPT_PUSHDATA, &transfers);
+
+ while(transfers) {
+ int rc;
+ CURLMcode mcode = curl_multi_perform(multi, &still_running);
+ if(mcode)
+ break;
+
+ mcode = curl_multi_wait(multi, NULL, 0, 1000, &rc);
+ if(mcode)
+ break;
+
+
+ /*
+ * When doing server push, libcurl itself created and added one or more
+ * easy handles but *we* need to clean them up when they are done.
+ */
+ do {
+ int msgq = 0;
+ m = curl_multi_info_read(multi, &msgq);
+ if(m && (m->msg == CURLMSG_DONE)) {
+ CURL *e = m->easy_handle;
+ transfers--;
+ curl_multi_remove_handle(multi, e);
+ curl_easy_cleanup(e);
+ }
+ } while(m);
+
+ }
+
+
+ curl_multi_cleanup(multi);
+
+ /* 'pushindex' is now the number of received transfers */
+ for(i = 0; i < pushindex; i++) {
+ /* do something fun with the data, and then free it when done */
+ free(files[i].memory);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-serverpush.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-serverpush.c
new file mode 100755
index 0000000..f279355
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-serverpush.c
@@ -0,0 +1,273 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP/2 server push
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+#error "too old libcurl, cannot do HTTP/2 server push!"
+#endif
+
+static
+void dump(const char *text, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%s, %lu bytes (0x%lx)\n",
+ text, (unsigned long)size, (unsigned long)size);
+
+ for(i = 0; i<size; i += width) {
+
+ fprintf(stderr, "%4.4lx: ", (unsigned long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i + c < size)
+ fprintf(stderr, "%02x ", ptr[i + c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i + c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+ (void)handle; /* prevent compiler warning */
+ (void)userp;
+ switch(type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== Info: %s", data);
+ /* FALLTHROUGH */
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+#define OUTPUTFILE "dl"
+
+static int setup(CURL *hnd)
+{
+ FILE *out = fopen(OUTPUTFILE, "wb");
+ if(!out)
+ /* failed */
+ return 1;
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* set the same URL */
+ curl_easy_setopt(hnd, CURLOPT_URL, "https://localhost:8443/index.html");
+
+ /* please be verbose */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+ return 0; /* all is good */
+}
+
+/* called when there's an incoming push */
+static int server_push_callback(CURL *parent,
+ CURL *easy,
+ size_t num_headers,
+ struct curl_pushheaders *headers,
+ void *userp)
+{
+ char *headp;
+ size_t i;
+ int *transfers = (int *)userp;
+ char filename[128];
+ FILE *out;
+ static unsigned int count = 0;
+
+ (void)parent; /* we have no use for this */
+
+ snprintf(filename, 128, "push%u", count++);
+
+ /* here's a new stream, save it in a new file for each new push */
+ out = fopen(filename, "wb");
+ if(!out) {
+ /* if we cannot save it, deny it */
+ fprintf(stderr, "Failed to create output file for push\n");
+ return CURL_PUSH_DENY;
+ }
+
+ /* write to this file */
+ curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
+
+ fprintf(stderr, "**** push callback approves stream %u, got %lu headers!\n",
+ count, (unsigned long)num_headers);
+
+ for(i = 0; i<num_headers; i++) {
+ headp = curl_pushheader_bynum(headers, i);
+ fprintf(stderr, "**** header %lu: %s\n", (unsigned long)i, headp);
+ }
+
+ headp = curl_pushheader_byname(headers, ":path");
+ if(headp) {
+ fprintf(stderr, "**** The PATH is %s\n", headp /* skip :path + colon */);
+ }
+
+ (*transfers)++; /* one more */
+ return CURL_PUSH_OK;
+}
+
+
+/*
+ * Download a file over HTTP/2, take care of server push.
+ */
+int main(void)
+{
+ CURL *easy;
+ CURLM *multi_handle;
+ int transfers = 1; /* we start with one */
+ struct CURLMsg *m;
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ easy = curl_easy_init();
+
+ /* set options */
+ if(setup(easy)) {
+ fprintf(stderr, "failed\n");
+ return 1;
+ }
+
+ /* add the easy transfer */
+ curl_multi_add_handle(multi_handle, easy);
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+ curl_multi_setopt(multi_handle, CURLMOPT_PUSHFUNCTION, server_push_callback);
+ curl_multi_setopt(multi_handle, CURLMOPT_PUSHDATA, &transfers);
+
+ do {
+ int still_running; /* keep number of running handles */
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ /*
+ * A little caution when doing server push is that libcurl itself has
+ * created and added one or more easy handles but we need to clean them up
+ * when we are done.
+ */
+
+ do {
+ int msgq = 0;
+ m = curl_multi_info_read(multi_handle, &msgq);
+ if(m && (m->msg == CURLMSG_DONE)) {
+ CURL *e = m->easy_handle;
+ transfers--;
+ curl_multi_remove_handle(multi_handle, e);
+ curl_easy_cleanup(e);
+ }
+ } while(m);
+
+ } while(transfers); /* as long as we have transfers going */
+
+ curl_multi_cleanup(multi_handle);
+
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-upload.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-upload.c
new file mode 100755
index 0000000..d0d5469
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http2-upload.c
@@ -0,0 +1,304 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Multiplexed HTTP/2 uploads over a single connection
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+#include <curl/mprintf.h>
+
+#ifndef CURLPIPE_MULTIPLEX
+/* This little trick will just make sure that we do not enable pipelining for
+ libcurls old enough to not have this symbol. It is _not_ defined to zero in
+ a recent libcurl header. */
+#define CURLPIPE_MULTIPLEX 0
+#endif
+
+#define NUM_HANDLES 1000
+
+struct input {
+ FILE *in;
+ size_t bytes_read; /* count up */
+ CURL *hnd;
+ int num;
+};
+
+static
+void dump(const char *text, int num, unsigned char *ptr, size_t size,
+ char nohex)
+{
+ size_t i;
+ size_t c;
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
+ num, text, (unsigned long)size, (unsigned long)size);
+
+ for(i = 0; i<size; i += width) {
+
+ fprintf(stderr, "%4.4lx: ", (unsigned long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i + c < size)
+ fprintf(stderr, "%02x ", ptr[i + c]);
+ else
+ fputs(" ", stderr);
+ }
+
+ for(c = 0; (c < width) && (i + c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
+ break;
+ }
+ fprintf(stderr, "%c",
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
+ break;
+ }
+ }
+ fputc('\n', stderr); /* newline */
+ }
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ char *data, size_t size,
+ void *userp)
+{
+ char timebuf[60];
+ const char *text;
+ struct input *i = (struct input *)userp;
+ int num = i->num;
+ static time_t epoch_offset;
+ static int known_offset;
+ struct timeval tv;
+ time_t secs;
+ struct tm *now;
+ (void)handle; /* prevent compiler warning */
+
+ gettimeofday(&tv, NULL);
+ if(!known_offset) {
+ epoch_offset = time(NULL) - tv.tv_sec;
+ known_offset = 1;
+ }
+ secs = epoch_offset + tv.tv_sec;
+ now = localtime(&secs); /* not thread safe but we do not care */
+ curl_msnprintf(timebuf, sizeof(timebuf), "%02d:%02d:%02d.%06ld",
+ now->tm_hour, now->tm_min, now->tm_sec, (long)tv.tv_usec);
+
+ switch(type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "%s [%d] Info: %s", timebuf, num, data);
+ /* FALLTHROUGH */
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ text = "=> Send SSL data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ text = "<= Recv SSL data";
+ break;
+ }
+
+ dump(text, num, (unsigned char *)data, size, 1);
+ return 0;
+}
+
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct input *i = userp;
+ size_t retcode = fread(ptr, size, nmemb, i->in);
+ i->bytes_read += retcode;
+ return retcode;
+}
+
+static void setup(struct input *i, int num, const char *upload)
+{
+ FILE *out;
+ char url[256];
+ char filename[128];
+ struct stat file_info;
+ curl_off_t uploadsize;
+ CURL *hnd;
+
+ hnd = i->hnd = curl_easy_init();
+ i->num = num;
+ curl_msnprintf(filename, 128, "dl-%d", num);
+ out = fopen(filename, "wb");
+ if(!out) {
+ fprintf(stderr, "error: could not open file %s for writing: %s\n", upload,
+ strerror(errno));
+ exit(1);
+ }
+
+ curl_msnprintf(url, 256, "https://localhost:8443/upload-%d", num);
+
+ /* get the file size of the local file */
+ if(stat(upload, &file_info)) {
+ fprintf(stderr, "error: could not stat file %s: %s\n", upload,
+ strerror(errno));
+ exit(1);
+ }
+
+ uploadsize = file_info.st_size;
+
+ i->in = fopen(upload, "rb");
+ if(!i->in) {
+ fprintf(stderr, "error: could not open file %s for reading: %s\n", upload,
+ strerror(errno));
+ exit(1);
+ }
+
+ /* write to this file */
+ curl_easy_setopt(hnd, CURLOPT_WRITEDATA, out);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(hnd, CURLOPT_READFUNCTION, read_callback);
+ /* read from this file */
+ curl_easy_setopt(hnd, CURLOPT_READDATA, i);
+ /* provide the size of the upload */
+ curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, uploadsize);
+
+ /* send in the URL to store the upload as */
+ curl_easy_setopt(hnd, CURLOPT_URL, url);
+
+ /* upload please */
+ curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
+
+ /* please be verbose */
+ curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, my_trace);
+ curl_easy_setopt(hnd, CURLOPT_DEBUGDATA, i);
+
+ /* HTTP/2 please */
+ curl_easy_setopt(hnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2_0);
+
+ /* we use a self-signed test server, skip verification during debugging */
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+
+#if (CURLPIPE_MULTIPLEX > 0)
+ /* wait for pipe connection to confirm */
+ curl_easy_setopt(hnd, CURLOPT_PIPEWAIT, 1L);
+#endif
+}
+
+/*
+ * Upload all files over HTTP/2, using the same physical connection!
+ */
+int main(int argc, char **argv)
+{
+ struct input trans[NUM_HANDLES];
+ CURLM *multi_handle;
+ int i;
+ int still_running = 0; /* keep number of running handles */
+ const char *filename = "index.html";
+ int num_transfers;
+
+ if(argc > 1) {
+ /* if given a number, do that many transfers */
+ num_transfers = atoi(argv[1]);
+
+ if(!num_transfers || (num_transfers > NUM_HANDLES))
+ num_transfers = 3; /* a suitable low default */
+
+ if(argc > 2)
+ /* if given a file name, upload this! */
+ filename = argv[2];
+ }
+ else
+ num_transfers = 3;
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ for(i = 0; i<num_transfers; i++) {
+ setup(&trans[i], i, filename);
+
+ /* add the individual transfer */
+ curl_multi_add_handle(multi_handle, trans[i].hnd);
+ }
+
+ curl_multi_setopt(multi_handle, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
+
+ /* We do HTTP/2 so let's stick to one connection per host */
+ curl_multi_setopt(multi_handle, CURLMOPT_MAX_HOST_CONNECTIONS, 1L);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ for(i = 0; i<num_transfers; i++) {
+ curl_multi_remove_handle(multi_handle, trans[i].hnd);
+ curl_easy_cleanup(trans[i].hnd);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http3-present.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http3-present.c
new file mode 100755
index 0000000..3e18920
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http3-present.c
@@ -0,0 +1,49 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Checks if HTTP/3 support is present in libcurl.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ curl_version_info_data *ver;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ ver = curl_version_info(CURLVERSION_NOW);
+ if(ver->features & CURL_VERSION_HTTP2)
+ printf("HTTP/2 support is present\n");
+
+ if(ver->features & CURL_VERSION_HTTP3)
+ printf("HTTP/3 support is present\n");
+
+ if(ver->features & CURL_VERSION_ALTSVC)
+ printf("Alt-svc support is present\n");
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/http3.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/http3.c
new file mode 100755
index 0000000..6463ccf
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/http3.c
@@ -0,0 +1,56 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Very simple HTTP/3 GET
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+
+ /* Forcing HTTP/3 will make the connection fail if the server is not
+ accessible over QUIC + HTTP/3 on the given host and port.
+ Consider using CURLOPT_ALTSVC instead! */
+ curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, (long)CURL_HTTP_VERSION_3);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/httpcustomheader.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpcustomheader.c
new file mode 100755
index 0000000..c72a474
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpcustomheader.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP request with custom modified, removed and added headers
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ struct curl_slist *chunk = NULL;
+
+ /* Remove a header curl would otherwise add by itself */
+ chunk = curl_slist_append(chunk, "Accept:");
+
+ /* Add a custom header */
+ chunk = curl_slist_append(chunk, "Another: yes");
+
+ /* Modify a header curl otherwise adds differently */
+ chunk = curl_slist_append(chunk, "Host: example.com");
+
+ /* Add a header with "blank" contents to the right of the colon. Note that
+ we are then using a semicolon in the string we pass to curl! */
+ chunk = curl_slist_append(chunk, "X-silly-header;");
+
+ /* set our custom set of headers */
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+
+ curl_easy_setopt(curl, CURLOPT_URL, "localhost");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* free the custom headers */
+ curl_slist_free_all(chunk);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput-postfields.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput-postfields.c
new file mode 100755
index 0000000..f8a5c43
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput-postfields.c
@@ -0,0 +1,105 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP PUT using CURLOPT_POSTFIELDS
+ * </DESC>
+ */
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <curl/curl.h>
+
+static const char olivertwist[]=
+ "Among other public buildings in a certain town, which for many reasons "
+ "it will be prudent to refrain from mentioning, and to which I will assign "
+ "no fictitious name, there is one anciently common to most towns, great or "
+ "small: to wit, a workhouse; and in this workhouse was born; on a day and "
+ "date which I need not trouble myself to repeat, inasmuch as it can be of "
+ "no possible consequence to the reader, in this stage of the business at "
+ "all events; the item of mortality whose name is prefixed";
+
+/* ... to the head of this chapter. String cut off to stick within the C90
+ 509 byte limit. */
+
+/*
+ * This example shows a HTTP PUT operation that sends a fixed buffer with
+ * CURLOPT_POSTFIELDS to the URL given as an argument.
+ */
+
+int main(int argc, char **argv)
+{
+ CURL *curl;
+ CURLcode res;
+ char *url;
+
+ if(argc < 2)
+ return 1;
+
+ url = argv[1];
+
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ struct curl_slist *headers = NULL;
+
+ /* default type with postfields is application/x-www-form-urlencoded,
+ change it if you want */
+ headers = curl_slist_append(headers, "Content-Type: literature/classic");
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+
+ /* pass on content in request body. When CURLOPT_POSTFIELDSIZE is not used,
+ curl does strlen to get the size. */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, olivertwist);
+
+ /* override the POST implied by CURLOPT_POSTFIELDS
+ *
+ * Warning: CURLOPT_CUSTOMREQUEST is problematic, especially if you want
+ * to follow redirects. Be aware.
+ */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT");
+
+ /* specify target URL, and note that this URL should include a file
+ name, not only a directory */
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
+ /* Now run off and do what you have been told! */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* free headers */
+ curl_slist_free_all(headers);
+ }
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput.c
new file mode 100755
index 0000000..00ad99c
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/httpput.c
@@ -0,0 +1,123 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP PUT with easy interface and read callback
+ * </DESC>
+ */
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <curl/curl.h>
+
+/*
+ * This example shows a HTTP PUT operation. PUTs a file given as a command
+ * line argument to the URL also given on the command line.
+ *
+ * This example also uses its own read callback.
+ *
+ * Here's an article on how to setup a PUT handler for Apache:
+ * http://www.apacheweek.com/features/put
+ */
+
+static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t retcode;
+ unsigned long nread;
+
+ /* in real-world cases, this would probably get this data differently
+ as this fread() stuff is exactly what the library already would do
+ by default internally */
+ retcode = fread(ptr, size, nmemb, stream);
+
+ if(retcode > 0) {
+ nread = (unsigned long)retcode;
+ fprintf(stderr, "*** We read %lu bytes from file\n", nread);
+ }
+
+ return retcode;
+}
+
+int main(int argc, char **argv)
+{
+ CURL *curl;
+ CURLcode res;
+ FILE * hd_src;
+ struct stat file_info;
+
+ char *file;
+ char *url;
+
+ if(argc < 3)
+ return 1;
+
+ file = argv[1];
+ url = argv[2];
+
+ /* get the file size of the local file */
+ stat(file, &file_info);
+
+ /* get a FILE * of the same file, could also be made with
+ fdopen() from the previous descriptor, but hey this is just
+ an example! */
+ hd_src = fopen(file, "rb");
+
+ /* In windows, this will init the winsock stuff */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* enable uploading (implies PUT over HTTP) */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* specify target URL, and note that this URL should include a file
+ name, not only a directory */
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+
+ /* now specify which file to upload */
+ curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
+
+ /* provide the size of the upload, we specicially typecast the value
+ to curl_off_t since we must be sure to use the correct data size */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE,
+ (curl_off_t)file_info.st_size);
+
+ /* Now run off and do what you have been told! */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ fclose(hd_src); /* close the local file */
+
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/https.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/https.c
new file mode 100755
index 0000000..7be330a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/https.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Simple HTTPS GET
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+
+#ifdef SKIP_PEER_VERIFICATION
+ /*
+ * If you want to connect to a site who is not using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you.
+ */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ /*
+ * If the site you are connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure.
+ */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-append.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-append.c
new file mode 100755
index 0000000..b66d868
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-append.c
@@ -0,0 +1,132 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to send emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO "\r\n"
+ "From: " FROM "(Example User)\r\n"
+ "Cc: " CC "(Another example User)\r\n"
+ "Message-ID: "
+ "<dcd7cb36-11db-487a-9f3a-e652a9458efd@rfcpedant.example.org>\r\n"
+ "Subject: IMAP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(*data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ size_t filesize;
+ long infilesize = LONG_MAX;
+ struct upload_status upload_ctx = { 0 };
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will create a new message 100. Note that you should perform an
+ * EXAMINE command to obtain the UID of the next message to create and a
+ * SELECT to ensure you are creating the message in the OUTBOX. */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/100");
+
+ /* In this case, we are using a callback function to specify the data. You
+ * could just use the CURLOPT_READDATA option to specify a FILE pointer to
+ * read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ filesize = strlen(payload_text);
+ if(filesize <= LONG_MAX)
+ infilesize = (long)filesize;
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, infilesize);
+
+ /* Perform the append */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-authzid.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-authzid.c
new file mode 100755
index 0000000..62eca4a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-authzid.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to retreieve emails from a shared mailed box
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.66.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set the username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* Set the authorization identity (identity to act as) */
+ curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox");
+
+ /* Force PLAIN authentication */
+ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-copy.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-copy.c
new file mode 100755
index 0000000..81ec5be
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-copy.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to copy an email from one folder to another
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to copy a mail from one mailbox folder
+ * to another using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is source mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the COPY command specifying the message ID and destination folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "COPY 1 FOLDER");
+
+ /* Note that to perform a move operation you will need to perform the copy,
+ * then mark the original mail as Deleted and EXPUNGE or CLOSE. Please see
+ * imap-store.c for more information on deleting messages. */
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-create.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-create.c
new file mode 100755
index 0000000..12e7113
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-create.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to create a new folder
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to create a new mailbox folder using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the CREATE command specifying the new folder name */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CREATE FOLDER");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-delete.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-delete.c
new file mode 100755
index 0000000..467b060
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-delete.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to delete a folder
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mailbox folder
+ * using libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the DELETE command specifying the existing folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE FOLDER");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-examine.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-examine.c
new file mode 100755
index 0000000..68cc636
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-examine.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to obtain information about a folder
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain information about a mailbox
+ * folder using libcurl's IMAP capabilities via the EXAMINE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the EXAMINE command specifying the mailbox folder */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXAMINE OUTBOX");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-fetch.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-fetch.c
new file mode 100755
index 0000000..d6237c3
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-fetch.c
@@ -0,0 +1,67 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to retreieve emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-list.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-list.c
new file mode 100755
index 0000000..85bddac
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-list.c
@@ -0,0 +1,68 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example to list the folders within a mailbox
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the folders within an IMAP
+ * mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list the folders within the user's mailbox. If you want to
+ * list the folders within a specific folder, for example the inbox, then
+ * specify the folder as a path in the URL such as /INBOX */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Perform the list */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-lsub.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-lsub.c
new file mode 100755
index 0000000..1b22fa1
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-lsub.c
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example to list the subscribed folders
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to list the subscribed folders within
+ * an IMAP mailbox.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the LSUB command. Note the syntax is very similar to that of a LIST
+ command. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "LSUB \"\" *");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-multi.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-multi.c
new file mode 100755
index 0000000..3b5c633
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-multi.c
@@ -0,0 +1,83 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example using the multi interface
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example to demonstrate how to
+ * use libcurl's multi interface.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX/;UID=1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ do {
+ CURLMcode mc = curl_multi_perform(mcurl, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+ } while(still_running);
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-noop.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-noop.c
new file mode 100755
index 0000000..ee1a777
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-noop.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to perform a noop
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's IMAP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-search.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-search.c
new file mode 100755
index 0000000..7b175b2
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-search.c
@@ -0,0 +1,73 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to search for new emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to search for new messages using
+ * libcurl's IMAP capabilities.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the SEARCH command specifying what we want to search for. Note that
+ * this can contain a message sequence set and a number of search criteria
+ * keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW,
+ * RECENT and SEEN. For more information about the search criteria please
+ * see RFC-3501 section 6.4.4. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-ssl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-ssl.c
new file mode 100755
index 0000000..5b0befb
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-ssl.c
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example using SSL
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox. Note the use of
+ * imaps:// rather than imap:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "imaps://imap.example.com/INBOX/;UID=1");
+
+ /* If you want to connect to a site who is not using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you are connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-store.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-store.c
new file mode 100755
index 0000000..6a4c756
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-store.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example showing how to modify the properties of an email
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to modify an existing mail using
+ * libcurl's IMAP capabilities with the STORE command.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the mailbox folder to select */
+ curl_easy_setopt(curl, CURLOPT_URL, "imap://imap.example.com/INBOX");
+
+ /* Set the STORE command with the Deleted flag for message 1. Note that
+ * you can use the STORE command to set other flags such as Seen, Answered,
+ * Flagged, Draft and Recent. */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STORE 1 +Flags \\Deleted");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ else {
+ /* Set the EXPUNGE command, although you can use the CLOSE command if you
+ * do not want to know the result of the STORE */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPUNGE");
+
+ /* Perform the second custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-tls.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-tls.c
new file mode 100755
index 0000000..dbebbc7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/imap-tls.c
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * IMAP example using TLS
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to fetch mail using libcurl's IMAP
+ * capabilities. It builds on the imap-fetch.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.30.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will fetch message 1 from the user's inbox */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "imap://imap.example.com/INBOX/;UID=1");
+
+ /* In this example, we will start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server does not have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ *
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though. Instead, you should get
+ * the issuer certificate (or the host certificate if the certificate is
+ * self-signed) and add it to the set of certificates that are known to
+ * libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See docs/SSLCERTS
+ * for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the fetch */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/makefile.dj b/ap/lib/libcurl/curl-7.86.0/docs/examples/makefile.dj
new file mode 100755
index 0000000..9f0de66
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/makefile.dj
@@ -0,0 +1,57 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+TOPDIR = ../..
+
+include $(TOPDIR)/packages/DOS/common.dj
+
+CFLAGS += -DFALSE=0 -DTRUE=1
+
+LIBS = $(TOPDIR)/lib/libcurl.a
+
+ifeq ($(USE_SSL),1)
+ LIBS += $(OPENSSL_ROOT)/lib/libssl.a $(OPENSSL_ROOT)/lib/libcrypt.a
+endif
+
+ifeq ($(USE_IDNA),1)
+ LIBS += $(LIBIDN_ROOT)/lib/dj_obj/libidn.a -liconv
+endif
+
+LIBS += $(WATT32_ROOT)/lib/libwatt.a $(ZLIB_ROOT)/libz.a
+
+include Makefile.inc
+
+PROGRAMS = $(patsubst %,%.exe,$(check_PROGRAMS))
+
+all: $(PROGRAMS)
+ @echo Welcome to libcurl example program
+
+%.exe: %.c
+ $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
+ @echo
+
+clean vclean realclean:
+ - rm -f $(PROGRAMS) depend.dj
+
+-include depend.dj
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-app.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-app.c
new file mode 100755
index 0000000..8136238
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-app.c
@@ -0,0 +1,118 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * A basic application source code using the multi interface doing two
+ * transfers in parallel.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+/*
+ * Download a HTTP file and upload an FTP file simultaneously.
+ */
+
+#define HANDLECOUNT 2 /* Number of simultaneous transfers */
+#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
+#define FTP_HANDLE 1 /* Index for the FTP transfer */
+
+int main(void)
+{
+ CURL *handles[HANDLECOUNT];
+ CURLM *multi_handle;
+
+ int still_running = 1; /* keep number of running handles */
+ int i;
+
+ CURLMsg *msg; /* for picking up messages with the transfer status */
+ int msgs_left; /* how many messages are left */
+
+ /* Allocate one CURL handle per transfer */
+ for(i = 0; i<HANDLECOUNT; i++)
+ handles[i] = curl_easy_init();
+
+ /* set the options (I left out a few, you will get the point anyway) */
+ curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
+
+ curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
+ curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ /* add the individual transfers */
+ for(i = 0; i<HANDLECOUNT; i++)
+ curl_multi_add_handle(multi_handle, handles[i]);
+
+ while(still_running) {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+ }
+ /* See how the transfers went */
+ while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ int idx;
+
+ /* Find out which handle this message is about */
+ for(idx = 0; idx<HANDLECOUNT; idx++) {
+ int found = (msg->easy_handle == handles[idx]);
+ if(found)
+ break;
+ }
+
+ switch(idx) {
+ case HTTP_HANDLE:
+ printf("HTTP transfer completed with status %d\n", msg->data.result);
+ break;
+ case FTP_HANDLE:
+ printf("FTP transfer completed with status %d\n", msg->data.result);
+ break;
+ }
+ }
+ }
+
+ /* remove the transfers and cleanup the handles */
+ for(i = 0; i<HANDLECOUNT; i++) {
+ curl_multi_remove_handle(multi_handle, handles[i]);
+ curl_easy_cleanup(handles[i]);
+ }
+
+ curl_multi_cleanup(multi_handle);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-debugcallback.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-debugcallback.c
new file mode 100755
index 0000000..16d5d56
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-debugcallback.c
@@ -0,0 +1,169 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi interface and debug callback
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+typedef char bool;
+#define TRUE 1
+
+static
+void dump(const char *text,
+ FILE *stream, unsigned char *ptr, size_t size,
+ bool nohex)
+{
+ size_t i;
+ size_t c;
+
+ unsigned int width = 0x10;
+
+ if(nohex)
+ /* without the hex output, we can fit more on screen */
+ width = 0x40;
+
+ fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+ text, (unsigned long)size, (unsigned long)size);
+
+ for(i = 0; i<size; i += width) {
+
+ fprintf(stream, "%4.4lx: ", (unsigned long)i);
+
+ if(!nohex) {
+ /* hex not disabled, show it */
+ for(c = 0; c < width; c++)
+ if(i + c < size)
+ fprintf(stream, "%02x ", ptr[i + c]);
+ else
+ fputs(" ", stream);
+ }
+
+ for(c = 0; (c < width) && (i + c < size); c++) {
+ /* check for 0D0A; if found, skip past and start a new line of output */
+ if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D &&
+ ptr[i + c + 1] == 0x0A) {
+ i += (c + 2 - width);
+ break;
+ }
+ fprintf(stream, "%c",
+ (ptr[i + c] >= 0x20) && (ptr[i + c]<0x80)?ptr[i + c]:'.');
+ /* check again for 0D0A, to avoid an extra \n if it's at width */
+ if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
+ ptr[i + c + 2] == 0x0A) {
+ i += (c + 3 - width);
+ break;
+ }
+ }
+ fputc('\n', stream); /* newline */
+ }
+ fflush(stream);
+}
+
+static
+int my_trace(CURL *handle, curl_infotype type,
+ unsigned char *data, size_t size,
+ void *userp)
+{
+ const char *text;
+
+ (void)userp;
+ (void)handle; /* prevent compiler warning */
+
+ switch(type) {
+ case CURLINFO_TEXT:
+ fprintf(stderr, "== Info: %s", data);
+ /* FALLTHROUGH */
+ default: /* in case a new one is introduced to shock us */
+ return 0;
+
+ case CURLINFO_HEADER_OUT:
+ text = "=> Send header";
+ break;
+ case CURLINFO_DATA_OUT:
+ text = "=> Send data";
+ break;
+ case CURLINFO_HEADER_IN:
+ text = "<= Recv header";
+ break;
+ case CURLINFO_DATA_IN:
+ text = "<= Recv data";
+ break;
+ }
+
+ dump(text, stderr, data, size, TRUE);
+ return 0;
+}
+
+/*
+ * Simply download a HTTP file.
+ */
+int main(void)
+{
+ CURL *http_handle;
+ CURLM *multi_handle;
+
+ int still_running = 0; /* keep number of running handles */
+
+ http_handle = curl_easy_init();
+
+ /* set the options (I left out a few, you will get the point anyway) */
+ curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
+
+ curl_easy_setopt(http_handle, CURLOPT_DEBUGFUNCTION, my_trace);
+ curl_easy_setopt(http_handle, CURLOPT_VERBOSE, 1L);
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ /* add the individual transfers */
+ curl_multi_add_handle(multi_handle, http_handle);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ curl_easy_cleanup(http_handle);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-double.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-double.c
new file mode 100755
index 0000000..b9bba52
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-double.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * multi interface code doing two parallel HTTP transfers
+ * </DESC>
+ */
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+/*
+ * Simply download two HTTP files!
+ */
+int main(void)
+{
+ CURL *http_handle;
+ CURL *http_handle2;
+ CURLM *multi_handle;
+
+ int still_running = 1; /* keep number of running handles */
+
+ http_handle = curl_easy_init();
+ http_handle2 = curl_easy_init();
+
+ /* set options */
+ curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
+
+ /* set options */
+ curl_easy_setopt(http_handle2, CURLOPT_URL, "http://localhost/");
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ /* add the individual transfers */
+ curl_multi_add_handle(multi_handle, http_handle);
+ curl_multi_add_handle(multi_handle, http_handle2);
+
+ while(still_running) {
+ CURLMsg *msg;
+ int queued;
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ do {
+ msg = curl_multi_info_read(multi_handle, &queued);
+ if(msg) {
+ if(msg->msg == CURLMSG_DONE) {
+ /* a transfer ended */
+ fprintf(stderr, "Transfer completed\n");
+ }
+ }
+ } while(msg);
+ }
+
+ curl_multi_remove_handle(multi_handle, http_handle);
+ curl_multi_remove_handle(multi_handle, http_handle2);
+
+ curl_multi_cleanup(multi_handle);
+
+ curl_easy_cleanup(http_handle);
+ curl_easy_cleanup(http_handle2);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-event.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-event.c
new file mode 100755
index 0000000..4f61f5e
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-event.c
@@ -0,0 +1,242 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * multi_socket API using libevent
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <event2/event.h>
+#include <curl/curl.h>
+
+struct event_base *base;
+CURLM *curl_handle;
+struct event *timeout;
+
+typedef struct curl_context_s {
+ struct event *event;
+ curl_socket_t sockfd;
+} curl_context_t;
+
+static void curl_perform(int fd, short event, void *arg);
+
+static curl_context_t *create_curl_context(curl_socket_t sockfd)
+{
+ curl_context_t *context;
+
+ context = (curl_context_t *) malloc(sizeof(*context));
+
+ context->sockfd = sockfd;
+
+ context->event = event_new(base, sockfd, 0, curl_perform, context);
+
+ return context;
+}
+
+static void destroy_curl_context(curl_context_t *context)
+{
+ event_del(context->event);
+ event_free(context->event);
+ free(context);
+}
+
+static void add_download(const char *url, int num)
+{
+ char filename[50];
+ FILE *file;
+ CURL *handle;
+
+ snprintf(filename, 50, "%d.download", num);
+
+ file = fopen(filename, "wb");
+ if(!file) {
+ fprintf(stderr, "Error opening %s\n", filename);
+ return;
+ }
+
+ handle = curl_easy_init();
+ curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(handle, CURLOPT_PRIVATE, file);
+ curl_easy_setopt(handle, CURLOPT_URL, url);
+ curl_multi_add_handle(curl_handle, handle);
+ fprintf(stderr, "Added download %s -> %s\n", url, filename);
+}
+
+static void check_multi_info(void)
+{
+ char *done_url;
+ CURLMsg *message;
+ int pending;
+ CURL *easy_handle;
+ FILE *file;
+
+ while((message = curl_multi_info_read(curl_handle, &pending))) {
+ switch(message->msg) {
+ case CURLMSG_DONE:
+ /* Do not use message data after calling curl_multi_remove_handle() and
+ curl_easy_cleanup(). As per curl_multi_info_read() docs:
+ "WARNING: The data the returned pointer points to will not survive
+ calling curl_multi_cleanup, curl_multi_remove_handle or
+ curl_easy_cleanup." */
+ easy_handle = message->easy_handle;
+
+ curl_easy_getinfo(easy_handle, CURLINFO_EFFECTIVE_URL, &done_url);
+ curl_easy_getinfo(easy_handle, CURLINFO_PRIVATE, &file);
+ printf("%s DONE\n", done_url);
+
+ curl_multi_remove_handle(curl_handle, easy_handle);
+ curl_easy_cleanup(easy_handle);
+ if(file) {
+ fclose(file);
+ }
+ break;
+
+ default:
+ fprintf(stderr, "CURLMSG default\n");
+ break;
+ }
+ }
+}
+
+static void curl_perform(int fd, short event, void *arg)
+{
+ int running_handles;
+ int flags = 0;
+ curl_context_t *context;
+
+ if(event & EV_READ)
+ flags |= CURL_CSELECT_IN;
+ if(event & EV_WRITE)
+ flags |= CURL_CSELECT_OUT;
+
+ context = (curl_context_t *) arg;
+
+ curl_multi_socket_action(curl_handle, context->sockfd, flags,
+ &running_handles);
+
+ check_multi_info();
+}
+
+static void on_timeout(evutil_socket_t fd, short events, void *arg)
+{
+ int running_handles;
+ curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0,
+ &running_handles);
+ check_multi_info();
+}
+
+static int start_timeout(CURLM *multi, long timeout_ms, void *userp)
+{
+ if(timeout_ms < 0) {
+ evtimer_del(timeout);
+ }
+ else {
+ if(timeout_ms == 0)
+ timeout_ms = 1; /* 0 means directly call socket_action, but we will do it
+ in a bit */
+ struct timeval tv;
+ tv.tv_sec = timeout_ms / 1000;
+ tv.tv_usec = (timeout_ms % 1000) * 1000;
+ evtimer_del(timeout);
+ evtimer_add(timeout, &tv);
+ }
+ return 0;
+}
+
+static int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
+ void *socketp)
+{
+ curl_context_t *curl_context;
+ int events = 0;
+
+ switch(action) {
+ case CURL_POLL_IN:
+ case CURL_POLL_OUT:
+ case CURL_POLL_INOUT:
+ curl_context = socketp ?
+ (curl_context_t *) socketp : create_curl_context(s);
+
+ curl_multi_assign(curl_handle, s, (void *) curl_context);
+
+ if(action != CURL_POLL_IN)
+ events |= EV_WRITE;
+ if(action != CURL_POLL_OUT)
+ events |= EV_READ;
+
+ events |= EV_PERSIST;
+
+ event_del(curl_context->event);
+ event_assign(curl_context->event, base, curl_context->sockfd, events,
+ curl_perform, curl_context);
+ event_add(curl_context->event, NULL);
+
+ break;
+ case CURL_POLL_REMOVE:
+ if(socketp) {
+ event_del(((curl_context_t*) socketp)->event);
+ destroy_curl_context((curl_context_t*) socketp);
+ curl_multi_assign(curl_handle, s, NULL);
+ }
+ break;
+ default:
+ abort();
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ if(argc <= 1)
+ return 0;
+
+ if(curl_global_init(CURL_GLOBAL_ALL)) {
+ fprintf(stderr, "Could not init curl\n");
+ return 1;
+ }
+
+ base = event_base_new();
+ timeout = evtimer_new(base, on_timeout, NULL);
+
+ curl_handle = curl_multi_init();
+ curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
+
+ while(argc-- > 1) {
+ add_download(argv[argc], argc);
+ }
+
+ event_base_dispatch(base);
+
+ curl_multi_cleanup(curl_handle);
+ event_free(timeout);
+ event_base_free(base);
+
+ libevent_global_shutdown();
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-formadd.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-formadd.c
new file mode 100755
index 0000000..e62de32
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-formadd.c
@@ -0,0 +1,115 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * using the multi interface to do a multipart formpost without blocking
+ * </DESC>
+ */
+
+/*
+ * Warning: this example uses the deprecated form api. See "multi-post.c"
+ * for a similar example using the mime api.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+
+ CURLM *multi_handle;
+ int still_running = 0;
+
+ struct curl_httppost *formpost = NULL;
+ struct curl_httppost *lastptr = NULL;
+ struct curl_slist *headerlist = NULL;
+ static const char buf[] = "Expect:";
+
+ /* Fill in the file upload field. This makes libcurl load data from
+ the given file name when curl_easy_perform() is called. */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "sendfile",
+ CURLFORM_FILE, "multi-formadd.c",
+ CURLFORM_END);
+
+ /* Fill in the filename field */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "filename",
+ CURLFORM_COPYCONTENTS, "multi-formadd.c",
+ CURLFORM_END);
+
+ /* Fill in the submit field too, even if this is rarely needed */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "submit",
+ CURLFORM_COPYCONTENTS, "send",
+ CURLFORM_END);
+
+ curl = curl_easy_init();
+ multi_handle = curl_multi_init();
+
+ /* initialize custom header list (stating that Expect: 100-continue is not
+ wanted */
+ headerlist = curl_slist_append(headerlist, buf);
+ if(curl && multi_handle) {
+
+ /* what URL that receives this POST */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
+ curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ curl_multi_add_handle(multi_handle, curl);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* then cleanup the formpost chain */
+ curl_formfree(formpost);
+
+ /* free slist */
+ curl_slist_free_all(headerlist);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-legacy.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-legacy.c
new file mode 100755
index 0000000..f9bc699
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-legacy.c
@@ -0,0 +1,179 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * A basic application source code using the multi interface doing two
+ * transfers in parallel without curl_multi_wait/poll.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+/*
+ * Download a HTTP file and upload an FTP file simultaneously.
+ */
+
+#define HANDLECOUNT 2 /* Number of simultaneous transfers */
+#define HTTP_HANDLE 0 /* Index for the HTTP transfer */
+#define FTP_HANDLE 1 /* Index for the FTP transfer */
+
+int main(void)
+{
+ CURL *handles[HANDLECOUNT];
+ CURLM *multi_handle;
+
+ int still_running = 0; /* keep number of running handles */
+ int i;
+
+ CURLMsg *msg; /* for picking up messages with the transfer status */
+ int msgs_left; /* how many messages are left */
+
+ /* Allocate one CURL handle per transfer */
+ for(i = 0; i<HANDLECOUNT; i++)
+ handles[i] = curl_easy_init();
+
+ /* set the options (I left out a few, you will get the point anyway) */
+ curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_URL, "https://example.com");
+
+ curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_URL, "ftp://example.com");
+ curl_easy_setopt(handles[FTP_HANDLE], CURLOPT_UPLOAD, 1L);
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ /* add the individual transfers */
+ for(i = 0; i<HANDLECOUNT; i++)
+ curl_multi_add_handle(multi_handle, handles[i]);
+
+ /* we start some action by calling perform right away */
+ curl_multi_perform(multi_handle, &still_running);
+
+ while(still_running) {
+ struct timeval timeout;
+ int rc; /* select() return code */
+ CURLMcode mc; /* curl_multi_fdset() return code */
+
+ fd_set fdread;
+ fd_set fdwrite;
+ fd_set fdexcep;
+ int maxfd = -1;
+
+ long curl_timeo = -1;
+
+ FD_ZERO(&fdread);
+ FD_ZERO(&fdwrite);
+ FD_ZERO(&fdexcep);
+
+ /* set a suitable timeout to play around with */
+ timeout.tv_sec = 1;
+ timeout.tv_usec = 0;
+
+ curl_multi_timeout(multi_handle, &curl_timeo);
+ if(curl_timeo >= 0) {
+ timeout.tv_sec = curl_timeo / 1000;
+ if(timeout.tv_sec > 1)
+ timeout.tv_sec = 1;
+ else
+ timeout.tv_usec = (curl_timeo % 1000) * 1000;
+ }
+
+ /* get file descriptors from the transfers */
+ mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+
+ if(mc != CURLM_OK) {
+ fprintf(stderr, "curl_multi_fdset() failed, code %d.\n", mc);
+ break;
+ }
+
+ /* On success the value of maxfd is guaranteed to be >= -1. We call
+ select(maxfd + 1, ...); specially in case of (maxfd == -1) there are
+ no fds ready yet so we call select(0, ...) --or Sleep() on Windows--
+ to sleep 100ms, which is the minimum suggested value in the
+ curl_multi_fdset() doc. */
+
+ if(maxfd == -1) {
+#ifdef _WIN32
+ Sleep(100);
+ rc = 0;
+#else
+ /* Portable sleep for platforms other than Windows. */
+ struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
+ rc = select(0, NULL, NULL, NULL, &wait);
+#endif
+ }
+ else {
+ /* Note that on some platforms 'timeout' may be modified by select().
+ If you need access to the original value save a copy beforehand. */
+ rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
+ }
+
+ switch(rc) {
+ case -1:
+ /* select error */
+ break;
+ case 0: /* timeout */
+ default: /* action */
+ curl_multi_perform(multi_handle, &still_running);
+ break;
+ }
+ }
+
+ /* See how the transfers went */
+ while((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
+ if(msg->msg == CURLMSG_DONE) {
+ int idx;
+
+ /* Find out which handle this message is about */
+ for(idx = 0; idx<HANDLECOUNT; idx++) {
+ int found = (msg->easy_handle == handles[idx]);
+ if(found)
+ break;
+ }
+
+ switch(idx) {
+ case HTTP_HANDLE:
+ printf("HTTP transfer completed with status %d\n", msg->data.result);
+ break;
+ case FTP_HANDLE:
+ printf("FTP transfer completed with status %d\n", msg->data.result);
+ break;
+ }
+ }
+ }
+
+ curl_multi_cleanup(multi_handle);
+
+ /* Free the CURL handles */
+ for(i = 0; i<HANDLECOUNT; i++)
+ curl_easy_cleanup(handles[i]);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-post.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-post.c
new file mode 100755
index 0000000..c141c68
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-post.c
@@ -0,0 +1,105 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * using the multi interface to do a multipart formpost without blocking
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/time.h>
+
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+
+ CURLM *multi_handle;
+ int still_running = 0;
+
+ curl_mime *form = NULL;
+ curl_mimepart *field = NULL;
+ struct curl_slist *headerlist = NULL;
+ static const char buf[] = "Expect:";
+
+ curl = curl_easy_init();
+ multi_handle = curl_multi_init();
+
+ if(curl && multi_handle) {
+ /* Create the form */
+ form = curl_mime_init(curl);
+
+ /* Fill in the file upload field */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "sendfile");
+ curl_mime_filedata(field, "multi-post.c");
+
+ /* Fill in the filename field */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "filename");
+ curl_mime_data(field, "multi-post.c", CURL_ZERO_TERMINATED);
+
+ /* Fill in the submit field too, even if this is rarely needed */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "submit");
+ curl_mime_data(field, "send", CURL_ZERO_TERMINATED);
+
+ /* initialize custom header list (stating that Expect: 100-continue is not
+ wanted */
+ headerlist = curl_slist_append(headerlist, buf);
+
+ /* what URL that receives this POST */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/upload.cgi");
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
+ curl_easy_setopt(curl, CURLOPT_MIMEPOST, form);
+
+ curl_multi_add_handle(multi_handle, curl);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+ } while(still_running);
+
+ curl_multi_cleanup(multi_handle);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* then cleanup the form */
+ curl_mime_free(form);
+
+ /* free slist */
+ curl_slist_free_all(headerlist);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-single.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-single.c
new file mode 100755
index 0000000..373ede3
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-single.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * using the multi interface to do a single download
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+/* somewhat unix-specific */
+#include <sys/time.h>
+#include <unistd.h>
+
+/* curl stuff */
+#include <curl/curl.h>
+
+/*
+ * Simply download a HTTP file.
+ */
+int main(void)
+{
+ CURL *http_handle;
+ CURLM *multi_handle;
+ int still_running = 1; /* keep number of running handles */
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ http_handle = curl_easy_init();
+
+ /* set the options (I left out a few, you will get the point anyway) */
+ curl_easy_setopt(http_handle, CURLOPT_URL, "https://www.example.com/");
+
+ /* init a multi stack */
+ multi_handle = curl_multi_init();
+
+ /* add the individual transfers */
+ curl_multi_add_handle(multi_handle, http_handle);
+
+ do {
+ CURLMcode mc = curl_multi_perform(multi_handle, &still_running);
+
+ if(!mc)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(multi_handle, NULL, 0, 1000, NULL);
+
+ if(mc) {
+ fprintf(stderr, "curl_multi_poll() failed, code %d.\n", (int)mc);
+ break;
+ }
+
+ } while(still_running);
+
+ curl_multi_remove_handle(multi_handle, http_handle);
+
+ curl_easy_cleanup(http_handle);
+
+ curl_multi_cleanup(multi_handle);
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-uv.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-uv.c
new file mode 100755
index 0000000..fe7b357
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multi-uv.c
@@ -0,0 +1,237 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * multi_socket API using libuv
+ * </DESC>
+ */
+/* Example application using the multi socket interface to download multiple
+ files in parallel, powered by libuv.
+
+ Requires libuv and (of course) libcurl.
+
+ See https://nikhilm.github.io/uvbook/ for more information on libuv.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <uv.h>
+#include <curl/curl.h>
+
+uv_loop_t *loop;
+CURLM *curl_handle;
+uv_timer_t timeout;
+
+typedef struct curl_context_s {
+ uv_poll_t poll_handle;
+ curl_socket_t sockfd;
+} curl_context_t;
+
+static curl_context_t *create_curl_context(curl_socket_t sockfd)
+{
+ curl_context_t *context;
+
+ context = (curl_context_t *) malloc(sizeof(*context));
+
+ context->sockfd = sockfd;
+
+ uv_poll_init_socket(loop, &context->poll_handle, sockfd);
+ context->poll_handle.data = context;
+
+ return context;
+}
+
+static void curl_close_cb(uv_handle_t *handle)
+{
+ curl_context_t *context = (curl_context_t *) handle->data;
+ free(context);
+}
+
+static void destroy_curl_context(curl_context_t *context)
+{
+ uv_close((uv_handle_t *) &context->poll_handle, curl_close_cb);
+}
+
+static void add_download(const char *url, int num)
+{
+ char filename[50];
+ FILE *file;
+ CURL *handle;
+
+ snprintf(filename, 50, "%d.download", num);
+
+ file = fopen(filename, "wb");
+ if(!file) {
+ fprintf(stderr, "Error opening %s\n", filename);
+ return;
+ }
+
+ handle = curl_easy_init();
+ curl_easy_setopt(handle, CURLOPT_WRITEDATA, file);
+ curl_easy_setopt(handle, CURLOPT_PRIVATE, file);
+ curl_easy_setopt(handle, CURLOPT_URL, url);
+ curl_multi_add_handle(curl_handle, handle);
+ fprintf(stderr, "Added download %s -> %s\n", url, filename);
+}
+
+static void check_multi_info(void)
+{
+ char *done_url;
+ CURLMsg *message;
+ int pending;
+ CURL *easy_handle;
+ FILE *file;
+
+ while((message = curl_multi_info_read(curl_handle, &pending))) {
+ switch(message->msg) {
+ case CURLMSG_DONE:
+ /* Do not use message data after calling curl_multi_remove_handle() and
+ curl_easy_cleanup(). As per curl_multi_info_read() docs:
+ "WARNING: The data the returned pointer points to will not survive
+ calling curl_multi_cleanup, curl_multi_remove_handle or
+ curl_easy_cleanup." */
+ easy_handle = message->easy_handle;
+
+ curl_easy_getinfo(easy_handle, CURLINFO_EFFECTIVE_URL, &done_url);
+ curl_easy_getinfo(easy_handle, CURLINFO_PRIVATE, &file);
+ printf("%s DONE\n", done_url);
+
+ curl_multi_remove_handle(curl_handle, easy_handle);
+ curl_easy_cleanup(easy_handle);
+ if(file) {
+ fclose(file);
+ }
+ break;
+
+ default:
+ fprintf(stderr, "CURLMSG default\n");
+ break;
+ }
+ }
+}
+
+static void curl_perform(uv_poll_t *req, int status, int events)
+{
+ int running_handles;
+ int flags = 0;
+ curl_context_t *context;
+
+ if(events & UV_READABLE)
+ flags |= CURL_CSELECT_IN;
+ if(events & UV_WRITABLE)
+ flags |= CURL_CSELECT_OUT;
+
+ context = (curl_context_t *) req->data;
+
+ curl_multi_socket_action(curl_handle, context->sockfd, flags,
+ &running_handles);
+
+ check_multi_info();
+}
+
+static void on_timeout(uv_timer_t *req)
+{
+ int running_handles;
+ curl_multi_socket_action(curl_handle, CURL_SOCKET_TIMEOUT, 0,
+ &running_handles);
+ check_multi_info();
+}
+
+static int start_timeout(CURLM *multi, long timeout_ms, void *userp)
+{
+ if(timeout_ms < 0) {
+ uv_timer_stop(&timeout);
+ }
+ else {
+ if(timeout_ms == 0)
+ timeout_ms = 1; /* 0 means directly call socket_action, but we will do it
+ in a bit */
+ uv_timer_start(&timeout, on_timeout, timeout_ms, 0);
+ }
+ return 0;
+}
+
+static int handle_socket(CURL *easy, curl_socket_t s, int action, void *userp,
+ void *socketp)
+{
+ curl_context_t *curl_context;
+ int events = 0;
+
+ switch(action) {
+ case CURL_POLL_IN:
+ case CURL_POLL_OUT:
+ case CURL_POLL_INOUT:
+ curl_context = socketp ?
+ (curl_context_t *) socketp : create_curl_context(s);
+
+ curl_multi_assign(curl_handle, s, (void *) curl_context);
+
+ if(action != CURL_POLL_IN)
+ events |= UV_WRITABLE;
+ if(action != CURL_POLL_OUT)
+ events |= UV_READABLE;
+
+ uv_poll_start(&curl_context->poll_handle, events, curl_perform);
+ break;
+ case CURL_POLL_REMOVE:
+ if(socketp) {
+ uv_poll_stop(&((curl_context_t*)socketp)->poll_handle);
+ destroy_curl_context((curl_context_t*) socketp);
+ curl_multi_assign(curl_handle, s, NULL);
+ }
+ break;
+ default:
+ abort();
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ loop = uv_default_loop();
+
+ if(argc <= 1)
+ return 0;
+
+ if(curl_global_init(CURL_GLOBAL_ALL)) {
+ fprintf(stderr, "Could not init curl\n");
+ return 1;
+ }
+
+ uv_timer_init(loop, &timeout);
+
+ curl_handle = curl_multi_init();
+ curl_multi_setopt(curl_handle, CURLMOPT_SOCKETFUNCTION, handle_socket);
+ curl_multi_setopt(curl_handle, CURLMOPT_TIMERFUNCTION, start_timeout);
+
+ while(argc-- > 1) {
+ add_download(argv[argc], argc);
+ }
+
+ uv_run(loop, UV_RUN_DEFAULT);
+ curl_multi_cleanup(curl_handle);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/multithread.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/multithread.c
new file mode 100755
index 0000000..4f2c855
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/multithread.c
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * A multi-threaded example that uses pthreads to fetch several files at once
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <pthread.h>
+#include <curl/curl.h>
+
+#define NUMT 4
+
+/*
+ List of URLs to fetch.
+
+ If you intend to use a SSL-based protocol here you might need to setup TLS
+ library mutex callbacks as described here:
+
+ https://curl.se/libcurl/c/threadsafe.html
+
+*/
+const char * const urls[NUMT]= {
+ "https://curl.se/",
+ "ftp://example.com/",
+ "https://example.net/",
+ "www.example"
+};
+
+static void *pull_one_url(void *url)
+{
+ CURL *curl;
+
+ curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ curl_easy_perform(curl); /* ignores error */
+ curl_easy_cleanup(curl);
+
+ return NULL;
+}
+
+
+/*
+ int pthread_create(pthread_t *new_thread_ID,
+ const pthread_attr_t *attr,
+ void * (*start_func)(void *), void *arg);
+*/
+
+int main(int argc, char **argv)
+{
+ pthread_t tid[NUMT];
+ int i;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ for(i = 0; i< NUMT; i++) {
+ int error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ (void *)urls[i]);
+ if(0 != error)
+ fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ else
+ fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
+ }
+
+ /* now wait for all threads to terminate */
+ for(i = 0; i< NUMT; i++) {
+ pthread_join(tid[i], NULL);
+ fprintf(stderr, "Thread %d terminated\n", i);
+ }
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/opensslthreadlock.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/opensslthreadlock.c
new file mode 100755
index 0000000..a7de777
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/opensslthreadlock.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * one way to set the necessary OpenSSL locking callbacks if you want to do
+ * multi-threaded transfers with HTTPS/FTPS with libcurl built to use OpenSSL.
+ * </DESC>
+ */
+/*
+ * This is not a complete stand-alone example.
+ *
+ * Author: Jeremy Brown
+ */
+
+#include <stdio.h>
+#include <pthread.h>
+#include <openssl/err.h>
+
+#define MUTEX_TYPE pthread_mutex_t
+#define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL)
+#define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x))
+#define MUTEX_LOCK(x) pthread_mutex_lock(&(x))
+#define MUTEX_UNLOCK(x) pthread_mutex_unlock(&(x))
+#define THREAD_ID pthread_self()
+
+
+void handle_error(const char *file, int lineno, const char *msg)
+{
+ fprintf(stderr, "** %s:%d %s\n", file, lineno, msg);
+ ERR_print_errors_fp(stderr);
+ /* exit(-1); */
+}
+
+/* This array will store all of the mutexes available to OpenSSL. */
+static MUTEX_TYPE *mutex_buf = NULL;
+
+static void locking_function(int mode, int n, const char *file, int line)
+{
+ if(mode & CRYPTO_LOCK)
+ MUTEX_LOCK(mutex_buf[n]);
+ else
+ MUTEX_UNLOCK(mutex_buf[n]);
+}
+
+static unsigned long id_function(void)
+{
+ return ((unsigned long)THREAD_ID);
+}
+
+int thread_setup(void)
+{
+ int i;
+
+ mutex_buf = malloc(CRYPTO_num_locks() * sizeof(MUTEX_TYPE));
+ if(!mutex_buf)
+ return 0;
+ for(i = 0; i < CRYPTO_num_locks(); i++)
+ MUTEX_SETUP(mutex_buf[i]);
+ CRYPTO_set_id_callback(id_function);
+ CRYPTO_set_locking_callback(locking_function);
+ return 1;
+}
+
+int thread_cleanup(void)
+{
+ int i;
+
+ if(!mutex_buf)
+ return 0;
+ CRYPTO_set_id_callback(NULL);
+ CRYPTO_set_locking_callback(NULL);
+ for(i = 0; i < CRYPTO_num_locks(); i++)
+ MUTEX_CLEANUP(mutex_buf[i]);
+ free(mutex_buf);
+ mutex_buf = NULL;
+ return 1;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/parseurl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/parseurl.c
new file mode 100755
index 0000000..d6682d7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/parseurl.c
@@ -0,0 +1,80 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Basic URL API use.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+#if !CURL_AT_LEAST_VERSION(7, 62, 0)
+#error "this example requires curl 7.62.0 or later"
+#endif
+
+int main(void)
+{
+ CURLU *h;
+ CURLUcode uc;
+ char *host;
+ char *path;
+
+ h = curl_url(); /* get a handle to work with */
+ if(!h)
+ return 1;
+
+ /* parse a full URL */
+ uc = curl_url_set(h, CURLUPART_URL, "http://example.com/path/index.html", 0);
+ if(uc)
+ goto fail;
+
+ /* extract host name from the parsed URL */
+ uc = curl_url_get(h, CURLUPART_HOST, &host, 0);
+ if(!uc) {
+ printf("Host name: %s\n", host);
+ curl_free(host);
+ }
+
+ /* extract the path from the parsed URL */
+ uc = curl_url_get(h, CURLUPART_PATH, &path, 0);
+ if(!uc) {
+ printf("Path: %s\n", path);
+ curl_free(path);
+ }
+
+ /* redirect with a relative URL */
+ uc = curl_url_set(h, CURLUPART_URL, "../another/second.html", 0);
+ if(uc)
+ goto fail;
+
+ /* extract the new, updated path */
+ uc = curl_url_get(h, CURLUPART_PATH, &path, 0);
+ if(!uc) {
+ printf("Path: %s\n", path);
+ curl_free(path);
+ }
+
+ fail:
+ curl_url_cleanup(h); /* free url handle */
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/persistent.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/persistent.c
new file mode 100755
index 0000000..6ddfc40
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/persistent.c
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * re-using handles to do HTTP persistent connections
+ * </DESC>
+ */
+#include <stdio.h>
+#include <unistd.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+
+ /* get the first document */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* get another document from the same server using the same
+ connection */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/docs/");
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-authzid.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-authzid.c
new file mode 100755
index 0000000..8e0c2f2
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-authzid.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to retrieve emails from a shared mailbox
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.66.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set the username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* Set the authorization identity (identity to act as) */
+ curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "shared-mailbox");
+
+ /* Force PLAIN authentication */
+ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-dele.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-dele.c
new file mode 100755
index 0000000..d0281cb
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-dele.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to delete emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to delete an existing mail using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* You can specify the message either in the URL or DELE command */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Set the DELE command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELE");
+
+ /* Do not perform a transfer as DELE returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-list.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-list.c
new file mode 100755
index 0000000..991ff24
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-list.c
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example to list the contents of a mailbox
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will list every message of the given mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Perform the list */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-multi.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-multi.c
new file mode 100755
index 0000000..69a1088
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-multi.c
@@ -0,0 +1,84 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example using the multi interface
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example to demonstrate how to use
+ * libcurl's multi interface.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ do {
+ CURLMcode mc = curl_multi_perform(mcurl, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ } while(still_running);
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-noop.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-noop.c
new file mode 100755
index 0000000..a3ecb88
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-noop.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to perform a noop
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to perform a noop using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the NOOP command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOOP");
+
+ /* Do not perform a transfer as NOOP returns no data */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-retr.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-retr.c
new file mode 100755
index 0000000..1df0657
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-retr.c
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to retrieve emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-ssl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-ssl.c
new file mode 100755
index 0000000..6f3455a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-ssl.c
@@ -0,0 +1,93 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example using SSL
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox. Note the use of
+ * pop3s:// rather than pop3:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3s://pop.example.com/1");
+
+ /* If you want to connect to a site who is not using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you are connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-stat.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-stat.c
new file mode 100755
index 0000000..3df3571
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-stat.c
@@ -0,0 +1,72 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to obtain message statistics
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to obtain message statistics using
+ * libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the STAT command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "STAT");
+
+ /* Do not perform a transfer as the data is in the response */
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-tls.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-tls.c
new file mode 100755
index 0000000..d58b5e4
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-tls.c
@@ -0,0 +1,93 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example using TLS
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve mail using libcurl's POP3
+ * capabilities. It builds on the pop3-retr.c example adding transport
+ * security to protect the authentication details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This will retrieve message 1 from the user's mailbox */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com/1");
+
+ /* In this example, we will start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STLS command. Be careful of
+ * using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server does not have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ *
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though. Instead, you should get
+ * the issuer certificate (or the host certificate if the certificate is
+ * self-signed) and add it to the set of certificates that are known to
+ * libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See docs/SSLCERTS
+ * for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Perform the retr */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-top.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-top.c
new file mode 100755
index 0000000..c63b43c
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-top.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example showing how to retrieve only the headers of an email
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to retrieve only the headers of a mail
+ * using libcurl's POP3 capabilities.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the TOP command for message 1 to only include the headers */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TOP 1 0");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-uidl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-uidl.c
new file mode 100755
index 0000000..308de3b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/pop3-uidl.c
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * POP3 example to list the contents of a mailbox by unique ID
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* This is a simple example using libcurl's POP3 capabilities to list the
+ * contents of a mailbox by unique ID.
+ *
+ * Note that this example requires libcurl 7.26.0 or above.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is just the server URL */
+ curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop.example.com");
+
+ /* Set the UIDL command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "UIDL");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/post-callback.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/post-callback.c
new file mode 100755
index 0000000..dabcef0
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/post-callback.c
@@ -0,0 +1,156 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Issue an HTTP POST and provide the data through the read callback.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* silly test data to POST */
+static const char data[]="Lorem ipsum dolor sit amet, consectetur adipiscing "
+ "elit. Sed vel urna neque. Ut quis leo metus. Quisque eleifend, ex at "
+ "laoreet rhoncus, odio ipsum semper metus, at tempus ante urna in mauris. "
+ "Suspendisse ornare tempor venenatis. Ut dui neque, pellentesque a varius "
+ "eget, mattis vitae ligula. Fusce ut pharetra est. Ut ullamcorper mi ac "
+ "sollicitudin semper. Praesent sit amet tellus varius, posuere nulla non, "
+ "rhoncus ipsum.";
+
+struct WriteThis {
+ const char *readptr;
+ size_t sizeleft;
+};
+
+static size_t read_callback(char *dest, size_t size, size_t nmemb, void *userp)
+{
+ struct WriteThis *wt = (struct WriteThis *)userp;
+ size_t buffer_size = size*nmemb;
+
+ if(wt->sizeleft) {
+ /* copy as much as possible from the source to the destination */
+ size_t copy_this_much = wt->sizeleft;
+ if(copy_this_much > buffer_size)
+ copy_this_much = buffer_size;
+ memcpy(dest, wt->readptr, copy_this_much);
+
+ wt->readptr += copy_this_much;
+ wt->sizeleft -= copy_this_much;
+ return copy_this_much; /* we copied this many bytes */
+ }
+
+ return 0; /* no more data left to deliver */
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ struct WriteThis wt;
+
+ wt.readptr = data;
+ wt.sizeleft = strlen(data);
+
+ /* In windows, this will init the winsock stuff */
+ res = curl_global_init(CURL_GLOBAL_DEFAULT);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_global_init() failed: %s\n",
+ curl_easy_strerror(res));
+ return 1;
+ }
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+ if(curl) {
+ /* First set the URL that is about to receive our POST. */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/index.cgi");
+
+ /* Now specify we want to POST data */
+ curl_easy_setopt(curl, CURLOPT_POST, 1L);
+
+ /* we want to use our own read function */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
+
+ /* pointer to pass to our read function */
+ curl_easy_setopt(curl, CURLOPT_READDATA, &wt);
+
+ /* get verbose debug output please */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /*
+ If you use POST to a HTTP 1.1 server, you can send data without knowing
+ the size before starting the POST if you use chunked encoding. You
+ enable this by adding a header like "Transfer-Encoding: chunked" with
+ CURLOPT_HTTPHEADER. With HTTP 1.0 or without chunked transfer, you must
+ specify the size in the request.
+ */
+#ifdef USE_CHUNKED
+ {
+ struct curl_slist *chunk = NULL;
+
+ chunk = curl_slist_append(chunk, "Transfer-Encoding: chunked");
+ res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+ /* use curl_slist_free_all() after the *perform() call to free this
+ list again */
+ }
+#else
+ /* Set the expected POST size. If you want to POST large amounts of data,
+ consider CURLOPT_POSTFIELDSIZE_LARGE */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)wt.sizeleft);
+#endif
+
+#ifdef DISABLE_EXPECT
+ /*
+ Using POST with HTTP 1.1 implies the use of a "Expect: 100-continue"
+ header. You can disable this header with CURLOPT_HTTPHEADER as usual.
+ NOTE: if you want chunked transfer too, you need to combine these two
+ since you can only set one list of headers with CURLOPT_HTTPHEADER. */
+
+ /* A less good option would be to enforce HTTP 1.0, but that might also
+ have other implications. */
+ {
+ struct curl_slist *chunk = NULL;
+
+ chunk = curl_slist_append(chunk, "Expect:");
+ res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
+ /* use curl_slist_free_all() after the *perform() call to free this
+ list again */
+ }
+#endif
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/postinmemory.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/postinmemory.c
new file mode 100755
index 0000000..bbe1457
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/postinmemory.c
@@ -0,0 +1,114 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Make a HTTP POST with data from memory and receive response in memory.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+static size_t
+WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
+{
+ size_t realsize = size * nmemb;
+ struct MemoryStruct *mem = (struct MemoryStruct *)userp;
+
+ char *ptr = realloc(mem->memory, mem->size + realsize + 1);
+ if(!ptr) {
+ /* out of memory! */
+ printf("not enough memory (realloc returned NULL)\n");
+ return 0;
+ }
+
+ mem->memory = ptr;
+ memcpy(&(mem->memory[mem->size]), contents, realsize);
+ mem->size += realsize;
+ mem->memory[mem->size] = 0;
+
+ return realsize;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct MemoryStruct chunk;
+ static const char *postthis = "Field=1&Field=2&Field=3";
+
+ chunk.memory = malloc(1); /* will be grown as needed by realloc above */
+ chunk.size = 0; /* no data at this point */
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/");
+
+ /* send all data to this function */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
+
+ /* we pass our 'chunk' struct to the callback function */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
+
+ /* some servers do not like requests that are made without a user-agent
+ field, so we provide one */
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "libcurl-agent/1.0");
+
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
+
+ /* if we do not provide POSTFIELDSIZE, libcurl will strlen() by
+ itself */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else {
+ /*
+ * Now, our chunk.memory points to a memory block that is chunk.size
+ * bytes big and contains the remote file.
+ *
+ * Do something nice with it!
+ */
+ printf("%s\n",chunk.memory);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ free(chunk.memory);
+ curl_global_cleanup();
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2-formadd.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2-formadd.c
new file mode 100755
index 0000000..5027769
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2-formadd.c
@@ -0,0 +1,112 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP Multipart formpost with file upload and two additional parts.
+ * </DESC>
+ */
+
+/*
+ * Example code that uploads a file name 'foo' to a remote script that accepts
+ * "HTML form based" (as described in RFC1738) uploads using HTTP POST.
+ *
+ * Warning: this example uses the deprecated form api. See "postit2.c"
+ * for a similar example using the mime api.
+ *
+ * The imaginary form we will fill in looks like:
+ *
+ * <form method="post" enctype="multipart/form-data" action="examplepost.cgi">
+ * Enter file: <input type="file" name="sendfile" size="40">
+ * Enter file name: <input type="text" name="filename" size="30">
+ * <input type="submit" value="send" name="submit">
+ * </form>
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURL *curl;
+ CURLcode res;
+
+ struct curl_httppost *formpost = NULL;
+ struct curl_httppost *lastptr = NULL;
+ struct curl_slist *headerlist = NULL;
+ static const char buf[] = "Expect:";
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Fill in the file upload field */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "sendfile",
+ CURLFORM_FILE, "postit2-formadd.c",
+ CURLFORM_END);
+
+ /* Fill in the filename field */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "filename",
+ CURLFORM_COPYCONTENTS, "postit2-formadd.c",
+ CURLFORM_END);
+
+
+ /* Fill in the submit field too, even if this is rarely needed */
+ curl_formadd(&formpost,
+ &lastptr,
+ CURLFORM_COPYNAME, "submit",
+ CURLFORM_COPYCONTENTS, "send",
+ CURLFORM_END);
+
+ curl = curl_easy_init();
+ /* initialize custom header list (stating that Expect: 100-continue is not
+ wanted */
+ headerlist = curl_slist_append(headerlist, buf);
+ if(curl) {
+ /* what URL that receives this POST */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi");
+ if((argc == 2) && (!strcmp(argv[1], "noexpectheader")))
+ /* only disable 100-continue header if explicitly requested */
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
+ curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* then cleanup the formpost chain */
+ curl_formfree(formpost);
+ /* free slist */
+ curl_slist_free_all(headerlist);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2.c
new file mode 100755
index 0000000..5e9c609
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/postit2.c
@@ -0,0 +1,104 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * HTTP Multipart formpost with file upload and two additional parts.
+ * </DESC>
+ */
+/* Example code that uploads a file name 'foo' to a remote script that accepts
+ * "HTML form based" (as described in RFC1738) uploads using HTTP POST.
+ *
+ * The imaginary form we will fill in looks like:
+ *
+ * <form method="post" enctype="multipart/form-data" action="examplepost.cgi">
+ * Enter file: <input type="file" name="sendfile" size="40">
+ * Enter file name: <input type="text" name="filename" size="30">
+ * <input type="submit" value="send" name="submit">
+ * </form>
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include <curl/curl.h>
+
+int main(int argc, char *argv[])
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl_mime *form = NULL;
+ curl_mimepart *field = NULL;
+ struct curl_slist *headerlist = NULL;
+ static const char buf[] = "Expect:";
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Create the form */
+ form = curl_mime_init(curl);
+
+ /* Fill in the file upload field */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "sendfile");
+ curl_mime_filedata(field, "postit2.c");
+
+ /* Fill in the filename field */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "filename");
+ curl_mime_data(field, "postit2.c", CURL_ZERO_TERMINATED);
+
+ /* Fill in the submit field too, even if this is rarely needed */
+ field = curl_mime_addpart(form);
+ curl_mime_name(field, "submit");
+ curl_mime_data(field, "send", CURL_ZERO_TERMINATED);
+
+ /* initialize custom header list (stating that Expect: 100-continue is not
+ wanted */
+ headerlist = curl_slist_append(headerlist, buf);
+ /* what URL that receives this POST */
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/examplepost.cgi");
+ if((argc == 2) && (!strcmp(argv[1], "noexpectheader")))
+ /* only disable 100-continue header if explicitly requested */
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
+ curl_easy_setopt(curl, CURLOPT_MIMEPOST, form);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ /* then cleanup the form */
+ curl_mime_free(form);
+ /* free slist */
+ curl_slist_free_all(headerlist);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/progressfunc.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/progressfunc.c
new file mode 100755
index 0000000..be32b67
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/progressfunc.c
@@ -0,0 +1,97 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Use the progress callbacks, old and/or new one depending on available
+ * libcurl version.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+#define MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL 3000000
+#define STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES 6000
+
+struct myprogress {
+ curl_off_t lastruntime; /* type depends on version, see above */
+ CURL *curl;
+};
+
+/* this is how the CURLOPT_XFERINFOFUNCTION callback works */
+static int xferinfo(void *p,
+ curl_off_t dltotal, curl_off_t dlnow,
+ curl_off_t ultotal, curl_off_t ulnow)
+{
+ struct myprogress *myp = (struct myprogress *)p;
+ CURL *curl = myp->curl;
+ curl_off_t curtime = 0;
+
+ curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &curtime);
+
+ /* under certain circumstances it may be desirable for certain functionality
+ to only run every N seconds, in order to do this the transaction time can
+ be used */
+ if((curtime - myp->lastruntime) >= MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL) {
+ myp->lastruntime = curtime;
+ fprintf(stderr, "TOTAL TIME: %lu.%06lu\r\n",
+ (unsigned long)(curtime / 1000000),
+ (unsigned long)(curtime % 1000000));
+ }
+
+ fprintf(stderr, "UP: %lu of %lu DOWN: %lu of %lu\r\n",
+ (unsigned long)ulnow, (unsigned long)ultotal,
+ (unsigned long)dlnow, (unsigned long)dltotal);
+
+ if(dlnow > STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES)
+ return 1;
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct myprogress prog;
+
+ curl = curl_easy_init();
+ if(curl) {
+ prog.lastruntime = 0;
+ prog.curl = curl;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfo);
+ /* pass the struct pointer into the xferinfo function */
+ curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &prog);
+
+ curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
+ res = curl_easy_perform(curl);
+
+ if(res != CURLE_OK)
+ fprintf(stderr, "%s\n", curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/resolve.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/resolve.c
new file mode 100755
index 0000000..40bdfb3
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/resolve.c
@@ -0,0 +1,58 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Use CURLOPT_RESOLVE to feed custom IP addresses for given host name + port
+ * number combinations.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ /* Each single name resolve string should be written using the format
+ HOST:PORT:ADDRESS where HOST is the name libcurl will try to resolve,
+ PORT is the port number of the service where libcurl wants to connect to
+ the HOST and ADDRESS is the numerical IP address
+ */
+ struct curl_slist *host = curl_slist_append(NULL,
+ "example.com:443:127.0.0.1");
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_RESOLVE, host);
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ curl_slist_free_all(host);
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sendrecv.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sendrecv.c
new file mode 100755
index 0000000..7da740a
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sendrecv.c
@@ -0,0 +1,162 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * An example of curl_easy_send() and curl_easy_recv() usage.
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* Auxiliary function that waits on the socket. */
+static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms)
+{
+ struct timeval tv;
+ fd_set infd, outfd, errfd;
+ int res;
+
+ tv.tv_sec = timeout_ms / 1000;
+ tv.tv_usec = (timeout_ms % 1000) * 1000;
+
+ FD_ZERO(&infd);
+ FD_ZERO(&outfd);
+ FD_ZERO(&errfd);
+
+ FD_SET(sockfd, &errfd); /* always check for error */
+
+ if(for_recv) {
+ FD_SET(sockfd, &infd);
+ }
+ else {
+ FD_SET(sockfd, &outfd);
+ }
+
+ /* select() returns the number of signalled sockets or -1 */
+ res = select((int)sockfd + 1, &infd, &outfd, &errfd, &tv);
+ return res;
+}
+
+int main(void)
+{
+ CURL *curl;
+ /* Minimalistic http request */
+ const char *request = "GET / HTTP/1.0\r\nHost: example.com\r\n\r\n";
+ size_t request_len = strlen(request);
+
+ /* A general note of caution here: if you are using curl_easy_recv() or
+ curl_easy_send() to implement HTTP or _any_ other protocol libcurl
+ supports "natively", you are doing it wrong and you should stop.
+
+ This example uses HTTP only to show how to use this API, it does not
+ suggest that writing an application doing this is sensible.
+ */
+
+ curl = curl_easy_init();
+ if(curl) {
+ CURLcode res;
+ curl_socket_t sockfd;
+ size_t nsent_total = 0;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ /* Do not do the transfer - only connect to host */
+ curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
+ res = curl_easy_perform(curl);
+
+ if(res != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(res));
+ return 1;
+ }
+
+ /* Extract the socket from the curl handle - we will need it for
+ waiting. */
+ res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
+
+ if(res != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(res));
+ return 1;
+ }
+
+ printf("Sending request.\n");
+
+ do {
+ /* Warning: This example program may loop indefinitely.
+ * A production-quality program must define a timeout and exit this loop
+ * as soon as the timeout has expired. */
+ size_t nsent;
+ do {
+ nsent = 0;
+ res = curl_easy_send(curl, request + nsent_total,
+ request_len - nsent_total, &nsent);
+ nsent_total += nsent;
+
+ if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
+ printf("Error: timeout.\n");
+ return 1;
+ }
+ } while(res == CURLE_AGAIN);
+
+ if(res != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(res));
+ return 1;
+ }
+
+ printf("Sent %lu bytes.\n", (unsigned long)nsent);
+
+ } while(nsent_total < request_len);
+
+ printf("Reading response.\n");
+
+ for(;;) {
+ /* Warning: This example program may loop indefinitely (see above). */
+ char buf[1024];
+ size_t nread;
+ do {
+ nread = 0;
+ res = curl_easy_recv(curl, buf, sizeof(buf), &nread);
+
+ if(res == CURLE_AGAIN && !wait_on_socket(sockfd, 1, 60000L)) {
+ printf("Error: timeout.\n");
+ return 1;
+ }
+ } while(res == CURLE_AGAIN);
+
+ if(res != CURLE_OK) {
+ printf("Error: %s\n", curl_easy_strerror(res));
+ break;
+ }
+
+ if(nread == 0) {
+ /* end of the response */
+ break;
+ }
+
+ printf("Received %lu bytes.\n", (unsigned long)nread);
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sepheaders.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sepheaders.c
new file mode 100755
index 0000000..a398d05
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sepheaders.c
@@ -0,0 +1,96 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Simple HTTP GET that stores the headers in a separate file
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+int main(void)
+{
+ CURL *curl_handle;
+ static const char *headerfilename = "head.out";
+ FILE *headerfile;
+ static const char *bodyfilename = "body.out";
+ FILE *bodyfile;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* set URL to get */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, "https://example.com");
+
+ /* no progress meter please */
+ curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* open the header file */
+ headerfile = fopen(headerfilename, "wb");
+ if(!headerfile) {
+ curl_easy_cleanup(curl_handle);
+ return -1;
+ }
+
+ /* open the body file */
+ bodyfile = fopen(bodyfilename, "wb");
+ if(!bodyfile) {
+ curl_easy_cleanup(curl_handle);
+ fclose(headerfile);
+ return -1;
+ }
+
+ /* we want the headers be written to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_HEADERDATA, headerfile);
+
+ /* we want the body be written to this file handle instead of stdout */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, bodyfile);
+
+ /* get it! */
+ curl_easy_perform(curl_handle);
+
+ /* close the header file */
+ fclose(headerfile);
+
+ /* close the body file */
+ fclose(bodyfile);
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sessioninfo.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sessioninfo.c
new file mode 100755
index 0000000..4a848b9
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sessioninfo.c
@@ -0,0 +1,112 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Uses the CURLINFO_TLS_SESSION data.
+ * </DESC>
+ */
+
+/* Note that this example currently requires curl to be linked against
+ GnuTLS (and this program must also be linked against -lgnutls). */
+
+#include <stdio.h>
+
+#include <curl/curl.h>
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+static CURL *curl;
+
+static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ const struct curl_tlssessioninfo *info;
+ unsigned int cert_list_size;
+ const gnutls_datum_t *chainp;
+ CURLcode res;
+
+ (void)stream;
+ (void)ptr;
+
+ res = curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &info);
+
+ if(!res) {
+ switch(info->backend) {
+ case CURLSSLBACKEND_GNUTLS:
+ /* info->internals is now the gnutls_session_t */
+ chainp = gnutls_certificate_get_peers(info->internals, &cert_list_size);
+ if((chainp) && (cert_list_size)) {
+ unsigned int i;
+
+ for(i = 0; i < cert_list_size; i++) {
+ gnutls_x509_crt_t cert;
+ gnutls_datum_t dn;
+
+ if(GNUTLS_E_SUCCESS == gnutls_x509_crt_init(&cert)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
+ if(GNUTLS_E_SUCCESS ==
+ gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
+ fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);
+
+ gnutls_free(dn.data);
+ }
+ }
+
+ gnutls_x509_crt_deinit(cert);
+ }
+ }
+ }
+ break;
+ case CURLSSLBACKEND_NONE:
+ default:
+ break;
+ }
+ }
+
+ return size * nmemb;
+}
+
+int main(void)
+{
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
+
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wrfu);
+
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
+
+ (void) curl_easy_perform(curl);
+
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpget.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpget.c
new file mode 100755
index 0000000..05041b1
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpget.c
@@ -0,0 +1,112 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Gets a file using an SFTP URL.
+ * </DESC>
+ */
+
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+/* define this to switch off the use of ssh-agent in this program */
+#undef DISABLE_SSH_AGENT
+
+/*
+ * This is an example showing how to get a single file from an SFTP server.
+ * It delays the actual destination file creation until the first write
+ * callback so that it will not create an empty file in case the remote file
+ * does not exist or something else fails.
+ */
+
+struct FtpFile {
+ const char *filename;
+ FILE *stream;
+};
+
+static size_t my_fwrite(void *buffer, size_t size, size_t nmemb,
+ void *stream)
+{
+ struct FtpFile *out = (struct FtpFile *)stream;
+ if(!out->stream) {
+ /* open file for writing */
+ out->stream = fopen(out->filename, "wb");
+ if(!out->stream)
+ return -1; /* failure, cannot open file to write */
+ }
+ return fwrite(buffer, size, nmemb, out->stream);
+}
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct FtpFile ftpfile = {
+ "yourfile.bin", /* name to store the file as if successful */
+ NULL
+ };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /*
+ * You better replace the URL with one that works!
+ */
+ curl_easy_setopt(curl, CURLOPT_URL,
+ "sftp://user@server/home/user/file.txt");
+ /* Define our callback to get called when there's data to be written */
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
+ /* Set a pointer to our struct to pass to the callback */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
+
+#ifndef DISABLE_SSH_AGENT
+ /* We activate ssh agent. For this to work you need
+ to have ssh-agent running (type set | grep SSH_AGENT to check) or
+ pageant on Windows (there is an icon in systray if so) */
+ curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES, CURLSSH_AUTH_AGENT);
+#endif
+
+ /* Switch on full protocol/debug output */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+
+ if(CURLE_OK != res) {
+ /* we failed */
+ fprintf(stderr, "curl told us %d\n", res);
+ }
+ }
+
+ if(ftpfile.stream)
+ fclose(ftpfile.stream); /* close the local file */
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpuploadresume.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpuploadresume.c
new file mode 100755
index 0000000..7c72e5d
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sftpuploadresume.c
@@ -0,0 +1,137 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Upload to SFTP, resuming a previously aborted transfer.
+ * </DESC>
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <curl/curl.h>
+
+/* read data to upload */
+static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream)
+{
+ FILE *f = (FILE *)stream;
+ size_t n;
+
+ if(ferror(f))
+ return CURL_READFUNC_ABORT;
+
+ n = fread(ptr, size, nmemb, f) * size;
+
+ return n;
+}
+
+/*
+ * sftpGetRemoteFileSize returns the remote file size in byte; -1 on error
+ */
+static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
+{
+ CURLcode result = CURLE_GOT_NOTHING;
+ curl_off_t remoteFileSizeByte = -1;
+ CURL *curlHandlePtr = curl_easy_init();
+
+ curl_easy_setopt(curlHandlePtr, CURLOPT_VERBOSE, 1L);
+
+ curl_easy_setopt(curlHandlePtr, CURLOPT_URL, i_remoteFile);
+ curl_easy_setopt(curlHandlePtr, CURLOPT_NOPROGRESS, 1);
+ curl_easy_setopt(curlHandlePtr, CURLOPT_NOBODY, 1);
+ curl_easy_setopt(curlHandlePtr, CURLOPT_HEADER, 1);
+ curl_easy_setopt(curlHandlePtr, CURLOPT_FILETIME, 1);
+
+ result = curl_easy_perform(curlHandlePtr);
+ if(CURLE_OK == result) {
+ result = curl_easy_getinfo(curlHandlePtr,
+ CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
+ &remoteFileSizeByte);
+ if(result)
+ return -1;
+ printf("filesize: %lu\n", (unsigned long)remoteFileSizeByte);
+ }
+ curl_easy_cleanup(curlHandlePtr);
+
+ return remoteFileSizeByte;
+}
+
+
+static int sftpResumeUpload(CURL *curlhandle, const char *remotepath,
+ const char *localpath)
+{
+ FILE *f = NULL;
+ CURLcode result = CURLE_GOT_NOTHING;
+
+ curl_off_t remoteFileSizeByte = sftpGetRemoteFileSize(remotepath);
+ if(-1 == remoteFileSizeByte) {
+ printf("Error reading the remote file size: unable to resume upload\n");
+ return -1;
+ }
+
+ f = fopen(localpath, "rb");
+ if(!f) {
+ perror(NULL);
+ return 0;
+ }
+
+ curl_easy_setopt(curlhandle, CURLOPT_UPLOAD, 1L);
+ curl_easy_setopt(curlhandle, CURLOPT_URL, remotepath);
+ curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
+ curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
+
+#ifdef _WIN32
+ _fseeki64(f, remoteFileSizeByte, SEEK_SET);
+#else
+ fseek(f, (long)remoteFileSizeByte, SEEK_SET);
+#endif
+ curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
+ result = curl_easy_perform(curlhandle);
+
+ fclose(f);
+
+ if(result == CURLE_OK)
+ return 1;
+ else {
+ fprintf(stderr, "%s\n", curl_easy_strerror(result));
+ return 0;
+ }
+}
+
+int main(void)
+{
+ const char *remote = "sftp://user:pass@example.com/path/filename";
+ const char *filename = "filename";
+ CURL *curlhandle = NULL;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ curlhandle = curl_easy_init();
+
+ if(!sftpResumeUpload(curlhandle, remote, filename)) {
+ printf("resumed upload using curl %s failed\n", curl_version());
+ }
+
+ curl_easy_cleanup(curlhandle);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/shared-connection-cache.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/shared-connection-cache.c
new file mode 100755
index 0000000..ac9eb54
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/shared-connection-cache.c
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Connection cache shared between easy handles with the share interface
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+static void my_lock(CURL *handle, curl_lock_data data,
+ curl_lock_access laccess, void *useptr)
+{
+ (void)handle;
+ (void)data;
+ (void)laccess;
+ (void)useptr;
+ fprintf(stderr, "-> Mutex lock\n");
+}
+
+static void my_unlock(CURL *handle, curl_lock_data data, void *useptr)
+{
+ (void)handle;
+ (void)data;
+ (void)useptr;
+ fprintf(stderr, "<- Mutex unlock\n");
+}
+
+int main(void)
+{
+ CURLSH *share;
+ int i;
+
+ share = curl_share_init();
+ curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
+
+ curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock);
+ curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock);
+
+ /* Loop the transfer and cleanup the handle properly every lap. This will
+ still reuse connections since the pool is in the shared object! */
+
+ for(i = 0; i < 3; i++) {
+ CURL *curl = curl_easy_init();
+ if(curl) {
+ CURLcode res;
+
+ curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
+
+ /* use the share object */
+ curl_easy_setopt(curl, CURLOPT_SHARE, share);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ }
+
+ curl_share_cleanup(share);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/simple.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/simple.c
new file mode 100755
index 0000000..38134c3
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/simple.c
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Very simple HTTP GET
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ /* example.com is redirected, so we tell libcurl to follow redirection */
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/simplepost.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/simplepost.c
new file mode 100755
index 0000000..95564d7
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/simplepost.c
@@ -0,0 +1,59 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Very simple HTTP POST
+ * </DESC>
+ */
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ static const char *postthis = "moo mooo moo moo";
+
+ curl = curl_easy_init();
+ if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postthis);
+
+ /* if we do not provide POSTFIELDSIZE, libcurl will strlen() by
+ itself */
+ curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, (long)strlen(postthis));
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/simplessl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/simplessl.c
new file mode 100755
index 0000000..879672b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/simplessl.c
@@ -0,0 +1,143 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Shows HTTPS usage with client certs and optional ssl engine use.
+ * </DESC>
+ */
+#include <stdio.h>
+
+#include <curl/curl.h>
+
+/* some requirements for this to work:
+ 1. set pCertFile to the file with the client certificate
+ 2. if the key is passphrase protected, set pPassphrase to the
+ passphrase you use
+ 3. if you are using a crypto engine:
+ 3.1. set a #define USE_ENGINE
+ 3.2. set pEngine to the name of the crypto engine you use
+ 3.3. set pKeyName to the key identifier you want to use
+ 4. if you do not use a crypto engine:
+ 4.1. set pKeyName to the file name of your client key
+ 4.2. if the format of the key file is DER, set pKeyType to "DER"
+
+ !! verify of the server certificate is not implemented here !!
+
+ **** This example only works with libcurl 7.9.3 and later! ****
+
+*/
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ FILE *headerfile;
+ const char *pPassphrase = NULL;
+
+ static const char *pCertFile = "testcert.pem";
+ static const char *pCACertFile = "cacert.pem";
+ static const char *pHeaderFile = "dumpit";
+
+ const char *pKeyName;
+ const char *pKeyType;
+
+ const char *pEngine;
+
+#ifdef USE_ENGINE
+ pKeyName = "rsa_test";
+ pKeyType = "ENG";
+ pEngine = "chil"; /* for nChiper HSM... */
+#else
+ pKeyName = "testkey.pem";
+ pKeyType = "PEM";
+ pEngine = NULL;
+#endif
+
+ headerfile = fopen(pHeaderFile, "wb");
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* what call to write: */
+ curl_easy_setopt(curl, CURLOPT_URL, "HTTPS://your.favourite.ssl.site");
+ curl_easy_setopt(curl, CURLOPT_HEADERDATA, headerfile);
+
+ do { /* dummy loop, just to break out from */
+ if(pEngine) {
+ /* use crypto engine */
+ if(curl_easy_setopt(curl, CURLOPT_SSLENGINE, pEngine) != CURLE_OK) {
+ /* load the crypto engine */
+ fprintf(stderr, "cannot set crypto engine\n");
+ break;
+ }
+ if(curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L) != CURLE_OK) {
+ /* set the crypto engine as default */
+ /* only needed for the first time you load
+ a engine in a curl object... */
+ fprintf(stderr, "cannot set crypto engine as default\n");
+ break;
+ }
+ }
+ /* cert is stored PEM coded in file... */
+ /* since PEM is default, we needn't set it for PEM */
+ curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
+
+ /* set the cert for client authentication */
+ curl_easy_setopt(curl, CURLOPT_SSLCERT, pCertFile);
+
+ /* sorry, for engine we must set the passphrase
+ (if the key has one...) */
+ if(pPassphrase)
+ curl_easy_setopt(curl, CURLOPT_KEYPASSWD, pPassphrase);
+
+ /* if we use a key stored in a crypto engine,
+ we must set the key type to "ENG" */
+ curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, pKeyType);
+
+ /* set the private key (file or ID in engine) */
+ curl_easy_setopt(curl, CURLOPT_SSLKEY, pKeyName);
+
+ /* set the file with the certs vaildating the server */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, pCACertFile);
+
+ /* disconnect if we cannot validate server's cert */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
+
+ /* Perform the request, res will get the return code */
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* we are done... */
+ } while(0);
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smooth-gtk-thread.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smooth-gtk-thread.c
new file mode 100755
index 0000000..c992374
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smooth-gtk-thread.c
@@ -0,0 +1,218 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * A multi threaded application that uses a progress bar to show
+ * status. It uses Gtk+ to make a smooth pulse.
+ * </DESC>
+ */
+/*
+ * Written by Jud Bishop after studying the other examples provided with
+ * libcurl.
+ *
+ * To compile (on a single line):
+ * gcc -ggdb `pkg-config --cflags --libs gtk+-2.0` -lcurl -lssl -lcrypto
+ * -lgthread-2.0 -dl smooth-gtk-thread.c -o smooth-gtk-thread
+ */
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <unistd.h>
+#include <pthread.h>
+
+#include <curl/curl.h>
+
+#define NUMT 4
+
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+int j = 0;
+gint num_urls = 9; /* Just make sure this is less than urls[]*/
+const char * const urls[]= {
+ "90022",
+ "90023",
+ "90024",
+ "90025",
+ "90026",
+ "90027",
+ "90028",
+ "90029",
+ "90030"
+};
+
+size_t write_file(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+ return fwrite(ptr, size, nmemb, stream);
+}
+
+static void run_one(gchar *http, int j)
+{
+ FILE *outfile = fopen(urls[j], "wb");
+ CURL *curl;
+
+ curl = curl_easy_init();
+ if(curl) {
+ printf("j = %d\n", j);
+
+ /* Set the URL and transfer type */
+ curl_easy_setopt(curl, CURLOPT_URL, http);
+
+ /* Write to the file */
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_file);
+ curl_easy_perform(curl);
+
+ fclose(outfile);
+ curl_easy_cleanup(curl);
+ }
+}
+
+void *pull_one_url(void *NaN)
+{
+ /* protect the reading and increasing of 'j' with a mutex */
+ pthread_mutex_lock(&lock);
+ while(j < num_urls) {
+ int i = j;
+ j++;
+ pthread_mutex_unlock(&lock);
+ http = g_strdup_printf("https://example.com/%s", urls[i]);
+ if(http) {
+ run_one(http, i);
+ g_free(http);
+ }
+ pthread_mutex_lock(&lock);
+ }
+ pthread_mutex_unlock(&lock);
+ return NULL;
+}
+
+
+gboolean pulse_bar(gpointer data)
+{
+ gdk_threads_enter();
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR (data));
+ gdk_threads_leave();
+
+ /* Return true so the function will be called again;
+ * returning false removes this timeout function.
+ */
+ return TRUE;
+}
+
+void *create_thread(void *progress_bar)
+{
+ pthread_t tid[NUMT];
+ int i;
+
+ /* Make sure I do not create more threads than urls. */
+ for(i = 0; i < NUMT && i < num_urls ; i++) {
+ int error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ NULL);
+ if(0 != error)
+ fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ else
+ fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
+ }
+
+ /* Wait for all threads to terminate. */
+ for(i = 0; i < NUMT && i < num_urls; i++) {
+ pthread_join(tid[i], NULL);
+ fprintf(stderr, "Thread %d terminated\n", i);
+ }
+
+ /* This stops the pulsing if you have it turned on in the progress bar
+ section */
+ g_source_remove(GPOINTER_TO_INT(g_object_get_data(G_OBJECT(progress_bar),
+ "pulse_id")));
+
+ /* This destroys the progress bar */
+ gtk_widget_destroy(progress_bar);
+
+ /* [Un]Comment this out to kill the program rather than pushing close. */
+ /* gtk_main_quit(); */
+
+
+ return NULL;
+
+}
+
+static gboolean cb_delete(GtkWidget *window, gpointer data)
+{
+ gtk_main_quit();
+ return FALSE;
+}
+
+int main(int argc, char **argv)
+{
+ GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* Init thread */
+ g_thread_init(NULL);
+ gdk_threads_init();
+ gdk_threads_enter();
+
+ gtk_init(&argc, &argv);
+
+ /* Base window */
+ top_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+
+ /* Frame */
+ outside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(outside_frame), GTK_SHADOW_OUT);
+ gtk_container_add(GTK_CONTAINER(top_window), outside_frame);
+
+ /* Frame */
+ inside_frame = gtk_frame_new(NULL);
+ gtk_frame_set_shadow_type(GTK_FRAME(inside_frame), GTK_SHADOW_IN);
+ gtk_container_set_border_width(GTK_CONTAINER(inside_frame), 5);
+ gtk_container_add(GTK_CONTAINER(outside_frame), inside_frame);
+
+ /* Progress bar */
+ progress_bar = gtk_progress_bar_new();
+ gtk_progress_bar_pulse(GTK_PROGRESS_BAR (progress_bar));
+ /* Make uniform pulsing */
+ gint pulse_ref = g_timeout_add(300, pulse_bar, progress_bar);
+ g_object_set_data(G_OBJECT(progress_bar), "pulse_id",
+ GINT_TO_POINTER(pulse_ref));
+ gtk_container_add(GTK_CONTAINER(inside_frame), progress_bar);
+
+ gtk_widget_show_all(top_window);
+ printf("gtk_widget_show_all\n");
+
+ g_signal_connect(G_OBJECT (top_window), "delete-event",
+ G_CALLBACK(cb_delete), NULL);
+
+ if(!g_thread_create(&create_thread, progress_bar, FALSE, NULL) != 0)
+ g_warning("cannot create the thread");
+
+ gtk_main();
+ gdk_threads_leave();
+ printf("gdk_threads_leave\n");
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-authzid.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-authzid.c
new file mode 100755
index 0000000..d48a811
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-authzid.c
@@ -0,0 +1,162 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * Send email on behalf of another user with SMTP
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/*
+ * This is a simple example show how to send an email using libcurl's SMTP
+ * capabilities.
+ *
+ * Note that this example requires libcurl 7.66.0 or above.
+ */
+
+/* The libcurl options want plain addresses, the viewable headers in the mail
+ * can very well get a full name as well.
+ */
+#define FROM_ADDR "<ursel@example.org>"
+#define SENDER_ADDR "<kurt@example.org>"
+#define TO_ADDR "<addressee@example.net>"
+
+#define FROM_MAIL "Ursel " FROM_ADDR
+#define SENDER_MAIL "Kurt " SENDER_ADDR
+#define TO_MAIL "A Receiver " TO_ADDR
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO_MAIL "\r\n"
+ "From: " FROM_MAIL "\r\n"
+ "Sender: " SENDER_MAIL "\r\n"
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>\r\n"
+ "Subject: SMTP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx = { 0 };
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver. In this example we connect to the
+ smtp-submission port as we require an authenticated connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com:587");
+
+ /* Set the username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "kurt");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "xipj3plmq");
+
+ /* Set the authorization identity (identity to act as) */
+ curl_easy_setopt(curl, CURLOPT_SASL_AUTHZID, "ursel");
+
+ /* Force PLAIN authentication */
+ curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=PLAIN");
+
+ /* Note that this option is not strictly required, omitting it will result
+ * in libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise,
+ * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
+ * details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_ADDR);
+
+ /* Add a recipient, in this particular case it corresponds to the
+ * To: addressee in the header. */
+ recipients = curl_slist_append(recipients, TO_ADDR);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We are using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl will not send the QUIT command until you call cleanup, so you
+ * should be able to re-use this connection for additional messages
+ * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and
+ * calling curl_easy_perform() again. It may not be a good idea to keep
+ * the connection open for a very long time though (more than a few
+ * minutes may result in the server timing out the connection), and you do
+ * want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-expn.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-expn.c
new file mode 100755
index 0000000..6d9d4a4
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-expn.c
@@ -0,0 +1,81 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example showing how to expand an email mailing list
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to expand an email mailing list.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "Friends");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Set the EXPN command */
+ curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "EXPN");
+
+ /* Perform the custom request */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl will not send the QUIT command until you call cleanup, so you
+ * should be able to re-use this connection for additional requests. It
+ * may not be a good idea to keep the connection open for a very long time
+ * though (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mail.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mail.c
new file mode 100755
index 0000000..5f3fcfd
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mail.c
@@ -0,0 +1,150 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * Send email with SMTP
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/*
+ * For an SMTP example using the multi interface please see smtp-multi.c.
+ */
+
+/* The libcurl options want plain addresses, the viewable headers in the mail
+ * can very well get a full name as well.
+ */
+#define FROM_ADDR "<sender@example.org>"
+#define TO_ADDR "<addressee@example.net>"
+#define CC_ADDR "<info@example.org>"
+
+#define FROM_MAIL "Sender Person " FROM_ADDR
+#define TO_MAIL "A Receiver " TO_ADDR
+#define CC_MAIL "John CC Smith " CC_ADDR
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO_MAIL "\r\n"
+ "From: " FROM_MAIL "\r\n"
+ "Cc: " CC_MAIL "\r\n"
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>\r\n"
+ "Subject: SMTP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx = { 0 };
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option is not strictly required, omitting it will result
+ * in libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise,
+ * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
+ * details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_ADDR);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO_ADDR);
+ recipients = curl_slist_append(recipients, CC_ADDR);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We are using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl will not send the QUIT command until you call cleanup, so you
+ * should be able to re-use this connection for additional messages
+ * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and
+ * calling curl_easy_perform() again. It may not be a good idea to keep
+ * the connection open for a very long time though (more than a few
+ * minutes may result in the server timing out the connection), and you do
+ * want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mime.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mime.c
new file mode 100755
index 0000000..ce95582
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-mime.c
@@ -0,0 +1,165 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example showing how to send mime emails
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mime mail using libcurl's SMTP
+ * capabilities. For an example of using the multi interface please see
+ * smtp-multi.c.
+ *
+ * Note that this example requires libcurl 7.56.0 or above.
+ */
+
+#define FROM "<sender@example.org>"
+#define TO "<addressee@example.net>"
+#define CC "<info@example.org>"
+
+static const char *headers_text[] = {
+ "Date: Tue, 22 Aug 2017 14:08:43 +0100",
+ "To: " TO,
+ "From: " FROM " (Example User)",
+ "Cc: " CC " (Another example User)",
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>",
+ "Subject: example sending a MIME-formatted message",
+ NULL
+};
+
+static const char inline_text[] =
+ "This is the inline text message of the email.\r\n"
+ "\r\n"
+ " It could be a lot of lines that would be displayed in an email\r\n"
+ "viewer that is not able to handle HTML.\r\n";
+
+static const char inline_html[] =
+ "<html><body>\r\n"
+ "<p>This is the inline <b>HTML</b> message of the email.</p>"
+ "<br />\r\n"
+ "<p>It could be a lot of HTML data that would be displayed by "
+ "email viewers able to handle HTML.</p>"
+ "</body></html>\r\n";
+
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+
+ curl = curl_easy_init();
+ if(curl) {
+ struct curl_slist *headers = NULL;
+ struct curl_slist *recipients = NULL;
+ struct curl_slist *slist = NULL;
+ curl_mime *mime;
+ curl_mime *alt;
+ curl_mimepart *part;
+ const char **cpp;
+
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option is not strictly required, omitting it will result
+ * in libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise,
+ * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
+ * details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO);
+ recipients = curl_slist_append(recipients, CC);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Build and set the message header list. */
+ for(cpp = headers_text; *cpp; cpp++)
+ headers = curl_slist_append(headers, *cpp);
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+
+ /* Build the mime message. */
+ mime = curl_mime_init(curl);
+
+ /* The inline part is an alternative proposing the html and the text
+ versions of the email. */
+ alt = curl_mime_init(curl);
+
+ /* HTML message. */
+ part = curl_mime_addpart(alt);
+ curl_mime_data(part, inline_html, CURL_ZERO_TERMINATED);
+ curl_mime_type(part, "text/html");
+
+ /* Text message. */
+ part = curl_mime_addpart(alt);
+ curl_mime_data(part, inline_text, CURL_ZERO_TERMINATED);
+
+ /* Create the inline part. */
+ part = curl_mime_addpart(mime);
+ curl_mime_subparts(part, alt);
+ curl_mime_type(part, "multipart/alternative");
+ slist = curl_slist_append(NULL, "Content-Disposition: inline");
+ curl_mime_headers(part, slist, 1);
+
+ /* Add the current source program as an attachment. */
+ part = curl_mime_addpart(mime);
+ curl_mime_filedata(part, "smtp-mime.c");
+ curl_easy_setopt(curl, CURLOPT_MIMEPOST, mime);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free lists. */
+ curl_slist_free_all(recipients);
+ curl_slist_free_all(headers);
+
+ /* curl will not send the QUIT command until you call cleanup, so you
+ * should be able to re-use this connection for additional messages
+ * (setting CURLOPT_MAIL_FROM and CURLOPT_MAIL_RCPT as required, and
+ * calling curl_easy_perform() again. It may not be a good idea to keep
+ * the connection open for a very long time though (more than a few
+ * minutes may result in the server timing out the connection), and you do
+ * want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+
+ /* Free multipart message. */
+ curl_mime_free(mime);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-multi.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-multi.c
new file mode 100755
index 0000000..385827c
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-multi.c
@@ -0,0 +1,153 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example using the multi interface
+ * </DESC>
+ */
+
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is an example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to demonstrate how to use
+ * libcurl's multi interface.
+ */
+
+#define FROM_MAIL "<sender@example.com>"
+#define TO_MAIL "<recipient@example.com>"
+#define CC_MAIL "<info@example.com>"
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO_MAIL "\r\n"
+ "From: " FROM_MAIL "\r\n"
+ "Cc: " CC_MAIL "\r\n"
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>\r\n"
+ "Subject: SMTP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLM *mcurl;
+ int still_running = 1;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx = { 0 };
+
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+
+ curl = curl_easy_init();
+ if(!curl)
+ return 1;
+
+ mcurl = curl_multi_init();
+ if(!mcurl)
+ return 2;
+
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that this option is not strictly required, omitting it will result in
+ * libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise, they
+ * could cause an endless loop. See RFC 5321 Section 4.5.5 for more details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO_MAIL);
+ recipients = curl_slist_append(recipients, CC_MAIL);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We are using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Tell the multi stack about our easy handle */
+ curl_multi_add_handle(mcurl, curl);
+
+ do {
+ CURLMcode mc = curl_multi_perform(mcurl, &still_running);
+
+ if(still_running)
+ /* wait for activity, timeout or "nothing" */
+ mc = curl_multi_poll(mcurl, NULL, 0, 1000, NULL);
+
+ if(mc)
+ break;
+
+ } while(still_running);
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_multi_remove_handle(mcurl, curl);
+ curl_multi_cleanup(mcurl);
+ curl_easy_cleanup(curl);
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-ssl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-ssl.c
new file mode 100755
index 0000000..70b2045
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-ssl.c
@@ -0,0 +1,170 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example using SSL
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM_MAIL "<sender@example.com>"
+#define TO_MAIL "<recipient@example.com>"
+#define CC_MAIL "<info@example.com>"
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO_MAIL "\r\n"
+ "From: " FROM_MAIL "\r\n"
+ "Cc: " CC_MAIL "\r\n"
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>\r\n"
+ "Subject: SMTP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx = { 0 };
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of smtps:// rather
+ * than smtp:// to request a SSL based connection. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtps://mainserver.example.net");
+
+ /* If you want to connect to a site who is not using a certificate that is
+ * signed by one of the certs in the CA bundle you have, you can skip the
+ * verification of the server's certificate. This makes the connection
+ * A LOT LESS SECURE.
+ *
+ * If you have a CA cert for the server stored someplace else than in the
+ * default bundle, then the CURLOPT_CAPATH option might come handy for
+ * you. */
+#ifdef SKIP_PEER_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+
+ /* If the site you are connecting to uses a different host name that what
+ * they have mentioned in their server certificate's commonName (or
+ * subjectAltName) fields, libcurl will refuse to connect. You can skip
+ * this check, but this will make the connection less secure. */
+#ifdef SKIP_HOSTNAME_VERIFICATION
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+#endif
+
+ /* Note that this option is not strictly required, omitting it will result
+ * in libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise,
+ * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
+ * details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO_MAIL);
+ recipients = curl_slist_append(recipients, CC_MAIL);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We are using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the
+ * transfer */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-tls.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-tls.c
new file mode 100755
index 0000000..e30f478
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-tls.c
@@ -0,0 +1,172 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example using TLS
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to send mail using libcurl's SMTP
+ * capabilities. It builds on the smtp-mail.c example to add authentication
+ * and, more importantly, transport security to protect the authentication
+ * details from being snooped.
+ *
+ * Note that this example requires libcurl 7.20.0 or above.
+ */
+
+#define FROM_MAIL "<sender@example.com>"
+#define TO_MAIL "<recipient@example.com>"
+#define CC_MAIL "<info@example.com>"
+
+static const char *payload_text =
+ "Date: Mon, 29 Nov 2010 21:54:29 +1100\r\n"
+ "To: " TO_MAIL "\r\n"
+ "From: " FROM_MAIL "\r\n"
+ "Cc: " CC_MAIL "\r\n"
+ "Message-ID: <dcd7cb36-11db-487a-9f3a-e652a9458efd@"
+ "rfcpedant.example.org>\r\n"
+ "Subject: SMTP example message\r\n"
+ "\r\n" /* empty line to divide headers from body, see RFC5322 */
+ "The body of the message starts here.\r\n"
+ "\r\n"
+ "It could be a lot of lines, could be MIME encoded, whatever.\r\n"
+ "Check RFC5322.\r\n";
+
+struct upload_status {
+ size_t bytes_read;
+};
+
+static size_t payload_source(char *ptr, size_t size, size_t nmemb, void *userp)
+{
+ struct upload_status *upload_ctx = (struct upload_status *)userp;
+ const char *data;
+ size_t room = size * nmemb;
+
+ if((size == 0) || (nmemb == 0) || ((size*nmemb) < 1)) {
+ return 0;
+ }
+
+ data = &payload_text[upload_ctx->bytes_read];
+
+ if(data) {
+ size_t len = strlen(data);
+ if(room < len)
+ len = room;
+ memcpy(ptr, data, len);
+ upload_ctx->bytes_read += len;
+
+ return len;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res = CURLE_OK;
+ struct curl_slist *recipients = NULL;
+ struct upload_status upload_ctx = { 0 };
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* Set username and password */
+ curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
+
+ /* This is the URL for your mailserver. Note the use of port 587 here,
+ * instead of the normal SMTP port (25). Port 587 is commonly used for
+ * secure mail submission (see RFC4403), but you should use whatever
+ * matches your server configuration. */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mainserver.example.net:587");
+
+ /* In this example, we will start with a plain text connection, and upgrade
+ * to Transport Layer Security (TLS) using the STARTTLS command. Be careful
+ * of using CURLUSESSL_TRY here, because if TLS upgrade fails, the transfer
+ * will continue anyway - see the security discussion in the libcurl
+ * tutorial for more details. */
+ curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
+
+ /* If your server does not have a valid certificate, then you can disable
+ * part of the Transport Layer Security protection by setting the
+ * CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST options to 0 (false).
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ * curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ * That is, in general, a bad idea. It is still better than sending your
+ * authentication details in plain text though. Instead, you should get
+ * the issuer certificate (or the host certificate if the certificate is
+ * self-signed) and add it to the set of certificates that are known to
+ * libcurl using CURLOPT_CAINFO and/or CURLOPT_CAPATH. See docs/SSLCERTS
+ * for more information. */
+ curl_easy_setopt(curl, CURLOPT_CAINFO, "/path/to/certificate.pem");
+
+ /* Note that this option is not strictly required, omitting it will result
+ * in libcurl sending the MAIL FROM command with empty sender data. All
+ * autoresponses should have an empty reverse-path, and should be directed
+ * to the address in the reverse-path which triggered them. Otherwise,
+ * they could cause an endless loop. See RFC 5321 Section 4.5.5 for more
+ * details.
+ */
+ curl_easy_setopt(curl, CURLOPT_MAIL_FROM, FROM_MAIL);
+
+ /* Add two recipients, in this particular case they correspond to the
+ * To: and Cc: addressees in the header, but they could be any kind of
+ * recipient. */
+ recipients = curl_slist_append(recipients, TO_MAIL);
+ recipients = curl_slist_append(recipients, CC_MAIL);
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* We are using a callback function to specify the payload (the headers and
+ * body of the message). You could just use the CURLOPT_READDATA option to
+ * specify a FILE pointer to read from. */
+ curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source);
+ curl_easy_setopt(curl, CURLOPT_READDATA, &upload_ctx);
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+
+ /* Since the traffic will be encrypted, it is very useful to turn on debug
+ * information within libcurl to see what is happening during the transfer.
+ */
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ /* Send the message */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* Always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return (int)res;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-vrfy.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-vrfy.c
new file mode 100755
index 0000000..e6815b6
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/smtp-vrfy.c
@@ -0,0 +1,81 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+
+/* <DESC>
+ * SMTP example showing how to verify an email address
+ * </DESC>
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <curl/curl.h>
+
+/* This is a simple example showing how to verify an email address from an
+ * SMTP server.
+ *
+ * Notes:
+ *
+ * 1) This example requires libcurl 7.34.0 or above.
+ * 2) Not all email servers support this command and even if your email server
+ * does support it, it may respond with a 252 response code even though the
+ * address does not exist.
+ */
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+ struct curl_slist *recipients = NULL;
+
+ curl = curl_easy_init();
+ if(curl) {
+ /* This is the URL for your mailserver */
+ curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
+
+ /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
+ recipients = curl_slist_append(recipients, "<recipient@example.com>");
+ curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
+
+ /* Perform the VRFY */
+ res = curl_easy_perform(curl);
+
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ /* Free the list of recipients */
+ curl_slist_free_all(recipients);
+
+ /* curl will not send the QUIT command until you call cleanup, so you
+ * should be able to re-use this connection for additional requests. It
+ * may not be a good idea to keep the connection open for a very long time
+ * though (more than a few minutes may result in the server timing out the
+ * connection) and you do want to clean up in the end.
+ */
+ curl_easy_cleanup(curl);
+ }
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/sslbackend.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/sslbackend.c
new file mode 100755
index 0000000..e07d190
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/sslbackend.c
@@ -0,0 +1,79 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Shows HTTPS usage with client certs and optional ssl engine use.
+ * </DESC>
+ */
+#include <assert.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <curl/curl.h>
+
+/*
+ * An SSL-enabled libcurl is required for this sample to work (at least one
+ * SSL backend has to be configured).
+ *
+ * **** This example only works with libcurl 7.56.0 and later! ****
+*/
+
+int main(int argc, char **argv)
+{
+ const char *name = argc > 1 ? argv[1] : "openssl";
+ CURLsslset result;
+
+ if(!strcmp("list", name)) {
+ const curl_ssl_backend **list;
+ int i;
+
+ result = curl_global_sslset((curl_sslbackend)-1, NULL, &list);
+ assert(result == CURLSSLSET_UNKNOWN_BACKEND);
+
+ for(i = 0; list[i]; i++)
+ printf("SSL backend #%d: '%s' (ID: %d)\n",
+ i, list[i]->name, list[i]->id);
+
+ return 0;
+ }
+ else if(isdigit((int)(unsigned char)*name)) {
+ int id = atoi(name);
+
+ result = curl_global_sslset((curl_sslbackend)id, NULL, NULL);
+ }
+ else
+ result = curl_global_sslset((curl_sslbackend)-1, name, NULL);
+
+ if(result == CURLSSLSET_UNKNOWN_BACKEND) {
+ fprintf(stderr, "Unknown SSL backend id: %s\n", name);
+ return 1;
+ }
+
+ assert(result == CURLSSLSET_OK);
+
+ printf("Version with SSL backend '%s':\n\n\t%s\n", name, curl_version());
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/synctime.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/synctime.c
new file mode 100755
index 0000000..b617dd6
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/synctime.c
@@ -0,0 +1,377 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Set your system time from a remote HTTP server's Date: header.
+ * </DESC>
+ */
+/* This example code only builds as-is on Windows.
+ *
+ * While Unix/Linux user, you do not need this software.
+ * You can achieve the same result as synctime using curl, awk and date.
+ * Set proxy as according to your network, but beware of proxy Cache-Control.
+ *
+ * To set your system clock, root access is required.
+ * # date -s "`curl -sI https://nist.time.gov/timezone.cgi?UTC/s/0 \
+ * | awk -F': ' '/Date: / {print $2}'`"
+ *
+ * To view remote webserver date and time.
+ * $ curl -sI https://nist.time.gov/timezone.cgi?UTC/s/0 \
+ * | awk -F': ' '/Date: / {print $2}'
+ *
+ * Synchronising your computer clock via Internet time server usually relies
+ * on DAYTIME, TIME, or NTP protocols. These protocols provide good accurate
+ * time synchronization but it does not work very well through a
+ * firewall/proxy. Some adjustment has to be made to the firewall/proxy for
+ * these protocols to work properly.
+ *
+ * There is an indirect method. Since most webserver provide server time in
+ * their HTTP header, therefore you could synchronise your computer clock
+ * using HTTP protocol which has no problem with firewall/proxy.
+ *
+ * For this software to work, you should take note of these items.
+ * 1. Your firewall/proxy must allow your computer to surf internet.
+ * 2. Webserver system time must in sync with the NTP time server,
+ * or at least provide an accurate time keeping.
+ * 3. Webserver HTTP header does not provide the milliseconds units,
+ * so there is no way to get very accurate time.
+ * 4. This software could only provide an accuracy of +- a few seconds,
+ * as Round-Trip delay time is not taken into consideration.
+ * Compensation of network, firewall/proxy delay cannot be simply divide
+ * the Round-Trip delay time by half.
+ * 5. Win32 SetSystemTime() API will set your computer clock according to
+ * GMT/UTC time. Therefore your computer timezone must be properly set.
+ * 6. Webserver data should not be cached by the proxy server. Some
+ * webserver provide Cache-Control to prevent caching.
+ *
+ * References:
+ * https://web.archive.org/web/20100228012139/ \
+ * tf.nist.gov/timefreq/service/its.htm
+ * https://web.archive.org/web/20100409024302/ \
+ * tf.nist.gov/timefreq/service/firewall.htm
+ *
+ * Usage:
+ * This software will synchronise your computer clock only when you issue
+ * it with --synctime. By default, it only display the webserver's clock.
+ *
+ * Written by: Frank (contributed to libcurl)
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL THE AUTHOR OF THIS SOFTWARE BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ */
+
+#include <stdio.h>
+#include <time.h>
+#ifndef __CYGWIN__
+#include <winsock2.h>
+#include <windows.h>
+#endif
+#include <curl/curl.h>
+
+
+#define MAX_STRING 256
+#define MAX_STRING1 MAX_STRING + 1
+
+#define SYNCTIME_UA "synctime/1.0"
+
+typedef struct
+{
+ char http_proxy[MAX_STRING1];
+ char proxy_user[MAX_STRING1];
+ char timeserver[MAX_STRING1];
+} conf_t;
+
+const char DefaultTimeServer[3][MAX_STRING1] =
+{
+ "https://nist.time.gov/",
+ "https://www.google.com/"
+};
+
+const char *DayStr[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
+const char *MthStr[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+
+int ShowAllHeader;
+int AutoSyncTime;
+SYSTEMTIME SYSTime;
+SYSTEMTIME LOCALTime;
+
+#define HTTP_COMMAND_HEAD 0
+#define HTTP_COMMAND_GET 1
+
+
+size_t SyncTime_CURL_WriteOutput(void *ptr, size_t size, size_t nmemb,
+ void *stream)
+{
+ fwrite(ptr, size, nmemb, stream);
+ return (nmemb*size);
+}
+
+size_t SyncTime_CURL_WriteHeader(void *ptr, size_t size, size_t nmemb,
+ void *stream)
+{
+ char TmpStr1[26], TmpStr2[26];
+
+ (void)stream;
+
+ if(ShowAllHeader == 1)
+ fprintf(stderr, "%s", (char *)(ptr));
+
+ if(strncmp((char *)(ptr), "Date:", 5) == 0) {
+ if(ShowAllHeader == 0)
+ fprintf(stderr, "HTTP Server. %s", (char *)(ptr));
+
+ if(AutoSyncTime == 1) {
+ *TmpStr1 = 0;
+ *TmpStr2 = 0;
+ if(strlen((char *)(ptr)) > 50) /* Can prevent buffer overflow to
+ TmpStr1 & 2? */
+ AutoSyncTime = 0;
+ else {
+ int RetVal = sscanf((char *)(ptr), "Date: %25s %hu %s %hu %hu:%hu:%hu",
+ TmpStr1, &SYSTime.wDay, TmpStr2, &SYSTime.wYear,
+ &SYSTime.wHour, &SYSTime.wMinute,
+ &SYSTime.wSecond);
+
+ if(RetVal == 7) {
+ int i;
+ SYSTime.wMilliseconds = 500; /* adjust to midpoint, 0.5 sec */
+ for(i = 0; i<12; i++) {
+ if(strcmp(MthStr[i], TmpStr2) == 0) {
+ SYSTime.wMonth = i + 1;
+ break;
+ }
+ }
+ AutoSyncTime = 3; /* Computer clock will be adjusted */
+ }
+ else {
+ AutoSyncTime = 0; /* Error in sscanf() fields conversion */
+ }
+ }
+ }
+ }
+
+ if(strncmp((char *)(ptr), "X-Cache: HIT", 12) == 0) {
+ fprintf(stderr, "ERROR: HTTP Server data is cached."
+ " Server Date is no longer valid.\n");
+ AutoSyncTime = 0;
+ }
+ return (nmemb*size);
+}
+
+void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
+ char *proxy_user_password)
+{
+ if(strlen(proxy_port) > 0)
+ curl_easy_setopt(curl, CURLOPT_PROXY, proxy_port);
+
+ if(strlen(proxy_user_password) > 0)
+ curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
+
+#ifdef SYNCTIME_UA
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
+#endif
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, SyncTime_CURL_WriteOutput);
+ curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, SyncTime_CURL_WriteHeader);
+}
+
+int SyncTime_CURL_Fetch(CURL *curl, char *URL_Str, char *OutFileName,
+ int HttpGetBody)
+{
+ FILE *outfile;
+ CURLcode res;
+
+ outfile = NULL;
+ if(HttpGetBody == HTTP_COMMAND_HEAD)
+ curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
+ else {
+ outfile = fopen(OutFileName, "wb");
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
+ }
+
+ curl_easy_setopt(curl, CURLOPT_URL, URL_Str);
+ res = curl_easy_perform(curl);
+ if(outfile)
+ fclose(outfile);
+ return res; /* (CURLE_OK) */
+}
+
+void showUsage(void)
+{
+ fprintf(stderr, "SYNCTIME: Synchronising computer clock with time server"
+ " using HTTP protocol.\n");
+ fprintf(stderr, "Usage : SYNCTIME [Option]\n");
+ fprintf(stderr, "Options :\n");
+ fprintf(stderr, " --server=WEBSERVER Use this time server instead"
+ " of default.\n");
+ fprintf(stderr, " --showall Show all HTTP header.\n");
+ fprintf(stderr, " --synctime Synchronising computer clock"
+ " with time server.\n");
+ fprintf(stderr, " --proxy-user=USER[:PASS] Set proxy username and"
+ " password.\n");
+ fprintf(stderr, " --proxy=HOST[:PORT] Use HTTP proxy on given"
+ " port.\n");
+ fprintf(stderr, " --help Print this help.\n");
+ fprintf(stderr, "\n");
+ return;
+}
+
+int conf_init(conf_t *conf)
+{
+ int i;
+
+ *conf->http_proxy = 0;
+ for(i = 0; i<MAX_STRING1; i++)
+ conf->proxy_user[i] = 0; /* Clean up password from memory */
+ *conf->timeserver = 0;
+ return 1;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *curl;
+ conf_t conf[1];
+ int RetValue;
+
+ ShowAllHeader = 0; /* Do not show HTTP Header */
+ AutoSyncTime = 0; /* Do not synchronise computer clock */
+ RetValue = 0; /* Successful Exit */
+ conf_init(conf);
+
+ if(argc > 1) {
+ int OptionIndex = 0;
+ while(OptionIndex < argc) {
+ if(strncmp(argv[OptionIndex], "--server=", 9) == 0)
+ snprintf(conf->timeserver, MAX_STRING, "%s", &argv[OptionIndex][9]);
+
+ if(strcmp(argv[OptionIndex], "--showall") == 0)
+ ShowAllHeader = 1;
+
+ if(strcmp(argv[OptionIndex], "--synctime") == 0)
+ AutoSyncTime = 1;
+
+ if(strncmp(argv[OptionIndex], "--proxy-user=", 13) == 0)
+ snprintf(conf->proxy_user, MAX_STRING, "%s", &argv[OptionIndex][13]);
+
+ if(strncmp(argv[OptionIndex], "--proxy=", 8) == 0)
+ snprintf(conf->http_proxy, MAX_STRING, "%s", &argv[OptionIndex][8]);
+
+ if((strcmp(argv[OptionIndex], "--help") == 0) ||
+ (strcmp(argv[OptionIndex], "/?") == 0)) {
+ showUsage();
+ return 0;
+ }
+ OptionIndex++;
+ }
+ }
+
+ if(*conf->timeserver == 0) /* Use default server for time information */
+ snprintf(conf->timeserver, MAX_STRING, "%s", DefaultTimeServer[0]);
+
+ /* Init CURL before usage */
+ curl_global_init(CURL_GLOBAL_ALL);
+ curl = curl_easy_init();
+ if(curl) {
+ struct tm *lt;
+ struct tm *gmt;
+ time_t tt;
+ time_t tt_local;
+ time_t tt_gmt;
+ double tzonediffFloat;
+ int tzonediffWord;
+ char timeBuf[61];
+ char tzoneBuf[16];
+
+ SyncTime_CURL_Init(curl, conf->http_proxy, conf->proxy_user);
+
+ /* Calculating time diff between GMT and localtime */
+ tt = time(0);
+ lt = localtime(&tt);
+ tt_local = mktime(lt);
+ gmt = gmtime(&tt);
+ tt_gmt = mktime(gmt);
+ tzonediffFloat = difftime(tt_local, tt_gmt);
+ tzonediffWord = (int)(tzonediffFloat/3600.0);
+
+ if((double)(tzonediffWord * 3600) == tzonediffFloat)
+ snprintf(tzoneBuf, 15, "%+03d'00'", tzonediffWord);
+ else
+ snprintf(tzoneBuf, 15, "%+03d'30'", tzonediffWord);
+
+ /* Get current system time and local time */
+ GetSystemTime(&SYSTime);
+ GetLocalTime(&LOCALTime);
+ snprintf(timeBuf, 60, "%s, %02d %s %04d %02d:%02d:%02d.%03d, ",
+ DayStr[LOCALTime.wDayOfWeek], LOCALTime.wDay,
+ MthStr[LOCALTime.wMonth-1], LOCALTime.wYear,
+ LOCALTime.wHour, LOCALTime.wMinute, LOCALTime.wSecond,
+ LOCALTime.wMilliseconds);
+
+ fprintf(stderr, "Fetch: %s\n\n", conf->timeserver);
+ fprintf(stderr, "Before HTTP. Date: %s%s\n\n", timeBuf, tzoneBuf);
+
+ /* HTTP HEAD command to the Webserver */
+ SyncTime_CURL_Fetch(curl, conf->timeserver, "index.htm",
+ HTTP_COMMAND_HEAD);
+
+ GetLocalTime(&LOCALTime);
+ snprintf(timeBuf, 60, "%s, %02d %s %04d %02d:%02d:%02d.%03d, ",
+ DayStr[LOCALTime.wDayOfWeek], LOCALTime.wDay,
+ MthStr[LOCALTime.wMonth-1], LOCALTime.wYear,
+ LOCALTime.wHour, LOCALTime.wMinute, LOCALTime.wSecond,
+ LOCALTime.wMilliseconds);
+ fprintf(stderr, "\nAfter HTTP. Date: %s%s\n", timeBuf, tzoneBuf);
+
+ if(AutoSyncTime == 3) {
+ /* Synchronising computer clock */
+ if(!SetSystemTime(&SYSTime)) { /* Set system time */
+ fprintf(stderr, "ERROR: Unable to set system time.\n");
+ RetValue = 1;
+ }
+ else {
+ /* Successfully re-adjusted computer clock */
+ GetLocalTime(&LOCALTime);
+ snprintf(timeBuf, 60, "%s, %02d %s %04d %02d:%02d:%02d.%03d, ",
+ DayStr[LOCALTime.wDayOfWeek], LOCALTime.wDay,
+ MthStr[LOCALTime.wMonth-1], LOCALTime.wYear,
+ LOCALTime.wHour, LOCALTime.wMinute, LOCALTime.wSecond,
+ LOCALTime.wMilliseconds);
+ fprintf(stderr, "\nNew System's Date: %s%s\n", timeBuf, tzoneBuf);
+ }
+ }
+
+ /* Cleanup before exit */
+ conf_init(conf);
+ curl_easy_cleanup(curl);
+ }
+ return RetValue;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/threaded-ssl.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/threaded-ssl.c
new file mode 100755
index 0000000..09292c4
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/threaded-ssl.c
@@ -0,0 +1,168 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Show the required mutex callback setups for GnuTLS and OpenSSL when using
+ * libcurl multi-threaded.
+ * </DESC>
+ */
+/* A multi-threaded example that uses pthreads and fetches 4 remote files at
+ * once over HTTPS. The lock callbacks and stuff assume OpenSSL <1.1 or GnuTLS
+ * (libgcrypt) so far.
+ *
+ * OpenSSL docs for this:
+ * https://www.openssl.org/docs/man1.0.2/man3/CRYPTO_num_locks.html
+ * gcrypt docs for this:
+ * https://gnupg.org/documentation/manuals/gcrypt/Multi_002dThreading.html
+ */
+
+#define USE_OPENSSL /* or USE_GNUTLS accordingly */
+
+#include <stdio.h>
+#include <pthread.h>
+#include <curl/curl.h>
+
+#define NUMT 4
+
+/* we have this global to let the callback get easy access to it */
+static pthread_mutex_t *lockarray;
+
+#ifdef USE_OPENSSL
+#include <openssl/crypto.h>
+static void lock_callback(int mode, int type, char *file, int line)
+{
+ (void)file;
+ (void)line;
+ if(mode & CRYPTO_LOCK) {
+ pthread_mutex_lock(&(lockarray[type]));
+ }
+ else {
+ pthread_mutex_unlock(&(lockarray[type]));
+ }
+}
+
+static unsigned long thread_id(void)
+{
+ unsigned long ret;
+
+ ret = (unsigned long)pthread_self();
+ return ret;
+}
+
+static void init_locks(void)
+{
+ int i;
+
+ lockarray = (pthread_mutex_t *)OPENSSL_malloc(CRYPTO_num_locks() *
+ sizeof(pthread_mutex_t));
+ for(i = 0; i<CRYPTO_num_locks(); i++) {
+ pthread_mutex_init(&(lockarray[i]), NULL);
+ }
+
+ CRYPTO_set_id_callback((unsigned long (*)())thread_id);
+ CRYPTO_set_locking_callback((void (*)())lock_callback);
+}
+
+static void kill_locks(void)
+{
+ int i;
+
+ CRYPTO_set_locking_callback(NULL);
+ for(i = 0; i<CRYPTO_num_locks(); i++)
+ pthread_mutex_destroy(&(lockarray[i]));
+
+ OPENSSL_free(lockarray);
+}
+#endif
+
+#ifdef USE_GNUTLS
+#include <gcrypt.h>
+#include <errno.h>
+
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
+void init_locks(void)
+{
+ gcry_control(GCRYCTL_SET_THREAD_CBS);
+}
+
+#define kill_locks()
+#endif
+
+/* List of URLs to fetch.*/
+const char * const urls[]= {
+ "https://www.example.com/",
+ "https://www2.example.com/",
+ "https://www3.example.com/",
+ "https://www4.example.com/",
+};
+
+static void *pull_one_url(void *url)
+{
+ CURL *curl;
+
+ curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ /* this example does not verify the server's certificate, which means we
+ might be downloading stuff from an impostor */
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
+ curl_easy_perform(curl); /* ignores error */
+ curl_easy_cleanup(curl);
+
+ return NULL;
+}
+
+int main(int argc, char **argv)
+{
+ pthread_t tid[NUMT];
+ int i;
+ (void)argc; /* we do not use any arguments in this example */
+ (void)argv;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ init_locks();
+
+ for(i = 0; i< NUMT; i++) {
+ int error = pthread_create(&tid[i],
+ NULL, /* default attributes please */
+ pull_one_url,
+ (void *)urls[i]);
+ if(0 != error)
+ fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ else
+ fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
+ }
+
+ /* now wait for all threads to terminate */
+ for(i = 0; i< NUMT; i++) {
+ pthread_join(tid[i], NULL);
+ fprintf(stderr, "Thread %d terminated\n", i);
+ }
+
+ kill_locks();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/url2file.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/url2file.c
new file mode 100755
index 0000000..c01bcf3
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/url2file.c
@@ -0,0 +1,88 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Download a given URL into a local file named page.out.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <curl/curl.h>
+
+static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ size_t written = fwrite(ptr, size, nmemb, (FILE *)stream);
+ return written;
+}
+
+int main(int argc, char *argv[])
+{
+ CURL *curl_handle;
+ static const char *pagefilename = "page.out";
+ FILE *pagefile;
+
+ if(argc < 2) {
+ printf("Usage: %s <URL>\n", argv[0]);
+ return 1;
+ }
+
+ curl_global_init(CURL_GLOBAL_ALL);
+
+ /* init the curl session */
+ curl_handle = curl_easy_init();
+
+ /* set URL to get here */
+ curl_easy_setopt(curl_handle, CURLOPT_URL, argv[1]);
+
+ /* Switch on full protocol/debug output while testing */
+ curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L);
+
+ /* disable progress meter, set to 0L to enable it */
+ curl_easy_setopt(curl_handle, CURLOPT_NOPROGRESS, 1L);
+
+ /* send all data to this function */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_data);
+
+ /* open the file */
+ pagefile = fopen(pagefilename, "wb");
+ if(pagefile) {
+
+ /* write the page body to this file handle */
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
+
+ /* get it! */
+ curl_easy_perform(curl_handle);
+
+ /* close the header file */
+ fclose(pagefile);
+ }
+
+ /* cleanup curl stuff */
+ curl_easy_cleanup(curl_handle);
+
+ curl_global_cleanup();
+
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/urlapi.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/urlapi.c
new file mode 100755
index 0000000..11962ab
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/urlapi.c
@@ -0,0 +1,74 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Set working URL with CURLU *.
+ * </DESC>
+ */
+#include <stdio.h>
+#include <curl/curl.h>
+
+#if !CURL_AT_LEAST_VERSION(7, 80, 0)
+#error "this example requires curl 7.80.0 or later"
+#endif
+
+int main(void)
+{
+ CURL *curl;
+ CURLcode res;
+
+ CURLU *urlp;
+ CURLUcode uc;
+
+ /* get a curl handle */
+ curl = curl_easy_init();
+
+ /* init Curl URL */
+ urlp = curl_url();
+ uc = curl_url_set(urlp, CURLUPART_URL,
+ "http://example.com/path/index.html", 0);
+
+ if(uc) {
+ fprintf(stderr, "curl_url_set() failed: %s", curl_url_strerror(uc));
+ goto cleanup;
+ }
+
+ if(curl) {
+ /* set urlp to use as working URL */
+ curl_easy_setopt(curl, CURLOPT_CURLU, urlp);
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+
+ res = curl_easy_perform(curl);
+ /* Check for errors */
+ if(res != CURLE_OK)
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+
+ goto cleanup;
+ }
+
+ cleanup:
+ curl_url_cleanup(urlp);
+ curl_easy_cleanup(curl);
+ return 0;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/usercertinmem.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/usercertinmem.c
new file mode 100755
index 0000000..89a0c3c
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/usercertinmem.c
@@ -0,0 +1,228 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 2013 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Use an in-memory user certificate and RSA key and retrieve an https page.
+ * </DESC>
+ */
+/* Written by Ishan SinghLevett, based on Theo Borm's cacertinmem.c.
+ * Note that to maintain simplicity this example does not use a CA certificate
+ * for peer verification. However, some form of peer verification
+ * must be used in real circumstances when a secure connection is required.
+ */
+
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+#include <openssl/pem.h>
+#include <curl/curl.h>
+#include <stdio.h>
+
+static size_t writefunction(void *ptr, size_t size, size_t nmemb, void *stream)
+{
+ fwrite(ptr, size, nmemb, stream);
+ return (nmemb*size);
+}
+
+static CURLcode sslctx_function(CURL *curl, void *sslctx, void *parm)
+{
+ X509 *cert = NULL;
+ BIO *bio = NULL;
+ BIO *kbio = NULL;
+ RSA *rsa = NULL;
+ int ret;
+
+ const char *mypem = /* www.cacert.org */
+ "-----BEGIN CERTIFICATE-----\n"\
+ "MIIHPTCCBSWgAwIBAgIBADANBgkqhkiG9w0BAQQFADB5MRAwDgYDVQQKEwdSb290\n"\
+ "IENBMR4wHAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNB\n"\
+ "IENlcnQgU2lnbmluZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRA\n"\
+ "Y2FjZXJ0Lm9yZzAeFw0wMzAzMzAxMjI5NDlaFw0zMzAzMjkxMjI5NDlaMHkxEDAO\n"\
+ "BgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEi\n"\
+ "MCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJ\n"\
+ "ARYSc3VwcG9ydEBjYWNlcnQub3JnMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC\n"\
+ "CgKCAgEAziLA4kZ97DYoB1CW8qAzQIxL8TtmPzHlawI229Z89vGIj053NgVBlfkJ\n"\
+ "8BLPRoZzYLdufujAWGSuzbCtRRcMY/pnCujW0r8+55jE8Ez64AO7NV1sId6eINm6\n"\
+ "zWYyN3L69wj1x81YyY7nDl7qPv4coRQKFWyGhFtkZip6qUtTefWIonvuLwphK42y\n"\
+ "fk1WpRPs6tqSnqxEQR5YYGUFZvjARL3LlPdCfgv3ZWiYUQXw8wWRBB0bF4LsyFe7\n"\
+ "w2t6iPGwcswlWyCR7BYCEo8y6RcYSNDHBS4CMEK4JZwFaz+qOqfrU0j36NK2B5jc\n"\
+ "G8Y0f3/JHIJ6BVgrCFvzOKKrF11myZjXnhCLotLddJr3cQxyYN/Nb5gznZY0dj4k\n"\
+ "epKwDpUeb+agRThHqtdB7Uq3EvbXG4OKDy7YCbZZ16oE/9KTfWgu3YtLq1i6L43q\n"\
+ "laegw1SJpfvbi1EinbLDvhG+LJGGi5Z4rSDTii8aP8bQUWWHIbEZAWV/RRyH9XzQ\n"\
+ "QUxPKZgh/TMfdQwEUfoZd9vUFBzugcMd9Zi3aQaRIt0AUMyBMawSB3s42mhb5ivU\n"\
+ "fslfrejrckzzAeVLIL+aplfKkQABi6F1ITe1Yw1nPkZPcCBnzsXWWdsC4PDSy826\n"\
+ "YreQQejdIOQpvGQpQsgi3Hia/0PsmBsJUUtaWsJx8cTLc6nloQsCAwEAAaOCAc4w\n"\
+ "ggHKMB0GA1UdDgQWBBQWtTIb1Mfz4OaO873SsDrusjkY0TCBowYDVR0jBIGbMIGY\n"\
+ "gBQWtTIb1Mfz4OaO873SsDrusjkY0aF9pHsweTEQMA4GA1UEChMHUm9vdCBDQTEe\n"\
+ "MBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0\n"\
+ "IFNpZ25pbmcgQXV0aG9yaXR5MSEwHwYJKoZIhvcNAQkBFhJzdXBwb3J0QGNhY2Vy\n"\
+ "dC5vcmeCAQAwDwYDVR0TAQH/BAUwAwEB/zAyBgNVHR8EKzApMCegJaAjhiFodHRw\n"\
+ "czovL3d3dy5jYWNlcnQub3JnL3Jldm9rZS5jcmwwMAYJYIZIAYb4QgEEBCMWIWh0\n"\
+ "dHBzOi8vd3d3LmNhY2VydC5vcmcvcmV2b2tlLmNybDA0BglghkgBhvhCAQgEJxYl\n"\
+ "aHR0cDovL3d3dy5jYWNlcnQub3JnL2luZGV4LnBocD9pZD0xMDBWBglghkgBhvhC\n"\
+ "AQ0ESRZHVG8gZ2V0IHlvdXIgb3duIGNlcnRpZmljYXRlIGZvciBGUkVFIGhlYWQg\n"\
+ "b3ZlciB0byBodHRwOi8vd3d3LmNhY2VydC5vcmcwDQYJKoZIhvcNAQEEBQADggIB\n"\
+ "ACjH7pyCArpcgBLKNQodgW+JapnM8mgPf6fhjViVPr3yBsOQWqy1YPaZQwGjiHCc\n"\
+ "nWKdpIevZ1gNMDY75q1I08t0AoZxPuIrA2jxNGJARjtT6ij0rPtmlVOKTV39O9lg\n"\
+ "18p5aTuxZZKmxoGCXJzN600BiqXfEVWqFcofN8CCmHBh22p8lqOOLlQ+TyGpkO/c\n"\
+ "gr/c6EWtTZBzCDyUZbAEmXZ/4rzCahWqlwQ3JNgelE5tDlG+1sSPypZt90Pf6DBl\n"\
+ "Jzt7u0NDY8RD97LsaMzhGY4i+5jhe1o+ATc7iwiwovOVThrLm82asduycPAtStvY\n"\
+ "sONvRUgzEv/+PDIqVPfE94rwiCPCR/5kenHA0R6mY7AHfqQv0wGP3J8rtsYIqQ+T\n"\
+ "SCX8Ev2fQtzzxD72V7DX3WnRBnc0CkvSyqD/HMaMyRa+xMwyN2hzXwj7UfdJUzYF\n"\
+ "CpUCTPJ5GhD22Dp1nPMd8aINcGeGG7MW9S/lpOt5hvk9C8JzC6WZrG/8Z7jlLwum\n"\
+ "GCSNe9FINSkYQKyTYOGWhlC0elnYjyELn8+CkcY7v2vcB5G5l1YjqrZslMZIBjzk\n"\
+ "zk6q5PYvCdxTby78dOs6Y5nCpqyJvKeyRKANihDjbPIky/qbn3BHLt4Ui9SyIAmW\n"\
+ "omTxJBzcoTWcFbLUvFUufQb1nA5V9FrWk9p2rSVzTMVD\n"\
+ "-----END CERTIFICATE-----\n";
+
+/*replace the XXX with the actual RSA key*/
+ const char *mykey =
+ "-----BEGIN RSA PRIVATE KEY-----\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n"\
+ "-----END RSA PRIVATE KEY-----\n";
+
+ (void)curl; /* avoid warnings */
+ (void)parm; /* avoid warnings */
+
+ /* get a BIO */
+ bio = BIO_new_mem_buf((char *)mypem, -1);
+
+ if(!bio) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /* use it to read the PEM formatted certificate from memory into an X509
+ * structure that SSL can use
+ */
+ cert = PEM_read_bio_X509(bio, NULL, 0, NULL);
+ if(!cert) {
+ printf("PEM_read_bio_X509 failed...\n");
+ }
+
+ /*tell SSL to use the X509 certificate*/
+ ret = SSL_CTX_use_certificate((SSL_CTX*)sslctx, cert);
+ if(ret != 1) {
+ printf("Use certificate failed\n");
+ }
+
+ /*create a bio for the RSA key*/
+ kbio = BIO_new_mem_buf((char *)mykey, -1);
+ if(!kbio) {
+ printf("BIO_new_mem_buf failed\n");
+ }
+
+ /*read the key bio into an RSA object*/
+ rsa = PEM_read_bio_RSAPrivateKey(kbio, NULL, 0, NULL);
+ if(!rsa) {
+ printf("Failed to create key bio\n");
+ }
+
+ /*tell SSL to use the RSA key from memory*/
+ ret = SSL_CTX_use_RSAPrivateKey((SSL_CTX*)sslctx, rsa);
+ if(ret != 1) {
+ printf("Use Key failed\n");
+ }
+
+ /* free resources that have been allocated by openssl functions */
+ if(bio)
+ BIO_free(bio);
+
+ if(kbio)
+ BIO_free(kbio);
+
+ if(rsa)
+ RSA_free(rsa);
+
+ if(cert)
+ X509_free(cert);
+
+ /* all set to go */
+ return CURLE_OK;
+}
+
+int main(void)
+{
+ CURL *ch;
+ CURLcode rv;
+
+ curl_global_init(CURL_GLOBAL_ALL);
+ ch = curl_easy_init();
+ curl_easy_setopt(ch, CURLOPT_VERBOSE, 0L);
+ curl_easy_setopt(ch, CURLOPT_HEADER, 0L);
+ curl_easy_setopt(ch, CURLOPT_NOPROGRESS, 1L);
+ curl_easy_setopt(ch, CURLOPT_NOSIGNAL, 1L);
+ curl_easy_setopt(ch, CURLOPT_WRITEFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_WRITEDATA, stdout);
+ curl_easy_setopt(ch, CURLOPT_HEADERFUNCTION, writefunction);
+ curl_easy_setopt(ch, CURLOPT_HEADERDATA, stderr);
+ curl_easy_setopt(ch, CURLOPT_SSLCERTTYPE, "PEM");
+
+ /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there is
+ no CA certificate*/
+
+ curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L);
+ curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L);
+ curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
+ curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
+
+ /* first try: retrieve page without user certificate and key -> will fail
+ */
+ rv = curl_easy_perform(ch);
+ if(rv == CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ /* second try: retrieve page using user certificate and key -> will succeed
+ * load the certificate and key by installing a function doing the necessary
+ * "modifications" to the SSL CONTEXT just before link init
+ */
+ curl_easy_setopt(ch, CURLOPT_SSL_CTX_FUNCTION, sslctx_function);
+ rv = curl_easy_perform(ch);
+ if(rv == CURLE_OK) {
+ printf("*** transfer succeeded ***\n");
+ }
+ else {
+ printf("*** transfer failed ***\n");
+ }
+
+ curl_easy_cleanup(ch);
+ curl_global_cleanup();
+ return rv;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/version-check.pl b/ap/lib/libcurl/curl-7.86.0/docs/examples/version-check.pl
new file mode 100755
index 0000000..aca3799
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/version-check.pl
@@ -0,0 +1,105 @@
+#!/usr/bin/env perl
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+
+# This script accepts a source file as input on the command line.
+#
+# It first loads the 'symbols-in-versions' document and stores a lookup
+# table for all known symbols for which version they were introduced.
+#
+# It then scans the given source file to dig up all symbols starting with CURL.
+# Finally, it sorts the internal list of found symbols (using the version
+# number as sort key) and then it outputs the most recent version number and
+# the symbols from that version that are used.
+#
+# Usage:
+#
+# version-check.pl [source file]
+#
+
+open(S, "<../libcurl/symbols-in-versions") || die;
+
+my %doc;
+my %rem;
+while(<S>) {
+ if(/(^CURL[^ \n]*) *(.*)/) {
+ my ($sym, $rest)=($1, $2);
+ my @a=split(/ +/, $rest);
+
+ $doc{$sym}=$a[0]; # when it was introduced
+
+ if($a[2]) {
+ # this symbol is documented to have been present the last time
+ # in this release
+ $rem{$sym}=$a[2];
+ }
+ }
+
+}
+
+close(S);
+
+sub age {
+ my ($ver)=@_;
+
+ my @s=split(/\./, $ver);
+ return $s[0]*10000+$s[1]*100+$s[2];
+}
+
+my %used;
+open(C, "<$ARGV[0]") || die;
+
+while(<C>) {
+ if(/\W(CURL[_A-Z0-9v]+)\W/) {
+ #print "$1\n";
+ $used{$1}++;
+ }
+}
+
+close(C);
+
+sub sortversions {
+ my $r = age($doc{$a}) <=> age($doc{$b});
+ if(!$r) {
+ $r = $a cmp $b;
+ }
+ return $r;
+}
+
+my @recent = reverse sort sortversions keys %used;
+
+# the most recent symbol
+my $newsym = $recent[0];
+# the most recent version
+my $newver = $doc{$newsym};
+
+print "The scanned source uses these symbols introduced in $newver:\n";
+
+for my $w (@recent) {
+ if($doc{$w} eq $newver) {
+ printf " $w\n";
+ next;
+ }
+ last;
+}
diff --git a/ap/lib/libcurl/curl-7.86.0/docs/examples/xmlstream.c b/ap/lib/libcurl/curl-7.86.0/docs/examples/xmlstream.c
new file mode 100755
index 0000000..ae5963b
--- /dev/null
+++ b/ap/lib/libcurl/curl-7.86.0/docs/examples/xmlstream.c
@@ -0,0 +1,168 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at https://curl.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ * SPDX-License-Identifier: curl
+ *
+ ***************************************************************************/
+/* <DESC>
+ * Stream-parse a document using the streaming Expat parser.
+ * </DESC>
+ */
+/* Written by David Strauss
+ *
+ * Expat => https://libexpat.github.io/
+ *
+ * gcc -Wall -I/usr/local/include xmlstream.c -lcurl -lexpat -o xmlstream
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <expat.h>
+#include <curl/curl.h>
+
+struct MemoryStruct {
+ char *memory;
+ size_t size;
+};
+
+struct ParserStruct {
+ int ok;
+ size_t tags;
+ size_t depth;
+ struct MemoryStruct characters;
+};
+
+static void startElement(void *userData, const XML_Char *name,
+ const XML_Char **atts)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->tags++;
+ state->depth++;
+
+ /* Get a clean slate for reading in character data. */
+ free(state->characters.memory);
+ state->characters.memory = NULL;
+ state->characters.size = 0;
+}
+
+static void characterDataHandler(void *userData, const XML_Char *s, int len)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ struct MemoryStruct *mem = &state->characters;
+
+ char *ptr = realloc(mem->memory, mem->size + len + 1);
+ if(!ptr) {
+ /* Out of memory. */
+ fprintf(stderr, "Not enough memory (realloc returned NULL).\n");
+ state->ok = 0;
+ return;
+ }
+
+ mem->memory = ptr;
+ memcpy(&(mem->memory[mem->size]), s, len);
+ mem->size += len;
+ mem->memory[mem->size] = 0;
+}
+
+static void endElement(void *userData, const XML_Char *name)
+{
+ struct ParserStruct *state = (struct ParserStruct *) userData;
+ state->depth--;
+
+ printf("%5lu %10lu %s\n", state->depth, state->characters.size, name);
+}
+
+static size_t parseStreamCallback(void *contents, size_t length, size_t nmemb,
+ void *userp)
+{
+ XML_Parser parser = (XML_Parser) userp;
+ size_t real_size = length * nmemb;
+ struct ParserStruct *state = (struct ParserStruct *) XML_GetUserData(parser);
+
+ /* Only parse if we are not already in a failure state. */
+ if(state->ok && XML_Parse(parser, contents, real_size, 0) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Parsing response buffer of length %lu failed"
+ " with error code %d (%s).\n",
+ real_size, error_code, XML_ErrorString(error_code));
+ state->ok = 0;
+ }
+
+ return real_size;
+}
+
+int main(void)
+{
+ CURL *curl_handle;
+ CURLcode res;
+ XML_Parser parser;
+ struct ParserStruct state;
+
+ /* Initialize the state structure for parsing. */
+ memset(&state, 0, sizeof(struct ParserStruct));
+ state.ok = 1;
+
+ /* Initialize a namespace-aware parser. */
+ parser = XML_ParserCreateNS(NULL, '\0');
+ XML_SetUserData(parser, &state);
+ XML_SetElementHandler(parser, startElement, endElement);
+ XML_SetCharacterDataHandler(parser, characterDataHandler);
+
+ /* Initialize a libcurl handle. */
+ curl_global_init(CURL_GLOBAL_DEFAULT);
+ curl_handle = curl_easy_init();
+ curl_easy_setopt(curl_handle, CURLOPT_URL,
+ "https://www.w3schools.com/xml/simple.xml");
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, parseStreamCallback);
+ curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)parser);
+
+ printf("Depth Characters Closing Tag\n");
+
+ /* Perform the request and any follow-up parsing. */
+ res = curl_easy_perform(curl_handle);
+ if(res != CURLE_OK) {
+ fprintf(stderr, "curl_easy_perform() failed: %s\n",
+ curl_easy_strerror(res));
+ }
+ else if(state.ok) {
+ /* Expat requires one final call to finalize parsing. */
+ if(XML_Parse(parser, NULL, 0, 1) == 0) {
+ int error_code = XML_GetErrorCode(parser);
+ fprintf(stderr, "Finalizing parsing failed with error code %d (%s).\n",
+ error_code, XML_ErrorString(error_code));
+ }
+ else {
+ printf(" --------------\n");
+ printf(" %lu tags total\n", state.tags);
+ }
+ }
+
+ /* Clean up. */
+ free(state.characters.memory);
+ XML_ParserFree(parser);
+ curl_easy_cleanup(curl_handle);
+ curl_global_cleanup();
+
+ return 0;
+}