Commit e28f4efb00d5040fa71532d76e63aa7ade105c99

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