projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-2.140.127' into main
[feisty_meow.git]
/
nucleus
/
tools
/
clam_tools
/
value_tagger.cpp
diff --git
a/nucleus/tools/clam_tools/value_tagger.cpp
b/nucleus/tools/clam_tools/value_tagger.cpp
index df1724a4521e7b7a8011ef22638e8ecaf301be21..9fb6c780b7d0c42e55d97e7daed1e260e563e248 100644
(file)
--- 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 *
\*****************************************************************************/
* Please send any updates to: fred@gruntose.com *
\*****************************************************************************/
-#include <algorithms/shell_sort.h>
#include <application/application_shell.h>
#include <application/command_line.h>
#include <application/hoople_main.h>
#include <application/application_shell.h>
#include <application/command_line.h>
#include <application/hoople_main.h>
@@
-46,6
+45,8
@@
#include <textual/parser_bits.h>
#include <sys/stat.h>
#include <textual/parser_bits.h>
#include <sys/stat.h>
+
+#include "../../library/algorithms/sorts.h"
#ifdef __WIN32__
#include <io.h>
#endif
#ifdef __WIN32__
#include <io.h>
#endif
@@
-100,7
+101,7
@@
class search_record
{
public:
search_record(const astring &search = astring::empty_string(),
{
public:
search_record(const astring &search = astring::empty_string(),
- bool is_link = false, search_record *link = N
IL
)
+ bool is_link = false, search_record *link = N
ULL_POINTER
)
: _search(search), _no_modify(false), _is_link(is_link), _our_link(link),
_current_value(0), _value_increment(1) {}
: _search(search), _no_modify(false), _is_link(is_link), _our_link(link),
_current_value(0), _value_increment(1) {}
@@
-200,7
+201,7
@@
private:
ini_configurator *_ini; // the configuration for what we'll scan.
string_table _dirs; // the list of directories.
string_table _dirs_seen; // full list of already processed directories.
ini_configurator *_ini; // the configuration for what we'll scan.
string_table _dirs; // the list of directories.
string_table _dirs_seen; // full list of already processed directories.
-
astring
_manifest_filename; // the name of the manifest we'll create.
+
filename
_manifest_filename; // the name of the manifest we'll create.
byte_filer _manifest; // the actual file we're building.
active_searches _search_list; // tracks our progress in scanning files.
int_array _search_ordering;
byte_filer _manifest; // the actual file we're building.
active_searches _search_list; // tracks our progress in scanning files.
int_array _search_ordering;
@@
-215,7
+216,7
@@
private:
value_tagger::value_tagger()
: application_shell(),
value_tagger::value_tagger()
: application_shell(),
- _ini(N
IL
),
+ _ini(N
ULL_POINTER
),
_dirs_seen(10)
{
}
_dirs_seen(10)
{
}
@@
-229,6
+230,7
@@
int value_tagger::print_instructions_and_exit()
{
LOG(a_sprintf("%s usage:", filename(_global_argv[0]).basename().raw().s()));
LOG("");
{
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\
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
+329,17
@@
int value_tagger::execute()
log(time_stamp::notarize(true) + "value_tagger started.", basis::ALWAYS_PRINT);
log(time_stamp::notarize(true) + "value_tagger started.", basis::ALWAYS_PRINT);
- astring test_repository = environment::get("
REPOSITORY_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\
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\
-
REPOSITORY_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\
\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 $
REPOSITORY_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";
\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";
@@
-352,8
+354,8
@@
variables before running a build.\r\n";
_ini = new ini_configurator(ini_file, ini_configurator::RETURN_ONLY);
// read the name of the manifest file to create.
_ini = new ini_configurator(ini_file, ini_configurator::RETURN_ONLY);
// read the name of the manifest file to create.
- _manifest_filename =
_ini->load("manifest", "output", ""
);
- if (!_manifest_filename) {
+ _manifest_filename =
filename(_ini->load("manifest", "output", "")
);
+ if (!_manifest_filename
.raw().length()
) {
non_continuable_error(class_name(), ini_file, "The 'output' file entry is missing");
}
_manifest_filename = parser_bits::substitute_env_vars(_manifest_filename);
non_continuable_error(class_name(), ini_file, "The 'output' file entry is missing");
}
_manifest_filename = parser_bits::substitute_env_vars(_manifest_filename);
@@
-373,14
+375,14
@@
variables before running a build.\r\n";
}
for (int i = 0; i < temp_dirs.symbols(); i++) {
//log(astring("curr is ") + current);
}
for (int i = 0; i < temp_dirs.symbols(); i++) {
//log(astring("curr is ") + current);
-
astring current = parser_bits::substitute_env_vars(temp_dirs.name(i
));
+
filename current = filename(parser_bits::substitute_env_vars(temp_dirs.name(i)
));
_dirs.add(current, "");
}
LOG(astring("Directories to scan..."));
LOG(_dirs.text_form());
_dirs.add(current, "");
}
LOG(astring("Directories to scan..."));
LOG(_dirs.text_form());
- astring rdir = environment::get("
REPOSITORY_DIR
");
+ astring rdir = environment::get("
FEISTY_MEOW_APEX
");
astring fname;
astring parmfile = environment::get("BUILD_PARAMETER_FILE");
if (parmfile.t()) fname = parmfile;
astring fname;
astring parmfile = environment::get("BUILD_PARAMETER_FILE");
if (parmfile.t()) fname = parmfile;
@@
-410,7
+412,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", "");
{
// check for whether this section is linked to another or not.
astring linked = _ini->load(curr_name, "link", "");
- search_record *our_link_found = N
IL
;
+ search_record *our_link_found = N
ULL_POINTER
;
if (linked.t()) {
// we found that this should be linked to another item.
our_link_found = _search_list.find(linked);
if (linked.t()) {
// we found that this should be linked to another item.
our_link_found = _search_list.find(linked);
@@
-481,8
+483,8
@@
variables before running a build.\r\n";
byte_filer build_file(fname, "r");
if (!build_file.good()) {
byte_filer build_file(fname, "r");
if (!build_file.good()) {
- non_continuable_error(class_name(), build_file.
file
name(),
- "Could not find the build configuration; is
REPOSITORY_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.
}
byte_array full_config;
build_file.read(full_config, 100000); // a good chance to be big enough.
@@
-501,7
+503,7
@@
variables before running a build.\r\n";
build_number += ".";
build_number += temp_ini.load("version", "build", "");
if (build_number.equal_to("...")) {
build_number += ".";
build_number += temp_ini.load("version", "build", "");
if (build_number.equal_to("...")) {
- non_continuable_error(class_name(), build_file.
file
name(),
+ non_continuable_error(class_name(), build_file.name(),
"Could not read the build number; is build parameter file malformed?");
}
"Could not read the build number; is build parameter file malformed?");
}
@@
-957,6
+959,7
@@
HOOPLE_MAIN(value_tagger, )
// static dependencies found by buildor_gen_deps.sh:
#include <application/application_shell.cpp>
#include <application/command_line.cpp>
// static dependencies found by buildor_gen_deps.sh:
#include <application/application_shell.cpp>
#include <application/command_line.cpp>
+ #include <application/windoze_helper.cpp>
#include <basis/astring.cpp>
#include <basis/common_outcomes.cpp>
#include <basis/environment.cpp>
#include <basis/astring.cpp>
#include <basis/common_outcomes.cpp>
#include <basis/environment.cpp>
@@
-973,10
+976,10
@@
HOOPLE_MAIN(value_tagger, )
#include <filesystem/directory.cpp>
#include <filesystem/directory_tree.cpp>
#include <filesystem/file_info.cpp>
#include <filesystem/directory.cpp>
#include <filesystem/directory_tree.cpp>
#include <filesystem/file_info.cpp>
+ #include <filesystem/file_time.cpp>
#include <filesystem/filename.cpp>
#include <filesystem/filename_list.cpp>
#include <filesystem/filename_tree.cpp>
#include <filesystem/filename.cpp>
#include <filesystem/filename_list.cpp>
#include <filesystem/filename_tree.cpp>
- #include <filesystem/file_time.cpp>
#include <filesystem/huge_file.cpp>
#include <loggers/combo_logger.cpp>
#include <loggers/console_logger.cpp>
#include <filesystem/huge_file.cpp>
#include <loggers/combo_logger.cpp>
#include <loggers/console_logger.cpp>