mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
input/zeek-setup: Track parse_only globally
For easier access in scan.l
This commit is contained in:
parent
376913b509
commit
e14f54b474
2 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,7 @@ class Stmt;
|
||||||
extern int zeek_argc;
|
extern int zeek_argc;
|
||||||
extern char** zeek_argv;
|
extern char** zeek_argv;
|
||||||
extern const char* prog;
|
extern const char* prog;
|
||||||
|
extern bool parse_only;
|
||||||
|
|
||||||
extern std::vector<std::string> zeek_script_prefixes; // -p flag
|
extern std::vector<std::string> zeek_script_prefixes; // -p flag
|
||||||
extern const char* command_line_policy; // -e flag
|
extern const char* command_line_policy; // -e flag
|
||||||
|
|
|
@ -218,6 +218,7 @@ zeek::OpaqueTypePtr histogram_metric_family_type;
|
||||||
// Keep copy of command line
|
// Keep copy of command line
|
||||||
int zeek::detail::zeek_argc;
|
int zeek::detail::zeek_argc;
|
||||||
char** zeek::detail::zeek_argv;
|
char** zeek::detail::zeek_argv;
|
||||||
|
bool zeek::detail::parse_only = false;
|
||||||
|
|
||||||
namespace zeek {
|
namespace zeek {
|
||||||
|
|
||||||
|
@ -483,6 +484,7 @@ SetupResult setup(int argc, char** argv, Options* zopts) {
|
||||||
auto options = zopts ? *zopts : parse_cmdline(argc, argv);
|
auto options = zopts ? *zopts : parse_cmdline(argc, argv);
|
||||||
|
|
||||||
run_state::detail::bare_mode = options.bare_mode;
|
run_state::detail::bare_mode = options.bare_mode;
|
||||||
|
detail::parse_only = options.parse_only;
|
||||||
|
|
||||||
// Set up the global that facilitates access to analysis/optimization
|
// Set up the global that facilitates access to analysis/optimization
|
||||||
// options from deep within some modules.
|
// options from deep within some modules.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue