Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
6
66
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Vidal
66
Commits
8b69700e
Commit
8b69700e
authored
2 years ago
by
Eric Vidal
Browse files
Options
Downloads
Patches
Plain Diff
add requiredby key, remove longrun addservices key
parent
440708ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/66/enum.h
+0
-2
0 additions, 2 deletions
src/include/66/enum.h
src/lib66/enum/enum.c
+12
-22
12 additions, 22 deletions
src/lib66/enum/enum.c
with
12 additions
and
24 deletions
src/include/66/enum.h
+
0
−
2
View file @
8b69700e
...
...
@@ -125,8 +125,6 @@ enum enum_key_section_regex_e
KEY_REGEX_DIRECTORIES
,
KEY_REGEX_FILES
,
KEY_REGEX_INFILES
,
KEY_REGEX_ADDSERVICES
,
KEY_REGEX_APPLYTO
,
KEY_REGEX_ENDOFKEY
}
;
...
...
This diff is collapsed.
Click to expand it.
src/lib66/enum/enum.c
+
12
−
22
View file @
8b69700e
...
...
@@ -14,9 +14,7 @@
#include
<66/enum.h>
#include
<stddef.h>
#include
<oblibs/string.h>
#include
<string.h>
#include
<oblibs/log.h>
...
...
@@ -34,10 +32,9 @@ char const *enum_str_key_section_main[] = {
"@type"
,
"@version"
,
"@description"
,
"@contents"
,
"@depends"
,
"@requiredby"
,
"@optsdepends"
,
"@extdepends"
,
"@options"
,
"@notify"
,
"@user"
,
...
...
@@ -78,7 +75,7 @@ char const *enum_str_key_section_logger[] = {
}
;
char
const
*
enum_str_key_section_environ
[]
=
{
"@
n
on
e
"
,
"@
envir
on"
,
0
}
;
...
...
@@ -87,14 +84,12 @@ char const *enum_str_key_section_regex[] = {
"@directories"
,
"@files"
,
"@infiles"
,
"@addservices"
,
0
}
;
char
const
*
enum_str_type
[]
=
{
"classic"
,
"bundle"
,
"longrun"
,
"oneshot"
,
"module"
,
0
...
...
@@ -113,13 +108,12 @@ char const *enum_str_expected[] = {
char
const
*
enum_str_opts
[]
=
{
"log"
,
"env"
,
"hiercopy"
,
"pipeline"
,
0
}
;
char
const
*
enum_str_flags
[]
=
{
"down"
,
"earlier"
,
0
}
;
...
...
@@ -144,14 +138,6 @@ char const *enum_str_time[] = {
0
}
;
char
const
*
enum_str_logopts
[]
=
{
"producer-for"
,
"consumer-for"
,
"pipeline-name"
,
0
}
;
char
const
*
enum_str_seed
[]
=
{
"depends"
,
...
...
@@ -180,7 +166,6 @@ enum_all_enum_t enum_all[] = {
[
ENUM_BUILD
]
=
{
.
enum_all
=
BUILD_ENDOFKEY
-
ENUM_START
,
.
str
=
enum_str_build
}
,
[
ENUM_MANDATORY
]
=
{
.
enum_all
=
MANDATORY_ENDOFKEY
-
ENUM_START
,
.
str
=
enum_str_mandatory
}
,
[
ENUM_TIME
]
=
{
.
enum_all
=
TIME_ENDOFKEY
-
ENUM_START
,
.
str
=
enum_str_time
}
,
[
ENUM_LOGOPTS
]
=
{
.
enum_all
=
LOGOPTS_ENDOFKEY
-
ENUM_START
,
.
str
=
enum_str_logopts
}
,
[
ENUM_SEED
]
=
{
.
enum_all
=
SEED_ENDOFKEY
-
ENUM_START
,
.
str
=
enum_str_seed
}
,
[
ENUM_ENDOFKEY
]
=
{
0
}
...
...
@@ -188,12 +173,12 @@ enum_all_enum_t enum_all[] = {
ssize_t
get_enum_by_key_one
(
char
const
*
str
,
int
const
e
)
{
log_flow
()
;
//
log_flow() ;
int
i
=
0
;
enum_all_enum_t
*
key
=
enum_all
;
for
(;
i
<
key
[
e
].
enum_all
;
i
++
)
if
(
ob
str
_equal
(
str
,
key
[
e
].
str
[
i
]))
if
(
!
str
cmp
(
str
,
key
[
e
].
str
[
i
]))
return
i
;
return
-
1
;
...
...
@@ -201,7 +186,7 @@ ssize_t get_enum_by_key_one(char const *str, int const e)
ssize_t
get_enum_by_key
(
char
const
*
str
)
{
log_flow
()
;
//
log_flow() ;
int
i
=
0
,
ret
;
...
...
@@ -219,3 +204,8 @@ char const *get_key_by_enum(int const e, int const key)
return
enum_all
[
e
].
str
[
key
]
;
}
char
const
*
get_key_by_key_all
(
int
const
idsec
,
int
const
idkey
)
{
return
*
total_list
[
idsec
].
list
[
idkey
].
name
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment