Commit 91cb7c0a585ccaf8eab389da9f7351534440ee56

Authored by Jay Berkenbilt
1 parent 0b2288c1

fix many typos in comments and strings

git-svn-id: svn+q:///qpdf/trunk@651 71b93d88-0707-0410-a8cf-f5a4172ac649
ChangeLog
1 1 2009-02-20 Jay Berkenbilt <ejb@ql.org>
2 2  
  3 + * Fix many typos in comments and strings.
  4 +
3 5 * qpdf/qpdf.cc: in --check mode, if there are warnings but no
4 6 errors, exit with a status of 3.
5 7  
... ...
include/qpdf/Pipeline.hh
... ... @@ -19,10 +19,10 @@
19 19 // The client is required to call finish() before destroying a
20 20 // Pipeline in order to avoid loss of data. A Pipeline class should
21 21 // not throw an exception in the destructor if this hasn't been done
22   -// though since doing so causes too mcuh trouble when deleting
  22 +// though since doing so causes too much trouble when deleting
23 23 // pipelines during error conditions.
24 24 //
25   -// Some pipelines are resuable (i.e., you can call write() after
  25 +// Some pipelines are reusable (i.e., you can call write() after
26 26 // calling finish() and can call finish() multiple times) while others
27 27 // are not. It is up to the caller to use a pipeline according to its
28 28 // own restrictions.
... ...
include/qpdf/Pl_Buffer.hh
... ... @@ -13,7 +13,7 @@
13 13 // accumulated so far. getBuffer() may be called only after calling
14 14 // finish() and before calling any subsequent write(). At that point,
15 15 // a dynamically allocated Buffer object is returned and the internal
16   -// buffer is reset. The caller is responseible for deleting the
  16 +// buffer is reset. The caller is responsible for deleting the
17 17 // returned Buffer.
18 18 //
19 19 // For this pipeline, "next" may be null. If a next pointer is
... ...
include/qpdf/QPDF.hh
... ... @@ -47,7 +47,7 @@ class QPDF
47 47 void setIgnoreXRefStreams(bool);
48 48  
49 49 // By default, any warnings are issued to stderr as they are
50   - // encountered. If this is called with a true value, reporitng of
  50 + // encountered. If this is called with a true value, reporting of
51 51 // warnings is suppressed. You may still retrieve warnings by
52 52 // calling getWarnings.
53 53 void setSuppressWarnings(bool);
... ...
include/qpdf/QPDFWriter.hh
... ... @@ -190,7 +190,7 @@ class QPDFWriter
190 190  
191 191 // Calls finish on the current pipeline and pops the pipeline
192 192 // stack until the top of stack is a previous active top of stack,
193   - // and restores the pipeline to that point. Deletes any piplines
  193 + // and restores the pipeline to that point. Deletes any pipelines
194 194 // that it pops. If the bp argument is non-null and any of the
195 195 // stack items are of type Pl_Buffer, the buffer is retrieved.
196 196 void popPipelineStack(PointerHolder<Buffer>* bp = 0);
... ...
libqpdf/Pl_QPDFTokenizer.cc
... ... @@ -58,7 +58,7 @@ Pl_QPDFTokenizer::processChar(char ch)
58 58 {
59 59 if (this->pass_through)
60 60 {
61   - // We're not noramlizing anymore -- just write this without
  61 + // We're not normalizing anymore -- just write this without
62 62 // looking at it.
63 63 writeNext(&ch, 1);
64 64 return;
... ... @@ -79,12 +79,12 @@ Pl_QPDFTokenizer::processChar(char ch)
79 79 {
80 80 // Uh oh.... we're not sophisticated enough to handle
81 81 // inline images safely. We'd have to to set up all the
82   - // filters and pipe the iamge data through it until the
  82 + // filters and pipe the image data through it until the
83 83 // filtered output was the right size for an image of the
84 84 // specified dimensions. Then we'd either have to write
85 85 // out raw image data or continue to write filtered data,
86 86 // resuming normalization when we get to the end.
87   - // Insetad, for now, we'll just turn off noramlization for
  87 + // Instead, for now, we'll just turn off normalization for
88 88 // the remainder of this stream.
89 89 this->pass_through = true;
90 90 if (this->unread_char)
... ...
libqpdf/QPDF.cc
... ... @@ -465,7 +465,7 @@ QPDF::reconstruct_xref(QPDFExc&amp; e)
465 465 // streams.
466 466  
467 467 throw QPDFExc(this->file.getName() + ": unable to find trailer "
468   - "dictionary while recovering damanged file");
  468 + "dictionary while recovering damaged file");
469 469 }
470 470  
471 471 // We could iterate through the objects looking for streams and
... ...
libqpdf/QPDFObjectHandle.cc
... ... @@ -186,7 +186,7 @@ QPDFObjectHandle::getRealValue()
186 186 return dynamic_cast<QPDF_Real*>(obj.getPointer())->getVal();
187 187 }
188 188  
189   -// Name acessors
  189 +// Name accessors
190 190  
191 191 std::string
192 192 QPDFObjectHandle::getName()
... ... @@ -211,7 +211,7 @@ QPDFObjectHandle::getUTF8Value()
211 211 return dynamic_cast<QPDF_String*>(obj.getPointer())->getUTF8Val();
212 212 }
213 213  
214   -// Array acessors
  214 +// Array accessors
215 215  
216 216 int
217 217 QPDFObjectHandle::getArrayNItems()
... ... @@ -236,7 +236,7 @@ QPDFObjectHandle::setArrayItem(int n, QPDFObjectHandle const&amp; item)
236 236 return dynamic_cast<QPDF_Array*>(obj.getPointer())->setItem(n, item);
237 237 }
238 238  
239   -// Dictionary accesors
  239 +// Dictionary accessors
240 240  
241 241 bool
242 242 QPDFObjectHandle::hasKey(std::string const& key)
... ... @@ -323,7 +323,7 @@ QPDFObjectHandle::getPageImages()
323 323 // value is null or an empty dictionary, you are supposed to walk
324 324 // up the page tree until you find a /Resources dictionary. As of
325 325 // this writing, I don't have any test files that use inherited
326   - // resources, and hand-generating one won't be a good test beacuse
  326 + // resources, and hand-generating one won't be a good test because
327 327 // any mistakes in my understanding would be present in both the
328 328 // code and the test file.
329 329  
... ...
libqpdf/QPDFTokenizer.cc
... ... @@ -259,7 +259,7 @@ QPDFTokenizer::presentCharacter(char ch)
259 259 {
260 260 if (strchr(" \t\n\v\f\r()<>[]{}/%", ch) != 0)
261 261 {
262   - // A C-loacle whitespace character or delimiter terminates
  262 + // A C-locale whitespace character or delimiter terminates
263 263 // token. It is important to unread the whitespace
264 264 // character even though it is ignored since it may be the
265 265 // newline after a stream keyword. Removing it here could
... ...
libqpdf/QPDFWriter.cc
... ... @@ -160,7 +160,7 @@ QPDFWriter::setR3EncryptionParameters(
160 160 // None
161 161 // Only Document Assembly
162 162 // Only Form Field Fill-in or Signing
163   - // Comment AUthoring, Form Field Fill-in or Signing
  163 + // Comment Authoring, Form Field Fill-in or Signing
164 164 // General Editing, Comment and Form Field Authoring
165 165  
166 166 // Allowed printing menu:
... ... @@ -197,7 +197,7 @@ QPDFWriter::setR3EncryptionParameters(
197 197 switch (modify)
198 198 {
199 199 case r3m_none:
200   - clear.insert(11); // document essembly
  200 + clear.insert(11); // document assembly
201 201  
202 202 case r3m_assembly:
203 203 clear.insert(9); // filling in form fields
... ... @@ -226,7 +226,7 @@ QPDFWriter::setEncryptionParameters(
226 226 // PDF specification refers to bits with the low bit numbered 1.
227 227 // We have to convert this into a bit field.
228 228  
229   - // Specification always requirse bits 1 and 2 to be cleared.
  229 + // Specification always requires bits 1 and 2 to be cleared.
230 230 bits_to_clear.insert(1);
231 231 bits_to_clear.insert(2);
232 232  
... ... @@ -754,7 +754,7 @@ QPDFWriter::unparseObject(QPDFObjectHandle object, int level,
754 754 {
755 755 // Don't filter if the stream is already compressed with
756 756 // FlateDecode. We don't want to make it worse by getting
757   - // rid of a predictor or otherwising messing with it. We
  757 + // rid of a predictor or otherwise messing with it. We
758 758 // should also avoid messing with anything that's
759 759 // compressed with a lossy compression scheme, but we
760 760 // don't support any of those right now.
... ...
libqpdf/QPDF_Name.cc
... ... @@ -22,7 +22,7 @@ QPDF_Name::normalizeName(std::string const&amp; name)
22 22 for (unsigned int i = 1; i < name.length(); ++i)
23 23 {
24 24 char ch = name[i];
25   - // Don't use locale/ctype here; follow PDF spec guidlines.
  25 + // Don't use locale/ctype here; follow PDF spec guidelines.
26 26 if (strchr("#()<>[]{}/%", ch) || (ch < 33) || (ch > 126))
27 27 {
28 28 sprintf(num, "#%02x", (unsigned char) ch);
... ...
libqpdf/QPDF_linearization.cc
... ... @@ -2083,7 +2083,7 @@ QPDF::generateHintStream(std::map&lt;int, QPDFXRefEntry&gt; const&amp; xref,
2083 2083 calculateHOutline(xref, lengths, obj_renumber);
2084 2084  
2085 2085 // Write the hint stream itself into a compressed memory buffer.
2086   - // Write through a couter so we can get offsets.
  2086 + // Write through a counter so we can get offsets.
2087 2087 Pl_Buffer hint_stream("hint stream");
2088 2088 Pl_Flate f("compress hint stream", &hint_stream, Pl_Flate::a_deflate);
2089 2089 Pl_Count c("count", &f);
... ...
libqpdf/QUtil.cc
... ... @@ -152,7 +152,7 @@ QUtil::toUTF8(unsigned long uval)
152 152 // '0' for its (n+1)th highest bit where n is the total number of
153 153 // bytes required. Subsequent bytes start with '10' and have the
154 154 // remaining 6 bits free for encoding. For example, an 11-bit
155   - // unicode value can be stored in two bytes where the first is
  155 + // Unicode value can be stored in two bytes where the first is
156 156 // 110zzzzz, the second is 10zzzzzz, and the z's represent the
157 157 // remaining bits.
158 158  
... ...
libqpdf/qpdf/MD5.hh
... ... @@ -37,7 +37,7 @@ class MD5
37 37 // testing)
38 38 void print();
39 39  
40   - // returns the digest as a hexademical string
  40 + // returns the digest as a hexadecimal string
41 41 std::string unparse();
42 42  
43 43 // Convenience functions
... ...
libqpdf/qpdf/QPDF_Dictionary.hh
... ... @@ -23,7 +23,7 @@ class QPDF_Dictionary: public QPDFObject
23 23 QPDFObjectHandle getKey(std::string const&);
24 24 std::set<std::string> getKeys();
25 25  
26   - // Repalce value of key, adding it if it does not exist
  26 + // Replace value of key, adding it if it does not exist
27 27 void replaceKey(std::string const& key, QPDFObjectHandle const&);
28 28 // Remove key, doing nothing if key does not exist
29 29 void removeKey(std::string const& key);
... ...
qpdf/qpdf.cc
... ... @@ -107,7 +107,7 @@ Values for stream data options:\n\
107 107 preserve leave all stream data as is\n\
108 108 uncompress uncompress stream data when possible\n\
109 109 \n\
110   -Values for object strea mode:\n\
  110 +Values for object stream mode:\n\
111 111 \n\
112 112 preserve preserve original object streams (default)\n\
113 113 disable don't write any object streams\n\
... ... @@ -142,8 +142,11 @@ stream data to be written to standard output.\n\
142 142 If --filtered-stream-data is given and --normalize-content=y is also\n\
143 143 given, qpdf will attempt to normalize the stream data as if it is a\n\
144 144 page content stream. This attempt will be made even if it is not a\n\
145   -page content stream, in which case it will produce unusuable results.\n\
  145 +page content stream, in which case it will produce unusable results.\n\
146 146 \n\
  147 +Ordinarily, qpdf exits with a status of 0 on success or a status of 2\n\
  148 +if any errors occurred. In --check mode, if there were warnings but not\n\
  149 +errors, qpdf exits with a status of 3.\n\
147 150 \n";
148 151  
149 152 void usage(std::string const& msg)
... ...
qpdf/qtest/qpdf/bad7-recover.out
1 1 WARNING: bad7.pdf: offset 0: file is damaged
2 2 WARNING: bad7.pdf: offset 698: expected trailer dictionary
3 3 WARNING: Attempting to reconstruct cross-reference table
4   -bad7.pdf: unable to find trailer dictionary while recovering damanged file
  4 +bad7.pdf: unable to find trailer dictionary while recovering damaged file
... ...