From 1154735ca65dafe170ea25728e9ec1723af39ebe Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 31 Jan 2020 23:18:05 +0800 Subject: [PATCH] Refine the preprocess conditional guard style --- examples/fb/fb_main.c | 2 +- examples/lvgldemo/fbdev.h | 2 +- examples/module/module_main.c | 4 +-- fsutils/passwd/passwd.h | 2 +- graphics/pdcurs34/include/curspriv.h | 2 +- graphics/pdcurs34/include/term.h | 2 +- graphics/pdcurs34/nuttx/pdcgetsc.c | 2 +- graphics/pdcurs34/nuttx/pdcnuttx.h | 2 +- graphics/pdcurs34/nuttx/pdcthread.c | 4 +-- graphics/slcd/slcd.hxx | 2 +- graphics/tiff/tiff_internal.h | 2 +- include/canutils/obd.h | 2 +- include/canutils/obd_frame.h | 2 +- include/canutils/obd_pid.h | 2 +- include/fsutils/flash_eraseall.h | 2 +- include/fsutils/passwd.h | 2 +- include/graphics/curses.h | 4 +-- include/graphics/panel.h | 2 +- include/graphics/slcd.hxx | 2 +- include/graphics/twm4nx/ciconmgr.hxx | 2 +- include/graphics/twm4nx/cmenus.hxx | 2 +- include/graphics/twm4nx/cresize.hxx | 2 +- include/graphics/twm4nx/cwindow.hxx | 2 +- include/graphics/twm4nx/cwindowfactory.hxx | 2 +- include/graphics/twm4nx/twm4nx_cursor.hxx | 4 +-- include/netutils/httpd.h | 2 +- include/netutils/ntpclient.h | 2 +- include/netutils/telnetc.h | 2 +- include/system/nxplayer.h | 2 +- include/system/nxrecorder.h | 2 +- include/testing/unity_config.h | 2 +- interpreters/bas/bas_token.c | 6 ++--- modbus/nuttx/portevent_m.c | 2 +- netutils/ntpclient/ntpv3.h | 2 +- netutils/thttpd/config.h | 2 +- netutils/thttpd/libhttpd.c | 6 ++--- netutils/thttpd/libhttpd.h | 2 +- netutils/thttpd/tdate_parse.h | 2 +- netutils/thttpd/thttpd.c | 2 +- nshlib/nsh.h | 2 +- nshlib/nsh_timcmds.c | 2 +- platform/mikroe-stm32f4/mikroe_configdata.c | 2 +- system/nxplayer/nxplayer.c | 28 ++++++++++----------- system/nxplayer/nxplayer_main.c | 2 +- system/nxrecorder/nxrecorder.c | 6 ++--- system/readline/readline.h | 2 +- system/termcurses/tcurses_vt100.c | 2 +- system/vi/vi.c | 6 ++--- 48 files changed, 73 insertions(+), 73 deletions(-) diff --git a/examples/fb/fb_main.c b/examples/fb/fb_main.c index 4c46ff30de..59d6ce9eeb 100644 --- a/examples/fb/fb_main.c +++ b/examples/fb/fb_main.c @@ -67,7 +67,7 @@ struct fb_state_s int fd; struct fb_videoinfo_s vinfo; struct fb_planeinfo_s pinfo; -#ifdef CONFIG_FB_OVERLAY +#ifdef CONFIG_FB_OVERLAY struct fb_overlayinfo_s oinfo; #endif FAR void *fbmem; diff --git a/examples/lvgldemo/fbdev.h b/examples/lvgldemo/fbdev.h index 337e3e652b..0df0f349e5 100644 --- a/examples/lvgldemo/fbdev.h +++ b/examples/lvgldemo/fbdev.h @@ -63,4 +63,4 @@ void fbdev_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, } /* extern "C" */ #endif -#endif /*__APPS_EXAMPLES_LVGLDEMO_FBDEV_H*/ +#endif /*__APPS_EXAMPLES_LVGLDEMO_FBDEV_H */ diff --git a/examples/module/module_main.c b/examples/module/module_main.c index a0de9b9be2..dfffda420d 100644 --- a/examples/module/module_main.c +++ b/examples/module/module_main.c @@ -229,7 +229,7 @@ int main(int argc, FAR char *argv[]) } #endif /* CONFIG_EXAMPLES_MODULE_ROMFS */ -#else /* CONFIG_EXAMPLES_MODULE_BUILTINFS */ +#else /* CONFIG_EXAMPLES_MODULE_BUILTINFS */ /* An external file system is being used */ #if defined(CONFIG_EXAMPLES_MODULE_FSMOUNT) @@ -263,7 +263,7 @@ int main(int argc, FAR char *argv[]) } } while (ret < 0); -#endif /* CONFIG_EXAMPLES_MODULE_FSREMOVEABLE */ +#endif /* CONFIG_EXAMPLES_MODULE_FSREMOVEABLE */ /* Mount the external file system */ diff --git a/fsutils/passwd/passwd.h b/fsutils/passwd/passwd.h index e509d368b9..7fa3bc6cff 100644 --- a/fsutils/passwd/passwd.h +++ b/fsutils/passwd/passwd.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_FSUTILS_PASSWD_PASSWD_H -#define __APPS_FSUTILS_PASSWD_PASSWD_H 1 +#define __APPS_FSUTILS_PASSWD_PASSWD_H /**************************************************************************** * Included Files diff --git a/graphics/pdcurs34/include/curspriv.h b/graphics/pdcurs34/include/curspriv.h index 15681dc897..f6787627ac 100644 --- a/graphics/pdcurs34/include/curspriv.h +++ b/graphics/pdcurs34/include/curspriv.h @@ -41,7 +41,7 @@ ****************************************************************************/ #ifndef __APPS_GRAPHICS_PDCURS34_INCLUDE_CURSPRIV_H -#define __APPS_GRAPHICS_PDCURS34_INCLUDE_CURSPRIV_H 1 +#define __APPS_GRAPHICS_PDCURS34_INCLUDE_CURSPRIV_H /**************************************************************************** * Included Files diff --git a/graphics/pdcurs34/include/term.h b/graphics/pdcurs34/include/term.h index eac196cc70..a68eb3daff 100644 --- a/graphics/pdcurs34/include/term.h +++ b/graphics/pdcurs34/include/term.h @@ -44,7 +44,7 @@ ****************************************************************************/ #ifndef __APPS_GRAPHICS_PDCURS34_INCLUDE_TERM_H -#define __APPS_GRAPHICS_PDCURS34_INCLUDE_TERM_H 1 +#define __APPS_GRAPHICS_PDCURS34_INCLUDE_TERM_H /**************************************************************************** * Included Files diff --git a/graphics/pdcurs34/nuttx/pdcgetsc.c b/graphics/pdcurs34/nuttx/pdcgetsc.c index 66be212ba6..ebe58ffbd0 100644 --- a/graphics/pdcurs34/nuttx/pdcgetsc.c +++ b/graphics/pdcurs34/nuttx/pdcgetsc.c @@ -76,7 +76,7 @@ int PDC_get_columns_term(FAR SCREEN *sp) return ret; } -#endif /* CONFIG_SYSTEM_TERMCURSES */ +#endif /* CONFIG_SYSTEM_TERMCURSES */ /**************************************************************************** * Name: PDC_get_rows diff --git a/graphics/pdcurs34/nuttx/pdcnuttx.h b/graphics/pdcurs34/nuttx/pdcnuttx.h index 49ed5b6b48..4464b9882e 100644 --- a/graphics/pdcurs34/nuttx/pdcnuttx.h +++ b/graphics/pdcurs34/nuttx/pdcnuttx.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_GRAPHICS_PDCURS34_NUTTX_PDCNUTTX_H -#define __APPS_GRAPHICS_PDCURS34_NUTTX_PDCNUTTX_H 1 +#define __APPS_GRAPHICS_PDCURS34_NUTTX_PDCNUTTX_H /**************************************************************************** * Included Files diff --git a/graphics/pdcurs34/nuttx/pdcthread.c b/graphics/pdcurs34/nuttx/pdcthread.c index ac9f526f13..de01f83ce3 100644 --- a/graphics/pdcurs34/nuttx/pdcthread.c +++ b/graphics/pdcurs34/nuttx/pdcthread.c @@ -159,7 +159,7 @@ static FAR struct pdc_context_s *PDC_ctx_new(void) ctx->next = g_pdc_ctx_head; g_pdc_ctx_head = ctx; } -#endif /* CONFIG_PDCURSES_MULTITHREAD_HASH */ +#endif /* CONFIG_PDCURSES_MULTITHREAD_HASH */ return ctx; } @@ -347,5 +347,5 @@ void PDC_ctx_free(void) free(ctx->panel_ctx); free(ctx->term_ctx); free(ctx); -#endif /* CONFIG_PDCURSES_MULTITHREAD_HASH */ +#endif /* CONFIG_PDCURSES_MULTITHREAD_HASH */ } diff --git a/graphics/slcd/slcd.hxx b/graphics/slcd/slcd.hxx index 58215da2f8..97cec31d52 100644 --- a/graphics/slcd/slcd.hxx +++ b/graphics/slcd/slcd.hxx @@ -34,7 +34,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifndef __APPS_GRAPHICS_SLCD_SLCD_H -#define __APPS_GRAPHICS_SLCD_SLCD_H 1 +#define __APPS_GRAPHICS_SLCD_SLCD_H ///////////////////////////////////////////////////////////////////////////// // Included Files diff --git a/graphics/tiff/tiff_internal.h b/graphics/tiff/tiff_internal.h index 8872894d5e..8441017e38 100644 --- a/graphics/tiff/tiff_internal.h +++ b/graphics/tiff/tiff_internal.h @@ -208,4 +208,4 @@ ssize_t tiff_wordalign(int fd, size_t size); } #endif -#endif /* __APPS_GRAPHICS_TIFF_TIFF_INTERNAL_H */ +#endif /* __APPS_GRAPHICS_TIFF_TIFF_INTERNAL_H */ diff --git a/include/canutils/obd.h b/include/canutils/obd.h index 237f63a451..25fbdfd15b 100644 --- a/include/canutils/obd.h +++ b/include/canutils/obd.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_CANUTILS_OBD_H -#define __APPS_INCLUDE_CANUTILS_OBD_H 1 +#define __APPS_INCLUDE_CANUTILS_OBD_H /**************************************************************************** * Included Files diff --git a/include/canutils/obd_frame.h b/include/canutils/obd_frame.h index cc5fd40854..d7afb9693c 100644 --- a/include/canutils/obd_frame.h +++ b/include/canutils/obd_frame.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_CANUTILS_OBD_FRAME_H -#define __APPS_INCLUDE_CANUTILS_OBD_FRAME_H 1 +#define __APPS_INCLUDE_CANUTILS_OBD_FRAME_H /**************************************************************************** * Pre-processor Definitions diff --git a/include/canutils/obd_pid.h b/include/canutils/obd_pid.h index 8902f3e833..4ad65f5795 100644 --- a/include/canutils/obd_pid.h +++ b/include/canutils/obd_pid.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_CANUTILS_OBD_PID_H -#define __APPS_INCLUDE_CANUTILS_OBD_PID_H 1 +#define __APPS_INCLUDE_CANUTILS_OBD_PID_H /**************************************************************************** * Pre-processor Definitions diff --git a/include/fsutils/flash_eraseall.h b/include/fsutils/flash_eraseall.h index 69d1ee55c1..31b7bd0df5 100644 --- a/include/fsutils/flash_eraseall.h +++ b/include/fsutils/flash_eraseall.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H -#define __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H 1 +#define __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H /**************************************************************************** * Included Files diff --git a/include/fsutils/passwd.h b/include/fsutils/passwd.h index d72d2bbc06..add3298599 100644 --- a/include/fsutils/passwd.h +++ b/include/fsutils/passwd.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_FSUTILS_PASSWD_H -#define __APPS_INCLUDE_FSUTILS_PASSWD_H 1 +#define __APPS_INCLUDE_FSUTILS_PASSWD_H /**************************************************************************** * Included Files diff --git a/include/graphics/curses.h b/include/graphics/curses.h index 787cbbe3eb..b9c9f2b53f 100644 --- a/include/graphics/curses.h +++ b/include/graphics/curses.h @@ -36,7 +36,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_GRAPHICS_CURSES_H -#define __APPS_INCLUDE_GRAPHICS_CURSES_H 1 +#define __APPS_INCLUDE_GRAPHICS_CURSES_H /* PDCurses definitions list: (Only define those needed) * @@ -1525,4 +1525,4 @@ int PDC_save_key_modifiers(bool); } #endif -#endif /* __APPS_INCLUDE_GRAPHICS_CURSES_H */ +#endif /* __APPS_INCLUDE_GRAPHICS_CURSES_H */ diff --git a/include/graphics/panel.h b/include/graphics/panel.h index de10096e06..ee93e33fb9 100644 --- a/include/graphics/panel.h +++ b/include/graphics/panel.h @@ -36,7 +36,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_GRAPHICS_PANEL_H -#define __APPS_INCLUDE_GRAPHICS_PANEL_H 1 +#define __APPS_INCLUDE_GRAPHICS_PANEL_H /**************************************************************************** * Included Files diff --git a/include/graphics/slcd.hxx b/include/graphics/slcd.hxx index 103219ff17..dfbea0e2c4 100644 --- a/include/graphics/slcd.hxx +++ b/include/graphics/slcd.hxx @@ -34,7 +34,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifndef __APPS_INCLUDE_GRAPHICS_SLCD_H -#define __APPS_INCLUDE_GRAPHICS_SLCD_H 1 +#define __APPS_INCLUDE_GRAPHICS_SLCD_H ///////////////////////////////////////////////////////////////////////////// // Included Files diff --git a/include/graphics/twm4nx/ciconmgr.hxx b/include/graphics/twm4nx/ciconmgr.hxx index e951bf61e8..9aa1c018d5 100644 --- a/include/graphics/twm4nx/ciconmgr.hxx +++ b/include/graphics/twm4nx/ciconmgr.hxx @@ -336,4 +336,4 @@ namespace Twm4Nx // Public Function Prototypes ///////////////////////////////////////////////////////////////////////////// -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CICONMGR_HXX +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CICONMGR_HXX diff --git a/include/graphics/twm4nx/cmenus.hxx b/include/graphics/twm4nx/cmenus.hxx index 6b22c00e7a..d298fb0262 100644 --- a/include/graphics/twm4nx/cmenus.hxx +++ b/include/graphics/twm4nx/cmenus.hxx @@ -355,4 +355,4 @@ namespace Twm4Nx }; } -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CMENUS_HXX +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CMENUS_HXX diff --git a/include/graphics/twm4nx/cresize.hxx b/include/graphics/twm4nx/cresize.hxx index 2bee0995df..37c45a9196 100644 --- a/include/graphics/twm4nx/cresize.hxx +++ b/include/graphics/twm4nx/cresize.hxx @@ -295,4 +295,4 @@ namespace Twm4Nx }; } -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CRESIZE_HXX +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CRESIZE_HXX diff --git a/include/graphics/twm4nx/cwindow.hxx b/include/graphics/twm4nx/cwindow.hxx index ea995aeef1..54259eaa6a 100644 --- a/include/graphics/twm4nx/cwindow.hxx +++ b/include/graphics/twm4nx/cwindow.hxx @@ -943,4 +943,4 @@ namespace Twm4Nx uint8_t flags); } -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CWINDOW_HXX +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CWINDOW_HXX diff --git a/include/graphics/twm4nx/cwindowfactory.hxx b/include/graphics/twm4nx/cwindowfactory.hxx index 34aad61a46..f3ead4da3d 100644 --- a/include/graphics/twm4nx/cwindowfactory.hxx +++ b/include/graphics/twm4nx/cwindowfactory.hxx @@ -309,4 +309,4 @@ namespace Twm4Nx }; } -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CWINDOWFACTORY_HXX +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_CWINDOWFACTORY_HXX diff --git a/include/graphics/twm4nx/twm4nx_cursor.hxx b/include/graphics/twm4nx/twm4nx_cursor.hxx index 7795dd286a..42194cc802 100644 --- a/include/graphics/twm4nx/twm4nx_cursor.hxx +++ b/include/graphics/twm4nx/twm4nx_cursor.hxx @@ -68,5 +68,5 @@ namespace Twm4Nx // Public Function Prototypes ///////////////////////////////////////////////////////////////////////////// -#endif // CONFIG_NX_SWCURSOR -#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_TWM4NX_CURSOR_HXX +#endif // CONFIG_NX_SWCURSOR +#endif // __APPS_INCLUDE_GRAPHICS_TWM4NX_TWM4NX_CURSOR_HXX diff --git a/include/netutils/httpd.h b/include/netutils/httpd.h index 1c981fb856..b014f118d2 100644 --- a/include/netutils/httpd.h +++ b/include/netutils/httpd.h @@ -59,7 +59,7 @@ * for the thread. Use a default if the user provided no stacksize. */ -#ifndef CONFIG_NETUTILS_HTTPDSTACKSIZE +#ifndef CONFIG_NETUTILS_HTTPDSTACKSIZE # define CONFIG_NETUTILS_HTTPDSTACKSIZE 4096 #endif diff --git a/include/netutils/ntpclient.h b/include/netutils/ntpclient.h index 84239c427f..c4d78503d0 100644 --- a/include/netutils/ntpclient.h +++ b/include/netutils/ntpclient.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_NETUTILS_NTPCLIENT_H -#define __APPS_INCLUDE_NETUTILS_NTPCLIENT_H 1 +#define __APPS_INCLUDE_NETUTILS_NTPCLIENT_H /**************************************************************************** * Included Files diff --git a/include/netutils/telnetc.h b/include/netutils/telnetc.h index bf8a4e8a95..d3f87a95b5 100644 --- a/include/netutils/telnetc.h +++ b/include/netutils/telnetc.h @@ -85,7 +85,7 @@ */ #ifndef __APPS_INCLUDE_NETUTILS_TELNETC_H -#define __APPS_INCLUDE_NETUTILS_TELNETC_H 1 +#define __APPS_INCLUDE_NETUTILS_TELNETC_H /**************************************************************************** * Included Files diff --git a/include/system/nxplayer.h b/include/system/nxplayer.h index 9425c3850f..3117af58dc 100644 --- a/include/system/nxplayer.h +++ b/include/system/nxplayer.h @@ -38,7 +38,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_SYSTEM_NXPLAYER_H -#define __APPS_INCLUDE_SYSTEM_NXPLAYER_H 1 +#define __APPS_INCLUDE_SYSTEM_NXPLAYER_H /**************************************************************************** * Included Files diff --git a/include/system/nxrecorder.h b/include/system/nxrecorder.h index 4b8157b5c1..69eb1f1964 100644 --- a/include/system/nxrecorder.h +++ b/include/system/nxrecorder.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_INCLUDE_SYSTEM_NXRECORDER_H -#define __APPS_INCLUDE_SYSTEM_NXRECORDER_H 1 +#define __APPS_INCLUDE_SYSTEM_NXRECORDER_H /**************************************************************************** * Included Files diff --git a/include/testing/unity_config.h b/include/testing/unity_config.h index 2c5ec6c070..329dfec43e 100644 --- a/include/testing/unity_config.h +++ b/include/testing/unity_config.h @@ -51,7 +51,7 @@ /* Exclude setjmp */ #ifdef CONFIG_TESTING_UNITY_EXCLUDE_SETJMP -# define UNITY_EXCLUDE_SETJMP_H 1 +# define UNITY_EXCLUDE_SETJMP_H #endif /* Enable output coloring */ diff --git a/interpreters/bas/bas_token.c b/interpreters/bas/bas_token.c index fe48648ca1..22fbbe5722 100644 --- a/interpreters/bas/bas_token.c +++ b/interpreters/bas/bas_token.c @@ -99,8 +99,8 @@ typedef unsigned int flex_uint32_t; #define YY_USE_CONST -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const @@ -4110,7 +4110,7 @@ static int yy_get_next_buffer (void) return c; } -#endif /* ifndef YY_NO_INPUT */ +#endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. diff --git a/modbus/nuttx/portevent_m.c b/modbus/nuttx/portevent_m.c index a5d0adada1..8e99300644 100644 --- a/modbus/nuttx/portevent_m.c +++ b/modbus/nuttx/portevent_m.c @@ -309,4 +309,4 @@ eMBMasterReqErrCode eMBMasterWaitRequestFinish(void) return eErrStatus; } -#endif /* defined(CONFIG_MB_RTU_MASTER) || defined(CONFIG_MB_ASCII_MASTER) */ +#endif /* defined(CONFIG_MB_RTU_MASTER) || defined(CONFIG_MB_ASCII_MASTER) */ diff --git a/netutils/ntpclient/ntpv3.h b/netutils/ntpclient/ntpv3.h index bedc9c7108..9330ec5b7c 100644 --- a/netutils/ntpclient/ntpv3.h +++ b/netutils/ntpclient/ntpv3.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_NETUTILS_NTPCLIENT_NTPV3_H -#define __APPS_NETUTILS_NTPCLIENT_NTPV3_H 1 +#define __APPS_NETUTILS_NTPCLIENT_NTPV3_H /**************************************************************************** * Included Files diff --git a/netutils/thttpd/config.h b/netutils/thttpd/config.h index 9d023c618c..f6ae262738 100644 --- a/netutils/thttpd/config.h +++ b/netutils/thttpd/config.h @@ -247,6 +247,6 @@ # ifdef CONFIG_CPP_HAVE_WARNING # warning "THTTPD not built because dependencies not selected in configuration" # endif -#endif /* Dependencies not provided */ +#endif /* Dependencies not provided */ #endif /* __NETUTILS_THTTPD_CONFIG_H */ diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 498b9be91e..26a619224b 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -2049,7 +2049,7 @@ static int sockaddr_check(httpd_sockaddr *saP) case AF_INET: return 1; -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv6 case AF_INET6: return 1; #endif @@ -2067,7 +2067,7 @@ static size_t sockaddr_len(httpd_sockaddr *saP) case AF_INET: return sizeof(struct sockaddr_in); -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv6 case AF_INET6: return sizeof(struct sockaddr_in6); #endif @@ -3424,7 +3424,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) char *httpd_ntoa(httpd_sockaddr *saP) { -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv6 static char str[200]; if (getnameinfo diff --git a/netutils/thttpd/libhttpd.h b/netutils/thttpd/libhttpd.h index 6ec7386410..0e1a45d217 100644 --- a/netutils/thttpd/libhttpd.h +++ b/netutils/thttpd/libhttpd.h @@ -156,7 +156,7 @@ /* A multi-family sockaddr. */ -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv6 typedef struct sockaddr_in6 httpd_sockaddr; #else typedef struct sockaddr_in httpd_sockaddr; diff --git a/netutils/thttpd/tdate_parse.h b/netutils/thttpd/tdate_parse.h index eea82d7cbd..d040195b7b 100644 --- a/netutils/thttpd/tdate_parse.h +++ b/netutils/thttpd/tdate_parse.h @@ -38,4 +38,4 @@ extern time_t tdate_parse(char *str); -#endif /* __NETUTILS_TDATE_PARSE_H */ +#endif /* __NETUTILS_TDATE_PARSE_H */ diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c index ee25783c3f..52670354d8 100644 --- a/netutils/thttpd/thttpd.c +++ b/netutils/thttpd/thttpd.c @@ -668,7 +668,7 @@ int thttpd_main(int argc, char **argv) /* Setup host address */ -#ifdef CONFIG_NET_IPv6 +#ifdef CONFIG_NET_IPv6 # error "IPv6 support not yet implemented" #else sa.sin_family = AF_INET; diff --git a/nshlib/nsh.h b/nshlib/nsh.h index d3952bcac1..27a0a567a7 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -1020,7 +1020,7 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # ifndef CONFIG_NSH_DISABLE_SH int cmd_sh(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif -#endif /* CONFIG_NFILE_STREAMS && !CONFIG_NSH_DISABLESCRIPT */ +#endif /* CONFIG_NFILE_STREAMS && !CONFIG_NSH_DISABLESCRIPT */ #ifdef NSH_HAVE_DIROPTS # ifndef CONFIG_NSH_DISABLE_MKDIR diff --git a/nshlib/nsh_timcmds.c b/nshlib/nsh_timcmds.c index 899fbc0769..88f044f8ec 100644 --- a/nshlib/nsh_timcmds.c +++ b/nshlib/nsh_timcmds.c @@ -67,7 +67,7 @@ * Private Data ****************************************************************************/ -#ifndef CONFIG_NSH_DISABLE_DATE +#ifndef CONFIG_NSH_DISABLE_DATE static FAR const char * const g_datemontab[] = { "jan", "feb", "mar", "apr", "may", "jun", diff --git a/platform/mikroe-stm32f4/mikroe_configdata.c b/platform/mikroe-stm32f4/mikroe_configdata.c index ce3d4e5d1d..de9fd7ec5e 100644 --- a/platform/mikroe-stm32f4/mikroe_configdata.c +++ b/platform/mikroe-stm32f4/mikroe_configdata.c @@ -155,7 +155,7 @@ int platform_setconfig(enum config_data_e id, int instance, #else break; -#endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM */ +#endif /* CONFIG_MIKROE_STM32F4_CONFIGDATA_ROM */ default: break; diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index ba3c6c1c14..fce6dab8ed 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -356,10 +356,10 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pplayer, int format, dirp = opendir("/dev"); #else dirp = opendir(CONFIG_AUDIO_DEV_PATH); -#endif /* CONFIG_AUDIO_DEV_ROOT */ +#endif /* CONFIG_AUDIO_DEV_ROOT */ #else dirp = opendir("/dev/audio"); -#endif /* CONFIG_AUDIO_CUSTOM_DEV_PATH */ +#endif /* CONFIG_AUDIO_CUSTOM_DEV_PATH */ if (dirp == NULL) { int errcode = errno; @@ -382,10 +382,10 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pplayer, int format, #else snprintf(path, sizeof(path), CONFIG_AUDIO_DEV_PATH "/%s", pDevice->d_name); -#endif /* CONFIG_AUDIO_DEV_ROOT */ +#endif /* CONFIG_AUDIO_DEV_ROOT */ #else snprintf(path, sizeof(path), "/dev/audio/%s", pDevice->d_name); -#endif /* CONFIG_AUDIO_CUSTOM_DEV_PATH */ +#endif /* CONFIG_AUDIO_CUSTOM_DEV_PATH */ if ((pplayer->devFd = open(path, O_RDWR)) != -1) { @@ -473,7 +473,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pplayer, int format, closedir(dirp); } -#endif /* CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH */ +#endif /* CONFIG_NXPLAYER_INCLUDE_DEVICE_SEARCH */ /* Device not found */ @@ -585,7 +585,7 @@ static inline int nxplayer_fmtfromextension(FAR struct nxplayer_s *pplayer, return AUDIO_FMT_UNDEF; } -#endif /* CONFIG_NXPLAYER_FMT_FROM_EXT */ +#endif /* CONFIG_NXPLAYER_FMT_FROM_EXT */ /**************************************************************************** * Name: nxplayer_fmtfromheader @@ -1282,7 +1282,7 @@ int nxplayer_setvolume(FAR struct nxplayer_s *pplayer, uint16_t volume) return OK; } -#endif /* CONFIG_AUDIO_EXCLUDE_VOLUME */ +#endif /* CONFIG_AUDIO_EXCLUDE_VOLUME */ /**************************************************************************** * Name: nxplayer_setequalization @@ -1492,7 +1492,7 @@ int nxplayer_pause(FAR struct nxplayer_s *pplayer) return ret; } -#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ +#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ /**************************************************************************** * Name: nxplayer_resume @@ -1522,7 +1522,7 @@ int nxplayer_resume(FAR struct nxplayer_s *pplayer) return ret; } -#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ +#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ /**************************************************************************** * Name: nxplayer_fforward @@ -1740,7 +1740,7 @@ int nxplayer_setdevice(FAR struct nxplayer_s *pplayer, return OK; } -#endif /* CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE */ +#endif /* CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE */ /**************************************************************************** * Name: nxplayer_stop @@ -1786,7 +1786,7 @@ int nxplayer_stop(FAR struct nxplayer_s *pplayer) return OK; } -#endif /* CONFIG_AUDIO_EXCLUDE_STOP */ +#endif /* CONFIG_AUDIO_EXCLUDE_STOP */ /**************************************************************************** * Name: nxplayer_playinternal @@ -1870,14 +1870,14 @@ static int nxplayer_playinternal(FAR struct nxplayer_s *pplayer, #else auderr("ERROR: Could not open %s or %s\n", pFilename, path); return -ENOENT; -#endif /* CONFIG_NXPLAYER_MEDIA_SEARCH */ +#endif /* CONFIG_NXPLAYER_MEDIA_SEARCH */ } #else /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */ auderr("ERROR: Could not open %s\n", pFilename); return -ENOENT; -#endif /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */ +#endif /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */ } #ifdef CONFIG_NXPLAYER_FMT_FROM_EXT @@ -2398,4 +2398,4 @@ int nxplayer_systemreset(FAR struct nxplayer_s *pplayer) pplayer->devFd = -1; return OK; } -#endif /* CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET */ +#endif /* CONFIG_NXPLAYER_INCLUDE_SYSTEM_RESET */ diff --git a/system/nxplayer/nxplayer_main.c b/system/nxplayer/nxplayer_main.c index 5cd884ce60..b5041efd3b 100644 --- a/system/nxplayer/nxplayer_main.c +++ b/system/nxplayer/nxplayer_main.c @@ -564,7 +564,7 @@ static int nxplayer_cmd_device(FAR struct nxplayer_s *pPlayer, char *parg) return OK; } -#endif /* CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE */ +#endif /* CONFIG_NXPLAYER_INCLUDE_PREFERRED_DEVICE */ /**************************************************************************** * Name: nxplayer_cmd_quit diff --git a/system/nxrecorder/nxrecorder.c b/system/nxrecorder/nxrecorder.c index 7d72e5654a..6f209ec419 100644 --- a/system/nxrecorder/nxrecorder.c +++ b/system/nxrecorder/nxrecorder.c @@ -676,7 +676,7 @@ int nxrecorder_pause(FAR struct nxrecorder_s *precorder) return ret; } -#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ +#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ /**************************************************************************** * Name: nxrecorder_resume @@ -706,7 +706,7 @@ int nxrecorder_resume(FAR struct nxrecorder_s *precorder) return ret; } -#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ +#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */ /**************************************************************************** * Name: nxrecorder_setdevice @@ -787,7 +787,7 @@ int nxrecorder_stop(FAR struct nxrecorder_s *precorder) return OK; } -#endif /* CONFIG_AUDIO_EXCLUDE_STOP */ +#endif /* CONFIG_AUDIO_EXCLUDE_STOP */ /**************************************************************************** * Name: nxrecorder_recordraw diff --git a/system/readline/readline.h b/system/readline/readline.h index 3a56990f85..020a4bd952 100644 --- a/system/readline/readline.h +++ b/system/readline/readline.h @@ -34,7 +34,7 @@ ****************************************************************************/ #ifndef __APPS_SYSTEM_READLINE_READLINE_H -#define __APPS_SYSTEM_READLINE_READLINE_H 1 +#define __APPS_SYSTEM_READLINE_READLINE_H /**************************************************************************** * Included Files diff --git a/system/termcurses/tcurses_vt100.c b/system/termcurses/tcurses_vt100.c index e0e4aeca4f..f18a276a55 100644 --- a/system/termcurses/tcurses_vt100.c +++ b/system/termcurses/tcurses_vt100.c @@ -365,7 +365,7 @@ static const struct keycodes_s g_ctrl_keycodes[] = { TINFO_ENTRY(NULL, NULL, -1 ) } }; -#endif /* CONFIG_SYSTEM_TERMCURSES_VT100_OSX_ALT_CODES */ +#endif /* CONFIG_SYSTEM_TERMCURSES_VT100_OSX_ALT_CODES */ /************************************************************************************ * Public Data diff --git a/system/vi/vi.c b/system/vi/vi.c index ebf3a012dd..64f6aa4223 100644 --- a/system/vi/vi.c +++ b/system/vi/vi.c @@ -3351,7 +3351,7 @@ static void vi_bottom_line_debug(FAR struct vi_s *vi) vi_putch(vi, '"'); } -#endif /* ENABLE_BOTTOM_LINE_DEBUG */ +#endif /* ENABLE_BOTTOM_LINE_DEBUG */ /**************************************************************************** * Name: vi_findnext @@ -3439,7 +3439,7 @@ static void vi_saverepeat(FAR struct vi_s *vi, uint16_t ch) vi->repeatvalue = vi->value; } } -#endif /* CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT */ +#endif /* CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT */ /**************************************************************************** * Name: vi_appendrepeat @@ -3466,7 +3466,7 @@ static void vi_appendrepeat(FAR struct vi_s *vi, uint16_t ch) vi->cmdbuf[vi->cmdcount++] = ch; } } -#endif /* CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT */ +#endif /* CONFIG_SYSTEM_VI_INCLUDE_COMMAND_REPEAT */ /**************************************************************************** * Name: vi_cmd_mode