Format with uncrustify (#3388)
This commit is contained in:
parent
f361106770
commit
7f358b2bed
File diff suppressed because it is too large
Load Diff
|
@ -102,8 +102,7 @@ CmdLineParser::CmdLineParser(Settings *settings)
|
|||
, mShowVersion(false)
|
||||
, mShowErrorMessages(false)
|
||||
, mExitAfterPrint(false)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void CmdLineParser::printMessage(const std::string &message)
|
||||
{
|
||||
|
|
|
@ -81,8 +81,7 @@
|
|||
|
||||
CppCheckExecutor::CppCheckExecutor()
|
||||
: mSettings(nullptr), mLatestProgressOutputTime(0), mErrorOutput(nullptr), mBugHuntingReport(nullptr), mShowAllErrors(false)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
CppCheckExecutor::~CppCheckExecutor()
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ int main(int argc, char* argv[])
|
|||
GetModuleFileNameA(nullptr, exename, sizeof(exename)/sizeof(exename[0])-1);
|
||||
argv[0] = exename;
|
||||
#endif
|
||||
|
||||
// *INDENT-OFF*
|
||||
#ifdef NDEBUG
|
||||
try {
|
||||
#endif
|
||||
|
@ -103,6 +103,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
return EXIT_FAILURE;
|
||||
#endif
|
||||
// *INDENT-ON*
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -563,9 +563,7 @@ void ThreadExecutor::report(const ErrorMessage &msg, MessageType msgType)
|
|||
#else
|
||||
|
||||
void ThreadExecutor::addFileContent(const std::string & /*path*/, const std::string & /*content*/)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
unsigned int ThreadExecutor::check()
|
||||
{
|
||||
|
@ -573,21 +571,14 @@ unsigned int ThreadExecutor::check()
|
|||
}
|
||||
|
||||
void ThreadExecutor::reportOut(const std::string & /*outmsg*/, Color)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
void ThreadExecutor::reportErr(const ErrorMessage & /*msg*/)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void ThreadExecutor::reportInfo(const ErrorMessage & /*msg*/)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void ThreadExecutor::bughuntingReport(const std::string & /*str*/)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,5 +23,4 @@ Application::Application(const QString &name, const QString &path,
|
|||
: mName(name)
|
||||
, mPath(path)
|
||||
, mParameters(params)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
|
|
@ -27,8 +27,7 @@ const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U;
|
|||
const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U;
|
||||
|
||||
CppcheckLibraryData::CppcheckLibraryData()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
static std::string unhandledElement(const QXmlStreamReader &xmlReader)
|
||||
{
|
||||
|
|
|
@ -64,8 +64,7 @@ public:
|
|||
|
||||
struct Function {
|
||||
Function() : noreturn(Unknown), gccPure(false), gccConst(false),
|
||||
leakignore(false), useretval(false) {
|
||||
}
|
||||
leakignore(false), useretval(false) {}
|
||||
|
||||
QString comments;
|
||||
QString name;
|
||||
|
@ -89,8 +88,7 @@ public:
|
|||
} formatstr;
|
||||
struct Arg {
|
||||
Arg() : nr(0), notbool(false), notnull(false), notuninit(false),
|
||||
formatstr(false), strz(false) {
|
||||
}
|
||||
formatstr(false), strz(false) {}
|
||||
|
||||
QString name;
|
||||
unsigned int nr;
|
||||
|
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
CsvReport::CsvReport(const QString &filename) :
|
||||
Report(filename)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
CsvReport::~CsvReport()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
bool CsvReport::create()
|
||||
{
|
||||
|
|
|
@ -24,8 +24,7 @@ QErrorPathItem::QErrorPathItem(const ErrorMessage::FileLocation &loc)
|
|||
, line(loc.line)
|
||||
, column(loc.column)
|
||||
, info(QString::fromStdString(loc.getinfo()))
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
bool operator==(const QErrorPathItem &i1, const QErrorPathItem &i2)
|
||||
{
|
||||
|
@ -38,8 +37,7 @@ ErrorItem::ErrorItem()
|
|||
, inconclusive(false)
|
||||
, cwe(-1)
|
||||
, hash(0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
ErrorItem::ErrorItem(const ErrorMessage &errmsg)
|
||||
: file0(QString::fromStdString(errmsg.file0))
|
||||
|
|
|
@ -1415,8 +1415,7 @@ void MainWindow::save()
|
|||
}
|
||||
|
||||
void MainWindow::resultsAdded()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void MainWindow::toggleMainToolBar()
|
||||
{
|
||||
|
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
PrintableReport::PrintableReport() :
|
||||
Report(QString())
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
PrintableReport::~PrintableReport()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
bool PrintableReport::create()
|
||||
{
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
Report::Report(const QString &filename) :
|
||||
QObject(),
|
||||
mFilename(filename)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Report::~Report()
|
||||
{
|
||||
|
|
|
@ -98,8 +98,7 @@ ResultsTree::ResultsTree(QWidget * parent) :
|
|||
}
|
||||
|
||||
ResultsTree::~ResultsTree()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void ResultsTree::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
|
|
|
@ -31,8 +31,6 @@ private slots:
|
|||
private:
|
||||
// Empty implementations of ErrorLogger methods.
|
||||
// We don't care about the output in the benchmark tests.
|
||||
void reportOut(const std::string & outmsg) override {
|
||||
}
|
||||
void reportErr(const ErrorMessage &msg) override {
|
||||
}
|
||||
void reportOut(const std::string & outmsg) override {}
|
||||
void reportErr(const ErrorMessage &msg) override {}
|
||||
};
|
||||
|
|
|
@ -1053,8 +1053,7 @@ public:
|
|||
_read(read),
|
||||
_write(write),
|
||||
_modified(modified),
|
||||
_allocateMemory(allocateMemory) {
|
||||
}
|
||||
_allocateMemory(allocateMemory) {}
|
||||
|
||||
/** variable is used.. set both read+write */
|
||||
void use() {
|
||||
|
|
|
@ -69,8 +69,7 @@ TranslationHandler::TranslationHandler(QObject *parent) :
|
|||
}
|
||||
|
||||
TranslationHandler::~TranslationHandler()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
const QStringList TranslationHandler::getNames() const
|
||||
{
|
||||
|
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
TxtReport::TxtReport(const QString &filename) :
|
||||
Report(filename)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
TxtReport::~TxtReport()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
bool TxtReport::create()
|
||||
{
|
||||
|
|
|
@ -27,8 +27,7 @@ static const char VersionAttribute[] = "version";
|
|||
|
||||
XmlReport::XmlReport(const QString &filename) :
|
||||
Report(filename)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
QString XmlReport::quoteMessage(const QString &message)
|
||||
{
|
||||
|
|
|
@ -51,8 +51,7 @@ XmlReportV2::XmlReportV2(const QString &filename) :
|
|||
XmlReport(filename),
|
||||
mXmlReader(nullptr),
|
||||
mXmlWriter(nullptr)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
XmlReportV2::~XmlReportV2()
|
||||
{
|
||||
|
|
|
@ -86,7 +86,9 @@ struct Analyzer {
|
|||
return get(Incremental);
|
||||
}
|
||||
|
||||
bool isSymbolicMatch() const { return get(SymbolicMatch); }
|
||||
bool isSymbolicMatch() const {
|
||||
return get(SymbolicMatch);
|
||||
}
|
||||
|
||||
bool matches() const {
|
||||
return get(Match);
|
||||
|
|
|
@ -2102,7 +2102,9 @@ Token* findVariableChanged(Token *start, const Token *end, int indirect, const n
|
|||
return nullptr;
|
||||
if (depth < 0)
|
||||
return start;
|
||||
auto getExprTok = memoize([&] { return findExpression(start, exprid); });
|
||||
auto getExprTok = memoize([&] {
|
||||
return findExpression(start, exprid);
|
||||
});
|
||||
for (Token *tok = start; tok != end; tok = tok->next()) {
|
||||
if (tok->exprId() != exprid) {
|
||||
if (globalvar && Token::Match(tok, "%name% ("))
|
||||
|
|
|
@ -62,8 +62,7 @@ public:
|
|||
|
||||
/** This constructor is used when running checks. */
|
||||
Check(const std::string &aname, const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: mTokenizer(tokenizer), mSettings(settings), mErrorLogger(errorLogger), mName(aname) {
|
||||
}
|
||||
: mTokenizer(tokenizer), mSettings(settings), mErrorLogger(errorLogger), mName(aname) {}
|
||||
|
||||
virtual ~Check() {
|
||||
if (!mTokenizer)
|
||||
|
|
|
@ -43,13 +43,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB Check64BitPortability : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the Check64BitPortability */
|
||||
Check64BitPortability() : Check(myName()) {
|
||||
}
|
||||
Check64BitPortability() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
Check64BitPortability(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -42,12 +42,10 @@ class Tokenizer;
|
|||
|
||||
class CPPCHECKLIB CheckAssert : public Check {
|
||||
public:
|
||||
CheckAssert() : Check(myName()) {
|
||||
}
|
||||
CheckAssert() : Check(myName()) {}
|
||||
|
||||
CheckAssert(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** run checks, the token list is not simplified */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -42,13 +42,11 @@ class Variable;
|
|||
class CPPCHECKLIB CheckAutoVariables : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckAutoVariables() : Check(myName()) {
|
||||
}
|
||||
CheckAutoVariables() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckAutoVariables(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -41,13 +41,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckBool : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckBool() : Check(myName()) {
|
||||
}
|
||||
CheckBool() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckBool(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -40,13 +40,11 @@ class Token;
|
|||
class CPPCHECKLIB CheckBoost : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckBoost() : Check(myName()) {
|
||||
}
|
||||
CheckBoost() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckBoost(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -60,13 +60,11 @@ class CPPCHECKLIB CheckBufferOverrun : public Check {
|
|||
public:
|
||||
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckBufferOverrun() : Check(myName()) {
|
||||
}
|
||||
CheckBufferOverrun() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckBufferOverrun(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckBufferOverrun checkBufferOverrun(tokenizer, settings, errorLogger);
|
||||
|
|
|
@ -106,9 +106,7 @@ static bool isVclTypeInit(const Type *type)
|
|||
CheckClass::CheckClass(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger),
|
||||
mSymbolDatabase(tokenizer?tokenizer->getSymbolDatabase():nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// ClassCheck: Check that all class constructors are ok.
|
||||
|
|
|
@ -44,8 +44,7 @@ class Token;
|
|||
class CPPCHECKLIB CheckClass : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckClass() : Check(myName()), mSymbolDatabase(nullptr) {
|
||||
}
|
||||
CheckClass() : Check(myName()), mSymbolDatabase(nullptr) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckClass(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger);
|
||||
|
|
|
@ -47,13 +47,11 @@ class ValueType;
|
|||
class CPPCHECKLIB CheckCondition : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckAssignIf */
|
||||
CheckCondition() : Check(myName()) {
|
||||
}
|
||||
CheckCondition() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckCondition(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckCondition checkCondition(tokenizer, settings, errorLogger);
|
||||
|
|
|
@ -54,13 +54,11 @@ static const struct CWE CWE480(480U); // Use of Incorrect Operator
|
|||
class CPPCHECKLIB CheckExceptionSafety : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckExceptionSafety() : Check(myName()) {
|
||||
}
|
||||
CheckExceptionSafety() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckExceptionSafety(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
if (tokenizer->isC())
|
||||
|
|
|
@ -51,13 +51,11 @@ namespace ValueFlow {
|
|||
class CPPCHECKLIB CheckFunctions : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckFunctions */
|
||||
CheckFunctions() : Check(myName()) {
|
||||
}
|
||||
CheckFunctions() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckFunctions(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -36,13 +36,11 @@
|
|||
class CPPCHECKLIB CheckInternal : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckInternal() : Check(myName()) {
|
||||
}
|
||||
CheckInternal() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckInternal(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
if (!settings->checks.isEnabled(Checks::internalCheck))
|
||||
|
|
|
@ -108,8 +108,7 @@ struct Filepointer {
|
|||
AppendMode append_mode;
|
||||
std::string filename;
|
||||
explicit Filepointer(OpenMode mode_ = OpenMode::UNKNOWN_OM)
|
||||
: mode(mode_), mode_indent(0), lastOperation(Operation::NONE), op_indent(0), append_mode(AppendMode::UNKNOWN_AM) {
|
||||
}
|
||||
: mode(mode_), mode_indent(0), lastOperation(Operation::NONE), op_indent(0), append_mode(AppendMode::UNKNOWN_AM) {}
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
|
|
@ -43,13 +43,11 @@ class ErrorLogger;
|
|||
class CPPCHECKLIB CheckIO : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering CheckIO */
|
||||
CheckIO() : Check(myName()) {
|
||||
}
|
||||
CheckIO() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckIO(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks on the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -108,13 +108,11 @@ public:
|
|||
class CPPCHECKLIB CheckLeakAutoVar : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckLeakAutoVar */
|
||||
CheckLeakAutoVar() : Check(myName()) {
|
||||
}
|
||||
CheckLeakAutoVar() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckLeakAutoVar(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckLeakAutoVar checkLeakAutoVar(tokenizer, settings, errorLogger);
|
||||
|
|
|
@ -88,8 +88,7 @@ public:
|
|||
void operator=(const CheckMemoryLeak &) = delete;
|
||||
|
||||
CheckMemoryLeak(const Tokenizer *t, ErrorLogger *e, const Settings *s)
|
||||
: mTokenizer_(t), mErrorLogger_(e), mSettings_(s) {
|
||||
}
|
||||
: mTokenizer_(t), mErrorLogger_(e), mSettings_(s) {}
|
||||
|
||||
/** @brief What type of allocation are used.. the "Many" means that several types of allocation and deallocation are used */
|
||||
enum AllocType { No, Malloc, New, NewArray, File, Fd, Pipe, OtherMem, OtherRes, Many };
|
||||
|
@ -172,13 +171,11 @@ public:
|
|||
class CPPCHECKLIB CheckMemoryLeakInFunction : private Check, public CheckMemoryLeak {
|
||||
public:
|
||||
/** @brief This constructor is used when registering this class */
|
||||
CheckMemoryLeakInFunction() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {
|
||||
}
|
||||
CheckMemoryLeakInFunction() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {}
|
||||
|
||||
/** @brief This constructor is used when running checks */
|
||||
CheckMemoryLeakInFunction(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckMemoryLeakInFunction checkMemoryLeak(tokenizer, settings, errorLogger);
|
||||
|
@ -234,12 +231,10 @@ private:
|
|||
|
||||
class CPPCHECKLIB CheckMemoryLeakInClass : private Check, private CheckMemoryLeak {
|
||||
public:
|
||||
CheckMemoryLeakInClass() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {
|
||||
}
|
||||
CheckMemoryLeakInClass() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {}
|
||||
|
||||
CheckMemoryLeakInClass(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog) OVERRIDE {
|
||||
if (!tokenizr->isCPP())
|
||||
|
@ -281,12 +276,10 @@ private:
|
|||
|
||||
class CPPCHECKLIB CheckMemoryLeakStructMember : private Check, private CheckMemoryLeak {
|
||||
public:
|
||||
CheckMemoryLeakStructMember() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {
|
||||
}
|
||||
CheckMemoryLeakStructMember() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {}
|
||||
|
||||
CheckMemoryLeakStructMember(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckMemoryLeakStructMember checkMemoryLeak(tokenizer, settings, errorLogger);
|
||||
|
@ -302,8 +295,7 @@ private:
|
|||
|
||||
void checkStructVariable(const Variable * const variable);
|
||||
|
||||
void getErrorMessages(ErrorLogger * /*errorLogger*/, const Settings * /*settings*/) const OVERRIDE {
|
||||
}
|
||||
void getErrorMessages(ErrorLogger * /*errorLogger*/, const Settings * /*settings*/) const OVERRIDE {}
|
||||
|
||||
static std::string myName() {
|
||||
return "Memory leaks (struct members)";
|
||||
|
@ -320,12 +312,10 @@ private:
|
|||
|
||||
class CPPCHECKLIB CheckMemoryLeakNoVar : private Check, private CheckMemoryLeak {
|
||||
public:
|
||||
CheckMemoryLeakNoVar() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {
|
||||
}
|
||||
CheckMemoryLeakNoVar() : Check(myName()), CheckMemoryLeak(nullptr, nullptr, nullptr) {}
|
||||
|
||||
CheckMemoryLeakNoVar(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger), CheckMemoryLeak(tokenizer, errorLogger, settings) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckMemoryLeakNoVar checkMemoryLeak(tokenizer, settings, errorLogger);
|
||||
|
|
|
@ -46,13 +46,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckNullPointer : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckNullPointer */
|
||||
CheckNullPointer() : Check(myName()) {
|
||||
}
|
||||
CheckNullPointer() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckNullPointer(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -1268,8 +1268,7 @@ void CheckOther::checkPassByReference()
|
|||
|
||||
bool inconclusive = false;
|
||||
|
||||
if (var->valueType() && var->valueType()->type == ValueType::Type::CONTAINER) {
|
||||
} else if (var->type() && !var->type()->isEnumType()) { // Check if type is a struct or class.
|
||||
if (var->valueType() && var->valueType()->type == ValueType::Type::CONTAINER) {} else if (var->type() && !var->type()->isEnumType()) { // Check if type is a struct or class.
|
||||
// Ensure that it is a large object.
|
||||
if (!var->type()->classScope)
|
||||
inconclusive = true;
|
||||
|
|
|
@ -50,13 +50,11 @@ class ErrorLogger;
|
|||
class CPPCHECKLIB CheckOther : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckOther() : Check(myName()) {
|
||||
}
|
||||
CheckOther() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckOther(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -42,13 +42,11 @@ class Token;
|
|||
class CPPCHECKLIB CheckPostfixOperator : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckPostfixOperator */
|
||||
CheckPostfixOperator() : Check(myName()) {
|
||||
}
|
||||
CheckPostfixOperator() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckPostfixOperator(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
if (tokenizer->isC())
|
||||
|
|
|
@ -41,13 +41,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckSizeof : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckSizeof() : Check(myName()) {
|
||||
}
|
||||
CheckSizeof() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckSizeof(const Tokenizer* tokenizer, const Settings* settings, ErrorLogger* errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer* tokenizer, const Settings* settings, ErrorLogger* errorLogger) OVERRIDE {
|
||||
|
|
|
@ -46,13 +46,11 @@ class ErrorLogger;
|
|||
class CPPCHECKLIB CheckStl : public Check {
|
||||
public:
|
||||
/** This constructor is used when registering the CheckClass */
|
||||
CheckStl() : Check(myName()) {
|
||||
}
|
||||
CheckStl() : Check(myName()) {}
|
||||
|
||||
/** This constructor is used when running checks. */
|
||||
CheckStl(const Tokenizer* tokenizer, const Settings* settings, ErrorLogger* errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** run checks, the token list is not simplified */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -41,13 +41,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckString : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckString() : Check(myName()) {
|
||||
}
|
||||
CheckString() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckString(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -40,13 +40,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckType : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckType() : Check(myName()) {
|
||||
}
|
||||
CheckType() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckType(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -55,13 +55,11 @@ struct VariableValue {
|
|||
class CPPCHECKLIB CheckUninitVar : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckUninitVar */
|
||||
CheckUninitVar() : Check(myName()) {
|
||||
}
|
||||
CheckUninitVar() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckUninitVar(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -355,8 +355,7 @@ bool CheckUnusedFunctions::analyseWholeProgram(const CTU::FileInfo *ctu, const s
|
|||
|
||||
CheckUnusedFunctions::FunctionDecl::FunctionDecl(const Function *f)
|
||||
: functionName(f->name()), lineNumber(f->token->linenr())
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
std::string CheckUnusedFunctions::analyzerInfo() const
|
||||
{
|
||||
|
|
|
@ -42,13 +42,11 @@ class Tokenizer;
|
|||
class CPPCHECKLIB CheckUnusedFunctions : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckUnusedFunctions */
|
||||
CheckUnusedFunctions() : Check(myName()) {
|
||||
}
|
||||
CheckUnusedFunctions() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckUnusedFunctions(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
static void clear() {
|
||||
instance.mFunctions.clear();
|
||||
|
@ -101,8 +99,7 @@ private:
|
|||
|
||||
class CPPCHECKLIB FunctionUsage {
|
||||
public:
|
||||
FunctionUsage() : lineNumber(0), usedSameFile(false), usedOtherFile(false) {
|
||||
}
|
||||
FunctionUsage() : lineNumber(0), usedSameFile(false), usedOtherFile(false) {}
|
||||
|
||||
std::string filename;
|
||||
unsigned int lineNumber;
|
||||
|
|
|
@ -115,8 +115,7 @@ public:
|
|||
_read(read),
|
||||
_write(write),
|
||||
_modified(modified),
|
||||
_allocateMemory(allocateMemory) {
|
||||
}
|
||||
_allocateMemory(allocateMemory) {}
|
||||
|
||||
/** variable is used.. set both read+write */
|
||||
void use() {
|
||||
|
|
|
@ -46,13 +46,11 @@ class Function;
|
|||
class CPPCHECKLIB CheckUnusedVar : public Check {
|
||||
public:
|
||||
/** @brief This constructor is used when registering the CheckClass */
|
||||
CheckUnusedVar() : Check(myName()) {
|
||||
}
|
||||
CheckUnusedVar() : Check(myName()) {}
|
||||
|
||||
/** @brief This constructor is used when running checks. */
|
||||
CheckUnusedVar(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
/** @brief Run checks against the normal token list */
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
|
|
|
@ -41,12 +41,10 @@ class Tokenizer;
|
|||
|
||||
class CPPCHECKLIB CheckVaarg : public Check {
|
||||
public:
|
||||
CheckVaarg() : Check(myName()) {
|
||||
}
|
||||
CheckVaarg() : Check(myName()) {}
|
||||
|
||||
CheckVaarg(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger)
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {
|
||||
}
|
||||
: Check(myName(), tokenizer, settings, errorLogger) {}
|
||||
|
||||
void runChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) OVERRIDE {
|
||||
CheckVaarg check(tokenizer, settings, errorLogger);
|
||||
|
|
|
@ -329,8 +329,7 @@ CppCheck::CppCheck(ErrorLogger &errorLogger,
|
|||
, mTooManyConfigs(false)
|
||||
, mSimplify(true)
|
||||
, mExecuteCommand(executeCommand)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
CppCheck::~CppCheck()
|
||||
{
|
||||
|
@ -1512,9 +1511,7 @@ void CppCheck::reportInfo(const ErrorMessage &msg)
|
|||
}
|
||||
|
||||
void CppCheck::reportStatus(unsigned int /*fileindex*/, unsigned int /*filecount*/, std::size_t /*sizedone*/, std::size_t /*sizetotal*/)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
void CppCheck::bughuntingReport(const std::string &str)
|
||||
{
|
||||
|
|
|
@ -55,8 +55,7 @@ CTU::FileInfo::Location::Location(const Tokenizer *tokenizer, const Token *tok)
|
|||
: fileName(tokenizer->list.file(tok))
|
||||
, lineNumber(tok->linenr())
|
||||
, column(tok->column())
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
std::string CTU::FileInfo::toString() const
|
||||
{
|
||||
|
@ -151,15 +150,13 @@ CTU::FileInfo::CallBase::CallBase(const Tokenizer *tokenizer, const Token *callT
|
|||
, callArgNr(0)
|
||||
, callFunctionName(callToken->next()->astOperand1()->expressionString())
|
||||
, location(CTU::FileInfo::Location(tokenizer, callToken))
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
CTU::FileInfo::NestedCall::NestedCall(const Tokenizer *tokenizer, const Function *myFunction, const Token *callToken)
|
||||
: CallBase(tokenizer, callToken)
|
||||
, myId(getFunctionId(tokenizer, myFunction))
|
||||
, myArgNr(0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
static std::string readAttrString(const tinyxml2::XMLElement *e, const char *attr, bool *error)
|
||||
{
|
||||
|
|
|
@ -98,8 +98,7 @@ namespace CTU {
|
|||
NestedCall(const std::string &myId, nonneg int myArgNr, const std::string &callId, nonneg int callArgnr, const std::string &callFunctionName, const Location &location)
|
||||
: CallBase(callId, callArgnr, callFunctionName, location),
|
||||
myId(myId),
|
||||
myArgNr(myArgNr) {
|
||||
}
|
||||
myArgNr(myArgNr) {}
|
||||
|
||||
NestedCall(const Tokenizer *tokenizer, const Function *myFunction, const Token *callToken);
|
||||
|
||||
|
|
|
@ -69,8 +69,7 @@ static std::size_t calculateWarningHash(const TokenList *tokenList, const std::s
|
|||
|
||||
ErrorMessage::ErrorMessage()
|
||||
: incomplete(false), severity(Severity::none), cwe(0U), certainty(Certainty::normal), hash(0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
ErrorMessage::ErrorMessage(const std::list<FileLocation> &callStack, const std::string& file1, Severity::SeverityType severity, const std::string &msg, const std::string &id, Certainty::CertaintyLevel certainty) :
|
||||
callStack(callStack), // locations for this error message
|
||||
|
@ -660,13 +659,11 @@ std::string ErrorLogger::callStackToString(const std::list<ErrorMessage::FileLoc
|
|||
|
||||
ErrorMessage::FileLocation::FileLocation(const Token* tok, const TokenList* tokenList)
|
||||
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok))
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
ErrorMessage::FileLocation::FileLocation(const Token* tok, const std::string &info, const TokenList* tokenList)
|
||||
: fileIndex(tok->fileIndex()), line(tok->linenr()), column(tok->column()), mOrigFileName(tokenList->getOrigFile(tok)), mFileName(tokenList->file(tok)), mInfo(info)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
std::string ErrorMessage::FileLocation::getfile(bool convert) const
|
||||
{
|
||||
|
|
|
@ -67,16 +67,13 @@ public:
|
|||
class CPPCHECKLIB FileLocation {
|
||||
public:
|
||||
FileLocation()
|
||||
: fileIndex(0), line(0), column(0) {
|
||||
}
|
||||
: fileIndex(0), line(0), column(0) {}
|
||||
|
||||
FileLocation(const std::string &file, int line, unsigned int column)
|
||||
: fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file) {
|
||||
}
|
||||
: fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file) {}
|
||||
|
||||
FileLocation(const std::string &file, const std::string &info, int line, unsigned int column)
|
||||
: fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file), mInfo(info) {
|
||||
}
|
||||
: fileIndex(0), line(line), column(column), mOrigFileName(file), mFileName(file), mInfo(info) {}
|
||||
|
||||
FileLocation(const Token* tok, const TokenList* tokenList);
|
||||
FileLocation(const Token* tok, const std::string &info, const TokenList* tokenList);
|
||||
|
|
|
@ -916,8 +916,7 @@ ExprEngine::ArrayValue::ArrayValue(const std::string &name, const ExprEngine::Ar
|
|||
: Value(name, ExprEngine::ValueType::ArrayValue)
|
||||
, pointer(arrayValue.pointer), nullPointer(arrayValue.nullPointer), uninitPointer(arrayValue.uninitPointer)
|
||||
, data(arrayValue.data), size(arrayValue.size)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
std::string ExprEngine::ArrayValue::getRange() const
|
||||
|
@ -1130,8 +1129,7 @@ public:
|
|||
for (auto constraint : data->constraints) {
|
||||
try {
|
||||
solver.add(getConstraintExpr(constraint));
|
||||
} catch (const BailoutValueException &) {
|
||||
}
|
||||
} catch (const BailoutValueException &) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,8 +74,7 @@ namespace ExprEngine {
|
|||
public:
|
||||
explicit DataBase(const std::string ¤tFunction, const Settings *settings)
|
||||
: currentFunction(currentFunction)
|
||||
, settings(settings) {
|
||||
}
|
||||
, settings(settings) {}
|
||||
virtual std::string getNewSymbolName() = 0;
|
||||
const std::string currentFunction;
|
||||
const Settings * const settings;
|
||||
|
@ -144,8 +143,7 @@ namespace ExprEngine {
|
|||
: Value(name, ValueType::IntRange)
|
||||
, minValue(minValue)
|
||||
, maxValue(maxValue)
|
||||
, loopScope(nullptr) {
|
||||
}
|
||||
, loopScope(nullptr) {}
|
||||
std::string getRange() const OVERRIDE {
|
||||
if (minValue == maxValue)
|
||||
return str(minValue);
|
||||
|
@ -165,8 +163,7 @@ namespace ExprEngine {
|
|||
FloatRange(const std::string &name, long double minValue, long double maxValue)
|
||||
: Value(name, ValueType::FloatRange)
|
||||
, minValue(minValue)
|
||||
, maxValue(maxValue) {
|
||||
}
|
||||
, maxValue(maxValue) {}
|
||||
|
||||
std::string getRange() const OVERRIDE {
|
||||
return std::to_string(minValue) + ":" + std::to_string(maxValue);
|
||||
|
@ -279,8 +276,7 @@ namespace ExprEngine {
|
|||
: Value(getName(binop, op1, op2), ValueType::BinOpResult)
|
||||
, binop(binop)
|
||||
, op1(op1)
|
||||
, op2(op2) {
|
||||
}
|
||||
, op2(op2) {}
|
||||
|
||||
bool isEqual(const DataBase *dataBase, int value) const OVERRIDE;
|
||||
bool isGreaterThan(const DataBase *dataBase, int value) const OVERRIDE;
|
||||
|
@ -306,8 +302,7 @@ namespace ExprEngine {
|
|||
: Value(name, ValueType::IntegerTruncation)
|
||||
, inputValue(inputValue)
|
||||
, bits(bits)
|
||||
, sign(sign) {
|
||||
}
|
||||
, sign(sign) {}
|
||||
|
||||
std::string getSymbolicExpression() const OVERRIDE;
|
||||
|
||||
|
|
|
@ -57,8 +57,7 @@ static void gettokenlistfromvalid(const std::string& valid, TokenList& tokenList
|
|||
}
|
||||
|
||||
Library::Library() : bugHunting(false), mAllocId(0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Library::Error Library::load(const char exename[], const char path[])
|
||||
{
|
||||
|
|
|
@ -213,8 +213,7 @@ public:
|
|||
opLessAllowed(true),
|
||||
hasInitializerListConstructor(false),
|
||||
unstableErase(false),
|
||||
unstableInsert(false) {
|
||||
}
|
||||
unstableInsert(false) {}
|
||||
|
||||
enum class Action {
|
||||
RESIZE, CLEAR, PUSH, POP, FIND, INSERT, ERASE, CHANGE_CONTENT, CHANGE, CHANGE_INTERNAL,
|
||||
|
@ -268,8 +267,7 @@ public:
|
|||
optional(false),
|
||||
variadic(false),
|
||||
iteratorInfo(),
|
||||
direction(Direction::DIR_UNKNOWN) {
|
||||
}
|
||||
direction(Direction::DIR_UNKNOWN) {}
|
||||
|
||||
bool notbool;
|
||||
bool notnull;
|
||||
|
@ -457,8 +455,7 @@ public:
|
|||
, mLong(false)
|
||||
, mPointer(false)
|
||||
, mPtrPtr(false)
|
||||
, mConstPtr(false) {
|
||||
}
|
||||
, mConstPtr(false) {}
|
||||
bool operator == (const PlatformType & type) const {
|
||||
return (mSigned == type.mSigned &&
|
||||
mUnsigned == type.mUnsigned &&
|
||||
|
|
|
@ -29,8 +29,7 @@ namespace MatchCompiler {
|
|||
public:
|
||||
typedef const char(&StringRef)[n];
|
||||
explicit ConstString(StringRef s)
|
||||
:_s(s) {
|
||||
}
|
||||
: _s(s) {}
|
||||
|
||||
operator StringRef() const {
|
||||
return _s;
|
||||
|
|
|
@ -54,8 +54,7 @@ Directive::Directive(const std::string &_file, const int _linenr, const std::str
|
|||
file(_file),
|
||||
linenr(_linenr),
|
||||
str(trim(_str))
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
std::atomic<bool> Preprocessor::missingIncludeFlag;
|
||||
std::atomic<bool> Preprocessor::missingSystemIncludeFlag;
|
||||
|
@ -63,8 +62,7 @@ std::atomic<bool> Preprocessor::missingSystemIncludeFlag;
|
|||
char Preprocessor::macroChar = char(1);
|
||||
|
||||
Preprocessor::Preprocessor(Settings& settings, ErrorLogger *errorLogger) : mSettings(settings), mErrorLogger(errorLogger)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Preprocessor::~Preprocessor()
|
||||
{
|
||||
|
|
|
@ -4083,8 +4083,7 @@ Scope::Scope(const SymbolDatabase *check_, const Token *classDef_, const Scope *
|
|||
function(nullptr),
|
||||
enumType(nullptr),
|
||||
enumClass(false)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Scope::Scope(const SymbolDatabase *check_, const Token *classDef_, const Scope *nestedIn_) :
|
||||
check(check_),
|
||||
|
|
|
@ -77,8 +77,7 @@ public:
|
|||
class BaseInfo {
|
||||
public:
|
||||
BaseInfo() :
|
||||
type(nullptr), nameTok(nullptr), access(AccessControl::Public), isVirtual(false) {
|
||||
}
|
||||
type(nullptr), nameTok(nullptr), access(AccessControl::Public), isVirtual(false) {}
|
||||
|
||||
std::string name;
|
||||
const Type* type;
|
||||
|
@ -93,8 +92,7 @@ public:
|
|||
|
||||
struct FriendInfo {
|
||||
FriendInfo() :
|
||||
nameStart(nullptr), nameEnd(nullptr), type(nullptr) {
|
||||
}
|
||||
nameStart(nullptr), nameEnd(nullptr), type(nullptr) {}
|
||||
|
||||
const Token* nameStart;
|
||||
const Token* nameEnd;
|
||||
|
|
|
@ -264,12 +264,10 @@ bool TemplateSimplifier::TokenAndName::isAliasToken(const Token *tok) const
|
|||
TemplateSimplifier::TemplateSimplifier(Tokenizer *tokenizer)
|
||||
: mTokenizer(tokenizer), mTokenList(tokenizer->list), mSettings(tokenizer->mSettings),
|
||||
mErrorLogger(tokenizer->mErrorLogger), mChanged(false)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
TemplateSimplifier::~TemplateSimplifier()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates()
|
||||
{
|
||||
|
|
|
@ -46,8 +46,7 @@ struct TimerResultsData {
|
|||
|
||||
TimerResultsData()
|
||||
: mClocks(0)
|
||||
, mNumberOfResults(0) {
|
||||
}
|
||||
, mNumberOfResults(0) {}
|
||||
|
||||
double seconds() const {
|
||||
const double ret = (double)((unsigned long)mClocks) / (double)CLOCKS_PER_SEC;
|
||||
|
@ -57,8 +56,7 @@ struct TimerResultsData {
|
|||
|
||||
class CPPCHECKLIB TimerResults : public TimerResultsIntf {
|
||||
public:
|
||||
TimerResults() {
|
||||
}
|
||||
TimerResults() {}
|
||||
|
||||
void showResults(SHOWTIME_MODES mode) const;
|
||||
void addResults(const std::string& str, std::clock_t clocks) OVERRIDE;
|
||||
|
|
|
@ -52,11 +52,9 @@ namespace {
|
|||
// in order to store information about the scope
|
||||
struct VarIdScopeInfo {
|
||||
VarIdScopeInfo()
|
||||
:isExecutable(false), isStructInit(false), isEnum(false), startVarid(0) {
|
||||
}
|
||||
: isExecutable(false), isStructInit(false), isEnum(false), startVarid(0) {}
|
||||
VarIdScopeInfo(bool isExecutable, bool isStructInit, bool isEnum, nonneg int startVarid)
|
||||
:isExecutable(isExecutable), isStructInit(isStructInit), isEnum(isEnum), startVarid(startVarid) {
|
||||
}
|
||||
: isExecutable(isExecutable), isStructInit(isStructInit), isEnum(isEnum), startVarid(startVarid) {}
|
||||
|
||||
const bool isExecutable;
|
||||
const bool isStructInit;
|
||||
|
@ -161,8 +159,7 @@ Tokenizer::Tokenizer() :
|
|||
, mMaxTime(std::time(0) + MAXTIME)
|
||||
#endif
|
||||
, mPreprocessor(nullptr)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
Tokenizer::Tokenizer(const Settings *settings, ErrorLogger *errorLogger) :
|
||||
list(settings),
|
||||
|
|
|
@ -1803,8 +1803,7 @@ class SelectValueFromVarIdMapRange {
|
|||
using reference = value_type &;
|
||||
|
||||
explicit Iterator(const M::const_iterator &it)
|
||||
: mIt(it) {
|
||||
}
|
||||
: mIt(it) {}
|
||||
|
||||
reference operator*() const {
|
||||
return mIt->second;
|
||||
|
@ -1834,8 +1833,7 @@ class SelectValueFromVarIdMapRange {
|
|||
|
||||
public:
|
||||
explicit SelectValueFromVarIdMapRange(const M *m)
|
||||
: mMap(m) {
|
||||
}
|
||||
: mMap(m) {}
|
||||
|
||||
Iterator begin() const {
|
||||
return Iterator(mMap->begin());
|
||||
|
@ -2107,7 +2105,9 @@ struct ValueFlowAnalyzer : Analyzer {
|
|||
}
|
||||
}
|
||||
|
||||
virtual bool useSymbolicValues() const { return true; }
|
||||
virtual bool useSymbolicValues() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isSameSymbolicValue(const Token* tok, ErrorPath* errorPath = nullptr) const
|
||||
{
|
||||
|
|
|
@ -57,7 +57,9 @@ public:
|
|||
return mPtr.release();
|
||||
}
|
||||
|
||||
T* get() NOEXCEPT { return mPtr.get(); }
|
||||
T* get() NOEXCEPT {
|
||||
return mPtr.get();
|
||||
}
|
||||
const T* get() const NOEXCEPT {
|
||||
return mPtr.get();
|
||||
}
|
||||
|
@ -69,7 +71,9 @@ public:
|
|||
return *get();
|
||||
}
|
||||
|
||||
T* operator->() NOEXCEPT { return get(); }
|
||||
T* operator->() NOEXCEPT {
|
||||
return get();
|
||||
}
|
||||
const T* operator->() const NOEXCEPT {
|
||||
return get();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
UNCRUSTIFY_VERSION="0.72.0"
|
||||
UNCRUSTIFY="${UNCRUSTIFY-uncrustify}"
|
||||
|
||||
DETECTED_VERSION=$("$UNCRUSTIFY" --version 2>&1 | grep -o -E '[0-9.]+')
|
||||
if [ "$DETECTED_VERSION" != "${UNCRUSTIFY_VERSION}" ]; then
|
||||
echo "You should use version: ${UNCRUSTIFY_VERSION}"
|
||||
echo "Detected version: ${DETECTED_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OS variables
|
||||
[ $(uname -s) = "Darwin" ] && export OSX=1 && export UNIX=1
|
||||
[ $(uname -s) = "Linux" ] && export LINUX=1 && export UNIX=1
|
||||
uname -s | grep -q "_NT-" && export WINDOWS=1
|
||||
|
||||
if [ $OSX ]
|
||||
then
|
||||
export CPUCOUNT=$(sysctl -n hw.ncpu)
|
||||
elif [ $LINUX ]
|
||||
then
|
||||
export CPUCOUNT=$(nproc)
|
||||
else
|
||||
export CPUCOUNT="1"
|
||||
fi
|
||||
|
||||
function formatCplusplus {
|
||||
find $1 -iname '*.h' \
|
||||
-o -iname '*.c' \
|
||||
-o -iname '*.cpp' \
|
||||
| xargs -n 1 -P $CPUCOUNT -I{} -t $UNCRUSTIFY -c .uncrustify.cfg --no-backup {}
|
||||
|
||||
}
|
||||
|
||||
formatCplusplus cli/
|
||||
formatCplusplus democlient/
|
||||
formatCplusplus gui/
|
||||
formatCplusplus lib/
|
||||
formatCplusplus oss-fuzz/
|
||||
formatCplusplus test/
|
||||
formatCplusplus tools/
|
||||
formatCplusplus samples/
|
|
@ -442,8 +442,7 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy
|
|||
|
||||
QPpmHandler::QPpmHandler()
|
||||
: state(Ready)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
bool QPpmHandler::readHeader()
|
||||
{
|
||||
|
|
|
@ -55,14 +55,28 @@ public:
|
|||
virtual int getType() = 0;
|
||||
|
||||
// Return size of input and output tuples.
|
||||
int getInputSize() { return m; }
|
||||
int getOutputSize() { return n; }
|
||||
int getInputSize() {
|
||||
return m;
|
||||
}
|
||||
int getOutputSize() {
|
||||
return n;
|
||||
}
|
||||
|
||||
double getDomainMin(int i) { return domain[i][0]; }
|
||||
double getDomainMax(int i) { return domain[i][1]; }
|
||||
double getRangeMin(int i) { return range[i][0]; }
|
||||
double getRangeMax(int i) { return range[i][1]; }
|
||||
GBool getHasRange() { return hasRange; }
|
||||
double getDomainMin(int i) {
|
||||
return domain[i][0];
|
||||
}
|
||||
double getDomainMax(int i) {
|
||||
return domain[i][1];
|
||||
}
|
||||
double getRangeMin(int i) {
|
||||
return range[i][0];
|
||||
}
|
||||
double getRangeMax(int i) {
|
||||
return range[i][1];
|
||||
}
|
||||
GBool getHasRange() {
|
||||
return hasRange;
|
||||
}
|
||||
|
||||
// Transform an input tuple into an output tuple.
|
||||
virtual void transform(double *in, double *out) = 0;
|
||||
|
@ -88,10 +102,16 @@ public:
|
|||
|
||||
IdentityFunction();
|
||||
virtual ~IdentityFunction();
|
||||
virtual Function *copy() { return new IdentityFunction(); }
|
||||
virtual int getType() { return -1; }
|
||||
virtual Function *copy() {
|
||||
return new IdentityFunction();
|
||||
}
|
||||
virtual int getType() {
|
||||
return -1;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return gTrue; }
|
||||
virtual GBool isOk() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
@ -105,17 +125,35 @@ public:
|
|||
|
||||
SampledFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~SampledFunction();
|
||||
virtual Function *copy() { return new SampledFunction(this); }
|
||||
virtual int getType() { return 0; }
|
||||
virtual Function *copy() {
|
||||
return new SampledFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 0;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getSampleSize(int i) { return sampleSize[i]; }
|
||||
double getEncodeMin(int i) { return encode[i][0]; }
|
||||
double getEncodeMax(int i) { return encode[i][1]; }
|
||||
double getDecodeMin(int i) { return decode[i][0]; }
|
||||
double getDecodeMax(int i) { return decode[i][1]; }
|
||||
double *getSamples() { return samples; }
|
||||
int getSampleSize(int i) {
|
||||
return sampleSize[i];
|
||||
}
|
||||
double getEncodeMin(int i) {
|
||||
return encode[i][0];
|
||||
}
|
||||
double getEncodeMax(int i) {
|
||||
return encode[i][1];
|
||||
}
|
||||
double getDecodeMin(int i) {
|
||||
return decode[i][0];
|
||||
}
|
||||
double getDecodeMax(int i) {
|
||||
return decode[i][1];
|
||||
}
|
||||
double *getSamples() {
|
||||
return samples;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -147,14 +185,26 @@ public:
|
|||
|
||||
ExponentialFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~ExponentialFunction();
|
||||
virtual Function *copy() { return new ExponentialFunction(this); }
|
||||
virtual int getType() { return 2; }
|
||||
virtual Function *copy() {
|
||||
return new ExponentialFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 2;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
double *getC0() { return c0; }
|
||||
double *getC1() { return c1; }
|
||||
double getE() { return e; }
|
||||
double *getC0() {
|
||||
return c0;
|
||||
}
|
||||
double *getC1() {
|
||||
return c1;
|
||||
}
|
||||
double getE() {
|
||||
return e;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -175,16 +225,32 @@ public:
|
|||
|
||||
StitchingFunction(Object *funcObj, Dict *dict, int recursion);
|
||||
virtual ~StitchingFunction();
|
||||
virtual Function *copy() { return new StitchingFunction(this); }
|
||||
virtual int getType() { return 3; }
|
||||
virtual Function *copy() {
|
||||
return new StitchingFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 3;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getNumFuncs() { return k; }
|
||||
Function *getFunc(int i) { return funcs[i]; }
|
||||
double *getBounds() { return bounds; }
|
||||
double *getEncode() { return encode; }
|
||||
double *getScale() { return scale; }
|
||||
int getNumFuncs() {
|
||||
return k;
|
||||
}
|
||||
Function *getFunc(int i) {
|
||||
return funcs[i];
|
||||
}
|
||||
double *getBounds() {
|
||||
return bounds;
|
||||
}
|
||||
double *getEncode() {
|
||||
return encode;
|
||||
}
|
||||
double *getScale() {
|
||||
return scale;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -207,12 +273,20 @@ public:
|
|||
|
||||
PostScriptFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~PostScriptFunction();
|
||||
virtual Function *copy() { return new PostScriptFunction(this); }
|
||||
virtual int getType() { return 4; }
|
||||
virtual Function *copy() {
|
||||
return new PostScriptFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 4;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
GString *getCodeString() { return codeString; }
|
||||
GString *getCodeString() {
|
||||
return codeString;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -99,7 +99,9 @@ public:
|
|||
virtual ~PSOutputDev();
|
||||
|
||||
// Check if file was successfully created.
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
// Returns false if there have been any errors on the output stream.
|
||||
GBool checkIO();
|
||||
|
@ -108,30 +110,42 @@ public:
|
|||
|
||||
// Does this device use upside-down coordinates?
|
||||
// (Upside-down means (0,0) is the top left corner of the page.)
|
||||
virtual GBool upsideDown() { return gFalse; }
|
||||
virtual GBool upsideDown() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Does this device use drawChar() or drawString()?
|
||||
virtual GBool useDrawChar() { return gFalse; }
|
||||
virtual GBool useDrawChar() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Does this device use tilingPatternFill()? If this returns false,
|
||||
// tiling pattern fills will be reduced to a series of other drawing
|
||||
// operations.
|
||||
virtual GBool useTilingPatternFill() { return gTrue; }
|
||||
virtual GBool useTilingPatternFill() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
// Does this device use functionShadedFill(), axialShadedFill(), and
|
||||
// radialShadedFill()? If this returns false, these shaded fills
|
||||
// will be reduced to a series of other drawing operations.
|
||||
virtual GBool useShadedFills()
|
||||
{ return level == psLevel2 || level == psLevel2Sep ||
|
||||
level == psLevel3 || level == psLevel3Sep; }
|
||||
{
|
||||
return level == psLevel2 || level == psLevel2Sep ||
|
||||
level == psLevel3 || level == psLevel3Sep;
|
||||
}
|
||||
|
||||
// Does this device use drawForm()? If this returns false,
|
||||
// form-type XObjects will be interpreted (i.e., unrolled).
|
||||
virtual GBool useDrawForm() { return preload; }
|
||||
virtual GBool useDrawForm() {
|
||||
return preload;
|
||||
}
|
||||
|
||||
// Does this device use beginType3Char/endType3Char? Otherwise,
|
||||
// text in Type 3 fonts will be drawn with drawChar/drawString.
|
||||
virtual GBool interpretType3Chars() { return gFalse; }
|
||||
virtual GBool interpretType3Chars() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
//----- header/trailer (used only if manualCtrl is true)
|
||||
|
||||
|
@ -260,21 +274,35 @@ public:
|
|||
|
||||
//----- miscellaneous
|
||||
void setImageableArea(int imgLLXA, int imgLLYA, int imgURXA, int imgURYA)
|
||||
{ imgLLX = imgLLXA; imgLLY = imgLLYA; imgURX = imgURXA; imgURY = imgURYA; }
|
||||
{
|
||||
imgLLX = imgLLXA; imgLLY = imgLLYA; imgURX = imgURXA; imgURY = imgURYA;
|
||||
}
|
||||
void setOffset(double x, double y)
|
||||
{ tx0 = x; ty0 = y; }
|
||||
{
|
||||
tx0 = x; ty0 = y;
|
||||
}
|
||||
void setScale(double x, double y)
|
||||
{ xScale0 = x; yScale0 = y; }
|
||||
{
|
||||
xScale0 = x; yScale0 = y;
|
||||
}
|
||||
void setRotate(int rotateA)
|
||||
{ rotate0 = rotateA; }
|
||||
{
|
||||
rotate0 = rotateA;
|
||||
}
|
||||
void setClip(double llx, double lly, double urx, double ury)
|
||||
{ clipLLX0 = llx; clipLLY0 = lly; clipURX0 = urx; clipURY0 = ury; }
|
||||
{
|
||||
clipLLX0 = llx; clipLLY0 = lly; clipURX0 = urx; clipURY0 = ury;
|
||||
}
|
||||
void setUnderlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
|
||||
void *data)
|
||||
{ underlayCbk = cbk; underlayCbkData = data; }
|
||||
{
|
||||
underlayCbk = cbk; underlayCbkData = data;
|
||||
}
|
||||
void setOverlayCbk(void (*cbk)(PSOutputDev *psOut, void *data),
|
||||
void *data)
|
||||
{ overlayCbk = cbk; overlayCbkData = data; }
|
||||
{
|
||||
overlayCbk = cbk; overlayCbkData = data;
|
||||
}
|
||||
|
||||
void writePSChar(char c);
|
||||
void writePSBlock(char *s, int len);
|
||||
|
|
|
@ -235,28 +235,40 @@ public:
|
|||
int *xMax, int *yMax);
|
||||
|
||||
// Return the associated bitmap.
|
||||
SplashBitmap *getBitmap() { return bitmap; }
|
||||
SplashBitmap *getBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
// Set the minimum line width.
|
||||
void setMinLineWidth(SplashCoord w) { minLineWidth = w; }
|
||||
void setMinLineWidth(SplashCoord w) {
|
||||
minLineWidth = w;
|
||||
}
|
||||
|
||||
// Get a bounding box which includes all modifications since the
|
||||
// last call to clearModRegion.
|
||||
void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax)
|
||||
{ *xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax; }
|
||||
{
|
||||
*xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax;
|
||||
}
|
||||
|
||||
// Clear the modified region bounding box.
|
||||
void clearModRegion();
|
||||
|
||||
// Get clipping status for the last drawing operation subject to
|
||||
// clipping.
|
||||
SplashClipResult getClipRes() { return opClipRes; }
|
||||
SplashClipResult getClipRes() {
|
||||
return opClipRes;
|
||||
}
|
||||
|
||||
// Toggle debug mode on or off.
|
||||
void setDebugMode(GBool debugModeA) { debugMode = debugModeA; }
|
||||
void setDebugMode(GBool debugModeA) {
|
||||
debugMode = debugModeA;
|
||||
}
|
||||
|
||||
#if 1 //~tmp: turn off anti-aliasing temporarily
|
||||
void setInShading(GBool sh) { inShading = sh; }
|
||||
void setInShading(GBool sh) {
|
||||
inShading = sh;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ public:
|
|||
// Get kind of stream.
|
||||
virtual StreamKind getKind() = 0;
|
||||
|
||||
virtual GBool isEmbedStream() { return gFalse; }
|
||||
virtual GBool isEmbedStream() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Reset stream to beginning.
|
||||
virtual void reset() = 0;
|
||||
|
@ -133,14 +135,18 @@ public:
|
|||
virtual Dict *getDict() = 0;
|
||||
|
||||
// Is this an encoding filter?
|
||||
virtual GBool isEncoder() { return gFalse; }
|
||||
virtual GBool isEncoder() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Get image parameters which are defined by the stream contents.
|
||||
virtual void getImageParams(int *bitsPerComponent,
|
||||
StreamColorSpaceMode *csMode) {}
|
||||
|
||||
// Return the next stream in the "stack".
|
||||
virtual Stream *getNextStream() { return NULL; }
|
||||
virtual Stream *getNextStream() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Add filters to this stream according to the parameters in <dict>.
|
||||
// Returns the new stream.
|
||||
|
@ -165,11 +171,21 @@ public:
|
|||
virtual Stream *makeSubStream(GFileOffset start, GBool limited,
|
||||
GFileOffset length, Object *dict) = 0;
|
||||
virtual void setPos(GFileOffset pos, int dir = 0) = 0;
|
||||
virtual GBool isBinary(GBool last = gTrue) { return last; }
|
||||
virtual BaseStream *getBaseStream() { return this; }
|
||||
virtual Stream *getUndecodedStream() { return this; }
|
||||
virtual Dict *getDict() { return dict.getDict(); }
|
||||
virtual GString *getFileName() { return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return last;
|
||||
}
|
||||
virtual BaseStream *getBaseStream() {
|
||||
return this;
|
||||
}
|
||||
virtual Stream *getUndecodedStream() {
|
||||
return this;
|
||||
}
|
||||
virtual Dict *getDict() {
|
||||
return dict.getDict();
|
||||
}
|
||||
virtual GString *getFileName() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get/set position of first byte of stream within the file.
|
||||
virtual GFileOffset getStart() = 0;
|
||||
|
@ -192,12 +208,22 @@ public:
|
|||
FilterStream(Stream *strA);
|
||||
virtual ~FilterStream();
|
||||
virtual void close();
|
||||
virtual GFileOffset getPos() { return str->getPos(); }
|
||||
virtual GFileOffset getPos() {
|
||||
return str->getPos();
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual BaseStream *getBaseStream() { return str->getBaseStream(); }
|
||||
virtual Stream *getUndecodedStream() { return str->getUndecodedStream(); }
|
||||
virtual Dict *getDict() { return str->getDict(); }
|
||||
virtual Stream *getNextStream() { return str; }
|
||||
virtual BaseStream *getBaseStream() {
|
||||
return str->getBaseStream();
|
||||
}
|
||||
virtual Stream *getUndecodedStream() {
|
||||
return str->getUndecodedStream();
|
||||
}
|
||||
virtual Dict *getDict() {
|
||||
return str->getDict();
|
||||
}
|
||||
virtual Stream *getNextStream() {
|
||||
return str;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -263,7 +289,9 @@ public:
|
|||
|
||||
~StreamPredictor();
|
||||
|
||||
GBool isOk() { return ok; }
|
||||
GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
void reset();
|
||||
|
||||
|
@ -271,10 +299,18 @@ public:
|
|||
int getChar();
|
||||
int getBlock(char *blk, int size);
|
||||
|
||||
int getPredictor() { return predictor; }
|
||||
int getWidth() { return width; }
|
||||
int getNComps() { return nComps; }
|
||||
int getNBits() { return nBits; }
|
||||
int getPredictor() {
|
||||
return predictor;
|
||||
}
|
||||
int getWidth() {
|
||||
return width;
|
||||
}
|
||||
int getNComps() {
|
||||
return nComps;
|
||||
}
|
||||
int getNBits() {
|
||||
return nBits;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -308,16 +344,26 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset startA, GBool limitedA,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return strFile; }
|
||||
virtual StreamKind getKind() {
|
||||
return strFile;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return bufPos + (int)(bufPtr - buf); }
|
||||
virtual GFileOffset getPos() {
|
||||
return bufPos + (int)(bufPtr - buf);
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart() { return start; }
|
||||
virtual GFileOffset getStart() {
|
||||
return start;
|
||||
}
|
||||
virtual void moveStart(int delta);
|
||||
|
||||
private:
|
||||
|
@ -348,17 +394,27 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset start, GBool limited,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual void close();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF; }
|
||||
{
|
||||
return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF;
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF; }
|
||||
{
|
||||
return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF;
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return (GFileOffset)(bufPtr - buf); }
|
||||
virtual GFileOffset getPos() {
|
||||
return (GFileOffset)(bufPtr - buf);
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart() { return start; }
|
||||
virtual GFileOffset getStart() {
|
||||
return start;
|
||||
}
|
||||
virtual void moveStart(int delta);
|
||||
|
||||
private:
|
||||
|
@ -389,13 +445,19 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset start, GBool limitedA,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return str->getKind(); }
|
||||
virtual GBool isEmbedStream() { return gTrue; }
|
||||
virtual StreamKind getKind() {
|
||||
return str->getKind();
|
||||
}
|
||||
virtual GBool isEmbedStream() {
|
||||
return gTrue;
|
||||
}
|
||||
virtual void reset() {}
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return str->getPos(); }
|
||||
virtual GFileOffset getPos() {
|
||||
return str->getPos();
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart();
|
||||
virtual void moveStart(int delta);
|
||||
|
@ -417,10 +479,14 @@ public:
|
|||
ASCIIHexStream(Stream *strA);
|
||||
virtual ~ASCIIHexStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strASCIIHex; }
|
||||
virtual StreamKind getKind() {
|
||||
return strASCIIHex;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ int c = lookChar(); buf = EOF; return c; }
|
||||
{
|
||||
int c = lookChar(); buf = EOF; return c;
|
||||
}
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -441,10 +507,14 @@ public:
|
|||
ASCII85Stream(Stream *strA);
|
||||
virtual ~ASCII85Stream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strASCII85; }
|
||||
virtual StreamKind getKind() {
|
||||
return strASCII85;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ int ch = lookChar(); ++index; return ch; }
|
||||
{
|
||||
int ch = lookChar(); ++index; return ch;
|
||||
}
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -468,7 +538,9 @@ public:
|
|||
int bits, int earlyA);
|
||||
virtual ~LZWStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strLZW; }
|
||||
virtual StreamKind getKind() {
|
||||
return strLZW;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -513,12 +585,18 @@ public:
|
|||
RunLengthStream(Stream *strA);
|
||||
virtual ~RunLengthStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strRunLength; }
|
||||
virtual StreamKind getKind() {
|
||||
return strRunLength;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -547,7 +625,9 @@ public:
|
|||
GBool endOfBlockA, GBool blackA);
|
||||
virtual ~CCITTFaxStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strCCITTFax; }
|
||||
virtual StreamKind getKind() {
|
||||
return strCCITTFax;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -584,7 +664,9 @@ private:
|
|||
short getWhiteCode();
|
||||
short getBlackCode();
|
||||
short lookBits(int n);
|
||||
void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; }
|
||||
void eatBits(int n) {
|
||||
if ((inputBits -= n) < 0) inputBits = 0;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
@ -644,7 +726,9 @@ public:
|
|||
DCTStream(Stream *strA, int colorXformA);
|
||||
virtual ~DCTStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strDCT; }
|
||||
virtual StreamKind getKind() {
|
||||
return strDCT;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual void close();
|
||||
virtual int getChar();
|
||||
|
@ -652,7 +736,9 @@ public:
|
|||
virtual int getBlock(char *blk, int size);
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
Stream *getRawStream() { return str; }
|
||||
Stream *getRawStream() {
|
||||
return str;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -779,7 +865,9 @@ public:
|
|||
int colors, int bits);
|
||||
virtual ~FlateStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strFlate; }
|
||||
virtual StreamKind getKind() {
|
||||
return strFlate;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -835,14 +923,26 @@ public:
|
|||
EOFStream(Stream *strA);
|
||||
virtual ~EOFStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset() {}
|
||||
virtual int getChar() { return EOF; }
|
||||
virtual int lookChar() { return EOF; }
|
||||
virtual int getBlock(char *blk, int size) { return 0; }
|
||||
virtual int getChar() {
|
||||
return EOF;
|
||||
}
|
||||
virtual int lookChar() {
|
||||
return EOF;
|
||||
}
|
||||
virtual int getBlock(char *blk, int size) {
|
||||
return 0;
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
@ -855,12 +955,16 @@ public:
|
|||
BufStream(Stream *strA, int bufSizeA);
|
||||
virtual ~BufStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
||||
int lookChar(int idx);
|
||||
|
@ -881,14 +985,20 @@ public:
|
|||
FixedLengthEncoder(Stream *strA, int lengthA);
|
||||
~FixedLengthEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -906,16 +1016,28 @@ public:
|
|||
ASCIIHexEncoder(Stream *strA);
|
||||
virtual ~ASCIIHexEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -938,16 +1060,28 @@ public:
|
|||
ASCII85Encoder(Stream *strA);
|
||||
virtual ~ASCII85Encoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -970,16 +1104,28 @@ public:
|
|||
RunLengthEncoder(Stream *strA);
|
||||
virtual ~RunLengthEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gTrue;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -1008,14 +1154,22 @@ public:
|
|||
LZWEncoder(Stream *strA);
|
||||
virtual ~LZWEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gTrue;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -55,14 +55,28 @@ public:
|
|||
virtual int getType() = 0;
|
||||
|
||||
// Return size of input and output tuples.
|
||||
int getInputSize() { return m; }
|
||||
int getOutputSize() { return n; }
|
||||
int getInputSize() {
|
||||
return m;
|
||||
}
|
||||
int getOutputSize() {
|
||||
return n;
|
||||
}
|
||||
|
||||
double getDomainMin(int i) { return domain[i][0]; }
|
||||
double getDomainMax(int i) { return domain[i][1]; }
|
||||
double getRangeMin(int i) { return range[i][0]; }
|
||||
double getRangeMax(int i) { return range[i][1]; }
|
||||
GBool getHasRange() { return hasRange; }
|
||||
double getDomainMin(int i) {
|
||||
return domain[i][0];
|
||||
}
|
||||
double getDomainMax(int i) {
|
||||
return domain[i][1];
|
||||
}
|
||||
double getRangeMin(int i) {
|
||||
return range[i][0];
|
||||
}
|
||||
double getRangeMax(int i) {
|
||||
return range[i][1];
|
||||
}
|
||||
GBool getHasRange() {
|
||||
return hasRange;
|
||||
}
|
||||
|
||||
// Transform an input tuple into an output tuple.
|
||||
virtual void transform(double *in, double *out) = 0;
|
||||
|
@ -88,10 +102,16 @@ public:
|
|||
|
||||
IdentityFunction();
|
||||
virtual ~IdentityFunction();
|
||||
virtual Function *copy() { return new IdentityFunction(); }
|
||||
virtual int getType() { return -1; }
|
||||
virtual Function *copy() {
|
||||
return new IdentityFunction();
|
||||
}
|
||||
virtual int getType() {
|
||||
return -1;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return gTrue; }
|
||||
virtual GBool isOk() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
@ -105,17 +125,35 @@ public:
|
|||
|
||||
SampledFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~SampledFunction();
|
||||
virtual Function *copy() { return new SampledFunction(this); }
|
||||
virtual int getType() { return 0; }
|
||||
virtual Function *copy() {
|
||||
return new SampledFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 0;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getSampleSize(int i) { return sampleSize[i]; }
|
||||
double getEncodeMin(int i) { return encode[i][0]; }
|
||||
double getEncodeMax(int i) { return encode[i][1]; }
|
||||
double getDecodeMin(int i) { return decode[i][0]; }
|
||||
double getDecodeMax(int i) { return decode[i][1]; }
|
||||
double *getSamples() { return samples; }
|
||||
int getSampleSize(int i) {
|
||||
return sampleSize[i];
|
||||
}
|
||||
double getEncodeMin(int i) {
|
||||
return encode[i][0];
|
||||
}
|
||||
double getEncodeMax(int i) {
|
||||
return encode[i][1];
|
||||
}
|
||||
double getDecodeMin(int i) {
|
||||
return decode[i][0];
|
||||
}
|
||||
double getDecodeMax(int i) {
|
||||
return decode[i][1];
|
||||
}
|
||||
double *getSamples() {
|
||||
return samples;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -147,14 +185,26 @@ public:
|
|||
|
||||
ExponentialFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~ExponentialFunction();
|
||||
virtual Function *copy() { return new ExponentialFunction(this); }
|
||||
virtual int getType() { return 2; }
|
||||
virtual Function *copy() {
|
||||
return new ExponentialFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 2;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
double *getC0() { return c0; }
|
||||
double *getC1() { return c1; }
|
||||
double getE() { return e; }
|
||||
double *getC0() {
|
||||
return c0;
|
||||
}
|
||||
double *getC1() {
|
||||
return c1;
|
||||
}
|
||||
double getE() {
|
||||
return e;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -175,16 +225,32 @@ public:
|
|||
|
||||
StitchingFunction(Object *funcObj, Dict *dict, int recursion);
|
||||
virtual ~StitchingFunction();
|
||||
virtual Function *copy() { return new StitchingFunction(this); }
|
||||
virtual int getType() { return 3; }
|
||||
virtual Function *copy() {
|
||||
return new StitchingFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 3;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getNumFuncs() { return k; }
|
||||
Function *getFunc(int i) { return funcs[i]; }
|
||||
double *getBounds() { return bounds; }
|
||||
double *getEncode() { return encode; }
|
||||
double *getScale() { return scale; }
|
||||
int getNumFuncs() {
|
||||
return k;
|
||||
}
|
||||
Function *getFunc(int i) {
|
||||
return funcs[i];
|
||||
}
|
||||
double *getBounds() {
|
||||
return bounds;
|
||||
}
|
||||
double *getEncode() {
|
||||
return encode;
|
||||
}
|
||||
double *getScale() {
|
||||
return scale;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -207,12 +273,20 @@ public:
|
|||
|
||||
PostScriptFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~PostScriptFunction();
|
||||
virtual Function *copy() { return new PostScriptFunction(this); }
|
||||
virtual int getType() { return 4; }
|
||||
virtual Function *copy() {
|
||||
return new PostScriptFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 4;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
GString *getCodeString() { return codeString; }
|
||||
GString *getCodeString() {
|
||||
return codeString;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -235,28 +235,40 @@ public:
|
|||
int *xMax, int *yMax);
|
||||
|
||||
// Return the associated bitmap.
|
||||
SplashBitmap *getBitmap() { return bitmap; }
|
||||
SplashBitmap *getBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
// Set the minimum line width.
|
||||
void setMinLineWidth(SplashCoord w) { minLineWidth = w; }
|
||||
void setMinLineWidth(SplashCoord w) {
|
||||
minLineWidth = w;
|
||||
}
|
||||
|
||||
// Get a bounding box which includes all modifications since the
|
||||
// last call to clearModRegion.
|
||||
void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax)
|
||||
{ *xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax; }
|
||||
{
|
||||
*xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax;
|
||||
}
|
||||
|
||||
// Clear the modified region bounding box.
|
||||
void clearModRegion();
|
||||
|
||||
// Get clipping status for the last drawing operation subject to
|
||||
// clipping.
|
||||
SplashClipResult getClipRes() { return opClipRes; }
|
||||
SplashClipResult getClipRes() {
|
||||
return opClipRes;
|
||||
}
|
||||
|
||||
// Toggle debug mode on or off.
|
||||
void setDebugMode(GBool debugModeA) { debugMode = debugModeA; }
|
||||
void setDebugMode(GBool debugModeA) {
|
||||
debugMode = debugModeA;
|
||||
}
|
||||
|
||||
#if 1 //~tmp: turn off anti-aliasing temporarily
|
||||
void setInShading(GBool sh) { inShading = sh; }
|
||||
void setInShading(GBool sh) {
|
||||
inShading = sh;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -78,7 +78,9 @@ public:
|
|||
// Get kind of stream.
|
||||
virtual StreamKind getKind() = 0;
|
||||
|
||||
virtual GBool isEmbedStream() { return gFalse; }
|
||||
virtual GBool isEmbedStream() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Reset stream to beginning.
|
||||
virtual void reset() = 0;
|
||||
|
@ -133,14 +135,18 @@ public:
|
|||
virtual Dict *getDict() = 0;
|
||||
|
||||
// Is this an encoding filter?
|
||||
virtual GBool isEncoder() { return gFalse; }
|
||||
virtual GBool isEncoder() {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Get image parameters which are defined by the stream contents.
|
||||
virtual void getImageParams(int *bitsPerComponent,
|
||||
StreamColorSpaceMode *csMode) {}
|
||||
|
||||
// Return the next stream in the "stack".
|
||||
virtual Stream *getNextStream() { return NULL; }
|
||||
virtual Stream *getNextStream() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Add filters to this stream according to the parameters in <dict>.
|
||||
// Returns the new stream.
|
||||
|
@ -165,11 +171,21 @@ public:
|
|||
virtual Stream *makeSubStream(GFileOffset start, GBool limited,
|
||||
GFileOffset length, Object *dict) = 0;
|
||||
virtual void setPos(GFileOffset pos, int dir = 0) = 0;
|
||||
virtual GBool isBinary(GBool last = gTrue) { return last; }
|
||||
virtual BaseStream *getBaseStream() { return this; }
|
||||
virtual Stream *getUndecodedStream() { return this; }
|
||||
virtual Dict *getDict() { return dict.getDict(); }
|
||||
virtual GString *getFileName() { return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return last;
|
||||
}
|
||||
virtual BaseStream *getBaseStream() {
|
||||
return this;
|
||||
}
|
||||
virtual Stream *getUndecodedStream() {
|
||||
return this;
|
||||
}
|
||||
virtual Dict *getDict() {
|
||||
return dict.getDict();
|
||||
}
|
||||
virtual GString *getFileName() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Get/set position of first byte of stream within the file.
|
||||
virtual GFileOffset getStart() = 0;
|
||||
|
@ -192,12 +208,22 @@ public:
|
|||
FilterStream(Stream *strA);
|
||||
virtual ~FilterStream();
|
||||
virtual void close();
|
||||
virtual GFileOffset getPos() { return str->getPos(); }
|
||||
virtual GFileOffset getPos() {
|
||||
return str->getPos();
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual BaseStream *getBaseStream() { return str->getBaseStream(); }
|
||||
virtual Stream *getUndecodedStream() { return str->getUndecodedStream(); }
|
||||
virtual Dict *getDict() { return str->getDict(); }
|
||||
virtual Stream *getNextStream() { return str; }
|
||||
virtual BaseStream *getBaseStream() {
|
||||
return str->getBaseStream();
|
||||
}
|
||||
virtual Stream *getUndecodedStream() {
|
||||
return str->getUndecodedStream();
|
||||
}
|
||||
virtual Dict *getDict() {
|
||||
return str->getDict();
|
||||
}
|
||||
virtual Stream *getNextStream() {
|
||||
return str;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -263,7 +289,9 @@ public:
|
|||
|
||||
~StreamPredictor();
|
||||
|
||||
GBool isOk() { return ok; }
|
||||
GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
void reset();
|
||||
|
||||
|
@ -271,10 +299,18 @@ public:
|
|||
int getChar();
|
||||
int getBlock(char *blk, int size);
|
||||
|
||||
int getPredictor() { return predictor; }
|
||||
int getWidth() { return width; }
|
||||
int getNComps() { return nComps; }
|
||||
int getNBits() { return nBits; }
|
||||
int getPredictor() {
|
||||
return predictor;
|
||||
}
|
||||
int getWidth() {
|
||||
return width;
|
||||
}
|
||||
int getNComps() {
|
||||
return nComps;
|
||||
}
|
||||
int getNBits() {
|
||||
return nBits;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -308,16 +344,26 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset startA, GBool limitedA,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return strFile; }
|
||||
virtual StreamKind getKind() {
|
||||
return strFile;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return bufPos + (int)(bufPtr - buf); }
|
||||
virtual GFileOffset getPos() {
|
||||
return bufPos + (int)(bufPtr - buf);
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart() { return start; }
|
||||
virtual GFileOffset getStart() {
|
||||
return start;
|
||||
}
|
||||
virtual void moveStart(int delta);
|
||||
|
||||
private:
|
||||
|
@ -348,17 +394,27 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset start, GBool limited,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual void close();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF; }
|
||||
{
|
||||
return (bufPtr < bufEnd) ? (*bufPtr++ & 0xff) : EOF;
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF; }
|
||||
{
|
||||
return (bufPtr < bufEnd) ? (*bufPtr & 0xff) : EOF;
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return (GFileOffset)(bufPtr - buf); }
|
||||
virtual GFileOffset getPos() {
|
||||
return (GFileOffset)(bufPtr - buf);
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart() { return start; }
|
||||
virtual GFileOffset getStart() {
|
||||
return start;
|
||||
}
|
||||
virtual void moveStart(int delta);
|
||||
|
||||
private:
|
||||
|
@ -389,13 +445,19 @@ public:
|
|||
virtual Stream *copy();
|
||||
virtual Stream *makeSubStream(GFileOffset start, GBool limitedA,
|
||||
GFileOffset lengthA, Object *dictA);
|
||||
virtual StreamKind getKind() { return str->getKind(); }
|
||||
virtual GBool isEmbedStream() { return gTrue; }
|
||||
virtual StreamKind getKind() {
|
||||
return str->getKind();
|
||||
}
|
||||
virtual GBool isEmbedStream() {
|
||||
return gTrue;
|
||||
}
|
||||
virtual void reset() {}
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GFileOffset getPos() { return str->getPos(); }
|
||||
virtual GFileOffset getPos() {
|
||||
return str->getPos();
|
||||
}
|
||||
virtual void setPos(GFileOffset pos, int dir = 0);
|
||||
virtual GFileOffset getStart();
|
||||
virtual void moveStart(int delta);
|
||||
|
@ -417,10 +479,14 @@ public:
|
|||
ASCIIHexStream(Stream *strA);
|
||||
virtual ~ASCIIHexStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strASCIIHex; }
|
||||
virtual StreamKind getKind() {
|
||||
return strASCIIHex;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ int c = lookChar(); buf = EOF; return c; }
|
||||
{
|
||||
int c = lookChar(); buf = EOF; return c;
|
||||
}
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -441,10 +507,14 @@ public:
|
|||
ASCII85Stream(Stream *strA);
|
||||
virtual ~ASCII85Stream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strASCII85; }
|
||||
virtual StreamKind getKind() {
|
||||
return strASCII85;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ int ch = lookChar(); ++index; return ch; }
|
||||
{
|
||||
int ch = lookChar(); ++index; return ch;
|
||||
}
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -468,7 +538,9 @@ public:
|
|||
int bits, int earlyA);
|
||||
virtual ~LZWStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strLZW; }
|
||||
virtual StreamKind getKind() {
|
||||
return strLZW;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -513,12 +585,18 @@ public:
|
|||
RunLengthStream(Stream *strA);
|
||||
virtual ~RunLengthStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strRunLength; }
|
||||
virtual StreamKind getKind() {
|
||||
return strRunLength;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual int getBlock(char *blk, int size);
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
@ -547,7 +625,9 @@ public:
|
|||
GBool endOfBlockA, GBool blackA);
|
||||
virtual ~CCITTFaxStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strCCITTFax; }
|
||||
virtual StreamKind getKind() {
|
||||
return strCCITTFax;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -584,7 +664,9 @@ private:
|
|||
short getWhiteCode();
|
||||
short getBlackCode();
|
||||
short lookBits(int n);
|
||||
void eatBits(int n) { if ((inputBits -= n) < 0) inputBits = 0; }
|
||||
void eatBits(int n) {
|
||||
if ((inputBits -= n) < 0) inputBits = 0;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
@ -644,7 +726,9 @@ public:
|
|||
DCTStream(Stream *strA, int colorXformA);
|
||||
virtual ~DCTStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strDCT; }
|
||||
virtual StreamKind getKind() {
|
||||
return strDCT;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual void close();
|
||||
virtual int getChar();
|
||||
|
@ -652,7 +736,9 @@ public:
|
|||
virtual int getBlock(char *blk, int size);
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent);
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
Stream *getRawStream() { return str; }
|
||||
Stream *getRawStream() {
|
||||
return str;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -779,7 +865,9 @@ public:
|
|||
int colors, int bits);
|
||||
virtual ~FlateStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strFlate; }
|
||||
virtual StreamKind getKind() {
|
||||
return strFlate;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
|
@ -835,14 +923,26 @@ public:
|
|||
EOFStream(Stream *strA);
|
||||
virtual ~EOFStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset() {}
|
||||
virtual int getChar() { return EOF; }
|
||||
virtual int lookChar() { return EOF; }
|
||||
virtual int getBlock(char *blk, int size) { return 0; }
|
||||
virtual int getChar() {
|
||||
return EOF;
|
||||
}
|
||||
virtual int lookChar() {
|
||||
return EOF;
|
||||
}
|
||||
virtual int getBlock(char *blk, int size) {
|
||||
return 0;
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
@ -855,12 +955,16 @@ public:
|
|||
BufStream(Stream *strA, int bufSizeA);
|
||||
virtual ~BufStream();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
|
||||
int lookChar(int idx);
|
||||
|
@ -881,14 +985,20 @@ public:
|
|||
FixedLengthEncoder(Stream *strA, int lengthA);
|
||||
~FixedLengthEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue);
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -906,16 +1016,28 @@ public:
|
|||
ASCIIHexEncoder(Stream *strA);
|
||||
virtual ~ASCIIHexEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -938,16 +1060,28 @@ public:
|
|||
ASCII85Encoder(Stream *strA);
|
||||
virtual ~ASCII85Encoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gFalse; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gFalse;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -970,16 +1104,28 @@ public:
|
|||
RunLengthEncoder(Stream *strA);
|
||||
virtual ~RunLengthEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff);
|
||||
}
|
||||
virtual int lookChar()
|
||||
{ return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); }
|
||||
{
|
||||
return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff);
|
||||
}
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gTrue;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -1008,14 +1154,22 @@ public:
|
|||
LZWEncoder(Stream *strA);
|
||||
virtual ~LZWEncoder();
|
||||
virtual Stream *copy();
|
||||
virtual StreamKind getKind() { return strWeird; }
|
||||
virtual StreamKind getKind() {
|
||||
return strWeird;
|
||||
}
|
||||
virtual void reset();
|
||||
virtual int getChar();
|
||||
virtual int lookChar();
|
||||
virtual GString *getPSFilter(int psLevel, const char *indent)
|
||||
{ return NULL; }
|
||||
virtual GBool isBinary(GBool last = gTrue) { return gTrue; }
|
||||
virtual GBool isEncoder() { return gTrue; }
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
virtual GBool isBinary(GBool last = gTrue) {
|
||||
return gTrue;
|
||||
}
|
||||
virtual GBool isEncoder() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -55,14 +55,28 @@ public:
|
|||
virtual int getType() = 0;
|
||||
|
||||
// Return size of input and output tuples.
|
||||
int getInputSize() { return m; }
|
||||
int getOutputSize() { return n; }
|
||||
int getInputSize() {
|
||||
return m;
|
||||
}
|
||||
int getOutputSize() {
|
||||
return n;
|
||||
}
|
||||
|
||||
double getDomainMin(int i) { return domain[i][0]; }
|
||||
double getDomainMax(int i) { return domain[i][1]; }
|
||||
double getRangeMin(int i) { return range[i][0]; }
|
||||
double getRangeMax(int i) { return range[i][1]; }
|
||||
GBool getHasRange() { return hasRange; }
|
||||
double getDomainMin(int i) {
|
||||
return domain[i][0];
|
||||
}
|
||||
double getDomainMax(int i) {
|
||||
return domain[i][1];
|
||||
}
|
||||
double getRangeMin(int i) {
|
||||
return range[i][0];
|
||||
}
|
||||
double getRangeMax(int i) {
|
||||
return range[i][1];
|
||||
}
|
||||
GBool getHasRange() {
|
||||
return hasRange;
|
||||
}
|
||||
|
||||
// Transform an input tuple into an output tuple.
|
||||
virtual void transform(double *in, double *out) = 0;
|
||||
|
@ -88,10 +102,16 @@ public:
|
|||
|
||||
IdentityFunction();
|
||||
virtual ~IdentityFunction();
|
||||
virtual Function *copy() { return new IdentityFunction(); }
|
||||
virtual int getType() { return -1; }
|
||||
virtual Function *copy() {
|
||||
return new IdentityFunction();
|
||||
}
|
||||
virtual int getType() {
|
||||
return -1;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return gTrue; }
|
||||
virtual GBool isOk() {
|
||||
return gTrue;
|
||||
}
|
||||
|
||||
private:
|
||||
};
|
||||
|
@ -105,17 +125,35 @@ public:
|
|||
|
||||
SampledFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~SampledFunction();
|
||||
virtual Function *copy() { return new SampledFunction(this); }
|
||||
virtual int getType() { return 0; }
|
||||
virtual Function *copy() {
|
||||
return new SampledFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 0;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getSampleSize(int i) { return sampleSize[i]; }
|
||||
double getEncodeMin(int i) { return encode[i][0]; }
|
||||
double getEncodeMax(int i) { return encode[i][1]; }
|
||||
double getDecodeMin(int i) { return decode[i][0]; }
|
||||
double getDecodeMax(int i) { return decode[i][1]; }
|
||||
double *getSamples() { return samples; }
|
||||
int getSampleSize(int i) {
|
||||
return sampleSize[i];
|
||||
}
|
||||
double getEncodeMin(int i) {
|
||||
return encode[i][0];
|
||||
}
|
||||
double getEncodeMax(int i) {
|
||||
return encode[i][1];
|
||||
}
|
||||
double getDecodeMin(int i) {
|
||||
return decode[i][0];
|
||||
}
|
||||
double getDecodeMax(int i) {
|
||||
return decode[i][1];
|
||||
}
|
||||
double *getSamples() {
|
||||
return samples;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -147,14 +185,26 @@ public:
|
|||
|
||||
ExponentialFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~ExponentialFunction();
|
||||
virtual Function *copy() { return new ExponentialFunction(this); }
|
||||
virtual int getType() { return 2; }
|
||||
virtual Function *copy() {
|
||||
return new ExponentialFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 2;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
double *getC0() { return c0; }
|
||||
double *getC1() { return c1; }
|
||||
double getE() { return e; }
|
||||
double *getC0() {
|
||||
return c0;
|
||||
}
|
||||
double *getC1() {
|
||||
return c1;
|
||||
}
|
||||
double getE() {
|
||||
return e;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -175,16 +225,32 @@ public:
|
|||
|
||||
StitchingFunction(Object *funcObj, Dict *dict, int recursion);
|
||||
virtual ~StitchingFunction();
|
||||
virtual Function *copy() { return new StitchingFunction(this); }
|
||||
virtual int getType() { return 3; }
|
||||
virtual Function *copy() {
|
||||
return new StitchingFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 3;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
int getNumFuncs() { return k; }
|
||||
Function *getFunc(int i) { return funcs[i]; }
|
||||
double *getBounds() { return bounds; }
|
||||
double *getEncode() { return encode; }
|
||||
double *getScale() { return scale; }
|
||||
int getNumFuncs() {
|
||||
return k;
|
||||
}
|
||||
Function *getFunc(int i) {
|
||||
return funcs[i];
|
||||
}
|
||||
double *getBounds() {
|
||||
return bounds;
|
||||
}
|
||||
double *getEncode() {
|
||||
return encode;
|
||||
}
|
||||
double *getScale() {
|
||||
return scale;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
@ -207,12 +273,20 @@ public:
|
|||
|
||||
PostScriptFunction(Object *funcObj, Dict *dict);
|
||||
virtual ~PostScriptFunction();
|
||||
virtual Function *copy() { return new PostScriptFunction(this); }
|
||||
virtual int getType() { return 4; }
|
||||
virtual Function *copy() {
|
||||
return new PostScriptFunction(this);
|
||||
}
|
||||
virtual int getType() {
|
||||
return 4;
|
||||
}
|
||||
virtual void transform(double *in, double *out);
|
||||
virtual GBool isOk() { return ok; }
|
||||
virtual GBool isOk() {
|
||||
return ok;
|
||||
}
|
||||
|
||||
GString *getCodeString() { return codeString; }
|
||||
GString *getCodeString() {
|
||||
return codeString;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
%
|
||||
%
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Include declarations.
|
||||
*/
|
||||
|
@ -73,7 +73,7 @@
|
|||
#if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
|
||||
#include <openjpeg.h>
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
Forward declarations.
|
||||
*/
|
||||
|
@ -81,7 +81,7 @@
|
|||
static MagickBooleanType
|
||||
WriteJP2Image(const ImageInfo *,Image *,ExceptionInfo *);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -115,7 +115,7 @@ static MagickBooleanType IsJ2K(const unsigned char *magick,const size_t length)
|
|||
return(MagickTrue);
|
||||
return(MagickFalse);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -153,7 +153,7 @@ static MagickBooleanType IsJP2(const unsigned char *magick,const size_t length)
|
|||
return(MagickTrue);
|
||||
return(MagickFalse);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -534,7 +534,7 @@ static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
|
|||
return(GetFirstImageInList(image));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -649,7 +649,7 @@ ModuleExport size_t RegisterJP2Image(void)
|
|||
(void) RegisterMagickInfo(entry);
|
||||
return(MagickImageCoderSignature);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -677,7 +677,7 @@ ModuleExport void UnregisterJP2Image(void)
|
|||
(void) UnregisterMagickInfo("JP2");
|
||||
(void) UnregisterMagickInfo("J2K");
|
||||
}
|
||||
|
||||
|
||||
#if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Include declarations.
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@
|
|||
#include "MagickCore/statistic.h"
|
||||
#include "MagickCore/string_.h"
|
||||
#include "MagickCore/transform.h"
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -127,7 +127,7 @@ static void ClearBounds(Image *image,RectangleInfo *bounds,
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -196,7 +196,7 @@ static MagickBooleanType IsBoundsCleared(const Image *image1,
|
|||
}
|
||||
return(y < (ssize_t) bounds->height ? MagickTrue : MagickFalse);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -347,7 +347,7 @@ MagickExport Image *CoalesceImages(const Image *image,ExceptionInfo *exception)
|
|||
dispose_image=DestroyImage(dispose_image);
|
||||
return(GetFirstImageInList(coalesce_image));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -487,7 +487,7 @@ MagickExport Image *DisposeImages(const Image *images,ExceptionInfo *exception)
|
|||
dispose_image=DestroyImage(dispose_image);
|
||||
return(GetFirstImageInList(dispose_images));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -552,7 +552,7 @@ static MagickBooleanType ComparePixels(const LayerMethod method,
|
|||
return(MagickFalse);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -701,7 +701,7 @@ static RectangleInfo CompareImagesBounds(const Image *image1,
|
|||
bounds.height=(size_t) (y-bounds.y+1);
|
||||
return(bounds);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -857,7 +857,7 @@ MagickExport Image *CompareImagesLayers(const Image *image,
|
|||
}
|
||||
return(GetFirstImageInList(layers));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1357,7 +1357,7 @@ static Image *OptimizeLayerFrames(const Image *image,const LayerMethod method,
|
|||
}
|
||||
return(GetFirstImageInList(optimized_image));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1391,7 +1391,7 @@ MagickExport Image *OptimizeImageLayers(const Image *image,
|
|||
{
|
||||
return(OptimizeLayerFrames(image,OptimizeImageLayer,exception));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1424,7 +1424,7 @@ MagickExport Image *OptimizePlusImageLayers(const Image *image,
|
|||
{
|
||||
return OptimizeLayerFrames(image,OptimizePlusLayer,exception);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1552,7 +1552,7 @@ MagickExport void OptimizeImageTransparency(const Image *image,
|
|||
dispose_image=DestroyImage(dispose_image);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1624,7 +1624,7 @@ MagickExport void RemoveDuplicateLayers(Image **images,
|
|||
}
|
||||
*images = GetFirstImageInList(*images);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1698,7 +1698,7 @@ MagickExport void RemoveZeroDelayLayers(Image **images,
|
|||
}
|
||||
*images=GetFirstImageInList(*images);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1844,7 +1844,7 @@ MagickExport void CompositeLayers(Image *destination,
|
|||
destination=GetNextImageInList(destination);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
|
|
@ -968,8 +968,7 @@ static void scandrives(void)
|
|||
}
|
||||
|
||||
static void empty(void)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
static void (*floppy_work_fn)(void);
|
||||
|
||||
|
@ -4450,8 +4449,7 @@ static struct attribute *floppy_dev_attrs[] = {
|
|||
ATTRIBUTE_GROUPS(floppy_dev);
|
||||
|
||||
static void floppy_device_release(struct device *dev)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
static int floppy_resume(struct device *dev)
|
||||
{
|
||||
|
|
|
@ -60,19 +60,29 @@ public:
|
|||
|
||||
SplashFunctionPattern(SplashColorMode colorMode, GfxState *state, GfxFunctionShading *shading);
|
||||
|
||||
SplashPattern *copy() override { return new SplashFunctionPattern(colorMode, state, (GfxFunctionShading *) shading); }
|
||||
SplashPattern *copy() override {
|
||||
return new SplashFunctionPattern(colorMode, state, (GfxFunctionShading *) shading);
|
||||
}
|
||||
|
||||
~SplashFunctionPattern();
|
||||
|
||||
bool testPosition(int x, int y) override { return true; }
|
||||
bool testPosition(int x, int y) override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isStatic() override { return false; }
|
||||
bool isStatic() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool getColor(int x, int y, SplashColorPtr c) override;
|
||||
|
||||
virtual GfxFunctionShading *getShading() { return shading; }
|
||||
virtual GfxFunctionShading *getShading() {
|
||||
return shading;
|
||||
}
|
||||
|
||||
bool isCMYK() override { return gfxMode == csDeviceCMYK; }
|
||||
bool isCMYK() override {
|
||||
return gfxMode == csDeviceCMYK;
|
||||
}
|
||||
|
||||
protected:
|
||||
Matrix ictm;
|
||||
|
@ -94,13 +104,19 @@ public:
|
|||
|
||||
bool testPosition(int x, int y) override;
|
||||
|
||||
bool isStatic() override { return false; }
|
||||
bool isStatic() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool getParameter(double xs, double ys, double *t) = 0;
|
||||
|
||||
virtual GfxUnivariateShading *getShading() { return shading; }
|
||||
virtual GfxUnivariateShading *getShading() {
|
||||
return shading;
|
||||
}
|
||||
|
||||
bool isCMYK() override { return gfxMode == csDeviceCMYK; }
|
||||
bool isCMYK() override {
|
||||
return gfxMode == csDeviceCMYK;
|
||||
}
|
||||
|
||||
protected:
|
||||
Matrix ictm;
|
||||
|
@ -116,7 +132,9 @@ public:
|
|||
|
||||
SplashAxialPattern(SplashColorMode colorMode, GfxState *state, GfxAxialShading *shading);
|
||||
|
||||
SplashPattern *copy() override { return new SplashAxialPattern(colorMode, state, (GfxAxialShading *) shading); }
|
||||
SplashPattern *copy() override {
|
||||
return new SplashAxialPattern(colorMode, state, (GfxAxialShading *) shading);
|
||||
}
|
||||
|
||||
~SplashAxialPattern();
|
||||
|
||||
|
@ -133,24 +151,40 @@ public:
|
|||
|
||||
SplashGouraudPattern(bool bDirectColorTranslation, GfxState *state, GfxGouraudTriangleShading *shading);
|
||||
|
||||
SplashPattern *copy() override { return new SplashGouraudPattern(bDirectColorTranslation, state, shading); }
|
||||
SplashPattern *copy() override {
|
||||
return new SplashGouraudPattern(bDirectColorTranslation, state, shading);
|
||||
}
|
||||
|
||||
~SplashGouraudPattern();
|
||||
|
||||
bool getColor(int x, int y, SplashColorPtr c) override { return false; }
|
||||
bool getColor(int x, int y, SplashColorPtr c) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool testPosition(int x, int y) override { return false; }
|
||||
bool testPosition(int x, int y) override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isStatic() override { return false; }
|
||||
bool isStatic() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isCMYK() override { return gfxMode == csDeviceCMYK; }
|
||||
bool isCMYK() override {
|
||||
return gfxMode == csDeviceCMYK;
|
||||
}
|
||||
|
||||
bool isParameterized() override { return shading->isParameterized(); }
|
||||
int getNTriangles() override { return shading->getNTriangles(); }
|
||||
bool isParameterized() override {
|
||||
return shading->isParameterized();
|
||||
}
|
||||
int getNTriangles() override {
|
||||
return shading->getNTriangles();
|
||||
}
|
||||
void getTriangle(int i, double *x0, double *y0, double *color0,
|
||||
double *x1, double *y1, double *color1,
|
||||
double *x2, double *y2, double *color2) override
|
||||
{ shading->getTriangle(i, x0, y0, color0, x1, y1, color1, x2, y2, color2); }
|
||||
{
|
||||
shading->getTriangle(i, x0, y0, color0, x1, y1, color1, x2, y2, color2);
|
||||
}
|
||||
|
||||
void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c) override;
|
||||
|
||||
|
@ -167,7 +201,9 @@ public:
|
|||
|
||||
SplashRadialPattern(SplashColorMode colorMode, GfxState *state, GfxRadialShading *shading);
|
||||
|
||||
SplashPattern *copy() override { return new SplashRadialPattern(colorMode, state, (GfxRadialShading *) shading); }
|
||||
SplashPattern *copy() override {
|
||||
return new SplashRadialPattern(colorMode, state, (GfxRadialShading *) shading);
|
||||
}
|
||||
|
||||
~SplashRadialPattern();
|
||||
|
||||
|
@ -205,24 +241,34 @@ public:
|
|||
// Does this device use tilingPatternFill()? If this returns false,
|
||||
// tiling pattern fills will be reduced to a series of other drawing
|
||||
// operations.
|
||||
bool useTilingPatternFill() override { return true; }
|
||||
bool useTilingPatternFill() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Does this device use functionShadedFill(), axialShadedFill(), and
|
||||
// radialShadedFill()? If this returns false, these shaded fills
|
||||
// will be reduced to a series of other drawing operations.
|
||||
bool useShadedFills(int type) override
|
||||
{ return (type >= 1 && type <= 5) ? true : false; }
|
||||
{
|
||||
return (type >= 1 && type <= 5) ? true : false;
|
||||
}
|
||||
|
||||
// Does this device use upside-down coordinates?
|
||||
// (Upside-down means (0,0) is the top left corner of the page.)
|
||||
bool upsideDown() override { return bitmapTopDown ^ bitmapUpsideDown; }
|
||||
bool upsideDown() override {
|
||||
return bitmapTopDown ^ bitmapUpsideDown;
|
||||
}
|
||||
|
||||
// Does this device use drawChar() or drawString()?
|
||||
bool useDrawChar() override { return true; }
|
||||
bool useDrawChar() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Does this device use beginType3Char/endType3Char? Otherwise,
|
||||
// text in Type 3 fonts will be drawn with drawChar/drawString.
|
||||
bool interpretType3Chars() override { return true; }
|
||||
bool interpretType3Chars() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
//----- initialization and control
|
||||
|
||||
|
@ -346,11 +392,17 @@ public:
|
|||
|
||||
void setPaperColor(SplashColorPtr paperColorA);
|
||||
|
||||
bool isReverseVideo() { return reverseVideo; }
|
||||
void setReverseVideo(bool reverseVideoA) { reverseVideo = reverseVideoA; }
|
||||
bool isReverseVideo() {
|
||||
return reverseVideo;
|
||||
}
|
||||
void setReverseVideo(bool reverseVideoA) {
|
||||
reverseVideo = reverseVideoA;
|
||||
}
|
||||
|
||||
// Get the bitmap and its size.
|
||||
SplashBitmap *getBitmap() { return bitmap; }
|
||||
SplashBitmap *getBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
int getBitmapWidth();
|
||||
int getBitmapHeight();
|
||||
|
||||
|
@ -360,10 +412,14 @@ public:
|
|||
|
||||
// Set this flag to true to generate an upside-down bitmap (useful
|
||||
// for Windows BMP files).
|
||||
void setBitmapUpsideDown(bool f) { bitmapUpsideDown = f; }
|
||||
void setBitmapUpsideDown(bool f) {
|
||||
bitmapUpsideDown = f;
|
||||
}
|
||||
|
||||
// Get the Splash object.
|
||||
Splash *getSplash() { return splash; }
|
||||
Splash *getSplash() {
|
||||
return splash;
|
||||
}
|
||||
|
||||
// Get the modified region.
|
||||
void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax);
|
||||
|
@ -371,22 +427,32 @@ public:
|
|||
// Clear the modified region.
|
||||
void clearModRegion();
|
||||
|
||||
SplashFont *getCurrentFont() { return font; }
|
||||
SplashFont *getCurrentFont() {
|
||||
return font;
|
||||
}
|
||||
|
||||
// If <skipTextA> is true, don't draw horizontal text.
|
||||
// If <skipRotatedTextA> is true, don't draw rotated (non-horizontal) text.
|
||||
void setSkipText(bool skipHorizTextA, bool skipRotatedTextA)
|
||||
{ skipHorizText = skipHorizTextA; skipRotatedText = skipRotatedTextA; }
|
||||
{
|
||||
skipHorizText = skipHorizTextA; skipRotatedText = skipRotatedTextA;
|
||||
}
|
||||
|
||||
int getNestCount() { return nestCount; }
|
||||
int getNestCount() {
|
||||
return nestCount;
|
||||
}
|
||||
|
||||
#if 1 //~tmp: turn off anti-aliasing temporarily
|
||||
bool getVectorAntialias() override;
|
||||
void setVectorAntialias(bool vaa) override;
|
||||
#endif
|
||||
|
||||
bool getFontAntialias() { return fontAntialias; }
|
||||
void setFontAntialias(bool anti) { fontAntialias = anti; }
|
||||
bool getFontAntialias() {
|
||||
return fontAntialias;
|
||||
}
|
||||
void setFontAntialias(bool anti) {
|
||||
fontAntialias = anti;
|
||||
}
|
||||
|
||||
void setFreeTypeHinting(bool enable, bool enableSlightHinting);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
%
|
||||
%
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
Include declarations.
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@
|
|||
#include "MagickCore/timer.h"
|
||||
#include "MagickCore/utility.h"
|
||||
#include "MagickCore/version.h"
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -570,7 +570,7 @@ MagickExport Image *CannyEdgeImage(const Image *image,const double radius,
|
|||
canny_cache=DestroyMatrixInfo(canny_cache);
|
||||
return(edge_image);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -1710,7 +1710,7 @@ MagickExport ChannelFeatures *GetImageFeatures(const Image *image,
|
|||
cooccurrence=(ChannelStatistics **) RelinquishMagickMemory(cooccurrence);
|
||||
return(channel_features);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
@ -2110,7 +2110,7 @@ MagickExport Image *HoughLineImage(const Image *image,const size_t width,
|
|||
(void) RelinquishUniqueFileResource(path);
|
||||
return(GetFirstImageInList(lines_image));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% %
|
||||
|
|
|
@ -15,16 +15,13 @@
|
|||
|
||||
|
||||
BOOST_FORCEINLINE void boost_forceinline_test()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
BOOST_NOINLINE void boost_noinline_test()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
BOOST_NORETURN void boost_noreturn_test()
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
void print_hello()
|
||||
{
|
||||
|
@ -33,10 +30,8 @@ void print_hello()
|
|||
|
||||
void valid_code(boost::function<void(void)> &pf_print_hello)
|
||||
{
|
||||
if (BOOST_LIKELY(1)) {
|
||||
}
|
||||
if (BOOST_UNLIKELY(0)) {
|
||||
}
|
||||
if (BOOST_LIKELY(1)) {}
|
||||
if (BOOST_UNLIKELY(0)) {}
|
||||
|
||||
int int1 = 5;
|
||||
boost::endian::endian_reverse_inplace(int1);
|
||||
|
|
|
@ -18,13 +18,9 @@ void validCode(int argInt, GHashTableIter * hash_table_iter, GHashTable * hash_t
|
|||
g_assert_cmpstr("test", ==, "test");
|
||||
|
||||
// if G_UNLIKELY is not defined this results in a syntax error
|
||||
if G_UNLIKELY(argInt == 1) {
|
||||
} else if (G_UNLIKELY(argInt == 2)) {
|
||||
}
|
||||
if G_UNLIKELY(argInt == 1) {} else if (G_UNLIKELY(argInt == 2)) {}
|
||||
|
||||
if G_LIKELY(argInt == 0) {
|
||||
} else if (G_LIKELY(argInt == -1)) {
|
||||
}
|
||||
if G_LIKELY(argInt == 0) {} else if (G_LIKELY(argInt == -1)) {}
|
||||
|
||||
printf("%s", _("test"));
|
||||
printf("%s", Q_("a|test"));
|
||||
|
|
|
@ -373,8 +373,7 @@ void MacroTest2_test()
|
|||
|
||||
void validCode(int * pIntPtr, QString & qstrArg)
|
||||
{
|
||||
if (QFile::exists("test")) {
|
||||
}
|
||||
if (QFile::exists("test")) {}
|
||||
|
||||
if (pIntPtr != Q_NULLPTR) {
|
||||
*pIntPtr = 5;
|
||||
|
@ -384,8 +383,7 @@ void validCode(int * pIntPtr, QString & qstrArg)
|
|||
forever {
|
||||
}
|
||||
} else if (pIntPtr && *pIntPtr == 2) {
|
||||
Q_FOREVER {
|
||||
}
|
||||
Q_FOREVER {}
|
||||
}
|
||||
|
||||
if (Q_LIKELY(pIntPtr)) {}
|
||||
|
@ -399,13 +397,11 @@ void validCode(int * pIntPtr, QString & qstrArg)
|
|||
|
||||
//#9650
|
||||
QString qstr1(qstrArg);
|
||||
if (qstr1.length() == 1) {
|
||||
} else {
|
||||
if (qstr1.length() == 1) {} else {
|
||||
qstr1.chop(1);
|
||||
if (qstr1.length() == 1) {}
|
||||
}
|
||||
if (qstr1.length() == 1) {
|
||||
} else {
|
||||
if (qstr1.length() == 1) {} else {
|
||||
qstr1.remove(1);
|
||||
if (qstr1.length() == 1) {}
|
||||
}
|
||||
|
|
|
@ -842,8 +842,7 @@ void oppositeInnerCondition_SUCCEEDED_FAILED(HRESULT hr)
|
|||
{
|
||||
if (SUCCEEDED(hr)) {
|
||||
// TODO ticket #8596 cppcheck-suppress oppositeInnerCondition
|
||||
if (FAILED(hr)) {
|
||||
}
|
||||
if (FAILED(hr)) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
void validCode(int argInt)
|
||||
{
|
||||
// if G_UNLIKELY is not defined this results in a syntax error
|
||||
if G_UNLIKELY(argInt == 1) {
|
||||
} else if (G_UNLIKELY(argInt == 2)) {
|
||||
}
|
||||
if G_UNLIKELY(argInt == 1) {} else if (G_UNLIKELY(argInt == 2)) {}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@ void call(int x) {
|
|||
par_dependant(0, 1000);
|
||||
}
|
||||
|
||||
int getLargeIndex() { return 1000; }
|
||||
int getLargeIndex() {
|
||||
return 1000;
|
||||
}
|
||||
void return_value() {
|
||||
TestData[getLargeIndex()] = 0; // BUG
|
||||
}
|
||||
|
|
|
@ -1,17 +1,49 @@
|
|||
void alias() { int x; int *ip=&x; float *fp = (float *)ip; }
|
||||
int buffer_overflow() { int x[10]={0}; return x[100]; }
|
||||
int dead_pointer(int a) { int *p=&a; if (a) { int x=0; p = &x; } return *p; }
|
||||
int division_by_zero() { return 100 / 0; }
|
||||
int float_to_int() { double d=1E100; return (int)d; }
|
||||
void negative_size(int sz) { if (sz < 0) { int buf[sz]; } }
|
||||
void alias() {
|
||||
int x; int *ip=&x; float *fp = (float *)ip;
|
||||
}
|
||||
int buffer_overflow() {
|
||||
int x[10]={0}; return x[100];
|
||||
}
|
||||
int dead_pointer(int a) {
|
||||
int *p=&a; if (a) { int x=0; p = &x; } return *p;
|
||||
}
|
||||
int division_by_zero() {
|
||||
return 100 / 0;
|
||||
}
|
||||
int float_to_int() {
|
||||
double d=1E100; return (int)d;
|
||||
}
|
||||
void negative_size(int sz) {
|
||||
if (sz < 0) { int buf[sz]; }
|
||||
}
|
||||
int no_return() {}
|
||||
int null_pointer() { int *p = 0; return *p; }
|
||||
int *pointer_arithmetic() { static int buf[10]; return buf + 100; }
|
||||
unsigned char pointer_to_u8() { static int buf[10]; return (int*)buf; }
|
||||
int pointer_subtraction() { char a[10]; char b[10]; return b-a; }
|
||||
int pointer_comparison() { char a[10]; char b[10]; return b<a; }
|
||||
int shift_overrun(int x) { return x << 123; }
|
||||
int shift_negative() { return -1 << 1; }
|
||||
int int_overflow() { int intmax = (~0U) >> 1; return intmax * 2; }
|
||||
void string_literal() { *((char *)"hello") = 0; }
|
||||
int uninit() { int x; return x + 2; }
|
||||
int null_pointer() {
|
||||
int *p = 0; return *p;
|
||||
}
|
||||
int *pointer_arithmetic() {
|
||||
static int buf[10]; return buf + 100;
|
||||
}
|
||||
unsigned char pointer_to_u8() {
|
||||
static int buf[10]; return (int*)buf;
|
||||
}
|
||||
int pointer_subtraction() {
|
||||
char a[10]; char b[10]; return b-a;
|
||||
}
|
||||
int pointer_comparison() {
|
||||
char a[10]; char b[10]; return b<a;
|
||||
}
|
||||
int shift_overrun(int x) {
|
||||
return x << 123;
|
||||
}
|
||||
int shift_negative() {
|
||||
return -1 << 1;
|
||||
}
|
||||
int int_overflow() {
|
||||
int intmax = (~0U) >> 1; return intmax * 2;
|
||||
}
|
||||
void string_literal() {
|
||||
*((char *)"hello") = 0;
|
||||
}
|
||||
int uninit() {
|
||||
int x; return x + 2;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
class Test64BitPortability : public TestFixture {
|
||||
public:
|
||||
Test64BitPortability() : TestFixture("Test64BitPortability") {
|
||||
}
|
||||
Test64BitPortability() : TestFixture("Test64BitPortability") {}
|
||||
|
||||
private:
|
||||
Settings settings;
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
|
||||
class TestAstUtils : public TestFixture {
|
||||
public:
|
||||
TestAstUtils() : TestFixture("TestAstUtils") {
|
||||
}
|
||||
TestAstUtils() : TestFixture("TestAstUtils") {}
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
class TestAutoVariables : public TestFixture {
|
||||
public:
|
||||
TestAutoVariables() : TestFixture("TestAutoVariables") {
|
||||
}
|
||||
TestAutoVariables() : TestFixture("TestAutoVariables") {}
|
||||
|
||||
private:
|
||||
Settings settings;
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
class TestBool : public TestFixture {
|
||||
public:
|
||||
TestBool() : TestFixture("TestBool") {
|
||||
}
|
||||
TestBool() : TestFixture("TestBool") {}
|
||||
|
||||
private:
|
||||
Settings settings;
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
|
||||
class TestBoost : public TestFixture {
|
||||
public:
|
||||
TestBoost() : TestFixture("TestBoost") {
|
||||
}
|
||||
TestBoost() : TestFixture("TestBoost") {}
|
||||
|
||||
private:
|
||||
Settings settings;
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
|
||||
class TestBufferOverrun : public TestFixture {
|
||||
public:
|
||||
TestBufferOverrun() : TestFixture("TestBufferOverrun") {
|
||||
}
|
||||
TestBufferOverrun() : TestFixture("TestBufferOverrun") {}
|
||||
|
||||
private:
|
||||
Settings settings0;
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
|
||||
class TestCharVar : public TestFixture {
|
||||
public:
|
||||
TestCharVar() : TestFixture("TestCharVar") {
|
||||
}
|
||||
TestCharVar() : TestFixture("TestCharVar") {}
|
||||
|
||||
private:
|
||||
Settings settings;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue