diff --git a/frontend/main.cs b/frontend/main.cs index 5786cbc..3260b76 100644 --- a/frontend/main.cs +++ b/frontend/main.cs @@ -8,7 +8,7 @@ namespace arookas static class SSC { static void Main(string[] args) { Message("ssc v0.1 arookas\n"); - var cmd = new CommandLine(args); + var cmd = new aCommandLine(args); if (cmd.Count == 0) { Message("Usage: ssc -input [-output ]\n"); Pause(); @@ -58,7 +58,7 @@ namespace arookas } // command-line - static void ReadCmdLine(CommandLine cmd, out string inputFile, out string outputFile) { + static void ReadCmdLine(aCommandLine cmd, out string inputFile, out string outputFile) { inputFile = null; outputFile = null; foreach (var prm in cmd) { @@ -76,7 +76,7 @@ namespace arookas outputFile = Path.ChangeExtension(inputFile, ".sb"); } } - static void GetInput(CommandLineParameter prm, ref string inputFile) { + static void GetInput(aCommandLineParameter prm, ref string inputFile) { if (inputFile != null) { Error("Only one -input option is allowed.\n"); Pause(); @@ -89,7 +89,7 @@ namespace arookas } inputFile = prm[0]; } - static void GetOutput(CommandLineParameter prm, ref string outputFile) { + static void GetOutput(aCommandLineParameter prm, ref string outputFile) { if (outputFile != null) { Error("Only one -output option is allowed.\n"); Pause(); diff --git a/sbdump/main.cs b/sbdump/main.cs index 5fc572d..dce69dc 100644 --- a/sbdump/main.cs +++ b/sbdump/main.cs @@ -67,7 +67,7 @@ namespace arookas { static void ReadCommandLine(string[] args) { Console.WriteLine("Reading command line..."); - sSettings = new CommandLineSettings(new CommandLine(args)); + sSettings = new CommandLineSettings(new aCommandLine(args)); } static void CreateReader(Stream stream) { Console.WriteLine("Creating binary reader..."); @@ -240,7 +240,7 @@ namespace arookas { static string FetchDataValue(uint ofs) { sReader.Keep(); sReader.Goto(sDataOffset + (4 * sDataCount) + ofs); - var data = sReader.ReadString(aBinaryStringFormat.NullTerminated); + var data = sReader.ReadString(); sReader.Back(); return data; } @@ -271,7 +271,7 @@ namespace arookas { static string FetchSymbolName(Symbol symbol) { sReader.Keep(); sReader.Goto(sDynsymOffset + (20 * sDynsymCount) + symbol.StringOffset); - var name = sReader.ReadString(aBinaryStringFormat.NullTerminated); + var name = sReader.ReadString(); sReader.Back(); return name; } diff --git a/sbdump/settings.cs b/sbdump/settings.cs index c98332a..189fa3a 100644 --- a/sbdump/settings.cs +++ b/sbdump/settings.cs @@ -14,7 +14,7 @@ namespace arookas { public bool OutputDynsym { get { return mOutputDynsym; } } public bool OutputBss { get { return mOutputBss; } } - public CommandLineSettings(CommandLine cmd) { + public CommandLineSettings(aCommandLine cmd) { if (cmd == null) { throw new ArgumentNullException("cmd"); } diff --git a/ssc/binary.cs b/ssc/binary.cs index 27d33d0..27454c4 100644 --- a/ssc/binary.cs +++ b/ssc/binary.cs @@ -466,7 +466,7 @@ namespace arookas { throw new ArgumentNullException("data"); } mData.Writer.Write32(mDataString.Size); - mDataString.Writer.WriteString(data, aBinaryStringFormat.NullTerminated); + mDataString.Writer.WriteString(data); ++mDataCount; } @@ -477,7 +477,7 @@ namespace arookas { mSymbol.Writer.Write32(data); mSymbol.Writer.Write32(0u); // runtime field (hash) mSymbol.Writer.Write32(0u); // runtime field (funcptr) - mSymbolString.Writer.WriteString(name, aBinaryStringFormat.NullTerminated); + mSymbolString.Writer.WriteString(name); ++mSymbolCount; if (type == sunSymbolType.Variable) { ++mVarCount; @@ -508,7 +508,6 @@ namespace arookas { } public void Dispose() { - mWriter.Dispose(); mStream.Dispose(); } public void Copy(aBinaryWriter writer) {