From 10f61f1285190986498221cfa82b2d3b9fe9f391 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 21 Sep 2016 12:56:11 -0600 Subject: Accumulated changes. --- c++-libbu++/src/gatsc/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'c++-libbu++/src/gatsc') diff --git a/c++-libbu++/src/gatsc/main.cpp b/c++-libbu++/src/gatsc/main.cpp index 5291a33..c95b914 100644 --- a/c++-libbu++/src/gatsc/main.cpp +++ b/c++-libbu++/src/gatsc/main.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "gats/types.h" #include "gats/gatsstream.h" @@ -22,7 +23,8 @@ class Options : public OptParser public: Options( int argc, char *argv[] ) : bCompile( true ), - bCompress( false ) + bCompress( false ), + bHex( false ) { addHelpBanner("Gats Compiler\nUsage: gatsc [options] [input]\n"); @@ -33,6 +35,7 @@ public: "Convert binary gats to text gats."); addOption( bCompress, 'z', "compress", "Compress with deflate."); + addOption( bHex, 'x', "hex", "Encode output as hex."); addHelpOption('h', "help", "This Help"); @@ -40,6 +43,7 @@ public: setOverride("decompile", false ); setOverride("compress", true ); + setOverride("hex", true ); parse( argc, argv ); } @@ -52,6 +56,7 @@ public: bool bCompile; bool bCompress; + bool bHex; String sInput; String sOutput; }; @@ -83,6 +88,10 @@ int main( int argc, char *argv[] ) { ssOut.pushFilter(); } + if( opt.bHex ) + { + ssOut.pushFilter(); + } Gats::GatsStream gs( ssOut ); Gats::Object *pObj = Gats::Object::strToGats( fIn.readAll() ); gs.writeObject( pObj ); -- cgit v1.2.3