From bb7814ba2e70a0513244aa0d115387bd8c8cd63f Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 29 Apr 2020 14:52:31 -0400 Subject: [PATCH] codespell: Fix various spelling mistakes with codespell run codespell on repo, and commit fixes, and whitelist. Signed-off-by: Robin Getz --- .codespell-whitelist | 3 +++ CI/travis/lib.sh | 2 +- CMakeLists.txt | 2 +- README.md | 2 +- README_BUILD.md | 2 +- channel.c | 2 +- context.c | 2 +- device.c | 2 +- examples/ad9361-iiostream.c | 2 +- examples/ad9371-iiostream.c | 2 +- examples/adrv9009-iiostream.c | 2 +- iiod/iiod.c | 2 +- iiod/ops.c | 2 +- libini/ini.h | 4 ++-- local.c | 2 +- man/iio_readdev.1.in | 4 ++-- man/iio_writedev.1.in | 4 ++-- network.c | 4 ++-- network.h | 2 +- tests/gen_code.c | 4 ++-- tests/iio_readdev.c | 2 +- tests/iio_stresstest.c | 2 +- tests/iio_writedev.c | 2 +- 23 files changed, 30 insertions(+), 27 deletions(-) create mode 100644 .codespell-whitelist diff --git a/.codespell-whitelist b/.codespell-whitelist new file mode 100644 index 000000000..dfb45f504 --- /dev/null +++ b/.codespell-whitelist @@ -0,0 +1,3 @@ +SOM +som +mitre diff --git a/CI/travis/lib.sh b/CI/travis/lib.sh index 5214cd0d1..939001458 100644 --- a/CI/travis/lib.sh +++ b/CI/travis/lib.sh @@ -241,7 +241,7 @@ upload_file_to_swdownloads() { local LATE=${branch}_latest_${LIBNAME}${LDIST}${EXT} local GLOB=${DEPLOY_TO}/${branch}_${LIBNAME}-* - echo attemting to deploy "$FROM" to "$TO" + echo attempting to deploy "$FROM" to "$TO" echo and "${branch}_${LIBNAME}${LDIST}${EXT}" ssh -V diff --git a/CMakeLists.txt b/CMakeLists.txt index de8bc675a..6023bf925 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -message(STATUS "cmake verison: ${CMAKE_VERSION}") +message(STATUS "cmake version: ${CMAKE_VERSION}") cmake_minimum_required(VERSION 2.8.7) project(libiio C) diff --git a/README.md b/README.md index 46260971e..9f236533b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Library for interfacing with Linux IIO devices libiio is used to interface to the Linux Industrial Input/Output (IIO) Subsystem. The Linux IIO subsystem is intended to provide support for devices that in some sense are analog to digital or digital to analog converters (ADCs, DACs). This includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, Capacitance to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors, Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis), PLLs (Phase Locked Loops), Variable/Programmable Gain Amplifiers (VGA, PGA), and RF transceivers. You can use libiio natively on an embedded Linux target (local mode), or use libiio to communicate remotely to that same target from a host Linux, Windows or MAC over USB or Ethernet or Serial. -Although libiio was primarily developed by Analog Devices Inc., it is an active open source library, which many people have contributed to. The library is released under the GNU Lesser General Public License (LGPL), version 2.1 or (at your option) any later version, this open-source license allows anyone to use the library, on any vendors processor/FPGA/SoC, which may be controlling any vendors peripheral device (ADC, DAC, etc) either locally or remotely. This includes closed or open-source, commercial or non-commercial applications (subject to the LGPL license freedoms, obligations and restrictions). The examples and test applications (sometimes refered to as the iio-utils) are released seperately under the GNU General Public License (GPL) version 2.0 (at your option) any later version. +Although libiio was primarily developed by Analog Devices Inc., it is an active open source library, which many people have contributed to. The library is released under the GNU Lesser General Public License (LGPL), version 2.1 or (at your option) any later version, this open-source license allows anyone to use the library, on any vendors processor/FPGA/SoC, which may be controlling any vendors peripheral device (ADC, DAC, etc) either locally or remotely. This includes closed or open-source, commercial or non-commercial applications (subject to the LGPL license freedoms, obligations and restrictions). The examples and test applications (sometimes referred to as the iio-utils) are released separately under the GNU General Public License (GPL) version 2.0 (at your option) any later version. Library License : [![Library License](https://img.shields.io/badge/license-LGPL2+-blue.svg)](https://github.com/analogdevicesinc/libiio/blob/master/COPYING.txt) Tests/Examples License : [![Application License](https://img.shields.io/badge/license-GPL2+-blue.svg)](https://github.com/analogdevicesinc/libiio/blob/master/COPYING_GPL.txt) diff --git a/README_BUILD.md b/README_BUILD.md index 0827d2ad6..c5f53c575 100644 --- a/README_BUILD.md +++ b/README_BUILD.md @@ -52,7 +52,7 @@ Cmake Options | Default | Description | `ENABLE_PACKAGING` | OFF | Create .deb/.rpm/.tar.gz via 'make package' | `INSTALL_UDEV_RULE` | ON | Install a udev rule for detection of USB devices | -Which backends the library supports is dependant on the build system, but can be overridden. +Which backends the library supports is dependent on the build system, but can be overridden. (If cmake finds libusb, it will use it, unless turned off manually) Cmake Options | Depends on | Description | diff --git a/channel.c b/channel.c index 9ff3b012e..93894ebfa 100644 --- a/channel.c +++ b/channel.c @@ -321,7 +321,7 @@ char * iio_channel_get_xml(const struct iio_channel *chn, size_t *length) /* NULL char should be left, and that is it */ if (len != 1) { - IIO_ERROR("Internal libIIO error: iio_channel_get_xml str length isssue\n"); + IIO_ERROR("Internal libIIO error: iio_channel_get_xml str length issue\n"); free(str); return NULL; } diff --git a/context.c b/context.c index 43373c78f..b816e1540 100644 --- a/context.c +++ b/context.c @@ -134,7 +134,7 @@ char * iio_context_create_xml(const struct iio_context *ctx) } if (len != 1) { - IIO_ERROR("Internal libIIO error: iio_context_create_xml str length isssue\n"); + IIO_ERROR("Internal libIIO error: iio_context_create_xml str length issue\n"); free(str); return NULL; } diff --git a/device.c b/device.c index 5ffb86ee1..d72b55c24 100644 --- a/device.c +++ b/device.c @@ -228,7 +228,7 @@ char * iio_device_get_xml(const struct iio_device *dev, size_t *length) *length = ptr - str; if (len != 1) { - IIO_ERROR("Internal libIIO error: iio_device_get_xml str length isssue\n"); + IIO_ERROR("Internal libIIO error: iio_device_get_xml str length issue\n"); free(str); return NULL; } diff --git a/examples/ad9361-iiostream.c b/examples/ad9361-iiostream.c index 3e1abaafa..0c7f7e5c5 100644 --- a/examples/ad9361-iiostream.c +++ b/examples/ad9361-iiostream.c @@ -290,7 +290,7 @@ int main (int argc, char **argv) p_end = iio_buffer_end(txbuf); for (p_dat = (char *)iio_buffer_first(txbuf, tx0_i); p_dat < p_end; p_dat += p_inc) { // Example: fill with zeros - // 12-bit sample needs to be MSB alligned so shift by 4 + // 12-bit sample needs to be MSB aligned so shift by 4 // https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/basic_iq_datafiles#binary_format ((int16_t*)p_dat)[0] = 0 << 4; // Real (I) ((int16_t*)p_dat)[1] = 0 << 4; // Imag (Q) diff --git a/examples/ad9371-iiostream.c b/examples/ad9371-iiostream.c index 60a7a4a47..8db97324c 100644 --- a/examples/ad9371-iiostream.c +++ b/examples/ad9371-iiostream.c @@ -291,7 +291,7 @@ int main (__notused int argc, __notused char **argv) p_end = iio_buffer_end(txbuf); for (p_dat = iio_buffer_first(txbuf, tx0_i); p_dat < p_end; p_dat += p_inc) { // Example: fill with zeros - // 14-bit sample needs to be MSB alligned so shift by 2 + // 14-bit sample needs to be MSB aligned so shift by 2 // https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/basic_iq_datafiles#binary_format ((int16_t*)p_dat)[0] = 0 << 2; // Real (I) ((int16_t*)p_dat)[1] = 0 << 2; // Imag (Q) diff --git a/examples/adrv9009-iiostream.c b/examples/adrv9009-iiostream.c index bd9e8b346..36e68009d 100644 --- a/examples/adrv9009-iiostream.c +++ b/examples/adrv9009-iiostream.c @@ -282,7 +282,7 @@ int main (__notused int argc, __notused char **argv) p_end = iio_buffer_end(txbuf); for (p_dat = iio_buffer_first(txbuf, tx0_i); p_dat < p_end; p_dat += p_inc) { // Example: fill with zeros - // 14-bit sample needs to be MSB alligned so shift by 2 + // 14-bit sample needs to be MSB aligned so shift by 2 // https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/basic_iq_datafiles#binary_format ((int16_t*)p_dat)[0] = 0 << 2; // Real (I) ((int16_t*)p_dat)[1] = 0 << 2; // Imag (Q) diff --git a/iiod/iiod.c b/iiod/iiod.c index 0e4dd79cc..b826d117c 100644 --- a/iiod/iiod.c +++ b/iiod/iiod.c @@ -195,7 +195,7 @@ static void __avahi_group_cb(AvahiEntryGroup *group, /* This is normal, * since we commit things in the create_services() */ - IIO_DEBUG("Avahi: Group uncommited\n"); + IIO_DEBUG("Avahi: Group uncommitted\n"); break; case AVAHI_ENTRY_GROUP_REGISTERING: IIO_DEBUG("Avahi: Group registering\n"); diff --git a/iiod/ops.c b/iiod/ops.c index e2e3add99..8ff3789b9 100644 --- a/iiod/ops.c +++ b/iiod/ops.c @@ -472,7 +472,7 @@ static ssize_t receive_data(struct DevEntry *dev, struct ThdEntry *thd) { struct parser_pdata *pdata = thd->pdata; - /* Inform that no error occured, and that we'll start reading data */ + /* Inform that no error occurred, and that we'll start reading data */ if (thd->new_client) { print_value(thd->pdata, 0); thd->new_client = false; diff --git a/libini/ini.h b/libini/ini.h index 4b6b8b923..89dad83b8 100644 --- a/libini/ini.h +++ b/libini/ini.h @@ -49,7 +49,7 @@ __api void ini_close(struct INI *ini); * XXX: the pointer will be invalid as soon as ini_close() is called. * * Returns: - * -EIO if an error occured while reading the file, + * -EIO if an error occurred while reading the file, * 0 if no more section can be found, * 1 otherwise. */ @@ -63,7 +63,7 @@ __api int ini_next_section(struct INI *ini, * XXX: the pointers will be invalid as soon as ini_close() is called. * * Returns: - * -EIO if an error occured while reading the file, + * -EIO if an error occurred while reading the file, * 0 if no more key/value pairs can be found, * 1 otherwise. */ diff --git a/local.c b/local.c index a11fb94aa..54cef6f32 100644 --- a/local.c +++ b/local.c @@ -820,7 +820,7 @@ static int enable_high_speed(const struct iio_device *dev) int ret, fd = pdata->fd; /* - * For the BLOCK_ALLOC_IOCTL ioctl it is not possible to distingush + * For the BLOCK_ALLOC_IOCTL ioctl it is not possible to distinguish * between an error during the allocation (e.g. incorrect size) or * whether the high-speed interface is not supported. BLOCK_FREE_IOCTL does * never fail if the device supports the high-speed interface, so we use it diff --git a/man/iio_readdev.1.in b/man/iio_readdev.1.in index 572bdb1a4..862d7f531 100644 --- a/man/iio_readdev.1.in +++ b/man/iio_readdev.1.in @@ -63,7 +63,7 @@ with no address part .RE .TP .B \-t \-\-trigger -Use the specified trigger, if needed on the specificied channel +Use the specified trigger, if needed on the specified channel .TP .B \-b \-\-buffer-size Size of the capture buffer. Default is 256. @@ -82,7 +82,7 @@ If the specified device is not found, a non-zero exit code is returned. .SH "USAGE" .PP -You use iio_readdev in the same way you use many of the other libiio utilites. +You use iio_readdev in the same way you use many of the other libiio utilities. You must specify a IIO device, and the specific channel to read. Since this is a read, channels must be input. It is easy to use .B iio_attr diff --git a/man/iio_writedev.1.in b/man/iio_writedev.1.in index c9a92c34a..83d8e85b0 100644 --- a/man/iio_writedev.1.in +++ b/man/iio_writedev.1.in @@ -63,7 +63,7 @@ with no address part .RE .TP .B \-t \-\-trigger -Use the specified trigger, if needed on the specificied channel +Use the specified trigger, if needed on the specified channel .TP .B \-b \-\-buffer-size Size of the capture buffer. Default is 256. @@ -85,7 +85,7 @@ If the specified device is not found, a non-zero exit code is returned. .SH "USAGE" .PP -You use iio_readdev in the same way you use many of the other libiio utilites. +You use iio_readdev in the same way you use many of the other libiio utilities. You must specify a IIO device, and the specific channel to read. Since this is a write, channels must be output. It is easy to use .B iio_attr diff --git a/network.c b/network.c index 28e08550a..8c014cab1 100644 --- a/network.c +++ b/network.c @@ -799,7 +799,7 @@ static ssize_t read_error_code(struct iio_network_io_context *io_ctx) * * To speed up things, we delay error reporting. We just send out the * data without reading the error code that the server gives us, because - * the answer will take too much time. If an error occured, it will be + * the answer will take too much time. If an error occurred, it will be * reported by the next call to iio_buffer_push(). */ @@ -1213,7 +1213,7 @@ static ssize_t network_read_line(struct iio_context_pdata *pdata, to_trunc = (size_t) ret; /* Advance the read offset to the byte following the \n if - * found, or after the last charater read otherwise */ + * found, or after the last character read otherwise */ if (pdata->msg_trunc_supported) ret = network_recv(io_ctx, NULL, to_trunc, MSG_TRUNC); else diff --git a/network.h b/network.h index 4a2c76c4e..19197f3c4 100644 --- a/network.h +++ b/network.h @@ -89,7 +89,7 @@ struct dns_sd_discovery_data { */ int create_socket(const struct addrinfo *addrinfo, unsigned int timeout); -/* These fuctions are common, and implemented in dns_sd_[*].c based on the +/* These functions are common, and implemented in dns_sd_[*].c based on the * implementations: avahi (linux), bonjour (mac), or ServiceDiscovery (Win10) */ diff --git a/tests/gen_code.c b/tests/gen_code.c index d7788dcb5..7e05b9fdc 100644 --- a/tests/gen_code.c +++ b/tests/gen_code.c @@ -280,7 +280,7 @@ void gen_function(const char* prefix, const char* target, } else if (!strcmp(prefix, "device_debug")) { fprintf(fd, " %s.debug_attrs[\"%s\"].value = str(\"%s\")\n", target, attr, wbuf); } else { - fprintf(fd, " # Write for %s / %s not implmented yet\n", prefix, target); + fprintf(fd, " # Write for %s / %s not implemented yet\n", prefix, target); } fprintf(fd, " print(\"wrote %s into %s\")\n", wbuf, attr); } else { @@ -292,7 +292,7 @@ void gen_function(const char* prefix, const char* target, fprintf(fd, " print(\"%s : \" + %s.debug_attrs[\"%s\"].value)\n", attr, target, attr); } else { - fprintf(fd, " # Read for %s / %s not implmented yet\n", prefix, target); + fprintf(fd, " # Read for %s / %s not implemented yet\n", prefix, target); } } diff --git a/tests/iio_readdev.c b/tests/iio_readdev.c index 99c71909b..311a2246d 100644 --- a/tests/iio_readdev.c +++ b/tests/iio_readdev.c @@ -158,7 +158,7 @@ static void setup_sig_handler(void) /* * Async signals are difficult to handle and the IIO API is not signal - * safe. Use a seperate thread and handle the signals synchronous so we + * safe. Use a separate thread and handle the signals synchronous so we * can call iio_buffer_cancel(). */ diff --git a/tests/iio_stresstest.c b/tests/iio_stresstest.c index ed7cd372b..e705b711a 100644 --- a/tests/iio_stresstest.c +++ b/tests/iio_stresstest.c @@ -586,7 +586,7 @@ int main(int argc, char **argv) if (pret < 0) app_running = 0; } - /* Did at least one thread end in sucess? */ + /* Did at least one thread end in success? */ for (i = 0; i < info.num_threads; i++) { if (!((int) (intptr_t)ret[i])) { flag = 1; diff --git a/tests/iio_writedev.c b/tests/iio_writedev.c index ad208931e..dcdd23020 100644 --- a/tests/iio_writedev.c +++ b/tests/iio_writedev.c @@ -168,7 +168,7 @@ static void setup_sig_handler(void) /* * Async signals are difficult to handle and the IIO API is not signal - * safe. Use a seperate thread and handle the signals synchronous so we + * safe. Use a separate thread and handle the signals synchronous so we * can call iio_buffer_cancel(). */