mirror of https://github.com/odrling/Aegisub
Fix the rest of the build errors when not using precompiled headers
Originally committed to SVN as r4530.
This commit is contained in:
parent
61138e9b5d
commit
75bd20a6dd
|
@ -18,14 +18,12 @@
|
||||||
/// @brief Character set detection and manipulation utilities.
|
/// @brief Character set detection and manipulation utilities.
|
||||||
/// @ingroup libaegisub
|
/// @ingroup libaegisub
|
||||||
|
|
||||||
|
|
||||||
#include "libaegisub/charset.h"
|
|
||||||
#include "charset_ucd.h"
|
#include "charset_ucd.h"
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
namespace charset {
|
namespace charset {
|
||||||
|
|
||||||
const std::string Detect(const std::string file) {
|
std::string Detect(const std::string &file) {
|
||||||
UCDetect ucd(file);
|
UCDetect ucd(file);
|
||||||
return ucd.Single();
|
return ucd.Single();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,23 +18,18 @@
|
||||||
/// @brief Character set detection using Universalchardet
|
/// @brief Character set detection using Universalchardet
|
||||||
/// @ingroup libaegisub
|
/// @ingroup libaegisub
|
||||||
|
|
||||||
|
#include "charset_ucd.h"
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
#include "../../universalchardet/nsCharSetProber.h"
|
#include "../../universalchardet/nsCharSetProber.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "libaegisub/charset.h"
|
|
||||||
#include "charset_ucd.h"
|
|
||||||
#include "libaegisub/io.h"
|
#include "libaegisub/io.h"
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
namespace charset {
|
namespace charset {
|
||||||
|
|
||||||
UCDetect::UCDetect(const std::string file): nsUniversalDetector(NS_FILTER_ALL) {
|
UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL) {
|
||||||
{
|
{
|
||||||
std::ifstream *fp;
|
std::ifstream *fp;
|
||||||
fp = io::Open(file);
|
fp = io::Open(file);
|
||||||
|
|
|
@ -18,15 +18,21 @@
|
||||||
/// @brief Character set detection using Universalchardet
|
/// @brief Character set detection using Universalchardet
|
||||||
/// @ingroup libaegisub
|
/// @ingroup libaegisub
|
||||||
|
|
||||||
|
#include "libaegisub/charset.h"
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#define _X86_ 1
|
#define _X86_ 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../../universalchardet/nscore.h"
|
#include "../../universalchardet/nscore.h"
|
||||||
#include "../../universalchardet/nsUniversalDetector.h"
|
#include "../../universalchardet/nsUniversalDetector.h"
|
||||||
#include "../../universalchardet/nsMBCSGroupProber.h"
|
#include "../../universalchardet/nsMBCSGroupProber.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
namespace charset {
|
namespace charset {
|
||||||
|
|
||||||
|
@ -45,7 +51,7 @@ public:
|
||||||
|
|
||||||
/// @brief Detect character set of a file using UniversalCharDetect
|
/// @brief Detect character set of a file using UniversalCharDetect
|
||||||
/// @param file File to check
|
/// @param file File to check
|
||||||
UCDetect(const std::string file);
|
UCDetect(const std::string &file);
|
||||||
|
|
||||||
/// @brief Detect character set of a file using UniversalCharDet
|
/// @brief Detect character set of a file using UniversalCharDet
|
||||||
/// @param out[out] Map to load list into ordered by confidence
|
/// @param out[out] Map to load list into ordered by confidence
|
||||||
|
|
|
@ -19,8 +19,11 @@
|
||||||
/// @ingroup libaegisub
|
/// @ingroup libaegisub
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
#endif
|
#include <fstream>
|
||||||
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
#endif
|
||||||
#include <libaegisub/exception.h>
|
#include <libaegisub/exception.h>
|
||||||
|
|
||||||
namespace agi {
|
namespace agi {
|
||||||
|
@ -34,13 +37,13 @@ typedef std::map<float, std::string, std::greater_equal<float> > CharsetListDete
|
||||||
|
|
||||||
/// @brief Return a complete list of detected character sets ordered by precidence.
|
/// @brief Return a complete list of detected character sets ordered by precidence.
|
||||||
/// @param file File to check
|
/// @param file File to check
|
||||||
/// @param[in] list Map to load detected list into.
|
/// @param[out] list Map to load detected list into.
|
||||||
void DetectAll(const std::string file, CharsetListDetected &list);
|
void DetectAll(const std::string file, CharsetListDetected &list);
|
||||||
|
|
||||||
/// @brief Returns the character set with the highest confidence
|
/// @brief Returns the character set with the highest confidence
|
||||||
/// @param file File to check
|
/// @param file File to check
|
||||||
/// @return Detected character set.
|
/// @return Detected character set.
|
||||||
const std::string Detect(const std::string file);
|
std::string Detect(const std::string &file);
|
||||||
|
|
||||||
|
|
||||||
} // namespace util
|
} // namespace util
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
/// @ingroup libaegisub
|
/// @ingroup libaegisub
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
|
#include <string>
|
||||||
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <libaegisub/exception.h>
|
#include <libaegisub/exception.h>
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#ifndef LAGI_PRE
|
#ifndef LAGI_PRE
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue