Changeset 310 for pkpgcounter/trunk
- Timestamp:
- 02/07/06 19:25:47 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/pclxl.py
r309 r310 134 134 mediasizelabel = self.mediasizes.get(mediasize, str(mediasize)) 135 135 pos -= 1 136 # self.logdebug("Media size : %s" % mediasizelabel) 136 137 elif val == 0x28 : 137 138 orientation = ord(minfile[pos - 2]) … … 160 161 break 161 162 mediatypelabel = minfile[startpos:startpos+size] 163 # self.logdebug("Media type : %s" % mediatypelabel) 162 164 elif val == 0x34 : 163 165 duplexmode = "Simplex" … … 299 301 300 302 def x46_class3(self) : 301 """Undocumented class 3.0""" 302 self.logdebug("Undocumented tag 0x46 at %x" % self.pos) 303 """Undocumented tag 0x46 in class 3.0 streams.""" 303 304 pos = self.pos 304 305 minfile = self.minfile … … 306 307 val = ord(minfile[pos]) 307 308 if (val == 0xf8) and (ord(minfile[pos+1]) in (0x95, 0x96)) : 308 self.logdebug("Found !!!!!!!!!!")309 309 pos += 2 310 datatype = self.minfile[pos]311 if ord (datatype)== 0x46 :310 ordatatype = ord(self.minfile[pos]) 311 if ordatatype == 0x46 : 312 312 break 313 self.logdebug("0x%02x" % ord(datatype))314 313 pos += 1 315 length = self.tags[ord(datatype)] 316 self.logdebug("0x%02x" % length) 314 length = self.tags[ordatatype] 317 315 posl = pos + length 318 316 if length == 1 : 319 toskip =unpack("B", self.minfile[pos:posl])[0]317 return unpack("B", self.minfile[pos:posl])[0] 320 318 elif length == 2 : 321 toskip =unpack(self.endianness + "H", self.minfile[pos:posl])[0]319 return unpack(self.endianness + "H", self.minfile[pos:posl])[0] 322 320 elif length == 4 : 323 toskip =unpack(self.endianness + "I", self.minfile[pos:posl])[0]321 return unpack(self.endianness + "I", self.minfile[pos:posl])[0] 324 322 else : 325 323 raise pdlparser.PDLParserError, "Error on size at %x" % self.pos 326 self.logdebug("ToSkip : %s" % toskip)327 return toskip328 324 else : 329 325 pos = pos - 1 … … 437 433 self.tags[0x90] = self.reservedForFutureUse # reserved 438 434 439 self.tags[0x92] = self.reservedForFutureUse # reserved440 441 self.tags[0x94] = self.reservedForFutureUse # reserved435 #self.tags[0x92] = self.reservedForFutureUse # reserved 436 437 #self.tags[0x94] = self.reservedForFutureUse # reserved 442 438 443 439 self.tags[0x9a] = self.reservedForFutureUse # reserved