Changeset 307 for pkpgcounter/trunk/pkpgpdls/pclxl.py
- Timestamp:
- 02/03/06 18:37:53 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pclxl.py
r302 r307 289 289 def reservedForFutureUse(self) : 290 290 """Outputs something when a reserved byte is encountered.""" 291 self.logdebug("Byte at % sis out of the PCLXL Protocol Class 2.0 Specification" % self.pos)291 self.logdebug("Byte at %x is out of the PCLXL Protocol Class 2.0 Specification" % self.pos) 292 292 return 0 293 293 … … 295 295 """Passthrough mode, as detailed in PCLXL Feature Reference Protocol Class 3.0 Supplement.""" 296 296 # TODO : do something here to skip the block. 297 self.logdebug("PassThrough marker detected at % s" % self.pos)297 self.logdebug("PassThrough marker detected at %x" % self.pos) 298 298 return 0 299 299 … … 529 529 self.pagecount = 0 530 530 self.escapedStuff = {} 531 self.pos = pos = 0531 self.pos = pos = oldpos = 0 532 532 try : 533 while 1 : 534 char = minfile[pos] 535 pos += 1 536 length = tags[ord(char)] 537 if not length : 538 continue 539 if callable(length) : 540 self.pos = pos 541 length = length() 542 pos = self.pos 543 pos += length 544 except IndexError : # EOF ? 545 self.minfile.close() # reached EOF 533 try : 534 while 1 : 535 try : 536 char = minfile[pos] 537 except OverflowError : 538 pos = oldpos + 1 539 pos += 1 540 length = tags[ord(char)] 541 if length : 542 if callable(length) : 543 self.pos = pos 544 length = length() 545 pos = self.pos 546 oldpos = pos 547 pos += length 548 except IndexError : # EOF ? 549 pass 550 finally : 551 self.minfile.close() 546 552 547 553 # now handle number of copies for each page (may differ).