Changeset 309 for pkpgcounter/trunk
- Timestamp:
- 02/07/06 16:34:35 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pclxl.py
r307 r309 219 219 return unpack(self.endianness + "I", self.minfile[pos:posl])[0] 220 220 else : 221 raise pdlparser.PDLParserError, "Error on array size at % s" % self.pos221 raise pdlparser.PDLParserError, "Error on array size at %x" % self.pos 222 222 223 223 def array_16(self) : … … 240 240 return 2 * unpack(self.endianness + "I", self.minfile[pos:posl])[0] 241 241 else : 242 raise pdlparser.PDLParserError, "Error on array size at % s" % self.pos242 raise pdlparser.PDLParserError, "Error on array size at %x" % self.pos 243 243 244 244 def array_32(self) : … … 261 261 return 4 * unpack(self.endianness + "I", self.minfile[pos:posl])[0] 262 262 else : 263 raise pdlparser.PDLParserError, "Error on array size at % s" % self.pos263 raise pdlparser.PDLParserError, "Error on array size at %x" % self.pos 264 264 265 265 def embeddedDataSmall(self) : … … 297 297 self.logdebug("PassThrough marker detected at %x" % self.pos) 298 298 return 0 299 300 def x46_class3(self) : 301 """Undocumented class 3.0""" 302 self.logdebug("Undocumented tag 0x46 at %x" % self.pos) 303 pos = self.pos 304 minfile = self.minfile 305 while pos > 0 : # safety check : don't go back to far ! 306 val = ord(minfile[pos]) 307 if (val == 0xf8) and (ord(minfile[pos+1]) in (0x95, 0x96)) : 308 self.logdebug("Found !!!!!!!!!!") 309 pos += 2 310 datatype = self.minfile[pos] 311 if ord(datatype) == 0x46 : 312 break 313 self.logdebug("0x%02x" % ord(datatype)) 314 pos += 1 315 length = self.tags[ord(datatype)] 316 self.logdebug("0x%02x" % length) 317 posl = pos + length 318 if length == 1 : 319 toskip = unpack("B", self.minfile[pos:posl])[0] 320 elif length == 2 : 321 toskip = unpack(self.endianness + "H", self.minfile[pos:posl])[0] 322 elif length == 4 : 323 toskip = unpack(self.endianness + "I", self.minfile[pos:posl])[0] 324 else : 325 raise pdlparser.PDLParserError, "Error on size at %x" % self.pos 326 self.logdebug("ToSkip : %s" % toskip) 327 return toskip 328 else : 329 pos = pos - 1 330 return 0 299 331 300 332 def escape(self) : … … 375 407 self.tags[0x44] = self.endPage # EndPage 376 408 self.tags[0x45] = self.reservedForFutureUse # reserved 377 self.tags[0x46] = self. reservedForFutureUse # reserved409 self.tags[0x46] = self.x46_class3 378 410 379 411 self.tags[0x4a] = self.reservedForFutureUse # reserved