include: nxstyle fixes

fixes for nxstyle errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-06-11 11:07:52 +02:00 committed by Xiang Xiao
parent cc37729e29
commit adc3c9fae9
17 changed files with 107 additions and 79 deletions

View File

@ -53,7 +53,7 @@ extern "C"
#endif
/****************************************************************************
* Public Functions
* Public Functions Prototypes
****************************************************************************/
/****************************************************************************

View File

@ -92,8 +92,9 @@ int canlib_getbaud(int fd, FAR int *bauds);
* Name: canlib_setloopback
*
* Description:
* Wrapper for CANIOC_SET_CONNMODES. When loopback mode is enabled, the CAN
* peripheral transmits on the bus, but only receives its own sent messages.
* Wrapper for CANIOC_SET_CONNMODES.
* When loopback mode is enabled, the CAN peripheral transmits on the bus,
* but only receives its own sent messages.
*
* Input Parameter:
* fd - file descriptor of an opened can device

View File

@ -67,16 +67,16 @@
struct fat_format_s
{
uint8_t ff_nfats; /* Number of FATs */
uint8_t ff_fattype; /* FAT size: 0 (autoselect), 12, 16, or 32 */
uint8_t ff_clustshift; /* Log2 of sectors per cluster: 0-5, 0xff (autoselect) */
uint8_t ff_volumelabel[11]; /* Volume label */
uint16_t ff_backupboot; /* Sector number of the backup boot sector (0=use default)*/
uint16_t ff_rootdirentries; /* Number of root directory entries */
uint16_t ff_rsvdseccount; /* Reserved sectors */
uint32_t ff_hidsec; /* Count of hidden sectors preceding fat */
uint32_t ff_volumeid; /* FAT volume id */
uint32_t ff_nsectors; /* Number of sectors from device to use: 0: Use all */
uint8_t ff_nfats; /* Number of FATs */
uint8_t ff_fattype; /* FAT size: 0 (autoselect), 12, 16, or 32 */
uint8_t ff_clustshift; /* Log2 of sectors per cluster: 0-5, 0xff (autoselect) */
uint8_t ff_volumelabel[11]; /* Volume label */
uint16_t ff_backupboot; /* Sector number of the backup boot sector (0=use default) */
uint16_t ff_rootdirentries; /* Number of root directory entries */
uint16_t ff_rsvdseccount; /* Reserved sectors */
uint32_t ff_hidsec; /* Count of hidden sectors preceding fat */
uint32_t ff_volumeid; /* FAT volume id */
uint32_t ff_nsectors; /* Number of sectors from device to use: 0: Use all */
};
/****************************************************************************
@ -109,7 +109,8 @@ extern "C"
* fmt - Describes characteristics of the desired filesystem
*
* Return:
* Zero (OK) on success; -1 (ERROR) on failure with errno set appropriately:
* Zero (OK) on success;
* -1 (ERROR) on failure with errno set appropriately:
*
* EINVAL - NULL block driver string, bad number of FATS in 'fmt', bad FAT
* size in 'fmt', bad cluster size in 'fmt'

View File

@ -52,7 +52,8 @@ extern "C"
* pathname - the full path to a registered block driver
*
* Return:
* Zero (OK) on success; -1 (ERROR) on failure with errno set appropriately:
* Zero (OK) on success;
* -1 (ERROR) on failure with errno set appropriately:
*
* EINVAL - NULL block driver string
* ENOENT - 'pathname' does not refer to anything in the filesystem.
@ -76,7 +77,8 @@ int issmartfs(FAR const char *pathname);
* on this device (supports multiple mount points).
*
* Return:
* Zero (OK) on success; -1 (ERROR) on failure with errno set appropriately:
* Zero (OK) on success;
* -1 (ERROR) on failure with errno set appropriately:
*
* EINVAL - NULL block driver string
* ENOENT - 'pathname' does not refer to anything in the filesystem.

View File

@ -255,7 +255,8 @@ int curl4nx_easy_setopt(FAR struct curl4nx_s *handle, int option,
/****************************************************************************
* Name: curl4nx_easy_reset()
*
* Description: Reset all operations that were set using curl4nx_easy_setopt()
* Description:
* Reset all operations that were set using curl4nx_easy_setopt()
* to their default values.
*
****************************************************************************/

View File

@ -21,6 +21,10 @@
#ifndef __APPS_INCLUDE_NETUTILS_DISCOVER_H
#define __APPS_INCLUDE_NETUTILS_DISCOVER_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdint.h>
/****************************************************************************

View File

@ -64,7 +64,7 @@ typedef enum
typedef struct
{
lesp_security_t security;
char ssid[lespSSID_SIZE+1]; /* +1 for null char */
char ssid[lespSSID_SIZE + 1]; /* +1 for null char */
uint8_t bssid[lespBSSID_SIZE];
int rssi;
int channel;
@ -79,7 +79,8 @@ int lesp_soft_reset(void);
const char *lesp_security_to_str(lesp_security_t security);
int lesp_ap_connect(const char *ssid_name, const char *ap_key, int timeout_s);
int lesp_ap_connect(const char *ssid_name,
const char *ap_key, int timeout_s);
int lesp_ap_get(lesp_ap_t *ap);
int lesp_ap_is_connected(void);
@ -97,8 +98,10 @@ int lesp_list_access_points(lesp_cb_t cb);
int lesp_socket(int domain, int type, int protocol);
int lesp_closesocket(int sockfd);
int lesp_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
int lesp_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
int lesp_bind(int sockfd,
FAR const struct sockaddr *addr, socklen_t addrlen);
int lesp_connect(int sockfd,
FAR const struct sockaddr *addr, socklen_t addrlen);
int lesp_listen(int sockfd, int backlog);
int lesp_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags);

View File

@ -32,7 +32,9 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* Required configuration settings: Of course TCP networking support is
* required. But here are a couple that are less obvious:
*
@ -104,7 +106,7 @@ extern "C"
#endif
/****************************************************************************
* Public Functions
* Public Functions Prototypes
****************************************************************************/
/****************************************************************************
@ -115,8 +117,8 @@ extern "C"
* used to run the server.
*
* Input Parameters:
* family - The type of INET family to use when opening the socket. AF_INET
* and AF_INET6 are supported.
* family - The type of INET family to use when opening the socket.
* AF_INET and AF_INET6 are supported.
*
* Returned Value:
* On success, a non-NULL handle is returned that can be used to reference
@ -134,8 +136,8 @@ FTPD_SESSION ftpd_open(sa_family_t family);
*
* Input Parameters:
* handle - A handle previously returned by ftpd_open
* accountflags - The characteristics of this user (see FTPD_ACCOUNTFLAGS_*
* definitions above).
* accountflags - The characteristics of this user
* (see FTPD_ACCOUNTFLAGS_* definitions above).
* user - The user login name. May be NULL indicating that no login is
* required.
* passwd - The user password. May be NULL indicating that no password

View File

@ -38,13 +38,13 @@
* SUMMARY:
*
* libtelnet is a library for handling the TELNET protocol. It includes
* routines for parsing incoming data from a remote peer as well as formatting
* data to send to the remote peer.
* routines for parsing incoming data from a remote peer as well as
* formatting data to send to the remote peer.
*
* libtelnet uses a callback-oriented API, allowing application-specific
* handling of various events. The callback system is also used for buffering
* outgoing protocol data, allowing the application to maintain control over
* the actual socket connection.
* handling of various events. The callback system is also used for
* buffering outgoing protocol data, allowing the application to maintain
* control over the actual socket connection.
*
* Features supported include the full TELNET protocol, Q-method option
* negotiation, ZMP, MCCP2, MSSP, and NEW-ENVIRON.
@ -62,9 +62,10 @@
*
* The author or authors of this code dedicate any and all copyright interest
* in this code to the public domain. We make this dedication for the benefit
* of the public at large and to the detriment of our heirs and successors. We
* intend this dedication to be an overt act of relinquishment in perpetuity of
* all present and future rights to this code under copyright law.
* of the public at large and to the detriment of our heirs and successors.
* We intend this dedication to be an overt act of relinquishment in
* perpetuity of all present and future rights to this code under copyright
* law.
*
* Author: Sean Middleditch <sean@sourcemud.org>
*/
@ -290,7 +291,7 @@ union telnet_event_u
/* Subnegotiation event */
struct
struct
{
enum telnet_event_type_e _type; /* Alias for type */
const char *buffer; /* Data of sub-negotiation */
@ -679,8 +680,8 @@ void telnet_newenviron_value(struct telnet_s *telnet, unsigned char type,
* Description:
* Finish a NEW-ENVIRON command.
*
* This must be called after a call to telnet_begin_newenviron() to finish a
* NEW-ENVIRON variable list.
* This must be called after a call to telnet_begin_newenviron() to finish
* a NEW-ENVIRON variable list.
*
* telnet Telnet state tracker object.
*

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/include/netutils/telnetd.h
* apps/include/netutils/telnetd.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -30,6 +30,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* CONFIG_TELNETD_CONSOLE - Use the first Telnet session as the default
* console.
*/
@ -38,7 +39,7 @@
* Public Types
****************************************************************************/
/* An instance of the struct telnetd_config_s structure must be passed to
/* An instance of the struct telnetd_config_s structure must be passed to
* telnetd_start in order to configure the new Telnet daemon.
*/

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/include/netutils/tftp.h
* apps/include/netutils/tftp.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/include/netutils/thttpd.h
* apps/include/netutils/thttpd.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -42,15 +42,17 @@ char *url_decode(char *str);
#endif /* CONFIG_CODECS_URLCODE_NEWMEMORY */
#ifdef CONFIG_CODECS_URLCODE
char *urlencode(const char *src, const int src_len, char *dest, int *dest_len);
char *urldecode(const char *src, const int src_len, char *dest, int *dest_len);
char *urlencode(const char *src, const int src_len,
char *dest, int *dest_len);
char *urldecode(const char *src, const int src_len,
char *dest, int *dest_len);
int urlencode_len(const char *src, const int src_len);
int urldecode_len(const char *src, const int src_len);
#endif /* CONFIG_CODECS_URLCODE */
#ifdef CONFIG_CODECS_AVR_URLCODE
void urlrawdecode(char *urlbuf);
void urlrawencode(char *str,char *urlbuf);
void urlrawencode(char *str, char *urlbuf);
#endif /* CONFIG_CODECS_AVR_URLCODE */
#ifdef __cplusplus

View File

@ -38,6 +38,7 @@
/****************************************************************************
* Public Types
****************************************************************************/
/* This enumeration identifies classes of configuration data */
enum config_data_e
@ -74,7 +75,7 @@ extern "C"
#endif
/****************************************************************************
* Public Functions
* Public Functions Prototypes
****************************************************************************/
/****************************************************************************

View File

@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* apps/include/system/termcurses.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,22 +16,22 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
#ifndef __APPS_INCLUDE_SYSTEM_TERMCURSES_H
#define __APPS_INCLUDE_SYSTEM_TERMCURSES_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <stdint.h>
#include <nuttx/fs/ioctl.h>
#include <nuttx/fs/fs.h>
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
****************************************************************************/
#define TCURS_CLEAR_SCREEN 1
#define TCURS_CLEAR_LINE 2
@ -56,9 +56,9 @@
#define TCURS_ATTRIB_CURS_HIDE 0x0010
#define TCURS_ATTRIB_CURS_SHOW 0x0020
/********************************************************************************************
/****************************************************************************
* Public Type Definitions
********************************************************************************************/
****************************************************************************/
/* Used with TTY ioctls */
@ -88,7 +88,8 @@ struct termcurses_ops_s
/* Get terminal size in row/col dimensions */
CODE int (*getwinsize)(FAR struct termcurses_s *dev, FAR struct winsize *winsz);
CODE int (*getwinsize)(FAR struct termcurses_s *dev,
FAR struct winsize *winsz);
/* Set fg/bg colors */
@ -97,11 +98,14 @@ struct termcurses_ops_s
/* Set display attributes */
CODE int (*setattrib)(FAR struct termcurses_s *dev, unsigned long attributes);
CODE int (*setattrib)(FAR struct termcurses_s *dev,
unsigned long attributes);
/* Get a keycode value */
CODE int (*getkeycode)(FAR struct termcurses_s *dev, int *specialkey, int *keymodifers);
CODE int (*getkeycode)(FAR struct termcurses_s *dev,
int *specialkey,
int *keymodifers);
/* Check for cached keycode value */
@ -132,9 +136,9 @@ struct termcurses_colors_s
uint8_t bg_blue;
};
/********************************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -144,87 +148,90 @@ extern "C"
#define EXTERN extern
#endif
/********************************************************************************************
/****************************************************************************
* termcurses_initterm:
*
* Finds a termcurses_s device based on terminal type string and initialize
* a new context for device control.
*
********************************************************************************************/
****************************************************************************/
int termcurses_initterm(FAR const char *term_type, int in_fd, int out_fd,
FAR struct termcurses_s **dev);
/************************************************************************************
/****************************************************************************
* Name: termcurses_deinitterm
*
* Description:
* Free all space for the termcurses terminal and perform any specific
* de-initialization tasks.
*
************************************************************************************/
****************************************************************************/
int termcurses_deinitterm(FAR struct termcurses_s *dev);
/************************************************************************************
/****************************************************************************
* Name: termcurses_moveyx
*
* Description:
* Configure output text to render in the specified fg/bg colors.
*
************************************************************************************/
****************************************************************************/
int termcurses_moveyx(FAR struct termcurses_s *term, int row, int col);
/************************************************************************************
/****************************************************************************
* Name: termcurses_setattribute
*
* Description:
* Configure output text to render in the specified fg/bg colors.
*
************************************************************************************/
****************************************************************************/
int termcurses_setattribute(FAR struct termcurses_s *term, unsigned long attrib);
int termcurses_setattribute(FAR struct termcurses_s *term,
unsigned long attrib);
/************************************************************************************
/****************************************************************************
* Name: termcurses_setcolors
*
* Description:
* Configure output text to render in the specified fg/bg colors.
*
************************************************************************************/
****************************************************************************/
int termcurses_setcolors(FAR struct termcurses_s *term,
FAR struct termcurses_colors_s *colors);
/************************************************************************************
/****************************************************************************
* Name: termcurses_getwinsize
*
* Description:
* Determines the size of the terminal screen in terms of character rows and cols.
* Determines the size of the terminal screen in terms of character rows
* and cols.
*
************************************************************************************/
****************************************************************************/
int termcurses_getwinsize(FAR struct termcurses_s *term, FAR struct winsize *winsz);
int termcurses_getwinsize(FAR struct termcurses_s *term,
FAR struct winsize *winsz);
/************************************************************************************
/****************************************************************************
* Name: termcurses_getkeycode
*
* Description:
* Get a translated key code from the terminal input.
*
************************************************************************************/
****************************************************************************/
int termcurses_getkeycode(FAR struct termcurses_s *term, FAR int *specialkey,
FAR int *keymodifiers);
/************************************************************************************
/****************************************************************************
* Name: termcurses_checkkey
*
* Description:
* Check if there is a key waiting to be processed.
*
************************************************************************************/
****************************************************************************/
bool termcurses_checkkey(FAR struct termcurses_s *term);

View File

@ -38,6 +38,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
/* The default device used by the Zmodem commands if the -d option is not
@ -166,6 +167,7 @@
/****************************************************************************
* Public Types
****************************************************************************/
/* Opaque handles returned by initialization functions */
typedef FAR void *ZMHANDLE;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* include/testing/unity/unity_config.h
* apps/include/testing/unity_config.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -18,7 +18,7 @@
*
****************************************************************************/
/* See Also: Unity/docs/UnityConfigurationGuide.pdf /*
/* See Also: Unity/docs/UnityConfigurationGuide.pdf */
#ifndef UNITY_CONFIG_H
#define UNITY_CONFIG_H