OSDN Git Service

Upgrade to mksh R55.
[android-x86/external-mksh.git] / src / sh_flags.opt
index 99e4a22..795d198 100644 (file)
@@ -1,11 +1,30 @@
+/*-
+ * Copyright (c) 2013, 2014, 2015, 2017
+ *     mirabilos <m@mirbsd.org>
+ *
+ * Provided that these terms and disclaimer and all copyright notices
+ * are retained or reproduced in an accompanying document, permission
+ * is granted to deal in this work without restriction, including un-
+ * limited rights to use, publicly perform, distribute, sell, modify,
+ * merge, give away, or sublicence.
+ *
+ * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
+ * the utmost extent permitted by applicable law, neither express nor
+ * implied; without malicious intent or gross negligence. In no event
+ * may a licensor, author or contributor be held liable for indirect,
+ * direct, other damage, loss, or other issues arising in any way out
+ * of dealing in the work, even if advised of the possibility of such
+ * damage or existence of a defect, except proven that it results out
+ * of said person's immediate fault when using the work as intended.
+ */
+
 @SHFLAGS_DEFNS
-__RCSID("$MirOS: src/bin/mksh/sh_flags.opt,v 1.2 2014/06/09 12:28:19 tg Exp $");
-#define FN(sname,cname,flags,ochar)                    static const struct {                                   /* character flag (if any) */                   char c;                                         /* OF_* */                                      unsigned char optflags;                         /* long name of option */                       char name[sizeof(sname)];               } shoptione_ ## cname = {                               ochar, flags, sname                     };
+__RCSID("$MirOS: src/bin/mksh/sh_flags.opt,v 1.5 2017/02/18 02:33:15 tg Exp $");
 @SHFLAGS_ENUMS
 #define FN(sname,cname,flags,ochar)    cname,
 #define F0(sname,cname,flags,ochar)    cname = 0,
 @SHFLAGS_ITEMS
-#define FN(sname,cname,flags,ochar)            ((const char *)(&shoptione_ ## cname)) + 2,
+#define FN(sname,cname,flags,ochar)    ((const char *)(&shoptione_ ## cname)) + 2,
 @@
 
 /* special cases */
@@ -33,7 +52,7 @@ FN("bgnice", FBGNICE, OF_ANY
 FN("braceexpand", FBRACEEXPAND, OF_ANY
 
 /* ./. Emacs command line editing mode */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("emacs", FEMACS, OF_ANY
 
 /* -e  quit on error */
@@ -41,7 +60,7 @@ FN("emacs", FEMACS, OF_ANY
 FN("errexit", FERREXIT, OF_ANY
 
 /* ./. Emacs command line editing mode, gmacs variant */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("gmacs", FGMACS, OF_ANY
 
 /* ./. reading EOF does not exit */
@@ -141,19 +160,19 @@ FN("utf8-mode", FUNICODE, OF_ANY
 FN("verbose", FVERBOSE, OF_ANY
 
 /* ./. Vi command line editing mode */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("vi", FVI, OF_ANY
 
 /* ./. enable ESC as file name completion character (non-standard) */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("vi-esccomplete", FVIESCCOMPLETE, OF_ANY
 
 /* ./. enable Tab as file name completion character (non-standard) */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("vi-tabcomplete", FVITABCOMPLETE, OF_ANY
 
 /* ./. always read in raw mode (no effect) */
->|!defined(MKSH_NO_CMDLINE_EDITING) || defined(MKSH_LEGACY_MODE)
+>|!MKSH_NO_CMDLINE_EDITING
 FN("viraw", FVIRAW, OF_ANY
 
 /* -x  execution trace (display commands as they are run) */