Skip to content

Commit

Permalink
Minor grammatical and other updates to improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
dfandrich authored and bagder committed Oct 8, 2016
1 parent cbd4513 commit ab9e702
Show file tree
Hide file tree
Showing 29 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion LAYOUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Everything curl

1. Intro
2. the cURL project
3. curl and open source
3. curl and Open Source
4. The curl source code
5. Network protocols
6. The curl command line tool
Expand Down
28 changes: 14 additions & 14 deletions building-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source code. The binaries which can be found on the download page of the curl
web and installed from other places on the Internet are all built and provided
to the world by other friendly people and organizations.

The source code consists of a large amount of files containing C
The source code consists of a large number of files containing C
code. Generally speaking, the same set of files are used to build binaries for
all platforms and computer architectures that curl supports. curl can be built
and run on a vast amount of different platforms. If you use a rare operating
Expand All @@ -23,7 +23,7 @@ don't always necessarily succeed!

When release tarballs are created, a few files are generated and included in
the final file that is the one used for the release. Those generated files are
not present in the git repository, exactly for that reason that they are
not present in the git repository, exactly for the reason that they are
generated so there's no need to store them in git.

So, if you want to build curl from git you need to generate some of those
Expand All @@ -34,7 +34,7 @@ running `./buildconf` and on Windows you run `buildconf.bat`.

There are two distinctly different ways to build curl on Linux and other
Unix-like systems. There's the one using the configure script and there's the
cmake approach.
CMake approach.

There are two different build environments to cater for people's different
opinions and tastes. The configure based build is arguably the more mature and
Expand All @@ -43,7 +43,7 @@ more complete build system and should probably be considered the default one.
### Autotools

The "Autotools" is a collection of different tools that used together generate
for example the `configure` script. The configure script is run by the user
the `configure` script. The configure script is run by the user
who wants to build curl and it does a whole bunch of things:

- it checks for features and functions present in your system
Expand All @@ -53,39 +53,39 @@ who wants to build curl and it does a whole bunch of things:
on/off. Or even compiler warning levels and more.

- it offers command line options to let the builder point to specific
installation paths for various third party dependencies that curl can be
installation paths for various third-party dependencies that curl can be
built to use.

- specify on with file path the generated installation should be placed when
- specifies on which file path the generated installation should be placed when
ultimately the build is made and "make install" is invoked

In the most basic usage, just running `./configure` in the source directory is
enough. When the script completes, it outputs a summary of what options it has
detected/enabled and what features that are still disabled, some of them
possibly because it failed to detect the presence of necessary third party
possibly because it failed to detect the presence of necessary third-party
dependencies that are needed for those functions to work.

Then you invoke `make` to build the entire thing and then you can invoke `make
Then you invoke `make` to build the entire thing and `make
install` to install curl, libcurl and associated things. `make install`
requires that you have the correct rights in your system to create and write
files in the installation directory or you will get some errors.

### cross-compiling

Cross-compiling means that you build the source on one architecture but the
output is created to get run on a different one. For example you could build
the source on a Linux machine but have the output work to get run on a Windows
output is created to be run on a different one. For example, you could build
the source on a Linux machine but have the output work to run on a Windows
machine.

For cross-compiling to work, you need a dedicated compiler and build system
setup for the particular target system you want to build for. How to get and
install that is however not covered in this book.
setup for the particular target system for which you want to build. How to get
and install that is, however, not covered in this book.

Once you have a cross compiler, you can instruct configure to use that
compiler instead of the "native" compiler when it builds curl so that the end
result then can be moved over and used on the other machine.

### cmake
### CMake

TBD

Expand All @@ -101,7 +101,7 @@ TBD

TBD

### cmake
### CMake

TBD

Expand Down
24 changes: 12 additions & 12 deletions building-tls.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Build to use a TLS library

To make curl support TLS based protocols, such as HTTPS, FTPS, SMTPS, POP3S,
IMAPS and more, you need to build with a third party TLS library since curl
IMAPS and more, you need to build with a third-party TLS library since curl
doesn't implement the TLS protocol itself.

curl is written to work with a large amount of TLS libraries:
curl is written to work with a large number of TLS libraries:

- BoringSSL
- GSkit (OS/400 specific)
Expand All @@ -16,7 +16,7 @@ curl is written to work with a large amount of TLS libraries:
- axTLS
- libressl
- mbedTLS
- schannel (native Windows)
- Schannel (native Windows)

When you build curl and libcurl to use one of these libraries, it is important
that you have the library and its include headers installed on your build
Expand Down Expand Up @@ -67,7 +67,7 @@ point configure to a custom install path prefix where it can find nss:

(cyassl was the former name of the library) configure will detect WolfSSL in
its default path by default. You can optionally point configure to a custom
install path prefix where it can find wolfssl:
install path prefix where it can find WolfSSL:

./configure --with-cyassl=/home/user/installed/nss --without-ssl

Expand All @@ -76,7 +76,7 @@ install path prefix where it can find wolfssl:
./configure --with-axtls --without-ssl

configure will detect axTLS in its default path by default. You can optionally
point configure to a custom install path prefix where it can find axtls:
point configure to a custom install path prefix where it can find axTLS:

./configure --with-axtls=/home/user/installed/axtls --without-ssl

Expand All @@ -86,28 +86,28 @@ point configure to a custom install path prefix where it can find axtls:

configure will detect mbedTLS in its default path by default. You can
optionally point configure to a custom install path prefix where it can find
mbedtls:
mbedTLS:

./configure --with-mbedtls=/home/user/installed/mbedtls --without-ssl

### Secure Transport

./configure --with-darwinssl --without-ssl

(darwinssl is an alternative name for Secure Transport)
(DarwinSSL is an alternative name for Secure Transport)
configure will detect Secure Transport in its default path by default. You can
optionally point configure to a custom install path prefix where it can find
darwinssl:
DarwinSSL:

./configure --with-darwinssl=/home/user/installed/darwinssl --without-ssl

### schannel
### Schannel

./configure --with-winssl --without-ssl

(winssl is an alternative name for schannel)
configure will detect schannel in its default path by default. You can
(WinSSL is an alternative name for Schannel)
configure will detect Schannel in its default path by default. You can
optionally point configure to a custom install path prefix where it can find
winssl:
WinSSL:

./configure --with-winssl=/home/user/installed/winssl --without-ssl
2 changes: 1 addition & 1 deletion callback-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

TBD

### Convert from UTF8 callback
### Convert from UTF-8 callback

TBD

2 changes: 1 addition & 1 deletion callback-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ it flows.

A common use for this callback is to get a full trace of all data that libcurl
sends and receives. The data sent to this callback is always the unencrypted
version, even when for example HTTPS or other encrypted protocols are used.
version, even when, for example, HTTPS or other encrypted protocols are used.

This callback must return zero or cause the transfer to stop with an error
code.
Expand Down
8 changes: 4 additions & 4 deletions callback-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ received. *ptr* points to the delivered data, and the size of that data is
*size* multiplied with *nmemb*. libcurl buffers headers and delivers only
"full" headers, one by one, to this callback.

The data passed to this function will not be zero terminated! You cannot for
example use printf's "%s" operator to display the contents nor strcpy to copy
The data passed to this function will not be zero terminated! You cannot, for
example, use printf's "%s" operator to display the contents nor strcpy to copy
it.

This callback should return the number of bytes actually taken care of. If
that amount differs from the amount passed to your callback function, it
signals an error condition to the library. This will cause the transfer to get
aborted and the libcurl function used will return `CURLE_WRITE_ERROR`.
signals an error condition to the library. This will cause the transfer to
abort and the libcurl function used will return `CURLE_WRITE_ERROR`.

The user pointer passed in to the callback in the *userdata* argument is set
with CURLOPT_HEADERDATA:
Expand Down
2 changes: 1 addition & 1 deletion callback-progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ transferred, in number of bytes:
Unknown/unused argument values passed to the callback will be set to zero
(like if you only download data, the upload size will remain 0). Many times
the callback will be called one or more times first, before it knows the data
sizes so a program must be made to handle that.
sizes, so a program must be made to handle that.

Returning a non-zero value from this callback will cause libcurl to abort the
transfer and return `CURLE_ABORTED_BY_CALLBACK`.
Expand Down
4 changes: 2 additions & 2 deletions callback-sockopt.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ The `sockopt_callback` function must match this prototype:
curl_socket_t curlfd,
curlsocktype purpose);

This callback function gets called by libcurl when it when a new socket has
been created, but before the connect call to allow applications to change
This callback function gets called by libcurl when a new socket has
been created but before the connect call, to allow applications to change
specific socket options.

The **clientp** pointer points to the private data set with
Expand Down
10 changes: 5 additions & 5 deletions callback-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ size of that data is *size* multiplied with *nmemb*.
If this callback isn't set, libcurl instead uses 'fwrite' by default.

The write callback will be passed as much data as possible in all invokes, but
you must not make any assumptions. It may be one byte, it may be thousands.
it must not make any assumptions. It may be one byte, it may be thousands.
The maximum amount of body data that will be passed to the write callback is
defined in the curl.h header file: `CURL_MAX_WRITE_SIZE` (the usual default is
16K). If `CURLOPT_HEADER` is enabled for this transfer, which makes header
16KB). If `CURLOPT_HEADER` is enabled for this transfer, which makes header
data get passed to the write callback, you can get up to
`CURL_MAX_HTTP_HEADER` bytes of header data passed into it. This usually means
100K.
100KB.

This function may be called with zero bytes data if the transferred file is empty.

The data passed to this function will not be zero terminated! You cannot for
example use printf's "%s" operator to display the contents nor strcpy to copy
The data passed to this function will not be zero terminated! You cannot, for
example, use printf's "%s" operator to display the contents nor strcpy to copy
it.

This callback should return the number of bytes actually taken care of. If
Expand Down
12 changes: 6 additions & 6 deletions cmdline-configfile.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Config file

You can easily end up with curl command lines that use a very large amount of
command line options, make it rather hard to work with. Sometimes the length
You can easily end up with curl command lines that use a very large number of
command line options, making them rather hard to work with. Sometimes the length
of the command line you want to enter even hits the maximum length your
command line system allows. The Microsoft windows command prompt being an
command line system allows. The Microsoft Windows command prompt being an
example of something that has a fairly small maximum line length.

To aid such situations, curl offers a feature we call "config file". It
Expand Down Expand Up @@ -35,7 +35,7 @@ alternatively be written as:
head

Command line options that take an argument must have its argument provided on
the same line as the option. For example changing the user-agent HTTP header
the same line as the option. For example changing the User-Agent HTTP header
can be done with

user-agent "Everything-is-an-agent"
Expand Down Expand Up @@ -67,7 +67,7 @@ provide a URL for curl like this:

When curl is invoked, it always (unless `-q` is used) checks for a default
config file and uses it if found. The file name it checks for is `.curlrc` on
unix like systems and `_curlrc` on Windows.
Unix-like systems and `_curlrc` on Windows.

The default config file is checked for in the following places in this order:

Expand All @@ -77,7 +77,7 @@ Unix-like systems (which returns the home dir given the current user in your
system). On Windows, it then checks for the APPDATA variable, or as a last
resort the '%USERPROFILE%\Application Data'.

2. On windows, if there is no _curlrc file in the home dir, it checks for one
2. On Windows, if there is no _curlrc file in the home dir, it checks for one
in the same dir the curl executable is placed. On Unix-like systems, it will
simply try to load .curlrc from the determined home dir.

8 changes: 4 additions & 4 deletions cmdline-globbing.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ images one by one that are named numerically:
$ curl -O http://example.com/[1-100].png

and it can even do the ranges with zero prefixes, like if the number is
three-digit all the time:
three digits all the time:

$ curl -O http://example.com/[001-100].png

Expand All @@ -36,7 +36,7 @@ too. This example range goes from 0 to 100 with an increment of 2:
curl can also do alphabetical ranges, like when a site has a section named a
to z:

$ curl -O http://example.com/secion[a-z].html
$ curl -O http://example.com/section[a-z].html

### A list

Expand All @@ -49,7 +49,7 @@ of the brackets used for the ranges:
### Combinations

You can use several globs in the same URL which then will make curl iterate
over those too. To download the images of Ben, Alice and Frank, in both the
over those, too. To download the images of Ben, Alice and Frank, in both the
resolutions 100x100 and 1000x1000, a command line could look like:

$ curl -O http://example.com/{Ben,Alice,Frank}-{100x100,1000x1000}.jpg
Expand All @@ -59,7 +59,7 @@ Or download all the images of a chess board, indexed by two coordinates ranged

$ curl -O http://example.com/chess-[0-7]x[0-7].jpg

And you can of course mix ranges and series. Get a weeks worth of logs for
And you can of course mix ranges and series. Get a week's worth of logs for
both the web server and the mail server:

$ curl -O http://example.com/{web,mail}-log[0-6].txt
Expand Down
4 changes: 2 additions & 2 deletions cmdline-listopts.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ looking for. `curl --help` or simply `curl -h` will get you a list of all
existing options with a brief explanation. If you don't really know what
you're looking for, you probably won't be entirely satisfied.

Then you can instead opt to use `curl --manual` which then will output the
Then you can instead opt to use `curl --manual` which will output the
entire man page for curl plus an appended tutorial for the most common use
cases. That is a very thorough and complete document on how each option
works. Several thousand lines of documentation. To wade through that is also a
works amassing several thousand lines of documentation. To wade through that is also a
tedious work and we encourage use of a search function through those text
masses. Some people will appreciate the man page in its [web
version](https://curl.haxx.se/docs/manpage.html).
Expand Down
14 changes: 7 additions & 7 deletions cmdline-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ curl follows HTTP redirects:
$ curl -vL http://example.com

The command line parser in curl always parses the entire line and you can put
the options anywhere you like, they can also appear after the URL:
the options anywhere you like; they can also appear after the URL:

$ curl http://example.com -Lv

### Long options

Single letter options are convenient since they are quick to write and use, but
Single-letter options are convenient since they are quick to write and use, but
as there are only a limited number of letters in the alphabet and there are
many things to control, not all options are available like that. Long option
names are therefore provided for those. Also, as a convenience and to allow
scripts to become more readable, all the short options have longer name
scripts to become more readable, most short options have longer name
aliases.

Long options are always written with *two* minuses (or *dashes*, whichever you
Expand All @@ -48,9 +48,9 @@ and asking for HTTP redirects as well using the long format looks like:
### Arguments to options

Not all options are just simple boolean flags that enable or disable
features. For some of them you need to pass on data. Like perhaps a user name
features. For some of them you need to pass on data, like perhaps a user name
or a path to a file. You do this by writing first the option and then the
argument, separated with a space. Like for example if you want to send send an
argument, separated with a space. Like, for example, if you want to send send an
arbitrary string of data in an HTTP POST to a server:

$ curl -d arbitrary http://example.com
Expand All @@ -59,12 +59,12 @@ and it works the same way even if you use the long form of the option:

$ curl --data arbitrary http://example.com

When you use the short options with arguments, you can in fact also write the
When you use the short options with arguments, you can, in fact, also write the
data without the space separator:

$ curl -darbitrary http://example.com

### Negate options
### Negative options

For options that switch on something, there is also a way to switch it
off. You then use the long form of the option with an initial "no-" prefix
Expand Down
Loading

0 comments on commit ab9e702

Please sign in to comment.