Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
flac
Commits
f9cf27fc
Commit
f9cf27fc
authored
Jul 25, 2007
by
Josh Coalson
Browse files
prototype-related fixes
parent
a66c218e
Changes
17
Hide whitespace changes
Inline
Side-by-side
src/flac/local_string_utils.c
View file @
f9cf27fc
...
...
@@ -8,6 +8,7 @@
#include <string.h>
#include "utils.h"
#include "local_string_utils.h"
/* $OpenBSD: strlcpy.c,v 1.8 2003/06/17 21:56:24 millert Exp $
*
...
...
src/libFLAC/metadata_iterators.c
View file @
f9cf27fc
...
...
@@ -1198,7 +1198,7 @@ static FLAC__bool chain_read_cb_(FLAC__Metadata_Chain *chain, FLAC__IOHandle han
return
true
;
}
FLAC__StreamDecoderReadStatus
chain_read_ogg_read_cb_
(
const
FLAC__StreamDecoder
*
decoder
,
FLAC__byte
buffer
[],
size_t
*
bytes
,
void
*
client_data
)
static
FLAC__StreamDecoderReadStatus
chain_read_ogg_read_cb_
(
const
FLAC__StreamDecoder
*
decoder
,
FLAC__byte
buffer
[],
size_t
*
bytes
,
void
*
client_data
)
{
FLAC__Metadata_Chain
*
chain
=
(
FLAC__Metadata_Chain
*
)
client_data
;
(
void
)
decoder
;
...
...
@@ -2318,7 +2318,7 @@ FLAC__Metadata_SimpleIteratorStatus read_metadata_block_data_cuesheet_cb_(FLAC__
return
FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK
;
}
FLAC__Metadata_SimpleIteratorStatus
read_metadata_block_data_picture_cstring_cb_
(
FLAC__IOHandle
handle
,
FLAC__IOCallback_Read
read_cb
,
FLAC__byte
**
data
,
FLAC__uint32
*
length
,
FLAC__uint32
length_len
)
static
FLAC__Metadata_SimpleIteratorStatus
read_metadata_block_data_picture_cstring_cb_
(
FLAC__IOHandle
handle
,
FLAC__IOCallback_Read
read_cb
,
FLAC__byte
**
data
,
FLAC__uint32
*
length
,
FLAC__uint32
length_len
)
{
FLAC__byte
buffer
[
sizeof
(
FLAC__uint32
)];
...
...
src/metaflac/operations.c
View file @
f9cf27fc
...
...
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "operations_shorthand.h"
static
void
show_version
(
void
);
static
FLAC__bool
do_major_operation
(
const
CommandLineOptions
*
options
);
...
...
src/metaflac/operations_shorthand.h
0 → 100644
View file @
f9cf27fc
/* metaflac - Command-line FLAC metadata editor
* Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "options.h"
FLAC__bool
do_shorthand_operation__picture
(
const
char
*
filename
,
FLAC__Metadata_Chain
*
chain
,
const
Operation
*
operation
,
FLAC__bool
*
needs_write
);
FLAC__bool
do_shorthand_operation__cuesheet
(
const
char
*
filename
,
FLAC__Metadata_Chain
*
chain
,
const
Operation
*
operation
,
FLAC__bool
*
needs_write
);
FLAC__bool
do_shorthand_operation__add_seekpoints
(
const
char
*
filename
,
FLAC__Metadata_Chain
*
chain
,
const
char
*
specification
,
FLAC__bool
*
needs_write
);
FLAC__bool
do_shorthand_operation__streaminfo
(
const
char
*
filename
,
FLAC__bool
prefix_with_filename
,
FLAC__Metadata_Chain
*
chain
,
const
Operation
*
operation
,
FLAC__bool
*
needs_write
);
FLAC__bool
do_shorthand_operation__vorbis_comment
(
const
char
*
filename
,
FLAC__bool
prefix_with_filename
,
FLAC__Metadata_Chain
*
chain
,
const
Operation
*
operation
,
FLAC__bool
*
needs_write
,
FLAC__bool
raw
);
src/metaflac/operations_shorthand_cuesheet.c
View file @
f9cf27fc
...
...
@@ -27,6 +27,7 @@
#include "utils.h"
#include "FLAC/assert.h"
#include "share/grabbag.h"
#include "operations_shorthand.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
);
...
...
src/metaflac/operations_shorthand_picture.c
View file @
f9cf27fc
...
...
@@ -27,6 +27,8 @@
#include "FLAC/assert.h"
#include "share/grabbag.h"
/* for grabbag__picture_parse_specification() etc */
#include "operations_shorthand.h"
static
FLAC__bool
import_pic_from
(
const
char
*
filename
,
FLAC__StreamMetadata
**
picture
,
const
char
*
specification
,
FLAC__bool
*
needs_write
);
static
FLAC__bool
export_pic_to
(
const
char
*
filename
,
const
FLAC__StreamMetadata
*
picture
,
const
char
*
pic_filename
);
...
...
src/metaflac/operations_shorthand_seektable.c
View file @
f9cf27fc
...
...
@@ -25,6 +25,7 @@
#include "FLAC/stream_decoder.h"
#include "FLAC/metadata.h"
#include "share/grabbag.h"
#include "operations_shorthand.h"
static
FLAC__bool
populate_seekpoint_values
(
const
char
*
filename
,
FLAC__StreamMetadata
*
block
,
FLAC__bool
*
needs_write
);
...
...
src/metaflac/operations_shorthand_streaminfo.c
View file @
f9cf27fc
...
...
@@ -25,6 +25,7 @@
#include "FLAC/assert.h"
#include "FLAC/metadata.h"
#include <string.h>
#include "operations_shorthand.h"
FLAC__bool
do_shorthand_operation__streaminfo
(
const
char
*
filename
,
FLAC__bool
prefix_with_filename
,
FLAC__Metadata_Chain
*
chain
,
const
Operation
*
operation
,
FLAC__bool
*
needs_write
)
{
...
...
src/metaflac/operations_shorthand_vorbiscomment.c
View file @
f9cf27fc
...
...
@@ -28,6 +28,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "operations_shorthand.h"
static
FLAC__bool
remove_vc_all
(
const
char
*
filename
,
FLAC__StreamMetadata
*
block
,
FLAC__bool
*
needs_write
);
static
FLAC__bool
remove_vc_field
(
const
char
*
filename
,
FLAC__StreamMetadata
*
block
,
const
char
*
field_name
,
FLAC__bool
*
needs_write
);
...
...
src/share/utf8/iconvert.c
View file @
f9cf27fc
...
...
@@ -28,6 +28,8 @@
#include <stdlib.h>
#include <string.h>
#include "iconvert.h"
/*
* Convert data from one encoding to another. Return:
*
...
...
src/share/utf8/iconvert.h
0 → 100644
View file @
f9cf27fc
/*
* Copyright (C) 2001 Edmund Grimley Evans <edmundo@rano.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_ICONV
/*
* Convert data from one encoding to another. Return:
*
* -2 : memory allocation failed
* -1 : unknown encoding
* 0 : data was converted exactly
* 1 : data was converted inexactly
* 2 : data was invalid (but still converted)
*
* We convert in two steps, via UTF-8, as this is the only
* reliable way of distinguishing between invalid input
* and valid input which iconv refuses to transliterate.
* We convert from UTF-8 twice, because we have no way of
* knowing whether the conversion was exact if iconv returns
* E2BIG (due to a bug in the specification of iconv).
* An alternative approach is to assume that the output of
* iconv is never more than 4 times as long as the input,
* but I prefer to avoid that assumption if possible.
*/
int
iconvert
(
const
char
*
fromcode
,
const
char
*
tocode
,
const
char
*
from
,
size_t
fromlen
,
char
**
to
,
size_t
*
tolen
)
;
#endif
/* HAVE_ICONV */
src/share/utf8/utf8.c
View file @
f9cf27fc
...
...
@@ -227,9 +227,7 @@ int utf8_decode(const char *from, char **to)
#include <langinfo.h>
#endif
int
iconvert
(
const
char
*
fromcode
,
const
char
*
tocode
,
const
char
*
from
,
size_t
fromlen
,
char
**
to
,
size_t
*
tolen
);
#include "iconvert.h"
static
const
char
*
current_charset
(
void
)
{
...
...
src/test_libFLAC/bitwriter.c
View file @
f9cf27fc
...
...
@@ -22,6 +22,7 @@
#include "FLAC/assert.h"
#include "private/bitwriter.h"
/* from the libFLAC private include area */
#include "bitwriter.h"
#include <stdio.h>
#include <string.h>
/* for memcmp() */
...
...
src/test_libFLAC/format.c
View file @
f9cf27fc
...
...
@@ -22,6 +22,7 @@
#include "FLAC/assert.h"
#include "FLAC/format.h"
#include "format.h"
#include <stdio.h>
static
const
char
*
true_false_string_
[
2
]
=
{
"false"
,
"true"
};
...
...
src/test_libFLAC/metadata.h
View file @
f9cf27fc
...
...
@@ -22,5 +22,7 @@
#include "FLAC/ordinals.h"
FLAC__bool
test_metadata
(
void
);
FLAC__bool
test_metadata_file_manipulation
(
void
);
FLAC__bool
test_metadata_object
(
void
);
#endif
src/test_libFLAC/metadata_manip.c
View file @
f9cf27fc
...
...
@@ -42,6 +42,7 @@
#include "share/grabbag.h"
#include "test_libs_common/file_utils_flac.h"
#include "test_libs_common/metadata_utils.h"
#include "metadata.h"
/******************************************************************************
...
...
@@ -184,7 +185,7 @@ static void delete_from_our_metadata_(unsigned position)
* This wad of functions supports filename- and callback-based chain reading/writing.
* Everything up to set_file_stats_() is copied from libFLAC/metadata_iterators.c
*/
FLAC__bool
open_tempfile_
(
const
char
*
filename
,
FILE
**
tempfile
,
char
**
tempfilename
)
static
FLAC__bool
open_tempfile_
(
const
char
*
filename
,
FILE
**
tempfile
,
char
**
tempfilename
)
{
static
const
char
*
tempfile_suffix
=
".metadata_edit"
;
...
...
@@ -199,7 +200,7 @@ FLAC__bool open_tempfile_(const char *filename, FILE **tempfile, char **tempfile
return
true
;
}
void
cleanup_tempfile_
(
FILE
**
tempfile
,
char
**
tempfilename
)
static
void
cleanup_tempfile_
(
FILE
**
tempfile
,
char
**
tempfilename
)
{
if
(
0
!=
*
tempfile
)
{
(
void
)
fclose
(
*
tempfile
);
...
...
@@ -213,7 +214,7 @@ void cleanup_tempfile_(FILE **tempfile, char **tempfilename)
}
}
FLAC__bool
transport_tempfile_
(
const
char
*
filename
,
FILE
**
tempfile
,
char
**
tempfilename
)
static
FLAC__bool
transport_tempfile_
(
const
char
*
filename
,
FILE
**
tempfile
,
char
**
tempfilename
)
{
FLAC__ASSERT
(
0
!=
filename
);
FLAC__ASSERT
(
0
!=
tempfile
);
...
...
@@ -243,14 +244,14 @@ FLAC__bool transport_tempfile_(const char *filename, FILE **tempfile, char **tem
return
true
;
}
FLAC__bool
get_file_stats_
(
const
char
*
filename
,
struct
stat
*
stats
)
static
FLAC__bool
get_file_stats_
(
const
char
*
filename
,
struct
stat
*
stats
)
{
FLAC__ASSERT
(
0
!=
filename
);
FLAC__ASSERT
(
0
!=
stats
);
return
(
0
==
stat
(
filename
,
stats
));
}
void
set_file_stats_
(
const
char
*
filename
,
struct
stat
*
stats
)
static
void
set_file_stats_
(
const
char
*
filename
,
struct
stat
*
stats
)
{
struct
utimbuf
srctime
;
...
...
src/test_libFLAC/metadata_object.c
View file @
f9cf27fc
...
...
@@ -23,6 +23,7 @@
#include "FLAC/assert.h"
#include "FLAC/metadata.h"
#include "test_libs_common/metadata_utils.h"
#include "metadata.h"
#include <stdio.h>
#include <stdlib.h>
/* for malloc() */
#include <string.h>
/* for memcmp() */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment