Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Apr 24, 2024
1 parent 047bbee commit f2d43b2
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion SabreTools.Printing/Printers/CFB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static void Print(StringBuilder builder, FileHeader? header)
builder.AppendLine();
}

private static void Print(StringBuilder builder, SectorNumber?[]? sectorNumbers, string name)
private static void Print(StringBuilder builder, SectorNumber[]? sectorNumbers, string name)
{
builder.AppendLine($" {name} Sectors Information:");
builder.AppendLine(" -------------------------");
Expand Down
7 changes: 4 additions & 3 deletions SabreTools.Printing/Printers/GCF.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text;
using SabreTools.Models.GCF;
using SabreTools.Printing.Interfaces;
Expand Down Expand Up @@ -33,7 +34,7 @@ public static void Print(StringBuilder builder, File file)

// Directory and Directory Maps
Print(builder, file.DirectoryHeader);
Print(builder, file.DirectoryEntries);
Print(builder, file.DirectoryEntries, file.DirectoryNames);
// TODO: Should we print out the entire string table?
Print(builder, file.DirectoryInfo1Entries);
Print(builder, file.DirectoryInfo2Entries);
Expand Down Expand Up @@ -249,7 +250,7 @@ private static void Print(StringBuilder builder, DirectoryHeader? header)
builder.AppendLine();
}

private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries, Dictionary<long, string?>? entryNames)
{
builder.AppendLine(" Directory Entries Information:");
builder.AppendLine(" -------------------------");
Expand All @@ -271,7 +272,7 @@ private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
}

builder.AppendLine(entry.NameOffset, " Name offset");
builder.AppendLine(entry.Name, " Name");
builder.AppendLine(entryNames![entry.NameOffset], " Name");
builder.AppendLine(entry.ItemSize, " Item size");
builder.AppendLine(entry.ChecksumIndex, " Checksum index");
builder.AppendLine($" Directory flags: {entry.DirectoryFlags} (0x{entry.DirectoryFlags:X})");
Expand Down
7 changes: 4 additions & 3 deletions SabreTools.Printing/Printers/NCF.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text;
using SabreTools.Models.NCF;
using SabreTools.Printing.Interfaces;
Expand All @@ -21,7 +22,7 @@ public static void Print(StringBuilder builder, File file)

// Directory and Directory Maps
Print(builder, file.DirectoryHeader);
Print(builder, file.DirectoryEntries);
Print(builder, file.DirectoryEntries, file.DirectoryNames);
// TODO: Should we print out the entire string table?
Print(builder, file.DirectoryInfo1Entries);
Print(builder, file.DirectoryInfo2Entries);
Expand Down Expand Up @@ -90,7 +91,7 @@ private static void Print(StringBuilder builder, DirectoryHeader? header)
builder.AppendLine();
}

private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
private static void Print(StringBuilder builder, DirectoryEntry?[]? entries, Dictionary<long, string?>? entryNames)
{
builder.AppendLine(" Directory Entries Information:");
builder.AppendLine(" -------------------------");
Expand All @@ -112,7 +113,7 @@ private static void Print(StringBuilder builder, DirectoryEntry?[]? entries)
}

builder.AppendLine(entry.NameOffset, " Name offset");
builder.AppendLine(entry.Name, " Name");
builder.AppendLine(entryNames![entry.NameOffset], " Name");
builder.AppendLine(entry.ItemSize, " Item size");
builder.AppendLine(entry.ChecksumIndex, " Checksum index");
builder.AppendLine($" Directory flags: {entry.DirectoryFlags} (0x{entry.DirectoryFlags:X})");
Expand Down
2 changes: 1 addition & 1 deletion SabreTools.Printing/Printers/NewExecutable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private static void Print(StringBuilder builder, ModuleReferenceTableEntry?[]? e
builder.AppendLine();
}

private static void Print(StringBuilder builder, Dictionary<ushort, ImportedNameTableEntry?>? entries)
private static void Print(StringBuilder builder, Dictionary<ushort, ImportedNameTableEntry>? entries)
{
builder.AppendLine(" Imported-Name Table Information:");
builder.AppendLine(" -------------------------");
Expand Down
18 changes: 9 additions & 9 deletions SabreTools.Printing/Printers/PortableExecutable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1141,18 +1141,18 @@ private static void PrintResourceRT_MENU(ResourceDataEntry entry, int level, Str
continue;
}

if (menuItem.NormalMenuText != null)
if (menuItem is NormalMenuItem normalMenuItem)
{
builder.AppendLine($"{padding} Resource info: {menuItem.NormalResInfo} (0x{menuItem.NormalResInfo:X})");
builder.AppendLine(menuItem.NormalMenuText, $"{padding} Menu text");
builder.AppendLine($"{padding} Resource info: {normalMenuItem.NormalResInfo} (0x{normalMenuItem.NormalResInfo:X})");
builder.AppendLine(normalMenuItem.NormalMenuText, $"{padding} Menu text");
}
else
else if (menuItem is PopupMenuItem popupMenuItem)
{
builder.AppendLine($"{padding} Item type: {menuItem.PopupItemType} (0x{menuItem.PopupItemType:X})");
builder.AppendLine($"{padding} State: {menuItem.PopupState} (0x{menuItem.PopupState:X})");
builder.AppendLine(menuItem.PopupID, $"{padding} ID");
builder.AppendLine($"{padding} Resource info: {menuItem.PopupResInfo} (0x{menuItem.PopupResInfo:X})");
builder.AppendLine(menuItem.PopupMenuText, $"{padding} Menu text");
builder.AppendLine($"{padding} Item type: {popupMenuItem.PopupItemType} (0x{popupMenuItem.PopupItemType:X})");
builder.AppendLine($"{padding} State: {popupMenuItem.PopupState} (0x{popupMenuItem.PopupState:X})");
builder.AppendLine(popupMenuItem.PopupID, $"{padding} ID");
builder.AppendLine($"{padding} Resource info: {popupMenuItem.PopupResInfo} (0x{popupMenuItem.PopupResInfo:X})");
builder.AppendLine(popupMenuItem.PopupMenuText, $"{padding} Menu text");
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions SabreTools.Printing/SabreTools.Printing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

<ItemGroup>
<PackageReference Include="SabreTools.ASN1" Version="1.3.1" />
<PackageReference Include="SabreTools.IO" Version="1.3.7" />
<PackageReference Include="SabreTools.Models" Version="1.4.2" />
<PackageReference Include="SabreTools.Serialization" Version="1.5.3" />
<PackageReference Include="SabreTools.IO" Version="1.4.0" />
<PackageReference Include="SabreTools.Models" Version="1.4.4" />
<PackageReference Include="SabreTools.Serialization" Version="1.5.4" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SabreTools.IO" Version="1.3.7" />
<PackageReference Include="SabreTools.IO" Version="1.4.0" />
<PackageReference Include="SabreTools.Matching" Version="1.3.1" />
</ItemGroup>

Expand Down

0 comments on commit f2d43b2

Please sign in to comment.