Skip to content

Commit

Permalink
includes: Fix various spelling errors (#270)
Browse files Browse the repository at this point in the history
docs: fix some spelling errors

Related issue:
WerWolv/ImHex#1139
  • Loading branch information
C3pa committed Jul 10, 2024
1 parent 4299243 commit 5ff783d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions includes/std/core.pat
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ namespace auto std::core {


/**
Sets the current default endianess.
Any patterns created following this attribute will be created using the set endianess.
@param endian The new default endianess
Sets the current default endianness.
Any patterns created following this attribute will be created using the set endianness.
@param endian The new default endianness
*/
fn set_endian(std::mem::Endian endian) {
builtin::std::core::set_endian(u32(endian));
};

/**
Gets the current default endianess.
@return The currently set default endianess
Gets the current default endianness.
@return The currently set default endianness
*/
fn get_endian() {
return builtin::std::core::get_endian();
Expand Down
6 changes: 3 additions & 3 deletions includes/std/mem.pat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace auto std::mem {
using Section = u128;

/**
The Endianess of a value
The endianness of a value
*/
enum Endian : u8 {
Native = 0,
Expand Down Expand Up @@ -126,7 +126,7 @@ namespace auto std::mem {
Reads a unsigned value from the memory
@param address The address to read from
@param size The size of the value to read
@param [endian] The endianess of the value to read. Defaults to native
@param [endian] The endianness of the value to read. Defaults to native
@return The value read
*/
fn read_unsigned(u128 address, u8 size, Endian endian = Endian::Native) {
Expand All @@ -137,7 +137,7 @@ namespace auto std::mem {
Reads a signed value from the memory
@param address The address to read from
@param size The size of the value to read
@param [endian] The endianess of the value to read. Defaults to native
@param [endian] The endianness of the value to read. Defaults to native
@return The value read
*/
fn read_signed(u128 address, u8 size, Endian endian = Endian::Native) {
Expand Down
4 changes: 2 additions & 2 deletions includes/std/string.pat
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import std.io;
import std.mem;

/*!
Libray to interact with strings.
Library to interact with strings.
*/

namespace auto std::string {

/**
Base type for sized strings. Represents a string with its size preceeding it.
Base type for sized strings. Represents a string with its size preceding it.
@tparam SizeType The type of the size field.
@tparam DataType The type of the characters.
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/std/sys.pat
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace auto std {
};

/**
Throws an error notifying the developer that the current codepath is not implemented currently.
Throws an error notifying the developer that the current code path is not implemented currently.
*/
fn unimplemented() {
std::error("Unimplemented code path reached!");
Expand Down
2 changes: 1 addition & 1 deletion includes/type/byte.pat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace auto type {
} [[format("type::impl::format_nibbles")]];

/**
Type representing a single Byte. Decodes the byte as it's hexadeicmal value, individual bits and nibbles
Type representing a single Byte. Decodes the byte as it's hexadecimal value, individual bits and nibbles
*/
union Byte {
u8 value;
Expand Down
18 changes: 9 additions & 9 deletions includes/type/path.pat
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ namespace auto type {

/**
Type representing a single path segment. Use the `Path` type instead of using this on its own
@tparam Delimeter The delimeter sequence used to separate two path segments
@tparam Delimiter The delimiter sequence used to separate two path segments
*/
struct PathSegment<auto Delimeter> {
char string[while(std::mem::read_string($, std::string::length(Delimeter)) != Delimeter && std::mem::read_unsigned($, 1) != 0x00)];
struct PathSegment<auto Delimiter> {
char string[while(std::mem::read_string($, std::string::length(Delimiter)) != Delimiter && std::mem::read_unsigned($, 1) != 0x00)];
char separator [[hidden]];

if (separator == 0x00) {
Expand All @@ -21,20 +21,20 @@ namespace auto type {
} [[sealed, format("type::impl::format_path_segment")]];

/**
A generic type representing a path with an arbitrary delimeter
@tparam Delimeter The delimeter sequence used to separate two path segments
A generic type representing a path with an arbitrary delimiter
@tparam Delimiter The delimiter sequence used to separate two path segments
*/
struct Path<auto Delimeter> {
PathSegment<Delimeter> segments[while(true)];
struct Path<auto Delimiter> {
PathSegment<Delimiter> segments[while(true)];
} [[format("type::impl::format_path")]];

/**
A type representing a Unix path using a '/' forwardslash as delimeter
A type representing a Unix path using a '/' forward slash as delimiter
*/
using UnixPath = Path<"/">;

/**
A type representing a DOS path using a '\\' backslash as delimeter
A type representing a DOS path using a '\\' backslash as delimiter
*/
using DOSPath = Path<"\\">;

Expand Down

0 comments on commit 5ff783d

Please sign in to comment.