more parsing updates
This commit is contained in:
parent
5566f0c247
commit
a90f01c69d
|
|
@ -7,15 +7,20 @@
|
|||
#define OTHER_LIBS \
|
||||
mathutil:c linmath:c panda:m \
|
||||
dtoolbase:c dtool:m
|
||||
|
||||
#define USE_PACKAGES zlib
|
||||
|
||||
#define SOURCES \
|
||||
config_xfile.h config_xfile.cxx \
|
||||
standard_templates.cxx standard_templates.h \
|
||||
windowsGuid.cxx windowsGuid.h \
|
||||
xLexer.lxx xLexerDefs.h \
|
||||
xParser.yxx xParserDefs.h \
|
||||
xFile.cxx xFile.I xFile.h \
|
||||
xFileArrayDef.cxx xFileArrayDef.I xFileArrayDef.h \
|
||||
xFileDataDef.cxx xFileDataDef.I xFileDataDef.h \
|
||||
xFileDataObject.cxx xFileDataObject.I xFileDataObject.h \
|
||||
xFileDataObjectTemplate.cxx xFileDataObjectTemplate.I xFileDataObjectTemplate.h \
|
||||
xFileNode.cxx xFileNode.I xFileNode.h \
|
||||
xFileTemplate.cxx xFileTemplate.I xFileTemplate.h
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
#include "config_xfile.h"
|
||||
#include "xFile.h"
|
||||
#include "xFileDataDef.h"
|
||||
#include "xFileDataObject.h"
|
||||
#include "xFileDataObjectTemplate.h"
|
||||
#include "xFileNode.h"
|
||||
#include "xFileTemplate.h"
|
||||
|
||||
|
|
@ -55,6 +57,8 @@ init_libxfile() {
|
|||
|
||||
XFile::init_type();
|
||||
XFileDataDef::init_type();
|
||||
XFileDataObject::init_type();
|
||||
XFileDataObjectTemplate::init_type();
|
||||
XFileNode::init_type();
|
||||
XFileTemplate::init_type();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,30 @@
|
|||
xof 0303txt 0032
|
||||
|
||||
# This file contains the standard template definitions for Direct3D
|
||||
# Retained Mode. I extracted these from the DirectX API via something
|
||||
# like the following code:
|
||||
#
|
||||
# #include <rmxftmpl.h>
|
||||
#
|
||||
# LPDIRECTXFILE dx_file;
|
||||
# LPDIRECTXFILESAVEOBJECT dx_file_save;
|
||||
# HRESULT hr;
|
||||
#
|
||||
# hr = DirectXFileCreate(&dx_file);
|
||||
# hr = dx_file->RegisterTemplates(D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES);
|
||||
# hr = dx_file->CreateSaveObject("filename.x", DXFILEFORMAT_TEXT,
|
||||
# &dx_file_save);
|
||||
# static const GUID *temps[] = {
|
||||
# &TID_D3DRMInfo,
|
||||
# &TID_D3DRMMesh,
|
||||
# &TID_D3DRMVector,
|
||||
# ...
|
||||
# };
|
||||
# static const int num_temps = sizeof(temps) / sizeof(temps[0]);
|
||||
# hr = dx_file_save->SaveTemplates(num_temps, temps);
|
||||
#
|
||||
|
||||
|
||||
template Header {
|
||||
<3d82ab43-62da-11cf-ab39-0020af71e433>
|
||||
WORD major;
|
||||
|
|
@ -7,12 +32,6 @@ template Header {
|
|||
DWORD flags;
|
||||
}
|
||||
|
||||
template Coords2d {
|
||||
<f6f23f44-7686-11cf-8f52-0040333594a3>
|
||||
FLOAT u;
|
||||
FLOAT v;
|
||||
}
|
||||
|
||||
template Vector {
|
||||
<3d82ab5e-62da-11cf-ab39-0020af71e433>
|
||||
FLOAT x;
|
||||
|
|
@ -20,46 +39,6 @@ template Vector {
|
|||
FLOAT z;
|
||||
}
|
||||
|
||||
template ColorRGBA {
|
||||
<35ff44e0-6c7c-11cf-8f52-0040333594a3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
FLOAT alpha;
|
||||
}
|
||||
|
||||
template ColorRGB {
|
||||
<d3e16e81-7835-11cf-8f52-0040333594a3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
}
|
||||
|
||||
template IndexedColor {
|
||||
<1630b820-7842-11cf-8f52-0040333594a3>
|
||||
DWORD index;
|
||||
ColorRGBA indexColor;
|
||||
}
|
||||
|
||||
template TextureFilename {
|
||||
<a42790e1-7810-11cf-8f52-0040333594a3>
|
||||
STRING filename;
|
||||
}
|
||||
|
||||
template Matrix4x4 {
|
||||
<f6f23f45-7686-11cf-8f52-0040333594a3>
|
||||
array FLOAT matrix[16];
|
||||
}
|
||||
|
||||
template Material {
|
||||
<3d82ab4d-62da-11cf-ab39-0020af71e433>
|
||||
ColorRGBA faceColor;
|
||||
FLOAT power;
|
||||
ColorRGB specularColor;
|
||||
ColorRGB emissiveColor;
|
||||
[...]
|
||||
}
|
||||
|
||||
template MeshFace {
|
||||
<3d82ab5f-62da-11cf-ab39-0020af71e433>
|
||||
DWORD nFaceVertexIndices;
|
||||
|
|
@ -75,18 +54,43 @@ template Mesh {
|
|||
[...]
|
||||
}
|
||||
|
||||
template MeshNormals {
|
||||
<f6f23f43-7686-11cf-8f52-0040333594a3>
|
||||
DWORD nNormals;
|
||||
array Vector normals[nNormals];
|
||||
DWORD nFaceNormals;
|
||||
array MeshFace faceNormals[nFaceNormals];
|
||||
template ColorRGBA {
|
||||
<35ff44e0-6c7c-11cf-8f52-0040333594a3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
FLOAT alpha;
|
||||
}
|
||||
|
||||
template MeshTextureCoords {
|
||||
<f6f23f40-7686-11cf-8f52-0040333594a3>
|
||||
DWORD nTextureCoords;
|
||||
array Coords2d textureCoords[nTextureCoords];
|
||||
template ColorRGB {
|
||||
<d3e16e81-7835-11cf-8f52-0040333594a3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
}
|
||||
|
||||
template Material {
|
||||
<3d82ab4d-62da-11cf-ab39-0020af71e433>
|
||||
ColorRGBA faceColor;
|
||||
FLOAT power;
|
||||
ColorRGB specularColor;
|
||||
ColorRGB emissiveColor;
|
||||
[...]
|
||||
}
|
||||
|
||||
template Frame {
|
||||
<3d82ab46-62da-11cf-ab39-0020af71e433>
|
||||
[...]
|
||||
}
|
||||
|
||||
template Matrix4x4 {
|
||||
<f6f23f45-7686-11cf-8f52-0040333594a3>
|
||||
array FLOAT matrix[16];
|
||||
}
|
||||
|
||||
template FrameTransformMatrix {
|
||||
<f6f23f41-7686-11cf-8f52-0040333594a3>
|
||||
Matrix4x4 frameMatrix;
|
||||
}
|
||||
|
||||
template MeshMaterialList {
|
||||
|
|
@ -97,12 +101,169 @@ template MeshMaterialList {
|
|||
[Material <3d82ab4d-62da-11cf-ab39-0020af71e433>]
|
||||
}
|
||||
|
||||
template FrameTransformMatrix {
|
||||
<f6f23f41-7686-11cf-8f52-0040333594a3>
|
||||
Matrix4x4 frameMatrix;
|
||||
template Coords2d {
|
||||
<f6f23f44-7686-11cf-8f52-0040333594a3>
|
||||
FLOAT u;
|
||||
FLOAT v;
|
||||
}
|
||||
|
||||
template Frame {
|
||||
<3d82ab46-62da-11cf-ab39-0020af71e433>
|
||||
template MeshTextureCoords {
|
||||
<f6f23f40-7686-11cf-8f52-0040333594a3>
|
||||
DWORD nTextureCoords;
|
||||
array Coords2d textureCoords[nTextureCoords];
|
||||
}
|
||||
|
||||
template MeshNormals {
|
||||
<f6f23f43-7686-11cf-8f52-0040333594a3>
|
||||
DWORD nNormals;
|
||||
array Vector normals[nNormals];
|
||||
DWORD nFaceNormals;
|
||||
array MeshFace faceNormals[nFaceNormals];
|
||||
}
|
||||
|
||||
template Animation {
|
||||
<3d82ab4f-62da-11cf-ab39-0020af71e433>
|
||||
[...]
|
||||
}
|
||||
|
||||
template AnimationSet {
|
||||
<3d82ab50-62da-11cf-ab39-0020af71e433>
|
||||
[Animation <3d82ab4f-62da-11cf-ab39-0020af71e433>]
|
||||
}
|
||||
|
||||
template FloatKeys {
|
||||
<10dd46a9-775b-11cf-8f52-0040333594a3>
|
||||
DWORD nValues;
|
||||
array FLOAT values[nValues];
|
||||
}
|
||||
|
||||
template TimedFloatKeys {
|
||||
<f406b180-7b3b-11cf-8f52-0040333594a3>
|
||||
DWORD time;
|
||||
FloatKeys tfkeys;
|
||||
}
|
||||
|
||||
template AnimationKey {
|
||||
<10dd46a8-775b-11cf-8f52-0040333594a3>
|
||||
DWORD keyType;
|
||||
DWORD nKeys;
|
||||
array TimedFloatKeys keys[nKeys];
|
||||
}
|
||||
|
||||
template Guid {
|
||||
<a42790e0-7810-11cf-8f52-0040333594a3>
|
||||
DWORD data1;
|
||||
WORD data2;
|
||||
WORD data3;
|
||||
array UCHAR data4[8];
|
||||
}
|
||||
|
||||
template TextureFilename {
|
||||
<a42790e1-7810-11cf-8f52-0040333594a3>
|
||||
STRING filename;
|
||||
}
|
||||
|
||||
template IndexedColor {
|
||||
<1630b820-7842-11cf-8f52-0040333594a3>
|
||||
DWORD index;
|
||||
ColorRGBA indexColor;
|
||||
}
|
||||
|
||||
template MeshVertexColors {
|
||||
<1630b821-7842-11cf-8f52-0040333594a3>
|
||||
DWORD nVertexColors;
|
||||
array IndexedColor vertexColors[nVertexColors];
|
||||
}
|
||||
|
||||
template Boolean {
|
||||
<537da6a0-ca37-11d0-941c-0080c80cfa7b>
|
||||
DWORD truefalse;
|
||||
}
|
||||
|
||||
template MaterialWrap {
|
||||
<4885ae60-78e8-11cf-8f52-0040333594a3>
|
||||
Boolean u;
|
||||
Boolean v;
|
||||
}
|
||||
|
||||
template Boolean2d {
|
||||
<4885ae63-78e8-11cf-8f52-0040333594a3>
|
||||
Boolean u;
|
||||
Boolean v;
|
||||
}
|
||||
|
||||
template MeshFaceWraps {
|
||||
<ed1ec5c0-c0a8-11d0-941c-0080c80cfa7b>
|
||||
DWORD nFaceWrapValues;
|
||||
array Boolean2d faceWrapValues[nFaceWrapValues];
|
||||
}
|
||||
|
||||
template AnimationOptions {
|
||||
<e2bf56c0-840f-11cf-8f52-0040333594a3>
|
||||
DWORD openclosed;
|
||||
DWORD positionquality;
|
||||
}
|
||||
|
||||
# Since I don't have documentation on the precise semantic meaning of
|
||||
# the BINARY keyword, I can't parse the following yet.
|
||||
|
||||
#template InlineData {
|
||||
# <3a23eea0-94b1-11d0-ab39-0020af71e433>
|
||||
# [BINARY]
|
||||
#}
|
||||
#
|
||||
#template Url {
|
||||
# <3a23eea1-94b1-11d0-ab39-0020af71e433>
|
||||
# DWORD nUrls;
|
||||
# array STRING urls[nUrls];
|
||||
#}
|
||||
#
|
||||
#template ProgressiveMesh {
|
||||
# <8a63c360-997d-11d0-941c-0080c80cfa7b>
|
||||
# [Url <3a23eea1-94b1-11d0-ab39-0020af71e433>, InlineData <3a23eea0-94b1-11d0-ab39-0020af71e433>]
|
||||
#}
|
||||
|
||||
template ExternalVisual {
|
||||
<98116aa0-bdba-11d1-82c0-00a0c9697271>
|
||||
Guid guidExternalVisual;
|
||||
[...]
|
||||
}
|
||||
|
||||
template StringProperty {
|
||||
<7f0f21e0-bfe1-11d1-82c0-00a0c9697271>
|
||||
STRING key;
|
||||
STRING value;
|
||||
}
|
||||
|
||||
template PropertyBag {
|
||||
<7f0f21e1-bfe1-11d1-82c0-00a0c9697271>
|
||||
[StringProperty <7f0f21e0-bfe1-11d1-82c0-00a0c9697271>]
|
||||
}
|
||||
|
||||
template RightHanded {
|
||||
<7f5d5ea0-d53a-11d1-82c0-00a0c9697271>
|
||||
DWORD bRightHanded;
|
||||
}
|
||||
|
||||
template XSkinMeshHeader {
|
||||
<3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
|
||||
WORD nMaxSkinWeightsPerVertex;
|
||||
WORD nMaxSkinWeightsPerFace;
|
||||
WORD nBones;
|
||||
}
|
||||
|
||||
template VertexDuplicationIndices {
|
||||
<b8d65549-d7c9-4995-89cf-53a9a8b031e3>
|
||||
DWORD nIndices;
|
||||
DWORD nOriginalVertices;
|
||||
array DWORD indices[nIndices];
|
||||
}
|
||||
|
||||
template SkinWeights {
|
||||
<6f0d123b-bad2-4167-a0d0-80224f25fabb>
|
||||
STRING transformNodeName;
|
||||
DWORD nWeights;
|
||||
array DWORD vertexIndices[nWeights];
|
||||
array FLOAT weights[nWeights];
|
||||
Matrix4x4 matrixOffset;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,504 @@
|
|||
|
||||
/*
|
||||
* This table was generated by the command:
|
||||
*
|
||||
* bin2c -n standard_templates_data -o standardTemplates.x.c standardTemplates.x
|
||||
*/
|
||||
|
||||
const unsigned char standard_templates_data[] = {
|
||||
0x78, 0x6f, 0x66, 0x20, 0x30, 0x33, 0x30, 0x33, 0x74, 0x78, 0x74,
|
||||
0x20, 0x30, 0x30, 0x33, 0x32, 0x0a, 0x0a, 0x23, 0x20, 0x54, 0x68,
|
||||
0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73,
|
||||
0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x74, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e,
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20,
|
||||
0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x33, 0x44, 0x0a, 0x23, 0x20,
|
||||
0x52, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x4d, 0x6f,
|
||||
0x64, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x20, 0x65, 0x78, 0x74, 0x72,
|
||||
0x61, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65,
|
||||
0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x44,
|
||||
0x69, 0x72, 0x65, 0x63, 0x74, 0x58, 0x20, 0x41, 0x50, 0x49, 0x20,
|
||||
0x76, 0x69, 0x61, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x69,
|
||||
0x6e, 0x67, 0x0a, 0x23, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e,
|
||||
0x67, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x0a, 0x23, 0x0a, 0x23,
|
||||
0x20, 0x20, 0x23, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20,
|
||||
0x3c, 0x72, 0x6d, 0x78, 0x66, 0x74, 0x6d, 0x70, 0x6c, 0x2e, 0x68,
|
||||
0x3e, 0x0a, 0x23, 0x0a, 0x23, 0x20, 0x20, 0x4c, 0x50, 0x44, 0x49,
|
||||
0x52, 0x45, 0x43, 0x54, 0x58, 0x46, 0x49, 0x4c, 0x45, 0x20, 0x64,
|
||||
0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x3b, 0x0a, 0x23, 0x20, 0x20,
|
||||
0x4c, 0x50, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x58, 0x46, 0x49,
|
||||
0x4c, 0x45, 0x53, 0x41, 0x56, 0x45, 0x4f, 0x42, 0x4a, 0x45, 0x43,
|
||||
0x54, 0x20, 0x64, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73,
|
||||
0x61, 0x76, 0x65, 0x3b, 0x0a, 0x23, 0x20, 0x20, 0x48, 0x52, 0x45,
|
||||
0x53, 0x55, 0x4c, 0x54, 0x20, 0x68, 0x72, 0x3b, 0x0a, 0x23, 0x0a,
|
||||
0x23, 0x20, 0x20, 0x68, 0x72, 0x20, 0x3d, 0x20, 0x44, 0x69, 0x72,
|
||||
0x65, 0x63, 0x74, 0x58, 0x46, 0x69, 0x6c, 0x65, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x28, 0x26, 0x64, 0x78, 0x5f, 0x66, 0x69, 0x6c,
|
||||
0x65, 0x29, 0x3b, 0x0a, 0x23, 0x20, 0x20, 0x68, 0x72, 0x20, 0x3d,
|
||||
0x20, 0x64, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x3e, 0x52,
|
||||
0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x73, 0x28, 0x44, 0x33, 0x44, 0x52, 0x4d,
|
||||
0x5f, 0x58, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x53,
|
||||
0x2c, 0x20, 0x44, 0x33, 0x44, 0x52, 0x4d, 0x5f, 0x58, 0x54, 0x45,
|
||||
0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45,
|
||||
0x53, 0x29, 0x3b, 0x0a, 0x23, 0x20, 0x20, 0x68, 0x72, 0x20, 0x3d,
|
||||
0x20, 0x64, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x3e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x61, 0x76, 0x65, 0x4f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x28, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x2e, 0x78, 0x22, 0x2c, 0x20, 0x44, 0x58, 0x46,
|
||||
0x49, 0x4c, 0x45, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54,
|
||||
0x45, 0x58, 0x54, 0x2c, 0x0a, 0x23, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x26, 0x64, 0x78, 0x5f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x61, 0x76, 0x65, 0x29, 0x3b,
|
||||
0x0a, 0x23, 0x20, 0x20, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x20,
|
||||
0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x47, 0x55, 0x49, 0x44, 0x20,
|
||||
0x2a, 0x74, 0x65, 0x6d, 0x70, 0x73, 0x5b, 0x5d, 0x20, 0x3d, 0x20,
|
||||
0x7b, 0x0a, 0x23, 0x20, 0x20, 0x20, 0x20, 0x26, 0x54, 0x49, 0x44,
|
||||
0x5f, 0x44, 0x33, 0x44, 0x52, 0x4d, 0x49, 0x6e, 0x66, 0x6f, 0x2c,
|
||||
0x0a, 0x23, 0x20, 0x20, 0x20, 0x20, 0x26, 0x54, 0x49, 0x44, 0x5f,
|
||||
0x44, 0x33, 0x44, 0x52, 0x4d, 0x4d, 0x65, 0x73, 0x68, 0x2c, 0x0a,
|
||||
0x23, 0x20, 0x20, 0x20, 0x20, 0x26, 0x54, 0x49, 0x44, 0x5f, 0x44,
|
||||
0x33, 0x44, 0x52, 0x4d, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2c,
|
||||
0x0a, 0x23, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x23,
|
||||
0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x23, 0x20, 0x20, 0x73, 0x74, 0x61,
|
||||
0x74, 0x69, 0x63, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x69,
|
||||
0x6e, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x73, 0x20, 0x3d, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x6f, 0x66, 0x28,
|
||||
0x74, 0x65, 0x6d, 0x70, 0x73, 0x29, 0x20, 0x2f, 0x20, 0x73, 0x69,
|
||||
0x7a, 0x65, 0x6f, 0x66, 0x28, 0x74, 0x65, 0x6d, 0x70, 0x73, 0x5b,
|
||||
0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x23, 0x20, 0x20, 0x68, 0x72, 0x20,
|
||||
0x3d, 0x20, 0x64, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73,
|
||||
0x61, 0x76, 0x65, 0x2d, 0x3e, 0x53, 0x61, 0x76, 0x65, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x28, 0x6e, 0x75, 0x6d,
|
||||
0x5f, 0x74, 0x65, 0x6d, 0x70, 0x73, 0x2c, 0x20, 0x74, 0x65, 0x6d,
|
||||
0x70, 0x73, 0x29, 0x3b, 0x0a, 0x23, 0x0a, 0x0a, 0x0a, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x48, 0x65, 0x61, 0x64,
|
||||
0x65, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x33, 0x64, 0x38, 0x32,
|
||||
0x61, 0x62, 0x34, 0x33, 0x2d, 0x36, 0x32, 0x64, 0x61, 0x2d, 0x31,
|
||||
0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d, 0x30, 0x30,
|
||||
0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33, 0x33, 0x3e,
|
||||
0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6d, 0x61, 0x6a, 0x6f,
|
||||
0x72, 0x3b, 0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6d, 0x69,
|
||||
0x6e, 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44,
|
||||
0x20, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a,
|
||||
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x56, 0x65,
|
||||
0x63, 0x74, 0x6f, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x33, 0x64,
|
||||
0x38, 0x32, 0x61, 0x62, 0x35, 0x65, 0x2d, 0x36, 0x32, 0x64, 0x61,
|
||||
0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d,
|
||||
0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33,
|
||||
0x33, 0x3e, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x78,
|
||||
0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x79, 0x3b,
|
||||
0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x7a, 0x3b, 0x0a,
|
||||
0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x20, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0x20, 0x7b,
|
||||
0x0a, 0x20, 0x3c, 0x33, 0x64, 0x38, 0x32, 0x61, 0x62, 0x35, 0x66,
|
||||
0x2d, 0x36, 0x32, 0x64, 0x61, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d,
|
||||
0x61, 0x62, 0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66,
|
||||
0x37, 0x31, 0x65, 0x34, 0x33, 0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57,
|
||||
0x4f, 0x52, 0x44, 0x20, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x56, 0x65,
|
||||
0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73,
|
||||
0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x44, 0x57,
|
||||
0x4f, 0x52, 0x44, 0x20, 0x66, 0x61, 0x63, 0x65, 0x56, 0x65, 0x72,
|
||||
0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x5b,
|
||||
0x6e, 0x46, 0x61, 0x63, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78,
|
||||
0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x5d, 0x3b, 0x0a, 0x7d,
|
||||
0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x4d, 0x65, 0x73, 0x68, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x33, 0x64,
|
||||
0x38, 0x32, 0x61, 0x62, 0x34, 0x34, 0x2d, 0x36, 0x32, 0x64, 0x61,
|
||||
0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d,
|
||||
0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33,
|
||||
0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e,
|
||||
0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x0a, 0x20,
|
||||
0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x56, 0x65, 0x63, 0x74, 0x6f,
|
||||
0x72, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x5b,
|
||||
0x6e, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x5d, 0x3b,
|
||||
0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x46, 0x61,
|
||||
0x63, 0x65, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
|
||||
0x20, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0x20, 0x66,
|
||||
0x61, 0x63, 0x65, 0x73, 0x5b, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x73,
|
||||
0x5d, 0x3b, 0x0a, 0x20, 0x5b, 0x2e, 0x2e, 0x2e, 0x5d, 0x0a, 0x7d,
|
||||
0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x41, 0x20, 0x7b,
|
||||
0x0a, 0x20, 0x3c, 0x33, 0x35, 0x66, 0x66, 0x34, 0x34, 0x65, 0x30,
|
||||
0x2d, 0x36, 0x63, 0x37, 0x63, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d,
|
||||
0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33,
|
||||
0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x46, 0x4c,
|
||||
0x4f, 0x41, 0x54, 0x20, 0x72, 0x65, 0x64, 0x3b, 0x0a, 0x20, 0x46,
|
||||
0x4c, 0x4f, 0x41, 0x54, 0x20, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x3b,
|
||||
0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x62, 0x6c, 0x75,
|
||||
0x65, 0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x61,
|
||||
0x6c, 0x70, 0x68, 0x61, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x43, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x52, 0x47, 0x42, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x64, 0x33,
|
||||
0x65, 0x31, 0x36, 0x65, 0x38, 0x31, 0x2d, 0x37, 0x38, 0x33, 0x35,
|
||||
0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d,
|
||||
0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61,
|
||||
0x33, 0x3e, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x72,
|
||||
0x65, 0x64, 0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20,
|
||||
0x67, 0x72, 0x65, 0x65, 0x6e, 0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f,
|
||||
0x41, 0x54, 0x20, 0x62, 0x6c, 0x75, 0x65, 0x3b, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x4d,
|
||||
0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x7b, 0x0a, 0x20,
|
||||
0x3c, 0x33, 0x64, 0x38, 0x32, 0x61, 0x62, 0x34, 0x64, 0x2d, 0x36,
|
||||
0x32, 0x64, 0x61, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62,
|
||||
0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31,
|
||||
0x65, 0x34, 0x33, 0x33, 0x3e, 0x0a, 0x20, 0x43, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x52, 0x47, 0x42, 0x41, 0x20, 0x66, 0x61, 0x63, 0x65, 0x43,
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41,
|
||||
0x54, 0x20, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x3b, 0x0a, 0x20, 0x43,
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x20, 0x73, 0x70, 0x65,
|
||||
0x63, 0x75, 0x6c, 0x61, 0x72, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b,
|
||||
0x0a, 0x20, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x20,
|
||||
0x65, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x5b, 0x2e, 0x2e, 0x2e, 0x5d, 0x0a,
|
||||
0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x3c,
|
||||
0x33, 0x64, 0x38, 0x32, 0x61, 0x62, 0x34, 0x36, 0x2d, 0x36, 0x32,
|
||||
0x64, 0x61, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33,
|
||||
0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65,
|
||||
0x34, 0x33, 0x33, 0x3e, 0x0a, 0x20, 0x5b, 0x2e, 0x2e, 0x2e, 0x5d,
|
||||
0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x20, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x34, 0x78, 0x34,
|
||||
0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x66, 0x36, 0x66, 0x32, 0x33, 0x66,
|
||||
0x34, 0x35, 0x2d, 0x37, 0x36, 0x38, 0x36, 0x2d, 0x31, 0x31, 0x63,
|
||||
0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30,
|
||||
0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20,
|
||||
0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54,
|
||||
0x20, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x5b, 0x31, 0x36, 0x5d,
|
||||
0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x20, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x61,
|
||||
0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4d, 0x61, 0x74, 0x72, 0x69,
|
||||
0x78, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x66, 0x36, 0x66, 0x32, 0x33,
|
||||
0x66, 0x34, 0x31, 0x2d, 0x37, 0x36, 0x38, 0x36, 0x2d, 0x31, 0x31,
|
||||
0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34,
|
||||
0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a,
|
||||
0x20, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x34, 0x78, 0x34, 0x20,
|
||||
0x66, 0x72, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78,
|
||||
0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x20, 0x4d, 0x65, 0x73, 0x68, 0x4d, 0x61, 0x74, 0x65,
|
||||
0x72, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x7b, 0x0a,
|
||||
0x20, 0x3c, 0x66, 0x36, 0x66, 0x32, 0x33, 0x66, 0x34, 0x32, 0x2d,
|
||||
0x37, 0x36, 0x38, 0x36, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38,
|
||||
0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33,
|
||||
0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f,
|
||||
0x52, 0x44, 0x20, 0x6e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61,
|
||||
0x6c, 0x73, 0x3b, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20,
|
||||
0x6e, 0x46, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65,
|
||||
0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x44,
|
||||
0x57, 0x4f, 0x52, 0x44, 0x20, 0x66, 0x61, 0x63, 0x65, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x65, 0x73, 0x5b, 0x6e, 0x46, 0x61, 0x63, 0x65,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x5d, 0x3b, 0x0a, 0x20,
|
||||
0x5b, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x20, 0x3c,
|
||||
0x33, 0x64, 0x38, 0x32, 0x61, 0x62, 0x34, 0x64, 0x2d, 0x36, 0x32,
|
||||
0x64, 0x61, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33,
|
||||
0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65,
|
||||
0x34, 0x33, 0x33, 0x3e, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x43, 0x6f, 0x6f, 0x72,
|
||||
0x64, 0x73, 0x32, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x66, 0x36,
|
||||
0x66, 0x32, 0x33, 0x66, 0x34, 0x34, 0x2d, 0x37, 0x36, 0x38, 0x36,
|
||||
0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d,
|
||||
0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61,
|
||||
0x33, 0x3e, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x75,
|
||||
0x3b, 0x0a, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x76, 0x3b,
|
||||
0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x20, 0x4d, 0x65, 0x73, 0x68, 0x54, 0x65, 0x78, 0x74, 0x75,
|
||||
0x72, 0x65, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x20, 0x7b, 0x0a,
|
||||
0x20, 0x3c, 0x66, 0x36, 0x66, 0x32, 0x33, 0x66, 0x34, 0x30, 0x2d,
|
||||
0x37, 0x36, 0x38, 0x36, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38,
|
||||
0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33,
|
||||
0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f,
|
||||
0x52, 0x44, 0x20, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65,
|
||||
0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72,
|
||||
0x72, 0x61, 0x79, 0x20, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x32,
|
||||
0x64, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f,
|
||||
0x6f, 0x72, 0x64, 0x73, 0x5b, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75,
|
||||
0x72, 0x65, 0x43, 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x5d, 0x3b, 0x0a,
|
||||
0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x20, 0x4d, 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c,
|
||||
0x73, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x66, 0x36, 0x66, 0x32, 0x33,
|
||||
0x66, 0x34, 0x33, 0x2d, 0x37, 0x36, 0x38, 0x36, 0x2d, 0x31, 0x31,
|
||||
0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34,
|
||||
0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a,
|
||||
0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x4e, 0x6f, 0x72,
|
||||
0x6d, 0x61, 0x6c, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61,
|
||||
0x79, 0x20, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x20, 0x6e, 0x6f,
|
||||
0x72, 0x6d, 0x61, 0x6c, 0x73, 0x5b, 0x6e, 0x4e, 0x6f, 0x72, 0x6d,
|
||||
0x61, 0x6c, 0x73, 0x5d, 0x3b, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52,
|
||||
0x44, 0x20, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d,
|
||||
0x61, 0x6c, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
|
||||
0x20, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0x20, 0x66,
|
||||
0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x5b,
|
||||
0x6e, 0x46, 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c,
|
||||
0x73, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x20, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x33, 0x64, 0x38,
|
||||
0x32, 0x61, 0x62, 0x34, 0x66, 0x2d, 0x36, 0x32, 0x64, 0x61, 0x2d,
|
||||
0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d, 0x30,
|
||||
0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33, 0x33,
|
||||
0x3e, 0x0a, 0x20, 0x5b, 0x2e, 0x2e, 0x2e, 0x5d, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x41,
|
||||
0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74,
|
||||
0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x33, 0x64, 0x38, 0x32, 0x61, 0x62,
|
||||
0x35, 0x30, 0x2d, 0x36, 0x32, 0x64, 0x61, 0x2d, 0x31, 0x31, 0x63,
|
||||
0x66, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30,
|
||||
0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33, 0x33, 0x3e, 0x0a, 0x20,
|
||||
0x5b, 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20,
|
||||
0x3c, 0x33, 0x64, 0x38, 0x32, 0x61, 0x62, 0x34, 0x66, 0x2d, 0x36,
|
||||
0x32, 0x64, 0x61, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x61, 0x62,
|
||||
0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31,
|
||||
0x65, 0x34, 0x33, 0x33, 0x3e, 0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x74,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x46, 0x6c, 0x6f,
|
||||
0x61, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x3c,
|
||||
0x31, 0x30, 0x64, 0x64, 0x34, 0x36, 0x61, 0x39, 0x2d, 0x37, 0x37,
|
||||
0x35, 0x62, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35,
|
||||
0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39,
|
||||
0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44,
|
||||
0x20, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x3b, 0x0a, 0x20,
|
||||
0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54,
|
||||
0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5b, 0x6e, 0x56, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x73, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, 0x79, 0x73,
|
||||
0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x66, 0x34, 0x30, 0x36, 0x62, 0x31,
|
||||
0x38, 0x30, 0x2d, 0x37, 0x62, 0x33, 0x62, 0x2d, 0x31, 0x31, 0x63,
|
||||
0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30,
|
||||
0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20,
|
||||
0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x3b,
|
||||
0x0a, 0x20, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, 0x79, 0x73,
|
||||
0x20, 0x74, 0x66, 0x6b, 0x65, 0x79, 0x73, 0x3b, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x41,
|
||||
0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79,
|
||||
0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x31, 0x30, 0x64, 0x64, 0x34, 0x36,
|
||||
0x61, 0x38, 0x2d, 0x37, 0x37, 0x35, 0x62, 0x2d, 0x31, 0x31, 0x63,
|
||||
0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30,
|
||||
0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20,
|
||||
0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6b, 0x65, 0x79, 0x54, 0x79,
|
||||
0x70, 0x65, 0x3b, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20,
|
||||
0x6e, 0x4b, 0x65, 0x79, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72,
|
||||
0x61, 0x79, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x46, 0x6c, 0x6f,
|
||||
0x61, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x20, 0x6b, 0x65, 0x79, 0x73,
|
||||
0x5b, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x47,
|
||||
0x75, 0x69, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x61, 0x34, 0x32,
|
||||
0x37, 0x39, 0x30, 0x65, 0x30, 0x2d, 0x37, 0x38, 0x31, 0x30, 0x2d,
|
||||
0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30,
|
||||
0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33,
|
||||
0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x64, 0x61,
|
||||
0x74, 0x61, 0x31, 0x3b, 0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20,
|
||||
0x64, 0x61, 0x74, 0x61, 0x32, 0x3b, 0x0a, 0x20, 0x57, 0x4f, 0x52,
|
||||
0x44, 0x20, 0x64, 0x61, 0x74, 0x61, 0x33, 0x3b, 0x0a, 0x20, 0x61,
|
||||
0x72, 0x72, 0x61, 0x79, 0x20, 0x55, 0x43, 0x48, 0x41, 0x52, 0x20,
|
||||
0x64, 0x61, 0x74, 0x61, 0x34, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d,
|
||||
0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65,
|
||||
0x6e, 0x61, 0x6d, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x61, 0x34,
|
||||
0x32, 0x37, 0x39, 0x30, 0x65, 0x31, 0x2d, 0x37, 0x38, 0x31, 0x30,
|
||||
0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d,
|
||||
0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61,
|
||||
0x33, 0x3e, 0x0a, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x7d,
|
||||
0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x31, 0x36, 0x33, 0x30, 0x62,
|
||||
0x38, 0x32, 0x30, 0x2d, 0x37, 0x38, 0x34, 0x32, 0x2d, 0x31, 0x31,
|
||||
0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34,
|
||||
0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a,
|
||||
0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x3b, 0x0a, 0x20, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47,
|
||||
0x42, 0x41, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x20, 0x4d, 0x65, 0x73, 0x68, 0x56, 0x65,
|
||||
0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x20,
|
||||
0x7b, 0x0a, 0x20, 0x3c, 0x31, 0x36, 0x33, 0x30, 0x62, 0x38, 0x32,
|
||||
0x31, 0x2d, 0x37, 0x38, 0x34, 0x32, 0x2d, 0x31, 0x31, 0x63, 0x66,
|
||||
0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33,
|
||||
0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x44,
|
||||
0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x56, 0x65, 0x72, 0x74, 0x65,
|
||||
0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x3b, 0x0a, 0x20, 0x61,
|
||||
0x72, 0x72, 0x61, 0x79, 0x20, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65,
|
||||
0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x74,
|
||||
0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x5b, 0x6e, 0x56,
|
||||
0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73,
|
||||
0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x20, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e,
|
||||
0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x35, 0x33, 0x37, 0x64, 0x61, 0x36,
|
||||
0x61, 0x30, 0x2d, 0x63, 0x61, 0x33, 0x37, 0x2d, 0x31, 0x31, 0x64,
|
||||
0x30, 0x2d, 0x39, 0x34, 0x31, 0x63, 0x2d, 0x30, 0x30, 0x38, 0x30,
|
||||
0x63, 0x38, 0x30, 0x63, 0x66, 0x61, 0x37, 0x62, 0x3e, 0x0a, 0x20,
|
||||
0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x74, 0x72, 0x75, 0x65, 0x66,
|
||||
0x61, 0x6c, 0x73, 0x65, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x4d, 0x61, 0x74, 0x65,
|
||||
0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, 0x20, 0x7b, 0x0a,
|
||||
0x20, 0x3c, 0x34, 0x38, 0x38, 0x35, 0x61, 0x65, 0x36, 0x30, 0x2d,
|
||||
0x37, 0x38, 0x65, 0x38, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38,
|
||||
0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33,
|
||||
0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x42, 0x6f, 0x6f,
|
||||
0x6c, 0x65, 0x61, 0x6e, 0x20, 0x75, 0x3b, 0x0a, 0x20, 0x42, 0x6f,
|
||||
0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x76, 0x3b, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x42,
|
||||
0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x32, 0x64, 0x20, 0x7b, 0x0a,
|
||||
0x20, 0x3c, 0x34, 0x38, 0x38, 0x35, 0x61, 0x65, 0x36, 0x33, 0x2d,
|
||||
0x37, 0x38, 0x65, 0x38, 0x2d, 0x31, 0x31, 0x63, 0x66, 0x2d, 0x38,
|
||||
0x66, 0x35, 0x32, 0x2d, 0x30, 0x30, 0x34, 0x30, 0x33, 0x33, 0x33,
|
||||
0x35, 0x39, 0x34, 0x61, 0x33, 0x3e, 0x0a, 0x20, 0x42, 0x6f, 0x6f,
|
||||
0x6c, 0x65, 0x61, 0x6e, 0x20, 0x75, 0x3b, 0x0a, 0x20, 0x42, 0x6f,
|
||||
0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x76, 0x3b, 0x0a, 0x7d, 0x0a,
|
||||
0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x4d,
|
||||
0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70,
|
||||
0x73, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x65, 0x64, 0x31, 0x65, 0x63,
|
||||
0x35, 0x63, 0x30, 0x2d, 0x63, 0x30, 0x61, 0x38, 0x2d, 0x31, 0x31,
|
||||
0x64, 0x30, 0x2d, 0x39, 0x34, 0x31, 0x63, 0x2d, 0x30, 0x30, 0x38,
|
||||
0x30, 0x63, 0x38, 0x30, 0x63, 0x66, 0x61, 0x37, 0x62, 0x3e, 0x0a,
|
||||
0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x46, 0x61, 0x63,
|
||||
0x65, 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
|
||||
0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x42, 0x6f,
|
||||
0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x32, 0x64, 0x20, 0x66, 0x61, 0x63,
|
||||
0x65, 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
|
||||
0x5b, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x56,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x73, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a,
|
||||
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x41, 0x6e,
|
||||
0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x65, 0x32, 0x62,
|
||||
0x66, 0x35, 0x36, 0x63, 0x30, 0x2d, 0x38, 0x34, 0x30, 0x66, 0x2d,
|
||||
0x31, 0x31, 0x63, 0x66, 0x2d, 0x38, 0x66, 0x35, 0x32, 0x2d, 0x30,
|
||||
0x30, 0x34, 0x30, 0x33, 0x33, 0x33, 0x35, 0x39, 0x34, 0x61, 0x33,
|
||||
0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6f, 0x70,
|
||||
0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x3b, 0x0a, 0x20,
|
||||
0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x3b,
|
||||
0x0a, 0x7d, 0x0a, 0x0a, 0x23, 0x20, 0x53, 0x69, 0x6e, 0x63, 0x65,
|
||||
0x20, 0x49, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x68, 0x61,
|
||||
0x76, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68,
|
||||
0x65, 0x20, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x65, 0x20, 0x73,
|
||||
0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x20, 0x6d, 0x65, 0x61,
|
||||
0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x0a, 0x23, 0x20, 0x74,
|
||||
0x68, 0x65, 0x20, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x20, 0x6b,
|
||||
0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x2c, 0x20, 0x49, 0x20, 0x63,
|
||||
0x61, 0x6e, 0x27, 0x74, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x20,
|
||||
0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69,
|
||||
0x6e, 0x67, 0x20, 0x79, 0x65, 0x74, 0x2e, 0x0a, 0x0a, 0x23, 0x74,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x49, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x20, 0x7b, 0x0a, 0x23,
|
||||
0x20, 0x3c, 0x33, 0x61, 0x32, 0x33, 0x65, 0x65, 0x61, 0x30, 0x2d,
|
||||
0x39, 0x34, 0x62, 0x31, 0x2d, 0x31, 0x31, 0x64, 0x30, 0x2d, 0x61,
|
||||
0x62, 0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37,
|
||||
0x31, 0x65, 0x34, 0x33, 0x33, 0x3e, 0x0a, 0x23, 0x20, 0x5b, 0x42,
|
||||
0x49, 0x4e, 0x41, 0x52, 0x59, 0x5d, 0x0a, 0x23, 0x7d, 0x0a, 0x23,
|
||||
0x0a, 0x23, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x55, 0x72, 0x6c, 0x20, 0x7b, 0x0a, 0x23, 0x20, 0x3c, 0x33, 0x61,
|
||||
0x32, 0x33, 0x65, 0x65, 0x61, 0x31, 0x2d, 0x39, 0x34, 0x62, 0x31,
|
||||
0x2d, 0x31, 0x31, 0x64, 0x30, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d,
|
||||
0x30, 0x30, 0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33,
|
||||
0x33, 0x3e, 0x0a, 0x23, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20,
|
||||
0x6e, 0x55, 0x72, 0x6c, 0x73, 0x3b, 0x0a, 0x23, 0x20, 0x61, 0x72,
|
||||
0x72, 0x61, 0x79, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20,
|
||||
0x75, 0x72, 0x6c, 0x73, 0x5b, 0x6e, 0x55, 0x72, 0x6c, 0x73, 0x5d,
|
||||
0x3b, 0x0a, 0x23, 0x7d, 0x0a, 0x23, 0x0a, 0x23, 0x74, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x67, 0x72,
|
||||
0x65, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x68, 0x20,
|
||||
0x7b, 0x0a, 0x23, 0x20, 0x3c, 0x38, 0x61, 0x36, 0x33, 0x63, 0x33,
|
||||
0x36, 0x30, 0x2d, 0x39, 0x39, 0x37, 0x64, 0x2d, 0x31, 0x31, 0x64,
|
||||
0x30, 0x2d, 0x39, 0x34, 0x31, 0x63, 0x2d, 0x30, 0x30, 0x38, 0x30,
|
||||
0x63, 0x38, 0x30, 0x63, 0x66, 0x61, 0x37, 0x62, 0x3e, 0x0a, 0x23,
|
||||
0x20, 0x5b, 0x55, 0x72, 0x6c, 0x20, 0x3c, 0x33, 0x61, 0x32, 0x33,
|
||||
0x65, 0x65, 0x61, 0x31, 0x2d, 0x39, 0x34, 0x62, 0x31, 0x2d, 0x31,
|
||||
0x31, 0x64, 0x30, 0x2d, 0x61, 0x62, 0x33, 0x39, 0x2d, 0x30, 0x30,
|
||||
0x32, 0x30, 0x61, 0x66, 0x37, 0x31, 0x65, 0x34, 0x33, 0x33, 0x3e,
|
||||
0x2c, 0x20, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74,
|
||||
0x61, 0x20, 0x3c, 0x33, 0x61, 0x32, 0x33, 0x65, 0x65, 0x61, 0x30,
|
||||
0x2d, 0x39, 0x34, 0x62, 0x31, 0x2d, 0x31, 0x31, 0x64, 0x30, 0x2d,
|
||||
0x61, 0x62, 0x33, 0x39, 0x2d, 0x30, 0x30, 0x32, 0x30, 0x61, 0x66,
|
||||
0x37, 0x31, 0x65, 0x34, 0x33, 0x33, 0x3e, 0x5d, 0x0a, 0x23, 0x7d,
|
||||
0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x20,
|
||||
0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x73,
|
||||
0x75, 0x61, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x39, 0x38, 0x31,
|
||||
0x31, 0x36, 0x61, 0x61, 0x30, 0x2d, 0x62, 0x64, 0x62, 0x61, 0x2d,
|
||||
0x31, 0x31, 0x64, 0x31, 0x2d, 0x38, 0x32, 0x63, 0x30, 0x2d, 0x30,
|
||||
0x30, 0x61, 0x30, 0x63, 0x39, 0x36, 0x39, 0x37, 0x32, 0x37, 0x31,
|
||||
0x3e, 0x0a, 0x20, 0x47, 0x75, 0x69, 0x64, 0x20, 0x67, 0x75, 0x69,
|
||||
0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69,
|
||||
0x73, 0x75, 0x61, 0x6c, 0x3b, 0x0a, 0x20, 0x5b, 0x2e, 0x2e, 0x2e,
|
||||
0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x20, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72,
|
||||
0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x3c,
|
||||
0x37, 0x66, 0x30, 0x66, 0x32, 0x31, 0x65, 0x30, 0x2d, 0x62, 0x66,
|
||||
0x65, 0x31, 0x2d, 0x31, 0x31, 0x64, 0x31, 0x2d, 0x38, 0x32, 0x63,
|
||||
0x30, 0x2d, 0x30, 0x30, 0x61, 0x30, 0x63, 0x39, 0x36, 0x39, 0x37,
|
||||
0x32, 0x37, 0x31, 0x3e, 0x0a, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e,
|
||||
0x47, 0x20, 0x6b, 0x65, 0x79, 0x3b, 0x0a, 0x20, 0x53, 0x54, 0x52,
|
||||
0x49, 0x4e, 0x47, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3b, 0x0a,
|
||||
0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x20, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x61,
|
||||
0x67, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x37, 0x66, 0x30, 0x66, 0x32,
|
||||
0x31, 0x65, 0x31, 0x2d, 0x62, 0x66, 0x65, 0x31, 0x2d, 0x31, 0x31,
|
||||
0x64, 0x31, 0x2d, 0x38, 0x32, 0x63, 0x30, 0x2d, 0x30, 0x30, 0x61,
|
||||
0x30, 0x63, 0x39, 0x36, 0x39, 0x37, 0x32, 0x37, 0x31, 0x3e, 0x0a,
|
||||
0x20, 0x5b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x3c, 0x37, 0x66, 0x30, 0x66,
|
||||
0x32, 0x31, 0x65, 0x30, 0x2d, 0x62, 0x66, 0x65, 0x31, 0x2d, 0x31,
|
||||
0x31, 0x64, 0x31, 0x2d, 0x38, 0x32, 0x63, 0x30, 0x2d, 0x30, 0x30,
|
||||
0x61, 0x30, 0x63, 0x39, 0x36, 0x39, 0x37, 0x32, 0x37, 0x31, 0x3e,
|
||||
0x5d, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x20, 0x52, 0x69, 0x67, 0x68, 0x74, 0x48, 0x61, 0x6e,
|
||||
0x64, 0x65, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x37, 0x66, 0x35,
|
||||
0x64, 0x35, 0x65, 0x61, 0x30, 0x2d, 0x64, 0x35, 0x33, 0x61, 0x2d,
|
||||
0x31, 0x31, 0x64, 0x31, 0x2d, 0x38, 0x32, 0x63, 0x30, 0x2d, 0x30,
|
||||
0x30, 0x61, 0x30, 0x63, 0x39, 0x36, 0x39, 0x37, 0x32, 0x37, 0x31,
|
||||
0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x62, 0x52,
|
||||
0x69, 0x67, 0x68, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x65, 0x64, 0x3b,
|
||||
0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x20, 0x58, 0x53, 0x6b, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x68,
|
||||
0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x7b, 0x0a, 0x20, 0x3c,
|
||||
0x33, 0x63, 0x66, 0x31, 0x36, 0x39, 0x63, 0x65, 0x2d, 0x66, 0x66,
|
||||
0x37, 0x63, 0x2d, 0x34, 0x34, 0x61, 0x62, 0x2d, 0x39, 0x33, 0x63,
|
||||
0x30, 0x2d, 0x66, 0x37, 0x38, 0x66, 0x36, 0x32, 0x64, 0x31, 0x37,
|
||||
0x32, 0x65, 0x32, 0x3e, 0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20,
|
||||
0x6e, 0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6e, 0x57, 0x65, 0x69,
|
||||
0x67, 0x68, 0x74, 0x73, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74,
|
||||
0x65, 0x78, 0x3b, 0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e,
|
||||
0x4d, 0x61, 0x78, 0x53, 0x6b, 0x69, 0x6e, 0x57, 0x65, 0x69, 0x67,
|
||||
0x68, 0x74, 0x73, 0x50, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x3b,
|
||||
0x0a, 0x20, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x42, 0x6f, 0x6e,
|
||||
0x65, 0x73, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x20, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78,
|
||||
0x44, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x20, 0x7b, 0x0a, 0x20,
|
||||
0x3c, 0x62, 0x38, 0x64, 0x36, 0x35, 0x35, 0x34, 0x39, 0x2d, 0x64,
|
||||
0x37, 0x63, 0x39, 0x2d, 0x34, 0x39, 0x39, 0x35, 0x2d, 0x38, 0x39,
|
||||
0x63, 0x66, 0x2d, 0x35, 0x33, 0x61, 0x39, 0x61, 0x38, 0x62, 0x30,
|
||||
0x33, 0x31, 0x65, 0x33, 0x3e, 0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52,
|
||||
0x44, 0x20, 0x6e, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x3b,
|
||||
0x0a, 0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x4f, 0x72,
|
||||
0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x56, 0x65, 0x72, 0x74, 0x69,
|
||||
0x63, 0x65, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79,
|
||||
0x20, 0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x69, 0x6e, 0x64, 0x69,
|
||||
0x63, 0x65, 0x73, 0x5b, 0x6e, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65,
|
||||
0x73, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x20, 0x53, 0x6b, 0x69, 0x6e, 0x57, 0x65,
|
||||
0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x3c, 0x36,
|
||||
0x66, 0x30, 0x64, 0x31, 0x32, 0x33, 0x62, 0x2d, 0x62, 0x61, 0x64,
|
||||
0x32, 0x2d, 0x34, 0x31, 0x36, 0x37, 0x2d, 0x61, 0x30, 0x64, 0x30,
|
||||
0x2d, 0x38, 0x30, 0x32, 0x32, 0x34, 0x66, 0x32, 0x35, 0x66, 0x61,
|
||||
0x62, 0x62, 0x3e, 0x0a, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47,
|
||||
0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x4e,
|
||||
0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3b, 0x0a, 0x20, 0x44,
|
||||
0x57, 0x4f, 0x52, 0x44, 0x20, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68,
|
||||
0x74, 0x73, 0x3b, 0x0a, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20,
|
||||
0x44, 0x57, 0x4f, 0x52, 0x44, 0x20, 0x76, 0x65, 0x72, 0x74, 0x65,
|
||||
0x78, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x5b, 0x6e, 0x57,
|
||||
0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5d, 0x3b, 0x0a, 0x20, 0x61,
|
||||
0x72, 0x72, 0x61, 0x79, 0x20, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20,
|
||||
0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x73, 0x5b, 0x6e, 0x57, 0x65,
|
||||
0x69, 0x67, 0x68, 0x74, 0x73, 0x5d, 0x3b, 0x0a, 0x20, 0x4d, 0x61,
|
||||
0x74, 0x72, 0x69, 0x78, 0x34, 0x78, 0x34, 0x20, 0x6d, 0x61, 0x74,
|
||||
0x72, 0x69, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x3b, 0x0a,
|
||||
0x7d, 0x0a
|
||||
};
|
||||
|
||||
const int standard_templates_data_len = 5403;
|
||||
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
|
||||
/*
|
||||
* This table was generated by the command:
|
||||
*
|
||||
* bin2c -n standard_templates_data -o standardTemplates.x.pz.c standardTemplates.x.pz
|
||||
*/
|
||||
|
||||
const unsigned char standard_templates_data[] = {
|
||||
0x78, 0x9c, 0xa5, 0x58, 0x6b, 0x6f, 0xdb, 0x38, 0x16, 0xfd, 0x9e,
|
||||
0x5f, 0x41, 0x4c, 0x80, 0x6e, 0x67, 0x11, 0x65, 0xf5, 0x7e, 0x8c,
|
||||
0x3b, 0x05, 0x9c, 0x3a, 0x69, 0xbd, 0x93, 0x17, 0x6c, 0x37, 0xcd,
|
||||
0xc0, 0x08, 0x02, 0x4a, 0x24, 0x6d, 0xb6, 0xb2, 0xe4, 0x95, 0xe4,
|
||||
0xd4, 0xe9, 0xa2, 0xff, 0x7d, 0x2f, 0x49, 0x49, 0x96, 0xe4, 0x64,
|
||||
0x65, 0xa0, 0x41, 0x90, 0x98, 0xaf, 0x73, 0xcf, 0x3d, 0xbc, 0xbc,
|
||||
0xe4, 0xf5, 0x36, 0x65, 0x48, 0xb7, 0x74, 0xab, 0xd8, 0x16, 0x48,
|
||||
0xd7, 0x2d, 0xf3, 0xe8, 0xe8, 0x18, 0xcd, 0x96, 0x3c, 0x47, 0x8c,
|
||||
0xc7, 0x14, 0x45, 0x69, 0x52, 0x60, 0x9e, 0xe4, 0xa8, 0x58, 0x52,
|
||||
0x94, 0x17, 0x38, 0x21, 0x38, 0x23, 0xa8, 0xa0, 0xab, 0x75, 0x8c,
|
||||
0x0b, 0x8a, 0x08, 0x65, 0x3c, 0xe1, 0x05, 0x4f, 0x61, 0x06, 0x4b,
|
||||
0x33, 0x34, 0xe2, 0x19, 0x8d, 0x0a, 0x6b, 0x04, 0x18, 0x13, 0x2a,
|
||||
0x16, 0x52, 0x82, 0xae, 0x52, 0x42, 0x4f, 0x11, 0x1a, 0x23, 0xba,
|
||||
0x2d, 0x32, 0x1c, 0x15, 0xd0, 0x05, 0x60, 0x39, 0x45, 0x2c, 0x4b,
|
||||
0x57, 0x12, 0x57, 0xad, 0xba, 0x47, 0xc3, 0xdb, 0x31, 0x7a, 0xe2,
|
||||
0x18, 0xe5, 0xe9, 0x8a, 0x16, 0x4b, 0x9e, 0x2c, 0x00, 0x26, 0xe6,
|
||||
0xdf, 0xa8, 0x9c, 0xc4, 0xd2, 0x38, 0x4e, 0xbf, 0x43, 0x27, 0x70,
|
||||
0x22, 0xf4, 0x8f, 0xa3, 0x63, 0x18, 0x44, 0xc7, 0x3c, 0x89, 0xe2,
|
||||
0x0d, 0xa1, 0xe8, 0x5d, 0xb6, 0xda, 0xb2, 0x02, 0x58, 0x9d, 0x2e,
|
||||
0xdf, 0xab, 0xa1, 0xcb, 0xdb, 0xd1, 0x78, 0x72, 0xfe, 0x61, 0x76,
|
||||
0x7f, 0x31, 0xbe, 0x3c, 0x47, 0x64, 0xfb, 0x28, 0xfc, 0x19, 0xec,
|
||||
0x8d, 0x4c, 0x87, 0x77, 0xe7, 0x37, 0x67, 0xff, 0x86, 0x66, 0x35,
|
||||
0xe7, 0x31, 0xc7, 0x4f, 0x6a, 0xe2, 0xa7, 0xc9, 0xf9, 0xf4, 0xf3,
|
||||
0xe5, 0x0c, 0x2d, 0xb3, 0x81, 0xc2, 0x5c, 0x66, 0xe8, 0xcf, 0x8a,
|
||||
0xed, 0x05, 0x4c, 0xfd, 0x90, 0x51, 0x50, 0xe1, 0xed, 0x9b, 0x72,
|
||||
0xe5, 0xef, 0x83, 0x7a, 0x52, 0xd9, 0xa3, 0xbd, 0x9f, 0xd0, 0x05,
|
||||
0xcf, 0x0b, 0x9a, 0xcd, 0x4a, 0xc9, 0xf2, 0xb7, 0x23, 0x6b, 0x34,
|
||||
0xb9, 0x7a, 0xbc, 0x9f, 0x9d, 0x5f, 0xdd, 0x5e, 0x0e, 0x67, 0xe7,
|
||||
0xd3, 0x13, 0xd4, 0xe9, 0x79, 0x3c, 0xfb, 0x1b, 0xba, 0x5f, 0x02,
|
||||
0x53, 0xf6, 0xa6, 0xc0, 0xef, 0x26, 0xfc, 0x0a, 0x24, 0xde, 0xfe,
|
||||
0x26, 0xfa, 0x13, 0xbc, 0xa2, 0xa7, 0xdb, 0xdf, 0x00, 0x47, 0x7a,
|
||||
0x74, 0x71, 0x33, 0xb9, 0x1a, 0xce, 0x1e, 0x67, 0xe7, 0xf7, 0xb3,
|
||||
0x13, 0x01, 0xd1, 0xf7, 0xf3, 0xa6, 0xe9, 0xb7, 0xb2, 0x0a, 0x1b,
|
||||
0x5d, 0xf0, 0x48, 0x6c, 0x7e, 0x5e, 0xa0, 0x8f, 0x9f, 0xc7, 0x23,
|
||||
0xf4, 0x4f, 0xb1, 0xe5, 0xf9, 0xfc, 0x01, 0xd8, 0xfc, 0x57, 0x81,
|
||||
0xbe, 0x99, 0x8d, 0x47, 0x8f, 0x92, 0xf9, 0x38, 0x61, 0xe9, 0x49,
|
||||
0xb7, 0xf3, 0x8a, 0xe6, 0xcb, 0xbd, 0xce, 0x3b, 0xe0, 0x9c, 0x66,
|
||||
0x65, 0xf7, 0xe9, 0xe9, 0xa9, 0xf8, 0xf0, 0x73, 0xdf, 0x22, 0x4f,
|
||||
0x0a, 0x94, 0x6c, 0x56, 0x8f, 0xd2, 0x26, 0x58, 0xcc, 0xf9, 0x0f,
|
||||
0x9a, 0xb2, 0xb7, 0xb2, 0xf9, 0x3b, 0xfa, 0x57, 0xab, 0x3d, 0xd7,
|
||||
0x1f, 0xf6, 0x95, 0x92, 0xae, 0x68, 0xef, 0x85, 0x50, 0x3b, 0xdd,
|
||||
0x6b, 0xc4, 0x13, 0xa4, 0x90, 0xc4, 0xa6, 0x1e, 0x1d, 0xd5, 0xb1,
|
||||
0xfc, 0x89, 0x62, 0x42, 0x33, 0x70, 0x0f, 0xbd, 0xb3, 0x88, 0x6f,
|
||||
0xe2, 0xd0, 0xb6, 0x34, 0xd7, 0x24, 0x58, 0x33, 0x8c, 0x88, 0x69,
|
||||
0x38, 0xb4, 0x02, 0x4d, 0xd7, 0x4d, 0x1d, 0x33, 0xcf, 0xa0, 0xb6,
|
||||
0x65, 0xbd, 0x3f, 0x42, 0x5f, 0x6e, 0x26, 0x23, 0xb4, 0xc2, 0x5f,
|
||||
0x53, 0x88, 0x8f, 0xb2, 0xc1, 0x13, 0xd9, 0x18, 0xc9, 0x16, 0x8b,
|
||||
0xf1, 0x22, 0x1f, 0x1c, 0xfd, 0x6c, 0x18, 0x51, 0x0a, 0x34, 0x8c,
|
||||
0x38, 0xb4, 0xc7, 0xc8, 0xc5, 0xe5, 0xcd, 0x70, 0x86, 0xb6, 0x83,
|
||||
0xea, 0xd3, 0x73, 0xfd, 0xe9, 0x47, 0x1b, 0x5a, 0x28, 0x7e, 0x81,
|
||||
0x23, 0xda, 0x04, 0x67, 0x3d, 0xe0, 0x8a, 0x67, 0x22, 0x96, 0xdd,
|
||||
0xd1, 0xac, 0xa0, 0xdb, 0x71, 0x42, 0x78, 0x44, 0x81, 0x34, 0xc2,
|
||||
0x59, 0x86, 0x9f, 0x2b, 0x47, 0xba, 0xe3, 0xf3, 0xfd, 0x25, 0x0f,
|
||||
0xfb, 0x6c, 0x9a, 0x5a, 0xda, 0x87, 0x31, 0x11, 0x90, 0x2d, 0x02,
|
||||
0xa5, 0x60, 0x4f, 0x65, 0xff, 0xbc, 0x9e, 0xf1, 0x30, 0x68, 0xd1,
|
||||
0xdf, 0xad, 0xa8, 0x75, 0x10, 0xac, 0x4b, 0xa6, 0x72, 0xf6, 0x1c,
|
||||
0x22, 0xee, 0xa1, 0x45, 0xf2, 0x43, 0x1a, 0xa7, 0xd9, 0xe4, 0xe3,
|
||||
0xd9, 0x50, 0x31, 0x75, 0x18, 0xb3, 0x6d, 0xaa, 0x6b, 0x6e, 0xe4,
|
||||
0x45, 0x8a, 0xa9, 0xcf, 0x1c, 0x13, 0x98, 0xda, 0xba, 0x65, 0x59,
|
||||
0x4e, 0x60, 0xe3, 0xdd, 0x86, 0x64, 0x94, 0xd4, 0x1b, 0xb1, 0xc8,
|
||||
0x28, 0x4d, 0xea, 0x56, 0x18, 0x6f, 0x68, 0xdd, 0xc0, 0xf1, 0x7a,
|
||||
0x89, 0x07, 0x2f, 0x1a, 0x95, 0x36, 0x89, 0x45, 0x0d, 0x97, 0xfa,
|
||||
0x86, 0xe6, 0xf9, 0x96, 0xf3, 0xab, 0x36, 0x5b, 0xfa, 0xc3, 0x9f,
|
||||
0x8c, 0xe3, 0xb8, 0xb9, 0x07, 0xa4, 0x67, 0x0f, 0x76, 0x72, 0x08,
|
||||
0xe9, 0x64, 0xab, 0xb6, 0xb0, 0x4e, 0xbf, 0x53, 0xd1, 0xaa, 0xd9,
|
||||
0xe7, 0x6b, 0x1a, 0x6d, 0x62, 0x9c, 0x55, 0xd3, 0xea, 0x01, 0xba,
|
||||
0xe2, 0x79, 0xce, 0x9f, 0xea, 0xf5, 0xfb, 0xb2, 0x5f, 0x64, 0x90,
|
||||
0xb1, 0x9a, 0xc4, 0xdc, 0x1e, 0x62, 0xfb, 0x10, 0xe0, 0x5e, 0xc6,
|
||||
0xb7, 0xf6, 0xd6, 0x96, 0x30, 0xcc, 0x65, 0xa6, 0xc5, 0x6c, 0x47,
|
||||
0xf3, 0x5c, 0xdf, 0x7d, 0x5d, 0x45, 0x15, 0x1f, 0xca, 0x9f, 0x95,
|
||||
0x04, 0x98, 0x1b, 0x6e, 0x27, 0x6e, 0x25, 0xb7, 0x59, 0x86, 0x93,
|
||||
0x1c, 0xee, 0xb3, 0x95, 0x32, 0xd3, 0xb4, 0x61, 0xf4, 0xd8, 0xd8,
|
||||
0x11, 0x63, 0x02, 0x49, 0x35, 0xf7, 0x8f, 0x46, 0xb5, 0x3d, 0x97,
|
||||
0x70, 0x39, 0x34, 0xe1, 0xcd, 0x1e, 0xf8, 0x32, 0xe2, 0xab, 0xe5,
|
||||
0x79, 0xfb, 0x10, 0xc0, 0x51, 0xa4, 0xdb, 0x17, 0x4f, 0x6f, 0x39,
|
||||
0x32, 0x6f, 0x4e, 0x93, 0x67, 0xa2, 0x8e, 0x93, 0xc3, 0x82, 0xa4,
|
||||
0x7b, 0x7e, 0xd2, 0x8c, 0xe4, 0x26, 0x69, 0x7a, 0x60, 0xf7, 0x78,
|
||||
0xa0, 0xe4, 0xdf, 0xd4, 0x81, 0xf5, 0xb4, 0x2f, 0xce, 0x0c, 0x5e,
|
||||
0x0a, 0x9b, 0x8c, 0x2a, 0xf4, 0x26, 0xb6, 0x7e, 0x98, 0x3a, 0xad,
|
||||
0xf5, 0xb5, 0x18, 0x35, 0xd9, 0xa2, 0x39, 0x3c, 0x6f, 0xcf, 0x7e,
|
||||
0x21, 0x8b, 0x5d, 0x43, 0x1c, 0x80, 0xd2, 0x4d, 0x1e, 0xd6, 0x61,
|
||||
0x3c, 0xca, 0x95, 0xdd, 0x5c, 0x96, 0xa8, 0xee, 0x79, 0x35, 0xde,
|
||||
0xc9, 0x64, 0xdd, 0x55, 0xad, 0x7c, 0x76, 0x5d, 0xad, 0x6d, 0xcc,
|
||||
0xec, 0x70, 0x1e, 0x26, 0x1c, 0x82, 0x1b, 0x9e, 0x64, 0xcd, 0x13,
|
||||
0xd6, 0x77, 0x11, 0xec, 0x9f, 0xb0, 0x1a, 0x66, 0x4a, 0x8b, 0xe6,
|
||||
0x95, 0xa2, 0xf7, 0x21, 0xed, 0xec, 0x1f, 0x66, 0xbc, 0x93, 0x1b,
|
||||
0xe2, 0x14, 0x17, 0x7f, 0xd1, 0x67, 0xa5, 0xb7, 0xa1, 0x13, 0x62,
|
||||
0xbb, 0x38, 0xd0, 0x3c, 0xcf, 0x09, 0x7b, 0xf5, 0xbe, 0xc3, 0x90,
|
||||
0x06, 0x77, 0xc2, 0x95, 0xf1, 0x25, 0x3b, 0xe7, 0xe5, 0x60, 0x47,
|
||||
0xab, 0x19, 0x5f, 0x51, 0xd2, 0x36, 0x09, 0x51, 0xe6, 0x86, 0x86,
|
||||
0x0f, 0xa1, 0x16, 0x5a, 0xbd, 0x26, 0x0b, 0x58, 0x2f, 0x22, 0xb9,
|
||||
0x46, 0x28, 0xd8, 0x37, 0xf8, 0xf7, 0xca, 0x86, 0xc0, 0x8c, 0xa6,
|
||||
0x57, 0xfe, 0x41, 0x5e, 0x01, 0xde, 0xec, 0x79, 0x4d, 0x77, 0x31,
|
||||
0xf2, 0x97, 0x34, 0x50, 0xfa, 0xd8, 0x71, 0x40, 0x18, 0x9f, 0xcb,
|
||||
0x19, 0x1d, 0x47, 0x3f, 0x6e, 0xb8, 0x3a, 0xa5, 0xd8, 0x36, 0xbd,
|
||||
0x40, 0x87, 0x4b, 0xce, 0xf3, 0x0d, 0xbd, 0xcf, 0x36, 0xc1, 0x05,
|
||||
0x36, 0xaa, 0xb7, 0x8d, 0x68, 0x98, 0xcd, 0x86, 0x55, 0xb3, 0xf8,
|
||||
0xfc, 0xe1, 0xd3, 0x70, 0x22, 0xfb, 0xec, 0xb9, 0xdf, 0x95, 0x58,
|
||||
0x1d, 0xaf, 0x8b, 0xf2, 0xa1, 0xda, 0x24, 0x61, 0xf4, 0x90, 0x98,
|
||||
0xce, 0x26, 0xe3, 0xeb, 0x8f, 0xa8, 0x7a, 0xe3, 0xb6, 0x71, 0x55,
|
||||
0x12, 0x23, 0xf2, 0x96, 0x51, 0xaa, 0xba, 0x96, 0x1e, 0xfa, 0xa6,
|
||||
0xf0, 0x0c, 0xd2, 0x68, 0x8f, 0x67, 0x5c, 0xac, 0x1e, 0x34, 0xaf,
|
||||
0x3c, 0xd9, 0x53, 0xde, 0x59, 0xdd, 0x14, 0xa0, 0x1e, 0x3a, 0x72,
|
||||
0x30, 0x6f, 0xda, 0x32, 0x0e, 0xb2, 0x95, 0x34, 0x97, 0xd7, 0x9a,
|
||||
0xb5, 0xf8, 0x3f, 0x35, 0x66, 0xcc, 0x5b, 0xf3, 0x3b, 0x6a, 0x9e,
|
||||
0xa5, 0x69, 0x4c, 0xb1, 0x3a, 0xda, 0x8e, 0xe5, 0x11, 0xec, 0x62,
|
||||
0x5d, 0x8b, 0xb0, 0xe5, 0x01, 0x09, 0xa2, 0x6b, 0x81, 0x6d, 0x44,
|
||||
0x40, 0xc2, 0xd7, 0x23, 0xf8, 0x65, 0xd8, 0x0b, 0x77, 0x91, 0x9a,
|
||||
0x6d, 0x28, 0x83, 0x64, 0xf1, 0xca, 0x33, 0xe1, 0x4b, 0x86, 0xd7,
|
||||
0x12, 0xd4, 0xf6, 0x7d, 0x07, 0x53, 0x57, 0xa8, 0x48, 0xfd, 0xd7,
|
||||
0x3d, 0xab, 0x78, 0x88, 0x3c, 0x5e, 0x7d, 0x7e, 0x7a, 0x91, 0x6a,
|
||||
0x79, 0x3b, 0x94, 0xb8, 0xd6, 0xaf, 0xe3, 0x56, 0xf9, 0x50, 0x50,
|
||||
0x56, 0xbb, 0x41, 0x89, 0x41, 0x23, 0x27, 0x02, 0x21, 0x74, 0xec,
|
||||
0xf7, 0x09, 0x91, 0x54, 0x6b, 0x3b, 0xd9, 0x62, 0x47, 0x97, 0xb5,
|
||||
0x26, 0xcc, 0x3b, 0x0b, 0x5e, 0xcb, 0xb6, 0x37, 0x6b, 0x55, 0x06,
|
||||
0x4b, 0x42, 0x66, 0xc8, 0x1c, 0x17, 0x08, 0xf9, 0xb6, 0xce, 0xfa,
|
||||
0xc2, 0x23, 0x5d, 0x53, 0x28, 0x62, 0xd3, 0x5c, 0x3e, 0xee, 0x54,
|
||||
0xd7, 0x3a, 0xcd, 0x65, 0x51, 0xfd, 0x9f, 0x0d, 0x8e, 0x79, 0xf1,
|
||||
0x2c, 0x2d, 0x1e, 0xa3, 0x29, 0x14, 0xbb, 0x10, 0xf7, 0x88, 0xa4,
|
||||
0xc9, 0x3f, 0x0a, 0xb4, 0x84, 0xe2, 0x06, 0x3e, 0x46, 0x9b, 0x15,
|
||||
0x4d, 0x0a, 0x95, 0x6f, 0xe1, 0x57, 0x54, 0xca, 0x6b, 0xa8, 0x4f,
|
||||
0x39, 0xd4, 0xd7, 0x39, 0x5d, 0xe1, 0x44, 0x54, 0x55, 0x2b, 0xf0,
|
||||
0x4b, 0x14, 0xce, 0x29, 0x03, 0x14, 0x31, 0xe3, 0x6c, 0x7c, 0x3d,
|
||||
0x9c, 0xfc, 0x2d, 0xb2, 0xc5, 0x77, 0xb8, 0xf4, 0x4e, 0x00, 0x33,
|
||||
0xc2, 0x02, 0x73, 0x8d, 0xb3, 0xbc, 0x5b, 0x6d, 0x3f, 0xd3, 0xe2,
|
||||
0x14, 0xac, 0x37, 0xce, 0x5d, 0x0c, 0x65, 0xfd, 0x08, 0xce, 0xba,
|
||||
0xac, 0x04, 0xdf, 0x59, 0xd8, 0xb4, 0x28, 0xc5, 0x42, 0xf2, 0xd0,
|
||||
0x50, 0xe2, 0xbf, 0x70, 0x2d, 0x1c, 0xa3, 0xb9, 0x32, 0xfa, 0x70,
|
||||
0x74, 0xfc, 0x53, 0x14, 0xd3, 0x35, 0xde, 0xe7, 0x2c, 0x6e, 0x01,
|
||||
0x19, 0x7d, 0x40, 0xe5, 0x36, 0xc2, 0xba, 0x5c, 0x14, 0x7e, 0x6a,
|
||||
0xf7, 0xca, 0x54, 0xb1, 0xc9, 0xc4, 0xdd, 0x28, 0x86, 0x60, 0x9b,
|
||||
0x3a, 0x86, 0x6e, 0xb3, 0x14, 0x1e, 0xcd, 0xf2, 0x69, 0x5a, 0x16,
|
||||
0x27, 0x60, 0xd4, 0xc7, 0xae, 0x15, 0x59, 0x10, 0xee, 0x41, 0xe0,
|
||||
0x91, 0x57, 0x43, 0x07, 0xd8, 0x0b, 0x9a, 0x87, 0x51, 0x3c, 0x69,
|
||||
0x4a, 0x74, 0x98, 0x3c, 0x52, 0x94, 0x5d, 0x4c, 0x9d, 0x6f, 0xe1,
|
||||
0x50, 0x26, 0x38, 0xbe, 0xe3, 0xf9, 0xa6, 0x7c, 0xc1, 0x07, 0xbe,
|
||||
0x61, 0xb8, 0x18, 0x60, 0x42, 0x12, 0x8a, 0x9b, 0x94, 0x18, 0x9a,
|
||||
0x6f, 0x42, 0x80, 0xe9, 0x3a, 0xd6, 0xa3, 0xc0, 0x0d, 0x3c, 0xd3,
|
||||
0x33, 0x20, 0xa2, 0x64, 0x9a, 0x5f, 0xc0, 0x9f, 0x36, 0xc4, 0x8b,
|
||||
0xaf, 0xf0, 0x29, 0xbc, 0x4c, 0x93, 0x05, 0xa8, 0xb2, 0x86, 0x74,
|
||||
0xa3, 0x2e, 0x26, 0x8f, 0xe9, 0xcc, 0x34, 0xe0, 0x72, 0x08, 0x19,
|
||||
0x35, 0x5e, 0xb7, 0x52, 0x8a, 0x0d, 0xe1, 0x33, 0xa8, 0x1b, 0xf2,
|
||||
0x9a, 0x6d, 0x1f, 0x8d, 0x0a, 0xfa, 0x0c, 0x2f, 0x9a, 0xe8, 0x46,
|
||||
0x0f, 0xfa, 0xbc, 0x43, 0xec, 0x30, 0x56, 0x6d, 0xdf, 0x26, 0x7c,
|
||||
0xb1, 0x2c, 0x3e, 0x61, 0x48, 0xb1, 0xa4, 0x34, 0xed, 0x10, 0x47,
|
||||
0xec, 0x02, 0x71, 0xac, 0xff, 0x23, 0x9f, 0x0a, 0xad, 0xb0, 0xb1,
|
||||
0xba, 0xed, 0xd1, 0xfd, 0xf4, 0x1b, 0x4f, 0x44, 0xf0, 0x34, 0xbf,
|
||||
0x2b, 0x88, 0x98, 0xe1, 0x06, 0x11, 0xd5, 0x18, 0x83, 0xaa, 0xd1,
|
||||
0xb6, 0x71, 0xa8, 0x05, 0x16, 0x40, 0x33, 0xcf, 0x67, 0xf0, 0xec,
|
||||
0x31, 0x3c, 0x93, 0x9a, 0xd5, 0x77, 0x05, 0xf0, 0x6e, 0xdf, 0x0a,
|
||||
0x88, 0x2f, 0x54, 0x58, 0xc8, 0x6f, 0x69, 0xa6, 0x52, 0xfd, 0xe0,
|
||||
0xd5, 0x71, 0x91, 0x7b, 0xea, 0xd1, 0xb3, 0x34, 0xa1, 0x7b, 0xdf,
|
||||
0x27, 0x88, 0xf5, 0xa3, 0xcd, 0x3a, 0xe6, 0x91, 0x4c, 0x02, 0x65,
|
||||
0x35, 0x2e, 0xa9, 0x85, 0x3e, 0x71, 0x1d, 0xc7, 0x0e, 0x34, 0xe2,
|
||||
0x45, 0x81, 0x66, 0x07, 0x81, 0xa3, 0xf9, 0x01, 0xe4, 0x22, 0xd0,
|
||||
0x20, 0xc0, 0x7e, 0xa8, 0x5b, 0x06, 0x6d, 0xdc, 0x52, 0xbb, 0xd2,
|
||||
0xbf, 0xec, 0xb8, 0xc9, 0xf8, 0x82, 0x8b, 0x18, 0xea, 0xd6, 0xe4,
|
||||
0xf5, 0x15, 0xaa, 0x2a, 0xf2, 0x97, 0xbf, 0x00, 0x68, 0xf8, 0x21,
|
||||
0xc9, 0xb8, 0x4c, 0x27, 0x86, 0x09, 0x4f, 0xaa, 0x10, 0x13, 0x53,
|
||||
0xb3, 0x0d, 0xd7, 0xd3, 0xb0, 0x0e, 0xa7, 0xc1, 0xd7, 0x4d, 0xd3,
|
||||
0x66, 0xa6, 0xc3, 0x70, 0x18, 0xee, 0x62, 0xab, 0xa8, 0x2a, 0xb0,
|
||||
0xeb, 0x94, 0xd0, 0x6b, 0x79, 0xf9, 0x57, 0xb4, 0x4a, 0xd0, 0x0e,
|
||||
0x9b, 0xa7, 0xf6, 0xd7, 0x13, 0xe5, 0xa4, 0x87, 0xce, 0x63, 0xf0,
|
||||
0xbb, 0xea, 0x6e, 0x8d, 0xef, 0x2a, 0x36, 0x55, 0x13, 0xde, 0x30,
|
||||
0x96, 0xd3, 0x42, 0x38, 0xf3, 0x3f, 0x07, 0x7e, 0x59, 0x36
|
||||
};
|
||||
|
||||
const int standard_templates_data_len = 1814;
|
||||
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
// Filename: standard_templates.cxx
|
||||
// Created by: drose (04Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "standard_templates.h"
|
||||
|
||||
// The binary data included here was generated from standardTemplates.x
|
||||
// (in this directory) file via the utility program bin2c (defined in
|
||||
// pandatool). It contains the set of template definitions that must be
|
||||
// loaded before any standard template file can be properly interpreted.
|
||||
|
||||
#ifndef CPPPARSER
|
||||
|
||||
#if defined(HAVE_ZLIB)
|
||||
|
||||
// If we have zlib available, we can store this file compressed, which
|
||||
// is much smaller.
|
||||
|
||||
// Regenerate this file with:
|
||||
|
||||
// pcompress standardTemplates.x standardTemplates.x.pz
|
||||
// bin2c -n standard_templates_data -o standardTemplates.x.pz.c standardTemplates.x.pz
|
||||
|
||||
#include "standardTemplates.x.pz.c"
|
||||
|
||||
#else // HAVE_ZLIB
|
||||
|
||||
// If we don't have zlib, just include the whole uncompressed file.
|
||||
|
||||
// Regenerate this file with:
|
||||
|
||||
// bin2c -n standard_templates_data -o standardTemplates.x.c standardTemplates.x
|
||||
|
||||
#include "standardTemplates.x.c"
|
||||
|
||||
#endif // HAVE_ZLIB
|
||||
|
||||
#endif // CPPPARSER
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
// Filename: standard_templates.h
|
||||
// Created by: drose (04Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef STANDARD_TEMPLATES_H
|
||||
#define STANDARD_TEMPLATES_H
|
||||
|
||||
#include "pandatoolbase.h"
|
||||
|
||||
#ifndef CPPPARSER
|
||||
|
||||
extern const unsigned char standard_templates_data[];
|
||||
extern const int standard_templates_data_len;
|
||||
|
||||
#endif // CPPPARSER
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -19,11 +19,16 @@
|
|||
#include "xFile.h"
|
||||
#include "xParserDefs.h"
|
||||
#include "xLexerDefs.h"
|
||||
#include "xFileTemplate.h"
|
||||
#include "config_xfile.h"
|
||||
#include "standard_templates.h"
|
||||
#include "zStream.h"
|
||||
#include "config_express.h"
|
||||
#include "virtualFileSystem.h"
|
||||
#include "dcast.h"
|
||||
|
||||
TypeHandle XFile::_type_handle;
|
||||
PT(XFile) XFile::_standard_templates;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFile::Constructor
|
||||
|
|
@ -31,9 +36,9 @@ TypeHandle XFile::_type_handle;
|
|||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
XFile::
|
||||
XFile() : XFileNode("xfile") {
|
||||
_major_version = 1;
|
||||
_minor_version = 1;
|
||||
XFile() : XFileNode("") {
|
||||
_major_version = 3;
|
||||
_minor_version = 2;
|
||||
_format_type = FT_text;
|
||||
_float_size = FS_64;
|
||||
}
|
||||
|
|
@ -56,6 +61,11 @@ XFile::
|
|||
void XFile::
|
||||
add_child(XFileNode *node) {
|
||||
XFileNode::add_child(node);
|
||||
|
||||
if (node->is_of_type(XFileTemplate::get_class_type())) {
|
||||
XFileTemplate *xtemplate = DCAST(XFileTemplate, node);
|
||||
_templates_by_guid[xtemplate->get_guid()] = xtemplate;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -141,6 +151,11 @@ read(istream &in, const string &filename) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// We must call this first so the standard templates file will be
|
||||
// parsed and available by the time we need it--it's tricky to
|
||||
// invoke the parser from within another parser instance.
|
||||
get_standard_templates();
|
||||
|
||||
x_init_parser(in, filename, *this);
|
||||
xyyparse();
|
||||
x_cleanup_parser();
|
||||
|
|
@ -196,6 +211,50 @@ write(ostream &out) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFile::find_template
|
||||
// Access: Public
|
||||
// Description: Returns the template associated with the indicated
|
||||
// name, if any, or NULL if none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
XFileTemplate *XFile::
|
||||
find_template(const string &name) const {
|
||||
XFileNode *child = find_child(name);
|
||||
if (child != (XFileNode *)NULL &&
|
||||
child->is_of_type(XFileTemplate::get_class_type())) {
|
||||
return DCAST(XFileTemplate, child);
|
||||
}
|
||||
|
||||
const XFile *standard_templates = get_standard_templates();
|
||||
if (standard_templates != this) {
|
||||
return standard_templates->find_template(name);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFile::find_template
|
||||
// Access: Public
|
||||
// Description: Returns the template associated with the indicated
|
||||
// GUID, if any, or NULL if none.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
XFileTemplate *XFile::
|
||||
find_template(const WindowsGuid &guid) const {
|
||||
TemplatesByGuid::const_iterator gi;
|
||||
gi = _templates_by_guid.find(guid);
|
||||
if (gi != _templates_by_guid.end()) {
|
||||
return (*gi).second;
|
||||
}
|
||||
|
||||
const XFile *standard_templates = get_standard_templates();
|
||||
if (standard_templates != this) {
|
||||
return standard_templates->find_template(guid);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFile::write_text
|
||||
// Access: Public, Virtual
|
||||
|
|
@ -359,3 +418,38 @@ write_header(ostream &out) const {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFile::get_standard_templates
|
||||
// Access: Private, Static
|
||||
// Description: Returns a global XFile object that contains the
|
||||
// standard list of Direct3D template definitions that
|
||||
// may be assumed to be at the head of every file.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const XFile *XFile::
|
||||
get_standard_templates() {
|
||||
if (_standard_templates == (XFile *)NULL) {
|
||||
// The standardTemplates.x file has been compiled into this
|
||||
// binary. Extract it out.
|
||||
|
||||
string data((const char *)standard_templates_data, standard_templates_data_len);
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
// The data is stored compressed; decompress it on-the-fly.
|
||||
istringstream inz(data);
|
||||
IDecompressStream in(&inz, false);
|
||||
|
||||
#else
|
||||
// The data is stored uncompressed, so just load it.
|
||||
istringstream in(data);
|
||||
#endif // HAVE_ZLIB
|
||||
|
||||
_standard_templates = new XFile;
|
||||
if (!_standard_templates->read(in, "standardTemplates.x")) {
|
||||
xfile_cat.error()
|
||||
<< "Internal error: Unable to parse built-in standardTemplates.x!\n";
|
||||
}
|
||||
}
|
||||
|
||||
return _standard_templates;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,12 @@
|
|||
|
||||
#include "pandatoolbase.h"
|
||||
#include "xFileNode.h"
|
||||
|
||||
#include "windowsGuid.h"
|
||||
#include "filename.h"
|
||||
#include "pmap.h"
|
||||
#include "pointerTo.h"
|
||||
|
||||
class XFileTemplate;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : XFile
|
||||
|
|
@ -44,6 +48,9 @@ public:
|
|||
bool write(Filename filename) const;
|
||||
bool write(ostream &out) const;
|
||||
|
||||
XFileTemplate *find_template(const string &name) const;
|
||||
XFileTemplate *find_template(const WindowsGuid &guid) const;
|
||||
|
||||
virtual void write_text(ostream &out, int indent_level) const;
|
||||
|
||||
enum FormatType {
|
||||
|
|
@ -59,10 +66,17 @@ public:
|
|||
private:
|
||||
bool read_header(istream &in);
|
||||
bool write_header(ostream &out) const;
|
||||
|
||||
static const XFile *get_standard_templates();
|
||||
|
||||
int _major_version, _minor_version;
|
||||
FormatType _format_type;
|
||||
FloatSize _float_size;
|
||||
|
||||
typedef pmap<WindowsGuid, XFileTemplate *> TemplatesByGuid;
|
||||
TemplatesByGuid _templates_by_guid;
|
||||
|
||||
static PT(XFile) _standard_templates;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
// Filename: xFileDataObject.I
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileDataObject::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE XFileDataObject::
|
||||
XFileDataObject(const string &name) : XFileNode(name)
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
// Filename: xFileDataObject.cxx
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "xFileDataObject.h"
|
||||
|
||||
TypeHandle XFileDataObject::_type_handle;
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
// Filename: xFileDataObject.h
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef XFILEDATAOBJECT_H
|
||||
#define XFILEDATAOBJECT_H
|
||||
|
||||
#include "pandatoolbase.h"
|
||||
#include "xFileNode.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : XFileDataObject
|
||||
// Description : The abstract base class for a number of different
|
||||
// types of data elements that may be stored in the X
|
||||
// file.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class XFileDataObject : public XFileNode {
|
||||
public:
|
||||
INLINE XFileDataObject(const string &name);
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
XFileNode::init_type();
|
||||
register_type(_type_handle, "XFileDataObject",
|
||||
XFileNode::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#include "xFileDataObject.I"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
// Filename: xFileDataObjectTemplate.I
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileDataObjectTemplate::get_template
|
||||
// Access: Public
|
||||
// Description: Returns the template used to define this data object.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE XFileTemplate *XFileDataObjectTemplate::
|
||||
get_template() const {
|
||||
return _template;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
// Filename: xFileDataObjectTemplate.cxx
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "xFileDataObjectTemplate.h"
|
||||
#include "indent.h"
|
||||
|
||||
TypeHandle XFileDataObjectTemplate::_type_handle;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileDataObjectTemplate::Constructor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
XFileDataObjectTemplate::
|
||||
XFileDataObjectTemplate(XFileTemplate *xtemplate, const string &name) :
|
||||
XFileDataObject(name),
|
||||
_template(xtemplate)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileDataObjectTemplate::write_text
|
||||
// Access: Public, Virtual
|
||||
// Description: Writes a suitable representation of this node to an
|
||||
// .x file in text mode.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void XFileDataObjectTemplate::
|
||||
write_text(ostream &out, int indent_level) const {
|
||||
indent(out, indent_level)
|
||||
<< _template->get_name();
|
||||
if (has_name()) {
|
||||
out << " " << get_name();
|
||||
}
|
||||
out << " {\n";
|
||||
XFileDataObject::write_text(out, indent_level + 2);
|
||||
indent(out, indent_level)
|
||||
<< "}\n";
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
// Filename: xFileDataObjectTemplate.h
|
||||
// Created by: drose (03Oct04)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// PANDA 3D SOFTWARE
|
||||
// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
|
||||
//
|
||||
// All use of this software is subject to the terms of the Panda 3d
|
||||
// Software license. You should have received a copy of this license
|
||||
// along with this source code; you will also find a current copy of
|
||||
// the license at http://etc.cmu.edu/panda3d/docs/license/ .
|
||||
//
|
||||
// To contact the maintainers of this program write to
|
||||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef XFILEDATAOBJECTTEMPLATE_H
|
||||
#define XFILEDATAOBJECTTEMPLATE_H
|
||||
|
||||
#include "pandatoolbase.h"
|
||||
#include "xFileDataObject.h"
|
||||
#include "xFileTemplate.h"
|
||||
#include "pointerTo.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Class : XFileDataObjectTemplate
|
||||
// Description : A data element that represents a combination of
|
||||
// multiple data elements as defined by a template. The
|
||||
// individual data elements of the template may be
|
||||
// obtained by walking through the children of this
|
||||
// object.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class XFileDataObjectTemplate : public XFileDataObject {
|
||||
public:
|
||||
XFileDataObjectTemplate(XFileTemplate *xtemplate, const string &name);
|
||||
|
||||
INLINE XFileTemplate *get_template() const;
|
||||
|
||||
virtual void write_text(ostream &out, int indent_level) const;
|
||||
|
||||
private:
|
||||
PT(XFileTemplate) _template;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
XFileDataObject::init_type();
|
||||
register_type(_type_handle, "XFileDataObjectTemplate",
|
||||
XFileDataObject::get_class_type());
|
||||
}
|
||||
virtual TypeHandle get_type() const {
|
||||
return get_class_type();
|
||||
}
|
||||
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||
|
||||
private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
#include "xFileDataObjectTemplate.I"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -15,4 +15,3 @@
|
|||
// panda3d-general@lists.sourceforge.net .
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void XFileNode::
|
|||
add_child(XFileNode *node) {
|
||||
_children.push_back(node);
|
||||
if (node->has_name()) {
|
||||
_children_by_name.insert(ChildrenByName::value_type(node->get_name(), node));
|
||||
_children_by_name[node->get_name()] = node;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -79,6 +79,7 @@ add_child(XFileNode *node) {
|
|||
void XFileNode::
|
||||
clear() {
|
||||
_children.clear();
|
||||
_children_by_name.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -16,3 +16,76 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::get_guid
|
||||
// Access: Public
|
||||
// Description: Returns the GUID associated with this template.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE const WindowsGuid &XFileTemplate::
|
||||
get_guid() const {
|
||||
return _guid;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::set_open
|
||||
// Access: Public
|
||||
// Description: Sets whether the template is considered "open" or
|
||||
// not. If it is open (this flag is true), the set of
|
||||
// restrictions is ignored and the instances of this
|
||||
// template may include any types of children. If it is
|
||||
// closed (false), only the named types may be added.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void XFileTemplate::
|
||||
set_open(bool open) {
|
||||
_open = open;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::get_open
|
||||
// Access: Public
|
||||
// Description: Returns whether the template is considered "open" or
|
||||
// not. If it is open (this flag is true), the set of
|
||||
// restrictions is ignored and the instances of this
|
||||
// template may include any types of children. If it is
|
||||
// closed (false), only the named types may be added.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE bool XFileTemplate::
|
||||
get_open() const {
|
||||
return _open;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::add_restriction
|
||||
// Access: Public
|
||||
// Description: Adds a new type to the list of allowable types of
|
||||
// child nodes for an instance of this template. The
|
||||
// method is a little misnamed; we are actually removing
|
||||
// a restriction by adding this type to the list.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE void XFileTemplate::
|
||||
add_restriction(XFileTemplate *restriction) {
|
||||
_restrictions.push_back(restriction);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::get_num_restrictions
|
||||
// Access: Public
|
||||
// Description: Returns the number of templates on the restrictions
|
||||
// list.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int XFileTemplate::
|
||||
get_num_restrictions() const {
|
||||
return _restrictions.size();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::get_restriction
|
||||
// Access: Public
|
||||
// Description: Returns the nth template on the restrictions list.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE XFileTemplate *XFileTemplate::
|
||||
get_restriction(int n) const {
|
||||
nassertr(n >= 0 && n < (int)_restrictions.size(), NULL);
|
||||
return _restrictions[n];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,10 +29,33 @@ TypeHandle XFileTemplate::_type_handle;
|
|||
XFileTemplate::
|
||||
XFileTemplate(const string &name, const WindowsGuid &guid) :
|
||||
XFileNode(name),
|
||||
_guid(guid)
|
||||
_guid(guid),
|
||||
_open(false)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::Destructor
|
||||
// Access: Public, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
XFileTemplate::
|
||||
~XFileTemplate() {
|
||||
clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::clear
|
||||
// Access: Public, Virtual
|
||||
// Description: Removes all children from the node, and otherwise
|
||||
// resets it to its initial state.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void XFileTemplate::
|
||||
clear() {
|
||||
XFileNode::clear();
|
||||
_restrictions.clear();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: XFileTemplate::write_text
|
||||
// Access: Public, Virtual
|
||||
|
|
@ -48,6 +71,27 @@ write_text(ostream &out, int indent_level) const {
|
|||
|
||||
XFileNode::write_text(out, indent_level + 2);
|
||||
|
||||
if (get_open()) {
|
||||
// An open template
|
||||
indent(out, indent_level + 2)
|
||||
<< "[ ... ]\n";
|
||||
|
||||
} else if (!_restrictions.empty()) {
|
||||
// A restricted template
|
||||
indent(out, indent_level + 2);
|
||||
|
||||
char delimiter = '[';
|
||||
Restrictions::const_iterator ri;
|
||||
for (ri = _restrictions.begin(); ri != _restrictions.end(); ++ri) {
|
||||
XFileTemplate *restriction = (*ri);
|
||||
out << delimiter << " "
|
||||
<< restriction->get_name() << " <" << restriction->get_guid()
|
||||
<< ">";
|
||||
delimiter = ',';
|
||||
}
|
||||
out << " ]\n";
|
||||
}
|
||||
|
||||
indent(out, indent_level)
|
||||
<< "}\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,11 +33,26 @@ class XFileDataDef;
|
|||
class XFileTemplate : public XFileNode {
|
||||
public:
|
||||
XFileTemplate(const string &name, const WindowsGuid &guid);
|
||||
virtual ~XFileTemplate();
|
||||
|
||||
INLINE const WindowsGuid &get_guid() const;
|
||||
|
||||
virtual void clear();
|
||||
virtual void write_text(ostream &out, int indent_level) const;
|
||||
|
||||
INLINE void set_open(bool open);
|
||||
INLINE bool get_open() const;
|
||||
|
||||
INLINE void add_restriction(XFileTemplate *restriction);
|
||||
INLINE int get_num_restrictions() const;
|
||||
INLINE XFileTemplate *get_restriction(int n) const;
|
||||
|
||||
private:
|
||||
WindowsGuid _guid;
|
||||
bool _open;
|
||||
|
||||
typedef pvector< PT(XFileTemplate) > Restrictions;
|
||||
Restrictions _restrictions;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
|
|
|
|||
|
|
@ -394,6 +394,11 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?)
|
|||
return KW_ARRAY;
|
||||
}
|
||||
|
||||
"binary" {
|
||||
accept();
|
||||
return KW_BINARY;
|
||||
}
|
||||
|
||||
"byte" {
|
||||
accept();
|
||||
return KW_BYTE;
|
||||
|
|
@ -449,11 +454,6 @@ REALNUM ([+-]?(([0-9]+[.])|([0-9]*[.][0-9]+))([eE][+-]?[0-9]+)?)
|
|||
return KW_WORD;
|
||||
}
|
||||
|
||||
[.][.][.] {
|
||||
accept();
|
||||
return ELLIPSIS;
|
||||
}
|
||||
|
||||
{INTEGERNUM} {
|
||||
// A signed or unsigned integer number.
|
||||
accept();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
/* A Bison parser, made by GNU Bison 1.875b. */
|
||||
|
||||
/* Skeleton parser for Yacc-like parsing with Bison,
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* As a special exception, when this file is copied by Bison into a
|
||||
Bison output file, you may use that output file without restriction.
|
||||
This special exception was added by the Free Software Foundation
|
||||
in version 1.24 of Bison. */
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
INTEGER = 258,
|
||||
REAL = 259,
|
||||
STRING = 260,
|
||||
IDENTIFIER = 261,
|
||||
WINDOWS_GUID = 262,
|
||||
KW_ARRAY = 263,
|
||||
KW_BINARY = 264,
|
||||
KW_BYTE = 265,
|
||||
KW_CHAR = 266,
|
||||
KW_CSTRING = 267,
|
||||
KW_DOUBLE = 268,
|
||||
KW_DWORD = 269,
|
||||
KW_FLOAT = 270,
|
||||
KW_STRING = 271,
|
||||
KW_TEMPLATE = 272,
|
||||
KW_UCHAR = 273,
|
||||
KW_UNICODE = 274,
|
||||
KW_WORD = 275
|
||||
};
|
||||
#endif
|
||||
#define INTEGER 258
|
||||
#define REAL 259
|
||||
#define STRING 260
|
||||
#define IDENTIFIER 261
|
||||
#define WINDOWS_GUID 262
|
||||
#define KW_ARRAY 263
|
||||
#define KW_BINARY 264
|
||||
#define KW_BYTE 265
|
||||
#define KW_CHAR 266
|
||||
#define KW_CSTRING 267
|
||||
#define KW_DOUBLE 268
|
||||
#define KW_DWORD 269
|
||||
#define KW_FLOAT 270
|
||||
#define KW_STRING 271
|
||||
#define KW_TEMPLATE 272
|
||||
#define KW_UCHAR 273
|
||||
#define KW_UNICODE 274
|
||||
#define KW_WORD 275
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
|
||||
typedef int YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE xyylval;
|
||||
|
||||
|
||||
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
#include "xFileTemplate.h"
|
||||
#include "xFileDataDef.h"
|
||||
#include "xFileArrayDef.h"
|
||||
#include "xFileDataObjectTemplate.h"
|
||||
#include "pointerTo.h"
|
||||
#include "dcast.h"
|
||||
|
||||
// Because our token type contains objects of type string, which
|
||||
|
|
@ -22,7 +24,7 @@
|
|||
|
||||
static XFile *x_file = (XFile *)NULL;
|
||||
static XFileNode *current_node = (XFileNode *)NULL;
|
||||
static XFileDataDef *current_data_def = (XFileDataDef *)NULL;
|
||||
static PT(XFileDataDef) current_data_def = (XFileDataDef *)NULL;
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Defining the interface to the parser.
|
||||
|
|
@ -49,6 +51,7 @@ x_cleanup_parser() {
|
|||
%token <guid> WINDOWS_GUID
|
||||
|
||||
%token KW_ARRAY
|
||||
%token KW_BINARY
|
||||
%token KW_BYTE
|
||||
%token KW_CHAR
|
||||
%token KW_CSTRING
|
||||
|
|
@ -60,12 +63,10 @@ x_cleanup_parser() {
|
|||
%token KW_UCHAR
|
||||
%token KW_UNICODE
|
||||
%token KW_WORD
|
||||
%token ELLIPSIS
|
||||
|
||||
%type <u.node> xtemplate
|
||||
%type <u.data_def> data_def
|
||||
%type <u.node> data_object
|
||||
%type <str> optional_identifier
|
||||
%type <guid> optional_guid
|
||||
|
||||
%%
|
||||
|
||||
|
|
@ -97,61 +98,69 @@ template_members:
|
|||
|
||||
template_member:
|
||||
data_def
|
||||
{
|
||||
current_node->add_child($1);
|
||||
}
|
||||
| KW_ARRAY data_def
|
||||
{
|
||||
current_node->add_child($2);
|
||||
current_data_def = $2;
|
||||
}
|
||||
array_dimensions
|
||||
| KW_ARRAY data_def array_dimensions
|
||||
;
|
||||
|
||||
data_def:
|
||||
KW_WORD optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_word, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_word, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_DWORD optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_dword, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_dword, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_FLOAT optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_float, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_float, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_DOUBLE optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_double, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_double, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_CHAR optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_char, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_char, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_UCHAR optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_uchar, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_uchar, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_BYTE optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_byte, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_byte, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_STRING optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_string, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_string, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_CSTRING optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_cstring, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_cstring, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| KW_UNICODE optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_unicode, $2);
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_unicode, $2);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
| IDENTIFIER optional_identifier
|
||||
{
|
||||
$$ = new XFileDataDef(XFileDataDef::T_word, $2);
|
||||
XFileTemplate *xtemplate = x_file->find_template($1);
|
||||
if (xtemplate == (XFileTemplate *)NULL) {
|
||||
yyerror("Unknown template: " + $1);
|
||||
} else {
|
||||
current_data_def = new XFileDataDef(XFileDataDef::T_template, $2, xtemplate);
|
||||
current_node->add_child(current_data_def);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -178,25 +187,66 @@ array_level:
|
|||
|
||||
template_restrictions:
|
||||
empty
|
||||
| '[' ELLIPSIS ']'
|
||||
| '[' template_list ']'
|
||||
| '[' '.' '.' '.' ']'
|
||||
{
|
||||
DCAST(XFileTemplate, current_node)->set_open(true);
|
||||
}
|
||||
| '[' template_restriction_list ']'
|
||||
;
|
||||
|
||||
template_list:
|
||||
IDENTIFIER optional_guid
|
||||
template_restriction_list:
|
||||
template_restriction_element
|
||||
{
|
||||
}
|
||||
| template_list ',' IDENTIFIER optional_guid
|
||||
| template_restriction_list ',' template_restriction_element
|
||||
{
|
||||
}
|
||||
;
|
||||
|
||||
template_restriction_element:
|
||||
IDENTIFIER
|
||||
{
|
||||
XFileTemplate *xtemplate = x_file->find_template($1);
|
||||
if (xtemplate == (XFileTemplate *)NULL) {
|
||||
yyerror("Unknown template: " + $1);
|
||||
} else {
|
||||
DCAST(XFileTemplate, current_node)->add_restriction(xtemplate);
|
||||
}
|
||||
}
|
||||
| IDENTIFIER WINDOWS_GUID
|
||||
{
|
||||
XFileTemplate *xtemplate = x_file->find_template($2);
|
||||
if (xtemplate == (XFileTemplate *)NULL) {
|
||||
yyerror("Unknown template: " + $1);
|
||||
} else {
|
||||
if (xtemplate->get_name() != $1) {
|
||||
xyywarning("GUID identifies template " + xtemplate->get_name() +
|
||||
", not " + $1);
|
||||
}
|
||||
DCAST(XFileTemplate, current_node)->add_restriction(xtemplate);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
data_object:
|
||||
IDENTIFIER optional_identifier '{'
|
||||
{
|
||||
XFileTemplate *xtemplate = x_file->find_template($1);
|
||||
$$ = current_node;
|
||||
|
||||
if (xtemplate == (XFileTemplate *)NULL) {
|
||||
yyerror("Unknown template: " + $1);
|
||||
} else {
|
||||
XFileDataObjectTemplate *templ =
|
||||
new XFileDataObjectTemplate(xtemplate, $2);
|
||||
current_node->add_child(templ);
|
||||
current_node = templ;
|
||||
}
|
||||
}
|
||||
data_object_members '}'
|
||||
{
|
||||
$$ = current_node;
|
||||
current_node = $<u.node>4;
|
||||
}
|
||||
;
|
||||
|
||||
|
|
@ -242,14 +292,6 @@ optional_identifier:
|
|||
| IDENTIFIER
|
||||
;
|
||||
|
||||
optional_guid:
|
||||
empty
|
||||
{
|
||||
$$ = WindowsGuid();
|
||||
}
|
||||
| WINDOWS_GUID
|
||||
;
|
||||
|
||||
empty:
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
|
||||
class XFile;
|
||||
class XFileNode;
|
||||
class XFileDataDef;
|
||||
|
||||
void x_init_parser(istream &in, const string &filename, XFile &file);
|
||||
void x_cleanup_parser();
|
||||
|
|
@ -44,7 +43,6 @@ public:
|
|||
int s_int;
|
||||
double real;
|
||||
XFileNode *node;
|
||||
XFileDataDef *data_def;
|
||||
} u;
|
||||
string str;
|
||||
WindowsGuid guid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue