CodeSpell

This commit is contained in:
Max Seidenstücker
2026-02-06 16:20:00 +01:00
committed by Özkan Sezer
parent 8b53b77058
commit d870911202
34 changed files with 63 additions and 63 deletions

View File

@@ -470,7 +470,7 @@ static bool IBus_SetupConnection(SDL_DBusContext *dbus, const char *addr)
DBUS_TYPE_STRING, &client_name, DBUS_TYPE_INVALID,
DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID);
} else {
// re-using dbus->session_conn
// reusing dbus->session_conn
dbus->connection_ref(ibus_conn);
}

View File

@@ -64,7 +64,7 @@
#define HID_API_AS_STR(x) HID_API_AS_STR_IMPL(x)
#define HID_API_TO_VERSION_STR(v1, v2, v3) HID_API_AS_STR(v1.v2.v3)
/** @brief Coverts a version as Major/Minor/Patch into a number:
/** @brief Converts a version as Major/Minor/Patch into a number:
<8 bit major><16 bit minor><8 bit patch>.
This macro was added in version 0.12.0.

View File

@@ -401,11 +401,11 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
collection_node_idx = coll_child_order[collection_node_idx][0];
// In a HID Report Descriptor, the first usage declared is the most preferred usage for the control.
// While the order in the WIN32 capabiliy strutures is the opposite:
// While the order in the WIN32 capabiliy structures is the opposite:
// Here the preferred usage is the last aliased usage in the sequence.
if (link_collection_nodes[collection_node_idx].IsAlias && (firstDelimiterNode == NULL)) {
// Alliased Collection (First node in link_collection_nodes -> Last entry in report descriptor output)
// Aliased Collection (First node in link_collection_nodes -> Last entry in report descriptor output)
firstDelimiterNode = main_item_list;
coll_begin_lookup[collection_node_idx] = rd_append_main_item_node(0, 0, rd_item_node_collection, 0, collection_node_idx, rd_delimiter_usage, 0, &main_item_list);
coll_begin_lookup[collection_node_idx] = rd_append_main_item_node(0, 0, rd_item_node_collection, 0, collection_node_idx, rd_delimiter_close, 0, &main_item_list);
@@ -431,7 +431,7 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
collection_node_idx = coll_child_order[collection_node_idx][nextChild];
if (link_collection_nodes[collection_node_idx].IsAlias && (firstDelimiterNode == NULL)) {
// Alliased Collection (First node in link_collection_nodes -> Last entry in report descriptor output)
// Aliased Collection (First node in link_collection_nodes -> Last entry in report descriptor output)
firstDelimiterNode = main_item_list;
coll_begin_lookup[collection_node_idx] = rd_append_main_item_node(0, 0, rd_item_node_collection, 0, collection_node_idx, rd_delimiter_usage, 0, &main_item_list);
coll_begin_lookup[collection_node_idx] = rd_append_main_item_node(0, 0, rd_item_node_collection, 0, collection_node_idx, rd_delimiter_close, 0, &main_item_list);
@@ -491,11 +491,11 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
list_node = rd_search_main_item_list_for_bit_position(first_bit, (rd_main_items) rt_idx, pp_data->caps[caps_idx].ReportID, &coll_begin);
// In a HID Report Descriptor, the first usage declared is the most preferred usage for the control.
// While the order in the WIN32 capabiliy strutures is the opposite:
// While the order in the WIN32 capabiliy structures is the opposite:
// Here the preferred usage is the last aliased usage in the sequence.
if (pp_data->caps[caps_idx].IsAlias && (firstDelimiterNode == NULL)) {
// Alliased Usage (First node in pp_data->caps -> Last entry in report descriptor output)
// Aliased Usage (First node in pp_data->caps -> Last entry in report descriptor output)
firstDelimiterNode = list_node;
rd_insert_main_item_node(first_bit, last_bit, rd_item_node_cap, caps_idx, pp_data->caps[caps_idx].LinkCollection, rd_delimiter_usage, pp_data->caps[caps_idx].ReportID, &list_node);
rd_insert_main_item_node(first_bit, last_bit, rd_item_node_cap, caps_idx, pp_data->caps[caps_idx].LinkCollection, rd_delimiter_close, pp_data->caps[caps_idx].ReportID, &list_node);
@@ -504,7 +504,7 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
rd_insert_main_item_node(first_bit, last_bit, rd_item_node_cap, caps_idx, pp_data->caps[caps_idx].LinkCollection, rd_delimiter_usage, pp_data->caps[caps_idx].ReportID, &list_node);
}
else if (!pp_data->caps[caps_idx].IsAlias && (firstDelimiterNode != NULL)) {
// Alliased Collection (Last node in pp_data->caps -> First entry in report descriptor output)
// Aliased Collection (Last node in pp_data->caps -> First entry in report descriptor output)
rd_insert_main_item_node(first_bit, last_bit, rd_item_node_cap, caps_idx, pp_data->caps[caps_idx].LinkCollection, rd_delimiter_usage, pp_data->caps[caps_idx].ReportID, &list_node);
rd_insert_main_item_node(first_bit, last_bit, rd_item_node_cap, caps_idx, pp_data->caps[caps_idx].LinkCollection, rd_delimiter_open, pp_data->caps[caps_idx].ReportID, &list_node);
firstDelimiterNode = NULL;

View File

@@ -85,8 +85,8 @@ void dump_hidp_link_collection_node(FILE* file, phid_pp_link_collection_node pco
fprintf(file, "pp_data->LinkCollectionArray[%u]->NumberOfChildren = %hu\n", coll_idx, pcoll->NumberOfChildren);
fprintf(file, "pp_data->LinkCollectionArray[%u]->NextSibling = %hu\n", coll_idx, pcoll->NextSibling);
fprintf(file, "pp_data->LinkCollectionArray[%u]->FirstChild = %hu\n", coll_idx, pcoll->FirstChild);
// The compilers are not consistent on ULONG-bit-fields: They lose the unsinged or define them as int.
// Thus just always cast them to unsinged int, which should be fine, as the biggest bit-field is 28 bit
// The compilers are not consistent on ULONG-bit-fields: They lose the unsigned or define them as int.
// Thus just always cast them to unsigned int, which should be fine, as the biggest bit-field is 28 bit
fprintf(file, "pp_data->LinkCollectionArray[%u]->CollectionType = %u\n", coll_idx, (unsigned int)(pcoll->CollectionType));
fprintf(file, "pp_data->LinkCollectionArray[%u]->IsAlias = %u\n", coll_idx, (unsigned int)(pcoll->IsAlias));
fprintf(file, "pp_data->LinkCollectionArray[%u]->Reserved = 0x%08X\n", coll_idx, (unsigned int)(pcoll->Reserved));

View File

@@ -38,7 +38,7 @@
* If (2) is false, then q = q ; otherwise q = q + 2 .
* i+1 i i+1 i
*
* With some algebric manipulation, it is not difficult to see
* With some algebraic manipulation, it is not difficult to see
* that (2) is equivalent to
* -(i+1)
* s + 2 <= y (3)
@@ -281,7 +281,7 @@ A. sqrt(x) by Newton Iteration
This formula has one division fewer than the one above; however,
it requires more multiplications and additions. Also x must be
scaled in advance to avoid spurious overflow in evaluating the
expression 3y*y+x. Hence it is not recommended uless division
expression 3y*y+x. Hence it is not recommended unless division
is slow. If division is very slow, then one should use the
reciproot algorithm given in section B.

View File

@@ -41,7 +41,7 @@
* z = (z-x[i])*2**24
*
*
* y[] ouput result in an array of double precision numbers.
* y[] output result in an array of double precision numbers.
* The dimension of y[] is:
* 24-bit precision 1
* 53-bit precision 2

View File

@@ -1722,7 +1722,7 @@ SDL_FORCE_INLINE void* win32direct_mmap(size_t size) {
return (ptr != 0)? ptr: MFAIL;
}
/* This function supports releasing coalesed segments */
/* This function supports releasing coalesced segments */
SDL_FORCE_INLINE int win32munmap(void* ptr, size_t size) {
MEMORY_BASIC_INFORMATION minfo;
char* cptr = (char*)ptr;
@@ -1810,7 +1810,7 @@ SDL_FORCE_INLINE int win32munmap(void* ptr, size_t size) {
#define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
#endif /* HAVE_MMAP && HAVE_MREMAP */
/* mstate bit set if continguous morecore disabled or failed */
/* mstate bit set if contiguous morecore disabled or failed */
#define USE_NONCONTIGUOUS_BIT (4U)
/* segment bit set in create_mspace_with_base */
@@ -4725,7 +4725,7 @@ void* dlmalloc(size_t bytes) {
void dlfree(void* mem) {
/*
Consolidate freed chunks with preceeding or succeeding bordering
Consolidate freed chunks with preceding or succeeding bordering
free chunks, if they exist, and then place in a bin. Intermixed
with special cases for top, dv, mmapped chunks, and usage errors.
*/
@@ -6259,10 +6259,10 @@ History:
Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
* Use last_remainder in more cases.
* Pack bins using idea from colin@nyx10.cs.du.edu
* Use ordered bins instead of best-fit threshhold
* Use ordered bins instead of best-fit threshold
* Eliminate block-local decls to simplify tracing and debugging.
* Support another case of realloc via move into top
* Fix error occuring when initial sbrk_base not word-aligned.
* Fix error occurring when initial sbrk_base not word-aligned.
* Rely on page size for units instead of SBRK_UNIT to
avoid surprises about sbrk alignment conventions.
* Add mallinfo, mallopt. Thanks to Raymond Nijssen

View File

@@ -725,7 +725,7 @@ bool SDL_VideoInit(const char *driver_name)
but most things using SDL are games or media players; you wouldn't
want a screensaver to trigger if you're playing exclusively with a
joystick, or passively watching a movie. Things that use SDL but
function more like a normal desktop app should explicitly reenable the
function more like a normal desktop app should explicitly re-enable the
screensaver. */
if (!SDL_GetHintBoolean(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, false)) {
SDL_DisableScreenSaver();

View File

@@ -1560,7 +1560,7 @@ static NSCursor *Cocoa_GetDesiredCursor(void)
[self addPendingWindowOperation:PENDING_OPERATION_ENTER_FULLSCREEN];
[nswindow miniaturize:nil];
} else {
// Adjust the fullscreen toggle button and readd menu now that we're here.
// Adjust the fullscreen toggle button and re-add menu now that we're here.
if (window->flags & SDL_WINDOW_RESIZABLE) {
// resizable windows are Spaces-friendly: they get the "go fullscreen" toggle button on their titlebar.
[nswindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];

View File

@@ -9,7 +9,7 @@
* Change History
10/13/13 v1.15 r4 - Interim bugfix release while I work on the next major release with Zip64 support (almost there!):
- Critical fix for the MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY bug (thanks kahmyong.moon@hp.com) which could cause locate files to not find files. This bug
would only have occured in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place()
would only have occurred in earlier versions if you explicitly used this flag, OR if you used mz_zip_extract_archive_file_to_heap() or mz_zip_add_mem_to_archive_file_in_place()
(which used this flag). If you can't switch to v1.15 but want to fix this bug, just remove the uses of this flag from both helper funcs (and of course don't use the flag).
- Bugfix in mz_zip_reader_extract_to_mem_no_alloc() from kymoon when pUser_read_buf is not NULL and compressed size is > uncompressed size
- Fixing mz_zip_reader_extract_*() funcs so they don't try to extract compressed data from directory entries, to account for weird zipfiles which contain zero-size compressed data on dir entries.

View File

@@ -2318,7 +2318,7 @@ stbi_inline static int stbi__extend_receive(stbi__jpeg *j, int n)
unsigned int k;
int sgn;
if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s instead of continuing
sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative)
k = stbi_lrot(j->code_buffer, n);
@@ -2333,7 +2333,7 @@ stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n)
{
unsigned int k;
if (j->code_bits < n) stbi__grow_buffer_unsafe(j);
if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing
if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s instead of continuing
k = stbi_lrot(j->code_buffer, n);
j->code_buffer = k & ~stbi__bmask[n];
k &= stbi__bmask[n];
@@ -2345,7 +2345,7 @@ stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j)
{
unsigned int k;
if (j->code_bits < 1) stbi__grow_buffer_unsafe(j);
if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing
if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s instead of continuing
k = j->code_buffer;
j->code_buffer <<= 1;
--j->code_bits;
@@ -5193,7 +5193,7 @@ static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int
p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0);
if (p == NULL) return stbi__err("outofmem", "Out of memory");
// between here and free(out) below, exitting would leak
// between here and free(out) below, exiting would leak
temp_out = p;
if (pal_img_n == 3) {
@@ -7107,7 +7107,7 @@ static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, i
// 0: not specified.
}
// background is what out is after the undoing of the previou frame;
// background is what out is after the undoing of the previous frame;
memcpy( g->background, g->out, 4 * g->w * g->h );
}
@@ -8147,7 +8147,7 @@ STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user
1.31 (2011-06-20)
a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11)
added ability to load files via callbacks to accomidate custom input streams (Ben Wenger)
added ability to load files via callbacks to accommodate custom input streams (Ben Wenger)
removed deprecated format-specific test/load functions
removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway
error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha)

View File

@@ -84,7 +84,7 @@ SDL_WAYLAND_SYM(const char * const *, wl_proxy_get_tag, (struct wl_proxy *))
* non-optional when we are compiling against Wayland 1.20. We don't
* explicitly call them ourselves, though, so if we are only compiling
* against Wayland 1.18, they're unnecessary. */
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interfac, uint32_t version, uint32_t flags, ...))
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, uint32_t flags, ...))
SDL_WAYLAND_SYM(struct wl_proxy *, wl_proxy_marshal_array_flags, (struct wl_proxy *proxy, uint32_t opcode, const struct wl_interface *interface, uint32_t version, uint32_t flags, union wl_argument *args))
#endif

View File

@@ -146,7 +146,7 @@ struct MonitorInfo
int width_mm; // -1 if not specified
int height_mm; // -1 if not specified
double aspect_ratio; // -1.0 if not specififed
double aspect_ratio; // -1.0 if not specified
double gamma; // -1.0 if not specified

View File

@@ -17,7 +17,7 @@
// is suboptimal for image quality, but by far the fastest method.
// For all methods, width and height should be even, if not, the last row/column of the result image won't be affected.
// For sse methods, if the width if not divisable by 32, the last (width%32) pixels of each line won't be affected.
// For sse methods, if the width if not divisible by 32, the last (width%32) pixels of each line won't be affected.
/*#include <stdint.h>*/

View File

@@ -3,7 +3,7 @@
#include "yuv_rgb_common.h"
// yuv to rgb, sse implementation
// pointers must be 16 byte aligned, and strides must be divisable by 16
// pointers must be 16 byte aligned, and strides must be divisible by 16
void yuv420_rgb565_sse(
uint32_t width, uint32_t height,
const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride,

View File

@@ -14,7 +14,7 @@
// is suboptimal for image quality, but by far the fastest method.
// For all methods, width and height should be even, if not, the last row/column of the result image won't be affected.
// For sse methods, if the width if not divisable by 32, the last (width%32) pixels of each line won't be affected.
// For sse methods, if the width if not divisible by 32, the last (width%32) pixels of each line won't be affected.
/*#include <stdint.h>*/