ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/gr2lib/trunk/gr2lib_UnitTest/Program.cs
(Generate patch)

Comparing trunk/gr2lib_UnitTest/Program.cs (file contents):
Revision 96 by william, Sat Jul 17 05:11:13 2010 UTC vs.
Revision 97 by william, Sat Jul 17 05:53:44 2010 UTC

# Line 1 | Line 1
1 < ´╗┐using System;
1 > ´╗┐//#define HAVE_GRN_REFERENCE // when defined enabled GRN_REFERNCE in Header, else it is disabled
2 > using System;
3   using System.Collections.Generic;
4   using System.Text;
5  
# Line 73 | Line 74 | namespace gr2lib_UnitTest
74                  Console.WriteLine();
75                  Console.WriteLine("grann_file data:");
76                  Console.WriteLine("\tIs Byte Reversed: {0}", grn_file.IsByteReversed.ToString());
77 +                Console.WriteLine("\tIs Marshalled: {0}", grn_file.Marshalled.ToString());
78 +                Console.WriteLine("\tIs User Memory: {0}", grn_file.IsUserMemory.ToString());
79 +                Console.WriteLine("\tSection Count: 0x{0}", grn_file.SectionCount.ToString("X8"));
80 +                Console.WriteLine("\tSections Pointer: 0x{0}", grn_file.Sections.ToString("X8"));
81 +                Console.WriteLine("\tConversion Buffer Pointer: 0x{0}", grn_file.ConversionBuffer.ToString("X8"));
82 +
83                  Console.WriteLine("\tHeader: ");
84                  Console.WriteLine("\t\tHeader Version: 0x{0}", grn_file.Header.Version.ToString("X2"));
85 <                Console.WriteLine("\t\tHeader TotalSize: 0x{0}",grn_file.Header.TotalSize.ToString("X8"));
85 >                Console.WriteLine("\t\tHeader Total Size: 0x{0}",grn_file.Header.TotalSize.ToString("X8"));
86                  Console.WriteLine("\t\tHeader CRC: 0x{0}", grn_file.Header.CRC.ToString("X8"));
87 <                Console.WriteLine("\t\tHeader SectionArrayOffset: 0x{0}",grn_file.Header.SectionArrayOffset.ToString("X4"));
88 <                Console.WriteLine("\t\tHeader SectionArrayCount: 0x{0}", grn_file.Header.SectionArrayCount.ToString("X4"));
82 <
83 <                //Console.WriteLine("\t\tHeader RootObjectTypeDefinition:");
84 <                //Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObjectTypeDefinition.SectionIndex);
85 <                //Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObjectTypeDefinition.Offset);
87 >                Console.WriteLine("\t\tHeader Section Array Offset: 0x{0}",grn_file.Header.SectionArrayOffset.ToString("X4"));
88 >                Console.WriteLine("\t\tHeader Section Array Count: 0x{0}", grn_file.Header.SectionArrayCount.ToString("X4"));
89                  
90 <                //Console.WriteLine("\t\tHeader RootObject:");
91 <                //Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObject.SectionIndex);
92 <                //Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObject.Offset);
93 <
94 <                Console.WriteLine("\t\tHeader TypeTag: 0x{0}",grn_file.Header.TypeTag.ToString("X8"));
95 <                Console.WriteLine("\t\tHeader ExtraTags: {0}", new arraytostring<int, int[]>(grn_file.Header.ExtraTags));
96 <                Console.WriteLine("\t\tHeader StringDatabaseCRC: 0x{0}", grn_file.Header.StringDatabaseCRC.ToString("X8"));
97 <                Console.WriteLine("\t\tHeader ReservedUnused: {0}",new arraytostring<int, int[]>(grn_file.Header.ReservedUnused));
90 > #if HAVE_GRN_REFERENCE
91 >                Console.WriteLine("\t\tHeader RootObjectTypeDefinition:");
92 >                Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObjectTypeDefinition.SectionIndex);
93 >                Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObjectTypeDefinition.Offset);
94 >
95 >                Console.WriteLine("\t\tHeader RootObject:");
96 >                Console.WriteLine("\t\t\tSectionIndex: " + grn_file.Header.RootObject.SectionIndex);
97 >                Console.WriteLine("\t\t\tOffset: " + grn_file.Header.RootObject.Offset);
98 > #endif
99 >                Console.WriteLine("\t\tHeader Type Tag: 0x{0}",grn_file.Header.TypeTag.ToString("X8"));
100 >                Console.WriteLine("\t\tHeader Extra Tags: {0}", new arraytostring<int, int[]>(grn_file.Header.ExtraTags));
101 >                Console.WriteLine("\t\tHeader String Database CRC: 0x{0}", grn_file.Header.StringDatabaseCRC.ToString("X8"));
102 >                Console.WriteLine("\t\tHeader Reserved Unused: {0}",new arraytostring<int, int[]>(grn_file.Header.ReservedUnused));
103 >
104 >                Console.WriteLine("\tMagic: ");
105 >                Console.WriteLine("\t\tMagic Value: {0}", new arraytostring<int, int[]>(grn_file.SourceMagicValue.MagicValue));
106 >                Console.WriteLine("\t\tMagic Header Size: 0x{0}", grn_file.SourceMagicValue.HeaderSize.ToString("X8"));
107 >                Console.WriteLine("\t\tMagic Header Format: 0x{0}", grn_file.SourceMagicValue.HeaderFormat.ToString("X8"));
108 >                Console.WriteLine("\t\tMagic Reserved: {0}", new arraytostring<int, int[]>(grn_file.SourceMagicValue.Reserved));
109 >
110                  Console.WriteLine("Press {ENTER} to Continue."); Console.ReadLine();
111                  #endregion
112  
# Line 293 | Line 308 | namespace gr2lib_UnitTest
308   }
309  
310  
311 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines