Commit 3002b048 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Converted tabs to spaces.

parent 8545b515
......@@ -27,7 +27,7 @@ macro (kid3_create_handbook _docbook)
)
else (WIN32)
add_custom_command(OUTPUT ${_output}
COMMAND
COMMAND
${PERL_EXECUTABLE} ${_fixdocbook_pl} <${_input} |
${XSLTPROC} --novalid --nonet ${_docbook_xsl} - |
${PERL_EXECUTABLE} -n ${_fixhtml_pl} >${_output}
......
......@@ -5,29 +5,29 @@ if (HAVE_TAGLIB)
endif (HAVE_TAGLIB)
set(kid3_SRCS filelist.cpp fileproxymodel.cpp frame.cpp framelist.cpp
modeliterator.cpp taggedfileiconprovider.cpp comboboxdelegate.cpp
frametable.cpp frametablemodel.cpp genres.cpp kid3application.cpp
kid3form.cpp kid3mainwindow.cpp main.cpp m4afile.cpp
mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp
importdialog.cpp importparser.cpp generalconfig.cpp
importconfig.cpp miscconfig.cpp freedbconfig.cpp
freedbimporter.cpp rendirdialog.cpp dirlist.cpp dirproxymodel.cpp taggedfile.cpp
musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp
numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp
commandstablemodel.cpp taglibfile.cpp serverimporterconfig.cpp
serverimportdialog.cpp importclient.cpp serverimporter.cpp
discogsimporter.cpp discogsconfig.cpp
musicbrainzreleaseimporter.cpp externalprocess.cpp trackdata.cpp trackdatamodel.cpp
stringlistedit.cpp tracktypeimporter.cpp filterconfig.cpp
filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp
formatreplacer.cpp httpclient.cpp downloaddialog.cpp downloadclient.cpp picturelabel.cpp
browsecoverartdialog.cpp configtable.cpp configtablemodel.cpp
attributedata.cpp browserdialog.cpp imageviewer.cpp editframedialog.cpp
editframefieldsdialog.cpp playlistdialog.cpp playlistconfig.cpp
playlistcreator.cpp amazonimporter.cpp amazonconfig.cpp
recentfilesmenu.cpp playtoolbar.cpp textimporter.cpp textimportdialog.cpp
trackdatamatcher.cpp tagimportdialog.cpp configstore.cpp contexthelp.cpp
iframeeditor.cpp textexporter.cpp dirrenamer.cpp)
modeliterator.cpp taggedfileiconprovider.cpp comboboxdelegate.cpp
frametable.cpp frametablemodel.cpp genres.cpp kid3application.cpp
kid3form.cpp kid3mainwindow.cpp main.cpp m4afile.cpp
mp3file.cpp configdialog.cpp exportdialog.cpp formatconfig.cpp formatbox.cpp
importdialog.cpp importparser.cpp generalconfig.cpp
importconfig.cpp miscconfig.cpp freedbconfig.cpp
freedbimporter.cpp rendirdialog.cpp dirlist.cpp dirproxymodel.cpp taggedfile.cpp
musicbrainzdialog.cpp musicbrainzconfig.cpp musicbrainzclient.cpp
numbertracksdialog.cpp oggfile.cpp vcedit.c flacfile.cpp
commandstablemodel.cpp taglibfile.cpp serverimporterconfig.cpp
serverimportdialog.cpp importclient.cpp serverimporter.cpp
discogsimporter.cpp discogsconfig.cpp
musicbrainzreleaseimporter.cpp externalprocess.cpp trackdata.cpp trackdatamodel.cpp
stringlistedit.cpp tracktypeimporter.cpp filterconfig.cpp
filterdialog.cpp filefilter.cpp expressionparser.cpp pictureframe.cpp
formatreplacer.cpp httpclient.cpp downloaddialog.cpp downloadclient.cpp picturelabel.cpp
browsecoverartdialog.cpp configtable.cpp configtablemodel.cpp
attributedata.cpp browserdialog.cpp imageviewer.cpp editframedialog.cpp
editframefieldsdialog.cpp playlistdialog.cpp playlistconfig.cpp
playlistcreator.cpp amazonimporter.cpp amazonconfig.cpp
recentfilesmenu.cpp playtoolbar.cpp textimporter.cpp textimportdialog.cpp
trackdatamatcher.cpp tagimportdialog.cpp configstore.cpp contexthelp.cpp
iframeeditor.cpp textexporter.cpp dirrenamer.cpp)
if (HAVE_QTDBUS)
set(kid3_SRCS ${kid3_SRCS} scriptinterface.cpp)
......@@ -55,8 +55,8 @@ if (WITH_KDE)
kde4_add_executable(kid3 ${kid3_SRCS})
target_link_libraries(kid3 ${TAGLIBEXT_LIBRARIES} ${BASIC_LIBRARIES}
${ID3LIB_LIBRARIES} ${TAGLIB_LIBRARIES} ${VORBIS_LIBRARIES} ${FLAC_LIBRARIES}
${TUNEPIMP_LIBRARIES} ${MP4V2_LIBRARIES})
${ID3LIB_LIBRARIES} ${TAGLIB_LIBRARIES} ${VORBIS_LIBRARIES} ${FLAC_LIBRARIES}
${TUNEPIMP_LIBRARIES} ${MP4V2_LIBRARIES})
install(TARGETS kid3 DESTINATION ${BIN_INSTALL_DIR})
install(FILES kid3.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
......@@ -69,12 +69,12 @@ else (WITH_KDE)
if (APPLE)
# Icon and properties for .plist file
set(MACOSX_BUNDLE_ICON_FILE kid3.icns)
set(MACOSX_BUNDLE_ICON_FILE kid3.icns)
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "1.6")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "net.sourceforge.kid3")
set(MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2003-2011 Urs Fleisch")
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/../macosx/kid3.icns
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/../macosx/kid3.icns
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(kid3_SRCS ${kid3_SRCS} ${CMAKE_CURRENT_SOURCE_DIR}/../macosx/kid3.icns)
elseif (WIN32)
if (MINGW)
......@@ -91,38 +91,38 @@ endif (APPLE)
if (UNIX AND NOT APPLE)
# install desktop file and icons for Linux
add_custom_command(OUTPUT kid3-qt.desktop
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fixdesktop.pl
<${CMAKE_CURRENT_SOURCE_DIR}/kid3.desktop >kid3-qt.desktop
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fixdesktop.pl
<${CMAKE_CURRENT_SOURCE_DIR}/kid3.desktop >kid3-qt.desktop
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kid3.desktop
)
add_custom_target("desktop-file" ALL DEPENDS kid3-qt.desktop)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kid3-qt.desktop
DESTINATION "${WITH_DATAROOTDIR}/applications")
install(FILES hisc-app-kid3.svgz
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/scalable/apps"
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kid3-qt.desktop
DESTINATION "${WITH_DATAROOTDIR}/applications")
install(FILES hisc-app-kid3.svgz
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/scalable/apps"
RENAME kid3-qt.svgz)
install(FILES hi48-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/48x48/apps"
install(FILES hi48-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/48x48/apps"
RENAME kid3-qt.png)
install(FILES hi32-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/32x32/apps"
install(FILES hi32-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/32x32/apps"
RENAME kid3-qt.png)
install(FILES hi16-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/16x16/apps"
install(FILES hi16-app-kid3.png
DESTINATION "${WITH_DATAROOTDIR}/icons/hicolor/16x16/apps"
RENAME kid3-qt.png)
endif (UNIX AND NOT APPLE)
# Run moc on Q_OBJECT header files
set(kid3_MOC_HDRS filelist.h frametable.h frametablemodel.h kid3application.h
kid3form.h kid3mainwindow.h configdialog.h
exportdialog.h formatbox.h importdialog.h rendirdialog.h
musicbrainzdialog.h musicbrainzclient.h numbertracksdialog.h
serverimportdialog.h importclient.h serverimporter.h externalprocess.h stringlistedit.h
filterdialog.h filefilter.h httpclient.h downloaddialog.h downloadclient.h
browsecoverartdialog.h configtable.h browserdialog.h imageviewer.h
editframedialog.h editframefieldsdialog.h playlistdialog.h recentfilesmenu.h
playtoolbar.h fileproxymodel.h trackdatamodel.h textimportdialog.h
tagimportdialog.h)
kid3form.h kid3mainwindow.h configdialog.h
exportdialog.h formatbox.h importdialog.h rendirdialog.h
musicbrainzdialog.h musicbrainzclient.h numbertracksdialog.h
serverimportdialog.h importclient.h serverimporter.h externalprocess.h stringlistedit.h
filterdialog.h filefilter.h httpclient.h downloaddialog.h downloadclient.h
browsecoverartdialog.h configtable.h browserdialog.h imageviewer.h
editframedialog.h editframefieldsdialog.h playlistdialog.h recentfilesmenu.h
playtoolbar.h fileproxymodel.h trackdatamodel.h textimportdialog.h
tagimportdialog.h)
if (HAVE_QTDBUS)
set(kid3_MOC_HDRS ${kid3_MOC_HDRS} scriptinterface.h)
endif (HAVE_QTDBUS)
......@@ -132,12 +132,12 @@ add_definitions(${QT_DEFINITIONS})
set(kid3_RESOURCES kid3.qrc)
qt4_add_resources(kid3_GEN_RCS ${kid3_RESOURCES})
add_executable(${KID3_EXECUTABLE} MACOSX_BUNDLE WIN32 ${kid3_SRCS}
${kid3_GEN_MOC_HDRS} ${kid3_GEN_RCS})
${kid3_GEN_MOC_HDRS} ${kid3_GEN_RCS})
target_link_libraries(${KID3_EXECUTABLE} ${TAGLIBEXT_LIBRARIES}
${BASIC_LIBRARIES} ${ID3LIB_LIBRARIES} ${TAGLIB_LIBRARIES} ${VORBIS_LIBRARIES}
${FLAC_LIBRARIES} ${TUNEPIMP_LIBRARIES} ${MP4V2_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
${BASIC_LIBRARIES} ${ID3LIB_LIBRARIES} ${TAGLIB_LIBRARIES} ${VORBIS_LIBRARIES}
${FLAC_LIBRARIES} ${TUNEPIMP_LIBRARIES} ${MP4V2_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
install(TARGETS ${KID3_EXECUTABLE}
BUNDLE DESTINATION .
......@@ -164,8 +164,8 @@ if (APPLE OR WIN32)
PATTERN "*jpeg4${CMAKE_SHARED_LIBRARY_SUFFIX}")
if (HAVE_PHONON)
install(DIRECTORY "${QT_PLUGINS_DIR}/phonon_backend"
DESTINATION ${plugin_dest_dir}
install(DIRECTORY "${QT_PLUGINS_DIR}/phonon_backend"
DESTINATION ${plugin_dest_dir}
FILES_MATCHING
PATTERN "*d4${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
......
......@@ -34,9 +34,9 @@
* @param grp configuration group
*/
AmazonConfig::AmazonConfig(const QString& grp) :
ServerImporterConfig(grp, false, true)
ServerImporterConfig(grp, false, true)
{
m_server = "www.amazon.com:80";
m_server = "www.amazon.com:80";
}
/**
......
......@@ -34,18 +34,18 @@
*/
class AmazonConfig : public ServerImporterConfig {
public:
/**
* Constructor.
* Set default configuration.
*
* @param grp configuration group
*/
AmazonConfig(const QString& grp);
/**
* Constructor.
* Set default configuration.
*
* @param grp configuration group
*/
AmazonConfig(const QString& grp);
/**
* Destructor.
*/
virtual ~AmazonConfig();
/**
* Destructor.
*/
virtual ~AmazonConfig();
};
#endif // AMAZONCONFIG_H
This diff is collapsed.
......@@ -35,76 +35,76 @@
class AmazonImporter : public ServerImporter
{
public:
/**
* Constructor.
*
* @param parent parent object
* @param trackDataModel track data to be filled with imported values
*/
AmazonImporter(QObject* parent,
TrackDataModel* trackDataModel);
/**
* Constructor.
*
* @param parent parent object
* @param trackDataModel track data to be filled with imported values
*/
AmazonImporter(QObject* parent,
TrackDataModel* trackDataModel);
/**
* Destructor.
*/
virtual ~AmazonImporter();
/**
* Destructor.
*/
virtual ~AmazonImporter();
/**
* Name of import source.
* @return name.
*/
virtual QString name() const;
/**
* Name of import source.
* @return name.
*/
virtual QString name() const;
/** NULL-terminated array of server strings, 0 if not used */
virtual const char** serverList() const;
/** NULL-terminated array of server strings, 0 if not used */
virtual const char** serverList() const;
/** default server, 0 to disable */
virtual const char* defaultServer() const;
/** default server, 0 to disable */
virtual const char* defaultServer() const;
/** anchor to online help, 0 to disable */
virtual const char* helpAnchor() const;
/** anchor to online help, 0 to disable */
virtual const char* helpAnchor() const;
/** configuration, 0 if not used */
virtual ServerImporterConfig* config() const;
/** configuration, 0 if not used */
virtual ServerImporterConfig* config() const;
/** additional tags option, false if not used */
virtual bool additionalTags() const;
/** additional tags option, false if not used */
virtual bool additionalTags() const;
/**
* Process finished findCddbAlbum request.
*
* @param searchStr search data received
*/
virtual void parseFindResults(const QByteArray& searchStr);
/**
* Process finished findCddbAlbum request.
*
* @param searchStr search data received
*/
virtual void parseFindResults(const QByteArray& searchStr);
/**
* Parse result of album request and populate m_trackDataModel with results.
*
* @param albumStr album data received
*/
virtual void parseAlbumResults(const QByteArray& albumStr);
/**
* Parse result of album request and populate m_trackDataModel with results.
*
* @param albumStr album data received
*/
virtual void parseAlbumResults(const QByteArray& albumStr);
/**
* Send a query command to search on the server.
*
* @param cfg import source configuration
* @param artist artist to search
* @param album album to search
*/
virtual void sendFindQuery(
const ServerImporterConfig* cfg,
const QString& artist, const QString& album);
/**
* Send a query command to search on the server.
*
* @param cfg import source configuration
* @param artist artist to search
* @param album album to search
*/
virtual void sendFindQuery(
const ServerImporterConfig* cfg,
const QString& artist, const QString& album);
/**
* Send a query command to fetch the track list
* from the server.
*
* @param cfg import source configuration
* @param cat category
* @param id ID
*/
virtual void sendTrackListQuery(
const ServerImporterConfig* cfg, const QString& cat, const QString& id);
/**
* Send a query command to fetch the track list
* from the server.
*
* @param cfg import source configuration
* @param cat category
* @param id ID
*/
virtual void sendTrackListQuery(
const ServerImporterConfig* cfg, const QString& cat, const QString& id);
};
#endif
......@@ -34,63 +34,63 @@
*/
AttributeData::AttributeData(const QString& name)
{
/** PRIV-owner and type of Windows media PRIV frames */
static const struct TypeOfWmPriv {
const char* str;
Type type;
} typeOfWmPriv[] = {
{ "AverageLevel", DWord },
{ "PeakValue", DWord },
{ "WM/AlbumArtist", Utf16 },
{ "WM/AuthorURL", Utf16 },
{ "WM/BeatsPerMinute", Utf16 },
{ "WM/Composer", Utf16 },
{ "WM/Conductor", Utf16 },
{ "WM/ContentDistributor", Utf16 },
{ "WM/ContentGroupDescription", Utf16 },
{ "WM/EncodedBy", Utf16 },
{ "WM/EncodingSettings", Utf16 },
{ "WM/EncodingTime", Binary },
{ "WM/Genre", Utf16 },
{ "WM/InitialKey", Utf16 },
{ "WM/Language", Utf16 },
{ "WM/Lyrics", Utf16 },
{ "WM/Lyrics_Synchronised", Binary },
{ "WM/MCDI", Binary },
{ "WM/MediaClassPrimaryID", Guid },
{ "WM/MediaClassSecondaryID", Guid },
{ "WM/Mood", Utf16 },
{ "WM/ParentalRating", Utf16 },
{ "WM/PartOfSet", Utf16 },
{ "WM/Period", Utf16 },
{ "WM/Picture", Binary },
{ "WM/Producer", Utf16 },
{ "WM/PromotionURL", Utf16 },
{ "WM/Provider", Utf16 },
{ "WM/Publisher", Utf16 },
{ "WM/SubTitle", Utf16 },
{ "WM/ToolName", Utf16 },
{ "WM/ToolVersion", Utf16 },
{ "WM/TrackNumber", Utf16 },
{ "WM/UniqueFileIdentifier", Utf16 },
{ "WM/UserWebURL", Binary },
{ "WM/WMCollectionGroupID", Guid },
{ "WM/WMCollectionID", Guid },
{ "WM/WMContentID", Guid },
{ "WM/Writer", Utf16 }
};
/** PRIV-owner and type of Windows media PRIV frames */
static const struct TypeOfWmPriv {
const char* str;
Type type;
} typeOfWmPriv[] = {
{ "AverageLevel", DWord },
{ "PeakValue", DWord },
{ "WM/AlbumArtist", Utf16 },
{ "WM/AuthorURL", Utf16 },
{ "WM/BeatsPerMinute", Utf16 },
{ "WM/Composer", Utf16 },
{ "WM/Conductor", Utf16 },
{ "WM/ContentDistributor", Utf16 },
{ "WM/ContentGroupDescription", Utf16 },
{ "WM/EncodedBy", Utf16 },
{ "WM/EncodingSettings", Utf16 },
{ "WM/EncodingTime", Binary },
{ "WM/Genre", Utf16 },
{ "WM/InitialKey", Utf16 },
{ "WM/Language", Utf16 },
{ "WM/Lyrics", Utf16 },
{ "WM/Lyrics_Synchronised", Binary },
{ "WM/MCDI", Binary },
{ "WM/MediaClassPrimaryID", Guid },
{ "WM/MediaClassSecondaryID", Guid },
{ "WM/Mood", Utf16 },
{ "WM/ParentalRating", Utf16 },
{ "WM/PartOfSet", Utf16 },
{ "WM/Period", Utf16 },
{ "WM/Picture", Binary },
{ "WM/Producer", Utf16 },
{ "WM/PromotionURL", Utf16 },
{ "WM/Provider", Utf16 },
{ "WM/Publisher", Utf16 },
{ "WM/SubTitle", Utf16 },
{ "WM/ToolName", Utf16 },
{ "WM/ToolVersion", Utf16 },
{ "WM/TrackNumber", Utf16 },
{ "WM/UniqueFileIdentifier", Utf16 },
{ "WM/UserWebURL", Binary },
{ "WM/WMCollectionGroupID", Guid },
{ "WM/WMCollectionID", Guid },
{ "WM/WMContentID", Guid },
{ "WM/Writer", Utf16 }
};
static QMap<QString, int> strNumMap;
if (strNumMap.empty()) {
// first time initialization
for (unsigned i = 0; i < sizeof(typeOfWmPriv) / sizeof(typeOfWmPriv[0]);
++i) {
strNumMap.insert(QString(typeOfWmPriv[i].str), typeOfWmPriv[i].type);
}
}
QMap<QString, int>::const_iterator it =
strNumMap.find(name);
m_type = (it != strNumMap.end()) ? static_cast<Type>(*it) : Unknown;
static QMap<QString, int> strNumMap;
if (strNumMap.empty()) {
// first time initialization
for (unsigned i = 0; i < sizeof(typeOfWmPriv) / sizeof(typeOfWmPriv[0]);
++i) {
strNumMap.insert(QString(typeOfWmPriv[i].str), typeOfWmPriv[i].type);
}
}
QMap<QString, int>::const_iterator it =
strNumMap.find(name);
m_type = (it != strNumMap.end()) ? static_cast<Type>(*it) : Unknown;
}
/**
......@@ -103,49 +103,49 @@ AttributeData::AttributeData(const QString& name)
*/
bool AttributeData::toString(const QByteArray& data, QString& str)
{
switch (m_type) {
case Utf16: {
const ushort* unicode = reinterpret_cast<const ushort*>(data.data());
int size = data.size() / 2;
while (size > 0 && unicode[size - 1] == 0) {
--size;
}
str = QString::fromUtf16(unicode, size);
return true;
}
case Guid:
if (data.size() == 16) {
str.clear();
for (int i = 0; i < 16; ++i) {
if (i == 4 || i == 6 || i == 8 || i == 10) {
str += '-';
}
unsigned char c = (unsigned char)data[i];
unsigned char d = c >> 4;
str += d >= 10 ? d - 10 + 'A' : d + '0';
d = c & 0x0f;
str += d >= 10 ? d - 10 + 'A' : d + '0';
}
return true;
}
break;
case DWord:
if (data.size() == 4) {
ulong num = 0;
for (int i = 3; i >= 0; --i) {
num <<= 8;
num |= static_cast<unsigned char>(data[i]);
}
str.setNum(num);
return true;
}
break;
case Binary:
case Unknown:
default:
;
}
return false;
switch (m_type) {
case Utf16: {
const ushort* unicode = reinterpret_cast<const ushort*>(data.data());
int size = data.size() / 2;
while (size > 0 && unicode[size - 1] == 0) {
--size;
}
str = QString::fromUtf16(unicode, size);
return true;
}
case Guid:
if (data.size() == 16) {
str.clear();
for (int i = 0; i < 16; ++i) {
if (i == 4 || i == 6 || i == 8 || i == 10) {
str += '-';
}
unsigned char c = (unsigned char)data[i];
unsigned char d = c >> 4;
str += d >= 10 ? d - 10 + 'A' : d + '0';
d = c & 0x0f;
str += d >= 10 ? d - 10 + 'A' : d + '0';
}
return true;
}
break;
case DWord:
if (data.size() == 4) {
ulong num = 0;
for (int i = 3; i >= 0; --i) {
num <<= 8;
num |= static_cast<unsigned char>(data[i]);
}
str.setNum(num);
return true;
}
break;
case Binary:
case Unknown:
default:
;
}
return false;
}
/**
......@@ -158,53 +158,53 @@ bool AttributeData::toString(const QByteArray& data, QString& str)
*/
bool AttributeData::toByteArray(const QString& str, QByteArray& data)
{
switch (m_type) {
case Utf16: {
const ushort* unicode = str.utf16();
data = QByteArray(reinterpret_cast<const char*>(unicode),
(str.length() + 1) * 2);
return true;
}
case Guid: {
QString hexStr(str.toUpper());
hexStr.remove('-');
if (hexStr.length() == 32) {
unsigned char buf[16];
unsigned char* bufPtr = buf;
for (int i = 0; i < 32;) {
unsigned char h = (unsigned char)hexStr[i++].toLatin1();
unsigned char l = (unsigned char)hexStr[i++].toLatin1();
if (!((h >= '0' && h <= '9') || (h >= 'A' && h <= 'F')) ||
!((l >= '0' && l <= '9') || (l >= 'A' && l <= 'F'))) {
return false;
}
*bufPtr++ = ((h >= 'A' ? h + 10 - 'A' : h - '0') << 4) |
(l >= 'A' ? l + 10 - 'A' : l - '0');
}