Commit e28f4efb00d5040fa71532d76e63aa7ade105c99
1 parent
7f043fe8
Replace deprecated C++ includes
Showing
73 changed files
with
121 additions
and
121 deletions
examples/pdf-bookmarks.cc
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | #include <qpdf/QTC.hh> | 5 | #include <qpdf/QTC.hh> |
| 6 | #include <qpdf/QUtil.hh> | 6 | #include <qpdf/QUtil.hh> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | -#include <stdlib.h> | ||
| 9 | -#include <string.h> | 8 | +#include <cstdlib> |
| 9 | +#include <cstring> | ||
| 10 | 10 | ||
| 11 | // This program demonstrates extraction of bookmarks using the qpdf | 11 | // This program demonstrates extraction of bookmarks using the qpdf |
| 12 | // outlines API. Note that all the information shown by this program | 12 | // outlines API. Note that all the information shown by this program |
examples/pdf-count-strings.cc
examples/pdf-create.cc
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | #include <qpdf/QUtil.hh> | 16 | #include <qpdf/QUtil.hh> |
| 17 | #include <iostream> | 17 | #include <iostream> |
| 18 | #include <memory> | 18 | #include <memory> |
| 19 | -#include <stdlib.h> | 19 | +#include <cstdlib> |
| 20 | 20 | ||
| 21 | static char const* whoami = nullptr; | 21 | static char const* whoami = nullptr; |
| 22 | 22 |
examples/pdf-double-page-size.cc
| @@ -5,8 +5,8 @@ | @@ -5,8 +5,8 @@ | ||
| 5 | #include <qpdf/QPDFWriter.hh> | 5 | #include <qpdf/QPDFWriter.hh> |
| 6 | #include <qpdf/QUtil.hh> | 6 | #include <qpdf/QUtil.hh> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | -#include <stdlib.h> | ||
| 9 | -#include <string.h> | 8 | +#include <cstdlib> |
| 9 | +#include <cstring> | ||
| 10 | 10 | ||
| 11 | static char const* whoami = nullptr; | 11 | static char const* whoami = nullptr; |
| 12 | 12 |
examples/pdf-filter-tokens.cc
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | #include <algorithm> | 8 | #include <algorithm> |
| 9 | #include <deque> | 9 | #include <deque> |
| 10 | #include <iostream> | 10 | #include <iostream> |
| 11 | -#include <stdlib.h> | 11 | +#include <cstdlib> |
| 12 | 12 | ||
| 13 | #include <qpdf/QPDF.hh> | 13 | #include <qpdf/QPDF.hh> |
| 14 | #include <qpdf/QPDFObjectHandle.hh> | 14 | #include <qpdf/QPDFObjectHandle.hh> |
examples/pdf-invert-images.cc
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | #include <qpdf/QPDFWriter.hh> | 6 | #include <qpdf/QPDFWriter.hh> |
| 7 | #include <qpdf/QUtil.hh> | 7 | #include <qpdf/QUtil.hh> |
| 8 | #include <iostream> | 8 | #include <iostream> |
| 9 | -#include <stdlib.h> | ||
| 10 | -#include <string.h> | 9 | +#include <cstdlib> |
| 10 | +#include <cstring> | ||
| 11 | 11 | ||
| 12 | static char const* whoami = nullptr; | 12 | static char const* whoami = nullptr; |
| 13 | 13 |
examples/pdf-mod-info.cc
| @@ -6,9 +6,9 @@ | @@ -6,9 +6,9 @@ | ||
| 6 | #include <qpdf/QTC.hh> | 6 | #include <qpdf/QTC.hh> |
| 7 | #include <qpdf/QUtil.hh> | 7 | #include <qpdf/QUtil.hh> |
| 8 | #include <iostream> | 8 | #include <iostream> |
| 9 | -#include <stdio.h> | ||
| 10 | -#include <stdlib.h> | ||
| 11 | -#include <string.h> | 9 | +#include <cstdio> |
| 10 | +#include <cstdlib> | ||
| 11 | +#include <cstring> | ||
| 12 | 12 | ||
| 13 | static char const* version = "1.1"; | 13 | static char const* version = "1.1"; |
| 14 | static char const* whoami = nullptr; | 14 | static char const* whoami = nullptr; |
examples/pdf-npages.cc
examples/pdf-overlay-page.cc
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | #include <qpdf/QPDFWriter.hh> | 4 | #include <qpdf/QPDFWriter.hh> |
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | #include <iostream> | 6 | #include <iostream> |
| 7 | -#include <stdlib.h> | 7 | +#include <cstdlib> |
| 8 | 8 | ||
| 9 | // This program demonstrates use of form XObjects to overlay a page | 9 | // This program demonstrates use of form XObjects to overlay a page |
| 10 | // from one file onto all pages of another file. The qpdf program's | 10 | // from one file onto all pages of another file. The qpdf program's |
examples/pdf-parse-content.cc
examples/pdf-set-form-values.cc
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | #include <qpdf/QPDFWriter.hh> | 4 | #include <qpdf/QPDFWriter.hh> |
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | #include <iostream> | 6 | #include <iostream> |
| 7 | -#include <stdlib.h> | 7 | +#include <cstdlib> |
| 8 | 8 | ||
| 9 | static char const* whoami = nullptr; | 9 | static char const* whoami = nullptr; |
| 10 | 10 |
examples/pdf-split-pages.cc
include/qpdf/Buffer.hh
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | #include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) | 26 | #include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) |
| 27 | 27 | ||
| 28 | #include <memory> | 28 | #include <memory> |
| 29 | -#include <stddef.h> | 29 | +#include <cstddef> |
| 30 | 30 | ||
| 31 | class Buffer | 31 | class Buffer |
| 32 | { | 32 | { |
include/qpdf/InputSource.hh
| @@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
| 27 | #include <qpdf/Types.h> | 27 | #include <qpdf/Types.h> |
| 28 | 28 | ||
| 29 | #include <memory> | 29 | #include <memory> |
| 30 | -#include <stdio.h> | 30 | +#include <cstdio> |
| 31 | #include <string> | 31 | #include <string> |
| 32 | 32 | ||
| 33 | // Remember to use QPDF_DLL_CLASS on anything derived from InputSource | 33 | // Remember to use QPDF_DLL_CLASS on anything derived from InputSource |
include/qpdf/Pl_StdioFile.hh
include/qpdf/QPDF.hh
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | #include <list> | 30 | #include <list> |
| 31 | #include <map> | 31 | #include <map> |
| 32 | #include <memory> | 32 | #include <memory> |
| 33 | -#include <stdio.h> | 33 | +#include <cstdio> |
| 34 | #include <string> | 34 | #include <string> |
| 35 | #include <string_view> | 35 | #include <string_view> |
| 36 | #include <vector> | 36 | #include <vector> |
include/qpdf/QPDFTokenizer.hh
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | #include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) | 28 | #include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785) |
| 29 | 29 | ||
| 30 | #include <memory> | 30 | #include <memory> |
| 31 | -#include <stdio.h> | 31 | +#include <cstdio> |
| 32 | #include <string> | 32 | #include <string> |
| 33 | 33 | ||
| 34 | class QPDFTokenizer | 34 | class QPDFTokenizer |
include/qpdf/QPDFWriter.hh
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | #include <map> | 34 | #include <map> |
| 35 | #include <memory> | 35 | #include <memory> |
| 36 | #include <set> | 36 | #include <set> |
| 37 | -#include <stdio.h> | 37 | +#include <cstdio> |
| 38 | #include <string> | 38 | #include <string> |
| 39 | #include <string_view> | 39 | #include <string_view> |
| 40 | #include <vector> | 40 | #include <vector> |
include/qpdf/QUtil.hh
| @@ -30,9 +30,9 @@ | @@ -30,9 +30,9 @@ | ||
| 30 | #include <list> | 30 | #include <list> |
| 31 | #include <memory> | 31 | #include <memory> |
| 32 | #include <stdexcept> | 32 | #include <stdexcept> |
| 33 | -#include <stdio.h> | 33 | +#include <cstdio> |
| 34 | #include <string> | 34 | #include <string> |
| 35 | -#include <time.h> | 35 | +#include <ctime> |
| 36 | #include <vector> | 36 | #include <vector> |
| 37 | 37 | ||
| 38 | class RandomDataProvider; | 38 | class RandomDataProvider; |
include/qpdf/RandomDataProvider.hh
| @@ -23,7 +23,7 @@ | @@ -23,7 +23,7 @@ | ||
| 23 | #define RANDOMDATAPROVIDER_HH | 23 | #define RANDOMDATAPROVIDER_HH |
| 24 | 24 | ||
| 25 | #include <qpdf/DLL.h> | 25 | #include <qpdf/DLL.h> |
| 26 | -#include <string.h> // for size_t | 26 | +#include <cstring> // for size_t |
| 27 | 27 | ||
| 28 | class QPDF_DLL_CLASS RandomDataProvider | 28 | class QPDF_DLL_CLASS RandomDataProvider |
| 29 | { | 29 | { |
libqpdf/BufferInputSource.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/QIntC.hh> | 3 | #include <qpdf/QIntC.hh> |
| 4 | #include <algorithm> | 4 | #include <algorithm> |
| 5 | #include <sstream> | 5 | #include <sstream> |
| 6 | -#include <string.h> | 6 | +#include <cstring> |
| 7 | 7 | ||
| 8 | BufferInputSource::BufferInputSource( | 8 | BufferInputSource::BufferInputSource( |
| 9 | std::string const& description, Buffer* buf, bool own_memory) : | 9 | std::string const& description, Buffer* buf, bool own_memory) : |
libqpdf/FileInputSource.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/QPDFExc.hh> | 3 | #include <qpdf/QPDFExc.hh> |
| 4 | #include <qpdf/QUtil.hh> | 4 | #include <qpdf/QUtil.hh> |
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | -#include <string.h> | 6 | +#include <cstring> |
| 7 | 7 | ||
| 8 | FileInputSource::FileInputSource() : | 8 | FileInputSource::FileInputSource() : |
| 9 | close_file(false), | 9 | close_file(false), |
libqpdf/InputSource.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/QIntC.hh> | 3 | #include <qpdf/QIntC.hh> |
| 4 | #include <qpdf/QTC.hh> | 4 | #include <qpdf/QTC.hh> |
| 5 | #include <stdexcept> | 5 | #include <stdexcept> |
| 6 | -#include <string.h> | 6 | +#include <cstring> |
| 7 | 7 | ||
| 8 | void | 8 | void |
| 9 | InputSource::setLastOffset(qpdf_offset_t offset) | 9 | InputSource::setLastOffset(qpdf_offset_t offset) |
libqpdf/InsecureRandomDataProvider.cc
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | #include <qpdf/qpdf-config.h> | 4 | #include <qpdf/qpdf-config.h> |
| 5 | -#include <stdlib.h> | 5 | +#include <cstdlib> |
| 6 | 6 | ||
| 7 | InsecureRandomDataProvider::InsecureRandomDataProvider() : | 7 | InsecureRandomDataProvider::InsecureRandomDataProvider() : |
| 8 | seeded_random(false) | 8 | seeded_random(false) |
libqpdf/MD5.cc
libqpdf/Pl_ASCII85Decoder.cc
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | #include <qpdf/QTC.hh> | 3 | #include <qpdf/QTC.hh> |
| 4 | #include <stdexcept> | 4 | #include <stdexcept> |
| 5 | -#include <string.h> | 5 | +#include <cstring> |
| 6 | 6 | ||
| 7 | Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : | 7 | Pl_ASCII85Decoder::Pl_ASCII85Decoder(char const* identifier, Pipeline* next) : |
| 8 | Pipeline(identifier, next), | 8 | Pipeline(identifier, next), |
libqpdf/Pl_ASCIIHexDecoder.cc
| 1 | #include <qpdf/Pl_ASCIIHexDecoder.hh> | 1 | #include <qpdf/Pl_ASCIIHexDecoder.hh> |
| 2 | 2 | ||
| 3 | #include <qpdf/QTC.hh> | 3 | #include <qpdf/QTC.hh> |
| 4 | -#include <ctype.h> | 4 | +#include <cctype> |
| 5 | #include <stdexcept> | 5 | #include <stdexcept> |
| 6 | 6 | ||
| 7 | Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : | 7 | Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) : |
libqpdf/Pl_Buffer.cc
| @@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
| 2 | 2 | ||
| 3 | #include <algorithm> | 3 | #include <algorithm> |
| 4 | #include <stdexcept> | 4 | #include <stdexcept> |
| 5 | -#include <stdlib.h> | ||
| 6 | -#include <string.h> | 5 | +#include <cstdlib> |
| 6 | +#include <cstring> | ||
| 7 | 7 | ||
| 8 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : | 8 | Pl_Buffer::Pl_Buffer(char const* identifier, Pipeline* next) : |
| 9 | Pipeline(identifier, next), | 9 | Pipeline(identifier, next), |
libqpdf/Pl_DCT.cc
libqpdf/Pl_Flate.cc
libqpdf/Pl_LZWDecoder.cc
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | #include <qpdf/QTC.hh> | 4 | #include <qpdf/QTC.hh> |
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | #include <stdexcept> | 6 | #include <stdexcept> |
| 7 | -#include <string.h> | 7 | +#include <cstring> |
| 8 | 8 | ||
| 9 | Pl_LZWDecoder::Pl_LZWDecoder( | 9 | Pl_LZWDecoder::Pl_LZWDecoder( |
| 10 | char const* identifier, Pipeline* next, bool early_code_change) : | 10 | char const* identifier, Pipeline* next, bool early_code_change) : |
libqpdf/Pl_PNGFilter.cc
| @@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
| 3 | #include <qpdf/QTC.hh> | 3 | #include <qpdf/QTC.hh> |
| 4 | #include <qpdf/QUtil.hh> | 4 | #include <qpdf/QUtil.hh> |
| 5 | 5 | ||
| 6 | -#include <limits.h> | 6 | +#include <climits> |
| 7 | #include <stdexcept> | 7 | #include <stdexcept> |
| 8 | -#include <string.h> | 8 | +#include <cstring> |
| 9 | 9 | ||
| 10 | static int | 10 | static int |
| 11 | abs_diff(int a, int b) | 11 | abs_diff(int a, int b) |
libqpdf/Pl_StdioFile.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/Pl_StdioFile.hh> | 3 | #include <qpdf/Pl_StdioFile.hh> |
| 4 | 4 | ||
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | -#include <errno.h> | 6 | +#include <cerrno> |
| 7 | #include <stdexcept> | 7 | #include <stdexcept> |
| 8 | 8 | ||
| 9 | Pl_StdioFile::Members::Members(FILE* f) : | 9 | Pl_StdioFile::Members::Members(FILE* f) : |
libqpdf/Pl_TIFFPredictor.cc
| @@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
| 5 | #include <qpdf/QTC.hh> | 5 | #include <qpdf/QTC.hh> |
| 6 | #include <qpdf/QUtil.hh> | 6 | #include <qpdf/QUtil.hh> |
| 7 | 7 | ||
| 8 | -#include <limits.h> | 8 | +#include <climits> |
| 9 | #include <stdexcept> | 9 | #include <stdexcept> |
| 10 | -#include <string.h> | 10 | +#include <cstring> |
| 11 | #include <vector> | 11 | #include <vector> |
| 12 | 12 | ||
| 13 | Pl_TIFFPredictor::Pl_TIFFPredictor( | 13 | Pl_TIFFPredictor::Pl_TIFFPredictor( |
libqpdf/QPDF.cc
| @@ -9,8 +9,8 @@ | @@ -9,8 +9,8 @@ | ||
| 9 | #include <memory.h> | 9 | #include <memory.h> |
| 10 | #include <regex> | 10 | #include <regex> |
| 11 | #include <sstream> | 11 | #include <sstream> |
| 12 | -#include <stdlib.h> | ||
| 13 | -#include <string.h> | 12 | +#include <cstdlib> |
| 13 | +#include <cstring> | ||
| 14 | #include <vector> | 14 | #include <vector> |
| 15 | 15 | ||
| 16 | #include <qpdf/BufferInputSource.hh> | 16 | #include <qpdf/BufferInputSource.hh> |
libqpdf/QPDFFormFieldObjectHelper.cc
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | #include <qpdf/QPDFAnnotationObjectHelper.hh> | 6 | #include <qpdf/QPDFAnnotationObjectHelper.hh> |
| 7 | #include <qpdf/QTC.hh> | 7 | #include <qpdf/QTC.hh> |
| 8 | #include <qpdf/QUtil.hh> | 8 | #include <qpdf/QUtil.hh> |
| 9 | -#include <stdlib.h> | 9 | +#include <cstdlib> |
| 10 | 10 | ||
| 11 | QPDFFormFieldObjectHelper::QPDFFormFieldObjectHelper(QPDFObjectHandle oh) : | 11 | QPDFFormFieldObjectHelper::QPDFFormFieldObjectHelper(QPDFObjectHandle oh) : |
| 12 | QPDFObjectHelper(oh), | 12 | QPDFObjectHelper(oh), |
libqpdf/QPDFJob.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <cstdio> | 3 | #include <cstdio> |
| 4 | #include <cstdlib> | 4 | #include <cstdlib> |
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | -#include <ctype.h> | 6 | +#include <cctype> |
| 7 | #include <fcntl.h> | 7 | #include <fcntl.h> |
| 8 | #include <iostream> | 8 | #include <iostream> |
| 9 | #include <memory> | 9 | #include <memory> |
libqpdf/QPDFJob_argv.cc
| @@ -3,12 +3,12 @@ | @@ -3,12 +3,12 @@ | ||
| 3 | // See "HOW TO ADD A COMMAND-LINE ARGUMENT" in README-maintainer. | 3 | // See "HOW TO ADD A COMMAND-LINE ARGUMENT" in README-maintainer. |
| 4 | 4 | ||
| 5 | #include <cstdio> | 5 | #include <cstdio> |
| 6 | -#include <ctype.h> | 6 | +#include <cctype> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | #include <memory> | 8 | #include <memory> |
| 9 | #include <sstream> | 9 | #include <sstream> |
| 10 | -#include <stdlib.h> | ||
| 11 | -#include <string.h> | 10 | +#include <cstdlib> |
| 11 | +#include <cstring> | ||
| 12 | 12 | ||
| 13 | #include <qpdf/QIntC.hh> | 13 | #include <qpdf/QIntC.hh> |
| 14 | #include <qpdf/QPDFArgParser.hh> | 14 | #include <qpdf/QPDFArgParser.hh> |
libqpdf/QPDFObjectHandle.cc
| @@ -30,10 +30,10 @@ | @@ -30,10 +30,10 @@ | ||
| 30 | 30 | ||
| 31 | #include <algorithm> | 31 | #include <algorithm> |
| 32 | #include <cstring> | 32 | #include <cstring> |
| 33 | -#include <ctype.h> | ||
| 34 | -#include <limits.h> | 33 | +#include <cctype> |
| 34 | +#include <climits> | ||
| 35 | #include <stdexcept> | 35 | #include <stdexcept> |
| 36 | -#include <stdlib.h> | 36 | +#include <cstdlib> |
| 37 | 37 | ||
| 38 | using namespace std::literals; | 38 | using namespace std::literals; |
| 39 | 39 |
libqpdf/QPDFSystemError.cc
| 1 | #include <qpdf/QPDFSystemError.hh> | 1 | #include <qpdf/QPDFSystemError.hh> |
| 2 | 2 | ||
| 3 | -#include <string.h> | 3 | +#include <cstring> |
| 4 | 4 | ||
| 5 | QPDFSystemError::QPDFSystemError( | 5 | QPDFSystemError::QPDFSystemError( |
| 6 | std::string const& description, int system_errno) : | 6 | std::string const& description, int system_errno) : |
libqpdf/QPDFTokenizer.cc
| @@ -11,8 +11,8 @@ | @@ -11,8 +11,8 @@ | ||
| 11 | #include <qpdf/QUtil.hh> | 11 | #include <qpdf/QUtil.hh> |
| 12 | 12 | ||
| 13 | #include <stdexcept> | 13 | #include <stdexcept> |
| 14 | -#include <stdlib.h> | ||
| 15 | -#include <string.h> | 14 | +#include <cstdlib> |
| 15 | +#include <cstring> | ||
| 16 | 16 | ||
| 17 | static inline bool | 17 | static inline bool |
| 18 | is_delimiter(char ch) | 18 | is_delimiter(char ch) |
libqpdf/QPDFWriter.cc
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | 24 | ||
| 25 | #include <algorithm> | 25 | #include <algorithm> |
| 26 | #include <stdexcept> | 26 | #include <stdexcept> |
| 27 | -#include <stdlib.h> | 27 | +#include <cstdlib> |
| 28 | 28 | ||
| 29 | QPDFWriter::ProgressReporter::~ProgressReporter() | 29 | QPDFWriter::ProgressReporter::~ProgressReporter() |
| 30 | { | 30 | { |
libqpdf/QPDF_encryption.cc
| @@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
| 17 | #include <qpdf/RC4.hh> | 17 | #include <qpdf/RC4.hh> |
| 18 | 18 | ||
| 19 | #include <algorithm> | 19 | #include <algorithm> |
| 20 | -#include <string.h> | 20 | +#include <cstring> |
| 21 | 21 | ||
| 22 | static unsigned char const padding_string[] = { | 22 | static unsigned char const padding_string[] = { |
| 23 | 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, | 23 | 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, |
libqpdf/QPDF_linearization.cc
| @@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
| 13 | #include <qpdf/QUtil.hh> | 13 | #include <qpdf/QUtil.hh> |
| 14 | 14 | ||
| 15 | #include <algorithm> | 15 | #include <algorithm> |
| 16 | -#include <math.h> | ||
| 17 | -#include <string.h> | 16 | +#include <cmath> |
| 17 | +#include <cstring> | ||
| 18 | 18 | ||
| 19 | template <class T, class int_type> | 19 | template <class T, class int_type> |
| 20 | static void | 20 | static void |
libqpdf/QTC.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | #include <map> | 4 | #include <map> |
| 5 | #include <set> | 5 | #include <set> |
| 6 | -#include <stdio.h> | 6 | +#include <cstdio> |
| 7 | 7 | ||
| 8 | static bool | 8 | static bool |
| 9 | tc_active(char const* const scope) | 9 | tc_active(char const* const scope) |
libqpdf/QUtil.cc
| @@ -9,8 +9,8 @@ | @@ -9,8 +9,8 @@ | ||
| 9 | #include <qpdf/QPDFSystemError.hh> | 9 | #include <qpdf/QPDFSystemError.hh> |
| 10 | #include <qpdf/QTC.hh> | 10 | #include <qpdf/QTC.hh> |
| 11 | 11 | ||
| 12 | -#include <ctype.h> | ||
| 13 | -#include <errno.h> | 12 | +#include <cctype> |
| 13 | +#include <cerrno> | ||
| 14 | #include <fcntl.h> | 14 | #include <fcntl.h> |
| 15 | #include <fstream> | 15 | #include <fstream> |
| 16 | #include <iomanip> | 16 | #include <iomanip> |
| @@ -21,9 +21,9 @@ | @@ -21,9 +21,9 @@ | ||
| 21 | #include <set> | 21 | #include <set> |
| 22 | #include <sstream> | 22 | #include <sstream> |
| 23 | #include <stdexcept> | 23 | #include <stdexcept> |
| 24 | -#include <stdio.h> | ||
| 25 | -#include <stdlib.h> | ||
| 26 | -#include <string.h> | 24 | +#include <cstdio> |
| 25 | +#include <cstdlib> | ||
| 26 | +#include <cstring> | ||
| 27 | #ifndef QPDF_NO_WCHAR_T | 27 | #ifndef QPDF_NO_WCHAR_T |
| 28 | # include <cwchar> | 28 | # include <cwchar> |
| 29 | #endif | 29 | #endif |
libqpdf/qpdf/BitStream.hh
libqpdf/qpdf/BitWriter.hh
libtests/aes.cc
| @@ -4,9 +4,9 @@ | @@ -4,9 +4,9 @@ | ||
| 4 | #include <qpdf/QUtil.hh> | 4 | #include <qpdf/QUtil.hh> |
| 5 | 5 | ||
| 6 | #include <iostream> | 6 | #include <iostream> |
| 7 | -#include <stdio.h> | ||
| 8 | -#include <stdlib.h> | ||
| 9 | -#include <string.h> | 7 | +#include <cstdio> |
| 8 | +#include <cstdlib> | ||
| 9 | +#include <cstring> | ||
| 10 | 10 | ||
| 11 | static void | 11 | static void |
| 12 | usage() | 12 | usage() |
libtests/ascii85.cc
libtests/bits.cc
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | #include <qpdf/QIntC.hh> | 4 | #include <qpdf/QIntC.hh> |
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | #include <iostream> | 6 | #include <iostream> |
| 7 | -#include <stdlib.h> | 7 | +#include <cstdlib> |
| 8 | 8 | ||
| 9 | // See comments in bits_functions.hh | 9 | // See comments in bits_functions.hh |
| 10 | #define BITS_TESTING 1 | 10 | #define BITS_TESTING 1 |
libtests/buffer.cc
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | #include <cstring> | 7 | #include <cstring> |
| 8 | #include <iostream> | 8 | #include <iostream> |
| 9 | #include <stdexcept> | 9 | #include <stdexcept> |
| 10 | -#include <stdlib.h> | 10 | +#include <cstdlib> |
| 11 | 11 | ||
| 12 | static unsigned char* | 12 | static unsigned char* |
| 13 | uc(char const* s) | 13 | uc(char const* s) |
libtests/closed_file_input_source.cc
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | #include <qpdf/FileInputSource.hh> | 2 | #include <qpdf/FileInputSource.hh> |
| 3 | 3 | ||
| 4 | #include <iostream> | 4 | #include <iostream> |
| 5 | -#include <stdio.h> | 5 | +#include <cstdio> |
| 6 | 6 | ||
| 7 | void | 7 | void |
| 8 | check(std::string const& what, bool result) | 8 | check(std::string const& what, bool result) |
libtests/dct_compress.cc
| @@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <stdio.h> | ||
| 7 | -#include <stdlib.h> | ||
| 8 | -#include <string.h> | 6 | +#include <cstdio> |
| 7 | +#include <cstdlib> | ||
| 8 | +#include <cstring> | ||
| 9 | 9 | ||
| 10 | static void | 10 | static void |
| 11 | usage() | 11 | usage() |
libtests/dct_uncompress.cc
| @@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <stdio.h> | ||
| 7 | -#include <stdlib.h> | 6 | +#include <cstdio> |
| 7 | +#include <cstdlib> | ||
| 8 | 8 | ||
| 9 | int | 9 | int |
| 10 | main(int argc, char* argv[]) | 10 | main(int argc, char* argv[]) |
libtests/flate.cc
libtests/hex.cc
libtests/lzw.cc
| @@ -3,8 +3,8 @@ | @@ -3,8 +3,8 @@ | ||
| 3 | #include <qpdf/Pl_StdioFile.hh> | 3 | #include <qpdf/Pl_StdioFile.hh> |
| 4 | #include <qpdf/QUtil.hh> | 4 | #include <qpdf/QUtil.hh> |
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <stdlib.h> | ||
| 7 | -#include <string.h> | 6 | +#include <cstdlib> |
| 7 | +#include <cstring> | ||
| 8 | 8 | ||
| 9 | int | 9 | int |
| 10 | main(int argc, char* argv[]) | 10 | main(int argc, char* argv[]) |
libtests/md5.cc
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | #include <qpdf/Pl_MD5.hh> | 3 | #include <qpdf/Pl_MD5.hh> |
| 4 | #include <qpdf/QUtil.hh> | 4 | #include <qpdf/QUtil.hh> |
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <stdio.h> | 6 | +#include <cstdio> |
| 7 | 7 | ||
| 8 | static void | 8 | static void |
| 9 | test_string(char const* str) | 9 | test_string(char const* str) |
libtests/predictors.cc
| @@ -7,8 +7,8 @@ | @@ -7,8 +7,8 @@ | ||
| 7 | #include <qpdf/QUtil.hh> | 7 | #include <qpdf/QUtil.hh> |
| 8 | 8 | ||
| 9 | #include <iostream> | 9 | #include <iostream> |
| 10 | -#include <stdlib.h> | ||
| 11 | -#include <string.h> | 10 | +#include <cstdlib> |
| 11 | +#include <cstring> | ||
| 12 | 12 | ||
| 13 | void | 13 | void |
| 14 | run(char const* filename, | 14 | run(char const* filename, |
libtests/qintc.cc
| 1 | #include <qpdf/assert_test.h> | 1 | #include <qpdf/assert_test.h> |
| 2 | 2 | ||
| 3 | #include <qpdf/QIntC.hh> | 3 | #include <qpdf/QIntC.hh> |
| 4 | -#include <stdint.h> | 4 | +#include <cstdint> |
| 5 | 5 | ||
| 6 | #define try_convert(exp_pass, fn, i) \ | 6 | #define try_convert(exp_pass, fn, i) \ |
| 7 | try_convert_real(#fn "(" #i ")", exp_pass, fn, i) | 7 | try_convert_real(#fn "(" #i ")", exp_pass, fn, i) |
libtests/qutil.cc
| @@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
| 5 | #include <qpdf/QUtil.hh> | 5 | #include <qpdf/QUtil.hh> |
| 6 | #include <fstream> | 6 | #include <fstream> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | -#include <limits.h> | ||
| 9 | -#include <stdio.h> | ||
| 10 | -#include <string.h> | 8 | +#include <climits> |
| 9 | +#include <cstdio> | ||
| 10 | +#include <cstring> | ||
| 11 | 11 | ||
| 12 | #ifdef _WIN32 | 12 | #ifdef _WIN32 |
| 13 | # include <io.h> | 13 | # include <io.h> |
libtests/rc4.cc
| @@ -6,9 +6,9 @@ | @@ -6,9 +6,9 @@ | ||
| 6 | #include <qpdf/QUtil.hh> | 6 | #include <qpdf/QUtil.hh> |
| 7 | 7 | ||
| 8 | #include <iostream> | 8 | #include <iostream> |
| 9 | -#include <stdio.h> | ||
| 10 | -#include <stdlib.h> | ||
| 11 | -#include <string.h> | 9 | +#include <cstdio> |
| 10 | +#include <cstdlib> | ||
| 11 | +#include <cstring> | ||
| 12 | 12 | ||
| 13 | static void | 13 | static void |
| 14 | other_tests() | 14 | other_tests() |
libtests/runlength.cc
| @@ -3,9 +3,9 @@ | @@ -3,9 +3,9 @@ | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | 4 | ||
| 5 | #include <iostream> | 5 | #include <iostream> |
| 6 | -#include <stdio.h> | ||
| 7 | -#include <stdlib.h> | ||
| 8 | -#include <string.h> | 6 | +#include <cstdio> |
| 7 | +#include <cstdlib> | ||
| 8 | +#include <cstring> | ||
| 9 | 9 | ||
| 10 | int | 10 | int |
| 11 | main(int argc, char* argv[]) | 11 | main(int argc, char* argv[]) |
libtests/sha2.cc
qpdf/pdf_from_scratch.cc
| @@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
| 5 | #include <qpdf/QPDFWriter.hh> | 5 | #include <qpdf/QPDFWriter.hh> |
| 6 | #include <qpdf/QUtil.hh> | 6 | #include <qpdf/QUtil.hh> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | -#include <stdio.h> | ||
| 9 | -#include <stdlib.h> | ||
| 10 | -#include <string.h> | 8 | +#include <cstdio> |
| 9 | +#include <cstdlib> | ||
| 10 | +#include <cstring> | ||
| 11 | 11 | ||
| 12 | static char const* whoami = 0; | 12 | static char const* whoami = 0; |
| 13 | 13 |
qpdf/test_driver.cc
| @@ -27,12 +27,12 @@ | @@ -27,12 +27,12 @@ | ||
| 27 | #include <qpdf/QTC.hh> | 27 | #include <qpdf/QTC.hh> |
| 28 | #include <qpdf/QUtil.hh> | 28 | #include <qpdf/QUtil.hh> |
| 29 | #include <iostream> | 29 | #include <iostream> |
| 30 | -#include <limits.h> | 30 | +#include <climits> |
| 31 | #include <map> | 31 | #include <map> |
| 32 | #include <sstream> | 32 | #include <sstream> |
| 33 | -#include <stdio.h> | ||
| 34 | -#include <stdlib.h> | ||
| 35 | -#include <string.h> | 33 | +#include <cstdio> |
| 34 | +#include <cstdlib> | ||
| 35 | +#include <cstring> | ||
| 36 | 36 | ||
| 37 | #define QPDF_OBJECT_NOWARN | 37 | #define QPDF_OBJECT_NOWARN |
| 38 | #include <qpdf/QPDFObject.hh> | 38 | #include <qpdf/QPDFObject.hh> |
qpdf/test_large_file.cc
| @@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
| 13 | #include <qpdf/QPDFWriter.hh> | 13 | #include <qpdf/QPDFWriter.hh> |
| 14 | #include <qpdf/QUtil.hh> | 14 | #include <qpdf/QUtil.hh> |
| 15 | #include <iostream> | 15 | #include <iostream> |
| 16 | -#include <stdlib.h> | ||
| 17 | -#include <string.h> | 16 | +#include <cstdlib> |
| 17 | +#include <cstring> | ||
| 18 | 18 | ||
| 19 | // Run "test_large_file write small a.pdf" to get a PDF file that you | 19 | // Run "test_large_file write small a.pdf" to get a PDF file that you |
| 20 | // can look at in a reader. | 20 | // can look at in a reader. |
qpdf/test_pdf_doc_encoding.cc
| 1 | #include <qpdf/QPDFObjectHandle.hh> | 1 | #include <qpdf/QPDFObjectHandle.hh> |
| 2 | #include <qpdf/QUtil.hh> | 2 | #include <qpdf/QUtil.hh> |
| 3 | #include <iostream> | 3 | #include <iostream> |
| 4 | -#include <stdlib.h> | ||
| 5 | -#include <string.h> | 4 | +#include <cstdlib> |
| 5 | +#include <cstring> | ||
| 6 | 6 | ||
| 7 | static char const* whoami = 0; | 7 | static char const* whoami = 0; |
| 8 | 8 |
qpdf/test_pdf_unicode.cc
| 1 | #include <qpdf/QPDFObjectHandle.hh> | 1 | #include <qpdf/QPDFObjectHandle.hh> |
| 2 | #include <qpdf/QUtil.hh> | 2 | #include <qpdf/QUtil.hh> |
| 3 | #include <iostream> | 3 | #include <iostream> |
| 4 | -#include <stdlib.h> | ||
| 5 | -#include <string.h> | 4 | +#include <cstdlib> |
| 5 | +#include <cstring> | ||
| 6 | 6 | ||
| 7 | static char const* whoami = 0; | 7 | static char const* whoami = 0; |
| 8 | 8 |
qpdf/test_tokenizer.cc
| @@ -7,9 +7,9 @@ | @@ -7,9 +7,9 @@ | ||
| 7 | #include <qpdf/QPDFTokenizer.hh> | 7 | #include <qpdf/QPDFTokenizer.hh> |
| 8 | #include <qpdf/QUtil.hh> | 8 | #include <qpdf/QUtil.hh> |
| 9 | #include <iostream> | 9 | #include <iostream> |
| 10 | -#include <stdio.h> | ||
| 11 | -#include <stdlib.h> | ||
| 12 | -#include <string.h> | 10 | +#include <cstdio> |
| 11 | +#include <cstdlib> | ||
| 12 | +#include <cstring> | ||
| 13 | 13 | ||
| 14 | static char const* whoami = 0; | 14 | static char const* whoami = 0; |
| 15 | 15 |
qpdf/test_unicode_filenames.cc
zlib-flate/zlib-flate.cc
| @@ -5,9 +5,9 @@ | @@ -5,9 +5,9 @@ | ||
| 5 | 5 | ||
| 6 | #include <fcntl.h> | 6 | #include <fcntl.h> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | -#include <stdio.h> | ||
| 9 | -#include <stdlib.h> | ||
| 10 | -#include <string.h> | 8 | +#include <cstdio> |
| 9 | +#include <cstdlib> | ||
| 10 | +#include <cstring> | ||
| 11 | 11 | ||
| 12 | static char const* whoami = 0; | 12 | static char const* whoami = 0; |
| 13 | 13 |