docs/libcurl: minor cleanups
I was reading curl_unescape(3) and I noticed that there was an extra
space after the open parenthesis in the SYNOPSIS; I removed the extra
space.
I also ran a few grep -r commands to find and remove extra spaces
after '(' in other files, and to find and replace uses of `T*' instead
of `T *'. Some of the instances of `T*` where unnecessary casts that I
removed.
I also fixed a comment that was misaligned in CURLMOPT_SOCKETFUNCTION.3.
And I fixed some formatting inconsistencies: in curl_unescape(3), all
function parameter were mentioned with bold text except length, that was
mentioned as 'length'; and, in curl_easy_unescape(3), all parameters
were mentioned in bold text except url that was italicised. Now they are
all mentioned in bold.
Documentation is not very consistent in how function parameter are
formatted: many pages italicise them, and others display them in bold
text; but I think it makes sense to at least be consistent with
formatting within the same page.
Closes #11027
This commit is contained in:
parent
f98344c4ae
commit
73b9d7eb0f
@ -39,7 +39,7 @@ that are URL encoded (%XX where XX is a two-digit hexadecimal number) are
|
|||||||
converted to their binary versions.
|
converted to their binary versions.
|
||||||
|
|
||||||
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_unescape(3)\fP
|
If the \fBlength\fP argument is set to 0 (zero), \fIcurl_easy_unescape(3)\fP
|
||||||
will use strlen() on the input \fIurl\fP string to find out the size.
|
will use strlen() on the input \fBurl\fP string to find out the size.
|
||||||
|
|
||||||
If \fBoutlength\fP is non-NULL, the function will write the length of the
|
If \fBoutlength\fP is non-NULL, the function will write the length of the
|
||||||
returned string in the integer it points to. This allows proper handling even
|
returned string in the integer it points to. This allows proper handling even
|
||||||
|
|||||||
@ -176,8 +176,8 @@ for the curl handle.
|
|||||||
See example below.
|
See example below.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.nf
|
.nf
|
||||||
struct curl_httppost* post = NULL;
|
struct curl_httppost *post = NULL;
|
||||||
struct curl_httppost* last = NULL;
|
struct curl_httppost *last = NULL;
|
||||||
char namebuffer[] = "name buffer";
|
char namebuffer[] = "name buffer";
|
||||||
long namelength = strlen(namebuffer);
|
long namelength = strlen(namebuffer);
|
||||||
char buffer[] = "test buffer";
|
char buffer[] = "test buffer";
|
||||||
|
|||||||
@ -28,7 +28,7 @@ curl_unescape - URL decodes the given string
|
|||||||
.nf
|
.nf
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
char *curl_unescape( const char *url, int length);
|
char *curl_unescape(const char *url, int length);
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead!
|
Obsolete function. Use \fIcurl_easy_unescape(3)\fP instead!
|
||||||
@ -38,8 +38,8 @@ string" and return that as a new allocated string. All input characters that
|
|||||||
are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
|
are URL encoded (%XX where XX is a two-digit hexadecimal number) will be
|
||||||
converted to their plain text versions.
|
converted to their plain text versions.
|
||||||
|
|
||||||
If the 'length' argument is set to 0, \fIcurl_unescape(3)\fP will use strlen()
|
If the \fBlength\fP argument is set to 0, \fIcurl_unescape(3)\fP will use
|
||||||
on the input \fBurl\fP string to find out the size.
|
strlen() on the input \fBurl\fP string to find out the size.
|
||||||
|
|
||||||
You must \fIcurl_free(3)\fP the returned string when you are done with it.
|
You must \fIcurl_free(3)\fP the returned string when you are done with it.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
|
|||||||
@ -29,7 +29,7 @@ curl_version_info - returns runtime libcurl version info
|
|||||||
.nf
|
.nf
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
|
|
||||||
curl_version_info_data *curl_version_info( CURLversion age);
|
curl_version_info_data *curl_version_info(CURLversion age);
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Returns a pointer to a filled in static struct with information about various
|
Returns a pointer to a filled in static struct with information about various
|
||||||
|
|||||||
@ -32,7 +32,7 @@ CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
|
|||||||
int socket_callback(CURL *easy, /* easy handle */
|
int socket_callback(CURL *easy, /* easy handle */
|
||||||
curl_socket_t s, /* socket */
|
curl_socket_t s, /* socket */
|
||||||
int what, /* describes the socket */
|
int what, /* describes the socket */
|
||||||
void *clientp, /* private callback pointer */
|
void *clientp, /* private callback pointer */
|
||||||
void *socketp); /* private socket pointer */
|
void *socketp); /* private socket pointer */
|
||||||
|
|
||||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
|
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
|
||||||
@ -87,8 +87,8 @@ All
|
|||||||
.nf
|
.nf
|
||||||
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||||
{
|
{
|
||||||
GlobalInfo *g = (GlobalInfo*) cbp;
|
GlobalInfo *g = cbp;
|
||||||
SockInfo *fdp = (SockInfo*) sockp;
|
SockInfo *fdp = sockp;
|
||||||
|
|
||||||
if(what == CURL_POLL_REMOVE) {
|
if(what == CURL_POLL_REMOVE) {
|
||||||
remsock(fdp);
|
remsock(fdp);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user