From 658f9967597583da1db8a5c308d1ec35dc38da1c Mon Sep 17 00:00:00 2001 From: Myun2 Date: Sun, 8 Aug 2010 11:44:41 +0900 Subject: [PATCH] =?utf8?q?eltorito.hpp:=20=E3=81=A8=E3=82=8A=E3=81=82?= =?utf8?q?=E3=81=88=E3=81=9A=E4=B8=80=E6=97=A6commit=E3=81=98=E3=82=83?= =?utf8?q?=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/lexical/string_rule.hpp | 6 ++++++ roast_ex/include/roast/file/iso9660/eltorito.hpp | 19 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/roast/include/roast/lexical/string_rule.hpp b/roast/include/roast/lexical/string_rule.hpp index ab2180e0..0839c4f7 100644 --- a/roast/include/roast/lexical/string_rule.hpp +++ b/roast/include/roast/lexical/string_rule.hpp @@ -214,6 +214,12 @@ namespace roast } }; +#define ROAST_LEXICAL_FIXSTR(CLS,S) \ + class CLS : public fixed_string \ + { \ + public: \ + CLS() : fixed_string(S){} }; + /////////////////////////////////////////////////////////////////// } } diff --git a/roast_ex/include/roast/file/iso9660/eltorito.hpp b/roast_ex/include/roast/file/iso9660/eltorito.hpp index a01b10c3..626db511 100644 --- a/roast_ex/include/roast/file/iso9660/eltorito.hpp +++ b/roast_ex/include/roast/file/iso9660/eltorito.hpp @@ -17,7 +17,24 @@ namespace roast { using namespace ::roast::lexical::rule; - typedef soft_repeat< unibyte<0>, 0x8800 > rule; + //class str_CD001 : public fixed_string{ public: str_CD001() + ROAST_LEXICAL_FIXSTR(str_CD001, "CD001") + ROAST_LEXICAL_FIXSTR(str_ELTORITOSPEC, "EL TORITO SPECIFICATION") // 23byte + + typedef seq< + soft_repeat< unibyte<0>, 0x8800 >, + + unibyte<0>, // Volume Descriptor Type + str_CD001, + unibyte<1>, // Volume Descriptor Version + str_ELTORITOSPEC, // System Descriptor (32byte) + soft_repeat< unibyte<0>, 0x8800 > // + > _volume_desc; + + + typedef seq< + + > rule; } class eltorito_writer -- 2.11.0