docs: make all examples in all libcurl man pages compile

Closes #12448
This commit is contained in:
Daniel Stenberg 2023-12-04 10:50:42 +01:00
parent 3c4fba8cf5
commit cb521d1f9a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
478 changed files with 5989 additions and 3861 deletions

View file

@ -105,12 +105,15 @@ CURL_NETRC_IGNORED
Most
.SH EXAMPLE
.nf
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
ret = curl_easy_perform(curl);
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode ret;
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/");
curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
ret = curl_easy_perform(curl);
}
}
.fi
.SH AVAILABILITY