Skip to content

Commit

Permalink
docs/libcurl/opts: clarify the return values
Browse files Browse the repository at this point in the history
Expand a little.

- mention the type name of the return code
- avoid stating which exact return codes that might be returned, as that
  varies over time, builds and conditions
- avoid stating some always return OK
- refer to the manpage documenting all the return codes

Closes curl#15900
  • Loading branch information
bagder committed Jan 2, 2025
1 parent e256d9d commit e694c82
Show file tree
Hide file tree
Showing 376 changed files with 1,508 additions and 483 deletions.
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_ACTIVESOCKET.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CAINFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CAPATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CERTINFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ Transport support added in 7.79.0. mbedTLS support added in 8.9.0.
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONDITION_UNMET.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONNECT_TIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONN_ID.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,7 @@ Deprecated since 7.55.0.

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ Deprecated since 7.55.0.

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_CONTENT_TYPE.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_COOKIELIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_EARLYDATA_SENT_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_FILETIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_FILETIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,7 @@ Works for SFTP since 7.21.4

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_HEADER_SIZE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_HTTPAUTH_USED.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_HTTP_VERSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_LASTSOCKET.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_LOCAL_IP.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_LOCAL_PORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_NUM_CONNECTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_OS_ERRNO.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_POSTTRANSFER_TIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PRIMARY_IP.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PRIMARY_PORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PRIVATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ Deprecated since 7.85.0.
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PROXYAUTH_USED.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
5 changes: 4 additions & 1 deletion docs/libcurl/opts/CURLINFO_PROXY_ERROR.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,7 @@ int main(void)

# RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
curl_easy_getinfo(3) returns a CURLcode indicating success or error.

CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
libcurl-errors(3).
Loading

0 comments on commit e694c82

Please sign in to comment.