1
1
/* metaflac - Command-line FLAC metadata editor
2
* Copyright (C) 2001,2002,2003 Josh Coalson
2
* Copyright (C) 2001,2002,2003,2004 Josh Coalson
4
4
* This program is free software; you can redistribute it and/or
5
5
* modify it under the terms of the GNU General Public License
123
void print_error_with_chain_status(FLAC__Metadata_Chain *chain, const char *format, ...)
125
const FLAC__Metadata_ChainStatus status = FLAC__metadata_chain_status(chain);
128
FLAC__ASSERT(0 != format);
130
va_start(args, format);
132
(void) vfprintf(stderr, format, args);
136
fprintf(stderr, ", status = \"%s\"\n", FLAC__Metadata_ChainStatusString[status]);
138
if(status == FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE) {
140
"The FLAC file could not be opened. Most likely the file does not exist\n"
141
"or is not readable.\n"
144
else if(status == FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE) {
146
"The file does not appear to be a FLAC file.\n"
149
else if(status == FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE) {
151
"The FLAC file does not have write permissions.\n"
154
else if(status == FLAC__METADATA_CHAIN_STATUS_BAD_METADATA) {
156
"The metadata to be writted does not conform to the FLAC metadata\n"
160
else if(status == FLAC__METADATA_CHAIN_STATUS_READ_ERROR) {
162
"There was an error while reading the FLAC file.\n"
165
else if(status == FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR) {
167
"There was an error while writing FLAC file; most probably the disk is\n"
171
else if(status == FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR) {
173
"There was an error removing the temporary FLAC file.\n"
122
178
FLAC__bool parse_vorbis_comment_field(const char *field_ref, char **field, char **name, char **value, unsigned *length, const char **violation)
124
180
static const char * const violations[] = {