Standardize some header files

This commit is contained in:
Gregory Nutt
2015-02-16 14:29:43 -06:00
parent 51bff04402
commit 19eea866e6
30 changed files with 63 additions and 55 deletions
+6 -5
View File
@@ -313,7 +313,8 @@ struct canioctl_rtr_s
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -326,7 +327,7 @@ extern "C" {
* *
************************************************************************************/ ************************************************************************************/
EXTERN int can_register(FAR const char *path, FAR struct can_dev_s *dev); int can_register(FAR const char *path, FAR struct can_dev_s *dev);
/************************************************************************************ /************************************************************************************
* Name: can_receive * Name: can_receive
@@ -344,8 +345,8 @@ EXTERN int can_register(FAR const char *path, FAR struct can_dev_s *dev);
* *
************************************************************************************/ ************************************************************************************/
EXTERN int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr, int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
FAR uint8_t *data); FAR uint8_t *data);
/************************************************************************************ /************************************************************************************
* Name: can_txdone * Name: can_txdone
@@ -361,7 +362,7 @@ EXTERN int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
* *
************************************************************************************/ ************************************************************************************/
EXTERN int can_txdone(FAR struct can_dev_s *dev); int can_txdone(FAR struct can_dev_s *dev);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+5 -4
View File
@@ -295,7 +295,8 @@ struct i2c_dev_s
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -317,7 +318,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN FAR struct i2c_dev_s *up_i2cinitialize(int port); FAR struct i2c_dev_s *up_i2cinitialize(int port);
/**************************************************************************** /****************************************************************************
* Name: up_i2cuninitialize * Name: up_i2cuninitialize
@@ -334,7 +335,7 @@ EXTERN FAR struct i2c_dev_s *up_i2cinitialize(int port);
* *
****************************************************************************/ ****************************************************************************/
EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s *dev); int up_i2cuninitialize(FAR struct i2c_dev_s *dev);
/************************************************************************************ /************************************************************************************
* Name: up_i2creset * Name: up_i2creset
@@ -345,7 +346,7 @@ EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s *dev);
************************************************************************************/ ************************************************************************************/
#ifdef CONFIG_I2C_RESET #ifdef CONFIG_I2C_RESET
EXTERN int up_i2creset(FAR struct i2c_dev_s *dev); int up_i2creset(FAR struct i2c_dev_s *dev);
#endif #endif
#undef EXTERN #undef EXTERN
+4 -3
View File
@@ -57,7 +57,8 @@
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -77,7 +78,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct sdio_dev_s; /* See nuttx/sdio.h */ struct sdio_dev_s; /* See nuttx/sdio.h */
EXTERN int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev); int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev);
/**************************************************************************** /****************************************************************************
* Name: mmcsd_spislotinitialize * Name: mmcsd_spislotinitialize
@@ -97,7 +98,7 @@ EXTERN int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev);
****************************************************************************/ ****************************************************************************/
struct spi_dev_s; /* See nuttx/spi/spi.h */ struct spi_dev_s; /* See nuttx/spi/spi.h */
EXTERN int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi); int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+1 -1
View File
@@ -57,7 +57,7 @@
#include <nuttx/net/ethernet.h> #include <nuttx/net/ethernet.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+3 -2
View File
@@ -126,7 +126,8 @@ struct cs89x0_driver_s
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -159,7 +160,7 @@ extern "C" {
/* Initialize the CS89x0 chip and driver */ /* Initialize the CS89x0 chip and driver */
EXTERN int cs89x0_initialize(FAR const cs89x0_driver_s *cs89x0, int devno); int cs89x0_initialize(FAR const cs89x0_driver_s *cs89x0, int devno);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+5 -5
View File
@@ -116,7 +116,8 @@ struct enc_lower_s
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -147,9 +148,8 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct spi_dev_s; /* see nuttx/spi/spi.h */ struct spi_dev_s; /* see nuttx/spi/spi.h */
EXTERN int enc_initialize(FAR struct spi_dev_s *spi, int enc_initialize(FAR struct spi_dev_s *spi,
FAR const struct enc_lower_s *lower, FAR const struct enc_lower_s *lower, unsigned int devno);
unsigned int devno);
/**************************************************************************** /****************************************************************************
* Function: enc_stats * Function: enc_stats
@@ -171,7 +171,7 @@ EXTERN int enc_initialize(FAR struct spi_dev_s *spi,
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_ENC28J60_STATS #ifdef CONFIG_ENC28J60_STATS
EXTERN int enc_stats(unsigned int devno, struct enc_stats_s *stats); int enc_stats(unsigned int devno, struct enc_stats_s *stats);
#endif #endif
#undef EXTERN #undef EXTERN
+1 -1
View File
@@ -52,7 +52,7 @@
#ifdef CONFIG_NET_ETHERNET #ifdef CONFIG_NET_ETHERNET
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Recognized values of the type bytes in the Ethernet header */ /* Recognized values of the type bytes in the Ethernet header */
+1 -1
View File
@@ -44,7 +44,7 @@
#include <nuttx/net/mii.h> #include <nuttx/net/mii.h>
/********************************************************************************************* /*********************************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
*********************************************************************************************/ *********************************************************************************************/
/* MII register offsets **********************************************************************/ /* MII register offsets **********************************************************************/
+1 -1
View File
@@ -43,7 +43,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* MII register offsets *****************************************************/ /* MII register offsets *****************************************************/
+4 -3
View File
@@ -217,7 +217,8 @@ struct pwm_lowerhalf_s
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -250,7 +251,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev); int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev);
/**************************************************************************** /****************************************************************************
* Name: pwm_expired * Name: pwm_expired
@@ -290,7 +291,7 @@ EXTERN int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev);
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_PWM_PULSECOUNT #ifdef CONFIG_PWM_PULSECOUNT
EXTERN void pwm_expired(FAR void *handle); void pwm_expired(FAR void *handle);
#endif #endif
/**************************************************************************** /****************************************************************************
+3 -2
View File
@@ -54,7 +54,8 @@
#ifdef __cplusplus #ifdef __cplusplus
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -72,7 +73,7 @@ extern "C" {
* *
****************************************************************************/ ****************************************************************************/
EXTERN int match(const char *pattern, const char *string); int match(const char *pattern, const char *string);
#undef EXTERN #undef EXTERN
#ifdef __cplusplus #ifdef __cplusplus
+2 -2
View File
@@ -160,8 +160,8 @@ struct rwbuffer_s
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN EXTERN "C" #define EXTERN extern "C"
EXTERN "C" extern "C"
{ {
#else #else
#define EXTERN extern #define EXTERN extern
+1 -1
View File
@@ -43,7 +43,7 @@
#include <nuttx/fs/fs.h> #include <nuttx/fs/fs.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -52,7 +52,7 @@
#endif #endif
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#undef EXTERN #undef EXTERN
+1 -1
View File
@@ -45,7 +45,7 @@
#include <sys/types.h> #include <sys/types.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Mode bits: The lower order 9-bit bits are the standard mode bits */ /* Mode bits: The lower order 9-bit bits are the standard mode bits */
+1 -1
View File
@@ -44,7 +44,7 @@
#include <sys/types.h> #include <sys/types.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Protections are chosen from these bits, OR'd together. NuttX does not /* Protections are chosen from these bits, OR'd together. NuttX does not
+1 -1
View File
@@ -41,7 +41,7 @@
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Mount flags */ /* Mount flags */
+1 -1
View File
@@ -41,7 +41,7 @@
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Supported prctl() commands. /* Supported prctl() commands.
+1 -1
View File
@@ -48,7 +48,7 @@
#if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 #if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Get the total number of descriptors that we will have to support */ /* Get the total number of descriptors that we will have to support */
+1 -1
View File
@@ -45,7 +45,7 @@
#include <sys/types.h> #include <sys/types.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
+1 -1
View File
@@ -47,7 +47,7 @@
#include <time.h> #include <time.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Definitions required by POSIX */ /* Definitions required by POSIX */
+1 -1
View File
@@ -43,7 +43,7 @@
#include <sys/types.h> #include <sys/types.h>
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* The socket()domain parameter specifies a communication domain; this selects /* The socket()domain parameter specifies a communication domain; this selects
+1 -1
View File
@@ -49,7 +49,7 @@
#include <nuttx/net/ioctl.h> #include <nuttx/net/ioctl.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
#define IMSFNAMSIZ 8 #define IMSFNAMSIZ 8
+1 -1
View File
@@ -44,7 +44,7 @@
#include <time.h> #include <time.h>
/**************************************************************************** /****************************************************************************
* Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* mode_t bit settings (most of these do not apply to Nuttx). This assumes /* mode_t bit settings (most of these do not apply to Nuttx). This assumes
+5 -4
View File
@@ -46,7 +46,7 @@
#include <stdint.h> #include <stdint.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* struct statfs file system types. */ /* struct statfs file system types. */
@@ -126,7 +126,8 @@ struct statfs
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
@@ -136,8 +137,8 @@ extern "C" {
* form of the struct statfs. * form of the struct statfs.
*/ */
EXTERN int statfs(const char *path, struct statfs *buf); int statfs(const char *path, struct statfs *buf);
EXTERN int fstatfs(int fd, struct statfs *buf); int fstatfs(int fd, struct statfs *buf);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+1 -1
View File
@@ -45,7 +45,7 @@
#include <time.h> #include <time.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -47,7 +47,7 @@
#include <sys/socket.h> #include <sys/socket.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* The size of sun_path is not specified. Different implementations us /* The size of sun_path is not specified. Different implementations us
+1 -1
View File
@@ -47,7 +47,7 @@
#include <sys/statfs.h> #include <sys/statfs.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
+6 -5
View File
@@ -46,7 +46,7 @@
#ifdef CONFIG_SCHED_WAITPID #ifdef CONFIG_SCHED_WAITPID
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* The following are provided for analysis of returned status values. /* The following are provided for analysis of returned status values.
@@ -97,14 +97,15 @@ typedef enum idtype_e idtype_t;
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
#define EXTERN extern "C" #define EXTERN extern "C"
extern "C" { extern "C"
{
#else #else
#define EXTERN extern #define EXTERN extern
#endif #endif
EXTERN pid_t wait(FAR int *stat_loc); pid_t wait(FAR int *stat_loc);
EXTERN int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options); int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options);
EXTERN pid_t waitpid(pid_t pid, FAR int *stat_loc, int options); pid_t waitpid(pid_t pid, FAR int *stat_loc, int options);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
+1 -1
View File
@@ -45,7 +45,7 @@
#include <stdint.h> #include <stdint.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Terminal input modes (c_iflag in the termios structure) */ /* Terminal input modes (c_iflag in the termios structure) */