]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs/libcurl: minor cleanups
authorEmanuele Torre <torreemanuele6@gmail.com>
Tue, 25 Apr 2023 23:55:29 +0000 (01:55 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 26 Apr 2023 08:19:48 +0000 (10:19 +0200)
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

docs/libcurl/curl_easy_unescape.3
docs/libcurl/curl_formadd.3
docs/libcurl/curl_unescape.3
docs/libcurl/curl_version_info.3
docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3

index 51a667fc0197ac2f478e371c93e2f8259de1ed3d..72026eb48e4bc6550400d67e4fa15df8d9b41e34 100644 (file)
@@ -39,7 +39,7 @@ that are URL encoded (%XX where XX is a two-digit hexadecimal number) are
 converted to their binary versions.
 
 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
 returned string in the integer it points to. This allows proper handling even
index 756071a5dbfd12e70c3ef18b6d34e47821d91be5..280ffadf711855309ccb7cd6447d8dc7f8d45ef4 100644 (file)
@@ -176,8 +176,8 @@ for the curl handle.
 See example below.
 .SH EXAMPLE
 .nf
- struct curl_httppostpost = NULL;
- struct curl_httppostlast = NULL;
+ struct curl_httppost *post = NULL;
+ struct curl_httppost *last = NULL;
  char namebuffer[] = "name buffer";
  long namelength = strlen(namebuffer);
  char buffer[] = "test buffer";
index b2a83b2def2e8e77db654b4a99c4c7d0054faf48..70645fe6c50c410c2cd620b2140f6f956e0c8147 100644 (file)
@@ -28,7 +28,7 @@ curl_unescape - URL decodes the given string
 .nf
 #include <curl/curl.h>
 
-char *curl_unescape( const char *url, int length);
+char *curl_unescape(const char *url, int length);
 .fi
 .SH DESCRIPTION
 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
 converted to their plain text versions.
 
-If the 'length' argument is set to 0, \fIcurl_unescape(3)\fP will use strlen()
-on the input \fBurl\fP string to find out the size.
+If the \fBlength\fP argument is set to 0, \fIcurl_unescape(3)\fP will use
+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.
 .SH EXAMPLE
index 0028172530e35f374fec1b7b1700139889ca31f8..7755b16a4af754e00ebc393192d49900a08cb90b 100644 (file)
@@ -29,7 +29,7 @@ curl_version_info - returns runtime libcurl version info
 .nf
 #include <curl/curl.h>
 
-curl_version_info_data *curl_version_info( CURLversion age);
+curl_version_info_data *curl_version_info(CURLversion age);
 .fi
 .SH DESCRIPTION
 Returns a pointer to a filled in static struct with information about various
index ab097016e7bf9132b2df8aae7d07e015c368f6a6..7e992c6f15a8b9fe29c76b92ef976d7b2af0da44 100644 (file)
@@ -32,7 +32,7 @@ CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
 int socket_callback(CURL *easy,      /* easy handle */
                     curl_socket_t s, /* socket */
                     int what,        /* describes the socket */
-                    void *clientp,     /* private callback pointer */
+                    void *clientp,   /* private callback pointer */
                     void *socketp);  /* private socket pointer */
 
 CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
@@ -87,8 +87,8 @@ All
 .nf
 static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
 {
-  GlobalInfo *g = (GlobalInfo*) cbp;
-  SockInfo *fdp = (SockInfo*) sockp;
+  GlobalInfo *g = cbp;
+  SockInfo *fdp = sockp;
 
   if(what == CURL_POLL_REMOVE) {
     remsock(fdp);