migrate to new Cpp2Beef
This commit is contained in:
@@ -1,11 +1,71 @@
|
|||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Dependencies = {corlib = "*", corlib = "*"}
|
|
||||||
|
|
||||||
[Project]
|
[Project]
|
||||||
Name = "Expat"
|
Name = "Expat"
|
||||||
TargetType = "BeefLib"
|
TargetType = "BeefLib"
|
||||||
StartupObject = "Expat.Program"
|
StartupObject = "Expat.Program"
|
||||||
|
|
||||||
|
[Dependencies]
|
||||||
|
corlib = "*"
|
||||||
|
corlib = "*"
|
||||||
|
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||||
|
|
||||||
[Configs.Debug.Win64]
|
[Configs.Debug.Win64]
|
||||||
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"src=$(ProjectDir)/libexpat/expat/lib\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) \\\"cflags=-I$(ProjectDir)/expat_config\\\" config=$(Configuration) output=libexpat\")"]
|
|
||||||
|
[Configs.Debug.Win32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Debug.Linux32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Debug.Linux64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Debug.macOS]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Release.Win32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Release.Win64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Release.Linux32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Release.Linux64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Release.macOS]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Paranoid.Win32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Paranoid.Win64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Paranoid.Linux32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Paranoid.Linux64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Paranoid.macOS]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Test.Win32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Test.Win64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.lib"]
|
||||||
|
|
||||||
|
[Configs.Test.Linux32]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Test.Linux64]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|
||||||
|
[Configs.Test.macOS]
|
||||||
|
LibPaths = ["$(BuildDir)/libexpat.a"]
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Projects = {Expat = {Path = "."}}
|
|
||||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||||
|
|
||||||
[Workspace]
|
[Workspace]
|
||||||
StartupProject = "Expat"
|
StartupProject = "Expat"
|
||||||
|
|
||||||
|
[Projects]
|
||||||
|
Expat = {Path = "."}
|
||||||
|
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||||
|
|||||||
6
BeefSpace_Lock.toml
Normal file
6
BeefSpace_Lock.toml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
FileVersion = 1
|
||||||
|
|
||||||
|
[Locks."CxxBuildTool.git".Git]
|
||||||
|
URL = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"
|
||||||
|
Tag = ""
|
||||||
|
Hash = "b64a6221b8cb235a5e040c8597365dabeef849ca"
|
||||||
@@ -1,66 +1,9 @@
|
|||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Dependencies = {corlib = "*", "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
|
||||||
|
|
||||||
[Project]
|
[Project]
|
||||||
Name = "Expat.Setup"
|
Name = "Expat.Setup"
|
||||||
StartupObject = "Expat.Setup.Program"
|
StartupObject = "Expat.Setup.Program"
|
||||||
|
|
||||||
[Configs.Debug.Win32]
|
[Dependencies]
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
corlib = "*"
|
||||||
|
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||||
[Configs.Debug.Win64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Debug.Linux32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Debug.Linux64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Debug.macOS]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Release.Win32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Release.Win64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Release.Linux32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Release.Linux64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Release.macOS]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Paranoid.Win32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Paranoid.Win64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Paranoid.Linux32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Paranoid.Linux64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Paranoid.macOS]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Test.Win32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Test.Win64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Test.Linux32]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Test.Linux64]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
|
|
||||||
[Configs.Test.macOS]
|
|
||||||
PostBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt $(WorkspaceDir)/../CxxBuilderPath.txt"]
|
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
FileVersion = 1
|
FileVersion = 1
|
||||||
Projects = {"Expat.Setup" = {Path = "."}, "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
|
||||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||||
|
|
||||||
[Workspace]
|
[Workspace]
|
||||||
StartupProject = "Expat.Setup"
|
StartupProject = "Expat.Setup"
|
||||||
|
|
||||||
|
[Projects]
|
||||||
|
"Expat.Setup" = {Path = "."}
|
||||||
|
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||||
|
|||||||
@@ -6,6 +6,6 @@ Tag = ""
|
|||||||
Hash = "86db0167f15d08a63a91a19e46f983a5511bac1a"
|
Hash = "86db0167f15d08a63a91a19e46f983a5511bac1a"
|
||||||
|
|
||||||
[Locks."Cpp2Beef.git".Git]
|
[Locks."Cpp2Beef.git".Git]
|
||||||
URL = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"
|
URL = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"
|
||||||
Tag = ""
|
Tag = ""
|
||||||
Hash = "69ed2da6254b9d76d0dd48cf20eb6174dde903e2"
|
Hash = "91ddcd4f79cf6df28adff5abfc59cbdc489c7deb"
|
||||||
|
|||||||
@@ -21,20 +21,6 @@ class ExpatGenerator : Cpp2BeefGenerator, this(Span<char8*> args)
|
|||||||
|
|
||||||
namespace Expat;
|
namespace Expat;
|
||||||
|
|
||||||
static class XML
|
|
||||||
{
|
|
||||||
public typealias Char = c_char;
|
|
||||||
public typealias LChar = c_char;
|
|
||||||
public typealias Index = c_long;
|
|
||||||
public typealias Size = c_ulong;
|
|
||||||
|
|
||||||
public struct Bool : c_uchar
|
|
||||||
{
|
|
||||||
public static operator bool(Self b) => b != FALSE;
|
|
||||||
public static operator Self(bool b) => b ? TRUE : FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
""") ~ delete _;
|
""") ~ delete _;
|
||||||
|
|
||||||
|
|||||||
186
src/Expat.bf
186
src/Expat.bf
@@ -5,20 +5,6 @@ using System.Interop;
|
|||||||
|
|
||||||
namespace Expat;
|
namespace Expat;
|
||||||
|
|
||||||
static class XML
|
|
||||||
{
|
|
||||||
public typealias Char = c_char;
|
|
||||||
public typealias LChar = c_char;
|
|
||||||
public typealias Index = c_long;
|
|
||||||
public typealias Size = c_ulong;
|
|
||||||
|
|
||||||
public struct Bool : c_uchar
|
|
||||||
{
|
|
||||||
public static operator bool(Self b) => b != FALSE;
|
|
||||||
public static operator Self(bool b) => b ? TRUE : FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
extension XML
|
extension XML
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -96,83 +82,83 @@ public const let FALSE = ((Bool)0);
|
|||||||
dropped.
|
dropped.
|
||||||
*/
|
*/
|
||||||
[AllowDuplicates] public enum Status : c_int {
|
[AllowDuplicates] public enum Status : c_int {
|
||||||
Error = 0,
|
Error = 0,
|
||||||
|
|
||||||
Ok = 1,
|
Ok = 1,
|
||||||
|
|
||||||
Suspended = 2,
|
Suspended = 2,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowDuplicates] public enum Error : c_int {
|
[AllowDuplicates] public enum Error : c_int {
|
||||||
None,
|
None,
|
||||||
NoMemory,
|
NoMemory,
|
||||||
Syntax,
|
Syntax,
|
||||||
NoElements,
|
NoElements,
|
||||||
InvalidToken,
|
InvalidToken,
|
||||||
UnclosedToken,
|
UnclosedToken,
|
||||||
PartialChar,
|
PartialChar,
|
||||||
TagMismatch,
|
TagMismatch,
|
||||||
DuplicateAttribute,
|
DuplicateAttribute,
|
||||||
JunkAfterDocElement,
|
JunkAfterDocElement,
|
||||||
ParamEntityRef,
|
ParamEntityRef,
|
||||||
UndefinedEntity,
|
UndefinedEntity,
|
||||||
RecursiveEntityRef,
|
RecursiveEntityRef,
|
||||||
AsyncEntity,
|
AsyncEntity,
|
||||||
BadCharRef,
|
BadCharRef,
|
||||||
BinaryEntityRef,
|
BinaryEntityRef,
|
||||||
AttributeExternalEntityRef,
|
AttributeExternalEntityRef,
|
||||||
MisplacedXmlPi,
|
MisplacedXmlPi,
|
||||||
UnknownEncoding,
|
UnknownEncoding,
|
||||||
IncorrectEncoding,
|
IncorrectEncoding,
|
||||||
UnclosedCdataSection,
|
UnclosedCdataSection,
|
||||||
ExternalEntityHandling,
|
ExternalEntityHandling,
|
||||||
NotStandalone,
|
NotStandalone,
|
||||||
UnexpectedState,
|
UnexpectedState,
|
||||||
EntityDeclaredInPe,
|
EntityDeclaredInPe,
|
||||||
FeatureRequiresXmlDtd,
|
FeatureRequiresXmlDtd,
|
||||||
CantChangeFeatureOnceParsing,
|
CantChangeFeatureOnceParsing,
|
||||||
/* Added in 1.95.7. */
|
/* Added in 1.95.7. */
|
||||||
UnboundPrefix,
|
UnboundPrefix,
|
||||||
/* Added in 1.95.8. */
|
/* Added in 1.95.8. */
|
||||||
UndeclaringPrefix,
|
UndeclaringPrefix,
|
||||||
IncompletePe,
|
IncompletePe,
|
||||||
XmlDecl,
|
XmlDecl,
|
||||||
TextDecl,
|
TextDecl,
|
||||||
Publicid,
|
Publicid,
|
||||||
Suspended,
|
Suspended,
|
||||||
NotSuspended,
|
NotSuspended,
|
||||||
Aborted,
|
Aborted,
|
||||||
Finished,
|
Finished,
|
||||||
SuspendPe,
|
SuspendPe,
|
||||||
/* Added in 2.0. */
|
/* Added in 2.0. */
|
||||||
ReservedPrefixXml,
|
ReservedPrefixXml,
|
||||||
ReservedPrefixXmlns,
|
ReservedPrefixXmlns,
|
||||||
ReservedNamespaceUri,
|
ReservedNamespaceUri,
|
||||||
/* Added in 2.2.1. */
|
/* Added in 2.2.1. */
|
||||||
InvalidArgument,
|
InvalidArgument,
|
||||||
/* Added in 2.3.0. */
|
/* Added in 2.3.0. */
|
||||||
NoBuffer,
|
NoBuffer,
|
||||||
/* Added in 2.4.0. */
|
/* Added in 2.4.0. */
|
||||||
AmplificationLimitBreach,
|
AmplificationLimitBreach,
|
||||||
/* Added in 2.6.4. */
|
/* Added in 2.6.4. */
|
||||||
NotStarted,
|
NotStarted,
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowDuplicates] public enum Content_Type : c_int {
|
[AllowDuplicates] public enum Content_Type : c_int {
|
||||||
Empty = 1,
|
Empty = 1,
|
||||||
Any,
|
Any,
|
||||||
Mixed,
|
Mixed,
|
||||||
Name,
|
Name,
|
||||||
Choice,
|
Choice,
|
||||||
Seq,
|
Seq,
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowDuplicates] public enum Content_Quant : c_int {
|
[AllowDuplicates] public enum Content_Quant : c_int {
|
||||||
None,
|
None,
|
||||||
Opt,
|
Opt,
|
||||||
Rep,
|
Rep,
|
||||||
Plus,
|
Plus,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
|
/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
|
||||||
@@ -193,15 +179,15 @@ public const let FALSE = ((Bool)0);
|
|||||||
The EMPTY, ANY, and MIXED types will only occur at top level.
|
The EMPTY, ANY, and MIXED types will only occur at top level.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public typealias Content = cp;
|
[CRepr] public struct cp; public typealias Content = cp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[CRepr] public struct cp {
|
|
||||||
public Content_Type type;
|
|
||||||
public Content_Quant quant;
|
|
||||||
public Char* name;
|
|
||||||
public c_uint numchildren;
|
|
||||||
public Content* children;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* This is called for an element declaration. See above for
|
/* This is called for an element declaration. See above for
|
||||||
description of the model argument. It's the user code's responsibility
|
description of the model argument. It's the user code's responsibility
|
||||||
@@ -805,7 +791,7 @@ public function c_int UnknownEncodingHandler(void* encodingHandlerData, Char* na
|
|||||||
|
|
||||||
[LinkName("XML_ResumeParser")] public static extern Status ResumeParser(Parser parser);
|
[LinkName("XML_ResumeParser")] public static extern Status ResumeParser(Parser parser);
|
||||||
|
|
||||||
[AllowDuplicates] public enum Parsing : c_int { XmlInitialized, XmlParsing, XmlFinished, XmlSuspended, }
|
[AllowDuplicates] public enum Parsing : c_int { XmlInitialized, XmlParsing, XmlFinished, XmlSuspended, }
|
||||||
|
|
||||||
[CRepr] public struct ParsingStatus {
|
[CRepr] public struct ParsingStatus {
|
||||||
public Parsing parsing;
|
public Parsing parsing;
|
||||||
@@ -840,9 +826,9 @@ public function c_int UnknownEncodingHandler(void* encodingHandlerData, Char* na
|
|||||||
[LinkName("XML_ExternalEntityParserCreate")] public static extern Parser ExternalEntityParserCreate(Parser parser, Char* context, Char* encoding);
|
[LinkName("XML_ExternalEntityParserCreate")] public static extern Parser ExternalEntityParserCreate(Parser parser, Char* context, Char* encoding);
|
||||||
|
|
||||||
[AllowDuplicates] public enum ParamEntityParsing : c_int {
|
[AllowDuplicates] public enum ParamEntityParsing : c_int {
|
||||||
Never,
|
Never,
|
||||||
UnlessStandalone,
|
UnlessStandalone,
|
||||||
Always,
|
Always,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Controls parsing of parameter entities (including the external DTD
|
/* Controls parsing of parameter entities (including the external DTD
|
||||||
@@ -978,25 +964,25 @@ public function c_int UnknownEncodingHandler(void* encodingHandlerData, Char* na
|
|||||||
|
|
||||||
/* Added in Expat 1.95.5. */
|
/* Added in Expat 1.95.5. */
|
||||||
[AllowDuplicates] public enum FeatureEnum : c_int {
|
[AllowDuplicates] public enum FeatureEnum : c_int {
|
||||||
End = 0,
|
End = 0,
|
||||||
Unicode,
|
Unicode,
|
||||||
UnicodeWcharT,
|
UnicodeWcharT,
|
||||||
Dtd,
|
Dtd,
|
||||||
ContextBytes,
|
ContextBytes,
|
||||||
MinSize,
|
MinSize,
|
||||||
SizeofXmlChar,
|
SizeofXmlChar,
|
||||||
SizeofXmlLchar,
|
SizeofXmlLchar,
|
||||||
Ns,
|
Ns,
|
||||||
LargeSize,
|
LargeSize,
|
||||||
AttrInfo,
|
AttrInfo,
|
||||||
/* Added in Expat 2.4.0. */
|
/* Added in Expat 2.4.0. */
|
||||||
BillionLaughsAttackProtectionMaximumAmplificationDefault,
|
BillionLaughsAttackProtectionMaximumAmplificationDefault,
|
||||||
BillionLaughsAttackProtectionActivationThresholdDefault,
|
BillionLaughsAttackProtectionActivationThresholdDefault,
|
||||||
/* Added in Expat 2.6.0. */
|
/* Added in Expat 2.6.0. */
|
||||||
Ge,
|
Ge,
|
||||||
/* Added in Expat 2.7.2. */
|
/* Added in Expat 2.7.2. */
|
||||||
AllocTrackerMaximumAmplificationDefault,
|
AllocTrackerMaximumAmplificationDefault,
|
||||||
AllocTrackerActivationThresholdDefault,
|
AllocTrackerActivationThresholdDefault,
|
||||||
/* Additional features must be added to the end of this enum. */
|
/* Additional features must be added to the end of this enum. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
33
src/Library.bf
Normal file
33
src/Library.bf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Interop;
|
||||||
|
|
||||||
|
using CxxBuildTool;
|
||||||
|
|
||||||
|
namespace Expat;
|
||||||
|
|
||||||
|
static class XML
|
||||||
|
{
|
||||||
|
public typealias Char = c_char;
|
||||||
|
public typealias LChar = c_char;
|
||||||
|
public typealias Index = c_long;
|
||||||
|
public typealias Size = c_ulong;
|
||||||
|
|
||||||
|
public struct Bool : c_uchar
|
||||||
|
{
|
||||||
|
public static operator bool(Self b) => b != FALSE;
|
||||||
|
public static operator Self(bool b) => b ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
[OnCompile(.TypeDone)]
|
||||||
|
private static void Build()
|
||||||
|
{
|
||||||
|
if (!Compiler.IsBuilding) return;
|
||||||
|
CxxBuildTool.Ninja(Compiler.ProjectDir + "/libexpat/expat/lib", Compiler.BuildDir + "/" + Compiler.ProjectName, "libexpat", "-I" + Compiler.ProjectDir + "/expat_config",
|
||||||
|
"xmlparse.c",
|
||||||
|
"xmlrole.c",
|
||||||
|
"xmltok.c",
|
||||||
|
"xmltok_impl.c",
|
||||||
|
"xmltok_ns.c"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user