mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
complete largefile support
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "operations.h"
|
||||
#include "usage.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -16,11 +16,17 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h> /* for snprintf() */
|
||||
#include <string.h>
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "share/grabbag.h"
|
||||
#include <string.h>
|
||||
|
||||
static FLAC__bool import_cs_from(const char *filename, FLAC__StreamMetadata **cuesheet, const char *cs_filename, FLAC__bool *needs_write, FLAC__uint64 lead_out_offset, FLAC__bool is_cdda, Argument_AddSeekpoint *add_seekpoint_link);
|
||||
static FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cuesheet, const char *cs_filename);
|
||||
@@ -118,7 +124,7 @@ FLAC__bool import_cs_from(const char *filename, FLAC__StreamMetadata **cuesheet,
|
||||
f = fopen(cs_filename, "r");
|
||||
|
||||
if(0 == f) {
|
||||
fprintf(stderr, "%s: ERROR: can't open import file %s\n", filename, cs_filename);
|
||||
fprintf(stderr, "%s: ERROR: can't open import file %s: %s\n", filename, cs_filename, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +189,7 @@ FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cueshe
|
||||
f = fopen(cs_filename, "w");
|
||||
|
||||
if(0 == f) {
|
||||
fprintf(stderr, "%s: ERROR: can't open export file %s\n", filename, cs_filename);
|
||||
fprintf(stderr, "%s: ERROR: can't open export file %s: %s\n", filename, cs_filename, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -193,7 +199,11 @@ FLAC__bool export_cs_to(const char *filename, const FLAC__StreamMetadata *cueshe
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
_snprintf(ref, reflen, "\"%s\" FLAC", filename);
|
||||
#else
|
||||
snprintf(ref, reflen, "\"%s\" FLAC", filename);
|
||||
#endif
|
||||
|
||||
grabbag__cuesheet_emit(f, cuesheet, ref);
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "FLAC/file_decoder.h"
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
#include "FLAC/assert.h"
|
||||
|
||||
@@ -16,11 +16,16 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "options.h"
|
||||
#include "utils.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "share/grabbag.h" /* for grabbag__file_get_filesize() */
|
||||
#include "share/utf8.h"
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -195,10 +200,10 @@ FLAC__bool set_vc_field(const char *filename, FLAC__StreamMetadata *block, const
|
||||
die("out of memory allocating tag value");
|
||||
data[size] = '\0';
|
||||
if(0 == (f = fopen(field->field_value, "rb")) || fread(data, 1, size, f) != (size_t)size) {
|
||||
fprintf(stderr, "%s: ERROR: while reading file '%s' for '%s' tag value: %s\n", filename, field->field_value, field->field_name, strerror(errno));
|
||||
free(data);
|
||||
if(f)
|
||||
fclose(f);
|
||||
fprintf(stderr, "%s: ERROR: while reading file '%s' for '%s' tag value\n", filename, field->field_value, field->field_name);
|
||||
return false;
|
||||
}
|
||||
fclose(f);
|
||||
@@ -291,7 +296,7 @@ FLAC__bool import_vc_from(const char *filename, FLAC__StreamMetadata *block, con
|
||||
f = fopen(vc_filename->value, "r");
|
||||
|
||||
if(0 == f) {
|
||||
fprintf(stderr, "%s: ERROR: can't open import file %s\n", filename, vc_filename->value);
|
||||
fprintf(stderr, "%s: ERROR: can't open import file %s: %s\n", filename, vc_filename->value, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -348,7 +353,7 @@ FLAC__bool export_vc_to(const char *filename, FLAC__StreamMetadata *block, const
|
||||
f = fopen(vc_filename->value, "w");
|
||||
|
||||
if(0 == f) {
|
||||
fprintf(stderr, "%s: ERROR: can't open export file %s\n", filename, vc_filename->value);
|
||||
fprintf(stderr, "%s: ERROR: can't open export file %s: %s\n", filename, vc_filename->value, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "options.h"
|
||||
#include "usage.h"
|
||||
#include "utils.h"
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "usage.h"
|
||||
#include "FLAC/format.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
#include "FLAC/assert.h"
|
||||
#include "share/utf8.h"
|
||||
|
||||
Reference in New Issue
Block a user