Remove trailing spaces at the end of lines.

This commit is contained in:
Gregory Nutt 2018-08-13 07:47:26 -06:00
parent f2ef84f048
commit a57610c2c4
80 changed files with 168 additions and 168 deletions

View File

@ -119,8 +119,8 @@ struct obd_dev_s *obd_init(char *devfile, int baudate, int mode)
} }
dev->can_mode = mode; dev->can_mode = mode;
printf("OBD-II device initialized!\n"); printf("OBD-II device initialized!\n");
return dev; return dev;
} }

View File

@ -1540,7 +1540,7 @@ examples/powerled
1. Demo mode 1. Demo mode
2. Continuous mode 2. Continuous mode
3. Flash mode 3. Flash mode
examples/pty_test examples/pty_test

View File

@ -140,7 +140,7 @@ static char subtest_prompt(FAR char *prompt)
* Name: adxl372_test * Name: adxl372_test
* *
* Description: * 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. * programs that contain the ADXL372.
* *
******************************************************************************/ ******************************************************************************/

View File

@ -1,5 +1,5 @@
10 a=1 10 a=1
20 repeat 20 repeat
30 print a 30 print a
40 a=a+1 40 a=a+1
50 until a=10 50 until a=10

View File

@ -7,7 +7,7 @@
60 data 1,2,3,4,5,6,7,8,9 60 data 1,2,3,4,5,6,7,8,9
80 dim inch_array(5,1),cm_array(5,1) 80 dim inch_array(5,1),cm_array(5,1)
90 mat read inch_array 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 110 mat print inch_array
120 mat cm_array=(2.54)*inch_array 120 mat cm_array=(2.54)*inch_array
130 mat print cm_array 130 mat print cm_array

View File

@ -315,12 +315,12 @@ static int button_daemon(int argc, char *argv[])
if (nbytes == 0 || errno == EAGAIN) if (nbytes == 0 || errno == EAGAIN)
{ {
if ((fds[i].revents & POLLIN) != 0) if ((fds[i].revents & POLLIN) != 0)
{ {
printf("button_daemon: ERROR no read data[%d]\n", i); printf("button_daemon: ERROR no read data[%d]\n", i);
} }
} }
else if (errno != EINTR) else if (errno != EINTR)
{ {
printf("button_daemon: read[%d] failed: %d\n", i, errno); printf("button_daemon: read[%d] failed: %d\n", i, errno);
} }

View File

@ -61,11 +61,11 @@ extern "C"
int lower = std::tolower(i); 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", 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 : '.', i, std::isprint(i) ? i : '.',
std::isspace(i), std::isascii(i), std::isprint(i), std::isgraph(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::iscntrl(i), std::islower(i), std::isupper(i), std::isalpha(i),
std::isblank(i), std::isdigit(i), std::isalnum(i), std::ispunct(i), std::isblank(i), std::isdigit(i), std::isalnum(i), std::ispunct(i),
std::isxdigit(i), std::isxdigit(i),
std::isprint(upper) ? upper : '.', std::isprint(upper) ? upper : '.',
std::isprint(lower) ? lower : '.'); std::isprint(lower) ? lower : '.');
} }

View File

@ -1,5 +1,5 @@
Ding, dong, bell, Ding, dong, bell,
Pussy's in the well. Pussy's in the well.
Who put her in? Who put her in?
Little Johnny Green. Little Johnny Green.

View File

@ -6,4 +6,4 @@ The candlestick.
Jack jumped high Jack jumped high
Jack jumped low Jack jumped low
Jack jumped over Jack jumped over
and burned his toe. and burned his toe.

View File

@ -93,7 +93,7 @@ static djoy_buttonset_t g_djoylast;
/* Joystick discrete names */ /* 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" "UP", "DOWN", "LEFT", "RIGHT", "SELECT", "FIRE", "JUMP", "RUN"
}; };

View File

@ -55,6 +55,6 @@ int main(int argc, char **envp)
putchar(ch); putchar(ch);
} }
} }
return 0; return 0;
} }

View File

@ -313,7 +313,7 @@ int gpio_main(int argc, char *argv[])
default: default:
fprintf(stderr, "ERROR: Unrecognized pintype: %d\n", (int)pintype); fprintf(stderr, "ERROR: Unrecognized pintype: %d\n", (int)pintype);
close(fd); close(fd);
return EXIT_FAILURE; return EXIT_FAILURE;
} }
close(fd); close(fd);

View File

@ -42,7 +42,7 @@ STACKSIZE = 2048
# LIS3DSH reader example # LIS3DSH reader example
ASRCS = ASRCS =
CSRCS = CSRCS =
MAINSRC = lis3dsh_reader_main.c MAINSRC = lis3dsh_reader_main.c
CONFIG_FLOX_IMUTEST_PROGNAME ?= lis3dsh_reader$(EXEEXT) CONFIG_FLOX_IMUTEST_PROGNAME ?= lis3dsh_reader$(EXEEXT)

View File

@ -151,7 +151,7 @@ static char subtest_prompt(FAR char *prompt)
* Name: lsm330acl_test * Name: lsm330acl_test
* *
* Description: * 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. * programs that contain the LSM330.
* *
****************************************************************************/ ****************************************************************************/
@ -384,7 +384,7 @@ quick_exit:
* Name: lsm330gyro_test * Name: lsm330gyro_test
* *
* Description: * 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. * programs that contain the LSM330.
* *
****************************************************************************/ ****************************************************************************/

View File

@ -41,7 +41,7 @@
****************************************************************************/ ****************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif

View File

@ -37,8 +37,8 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs include $(APPDIR)/Make.defs
ALL_SUBDIRS = chardev ALL_SUBDIRS = chardev
BUILD_SUBDIRS = chardev BUILD_SUBDIRS = chardev
FSIMG_SUBDIR = fsroot FSIMG_SUBDIR = fsroot
MODULE_DIR = $(APPDIR)/examples/module MODULE_DIR = $(APPDIR)/examples/module

View File

@ -147,7 +147,7 @@ int oneshot_main(int argc, char *argv[])
if (argc == 4) if (argc == 4)
{ {
/* FORM: nsh> oneshot [-d <usecs>] [<devname>] */ /* FORM: nsh> oneshot [-d <usecs>] [<devname>] */
devname = argv[3]; devname = argv[3];
} }
} }
@ -210,7 +210,7 @@ int oneshot_main(int argc, char *argv[])
start.ts.tv_sec = secs; start.ts.tv_sec = secs;
start.ts.tv_nsec = usecs * 1000; start.ts.tv_nsec = usecs * 1000;
/* Zero usecs to terminate the loop */ /* Zero usecs to terminate the loop */
usecs = 0; usecs = 0;

View File

@ -124,14 +124,14 @@ static FAR void *sem_waiter(FAR void *parameter)
if (!parameter) if (!parameter)
{ {
/* Release the mutex */ /* Release the mutex */
printf("sem_waiter: Releasing mutex\n"); printf("sem_waiter: Releasing mutex\n");
status = pthread_mutex_unlock(&mutex); status = pthread_mutex_unlock(&mutex);
if (status != 0) if (status != 0)
{ {
printf("sem_waiter: ERROR pthread_mutex_unlock failed, status=%d\n", status); printf("sem_waiter: ERROR pthread_mutex_unlock failed, status=%d\n", status);
} }
/* Set the cancelable state */ /* Set the cancelable state */
printf("sem_waiter: Setting cancelable\n"); printf("sem_waiter: Setting cancelable\n");

View File

@ -96,7 +96,7 @@ static bool verify_tls_info(uintptr_t value)
printf("tls: ERROR Element %d: Set %lx / read %lx\n", printf("tls: ERROR Element %d: Set %lx / read %lx\n",
i, (unsigned long)value, i, (unsigned long)value,
(unsigned long)info->tl_elem[i]); (unsigned long)info->tl_elem[i]);
fail = true; fail = true;
} }
} }

View File

@ -842,7 +842,7 @@ int worm_main(int argc, char *argv[])
#endif /* KEY_RESIZE */ #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 * operation - T. Dickey
*/ */

View File

@ -574,7 +574,7 @@ static void strng5(void)
mvwaddstr(treescrn2, 12, 12, ",.:'"); mvwaddstr(treescrn2, 12, 12, ",.:'");
/* Save a fully lit tree */ /* Save a fully lit tree */
overlay(treescrn2, treescrn); overlay(treescrn2, treescrn);
wrefresh(treescrn2); wrefresh(treescrn2);

View File

@ -91,7 +91,7 @@ void pf_cmdline(int argc, char **argv)
/* Forms: /* Forms:
* *
* argc=1: progname * argc=1: progname
* argc=2: progname <address> * argc=2: progname <address>
* argc=4: progname -p <panid> <address> * argc=4: progname -p <panid> <address>
*/ */

View File

@ -39,8 +39,8 @@ APPNAME = powermonitor
PRIORITY = SCHED_PRIORITY_DEFAULT PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 768 STACKSIZE = 768
ASRCS = ASRCS =
CSRCS = CSRCS =
MAINSRC = powermonitor_main.c MAINSRC = powermonitor_main.c
CFLAGS += -I../../../nuttx/arch/arm/src -I../../../nuttx/arch/arm/src/common CFLAGS += -I../../../nuttx/arch/arm/src -I../../../nuttx/arch/arm/src/common

View File

@ -109,7 +109,7 @@ int rgbled_main(int argc, char *argv[])
sgreen = 1; sgreen = 1;
} }
sprintf(buffer, "#%02X%02X%02X", red, green, blue); sprintf(buffer, "#%02X%02X%02X", red, green, blue);
(void)write(fd, buffer, 8); (void)write(fd, buffer, 8);
usleep(5000); usleep(5000);
} }

View File

@ -307,7 +307,7 @@ int stat_main(int argc, char *argv[])
{ {
dump_stat(&statbuf); dump_stat(&statbuf);
} }
/* Try fstatfs */ /* Try fstatfs */
printf("\nTest fstatfs(%s)\n", path); printf("\nTest fstatfs(%s)\n", path);

View File

@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
SERVER_ASRCS = SERVER_ASRCS =
SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT)) SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT))
SERVER_CSRCS = SERVER_CSRCS =
SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT)) SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT))
SERVER_MAINSRC = udgram_server.c SERVER_MAINSRC = udgram_server.c
@ -64,7 +64,7 @@ SERVER_PROGNAME = $(CONFIG_EXAMPLES_UDGRAM_SERVER_PROGNAME)
CLIENT_ASRCS = CLIENT_ASRCS =
CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT)) CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT))
CLIENT_CSRCS = CLIENT_CSRCS =
CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT)) CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT))
CLIENT_MAINSRC = udgram_client.c CLIENT_MAINSRC = udgram_client.c

View File

@ -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_mode = (S_IFREG | S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
buf->st_size = opriv->file->inuse; buf->st_size = opriv->file->inuse;
buf->st_blksize = UFSTEST_FS_BLOCKSIZE; 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; UFSTEST_FS_BLOCKSIZE;
buf->st_atime = 0; buf->st_atime = 0;
buf->st_mtime = 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++) 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; UFSTEST_FS_BLOCKSIZE;
} }

View File

@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
SERVER_ASRCS = SERVER_ASRCS =
SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT)) SERVER_AOBJS = $(SERVER_ASRCS:.S=$(OBJEXT))
SERVER_CSRCS = SERVER_CSRCS =
SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT)) SERVER_COBJS = $(SERVER_CSRCS:.c=$(OBJEXT))
SERVER_MAINSRC = ustream_server.c SERVER_MAINSRC = ustream_server.c
@ -60,7 +60,7 @@ SERVER_STACKSIZE = 2048
CLIENT_ASRCS = CLIENT_ASRCS =
CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT)) CLIENT_AOBJS = $(CLIENT_ASRCS:.S=$(OBJEXT))
CLIENT_CSRCS = CLIENT_CSRCS =
CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT)) CLIENT_COBJS = $(CLIENT_CSRCS:.c=$(OBJEXT))
CLIENT_MAINSRC = ustream_client.c CLIENT_MAINSRC = ustream_client.c

View File

@ -3,7 +3,7 @@
# #
# Copyright (C) 2017 Gregory Nutt. All rights reserved. # Copyright (C) 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# apps/fsutils/mksmartfs/Make.defs # apps/fsutils/mksmartfs/Make.defs
# #
# Copyright (C) 2015 Ken Pettit # Copyright (C) 2015 Ken Pettit
# Author: Ken Pettit <pettitkd@gmail.com> # Author: Ken Pettit <pettitkd@gmail.com>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -3,7 +3,7 @@
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Modified by Ken Pettit <pettitkd@gmail.com> for mksmartfs usage. # Modified by Ken Pettit <pettitkd@gmail.com> for mksmartfs usage.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -82,7 +82,7 @@
* *
* Inputs: * Inputs:
* pathname - the full path to a registered block driver * 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 * Setting this to zero will cause the device to be formatted
* using the default CONFIG_MTD_SMART_SECTOR_SIZE value. * using the default CONFIG_MTD_SMART_SECTOR_SIZE value.
* nrootdirs - Number of root directory entries to create. * nrootdirs - Number of root directory entries to create.

View File

@ -165,7 +165,7 @@ bool minmea_check(FAR const char *sentence, bool strict)
return false; return false;
} }
} }
else if (strict) else if (strict)
{ {
/* Discard non-checksummed frames in strict mode. */ /* Discard non-checksummed frames in strict mode. */
@ -316,7 +316,7 @@ bool minmea_scan(FAR const char *sentence, FAR const char *format, ...)
break; break;
} }
else else
{ {
/* integer overflow. bail out. */ /* integer overflow. bail out. */

View File

@ -567,7 +567,7 @@ trv_pixel_t trv_color_rgb2pixel(struct trv_color_rgb_s *pixel)
} }
else 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); return trv_color_lum2pixel(&lum);

View File

@ -99,7 +99,7 @@ struct trv_raycast_s g_ray_hit[VGULP_SIZE][HGULP_SIZE + 1];
FAR uint8_t *g_buffer_row[VGULP_SIZE]; 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. */ * operated on. This value is updated in a loop by trv_raycaster. */
int16_t g_cell_column; 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), if (!SAME_CELL(toprow, (leftcol + width - 1),
(toprow + height - 1), (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 * cell into three cells, retaining the bottom half
* (whose corners might be the same). * (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. /* 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 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)) 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 * 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) for (row = 0; (row < (IMAGE_HEIGHT - VGULP_SIZE + 1)); row += VGULP_SIZE)
{ {
/* Initialize the pitch angles that will be needed in the inner loop. /* 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. * 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 */ /* 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 */ * the left hand corners on the next pass */
g_ray_hit[TOP_ROW][RIGHT_COL] = g_ray_hit[TOP_ROW][LEFT_COL]; 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)); 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 */ * pointer for the next time through the outer loop */
pitch -= (VGULP_SIZE * VIDEO_ROW_ANGLE); pitch -= (VGULP_SIZE * VIDEO_ROW_ANGLE);

View File

@ -207,7 +207,7 @@ static void trv_ray_yawxprune_14cw(FAR struct trv_rect_head_s *outlist,
rect = &entry->d; rect = &entry->d;
/* Search for a rectangle which lies "beyond" the current camera /* Search for a rectangle which lies "beyond" the current camera
* position * position
*/ */
if (rect->plane > g_camera.x) 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 /* 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 * values
*/ */
@ -296,7 +296,7 @@ static void trv_ray_yawxprune_14ccw(FAR struct trv_rect_head_s *outlist,
rect = &entry->d; rect = &entry->d;
/* Search for a rectangle which lies "beyond" the current camera /* Search for a rectangle which lies "beyond" the current camera
* position * position
*/ */
if (rect->plane > g_camera.x) 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; rect = &entry->d;
/* Search for a rectangle which lies "before" the current camera /* Search for a rectangle which lies "before" the current camera
* position * position
*/ */
if (rect->plane < g_camera.x) 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; rect = &entry->d;
/* Search for a rectangle which lies "before" the current camera /* Search for a rectangle which lies "before" the current camera
* position * position
*/ */
if (rect->plane < g_camera.x) 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; rect = &entry->d;
/* Search for a rectangle which lies "beyond" the current camera /* Search for a rectangle which lies "beyond" the current camera
* position * position
*/ */
if (rect->plane > g_camera.y) 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; rect = &entry->d;
/* Search for a rectangle which lies "beyond" the current camera /* Search for a rectangle which lies "beyond" the current camera
* position * position
*/ */
if (rect->plane > g_camera.y) 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; rect = &entry->d;
/* Search for a rectangle which lies "before" the current camera /* Search for a rectangle which lies "before" the current camera
* position * position
*/ */
if (rect->plane < g_camera.y) 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; 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 * this step if we are processing another rectangle at the same rely
* distance. * distance.
*/ */
@ -837,7 +837,7 @@ static void trv_ray_yawyprune_34ccw(FAR struct trv_rect_head_s *outlist,
rect = &entry->d; rect = &entry->d;
/* Search for a rectangle which lies "before" the current camera /* Search for a rectangle which lies "before" the current camera
* position * position
*/ */
if (rect->plane < g_camera.y) if (rect->plane < g_camera.y)
@ -1280,7 +1280,7 @@ void trv_ray_pitchprune(int16_t pitchstart, int16_t pitchend)
g_working_planestate = WTOP; g_working_planestate = WTOP;
} }
} }
else if (pitchstart <= ANGLE_180) else if (pitchstart <= ANGLE_180)
{ {
/* The view is split between the upper and lower hemispheres */ /* The view is split between the upper and lower hemispheres */

View File

@ -121,7 +121,7 @@ static void trv_rend_wallpixel(uint8_t row, uint8_t col);
static const uint8_t g_invsize[VGULP_SIZE] = static const uint8_t g_invsize[VGULP_SIZE] =
{ {
0xff, 0xff, 0x80, 0x55, 0x40, 0x33, 0x2b, 0x25, /* 0..7 */ 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; endcol = col + width;
endrow = row + height; endrow = row + height;
/* Calculate the horizontal interpolation values */ /* Calculate the horizontal interpolation values */
/* This is the H starting position (first row, first column) */ /* This is the H starting position (first row, first column) */

View File

@ -277,7 +277,7 @@ static int trv_ini_filename(INIHANDLE inihandle, FAR const char *path,
* Name: trv_manage_wldfile * Name: trv_manage_wldfile
* *
* Description: * 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 * 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 */ /* 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); g_camera_section_name, g_camera_initialx_name);
if (ret < 0) if (ret < 0)
{ {
@ -319,7 +319,7 @@ static int trv_manage_wldfile(INIHANDLE inihandle, FAR const char *wldpath)
return ret; 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); g_camera_section_name, g_camera_initialpitch_name);
if (ret < 0) if (ret < 0)
{ {

View File

@ -16,7 +16,7 @@ Build instuctions:
3. cd apps/graphics/traveler/tools/nuttx 3. cd apps/graphics/traveler/tools/nuttx
4. make TOPDIR=<nuttx directory> 4. make TOPDIR=<nuttx directory>
Then you can build the world library: Then you can build the world library:
5. cd apps/graphics/traveler/tools/libwld 5. cd apps/graphics/traveler/tools/libwld

View File

@ -280,7 +280,7 @@ static uint8_t wld_manage_worldfile(INIHANDLE handle)
/************************************************************************* /*************************************************************************
* Name: wld_read_shortint * Name: wld_read_shortint
* Description: Reads a long value from the INI file and assures that * 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, static uint8_t wld_read_shortint(INIHANDLE handle,
@ -303,7 +303,7 @@ static uint8_t wld_read_shortint(INIHANDLE handle,
*variable_value = 0; *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. */ * of range. */
if (value != INT32_MAX) if (value != INT32_MAX)

View File

@ -35,7 +35,7 @@
/************************************************************************* /*************************************************************************
* FILE: wld_graphicfile.h * FILE: wld_graphicfile.h
* DESCRIPTION: * DESCRIPTION:
*************************************************************************/ *************************************************************************/
#ifndef __APPS_GRAPHICS_TRAVELER_TOOLS_LIBWLD_WLD_GRAPHIFILE_H #ifndef __APPS_GRAPHICS_TRAVELER_TOOLS_LIBWLD_WLD_GRAPHIFILE_H

View File

@ -106,8 +106,8 @@ static bool wld_read_filename(FILE * fp, char *fileName)
break; break;
} }
/* Get the character for the next time through the loop. Every file name /* 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 * should be terminated with a space or a new line. EOF is unexpected in
* this context. */ * this context. */
ch = getc(fp); ch = getc(fp);

View File

@ -126,7 +126,7 @@ static char *id89 = "GIF89a";
* maintain our location in the Rwld_er array as a BIT Offset. We compute * 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 * 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 * 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) static int ReadCode(void)
@ -464,7 +464,7 @@ graphic_file_t *wld_LoadGIF(FILE * fp, char *fname)
CurCode = InCode = Code; 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 * the lwld_ character decoded
*/ */

View File

@ -166,7 +166,7 @@ uint8_t wld_load_paltable(char *file)
lum.luminance *= scale; 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 */ * palette table */
*palptr++ = wld_lum2pixel(&lum); *palptr++ = wld_lum2pixel(&lum);
@ -257,7 +257,7 @@ uint8_t wld_load_paltable(char *file)
plotcolor -= zone; 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 so, then set the color to the clipColor */
if (plotcolor <= if (plotcolor <=

View File

@ -52,7 +52,7 @@
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Name: * Name:
* Description: * Description:
* Skip white space and comments. * Skip white space and comments.
************************************************************************/ ************************************************************************/
@ -92,7 +92,7 @@ static void skip_cruft(FILE * fp)
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Name: * Name:
* Description: * Description:
************************************************************************/ ************************************************************************/

View File

@ -46,7 +46,7 @@ extern "C"
* Included Files * Included Files
*************************************************************************/ *************************************************************************/
#include "wld_color.h" #include "wld_color.h"
/************************************************************************* /*************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -127,7 +127,7 @@ static graphic_file_format_t wld_check_format(FILE * fp, char *filename)
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Name: * Name:
* Description: * Description:
************************************************************************/ ************************************************************************/

View File

@ -65,7 +65,7 @@
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Name: * Name:
* Description: * Description:
* Return the log base 2 of the argument, or -1 if the argument is not * Return the log base 2 of the argument, or -1 if the argument is not
* an integer power of 2. * an integer power of 2.

View File

@ -53,7 +53,7 @@ wld_pixel_t wld_rgb2pixel(color_rgb_t * pixel)
#if RGB_CUBE_SIZE < MIN_LUM_LEVELS #if RGB_CUBE_SIZE < MIN_LUM_LEVELS
color_lum_t lum; 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. * with the RGB value.
*/ */

View File

@ -171,7 +171,7 @@ void wld_rgblookup_allocate(void)
lut = g_rgb_lut; 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. */ * below. */
g_lum_lut = (color_lum_t *) 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 /* 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}. */ * {0..WLD_PIXEL_MAX}. */
g_wld_cube2pixel = (float)WLD_PIXEL_MAX / (float)(RGB_CUBE_SIZE - 1); g_wld_cube2pixel = (float)WLD_PIXEL_MAX / (float)(RGB_CUBE_SIZE - 1);

View File

@ -184,7 +184,7 @@ static void tcl_paint_coplanar_rectangle(tcl_window_t *w,
vtop = 0; 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. * 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; 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. * 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 posstart;
int posend; 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 * current map level. This will be the vertical component of the rectangle
* in every case except for EDITPLANE_X: * in every case except for EDITPLANE_X:
* *
* w->plane vhead level component EDITPLANE_X g_zplane_list H (= X) EDITPLANE_Y * 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) 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; int vbottom;
/* Get the "vertical" position of the horizontal line. This will always be /* 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: * viewing plane is not EDITPLANE_Z:
* *
* w->plane vhead vertical component EDITPLANE_X g_zplane_list plane (= 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) * 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 /* 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 * component of the rectangle in every case except when the viewing plane if
* EDITPLANE_X * 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) * 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; 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. * 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 posstart;
int posend; 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 horizontal component of the rectangle * current map level. This will be the horizontal component of the rectangle
* in every case except for EDITPLANE_Z * in every case except for EDITPLANE_Z
* *
* x->plane hhead level component EDITPLANE_X g_yplane_list H (= X) EDITPLANE_Y * 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) * 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 /* Get the "horizontal" position of the vertical line. This will always be
* the plane component of the rectangle: * the plane component of the rectangle:
* *
* w->plane hhead horizontal component EDITPLANE_X g_yplane_list plane (= Y) * 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) * 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 * 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 and will have to be "flipped" if the viewing plane is not
* EDITPLANE_Z: * 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) * 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; 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 * 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; 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 * 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 /* Display the rectangles which are orthogonal and "horizontal" with respect
* to the viewing plane. * to the viewing plane.
* *
* Process every plane in the vertical axis (these will be horizontal) This * 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 by the Z plane for every viewing plane except EDITPLANE_Z where it
* will be the Y plane */ * will be the Y plane */
@ -819,7 +819,7 @@ void tcl_paint_rectangles(tcl_window_t *w)
{ {
ptr = &list->d; 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. * 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. * the viewing plane.
* *
* Process every plane in the horizontal axis (these will be vertical) This * 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 by the X plane for every viewing plane except EDITPLANE_X where it
* will be the Y plane. * will be the Y plane.
@ -856,7 +856,7 @@ void tcl_paint_rectangles(tcl_window_t *w)
{ {
ptr = &list->d; 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. * the current map level.
*/ */

View File

@ -60,7 +60,7 @@
/**************************************************************************** /****************************************************************************
* Name: passwd_adduser * Name: passwd_adduser
* *
* Description: * Description:
* Add a new user to the /etc/passwd file. If the user already exists, * Add a new user to the /etc/passwd file. If the user already exists,
* then this function will fail with -EEXIST. * 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 * Name: passwd_deluser
* *
* Description: * Description:
* Remove an existing user from the /etc/passwd file. If the user does * Remove an existing user from the /etc/passwd file. If the user does
* not exist, then this function will fail. * not exist, then this function will fail.
* *
@ -98,7 +98,7 @@ int passwd_deluser(FAR const char *username);
/**************************************************************************** /****************************************************************************
* Name: passwd_update * Name: passwd_update
* *
* Description: * Description:
* Change a new user to the /etc/passwd file. If the user does not exist, * Change a new user to the /etc/passwd file. If the user does not exist,
* then this function will fail. * then this function will fail.
* *
@ -118,7 +118,7 @@ int passwd_update(FAR const char *username, FAR const char *password);
/**************************************************************************** /****************************************************************************
* Name: passwd_verify * Name: passwd_verify
* *
* Description: * Description:
* Return true if the username exists in the /etc/passwd file and if the * Return true if the username exists in the /etc/passwd file and if the
* password matches the user password in that faile. * password matches the user password in that faile.
* *

View File

@ -167,10 +167,10 @@ eMBErrorCode eMBMasterTCPInit(uint16_t usTCPPort);
* Release resources used by the protocol stack. * Release resources used by the protocol stack.
* *
* This function disables the Modbus Master protocol stack and release all * This function disables the Modbus Master protocol stack and release all
* hardware resources. It must only be called when the protocol stack * hardware resources. It must only be called when the protocol stack
* is disabled. * 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. * get an callback must define the macro MB_PORT_HAS_CLOSE to 1.
* *
* Returned Value: * Returned Value:
@ -190,8 +190,8 @@ eMBErrorCode eMBMasterClose(void);
* protocol stack is only possible if it is in the disabled state. * protocol stack is only possible if it is in the disabled state.
* *
* Returned Value: * Returned Value:
* If the protocol stack is now in the state enabled it returns * If the protocol stack is now in the state enabled it returns
* eMBErrorCode::MB_ENOERR. If it was not in the disabled state it * eMBErrorCode::MB_ENOERR. If it was not in the disabled state it
* return eMBErrorCode::MB_EILLSTATE. * return eMBErrorCode::MB_EILLSTATE.
* *
****************************************************************************/ ****************************************************************************/
@ -205,7 +205,7 @@ eMBErrorCode eMBMasterEnable(void);
* This function disables processing of Modbus frames. * This function disables processing of Modbus frames.
* *
* Returned Value: * 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_ENOERR. If it was not in the enabled state it returns
* eMBErrorCode::MB_EILLSTATE. * eMBErrorCode::MB_EILLSTATE.
* *
@ -220,11 +220,11 @@ eMBErrorCode eMBMasterDisable(void);
* This function must be called periodically. The timer interval required * This function must be called periodically. The timer interval required
* is given by the application dependent Modbus slave timeout. Internally * is given by the application dependent Modbus slave timeout. Internally
* the function calls xMBMasterPortEventGet() and waits for an event from * the function calls xMBMasterPortEventGet() and waits for an event from
* the receiver or transmitter state machines. * the receiver or transmitter state machines.
* *
* Returned Value: * Returned Value:
* If the protocol stack is not in the enabled state the function * 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. * eMBErrorCode::MB_ENOERR.
* *
****************************************************************************/ ****************************************************************************/

View File

@ -143,7 +143,7 @@ FAR const char *readline_prompt(FAR const char *prompt);
* Assumptions: * Assumptions:
* The vtbl string is statically allocated a global. readline() will * The vtbl string is statically allocated a global. readline() will
* simply remember the pointer to the structure. The structure must stay * 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 * supported. If there are multiple clients of readline(), they must all
* share the same tab-completion logic (with exceptions in the case of * share the same tab-completion logic (with exceptions in the case of
* the kernel build). * the kernel build).

View File

@ -3625,7 +3625,7 @@ YY_RULE_SETUP
{ {
cur->statement=stmt_QUOTE_REM; cur->statement=stmt_QUOTE_REM;
strcpy(cur->u.rem=malloc(strlen(yytext+1)+1),yytext+1); strcpy(cur->u.rem=malloc(strlen(yytext+1)+1),yytext+1);
} }
return T_QUOTE; return T_QUOTE;
} }
@ -4353,7 +4353,7 @@ static void yyensure_buffer_stack (void)
(num_to_alloc * sizeof(struct yy_buffer_state*)); (num_to_alloc * sizeof(struct yy_buffer_state*));
if (! (yy_buffer_stack)) if (! (yy_buffer_stack))
YY_FATAL_ERROR("out of dynamic memory in yyensure_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*)); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_max) = num_to_alloc;

View File

@ -1735,7 +1735,7 @@ struct String *Token_toString(struct Token *token, struct Token *spaceto, struct
++thisnotindent; ++nextindent; ++thisnotindent; ++nextindent;
} }
break; break;
} }
case T_SELECTCASE: thisnotindent+=2; nextindent+=2; break; case T_SELECTCASE: thisnotindent+=2; nextindent+=2; break;
case T_EQ: case T_EQ:
{ {

View File

@ -326,7 +326,7 @@ static double factorial(double x);
* Sets up all our globals, including the list of lines. * Sets up all our globals, including the list of lines.
* Params: script - the script passed by the user * Params: script - the script passed by the user
* Returns: 0 on success, -1 on failure * Returns: 0 on success, -1 on failure
* *
* *
****************************************************************************/ ****************************************************************************/
@ -1010,7 +1010,7 @@ static int dogoto(void)
* *
* Description: * Description:
* The FOR statement. * The FOR statement.
* *
* Pushes the for stack. * Pushes the for stack.
* Returns line to jump to, or -1 to end program * Returns line to jump to, or -1 to end program
* *
@ -1266,7 +1266,7 @@ static void dorem(void)
* Get an lvalue from the environment * Get an lvalue from the environment
* Params: lv - structure to fill. * Params: lv - structure to fill.
* Notes: missing variables (but not out of range subscripts) * 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: * Description:
* Get the value of a scalar variable from string * Get the value of a scalar variable from string
* matches FLTID * matches FLTID
* *
* *
****************************************************************************/ ****************************************************************************/

View File

@ -126,7 +126,7 @@ static FAR char *loadfile(FAR char *path)
* Name: leftstring * Name: leftstring
* *
* Description: * Description:
* *
* *
****************************************************************************/ ****************************************************************************/

View File

@ -156,7 +156,7 @@ if 0
config MB_ASCII_MASTER config MB_ASCII_MASTER
bool "Modbus ASCII master" bool "Modbus ASCII master"
default n default n
endif endif
config MB_RTU_MASTER config MB_RTU_MASTER
bool "Modbus 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 When master sends frame, which is not broadcast, it should wait for
given time duration for slave response. If slave doesn't respond given time duration for slave response. If slave doesn't respond
during give time period, the master will process timeout 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 config MB_MASTER_FUNC_READ_INPUT_ENABLED
bool "Read Input Registers function" bool "Read Input Registers function"

View File

@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
* apps/modbus/functions/mbfunccoils_m.c * apps/modbus/functions/mbfunccoils_m.c
* *
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (C) 2013 Armink <armink.ztl@gmail.com> * Copyright (C) 2013 Armink <armink.ztl@gmail.com>
* All rights reserved. * All rights reserved.

View File

@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
* apps/modbus/functions/mbfuncdisc_m.c * apps/modbus/functions/mbfuncdisc_m.c
* *
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (C) 2013 Armink <armink.ztl@gmail.com> * Copyright (C) 2013 Armink <armink.ztl@gmail.com>
* All rights reserved. * All rights reserved.

View File

@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
* apps/modbus/functions/mbfuncholding_m.c * apps/modbus/functions/mbfuncholding_m.c
* *
* FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU. * FreeModbus Library: A portable Modbus implementation for Modbus ASCII/RTU.
* Copyright (C) 2013 Armink <armink.ztl@gmail.com> * Copyright (C) 2013 Armink <armink.ztl@gmail.com>
* All rights reserved. * All rights reserved.

View File

@ -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. * the Master is idle.
*/ */

View File

@ -136,7 +136,7 @@ bool xMBMasterPortEventGet(eMBMasterEventType * eEvent)
else else
{ {
/* Poll the serial device. The serial device timeouts if no characters /* 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 * nothing happens within a specified amount of time. Both timeouts are
* configured from the timer init functions. * configured from the timer init functions.
*/ */

View File

@ -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) 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"); (mode == lesp_eMODE_STATION)?"STA":"AP");
} }

View File

@ -54,7 +54,7 @@
* Private Data * 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 */ 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 */ 1, 1, 1, 1, /* 8: 1 bit, 9-b: Should not happen */

View File

@ -77,7 +77,7 @@ void netlib_prefix2ipv6netmask(uint8_t preflen, FAR struct in6_addr *netmask)
* Eg. preflen = 38 * Eg. preflen = 38
* NETMASK: ffff ffff fc00 0000 0000 0000 0000 0000 * NETMASK: ffff ffff fc00 0000 0000 0000 0000 0000
* bit: 1 1..1 * 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 * 0..5 6..1 2..7 8..3 4..9 0..5 6..1 2..7
* preflen: 1 1..1 * preflen: 1 1..1
* 1 1..3 3..4 4..6 6..8 8..9 9..1 1..2 * 1 1..3 3..4 4..6 6..8 8..9 9..1 1..2

View File

@ -77,7 +77,7 @@
* Setup to send an ICMP packet * Setup to send an ICMP packet
* *
* Input Parameters: * Input Parameters:
* *
* *
* Return: * Return:
* None * None

View File

@ -77,10 +77,10 @@
* Name: icmpv6_echo_request * Name: icmpv6_echo_request
* *
* Description: * Description:
* Format an ICMPv6 Echo Request message. * Format an ICMPv6 Echo Request message.
* *
* Parameters: * Parameters:
* *
* *
* Return: * Return:
* None * None
@ -267,7 +267,7 @@ int ipv6_ping(FAR struct sockaddr_in6 *raddr,
break; break;
} }
} }
else if (nrecvd >= PING6_BUFFER_SIZE && else if (nrecvd >= PING6_BUFFER_SIZE &&
icmpv6->icmp6_type == ICMPv6_ECHO_REPLY) icmpv6->icmp6_type == ICMPv6_ECHO_REPLY)
{ {
ret = OK; ret = OK;

View File

@ -144,7 +144,7 @@ int cmd_lsmod(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
FAR char *data; FAR char *data;
FAR char *datasize; FAR char *datasize;
FAR char *lasts; FAR char *lasts;
/* Form of returned data is: /* Form of returned data is:
* *
* "%s,%p,%p,%p,%p,%lu,%p,%lu\n" * "%s,%p,%p,%p,%p,%lu,%p,%lu\n"

View File

@ -86,7 +86,7 @@ ROOTDEPPATH = --dep-path .
# Common build # Common build
VPATH = VPATH =
all: .built all: .built
.PHONY: clean depend distclean preconfig .PHONY: clean depend distclean preconfig

View File

@ -236,7 +236,7 @@ FAR struct bfile_s *bfopen(char *name, char *mode)
} }
/* Closes a Buffered File */ /* Closes a Buffered File */
int bfclose(FAR struct bfile_s *bf) int bfclose(FAR struct bfile_s *bf)
{ {
int r; int r;

View File

@ -2,17 +2,17 @@
* apps/exmaples/lzf/lzf_main.c * apps/exmaples/lzf/lzf_main.c
* *
* Copyright (c) 2006 Stefan Traby <stefan@hello-penguin.com> * Copyright (c) 2006 Stefan Traby <stefan@hello-penguin.com>
* *
* Redistribution and use in source and binary forms, with or without modifica- * Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met: * tion, are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer. * this list of conditions and the following disclaimer.
* *
* 2. Redistributions in binary form must reproduce the above copyright * 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * 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- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO

View File

@ -83,7 +83,7 @@ ROOTDEPPATH = --dep-path .
# Common build # Common build
VPATH = VPATH =
all: .built all: .built
.PHONY: clean depend distclean preconfig .PHONY: clean depend distclean preconfig

View File

@ -91,7 +91,7 @@ ROOTDEPPATH = --dep-path .
# Common build # Common build
VPATH = VPATH =
all: .built all: .built
.PHONY: clean depend distclean preconfig .PHONY: clean depend distclean preconfig

View File

@ -327,7 +327,7 @@ int telnet_main(int argc, char *argv[])
{ {
portno = DEFAULT_PORT; portno = DEFAULT_PORT;
} }
/* Convert the <server-IP-addr> argument into a binary address */ /* Convert the <server-IP-addr> argument into a binary address */
memset(&local, 0, sizeof(local)); memset(&local, 0, sizeof(local));

View File

@ -40,7 +40,7 @@ Buffering Notes
logic. logic.
NuttX, however, does not implement XON/XOFF flow control so these do 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 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 software flow control in the host. But that would only work in one

View File

@ -33,7 +33,7 @@ config BTSAK_DEFAULT_PORT
int "Default Port" int "Default Port"
default 61616 default 61616
---help--- ---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 Pv6 network interface (ex. wpan0). Port is 61616 because 6LoWPAN has
special compression for port 61616-61631 special compression for port 61616-61631

View File

@ -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 /* REVISIT: Should support all advertising type. Only ADV_IND is
* supported: * supported:
* *
* ADV_IND * ADV_IND
* Known as Advertising Indications (ADV_IND), where a peripheral device * Known as Advertising Indications (ADV_IND), where a peripheral device
* requests connection to any central device (i.e., not directed at a * requests connection to any central device (i.e., not directed at a
* particular central device). * particular central device).
* Example: A smart watch requesting connection to any central device. * Example: A smart watch requesting connection to any central device.
* ADV_DIRECT_IND * ADV_DIRECT_IND
* Similar to ADV_IND, yet the connection request is directed at a * Similar to ADV_IND, yet the connection request is directed at a
* specific central device. * specific central device.
* Example: A smart watch requesting connection to a specific central * Example: A smart watch requesting connection to a specific central
* device. * device.
* ADV_NONCONN_IND * ADV_NONCONN_IND
* Non connectible devices, advertising information to any listening * Non connectible devices, advertising information to any listening
* device. * device.
* Example: Beacons in museums defining proximity to specific exhibits. * 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 * 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 * 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 /* The data for advertisement and response packets are provided as arrays

View File

@ -54,7 +54,7 @@
****************************************************************************/ ****************************************************************************/
int ieee802154_reset_req(int fd, bool resetattr) int ieee802154_reset_req(int fd, bool resetattr)
{ {
FAR struct ieee802154_reset_req_s req; FAR struct ieee802154_reset_req_s req;
int ret; int ret;