Browse Source

Adding additional boolean keywords enable and disable

Adding yet another pair of English words that are commonly used
as Boolean directives.
Josh Lehan 11 years ago
parent
commit
09e7478dc8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      util.c

+ 2 - 0
util.c

@@ -2194,6 +2194,7 @@ struct bfg_strtobool_keyword {
 bool bfg_strtobool(const char * const s, char ** const endptr, __maybe_unused const int opts)
 {
 	struct bfg_strtobool_keyword keywords[] = {
+		{false, "disable"},
 		{false, "false"},
 		{false, "never"},
 		{false, "none"},
@@ -2201,6 +2202,7 @@ bool bfg_strtobool(const char * const s, char ** const endptr, __maybe_unused co
 		{false, "no"},
 		{false, "0"},
 		
+		{true , "enable"},
 		{true , "always"},
 		{true , "true"},
 		{true , "yes"},