diff --git a/Aaru.Generators/PluginRegisterGenerator.cs b/Aaru.Generators/PluginRegisterGenerator.cs index 92c00e91c..f2ebabba4 100644 --- a/Aaru.Generators/PluginRegisterGenerator.cs +++ b/Aaru.Generators/PluginRegisterGenerator.cs @@ -58,41 +58,43 @@ public class PluginRegisterGenerator : ISourceGenerator StringBuilder sb = new(); - sb.AppendLine(@"// /*************************************************************************** -// Aaru Data Preservation Suite -// ---------------------------------------------------------------------------- -// -// Filename : Register.g.cs -// Author(s) : Natalia Portillo -// -// --[ Description ] ---------------------------------------------------------- -// -// Registers all plugins in this assembly. -// -// --[ License ] -------------------------------------------------------------- -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// ""Software""), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// ---------------------------------------------------------------------------- -// Copyright © 2011-2023 Natalia Portillo -// ****************************************************************************/"); + sb.AppendLine(""" + // /*************************************************************************** + // Aaru Data Preservation Suite + // ---------------------------------------------------------------------------- + // + // Filename : Register.g.cs + // Author(s) : Natalia Portillo + // + // --[ Description ] ---------------------------------------------------------- + // + // Registers all plugins in this assembly. + // + // --[ License ] -------------------------------------------------------------- + // + // Permission is hereby granted, free of charge, to any person obtaining a + // copy of this software and associated documentation files (the + // "Software"), to deal in the Software without restriction, including + // without limitation the rights to use, copy, modify, merge, publish, + // distribute, sublicense, and/or sell copies of the Software, and to + // permit persons to whom the Software is furnished to do so, subject to + // the following conditions: + // + // The above copyright notice and this permission notice shall be included + // in all copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + // + // ---------------------------------------------------------------------------- + // Copyright © 2011-2023 Natalia Portillo + // ****************************************************************************/ + """); sb.AppendLine(); sb.AppendLine("using System;"); diff --git a/Aaru.Images/CDRDAO/Constants.cs b/Aaru.Images/CDRDAO/Constants.cs index 94c3ee56c..497483186 100644 --- a/Aaru.Images/CDRDAO/Constants.cs +++ b/Aaru.Images/CDRDAO/Constants.cs @@ -56,12 +56,16 @@ public sealed partial class Cdrdao const string REGEX_DISCTYPE = @"^\s*(?(CD_DA|CD_ROM_XA|CD_ROM|CD_I))"; const string REGEX_EMPHASIS = @"^\s*(?NO)?\s*PRE_EMPHASIS"; const string REGEX_FILE_AUDIO = - @"^\s*(AUDIO)?FILE\s*""(?.+)""\s*(#(?\d+))?\s*((?[\d]+:[\d]+:[\d]+)|(?\d+))\s*(?[\d]+:[\d]+:[\d]+)?"; + """^\s*(AUDIO)?FILE\s*"(?.+)"\s*(#(?\d+))?\s*((?[\d]+:[\d]+:[\d]+)|(?\d+))\s*(?[\d]+:[\d]+:[\d]+)?"""; const string REGEX_FILE_DATA = - @"^\s*DATAFILE\s*""(?.+)""\s*(#(?\d+))?\s*(?[\d]+:[\d]+:[\d]+)?"; - const string REGEX_INDEX = @"^\s*INDEX\s*(?
\d+:\d+:\d+)"; - const string REGEX_ISRC = @"^\s*ISRC\s*""(?[A-Z0-9]{5,5}[0-9]{7,7})"""; - const string REGEX_MCN = @"^\s*CATALOG\s*""(?[\x21-\x7F]{13,13})"""; + """^\s*DATAFILE\s*"(?.+)"\s*(#(?\d+))?\s*(?[\d]+:[\d]+:[\d]+)?"""; + const string REGEX_INDEX = @"^\s*INDEX\s*(?
\d+:\d+:\d+)"; + const string REGEX_ISRC = """ + ^\s*ISRC\s*"(?[A-Z0-9]{5,5}[0-9]{7,7})" + """; + const string REGEX_MCN = """ + ^\s*CATALOG\s*"(?[\x21-\x7F]{13,13})" + """; const string REGEX_PREGAP = @"^\s*START\s*(?
\d+:\d+:\d+)?"; const string REGEX_STEREO = @"^\s*(?(TWO|FOUR))_CHANNEL_AUDIO"; const string REGEX_TRACK = @@ -71,14 +75,30 @@ public sealed partial class Cdrdao const string REGEX_ZERO_PREGAP = @"^\s*PREGAP\s*(?\d+:\d+:\d+)"; // CD-Text - const string REGEX_ARRANGER = @"^\s*ARRANGER\s*""(?.+)"""; - const string REGEX_COMPOSER = @"^\s*COMPOSER\s*""(?.+)"""; - const string REGEX_DISC_ID = @"^\s*DISC_ID\s*""(?.+)"""; - const string REGEX_MESSAGE = @"^\s*MESSAGE\s*""(?.+)"""; - const string REGEX_PERFORMER = @"^\s*PERFORMER\s*""(?.+)"""; - const string REGEX_SONGWRITER = @"^\s*SONGWRITER\s*""(?.+)"""; - const string REGEX_TITLE = @"^\s*TITLE\s*""(?.+)"""; - const string REGEX_UPC = @"^\s*UPC_EAN\s*""(?<catalog>[\d]{13,13})"""; + const string REGEX_ARRANGER = """ + ^\s*ARRANGER\s*"(?<arranger>.+)" + """; + const string REGEX_COMPOSER = """ + ^\s*COMPOSER\s*"(?<composer>.+)" + """; + const string REGEX_DISC_ID = """ + ^\s*DISC_ID\s*"(?<discid>.+)" + """; + const string REGEX_MESSAGE = """ + ^\s*MESSAGE\s*"(?<message>.+)" + """; + const string REGEX_PERFORMER = """ + ^\s*PERFORMER\s*"(?<performer>.+)" + """; + const string REGEX_SONGWRITER = """ + ^\s*SONGWRITER\s*"(?<songwriter>.+)" + """; + const string REGEX_TITLE = """ + ^\s*TITLE\s*"(?<title>.+)" + """; + const string REGEX_UPC = """ + ^\s*UPC_EAN\s*"(?<catalog>[\d]{13,13})" + """; // Unused const string REGEX_CD_TEXT = @"^\s*CD_TEXT\s*\{"; diff --git a/Aaru.Images/VMware/Constants.cs b/Aaru.Images/VMware/Constants.cs index 6c3105f0b..36c9e57e4 100644 --- a/Aaru.Images/VMware/Constants.cs +++ b/Aaru.Images/VMware/Constants.cs @@ -62,14 +62,14 @@ public sealed partial class VMware const string REGEX_CID = @"^\s*CID\s*=\s*(?<cid>[0123456789abcdef]{8})$"; const string REGEX_CID_PARENT = @"^\s*parentCID\s*=\s*(?<cid>[0123456789abcdef]{8})$"; const string REGEX_TYPE = - @"^\s*createType\s*=\s*\""(?<type>custom|monolithicSparse|monolithicFlat|twoGbMaxExtentSparse|twoGbMaxExtentFlat|fullDevice|partitionedDevice|vmfs|vmfsPreallocated|vmfsEagerZeroedThick|vmfsThin|vmfsSparse|vmfsRDM|vmfsRawDeviceMap|vmfsRDMP|vmfsPassthroughRawDeviceMap|vmfsRaw|streamOptimized)\""$"; + """^\s*createType\s*=\s*\"(?<type>custom|monolithicSparse|monolithicFlat|twoGbMaxExtentSparse|twoGbMaxExtentFlat|fullDevice|partitionedDevice|vmfs|vmfsPreallocated|vmfsEagerZeroedThick|vmfsThin|vmfsSparse|vmfsRDM|vmfsRawDeviceMap|vmfsRDMP|vmfsPassthroughRawDeviceMap|vmfsRaw|streamOptimized)\"$"""; const string REGEX_EXTENT = - @"^\s*(?<access>(RW|RDONLY|NOACCESS))\s+(?<sectors>\d+)\s+(?<type>(FLAT|SPARSE|ZERO|VMFS|VMFSSPARSE|VMFSRDM|VMFSRAW))\s+\""(?<filename>.+)\""(\s*(?<offset>\d+))?$"; - const string REGEX_DDB_TYPE = @"^\s*ddb\.adapterType\s*=\s*\""(?<type>ide|buslogic|lsilogic|legacyESX)\""$"; - const string REGEX_DDB_SECTORS = @"^\s*ddb\.geometry\.sectors\s*=\s*\""(?<sectors>\d+)\""$"; - const string REGEX_DDB_HEADS = @"^\s*ddb\.geometry\.heads\s*=\s*\""(?<heads>\d+)\""$"; - const string REGEX_DDB_CYLINDERS = @"^\s*ddb\.geometry\.cylinders\s*=\s*\""(?<cylinders>\d+)\""$"; - const string PARENT_REGEX = @"^\s*parentFileNameHint\s*=\s*\""(?<filename>.+)\""$"; + """^\s*(?<access>(RW|RDONLY|NOACCESS))\s+(?<sectors>\d+)\s+(?<type>(FLAT|SPARSE|ZERO|VMFS|VMFSSPARSE|VMFSRDM|VMFSRAW))\s+\"(?<filename>.+)\"(\s*(?<offset>\d+))?$"""; + const string REGEX_DDB_TYPE = """^\s*ddb\.adapterType\s*=\s*\"(?<type>ide|buslogic|lsilogic|legacyESX)\"$"""; + const string REGEX_DDB_SECTORS = """^\s*ddb\.geometry\.sectors\s*=\s*\"(?<sectors>\d+)\"$"""; + const string REGEX_DDB_HEADS = """^\s*ddb\.geometry\.heads\s*=\s*\"(?<heads>\d+)\"$"""; + const string REGEX_DDB_CYLINDERS = """^\s*ddb\.geometry\.cylinders\s*=\s*\"(?<cylinders>\d+)\"$"""; + const string PARENT_REGEX = """^\s*parentFileNameHint\s*=\s*\"(?<filename>.+)\"$"""; const uint FLAGS_VALID_NEW_LINE = 0x01; const uint FLAGS_USE_REDUNDANT_TABLE = 0x02; const uint FLAGS_ZERO_GRAIN_GTE = 0x04;