Skip to content

Commit

Permalink
Fix various typos (#272)
Browse files Browse the repository at this point in the history
* Fix various typos

Found via `codespell -q 3 -S ./3rdparty -L ba,nin,numer,ro`

* Fix source typo in tests/crt_test.cpp
  • Loading branch information
luzpaz committed Feb 6, 2022
1 parent c969169 commit ad018d4
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion include/bx/bx.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace bx
///
int32_t memCmp(const void* _lhs, const void* _rhs, size_t _numBytes);

/// Gather data scattered throught memory into linear memory block.
/// Gather data scattered through memory into linear memory block.
///
/// @param _dst Destination pointer.
/// @param _src Source pointer.
Expand Down
8 changes: 4 additions & 4 deletions include/bx/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ namespace bx
///
uint64_t endianSwap(uint64_t _in);

/// Input argument is encoded as little endian, convert it if neccessary
/// depending on host CPU endianess.
/// Input argument is encoded as little endian, convert it if necessary
/// depending on host CPU endianness.
template <typename Ty>
Ty toLittleEndian(const Ty _in);

/// Input argument is encoded as big endian, convert it if neccessary
/// depending on host CPU endianess.
/// Input argument is encoded as big endian, convert it if necessary
/// depending on host CPU endianness.
template <typename Ty>
Ty toBigEndian(const Ty _in);

Expand Down
2 changes: 1 addition & 1 deletion include/bx/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ namespace bx
///
bool remove(const FilePath& _filePath, Error* _err = bx::ErrorIgnore{});

/// Removes file or directory recursivelly.
/// Removes file or directory recursively.
///
bool removeAll(const FilePath& _filePath, Error* _err = bx::ErrorIgnore{});

Expand Down
6 changes: 3 additions & 3 deletions include/bx/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ namespace bx
///
BX_CONST_FUNC float atan(float _a);

/// Retruns the inverse tangent of _y/_x.
/// Returns the inverse tangent of _y/_x.
///
BX_CONST_FUNC float atan2(float _y, float _x);

Expand Down Expand Up @@ -308,11 +308,11 @@ namespace bx
///
BX_CONSTEXPR_FUNC float nms(float _a, float _b, float _c);

/// Returns resul of addition (_a + _b).
/// Returns result of addition (_a + _b).
///
BX_CONSTEXPR_FUNC float add(float _a, float _b);

/// Returns resul of subtracion (_a - _b).
/// Returns result of subtracion (_a - _b).
///
BX_CONSTEXPR_FUNC float sub(float _a, float _b);

Expand Down
2 changes: 1 addition & 1 deletion include/bx/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define BX_COMPILER_GCC 0
#define BX_COMPILER_MSVC 0

// Endianess
// Endianness
#define BX_CPU_ENDIAN_BIG 0
#define BX_CPU_ENDIAN_LITTLE 0

Expand Down
6 changes: 3 additions & 3 deletions include/bx/readerwriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ namespace bx
uint32_t m_size;
};

/// Sizer writer. Dummy writter that only counts number of bytes written into it.
/// Sizer writer. Dummy writer that only counts number of bytes written into it.
class SizerWriter : public WriterSeekerI
{
public:
Expand Down Expand Up @@ -271,8 +271,8 @@ namespace bx
template<typename Ty>
int32_t read(ReaderI* _reader, Ty& _value, Error* _err);

/// Read value and converts it to host endianess. _fromLittleEndian specifies
/// underlying stream endianess.
/// Read value and converts it to host endianness. _fromLittleEndian specifies
/// underlying stream endianness.
template<typename Ty>
int32_t readHE(ReaderI* _reader, Ty& _value, bool _fromLittleEndian, Error* _err);

Expand Down
18 changes: 9 additions & 9 deletions include/bx/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,19 @@ namespace bx
int32_t m_capacity;
};

/// Retruns true if character is part of space set.
/// Returns true if character is part of space set.
bool isSpace(char _ch);

/// Returns true if string view contains only space characters.
bool isSpace(const StringView& _str);

/// Retruns true if character is uppercase.
/// Returns true if character is uppercase.
bool isUpper(char _ch);

/// Returns true if string view contains only uppercase characters.
bool isUpper(const StringView& _str);

/// Retruns true if character is lowercase.
/// Returns true if character is lowercase.
bool isLower(char _ch);

/// Returns true if string view contains only lowercase characters.
Expand All @@ -167,19 +167,19 @@ namespace bx
/// Returns true if character is part of alphabet set.
bool isAlpha(char _ch);

/// Retruns true if string view contains only alphabet characters.
/// Returns true if string view contains only alphabet characters.
bool isAlpha(const StringView& _str);

/// Returns true if character is part of numeric set.
bool isNumeric(char _ch);

/// Retruns true if string view contains only numeric characters.
/// Returns true if string view contains only numeric characters.
bool isNumeric(const StringView& _str);

/// Returns true if character is part of alpha numeric set.
bool isAlphaNum(char _ch);

/// Returns true if string view contains only alpha-numeric characters.
/// Returns true if string view contains only alphanumeric characters.
bool isAlphaNum(const StringView& _str);

/// Returns true if character is part of hexadecimal set.
Expand All @@ -194,7 +194,7 @@ namespace bx
/// Returns true if string vieww contains only printable characters.
bool isPrint(const StringView& _str);

/// Retruns lower case character representing _ch.
/// Returns lower case character representing _ch.
char toLower(char _ch);

/// Lower case string in place assuming length passed is valid.
Expand Down Expand Up @@ -231,7 +231,7 @@ namespace bx
/// including zero terminator. Copy will be terminated with '\0'.
int32_t strCopy(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num = INT32_MAX);

/// Concatinate string.
/// Concatenate string.
int32_t strCat(char* _dst, int32_t _dstSize, const StringView& _str, int32_t _num = INT32_MAX);

/// Test whether the string _str begins with prefix.
Expand Down Expand Up @@ -282,7 +282,7 @@ namespace bx
/// Find new line. Returns pointer after new line terminator.
StringView strFindNl(const StringView& _str);

/// Find end of line. Retuns pointer to new line terminator.
/// Find end of line. Returns pointer to new line terminator.
StringView strFindEol(const StringView& _str);

/// Returns StringView of word or empty.
Expand Down
2 changes: 1 addition & 1 deletion src/commandline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace bx
if ('"' == *curr)
{
term = '"';
++curr; // skip begining quote
++curr; // skip beginning quote
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ namespace bx
++ptr;
--stringLen;

// Search pattern lenght can't be longer than the string.
// Search pattern length can't be longer than the string.
if (findLen > stringLen)
{
return NULL;
Expand Down
8 changes: 4 additions & 4 deletions tests/crt_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ TEST_CASE("memSet", "")

TEST_CASE("memMove", "")
{
const char* orignal = "xxxxabvgd";
const char* original = "xxxxabvgd";
char str[] = { 'x', 'x', 'x', 'x', 'a', 'b', 'v', 'g', 'd' };

bx::memMove(&str[4], &str[4], 0);
REQUIRE(0 == bx::memCmp(str, orignal, 9) );
REQUIRE(0 == bx::memCmp(str, original, 9) );

bx::memMove(&str[4], &str[4], 5);
REQUIRE(0 == bx::memCmp(str, orignal, 9) );
REQUIRE(0 == bx::memCmp(str, original, 9) );

bx::memMove(str, &str[4], 5);
REQUIRE(0 == bx::memCmp(str, "abvgd", 5) );
Expand All @@ -39,7 +39,7 @@ TEST_CASE("memMove", "")
REQUIRE(str[4] == 'a' );

bx::memSet(str, 'x', 4);
REQUIRE(0 == bx::memCmp(str, orignal, 9) );
REQUIRE(0 == bx::memCmp(str, original, 9) );
}

TEST_CASE("scatter/gather", "")
Expand Down
2 changes: 1 addition & 1 deletion tools/bin/darwin/lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
Expand Down
2 changes: 1 addition & 1 deletion tools/bin/linux/lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
Expand Down
2 changes: 1 addition & 1 deletion tools/bin/windows/lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
Expand Down
6 changes: 3 additions & 3 deletions tools/lemon/lemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ PRIVATE void buildshifts(struct lemon *lemp, struct state *stp)
struct symbol *bsp; /* Symbol following the dot in configuration "bcfp" */
struct state *newstp; /* A pointer to a successor state */

/* Each configuration becomes complete after it contibutes to a successor
/* Each configuration becomes complete after it contributes to a successor
** state. Initially, all configurations are incomplete */
for(cfp=stp->cfp; cfp; cfp=cfp->next) cfp->status = INCOMPLETE;

Expand Down Expand Up @@ -1819,7 +1819,7 @@ static char *merge(
**
** Return Value:
** A pointer to the head of a sorted list containing the elements
** orginally in list.
** originally in list.
**
** Side effects:
** The "next" pointers for elements in list are changed.
Expand Down Expand Up @@ -3266,7 +3266,7 @@ void ReportOutput(struct lemon *lemp)
}

/* Search for the file "name" which is in the same directory as
** the exacutable */
** the executable */
PRIVATE char *pathsearch(char *argv0, char *name, int modemask)
{
const char *pathlist;
Expand Down
2 changes: 1 addition & 1 deletion tools/lemon/lempar.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser. The "lemon" program inserts text
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
** at each "%%" line. Also, any "P-a-r-s-e" identifier prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar. Otherwise, the content
** of this template is copied straight through into the generate parser
Expand Down

0 comments on commit ad018d4

Please sign in to comment.