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

View file

@ -313,7 +313,8 @@ struct canioctl_rtr_s
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#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
@ -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,
FAR uint8_t *data);
int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
FAR uint8_t *data);
/************************************************************************************
* 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
#if defined(__cplusplus)

View file

@ -295,7 +295,8 @@ struct i2c_dev_s
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#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
@ -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
@ -345,7 +346,7 @@ EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s *dev);
************************************************************************************/
#ifdef CONFIG_I2C_RESET
EXTERN int up_i2creset(FAR struct i2c_dev_s *dev);
int up_i2creset(FAR struct i2c_dev_s *dev);
#endif
#undef EXTERN

View file

@ -57,7 +57,8 @@
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@ -77,7 +78,7 @@ extern "C" {
****************************************************************************/
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
@ -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 */
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
#if defined(__cplusplus)

View file

@ -57,7 +57,7 @@
#include <nuttx/net/ethernet.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View file

@ -126,7 +126,8 @@ struct cs89x0_driver_s
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@ -159,7 +160,7 @@ extern "C" {
/* 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
#ifdef __cplusplus

View file

@ -116,7 +116,8 @@ struct enc_lower_s
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@ -147,9 +148,8 @@ extern "C" {
****************************************************************************/
struct spi_dev_s; /* see nuttx/spi/spi.h */
EXTERN int enc_initialize(FAR struct spi_dev_s *spi,
FAR const struct enc_lower_s *lower,
unsigned int devno);
int enc_initialize(FAR struct spi_dev_s *spi,
FAR const struct enc_lower_s *lower, unsigned int devno);
/****************************************************************************
* Function: enc_stats
@ -171,7 +171,7 @@ EXTERN int enc_initialize(FAR struct spi_dev_s *spi,
****************************************************************************/
#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
#undef EXTERN

View file

@ -52,7 +52,7 @@
#ifdef CONFIG_NET_ETHERNET
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Recognized values of the type bytes in the Ethernet header */

View file

@ -44,7 +44,7 @@
#include <nuttx/net/mii.h>
/*********************************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
*********************************************************************************************/
/* MII register offsets **********************************************************************/

View file

@ -43,7 +43,7 @@
#include <nuttx/config.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* MII register offsets *****************************************************/

View file

@ -217,7 +217,8 @@ struct pwm_lowerhalf_s
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#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
@ -290,7 +291,7 @@ EXTERN int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev);
****************************************************************************/
#ifdef CONFIG_PWM_PULSECOUNT
EXTERN void pwm_expired(FAR void *handle);
void pwm_expired(FAR void *handle);
#endif
/****************************************************************************

View file

@ -54,7 +54,8 @@
#ifdef __cplusplus
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#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
#ifdef __cplusplus

View file

@ -160,8 +160,8 @@ struct rwbuffer_s
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN EXTERN "C"
EXTERN "C"
#define EXTERN extern "C"
extern "C"
{
#else
#define EXTERN extern

View file

@ -43,7 +43,7 @@
#include <nuttx/fs/fs.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View file

@ -52,7 +52,7 @@
#endif
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
#undef EXTERN

View file

@ -45,7 +45,7 @@
#include <sys/types.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Mode bits: The lower order 9-bit bits are the standard mode bits */

View file

@ -44,7 +44,7 @@
#include <sys/types.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Protections are chosen from these bits, OR'd together. NuttX does not

View file

@ -41,7 +41,7 @@
****************************************************************************/
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Mount flags */

View file

@ -41,7 +41,7 @@
****************************************************************************/
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Supported prctl() commands.

View file

@ -48,7 +48,7 @@
#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 */

View file

@ -45,7 +45,7 @@
#include <sys/types.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/

View file

@ -47,7 +47,7 @@
#include <time.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Definitions required by POSIX */

View file

@ -43,7 +43,7 @@
#include <sys/types.h>
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/* The socket()domain parameter specifies a communication domain; this selects

View file

@ -49,7 +49,7 @@
#include <nuttx/net/ioctl.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
#define IMSFNAMSIZ 8

View file

@ -44,7 +44,7 @@
#include <time.h>
/****************************************************************************
* Definitions
* Pre-processor Definitions
****************************************************************************/
/* mode_t bit settings (most of these do not apply to Nuttx). This assumes

View file

@ -46,7 +46,7 @@
#include <stdint.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* struct statfs file system types. */
@ -126,7 +126,8 @@ struct statfs
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
@ -136,8 +137,8 @@ extern "C" {
* form of the struct statfs.
*/
EXTERN int statfs(const char *path, struct statfs *buf);
EXTERN int fstatfs(int fd, struct statfs *buf);
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
#undef EXTERN
#if defined(__cplusplus)

View file

@ -45,7 +45,7 @@
#include <time.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View file

@ -47,7 +47,7 @@
#include <sys/socket.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* The size of sun_path is not specified. Different implementations us

View file

@ -47,7 +47,7 @@
#include <sys/statfs.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************

View file

@ -46,7 +46,7 @@
#ifdef CONFIG_SCHED_WAITPID
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* The following are provided for analysis of returned status values.
@ -97,14 +97,15 @@ typedef enum idtype_e idtype_t;
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
extern "C"
{
#else
#define EXTERN extern
#endif
EXTERN pid_t wait(FAR int *stat_loc);
EXTERN 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 wait(FAR int *stat_loc);
int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options);
pid_t waitpid(pid_t pid, FAR int *stat_loc, int options);
#undef EXTERN
#if defined(__cplusplus)

View file

@ -45,7 +45,7 @@
#include <stdint.h>
/****************************************************************************
* Pre-Processor Definitions
* Pre-processor Definitions
****************************************************************************/
/* Terminal input modes (c_iflag in the termios structure) */