.gitlab-ci.yml | 2 +- CMakeLists.txt | 2 +- cpp/poppler-private.h | 2 +- fofi/FoFiBase.cc | 4 ++-- fofi/FoFiEncodings.cc | 2 +- fofi/FoFiIdentifier.cc | 6 +++--- fofi/FoFiTrueType.cc | 6 +++--- fofi/FoFiTrueType.h | 2 +- fofi/FoFiType1.cc | 6 +++--- fofi/FoFiType1C.cc | 8 ++++---- glib/demo/CMakeLists.txt | 1 + glib/poppler-attachment.cc | 2 +- glib/poppler-document.cc | 2 +- glib/poppler-media.cc | 2 +- glib/poppler-page.cc | 2 +- glib/poppler-structure-element.cc | 2 +- goo/GooTimer.cc | 2 +- goo/ImgWriter.h | 2 +- goo/PNGWriter.cc | 4 ++-- goo/TiffWriter.cc | 2 +- goo/gbasename.cc | 4 ++-- goo/gfile.cc | 6 +++--- goo/gfile.h | 8 ++++---- goo/glibc.h | 2 +- goo/glibc_strtok_r.cc | 2 +- goo/gstrtod.cc | 8 ++++---- poppler/Annot.cc | 8 ++++---- poppler/BuiltinFont.cc | 4 ++-- poppler/BuiltinFontTables.cc | 2 +- poppler/CMap.cc | 8 ++++---- poppler/CairoFontEngine.cc | 2 +- poppler/CairoOutputDev.cc | 6 +++--- poppler/CairoRescaleBox.cc | 10 +++++----- poppler/Catalog.cc | 4 ++-- poppler/CertificateInfo.cc | 4 ++-- poppler/CertificateInfo.h | 2 +- poppler/CharCodeToUnicode.cc | 4 ++-- poppler/DCTStream.h | 12 ++++++------ poppler/DateInfo.cc | 4 ++-- poppler/DateInfo.h | 2 +- poppler/Decrypt.cc | 2 +- poppler/Error.cc | 6 +++--- poppler/Error.h | 2 +- poppler/FlateEncoder.h | 10 +++++----- poppler/FlateStream.h | 10 +++++----- poppler/FontEncodingTables.cc | 2 +- poppler/FontInfo.cc | 10 +++++----- poppler/Form.cc | 8 ++++---- poppler/Form.h | 2 +- poppler/Function.cc | 8 ++++---- poppler/Gfx.cc | 10 +++++----- poppler/GfxFont.cc | 12 ++++++------ poppler/GfxState.cc | 6 +++--- poppler/GfxState.h | 2 +- poppler/GlobalParams.cc | 6 +++--- poppler/GlobalParams.h | 4 ++-- poppler/GlobalParamsWin.cc | 8 ++++---- poppler/Hints.cc | 2 +- poppler/Hints.h | 2 +- poppler/JBIG2Stream.cc | 4 ++-- poppler/JPXStream.cc | 2 +- poppler/Lexer.cc | 10 +++++----- poppler/Link.cc | 4 ++-- poppler/Movie.cc | 2 +- poppler/NameToCharCode.cc | 2 +- poppler/NameToUnicodeTable.h | 2 +- poppler/Object.cc | 2 +- poppler/Object.h | 6 +++--- poppler/OutputDev.cc | 2 +- poppler/PDFDoc.cc | 18 +++++++++--------- poppler/PDFDoc.h | 2 +- poppler/PSOutputDev.cc | 12 ++++++------ poppler/PSOutputDev.h | 2 +- poppler/PSTokenizer.cc | 4 ++-- poppler/Page.cc | 4 ++-- poppler/PageLabelInfo.cc | 8 ++++---- poppler/PageLabelInfo.h | 10 +++++----- poppler/Parser.cc | 2 +- poppler/PreScanOutputDev.cc | 2 +- poppler/Rendition.cc | 2 +- poppler/SecurityHandler.cc | 2 +- poppler/SignatureInfo.cc | 4 ++-- poppler/SignatureInfo.h | 2 +- poppler/SplashOutputDev.cc | 2 +- poppler/StdinCachedFile.cc | 2 +- poppler/Stream.cc | 12 ++++++------ poppler/StructElement.cc | 2 +- poppler/StructTreeRoot.cc | 2 +- poppler/TextOutputDev.cc | 10 +++++----- poppler/TextOutputDev.h | 2 +- poppler/UnicodeMap.cc | 4 ++-- poppler/UnicodeTypeTable.cc | 2 +- poppler/XRef.cc | 14 +++++++------- poppler/poppler-config.h.cmake | 2 +- qt5/src/ArthurOutputDev.cc | 4 ++-- qt5/src/CMakeLists.txt | 3 +++ qt5/src/poppler-form.cc | 4 ++-- qt5/src/poppler-form.h | 2 +- qt5/src/poppler-qiodeviceoutstream.cc | 2 +- qt5/tests/stress-threads-qt5.cpp | 2 +- splash/Splash.cc | 10 +++++----- splash/Splash.h | 2 +- splash/SplashBitmap.cc | 8 ++++---- splash/SplashBitmap.h | 2 +- splash/SplashClip.cc | 4 ++-- splash/SplashFTFontEngine.cc | 2 +- splash/SplashFont.cc | 4 ++-- splash/SplashFontEngine.cc | 4 ++-- splash/SplashFontFile.cc | 2 +- splash/SplashMath.h | 2 +- splash/SplashPath.cc | 2 +- splash/SplashScreen.cc | 4 ++-- splash/SplashScreen.h | 2 +- splash/SplashState.cc | 2 +- splash/SplashXPath.cc | 4 ++-- splash/SplashXPathScanner.cc | 4 ++-- test/gtk-test.cc | 2 +- test/perf-test-preview-win.cc | 2 +- test/perf-test.cc | 16 ++++++++-------- utils/CMakeLists.txt | 2 ++ utils/HtmlFonts.cc | 2 +- utils/HtmlLinks.h | 4 ++-- utils/HtmlOutputDev.cc | 14 +++++++------- utils/HtmlOutputDev.h | 2 +- utils/HtmlUtils.h | 2 +- utils/ImageOutputDev.cc | 10 +++++----- utils/ImageOutputDev.h | 2 +- utils/InMemoryFile.cc | 2 +- utils/InMemoryFile.h | 2 +- utils/JSInfo.cc | 2 +- utils/JSInfo.h | 2 +- utils/Win32Console.h | 2 +- utils/parseargs.cc | 10 +++++----- utils/pdfdetach.cc | 2 +- utils/pdffonts.cc | 8 ++++---- utils/pdfimages.cc | 8 ++++---- utils/pdfinfo.cc | 12 ++++++------ utils/pdfseparate.cc | 10 +++++----- utils/pdfsig.cc | 10 +++++----- utils/pdftocairo.cc | 6 +++--- utils/pdftohtml.cc | 10 +++++----- utils/pdftoppm.cc | 6 +++--- utils/pdftops.cc | 8 ++++---- utils/pdftotext.cc | 8 ++++---- 144 files changed, 343 insertions(+), 337 deletions(-)
New commits: commit 1c1d9a70013125f67518f398a2b5abf37ec43cdd Author: Albert Astals Cid <[email protected]> Date: Fri Nov 29 17:20:10 2019 +0100 Enable modernize-deprecated-headers diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41de1a65..3b27033a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ build_clang_libcpp: script: - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data - mkdir -p build && cd build - - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" .. + - CC=clang CXX=clang++ cmake -G Ninja -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DTESTDATADIR=$PWD/../test-data -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-header-filter=.;-checks=-*,performance-*,,bugprone-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-deprecated-headers,-bugprone-narrowing-conversions,-bugprone-macro-parentheses,-bugprone-suspicious-string-compare,-bugprone-incorrect-roundings,-bugprone-undefined-memory-manipulation;-warnings-as-errors=*" .. - ninja - ctest --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e4ecd7b..4f6b4300 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -263,7 +263,6 @@ if(ENABLE_ZLIB) endif() if (NSS3_FOUND) - add_definitions(${NSS3_CFLAGS}) set(ENABLE_NSS3 ON) endif() if(JPEG_FOUND) @@ -461,6 +460,7 @@ if (ENABLE_NSS3) ) if(${CMAKE_VERSION} VERSION_LESS "3.6.0") set(poppler_LIBS ${poppler_LIBS} ${NSS3_LIBRARIES}) + include_directories(SYSTEM ${NSS3_INCLUDE_DIRS}) else() set(poppler_LIBS ${poppler_LIBS} PkgConfig::NSS3) endif() diff --git a/cpp/poppler-private.h b/cpp/poppler-private.h index 36b35ea0..7f2ca383 100644 --- a/cpp/poppler-private.h +++ b/cpp/poppler-private.h @@ -32,7 +32,7 @@ #include "Error.h" #include "CharTypes.h" -#include <stdarg.h> +#include <cstdarg> class GooString; class PDFRectangle; diff --git a/fofi/FoFiBase.cc b/fofi/FoFiBase.cc index 03759bce..c7f38229 100644 --- a/fofi/FoFiBase.cc +++ b/fofi/FoFiBase.cc @@ -26,8 +26,8 @@ #include <config.h> -#include <stdio.h> -#include <limits.h> +#include <cstdio> +#include <climits> #include "goo/gfile.h" #include "goo/gmem.h" #include "poppler/Error.h" diff --git a/fofi/FoFiEncodings.cc b/fofi/FoFiEncodings.cc index f16f2f43..ddf2b873 100644 --- a/fofi/FoFiEncodings.cc +++ b/fofi/FoFiEncodings.cc @@ -23,7 +23,7 @@ #include <config.h> -#include <stdlib.h> +#include <cstdlib> #include "FoFiEncodings.h" //------------------------------------------------------------------------ diff --git a/fofi/FoFiIdentifier.cc b/fofi/FoFiIdentifier.cc index 36863226..4f5e8ce7 100644 --- a/fofi/FoFiIdentifier.cc +++ b/fofi/FoFiIdentifier.cc @@ -23,9 +23,9 @@ // //======================================================================== -#include <stdio.h> -#include <string.h> -#include <limits.h> +#include <cstdio> +#include <cstring> +#include <climits> #include "goo/gfile.h" #include "goo/GooCheckedOps.h" #include "FoFiIdentifier.h" diff --git a/fofi/FoFiTrueType.cc b/fofi/FoFiTrueType.cc index 6a6f689f..24624352 100644 --- a/fofi/FoFiTrueType.cc +++ b/fofi/FoFiTrueType.cc @@ -32,9 +32,9 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> +#include <cstdlib> +#include <cstring> +#include <climits> #include <algorithm> #include "goo/gmem.h" #include "goo/GooLikely.h" diff --git a/fofi/FoFiTrueType.h b/fofi/FoFiTrueType.h index bba7bdfa..c14a831b 100644 --- a/fofi/FoFiTrueType.h +++ b/fofi/FoFiTrueType.h @@ -28,7 +28,7 @@ #ifndef FOFITRUETYPE_H #define FOFITRUETYPE_H -#include "stddef.h" +#include <cstddef> #include <unordered_map> #include <string> #include "FoFiBase.h" diff --git a/fofi/FoFiType1.cc b/fofi/FoFiType1.cc index f9ac55bd..9974753e 100644 --- a/fofi/FoFiType1.cc +++ b/fofi/FoFiType1.cc @@ -27,9 +27,9 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> +#include <cstdlib> +#include <cstring> +#include <climits> #include "goo/glibc.h" #include "goo/gmem.h" #include "goo/GooLikely.h" diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc index cdcef18a..7a4ed86f 100644 --- a/fofi/FoFiType1C.cc +++ b/fofi/FoFiType1C.cc @@ -26,9 +26,9 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> +#include <cstdlib> +#include <cstring> +#include <cmath> #include "goo/gmem.h" #include "goo/gstrtod.h" #include "goo/GooLikely.h" @@ -2673,7 +2673,7 @@ int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) const { x = 0; for (i = 0; i < n; ++i) { int y; - if (unlikely(isinf(ops[i].num))) { + if (unlikely(std::isinf(ops[i].num))) { return i; } if (checkedAdd(x, (int)ops[i].num, &y)) { diff --git a/glib/demo/CMakeLists.txt b/glib/demo/CMakeLists.txt index 8ccbb449..aa705b0f 100644 --- a/glib/demo/CMakeLists.txt +++ b/glib/demo/CMakeLists.txt @@ -1,4 +1,5 @@ include_directories( + SYSTEM ${GTK3_INCLUDE_DIRS} ) diff --git a/glib/poppler-attachment.cc b/glib/poppler-attachment.cc index ffc9ecea..bb93cd4d 100644 --- a/glib/poppler-attachment.cc +++ b/glib/poppler-attachment.cc @@ -17,7 +17,7 @@ */ #include "config.h" -#include <errno.h> +#include <cerrno> #include <goo/gfile.h> diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc index e2d4f335..e1b422a7 100644 --- a/glib/poppler-document.cc +++ b/glib/poppler-document.cc @@ -22,7 +22,7 @@ */ #include "config.h" -#include <string.h> +#include <cstring> #ifndef __GI_SCANNER__ #include <memory> diff --git a/glib/poppler-media.cc b/glib/poppler-media.cc index 23689ae4..16e968ae 100644 --- a/glib/poppler-media.cc +++ b/glib/poppler-media.cc @@ -19,7 +19,7 @@ #include "config.h" -#include <errno.h> +#include <cerrno> #include <goo/gfile.h> diff --git a/glib/poppler-page.cc b/glib/poppler-page.cc index dc12d04a..bc592f88 100644 --- a/glib/poppler-page.cc +++ b/glib/poppler-page.cc @@ -17,7 +17,7 @@ */ #include "config.h" -#include <math.h> +#include <cmath> #ifndef __GI_SCANNER__ #include <GlobalParams.h> diff --git a/glib/poppler-structure-element.cc b/glib/poppler-structure-element.cc index 8a1b167e..2a6f6970 100644 --- a/glib/poppler-structure-element.cc +++ b/glib/poppler-structure-element.cc @@ -25,7 +25,7 @@ #include <StructElement.h> #include <GlobalParams.h> #include <UnicodeMap.h> -#include <math.h> +#include <cmath> #endif /* !__GI_SCANNER__ */ #include "poppler.h" diff --git a/goo/GooTimer.cc b/goo/GooTimer.cc index 42295a48..74e378d1 100644 --- a/goo/GooTimer.cc +++ b/goo/GooTimer.cc @@ -14,7 +14,7 @@ #include <config.h> #include "GooTimer.h" -#include <string.h> +#include <cstring> #define USEC_PER_SEC 1000000 diff --git a/goo/ImgWriter.h b/goo/ImgWriter.h index 2ab97cdb..844aa1c8 100644 --- a/goo/ImgWriter.h +++ b/goo/ImgWriter.h @@ -15,7 +15,7 @@ #ifndef IMGWRITER_H #define IMGWRITER_H -#include <stdio.h> +#include <cstdio> class ImgWriter { diff --git a/goo/PNGWriter.cc b/goo/PNGWriter.cc index f230fcaf..a39ffc61 100644 --- a/goo/PNGWriter.cc +++ b/goo/PNGWriter.cc @@ -19,8 +19,8 @@ #ifdef ENABLE_LIBPNG #include <zlib.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include "poppler/Error.h" #include "goo/gmem.h" diff --git a/goo/TiffWriter.cc b/goo/TiffWriter.cc index fd2eaa31..cbd6eef4 100644 --- a/goo/TiffWriter.cc +++ b/goo/TiffWriter.cc @@ -16,7 +16,7 @@ #ifdef ENABLE_LIBTIFF -#include <string.h> +#include <cstring> #ifdef _WIN32 #include <io.h> diff --git a/goo/gbasename.cc b/goo/gbasename.cc index 830c1c80..e84276e0 100644 --- a/goo/gbasename.cc +++ b/goo/gbasename.cc @@ -43,8 +43,8 @@ #ifndef _MSC_VER # include <libgen.h> #endif -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> std::string gbasename(const char* filename) { diff --git a/goo/gfile.cc b/goo/gfile.cc index eae51207..4acba84e 100644 --- a/goo/gfile.cc +++ b/goo/gfile.cc @@ -40,11 +40,11 @@ # include <sys/types.h> # include <sys/stat.h> # include <fcntl.h> -# include <limits.h> -# include <string.h> +# include <climits> +# include <cstring> # include <pwd.h> #endif // _WIN32 -#include <stdio.h> +#include <cstdio> #include <limits> #include "GooString.h" #include "gfile.h" diff --git a/goo/gfile.h b/goo/gfile.h index ace17be7..4643de5b 100644 --- a/goo/gfile.h +++ b/goo/gfile.h @@ -36,10 +36,10 @@ #define GFILE_H #include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <time.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <ctime> extern "C" { #if defined(_WIN32) # include <sys/stat.h> diff --git a/goo/glibc.h b/goo/glibc.h index ccbd8736..5933ae01 100644 --- a/goo/glibc.h +++ b/goo/glibc.h @@ -16,7 +16,7 @@ #include "config.h" -#include <time.h> +#include <ctime> #ifndef HAVE_GMTIME_R struct tm *gmtime_r(const time_t *timep, struct tm *result); diff --git a/goo/glibc_strtok_r.cc b/goo/glibc_strtok_r.cc index e323bc21..95bd0724 100644 --- a/goo/glibc_strtok_r.cc +++ b/goo/glibc_strtok_r.cc @@ -61,7 +61,7 @@ #ifndef HAVE_STRTOK_R -#include <string.h> +#include <cstring> #define __rawmemchr strchr diff --git a/goo/gstrtod.cc b/goo/gstrtod.cc index a1062821..7df52227 100644 --- a/goo/gstrtod.cc +++ b/goo/gstrtod.cc @@ -22,10 +22,10 @@ #include "gstrtod.h" -#include <locale.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> +#include <clocale> +#include <cerrno> +#include <cstdlib> +#include <cstring> #define ascii_isspace(c) \ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 90c9c7de..40fe9b0d 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -52,9 +52,9 @@ #include <config.h> -#include <stdlib.h> -#include <math.h> -#include <assert.h> +#include <cstdlib> +#include <cmath> +#include <cassert> #include "goo/gmem.h" #include "goo/gstrtod.h" #include "Error.h" @@ -77,7 +77,7 @@ #include "FileSpec.h" #include "DateInfo.h" #include "Link.h" -#include <string.h> +#include <cstring> #include <algorithm> #ifndef M_PI diff --git a/poppler/BuiltinFont.cc b/poppler/BuiltinFont.cc index 86084778..7058c69a 100644 --- a/poppler/BuiltinFont.cc +++ b/poppler/BuiltinFont.cc @@ -8,8 +8,8 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include "goo/gmem.h" #include "FontEncodingTables.h" #include "BuiltinFont.h" diff --git a/poppler/BuiltinFontTables.cc b/poppler/BuiltinFontTables.cc index c1e636f6..00f8b2f3 100644 --- a/poppler/BuiltinFontTables.cc +++ b/poppler/BuiltinFontTables.cc @@ -7,7 +7,7 @@ //======================================================================== #include <config.h> -#include <stdlib.h> +#include <cstdlib> #include "FontEncodingTables.h" #include "BuiltinFontTables.h" diff --git a/poppler/CMap.cc b/poppler/CMap.cc index edf1510a..408a2984 100644 --- a/poppler/CMap.cc +++ b/poppler/CMap.cc @@ -27,10 +27,10 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/gfile.h" #include "goo/GooString.h" diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc index bcfa0954..48b2521c 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc @@ -39,7 +39,7 @@ #include <config.h> #include "config.h" -#include <string.h> +#include <cstring> #include "CairoFontEngine.h" #include "CairoOutputDev.h" #include "GlobalParams.h" diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc index 28f3ae6b..393093e9 100644 --- a/poppler/CairoOutputDev.cc +++ b/poppler/CairoOutputDev.cc @@ -41,9 +41,9 @@ #include <config.h> #include <cstdint> -#include <string.h> -#include <math.h> -#include <assert.h> +#include <cstring> +#include <cmath> +#include <cassert> #include <cairo.h> #include "goo/gfile.h" diff --git a/poppler/CairoRescaleBox.cc b/poppler/CairoRescaleBox.cc index 04b0955c..8d86de3e 100644 --- a/poppler/CairoRescaleBox.cc +++ b/poppler/CairoRescaleBox.cc @@ -47,11 +47,11 @@ #include <config.h> #include <cstdint> -#include <stdint.h> -#include <stdio.h> -#include <assert.h> -#include <stdlib.h> -#include <math.h> +#include <cstdint> +#include <cstdio> +#include <cassert> +#include <cstdlib> +#include <cmath> #include "goo/gmem.h" #include "CairoRescaleBox.h" diff --git a/poppler/Catalog.cc b/poppler/Catalog.cc index d01e8fca..c25d15df 100644 --- a/poppler/Catalog.cc +++ b/poppler/Catalog.cc @@ -43,8 +43,8 @@ #include <config.h> -#include <stddef.h> -#include <stdlib.h> +#include <cstddef> +#include <cstdlib> #include "goo/gmem.h" #include "Object.h" #include "PDFDoc.h" diff --git a/poppler/CertificateInfo.cc b/poppler/CertificateInfo.cc index 70aff819..fb3f9428 100644 --- a/poppler/CertificateInfo.cc +++ b/poppler/CertificateInfo.cc @@ -12,8 +12,8 @@ #include "CertificateInfo.h" -#include <string.h> -#include <stdlib.h> +#include <cstring> +#include <cstdlib> X509CertificateInfo::PublicKeyInfo::PublicKeyInfo() : publicKeyType(OTHERKEY), diff --git a/poppler/CertificateInfo.h b/poppler/CertificateInfo.h index fde3b0d1..4ecda2fe 100644 --- a/poppler/CertificateInfo.h +++ b/poppler/CertificateInfo.h @@ -14,7 +14,7 @@ #define CERTIFICATEINFO_H #include <memory> -#include <time.h> +#include <ctime> #include "goo/GooString.h" enum CertificateKeyUsageExtension diff --git a/poppler/CharCodeToUnicode.cc b/poppler/CharCodeToUnicode.cc index 6b993b19..20455bab 100644 --- a/poppler/CharCodeToUnicode.cc +++ b/poppler/CharCodeToUnicode.cc @@ -36,8 +36,8 @@ #include <config.h> -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include "goo/glibc.h" #include "goo/gmem.h" #include "goo/gfile.h" diff --git a/poppler/DCTStream.h b/poppler/DCTStream.h index e6dccb83..aa0a0231 100644 --- a/poppler/DCTStream.h +++ b/poppler/DCTStream.h @@ -17,15 +17,15 @@ #define DCTSTREAM_H #include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <setjmp.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <csetjmp> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#include <string.h> -#include <ctype.h> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/gfile.h" #include "Error.h" diff --git a/poppler/DateInfo.cc b/poppler/DateInfo.cc index 9b622831..ea60e181 100644 --- a/poppler/DateInfo.cc +++ b/poppler/DateInfo.cc @@ -26,8 +26,8 @@ #include "glibc.h" #include "DateInfo.h" -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> /* See PDF Reference 1.3, Section 3.8.2 for PDF Date representation */ bool parseDateString(const char *dateString, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute) diff --git a/poppler/DateInfo.h b/poppler/DateInfo.h index 19d02afc..eec0e502 100644 --- a/poppler/DateInfo.h +++ b/poppler/DateInfo.h @@ -25,7 +25,7 @@ #define DATE_INFO_H #include "goo/GooString.h" -#include <time.h> +#include <ctime> bool parseDateString(const char *string, int *year, int *month, int *day, int *hour, int *minute, int *second, char *tz, int *tzHour, int *tzMinute); diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc index 57945778..8e06ecc6 100644 --- a/poppler/Decrypt.cc +++ b/poppler/Decrypt.cc @@ -31,7 +31,7 @@ #include <config.h> #include <cstdint> -#include <string.h> +#include <cstring> #include "goo/gmem.h" #include "goo/grandom.h" #include "Decrypt.h" diff --git a/poppler/Error.cc b/poppler/Error.cc index f3e1ce0a..d8817b95 100644 --- a/poppler/Error.cc +++ b/poppler/Error.cc @@ -27,9 +27,9 @@ #include <config.h> #include <poppler-config.h> -#include <stdio.h> -#include <stddef.h> -#include <stdarg.h> +#include <cstdio> +#include <cstddef> +#include <cstdarg> #include "GooString.h" #include "GlobalParams.h" #include "Error.h" diff --git a/poppler/Error.h b/poppler/Error.h index a1c8ee96..e6df4461 100644 --- a/poppler/Error.h +++ b/poppler/Error.h @@ -27,7 +27,7 @@ #ifndef ERROR_H #define ERROR_H -#include <stdarg.h> +#include <cstdarg> #include "poppler-config.h" #include "goo/gfile.h" #include "goo/GooString.h" diff --git a/poppler/FlateEncoder.h b/poppler/FlateEncoder.h index a85fc5d5..1e79c2cf 100644 --- a/poppler/FlateEncoder.h +++ b/poppler/FlateEncoder.h @@ -13,14 +13,14 @@ #define FLATEENCODE_H #include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#include <string.h> -#include <ctype.h> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/gfile.h" #include "Error.h" diff --git a/poppler/FlateStream.h b/poppler/FlateStream.h index 330e63c8..6ed6b817 100644 --- a/poppler/FlateStream.h +++ b/poppler/FlateStream.h @@ -13,14 +13,14 @@ #define FLATESTREAM_H #include "poppler-config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#include <string.h> -#include <ctype.h> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/gfile.h" #include "Error.h" diff --git a/poppler/FontEncodingTables.cc b/poppler/FontEncodingTables.cc index 4a1f64a6..4a0fd52f 100644 --- a/poppler/FontEncodingTables.cc +++ b/poppler/FontEncodingTables.cc @@ -7,7 +7,7 @@ //======================================================================== #include <config.h> -#include <stdlib.h> +#include <cstdlib> #include "FontEncodingTables.h" const char *macRomanEncoding[256] = { diff --git a/poppler/FontInfo.cc b/poppler/FontInfo.cc index 88f7b059..1b423ff8 100644 --- a/poppler/FontInfo.cc +++ b/poppler/FontInfo.cc @@ -30,11 +30,11 @@ //======================================================================== #include "config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <cmath> #include "GlobalParams.h" #include "Error.h" #include "Object.h" diff --git a/poppler/Form.cc b/poppler/Form.cc index fe4d5382..c9ce7b78 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -34,10 +34,10 @@ #include <set> #include <limits> -#include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> +#include <cstddef> +#include <cstdlib> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/GooString.h" #include "Error.h" diff --git a/poppler/Form.h b/poppler/Form.h index c6248ae2..3929f33a 100644 --- a/poppler/Form.h +++ b/poppler/Form.h @@ -29,7 +29,7 @@ #include "Object.h" #include "Annot.h" -#include <time.h> +#include <ctime> #include <set> #include <vector> diff --git a/poppler/Function.cc b/poppler/Function.cc index f12131bf..fc2ff39a 100644 --- a/poppler/Function.cc +++ b/poppler/Function.cc @@ -28,10 +28,10 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <math.h> +#include <cstdlib> +#include <cstring> +#include <cctype> +#include <cmath> #include "goo/gmem.h" #include "goo/gstrtod.h" #include "Object.h" diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index e8da5038..f9dc1742 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -52,11 +52,11 @@ #include <config.h> -#include <stdlib.h> -#include <stdio.h> -#include <stddef.h> -#include <string.h> -#include <math.h> +#include <cstdlib> +#include <cstdio> +#include <cstddef> +#include <cstring> +#include <cmath> #include <memory> #include "goo/gmem.h" #include "goo/GooTimer.h" diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc index 203a4dbf..965302a7 100644 --- a/poppler/GfxFont.cc +++ b/poppler/GfxFont.cc @@ -43,12 +43,12 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <math.h> -#include <limits.h> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <cctype> +#include <cmath> +#include <climits> #include <algorithm> #include "goo/gmem.h" #include "Error.h" diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc index 859889cb..92b764b2 100644 --- a/poppler/GfxState.cc +++ b/poppler/GfxState.cc @@ -44,9 +44,9 @@ #include <algorithm> #include <memory> -#include <stddef.h> -#include <math.h> -#include <string.h> +#include <cstddef> +#include <cmath> +#include <cstring> #include "goo/gfile.h" #include "goo/gmem.h" #include "Error.h" diff --git a/poppler/GfxState.h b/poppler/GfxState.h index 99c33ed6..8d2fbd3b 100644 --- a/poppler/GfxState.h +++ b/poppler/GfxState.h @@ -39,7 +39,7 @@ #include "Object.h" #include "Function.h" -#include <assert.h> +#include <cassert> #include <map> class Array; diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc index 3a081398..7b959210 100644 --- a/poppler/GlobalParams.cc +++ b/poppler/GlobalParams.cc @@ -49,9 +49,9 @@ #include <config.h> -#include <string.h> -#include <stdio.h> -#include <ctype.h> +#include <cstring> +#include <cstdio> +#include <cctype> #ifdef _WIN32 # include <shlobj.h> # include <mbstring.h> diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h index fb65095a..9363be34 100644 --- a/poppler/GlobalParams.h +++ b/poppler/GlobalParams.h @@ -37,9 +37,9 @@ #ifndef GLOBALPARAMS_H #define GLOBALPARAMS_H -#include <assert.h> +#include <cassert> #include "poppler-config.h" -#include <stdio.h> +#include <cstdio> #include "CharTypes.h" #include "UnicodeMap.h" #include <unordered_map> diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc index 57097449..8f265514 100644 --- a/poppler/GlobalParamsWin.cc +++ b/poppler/GlobalParamsWin.cc @@ -28,10 +28,10 @@ description for all fonts available in Windows. That's how MuPDF works. #error "_WIN32_IE must be defined >= 0x0500 for SHGFP_TYPE_CURRENT from shlobj.h" #endif #include <shlobj.h> -#include <string.h> -#include <stdio.h> -#include <ctype.h> -#include <assert.h> +#include <cstring> +#include <cstdio> +#include <cctype> +#include <cassert> #include "goo/gmem.h" #include "goo/GooString.h" diff --git a/poppler/Hints.cc b/poppler/Hints.cc index 05d2f74d..b9cc61fa 100644 --- a/poppler/Hints.cc +++ b/poppler/Hints.cc @@ -27,7 +27,7 @@ #include "Lexer.h" #include "SecurityHandler.h" -#include <limits.h> +#include <climits> class StreamBitReader { public: diff --git a/poppler/Hints.h b/poppler/Hints.h index d6a28072..a7c9e3ed 100644 --- a/poppler/Hints.h +++ b/poppler/Hints.h @@ -13,7 +13,7 @@ #ifndef HINTS_H #define HINTS_H -#include <string.h> +#include <cstring> #include <vector> #include "PDFDoc.h" diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc index 48554d80..1486fe25 100644 --- a/poppler/JBIG2Stream.cc +++ b/poppler/JBIG2Stream.cc @@ -35,8 +35,8 @@ #include <config.h> -#include <stdlib.h> -#include <limits.h> +#include <cstdlib> +#include <climits> #include "Error.h" #include "JArithmeticDecoder.h" #include "JBIG2Stream.h" diff --git a/poppler/JPXStream.cc b/poppler/JPXStream.cc index e4ac94fc..bfd861e8 100644 --- a/poppler/JPXStream.cc +++ b/poppler/JPXStream.cc @@ -25,7 +25,7 @@ #include <config.h> -#include <limits.h> +#include <climits> #include "gmem.h" #include "Error.h" #include "JArithmeticDecoder.h" diff --git a/poppler/Lexer.cc b/poppler/Lexer.cc index 7a6e58e9..e9fd3cea 100644 --- a/poppler/Lexer.cc +++ b/poppler/Lexer.cc @@ -26,11 +26,11 @@ #include <config.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <limits.h> -#include <ctype.h> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <climits> +#include <cctype> #include "Lexer.h" #include "Error.h" #include "XRef.h" diff --git a/poppler/Link.cc b/poppler/Link.cc index cfa91d14..64dc7041 100644 --- a/poppler/Link.cc +++ b/poppler/Link.cc @@ -32,8 +32,8 @@ #include <config.h> -#include <stddef.h> -#include <string.h> +#include <cstddef> +#include <cstring> #include "goo/gmem.h" #include "goo/GooString.h" #include "Error.h" diff --git a/poppler/Movie.cc b/poppler/Movie.cc index 4ea08f44..c3d4bd4a 100644 --- a/poppler/Movie.cc +++ b/poppler/Movie.cc @@ -24,7 +24,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //********************************************************************************* -#include <math.h> +#include <cmath> #include "Movie.h" #include "FileSpec.h" diff --git a/poppler/NameToCharCode.cc b/poppler/NameToCharCode.cc index ca6c362d..e6476371 100644 --- a/poppler/NameToCharCode.cc +++ b/poppler/NameToCharCode.cc @@ -22,7 +22,7 @@ #include <config.h> -#include <string.h> +#include <cstring> #include "goo/gmem.h" #include "NameToCharCode.h" diff --git a/poppler/NameToUnicodeTable.h b/poppler/NameToUnicodeTable.h index 7345eabc..a1b64113 100644 --- a/poppler/NameToUnicodeTable.h +++ b/poppler/NameToUnicodeTable.h @@ -23,7 +23,7 @@ #include "CharTypes.h" -#include <stddef.h> +#include <cstddef> struct NameToUnicodeTab { Unicode u; diff --git a/poppler/Object.cc b/poppler/Object.cc index 85398b22..386546a0 100644 --- a/poppler/Object.cc +++ b/poppler/Object.cc @@ -24,7 +24,7 @@ #include <config.h> -#include <stddef.h> +#include <cstddef> #include "Object.h" #include "Array.h" #include "Dict.h" diff --git a/poppler/Object.h b/poppler/Object.h index 250f7e03..1b7a0e60 100644 --- a/poppler/Object.h +++ b/poppler/Object.h @@ -35,9 +35,9 @@ #include <cassert> #include <set> -#include <stdio.h> -#include <string.h> -#include <limits.h> +#include <cstdio> +#include <cstring> +#include <climits> #include "goo/gmem.h" #include "goo/GooString.h" #include "goo/GooLikely.h" diff --git a/poppler/OutputDev.cc b/poppler/OutputDev.cc index 633c69e6..f1f766d5 100644 --- a/poppler/OutputDev.cc +++ b/poppler/OutputDev.cc @@ -28,7 +28,7 @@ #include <config.h> -#include <stddef.h> +#include <cstddef> #include "Object.h" #include "Stream.h" #include "GfxState.h" diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index 60defc2c..f534ce7a 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -52,15 +52,15 @@ #include <config.h> #include <poppler-config.h> -#include <ctype.h> -#include <locale.h> -#include <stdio.h> -#include <errno.h> -#include <limits.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <time.h> +#include <cctype> +#include <clocale> +#include <cstdio> +#include <cerrno> +#include <climits> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <ctime> #include <regex> #include <sys/stat.h> #include "goo/glibc.h" diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h index 65db1609..85fc6130 100644 --- a/poppler/PDFDoc.h +++ b/poppler/PDFDoc.h @@ -44,7 +44,7 @@ #include <mutex> #include "poppler-config.h" -#include <stdio.h> +#include <cstdio> #include "XRef.h" #include "Catalog.h" #include "Page.h" diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index d9d88145..a7c86f8f 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -44,12 +44,12 @@ #include <config.h> -#include <stdio.h> -#include <stddef.h> -#include <stdarg.h> -#include <signal.h> -#include <math.h> -#include <limits.h> +#include <cstdio> +#include <cstddef> +#include <cstdarg> +#include <csignal> +#include <cmath> +#include <climits> #include <algorithm> #include <array> #include "goo/GooString.h" diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h index c84478e1..6939bb1d 100644 --- a/poppler/PSOutputDev.h +++ b/poppler/PSOutputDev.h @@ -38,7 +38,7 @@ #define PSOUTPUTDEV_H #include "poppler-config.h" -#include <stddef.h> +#include <cstddef> #include "Object.h" #include "GfxState.h" #include "GlobalParams.h" diff --git a/poppler/PSTokenizer.cc b/poppler/PSTokenizer.cc index a5eb7c86..ac36fc11 100644 --- a/poppler/PSTokenizer.cc +++ b/poppler/PSTokenizer.cc @@ -24,8 +24,8 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> +#include <cstdio> +#include <cstdlib> #include "PSTokenizer.h" //------------------------------------------------------------------------ diff --git a/poppler/Page.cc b/poppler/Page.cc index d137ec4b..26537eb9 100644 --- a/poppler/Page.cc +++ b/poppler/Page.cc @@ -38,8 +38,8 @@ #include <config.h> -#include <stddef.h> -#include <limits.h> +#include <cstddef> +#include <climits> #include "GlobalParams.h" #include "Object.h" #include "Array.h" diff --git a/poppler/PageLabelInfo.cc b/poppler/PageLabelInfo.cc index 1928d5f8..53bdeda4 100644 --- a/poppler/PageLabelInfo.cc +++ b/poppler/PageLabelInfo.cc @@ -14,10 +14,10 @@ //======================================================================== #include <config.h> -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <assert.h> +#include <climits> +#include <cstdlib> +#include <cstdio> +#include <cassert> #include <algorithm> diff --git a/poppler/PageLabelInfo.h b/poppler/PageLabelInfo.h index 557bc444..e19127d6 100644 --- a/poppler/PageLabelInfo.h +++ b/poppler/PageLabelInfo.h @@ -15,11 +15,11 @@ #ifndef PAGELABELINFO_H #define PAGELABELINFO_H -#include <limits.h> -#include <stdlib.h> -#include <stdio.h> -#include <ctype.h> -#include <assert.h> +#include <climits> +#include <cstdlib> +#include <cstdio> +#include <cctype> +#include <cassert> #include <string> #include <vector> diff --git a/poppler/Parser.cc b/poppler/Parser.cc index db839de8..afb54dfb 100644 --- a/poppler/Parser.cc +++ b/poppler/Parser.cc @@ -30,7 +30,7 @@ #include <config.h> -#include <stddef.h> +#include <cstddef> #include "Object.h" #include "Array.h" #include "Dict.h" diff --git a/poppler/PreScanOutputDev.cc b/poppler/PreScanOutputDev.cc index 2d042760..38497286 100644 --- a/poppler/PreScanOutputDev.cc +++ b/poppler/PreScanOutputDev.cc @@ -26,7 +26,7 @@ #include <config.h> -#include <math.h> +#include <cmath> #include "GlobalParams.h" #include "Gfx.h" #include "GfxFont.h" diff --git a/poppler/Rendition.cc b/poppler/Rendition.cc index 6f75ab6f..ed3961e3 100644 --- a/poppler/Rendition.cc +++ b/poppler/Rendition.cc @@ -24,7 +24,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //********************************************************************************* -#include <math.h> +#include <cmath> #include "Rendition.h" #include "FileSpec.h" diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc index adb8fdcf..9e289a9d 100644 --- a/poppler/SecurityHandler.cc +++ b/poppler/SecurityHandler.cc @@ -32,7 +32,7 @@ #include "GlobalParams.h" #include "SecurityHandler.h" -#include <limits.h> +#include <climits> //------------------------------------------------------------------------ // SecurityHandler diff --git a/poppler/SignatureInfo.cc b/poppler/SignatureInfo.cc index 3ab6f91f..f1ad45e3 100644 --- a/poppler/SignatureInfo.cc +++ b/poppler/SignatureInfo.cc @@ -18,8 +18,8 @@ #include "SignatureInfo.h" #include "CertificateInfo.h" #include "goo/gmem.h" -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #ifdef ENABLE_NSS3 #include <hasht.h> diff --git a/poppler/SignatureInfo.h b/poppler/SignatureInfo.h index 5728da56..ee9dff22 100644 --- a/poppler/SignatureInfo.h +++ b/poppler/SignatureInfo.h @@ -17,7 +17,7 @@ #define SIGNATUREINFO_H #include <memory> -#include <time.h> +#include <ctime> enum SignatureValidationStatus { diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index ed094e68..86e895a9 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -50,7 +50,7 @@ #include <config.h> -#include <string.h> +#include <cstring> #include <cmath> #include "goo/gfile.h" #include "GlobalParams.h" diff --git a/poppler/StdinCachedFile.cc b/poppler/StdinCachedFile.cc index 328c0a1e..873e72d3 100644 --- a/poppler/StdinCachedFile.cc +++ b/poppler/StdinCachedFile.cc @@ -18,7 +18,7 @@ #include <fcntl.h> // for O_BINARY #include <io.h> // for setmode #endif -#include <stdio.h> +#include <cstdio> size_t StdinCacheLoader::init(GooString *dummy, CachedFile *cachedFile) { diff --git a/poppler/Stream.cc b/poppler/Stream.cc index 805bb97d..b87d1a34 100644 --- a/poppler/Stream.cc +++ b/poppler/Stream.cc @@ -45,15 +45,15 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <limits.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <climits> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#include <string.h> -#include <ctype.h> +#include <cstring> +#include <cctype> #include "goo/gmem.h" #include "goo/gfile.h" #include "poppler-config.h" diff --git a/poppler/StructElement.cc b/poppler/StructElement.cc index cdfb3c2f..d0101c96 100644 --- a/poppler/StructElement.cc +++ b/poppler/StructElement.cc @@ -21,7 +21,7 @@ #include "PDFDoc.h" #include "Dict.h" -#include <assert.h> +#include <cassert> class GfxState; diff --git a/poppler/StructTreeRoot.cc b/poppler/StructTreeRoot.cc index dc9eb56a..8144db95 100644 --- a/poppler/StructTreeRoot.cc +++ b/poppler/StructTreeRoot.cc @@ -20,7 +20,7 @@ #include "Object.h" #include "Dict.h" #include <set> -#include <assert.h> +#include <cassert> StructTreeRoot::StructTreeRoot(PDFDoc *docA, Dict *structTreeRootDict): diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc index 722f0cbb..fe9a6e7c 100644 --- a/poppler/TextOutputDev.cc +++ b/poppler/TextOutputDev.cc @@ -51,12 +51,12 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> #include <cmath> -#include <float.h> -#include <ctype.h> +#include <cfloat> +#include <cctype> #include <algorithm> #ifdef _WIN32 #include <fcntl.h> // for O_BINARY diff --git a/poppler/TextOutputDev.h b/poppler/TextOutputDev.h index f52ace82..5b901c26 100644 --- a/poppler/TextOutputDev.h +++ b/poppler/TextOutputDev.h @@ -36,7 +36,7 @@ #define TEXTOUTPUTDEV_H #include "poppler-config.h" -#include <stdio.h> +#include <cstdio> #include "GfxFont.h" #include "GfxState.h" #include "OutputDev.h" diff --git a/poppler/UnicodeMap.cc b/poppler/UnicodeMap.cc index e25b8f2e..de531166 100644 --- a/poppler/UnicodeMap.cc +++ b/poppler/UnicodeMap.cc @@ -28,8 +28,8 @@ #include <config.h> -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include "goo/glibc.h" #include "goo/gmem.h" #include "goo/gfile.h" diff --git a/poppler/UnicodeTypeTable.cc b/poppler/UnicodeTypeTable.cc index 9e04b6b2..f4b7e3f8 100644 --- a/poppler/UnicodeTypeTable.cc +++ b/poppler/UnicodeTypeTable.cc @@ -25,7 +25,7 @@ // //======================================================================== -#include <stdlib.h> +#include <cstdlib> #include "CharTypes.h" #include "UnicodeTypeTable.h" #include "goo/gmem.h" diff --git a/poppler/XRef.cc b/poppler/XRef.cc index 7b94a835..964f68af 100644 --- a/poppler/XRef.cc +++ b/poppler/XRef.cc @@ -37,13 +37,13 @@ #include <config.h> #include "poppler-config.h" -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <math.h> -#include <ctype.h> -#include <limits.h> -#include <float.h> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <cmath> +#include <cctype> +#include <climits> +#include <cfloat> #include "goo/gfile.h" #include "goo/gmem.h" #include "Object.h" diff --git a/poppler/poppler-config.h.cmake b/poppler/poppler-config.h.cmake index dd43d570..2adf181c 100644 --- a/poppler/poppler-config.h.cmake +++ b/poppler/poppler-config.h.cmake @@ -139,7 +139,7 @@ //------------------------------------------------------------------------ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -#include <stdio.h> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h +#include <cstdio> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h #ifdef __MINGW_PRINTF_FORMAT #define GCC_PRINTF_FORMAT(fmt_index, va_index) \ __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) diff --git a/qt5/src/ArthurOutputDev.cc b/qt5/src/ArthurOutputDev.cc index b0b39462..3ec78e06 100644 --- a/qt5/src/ArthurOutputDev.cc +++ b/qt5/src/ArthurOutputDev.cc @@ -35,8 +35,8 @@ #include <config.h> -#include <string.h> -#include <math.h> +#include <cstring> +#include <cmath> #include <array> diff --git a/qt5/src/CMakeLists.txt b/qt5/src/CMakeLists.txt index ca1f2478..643f56a1 100644 --- a/qt5/src/CMakeLists.txt +++ b/qt5/src/CMakeLists.txt @@ -48,6 +48,9 @@ target_link_libraries(poppler-qt5 poppler ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIE if(MSVC) target_link_libraries(poppler-qt5 poppler ${poppler_LIBS}) endif() +if (ENABLE_NSS3) + target_include_directories(poppler-qt5 SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) +endif() install(TARGETS poppler-qt5 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES diff --git a/qt5/src/poppler-form.cc b/qt5/src/poppler-form.cc index 5e377242..a3a5fd5a 100644 --- a/qt5/src/poppler-form.cc +++ b/qt5/src/poppler-form.cc @@ -41,8 +41,8 @@ #include "poppler-private.h" #include "poppler-annotation-helper.h" -#include <math.h> -#include <ctype.h> +#include <cmath> +#include <cctype> #ifdef ENABLE_NSS3 #include <hasht.h> diff --git a/qt5/src/poppler-form.h b/qt5/src/poppler-form.h index 6b60a26c..435cdfea 100644 --- a/qt5/src/poppler-form.h +++ b/qt5/src/poppler-form.h @@ -28,7 +28,7 @@ #ifndef _POPPLER_QT5_FORM_H_ #define _POPPLER_QT5_FORM_H_ -#include <time.h> +#include <ctime> #include <QtCore/QDateTime> #include <QtCore/QList> #include <QtCore/QRectF> diff --git a/qt5/src/poppler-qiodeviceoutstream.cc b/qt5/src/poppler-qiodeviceoutstream.cc index e91ceba1..200ee8f2 100644 --- a/qt5/src/poppler-qiodeviceoutstream.cc +++ b/qt5/src/poppler-qiodeviceoutstream.cc @@ -21,7 +21,7 @@ #include <QtCore/QIODevice> -#include <stdio.h> +#include <cstdio> #define QIODeviceOutStreamBufSize 8192 diff --git a/qt5/tests/stress-threads-qt5.cpp b/qt5/tests/stress-threads-qt5.cpp index 1e7e4a84..9438a655 100644 --- a/qt5/tests/stress-threads-qt5.cpp +++ b/qt5/tests/stress-threads-qt5.cpp @@ -5,7 +5,7 @@ #include <windows.h> #define sleep Sleep #endif -#include <time.h> +#include <ctime> #include <poppler-qt5.h> #include <poppler-form.h> diff --git a/splash/Splash.cc b/splash/Splash.cc index 9ae4bd30..d66a9c16 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -31,11 +31,11 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> -#include <limits.h> -#include <assert.h> -#include <math.h> +#include <cstdlib> +#include <cstring> +#include <climits> +#include <cassert> +#include <cmath> #include "goo/gmem.h" #include "goo/GooLikely.h" #include "poppler/Error.h" diff --git a/splash/Splash.h b/splash/Splash.h index 54f55220..aa7eccc6 100644 --- a/splash/Splash.h +++ b/splash/Splash.h @@ -25,7 +25,7 @@ #ifndef SPLASH_H #define SPLASH_H -#include <stddef.h> +#include <cstddef> #include "SplashTypes.h" #include "SplashClip.h" #include "SplashPattern.h" diff --git a/splash/SplashBitmap.cc b/splash/SplashBitmap.cc index e16baf6a..1dc158b4 100644 --- a/splash/SplashBitmap.cc +++ b/splash/SplashBitmap.cc @@ -34,10 +34,10 @@ #include <config.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <limits.h> +#include <cstdio> +#include <cstring> +#include <cstdlib> +#include <climits> #include "goo/gfile.h" #include "goo/gmem.h" #include "SplashErrorCodes.h" diff --git a/splash/SplashBitmap.h b/splash/SplashBitmap.h index 3b98092f..cd2ea3a0 100644 --- a/splash/SplashBitmap.h +++ b/splash/SplashBitmap.h @@ -35,7 +35,7 @@ #include "SplashTypes.h" #include "poppler/GfxState.h" -#include <stdio.h> +#include <cstdio> class ImgWriter; diff --git a/splash/SplashClip.cc b/splash/SplashClip.cc index 0569c144..d4010710 100644 --- a/splash/SplashClip.cc +++ b/splash/SplashClip.cc @@ -22,8 +22,8 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include "goo/gmem.h" #include "SplashErrorCodes.h" #include "SplashMath.h" diff --git a/splash/SplashFTFontEngine.cc b/splash/SplashFTFontEngine.cc index 7c016d03..ad43c15b 100644 --- a/splash/SplashFTFontEngine.cc +++ b/splash/SplashFTFontEngine.cc @@ -25,7 +25,7 @@ #include <config.h> -#include <stdio.h> +#include <cstdio> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/splash/SplashFont.cc b/splash/SplashFont.cc index d18e006e..ffaa66a7 100644 --- a/splash/SplashFont.cc +++ b/splash/SplashFont.cc @@ -21,8 +21,8 @@ #include <config.h> -#include <limits.h> -#include <string.h> +#include <climits> +#include <cstring> #include "goo/gmem.h" #include "SplashMath.h" #include "SplashGlyphBitmap.h" diff --git a/splash/SplashFontEngine.cc b/splash/SplashFontEngine.cc index 6156a8fc..40e24225 100644 --- a/splash/SplashFontEngine.cc +++ b/splash/SplashFontEngine.cc @@ -29,8 +29,8 @@ #include <config.h> -#include <stdlib.h> -#include <stdio.h> +#include <cstdlib> +#include <cstdio> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif diff --git a/splash/SplashFontFile.cc b/splash/SplashFontFile.cc index fb1b316a..2e7474cd 100644 --- a/splash/SplashFontFile.cc +++ b/splash/SplashFontFile.cc @@ -22,7 +22,7 @@ #include <config.h> -#include <stdio.h> +#include <cstdio> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/splash/SplashMath.h b/splash/SplashMath.h index bbbce367..70e6b7e4 100644 --- a/splash/SplashMath.h +++ b/splash/SplashMath.h @@ -24,7 +24,7 @@ #include "poppler-config.h" -#include <math.h> +#include <cmath> #include "SplashTypes.h" static inline SplashCoord splashAbs(SplashCoord x) { diff --git a/splash/SplashPath.cc b/splash/SplashPath.cc index 32bbd4f1..8ac28e04 100644 --- a/splash/SplashPath.cc +++ b/splash/SplashPath.cc @@ -22,7 +22,7 @@ #include <config.h> -#include <string.h> +#include <cstring> #include "goo/gmem.h" #include "goo/GooLikely.h" #include "SplashErrorCodes.h" diff --git a/splash/SplashScreen.cc b/splash/SplashScreen.cc index 917e26f9..28a9917e 100644 --- a/splash/SplashScreen.cc +++ b/splash/SplashScreen.cc @@ -21,8 +21,8 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include <algorithm> #include "goo/gmem.h" #include "goo/grandom.h" diff --git a/splash/SplashScreen.h b/splash/SplashScreen.h index da29a2f3..ef12cc0a 100644 --- a/splash/SplashScreen.h +++ b/splash/SplashScreen.h @@ -23,7 +23,7 @@ #include "SplashTypes.h" -#include <stdlib.h> +#include <cstdlib> //------------------------------------------------------------------------ // SplashScreen diff --git a/splash/SplashState.cc b/splash/SplashState.cc index 9d4eb6fd..9bdb099b 100644 --- a/splash/SplashState.cc +++ b/splash/SplashState.cc @@ -21,7 +21,7 @@ #include <config.h> -#include <string.h> +#include <cstring> #include "goo/gmem.h" #include "SplashPattern.h" #include "SplashScreen.h" diff --git a/splash/SplashXPath.cc b/splash/SplashXPath.cc index cfa065dc..248e3fbb 100644 --- a/splash/SplashXPath.cc +++ b/splash/SplashXPath.cc @@ -23,8 +23,8 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include <algorithm> #include "goo/gmem.h" #include "goo/GooLikely.h" diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc index 4ca90bc2..4b25792b 100644 --- a/splash/SplashXPathScanner.cc +++ b/splash/SplashXPathScanner.cc @@ -23,8 +23,8 @@ #include <config.h> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include <algorithm> #include "goo/gmem.h" #include "SplashMath.h" diff --git a/test/gtk-test.cc b/test/gtk-test.cc index f103185d..288b0d3f 100644 --- a/test/gtk-test.cc +++ b/test/gtk-test.cc @@ -15,7 +15,7 @@ #include <poppler.h> #include <poppler-private.h> #include <gtk/gtk.h> -#include <math.h> +#include <cmath> static int requested_page = 0; static gboolean cairo_output = FALSE; diff --git a/test/perf-test-preview-win.cc b/test/perf-test-preview-win.cc index 93c73244..905ae289 100644 --- a/test/perf-test-preview-win.cc +++ b/test/perf-test-preview-win.cc @@ -4,7 +4,7 @@ /* This is a preview support for perf-test for Windows */ #include <windows.h> -#include <assert.h> +#include <cassert> #include "SplashBitmap.h" diff --git a/test/perf-test.cc b/test/perf-test.cc index 2b0d9c4e..0dd0304b 100644 --- a/test/perf-test.cc +++ b/test/perf-test.cc @@ -36,14 +36,14 @@ // Not enabled by default. //#define COPY_FILE 1 -#include <assert.h> -#include <stdio.h> -#include <stdarg.h> -#include <ctype.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> -#include <time.h> +#include <cassert> +#include <cstdio> +#include <cstdarg> +#include <cctype> +#include <cstdlib> +#include <cstring> +#include <cerrno> +#include <ctime> #ifdef HAVE_DIRENT_H #include <dirent.h> diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index 3a1e0d1a..80f54245 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -30,6 +30,7 @@ if (HAVE_CAIRO) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + SYSTEM ${CAIRO_INCLUDE_DIRS} ) add_definitions(${CAIRO_CFLAGS}) @@ -105,6 +106,7 @@ if (ENABLE_NSS3) pdfsig.cc ) add_executable(pdfsig ${pdfsig_SOURCES}) + target_include_directories(pdfsig SYSTEM PRIVATE ${NSS3_INCLUDE_DIRS}) target_link_libraries(pdfsig ${common_libs}) install(TARGETS pdfsig DESTINATION bin) install(FILES pdfsig.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) diff --git a/utils/HtmlFonts.cc b/utils/HtmlFonts.cc index b16cb4cb..ad67c5db 100644 --- a/utils/HtmlFonts.cc +++ b/utils/HtmlFonts.cc @@ -42,7 +42,7 @@ #include "GlobalParams.h" #include "UnicodeMap.h" #include "GfxFont.h" -#include <stdio.h> +#include <cstdio> namespace { diff --git a/utils/HtmlLinks.h b/utils/HtmlLinks.h index e1358d4c..78bbb11e 100644 --- a/utils/HtmlLinks.h +++ b/utils/HtmlLinks.h @@ -27,8 +27,8 @@ #ifndef _HTML_LINKS #define _HTML_LINKS -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> #include <vector> #include "goo/GooString.h" diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index 52fe1d4d..c5e1ec1d 100644 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -51,12 +51,12 @@ //======================================================================== #include "config.h" -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <stddef.h> -#include <ctype.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstdarg> +#include <cstddef> +#include <cctype> +#include <cmath> #include <iostream> #include "goo/GooString.h" #include "goo/gbasename.h" @@ -101,7 +101,7 @@ public: }; // returns true if x is closer to y than x is to z -static inline bool IS_CLOSER(float x, float y, float z) { return fabs((x)-(y)) < fabs((x)-(z)); } +static inline bool IS_CLOSER(float x, float y, float z) { return std::fabs((x)-(y)) < std::fabs((x)-(z)); } extern bool complexMode; extern bool singleHtml; diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h index 3053e1e9..0a7882c4 100644 --- a/utils/HtmlOutputDev.h +++ b/utils/HtmlOutputDev.h @@ -35,7 +35,7 @@ #ifndef HTMLOUTPUTDEV_H #define HTMLOUTPUTDEV_H -#include <stdio.h> +#include <cstdio> #include "goo/gbasename.h" #include "GfxFont.h" #include "OutputDev.h" diff --git a/utils/HtmlUtils.h b/utils/HtmlUtils.h index 46a4a1b2..c6ccdc12 100644 --- a/utils/HtmlUtils.h +++ b/utils/HtmlUtils.h @@ -18,7 +18,7 @@ #ifndef HTMLUTILS_H_ #define HTMLUTILS_H_ -#include <math.h> // fabs +#include <cmath> // fabs // Returns true iff the difference between a and b is less than the threshold // We always use fuzzy math when comparing decimal numbers due to imprecision diff --git a/utils/ImageOutputDev.cc b/utils/ImageOutputDev.cc index 99b3b08d..02684467 100644 --- a/utils/ImageOutputDev.cc +++ b/utils/ImageOutputDev.cc @@ -34,11 +34,11 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <ctype.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cctype> +#include <cmath> #include "goo/gmem.h" #include "goo/NetPBMWriter.h" #include "goo/PNGWriter.h" diff --git a/utils/ImageOutputDev.h b/utils/ImageOutputDev.h index add30297..29fc68ad 100644 --- a/utils/ImageOutputDev.h +++ b/utils/ImageOutputDev.h @@ -31,7 +31,7 @@ #include "poppler/poppler-config.h" -#include <stdio.h> +#include <cstdio> #include "goo/ImgWriter.h" #include "OutputDev.h" diff --git a/utils/InMemoryFile.cc b/utils/InMemoryFile.cc index d1f979c8..c34bd113 100644 --- a/utils/InMemoryFile.cc +++ b/utils/InMemoryFile.cc @@ -16,7 +16,7 @@ #include "InMemoryFile.h" -#include <string.h> +#include <cstring> #include <sstream> InMemoryFile::InMemoryFile() diff --git a/utils/InMemoryFile.h b/utils/InMemoryFile.h index 5bde41ad..5a6ab9e8 100644 --- a/utils/InMemoryFile.h +++ b/utils/InMemoryFile.h @@ -17,7 +17,7 @@ #ifndef IN_MEMORY_FILE_H #define IN_MEMORY_FILE_H -#include <stdio.h> +#include <cstdio> #include <string> #include <vector> diff --git a/utils/JSInfo.cc b/utils/JSInfo.cc index f465b7e3..7bc9d147 100644 --- a/utils/JSInfo.cc +++ b/utils/JSInfo.cc @@ -15,7 +15,7 @@ #include "config.h" -#include <stdio.h> +#include <cstdio> #include "Object.h" #include "Dict.h" #include "Annot.h" diff --git a/utils/JSInfo.h b/utils/JSInfo.h index e8eb4a33..14a26c62 100644 --- a/utils/JSInfo.h +++ b/utils/JSInfo.h @@ -16,7 +16,7 @@ #ifndef JS_INFO_H #define JS_INFO_H -#include <stdio.h> +#include <cstdio> #include "Object.h" #include "PDFDoc.h" diff --git a/utils/Win32Console.h b/utils/Win32Console.h index d2de126f..a1ef6efc 100644 --- a/utils/Win32Console.h +++ b/utils/Win32Console.h @@ -26,7 +26,7 @@ // Ensure stdio.h is included before redefining stdio functions. We need to provide // our own declarations for the redefined functions because win32 stdio.h functions // have DLL export decorations. -#include <stdio.h> +#include <cstdio> #ifndef WIN32_CONSOLE_IMPL // don't redefine in Win32Console.cc so we can call original functions #define printf(...) win32_fprintf(stdout, __VA_ARGS__) diff --git a/utils/parseargs.cc b/utils/parseargs.cc index c9bcf906..9baa4567 100644 --- a/utils/parseargs.cc +++ b/utils/parseargs.cc @@ -23,11 +23,11 @@ ========================================================================*/ -#include <stdio.h> -#include <stddef.h> -#include <string.h> -#include <stdlib.h> -#include <ctype.h> +#include <cstdio> +#include <cstddef> +#include <cstring> +#include <cstdlib> +#include <cctype> #include "parseargs.h" #include "goo/gstrtod.h" diff --git a/utils/pdfdetach.cc b/utils/pdfdetach.cc index 3e4fbbc7..54115659 100644 --- a/utils/pdfdetach.cc +++ b/utils/pdfdetach.cc @@ -27,7 +27,7 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> +#include <cstdio> #include "goo/gmem.h" #include "parseargs.h" #include "Annot.h" diff --git a/utils/pdffonts.cc b/utils/pdffonts.cc index 9a8abc7b..e4e90959 100644 --- a/utils/pdffonts.cc +++ b/utils/pdffonts.cc @@ -28,10 +28,10 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cmath> #include <memory> #include <string> #include "parseargs.h" diff --git a/utils/pdfimages.cc b/utils/pdfimages.cc index b2685b50..5e5fde78 100644 --- a/utils/pdfimages.cc +++ b/utils/pdfimages.cc @@ -30,10 +30,10 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> #include "parseargs.h" #include "goo/GooString.h" #include "goo/gmem.h" diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc index 07b093f4..1c4a8522 100644 --- a/utils/pdfinfo.cc +++ b/utils/pdfinfo.cc @@ -35,12 +35,12 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <time.h> -#include <math.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <ctime> +#include <cmath> #include <map> #include "parseargs.h" #include "printencodings.h" diff --git a/utils/pdfseparate.cc b/utils/pdfseparate.cc index e617a5c9..240022a6 100644 --- a/utils/pdfseparate.cc +++ b/utils/pdfseparate.cc @@ -17,17 +17,17 @@ //======================================================================== #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> #include "parseargs.h" #include "goo/GooString.h" #include "PDFDoc.h" #include "ErrorCodes.h" #include "GlobalParams.h" #include "Win32Console.h" -#include <ctype.h> +#include <cctype> static int firstPage = 0; static int lastPage = 0; diff --git a/utils/pdfsig.cc b/utils/pdfsig.cc index 0e5e57f6..505d72a3 100644 --- a/utils/pdfsig.cc +++ b/utils/pdfsig.cc @@ -18,11 +18,11 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> -#include <time.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> +#include <ctime> #include <hasht.h> #include <fstream> #include "parseargs.h" diff --git a/utils/pdftocairo.cc b/utils/pdftocairo.cc index 7f54e244..04b9f047 100644 --- a/utils/pdftocairo.cc +++ b/utils/pdftocairo.cc @@ -42,9 +42,9 @@ #include "config.h" #include <poppler-config.h> #include <cstdint> -#include <stdio.h> -#include <math.h> -#include <string.h> +#include <cstdio> +#include <cmath> +#include <cstring> #include "parseargs.h" #include "goo/gmem.h" #include "goo/GooString.h" diff --git a/utils/pdftohtml.cc b/utils/pdftohtml.cc index 52ed3e26..1d57501a 100644 --- a/utils/pdftohtml.cc +++ b/utils/pdftohtml.cc @@ -37,14 +37,14 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> #ifdef HAVE_DIRENT_H #include <dirent.h> #endif -#include <time.h> +#include <ctime> #include "parseargs.h" #include "goo/GooString.h" #include "goo/gbase64.h" diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc index 30966c22..aad7d8bb 100644 --- a/utils/pdftoppm.cc +++ b/utils/pdftoppm.cc @@ -42,8 +42,8 @@ #include <fcntl.h> // for O_BINARY #include <io.h> // for setmode #endif -#include <stdio.h> -#include <math.h> +#include <cstdio> +#include <cmath> #include "parseargs.h" #include "goo/gmem.h" #include "goo/GooString.h" @@ -64,7 +64,7 @@ // #define UTILS_USE_PTHREADS 1 #ifdef UTILS_USE_PTHREADS -#include <errno.h> +#include <cerrno> #include <pthread.h> #include <deque> #endif // UTILS_USE_PTHREADS diff --git a/utils/pdftops.cc b/utils/pdftops.cc index 137f9a83..a3cd70da 100644 --- a/utils/pdftops.cc +++ b/utils/pdftops.cc @@ -34,10 +34,10 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> #include "parseargs.h" #include "goo/GooString.h" #include "goo/gmem.h" diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc index c18b1483..1d366234 100644 --- a/utils/pdftotext.cc +++ b/utils/pdftotext.cc @@ -39,10 +39,10 @@ #include "config.h" #include <poppler-config.h> -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <string.h> +#include <cstdio> +#include <cstdlib> +#include <cstddef> +#include <cstring> #include "parseargs.h" #include "printencodings.h" #include "goo/GooString.h" _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
