[svn:parrot] r46902 - trunk/examples/tools
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat May 22 22:29:19 UTC 2010
Author: NotFound
Date: Sat May 22 22:29:18 2010
New Revision: 46902
URL: https://trac.parrot.org/parrot/changeset/46902
Log:
update pbc_checker to show PBC 6.17 encoding info
Modified:
trunk/examples/tools/pbc_checker.cpp
Modified: trunk/examples/tools/pbc_checker.cpp
==============================================================================
--- trunk/examples/tools/pbc_checker.cpp Sat May 22 22:06:10 2010 (r46901)
+++ trunk/examples/tools/pbc_checker.cpp Sat May 22 22:29:18 2010 (r46902)
@@ -728,10 +728,16 @@
{
opcode flags;
opcode charset;
+ const opcode encoding_none = 0xFFFF;
+ opcode encoding = encoding_none;
if (pbc_major > 5 && pbc_minor > 11) {
opcode flags_charset = read_opcode(pbcfile);
flags = flags_charset & 0xFF;
charset = flags_charset >> 8;
+ if (pbc_major > 6 || pbc_minor >= 17) {
+ encoding = charset >> 8;
+ charset &= 0xFF;
+ }
}
else {
flags = read_opcode(pbcfile);
@@ -740,6 +746,8 @@
cout << "Flags: 0x" << hex << setw(6) << flags << dec;
cout << " Charset: " << charset;
+ if (encoding != encoding_none)
+ cout << " Encoding: " << encoding;
// Encoding not saved, see TT #468
//opcode encoding = read_opcode(pbcfile);
More information about the parrot-commits
mailing list