Commit 7f043fe88ed8d7ce14a67cbfaf0c0b18015b8f9f

Authored by m-holger
1 parent a6d7b79e

Remove unused include directives

examples/pdf-count-strings.cc
... ... @@ -6,13 +6,11 @@
6 6  
7 7 #include <iostream>
8 8 #include <stdlib.h>
9   -#include <string.h>
10 9  
11 10 #include <qpdf/Pl_StdioFile.hh>
12 11 #include <qpdf/QPDF.hh>
13 12 #include <qpdf/QPDFObjectHandle.hh>
14 13 #include <qpdf/QPDFPageDocumentHelper.hh>
15   -#include <qpdf/QPDFPageObjectHelper.hh>
16 14 #include <qpdf/QUtil.hh>
17 15  
18 16 static char const* whoami = nullptr;
... ...
examples/pdf-create.cc
... ... @@ -12,13 +12,11 @@
12 12 #include <qpdf/QPDF.hh>
13 13 #include <qpdf/QPDFObjectHandle.hh>
14 14 #include <qpdf/QPDFPageDocumentHelper.hh>
15   -#include <qpdf/QPDFPageObjectHelper.hh>
16 15 #include <qpdf/QPDFWriter.hh>
17 16 #include <qpdf/QUtil.hh>
18 17 #include <iostream>
19 18 #include <memory>
20 19 #include <stdlib.h>
21   -#include <string.h>
22 20  
23 21 static char const* whoami = nullptr;
24 22  
... ...
examples/pdf-filter-tokens.cc
... ... @@ -9,12 +9,10 @@
9 9 #include <deque>
10 10 #include <iostream>
11 11 #include <stdlib.h>
12   -#include <string.h>
13 12  
14 13 #include <qpdf/QPDF.hh>
15 14 #include <qpdf/QPDFObjectHandle.hh>
16 15 #include <qpdf/QPDFPageDocumentHelper.hh>
17   -#include <qpdf/QPDFPageObjectHelper.hh>
18 16 #include <qpdf/QPDFWriter.hh>
19 17 #include <qpdf/QUtil.hh>
20 18  
... ...
examples/pdf-name-number-tree.cc
... ... @@ -3,7 +3,6 @@
3 3 #include <qpdf/QPDFNumberTreeObjectHelper.hh>
4 4 #include <qpdf/QPDFWriter.hh>
5 5 #include <qpdf/QUtil.hh>
6   -#include <cstring>
7 6 #include <iostream>
8 7  
9 8 static char const* whoami = nullptr;
... ...
examples/pdf-overlay-page.cc
... ... @@ -5,7 +5,6 @@
5 5 #include <qpdf/QUtil.hh>
6 6 #include <iostream>
7 7 #include <stdlib.h>
8   -#include <string.h>
9 8  
10 9 // This program demonstrates use of form XObjects to overlay a page
11 10 // from one file onto all pages of another file. The qpdf program's
... ...
examples/pdf-parse-content.cc
1 1 #include <iostream>
2 2 #include <stdlib.h>
3   -#include <string.h>
4 3  
5 4 #include <qpdf/QIntC.hh>
6 5 #include <qpdf/QPDF.hh>
... ...
examples/pdf-set-form-values.cc
... ... @@ -4,9 +4,7 @@
4 4 #include <qpdf/QPDFWriter.hh>
5 5 #include <qpdf/QUtil.hh>
6 6 #include <iostream>
7   -#include <stdio.h>
8 7 #include <stdlib.h>
9   -#include <string.h>
10 8  
11 9 static char const* whoami = nullptr;
12 10  
... ...
examples/qpdf-job.cc
1   -#include <qpdf/QIntC.hh>
2 1 #include <qpdf/QPDFJob.hh>
3 2 #include <qpdf/QUtil.hh>
4 3  
5   -#include <cstring>
6 4 #include <iostream>
7 5  
8 6 // This program is a simple demonstration of different ways to use the
... ...
examples/qpdfjob-c-save-attachment.c
1   -#include <qpdf/Constants.h>
2 1 #include <qpdf/qpdfjob-c.h>
3 2 #include <qpdf/qpdflogger-c.h>
4 3  
... ...
examples/qpdfjob-remove-annotations.cc
... ... @@ -4,7 +4,6 @@
4 4  
5 5 #include <cstdio>
6 6 #include <cstdlib>
7   -#include <cstring>
8 7 #include <iostream>
9 8  
10 9 // This example demonstrates how we can use the QPDFJob createQPDF and writeQPDF
... ...
libqpdf/BufferInputSource.cc
... ... @@ -2,9 +2,7 @@
2 2  
3 3 #include <qpdf/QIntC.hh>
4 4 #include <algorithm>
5   -#include <limits>
6 5 #include <sstream>
7   -#include <stdexcept>
8 6 #include <string.h>
9 7  
10 8 BufferInputSource::BufferInputSource(
... ...
libqpdf/MD5.cc
... ... @@ -4,10 +4,6 @@
4 4 #include <qpdf/QPDFCryptoProvider.hh>
5 5 #include <qpdf/QUtil.hh>
6 6  
7   -#include <errno.h>
8   -#include <memory.h>
9   -#include <stdio.h>
10   -#include <stdlib.h>
11 7 #include <string.h>
12 8  
13 9 MD5::MD5()
... ...
libqpdf/Pipeline.cc
1 1 #include <qpdf/Pipeline.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4   -
5 3 #include <cstring>
6 4 #include <stdexcept>
7 5  
... ...
libqpdf/Pl_AES_PDF.cc
... ... @@ -5,7 +5,6 @@
5 5 #include <qpdf/QUtil.hh>
6 6 #include <cstring>
7 7 #include <stdexcept>
8   -#include <stdlib.h>
9 8 #include <string>
10 9  
11 10 bool Pl_AES_PDF::use_static_iv = false;
... ...
libqpdf/Pl_ASCIIHexDecoder.cc
... ... @@ -3,7 +3,6 @@
3 3 #include <qpdf/QTC.hh>
4 4 #include <ctype.h>
5 5 #include <stdexcept>
6   -#include <string.h>
7 6  
8 7 Pl_ASCIIHexDecoder::Pl_ASCIIHexDecoder(char const* identifier, Pipeline* next) :
9 8 Pipeline(identifier, next),
... ...
libqpdf/Pl_Base64.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QIntC.hh>
4 4 #include <qpdf/QUtil.hh>
5   -#include <algorithm>
6 5 #include <cstring>
7 6 #include <stdexcept>
8 7  
... ...
libqpdf/Pl_DCT.cc
... ... @@ -2,12 +2,9 @@
2 2  
3 3 #include <qpdf/QIntC.hh>
4 4 #include <qpdf/QTC.hh>
5   -#include <qpdf/QUtil.hh>
6 5  
7   -#include <cstring>
8 6 #include <setjmp.h>
9 7 #include <stdexcept>
10   -#include <stdlib.h>
11 8 #include <string>
12 9  
13 10 #if BITS_IN_JSAMPLE != 8
... ...
libqpdf/Pl_Function.cc
1 1 #include <qpdf/Pl_Function.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4   -#include <errno.h>
5 3 #include <stdexcept>
6 4  
7 5 Pl_Function::Members::Members(writer_t fn) :
... ...
libqpdf/Pl_OStream.cc
1 1 #include <qpdf/Pl_OStream.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4   -#include <errno.h>
5 3 #include <stdexcept>
6 4  
7 5 Pl_OStream::Members::Members(std::ostream& os) :
... ...
libqpdf/Pl_QPDFTokenizer.cc
... ... @@ -2,9 +2,7 @@
2 2  
3 3 #include <qpdf/BufferInputSource.hh>
4 4 #include <qpdf/QTC.hh>
5   -#include <qpdf/QUtil.hh>
6 5 #include <stdexcept>
7   -#include <string.h>
8 6  
9 7 Pl_QPDFTokenizer::Members::Members() :
10 8 filter(nullptr),
... ...
libqpdf/Pl_SHA2.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QPDFCryptoProvider.hh>
4 4 #include <qpdf/QUtil.hh>
5   -#include <cstdio>
6 5 #include <stdexcept>
7 6  
8 7 Pl_SHA2::Pl_SHA2(int bits, Pipeline* next) :
... ...
libqpdf/Pl_String.cc
1 1 #include <qpdf/Pl_String.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4   -#include <errno.h>
5 3 #include <stdexcept>
6 4  
7 5 Pl_String::Members::Members(std::string& s) :
... ...
libqpdf/QPDFAnnotationObjectHelper.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QPDF.hh>
4 4 #include <qpdf/QPDFMatrix.hh>
5   -#include <qpdf/QPDFNameTreeObjectHelper.hh>
6 5 #include <qpdf/QTC.hh>
7 6 #include <qpdf/QUtil.hh>
8 7  
... ...
libqpdf/QPDFExc.cc
1 1 #include <qpdf/QPDFExc.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4   -
5 3 QPDFExc::QPDFExc(
6 4 qpdf_error_code_e error_code,
7 5 std::string const& filename,
... ...
libqpdf/QPDFParser.cc
... ... @@ -16,7 +16,6 @@
16 16 #include <qpdf/QPDF_Reserved.hh>
17 17 #include <qpdf/QPDF_Stream.hh>
18 18 #include <qpdf/QPDF_String.hh>
19   -#include <qpdf/QPDF_Unresolved.hh>
20 19 #include <qpdf/QTC.hh>
21 20 #include <qpdf/QUtil.hh>
22 21  
... ...
libqpdf/QPDFSystemError.cc
1 1 #include <qpdf/QPDFSystemError.hh>
2 2  
3   -#include <qpdf/QUtil.hh>
4 3 #include <string.h>
5 4  
6 5 QPDFSystemError::QPDFSystemError(
... ...
libqpdf/QPDFXRefEntry.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QIntC.hh>
4 4 #include <qpdf/QPDFExc.hh>
5   -#include <qpdf/QUtil.hh>
6 5  
7 6 QPDFXRefEntry::QPDFXRefEntry()
8 7 {
... ...
libqpdf/QPDF_Name.cc
1 1 #include <qpdf/QPDF_Name.hh>
2 2  
3 3 #include <qpdf/QUtil.hh>
4   -#include <stdio.h>
5   -#include <string.h>
6 4  
7 5 QPDF_Name::QPDF_Name(std::string const& name) :
8 6 QPDFValue(::ot_name, "name"),
... ...
libqpdf/QPDF_String.cc
... ... @@ -5,7 +5,6 @@
5 5 // DO NOT USE ctype -- it is locale dependent for some things, and
6 6 // it's not worth the risk of including it in case it may accidentally
7 7 // be used.
8   -#include <string.h>
9 8  
10 9 static bool
11 10 is_iso_latin1_printable(char ch)
... ...
libqpdf/QPDF_linearization.cc
... ... @@ -13,7 +13,6 @@
13 13 #include <qpdf/QUtil.hh>
14 14  
15 15 #include <algorithm>
16   -#include <iostream>
17 16 #include <math.h>
18 17 #include <string.h>
19 18  
... ...
libqpdf/QUtil.cc
... ... @@ -9,7 +9,6 @@
9 9 #include <qpdf/QPDFSystemError.hh>
10 10 #include <qpdf/QTC.hh>
11 11  
12   -#include <cmath>
13 12 #include <ctype.h>
14 13 #include <errno.h>
15 14 #include <fcntl.h>
... ...
libqpdf/RC4.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QPDFCryptoProvider.hh>
4 4  
5   -#include <string.h>
6 5  
7 6 RC4::RC4(unsigned char const* key_data, int key_len) :
8 7 crypto(QPDFCryptoProvider::getImpl())
... ...
libqpdf/qpdf-c.cc
... ... @@ -15,7 +15,6 @@
15 15 #include <qpdf/qpdf-c_impl.hh>
16 16 #include <qpdf/qpdflogger-c_impl.hh>
17 17  
18   -#include <cstring>
19 18 #include <functional>
20 19 #include <list>
21 20 #include <stdexcept>
... ...
libqpdf/qpdfjob-c.cc
1 1 #include <qpdf/qpdfjob-c.h>
2 2  
3 3 #include <qpdf/QPDFJob.hh>
4   -#include <qpdf/QPDFLogger.hh>
5 4 #include <qpdf/QPDFUsage.hh>
6 5 #include <qpdf/QUtil.hh>
7 6 #include <qpdf/qpdf-c_impl.hh>
8 7 #include <qpdf/qpdflogger-c_impl.hh>
9 8  
10 9 #include <cstdio>
11   -#include <cstring>
12 10  
13 11 struct _qpdfjob_handle
14 12 {
... ...
libqpdf/qpdflogger-c.cc
... ... @@ -4,7 +4,6 @@
4 4  
5 5 #include <qpdf/Pipeline.hh>
6 6 #include <qpdf/Pl_Function.hh>
7   -#include <qpdf/QIntC.hh>
8 7 #include <qpdf/QPDFLogger.hh>
9 8 #include <functional>
10 9 #include <memory>
... ...
libtests/arg_parser.cc
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/QPDFArgParser.hh>
4 4 #include <qpdf/QPDFUsage.hh>
5   -#include <qpdf/QUtil.hh>
6 5 #include <cstring>
7 6 #include <iostream>
8 7  
... ...
libtests/bits.cc
... ... @@ -4,7 +4,6 @@
4 4 #include <qpdf/QIntC.hh>
5 5 #include <qpdf/QUtil.hh>
6 6 #include <iostream>
7   -#include <stdio.h>
8 7 #include <stdlib.h>
9 8  
10 9 // See comments in bits_functions.hh
... ...
libtests/closed_file_input_source.cc
... ... @@ -3,8 +3,6 @@
3 3  
4 4 #include <iostream>
5 5 #include <stdio.h>
6   -#include <stdlib.h>
7   -#include <string.h>
8 6  
9 7 void
10 8 check(std::string const& what, bool result)
... ...
libtests/cxx11.cc
1 1 #include <qpdf/assert_test.h>
2 2  
3   -#include <cstdint>
4 3 #include <cstdlib>
5 4 #include <cstring>
6 5 #include <functional>
... ...
libtests/dct_uncompress.cc
... ... @@ -5,7 +5,6 @@
5 5 #include <iostream>
6 6 #include <stdio.h>
7 7 #include <stdlib.h>
8   -#include <string.h>
9 8  
10 9 int
11 10 main(int argc, char* argv[])
... ...
libtests/flate.cc
... ... @@ -4,10 +4,8 @@
4 4 #include <qpdf/Pl_StdioFile.hh>
5 5 #include <qpdf/QUtil.hh>
6 6  
7   -#include <errno.h>
8 7 #include <iostream>
9 8 #include <stdlib.h>
10   -#include <string.h>
11 9  
12 10 void
13 11 run(char const* filename)
... ...
libtests/json_parse.cc
1 1 #include <qpdf/FileInputSource.hh>
2 2 #include <qpdf/JSON.hh>
3   -#include <qpdf/QUtil.hh>
4 3 #include <cstdlib>
5 4 #include <cstring>
6 5 #include <iostream>
... ...
libtests/logger_c.c
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/qpdflogger-c.h>
4 4  
5   -#include <qpdf/Constants.h>
6 5 #include <qpdf/qpdfjob-c.h>
7 6  
8 7 #include <stdio.h>
... ...
libtests/pointer_holder.cc
... ... @@ -7,7 +7,6 @@
7 7  
8 8 #include <iostream>
9 9 #include <list>
10   -#include <stdlib.h>
11 10  
12 11 class Object
13 12 {
... ...
libtests/predictors.cc
... ... @@ -6,7 +6,6 @@
6 6 #include <qpdf/QIntC.hh>
7 7 #include <qpdf/QUtil.hh>
8 8  
9   -#include <errno.h>
10 9 #include <iostream>
11 10 #include <stdlib.h>
12 11 #include <string.h>
... ...
libtests/qutil.cc
... ... @@ -3,15 +3,11 @@
3 3 #include <qpdf/Pl_Buffer.hh>
4 4 #include <qpdf/QPDFSystemError.hh>
5 5 #include <qpdf/QUtil.hh>
6   -#include <fcntl.h>
7 6 #include <fstream>
8 7 #include <iostream>
9 8 #include <limits.h>
10   -#include <locale>
11 9 #include <stdio.h>
12 10 #include <string.h>
13   -#include <sys/stat.h>
14   -#include <sys/types.h>
15 11  
16 12 #ifdef _WIN32
17 13 # include <io.h>
... ...
libtests/random.cc
1 1 #include <qpdf/InsecureRandomDataProvider.hh>
2 2 #include <qpdf/QUtil.hh>
3 3 #include <qpdf/SecureRandomDataProvider.hh>
4   -#include <qpdf/qpdf-config.h>
5 4 #include <iostream>
6 5  
7 6 class BogusRandomDataProvider: public RandomDataProvider
... ...
libtests/sha2.cc
1 1 #include <qpdf/Pl_SHA2.hh>
2 2 #include <qpdf/QUtil.hh>
3 3 #include <iostream>
4   -#include <stdlib.h>
5 4 #include <string.h>
6 5  
7 6 static void
... ...
qpdf/pdf_from_scratch.cc
... ... @@ -3,7 +3,6 @@
3 3 #include <qpdf/QPDFObjectHandle.hh>
4 4 #include <qpdf/QPDFPageDocumentHelper.hh>
5 5 #include <qpdf/QPDFWriter.hh>
6   -#include <qpdf/QTC.hh>
7 6 #include <qpdf/QUtil.hh>
8 7 #include <iostream>
9 8 #include <stdio.h>
... ...
qpdf/qpdf.cc
... ... @@ -4,7 +4,6 @@
4 4  
5 5 #include <cstdio>
6 6 #include <cstdlib>
7   -#include <cstring>
8 7 #include <iostream>
9 8  
10 9 static char const* whoami = 0;
... ...
qpdf/qpdfjob-ctest.c
... ... @@ -2,7 +2,6 @@
2 2  
3 3 #include <qpdf/qpdfjob-c.h>
4 4 #include <stdio.h>
5   -#include <stdlib.h>
6 5 #include <string.h>
7 6  
8 7 #ifndef QPDF_NO_WCHAR_T
... ...
qpdf/test_driver.cc
... ... @@ -26,7 +26,6 @@
26 26 #include <qpdf/QPDFWriter.hh>
27 27 #include <qpdf/QTC.hh>
28 28 #include <qpdf/QUtil.hh>
29   -#include <algorithm>
30 29 #include <iostream>
31 30 #include <limits.h>
32 31 #include <map>
... ...
qpdf/test_renumber.cc
1   -#include <qpdf/Buffer.hh>
2 1 #include <qpdf/Constants.h>
3 2 #include <qpdf/QPDF.hh>
4 3 #include <qpdf/QPDFObjGen.hh>
... ... @@ -6,7 +5,6 @@
6 5 #include <qpdf/QPDFWriter.hh>
7 6 #include <qpdf/QPDFXRefEntry.hh>
8 7  
9   -#include <algorithm>
10 8 #include <cstdlib>
11 9 #include <iostream>
12 10 #include <set>
... ...
qpdf/test_shell_glob.cc
1 1 #include <qpdf/QUtil.hh>
2   -#include <cstring>
3 2 #include <iostream>
4 3  
5 4 int
... ...
qpdf/test_tokenizer.cc
... ... @@ -4,7 +4,6 @@
4 4 #include <qpdf/QIntC.hh>
5 5 #include <qpdf/QPDF.hh>
6 6 #include <qpdf/QPDFPageDocumentHelper.hh>
7   -#include <qpdf/QPDFPageObjectHelper.hh>
8 7 #include <qpdf/QPDFTokenizer.hh>
9 8 #include <qpdf/QUtil.hh>
10 9 #include <iostream>
... ...
qpdf/test_xref.cc
1 1 #include <qpdf/QPDF.hh>
2   -#include <qpdf/QPDFObjGen.hh>
3   -#include <qpdf/QPDFXRefEntry.hh>
4 2  
5 3 #include <cstdlib>
6 4 #include <iostream>
7 5 #include <map>
8   -#include <string>
9 6  
10 7 int
11 8 main(int argc, char* argv[])
... ...