Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osdd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiří Kalvoda
osdd
Commits
b7eca513
Commit
b7eca513
authored
3 years ago
by
Jiří Kalvoda
Browse files
Options
Downloads
Patches
Plain Diff
TO_STRING --no-msg-body
parent
54c73389
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
osdd-to-string.c
+4
-1
4 additions, 1 deletion
osdd-to-string.c
osdd-to-string.h
+8
-4
8 additions, 4 deletions
osdd-to-string.h
with
12 additions
and
5 deletions
osdd-to-string.c
+
4
−
1
View file @
b7eca513
...
...
@@ -148,6 +148,9 @@ bool osd_to_strings_vector_parse_arg(struct osd_to_string_state *state, char arg
case
'a'
:
state
->
on_arrive
=
1
;
break
;
case
'N'
:
state
->
no_msg_body
=
1
;
break
;
case
'A'
:
state
->
on_arrive
=
1
;
state
->
do_not_insert_msg_to_que
=
1
;
...
...
@@ -232,7 +235,7 @@ VECTOR(VECTOR(char)) osd_to_strings_vector(struct osd_to_string_state *state, st
break
;
}
VECTOR
(
char
)
l
=
0
;
vprint
(
&
l
,
"%s%s%s"
,
color
,
text
,
end_color
);
vprint
(
&
l
,
"%s%s%s"
,
color
,
state
->
no_msg_body
?
""
:
text
,
end_color
);
VPB
(
out
,
l
);
VFREE
(
text
);
...
...
This diff is collapsed.
Click to expand it.
osdd-to-string.h
+
8
−
4
View file @
b7eca513
...
...
@@ -21,22 +21,24 @@
{ "end-time", no_argument, NULL, 'E' },\
{ "on-arrive", required_argument, NULL, 'a' },\
{ "on-arrive-do-not-que", required_argument, NULL, 'A' },\
{ "no-msg-body", no_argument, NULL, 'N' },\
#define OSDD_TO_STRING_SHORTOP \
"l:m:T:" OSDD_TO_STRINGS_VECTOR_SHORTOP
#define OSDD_TO_STRINGS_VECTOR_SHORTOP \
"c:rt:T:e:EaA"
"c:rt:T:e:EaA
N
"
#define OSDD_TO_STRINGS_VECTOR_HELP \
"-c, --color=<{}>\tSet how to print color of messages {no, rgbDEC, rgbHEX, rgbHEXHASHTAG, term, original}\n" \
"-r, --replace\t\tReplace not alphabet and number in output to '?'\n"\
"-t, --time=<{}>\t\tSet how to print actual time {no, unix, iso}\n"\
"-e, --end
-
<s>\t\tPrint <s> on end of showing message\n"\
"-e, --end
=
<s>\t\tPrint <s> on end of showing message\n"\
"-E, --end-time\t\tPrint actual time on end messages (format from -t -T)\n"\
"-a, --on-arrive\t\tPrint message just when arrive (not compatible with -e -E)\n"\
"-A, --on-arrive\t\tPrint message just when arrive and do not insert it to message queue\n"\
"\t\t\t\t(not compatible with -e -E)\n"
"\t\t\t\t(not compatible with -e -E)\n"\
"-N, --no-msg-body\t\tDo not print message body (should print for example color if it is tuned on)"
#define OSDD_TO_STRING_HELP \
"-c, --color=<{}>\tSet how to print color of messages {no, rgbDEC, rgbHEX, rgbHEXHASHTAG, term, original}\n" \
...
...
@@ -49,7 +51,8 @@
"-E, --end-time\t\tPrint actual time on end messages (format from -t -T)\n"\
"-a, --on-arrive\t\tPrint message just when arrive (not compatible with -e -E)\n"\
"-A, --on-arrive\t\tPrint message just when arrive and do not insert it to message queue\n"\
"\t\t\t\t(not compatible with -e -E)\n"
"\t\t\t\t(not compatible with -e -E)\n"\
"-N, --no-msq-body\t\tDo not print message body (should print for example color if it is tuned on)"
struct
osd_to_string_state
...
...
@@ -75,6 +78,7 @@ struct osd_to_string_state
bool
end_of_mes_time
;
bool
on_arrive
;
bool
do_not_insert_msg_to_que
;
bool
no_msg_body
;
};
char
*
expand_backslash
(
char
*
in
);
...
...
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