From 10f61f1285190986498221cfa82b2d3b9fe9f391 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 21 Sep 2016 12:56:11 -0600 Subject: Accumulated changes. --- .gitignore | 10 ++++++++++ c++-libbu++/Makefile | 21 +++++++++++++++++++++ c++-libbu++/src/boolean.cpp | 1 + c++-libbu++/src/gatsc/main.cpp | 11 ++++++++++- c++-qt/gats-qt/dictionary.h | 1 + c++-qt/gats-qt/list.h | 1 + c++-qt/src/gatsstream.cpp | 1 + c++-qt/src/list.cpp | 1 + 8 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 c++-libbu++/Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6020bc1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +*.o +*.a +.*.swp +/c++-libbu++/gats +/c++-qt/Makefile* +*.dll +/c++-qt/object_script.* +/c++-qt/release +/c++-qt/debug +/c++-qt/tmp diff --git a/c++-libbu++/Makefile b/c++-libbu++/Makefile new file mode 100644 index 0000000..5ff9292 --- /dev/null +++ b/c++-libbu++/Makefile @@ -0,0 +1,21 @@ +OBJECTS := $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) + +.PHONY: default all headers clean tests install + +default: libgats.a + +all: default tests + +clean: + -rm ${HEADERS} ${OBJECTS} libgats.a ${TOOLS} ${UNITS} ${TESTS} + +$(foreach fn,$(wildcard src/*.h),bu/$(notdir ${fn})): bu/%: src/% + ln -s ../$< $@ + +${OBJECTS}: %.o: %.cpp + ${CXX} -ggdb -W -Wall -I. -I../../libbu++ ${CXXFLAGS} $< -c -o $@ + +libgats.a: ${HEADERS} ${OBJECTS} + ar -r libgats.a ${OBJECTS} + + diff --git a/c++-libbu++/src/boolean.cpp b/c++-libbu++/src/boolean.cpp index 2ee0227..e442c2c 100644 --- a/c++-libbu++/src/boolean.cpp +++ b/c++-libbu++/src/boolean.cpp @@ -8,6 +8,7 @@ #include "gats/boolean.h" #include +#include #include Gats::Boolean::Boolean() : 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 ); diff --git a/c++-qt/gats-qt/dictionary.h b/c++-qt/gats-qt/dictionary.h index 4f1d6e0..b1b6051 100644 --- a/c++-qt/gats-qt/dictionary.h +++ b/c++-qt/gats-qt/dictionary.h @@ -11,6 +11,7 @@ #include "gats-qt/object.h" #include "gats-qt/string.h" #include +#include namespace Gats { diff --git a/c++-qt/gats-qt/list.h b/c++-qt/gats-qt/list.h index f39043f..27c17c3 100644 --- a/c++-qt/gats-qt/list.h +++ b/c++-qt/gats-qt/list.h @@ -10,6 +10,7 @@ #include "gats-qt/object.h" #include +#include namespace Gats { diff --git a/c++-qt/src/gatsstream.cpp b/c++-qt/src/gatsstream.cpp index 498b403..cb6b53c 100644 --- a/c++-qt/src/gatsstream.cpp +++ b/c++-qt/src/gatsstream.cpp @@ -14,6 +14,7 @@ #include #endif +#include #include Gats::GatsStream::GatsStream( QIODevice &rStream ) : diff --git a/c++-qt/src/list.cpp b/c++-qt/src/list.cpp index 19ff4b5..fae51d1 100644 --- a/c++-qt/src/list.cpp +++ b/c++-qt/src/list.cpp @@ -12,6 +12,7 @@ #include "gats-qt/float.h" #include "gats-qt/boolean.h" #include "gats-qt/dictionary.h" +#include Gats::List::List() { -- cgit v1.2.3