From b48f96db8e80e1866be8b92132ece590b3a9ffb9 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 31 Aug 2026 06:59:47 +0000 Subject: parse --- include/global.h | 11 +++++++++++ include/job.h | 4 +--- include/parse.h | 13 +++++++++++++ include/setting.h | 8 -------- include/util.h | 2 +- 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 include/global.h create mode 100644 include/parse.h delete mode 100644 include/setting.h (limited to 'include') diff --git a/include/global.h b/include/global.h new file mode 100644 index 0000000..ee1141e --- /dev/null +++ b/include/global.h @@ -0,0 +1,11 @@ +#pragma once + +namespace ov4 +{ +extern int verbose; + +constexpr int MAXLINE = 1024; +constexpr int MAXARGS = 128; + + +} diff --git a/include/job.h b/include/job.h index cbd9b30..e94bda6 100644 --- a/include/job.h +++ b/include/job.h @@ -10,10 +10,8 @@ #include #include -#include "setting.h" +#include "global.h" -#define MAXLINE 1024 /* max line size */ -#define MAXARGS 128 /* max args on a command line */ #define MAXJOBS 16 /* max jobs at any point in time */ #define MAXJID 1<<16 /* max job ID */ diff --git a/include/parse.h b/include/parse.h new file mode 100644 index 0000000..8fdbe12 --- /dev/null +++ b/include/parse.h @@ -0,0 +1,13 @@ +#include +#include +#include +#include + +#include "global.h" + +namespace ov4 +{ + +int parseline(const char *cmdline, char **argv); + +} diff --git a/include/setting.h b/include/setting.h deleted file mode 100644 index ec4f08b..0000000 --- a/include/setting.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -namespace ov4 -{ - -extern int verbose; - -} diff --git a/include/util.h b/include/util.h index 8df2b7f..dd51fff 100644 --- a/include/util.h +++ b/include/util.h @@ -13,7 +13,7 @@ #include #include -#include "setting.h" +#include "global.h" #define LOG !(ov4::GLOBAL_DEBUG && verbose) ? (void)0 : ov4::LogVoidify() & std::clog -- cgit v1.3.1-4-g156e