Skip to content
Snippets Groups Projects
Commit b7eca513 authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

TO_STRING --no-msg-body

parent 54c73389
Branches
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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:EaAN"
#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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment