diff options
| author | 2012-09-04 13:21:17 +0000 | |
|---|---|---|
| committer | 2012-09-04 13:21:17 +0000 | |
| commit | 97409c7e6fc342baa188e50ce4671761b977266a (patch) | |
| tree | 5e796880f49925f37d93ce3ec3aaf9e70e3def47 /src/lib | |
| parent | 491e447c938f1a9d30891a6f5b29603e41dd6de2 (diff) | |
Made cmd line parameter parsing going into unlimited levels (no whatsnew)
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/util/options.c | 12 | ||||
| -rw-r--r-- | src/lib/util/options.h | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index ea4d5af509f..5e46d0e98b2 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -811,3 +811,15 @@ bool core_options::validate_and_set_data(core_options::entry &curentry, const ch curentry.set_value(data, priority); return true; } + +//------------------------------------------------- +// options_count - take number of existing +// number of options in structure +//------------------------------------------------- + +int core_options::options_count() +{ + int number = 0; + for (entry *curentry = m_entrylist; curentry != NULL; curentry = curentry->next()) number++; + return number; +}
\ No newline at end of file diff --git a/src/lib/util/options.h b/src/lib/util/options.h index c8fbf5e1f51..6a107cbfad4 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -187,7 +187,7 @@ public: // misc static const char *unadorned(int x = 0) { return s_option_unadorned[MIN(x, MAX_UNADORNED_OPTIONS)]; } - + int options_count(); private: // internal helpers void reset(); |
