basic: move JobMode from core
The JobMode string table functions can be used by utilities for argument validation.
This commit is contained in:
@@ -344,6 +344,20 @@ static const char* const notify_access_table[_NOTIFY_ACCESS_MAX] = {
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(notify_access, NotifyAccess);
|
||||
|
||||
static const char* const job_mode_table[_JOB_MODE_MAX] = {
|
||||
[JOB_FAIL] = "fail",
|
||||
[JOB_REPLACE] = "replace",
|
||||
[JOB_REPLACE_IRREVERSIBLY] = "replace-irreversibly",
|
||||
[JOB_ISOLATE] = "isolate",
|
||||
[JOB_FLUSH] = "flush",
|
||||
[JOB_IGNORE_DEPENDENCIES] = "ignore-dependencies",
|
||||
[JOB_IGNORE_REQUIREMENTS] = "ignore-requirements",
|
||||
[JOB_TRIGGERING] = "triggering",
|
||||
[JOB_RESTART_DEPENDENCIES] = "restart-dependencies",
|
||||
};
|
||||
|
||||
DEFINE_STRING_TABLE_LOOKUP(job_mode, JobMode);
|
||||
|
||||
SpecialGlyph unit_active_state_to_glyph(UnitActiveState state) {
|
||||
static const SpecialGlyph map[_UNIT_ACTIVE_STATE_MAX] = {
|
||||
[UNIT_ACTIVE] = SPECIAL_GLYPH_BLACK_CIRCLE,
|
||||
|
||||
Reference in New Issue
Block a user