diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | Makefile.slim | 2 | ||||
-rw-r--r-- | build.conf | 2 | ||||
-rw-r--r-- | src/build.cpp | 13 | ||||
-rw-r--r-- | src/build.h | 2 | ||||
-rw-r--r-- | src/build.l | 9 | ||||
-rw-r--r-- | src/cache.cpp | 12 | ||||
-rw-r--r-- | src/cache.h | 6 | ||||
-rw-r--r-- | src/functioncommandtolist.cpp | 2 | ||||
-rw-r--r-- | src/functiondirectoriesin.cpp | 2 | ||||
-rw-r--r-- | src/functionfactory.cpp | 12 | ||||
-rw-r--r-- | src/functionfactory.h | 6 | ||||
-rw-r--r-- | src/functionfilesin.cpp | 2 | ||||
-rw-r--r-- | src/functionregexp.cpp | 2 | ||||
-rw-r--r-- | src/functiontargets.cpp | 2 | ||||
-rw-r--r-- | src/functiontostring.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 10 | ||||
-rw-r--r-- | src/performcommand.cpp | 2 | ||||
-rw-r--r-- | src/performfactory.cpp | 2 | ||||
-rw-r--r-- | src/performfactory.h | 6 | ||||
-rw-r--r-- | src/regexp.cpp | 8 | ||||
-rw-r--r-- | src/regexp.h | 8 | ||||
-rw-r--r-- | src/targetfactory.cpp | 2 | ||||
-rw-r--r-- | src/targetfactory.h | 6 | ||||
-rw-r--r-- | src/targetfile.cpp | 2 | ||||
-rw-r--r-- | src/viewercolorpct.cpp | 4 | ||||
-rw-r--r-- | src/viewerfactory.cpp | 10 | ||||
-rw-r--r-- | src/viewerfactory.h | 6 | ||||
-rw-r--r-- | src/viewermake.cpp | 2 | ||||
-rw-r--r-- | src/viewerpercent.cpp | 2 | ||||
-rw-r--r-- | src/viewerplain.cpp | 2 | ||||
-rw-r--r-- | src/viewerplainpct.cpp | 2 |
32 files changed, 90 insertions, 76 deletions
@@ -1,21 +1,23 @@ | |||
1 | LIBBU:=$(foreach f,paramproc.h paramproc.cpp staticstring.h staticstring.cpp exceptions.h exceptions.cpp serializable.h serializable.cpp exceptionbase.h exceptionbase.cpp plugger.h plugger.cpp singleton.h hashtable.cpp hashtable.h hashfunction.h hashfunction.cpp hashfunctionint.cpp hashfunctionint.h hashfunctionstring.cpp hashfunctionstring.h serializerbinary.cpp serializerbinary.h serializer.cpp serializer.h stringrep.h stringrep.cpp,src/$f) | 1 | LIBBU:=$(foreach f,paramproc.h paramproc.cpp fstring.h fstring.cpp exceptions.h exceptions.cpp exceptionbase.cpp exceptionbase.h archive.cpp archive.h archival.cpp archival.h plugger.h plugger.cpp singleton.h hash.cpp hash.h file.h file.cpp stream.h stream.cpp list.h list.cpp,src/$f) |
2 | SRC:=$(sort $(wildcard src/*.cpp) $(filter %.cpp,$(LIBBU))) | 2 | SRC:=$(sort $(wildcard src/*.cpp) $(patsubst src/%,src/bu/%,$(filter %.cpp,$(LIBBU)))) |
3 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) | 3 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) |
4 | REV:=$(shell svn info | grep "Revision" | cut -d\ -f2) | 4 | REV:=$(shell svn info | grep "Revision" | cut -d\ -f2) |
5 | VER:=r$(REV) | 5 | VER:=r$(REV) |
6 | PKG:=build-$(VER).tar.bz2 | 6 | PKG:=build-$(VER).tar.bz2 |
7 | 7 | ||
8 | .PHONY: all extern clean depclean package | 8 | .PHONY: all extern clean distclean package |
9 | # .SILENT: | 9 | # .SILENT: |
10 | 10 | ||
11 | all: extern build | 11 | all: extern build |
12 | 12 | ||
13 | package: clean depclean extern $(PKG) | 13 | package: clean distclean extern $(PKG) |
14 | 14 | ||
15 | $(PKG): | 15 | $(PKG): |
16 | mkdir build-$(VER) | 16 | mkdir build-$(VER) |
17 | mkdir build-$(VER)/src | 17 | mkdir build-$(VER)/src |
18 | mkdir build-$(VER)/src/bu | ||
18 | cp -a src/*.{cpp,h,y,l} build-$(VER)/src | 19 | cp -a src/*.{cpp,h,y,l} build-$(VER)/src |
20 | cp -a src/bu/*.{cpp,h} build-$(VER)/src/bu | ||
19 | cp -a build.conf build-$(VER) | 21 | cp -a build.conf build-$(VER) |
20 | cp -a Makefile.slim build-$(VER)/Makefile | 22 | cp -a Makefile.slim build-$(VER)/Makefile |
21 | tar -c build-$(VER) | bzip2 -9 > $(PKG) | 23 | tar -c build-$(VER) | bzip2 -9 > $(PKG) |
@@ -24,13 +26,15 @@ $(PKG): | |||
24 | clean: | 26 | clean: |
25 | -rm -Rf build $(OBJ) | 27 | -rm -Rf build $(OBJ) |
26 | 28 | ||
27 | depclean: | 29 | distclean: |
28 | -rm -Rf $(LIBBU) | 30 | -rm -Rf $(LIBBU) |
31 | -rm -Rf src/bu | ||
29 | 32 | ||
30 | extern: $(LIBBU) | 33 | extern: $(LIBBU) |
31 | 34 | ||
32 | $(LIBBU): | 35 | $(LIBBU): |
33 | wget -nv -Psrc/ http://svn.xagasoft.com/libbu++/trunk/$@ | 36 | mkdir -p src/bu |
37 | wget -nv -Psrc/bu http://svn.xagasoft.com/libbu++/trunk/$@ | ||
34 | 38 | ||
35 | build: src/build.yy.c src/build.tab.c $(OBJ) | 39 | build: src/build.yy.c src/build.tab.c $(OBJ) |
36 | g++ -ggdb -ldl -o build $(OBJ) | 40 | g++ -ggdb -ldl -o build $(OBJ) |
diff --git a/Makefile.slim b/Makefile.slim index c1da3e2..d12435f 100644 --- a/Makefile.slim +++ b/Makefile.slim | |||
@@ -1,4 +1,4 @@ | |||
1 | SRC:=$(sort $(wildcard src/*.cpp)) | 1 | SRC:=$(sort $(wildcard src/*.cpp) $(wildcard src/bu/*.cpp)) |
2 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) | 2 | OBJ:=src/build.yy.o src/build.tab.o $(patsubst %.cpp,%.o,$(SRC)) |
3 | 3 | ||
4 | .PHONY: all clean | 4 | .PHONY: all clean |
@@ -9,7 +9,7 @@ set "CXXFLAGS" += "-ggdb" | |||
9 | target file, | 9 | target file, |
10 | requires "libbu++/libbu++.a", | 10 | requires "libbu++/libbu++.a", |
11 | set "LDFLAGS" += "-Llibbu++ -lbu++ -ldl", | 11 | set "LDFLAGS" += "-Llibbu++ -lbu++ -ldl", |
12 | set "CXXFLAGS" += "-Ilibbu++/src", | 12 | set "CXXFLAGS" += "-Ilibbu++", |
13 | set "FLEXFLAGS" = "--bison-bridge --bison-locations", | 13 | set "FLEXFLAGS" = "--bison-bridge --bison-locations", |
14 | input filesIn("src") filter regexp(".*\\.(cpp|y|l)$") | 14 | input filesIn("src") filter regexp(".*\\.(cpp|y|l)$") |
15 | 15 | ||
diff --git a/src/build.cpp b/src/build.cpp index 113f61f..c92d804 100644 --- a/src/build.cpp +++ b/src/build.cpp | |||
@@ -1,7 +1,8 @@ | |||
1 | #include "build.h" | 1 | #include "build.h" |
2 | #include "function.h" | 2 | #include "function.h" |
3 | #include "viewerfactory.h" | 3 | #include "viewerfactory.h" |
4 | #include "serializerbinary.h" | 4 | #include "bu/archive.h" |
5 | #include "bu/file.h" | ||
5 | 6 | ||
6 | subExceptionDef( BuildException ); | 7 | subExceptionDef( BuildException ); |
7 | 8 | ||
@@ -18,11 +19,12 @@ Build::~Build() | |||
18 | { | 19 | { |
19 | try | 20 | try |
20 | { | 21 | { |
21 | SerializerBinary ar( sCacheName.c_str(), Serializer::save ); | 22 | Bu::File f( sCacheName.c_str(), "wb" ); |
23 | Bu::Archive ar( f, Bu::Archive::save ); | ||
22 | 24 | ||
23 | ar << cRequires; | 25 | ar << cRequires; |
24 | } | 26 | } |
25 | catch( ExceptionBase &e ) | 27 | catch( Bu::ExceptionBase &e ) |
26 | { | 28 | { |
27 | } | 29 | } |
28 | } | 30 | } |
@@ -39,11 +41,12 @@ void Build::setCache( const std::string &sFileName ) | |||
39 | 41 | ||
40 | try | 42 | try |
41 | { | 43 | { |
42 | SerializerBinary ar( sCacheName.c_str(), Serializer::load ); | 44 | Bu::File f( sCacheName.c_str(), "rb" ); |
45 | Bu::Archive ar( f, Bu::Archive::load ); | ||
43 | 46 | ||
44 | ar >> cRequires; | 47 | ar >> cRequires; |
45 | } | 48 | } |
46 | catch( ExceptionBase &e ) | 49 | catch( Bu::ExceptionBase &e ) |
47 | { | 50 | { |
48 | } | 51 | } |
49 | } | 52 | } |
diff --git a/src/build.h b/src/build.h index 0bbad0e..c436ae1 100644 --- a/src/build.h +++ b/src/build.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <map> | 6 | #include <map> |
7 | #include <string> | 7 | #include <string> |
8 | 8 | ||
9 | #include "exceptions.h" | 9 | #include "bu/exceptions.h" |
10 | #include "rule.h" | 10 | #include "rule.h" |
11 | #include "target.h" | 11 | #include "target.h" |
12 | #include "action.h" | 12 | #include "action.h" |
diff --git a/src/build.l b/src/build.l index 5b69177..9065a49 100644 --- a/src/build.l +++ b/src/build.l | |||
@@ -1,8 +1,15 @@ | |||
1 | %{ | 1 | %{ |
2 | # include <string> | 2 | # include <string> |
3 | # include <string.h> | ||
3 | # include "buildparser.h" | 4 | # include "buildparser.h" |
4 | # include "build.tab.h" | 5 | # include "build.tab.h" |
5 | # include "stringrep.h" | 6 | |
7 | char *stringdup( const char *sin ) | ||
8 | { | ||
9 | char *n = new char[strlen(sin)+1]; | ||
10 | strcpy( n, sin ); | ||
11 | return n; | ||
12 | } | ||
6 | 13 | ||
7 | std::string strbuf; | 14 | std::string strbuf; |
8 | %} | 15 | %} |
diff --git a/src/cache.cpp b/src/cache.cpp index 61d0d28..b8e94ec 100644 --- a/src/cache.cpp +++ b/src/cache.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "cache.h" | 1 | #include "cache.h" |
2 | #include "serializer.h" | 2 | #include "bu/fstring.h" |
3 | #include "staticstring.h" | 3 | #include "bu/archive.h" |
4 | 4 | ||
5 | Cache::Cache() | 5 | Cache::Cache() |
6 | { | 6 | { |
@@ -15,14 +15,14 @@ Cache::~Cache() | |||
15 | } | 15 | } |
16 | } | 16 | } |
17 | 17 | ||
18 | void Cache::serialize( class Serializer &ar ) | 18 | void Cache::archive( class Bu::Archive &ar ) |
19 | { | 19 | { |
20 | if( ar.isLoading() ) | 20 | if( ar.isLoading() ) |
21 | { | 21 | { |
22 | uint32_t sCache, sData, sIndex; | 22 | uint32_t sCache, sData, sIndex; |
23 | 23 | ||
24 | ar >> sIndex; | 24 | ar >> sIndex; |
25 | StaticString *Index = new StaticString[sIndex]; | 25 | Bu::FString *Index = new Bu::FString[sIndex]; |
26 | for( uint32_t i = 0; i < sIndex; i++ ) | 26 | for( uint32_t i = 0; i < sIndex; i++ ) |
27 | { | 27 | { |
28 | ar >> Index[i]; | 28 | ar >> Index[i]; |
@@ -39,10 +39,10 @@ void Cache::serialize( class Serializer &ar ) | |||
39 | for( uint32_t j = 0; j < sData; j++ ) | 39 | for( uint32_t j = 0; j < sData; j++ ) |
40 | { | 40 | { |
41 | ar >> nTmp; | 41 | ar >> nTmp; |
42 | lData.push_back( Index[nTmp].getString() ); | 42 | lData.push_back( Index[nTmp].getStr() ); |
43 | } | 43 | } |
44 | ar >> nTmp; | 44 | ar >> nTmp; |
45 | mCache[Index[nTmp].getString()] = e; | 45 | mCache[Index[nTmp].getStr()] = e; |
46 | } | 46 | } |
47 | /* | 47 | /* |
48 | uint32_t sCache, sData; | 48 | uint32_t sCache, sData; |
diff --git a/src/cache.h b/src/cache.h index 16c4782..93b546c 100644 --- a/src/cache.h +++ b/src/cache.h | |||
@@ -3,18 +3,18 @@ | |||
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <time.h> | 5 | #include <time.h> |
6 | #include "serializable.h" | 6 | #include "bu/archival.h" |
7 | #include <list> | 7 | #include <list> |
8 | #include <map> | 8 | #include <map> |
9 | #include <string> | 9 | #include <string> |
10 | 10 | ||
11 | class Cache : public Serializable | 11 | class Cache : public Bu::Archival |
12 | { | 12 | { |
13 | public: | 13 | public: |
14 | Cache(); | 14 | Cache(); |
15 | virtual ~Cache(); | 15 | virtual ~Cache(); |
16 | 16 | ||
17 | virtual void serialize( class Serializer &ar ); | 17 | virtual void archive( class Bu::Archive &ar ); |
18 | 18 | ||
19 | class Entry | 19 | class Entry |
20 | { | 20 | { |
diff --git a/src/functioncommandtolist.cpp b/src/functioncommandtolist.cpp index 3653135..68c4564 100644 --- a/src/functioncommandtolist.cpp +++ b/src/functioncommandtolist.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "functioncommandtolist.h" | 1 | #include "functioncommandtolist.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | 3 | ||
4 | PluginInterface2(commandToList, FunctionCommandToList, Function, "Mike Buland", 0, 1 ); | 4 | PluginInterface2(commandToList, FunctionCommandToList, Function, "Mike Buland", 0, 1 ); |
5 | 5 | ||
diff --git a/src/functiondirectoriesin.cpp b/src/functiondirectoriesin.cpp index c68fa5c..0ebbbc8 100644 --- a/src/functiondirectoriesin.cpp +++ b/src/functiondirectoriesin.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <dirent.h> | 1 | #include <dirent.h> |
2 | 2 | ||
3 | #include "functiondirectoriesin.h" | 3 | #include "functiondirectoriesin.h" |
4 | #include "plugger.h" | 4 | #include "bu/plugger.h" |
5 | 5 | ||
6 | PluginInterface2(directoriesIn, FunctionDirectoriesIn, Function, "Mike Buland", 0, 1 ); | 6 | PluginInterface2(directoriesIn, FunctionDirectoriesIn, Function, "Mike Buland", 0, 1 ); |
7 | 7 | ||
diff --git a/src/functionfactory.cpp b/src/functionfactory.cpp index 4a2cd15..f72e8f6 100644 --- a/src/functionfactory.cpp +++ b/src/functionfactory.cpp | |||
@@ -1,11 +1,11 @@ | |||
1 | #include "functionfactory.h" | 1 | #include "functionfactory.h" |
2 | 2 | ||
3 | extern struct PluginInfo directoriesIn; | 3 | extern struct Bu::PluginInfo directoriesIn; |
4 | extern struct PluginInfo filesIn; | 4 | extern struct Bu::PluginInfo filesIn; |
5 | extern struct PluginInfo regexp; | 5 | extern struct Bu::PluginInfo regexp; |
6 | extern struct PluginInfo toString; | 6 | extern struct Bu::PluginInfo toString; |
7 | extern struct PluginInfo commandToList; | 7 | extern struct Bu::PluginInfo commandToList; |
8 | extern struct PluginInfo targets; | 8 | extern struct Bu::PluginInfo targets; |
9 | 9 | ||
10 | FunctionFactory::FunctionFactory() | 10 | FunctionFactory::FunctionFactory() |
11 | { | 11 | { |
diff --git a/src/functionfactory.h b/src/functionfactory.h index 0541143..2cc28fe 100644 --- a/src/functionfactory.h +++ b/src/functionfactory.h | |||
@@ -3,11 +3,11 @@ | |||
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | 5 | ||
6 | #include "plugger.h" | 6 | #include "bu/plugger.h" |
7 | #include "singleton.h" | 7 | #include "bu/singleton.h" |
8 | #include "function.h" | 8 | #include "function.h" |
9 | 9 | ||
10 | class FunctionFactory : public Plugger<Function>, public Singleton<FunctionFactory> | 10 | class FunctionFactory : public Bu::Plugger<Function>, public Bu::Singleton<FunctionFactory> |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | FunctionFactory(); | 13 | FunctionFactory(); |
diff --git a/src/functionfilesin.cpp b/src/functionfilesin.cpp index 9b9187d..5301cd2 100644 --- a/src/functionfilesin.cpp +++ b/src/functionfilesin.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include <dirent.h> | 1 | #include <dirent.h> |
2 | 2 | ||
3 | #include "functionfilesin.h" | 3 | #include "functionfilesin.h" |
4 | #include "plugger.h" | 4 | #include "bu/plugger.h" |
5 | #include "build.h" | 5 | #include "build.h" |
6 | 6 | ||
7 | PluginInterface2(filesIn, FunctionFilesIn, Function, "Mike Buland", 0, 1 ); | 7 | PluginInterface2(filesIn, FunctionFilesIn, Function, "Mike Buland", 0, 1 ); |
diff --git a/src/functionregexp.cpp b/src/functionregexp.cpp index 27fdbbd..2dc18b2 100644 --- a/src/functionregexp.cpp +++ b/src/functionregexp.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "functionregexp.h" | 1 | #include "functionregexp.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | #include "regexp.h" | 3 | #include "regexp.h" |
4 | 4 | ||
5 | PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 ); | 5 | PluginInterface2(regexp, FunctionRegexp, Function, "Mike Buland", 0, 1 ); |
diff --git a/src/functiontargets.cpp b/src/functiontargets.cpp index 29a92d3..a94f43e 100644 --- a/src/functiontargets.cpp +++ b/src/functiontargets.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "functiontargets.h" | 1 | #include "functiontargets.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | #include "build.h" | 3 | #include "build.h" |
4 | 4 | ||
5 | PluginInterface2(targets, FunctionTargets, Function, "Mike Buland", 0, 1 ); | 5 | PluginInterface2(targets, FunctionTargets, Function, "Mike Buland", 0, 1 ); |
diff --git a/src/functiontostring.cpp b/src/functiontostring.cpp index 81ea77d..2fdcc1c 100644 --- a/src/functiontostring.cpp +++ b/src/functiontostring.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "functiontostring.h" | 1 | #include "functiontostring.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | 3 | ||
4 | PluginInterface2(toString, FunctionToString, Function, "Mike Buland", 0, 1 ); | 4 | PluginInterface2(toString, FunctionToString, Function, "Mike Buland", 0, 1 ); |
5 | 5 | ||
diff --git a/src/main.cpp b/src/main.cpp index d2cc3c2..376df43 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
@@ -2,12 +2,12 @@ | |||
2 | //#include "viewerplain.h" | 2 | //#include "viewerplain.h" |
3 | //#include "viewerpercent.h" | 3 | //#include "viewerpercent.h" |
4 | //#include "viewermake.h" | 4 | //#include "viewermake.h" |
5 | #include "paramproc.h" | 5 | #include "bu/paramproc.h" |
6 | #include "staticstring.h" | 6 | #include "bu/fstring.h" |
7 | #include "build.h" | 7 | #include "build.h" |
8 | #include "action.h" | 8 | #include "action.h" |
9 | 9 | ||
10 | class Param : public ParamProc | 10 | class Param : public Bu::ParamProc |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | Param() : | 13 | Param() : |
@@ -88,7 +88,7 @@ public: | |||
88 | std::string sFile; | 88 | std::string sFile; |
89 | std::string sView; | 89 | std::string sView; |
90 | std::string sDir; | 90 | std::string sDir; |
91 | StaticString sAction; | 91 | Bu::FString sAction; |
92 | //Viewer *pViewer; | 92 | //Viewer *pViewer; |
93 | bool bDebug; | 93 | bool bDebug; |
94 | bool bPostDebug; | 94 | bool bPostDebug; |
@@ -138,7 +138,7 @@ int main( int argc, char *argv[] ) | |||
138 | else | 138 | else |
139 | { | 139 | { |
140 | if( prm.sAction > 0 ) | 140 | if( prm.sAction > 0 ) |
141 | pBuild->execAction( prm.sAction.getString() ); | 141 | pBuild->execAction( prm.sAction.getStr() ); |
142 | else | 142 | else |
143 | pBuild->execAction(""); | 143 | pBuild->execAction(""); |
144 | } | 144 | } |
diff --git a/src/performcommand.cpp b/src/performcommand.cpp index 46ac05a..3f3aa32 100644 --- a/src/performcommand.cpp +++ b/src/performcommand.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "performcommand.h" | 1 | #include "performcommand.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | #include "build.h" | 3 | #include "build.h" |
4 | #include "viewer.h" | 4 | #include "viewer.h" |
5 | 5 | ||
diff --git a/src/performfactory.cpp b/src/performfactory.cpp index 6c7d57a..6926a3b 100644 --- a/src/performfactory.cpp +++ b/src/performfactory.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "performfactory.h" | 1 | #include "performfactory.h" |
2 | 2 | ||
3 | extern struct PluginInfo command; | 3 | extern struct Bu::PluginInfo command; |
4 | 4 | ||
5 | PerformFactory::PerformFactory() | 5 | PerformFactory::PerformFactory() |
6 | { | 6 | { |
diff --git a/src/performfactory.h b/src/performfactory.h index f5ce5c0..435d9c6 100644 --- a/src/performfactory.h +++ b/src/performfactory.h | |||
@@ -4,10 +4,10 @@ | |||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | 5 | ||
6 | #include "perform.h" | 6 | #include "perform.h" |
7 | #include "plugger.h" | 7 | #include "bu/plugger.h" |
8 | #include "singleton.h" | 8 | #include "bu/singleton.h" |
9 | 9 | ||
10 | class PerformFactory : public Plugger<Perform>, public Singleton<PerformFactory> | 10 | class PerformFactory : public Bu::Plugger<Perform>, public Bu::Singleton<PerformFactory> |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | PerformFactory(); | 13 | PerformFactory(); |
diff --git a/src/regexp.cpp b/src/regexp.cpp index f79be97..4370667 100644 --- a/src/regexp.cpp +++ b/src/regexp.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "regexp.h" | 1 | #include "regexp.h" |
2 | #include "build.h" // For BuildException | 2 | #include "build.h" // For BuildException |
3 | #include "staticstring.h" | 3 | #include "bu/fstring.h" |
4 | 4 | ||
5 | RegExp::RegExp() : | 5 | RegExp::RegExp() : |
6 | bCompiled( false ), | 6 | bCompiled( false ), |
@@ -39,9 +39,9 @@ void RegExp::compile( const char *sSrc ) | |||
39 | size_t length = regerror( nErr, &re, NULL, 0 ); | 39 | size_t length = regerror( nErr, &re, NULL, 0 ); |
40 | char *buffer = new char[length]; | 40 | char *buffer = new char[length]; |
41 | (void) regerror( nErr, &re, buffer, length ); | 41 | (void) regerror( nErr, &re, buffer, length ); |
42 | StaticString s( buffer ); | 42 | Bu::FString s( buffer ); |
43 | delete[] buffer; | 43 | delete[] buffer; |
44 | throw BuildException( s.getString() ); | 44 | throw BuildException( s.getStr() ); |
45 | } | 45 | } |
46 | bCompiled = true; | 46 | bCompiled = true; |
47 | this->sSrc = sSrc; | 47 | this->sSrc = sSrc; |
@@ -71,7 +71,7 @@ std::pair<int,int> RegExp::getSubStringRange( int nIndex ) | |||
71 | std::string RegExp::getSubString( int nIndex ) | 71 | std::string RegExp::getSubString( int nIndex ) |
72 | { | 72 | { |
73 | return std::string( | 73 | return std::string( |
74 | sTest.getString()+aSubStr[nIndex].rm_so, | 74 | sTest.getStr()+aSubStr[nIndex].rm_so, |
75 | aSubStr[nIndex].rm_eo - aSubStr[nIndex].rm_so | 75 | aSubStr[nIndex].rm_eo - aSubStr[nIndex].rm_so |
76 | ); | 76 | ); |
77 | } | 77 | } |
diff --git a/src/regexp.h b/src/regexp.h index 96f3747..a5fab14 100644 --- a/src/regexp.h +++ b/src/regexp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <stdint.h> | 5 | #include <stdint.h> |
6 | #include <regex.h> | 6 | #include <regex.h> |
7 | #include <utility> | 7 | #include <utility> |
8 | #include "staticstring.h" | 8 | #include "bu/fstring.h" |
9 | 9 | ||
10 | class RegExp | 10 | class RegExp |
11 | { | 11 | { |
@@ -21,12 +21,12 @@ public: | |||
21 | std::string getSubString( int nIndex ); | 21 | std::string getSubString( int nIndex ); |
22 | const char *getSource() | 22 | const char *getSource() |
23 | { | 23 | { |
24 | return sSrc; | 24 | return sSrc.getStr(); |
25 | } | 25 | } |
26 | 26 | ||
27 | private: | 27 | private: |
28 | StaticString sSrc; | 28 | Bu::FString sSrc; |
29 | StaticString sTest; | 29 | Bu::FString sTest; |
30 | regex_t re; | 30 | regex_t re; |
31 | bool bCompiled; | 31 | bool bCompiled; |
32 | int nSubStr; | 32 | int nSubStr; |
diff --git a/src/targetfactory.cpp b/src/targetfactory.cpp index ad7d090..a0bc0b0 100644 --- a/src/targetfactory.cpp +++ b/src/targetfactory.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "targetfactory.h" | 1 | #include "targetfactory.h" |
2 | 2 | ||
3 | extern struct PluginInfo file; | 3 | extern struct Bu::PluginInfo file; |
4 | 4 | ||
5 | TargetFactory::TargetFactory() | 5 | TargetFactory::TargetFactory() |
6 | { | 6 | { |
diff --git a/src/targetfactory.h b/src/targetfactory.h index bf8862f..ee1fc2a 100644 --- a/src/targetfactory.h +++ b/src/targetfactory.h | |||
@@ -3,11 +3,11 @@ | |||
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | 5 | ||
6 | #include "plugger.h" | 6 | #include "bu/plugger.h" |
7 | #include "singleton.h" | 7 | #include "bu/singleton.h" |
8 | #include "target.h" | 8 | #include "target.h" |
9 | 9 | ||
10 | class TargetFactory : public Plugger<Target>, public Singleton<TargetFactory> | 10 | class TargetFactory : public Bu::Plugger<Target>, public Bu::Singleton<TargetFactory> |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | TargetFactory(); | 13 | TargetFactory(); |
diff --git a/src/targetfile.cpp b/src/targetfile.cpp index 73cd3ff..0e2d43e 100644 --- a/src/targetfile.cpp +++ b/src/targetfile.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "targetfile.h" | 1 | #include "targetfile.h" |
2 | #include "plugger.h" | 2 | #include "bu/plugger.h" |
3 | #include "rule.h" | 3 | #include "rule.h" |
4 | #include "build.h" | 4 | #include "build.h" |
5 | #include "perform.h" | 5 | #include "perform.h" |
diff --git a/src/viewercolorpct.cpp b/src/viewercolorpct.cpp index 4dd9b34..5bc3cba 100644 --- a/src/viewercolorpct.cpp +++ b/src/viewercolorpct.cpp | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "viewercolorpct.h" | 1 | #include "viewercolorpct.h" |
2 | #include "perform.h" | 2 | #include "perform.h" |
3 | #include "plugger.h" | 3 | #include "bu/plugger.h" |
4 | #include "math.h" | 4 | #include <math.h> |
5 | 5 | ||
6 | PluginInterface2( colorpct, ViewerColorPct, Viewer, "Mike Buland", 0, 1 ); | 6 | PluginInterface2( colorpct, ViewerColorPct, Viewer, "Mike Buland", 0, 1 ); |
7 | 7 | ||
diff --git a/src/viewerfactory.cpp b/src/viewerfactory.cpp index 7826a6a..5726e56 100644 --- a/src/viewerfactory.cpp +++ b/src/viewerfactory.cpp | |||
@@ -1,10 +1,10 @@ | |||
1 | #include "viewerfactory.h" | 1 | #include "viewerfactory.h" |
2 | 2 | ||
3 | extern struct PluginInfo plain; | 3 | extern struct Bu::PluginInfo plain; |
4 | extern struct PluginInfo percent; | 4 | extern struct Bu::PluginInfo percent; |
5 | extern struct PluginInfo make; | 5 | extern struct Bu::PluginInfo make; |
6 | extern struct PluginInfo plainpct; | 6 | extern struct Bu::PluginInfo plainpct; |
7 | extern struct PluginInfo colorpct; | 7 | extern struct Bu::PluginInfo colorpct; |
8 | 8 | ||
9 | ViewerFactory::ViewerFactory() | 9 | ViewerFactory::ViewerFactory() |
10 | { | 10 | { |
diff --git a/src/viewerfactory.h b/src/viewerfactory.h index 8704e03..ffa5b31 100644 --- a/src/viewerfactory.h +++ b/src/viewerfactory.h | |||
@@ -4,10 +4,10 @@ | |||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | 5 | ||
6 | #include "viewer.h" | 6 | #include "viewer.h" |
7 | #include "plugger.h" | 7 | #include "bu/plugger.h" |
8 | #include "singleton.h" | 8 | #include "bu/singleton.h" |
9 | 9 | ||
10 | class ViewerFactory : public Plugger<Viewer>, public Singleton<ViewerFactory> | 10 | class ViewerFactory : public Bu::Plugger<Viewer>, public Bu::Singleton<ViewerFactory> |
11 | { | 11 | { |
12 | public: | 12 | public: |
13 | ViewerFactory(); | 13 | ViewerFactory(); |
diff --git a/src/viewermake.cpp b/src/viewermake.cpp index 0f88f7f..ed11b5f 100644 --- a/src/viewermake.cpp +++ b/src/viewermake.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "viewermake.h" | 1 | #include "viewermake.h" |
2 | #include "perform.h" | 2 | #include "perform.h" |
3 | #include "plugger.h" | 3 | #include "bu/plugger.h" |
4 | 4 | ||
5 | PluginInterface2( make, ViewerMake, Viewer, "Mike Buland", 0, 1 ); | 5 | PluginInterface2( make, ViewerMake, Viewer, "Mike Buland", 0, 1 ); |
6 | 6 | ||
diff --git a/src/viewerpercent.cpp b/src/viewerpercent.cpp index aa7b3c8..baca82a 100644 --- a/src/viewerpercent.cpp +++ b/src/viewerpercent.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "viewerpercent.h" | 1 | #include "viewerpercent.h" |
2 | #include "perform.h" | 2 | #include "perform.h" |
3 | #include "plugger.h" | 3 | #include "bu/plugger.h" |
4 | 4 | ||
5 | #include <sys/ioctl.h> | 5 | #include <sys/ioctl.h> |
6 | #include <stdio.h> | 6 | #include <stdio.h> |
diff --git a/src/viewerplain.cpp b/src/viewerplain.cpp index 9037a40..3e65f21 100644 --- a/src/viewerplain.cpp +++ b/src/viewerplain.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "viewerplain.h" | 1 | #include "viewerplain.h" |
2 | #include "perform.h" | 2 | #include "perform.h" |
3 | #include "plugger.h" | 3 | #include "bu/plugger.h" |
4 | 4 | ||
5 | PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 ); | 5 | PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 ); |
6 | 6 | ||
diff --git a/src/viewerplainpct.cpp b/src/viewerplainpct.cpp index 9988ca7..4d9fa7b 100644 --- a/src/viewerplainpct.cpp +++ b/src/viewerplainpct.cpp | |||
@@ -1,6 +1,6 @@ | |||
1 | #include "viewerplainpct.h" | 1 | #include "viewerplainpct.h" |
2 | #include "perform.h" | 2 | #include "perform.h" |
3 | #include "plugger.h" | 3 | #include "bu/plugger.h" |
4 | #include "math.h" | 4 | #include "math.h" |
5 | 5 | ||
6 | PluginInterface2( plainpct, ViewerPlainPct, Viewer, "Mike Buland", 0, 1 ); | 6 | PluginInterface2( plainpct, ViewerPlainPct, Viewer, "Mike Buland", 0, 1 ); |