diff --git a/examples/nx/nx_internal.h b/examples/nx/nx_internal.h index 206443a6b..b94772846 100644 --- a/examples/nx/nx_internal.h +++ b/examples/nx/nx_internal.h @@ -60,7 +60,7 @@ # define CONFIG_EXAMPLES_NX_BGCOLOR 0x7b5d # else # define CONFIG_EXAMPLES_NX_BGCOLOR ' ' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_NX_COLOR1 @@ -70,7 +70,7 @@ # define CONFIG_EXAMPLES_NX_COLOR1 0xe73f # else # define CONFIG_EXAMPLES_NX_COLOR1 '1' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_NX_COLOR2 @@ -80,7 +80,7 @@ # define CONFIG_EXAMPLES_NX_COLOR2 0xdefb # else # define CONFIG_EXAMPLES_NX_COLOR2 '2' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_NX_TBCOLOR diff --git a/examples/nxdemo/nxdemo.h b/examples/nxdemo/nxdemo.h index 696526967..190d9efa4 100644 --- a/examples/nxdemo/nxdemo.h +++ b/examples/nxdemo/nxdemo.h @@ -61,7 +61,7 @@ # define CONFIG_EXAMPLES_NXDEMO_BGCOLOR 0x00 # else # define CONFIG_EXAMPLES_NXDEMO_BGCOLOR ' ' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_NXDEMO_DRAWCOLOR diff --git a/examples/nxhello/nxhello.h b/examples/nxhello/nxhello.h index b0a3628ef..87e2ee466 100644 --- a/examples/nxhello/nxhello.h +++ b/examples/nxhello/nxhello.h @@ -60,7 +60,7 @@ # define CONFIG_EXAMPLES_NXHELLO_BGCOLOR 0x00 # else # define CONFIG_EXAMPLES_NXHELLO_BGCOLOR ' ' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_NXHELLO_FONTID diff --git a/examples/nxterm/nxterm_internal.h b/examples/nxterm/nxterm_internal.h index d22188798..7a959950a 100644 --- a/examples/nxterm/nxterm_internal.h +++ b/examples/nxterm/nxterm_internal.h @@ -110,7 +110,7 @@ # define CONFIG_EXAMPLES_NXTERM_BGCOLOR RGBTO16(39, 64, 139) # else # define CONFIG_EXAMPLES_NXTERM_BGCOLOR RGBTO8(39, 64, 139) -# endif +# endif #endif /* Window color (lighter steel blue) */ @@ -122,7 +122,7 @@ # define CONFIG_EXAMPLES_NXTERM_WCOLOR RGBTO16(202, 225, 255) # else # define CONFIG_EXAMPLES_NXTERM_WCOLOR RGBTO8(202, 225, 255) -# endif +# endif #endif /* Toolbar color (medium grey) */ diff --git a/examples/nxtext/nxtext_internal.h b/examples/nxtext/nxtext_internal.h index af271acef..45652a852 100644 --- a/examples/nxtext/nxtext_internal.h +++ b/examples/nxtext/nxtext_internal.h @@ -87,7 +87,7 @@ # define CONFIG_EXAMPLES_NXTEXT_BGCOLOR 0x7b5d # else # define CONFIG_EXAMPLES_NXTEXT_BGCOLOR ' ' -# endif +# endif #endif /* Pop-up font ID */ @@ -105,7 +105,7 @@ # define CONFIG_EXAMPLES_NXTEXT_PUCOLOR 0xdefb # else # define CONFIG_EXAMPLES_NXTEXT_PUCOLOR '2' -# endif +# endif #endif /* Background font ID */ diff --git a/examples/pwfb/pwfb_internal.h b/examples/pwfb/pwfb_internal.h index 3890d7acb..c29e2da8d 100644 --- a/examples/pwfb/pwfb_internal.h +++ b/examples/pwfb/pwfb_internal.h @@ -89,7 +89,7 @@ # define CONFIG_EXAMPLES_PWFB_BGCOLOR 0x7b5d # else # define CONFIG_EXAMPLES_PWFB_BGCOLOR ' ' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWFB_COLOR1 @@ -99,7 +99,7 @@ # define CONFIG_EXAMPLES_PWFB_COLOR1 0xe73f # else # define CONFIG_EXAMPLES_PWFB_COLOR1 '1' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWFB_COLOR2 @@ -109,7 +109,7 @@ # define CONFIG_EXAMPLES_PWFB_COLOR2 0xdefb # else # define CONFIG_EXAMPLES_PWFB_COLOR2 '2' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWFB_COLOR3 @@ -119,7 +119,7 @@ # define CONFIG_EXAMPLES_PWFB_COLOR2 0xff76 # else # define CONFIG_EXAMPLES_PWFB_COLOR2 '3' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWFB_TBCOLOR diff --git a/examples/pwlines/pwlines_internal.h b/examples/pwlines/pwlines_internal.h index ffc23ec87..91f188dcd 100644 --- a/examples/pwlines/pwlines_internal.h +++ b/examples/pwlines/pwlines_internal.h @@ -81,7 +81,7 @@ # define CONFIG_EXAMPLES_PWLINES_BGCOLOR 0x7b5d # else # define CONFIG_EXAMPLES_PWLINES_BGCOLOR ' ' -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWLINES_COLOR1 @@ -91,7 +91,7 @@ # define CONFIG_EXAMPLES_PWLINES_COLOR1 RGB16_DARKGREEN # else # define CONFIG_EXAMPLES_PWLINES_COLOR1 RGB8_DARKGREEN -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWLINES_COLOR2 @@ -101,7 +101,7 @@ # define CONFIG_EXAMPLES_PWLINES_COLOR2 RGB16_GREEN # else # define CONFIG_EXAMPLES_PWLINES_COLOR2 RGB8_GREEN -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWLINES_COLOR3 @@ -111,7 +111,7 @@ # define CONFIG_EXAMPLES_PWLINES_COLOR3 RGB16_LIGHTGREEN # else # define CONFIG_EXAMPLES_PWLINES_COLOR3 RGB8_LIGHTGREEN -# endif +# endif #endif #ifndef CONFIG_EXAMPLES_PWLINES_BORDERWIDTH diff --git a/fsutils/mkfatfs/fat32.h b/fsutils/mkfatfs/fat32.h index d70b12301..c017c93bf 100644 --- a/fsutils/mkfatfs/fat32.h +++ b/fsutils/mkfatfs/fat32.h @@ -266,39 +266,39 @@ /* Sizes and limits */ -# ifndef CONFIG_FAT_MAXFNAME /* The maximum support filename can be limited */ -# define LDIR_MAXFNAME 255 /* Max unicode characters in file name */ -# elif CONFIG_FAT_MAXFNAME <= 255 -# define LDIR_MAXFNAME CONFIG_FAT_MAXFNAME -# else -# error "Illegal value for CONFIG_FAT_MAXFNAME" -# endif +# ifndef CONFIG_FAT_MAXFNAME /* The maximum support filename can be limited */ +# define LDIR_MAXFNAME 255 /* Max unicode characters in file name */ +# elif CONFIG_FAT_MAXFNAME <= 255 +# define LDIR_MAXFNAME CONFIG_FAT_MAXFNAME +# else +# error "Illegal value for CONFIG_FAT_MAXFNAME" +# endif -# define LDIR_MAXLFNCHARS 13 /* Max unicode characters in one LFN entry */ -# define LDIR_MAXLFNS 20 /* Max number of LFN entries */ +# define LDIR_MAXLFNCHARS 13 /* Max unicode characters in one LFN entry */ +# define LDIR_MAXLFNS 20 /* Max number of LFN entries */ /* LFN directory entry offsets */ -# define LDIR_SEQ 0 /* 1@ 0: Sequence number */ -# define LDIR_WCHAR1_5 1 /* 10@ 1: File name characters 1-5 (5 Unicode characters) */ -# define LDIR_ATTRIBUTES 11 /* 1@11: File attributes (always 0x0f) */ -# define LDIR_NTRES 12 /* 1@12: Reserved for use by NT (always 0x00) */ -# define LDIR_CHECKSUM 13 /* 1@13: Checksum of the DOS filename */ -# define LDIR_WCHAR6_11 14 /* 12@14: File name characters 6-11 (6 Unicode characters) */ -# define LDIR_FSTCLUSTLO 26 /* 2@26: First cluster (always 0x0000) */ -# define LDIR_WCHAR12_13 28 /* 4@28: File name characters 12-13 (2 Unicode characters) */ +# define LDIR_SEQ 0 /* 1@ 0: Sequence number */ +# define LDIR_WCHAR1_5 1 /* 10@ 1: File name characters 1-5 (5 Unicode characters) */ +# define LDIR_ATTRIBUTES 11 /* 1@11: File attributes (always 0x0f) */ +# define LDIR_NTRES 12 /* 1@12: Reserved for use by NT (always 0x00) */ +# define LDIR_CHECKSUM 13 /* 1@13: Checksum of the DOS filename */ +# define LDIR_WCHAR6_11 14 /* 12@14: File name characters 6-11 (6 Unicode characters) */ +# define LDIR_FSTCLUSTLO 26 /* 2@26: First cluster (always 0x0000) */ +# define LDIR_WCHAR12_13 28 /* 4@28: File name characters 12-13 (2 Unicode characters) */ /* LFN sequence number and allocation status */ -# define LDIR0_EMPTY DIR0_EMPTY /* The directory entry is empty */ -# define LDIR0_ALLEMPTY DIR0_ALLEMPTY /* This entry and all following are empty */ -# define LDIR0_E5 DIR0_E5 /* The actual value is 0xe5 */ -# define LDIR0_LAST 0x40 /* Last LFN in file name (appears first) */ -# define LDIR0_SEQ_MASK 0x1f /* Mask for sequence number (1-20) */ +# define LDIR0_EMPTY DIR0_EMPTY /* The directory entry is empty */ +# define LDIR0_ALLEMPTY DIR0_ALLEMPTY /* This entry and all following are empty */ +# define LDIR0_E5 DIR0_E5 /* The actual value is 0xe5 */ +# define LDIR0_LAST 0x40 /* Last LFN in file name (appears first) */ +# define LDIR0_SEQ_MASK 0x1f /* Mask for sequence number (1-20) */ /* The LFN entry attribute */ -# define LDDIR_LFNATTR 0x0f +# define LDDIR_LFNATTR 0x0f #endif /* File system types */ @@ -453,10 +453,10 @@ #define DIR_PUTCRTTIMETENTH(p,v) UBYTE_PUT(p,DIR_CRTTIMETENTH,v) #ifdef CONFIG_FAT_LFN -# define LDIR_PUTSEQ(p,v) UBYTE_PUT(p,LDIR_SEQ,v) -# define LDIR_PUTATTRIBUTES(p,v) UBYTE_PUT(p,LDIR_ATTRIBUTES,v) -# define LDIR_PUTNTRES(p,v) UBYTE_PUT(p,LDIR_NTRES,v) -# define LDIR_PUTCHECKSUM(p,v) UBYTE_PUT(p,LDIR_CHECKSUM,v) +# define LDIR_PUTSEQ(p,v) UBYTE_PUT(p,LDIR_SEQ,v) +# define LDIR_PUTATTRIBUTES(p,v) UBYTE_PUT(p,LDIR_ATTRIBUTES,v) +# define LDIR_PUTNTRES(p,v) UBYTE_PUT(p,LDIR_NTRES,v) +# define LDIR_PUTCHECKSUM(p,v) UBYTE_PUT(p,LDIR_CHECKSUM,v) #endif /* For the all targets, unaligned values need to be accessed byte-by-byte. @@ -490,9 +490,9 @@ #define PART4_PUTSIZE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,PART_ENTRY4+PART_SIZE),v) #ifdef CONFIG_FAT_LFN -# define LDIR_PTRWCHAR1_5(p) UBYTE_PTR(p,LDIR_WCHAR1_5) -# define LDIR_PTRWCHAR6_11(p) UBYTE_PTR(p,LDIR_WCHAR6_11) -# define LDIR_PTRWCHAR12_13(p) UBYTE_PTR(p,LDIR_WCHAR12_13) +# define LDIR_PTRWCHAR1_5(p) UBYTE_PTR(p,LDIR_WCHAR1_5) +# define LDIR_PTRWCHAR6_11(p) UBYTE_PTR(p,LDIR_WCHAR6_11) +# define LDIR_PTRWCHAR12_13(p) UBYTE_PTR(p,LDIR_WCHAR12_13) #endif /* But for multi-byte values, the endian-ness of the target vs. the little @@ -549,21 +549,21 @@ # define DIR_PUTFSTCLUSTLO(p,v) FAT_PUTUINT16(UBYTE_PTR(p,DIR_FSTCLUSTLO),v) # define DIR_PUTFILESIZE(p,v) FAT_PUTUINT32(UBYTE_PTR(p,DIR_FILESIZE),v) -# ifdef CONFIG_FAT_LFN -# define LDIR_PUTWCHAR1(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5),v) -# define LDIR_PUTWCHAR2(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+2),v) -# define LDIR_PUTWCHAR3(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+4),v) -# define LDIR_PUTWCHAR4(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+6),v) -# define LDIR_PUTWCHAR5(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+8),v) -# define LDIR_PUTWCHAR6(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11),v) -# define LDIR_PUTWCHAR7(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+2),v) -# define LDIR_PUTWCHAR8(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+4),v) -# define LDIR_PUTWCHAR9(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+6),v) -# define LDIR_PUTWCHAR10(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+8),v) -# define LDIR_PUTWCHAR11(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+10),v) -# define LDIR_PUTWCHAR12(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR12_13),v) -# define LDIR_PUTWCHAR13(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR12_13+2),v) -# endif +# ifdef CONFIG_FAT_LFN +# define LDIR_PUTWCHAR1(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5),v) +# define LDIR_PUTWCHAR2(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+2),v) +# define LDIR_PUTWCHAR3(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+4),v) +# define LDIR_PUTWCHAR4(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+6),v) +# define LDIR_PUTWCHAR5(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR1_5+8),v) +# define LDIR_PUTWCHAR6(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11),v) +# define LDIR_PUTWCHAR7(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+2),v) +# define LDIR_PUTWCHAR8(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+4),v) +# define LDIR_PUTWCHAR9(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+6),v) +# define LDIR_PUTWCHAR10(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+8),v) +# define LDIR_PUTWCHAR11(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR6_11+10),v) +# define LDIR_PUTWCHAR12(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR12_13),v) +# define LDIR_PUTWCHAR13(p) FAT_PUTUINT16(UBYTE_PTR(p,LDIR_WCHAR12_13+2),v) +# endif # define FSI_PUTLEADSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_LEADSIG),v) # define FSI_PUTSTRUCTSIG(p,v) FAT_PUTUINT32(UBYTE_PTR(p,FSI_STRUCTSIG),v) @@ -624,20 +624,20 @@ # define DIR_PUTFILESIZE(p,v) UINT32_PUT(p,DIR_FILESIZE,v) # ifdef CONFIG_FAT_LFN -# define LDIR_PUTWCHAR1(p,v) UINT16_PUT(p,LDIR_WCHAR1_5,v) -# define LDIR_PUTWCHAR2(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+2,v) -# define LDIR_PUTWCHAR3(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+4,v) -# define LDIR_PUTWCHAR4(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+6,v) -# define LDIR_PUTWCHAR5(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+8,v) -# define LDIR_PUTWCHAR6(p,v) UINT16_PUT(p,LDIR_WCHAR6_11,v) -# define LDIR_PUTWCHAR7(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+2,v) -# define LDIR_PUTWCHAR8(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+4,v) -# define LDIR_PUTWCHAR9(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+6,v) -# define LDIR_PUTWCHAR10(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+8,v) -# define LDIR_PUTWCHAR11(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+10,v) -# define LDIR_PUTWCHAR12(p,v) UINT16_PUT(p,LDIR_WCHAR12_13,v) -# define LDIR_PUTWCHAR13(p,v) UINT16_PUT(p,LDIR_WCHAR12_13+2,v) -# endif +# define LDIR_PUTWCHAR1(p,v) UINT16_PUT(p,LDIR_WCHAR1_5,v) +# define LDIR_PUTWCHAR2(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+2,v) +# define LDIR_PUTWCHAR3(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+4,v) +# define LDIR_PUTWCHAR4(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+6,v) +# define LDIR_PUTWCHAR5(p,v) UINT16_PUT(p,LDIR_WCHAR1_5+8,v) +# define LDIR_PUTWCHAR6(p,v) UINT16_PUT(p,LDIR_WCHAR6_11,v) +# define LDIR_PUTWCHAR7(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+2,v) +# define LDIR_PUTWCHAR8(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+4,v) +# define LDIR_PUTWCHAR9(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+6,v) +# define LDIR_PUTWCHAR10(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+8,v) +# define LDIR_PUTWCHAR11(p,v) UINT16_PUT(p,LDIR_WCHAR6_11+10,v) +# define LDIR_PUTWCHAR12(p,v) UINT16_PUT(p,LDIR_WCHAR12_13,v) +# define LDIR_PUTWCHAR13(p,v) UINT16_PUT(p,LDIR_WCHAR12_13+2,v) +# endif # define FSI_PUTLEADSIG(p,v) UINT32_PUT(p,FSI_LEADSIG,v) # define FSI_PUTSTRUCTSIG(p,v) UINT32_PUT(p,FSI_STRUCTSIG,v) diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 37a6d5d90..905ca0cde 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -1025,7 +1025,7 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv); # ifndef CONFIG_NSH_DISABLE_RMDIR int cmd_rmdir(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv); # endif -# endif /* NSH_HAVE_DIROPTS */ +#endif /* NSH_HAVE_DIROPTS */ #ifndef CONFIG_DISABLE_MOUNTPOINT # if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP) diff --git a/nshlib/nsh_command.c b/nshlib/nsh_command.c index 930e7f8a0..c08ee0912 100644 --- a/nshlib/nsh_command.c +++ b/nshlib/nsh_command.c @@ -143,9 +143,9 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_DISABLE_ENVIRON -# ifndef CONFIG_NSH_DISABLE_CD +# ifndef CONFIG_NSH_DISABLE_CD { "cd", cmd_cd, 1, 2, "[|-|~|..]" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_CP @@ -168,7 +168,7 @@ static const struct cmdmap_s g_cmdmap[] = { "dd", cmd_dd, 3, 7, "if= of= [bs=] [count=] " "[skip=] [verify]" }, -# endif +#endif #if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_DELROUTE) { "delroute", cmd_delroute, 2, 3, " []" }, @@ -189,13 +189,13 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_NSH_DISABLE_ECHO -# ifndef CONFIG_DISABLE_ENVIRON +# ifndef CONFIG_DISABLE_ENVIRON { "echo", cmd_echo, 1, CONFIG_NSH_MAXARGUMENTS, "[-n] [ [...]]" }, -# else +# else { "echo", cmd_echo, 1, CONFIG_NSH_MAXARGUMENTS, "[-n] [ [...]]" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_ENV @@ -223,25 +223,25 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef CONFIG_DEBUG_MM -# ifndef CONFIG_NSH_DISABLE_MEMDUMP +# ifndef CONFIG_NSH_DISABLE_MEMDUMP { "memdump", cmd_memdump, 1, 4, "[pid/used/free/on/off]" " "}, -# endif +# endif #endif #ifdef CONFIG_NET_UDP -# ifndef CONFIG_NSH_DISABLE_GET +# ifndef CONFIG_NSH_DISABLE_GET { "get", cmd_get, 4, 7, "[-b|-n] [-f ] -h " }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_HELP -# ifdef CONFIG_NSH_HELP_TERSE +# ifdef CONFIG_NSH_HELP_TERSE { "help", cmd_help, 1, 2, "[]" }, -#else +# else { "help", cmd_help, 1, 3, "[-v] []" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_HEXDUMP @@ -254,16 +254,16 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef CONFIG_NET -# ifndef CONFIG_NSH_DISABLE_IFCONFIG +# ifndef CONFIG_NSH_DISABLE_IFCONFIG { "ifconfig", cmd_ifconfig, 1, 12, "[interface [address_family] [mtu ] | [|dhcp]]" "[dr|gw|gateway ] [netmask |prefixlen ] " "[dns ] [hw ]" }, -# endif -# ifndef CONFIG_NSH_DISABLE_IFUPDOWN +# endif +# ifndef CONFIG_NSH_DISABLE_IFUPDOWN { "ifdown", cmd_ifdown, 2, 2, "" }, { "ifup", cmd_ifup, 2, 2, "" }, -# endif +# endif #endif #if defined(CONFIG_MODULE) && !defined(CONFIG_NSH_DISABLE_MODCMDS) @@ -279,27 +279,27 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_DISABLE_MOUNTPOINT -# if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP) +# if defined(CONFIG_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSETUP) { "losetup", cmd_losetup, 3, 6, "[-d ] | [[-o ] [-r] [-s ] " " ]" }, -# endif +# endif #endif #ifndef CONFIG_DISABLE_MOUNTPOINT -# if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART) +# if defined(CONFIG_SMART_DEV_LOOP) && !defined(CONFIG_NSH_DISABLE_LOSMART) { "losmart", cmd_losmart, 2, 11, "[-d ] | [[-m ] [-o ] [-e ] " "[-s ] [-r] ]" }, -# endif +# endif #endif #ifndef CONFIG_DISABLE_MOUNTPOINT -# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD) +# if defined(CONFIG_MTD_LOOP) && !defined(CONFIG_NSH_DISABLE_LOMTD) { "lomtd", cmd_lomtd, 3, 9, "[-d ] | [[-o ] [-e ] " "[-s ] ]]" }, -# endif +# endif #endif #if !defined(CONFIG_NSH_DISABLE_LN) && defined(CONFIG_PSEUDOFS_SOFTLINKS) @@ -311,9 +311,9 @@ static const struct cmdmap_s g_cmdmap[] = #endif #if defined(CONFIG_MODULE) && !defined(CONFIG_NSH_DISABLE_MODCMDS) -#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MODULE) +# if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_MODULE) { "lsmod", cmd_lsmod, 1, 1, NULL }, -#endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_MB @@ -328,23 +328,23 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef NSH_HAVE_DIROPTS -# ifndef CONFIG_NSH_DISABLE_MKDIR +# ifndef CONFIG_NSH_DISABLE_MKDIR { "mkdir", cmd_mkdir, 2, 3, "[-p] " }, -# endif +# endif #endif #if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FSUTILS_MKFATFS) -# ifndef CONFIG_NSH_DISABLE_MKFATFS +# ifndef CONFIG_NSH_DISABLE_MKFATFS { "mkfatfs", cmd_mkfatfs, 2, 6, "[-F ] [-r ] " }, -# endif +# endif #endif #ifndef CONFIG_DISABLE_MOUNTPOINT -# if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0 && \ +# if defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE > 0 && \ !defined(CONFIG_NSH_DISABLE_MKFIFO) { "mkfifo", cmd_mkfifo, 2, 2, "" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_MKRD @@ -354,14 +354,14 @@ static const struct cmdmap_s g_cmdmap[] = #if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_SMARTFS) && \ defined(CONFIG_FSUTILS_MKSMARTFS) -# ifndef CONFIG_NSH_DISABLE_MKSMARTFS -# ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS +# ifndef CONFIG_NSH_DISABLE_MKSMARTFS +# ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS { "mksmartfs", cmd_mksmartfs, 2, 6, "[-s ] [-f] []" }, -# else +# else { "mksmartfs", cmd_mksmartfs, 2, 5, "[-s ] [-f] " }, +# endif # endif -# endif #endif #ifndef CONFIG_NSH_DISABLE_MH @@ -370,15 +370,15 @@ static const struct cmdmap_s g_cmdmap[] = #endif #if !defined(CONFIG_DISABLE_MOUNTPOINT) -#ifndef CONFIG_NSH_DISABLE_MOUNT -#if defined(NSH_HAVE_CATFILE) && defined(HAVE_MOUNT_LIST) +# ifndef CONFIG_NSH_DISABLE_MOUNT +# if defined(NSH_HAVE_CATFILE) && defined(HAVE_MOUNT_LIST) { "mount", cmd_mount, 1, 7, "[-t [-o ] [] ]" }, -#else +# else { "mount", cmd_mount, 4, 7, "-t [-o ] [] " }, -#endif -#endif +# endif +# endif #endif #ifdef NSH_HAVE_DIROPTS @@ -422,13 +422,13 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_NSH_DISABLE_PRINTF -# ifndef CONFIG_DISABLE_ENVIRON +# ifndef CONFIG_DISABLE_ENVIRON { "printf", cmd_printf, 1, CONFIG_NSH_MAXARGUMENTS, "[\\xNN] [\\n\\r\\t] [ [...]]" }, -# else +# else { "printf", cmd_printf, 1, CONFIG_NSH_MAXARGUMENTS, "[\\xNN] [\\n\\r\\t] [ [...]]" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_PS @@ -436,16 +436,16 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef CONFIG_NET_UDP -# ifndef CONFIG_NSH_DISABLE_PUT +# ifndef CONFIG_NSH_DISABLE_PUT { "put", cmd_put, 4, 7, "[-b|-n] [-f ] -h " }, -# endif +# endif #endif #ifndef CONFIG_DISABLE_ENVIRON -# ifndef CONFIG_NSH_DISABLE_PWD +# ifndef CONFIG_NSH_DISABLE_PWD { "pwd", cmd_pwd, 1, 1, NULL }, -# endif +# endif #endif #if !defined(CONFIG_NSH_DISABLE_READLINK) && defined(CONFIG_PSEUDOFS_SOFTLINKS) @@ -461,15 +461,15 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef NSH_HAVE_DIROPTS -# ifndef CONFIG_NSH_DISABLE_RM +# ifndef CONFIG_NSH_DISABLE_RM { "rm", cmd_rm, 2, 3, "[-r] " }, -# endif +# endif #endif #ifdef NSH_HAVE_DIROPTS -# ifndef CONFIG_NSH_DISABLE_RMDIR +# ifndef CONFIG_NSH_DISABLE_RMDIR { "rmdir", cmd_rmdir, 2, 2, "" }, -# endif +# endif #endif #if defined(CONFIG_MODULE) && !defined(CONFIG_NSH_DISABLE_MODCMDS) @@ -551,23 +551,23 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifndef CONFIG_DISABLE_MOUNTPOINT -# ifndef CONFIG_NSH_DISABLE_TRUNCATE +# ifndef CONFIG_NSH_DISABLE_TRUNCATE { "truncate", cmd_truncate, 4, 4, "-s " }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_UNAME -#ifdef CONFIG_NET +# ifdef CONFIG_NET { "uname", cmd_uname, 1, 7, "[-a | -imnoprsv]" }, -#else +# else { "uname", cmd_uname, 1, 7, "[-a | -imoprsv]" }, -#endif +# endif #endif #if !defined(CONFIG_DISABLE_MOUNTPOINT) -# ifndef CONFIG_NSH_DISABLE_UMOUNT +# ifndef CONFIG_NSH_DISABLE_UMOUNT { "umount", cmd_umount, 2, 2, "" }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_UNSET @@ -603,9 +603,9 @@ static const struct cmdmap_s g_cmdmap[] = #endif #ifdef CONFIG_NET_TCP -# ifndef CONFIG_NSH_DISABLE_WGET +# ifndef CONFIG_NSH_DISABLE_WGET { "wget", cmd_wget, 2, 4, "[-o ] " }, -# endif +# endif #endif #ifndef CONFIG_NSH_DISABLE_XD diff --git a/nshlib/nsh_session.c b/nshlib/nsh_session.c index 4c254ddde..8327df7c2 100644 --- a/nshlib/nsh_session.c +++ b/nshlib/nsh_session.c @@ -108,16 +108,16 @@ int nsh_session(FAR struct console_stdio_s *pstate, write(OUTFD(pstate), g_nshgreeting, strlen(g_nshgreeting)); #ifdef CONFIG_NSH_MOTD -# ifdef CONFIG_NSH_PLATFORM_MOTD +# ifdef CONFIG_NSH_PLATFORM_MOTD /* Output the platform message of the day */ platform_motd(vtbl->iobuffer, IOBUFFERSIZE); dprintf(OUTFD(pstate), "%s\n", vtbl->iobuffer); -# else +# else /* Output the fixed message of the day */ dprintf(OUTFD(pstate), "%s\n", g_nshmotd); -# endif +# endif #endif /* Execute the login script */ diff --git a/system/zmodem/host/nuttx/compiler.h b/system/zmodem/host/nuttx/compiler.h index b02adcd5c..b8b42b9bb 100644 --- a/system/zmodem/host/nuttx/compiler.h +++ b/system/zmodem/host/nuttx/compiler.h @@ -53,18 +53,18 @@ * unnecessary "weak" functions can be excluded from the link. */ -# ifndef __CYGWIN__ +#ifndef __CYGWIN__ # define CONFIG_HAVE_WEAKFUNCTIONS 1 # define weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); # define weak_function __attribute__ ((weak)) # define weak_const_function __attribute__ ((weak, __const__)) -# else +#else # undef CONFIG_HAVE_WEAKFUNCTIONS # define weak_alias(name, aliasname) # define weak_function # define weak_const_function -# endif +#endif /* The noreturn attribute informs GCC that the function will not return. */ @@ -131,18 +131,18 @@ # undef CONFIG_PTR_IS_NOT_INT #elif defined(__AVR__) -# if defined(CONFIG_AVR_HAS_MEMX_PTR) +# if defined(CONFIG_AVR_HAS_MEMX_PTR) /* I-space access qualifiers needed by Harvard architecture */ -# define IOBJ __flash -# define IPTR __memx +# define IOBJ __flash +# define IPTR __memx -# else +# else /* No I-space access qualifiers */ -# define IOBJ -# define IPTR -# endif +# define IOBJ +# define IPTR +# endif /* Select the small, 16-bit addressing model (for D-Space) */ @@ -177,23 +177,23 @@ * then an integer is 32-bits. GCC will defined __INT__ accordingly: */ -# if __INT__ == 16 +# if __INT__ == 16 /* int is 16-bits, long is 32-bits */ -# define CONFIG_LONG_IS_NOT_INT 1 +# define CONFIG_LONG_IS_NOT_INT 1 /* Pointers and int are the same size (16-bits) */ -# undef CONFIG_PTR_IS_NOT_INT -# else +# undef CONFIG_PTR_IS_NOT_INT +# else /* int and long are both 32-bits */ -# undef CONFIG_LONG_IS_NOT_INT +# undef CONFIG_LONG_IS_NOT_INT /* Pointers and int are NOT the same size */ -# define CONFIG_PTR_IS_NOT_INT 1 -# endif +# define CONFIG_PTR_IS_NOT_INT 1 +# endif #else