Commit 2c704b99a100728e35f1c78a37d686c5e2149b08
Committed by
Jay Berkenbilt
1 parent
2efec4ce
Undefined functions because of missing std:: or header. (#295)
* [bcc32 Error] QPDF.cc(375): E2268 Call to undefined function 'atof'
Full parser context
QPDF.cc(358): parsing: void QPDF::parse(const char *)
* [bcc32 Error] QPDFTokenizer.cc(183): E2268 Call to undefined function 'strtol'
Full parser context
QPDFTokenizer.cc(163): parsing: void QPDFTokenizer::resolveLiteral()
* [bcc32 Error] pdf-split-pages.cc(52): E2268 Call to undefined function 'exit'
Full parser context
pdf-split-pages.cc(50): parsing: void usage()
* PR #295: Including "cstdlib" should be replaced with "stdlib.h" to be more consistent. At the same time I changed the order of the surrounding includes to reflect alphabetical order, because at some files this already have been the case.
Showing
5 changed files
with
8 additions
and
6 deletions
examples/pdf-split-pages.cc
| @@ -8,9 +8,10 @@ | @@ -8,9 +8,10 @@ | ||
| 8 | #include <qpdf/QPDFPageDocumentHelper.hh> | 8 | #include <qpdf/QPDFPageDocumentHelper.hh> |
| 9 | #include <qpdf/QPDFWriter.hh> | 9 | #include <qpdf/QPDFWriter.hh> |
| 10 | #include <qpdf/QUtil.hh> | 10 | #include <qpdf/QUtil.hh> |
| 11 | -#include <string> | 11 | + |
| 12 | #include <iostream> | 12 | #include <iostream> |
| 13 | -#include <cstdlib> | 13 | +#include <stdlib.h> |
| 14 | +#include <string> | ||
| 14 | 15 | ||
| 15 | static char const* whoami = 0; | 16 | static char const* whoami = 0; |
| 16 | static bool static_id = false; | 17 | static bool static_id = false; |
ispell-words
libqpdf/Pl_DCT.cc
| @@ -2,10 +2,11 @@ | @@ -2,10 +2,11 @@ | ||
| 2 | 2 | ||
| 3 | #include <qpdf/QUtil.hh> | 3 | #include <qpdf/QUtil.hh> |
| 4 | #include <qpdf/QTC.hh> | 4 | #include <qpdf/QTC.hh> |
| 5 | + | ||
| 5 | #include <setjmp.h> | 6 | #include <setjmp.h> |
| 6 | -#include <string> | ||
| 7 | #include <stdexcept> | 7 | #include <stdexcept> |
| 8 | -#include <cstdlib> | 8 | +#include <stdlib.h> |
| 9 | +#include <string> | ||
| 9 | 10 | ||
| 10 | #if BITS_IN_JSAMPLE != 8 | 11 | #if BITS_IN_JSAMPLE != 8 |
| 11 | # error "qpdf does not support libjpeg built with BITS_IN_JSAMPLE != 8" | 12 | # error "qpdf does not support libjpeg built with BITS_IN_JSAMPLE != 8" |
libqpdf/QPDF.cc
libqpdf/QPDFTokenizer.cc
| @@ -10,8 +10,8 @@ | @@ -10,8 +10,8 @@ | ||
| 10 | #include <qpdf/QPDFObjectHandle.hh> | 10 | #include <qpdf/QPDFObjectHandle.hh> |
| 11 | 11 | ||
| 12 | #include <stdexcept> | 12 | #include <stdexcept> |
| 13 | +#include <stdlib.h> | ||
| 13 | #include <string.h> | 14 | #include <string.h> |
| 14 | -#include <cstdlib> | ||
| 15 | 15 | ||
| 16 | static bool is_delimiter(char ch) | 16 | static bool is_delimiter(char ch) |
| 17 | { | 17 | { |