Ran my whitespace fixing script -- tabs -> spaces, removes trailing spaces.

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@738725 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2007-11-19 14:44:09 +00:00
parent b2e2f0bdba
commit f8736f0fe9
32 changed files with 101 additions and 101 deletions

View File

@ -154,7 +154,7 @@ bool FLAC::File::save()
// A Xiph comment portion of the data stream starts with a 4-byte descriptor.
// The first byte indicates the frame type. The last three bytes are used
// to give the length of the data segment. Here we start
// to give the length of the data segment. Here we start
ByteVector data = ByteVector::fromUInt(d->xiphCommentData.size());
@ -380,7 +380,7 @@ void FLAC::File::scan()
// Header format (from spec):
// <1> Last-metadata-block flag
// <7> BLOCK_TYPE
// 0 : STREAMINFO
// 0 : STREAMINFO
// 1 : PADDING
// ..
// 4 : VORBIS_COMMENT

View File

@ -160,7 +160,7 @@ namespace TagLib {
/*!
* Set the ID3v2::FrameFactory to something other than the default. This
* can be used to specify the way that ID3v2 frames will be interpreted
* when
* when
*
* \see ID3v2FrameFactory
*/

View File

@ -68,7 +68,7 @@ FLAC::Properties::Properties(File *file, ReadStyle style) : AudioProperties(styl
{
d = new PropertiesPrivate(file->streamInfoData(), file->streamLength(), style);
read();
}
}
FLAC::Properties::~Properties()
{
@ -141,10 +141,10 @@ void FLAC::Properties::read()
pos += 4;
// Uncompressed bitrate:
//d->bitrate = ((d->sampleRate * d->channels) / 1000) * d->sampleWidth;
// Real bitrate:
d->bitrate = d->length > 0 ? ((d->streamLength * 8L) / d->length) / 1000 : 0;
}

View File

@ -34,7 +34,7 @@ class AttachedPictureFrame::AttachedPictureFramePrivate
{
public:
AttachedPictureFramePrivate() : textEncoding(String::Latin1),
type(AttachedPictureFrame::Other) {}
type(AttachedPictureFrame::Other) {}
String::Type textEncoding;
String mimeType;

View File

@ -140,7 +140,7 @@ void GeneralEncapsulatedObjectFrame::parseFields(const ByteVector &data)
d->textEncoding = String::Type(data[0]);
int pos = 1;
int pos = 1;
d->mimeType = readStringField(data, String::Latin1, &pos);
d->fileName = readStringField(data, d->textEncoding, &pos);

View File

@ -39,9 +39,9 @@ namespace TagLib {
//! An ID3v2 general encapsulated object frame implementation
/*!
* This is an implementation of ID3v2 general encapsulated objects.
* This is an implementation of ID3v2 general encapsulated objects.
* Arbitrary binary data may be included in tags, stored in GEOB frames.
* There may be multiple GEOB frames in a single tag. Each GEOB it
* There may be multiple GEOB frames in a single tag. Each GEOB it
* labelled with a content description (which may be blank), a required
* mime-type, and a file name (may be blank). The content description
* uniquely identifies the GEOB frame in the tag.

View File

@ -211,7 +211,7 @@ ByteVector RelativeVolumeFrame::renderFields() const
data.append(textDelimiter(String::Latin1));
Map<ChannelType, ChannelData>::ConstIterator it = d->channels.begin();
for(; it != d->channels.end(); ++it) {
ChannelType type = (*it).first;
const ChannelData &channel = (*it).second;

View File

@ -125,7 +125,7 @@ namespace TagLib {
/*!
* Returns a list of channels with information currently in the frame.
*/
*/
List<ChannelType> channels() const;
/*!

View File

@ -261,7 +261,7 @@ UserTextIdentificationFrame::UserTextIdentificationFrame(const ByteVector &data,
void UserTextIdentificationFrame::checkFields()
{
int fields = fieldList().size();
if(fields == 0)
setDescription(String::null);
if(fields <= 1)

View File

@ -99,8 +99,8 @@ namespace TagLib {
virtual ByteVector renderFields() const;
private:
UniqueFileIdentifierFrame(const UniqueFileIdentifierFrame &);
UniqueFileIdentifierFrame &operator=(UniqueFileIdentifierFrame &);
UniqueFileIdentifierFrame(const UniqueFileIdentifierFrame &);
UniqueFileIdentifierFrame &operator=(UniqueFileIdentifierFrame &);
UniqueFileIdentifierFrame(const ByteVector &data, Header *h);

View File

@ -430,7 +430,7 @@ bool MPEG::File::strip(int tags, bool freeMemory)
d->ID3v1Location = findID3v1();
// APE tag location has changed, update if it exists
if(d->APETag)
d->APELocation = findAPE();
}

View File

@ -204,7 +204,7 @@ void MPEG::Properties::read()
// VBR stream.
int xingHeaderOffset = MPEG::XingHeader::xingHeaderOffset(firstHeader.version(),
firstHeader.channelMode());
firstHeader.channelMode());
d->file->seek(first + xingHeaderOffset);
d->xingHeader = new XingHeader(d->file->readBlock(16));

View File

@ -45,7 +45,7 @@ public:
bool valid;
};
MPEG::XingHeader::XingHeader(const ByteVector &data)
MPEG::XingHeader::XingHeader(const ByteVector &data)
{
d = new XingHeaderPrivate;
parse(data);

View File

@ -40,7 +40,7 @@ namespace TagLib {
/*!
* This class implements Ogg page headers which contain the information
* about Ogg pages needed to break them into packets which can be passed on
* about Ogg pages needed to break them into packets which can be passed on
* to the codecs.
*/

View File

@ -104,7 +104,7 @@ namespace TagLib {
/*
* To keep compatibility with the current version put Vorbis in the Ogg namespace
* only in the docs and provide a typedef to make it work. In the next BIC
* version this will be removed and it will only exist in the Ogg namespace.
* version this will be removed and it will only exist in the Ogg namespace.
*/
#ifdef DOXYGEN

View File

@ -111,7 +111,7 @@ namespace TagLib {
/*
* To keep compatibility with the current version put Vorbis in the Ogg namespace
* only in the docs and provide a typedef to make it work. In the next BIC
* version this will be removed and it will only exist in the Ogg namespace.
* version this will be removed and it will only exist in the Ogg namespace.
*/
#ifdef DOXYGEN

View File

@ -83,12 +83,12 @@ String Ogg::XiphComment::comment() const
{
if(!d->fieldListMap["DESCRIPTION"].isEmpty()) {
d->commentField = "DESCRIPTION";
return d->fieldListMap["DESCRIPTION"].front();
return d->fieldListMap["DESCRIPTION"].front();
}
if(!d->fieldListMap["COMMENT"].isEmpty()) {
d->commentField = "COMMENT";
return d->fieldListMap["COMMENT"].front();
return d->fieldListMap["COMMENT"].front();
}
return String::null;
@ -263,7 +263,7 @@ ByteVector Ogg::XiphComment::render(bool addFramingBit) const
}
// Append the "framing bit".
if(addFramingBit)
data.append(char(1));

View File

@ -164,7 +164,7 @@ namespace TagLib {
/*!
* Returns true if the field is contained within the comment.
*
* \note This is safer than checking for membership in the FieldListMap.
* \note This is safer than checking for membership in the FieldListMap.
*/
bool contains(const String &key) const;

View File

@ -1,9 +1,9 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
email : wheeler@kde.org
(original Vorbis implementation)
***************************************************************************/
@ -96,12 +96,12 @@ bool Speex::File::save()
void Speex::File::read(bool readProperties, Properties::ReadStyle propertiesStyle)
{
ByteVector speexHeaderData = packet(0);
if(!speexHeaderData.startsWith("Speex ")) {
debug("Speex::File::read() -- invalid Speex identification header");
return;
}
ByteVector commentHeaderData = packet(1);
d->comment = new Ogg::XiphComment(commentHeaderData);

View File

@ -1,9 +1,9 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
email : wheeler@kde.org
(original Vorbis implementation)
***************************************************************************/

View File

@ -1,9 +1,9 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
email : wheeler@kde.org
(original Vorbis implementation)
***************************************************************************/
@ -114,41 +114,41 @@ void Speex::Properties::read()
int pos = 28;
// speex_version_id; /**< Version for Speex (for checking compatibility) */
// speex_version_id; /**< Version for Speex (for checking compatibility) */
d->speexVersion = data.mid(pos, 4).toUInt(false);
pos += 4;
// header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */
// header_size; /**< Total size of the header ( sizeof(SpeexHeader) ) */
pos += 4;
// rate; /**< Sampling rate used */
// rate; /**< Sampling rate used */
d->sampleRate = data.mid(pos, 4).toUInt(false);
pos += 4;
// mode; /**< Mode used (0 for narrowband, 1 for wideband) */
// mode; /**< Mode used (0 for narrowband, 1 for wideband) */
d->mode = data.mid(pos, 4).toUInt(false);
pos += 4;
// mode_bitstream_version; /**< Version ID of the bit-stream */
// mode_bitstream_version; /**< Version ID of the bit-stream */
pos += 4;
// nb_channels; /**< Number of channels encoded */
// nb_channels; /**< Number of channels encoded */
d->channels = data.mid(pos, 4).toUInt(false);
pos += 4;
// bitrate; /**< Bit-rate used */
// bitrate; /**< Bit-rate used */
d->bitrate = data.mid(pos, 4).toUInt(false);
pos += 4;
// frame_size; /**< Size of frames */
//unsigned int frameSize = data.mid(pos, 4).toUInt(false);
pos += 4;
// vbr; /**< 1 for a VBR encoding, 0 otherwise */
// vbr; /**< 1 for a VBR encoding, 0 otherwise */
d->vbr = data.mid(pos, 4).toUInt(false) == 1;
pos += 4;
// frames_per_packet; /**< Number of frames stored per Ogg packet */
// frames_per_packet; /**< Number of frames stored per Ogg packet */
//unsigned int framesPerPacket = data.mid(pos, 4).toUInt(false);
const Ogg::PageHeader *first = d->file->firstPageHeader();

View File

@ -1,9 +1,9 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2002 by Scott Wheeler
email : wheeler@kde.org
email : wheeler@kde.org
(original Vorbis implementation)
***************************************************************************/

View File

@ -556,10 +556,10 @@ long File::length()
return 0;
long curpos = tell();
seek(0, End);
long endpos = tell();
seek(curpos, Beginning);
d->size = endpos;

View File

@ -163,7 +163,7 @@ const T &Map<Key, T>::operator[](const Key &key) const
template <class Key, class T>
T &Map<Key, T>::operator[](const Key &key)
{
detach();
detach();
return d->map[key];
}

View File

@ -1,7 +1,7 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
@ -46,7 +46,7 @@ public:
ID3v2FrameFactory(frameFactory),
ID3v2Tag(0),
ID3v2Location(-1),
ID3v2OriginalSize(0),
ID3v2OriginalSize(0),
ID3v1Tag(0),
ID3v1Location(-1),
tag(0),
@ -66,7 +66,7 @@ public:
const ID3v2::FrameFactory *ID3v2FrameFactory;
ID3v2::Tag *ID3v2Tag;
long ID3v2Location;
uint ID3v2OriginalSize;
uint ID3v2OriginalSize;
ID3v1::Tag *ID3v1Tag;
long ID3v1Location;
@ -102,7 +102,7 @@ TrueAudio::File::File(FileName file, ID3v2::FrameFactory *frameFactory,
d = new FilePrivate(frameFactory);
if(isOpen())
read(readProperties, propertiesStyle);
}
}
TrueAudio::File::~File()
{
@ -123,7 +123,7 @@ void TrueAudio::File::setID3v2FrameFactory(const ID3v2::FrameFactory *factory)
{
d->ID3v2FrameFactory = factory;
}
bool TrueAudio::File::save()
{
if(readOnly()) {
@ -145,7 +145,7 @@ bool TrueAudio::File::save()
removeBlock(d->ID3v2Location, d->ID3v2OriginalSize);
d->hasID3v2 = false;
}
// Update ID3v1 tag
if(d->ID3v1Tag) {
@ -153,7 +153,7 @@ bool TrueAudio::File::save()
seek(0, End);
d->ID3v1Location = tell();
}
else
else
seek(d->ID3v1Location);
writeBlock(d->ID3v1Tag->render());
d->hasID3v1 = true;
@ -215,7 +215,7 @@ void TrueAudio::File::remove(int tags)
if(tags & ID3v2) {
delete d->ID3v2Tag;
d->ID3v2Tag = 0;
if(d->ID3v1Tag)
d->tag = d->ID3v1Tag;
else
@ -235,17 +235,17 @@ void TrueAudio::File::read(bool readProperties, Properties::ReadStyle /* propert
d->ID3v2Location = findID3v2();
if(d->ID3v2Location >= 0) {
d->ID3v2Tag = new ID3v2::Tag(this, d->ID3v2Location, d->ID3v2FrameFactory);
d->ID3v2OriginalSize = d->ID3v2Tag->header()->completeTagSize();
if(d->ID3v2Tag->header()->tagSize() <= 0) {
delete d->ID3v2Tag;
d->ID3v2Tag = 0;
}
else
d->hasID3v2 = true;
d->hasID3v2 = true;
}
// Look for an ID3v1 tag
@ -256,7 +256,7 @@ void TrueAudio::File::read(bool readProperties, Properties::ReadStyle /* propert
d->ID3v1Tag = new ID3v1::Tag(this, d->ID3v1Location);
d->hasID3v1 = true;
}
if(d->hasID3v1 && d->hasID3v2)
d->tag = new CombinedTag(d->ID3v2Tag, d->ID3v1Tag);
else {
@ -302,6 +302,6 @@ long TrueAudio::File::findID3v2()
if(readBlock(3) == ID3v2::Header::fileIdentifier())
return 0;
return -1;
}
}

View File

@ -1,7 +1,7 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
@ -46,7 +46,7 @@ namespace TagLib {
* This is implementation of TrueAudio metadata.
*
* This supports ID3v1 and ID3v2 tags as well as reading stream
* properties from the file.
* properties from the file.
*/
namespace TrueAudio {
@ -90,7 +90,7 @@ namespace TagLib {
* Contructs an TrueAudio file from \a file. If \a readProperties is true the
* file's audio properties will also be read using \a propertiesStyle. If
* false, \a propertiesStyle is ignored. The frames will be created using
* \a frameFactory.
* \a frameFactory.
*/
File(FileName file, ID3v2::FrameFactory *frameFactory,
bool readProperties = true,
@ -117,7 +117,7 @@ namespace TagLib {
*
* \see ID3v2FrameFactory
*/
void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
void setID3v2FrameFactory(const ID3v2::FrameFactory *factory);
/*!
* Saves the file.

View File

@ -1,7 +1,7 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)

View File

@ -1,7 +1,7 @@
/***************************************************************************
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)

View File

@ -2,8 +2,8 @@
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
***************************************************************************/
@ -33,10 +33,10 @@
#include "wavpackfile.h"
#include "id3v1tag.h"
#include "id3v2header.h"
#include "id3v2header.h"
#include "apetag.h"
#include "apefooter.h"
#include "combinedtag.h"
#include "combinedtag.h"
using namespace TagLib;
@ -49,7 +49,7 @@ public:
APESize(0),
ID3v1Tag(0),
ID3v1Location(-1),
tag(0),
tag(0),
properties(0),
scanned(false),
hasAPE(false),
@ -58,7 +58,7 @@ public:
~FilePrivate()
{
if (tag != ID3v1Tag && tag != APETag) delete tag;
delete ID3v1Tag;
delete ID3v1Tag;
delete APETag;
delete properties;
}
@ -68,7 +68,7 @@ public:
uint APESize;
ID3v1::Tag *ID3v1Tag;
long ID3v1Location;
long ID3v1Location;
Tag *tag;
@ -79,7 +79,7 @@ public:
// this data structure does. This is used in computing offsets.
bool hasAPE;
bool hasID3v1;
bool hasID3v1;
};
////////////////////////////////////////////////////////////////////////////////
@ -169,7 +169,7 @@ bool WavPack::File::save()
d->ID3v1Location -= d->APESize;
}
}
return true;
}
@ -228,7 +228,7 @@ void WavPack::File::remove(int tags)
else
d->tag = d->APETag = new APE::Tag;
}
}
}
////////////////////////////////////////////////////////////////////////////////
// private members
@ -244,7 +244,7 @@ void WavPack::File::read(bool readProperties, Properties::ReadStyle /* propertie
d->ID3v1Tag = new ID3v1::Tag(this, d->ID3v1Location);
d->hasID3v1 = true;
}
// Look for an APE tag
d->APELocation = findAPE();
@ -267,7 +267,7 @@ void WavPack::File::read(bool readProperties, Properties::ReadStyle /* propertie
else
d->tag = d->APETag = new APE::Tag;
}
}
}
// Look for WavPack audio properties
@ -308,4 +308,4 @@ long WavPack::File::findID3v1()
return p;
return -1;
}
}

View File

@ -2,8 +2,8 @@
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
***************************************************************************/
@ -47,7 +47,7 @@ namespace TagLib {
* This is implementation of WavPack metadata.
*
* This supports ID3v1 and APE (v1 and v2) style comments as well as reading stream
* properties from the file.
* properties from the file.
*/
namespace WavPack {
@ -95,7 +95,7 @@ namespace TagLib {
/*!
* Returns the Tag for this file. This will be an APE tag, an ID3v1 tag
* or a combination of the two.
*/
*/
virtual TagLib::Tag *tag() const;
/*!
@ -121,14 +121,14 @@ namespace TagLib {
* deleted by the user. It will be deleted when the file (object) is
* destroyed.
*/
ID3v1::Tag *ID3v1Tag(bool create = false);
ID3v1::Tag *ID3v1Tag(bool create = false);
/*!
* Returns a pointer to the APE tag of the file.
*
* If \a create is false (the default) this will return a null pointer
* if there is no valid APE tag. If \a create is true it will create
* a APE tag if one does not exist.
* a APE tag if one does not exist.
*
* \note The Tag <b>is still</b> owned by the APE::File and should not be
* deleted by the user. It will be deleted when the file (object) is
@ -144,15 +144,15 @@ namespace TagLib {
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/
void remove(int tags = AllTags);
void remove(int tags = AllTags);
private:
File(const File &);
File &operator=(const File &);
void read(bool readProperties, Properties::ReadStyle propertiesStyle);
void scan();
long findID3v1();
long findID3v1();
long findAPE();
class FilePrivate;

View File

@ -2,8 +2,8 @@
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
***************************************************************************/
@ -41,7 +41,7 @@ class WavPack::Properties::PropertiesPrivate
public:
PropertiesPrivate(const ByteVector &d, long length, ReadStyle s) :
data(d),
streamLength(length),
streamLength(length),
style(s),
length(0),
bitrate(0),
@ -51,7 +51,7 @@ public:
bitsPerSample(0) {}
ByteVector data;
long streamLength;
long streamLength;
ReadStyle style;
int length;
int bitrate;

View File

@ -2,8 +2,8 @@
copyright : (C) 2006 by Lukáš Lalinský
email : lalinsky@gmail.com
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
copyright : (C) 2004 by Allan Sandfeld Jensen
email : kde@carewolf.org
(original MPC implementation)
***************************************************************************/