--set-all: Ignore comments starting with #

This commit is contained in:
Frédéric Mangano-Tarumi 2020-10-10 16:27:52 +02:00
parent a1dcc8c47e
commit 8252f94084
3 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,7 @@ Delete all the previously existing tags.
Sets the tags from scratch.
All the original tags are deleted and new ones are read from standard input.
Each line must specify a \fIFIELD=VALUE\fP pair and be separated with line feeds.
Blank lines are ignored.
Blank lines and lines starting with \fI#\fP are ignored.
.SH EXAMPLES
.PP
List all the tags in file foo.opus:

View File

@ -202,6 +202,8 @@ ot::status ot::read_comments(FILE* input, std::list<std::string>& comments)
--nread;
if (nread == 0)
continue;
if (line[0] == '#') // comment
continue;
if (memchr(line, '=', nread) == nullptr) {
ot::status rc = {ot::st::error, "Malformed tag: " + std::string(line, nread)};
free(line);

View File

@ -179,6 +179,7 @@ ARTIST=七面鳥
A=A
X=Y
#IGNORE=COMMENTS
END_IN
OK=yes again
ARTIST=七面鳥