From a57610c2c4866b2201b400b1c9fe7a0a9ffaa3c4 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 13 Aug 2018 07:47:26 -0600 Subject: [PATCH] Remove trailing spaces at the end of lines. --- canutils/libobd2/obd2.c | 4 +- examples/README.txt | 2 +- examples/adxl372_test/adxl372_test_main.c | 2 +- examples/bastest/tests/test04.bas | 2 +- examples/bastest/tests/test25.bas | 2 +- examples/buttons/buttons_main.c | 4 +- examples/cctype/cctype_main.cxx | 8 ++-- .../cromfs/cromfs/testdir1/DingDongDell.txt | 2 +- .../cromfs/cromfs/testdir3/JackBeNimble.txt | 2 +- examples/djoystick/djoy_main.c | 2 +- examples/flowc/flowc_mktestdata.c | 2 +- examples/gpio/gpio_main.c | 2 +- examples/lis3dsh_reader/Makefile | 2 +- examples/lsm330spi_test/lsm330spi_test_main.c | 4 +- examples/lvgldemo/tp_cal.h | 2 +- examples/module/drivers/Makefile | 4 +- examples/oneshot/oneshot_main.c | 4 +- examples/ostest/cancel.c | 4 +- examples/ostest/tls.c | 2 +- examples/pdcurses/worm_main.c | 2 +- examples/pdcurses/xmas_main.c | 2 +- examples/pf_ieee802154/pf_cmdline.c | 2 +- examples/powermonitor/Makefile | 4 +- examples/rgbled/rgbled.c | 2 +- examples/stat/stat_main.c | 2 +- examples/udgram/Makefile | 4 +- examples/userfs/userfs_main.c | 4 +- examples/ustream/Makefile | 4 +- fsutils/mkfatfs/Makefile | 2 +- fsutils/mksmartfs/Make.defs | 2 +- fsutils/mksmartfs/Makefile | 2 +- fsutils/mksmartfs/mksmartfs.c | 2 +- gpsutils/minmea/minmea.c | 4 +- graphics/traveler/src/trv_color.c | 2 +- graphics/traveler/src/trv_raycntl.c | 14 +++--- graphics/traveler/src/trv_rayprune.c | 22 ++++----- graphics/traveler/src/trv_rayrend.c | 4 +- graphics/traveler/src/trv_world.c | 6 +-- graphics/traveler/tools/libwld/README.txt | 2 +- .../traveler/tools/libwld/wld_createworld.c | 4 +- .../traveler/tools/libwld/wld_graphicfile.h | 2 +- .../tools/libwld/wld_loadbitmapfile.c | 4 +- graphics/traveler/tools/libwld/wld_loadgif.c | 4 +- .../traveler/tools/libwld/wld_loadpaltable.c | 4 +- graphics/traveler/tools/libwld/wld_loadppm.c | 4 +- graphics/traveler/tools/libwld/wld_paltable.h | 2 +- .../tools/libwld/wld_readgraphicfile.c | 2 +- .../tools/libwld/wld_readtexturefile.c | 2 +- .../traveler/tools/libwld/wld_rgb2pixel.c | 2 +- .../traveler/tools/libwld/wld_rgblookup.c | 4 +- graphics/traveler/tools/tcledit/tcl_paint.c | 46 +++++++++---------- include/fsutils/passwd.h | 8 ++-- include/modbus/mb_m.h | 16 +++---- include/system/readline.h | 2 +- interpreters/bas/bas_token.c | 4 +- interpreters/bas/bas_token.l | 2 +- interpreters/minibasic/basic.c | 8 ++-- interpreters/minibasic/script.c | 2 +- modbus/Kconfig | 4 +- modbus/functions/mbfunccoils_m.c | 2 +- modbus/functions/mbfuncdisc_m.c | 2 +- modbus/functions/mbfuncholding_m.c | 2 +- modbus/mb_m.c | 2 +- modbus/nuttx/portevent_m.c | 2 +- netutils/esp8266/esp8266.c | 2 +- netutils/netlib/netlib_ipv6netmask2prefix.c | 2 +- netutils/netlib/netlib_prefix2ipv6netmask.c | 2 +- netutils/ping/icmp_ping.c | 2 +- netutils/ping/icmpv6_ping.c | 6 +-- nshlib/nsh_modcmds.c | 2 +- system/dhcpc/Makefile | 2 +- system/hexed/src/bfile.c | 2 +- system/lzf/lzf_main.c | 8 ++-- system/mdio/Makefile | 2 +- system/ntpc/Makefile | 2 +- system/telnet/telnet_client.c | 2 +- system/zmodem/README.txt | 2 +- wireless/bluetooth/btsak/Kconfig | 2 +- wireless/bluetooth/btsak/btsak_advertise.c | 16 +++---- .../ieee802154/libmac/ieee802154_resetreq.c | 2 +- 80 files changed, 168 insertions(+), 168 deletions(-) diff --git a/canutils/libobd2/obd2.c b/canutils/libobd2/obd2.c index dd8d9bd7c..a39997b83 100644 --- a/canutils/libobd2/obd2.c +++ b/canutils/libobd2/obd2.c @@ -119,8 +119,8 @@ struct obd_dev_s *obd_init(char *devfile, int baudate, int mode) } dev->can_mode = mode; - + printf("OBD-II device initialized!\n"); - + return dev; } diff --git a/examples/README.txt b/examples/README.txt index e08c2872d..4b1a1d751 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -1540,7 +1540,7 @@ examples/powerled 1. Demo mode 2. Continuous mode - + 3. Flash mode examples/pty_test diff --git a/examples/adxl372_test/adxl372_test_main.c b/examples/adxl372_test/adxl372_test_main.c index 57d38984f..155b5dfcc 100644 --- a/examples/adxl372_test/adxl372_test_main.c +++ b/examples/adxl372_test/adxl372_test_main.c @@ -140,7 +140,7 @@ static char subtest_prompt(FAR char *prompt) * Name: adxl372_test * * Description: - * This function is public so that it can be called by board diagnostic + * This function is public so that it can be called by board diagnostic * programs that contain the ADXL372. * ******************************************************************************/ diff --git a/examples/bastest/tests/test04.bas b/examples/bastest/tests/test04.bas index f2755e5a9..44856828d 100644 --- a/examples/bastest/tests/test04.bas +++ b/examples/bastest/tests/test04.bas @@ -1,5 +1,5 @@ 10 a=1 -20 repeat +20 repeat 30 print a 40 a=a+1 50 until a=10 diff --git a/examples/bastest/tests/test25.bas b/examples/bastest/tests/test25.bas index bf4d34c93..63528ea71 100644 --- a/examples/bastest/tests/test25.bas +++ b/examples/bastest/tests/test25.bas @@ -7,7 +7,7 @@ 60 data 1,2,3,4,5,6,7,8,9 80 dim inch_array(5,1),cm_array(5,1) 90 mat read inch_array -100 data 1,12,36,100,39.37 +100 data 1,12,36,100,39.37 110 mat print inch_array 120 mat cm_array=(2.54)*inch_array 130 mat print cm_array diff --git a/examples/buttons/buttons_main.c b/examples/buttons/buttons_main.c index 8bd7b3aeb..e32e21332 100644 --- a/examples/buttons/buttons_main.c +++ b/examples/buttons/buttons_main.c @@ -315,12 +315,12 @@ static int button_daemon(int argc, char *argv[]) if (nbytes == 0 || errno == EAGAIN) { if ((fds[i].revents & POLLIN) != 0) - { + { printf("button_daemon: ERROR no read data[%d]\n", i); } } else if (errno != EINTR) - { + { printf("button_daemon: read[%d] failed: %d\n", i, errno); } diff --git a/examples/cctype/cctype_main.cxx b/examples/cctype/cctype_main.cxx index 6a92653be..961fadb13 100644 --- a/examples/cctype/cctype_main.cxx +++ b/examples/cctype/cctype_main.cxx @@ -61,11 +61,11 @@ extern "C" int lower = std::tolower(i); std::printf("%3d %c %d %d %d %d %d %d %d %d %d %d %d %d %d %c %c\n", i, std::isprint(i) ? i : '.', - std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(i), - std::iscntrl(i), std::islower(i), std::isupper(i), std::isalpha(i), - std::isblank(i), std::isdigit(i), std::isalnum(i), std::ispunct(i), + std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(i), + std::iscntrl(i), std::islower(i), std::isupper(i), std::isalpha(i), + std::isblank(i), std::isdigit(i), std::isalnum(i), std::ispunct(i), std::isxdigit(i), - std::isprint(upper) ? upper : '.', + std::isprint(upper) ? upper : '.', std::isprint(lower) ? lower : '.'); } diff --git a/examples/cromfs/cromfs/testdir1/DingDongDell.txt b/examples/cromfs/cromfs/testdir1/DingDongDell.txt index fe4920bf5..67c9c01c8 100644 --- a/examples/cromfs/cromfs/testdir1/DingDongDell.txt +++ b/examples/cromfs/cromfs/testdir1/DingDongDell.txt @@ -1,5 +1,5 @@ Ding, dong, bell, -Pussy's in the well. +Pussy's in the well. Who put her in? Little Johnny Green. diff --git a/examples/cromfs/cromfs/testdir3/JackBeNimble.txt b/examples/cromfs/cromfs/testdir3/JackBeNimble.txt index 0fbd338e1..7378f6e8c 100644 --- a/examples/cromfs/cromfs/testdir3/JackBeNimble.txt +++ b/examples/cromfs/cromfs/testdir3/JackBeNimble.txt @@ -6,4 +6,4 @@ The candlestick. Jack jumped high Jack jumped low Jack jumped over -and burned his toe. +and burned his toe. diff --git a/examples/djoystick/djoy_main.c b/examples/djoystick/djoy_main.c index 2971fffc2..21813ba0b 100644 --- a/examples/djoystick/djoy_main.c +++ b/examples/djoystick/djoy_main.c @@ -93,7 +93,7 @@ static djoy_buttonset_t g_djoylast; /* Joystick discrete names */ -static const char *g_djoynames[DJOY_NDISCRETES] = +static const char *g_djoynames[DJOY_NDISCRETES] = { "UP", "DOWN", "LEFT", "RIGHT", "SELECT", "FIRE", "JUMP", "RUN" }; diff --git a/examples/flowc/flowc_mktestdata.c b/examples/flowc/flowc_mktestdata.c index 3b5a6983e..8a0d28705 100644 --- a/examples/flowc/flowc_mktestdata.c +++ b/examples/flowc/flowc_mktestdata.c @@ -55,6 +55,6 @@ int main(int argc, char **envp) putchar(ch); } } - + return 0; } diff --git a/examples/gpio/gpio_main.c b/examples/gpio/gpio_main.c index 9332af985..f864ded9a 100644 --- a/examples/gpio/gpio_main.c +++ b/examples/gpio/gpio_main.c @@ -313,7 +313,7 @@ int gpio_main(int argc, char *argv[]) default: fprintf(stderr, "ERROR: Unrecognized pintype: %d\n", (int)pintype); close(fd); - return EXIT_FAILURE; + return EXIT_FAILURE; } close(fd); diff --git a/examples/lis3dsh_reader/Makefile b/examples/lis3dsh_reader/Makefile index 99c98f9b1..d227c97e8 100755 --- a/examples/lis3dsh_reader/Makefile +++ b/examples/lis3dsh_reader/Makefile @@ -42,7 +42,7 @@ STACKSIZE = 2048 # LIS3DSH reader example ASRCS = -CSRCS = +CSRCS = MAINSRC = lis3dsh_reader_main.c CONFIG_FLOX_IMUTEST_PROGNAME ?= lis3dsh_reader$(EXEEXT) diff --git a/examples/lsm330spi_test/lsm330spi_test_main.c b/examples/lsm330spi_test/lsm330spi_test_main.c index 0a1f62607..e68bfb873 100644 --- a/examples/lsm330spi_test/lsm330spi_test_main.c +++ b/examples/lsm330spi_test/lsm330spi_test_main.c @@ -151,7 +151,7 @@ static char subtest_prompt(FAR char *prompt) * Name: lsm330acl_test * * Description: - * This function is public so that it can be called by board diagnostic + * This function is public so that it can be called by board diagnostic * programs that contain the LSM330. * ****************************************************************************/ @@ -384,7 +384,7 @@ quick_exit: * Name: lsm330gyro_test * * Description: - * This function is public so that it can be called by board diagnostic + * This function is public so that it can be called by board diagnostic * programs that contain the LSM330. * ****************************************************************************/ diff --git a/examples/lvgldemo/tp_cal.h b/examples/lvgldemo/tp_cal.h index 68e95c438..d7c6b3922 100644 --- a/examples/lvgldemo/tp_cal.h +++ b/examples/lvgldemo/tp_cal.h @@ -41,7 +41,7 @@ ****************************************************************************/ #ifdef __cplusplus -extern "C" +extern "C" { #endif diff --git a/examples/module/drivers/Makefile b/examples/module/drivers/Makefile index 04366103c..dfc497027 100644 --- a/examples/module/drivers/Makefile +++ b/examples/module/drivers/Makefile @@ -37,8 +37,8 @@ -include $(TOPDIR)/Make.defs include $(APPDIR)/Make.defs -ALL_SUBDIRS = chardev -BUILD_SUBDIRS = chardev +ALL_SUBDIRS = chardev +BUILD_SUBDIRS = chardev FSIMG_SUBDIR = fsroot MODULE_DIR = $(APPDIR)/examples/module diff --git a/examples/oneshot/oneshot_main.c b/examples/oneshot/oneshot_main.c index 74dfdf3e4..613b01a0d 100644 --- a/examples/oneshot/oneshot_main.c +++ b/examples/oneshot/oneshot_main.c @@ -147,7 +147,7 @@ int oneshot_main(int argc, char *argv[]) if (argc == 4) { /* FORM: nsh> oneshot [-d ] [] */ - + devname = argv[3]; } } @@ -210,7 +210,7 @@ int oneshot_main(int argc, char *argv[]) start.ts.tv_sec = secs; start.ts.tv_nsec = usecs * 1000; - + /* Zero usecs to terminate the loop */ usecs = 0; diff --git a/examples/ostest/cancel.c b/examples/ostest/cancel.c index 381a1db3d..baf01f97c 100644 --- a/examples/ostest/cancel.c +++ b/examples/ostest/cancel.c @@ -124,14 +124,14 @@ static FAR void *sem_waiter(FAR void *parameter) if (!parameter) { /* Release the mutex */ - + printf("sem_waiter: Releasing mutex\n"); status = pthread_mutex_unlock(&mutex); if (status != 0) { printf("sem_waiter: ERROR pthread_mutex_unlock failed, status=%d\n", status); } - + /* Set the cancelable state */ printf("sem_waiter: Setting cancelable\n"); diff --git a/examples/ostest/tls.c b/examples/ostest/tls.c index b5c8d45fa..2c7dc4e22 100644 --- a/examples/ostest/tls.c +++ b/examples/ostest/tls.c @@ -96,7 +96,7 @@ static bool verify_tls_info(uintptr_t value) printf("tls: ERROR Element %d: Set %lx / read %lx\n", i, (unsigned long)value, (unsigned long)info->tl_elem[i]); - fail = true; + fail = true; } } diff --git a/examples/pdcurses/worm_main.c b/examples/pdcurses/worm_main.c index 7a1a2161d..9f527a9ea 100644 --- a/examples/pdcurses/worm_main.c +++ b/examples/pdcurses/worm_main.c @@ -842,7 +842,7 @@ int worm_main(int argc, char *argv[]) #endif /* KEY_RESIZE */ - /* Make it simple to put this into single-step mode, or resume normal + /* Make it simple to put this into single-step mode, or resume normal * operation - T. Dickey */ diff --git a/examples/pdcurses/xmas_main.c b/examples/pdcurses/xmas_main.c index 34a258818..961bc5d55 100644 --- a/examples/pdcurses/xmas_main.c +++ b/examples/pdcurses/xmas_main.c @@ -574,7 +574,7 @@ static void strng5(void) mvwaddstr(treescrn2, 12, 12, ",.:'"); /* Save a fully lit tree */ - + overlay(treescrn2, treescrn); wrefresh(treescrn2); diff --git a/examples/pf_ieee802154/pf_cmdline.c b/examples/pf_ieee802154/pf_cmdline.c index 9674738ec..93d607ad9 100644 --- a/examples/pf_ieee802154/pf_cmdline.c +++ b/examples/pf_ieee802154/pf_cmdline.c @@ -91,7 +91,7 @@ void pf_cmdline(int argc, char **argv) /* Forms: * * argc=1: progname - * argc=2: progname
+ * argc=2: progname
* argc=4: progname -p
*/ diff --git a/examples/powermonitor/Makefile b/examples/powermonitor/Makefile index ab7aa15b1..e0e024628 100644 --- a/examples/powermonitor/Makefile +++ b/examples/powermonitor/Makefile @@ -39,8 +39,8 @@ APPNAME = powermonitor PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = 768 -ASRCS = -CSRCS = +ASRCS = +CSRCS = MAINSRC = powermonitor_main.c CFLAGS += -I../../../nuttx/arch/arm/src -I../../../nuttx/arch/arm/src/common diff --git a/examples/rgbled/rgbled.c b/examples/rgbled/rgbled.c index 5d84740c0..11cb57496 100644 --- a/examples/rgbled/rgbled.c +++ b/examples/rgbled/rgbled.c @@ -109,7 +109,7 @@ int rgbled_main(int argc, char *argv[]) sgreen = 1; } - sprintf(buffer, "#%02X%02X%02X", red, green, blue); + sprintf(buffer, "#%02X%02X%02X", red, green, blue); (void)write(fd, buffer, 8); usleep(5000); } diff --git a/examples/stat/stat_main.c b/examples/stat/stat_main.c index 94dbd6933..3f413a95c 100644 --- a/examples/stat/stat_main.c +++ b/examples/stat/stat_main.c @@ -307,7 +307,7 @@ int stat_main(int argc, char *argv[]) { dump_stat(&statbuf); } - + /* Try fstatfs */ printf("\nTest fstatfs(%s)\n", path); diff --git a/examples/udgram/Makefile b/examples/udgram/Makefile index a9427954e..793bf84cc 100644 --- a/examples/udgram/Makefile +++ b/examples/udgram/Makefile @@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs SERVER_ASRCS = SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT)) -SERVER_CSRCS = +SERVER_CSRCS = SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT)) SERVER_MAINSRC = udgram_server.c @@ -64,7 +64,7 @@ SERVER_PROGNAME = $(CONFIG_EXAMPLES_UDGRAM_SERVER_PROGNAME) CLIENT_ASRCS = CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT)) -CLIENT_CSRCS = +CLIENT_CSRCS = CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT)) CLIENT_MAINSRC = udgram_client.c diff --git a/examples/userfs/userfs_main.c b/examples/userfs/userfs_main.c index ed4bd1ad1..8e390c080 100644 --- a/examples/userfs/userfs_main.c +++ b/examples/userfs/userfs_main.c @@ -411,7 +411,7 @@ static int ufstest_fstat(FAR void *volinfo, FAR void *openinfo, buf->st_mode = (S_IFREG | S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); buf->st_size = opriv->file->inuse; buf->st_blksize = UFSTEST_FS_BLOCKSIZE; - buf->st_blocks = (opriv->file->inuse + UFSTEST_FS_BLOCKSIZE - 1) / + buf->st_blocks = (opriv->file->inuse + UFSTEST_FS_BLOCKSIZE - 1) / UFSTEST_FS_BLOCKSIZE; buf->st_atime = 0; buf->st_mtime = 0; @@ -490,7 +490,7 @@ static int ufstest_statfs(FAR void *volinfo, FAR struct statfs *buf) for (i = 0; i < UFSTEST_NFILES; i++) { - inuse += (g_rootdir[i].inuse + UFSTEST_FS_BLOCKSIZE - 1) / + inuse += (g_rootdir[i].inuse + UFSTEST_FS_BLOCKSIZE - 1) / UFSTEST_FS_BLOCKSIZE; } diff --git a/examples/ustream/Makefile b/examples/ustream/Makefile index 57686d112..db33eecc5 100644 --- a/examples/ustream/Makefile +++ b/examples/ustream/Makefile @@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs SERVER_ASRCS = SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT)) -SERVER_CSRCS = +SERVER_CSRCS = SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT)) SERVER_MAINSRC = ustream_server.c @@ -60,7 +60,7 @@ SERVER_STACKSIZE = 2048 CLIENT_ASRCS = CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT)) -CLIENT_CSRCS = +CLIENT_CSRCS = CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT)) CLIENT_MAINSRC = ustream_client.c diff --git a/fsutils/mkfatfs/Makefile b/fsutils/mkfatfs/Makefile index 9e843a688..436f888ff 100644 --- a/fsutils/mkfatfs/Makefile +++ b/fsutils/mkfatfs/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: diff --git a/fsutils/mksmartfs/Make.defs b/fsutils/mksmartfs/Make.defs index f2275af8d..9de93c292 100644 --- a/fsutils/mksmartfs/Make.defs +++ b/fsutils/mksmartfs/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # apps/fsutils/mksmartfs/Make.defs # -# Copyright (C) 2015 Ken Pettit +# Copyright (C) 2015 Ken Pettit # Author: Ken Pettit # # Redistribution and use in source and binary forms, with or without diff --git a/fsutils/mksmartfs/Makefile b/fsutils/mksmartfs/Makefile index f1725c5e6..fca59bc77 100644 --- a/fsutils/mksmartfs/Makefile +++ b/fsutils/mksmartfs/Makefile @@ -3,7 +3,7 @@ # # Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt -# +# # Modified by Ken Pettit for mksmartfs usage. # # Redistribution and use in source and binary forms, with or without diff --git a/fsutils/mksmartfs/mksmartfs.c b/fsutils/mksmartfs/mksmartfs.c index 8659c3bc2..44b68eb1d 100644 --- a/fsutils/mksmartfs/mksmartfs.c +++ b/fsutils/mksmartfs/mksmartfs.c @@ -82,7 +82,7 @@ * * Inputs: * pathname - the full path to a registered block driver - * sectorsize - the size of logical sectors on the device from 256-16384. + * sectorsize - the size of logical sectors on the device from 256-16384. * Setting this to zero will cause the device to be formatted * using the default CONFIG_MTD_SMART_SECTOR_SIZE value. * nrootdirs - Number of root directory entries to create. diff --git a/gpsutils/minmea/minmea.c b/gpsutils/minmea/minmea.c index 2f7508974..5354b09a3 100644 --- a/gpsutils/minmea/minmea.c +++ b/gpsutils/minmea/minmea.c @@ -165,7 +165,7 @@ bool minmea_check(FAR const char *sentence, bool strict) return false; } } - else if (strict) + else if (strict) { /* Discard non-checksummed frames in strict mode. */ @@ -316,7 +316,7 @@ bool minmea_scan(FAR const char *sentence, FAR const char *format, ...) break; } - else + else { /* integer overflow. bail out. */ diff --git a/graphics/traveler/src/trv_color.c b/graphics/traveler/src/trv_color.c index 3e25276ee..1c17e3a98 100644 --- a/graphics/traveler/src/trv_color.c +++ b/graphics/traveler/src/trv_color.c @@ -567,7 +567,7 @@ trv_pixel_t trv_color_rgb2pixel(struct trv_color_rgb_s *pixel) } else { - lum.red = lum.green = lum.blue = g_unit_vector[GREY_NDX].red; + lum.red = lum.green = lum.blue = g_unit_vector[GREY_NDX].red; } return trv_color_lum2pixel(&lum); diff --git a/graphics/traveler/src/trv_raycntl.c b/graphics/traveler/src/trv_raycntl.c index f802eb3ef..1c58356df 100644 --- a/graphics/traveler/src/trv_raycntl.c +++ b/graphics/traveler/src/trv_raycntl.c @@ -99,7 +99,7 @@ struct trv_raycast_s g_ray_hit[VGULP_SIZE][HGULP_SIZE + 1]; FAR uint8_t *g_buffer_row[VGULP_SIZE]; -/* The is the "column" offset in g_buffer_row for the current cell being +/* The is the "column" offset in g_buffer_row for the current cell being * operated on. This value is updated in a loop by trv_raycaster. */ int16_t g_cell_column; @@ -177,7 +177,7 @@ static void trv_resolve_cell(uint8_t toprow, uint8_t leftcol, if (!SAME_CELL(toprow, (leftcol + width - 1), (toprow + height - 1), (leftcol + width - 1))) { - /* The right corners are not the same either. Divide the + /* The right corners are not the same either. Divide the * cell into three cells, retaining the bottom half * (whose corners might be the same). */ @@ -248,7 +248,7 @@ static void trv_resolve_cell(uint8_t toprow, uint8_t leftcol, } /* The left corners are not the same, but the right are. - * Divide the cell into three cells, retaining the right half + * Divide the cell into three cells, retaining the right half */ else @@ -362,7 +362,7 @@ static void trv_resolve_cell(uint8_t toprow, uint8_t leftcol, else if (!SAME_CELL(toprow, leftcol, (toprow + height - 1), leftcol)) { - /* The top corners are the same, but left corners are not. Divide + /* The top corners are the same, but left corners are not. Divide * the cell into two cells horizontally */ @@ -668,7 +668,7 @@ void trv_raycaster(FAR struct trv_camera_s *player, for (row = 0; (row < (IMAGE_HEIGHT - VGULP_SIZE + 1)); row += VGULP_SIZE) { /* Initialize the pitch angles that will be needed in the inner loop. - * These are pre-calculated so that once we get started, we need not have + * These are pre-calculated so that once we get started, we need not have * to be concerned about zero crossing conditions. */ @@ -711,7 +711,7 @@ void trv_raycaster(FAR struct trv_camera_s *player, /* Perform Ray VGULP_SIZE x HGULP_SIZE Casting */ - /* The hits at the right corners will be the same as the hits for for + /* The hits at the right corners will be the same as the hits for for * the left hand corners on the next pass */ g_ray_hit[TOP_ROW][RIGHT_COL] = g_ray_hit[TOP_ROW][LEFT_COL]; @@ -730,7 +730,7 @@ void trv_raycaster(FAR struct trv_camera_s *player, trv_resolve_cell(TOP_ROW, LEFT_COL, VGULP_SIZE, (HGULP_SIZE + 1)); } - /* End of the pitch loop. Bump up the pitch angle and the rending buffer + /* End of the pitch loop. Bump up the pitch angle and the rending buffer * pointer for the next time through the outer loop */ pitch -= (VGULP_SIZE * VIDEO_ROW_ANGLE); diff --git a/graphics/traveler/src/trv_rayprune.c b/graphics/traveler/src/trv_rayprune.c index f34383221..82986bd6d 100644 --- a/graphics/traveler/src/trv_rayprune.c +++ b/graphics/traveler/src/trv_rayprune.c @@ -207,7 +207,7 @@ static void trv_ray_yawxprune_14cw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "beyond" the current camera - * position + * position */ if (rect->plane > g_camera.x) @@ -235,7 +235,7 @@ static void trv_ray_yawxprune_14cw(FAR struct trv_rect_head_s *outlist, } /* Check if any part of this plane lies clockwise from this Y - * position. In quadrants 1 & 4, clockwise corresponds to smaller Y + * position. In quadrants 1 & 4, clockwise corresponds to smaller Y * values */ @@ -296,7 +296,7 @@ static void trv_ray_yawxprune_14ccw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "beyond" the current camera - * position + * position */ if (rect->plane > g_camera.x) @@ -385,7 +385,7 @@ static void trv_ray_yawxprune_23cw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "before" the current camera - * position + * position */ if (rect->plane < g_camera.x) @@ -474,7 +474,7 @@ static void trv_ray_yawxprune_23ccw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "before" the current camera - * position + * position */ if (rect->plane < g_camera.x) @@ -564,7 +564,7 @@ static void trv_ray_yawyprune_12cw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "beyond" the current camera - * position + * position */ if (rect->plane > g_camera.y) @@ -655,7 +655,7 @@ static void trv_ray_yawyprune_12ccw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "beyond" the current camera - * position + * position */ if (rect->plane > g_camera.y) @@ -746,7 +746,7 @@ static void trv_ray_yawyprune_34cw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "before" the current camera - * position + * position */ if (rect->plane < g_camera.y) @@ -755,7 +755,7 @@ static void trv_ray_yawyprune_34cw(FAR struct trv_rect_head_s *outlist, rely = g_camera.y - rect->plane; - /* Calculate the X position at this relative Y position. We can skip + /* Calculate the X position at this relative Y position. We can skip * this step if we are processing another rectangle at the same rely * distance. */ @@ -837,7 +837,7 @@ static void trv_ray_yawyprune_34ccw(FAR struct trv_rect_head_s *outlist, rect = &entry->d; /* Search for a rectangle which lies "before" the current camera - * position + * position */ if (rect->plane < g_camera.y) @@ -1280,7 +1280,7 @@ void trv_ray_pitchprune(int16_t pitchstart, int16_t pitchend) g_working_planestate = WTOP; } - } + } else if (pitchstart <= ANGLE_180) { /* The view is split between the upper and lower hemispheres */ diff --git a/graphics/traveler/src/trv_rayrend.c b/graphics/traveler/src/trv_rayrend.c index 876c7b57a..9ee039c19 100644 --- a/graphics/traveler/src/trv_rayrend.c +++ b/graphics/traveler/src/trv_rayrend.c @@ -121,7 +121,7 @@ static void trv_rend_wallpixel(uint8_t row, uint8_t col); static const uint8_t g_invsize[VGULP_SIZE] = { 0xff, 0xff, 0x80, 0x55, 0x40, 0x33, 0x2b, 0x25, /* 0..7 */ - 0x20, 0x1c, 0x1a, 0x17, 0x15, 0x14, 0x12, 0x11 /* 8..15 */ + 0x20, 0x1c, 0x1a, 0x17, 0x15, 0x14, 0x12, 0x11 /* 8..15 */ }; /**************************************************************************** @@ -210,7 +210,7 @@ static void trv_rend_zcell(uint8_t row, uint8_t col, uint8_t height, uint8_t wid endcol = col + width; endrow = row + height; - + /* Calculate the horizontal interpolation values */ /* This is the H starting position (first row, first column) */ diff --git a/graphics/traveler/src/trv_world.c b/graphics/traveler/src/trv_world.c index 979dac9d5..b2a048a07 100644 --- a/graphics/traveler/src/trv_world.c +++ b/graphics/traveler/src/trv_world.c @@ -277,7 +277,7 @@ static int trv_ini_filename(INIHANDLE inihandle, FAR const char *path, * Name: trv_manage_wldfile * * Description: - * This is the guts of trv_world_create. It is implemented as a separate + * This is the guts of trv_world_create. It is implemented as a separate * function in order to simplify error handling * ****************************************************************************/ @@ -289,7 +289,7 @@ static int trv_manage_wldfile(INIHANDLE inihandle, FAR const char *wldpath) /* Read the initial camera/player position */ - ret = trv_ini_short(inihandle, &g_initial_camera.x, + ret = trv_ini_short(inihandle, &g_initial_camera.x, g_camera_section_name, g_camera_initialx_name); if (ret < 0) { @@ -319,7 +319,7 @@ static int trv_manage_wldfile(INIHANDLE inihandle, FAR const char *wldpath) return ret; } - ret = trv_ini_short(inihandle, &g_initial_camera.pitch, + ret = trv_ini_short(inihandle, &g_initial_camera.pitch, g_camera_section_name, g_camera_initialpitch_name); if (ret < 0) { diff --git a/graphics/traveler/tools/libwld/README.txt b/graphics/traveler/tools/libwld/README.txt index 9dacd0461..801795787 100644 --- a/graphics/traveler/tools/libwld/README.txt +++ b/graphics/traveler/tools/libwld/README.txt @@ -16,7 +16,7 @@ Build instuctions: 3. cd apps/graphics/traveler/tools/nuttx 4. make TOPDIR= - + Then you can build the world library: 5. cd apps/graphics/traveler/tools/libwld diff --git a/graphics/traveler/tools/libwld/wld_createworld.c b/graphics/traveler/tools/libwld/wld_createworld.c index 08e7bfd1d..389d1177d 100644 --- a/graphics/traveler/tools/libwld/wld_createworld.c +++ b/graphics/traveler/tools/libwld/wld_createworld.c @@ -280,7 +280,7 @@ static uint8_t wld_manage_worldfile(INIHANDLE handle) /************************************************************************* * Name: wld_read_shortint * Description: Reads a long value from the INI file and assures that - * it is within range for an a int16_t + * it is within range for an a int16_t ************************************************************************/ static uint8_t wld_read_shortint(INIHANDLE handle, @@ -303,7 +303,7 @@ static uint8_t wld_read_shortint(INIHANDLE handle, *variable_value = 0; - /* Is this because the integer was not found? or because it is really out + /* Is this because the integer was not found? or because it is really out * of range. */ if (value != INT32_MAX) diff --git a/graphics/traveler/tools/libwld/wld_graphicfile.h b/graphics/traveler/tools/libwld/wld_graphicfile.h index 202ebe327..e8ce48731 100644 --- a/graphics/traveler/tools/libwld/wld_graphicfile.h +++ b/graphics/traveler/tools/libwld/wld_graphicfile.h @@ -35,7 +35,7 @@ /************************************************************************* * FILE: wld_graphicfile.h - * DESCRIPTION: + * DESCRIPTION: *************************************************************************/ #ifndef __APPS_GRAPHICS_TRAVELER_TOOLS_LIBWLD_WLD_GRAPHIFILE_H diff --git a/graphics/traveler/tools/libwld/wld_loadbitmapfile.c b/graphics/traveler/tools/libwld/wld_loadbitmapfile.c index e2d996c98..3cac3e727 100644 --- a/graphics/traveler/tools/libwld/wld_loadbitmapfile.c +++ b/graphics/traveler/tools/libwld/wld_loadbitmapfile.c @@ -106,8 +106,8 @@ static bool wld_read_filename(FILE * fp, char *fileName) break; } - /* Get the character for the next time through the loop. Every file name - * should be terminated with a space or a new line. EOF is unexpected in + /* Get the character for the next time through the loop. Every file name + * should be terminated with a space or a new line. EOF is unexpected in * this context. */ ch = getc(fp); diff --git a/graphics/traveler/tools/libwld/wld_loadgif.c b/graphics/traveler/tools/libwld/wld_loadgif.c index c1ee7df60..d041abdd4 100644 --- a/graphics/traveler/tools/libwld/wld_loadgif.c +++ b/graphics/traveler/tools/libwld/wld_loadgif.c @@ -126,7 +126,7 @@ static char *id89 = "GIF89a"; * maintain our location in the Rwld_er array as a BIT Offset. We compute * the byte Offset into the rwld_er array by dividing this by 8, pick up * three bytes, compute the bit Offset into our 24-bit chunk, shift to - * bring the desired code to the bottom, then mask it off and return it. + * bring the desired code to the bottom, then mask it off and return it. ************************************************************************/ static int ReadCode(void) @@ -464,7 +464,7 @@ graphic_file_t *wld_LoadGIF(FILE * fp, char *fname) CurCode = InCode = Code; - /* If greater or equal to FreeCode, not in the hash table yet; repeat + /* If greater or equal to FreeCode, not in the hash table yet; repeat * the lwld_ character decoded */ diff --git a/graphics/traveler/tools/libwld/wld_loadpaltable.c b/graphics/traveler/tools/libwld/wld_loadpaltable.c index ab34f0e65..023df31d6 100644 --- a/graphics/traveler/tools/libwld/wld_loadpaltable.c +++ b/graphics/traveler/tools/libwld/wld_loadpaltable.c @@ -166,7 +166,7 @@ uint8_t wld_load_paltable(char *file) lum.luminance *= scale; - /* Then save the pixel associated with this scaled value in the range + /* Then save the pixel associated with this scaled value in the range * palette table */ *palptr++ = wld_lum2pixel(&lum); @@ -257,7 +257,7 @@ uint8_t wld_load_paltable(char *file) plotcolor -= zone; - /* Check if we have exceeded the range of this color. + /* Check if we have exceeded the range of this color. * If so, then set the color to the clipColor */ if (plotcolor <= diff --git a/graphics/traveler/tools/libwld/wld_loadppm.c b/graphics/traveler/tools/libwld/wld_loadppm.c index 572b8ccab..a37a75a13 100644 --- a/graphics/traveler/tools/libwld/wld_loadppm.c +++ b/graphics/traveler/tools/libwld/wld_loadppm.c @@ -52,7 +52,7 @@ *************************************************************************/ /************************************************************************* - * Name: + * Name: * Description: * Skip white space and comments. ************************************************************************/ @@ -92,7 +92,7 @@ static void skip_cruft(FILE * fp) *************************************************************************/ /************************************************************************* - * Name: + * Name: * Description: ************************************************************************/ diff --git a/graphics/traveler/tools/libwld/wld_paltable.h b/graphics/traveler/tools/libwld/wld_paltable.h index cd0c56a8c..d8407c51f 100644 --- a/graphics/traveler/tools/libwld/wld_paltable.h +++ b/graphics/traveler/tools/libwld/wld_paltable.h @@ -46,7 +46,7 @@ extern "C" * Included Files *************************************************************************/ -#include "wld_color.h" +#include "wld_color.h" /************************************************************************* * Pre-processor Definitions diff --git a/graphics/traveler/tools/libwld/wld_readgraphicfile.c b/graphics/traveler/tools/libwld/wld_readgraphicfile.c index 85e39e22d..1bfb070c8 100644 --- a/graphics/traveler/tools/libwld/wld_readgraphicfile.c +++ b/graphics/traveler/tools/libwld/wld_readgraphicfile.c @@ -127,7 +127,7 @@ static graphic_file_format_t wld_check_format(FILE * fp, char *filename) *************************************************************************/ /************************************************************************* - * Name: + * Name: * Description: ************************************************************************/ diff --git a/graphics/traveler/tools/libwld/wld_readtexturefile.c b/graphics/traveler/tools/libwld/wld_readtexturefile.c index d83a75f1a..9a35236c8 100644 --- a/graphics/traveler/tools/libwld/wld_readtexturefile.c +++ b/graphics/traveler/tools/libwld/wld_readtexturefile.c @@ -65,7 +65,7 @@ *************************************************************************/ /************************************************************************* - * Name: + * Name: * Description: * Return the log base 2 of the argument, or -1 if the argument is not * an integer power of 2. diff --git a/graphics/traveler/tools/libwld/wld_rgb2pixel.c b/graphics/traveler/tools/libwld/wld_rgb2pixel.c index c86feca5f..29b5a1c8f 100644 --- a/graphics/traveler/tools/libwld/wld_rgb2pixel.c +++ b/graphics/traveler/tools/libwld/wld_rgb2pixel.c @@ -53,7 +53,7 @@ wld_pixel_t wld_rgb2pixel(color_rgb_t * pixel) #if RGB_CUBE_SIZE < MIN_LUM_LEVELS color_lum_t lum; - /* Convert the RGB Value into a luminance value. Get the luminance associated + /* Convert the RGB Value into a luminance value. Get the luminance associated * with the RGB value. */ diff --git a/graphics/traveler/tools/libwld/wld_rgblookup.c b/graphics/traveler/tools/libwld/wld_rgblookup.c index 9eea07cae..8ca3bf5e0 100644 --- a/graphics/traveler/tools/libwld/wld_rgblookup.c +++ b/graphics/traveler/tools/libwld/wld_rgblookup.c @@ -171,7 +171,7 @@ void wld_rgblookup_allocate(void) lut = g_rgb_lut; - /* Save the color information and color lookup table for use in color mapping + /* Save the color information and color lookup table for use in color mapping * below. */ g_lum_lut = (color_lum_t *) @@ -245,7 +245,7 @@ void wld_rgblookup_allocate(void) } /* Calculate the cube to wld_pixel_t scale factor. This factor will convert - * an RGB component in the range {0..RGB_CUBE_SIZE-1} to a value in the range + * an RGB component in the range {0..RGB_CUBE_SIZE-1} to a value in the range * {0..WLD_PIXEL_MAX}. */ g_wld_cube2pixel = (float)WLD_PIXEL_MAX / (float)(RGB_CUBE_SIZE - 1); diff --git a/graphics/traveler/tools/tcledit/tcl_paint.c b/graphics/traveler/tools/tcledit/tcl_paint.c index 66b67a8fc..fda29ac78 100644 --- a/graphics/traveler/tools/tcledit/tcl_paint.c +++ b/graphics/traveler/tools/tcledit/tcl_paint.c @@ -184,7 +184,7 @@ static void tcl_paint_coplanar_rectangle(tcl_window_t *w, vtop = 0; } - /* Get the bottom side offset and verify that some part of the rectangle lies + /* Get the bottom side offset and verify that some part of the rectangle lies * below the top of the display. */ @@ -200,7 +200,7 @@ static void tcl_paint_coplanar_rectangle(tcl_window_t *w, vbottom = g_view_size - 1; } - /* If we are viewing the Z plane, then the vpos is "down" the screen from the + /* If we are viewing the Z plane, then the vpos is "down" the screen from the * top. Otherwise, it is "up" the screen from the bottom. */ @@ -236,12 +236,12 @@ static int tcl_check_horizontal_rectangle(tcl_window_t *w, rect_data_t *ptr, int int posstart; int posend; - /* Search the plane list for every place whose "level" component includes the + /* Search the plane list for every place whose "level" component includes the * current map level. This will be the vertical component of the rectangle * in every case except for EDITPLANE_X: - * + * * w->plane vhead level component EDITPLANE_X g_zplane_list H (= X) EDITPLANE_Y - * g_zplane_list V (= Y) EDITPLANE_Z g_yplane_list V (= Z) + * g_zplane_list V (= Y) EDITPLANE_Z g_yplane_list V (= Z) */ if (w->plane != EDITPLANE_X) @@ -275,9 +275,9 @@ static void tcl_paint_horizontal_rectangle(tcl_window_t *w, rect_data_t *ptr, int vbottom; /* Get the "vertical" position of the horizontal line. This will always be - * the plane component of the rectangle, but will have to be "flipped" if the + * the plane component of the rectangle, but will have to be "flipped" if the * viewing plane is not EDITPLANE_Z: - * + * * w->plane vhead vertical component EDITPLANE_X g_zplane_list plane (= Z) * EDITPLANE_Y g_zplane_list plane (= Z) EDITPLANE_Z g_yplane_list plane (= Y) */ @@ -297,8 +297,8 @@ static void tcl_paint_horizontal_rectangle(tcl_window_t *w, rect_data_t *ptr, /* Get the extent of the horizontal line. This will be the horizontal * component of the rectangle in every case except when the viewing plane if * EDITPLANE_X - * - * w->plane vhead horizontal component EDITPLANE_X g_zplane_list V (= Y) EDITPLANE_X + * + * w->plane vhead horizontal component EDITPLANE_X g_zplane_list V (= Y) EDITPLANE_X * g_zplane_list H (= X) EDITPLANE_X g_yplane_list H (= X) */ @@ -345,7 +345,7 @@ static void tcl_paint_horizontal_rectangle(tcl_window_t *w, rect_data_t *ptr, hright = g_view_size - 1; } - /* We now have some line segment that we know is to fully on the display. + /* We now have some line segment that we know is to fully on the display. * Get the display positions of the line segment. */ @@ -384,10 +384,10 @@ static int tcl_check_vertical_rectangle(tcl_window_t *w, rect_data_t *ptr, int p int posstart; int posend; - /* Search the plane list for every place whose "level" component includes the - * current map level. This will be the horizontal component of the rectangle + /* Search the plane list for every place whose "level" component includes the + * current map level. This will be the horizontal component of the rectangle * in every case except for EDITPLANE_Z - * + * * x->plane hhead level component EDITPLANE_X g_yplane_list H (= X) EDITPLANE_Y * g_xplane_list H (= Y) EDITPLANE_Z g_xplane_list V (= Z) */ @@ -423,7 +423,7 @@ static void tcl_paint_vertical_rectangle(tcl_window_t *w, rect_data_t *ptr, /* Get the "horizontal" position of the vertical line. This will always be * the plane component of the rectangle: - * + * * w->plane hhead horizontal component EDITPLANE_X g_yplane_list plane (= Y) * EDITPLANE_Y g_xplane_list plane (= X) EDITPLANE_Z g_xplane_list plane (= X) */ @@ -439,8 +439,8 @@ static void tcl_paint_vertical_rectangle(tcl_window_t *w, rect_data_t *ptr, * of the rectangle in every case except when the viewing plane is * EDITPLANE_Z and will have to be "flipped" if the viewing plane is not * EDITPLANE_Z: - * - * w->plane hhead horizontal component EDITPLANE_X g_yplane_list V (= Z) EDITPLANE_Y + * + * w->plane hhead horizontal component EDITPLANE_X g_yplane_list V (= Z) EDITPLANE_Y * g_xplane_list V (= Z) EDITPLANE_Z g_xplane_list H (= Y) */ @@ -471,7 +471,7 @@ static void tcl_paint_vertical_rectangle(tcl_window_t *w, rect_data_t *ptr, vtop = 0; } - /* Get the bottom side offset and verify that some part of the rectangle lies + /* Get the bottom side offset and verify that some part of the rectangle lies * below the top of the display */ @@ -497,7 +497,7 @@ static void tcl_paint_vertical_rectangle(tcl_window_t *w, rect_data_t *ptr, vtop = g_view_size - vtmp - 1; } - /* We now have some line segment that we know is to fully on the display. + /* We now have some line segment that we know is to fully on the display. * Get the display positions of the line segment */ @@ -808,7 +808,7 @@ void tcl_paint_rectangles(tcl_window_t *w) /* Display the rectangles which are orthogonal and "horizontal" with respect * to the viewing plane. - * + * * Process every plane in the vertical axis (these will be horizontal) This * will by the Z plane for every viewing plane except EDITPLANE_Z where it * will be the Y plane */ @@ -819,7 +819,7 @@ void tcl_paint_rectangles(tcl_window_t *w) { ptr = &list->d; - /* Search the plane list for every place whose "level" component includes + /* Search the plane list for every place whose "level" component includes * the current map level. */ @@ -842,9 +842,9 @@ void tcl_paint_rectangles(tcl_window_t *w) } } - /* Display the rectangles which are orthogonal and "vertical" with respect to + /* Display the rectangles which are orthogonal and "vertical" with respect to * the viewing plane. - * + * * Process every plane in the horizontal axis (these will be vertical) This * will by the X plane for every viewing plane except EDITPLANE_X where it * will be the Y plane. @@ -856,7 +856,7 @@ void tcl_paint_rectangles(tcl_window_t *w) { ptr = &list->d; - /* Search the plane list for every place whose "level" component includes + /* Search the plane list for every place whose "level" component includes * the current map level. */ diff --git a/include/fsutils/passwd.h b/include/fsutils/passwd.h index e5f0174cb..e92d4f3d6 100644 --- a/include/fsutils/passwd.h +++ b/include/fsutils/passwd.h @@ -60,7 +60,7 @@ /**************************************************************************** * Name: passwd_adduser * - * Description: + * Description: * Add a new user to the /etc/passwd file. If the user already exists, * then this function will fail with -EEXIST. * @@ -80,7 +80,7 @@ int passwd_adduser(FAR const char *username, FAR const char *password); /**************************************************************************** * Name: passwd_deluser * - * Description: + * Description: * Remove an existing user from the /etc/passwd file. If the user does * not exist, then this function will fail. * @@ -98,7 +98,7 @@ int passwd_deluser(FAR const char *username); /**************************************************************************** * Name: passwd_update * - * Description: + * Description: * Change a new user to the /etc/passwd file. If the user does not exist, * then this function will fail. * @@ -118,7 +118,7 @@ int passwd_update(FAR const char *username, FAR const char *password); /**************************************************************************** * Name: passwd_verify * - * Description: + * Description: * Return true if the username exists in the /etc/passwd file and if the * password matches the user password in that faile. * diff --git a/include/modbus/mb_m.h b/include/modbus/mb_m.h index 491c1b06d..aca07c4c6 100644 --- a/include/modbus/mb_m.h +++ b/include/modbus/mb_m.h @@ -167,10 +167,10 @@ eMBErrorCode eMBMasterTCPInit(uint16_t usTCPPort); * Release resources used by the protocol stack. * * This function disables the Modbus Master protocol stack and release all - * hardware resources. It must only be called when the protocol stack - * is disabled. + * hardware resources. It must only be called when the protocol stack + * is disabled. * - * \note Note all ports implement this function. A port which wants to + * \note Note all ports implement this function. A port which wants to * get an callback must define the macro MB_PORT_HAS_CLOSE to 1. * * Returned Value: @@ -190,8 +190,8 @@ eMBErrorCode eMBMasterClose(void); * protocol stack is only possible if it is in the disabled state. * * Returned Value: - * If the protocol stack is now in the state enabled it returns - * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it + * If the protocol stack is now in the state enabled it returns + * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it * return eMBErrorCode::MB_EILLSTATE. * ****************************************************************************/ @@ -205,7 +205,7 @@ eMBErrorCode eMBMasterEnable(void); * This function disables processing of Modbus frames. * * Returned Value: - * If the protocol stack has been disabled it returns + * If the protocol stack has been disabled it returns * eMBErrorCode::MB_ENOERR. If it was not in the enabled state it returns * eMBErrorCode::MB_EILLSTATE. * @@ -220,11 +220,11 @@ eMBErrorCode eMBMasterDisable(void); * This function must be called periodically. The timer interval required * is given by the application dependent Modbus slave timeout. Internally * the function calls xMBMasterPortEventGet() and waits for an event from - * the receiver or transmitter state machines. + * the receiver or transmitter state machines. * * Returned Value: * If the protocol stack is not in the enabled state the function - * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns + * returns eMBErrorCode::MB_EILLSTATE. Otherwise it returns * eMBErrorCode::MB_ENOERR. * ****************************************************************************/ diff --git a/include/system/readline.h b/include/system/readline.h index a2ef10bbf..f9b8bc18e 100644 --- a/include/system/readline.h +++ b/include/system/readline.h @@ -143,7 +143,7 @@ FAR const char *readline_prompt(FAR const char *prompt); * Assumptions: * The vtbl string is statically allocated a global. readline() will * simply remember the pointer to the structure. The structure must stay - * allocated and available. Only one instance of such a structure is + * allocated and available. Only one instance of such a structure is * supported. If there are multiple clients of readline(), they must all * share the same tab-completion logic (with exceptions in the case of * the kernel build). diff --git a/interpreters/bas/bas_token.c b/interpreters/bas/bas_token.c index d8ce86f94..a7df964c0 100644 --- a/interpreters/bas/bas_token.c +++ b/interpreters/bas/bas_token.c @@ -3625,7 +3625,7 @@ YY_RULE_SETUP { cur->statement=stmt_QUOTE_REM; strcpy(cur->u.rem=malloc(strlen(yytext+1)+1),yytext+1); - } + } return T_QUOTE; } @@ -4353,7 +4353,7 @@ static void yyensure_buffer_stack (void) (num_to_alloc * sizeof(struct yy_buffer_state*)); if (! (yy_buffer_stack)) YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()"); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; diff --git a/interpreters/bas/bas_token.l b/interpreters/bas/bas_token.l index d28267df6..b080ba56a 100644 --- a/interpreters/bas/bas_token.l +++ b/interpreters/bas/bas_token.l @@ -1735,7 +1735,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct ++thisnotindent; ++nextindent; } break; - } + } case T_SELECTCASE: thisnotindent+=2; nextindent+=2; break; case T_EQ: { diff --git a/interpreters/minibasic/basic.c b/interpreters/minibasic/basic.c index 413c6346a..7ce5ed07b 100644 --- a/interpreters/minibasic/basic.c +++ b/interpreters/minibasic/basic.c @@ -326,7 +326,7 @@ static double factorial(double x); * Sets up all our globals, including the list of lines. * Params: script - the script passed by the user * Returns: 0 on success, -1 on failure - * + * * ****************************************************************************/ @@ -1010,7 +1010,7 @@ static int dogoto(void) * * Description: * The FOR statement. - * + * * Pushes the for stack. * Returns line to jump to, or -1 to end program * @@ -1266,7 +1266,7 @@ static void dorem(void) * Get an lvalue from the environment * Params: lv - structure to fill. * Notes: missing variables (but not out of range subscripts) - * are added to the variable list. + * are added to the variable list. * ****************************************************************************/ @@ -2083,7 +2083,7 @@ static double instr(void) * Description: * Get the value of a scalar variable from string * matches FLTID - * + * * ****************************************************************************/ diff --git a/interpreters/minibasic/script.c b/interpreters/minibasic/script.c index 3b6dca568..a11814c70 100644 --- a/interpreters/minibasic/script.c +++ b/interpreters/minibasic/script.c @@ -126,7 +126,7 @@ static FAR char *loadfile(FAR char *path) * Name: leftstring * * Description: - * + * * ****************************************************************************/ diff --git a/modbus/Kconfig b/modbus/Kconfig index 72e0d49d3..b30508bc0 100644 --- a/modbus/Kconfig +++ b/modbus/Kconfig @@ -156,7 +156,7 @@ if 0 config MB_ASCII_MASTER bool "Modbus ASCII master" default n -endif +endif config MB_RTU_MASTER bool "Modbus RTU master" @@ -194,7 +194,7 @@ config MB_MASTER_TIMEOUT_MS_RESPOND When master sends frame, which is not broadcast, it should wait for given time duration for slave response. If slave doesn't respond during give time period, the master will process timeout - error and only then it will be able to send new frame. + error and only then it will be able to send new frame. config MB_MASTER_FUNC_READ_INPUT_ENABLED bool "Read Input Registers function" diff --git a/modbus/functions/mbfunccoils_m.c b/modbus/functions/mbfunccoils_m.c index 9c716c594..0210e3f3e 100644 --- a/modbus/functions/mbfunccoils_m.c +++ b/modbus/functions/mbfunccoils_m.c @@ -1,6 +1,6 @@ /**************************************************************************** * apps/modbus/functions/mbfunccoils_m.c - * + * * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * Copyright (C) 2013 Armink * All rights reserved. diff --git a/modbus/functions/mbfuncdisc_m.c b/modbus/functions/mbfuncdisc_m.c index 8c1e7693e..b10b6f9fa 100644 --- a/modbus/functions/mbfuncdisc_m.c +++ b/modbus/functions/mbfuncdisc_m.c @@ -1,6 +1,6 @@ /**************************************************************************** * apps/modbus/functions/mbfuncdisc_m.c - * + * * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * Copyright (C) 2013 Armink * All rights reserved. diff --git a/modbus/functions/mbfuncholding_m.c b/modbus/functions/mbfuncholding_m.c index fbd1a0f69..f6e015a30 100644 --- a/modbus/functions/mbfuncholding_m.c +++ b/modbus/functions/mbfuncholding_m.c @@ -1,6 +1,6 @@ /**************************************************************************** * apps/modbus/functions/mbfuncholding_m.c - * + * * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * Copyright (C) 2013 Armink * All rights reserved. diff --git a/modbus/mb_m.c b/modbus/mb_m.c index f70a62b56..126925579 100644 --- a/modbus/mb_m.c +++ b/modbus/mb_m.c @@ -376,7 +376,7 @@ eMBErrorCode eMBMasterPoll(void) } } - /* If master has exception, Master will send error process. Otherwise + /* If master has exception, Master will send error process. Otherwise * the Master is idle. */ diff --git a/modbus/nuttx/portevent_m.c b/modbus/nuttx/portevent_m.c index c1234e9fe..52f57beaa 100644 --- a/modbus/nuttx/portevent_m.c +++ b/modbus/nuttx/portevent_m.c @@ -136,7 +136,7 @@ bool xMBMasterPortEventGet(eMBMasterEventType * eEvent) else { /* Poll the serial device. The serial device timeouts if no characters - * have been received within for t3.5 during an active transmission or if + * have been received within for t3.5 during an active transmission or if * nothing happens within a specified amount of time. Both timeouts are * configured from the timer init functions. */ diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 67331a462..a85db8bb2 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -1748,7 +1748,7 @@ int lesp_get_net(lesp_mode_t mode, in_addr_t *ip, in_addr_t *mask, in_addr_t *gw if (ret >= 0) { - ret = lesp_send_cmd("AT+CIP%s_CUR?\r\n", + ret = lesp_send_cmd("AT+CIP%s_CUR?\r\n", (mode == lesp_eMODE_STATION)?"STA":"AP"); } diff --git a/netutils/netlib/netlib_ipv6netmask2prefix.c b/netutils/netlib/netlib_ipv6netmask2prefix.c index f1cd72b33..da681c244 100644 --- a/netutils/netlib/netlib_ipv6netmask2prefix.c +++ b/netutils/netlib/netlib_ipv6netmask2prefix.c @@ -54,7 +54,7 @@ * Private Data ****************************************************************************/ -static const uint8_t g_nibblemap[16] = +static const uint8_t g_nibblemap[16] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0: No bits, 1-7: Should not happen */ 1, 1, 1, 1, /* 8: 1 bit, 9-b: Should not happen */ diff --git a/netutils/netlib/netlib_prefix2ipv6netmask.c b/netutils/netlib/netlib_prefix2ipv6netmask.c index e590d453e..919671683 100644 --- a/netutils/netlib/netlib_prefix2ipv6netmask.c +++ b/netutils/netlib/netlib_prefix2ipv6netmask.c @@ -77,7 +77,7 @@ void netlib_prefix2ipv6netmask(uint8_t preflen, FAR struct in6_addr *netmask) * Eg. preflen = 38 * NETMASK: ffff ffff fc00 0000 0000 0000 0000 0000 * bit: 1 1..1 - * 1 1..3 3..4 4..6 6..7 8..9 9..1 1..2 + * 1 1..3 3..4 4..6 6..7 8..9 9..1 1..2 * 0..5 6..1 2..7 8..3 4..9 0..5 6..1 2..7 * preflen: 1 1..1 * 1 1..3 3..4 4..6 6..8 8..9 9..1 1..2 diff --git a/netutils/ping/icmp_ping.c b/netutils/ping/icmp_ping.c index d11947458..7368f964a 100644 --- a/netutils/ping/icmp_ping.c +++ b/netutils/ping/icmp_ping.c @@ -77,7 +77,7 @@ * Setup to send an ICMP packet * * Input Parameters: - * + * * * Return: * None diff --git a/netutils/ping/icmpv6_ping.c b/netutils/ping/icmpv6_ping.c index d9cc7881d..650971ead 100644 --- a/netutils/ping/icmpv6_ping.c +++ b/netutils/ping/icmpv6_ping.c @@ -77,10 +77,10 @@ * Name: icmpv6_echo_request * * Description: - * Format an ICMPv6 Echo Request message. + * Format an ICMPv6 Echo Request message. * * Parameters: - * + * * * Return: * None @@ -267,7 +267,7 @@ int ipv6_ping(FAR struct sockaddr_in6 *raddr, break; } } - else if (nrecvd >= PING6_BUFFER_SIZE && + else if (nrecvd >= PING6_BUFFER_SIZE && icmpv6->icmp6_type == ICMPv6_ECHO_REPLY) { ret = OK; diff --git a/nshlib/nsh_modcmds.c b/nshlib/nsh_modcmds.c index 3b1d9e727..086e7d49d 100644 --- a/nshlib/nsh_modcmds.c +++ b/nshlib/nsh_modcmds.c @@ -144,7 +144,7 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *data; FAR char *datasize; FAR char *lasts; - + /* Form of returned data is: * * "%s,%p,%p,%p,%p,%lu,%p,%lu\n" diff --git a/system/dhcpc/Makefile b/system/dhcpc/Makefile index 0a12071dd..c0be66280 100644 --- a/system/dhcpc/Makefile +++ b/system/dhcpc/Makefile @@ -86,7 +86,7 @@ ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean preconfig diff --git a/system/hexed/src/bfile.c b/system/hexed/src/bfile.c index 1adaed84c..eab8ccf37 100644 --- a/system/hexed/src/bfile.c +++ b/system/hexed/src/bfile.c @@ -236,7 +236,7 @@ FAR struct bfile_s *bfopen(char *name, char *mode) } /* Closes a Buffered File */ - + int bfclose(FAR struct bfile_s *bf) { int r; diff --git a/system/lzf/lzf_main.c b/system/lzf/lzf_main.c index 17acbf3c8..e20b73b6c 100644 --- a/system/lzf/lzf_main.c +++ b/system/lzf/lzf_main.c @@ -2,17 +2,17 @@ * apps/exmaples/lzf/lzf_main.c * * Copyright (c) 2006 Stefan Traby - * + * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * + * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO diff --git a/system/mdio/Makefile b/system/mdio/Makefile index 6f8dfef85..4f15cd284 100644 --- a/system/mdio/Makefile +++ b/system/mdio/Makefile @@ -83,7 +83,7 @@ ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean preconfig diff --git a/system/ntpc/Makefile b/system/ntpc/Makefile index f6b222d52..b5e008d6b 100644 --- a/system/ntpc/Makefile +++ b/system/ntpc/Makefile @@ -91,7 +91,7 @@ ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean preconfig diff --git a/system/telnet/telnet_client.c b/system/telnet/telnet_client.c index 42e27289c..47fa83361 100644 --- a/system/telnet/telnet_client.c +++ b/system/telnet/telnet_client.c @@ -327,7 +327,7 @@ int telnet_main(int argc, char *argv[]) { portno = DEFAULT_PORT; } - + /* Convert the argument into a binary address */ memset(&local, 0, sizeof(local)); diff --git a/system/zmodem/README.txt b/system/zmodem/README.txt index 2957b1766..228d2e8bc 100755 --- a/system/zmodem/README.txt +++ b/system/zmodem/README.txt @@ -40,7 +40,7 @@ Buffering Notes logic. NuttX, however, does not implement XON/XOFF flow control so these do - nothing. On NuttX you will have to use hardware flow control in most cases. + nothing. On NuttX you will have to use hardware flow control in most cases. The XON/XOFF controls built into ZModem could be used if you enabled software flow control in the host. But that would only work in one diff --git a/wireless/bluetooth/btsak/Kconfig b/wireless/bluetooth/btsak/Kconfig index 47cf7b7e1..dfdf5475b 100644 --- a/wireless/bluetooth/btsak/Kconfig +++ b/wireless/bluetooth/btsak/Kconfig @@ -33,7 +33,7 @@ config BTSAK_DEFAULT_PORT int "Default Port" default 61616 ---help--- - The default port to be used for commands when using btsak through a + The default port to be used for commands when using btsak through a Pv6 network interface (ex. wpan0). Port is 61616 because 6LoWPAN has special compression for port 61616-61631 diff --git a/wireless/bluetooth/btsak/btsak_advertise.c b/wireless/bluetooth/btsak/btsak_advertise.c index edec889d8..a5757fb33 100644 --- a/wireless/bluetooth/btsak/btsak_advertise.c +++ b/wireless/bluetooth/btsak/btsak_advertise.c @@ -100,25 +100,25 @@ static void btsak_cmd_advertisestart(FAR struct btsak_s *btsak, FAR char *cmd, /* REVISIT: Should support all advertising type. Only ADV_IND is * supported: * - * ADV_IND + * ADV_IND * Known as Advertising Indications (ADV_IND), where a peripheral device * requests connection to any central device (i.e., not directed at a - * particular central device). - * Example: A smart watch requesting connection to any central device. - * ADV_DIRECT_IND + * particular central device). + * Example: A smart watch requesting connection to any central device. + * ADV_DIRECT_IND * Similar to ADV_IND, yet the connection request is directed at a * specific central device. * Example: A smart watch requesting connection to a specific central * device. - * ADV_NONCONN_IND + * ADV_NONCONN_IND * Non connectible devices, advertising information to any listening * device. * Example: Beacons in museums defining proximity to specific exhibits. - * ADV_SCAN_IND + * ADV_SCAN_IND * Similar to ADV_NONCONN_IND, with the option additional information via - * scan responses. + * scan responses. * Example: A warehouse pallet beacon allowing a central device to - * request additional information about the pallet. + * request additional information about the pallet. */ /* The data for advertisement and response packets are provided as arrays diff --git a/wireless/ieee802154/libmac/ieee802154_resetreq.c b/wireless/ieee802154/libmac/ieee802154_resetreq.c index 33c62e2b9..deb0eab5c 100644 --- a/wireless/ieee802154/libmac/ieee802154_resetreq.c +++ b/wireless/ieee802154/libmac/ieee802154_resetreq.c @@ -54,7 +54,7 @@ ****************************************************************************/ int ieee802154_reset_req(int fd, bool resetattr) -{ +{ FAR struct ieee802154_reset_req_s req; int ret;