From b0e21597f42275c6ffa11e44e6ecc73197a1e5f6 Mon Sep 17 00:00:00 2001 From: prabatuty Date: Thu, 2 Jun 2011 16:12:54 +0000 Subject: [PATCH] code reorg --- src/cache/Makefile.am | 2 +- src/cache/Makefile.in | 34 ++++++++++++++++++---------------- src/{storage => cache}/TableConfig.cxx | 0 src/storage/DatabaseManagerImpl.cxx | 6 +++--- src/storage/DbMgrIndexImpl.cxx | 1 - src/storage/DbMgrTableImpl.cxx | 1 - src/storage/Makefile.am | 1 - 7 files changed, 22 insertions(+), 23 deletions(-) rename src/{storage => cache}/TableConfig.cxx (100%) diff --git a/src/cache/Makefile.am b/src/cache/Makefile.am index a3b0cddb..626d2a08 100644 --- a/src/cache/Makefile.am +++ b/src/cache/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = -I$(top_srcdir)/include $(all_includes) METASOURCES = AUTO lib_LTLIBRARIES = libcacheload.la -libcacheload_la_SOURCES = CacheTableLoader.cxx +libcacheload_la_SOURCES = CacheTableLoader.cxx TableConfig.cxx libcacheload_la_LDFLAGS = -avoid-version -module -lodbc diff --git a/src/cache/Makefile.in b/src/cache/Makefile.in index 17a2586f..fe1c6dfe 100644 --- a/src/cache/Makefile.in +++ b/src/cache/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -51,12 +51,12 @@ am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libcacheload_la_LIBADD = -am_libcacheload_la_OBJECTS = CacheTableLoader.lo +am_libcacheload_la_OBJECTS = CacheTableLoader.lo TableConfig.lo libcacheload_la_OBJECTS = $(am_libcacheload_la_OBJECTS) libcacheload_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libcacheload_la_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @@ -92,6 +92,7 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -117,6 +118,7 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ @@ -187,7 +189,7 @@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir)/include $(all_includes) METASOURCES = AUTO lib_LTLIBRARIES = libcacheload.la -libcacheload_la_SOURCES = CacheTableLoader.cxx +libcacheload_la_SOURCES = CacheTableLoader.cxx TableConfig.cxx libcacheload_la_LDFLAGS = -avoid-version -module -lodbc all: all-am @@ -228,8 +230,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done @@ -237,8 +239,8 @@ uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: @@ -259,6 +261,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CacheTableLoader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TableConfig.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -292,8 +295,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS @@ -305,8 +308,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ @@ -316,13 +319,12 @@ ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique diff --git a/src/storage/TableConfig.cxx b/src/cache/TableConfig.cxx similarity index 100% rename from src/storage/TableConfig.cxx rename to src/cache/TableConfig.cxx diff --git a/src/storage/DatabaseManagerImpl.cxx b/src/storage/DatabaseManagerImpl.cxx index d7e853db..ec45f264 100644 --- a/src/storage/DatabaseManagerImpl.cxx +++ b/src/storage/DatabaseManagerImpl.cxx @@ -25,7 +25,7 @@ #include #include #include -#include +//#include #include @@ -848,7 +848,7 @@ DbRetVal DatabaseManagerImpl::writeSchemaFile() } fNameIter.reset(); while (fNameIter.hasElement()) - delete ((FieldName *) fNameIter.nextElement()); + delete ((Identifier *) fNameIter.nextElement()); fNameList.reset(); fprintf(fp, ");\n"); @@ -859,7 +859,7 @@ DbRetVal DatabaseManagerImpl::writeSchemaFile() ListIterator tIter = tableList.getIterator(); tIter.reset(); while (tIter.hasElement()) - delete ((FieldName *) tIter.nextElement()); + delete ((Identifier *) tIter.nextElement()); tableList.reset(); fclose(fp); diff --git a/src/storage/DbMgrIndexImpl.cxx b/src/storage/DbMgrIndexImpl.cxx index 98b80419..b1ca3571 100644 --- a/src/storage/DbMgrIndexImpl.cxx +++ b/src/storage/DbMgrIndexImpl.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include DbRetVal DatabaseManagerImpl::renameIndex(const char *oldName,const char *newName) diff --git a/src/storage/DbMgrTableImpl.cxx b/src/storage/DbMgrTableImpl.cxx index 30b5ccc8..9ef62e75 100644 --- a/src/storage/DbMgrTableImpl.cxx +++ b/src/storage/DbMgrTableImpl.cxx @@ -25,7 +25,6 @@ #include #include #include -#include #include //-1 -> Unable to create chunk. No memory diff --git a/src/storage/Makefile.am b/src/storage/Makefile.am index 60cc48e4..8442ddbf 100644 --- a/src/storage/Makefile.am +++ b/src/storage/Makefile.am @@ -4,7 +4,6 @@ lib_LTLIBRARIES = libcsql.la libcsql_la_LDFLAGS = -avoid-version -module libcsql_la_SOURCES = BucketIter.cxx TreeIter.cxx BucketList.cxx \ Chunk.cxx VarChunk.cxx \ - TableConfig.cxx \ CatalogTables.cxx CatalogTablesIdx.cxx CatalogTablesFk.cxx \ ChunkIterator.cxx Condition.cxx Connection.cxx Database.cxx \ DatabaseManagerImpl.cxx DbMgrTableImpl.cxx DbMgrIndexImpl.cxx \ -- 2.11.4.GIT