Documentation typos and minor include cleanup (#635)

This commit is contained in:
Alden Torres 2016-04-21 15:39:53 -04:00 committed by Arvid Norberg
parent 36cf0a7e54
commit 3c40cacd5b
3 changed files with 11 additions and 13 deletions

View File

@ -40,7 +40,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/storage.hpp"
#include "libtorrent/hasher.hpp"
#include "libtorrent/utf8.hpp"
#include "libtorrent/allocator.hpp"
#include "libtorrent/file.hpp" // for combine_path etc.
#include "libtorrent/aux_/disable_warnings_push.hpp"
@ -49,7 +48,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <utility>
#include <boost/scoped_ptr.hpp>
#include <boost/config.hpp>
#include "libtorrent/aux_/disable_warnings_pop.hpp"
@ -68,7 +66,7 @@ POSSIBILITY OF SUCH DAMAGE.
// and set the piece hashes.
// 4. The torrent is bencoded into a file or buffer.
//
// If there are a lot of files and or deep directoy hierarchies to
// If there are a lot of files and or deep directory hierarchies to
// traverse, step one can be time consuming.
//
// Typically step 3 is by far the most time consuming step, since it
@ -156,7 +154,7 @@ namespace libtorrent
// piece_size will be calculated such that the torrent file is roughly 40 kB.
//
// If a ``pad_size_limit`` is specified (other than -1), any file larger than
// the specified number of bytes will be preceeded by a pad file to align it
// the specified number of bytes will be preceded by a pad file to align it
// with the start of a piece. The pad_file_limit is ignored unless the
// ``optimize_alignment`` flag is passed. Typically it doesn't make sense
// to set this any lower than 4kiB.
@ -267,7 +265,7 @@ namespace libtorrent
// Sets and queries the private flag of the torrent.
// Torrents with the private flag set ask clients to not use any other
// sources than the tracker for peers, and to not advertize itself publicly,
// sources than the tracker for peers, and to not advertise itself publicly,
// apart from the tracker.
void set_priv(bool p) { m_private = p; }
bool priv() const { return m_private; }
@ -382,17 +380,17 @@ namespace libtorrent
}
// Adds the file specified by ``path`` to the file_storage object. In case ``path``
// refers to a diretory, files will be added recursively from the directory.
// refers to a directory, files will be added recursively from the directory.
//
// If specified, the predicate ``p`` is called once for every file and directory that
// is encountered. files for which ``p`` returns true are added, and directories for
// is encountered. Files for which ``p`` returns true are added, and directories for
// which ``p`` returns true are traversed. ``p`` must have the following signature::
//
// bool Pred(std::string const& p);
//
// The path that is passed in to the predicate is the full path of the file or
// directory. If no predicate is specified, all files are added, and all directories
// are traveresed.
// are traversed.
//
// The ".." directory is never traversed.
//

View File

@ -63,7 +63,7 @@ POSSIBILITY OF SUCH DAMAGE.
// mutex locked. And they are always called from the libtorrent network thread. In
// case portions of your plugin are called from other threads, typically the main
// thread, you cannot use any of the member functions on the internal structures
// in libtorrent, since those require the mutex to be locked. Futhermore, you would
// in libtorrent, since those require the mutex to be locked. Furthermore, you would
// also need to have a mutex on your own shared data within the plugin, to make
// sure it is not accessed at the same time from the libtorrent thread (through a
// callback). See `boost thread's mutex`_. If you need to send out a message from
@ -71,7 +71,7 @@ POSSIBILITY OF SUCH DAMAGE.
// sending in ``tick()``.
//
// Since the plugin interface gives you easy access to internal structures, it
// is not supported as a stable API. Plugins should be considered spcific to a
// is not supported as a stable API. Plugins should be considered specific to a
// specific version of libtorrent. Although, in practice the internals mostly
// don't change that dramatically.
//
@ -150,7 +150,7 @@ POSSIBILITY OF SUCH DAMAGE.
// of simply allocating a new instance as a copy of ``*this`` is all that's
// expected.
//
// The static category is required for checking wether or not the category
// The static category is required for checking whether or not the category
// for a specific alert is enabled or not, without instantiating the alert.
// The ``category`` virtual function is the run-time equivalence.
//

View File

@ -253,7 +253,7 @@ namespace libtorrent
// this file has the executable attribute set.
attribute_executable = 4,
// this file is a symbilic link. It should have a link
// this file is a symbolic link. It should have a link
// target string associated with it.
attribute_symlink = 8
};
@ -269,7 +269,7 @@ namespace libtorrent
// being added. This memory is *borrowed*, i.e. it is the caller's
// responsibility to make sure it stays valid throughout the lifetime
// of this file_storage object or any copy of it. The same thing applies
// to ``filehash``, wich is an optional pointer to a 20 byte binary
// to ``filehash``, which is an optional pointer to a 20 byte binary
// SHA-1 hash of the file.
//
// if ``filename`` is NULL, the filename from ``path`` is used and not