Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
a8489fda
Commit
a8489fda
authored
Apr 28, 2011
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
18a0e706
ff7ebdd2
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
378 additions
and
1799 deletions
+378
-1799
README.txt
thirdparty/xpdf/README.txt
+3
-2
aconf.h
thirdparty/xpdf/xpdf-3.02/aconf.h
+0
-116
config.status
thirdparty/xpdf/xpdf-3.02/config.status
+0
-967
FoFiType1.cc
thirdparty/xpdf/xpdf-3.02/fofi/FoFiType1.cc
+1
-1
gfile.cc
thirdparty/xpdf/xpdf-3.02/goo/gfile.cc
+24
-24
gmem.cc
thirdparty/xpdf/xpdf-3.02/goo/gmem.cc
+4
-36
Splash.cc
thirdparty/xpdf/xpdf-3.02/splash/Splash.cc
+3
-10
SplashBitmap.cc
thirdparty/xpdf/xpdf-3.02/splash/SplashBitmap.cc
+8
-27
SplashErrorCodes.h
thirdparty/xpdf/xpdf-3.02/splash/SplashErrorCodes.h
+0
-2
Gfx.cc
thirdparty/xpdf/xpdf-3.02/xpdf/Gfx.cc
+0
-2
JBIG2Stream.cc
thirdparty/xpdf/xpdf-3.02/xpdf/JBIG2Stream.cc
+143
-335
JBIG2Stream.h
thirdparty/xpdf/xpdf-3.02/xpdf/JBIG2Stream.h
+0
-4
PSOutputDev.cc
thirdparty/xpdf/xpdf-3.02/xpdf/PSOutputDev.cc
+1
-1
Stream.cc
thirdparty/xpdf/xpdf-3.02/xpdf/Stream.cc
+186
-249
Stream.h
thirdparty/xpdf/xpdf-3.02/xpdf/Stream.h
+4
-6
XRef.cc
thirdparty/xpdf/xpdf-3.02/xpdf/XRef.cc
+1
-17
No files found.
thirdparty/xpdf/README.txt
View file @
a8489fda
...
...
@@ -7,8 +7,9 @@ instructions for version 3.02
- Decompress xpdf-3.02.xx.tar.gz
Windows:
- Copy aconf-win32.h to aconf.h
- undefine unicode API support by adding '#undef UNICODE' aconf.h
- using cywin run ./configure
- run qmake xpdf.pro -r -spec win32-g++
- run make
OSX:
- run ./configure (may need extrea options ?)
...
...
thirdparty/xpdf/xpdf-3.02/aconf.h
deleted
100644 → 0
View file @
18a0e706
/* aconf.h. Generated by configure. */
/*
* aconf.h
*
* Copyright 2002-2003 Glyph & Cog, LLC
*/
#ifndef ACONF_H
#define ACONF_H
#include <aconf2.h>
/*
* Use A4 paper size instead of Letter for PostScript output.
*/
/* #undef A4_PAPER */
/*
* Do not allow text selection.
*/
/* #undef NO_TEXT_SELECT */
/*
* Include support for OPI comments.
*/
/* #undef OPI_SUPPORT */
/*
* Enable multithreading support.
*/
/* #undef MULTITHREADED */
/*
* Enable C++ exceptions.
*/
/* #undef USE_EXCEPTIONS */
/*
* Enable word list support.
*/
/* #undef TEXTOUT_WORD_LIST */
/*
* Use fixed point (instead of floating point) arithmetic.
*/
/* #undef USE_FIXEDPOINT */
/*
* Directory with the Xpdf app-defaults file.
*/
/* #undef APPDEFDIR */
/*
* Full path for the system-wide xpdfrc file.
*/
#define SYSTEM_XPDFRC "/usr/local/etc/xpdfrc"
/*
* Various include files and functions.
*/
#define HAVE_DIRENT_H 1
/* #undef HAVE_SYS_NDIR_H */
/* #undef HAVE_SYS_DIR_H */
/* #undef HAVE_NDIR_H */
/* #undef HAVE_SYS_SELECT_H */
/* #undef HAVE_SYS_BSDTYPES_H */
#define HAVE_STRINGS_H 1
/* #undef HAVE_BSTRING_H */
#define HAVE_POPEN 1
#define HAVE_MKSTEMP 1
#define HAVE_MKSTEMPS 1
/* #undef SELECT_TAKES_INT */
#define HAVE_FSEEKO 1
/* #undef HAVE_FSEEK64 */
#define _FILE_OFFSET_BITS 64
/* #undef _LARGE_FILES */
/* #undef _LARGEFILE_SOURCE */
#define HAVE_XTAPPSETEXITFLAG 1
/*
* This is defined if using libXpm.
*/
#define HAVE_X11_XPM_H 1
/*
* This is defined if using t1lib.
*/
/* #undef HAVE_T1LIB_H */
/*
* One of these is defined if using FreeType 2.
*/
/* #undef HAVE_FREETYPE_H */
/* #undef HAVE_FREETYPE_FREETYPE_H */
/*
* This is defined if using libpaper.
*/
/* #undef HAVE_PAPER_H */
/*
* Enable support for loading plugins.
*/
/* #undef ENABLE_PLUGINS */
/*
* Defined if the Splash library is avaiable.
*/
/* #undef HAVE_SPLASH */
/*
* Enable support for CMYK output.
*/
/* #undef SPLASH_CMYK */
#endif
thirdparty/xpdf/xpdf-3.02/config.status
deleted
100755 → 0
View file @
18a0e706
This diff is collapsed.
Click to expand it.
thirdparty/xpdf/xpdf-3.02/fofi/FoFiType1.cc
View file @
a8489fda
...
...
@@ -224,7 +224,7 @@ void FoFiType1::parse() {
code
=
code
*
8
+
(
*
p2
-
'0'
);
}
}
if
(
code
>=
0
&&
code
<
256
)
{
if
(
code
<
256
)
{
for
(
p
=
p2
;
*
p
==
' '
||
*
p
==
'\t'
;
++
p
)
;
if
(
*
p
==
'/'
)
{
++
p
;
...
...
thirdparty/xpdf/xpdf-3.02/goo/gfile.cc
View file @
a8489fda
...
...
@@ -118,7 +118,7 @@ GString *appendToPath(GString *path, char *fileName) {
if
(
*
p1
==
']'
)
{
for
(
p2
=
p1
;
p2
>
p0
&&
*
p2
!=
'.'
&&
*
p2
!=
'['
;
--
p2
)
;
if
(
*
p2
==
'['
)
++
p2
;
++
p2
;
path
->
del
(
p2
-
p0
,
p1
-
p2
);
}
else
if
(
*
p1
==
':'
)
{
path
->
append
(
"[-]"
);
...
...
@@ -206,21 +206,21 @@ GString *appendToPath(GString *path, char *fileName) {
if
(
!
strcmp
(
fileName
,
".."
))
{
for
(
i
=
path
->
getLength
()
-
2
;
i
>=
0
;
--
i
)
{
if
(
path
->
getChar
(
i
)
==
'/'
||
path
->
getChar
(
i
)
==
'\\'
||
path
->
getChar
(
i
)
==
':'
)
break
;
path
->
getChar
(
i
)
==
':'
)
break
;
}
if
(
i
<=
0
)
{
if
(
path
->
getChar
(
0
)
==
'/'
||
path
->
getChar
(
0
)
==
'\\'
)
{
path
->
del
(
1
,
path
->
getLength
()
-
1
);
path
->
del
(
1
,
path
->
getLength
()
-
1
);
}
else
if
(
path
->
getLength
()
>=
2
&&
path
->
getChar
(
1
)
==
':'
)
{
path
->
del
(
2
,
path
->
getLength
()
-
2
);
path
->
del
(
2
,
path
->
getLength
()
-
2
);
}
else
{
path
->
clear
();
path
->
append
(
".."
);
path
->
clear
();
path
->
append
(
".."
);
}
}
else
{
if
(
path
->
getChar
(
i
-
1
)
==
':'
)
++
i
;
++
i
;
path
->
del
(
i
,
path
->
getLength
()
-
i
);
}
return
path
;
...
...
@@ -246,14 +246,14 @@ GString *appendToPath(GString *path, char *fileName) {
if
(
!
strcmp
(
fileName
,
".."
))
{
for
(
i
=
path
->
getLength
()
-
2
;
i
>=
0
;
--
i
)
{
if
(
path
->
getChar
(
i
)
==
'/'
)
break
;
break
;
}
if
(
i
<=
0
)
{
if
(
path
->
getChar
(
0
)
==
'/'
)
{
path
->
del
(
1
,
path
->
getLength
()
-
1
);
path
->
del
(
1
,
path
->
getLength
()
-
1
);
}
else
{
path
->
clear
();
path
->
append
(
".."
);
path
->
clear
();
path
->
append
(
".."
);
}
}
else
{
path
->
del
(
i
,
path
->
getLength
()
-
i
);
...
...
@@ -323,7 +323,7 @@ GBool isAbsolutePath(char *path) {
#ifdef VMS
//---------- VMS ----------
return
strchr
(
path
,
':'
)
||
(
path
[
0
]
==
'['
&&
path
[
1
]
!=
'.'
&&
path
[
1
]
!=
'-'
);
(
path
[
0
]
==
'['
&&
path
[
1
]
!=
'.'
&&
path
[
1
]
!=
'-'
);
#elif defined(__EMX__) || defined(WIN32)
//---------- OS/2+EMX and Win32 ----------
...
...
@@ -390,9 +390,9 @@ GString *makePathAbsolute(GString *path) {
if
(
path
->
getChar
(
0
)
==
'~'
)
{
if
(
path
->
getChar
(
1
)
==
'/'
||
#ifdef __EMX__
path
->
getChar
(
1
)
==
'\\'
||
path
->
getChar
(
1
)
==
'\\'
||
#endif
path
->
getLength
()
==
1
)
{
path
->
getLength
()
==
1
)
{
path
->
del
(
0
,
1
);
s
=
getHomeDir
();
path
->
insert
(
0
,
s
);
...
...
@@ -405,12 +405,12 @@ GString *makePathAbsolute(GString *path) {
for
(
p2
=
p1
;
*
p2
&&
*
p2
!=
'/'
;
++
p2
)
;
#endif
if
((
n
=
p2
-
p1
)
>
PATH_MAX
)
n
=
PATH_MAX
;
n
=
PATH_MAX
;
strncpy
(
buf
,
p1
,
n
);
buf
[
n
]
=
'\0'
;
if
((
pw
=
getpwnam
(
buf
)))
{
path
->
del
(
0
,
p2
-
p1
+
1
);
path
->
insert
(
0
,
pw
->
pw_dir
);
path
->
del
(
0
,
p2
-
p1
+
1
);
path
->
insert
(
0
,
pw
->
pw_dir
);
}
}
}
else
if
(
!
isAbsolutePath
(
path
->
getCString
()))
{
...
...
@@ -467,9 +467,9 @@ GBool openTempFile(GString **name, FILE **f, char *mode, char *ext) {
}
if
(
!
(
f2
=
fopen
(
s2
->
getCString
(),
"r"
)))
{
if
(
!
(
f2
=
fopen
(
s2
->
getCString
(),
mode
)))
{
delete
s2
;
delete
s
;
return
gFalse
;
delete
s2
;
delete
s
;
return
gFalse
;
}
*
name
=
s2
;
*
f
=
f2
;
...
...
@@ -571,9 +571,9 @@ char *getLine(char *buf, int size, FILE *f) {
if
(
c
==
'\x0d'
)
{
c
=
fgetc
(
f
);
if
(
c
==
'\x0a'
&&
i
<
size
-
1
)
{
buf
[
i
++
]
=
(
char
)
c
;
buf
[
i
++
]
=
(
char
)
c
;
}
else
if
(
c
!=
EOF
)
{
ungetc
(
c
,
f
);
ungetc
(
c
,
f
);
}
break
;
}
...
...
@@ -606,7 +606,7 @@ GDirEntry::GDirEntry(char *dirPath, char *nameA, GBool doStat) {
if
(
doStat
)
{
#ifdef VMS
if
(
!
strcmp
(
nameA
,
"-"
)
||
((
p
=
strrchr
(
nameA
,
'.'
))
&&
!
strncmp
(
p
,
".DIR;"
,
5
)))
((
p
=
strrchr
(
nameA
,
'.'
))
&&
!
strncmp
(
p
,
".DIR;"
,
5
)))
dir
=
gTrue
;
#elif defined(ACORN)
#else
...
...
thirdparty/xpdf/xpdf-3.02/goo/gmem.cc
View file @
a8489fda
...
...
@@ -55,15 +55,7 @@ void *gmalloc(int size) GMEM_EXCEP {
void
*
data
;
unsigned
long
*
trl
,
*
p
;
if
(
size
<
0
)
{
#if USE_EXCEPTIONS
throw
GMemException
();
#else
fprintf
(
stderr
,
"Invalid memory allocation size
\n
"
);
exit
(
1
);
#endif
}
if
(
size
==
0
)
{
if
(
size
<=
0
)
{
return
NULL
;
}
size1
=
gMemDataSize
(
size
);
...
...
@@ -99,15 +91,7 @@ void *gmalloc(int size) GMEM_EXCEP {
#else
void
*
p
;
if
(
size
<
0
)
{
#if USE_EXCEPTIONS
throw
GMemException
();
#else
fprintf
(
stderr
,
"Invalid memory allocation size
\n
"
);
exit
(
1
);
#endif
}
if
(
size
==
0
)
{
if
(
size
<=
0
)
{
return
NULL
;
}
if
(
!
(
p
=
malloc
(
size
)))
{
...
...
@@ -128,15 +112,7 @@ void *grealloc(void *p, int size) GMEM_EXCEP {
void
*
q
;
int
oldSize
;
if
(
size
<
0
)
{
#if USE_EXCEPTIONS
throw
GMemException
();
#else
fprintf
(
stderr
,
"Invalid memory allocation size
\n
"
);
exit
(
1
);
#endif
}
if
(
size
==
0
)
{
if
(
size
<=
0
)
{
if
(
p
)
{
gfree
(
p
);
}
...
...
@@ -155,15 +131,7 @@ void *grealloc(void *p, int size) GMEM_EXCEP {
#else
void
*
q
;
if
(
size
<
0
)
{
#if USE_EXCEPTIONS
throw
GMemException
();
#else
fprintf
(
stderr
,
"Invalid memory allocation size
\n
"
);
exit
(
1
);
#endif
}
if
(
size
==
0
)
{
if
(
size
<=
0
)
{
if
(
p
)
{
free
(
p
);
}
...
...
thirdparty/xpdf/xpdf-3.02/splash/Splash.cc
View file @
a8489fda
...
...
@@ -12,7 +12,6 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include "gmem.h"
#include "SplashErrorCodes.h"
#include "SplashMath.h"
...
...
@@ -1913,10 +1912,7 @@ SplashError Splash::fillImageMask(SplashImageMaskSource src, void *srcData,
xq
=
w
%
scaledWidth
;
// allocate pixel buffer
if
(
yp
<
0
||
yp
>
INT_MAX
-
1
)
{
return
splashErrBadArg
;
}
pixBuf
=
(
SplashColorPtr
)
gmallocn
(
yp
+
1
,
w
);
pixBuf
=
(
SplashColorPtr
)
gmalloc
((
yp
+
1
)
*
w
);
// initialize the pixel pipe
pipeInit
(
&
pipe
,
0
,
0
,
state
->
fillPattern
,
NULL
,
state
->
fillAlpha
,
...
...
@@ -2212,12 +2208,9 @@ SplashError Splash::drawImage(SplashImageSource src, void *srcData,
xq
=
w
%
scaledWidth
;
// allocate pixel buffers
if
(
yp
<
0
||
yp
>
INT_MAX
-
1
||
w
>
INT_MAX
/
nComps
)
{
return
splashErrBadArg
;
}
colorBuf
=
(
SplashColorPtr
)
gmallocn
(
yp
+
1
,
w
*
nComps
);
colorBuf
=
(
SplashColorPtr
)
gmalloc
((
yp
+
1
)
*
w
*
nComps
);
if
(
srcAlpha
)
{
alphaBuf
=
(
Guchar
*
)
gmalloc
n
(
yp
+
1
,
w
);
alphaBuf
=
(
Guchar
*
)
gmalloc
((
yp
+
1
)
*
w
);
}
else
{
alphaBuf
=
NULL
;
}
...
...
thirdparty/xpdf/xpdf-3.02/splash/SplashBitmap.cc
View file @
a8489fda
...
...
@@ -11,7 +11,6 @@
#endif
#include <stdio.h>
#include <limits.h>
#include "gmem.h"
#include "SplashErrorCodes.h"
#include "SplashBitmap.h"
...
...
@@ -28,48 +27,30 @@ SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPad,
mode
=
modeA
;
switch
(
mode
)
{
case
splashModeMono1
:
if
(
width
>
0
)
{
rowSize
=
(
width
+
7
)
>>
3
;
}
else
{
rowSize
=
-
1
;
}
rowSize
=
(
width
+
7
)
>>
3
;
break
;
case
splashModeMono8
:
if
(
width
>
0
)
{
rowSize
=
width
;
}
else
{
rowSize
=
-
1
;
}
rowSize
=
width
;
break
;
case
splashModeRGB8
:
case
splashModeBGR8
:
if
(
width
>
0
&&
width
<=
INT_MAX
/
3
)
{
rowSize
=
width
*
3
;
}
else
{
rowSize
=
-
1
;
}
rowSize
=
width
*
3
;
break
;
#if SPLASH_CMYK
case
splashModeCMYK8
:
if
(
width
>
0
&&
width
<=
INT_MAX
/
4
)
{
rowSize
=
width
*
4
;
}
else
{
rowSize
=
-
1
;
}
rowSize
=
width
*
4
;
break
;
#endif
}
if
(
rowSize
>
0
)
{
rowSize
+=
rowPad
-
1
;
rowSize
-=
rowSize
%
rowPad
;
}
data
=
(
SplashColorPtr
)
gmallocn
(
height
,
rowSize
);
rowSize
+=
rowPad
-
1
;
rowSize
-=
rowSize
%
rowPad
;
data
=
(
SplashColorPtr
)
gmalloc
(
rowSize
*
height
);
if
(
!
topDown
)
{
data
+=
(
height
-
1
)
*
rowSize
;
rowSize
=
-
rowSize
;
}
if
(
alphaA
)
{
alpha
=
(
Guchar
*
)
gmalloc
n
(
width
,
height
);
alpha
=
(
Guchar
*
)
gmalloc
(
width
*
height
);
}
else
{
alpha
=
NULL
;
}
...
...
thirdparty/xpdf/xpdf-3.02/splash/SplashErrorCodes.h
View file @
a8489fda
...
...
@@ -29,6 +29,4 @@
#define splashErrSingularMatrix 8 // matrix is singular
#define splashErrBadArg 9 // bad argument
#endif
thirdparty/xpdf/xpdf-3.02/xpdf/Gfx.cc
View file @
a8489fda
...
...
@@ -461,7 +461,6 @@ Gfx::Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict,
baseMatrix
[
i
]
=
state
->
getCTM
()[
i
];
}
formDepth
=
0
;
parser
=
NULL
;
abortCheckCbk
=
abortCheckCbkA
;
abortCheckCbkData
=
abortCheckCbkDataA
;
...
...
@@ -501,7 +500,6 @@ Gfx::Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict,
baseMatrix
[
i
]
=
state
->
getCTM
()[
i
];
}
formDepth
=
0
;
parser
=
NULL
;
abortCheckCbk
=
abortCheckCbkA
;
abortCheckCbkData
=
abortCheckCbkDataA
;
...
...
thirdparty/xpdf/xpdf-3.02/xpdf/JBIG2Stream.cc
View file @
a8489fda
This diff is collapsed.
Click to expand it.
thirdparty/xpdf/xpdf-3.02/xpdf/JBIG2Stream.h
View file @
a8489fda
...
...
@@ -78,10 +78,6 @@ private:
Guint
*
refSegs
,
Guint
nRefSegs
);
void
readGenericRegionSeg
(
Guint
segNum
,
GBool
imm
,
GBool
lossless
,
Guint
length
);
void
mmrAddPixels
(
int
a1
,
int
blackPixels
,
int
*
codingLine
,
int
*
a0i
,
int
w
);
void
mmrAddPixelsNeg
(
int
a1
,
int
blackPixels
,
int
*
codingLine
,
int
*
a0i
,
int
w
);
JBIG2Bitmap
*
readGenericBitmap
(
GBool
mmr
,
int
w
,
int
h
,
int
templ
,
GBool
tpgdOn
,
GBool
useSkip
,
JBIG2Bitmap
*
skip
,
...
...
thirdparty/xpdf/xpdf-3.02/xpdf/PSOutputDev.cc
View file @
a8489fda
...
...
@@ -4301,7 +4301,7 @@ void PSOutputDev::doImageL1Sep(GfxImageColorMap *colorMap,
width
,
-
height
,
height
);
// allocate a line buffer
lineBuf
=
(
Guchar
*
)
gmalloc
n
(
width
,
4
);
lineBuf
=
(
Guchar
*
)
gmalloc
(
4
*
width
);
// set up to process the data stream
imgStr
=
new
ImageStream
(
str
,
width
,
colorMap
->
getNumPixelComps
(),
...
...
thirdparty/xpdf/xpdf-3.02/xpdf/Stream.cc
View file @
a8489fda
This diff is collapsed.
Click to expand it.
thirdparty/xpdf/xpdf-3.02/xpdf/Stream.h
View file @
a8489fda
...
...
@@ -528,15 +528,13 @@ private:
int
row
;
// current row
int
inputBuf
;
// input buffer
int
inputBits
;
// number of bits in input buffer
int
*
codingLine
;
// coding
line changing elements
int
*
refLine
;
// reference line changing elements
int
a0i
;
// index into codingLine
GBool
err
;
// error on current l
ine
short
*
refLine
;
// reference
line changing elements
int
b1
;
// index into refLine
short
*
codingLine
;
// coding line changing elements
int
a0
;
// index into codingL
ine
int
outputBits
;
// remaining ouput bits
int
buf
;
// character buffer
void
addPixels
(
int
a1
,
int
black
);
void
addPixelsNeg
(
int
a1
,
int
black
);
short
getTwoDimCode
();
short
getWhiteCode
();
short
getBlackCode
();
...
...
thirdparty/xpdf/xpdf-3.02/xpdf/XRef.cc
View file @
a8489fda
...
...
@@ -52,8 +52,6 @@ public:
// generation 0.
ObjectStream
(
XRef
*
xref
,
int
objStrNumA
);
GBool
isOk
()
{
return
ok
;
}
~
ObjectStream
();
// Return the object number of this object stream.
...
...
@@ -69,7 +67,6 @@ private:
int
nObjects
;
// number of objects in the stream
Object
*
objs
;
// the objects (length = nObjects)
int
*
objNums
;
// the object numbers (length = nObjects)
GBool
ok
;
};
ObjectStream
::
ObjectStream
(
XRef
*
xref
,
int
objStrNumA
)
{
...
...
@@ -83,7 +80,6 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
nObjects
=
0
;
objs
=
NULL
;
objNums
=
NULL
;
ok
=
gFalse
;
if
(
!
xref
->
fetch
(
objStrNum
,
0
,
&
objStr
)
->
isStream
())
{
goto
err1
;
...
...
@@ -109,13 +105,6 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
goto
err1
;
}
// this is an arbitrary limit to avoid integer overflow problems
// in the 'new Object[nObjects]' call (Acrobat apparently limits
// object streams to 100-200 objects)
if
(
nObjects
>
1000000
)
{
error
(
-
1
,
"Too many objects in an object stream"
);
goto
err1
;
}
objs
=
new
Object
[
nObjects
];
objNums
=
(
int
*
)
gmallocn
(
nObjects
,
sizeof
(
int
));
offsets
=
(
int
*
)
gmallocn
(
nObjects
,
sizeof
(
int
));
...
...
@@ -172,10 +161,10 @@ ObjectStream::ObjectStream(XRef *xref, int objStrNumA) {
}
gfree
(
offsets
);
ok
=
gTrue
;
err1
:
objStr
.
free
();
return
;
}
ObjectStream
::~
ObjectStream
()
{
...
...
@@ -848,11 +837,6 @@ Object *XRef::fetch(int num, int gen, Object *obj) {
delete
objStr
;
}
objStr
=
new
ObjectStream
(
this
,
e
->
offset
);
if
(
!
objStr
->
isOk
())
{
delete
objStr
;
objStr
=
NULL
;
goto
err
;
}
}
objStr
->
getObject
(
e
->
gen
,
num
,
obj
);
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment