示例#1
0
文件: scanner.cpp 项目: Jstd/Jstd
void Scanner::Perform_Timed_Scan(Program_Options const& program_options, std::time_t const& last_run_time){

	//start recording the time it takes to perform the scan
	stats.Start_Timer();

	std::cout <<  colorize_forground("Scan Process",220) << std::endl;

	//an object that will count the errors,
	//and help quit the scan early if there are too many of them.
	Warn_Machine warn_machine(program_options.Warn_Amount());

	//there are two main things to scan.  the pseudo library,  and library resources
	if (!Pseudo_Library_Scanner::Scan(program_options, warn_machine, last_run_time))          {Stop_Scan(program_options, warn_machine);}
	if (!Pseudo_Library_Resource_Scanner::Scan(program_options, warn_machine, last_run_time)) {Stop_Scan(program_options, warn_machine);}

	std::cout << std::endl;

	//scan is done. stop the timer
	stats.End_Timer();

	//possibly fix warnings [the warnings may already get fixed in the middle of the scan when the program halts.]
	if (program_options.Fix_Warnings()){
		warn_machine.Fix_Warnings(program_options.Prompt_Automatic_Warning_Fixes());
	}

	return;
 }
示例#2
0
std::string Black_String(std::string const& str){
	return colorize_forground(str, 16);
}
示例#3
0
std::string White_String(std::string const& str){
	return colorize_forground(str, 7);
}
示例#4
0
std::string Teal_String(std::string const& str){
	return colorize_forground(str, 6);
}
示例#5
0
std::string Blue_String(std::string const& str){
	return colorize_forground(str, 4);
}
示例#6
0
std::wstring Gold_String(std::wstring const& str){
	return colorize_forground(str, 3);
}
示例#7
0
std::wstring Red_String(std::wstring const& str){
	return colorize_forground(str, 1);
}
示例#8
0
//specific colorizing wstring functions
std::wstring Green_String(std::wstring const& str){
	return colorize_forground(str, 118);
}
示例#9
0
void Red_Message(std::string const& str){

	std::cerr << colorize_forground(str, 1);
	return;
}
示例#10
0
void Green_Message(std::string const& str){

	std::cout << colorize_forground(str, 118);
	return;
}