Skip to content

Improve spelling in source files #520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .evergreen/abi-compliance-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ make install
# checkout the newest release
newest=`cat VERSION_RELEASED`

# CDRIVER-2731: Update this line in verison 1.11.1
# CDRIVER-2731: Update this line in version 1.11.1
git checkout tags/$newest -f -- src

# build the newest release
Expand Down
10 changes: 5 additions & 5 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ New features and bug fixes:
* mongoc_server_description_ismaster
* mongoc_server_description_round_trip_time
* mongoc_server_description_type
* Exported symbols are no longer declared in seperate export files.
* Exported symbols are no longer declared in separate export files.
This could break ABI with applications using clang, which previously
exported symbols from the internal private ABI.
* mongoc no longer crashes when multi roundtrip bulk operation fails.
Expand Down Expand Up @@ -819,7 +819,7 @@ It is my pleasure to announce the release of mongo-c-driver 1.4.0.
TLS
---

The driver can now use the native TLS and crypto functions included in Mac OS X
The driver can now use the native TLS and crypto functions included in macOS
and Windows. OpenSSL is no longer required for TLS or authentication on Mac or
Windows. By default, OpenSSL is used if available, the default will switch in
version 2.0 to prefer native TLS.
Expand Down Expand Up @@ -992,8 +992,8 @@ Notable Bug Fixes
properly parsed from the URI, see the "Authentication" doc for details.
* Comprehensive compatibility with various C standards and compilers.

Acknowledgments
---------------
Acknowledgements
----------------

Thanks to everyone who contributed to the development of this release.

Expand Down Expand Up @@ -1120,7 +1120,7 @@ mongo-c-driver 1.3.0

It is my pleasure to announce to you the release of the MongoDB C Driver 1.3.0.

Changes since the the release candidate 1.3.0-rc0:
Changes since the release candidate 1.3.0-rc0:

* Fix a cursor bug introduced on big-endian platforms in 1.3.0-beta0.
* Improve documentation for mongoc_host_list_t.
Expand Down
2 changes: 1 addition & 1 deletion debian/build_snapshot.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for arg in "$@"; do
echo "Usage: ./debian/build_snapshot.sh"
echo ""
echo " This script is used to build a .deb package directly from a snapshot of the"
echo " current respository."
echo " current repository."
echo ""
echo " This script must be called from the base directory of the repository, and"
echo " requires utilites from these packages: dpkg-dev, git-buildpackage"
Expand Down
2 changes: 1 addition & 1 deletion src/common/common-md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
in a product, an acknowledgement in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/doc/bson_array_as_json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Description

The :symbol:`bson_array_as_json()` function shall encode ``bson`` as a UTF-8
string using libbson's legacy JSON format, except the outermost element is
encoded as JSON array, rather then JSON document.
encoded as JSON array, rather than JSON document.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as a JSON array, rather than a JSON document"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the "as" is certainly better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK!

The caller is responsible for freeing the resulting UTF-8 encoded string by
calling :symbol:`bson_free()` with the result.

Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bson_gettimeofday (struct timeval *tv) /* OUT */
uint64_t tmp = 0;

/*
* The const value is shamelessy stolen from
* The const value is shamelessly stolen from
* http://www.boost.org/doc/libs/1_55_0/boost/chrono/detail/inlined/win/chrono.hpp
*
* File times are the number of 100 nanosecond intervals elapsed since
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-decimal128.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ bson_decimal128_to_string (const bson_decimal128_t *dec, /* IN */
is_zero = true;
} else if (significand128.parts[0] >= (1 << 17)) {
/* The significand is non-canonical or zero.
* In order to preserve compatability with the densely packed decimal
* In order to preserve compatibility with the densely packed decimal
* format, the maximum value for the significand of decimal128 is
* 1e34 - 1. If the value is greater than 1e34 - 1, the IEEE 754
* standard dictates that the significand is interpreted as zero.
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-iso8601.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ _bson_iso8601_date_parse (const char *str,
}

/* we inflect the meaning of a 'positive' timezone. Those are hours
* we have to substract, and vice versa */
* we have to subtract, and vice versa */
tz_adjustment =
(tz_ptr[0] == '-' ? 1 : -1) * ((tz_min * 60) + (tz_hour * 60 * 60));

Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-md5.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
in a product, an acknowledgement in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ bson_zero_free (void *mem, /* IN */
*
* This function will change our allocationt vtable.
*
* It is imperitive that this is called at the beginning of the
* It is imperative that this is called at the beginning of the
* process before any memory has been allocated by the default
* allocator.
*
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-oid.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ bson_oid_init (bson_oid_t *oid, /* OUT */
* bson_oid_init_from_data --
*
* Initializes an @oid from @data. @data MUST be a buffer of at least
* 12 bytes. This method is analagous to memcpy()'ing data into @oid.
* 12 bytes. This method is analogous to memcpy()'ing data into @oid.
*
* Returns:
* None.
Expand Down
8 changes: 4 additions & 4 deletions src/libbson/src/bson/bson-oid.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ bson_oid_copy_unsafe (const bson_oid_t *src, bson_oid_t *dst)
* @hex: A character to parse to its integer value.
*
* This function contains a jump table to return the integer value for a
* character containing a hexidecimal value (0-9, a-f, A-F). If the character
* is not a hexidecimal character then zero is returned.
* character containing a hexadecimal value (0-9, a-f, A-F). If the character
* is not a hexadecimal character then zero is returned.
*
* Returns: An integer between 0 and 15.
*/
Expand Down Expand Up @@ -202,9 +202,9 @@ bson_oid_parse_hex_char (char hex)
/**
* bson_oid_init_from_string_unsafe:
* @oid: A bson_oid_t to store the result.
* @str: A 24-character hexidecimal encoded string.
* @str: A 24-character hexadecimal encoded string.
*
* Parses a string containing 24 hexidecimal encoded bytes into a bson_oid_t.
* Parses a string containing 24 hexadecimal encoded bytes into a bson_oid_t.
* This function is meant to be as fast as possible and inlined into your
* code. For that purpose, the function does not perform any sort of bounds
* checking and it is the callers responsibility to ensure they are passing
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bson_utf8_validate (const char *utf8, /* IN */
}

/*
* Code point wont fit in utf-16, not allowed.
* Code point won't fit in utf-16, not allowed.
*/
if (c > 0x0010FFFF) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bson_writer_destroy (bson_writer_t *writer) /* IN */
* document currently being written.
*
* This is useful if you want to check to see if you've passed a given
* memory boundry that cannot be sent in a packet. See
* memory boundary that cannot be sent in a packet. See
* bson_writer_rollback() to abort the current document being written.
*
* Returns:
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/bson/bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ bson_append_binary (bson_t *bson, /* IN */
* a boolean indicated by @value.
*
* Returns:
* true if succesful; otherwise false.
* true if successful; otherwise false.
*
* Side effects:
* None.
Expand Down
6 changes: 3 additions & 3 deletions src/libbson/src/bson/bson.h
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ bson_append_oid (bson_t *bson,
* 's' for dotall mode ('.' matches everything)
* 'u' to make \w and \W match unicode.
*
* For more information on what comprimises a BSON regex, see bsonspec.org.
* For more information on what compromises a BSON regex, see bsonspec.org.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comprises, here and below

*
* Returns: true if successful; false if append would overflow max size.
*/
Expand Down Expand Up @@ -969,7 +969,7 @@ bson_append_regex (bson_t *bson,
* 's' for dotall mode ('.' matches everything)
* 'u' to make \w and \W match unicode.
*
* For more information on what comprimises a BSON regex, see bsonspec.org.
* For more information on what compromises a BSON regex, see bsonspec.org.
*
* Returns: true if successful; false if append would overflow max size.
*/
Expand Down Expand Up @@ -1069,7 +1069,7 @@ bson_append_timeval (bson_t *bson,
*
* Appends a new field to @bson of type BSON_TYPE_DATE_TIME.
*
* Returns: true if sucessful; otherwise false.
* Returns: true if successful; otherwise false.
*/
BSON_EXPORT (bool)
bson_append_date_time (bson_t *bson,
Expand Down
2 changes: 1 addition & 1 deletion src/libbson/src/jsonsl/jsonsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ void jsonsl_jpr_match_state_cleanup(jsonsl_t jsn)
/**
* This function should be called exactly once on each element...
* This should also be called in recursive order, since we rely
* on the parent having been initalized for a match.
* on the parent having been initialized for a match.
*
* Since the parent is checked for a match as well, we maintain a 'serial' counter.
* Whenever we traverse an element, we expect the serial to be the same as a global
Expand Down
4 changes: 2 additions & 2 deletions src/libbson/src/jsonsl/jsonsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ struct jsonsl_state_st {

/*
* So now we need some special structure for keeping the
* JPR info in sync. Preferrably all in a single block
* JPR info in sync. Preferably all in a single block
* of memory (there's no need for separate allocations.
* So we will define a 'table' with the following layout
*
Expand Down Expand Up @@ -705,7 +705,7 @@ void jsonsl_dump_global_metrics(void);
*
*
* JPR (as we'll refer to it within the source) can be used by splitting
* the components into mutliple sections, and incrementally 'track' each
* the components into multiple sections, and incrementally 'track' each
* component. When JSONSL delivers a 'pop' callback for a string, or a 'push'
* callback for an object, we will check to see whether the index matching
* the component corresponding to the current level contains a match
Expand Down
6 changes: 3 additions & 3 deletions src/libmongoc/doc/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ To build only the libbson documentation:

The ``-DENABLE_MAN_PAGES=ON`` and ``-DENABLE_HTML_DOCS=ON`` can also be added as options to a normal build from a release tarball or from git so that the documentation is built at the same time as other components.

Building on Mac OS X
--------------------
Building on macOS
-----------------

Install the XCode Command Line Tools::

Expand All @@ -206,7 +206,7 @@ Build and install the driver:
$ cd cmake-build
$ cmake -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF ..

All of the same variations described above (e.g., building only libbson, building documentation, etc.) are available when building on Mac OS X.
All of the same variations described above (e.g., building only libbson, building documentation, etc.) are available when building on macOS.

.. _build-on-windows:

Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_client_set_write_concern.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Synopsis

Sets the write concern for the client. This only affects future operations, collections, and databases inheriting from ``client``.

The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgment of write operations from MongoDB. This is the correct write concern for the great majority of applications.
The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgement of write operations from MongoDB. This is the correct write concern for the great majority of applications.

It is a programming error to call this function on a client from a :symbol:`mongoc_client_pool_t`. For pooled clients, set the write concern with the :ref:`MongoDB URI <mongoc_uri_t_write_concern_options>` instead.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Description

Sets the write concern to use for operations on ``collection``.

The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgment of write operations from MongoDB. This is the correct write concern for the great majority of applications.
The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgement of write operations from MongoDB. This is the correct write concern for the great majority of applications.

2 changes: 1 addition & 1 deletion src/libmongoc/doc/mongoc_database_set_write_concern.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Synopsis

This function sets the write concern to use on operations performed with ``database``. Collections created with :symbol:`mongoc_database_get_collection()` after this call will inherit this write concern.

The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgment of write operations from MongoDB. This is the correct write concern for the great majority of applications.
The default write concern is MONGOC_WRITE_CONCERN_W_DEFAULT: the driver blocks awaiting basic acknowledgement of write operations from MongoDB. This is the correct write concern for the great majority of applications.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions src/libmongoc/doc/mongoc_ssl_opt_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ When ``crl_file`` is provided, the driver will import the revocation list to the

.. _Secure Transport:

Native TLS Support on Mac OS X / Darwin (Secure Transport)
----------------------------------------------------------
Native TLS Support on macOS / Darwin (Secure Transport)
-------------------------------------------------------

The MongoDB C Driver supports the Darwin (OS X, macOS, iOS, etc.) native TLS library (Secure Transport), and its native crypto library (Common Crypto, or CC).

Expand Down
4 changes: 2 additions & 2 deletions src/libmongoc/doc/mongoc_uri_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,14 @@ Constant Key Des
MONGOC_URI_W w Determines the write concern (guarantee). Valid values:

* 0 = The driver will not acknowledge write operations but will pass or handle any network and socket errors that it receives to the client. If you disable write concern but enable the getLastError command’s w option, w overrides the w option.
* 1 = Provides basic acknowledgment of write operations. By specifying 1, you require that a standalone mongod instance, or the primary for replica sets, acknowledge all write operations. For drivers released after the default write concern change, this is the default write concern setting.
* 1 = Provides basic acknowledgement of write operations. By specifying 1, you require that a standalone mongod instance, or the primary for replica sets, acknowledge all write operations. For drivers released after the default write concern change, this is the default write concern setting.
* majority = For replica sets, if you specify the special majority value to w option, write operations will only return successfully after a majority of the configured replica set members have acknowledged the write operation.
* n = For replica sets, if you specify a number n greater than 1, operations with this write concern return only after n members of the set have acknowledged the write. If you set n to a number that is greater than the number of available set members or members that hold data, MongoDB will wait, potentially indefinitely, for these members to become available.
* tags = For replica sets, you can specify a tag set to require that all members of the set that have these tags configured return confirmation of the write operation.
MONGOC_URI_WTIMEOUTMS wtimeoutms The time in milliseconds to wait for replication to succeed, as specified in the w option, before timing out. When wtimeoutMS is 0, write operations will never time out.
MONGOC_URI_JOURNAL journal Controls whether write operations will wait until the mongod acknowledges the write operations and commits the data to the on disk journal.

* true = Enables journal commit acknowledgment write concern. Equivalent to specifying the getLastError command with the j option enabled.
* true = Enables journal commit acknowledgement write concern. Equivalent to specifying the getLastError command with the j option enabled.
* false = Does not require that mongod commit write operations to the journal before acknowledging the write operation. This is the default option for the journal parameter.
========================================== ================================= =======================================================================================================================================================================

Expand Down
4 changes: 2 additions & 2 deletions src/libmongoc/doc/mongoc_write_concern_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Write Concern abstraction
Synopsis
--------

``mongoc_write_concern_t`` tells the driver what level of acknowledgment to await from the server. The default, MONGOC_WRITE_CONCERN_W_DEFAULT, is right for the great majority of applications.
``mongoc_write_concern_t`` tells the driver what level of acknowledgement to await from the server. The default, MONGOC_WRITE_CONCERN_W_DEFAULT, is right for the great majority of applications.

You can specify a write concern on connection objects, database objects, collection objects, or per-operation. Data-modifying operations typically use the write concern of the object they operate on, and check the server response for a write concern error or write concern timeout. For example, :symbol:`mongoc_collection_drop_index` uses the collection's write concern, and a write concern error or timeout in the response is considered a failure.

Expand All @@ -31,7 +31,7 @@ Write Concern Levels
Set the write concern level with :symbol:`mongoc_write_concern_set_w`.

========================================== ===============================================================================================================================================================================================================
MONGOC_WRITE_CONCERN_W_DEFAULT (1) By default, writes block awaiting acknowledgment from MongoDB. Acknowledged write concern allows clients to catch network, duplicate key, and other errors.
MONGOC_WRITE_CONCERN_W_DEFAULT (1) By default, writes block awaiting acknowledgement from MongoDB. Acknowledged write concern allows clients to catch network, duplicate key, and other errors.
MONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED (0) With this write concern, MongoDB does not acknowledge the receipt of write operation. Unacknowledged is similar to errors ignored; however, mongoc attempts to receive and handle network errors when possible.
MONGOC_WRITE_CONCERN_W_MAJORITY (majority) Block until a write has been propagated to a majority of the nodes in the replica set.
n Block until a write has been propagated to at least ``n`` nodes in the replica set.
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/examples/example-resume.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* token in a file "resume-token.json". On restart, if "resume-token.json"
* exists, the change stream starts watching after the persisted resume token.
*
* This behavior allows to user to exit example-resume, and restart it later
* This behavior allows a user to exit example-resume, and restart it later
* without missing any change events.
*/
#include <unistd.h>
Expand Down
2 changes: 1 addition & 1 deletion src/libmongoc/src/mongoc/mongoc-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ _mongoc_buffer_append_from_stream (mongoc_buffer_t *buffer,
* _mongoc_buffer_fill:
* @buffer: A mongoc_buffer_t.
* @stream: A stream to read from.
* @min_bytes: The minumum number of bytes to read.
* @min_bytes: The minimum number of bytes to read.
* @error: A location for a bson_error_t or NULL.
*
* Attempts to fill the entire buffer, or at least @min_bytes.
Expand Down
Loading