diff options
author | Vas Crabb <vas@vastheman.com> | 2016-09-26 04:46:55 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2016-09-26 04:51:59 +1000 |
commit | 33b2c733955112083b2912d4115eb0465026b4d0 (patch) | |
tree | fbbf0f355577aaf9a18dfa5ce269615ed5e70bec /src/lib | |
parent | fbbc293041838bf6007c439c57745f79b2c8d4fb (diff) |
srcclean (nw)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/util/opresolv.cpp | 68 | ||||
-rw-r--r-- | src/lib/util/opresolv.h | 54 | ||||
-rw-r--r-- | src/lib/util/unicode.cpp | 6 |
3 files changed, 64 insertions, 64 deletions
diff --git a/src/lib/util/opresolv.cpp b/src/lib/util/opresolv.cpp index 44ba0e51583..05b8a5e8898 100644 --- a/src/lib/util/opresolv.cpp +++ b/src/lib/util/opresolv.cpp @@ -21,11 +21,11 @@ namespace util { /*************************************************************************** - option_resolution + option_resolution ***************************************************************************/ // ------------------------------------------------- -// ctor +// ctor // ------------------------------------------------- option_resolution::option_resolution(const option_guide &guide) @@ -63,7 +63,7 @@ option_resolution::option_resolution(const option_guide &guide) // ------------------------------------------------- -// dtor +// dtor // ------------------------------------------------- option_resolution::~option_resolution() @@ -72,7 +72,7 @@ option_resolution::~option_resolution() // ------------------------------------------------- -// lookup_in_specification +// lookup_in_specification // ------------------------------------------------- const char *option_resolution::lookup_in_specification(const char *specification, const option_guide::entry &option) @@ -84,8 +84,8 @@ const char *option_resolution::lookup_in_specification(const char *specification // ------------------------------------------------- -// set_specification - sets the option specification -// and mutates values accordingly +// set_specification - sets the option specification +// and mutates values accordingly // ------------------------------------------------- void option_resolution::set_specification(const std::string &specification) @@ -108,7 +108,7 @@ void option_resolution::set_specification(const std::string &specification) // ------------------------------------------------- -// find +// find // ------------------------------------------------- option_resolution::entry *option_resolution::find(int parameter) @@ -125,7 +125,7 @@ option_resolution::entry *option_resolution::find(int parameter) // ------------------------------------------------- -// find +// find // ------------------------------------------------- option_resolution::entry *option_resolution::find(const std::string &identifier) @@ -142,7 +142,7 @@ option_resolution::entry *option_resolution::find(const std::string &identifier) // ------------------------------------------------- -// lookup_int +// lookup_int // ------------------------------------------------- int option_resolution::lookup_int(int parameter) @@ -154,7 +154,7 @@ int option_resolution::lookup_int(int parameter) // ------------------------------------------------- -// lookup_string +// lookup_string // ------------------------------------------------- const std::string &option_resolution::lookup_string(int parameter) @@ -166,7 +166,7 @@ const std::string &option_resolution::lookup_string(int parameter) // ------------------------------------------------- -// error_string +// error_string // ------------------------------------------------- option_resolution::error option_resolution::get_default(const char *specification, int option_char, int *val) @@ -177,29 +177,29 @@ option_resolution::error option_resolution::get_default(const char *specificatio // ------------------------------------------------- -// error_string +// error_string // ------------------------------------------------- const char *option_resolution::error_string(option_resolution::error err) { switch (err) { - case error::SUCCESS: return "The operation completed successfully"; - case error::OUTOFMEMORY: return "Out of memory"; - case error::PARAMOUTOFRANGE: return "Parameter out of range"; - case error::PARAMNOTSPECIFIED: return "Parameter not specified"; - case error::PARAMNOTFOUND: return "Unknown parameter"; - case error::PARAMALREADYSPECIFIED: return "Parameter specified multiple times"; - case error::BADPARAM: return "Invalid parameter"; - case error::SYNTAX: return "Syntax error"; - case error::INTERNAL: return "Internal error"; + case error::SUCCESS: return "The operation completed successfully"; + case error::OUTOFMEMORY: return "Out of memory"; + case error::PARAMOUTOFRANGE: return "Parameter out of range"; + case error::PARAMNOTSPECIFIED: return "Parameter not specified"; + case error::PARAMNOTFOUND: return "Unknown parameter"; + case error::PARAMALREADYSPECIFIED: return "Parameter specified multiple times"; + case error::BADPARAM: return "Invalid parameter"; + case error::SYNTAX: return "Syntax error"; + case error::INTERNAL: return "Internal error"; } return nullptr; } // ------------------------------------------------- -// entry::ctor +// entry::ctor // ------------------------------------------------- option_resolution::entry::entry(const option_guide::entry &guide_entry) @@ -209,7 +209,7 @@ option_resolution::entry::entry(const option_guide::entry &guide_entry) // ------------------------------------------------- -// entry::set_enum_value_range +// entry::set_enum_value_range // ------------------------------------------------- void option_resolution::entry::set_enum_value_range(const option_guide::entry *begin, const option_guide::entry *end) @@ -220,7 +220,7 @@ void option_resolution::entry::set_enum_value_range(const option_guide::entry *b // ------------------------------------------------- -// entry::parse_specification +// entry::parse_specification // ------------------------------------------------- void option_resolution::entry::parse_specification(const char *specification) @@ -331,7 +331,7 @@ void option_resolution::entry::parse_specification(const char *specification) // ------------------------------------------------- -// entry::numeric_value +// entry::numeric_value // ------------------------------------------------- std::string option_resolution::entry::numeric_value(int value) @@ -341,7 +341,7 @@ std::string option_resolution::entry::numeric_value(int value) // ------------------------------------------------- -// entry::value +// entry::value // ------------------------------------------------- const std::string &option_resolution::entry::value() const @@ -352,7 +352,7 @@ const std::string &option_resolution::entry::value() const // ------------------------------------------------- -// entry::value_int +// entry::value_int // ------------------------------------------------- int option_resolution::entry::value_int() const @@ -362,7 +362,7 @@ int option_resolution::entry::value_int() const // ------------------------------------------------- -// entry::set_value +// entry::set_value // ------------------------------------------------- bool option_resolution::entry::set_value(const std::string &value) @@ -382,7 +382,7 @@ bool option_resolution::entry::set_value(const std::string &value) // ------------------------------------------------- -// entry::can_bump_lower +// entry::can_bump_lower // ------------------------------------------------- bool option_resolution::entry::can_bump_lower() const @@ -393,7 +393,7 @@ bool option_resolution::entry::can_bump_lower() const // ------------------------------------------------- -// entry::can_bump_higher +// entry::can_bump_higher // ------------------------------------------------- bool option_resolution::entry::can_bump_higher() const @@ -404,7 +404,7 @@ bool option_resolution::entry::can_bump_higher() const // ------------------------------------------------- -// entry::bump_lower +// entry::bump_lower // ------------------------------------------------- bool option_resolution::entry::bump_lower() @@ -436,7 +436,7 @@ bool option_resolution::entry::bump_lower() // ------------------------------------------------- -// entry::bump_higher +// entry::bump_higher // ------------------------------------------------- bool option_resolution::entry::bump_higher() @@ -468,7 +468,7 @@ bool option_resolution::entry::bump_higher() // ------------------------------------------------- -// entry::find_in_ranges +// entry::find_in_ranges // ------------------------------------------------- option_resolution::entry::rangelist::const_iterator option_resolution::entry::find_in_ranges(int value) const @@ -480,4 +480,4 @@ option_resolution::entry::rangelist::const_iterator option_resolution::entry::fi } -} // namespace util
\ No newline at end of file +} // namespace util diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h index 760e6a237e8..1b1bc692118 100644 --- a/src/lib/util/opresolv.h +++ b/src/lib/util/opresolv.h @@ -52,28 +52,28 @@ // TYPE DEFINITIONS //************************************************************************** -#define OPTION_GUIDE_START(option_guide_) \ - namespace option_guide_impl_##option_guide_ \ - { \ - static const util::option_guide &get(); \ - }; \ - const util::option_guide &option_guide_ = option_guide_impl_##option_guide_::get(); \ - namespace option_guide_impl_##option_guide_ \ - { \ +#define OPTION_GUIDE_START(option_guide_) \ + namespace option_guide_impl_##option_guide_ \ + { \ + static const util::option_guide &get(); \ + }; \ + const util::option_guide &option_guide_ = option_guide_impl_##option_guide_::get(); \ + namespace option_guide_impl_##option_guide_ \ + { \ static const auto actual = util::make_option_guide(0 -#define OPTION_GUIDE_END \ - ); \ - static const util::option_guide &get() { return actual; } \ - }; -#define OPTION_GUIDE_EXTERN(option_guide_) \ +#define OPTION_GUIDE_END \ + ); \ + static const util::option_guide &get() { return actual; } \ + }; +#define OPTION_GUIDE_EXTERN(option_guide_) \ extern const util::option_guide &option_guide_ -#define OPTION_INT(option_char, identifier, display_name) \ +#define OPTION_INT(option_char, identifier, display_name) \ ,util::option_guide::entry(util::option_guide::entry::option_type::INT, (option_char), (identifier), (display_name)) -#define OPTION_STRING(option_char, identifier, display_name) \ +#define OPTION_STRING(option_char, identifier, display_name) \ ,util::option_guide::entry(util::option_guide::entry::option_type::STRING, (option_char), (identifier), (display_name)) -#define OPTION_ENUM_START(option_char, identifier, display_name) \ +#define OPTION_ENUM_START(option_char, identifier, display_name) \ ,util::option_guide::entry(util::option_guide::entry::option_type::ENUM_BEGIN, (option_char), (identifier), (display_name)) -#define OPTION_ENUM(value, identifier, display_name) \ +#define OPTION_ENUM(value, identifier, display_name) \ ,util::option_guide::entry(util::option_guide::entry::option_type::ENUM_VALUE, (value), (identifier), (display_name)) #define OPTION_ENUM_END @@ -111,10 +111,10 @@ public: int parameter() const { return m_parameter; } const char *identifier() const { return m_identifier; } const char *display_name() const { return m_display_name; } - + private: - option_type m_type; - int m_parameter; + option_type m_type; + int m_parameter; const char *m_identifier; const char *m_display_name; }; @@ -222,15 +222,15 @@ public: private: // references to the option guide - const option_guide::entry & m_guide_entry; - const option_guide::entry * m_enum_value_begin; - const option_guide::entry * m_enum_value_end; + const option_guide::entry & m_guide_entry; + const option_guide::entry * m_enum_value_begin; + const option_guide::entry * m_enum_value_end; // runtime state - bool m_is_pertinent; - std::string m_value; - std::string m_default_value; - rangelist m_ranges; + bool m_is_pertinent; + std::string m_value; + std::string m_default_value; + rangelist m_ranges; // methods void parse_specification(const char *specification); diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp index 4613fa76350..65936e10b48 100644 --- a/src/lib/util/unicode.cpp +++ b/src/lib/util/unicode.cpp @@ -24,7 +24,7 @@ bool uchar_isvalid(unicode_char uchar) //------------------------------------------------- // uchar_is_printable - tests to see if a unicode -// char is printable +// char is printable //------------------------------------------------- bool uchar_is_printable(unicode_char uchar) @@ -32,7 +32,7 @@ bool uchar_is_printable(unicode_char uchar) return !(0x0001f >= uchar) && // C0 control !((0x0007f <= uchar) && (0x0009f >= uchar)) && // DEL and C1 control - !((0x0fdd0 <= uchar) && (0x0fddf >= uchar)) && // noncharacters + !((0x0fdd0 <= uchar) && (0x0fddf >= uchar)) && // noncharacters !(0x0fffe == (uchar & 0x0ffff)) && // byte-order detection noncharacter !(0x0ffff == (uchar & 0x0ffff)); // the other noncharacter } @@ -40,7 +40,7 @@ bool uchar_is_printable(unicode_char uchar) //------------------------------------------------- // uchar_is_digit - tests to see if a unicode -// char is a digit +// char is a digit //------------------------------------------------- bool uchar_is_digit(unicode_char uchar) |