mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Rename Aaru.Console project to Aaru.Logging.
This commit is contained in:
@@ -37,8 +37,8 @@ using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Logging;
|
||||
using Marshal = Aaru.Helpers.Marshal;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
@@ -54,7 +54,7 @@ public sealed partial class Symbian
|
||||
|
||||
Stream stream = filter.GetDataForkStream();
|
||||
|
||||
var hdr = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
byte[] hdr = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
|
||||
stream.EnsureRead(hdr, 0, hdr.Length);
|
||||
|
||||
@@ -77,7 +77,7 @@ public sealed partial class Symbian
|
||||
|
||||
if(stream.Length < Marshal.SizeOf<SymbianHeader>()) return;
|
||||
|
||||
var buffer = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
byte[] buffer = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
|
||||
stream.Seek(0, SeekOrigin.Begin);
|
||||
stream.EnsureRead(buffer, 0, buffer.Length);
|
||||
@@ -163,7 +163,7 @@ public sealed partial class Symbian
|
||||
|
||||
// Go to enumerate languages
|
||||
br.BaseStream.Seek(sh.lang_ptr, SeekOrigin.Begin);
|
||||
for(var i = 0; i < sh.languages; i++) languages.Add(((LanguageCodes)br.ReadUInt16()).ToString("G"));
|
||||
for(int i = 0; i < sh.languages; i++) languages.Add(((LanguageCodes)br.ReadUInt16()).ToString("G"));
|
||||
|
||||
// Go to component record
|
||||
br.BaseStream.Seek(sh.comp_ptr, SeekOrigin.Begin);
|
||||
@@ -185,7 +185,7 @@ public sealed partial class Symbian
|
||||
span = buffer;
|
||||
componentRecord.namesPointers = MemoryMarshal.Cast<byte, uint>(span)[..languages.Count].ToArray();
|
||||
|
||||
for(var i = 0; i < sh.languages; i++)
|
||||
for(int i = 0; i < sh.languages; i++)
|
||||
{
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
"Found component name for language {0} at {1} with a length of {2} bytes",
|
||||
@@ -201,7 +201,7 @@ public sealed partial class Symbian
|
||||
// Go to capabilities (???)
|
||||
br.BaseStream.Seek(sh.caps_ptr, SeekOrigin.Begin);
|
||||
|
||||
for(var i = 0; i < sh.capabilities; i++)
|
||||
for(int i = 0; i < sh.capabilities; i++)
|
||||
{
|
||||
uint cap_Key = br.ReadUInt32();
|
||||
uint cap_Value = br.ReadUInt32();
|
||||
@@ -227,7 +227,7 @@ public sealed partial class Symbian
|
||||
|
||||
description.AppendFormat(Localization.File_contains_0_languages, sh.languages).AppendLine();
|
||||
|
||||
for(var i = 0; i < languages.Count; i++)
|
||||
for(int i = 0; i < languages.Count; i++)
|
||||
{
|
||||
if(i > 0) description.Append(", ");
|
||||
description.Append($"{languages[i]}");
|
||||
@@ -236,7 +236,7 @@ public sealed partial class Symbian
|
||||
description.AppendLine();
|
||||
description.AppendLine();
|
||||
|
||||
for(var i = 0; i < languages.Count; i++)
|
||||
for(int i = 0; i < languages.Count; i++)
|
||||
{
|
||||
description.AppendFormat(Localization.Component_name_for_language_with_code_0_1,
|
||||
languages[i],
|
||||
@@ -253,7 +253,7 @@ public sealed partial class Symbian
|
||||
|
||||
if(sh.requisites > 0)
|
||||
{
|
||||
for(var r = 0; r < sh.requisites; r++)
|
||||
for(int r = 0; r < sh.requisites; r++)
|
||||
{
|
||||
br.BaseStream.Seek(offset, SeekOrigin.Begin);
|
||||
|
||||
@@ -285,7 +285,7 @@ public sealed partial class Symbian
|
||||
|
||||
offset = (uint)br.BaseStream.Position;
|
||||
|
||||
for(var i = 0; i < languages.Count; i++)
|
||||
for(int i = 0; i < languages.Count; i++)
|
||||
{
|
||||
br.BaseStream.Seek(requisiteRecord.namesPointers[i], SeekOrigin.Begin);
|
||||
buffer = br.ReadBytes((int)requisiteRecord.namesLengths[i]);
|
||||
@@ -310,7 +310,7 @@ public sealed partial class Symbian
|
||||
|
||||
uint currentFile = 0;
|
||||
offset = sh.files_ptr;
|
||||
var conditionLevel = 0;
|
||||
int conditionLevel = 0;
|
||||
_options = [];
|
||||
|
||||
// Get only the options records
|
||||
@@ -361,7 +361,7 @@ public sealed partial class Symbian
|
||||
|
||||
if(_options.Count > 0)
|
||||
{
|
||||
for(var i = 0; i < _options.Count; i++)
|
||||
for(int i = 0; i < _options.Count; i++)
|
||||
{
|
||||
OptionRecord option = _options[i];
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Logging;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
|
||||
@@ -56,7 +56,7 @@ public sealed partial class Symbian
|
||||
|
||||
if(_stream.Length < Marshal.SizeOf<SymbianHeader>()) return ErrorNumber.InvalidArgument;
|
||||
|
||||
var buffer = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
byte[] buffer = new byte[Marshal.SizeOf<SymbianHeader>()];
|
||||
|
||||
_stream.Seek(0, SeekOrigin.Begin);
|
||||
_stream.EnsureRead(buffer, 0, buffer.Length);
|
||||
@@ -123,7 +123,7 @@ public sealed partial class Symbian
|
||||
|
||||
// Go to enumerate languages
|
||||
br.BaseStream.Seek(sh.lang_ptr, SeekOrigin.Begin);
|
||||
for(var i = 0; i < sh.languages; i++) languages.Add(((LanguageCodes)br.ReadUInt16()).ToString("G"));
|
||||
for(int i = 0; i < sh.languages; i++) languages.Add(((LanguageCodes)br.ReadUInt16()).ToString("G"));
|
||||
|
||||
_files = [];
|
||||
_conditions = [];
|
||||
@@ -131,7 +131,7 @@ public sealed partial class Symbian
|
||||
|
||||
uint currentFile = 0;
|
||||
uint offset = sh.files_ptr;
|
||||
var conditionLevel = 0;
|
||||
int conditionLevel = 0;
|
||||
|
||||
// Get only the options records
|
||||
do
|
||||
|
||||
@@ -36,7 +36,7 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Aaru.Console;
|
||||
using Aaru.Logging;
|
||||
using Marshal = Aaru.Helpers.Marshal;
|
||||
|
||||
namespace Aaru.Archives;
|
||||
@@ -51,8 +51,8 @@ public sealed partial class Symbian
|
||||
|
||||
if(currentFile > maxFiles) return;
|
||||
|
||||
var tabulationChars = new char[conditionLevel];
|
||||
for(var i = 0; i < conditionLevel; i++) tabulationChars[i] = '\t';
|
||||
char[] tabulationChars = new char[conditionLevel];
|
||||
for(int i = 0; i < conditionLevel; i++) tabulationChars[i] = '\t';
|
||||
string tabulation = new(tabulationChars);
|
||||
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
@@ -323,7 +323,7 @@ public sealed partial class Symbian
|
||||
|
||||
var decodedFileRecords = new DecodedFileRecord[languages.Count];
|
||||
|
||||
for(var i = 0; i < languages.Count; i++)
|
||||
for(int i = 0; i < languages.Count; i++)
|
||||
{
|
||||
decodedFileRecords[i].type = multipleFileRecord.record.type;
|
||||
decodedFileRecords[i].details = multipleFileRecord.record.details;
|
||||
@@ -488,7 +488,7 @@ public sealed partial class Symbian
|
||||
|
||||
optionsLineRecord.options = new OptionRecord[(int)optionsLineRecord.numberOfOptions];
|
||||
|
||||
for(var i = 0; i < optionsLineRecord.numberOfOptions; i++)
|
||||
for(int i = 0; i < optionsLineRecord.numberOfOptions; i++)
|
||||
{
|
||||
optionsLineRecord.options[i] = new OptionRecord();
|
||||
|
||||
@@ -508,7 +508,7 @@ public sealed partial class Symbian
|
||||
|
||||
offset = (uint)br.BaseStream.Position;
|
||||
|
||||
for(var j = 0; j < languages.Count; j++)
|
||||
for(int j = 0; j < languages.Count; j++)
|
||||
{
|
||||
br.BaseStream.Seek(optionsLineRecord.options[i].pointers[j], SeekOrigin.Begin);
|
||||
buffer = br.ReadBytes((int)optionsLineRecord.options[i].lengths[j]);
|
||||
@@ -527,7 +527,7 @@ public sealed partial class Symbian
|
||||
conditionLevel--;
|
||||
|
||||
tabulationChars = new char[conditionLevel];
|
||||
for(var i = 0; i < conditionLevel; i++) tabulationChars[i] = '\t';
|
||||
for(int i = 0; i < conditionLevel; i++) tabulationChars[i] = '\t';
|
||||
tabulation = new string(tabulationChars);
|
||||
|
||||
conditionalRecord = new ConditionalRecord
|
||||
@@ -552,7 +552,7 @@ public sealed partial class Symbian
|
||||
break;
|
||||
case FileRecordType.ElseIf:
|
||||
tabulationChars = new char[conditionLevel - 1];
|
||||
for(var i = 0; i < conditionLevel - 1; i++) tabulationChars[i] = '\t';
|
||||
for(int i = 0; i < conditionLevel - 1; i++) tabulationChars[i] = '\t';
|
||||
tabulation = new string(tabulationChars);
|
||||
|
||||
conditionalRecord = new ConditionalRecord
|
||||
@@ -577,7 +577,7 @@ public sealed partial class Symbian
|
||||
break;
|
||||
case FileRecordType.Else:
|
||||
tabulationChars = new char[conditionLevel - 1];
|
||||
for(var i = 0; i < conditionLevel - 1; i++) tabulationChars[i] = '\t';
|
||||
for(int i = 0; i < conditionLevel - 1; i++) tabulationChars[i] = '\t';
|
||||
tabulation = new string(tabulationChars);
|
||||
|
||||
offset = (uint)(br.BaseStream.Position + Marshal.SizeOf<ConditionalEndRecord>());
|
||||
|
||||
Reference in New Issue
Block a user