Skip to content

Commit 849c8a9

Browse files
authored
Fix various typo (#597)
Found via `codespell -q 3 -L childs,fo,xwindows` Encountered in downstream https://github.com/libsdl-org/SDL
1 parent 80e8d62 commit 849c8a9

10 files changed

Lines changed: 18 additions & 18 deletions

File tree

AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Ludovic Rousseau <rousseau@debian.org>:
1111
Correctness fixes
1212

1313
libusb/hidapi Team:
14-
Development/maintainance since June 4th 2019
14+
Development/maintenance since June 4th 2019
1515

1616
For a comprehensive list of contributions, see the commit list at github:
1717
https://github.com/libusb/hidapi/graphs/contributors

BUILD.cmake.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ most of this document may not be of interest for you; just check variables names
1616
CMake can be installed either using your system's package manager,
1717
or by downloading an installer/prebuilt version from the [official website](https://cmake.org/download/).
1818

19-
On most \*nix systems, the prefered way to install CMake is via package manager,
19+
On most \*nix systems, the preferred way to install CMake is via package manager,
2020
e.g. `sudo apt install cmake`.
2121

2222
On Windows CMake could be provided by your development environment (e.g. by Visual Studio Installer or MinGW installer),

libusb/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ else()
6666
else()
6767
# otherwise there is 2 options:
6868
# 1) iconv is provided by Standard C library and the build will be just fine
69-
# 2) The _user_ has to provide additiona compilation options for this project/target
69+
# 2) The _user_ has to provide additional compilation options for this project/target
7070
endif()
7171

7272
# check for error: "conflicting types for 'iconv'"

libusb/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static int hid_get_report_descriptor_libusb(libusb_device_handle *handle, int in
508508
expected_report_descriptor_size = HID_API_MAX_REPORT_DESCRIPTOR_SIZE;
509509

510510
/* Get the HID Report Descriptor.
511-
See USB HID Specificatin, sectin 7.1.1
511+
See USB HID Specification, section 7.1.1
512512
*/
513513
int res = libusb_control_transfer(handle, LIBUSB_ENDPOINT_IN|LIBUSB_RECIPIENT_INTERFACE, LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_REPORT << 8), interface_num, tmp, expected_report_descriptor_size, 5000);
514514
if (res < 0) {

linux/hid.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static int get_next_hid_usage(__u8 *report_descriptor, __u32 size, unsigned int
351351

352352
/*
353353
* Retrieves the hidraw report descriptor from a file.
354-
* When using this form, <sysfs_path>/device/report_descriptor, elevated priviledges are not required.
354+
* When using this form, <sysfs_path>/device/report_descriptor, elevated privileges are not required.
355355
*/
356356
static int get_hid_report_descriptor(const char *rpt_path, struct hidraw_report_descriptor *rpt_desc)
357357
{
@@ -910,7 +910,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
910910
}
911911
cur_dev = tmp;
912912

913-
/* move the pointer to the tail of returnd list */
913+
/* move the pointer to the tail of returned list */
914914
while (cur_dev->next != NULL) {
915915
cur_dev = cur_dev->next;
916916
}

mac/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ struct hid_device_info HID_API_EXPORT *hid_enumerate(unsigned short vendor_id,
769769
}
770770
cur_dev = tmp;
771771

772-
/* move the pointer to the tail of returnd list */
772+
/* move the pointer to the tail of returned list */
773773
while (cur_dev->next != NULL) {
774774
cur_dev = cur_dev->next;
775775
}

udev/69-hid.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uacc
1717

1818
# Once done, optionally rename this file for your application, and drop it into
1919
# /etc/udev/rules.d/.
20-
# NOTE: these rules must have priorty before 73-seat-late.rules.
20+
# NOTE: these rules must have priority before 73-seat-late.rules.
2121
# (Small discussion/explanation in systemd repo:
2222
# https://github.com/systemd/systemd/issues/4288#issuecomment-348166161)
2323
# for example, name the file /etc/udev/rules.d/70-my-application-hid.rules.

windows/hid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static hid_device *new_hid_device()
206206
memset(&dev->ol, 0, sizeof(dev->ol));
207207
dev->ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*initial state f=nonsignaled*/, NULL);
208208
memset(&dev->write_ol, 0, sizeof(dev->write_ol));
209-
dev->write_ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*inital state f=nonsignaled*/, NULL);
209+
dev->write_ol.hEvent = CreateEvent(NULL, FALSE, FALSE /*initial state f=nonsignaled*/, NULL);
210210
dev->device_info = NULL;
211211

212212
return dev;

windows/hidapi_descriptor_reconstruct.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
235235
}
236236

237237
// *************************************************************************
238-
// -Determine hierachy levels of each collections and store it in:
238+
// -Determine hierarchy levels of each collections and store it in:
239239
// coll_levels[COLLECTION_INDEX]
240240
// -Determine number of direct childs of each collections and store it in:
241241
// coll_number_of_direct_childs[COLLECTION_INDEX]
@@ -303,10 +303,10 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
303303
}
304304
}
305305

306-
// *************************************************************************************************
307-
// Determine child collection order of the whole hierachy, based on previously determined bit ranges
306+
// **************************************************************************************************
307+
// Determine child collection order of the whole hierarchy, based on previously determined bit ranges
308308
// and store it this index coll_child_order[COLLECTION_INDEX][DIRECT_CHILD_INDEX]
309-
// *************************************************************************************************
309+
// **************************************************************************************************
310310
USHORT **coll_child_order;
311311
coll_child_order = malloc(pp_data->NumberLinkCollectionNodes * sizeof(*coll_child_order));
312312
{
@@ -326,7 +326,7 @@ int hid_winapi_descriptor_reconstruct_pp_data(void *preparsed_data, unsigned cha
326326
{
327327
// Create list of child collection indices
328328
// sorted reverse to the order returned to HidP_GetLinkCollectionNodeschild
329-
// which seems to match teh original order, as long as no bit position needs to be considered
329+
// which seems to match the original order, as long as no bit position needs to be considered
330330
USHORT child_idx = link_collection_nodes[collection_node_idx].FirstChild;
331331
int child_count = coll_number_of_direct_childs[collection_node_idx] - 1;
332332
coll_child_order[collection_node_idx][child_count] = child_idx;

windows/test/hid_report_reconstructor_test.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename)
129129
pp_data->caps_info[rt_idx].ReportByteLength = temp_ushort;
130130
continue;
131131
}
132-
fprintf(stderr, "Ignorring unimplemented caps_info field: %s", line);
132+
fprintf(stderr, "Ignoring unimplemented caps_info field: %s", line);
133133
continue;
134134
}
135135

@@ -259,7 +259,7 @@ static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename)
259259
pp_data->caps[caps_idx].UnknownTokens[token_idx].BitField = temp_ulong;
260260
continue;
261261
}
262-
fprintf(stderr, "Ignorring unimplemented pp_data->cap[]->pp_cap->UnknownTokens field: %s", line);
262+
fprintf(stderr, "Ignoring unimplemented pp_data->cap[]->pp_cap->UnknownTokens field: %s", line);
263263
continue;
264264
}
265265

@@ -383,7 +383,7 @@ static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename)
383383
pp_data->caps[caps_idx].Reserved1[2] = temp_uchar[2];
384384
continue;
385385
}
386-
fprintf(stderr, "Ignorring unimplemented cap field: %s", line);
386+
fprintf(stderr, "Ignoring unimplemented cap field: %s", line);
387387
continue;
388388
}
389389

@@ -433,7 +433,7 @@ static hidp_preparsed_data * alloc_preparsed_data_from_file(char* filename)
433433
pcoll[coll_idx].Reserved = temp_ulong;
434434
continue;
435435
}
436-
fprintf(stderr, "Ignorring unimplemented LinkCollectionArray field: %s", line);
436+
fprintf(stderr, "Ignoring unimplemented LinkCollectionArray field: %s", line);
437437
continue;
438438
}
439439
}

0 commit comments

Comments
 (0)