Skip to content

Commit

Permalink
narrower quotes
Browse files Browse the repository at this point in the history
Quoted lines need to be shorter than 80 columns to remain good-looking
in the PDF (and possibly ePUB too).
  • Loading branch information
bagder committed Jan 13, 2024
1 parent aba91d8 commit d01a748
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 53 deletions.
3 changes: 2 additions & 1 deletion build/autotools.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ make the default TLS backend with `--with-default-ssl-backend=[NAME]`. For
example, build with support for both GnuTLS and OpenSSL and default to
OpenSSL:

./configure --with-openssl --with-gnutls --with-default-ssl-backend=openssl
./configure --with-openssl --with-gnutls \
--with-default-ssl-backend=openssl

## Select SSH backend

Expand Down
3 changes: 2 additions & 1 deletion build/separate.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ since then libtool can use `LD_LIBRARY_PATH`. Newer linkers may use the runpath
form of rpath by default when rpath is specified but others need an additional
linker flag `-Wl,--enable-new-dtags` like this:

LDFLAGS="-Wl,-rpath,$HOME/install/lib -Wl,--enable-new-dtags" ./configure ...
LDFLAGS="-Wl,-rpath,$HOME/install/lib -Wl,--enable-new-dtags" \
./configure ...
8 changes: 4 additions & 4 deletions build/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,22 +67,22 @@ following configurations in Visual Studio 2010 might be:

DLL Debug - DLL OpenSSL (Win32):

PATH=..\..\..\..\..\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
PATH=C:\openssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem

DLL Debug - DLL OpenSSL (x64):

PATH=..\..\..\..\..\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
PATH=C:\openssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem

DLL Debug - DLL wolfSSL (Win32):

PATH=..\..\..\..\..\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
PATH=C:\wolfssl\build\Win32\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem

DLL Debug - DLL wolfSSL (x64):

PATH=..\..\..\..\..\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
PATH=C:\wolfssl\build\Win64\VC10\DLL Debug;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem

If you are using a configuration that uses multiple third-party library DLLs
Expand Down
6 changes: 3 additions & 3 deletions cmdline/progressmeter.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The times are displayed using H:MM:SS for hours, minutes and seconds.
The progress meter exists to show a user that something actually is
happening. The different fields in the output have the following meaning:

% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287

From left to right:

Expand Down
3 changes: 2 additions & 1 deletion cmdline/urls/trurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ trurl.

**Remove tracking tuples from query:**

$ trurl "https://curl.se?search=hey&utm_source=tracker" --trim query="utm_*"
$ trurl "https://curl.se?search=hey&utm_source=tracker" \
--trim query="utm_*"
https://curl.se/?search=hey

**Show a specific query key value:**
Expand Down
4 changes: 2 additions & 2 deletions cmdline/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ Expands the variable as a valid JSON string. This makes it easier to insert
valid JSON into an argument (The quotes are not included in the resulting
JSON).

--expand-json “\”full name\: \{{first:json}} {{last:json}}\””
--expand-json "\"full name\": \"{{first:json}} {{last:json}}\""

To trim the variable first, apply both functions (in this order):

--expand-json “\”full name\: \{{varName:trim:json}}\””
--expand-json "\"full name\": \"{{varName:trim:json}}\""


## Function: `url`
Expand Down
6 changes: 4 additions & 2 deletions libcurl-http/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ picking the safest of the available methods.

Tell libcurl to accept multiple method by bitwise ORing them like this:

curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC | CURLAUTH_DIGEST);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH,
CURLAUTH_BASIC | CURLAUTH_DIGEST);

If you want libcurl to only allow a single specific method but still want it
to probe first to check if it can possibly still make the request without the
Expand All @@ -122,4 +123,5 @@ to the bitmask.
Ask to use digest, but nothing else but digest, and only if proven really
necessary:

curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST | CURLAUTH_ONLY);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH,
CURLAUTH_DIGEST | CURLAUTH_ONLY);
9 changes: 5 additions & 4 deletions libcurl/--libcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ This creates `example.c` in the current directory, looking similar to this:
curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
curl_easy_setopt(hnd, CURLOPT_USERAGENT, "curl/7.45.0");
curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 50L);
curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS, "/home/daniel/.ssh/known_hosts");
curl_easy_setopt(hnd, CURLOPT_SSH_KNOWNHOSTS,
"/home/daniel/.ssh/known_hosts");
curl_easy_setopt(hnd, CURLOPT_TCP_KEEPALIVE, 1L);

/* Here is a list of options the curl code used that cannot get generated
as source easily. You may select to either not use them or implement
them yourself.
/* Here is a list of options the curl code used that cannot get
generated as source easily. You may select to either not use them or
implement them yourself.

CURLOPT_WRITEDATA set to a objectpointer
CURLOPT_WRITEFUNCTION set to a functionpointer
Expand Down
6 changes: 3 additions & 3 deletions libcurl/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ layout:

/* when 'age' is 3 or higher (7.16.1 or later), the members below also
exist */
int iconv_ver_num; /* '_libiconv_version' if iconv support enabled */
int iconv_ver_num; /* '_libiconv_version' if iconv enabled */

const char *libssh_version; /* human readable string */

Expand All @@ -133,9 +133,9 @@ layout:
version or NULL */

/* when 'age' is 6 or higher, the member below also exists: */
const char *cainfo; /* the built-in default CURLOPT_CAINFO, might
const char *cainfo; /* built-in default CURLOPT_CAINFO, might
be NULL */
const char *capath; /* the built-in default CURLOPT_CAPATH, might
const char *capath; /* built-in default CURLOPT_CAPATH, might
be NULL */

/* when 'age' is 7 or higher, the member below also exists: */
Expand Down
3 changes: 2 additions & 1 deletion libcurl/callbacks/header.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The header callback is set with `CURLOPT_HEADERFUNCTION`:

The `header_callback` function must match this prototype:

size_t header_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
size_t header_callback(char *ptr, size_t size, size_t nmemb,
void *userdata);

This callback function gets called by libcurl as soon as a header has been
received. *ptr* points to the delivered data, and the size of that data is
Expand Down
3 changes: 2 additions & 1 deletion libcurl/callbacks/openclosesocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ The corresponding callback to the open socket is of course the close
socket. Usually when you provide a custom way to provide a file descriptor you
want to provide your own cleanup version as well:

curl_easy_setopt(handle, CURLOPT_CLOSESOCKETFUNCTION, closesocket_callback);
curl_easy_setopt(handle, CURLOPT_CLOSESOCKETFUNCTION,
closesocket_callback);

The `closesocket_callback` function must match this prototype:

Expand Down
3 changes: 2 additions & 1 deletion libcurl/callbacks/read.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The read callback is set with `CURLOPT_READFUNCTION`:

The `read_callback` function must match this prototype:

size_t read_callback(char *buffer, size_t size, size_t nitems, void *stream);
size_t read_callback(char *buffer, size_t size, size_t nitems,
void *stream);

This callback function gets called by libcurl when it wants to send data to
the server. This is a transfer that you have set up to upload data or
Expand Down
3 changes: 2 additions & 1 deletion libcurl/callbacks/write.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The write callback is set with `CURLOPT_WRITEFUNCTION`:

The `write_callback` function must match this prototype:

size_t write_callback(char *ptr, size_t size, size_t nmemb, void *userdata);
size_t write_callback(char *ptr, size_t size, size_t nmemb,
void *userdata);

This callback function gets called by libcurl as soon as there is data
received that needs to be saved. *ptr* points to the delivered data, and the
Expand Down
4 changes: 2 additions & 2 deletions libcurl/drive/multi-socket.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ things up and from then on you can just let your event system drive:

curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0, &running);

/* now the callbacks should have been called and we have sockets to wait for
and possibly a timeout, too. Make the event system do its magic */
/* now the callbacks should have been called and we have sockets to wait
for and possibly a timeout, too. Make the event system do its magic */

event_base_dispatch(event_base); /* libevent2 has this API */

Expand Down
3 changes: 2 additions & 1 deletion libcurl/drive/multi.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ codes*):
FD_ZERO(&fdexcep);

/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite,
&fdexcep, &maxfd);

if (maxfd == -1) {
SHORT_SLEEP;
Expand Down
4 changes: 2 additions & 2 deletions libcurl/examples/getinmem.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ from that instead.
};

static size_t
WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp)
mem_cb(void *contents, size_t size, size_t nmemb, void *userp)
{
size_t realsize = size * nmemb;
struct MemoryStruct *mem = (struct MemoryStruct *)userp;
Expand Down Expand Up @@ -62,7 +62,7 @@ from that instead.
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);
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, mem_cb);

/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
Expand Down
6 changes: 3 additions & 3 deletions libcurl/examples/http-ul-nonblock.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ This examples makes a multipart form-post using the multi interface.
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 */
/* 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_URL, "https://example.com/upload.cgi");
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headerlist);
Expand Down
32 changes: 17 additions & 15 deletions source/opensource/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ full:

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization of
the copyright holder.

This is legalese that says you are allowed to change the code, redistribute
the code, redistribute binaries built from the code and build proprietary code
Expand Down
3 changes: 2 additions & 1 deletion usingcurl/connections/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ You *can* still use `--resolve` to accomplish this if you know the specific IP
address of load1. But without having to first resolve and fix the IP address
separately, you can tell curl:

curl --connect-to www.example.com:80:load1.example.com:80 http://www.example.com
curl --connect-to www.example.com:80:load1.example.com:80 \
http://www.example.com

It redirects from a SOURCE NAME + SOURCE PORT to a DESTINATION NAME +
DESTINATION PORT. curl then resolves the `load1.example.com` name and
Expand Down
3 changes: 2 additions & 1 deletion usingcurl/verbose/writeout.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ carriage return with and a tab space with .

As an example, we can output the Content-Type and the response code from an HTTP transfer, separated with newlines and some extra text like this:

curl -w "Type: %{content_type}\nCode: %{response_code}\n" http://example.com
curl -w "Type: %{content_type}\nCode: %{response_code}\n" \
http://example.com

The output is sent to stdout by default so you probably want to make sure that you do not also send the downloaded content to stdout as then you might have a hard time to separate out the data; or use `%{stderr}` to send the output to stderr.

Expand Down
6 changes: 3 additions & 3 deletions usingcurl/version.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ are rather long and might wrap in your terminal window.

An example output from a Debian Linux in June 2020:

curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1g zlib/1.2.11
brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.8.0
nghttp2/1.41.0 librtmp/2.3
curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1g
zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0)
libssh2/1.8.0 nghttp2/1.41.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Expand Down

0 comments on commit d01a748

Please sign in to comment.