2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

fix many typos in comments and strings

git-svn-id: svn+q:///qpdf/trunk@651 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-02-21 02:54:31 +00:00
parent 0b2288c19d
commit 91cb7c0a58
17 changed files with 31 additions and 26 deletions

View File

@ -1,5 +1,7 @@
2009-02-20 Jay Berkenbilt <ejb@ql.org>
* Fix many typos in comments and strings.
* qpdf/qpdf.cc: in --check mode, if there are warnings but no
errors, exit with a status of 3.

View File

@ -19,10 +19,10 @@
// The client is required to call finish() before destroying a
// Pipeline in order to avoid loss of data. A Pipeline class should
// not throw an exception in the destructor if this hasn't been done
// though since doing so causes too mcuh trouble when deleting
// though since doing so causes too much trouble when deleting
// pipelines during error conditions.
//
// Some pipelines are resuable (i.e., you can call write() after
// Some pipelines are reusable (i.e., you can call write() after
// calling finish() and can call finish() multiple times) while others
// are not. It is up to the caller to use a pipeline according to its
// own restrictions.

View File

@ -13,7 +13,7 @@
// accumulated so far. getBuffer() may be called only after calling
// finish() and before calling any subsequent write(). At that point,
// a dynamically allocated Buffer object is returned and the internal
// buffer is reset. The caller is responseible for deleting the
// buffer is reset. The caller is responsible for deleting the
// returned Buffer.
//
// For this pipeline, "next" may be null. If a next pointer is

View File

@ -47,7 +47,7 @@ class QPDF
void setIgnoreXRefStreams(bool);
// By default, any warnings are issued to stderr as they are
// encountered. If this is called with a true value, reporitng of
// encountered. If this is called with a true value, reporting of
// warnings is suppressed. You may still retrieve warnings by
// calling getWarnings.
void setSuppressWarnings(bool);

View File

@ -190,7 +190,7 @@ class QPDFWriter
// Calls finish on the current pipeline and pops the pipeline
// stack until the top of stack is a previous active top of stack,
// and restores the pipeline to that point. Deletes any piplines
// and restores the pipeline to that point. Deletes any pipelines
// that it pops. If the bp argument is non-null and any of the
// stack items are of type Pl_Buffer, the buffer is retrieved.
void popPipelineStack(PointerHolder<Buffer>* bp = 0);

View File

@ -58,7 +58,7 @@ Pl_QPDFTokenizer::processChar(char ch)
{
if (this->pass_through)
{
// We're not noramlizing anymore -- just write this without
// We're not normalizing anymore -- just write this without
// looking at it.
writeNext(&ch, 1);
return;
@ -79,12 +79,12 @@ Pl_QPDFTokenizer::processChar(char ch)
{
// Uh oh.... we're not sophisticated enough to handle
// inline images safely. We'd have to to set up all the
// filters and pipe the iamge data through it until the
// filters and pipe the image data through it until the
// filtered output was the right size for an image of the
// specified dimensions. Then we'd either have to write
// out raw image data or continue to write filtered data,
// resuming normalization when we get to the end.
// Insetad, for now, we'll just turn off noramlization for
// Instead, for now, we'll just turn off normalization for
// the remainder of this stream.
this->pass_through = true;
if (this->unread_char)

View File

@ -465,7 +465,7 @@ QPDF::reconstruct_xref(QPDFExc& e)
// streams.
throw QPDFExc(this->file.getName() + ": unable to find trailer "
"dictionary while recovering damanged file");
"dictionary while recovering damaged file");
}
// We could iterate through the objects looking for streams and

View File

@ -186,7 +186,7 @@ QPDFObjectHandle::getRealValue()
return dynamic_cast<QPDF_Real*>(obj.getPointer())->getVal();
}
// Name acessors
// Name accessors
std::string
QPDFObjectHandle::getName()
@ -211,7 +211,7 @@ QPDFObjectHandle::getUTF8Value()
return dynamic_cast<QPDF_String*>(obj.getPointer())->getUTF8Val();
}
// Array acessors
// Array accessors
int
QPDFObjectHandle::getArrayNItems()
@ -236,7 +236,7 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const& item)
return dynamic_cast<QPDF_Array*>(obj.getPointer())->setItem(n, item);
}
// Dictionary accesors
// Dictionary accessors
bool
QPDFObjectHandle::hasKey(std::string const& key)
@ -323,7 +323,7 @@ QPDFObjectHandle::getPageImages()
// value is null or an empty dictionary, you are supposed to walk
// up the page tree until you find a /Resources dictionary. As of
// this writing, I don't have any test files that use inherited
// resources, and hand-generating one won't be a good test beacuse
// resources, and hand-generating one won't be a good test because
// any mistakes in my understanding would be present in both the
// code and the test file.

View File

@ -259,7 +259,7 @@ QPDFTokenizer::presentCharacter(char ch)
{
if (strchr(" \t\n\v\f\r()<>[]{}/%", ch) != 0)
{
// A C-loacle whitespace character or delimiter terminates
// A C-locale whitespace character or delimiter terminates
// token. It is important to unread the whitespace
// character even though it is ignored since it may be the
// newline after a stream keyword. Removing it here could

View File

@ -160,7 +160,7 @@ QPDFWriter::setR3EncryptionParameters(
// None
// Only Document Assembly
// Only Form Field Fill-in or Signing
// Comment AUthoring, Form Field Fill-in or Signing
// Comment Authoring, Form Field Fill-in or Signing
// General Editing, Comment and Form Field Authoring
// Allowed printing menu:
@ -197,7 +197,7 @@ QPDFWriter::setR3EncryptionParameters(
switch (modify)
{
case r3m_none:
clear.insert(11); // document essembly
clear.insert(11); // document assembly
case r3m_assembly:
clear.insert(9); // filling in form fields
@ -226,7 +226,7 @@ QPDFWriter::setEncryptionParameters(
// PDF specification refers to bits with the low bit numbered 1.
// We have to convert this into a bit field.
// Specification always requirse bits 1 and 2 to be cleared.
// Specification always requires bits 1 and 2 to be cleared.
bits_to_clear.insert(1);
bits_to_clear.insert(2);
@ -754,7 +754,7 @@ QPDFWriter::unparseObject(QPDFObjectHandle object, int level,
{
// Don't filter if the stream is already compressed with
// FlateDecode. We don't want to make it worse by getting
// rid of a predictor or otherwising messing with it. We
// rid of a predictor or otherwise messing with it. We
// should also avoid messing with anything that's
// compressed with a lossy compression scheme, but we
// don't support any of those right now.

View File

@ -22,7 +22,7 @@ QPDF_Name::normalizeName(std::string const& name)
for (unsigned int i = 1; i < name.length(); ++i)
{
char ch = name[i];
// Don't use locale/ctype here; follow PDF spec guidlines.
// Don't use locale/ctype here; follow PDF spec guidelines.
if (strchr("#()<>[]{}/%", ch) || (ch < 33) || (ch > 126))
{
sprintf(num, "#%02x", (unsigned char) ch);

View File

@ -2083,7 +2083,7 @@ QPDF::generateHintStream(std::map<int, QPDFXRefEntry> const& xref,
calculateHOutline(xref, lengths, obj_renumber);
// Write the hint stream itself into a compressed memory buffer.
// Write through a couter so we can get offsets.
// Write through a counter so we can get offsets.
Pl_Buffer hint_stream("hint stream");
Pl_Flate f("compress hint stream", &hint_stream, Pl_Flate::a_deflate);
Pl_Count c("count", &f);

View File

@ -152,7 +152,7 @@ QUtil::toUTF8(unsigned long uval)
// '0' for its (n+1)th highest bit where n is the total number of
// bytes required. Subsequent bytes start with '10' and have the
// remaining 6 bits free for encoding. For example, an 11-bit
// unicode value can be stored in two bytes where the first is
// Unicode value can be stored in two bytes where the first is
// 110zzzzz, the second is 10zzzzzz, and the z's represent the
// remaining bits.

View File

@ -37,7 +37,7 @@ class MD5
// testing)
void print();
// returns the digest as a hexademical string
// returns the digest as a hexadecimal string
std::string unparse();
// Convenience functions

View File

@ -23,7 +23,7 @@ class QPDF_Dictionary: public QPDFObject
QPDFObjectHandle getKey(std::string const&);
std::set<std::string> getKeys();
// Repalce value of key, adding it if it does not exist
// Replace value of key, adding it if it does not exist
void replaceKey(std::string const& key, QPDFObjectHandle const&);
// Remove key, doing nothing if key does not exist
void removeKey(std::string const& key);

View File

@ -107,7 +107,7 @@ Values for stream data options:\n\
preserve leave all stream data as is\n\
uncompress uncompress stream data when possible\n\
\n\
Values for object strea mode:\n\
Values for object stream mode:\n\
\n\
preserve preserve original object streams (default)\n\
disable don't write any object streams\n\
@ -142,8 +142,11 @@ stream data to be written to standard output.\n\
If --filtered-stream-data is given and --normalize-content=y is also\n\
given, qpdf will attempt to normalize the stream data as if it is a\n\
page content stream. This attempt will be made even if it is not a\n\
page content stream, in which case it will produce unusuable results.\n\
page content stream, in which case it will produce unusable results.\n\
\n\
Ordinarily, qpdf exits with a status of 0 on success or a status of 2\n\
if any errors occurred. In --check mode, if there were warnings but not\n\
errors, qpdf exits with a status of 3.\n\
\n";
void usage(std::string const& msg)

View File

@ -1,4 +1,4 @@
WARNING: bad7.pdf: offset 0: file is damaged
WARNING: bad7.pdf: offset 698: expected trailer dictionary
WARNING: Attempting to reconstruct cross-reference table
bad7.pdf: unable to find trailer dictionary while recovering damanged file
bad7.pdf: unable to find trailer dictionary while recovering damaged file