node-poppler 5.1.4 → 5.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/package.json +10 -10
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Annot.h +0 -1783
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/AnnotStampImageHelper.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Array.h +0 -92
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/BBoxOutputDev.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CMap.h +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CachedFile.h +0 -149
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoFontEngine.h +0 -122
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoOutputDev.h +0 -468
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoRescaleBox.h +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Catalog.h +0 -318
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CertificateInfo.h +0 -129
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharCodeToUnicode.h +0 -143
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharTypes.h +0 -24
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlCachedFile.h +0 -37
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlPDFDocBuilder.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/DateInfo.h +0 -44
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Decrypt.h +0 -147
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Dict.h +0 -126
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Error.h +0 -59
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ErrorCodes.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FDPDFDocBuilder.h +0 -36
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FILECacheLoader.h +0 -34
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FileSpec.h +0 -85
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontEncodingTables.h +0 -20
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontInfo.h +0 -109
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Form.h +0 -734
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Function.h +0 -251
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Gfx.h +0 -373
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxFont.h +0 -466
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState.h +0 -1759
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState_helpers.h +0 -90
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GlobalParams.h +0 -221
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Hints.h +0 -91
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JArithmeticDecoder.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JBIG2Stream.h +0 -130
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JPEG2000Stream.h +0 -54
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JSInfo.h +0 -65
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Lexer.h +0 -113
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Linearization.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Link.h +0 -566
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/LocalPDFDocBuilder.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/MarkedContentOutputDev.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Movie.h +0 -123
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToCharCode.h +0 -52
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToUnicodeTable.h +0 -4300
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Object.h +0 -678
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OptionalContent.h +0 -117
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Outline.h +0 -122
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OutputDev.h +0 -379
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDoc.h +0 -419
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocBuilder.h +0 -47
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocEncoding.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocFactory.h +0 -58
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSOutputDev.h +0 -549
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSTokenizer.h +0 -47
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Page.h +0 -273
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PageTransition.h +0 -105
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Parser.h +0 -76
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PopplerCache.h +0 -65
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PreScanOutputDev.h +0 -148
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ProfileData.h +0 -35
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Rendition.h +0 -164
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SecurityHandler.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Sound.h +0 -82
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SplashOutputDev.h +0 -413
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream-CCITT.h +0 -334
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream.h +0 -1504
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructElement.h +0 -406
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructTreeRoot.h +0 -89
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/TextOutputDev.h +0 -918
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UTF.h +0 -112
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCClassTables.h +0 -983
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCompTables.h +0 -328
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeDecompTables.h +0 -7181
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMap.h +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapFuncs.h +0 -35
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapTables.h +0 -84
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeTypeTable.h +0 -49
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ViewerPreferences.h +0 -87
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/XRef.h +0 -325
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-destination.h +0 -69
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-document.h +0 -135
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-embedded-file.h +0 -55
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font-private.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font.h +0 -95
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-global.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-image.h +0 -74
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-renderer.h +0 -77
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-transition.h +0 -85
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page.h +0 -225
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-rectangle.h +0 -66
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-toc.h +0 -72
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-version.h +0 -39
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler_cpp_export.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiBase.h +0 -66
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiEncodings.h +0 -43
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiIdentifier.h +0 -52
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiTrueType.h +0 -190
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1.h +0 -70
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1C.h +0 -263
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-action.h +0 -454
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-annot.h +0 -333
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-attachment.h +0 -123
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-date.h +0 -32
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-document.h +0 -541
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-enums.h +0 -191
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-features.h +0 -88
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-form-field.h +0 -254
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-layer.h +0 -50
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-macros.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-media.h +0 -80
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-movie.h +0 -81
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-page.h +0 -424
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-structure-element.h +0 -425
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler.h +0 -259
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooCheckedOps.h +0 -116
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooLikely.h +0 -22
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooString.h +0 -262
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooTimer.h +0 -59
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/ImgWriter.h +0 -39
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/JpegWriter.h +0 -69
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/PNGWriter.h +0 -68
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/TiffWriter.h +0 -70
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gdir.h +0 -96
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gfile.h +0 -156
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gmem.h +0 -201
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/grandom.h +0 -21
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gstrtod.h +0 -45
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler-config.h +0 -155
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler_private_export.h +0 -42
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/Splash.h +0 -336
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashBitmap.h +0 -127
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashClip.h +0 -131
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashErrorCodes.h +0 -50
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFont.h +0 -71
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontEngine.h +0 -72
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontFile.h +0 -64
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFont.h +0 -116
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontEngine.h +0 -89
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFile.h +0 -98
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFileID.h +0 -40
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashGlyphBitmap.h +0 -23
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashMath.h +0 -215
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPath.h +0 -138
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPattern.h +0 -107
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashScreen.h +0 -87
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashState.h +0 -132
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashTypes.h +0 -248
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPath.h +0 -95
- package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPathScanner.h +0 -136
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-cpp.pc +0 -12
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-glib.pc +0 -12
- package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler.pc +0 -10
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-cpp.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-glib.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/lib/poppler.lib +0 -0
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfattach.1 +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfdetach.1 +0 -94
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdffonts.1 +0 -128
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfimages.1 +0 -265
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfinfo.1 +0 -198
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfseparate.1 +0 -60
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftocairo.1 +0 -346
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftohtml.1 +0 -118
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftoppm.1 +0 -230
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftops.1 +0 -267
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftotext.1 +0 -157
- package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfunite.1 +0 -43
- package/src/lib/win32/poppler-22.04.0/share/poppler/CMakeLists.txt +0 -309
- package/src/lib/win32/poppler-22.04.0/share/poppler/Makefile +0 -333
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
//========================================================================
|
|
2
|
-
//
|
|
3
|
-
// TiffWriter.h
|
|
4
|
-
//
|
|
5
|
-
// This file is licensed under the GPLv2 or later
|
|
6
|
-
//
|
|
7
|
-
// Copyright (C) 2010, 2012 William Bader <williambader@hotmail.com>
|
|
8
|
-
// Copyright (C) 2011, 2012, 2021 Albert Astals Cid <aacid@kde.org>
|
|
9
|
-
// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
|
|
10
|
-
// Copyright (C) 2012 Pino Toscano <pino@kde.org>
|
|
11
|
-
//
|
|
12
|
-
//========================================================================
|
|
13
|
-
|
|
14
|
-
#ifndef TIFFWRITER_H
|
|
15
|
-
#define TIFFWRITER_H
|
|
16
|
-
|
|
17
|
-
#include "poppler-config.h"
|
|
18
|
-
#include "poppler_private_export.h"
|
|
19
|
-
|
|
20
|
-
#ifdef ENABLE_LIBTIFF
|
|
21
|
-
|
|
22
|
-
# include <sys/types.h>
|
|
23
|
-
# include "ImgWriter.h"
|
|
24
|
-
|
|
25
|
-
struct TiffWriterPrivate;
|
|
26
|
-
|
|
27
|
-
class POPPLER_PRIVATE_EXPORT TiffWriter : public ImgWriter
|
|
28
|
-
{
|
|
29
|
-
public:
|
|
30
|
-
/* RGB - 3 bytes/pixel
|
|
31
|
-
* RGBA_PREMULTIPLIED - 4 bytes/pixel premultiplied by alpha
|
|
32
|
-
* GRAY - 1 byte/pixel
|
|
33
|
-
* MONOCHROME - 8 pixels/byte
|
|
34
|
-
* CMYK - 4 bytes/pixel
|
|
35
|
-
* RGB48 - 6 bytes/pixel
|
|
36
|
-
*/
|
|
37
|
-
enum Format
|
|
38
|
-
{
|
|
39
|
-
RGB,
|
|
40
|
-
RGBA_PREMULTIPLIED,
|
|
41
|
-
GRAY,
|
|
42
|
-
MONOCHROME,
|
|
43
|
-
CMYK,
|
|
44
|
-
RGB48
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
explicit TiffWriter(Format format = RGB);
|
|
48
|
-
~TiffWriter() override;
|
|
49
|
-
|
|
50
|
-
TiffWriter(const TiffWriter &other) = delete;
|
|
51
|
-
TiffWriter &operator=(const TiffWriter &other) = delete;
|
|
52
|
-
|
|
53
|
-
void setCompressionString(const char *compressionStringArg);
|
|
54
|
-
|
|
55
|
-
bool init(FILE *openedFile, int width, int height, int hDPI, int vDPI) override;
|
|
56
|
-
|
|
57
|
-
bool writePointers(unsigned char **rowPointers, int rowCount) override;
|
|
58
|
-
bool writeRow(unsigned char **rowData) override;
|
|
59
|
-
|
|
60
|
-
bool supportCMYK() override { return true; }
|
|
61
|
-
|
|
62
|
-
bool close() override;
|
|
63
|
-
|
|
64
|
-
private:
|
|
65
|
-
TiffWriterPrivate *priv;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
#endif
|
|
69
|
-
|
|
70
|
-
#endif
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
//========================================================================
|
|
2
|
-
//
|
|
3
|
-
// gfile.h
|
|
4
|
-
//
|
|
5
|
-
// Miscellaneous file and directory name manipulation.
|
|
6
|
-
//
|
|
7
|
-
// Copyright 1996-2003 Glyph & Cog, LLC
|
|
8
|
-
//
|
|
9
|
-
//========================================================================
|
|
10
|
-
|
|
11
|
-
//========================================================================
|
|
12
|
-
//
|
|
13
|
-
// Modified under the Poppler project - http://poppler.freedesktop.org
|
|
14
|
-
//
|
|
15
|
-
// All changes made under the Poppler project to this file are licensed
|
|
16
|
-
// under GPL version 2 or later
|
|
17
|
-
//
|
|
18
|
-
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
|
|
19
|
-
// Copyright (C) 2009, 2011, 2012, 2017, 2018, 2021, 2022 Albert Astals Cid <aacid@kde.org>
|
|
20
|
-
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
|
|
21
|
-
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
|
|
22
|
-
// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
|
|
23
|
-
// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
|
|
24
|
-
// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
25
|
-
// Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org>
|
|
26
|
-
// Copyright (C) 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
|
|
27
|
-
// Copyright (C) 2018 Mojca Miklavec <mojca@macports.org>
|
|
28
|
-
// Copyright (C) 2019 Christian Persch <chpe@src.gnome.org>
|
|
29
|
-
//
|
|
30
|
-
// To see a description of the changes please see the Changelog file that
|
|
31
|
-
// came with your tarball or type make ChangeLog if you are building from git
|
|
32
|
-
//
|
|
33
|
-
//========================================================================
|
|
34
|
-
|
|
35
|
-
#ifndef GDIR_H
|
|
36
|
-
#define GDIR_H
|
|
37
|
-
|
|
38
|
-
#include "poppler-config.h"
|
|
39
|
-
|
|
40
|
-
#include <memory>
|
|
41
|
-
|
|
42
|
-
class GooString;
|
|
43
|
-
|
|
44
|
-
#if defined(_WIN32)
|
|
45
|
-
# include <windows.h>
|
|
46
|
-
#else
|
|
47
|
-
# include <dirent.h>
|
|
48
|
-
#endif
|
|
49
|
-
|
|
50
|
-
//------------------------------------------------------------------------
|
|
51
|
-
// GDir and GDirEntry
|
|
52
|
-
//------------------------------------------------------------------------
|
|
53
|
-
|
|
54
|
-
class GDirEntry
|
|
55
|
-
{
|
|
56
|
-
public:
|
|
57
|
-
GDirEntry(const char *dirPath, const char *nameA, bool doStat);
|
|
58
|
-
~GDirEntry();
|
|
59
|
-
|
|
60
|
-
GDirEntry(const GDirEntry &other) = delete;
|
|
61
|
-
GDirEntry &operator=(const GDirEntry &other) = delete;
|
|
62
|
-
|
|
63
|
-
const GooString *getName() const { return name; }
|
|
64
|
-
const GooString *getFullPath() const { return fullPath; }
|
|
65
|
-
bool isDir() const { return dir; }
|
|
66
|
-
|
|
67
|
-
private:
|
|
68
|
-
GooString *name; // dir/file name
|
|
69
|
-
GooString *fullPath;
|
|
70
|
-
bool dir; // is it a directory?
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
class GDir
|
|
74
|
-
{
|
|
75
|
-
public:
|
|
76
|
-
explicit GDir(const char *name, bool doStatA = true);
|
|
77
|
-
~GDir();
|
|
78
|
-
|
|
79
|
-
GDir(const GDir &other) = delete;
|
|
80
|
-
GDir &operator=(const GDir &other) = delete;
|
|
81
|
-
|
|
82
|
-
std::unique_ptr<GDirEntry> getNextEntry();
|
|
83
|
-
void rewind();
|
|
84
|
-
|
|
85
|
-
private:
|
|
86
|
-
GooString *path; // directory path
|
|
87
|
-
bool doStat; // call stat() for each entry?
|
|
88
|
-
#if defined(_WIN32)
|
|
89
|
-
WIN32_FIND_DATAA ffd;
|
|
90
|
-
HANDLE hnd;
|
|
91
|
-
#else
|
|
92
|
-
DIR *dir; // the DIR structure from opendir()
|
|
93
|
-
#endif
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
#endif
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
//========================================================================
|
|
2
|
-
//
|
|
3
|
-
// gfile.h
|
|
4
|
-
//
|
|
5
|
-
// Miscellaneous file and directory name manipulation.
|
|
6
|
-
//
|
|
7
|
-
// Copyright 1996-2003 Glyph & Cog, LLC
|
|
8
|
-
//
|
|
9
|
-
//========================================================================
|
|
10
|
-
|
|
11
|
-
//========================================================================
|
|
12
|
-
//
|
|
13
|
-
// Modified under the Poppler project - http://poppler.freedesktop.org
|
|
14
|
-
//
|
|
15
|
-
// All changes made under the Poppler project to this file are licensed
|
|
16
|
-
// under GPL version 2 or later
|
|
17
|
-
//
|
|
18
|
-
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
|
|
19
|
-
// Copyright (C) 2009, 2011, 2012, 2017, 2018, 2021, 2022 Albert Astals Cid <aacid@kde.org>
|
|
20
|
-
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
|
|
21
|
-
// Copyright (C) 2013 Adam Reichold <adamreichold@myopera.com>
|
|
22
|
-
// Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
|
|
23
|
-
// Copyright (C) 2014 Bogdan Cristea <cristeab@gmail.com>
|
|
24
|
-
// Copyright (C) 2014 Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
25
|
-
// Copyright (C) 2017 Christoph Cullmann <cullmann@kde.org>
|
|
26
|
-
// Copyright (C) 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
|
|
27
|
-
// Copyright (C) 2018 Mojca Miklavec <mojca@macports.org>
|
|
28
|
-
// Copyright (C) 2019, 2021 Christian Persch <chpe@src.gnome.org>
|
|
29
|
-
//
|
|
30
|
-
// To see a description of the changes please see the Changelog file that
|
|
31
|
-
// came with your tarball or type make ChangeLog if you are building from git
|
|
32
|
-
//
|
|
33
|
-
//========================================================================
|
|
34
|
-
|
|
35
|
-
#ifndef GFILE_H
|
|
36
|
-
#define GFILE_H
|
|
37
|
-
|
|
38
|
-
#include "poppler-config.h"
|
|
39
|
-
#include "poppler_private_export.h"
|
|
40
|
-
#include <cstdio>
|
|
41
|
-
#include <cstdlib>
|
|
42
|
-
#include <cstddef>
|
|
43
|
-
#include <ctime>
|
|
44
|
-
#include <string>
|
|
45
|
-
extern "C" {
|
|
46
|
-
#if defined(_WIN32)
|
|
47
|
-
# include <sys/stat.h>
|
|
48
|
-
# ifdef FPTEX
|
|
49
|
-
# include <win32lib.h>
|
|
50
|
-
# else
|
|
51
|
-
# ifndef NOMINMAX
|
|
52
|
-
# define NOMINMAX
|
|
53
|
-
# endif
|
|
54
|
-
# include <windows.h>
|
|
55
|
-
# endif
|
|
56
|
-
#else
|
|
57
|
-
# include <unistd.h>
|
|
58
|
-
# include <sys/types.h>
|
|
59
|
-
# if defined(HAVE_DIRENT_H)
|
|
60
|
-
# include <dirent.h>
|
|
61
|
-
# define NAMLEN(d) strlen((d)->d_name)
|
|
62
|
-
# else
|
|
63
|
-
# define dirent direct
|
|
64
|
-
# define NAMLEN(d) (d)->d_namlen
|
|
65
|
-
# ifdef HAVE_SYS_NDIR_H
|
|
66
|
-
# include <sys/ndir.h>
|
|
67
|
-
# endif
|
|
68
|
-
# ifdef HAVE_SYS_DIR_H
|
|
69
|
-
# include <sys/dir.h>
|
|
70
|
-
# endif
|
|
71
|
-
# ifdef HAVE_NDIR_H
|
|
72
|
-
# include <ndir.h>
|
|
73
|
-
# endif
|
|
74
|
-
# endif
|
|
75
|
-
#endif
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
#include <memory>
|
|
79
|
-
|
|
80
|
-
class GooString;
|
|
81
|
-
|
|
82
|
-
/* Integer type for all file offsets and file sizes */
|
|
83
|
-
typedef long long Goffset;
|
|
84
|
-
|
|
85
|
-
//------------------------------------------------------------------------
|
|
86
|
-
|
|
87
|
-
// Append a file name to a path string. <path> may be an empty
|
|
88
|
-
// string, denoting the current directory). Returns <path>.
|
|
89
|
-
extern GooString POPPLER_PRIVATE_EXPORT *appendToPath(GooString *path, const char *fileName);
|
|
90
|
-
|
|
91
|
-
#ifndef _WIN32
|
|
92
|
-
// Open a file descriptor
|
|
93
|
-
// Could be implemented on WIN32 too, but the only external caller of
|
|
94
|
-
// this function is not used on WIN32
|
|
95
|
-
extern int POPPLER_PRIVATE_EXPORT openFileDescriptor(const char *path, int flags);
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
|
-
// Open a file. On Windows, this converts the path from UTF-8 to
|
|
99
|
-
// UCS-2 and calls _wfopen (if available). On other OSes, this simply
|
|
100
|
-
// calls fopen.
|
|
101
|
-
extern FILE POPPLER_PRIVATE_EXPORT *openFile(const char *path, const char *mode);
|
|
102
|
-
|
|
103
|
-
// Just like fgets, but handles Unix, Mac, and/or DOS end-of-line
|
|
104
|
-
// conventions.
|
|
105
|
-
extern char POPPLER_PRIVATE_EXPORT *getLine(char *buf, int size, FILE *f);
|
|
106
|
-
|
|
107
|
-
// Like fseek/ftell but uses platform specific variants that support large files
|
|
108
|
-
extern int POPPLER_PRIVATE_EXPORT Gfseek(FILE *f, Goffset offset, int whence);
|
|
109
|
-
extern Goffset POPPLER_PRIVATE_EXPORT Gftell(FILE *f);
|
|
110
|
-
|
|
111
|
-
// Largest offset supported by Gfseek/Gftell
|
|
112
|
-
extern Goffset GoffsetMax();
|
|
113
|
-
|
|
114
|
-
//------------------------------------------------------------------------
|
|
115
|
-
// GooFile
|
|
116
|
-
//------------------------------------------------------------------------
|
|
117
|
-
|
|
118
|
-
class POPPLER_PRIVATE_EXPORT GooFile
|
|
119
|
-
{
|
|
120
|
-
public:
|
|
121
|
-
GooFile(const GooFile &) = delete;
|
|
122
|
-
GooFile &operator=(const GooFile &other) = delete;
|
|
123
|
-
|
|
124
|
-
int read(char *buf, int n, Goffset offset) const;
|
|
125
|
-
Goffset size() const;
|
|
126
|
-
|
|
127
|
-
static std::unique_ptr<GooFile> open(const std::string &fileName);
|
|
128
|
-
#ifndef _WIN32
|
|
129
|
-
static std::unique_ptr<GooFile> open(int fdA);
|
|
130
|
-
#endif
|
|
131
|
-
|
|
132
|
-
#ifdef _WIN32
|
|
133
|
-
static std::unique_ptr<GooFile> open(const wchar_t *fileName);
|
|
134
|
-
|
|
135
|
-
~GooFile() { CloseHandle(handle); }
|
|
136
|
-
|
|
137
|
-
// Asuming than on windows you can't change files that are already open
|
|
138
|
-
bool modificationTimeChangedSinceOpen() const;
|
|
139
|
-
|
|
140
|
-
private:
|
|
141
|
-
GooFile(HANDLE handleA);
|
|
142
|
-
HANDLE handle;
|
|
143
|
-
struct _FILETIME modifiedTimeOnOpen;
|
|
144
|
-
#else
|
|
145
|
-
~GooFile() { close(fd); }
|
|
146
|
-
|
|
147
|
-
bool modificationTimeChangedSinceOpen() const;
|
|
148
|
-
|
|
149
|
-
private:
|
|
150
|
-
explicit GooFile(int fdA);
|
|
151
|
-
int fd;
|
|
152
|
-
struct timespec modifiedTimeOnOpen;
|
|
153
|
-
#endif // _WIN32
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
#endif
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* gmem.h
|
|
3
|
-
*
|
|
4
|
-
* Memory routines with out-of-memory checking.
|
|
5
|
-
*
|
|
6
|
-
* Copyright 1996-2003 Glyph & Cog, LLC
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
//========================================================================
|
|
10
|
-
//
|
|
11
|
-
// Modified under the Poppler project - http://poppler.freedesktop.org
|
|
12
|
-
//
|
|
13
|
-
// All changes made under the Poppler project to this file are licensed
|
|
14
|
-
// under GPL version 2 or later
|
|
15
|
-
//
|
|
16
|
-
// Copyright (C) 2005 Takashi Iwai <tiwai@suse.de>
|
|
17
|
-
// Copyright (C) 2007-2010, 2017, 2019 Albert Astals Cid <aacid@kde.org>
|
|
18
|
-
// Copyright (C) 2008 Jonathan Kew <jonathan_kew@sil.org>
|
|
19
|
-
// Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
|
|
20
|
-
// Copyright (C) 2021 Even Rouault <even.rouault@spatialys.com>
|
|
21
|
-
//
|
|
22
|
-
// To see a description of the changes please see the Changelog file that
|
|
23
|
-
// came with your tarball or type make ChangeLog if you are building from git
|
|
24
|
-
//
|
|
25
|
-
//========================================================================
|
|
26
|
-
|
|
27
|
-
#ifndef GMEM_H
|
|
28
|
-
#define GMEM_H
|
|
29
|
-
|
|
30
|
-
#include <cstring>
|
|
31
|
-
#include <cstdlib>
|
|
32
|
-
#include <cstdio>
|
|
33
|
-
|
|
34
|
-
#include "GooCheckedOps.h"
|
|
35
|
-
|
|
36
|
-
/// Same as malloc, but prints error message and exits if malloc() returns NULL.
|
|
37
|
-
inline void *gmalloc(size_t size, bool checkoverflow = false)
|
|
38
|
-
{
|
|
39
|
-
if (size == 0) {
|
|
40
|
-
return nullptr;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (void *p = std::malloc(size)) {
|
|
44
|
-
return p;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
std::fputs("Out of memory\n", stderr);
|
|
48
|
-
|
|
49
|
-
if (checkoverflow) {
|
|
50
|
-
return nullptr;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
std::abort();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
inline void *gmalloc_checkoverflow(size_t size)
|
|
57
|
-
{
|
|
58
|
-
return gmalloc(size, true);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/// Same as free
|
|
62
|
-
inline void gfree(void *p)
|
|
63
|
-
{
|
|
64
|
-
std::free(p);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/// Same as realloc, but prints error message and exits if realloc() returns NULL.
|
|
68
|
-
/// If <p> is NULL, calls malloc() instead of realloc().
|
|
69
|
-
inline void *grealloc(void *p, size_t size, bool checkoverflow = false)
|
|
70
|
-
{
|
|
71
|
-
if (size == 0) {
|
|
72
|
-
gfree(p);
|
|
73
|
-
return nullptr;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (void *q = p ? std::realloc(p, size) : std::malloc(size)) {
|
|
77
|
-
return q;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
std::fputs("Out of memory\n", stderr);
|
|
81
|
-
|
|
82
|
-
if (checkoverflow) {
|
|
83
|
-
return nullptr;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
std::abort();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
inline void *grealloc_checkoverflow(void *p, size_t size)
|
|
90
|
-
{
|
|
91
|
-
return grealloc(p, size, true);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
* These are similar to gmalloc and grealloc, but take an object count
|
|
96
|
-
* and size. The result is similar to allocating <count> * <size>
|
|
97
|
-
* bytes, but there is an additional error check that the total size
|
|
98
|
-
* doesn't overflow an int.
|
|
99
|
-
* The gmallocn_checkoverflow variant returns NULL instead of exiting
|
|
100
|
-
* the application if a overflow is detected.
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
inline void *gmallocn(int count, int size, bool checkoverflow = false)
|
|
104
|
-
{
|
|
105
|
-
if (count == 0) {
|
|
106
|
-
return nullptr;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
int bytes;
|
|
110
|
-
if (count < 0 || size <= 0 || checkedMultiply(count, size, &bytes)) {
|
|
111
|
-
std::fputs("Bogus memory allocation size\n", stderr);
|
|
112
|
-
|
|
113
|
-
if (checkoverflow) {
|
|
114
|
-
return nullptr;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
std::abort();
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return gmalloc(bytes, checkoverflow);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
inline void *gmallocn_checkoverflow(int count, int size)
|
|
124
|
-
{
|
|
125
|
-
return gmallocn(count, size, true);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
inline void *gmallocn3(int width, int height, int size, bool checkoverflow = false)
|
|
129
|
-
{
|
|
130
|
-
if (width == 0 || height == 0) {
|
|
131
|
-
return nullptr;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
int count;
|
|
135
|
-
int bytes;
|
|
136
|
-
if (width < 0 || height < 0 || size <= 0 || checkedMultiply(width, height, &count) || checkedMultiply(count, size, &bytes)) {
|
|
137
|
-
std::fputs("Bogus memory allocation size\n", stderr);
|
|
138
|
-
|
|
139
|
-
if (checkoverflow) {
|
|
140
|
-
return nullptr;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
std::abort();
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return gmalloc(bytes, checkoverflow);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
inline void *greallocn(void *p, int count, int size, bool checkoverflow = false, bool free_p = true)
|
|
150
|
-
{
|
|
151
|
-
if (count == 0) {
|
|
152
|
-
if (free_p) {
|
|
153
|
-
gfree(p);
|
|
154
|
-
}
|
|
155
|
-
return nullptr;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
int bytes;
|
|
159
|
-
if (count < 0 || size <= 0 || checkedMultiply(count, size, &bytes)) {
|
|
160
|
-
std::fputs("Bogus memory allocation size\n", stderr);
|
|
161
|
-
|
|
162
|
-
if (checkoverflow) {
|
|
163
|
-
if (free_p) {
|
|
164
|
-
gfree(p);
|
|
165
|
-
}
|
|
166
|
-
return nullptr;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
std::abort();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (void *q = grealloc(p, bytes, checkoverflow)) {
|
|
173
|
-
return q;
|
|
174
|
-
}
|
|
175
|
-
if (free_p) {
|
|
176
|
-
gfree(p);
|
|
177
|
-
}
|
|
178
|
-
return nullptr;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
inline void *greallocn_checkoverflow(void *p, int count, int size)
|
|
182
|
-
{
|
|
183
|
-
return greallocn(p, count, size, true);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/// Allocate memory and copy a string into it.
|
|
187
|
-
inline char *copyString(const char *s)
|
|
188
|
-
{
|
|
189
|
-
char *r = static_cast<char *>(gmalloc(std::strlen(s) + 1, false));
|
|
190
|
-
return std::strcpy(r, s);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/// Allocate memory and copy a limited-length string to it.
|
|
194
|
-
inline char *copyString(const char *s, size_t n)
|
|
195
|
-
{
|
|
196
|
-
char *r = static_cast<char *>(gmalloc(n + 1, false));
|
|
197
|
-
r[n] = '\0';
|
|
198
|
-
return std::strncpy(r, s, n);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
#endif // GMEM_H
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* grandom.h
|
|
3
|
-
*
|
|
4
|
-
* This file is licensed under the GPLv2 or later
|
|
5
|
-
*
|
|
6
|
-
* Pseudo-random number generation
|
|
7
|
-
*
|
|
8
|
-
* Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
|
|
9
|
-
* Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
#ifndef GRANDOM_H
|
|
13
|
-
#define GRANDOM_H
|
|
14
|
-
|
|
15
|
-
/// Fills the given buffer with random bytes
|
|
16
|
-
void grandom_fill(unsigned char *buff, int size);
|
|
17
|
-
|
|
18
|
-
/// Returns a random number in [0,1)
|
|
19
|
-
double grandom_double();
|
|
20
|
-
|
|
21
|
-
#endif
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/* This file is part of Libspectre.
|
|
2
|
-
*
|
|
3
|
-
* Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
|
|
4
|
-
* Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
|
|
5
|
-
*
|
|
6
|
-
* Libspectre is free software; you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation; either version 2, or (at your option)
|
|
9
|
-
* any later version.
|
|
10
|
-
*
|
|
11
|
-
* Libspectre is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program; if not, write to the Free Software
|
|
18
|
-
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/* This function comes from spectre-utils from libspectre */
|
|
22
|
-
|
|
23
|
-
#ifndef GSTRTOD_H
|
|
24
|
-
#define GSTRTOD_H
|
|
25
|
-
|
|
26
|
-
#include "poppler_private_export.h"
|
|
27
|
-
|
|
28
|
-
#ifdef __cplusplus
|
|
29
|
-
extern "C" {
|
|
30
|
-
#endif
|
|
31
|
-
|
|
32
|
-
/* This function behaves like the standard atof()/(strtod() function
|
|
33
|
-
* does in the C locale. It does this without actually changing
|
|
34
|
-
* the current locale, since that would not be thread-safe.
|
|
35
|
-
* A limitation of the implementation is that this function
|
|
36
|
-
* will still accept localized versions of infinities and NANs.
|
|
37
|
-
*/
|
|
38
|
-
double POPPLER_PRIVATE_EXPORT gatof(const char *nptr);
|
|
39
|
-
double gstrtod(const char *nptr, char **endptr);
|
|
40
|
-
|
|
41
|
-
#ifdef __cplusplus
|
|
42
|
-
}
|
|
43
|
-
#endif
|
|
44
|
-
|
|
45
|
-
#endif
|