-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from furgoler/furgoler-patch-1
Initial upload to github
- Loading branch information
Showing
136 changed files
with
19,599 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Copyright (c) 2005-2023 Jay Berkenbilt | ||
// | ||
// This file is part of qpdf. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Versions of qpdf prior to version 7 were released under the terms | ||
// of version 2.0 of the Artistic License. At your option, you may | ||
// continue to consider qpdf to be licensed under those terms. Please | ||
// see the manual for additional information. | ||
|
||
#ifndef BUFFER_HH | ||
#define BUFFER_HH | ||
|
||
#include <qpdf/DLL.h> | ||
#include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) | ||
|
||
#include <memory> | ||
#include <stddef.h> | ||
|
||
class Buffer | ||
{ | ||
public: | ||
QPDF_DLL | ||
Buffer(); | ||
|
||
// Create a Buffer object whose memory is owned by the class and | ||
// will be freed when the Buffer object is destroyed. | ||
QPDF_DLL | ||
Buffer(size_t size); | ||
|
||
// Create a Buffer object whose memory is owned by the caller and | ||
// will not be freed when the Buffer is destroyed. | ||
QPDF_DLL | ||
Buffer(unsigned char* buf, size_t size); | ||
|
||
QPDF_DLL | ||
Buffer(Buffer const&); | ||
QPDF_DLL | ||
Buffer& operator=(Buffer const&); | ||
QPDF_DLL | ||
Buffer(Buffer&&) noexcept; | ||
QPDF_DLL | ||
Buffer& operator=(Buffer&&) noexcept; | ||
QPDF_DLL | ||
size_t getSize() const; | ||
QPDF_DLL | ||
unsigned char const* getBuffer() const; | ||
QPDF_DLL | ||
unsigned char* getBuffer(); | ||
|
||
private: | ||
class Members | ||
{ | ||
friend class Buffer; | ||
|
||
public: | ||
QPDF_DLL | ||
~Members(); | ||
|
||
private: | ||
Members(size_t size, unsigned char* buf, bool own_memory); | ||
Members(Members const&) = delete; | ||
|
||
bool own_memory; | ||
size_t size; | ||
unsigned char* buf; | ||
}; | ||
|
||
void copy(Buffer const&); | ||
|
||
std::unique_ptr<Members> m; | ||
}; | ||
|
||
#endif // BUFFER_HH |
64 changes: 64 additions & 0 deletions
64
3rdparty/qpdf-11.3.0-msvc64/include/qpdf/BufferInputSource.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright (c) 2005-2023 Jay Berkenbilt | ||
// | ||
// This file is part of qpdf. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Versions of qpdf prior to version 7 were released under the terms | ||
// of version 2.0 of the Artistic License. At your option, you may | ||
// continue to consider qpdf to be licensed under those terms. Please | ||
// see the manual for additional information. | ||
|
||
#ifndef QPDF_BUFFERINPUTSOURCE_HH | ||
#define QPDF_BUFFERINPUTSOURCE_HH | ||
|
||
#include <qpdf/Buffer.hh> | ||
#include <qpdf/InputSource.hh> | ||
|
||
class QPDF_DLL_CLASS BufferInputSource: public InputSource | ||
{ | ||
public: | ||
// If own_memory is true, BufferInputSource will delete the buffer | ||
// when finished with it. Otherwise, the caller owns the memory. | ||
QPDF_DLL | ||
BufferInputSource( | ||
std::string const& description, Buffer* buf, bool own_memory = false); | ||
QPDF_DLL | ||
BufferInputSource( | ||
std::string const& description, std::string const& contents); | ||
QPDF_DLL | ||
virtual ~BufferInputSource(); | ||
QPDF_DLL | ||
virtual qpdf_offset_t findAndSkipNextEOL(); | ||
QPDF_DLL | ||
virtual std::string const& getName() const; | ||
QPDF_DLL | ||
virtual qpdf_offset_t tell(); | ||
QPDF_DLL | ||
virtual void seek(qpdf_offset_t offset, int whence); | ||
QPDF_DLL | ||
virtual void rewind(); | ||
QPDF_DLL | ||
virtual size_t read(char* buffer, size_t length); | ||
QPDF_DLL | ||
virtual void unreadCh(char ch); | ||
|
||
private: | ||
bool own_memory; | ||
std::string description; | ||
Buffer* buf; | ||
qpdf_offset_t cur_offset; | ||
qpdf_offset_t max_offset; | ||
}; | ||
|
||
#endif // QPDF_BUFFERINPUTSOURCE_HH |
82 changes: 82 additions & 0 deletions
82
3rdparty/qpdf-11.3.0-msvc64/include/qpdf/ClosedFileInputSource.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// Copyright (c) 2005-2023 Jay Berkenbilt | ||
// | ||
// This file is part of qpdf. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// Versions of qpdf prior to version 7 were released under the terms | ||
// of version 2.0 of the Artistic License. At your option, you may | ||
// continue to consider qpdf to be licensed under those terms. Please | ||
// see the manual for additional information. | ||
|
||
#ifndef QPDF_CLOSEDFILEINPUTSOURCE_HH | ||
#define QPDF_CLOSEDFILEINPUTSOURCE_HH | ||
|
||
// This is an input source that reads from files, like | ||
// FileInputSource, except that it opens and close the file | ||
// surrounding every operation. This decreases efficiency, but it allows | ||
// many more of these to exist at once than the maximum number of open | ||
// file descriptors. This is used for merging large numbers of files. | ||
|
||
#include <qpdf/InputSource.hh> | ||
#include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) | ||
|
||
#include <memory> | ||
|
||
class FileInputSource; | ||
|
||
class QPDF_DLL_CLASS ClosedFileInputSource: public InputSource | ||
{ | ||
public: | ||
QPDF_DLL | ||
ClosedFileInputSource(char const* filename); | ||
QPDF_DLL | ||
virtual ~ClosedFileInputSource(); | ||
QPDF_DLL | ||
virtual qpdf_offset_t findAndSkipNextEOL(); | ||
QPDF_DLL | ||
virtual std::string const& getName() const; | ||
QPDF_DLL | ||
virtual qpdf_offset_t tell(); | ||
QPDF_DLL | ||
virtual void seek(qpdf_offset_t offset, int whence); | ||
QPDF_DLL | ||
virtual void rewind(); | ||
QPDF_DLL | ||
virtual size_t read(char* buffer, size_t length); | ||
QPDF_DLL | ||
virtual void unreadCh(char ch); | ||
|
||
// The file stays open between calls to stayOpen(true) and | ||
// stayOpen(false). You can use this to surround multiple | ||
// operations on a single ClosedFileInputSource to reduce the | ||
// overhead of a separate open/close on each call. | ||
QPDF_DLL | ||
void stayOpen(bool); | ||
|
||
private: | ||
ClosedFileInputSource(ClosedFileInputSource const&) = delete; | ||
ClosedFileInputSource& operator=(ClosedFileInputSource const&) = delete; | ||
|
||
QPDF_DLL_PRIVATE | ||
void before(); | ||
QPDF_DLL_PRIVATE | ||
void after(); | ||
|
||
std::string filename; | ||
qpdf_offset_t offset; | ||
std::shared_ptr<FileInputSource> fis; | ||
bool stay_open; | ||
}; | ||
|
||
#endif // QPDF_CLOSEDFILEINPUTSOURCE_HH |
Oops, something went wrong.