mirror of
https://github.com/fmang/opustags.git
synced 2025-01-15 12:43:17 +01:00
--set-all: Ignore comments starting with #
This commit is contained in:
parent
a1dcc8c47e
commit
8252f94084
@ -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:
|
||||
|
@ -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);
|
||||
|
@ -179,6 +179,7 @@ ARTIST=七面鳥
|
||||
|
||||
A=A
|
||||
X=Y
|
||||
#IGNORE=COMMENTS
|
||||
END_IN
|
||||
OK=yes again
|
||||
ARTIST=七面鳥
|
||||
|
Loading…
x
Reference in New Issue
Block a user