1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 02:49:01 +00:00

Move get/set_program_name from main.cc to nmap.cc.

This is for technical reasons; nmap-private-dev programs need to link
against objects files but they can't link against main.o because that
results in a duplicate definition of main.
This commit is contained in:
david
2011-06-15 18:12:33 +00:00
parent c32e8c5513
commit b0a49d2ad1
2 changed files with 12 additions and 12 deletions

11
main.cc
View File

@@ -127,16 +127,7 @@ static BOOL OpenLibs(void) {
/* global options */
extern NmapOps o; /* option structure */
/* A mechanism to save argv[0] for code that requires that. */
static const char *program_name = NULL;
static void set_program_name(const char *name) {
program_name = name;
}
const char *get_program_name(void) {
return program_name;
}
extern void set_program_name(const char *name);
int main(int argc, char *argv[]) {
/* The "real" main is nmap_main(). This function hijacks control at the