X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Ftools%2Fclam_tools%2Fvalue_tagger.cpp;h=d90dac3e809e3e4547feaa9f26aa1ba2bc32e2f8;hb=2b52b91229de41f97a44e775fe0069efe7bb4d48;hp=076853a4dbe26c143ae5ef232b29ba6451bc9df3;hpb=2696841371fcd1c653d44d9b89c51528b481672c;p=feisty_meow.git diff --git a/nucleus/tools/clam_tools/value_tagger.cpp b/nucleus/tools/clam_tools/value_tagger.cpp index 076853a4..d90dac3e 100644 --- a/nucleus/tools/clam_tools/value_tagger.cpp +++ b/nucleus/tools/clam_tools/value_tagger.cpp @@ -24,7 +24,6 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ -#include #include #include #include @@ -46,6 +45,8 @@ #include #include + +#include "../../library/algorithms/sorts.h" #ifdef __WIN32__ #include #endif @@ -100,7 +101,7 @@ class search_record { public: search_record(const astring &search = astring::empty_string(), - bool is_link = false, search_record *link = NIL) + bool is_link = false, search_record *link = NULL_POINTER) : _search(search), _no_modify(false), _is_link(is_link), _our_link(link), _current_value(0), _value_increment(1) {} @@ -165,6 +166,8 @@ public: simple_sorter(int index = 0, int value = 0) : _index(index), _value(value) {} bool operator < (const simple_sorter &to_compare) const { return _value < to_compare._value; } + bool operator > (const simple_sorter &to_compare) const + { return _value > to_compare._value; } bool operator == (const simple_sorter &to_compare) const { return _value == to_compare._value; } }; @@ -215,7 +218,7 @@ private: value_tagger::value_tagger() : application_shell(), - _ini(NIL), + _ini(NULL_POINTER), _dirs_seen(10) { } @@ -229,6 +232,7 @@ int value_tagger::print_instructions_and_exit() { LOG(a_sprintf("%s usage:", filename(_global_argv[0]).basename().raw().s())); LOG(""); + LOG("\ This utility scans a code base for outcome and filter definitions. It will\n\ only scan the header files (*.h) found in the directories specified. The\n\ @@ -327,17 +331,17 @@ int value_tagger::execute() log(time_stamp::notarize(true) + "value_tagger started.", basis::ALWAYS_PRINT); - astring test_repository = environment::get("FEISTY_MEOW_DIR"); + astring test_repository = environment::get("FEISTY_MEOW_APEX"); if (!test_repository) { astring msg = "\ There is a problem with a required build precondition. The following\r\n\ variables must be set before the build is run:\r\n\ \r\n\ - FEISTY_MEOW_DIR This should point at the root of the build tree.\r\n\ + FEISTY_MEOW_APEX This should point at the root of the build tree.\r\n\ \r\n\ There are also a few variables only required for CLAM-based compilation:\r\n\ \r\n\ - MAKEFLAGS This should be set to \"-I $FEISTY_MEOW_DIR/clam\".\r\n\ + MAKEFLAGS This should be set to \"-I $FEISTY_MEOW_APEX/clam\".\r\n\ \r\n\ Note that on Win32 platforms, these should be set in the System or User\r\n\ variables before running a build.\r\n"; @@ -380,7 +384,7 @@ variables before running a build.\r\n"; LOG(astring("Directories to scan...")); LOG(_dirs.text_form()); - astring rdir = environment::get("FEISTY_MEOW_DIR"); + astring rdir = environment::get("FEISTY_MEOW_APEX"); astring fname; astring parmfile = environment::get("BUILD_PARAMETER_FILE"); if (parmfile.t()) fname = parmfile; @@ -410,7 +414,7 @@ variables before running a build.\r\n"; { // check for whether this section is linked to another or not. astring linked = _ini->load(curr_name, "link", ""); - search_record *our_link_found = NIL; + search_record *our_link_found = NULL_POINTER; if (linked.t()) { // we found that this should be linked to another item. our_link_found = _search_list.find(linked); @@ -481,8 +485,8 @@ variables before running a build.\r\n"; byte_filer build_file(fname, "r"); if (!build_file.good()) { - non_continuable_error(class_name(), build_file.filename(), - "Could not find the build configuration; is FEISTY_MEOW_DIR set?"); + non_continuable_error(class_name(), build_file.name(), + "Could not find the build configuration; is FEISTY_MEOW_APEX set?"); } byte_array full_config; build_file.read(full_config, 100000); // a good chance to be big enough. @@ -501,7 +505,7 @@ variables before running a build.\r\n"; build_number += "."; build_number += temp_ini.load("version", "build", ""); if (build_number.equal_to("...")) { - non_continuable_error(class_name(), build_file.filename(), + non_continuable_error(class_name(), build_file.name(), "Could not read the build number; is build parameter file malformed?"); } @@ -957,6 +961,7 @@ HOOPLE_MAIN(value_tagger, ) // static dependencies found by buildor_gen_deps.sh: #include #include + #include #include #include #include @@ -973,10 +978,10 @@ HOOPLE_MAIN(value_tagger, ) #include #include #include + #include #include #include #include - #include #include #include #include