1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

Give comparescriptids static scope.

This commit is contained in:
david
2012-12-04 03:06:18 +00:00
parent 38ad563a8f
commit 5eb62f3169
2 changed files with 13 additions and 19 deletions

View File

@@ -447,6 +447,19 @@ std::string protect_xml(const std::string s) {
return escape_for_screen(s);
}
/* This is a helper function to determine the ordering of the script results
based on their id. */
static bool comparescriptids(ScriptResult first, ScriptResult second) {
//Pull the two id fields out for comparison
std::string firstid(first.get_id());
std::string secondid(second.get_id());
if (firstid < secondid)
return true;
else
return false;
}
static char *formatScriptOutput(ScriptResult sr) {
std::vector<std::string> lines;
@@ -2612,18 +2625,3 @@ void printdatafilepaths() {
}
}
}
/*This is a helper function to determine the ordering of the script results
based on their id */
bool comparescriptids(ScriptResult first, ScriptResult second){
//Pull the two id fields out for comparison
std::string firstid(first.get_id());
std::string secondid(second.get_id());
if (firstid < secondid)
return true;
else
return false;
}

View File

@@ -253,8 +253,4 @@ void printfinaloutput();
were found. */
void printdatafilepaths();
/*This is a helper function to determine the ordering of the script results
based on their id */
bool comparescriptids(ScriptResult first, ScriptResult second);
#endif /* OUTPUT_H */