From 79fc9ce029be3e91d3249a654f84c7a1ce1ff9ee Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 07 Jun 2012 19:46:44 +0000
Subject: [PATCH] spherical harmonics coefficients co fixed and working. Zero based indexing was solved in such a manner, that we allocated more memory that is required by coefficients.

---
 test/Makefile    |  136 +++----------------
 test/Makefile.in |  136 +++----------------
 config.log       |   68 ---------
 src/co_test.c    |    6 
 src/sh.c         |   20 +-
 test/Makefile.am |    2 
 6 files changed, 60 insertions(+), 308 deletions(-)

diff --git a/config.log b/config.log
index e443083..e14ef41 100644
--- a/config.log
+++ b/config.log
@@ -10,7 +10,7 @@
 ## Platform. ##
 ## --------- ##
 
-hostname = natalie
+hostname = andromeda
 uname -m = x86_64
 uname -r = 3.2.0-24-generic
 uname -s = Linux
@@ -27,12 +27,6 @@
 /usr/bin/oslevel       = unknown
 /bin/universe          = unknown
 
-PATH: /home/samo/OpenFOAM/ThirdParty-2.1.x/platforms/linux64Gcc/openmpi-1.5.3/bin
-PATH: /home/samo/OpenFOAM/samo-2.1.x/platforms/linux64GccDPOpt/bin
-PATH: /home/samo/OpenFOAM/site/2.1.x/platforms/linux64GccDPOpt/bin
-PATH: /home/samo/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin
-PATH: /home/samo/OpenFOAM/OpenFOAM-2.1.x/bin
-PATH: /home/samo/OpenFOAM/OpenFOAM-2.1.x/wmake
 PATH: /home/samo/bin
 PATH: /usr/lib/lightdm/lightdm
 PATH: /usr/local/sbin
@@ -42,7 +36,6 @@
 PATH: /sbin
 PATH: /bin
 PATH: /usr/games
-PATH: /home/samo/arm/gnuarm/bin
 
 
 ## ----------- ##
@@ -281,12 +274,13 @@
   CONFIG_COMMANDS = 
   $ ./config.status 
 
-on natalie
+on andromeda
 
 config.status:873: creating Makefile
 config.status:873: creating src/Makefile
 config.status:873: creating test/Makefile
 config.status:873: creating config.h
+config.status:1054: config.h is unchanged
 config.status:1102: executing depfiles commands
 
 ## ---------------- ##
@@ -483,61 +477,7 @@
   CONFIG_COMMANDS = 
   $ ./config.status test/Makefile depfiles
 
-on natalie
+on andromeda
 
 config.status:873: creating test/Makefile
-config.status:1102: executing depfiles commands
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by FULL-PACKAGE-NAME config.status VERSION, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
-
-  CONFIG_FILES    = 
-  CONFIG_HEADERS  = 
-  CONFIG_LINKS    = 
-  CONFIG_COMMANDS = 
-  $ ./config.status test/Makefile depfiles
-
-on natalie
-
-config.status:873: creating test/Makefile
-config.status:1102: executing depfiles commands
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by FULL-PACKAGE-NAME config.status VERSION, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
-
-  CONFIG_FILES    = 
-  CONFIG_HEADERS  = 
-  CONFIG_LINKS    = 
-  CONFIG_COMMANDS = 
-  $ ./config.status test/Makefile depfiles
-
-on natalie
-
-config.status:873: creating test/Makefile
-config.status:1102: executing depfiles commands
-
-## ---------------------- ##
-## Running config.status. ##
-## ---------------------- ##
-
-This file was extended by FULL-PACKAGE-NAME config.status VERSION, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
-
-  CONFIG_FILES    = 
-  CONFIG_HEADERS  = 
-  CONFIG_LINKS    = 
-  CONFIG_COMMANDS = 
-  $ ./config.status src/Makefile depfiles
-
-on natalie
-
-config.status:873: creating src/Makefile
 config.status:1102: executing depfiles commands
diff --git a/src/co_test.c b/src/co_test.c
index cf08f6f..3b5c69d 100644
--- a/src/co_test.c
+++ b/src/co_test.c
@@ -16,9 +16,9 @@
 
 vesicle->sphHarmonics=sph_init(vesicle->vlist, 10);
 int i,j;
-for(i=0;i<vesicle->sphHarmonics->l;i++){
-    for(j=0;j<2*i+1;j++){
-    fprintf(stderr,"co(%d,%d)=%f\n",i,j,vesicle->sphHarmonics->co[i][j]);
+for(i=1;i<=vesicle->sphHarmonics->l;i++){
+    for(j=1;j<=2*i+1;j++){
+    fprintf(stderr,"co(%d,%d)=%e\n",i,j,vesicle->sphHarmonics->co[i][j]);
     }
 }
 
diff --git a/src/sh.c b/src/sh.c
index cfab468..12a6ce4 100644
--- a/src/sh.c
+++ b/src/sh.c
@@ -27,9 +27,10 @@
 
 
     /* lets initialize co */
-    sph->co=(ts_double **)calloc(l,sizeof(ts_double *));
-    for(j=0;j<l;j++){
-        sph->co[j]=(ts_double *)calloc(2*j+1,sizeof(ts_double));
+//NOTE: C is has zero based indexing. Code is imported from fortran and to comply with original indexes we actually generate one index more. Also second dimension is 2*j+2 instead of 2*j+2. elements starting with 0 are useles and should be ignored!
+    sph->co=(ts_double **)calloc(l+1,sizeof(ts_double *));
+    for(j=0;j<=l;j++){
+        sph->co[j]=(ts_double *)calloc(2*j+2,sizeof(ts_double));
     }
 
     sph->l=l;   
@@ -47,6 +48,7 @@
         if(sph->ulm[i]!=NULL) free(sph->ulm[i]);
         if(sph->co[i]!=NULL) free(sph->co[i]);
     }
+        if(sph->co[sph->l]!=NULL) free(sph->co[sph->l]);
     if(sph->co != NULL) free(sph->co);
     if(sph->ulm !=NULL) free(sph->ulm);
 
@@ -122,16 +124,16 @@
 ts_bool precomputeShCoeff(ts_spharm *sph){
     ts_int i,j,al,am;
     ts_double **co=sph->co;
-    for(i=0;i<sph->l;i++){
-        al=i+1;
+    for(i=1;i<=sph->l;i++){
+        al=i;
         sph->co[i][i+1]=sqrt((2.0*al+1.0)/2.0/M_PI);
-        for(j=0;j<i;j++){
-            am=j+1;
+        for(j=1;j<=i-1;j++){
+            am=j;
             sph->co[i][i+1+j]=co[i][i+j]*sqrt(1.0/(al-am+1.0)/(al+am));
             sph->co[i][i+1-j]=co[i][i+1+j];
         }
-        co[i][2*i]=co[i][2*i]*sqrt(1.0/(2.0*al));
-        co[i][0]=co[i][2*i+1];
+        co[i][2*i+1]=co[i][2*i]*sqrt(1.0/(2.0*al));
+        co[i][1]=co[i][2*i+1];
         co[i][i+1]=sqrt((2.0*al+1.0)/4.0/M_PI);
     }
     return TS_SUCCESS;
diff --git a/test/Makefile b/test/Makefile
index ea2d565..4b9bbd1 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -35,7 +35,6 @@
 doxygentest_PROGRAMS = doxygentest$(EXEEXT)
 float3cmp_PROGRAMS = float3cmp$(EXEEXT)
 confusetest_PROGRAMS = confusetest$(EXEEXT)
-co_PROGRAMS = co$(EXEEXT)
 subdir = test
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -46,14 +45,10 @@
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(codir)" "$(DESTDIR)$(confusetestdir)" \
+am__installdirs = "$(DESTDIR)$(confusetestdir)" \
 	"$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"
-PROGRAMS = $(co_PROGRAMS) $(confusetest_PROGRAMS) \
-	$(doxygentest_PROGRAMS) $(float3cmp_PROGRAMS)
-am_co_OBJECTS = co.$(OBJEXT) sh.$(OBJEXT) general.$(OBJEXT) \
-	vesicle.$(OBJEXT)
-co_OBJECTS = $(am_co_OBJECTS)
-co_LDADD = $(LDADD)
+PROGRAMS = $(confusetest_PROGRAMS) $(doxygentest_PROGRAMS) \
+	$(float3cmp_PROGRAMS)
 am_confusetest_OBJECTS = confusetest.$(OBJEXT)
 confusetest_OBJECTS = $(am_confusetest_OBJECTS)
 confusetest_LDADD = $(LDADD)
@@ -73,10 +68,10 @@
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(co_SOURCES) $(confusetest_SOURCES) $(doxygentest_SOURCES) \
+SOURCES = $(confusetest_SOURCES) $(doxygentest_SOURCES) \
 	$(float3cmp_SOURCES)
-DIST_SOURCES = $(co_SOURCES) $(confusetest_SOURCES) \
-	$(doxygentest_SOURCES) $(float3cmp_SOURCES)
+DIST_SOURCES = $(confusetest_SOURCES) $(doxygentest_SOURCES) \
+	$(float3cmp_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -174,7 +169,6 @@
 float3cmp_SOURCES = float3cmp.c
 confusetest_SOURCES = confusetest.c
 confusetest_LDFLAGS = -lconfuse
-co_SOURCES = co.c ../src/sh.c ../src/general.c ../src/vesicle.c
 all: all-am
 
 .SUFFIXES:
@@ -209,43 +203,6 @@
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-install-coPROGRAMS: $(co_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(codir)" || $(MKDIR_P) "$(DESTDIR)$(codir)"
-	@list='$(co_PROGRAMS)'; test -n "$(codir)" || list=; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p; \
-	  then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(codir)$$dir'"; \
-	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(codir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-coPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(co_PROGRAMS)'; test -n "$(codir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' `; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(codir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(codir)" && rm -f $$files
-
-clean-coPROGRAMS:
-	-test -z "$(co_PROGRAMS)" || rm -f $(co_PROGRAMS)
 install-confusetestPROGRAMS: $(confusetest_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(confusetestdir)" || $(MKDIR_P) "$(DESTDIR)$(confusetestdir)"
@@ -357,9 +314,6 @@
 
 clean-float3cmpPROGRAMS:
 	-test -z "$(float3cmp_PROGRAMS)" || rm -f $(float3cmp_PROGRAMS)
-co$(EXEEXT): $(co_OBJECTS) $(co_DEPENDENCIES) $(EXTRA_co_DEPENDENCIES) 
-	@rm -f co$(EXEEXT)
-	$(LINK) $(co_OBJECTS) $(co_LDADD) $(LIBS)
 confusetest$(EXEEXT): $(confusetest_OBJECTS) $(confusetest_DEPENDENCIES) $(EXTRA_confusetest_DEPENDENCIES) 
 	@rm -f confusetest$(EXEEXT)
 	$(confusetest_LINK) $(confusetest_OBJECTS) $(confusetest_LDADD) $(LIBS)
@@ -376,13 +330,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-include ./$(DEPDIR)/co.Po
 include ./$(DEPDIR)/confusetest.Po
 include ./$(DEPDIR)/doxygentest.Po
 include ./$(DEPDIR)/float3cmp.Po
-include ./$(DEPDIR)/general.Po
-include ./$(DEPDIR)/sh.Po
-include ./$(DEPDIR)/vesicle.Po
 
 .c.o:
 	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -397,48 +347,6 @@
 #	source='$<' object='$@' libtool=no \
 #	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
 #	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-sh.o: ../src/sh.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sh.o -MD -MP -MF $(DEPDIR)/sh.Tpo -c -o sh.o `test -f '../src/sh.c' || echo '$(srcdir)/'`../src/sh.c
-	$(am__mv) $(DEPDIR)/sh.Tpo $(DEPDIR)/sh.Po
-#	source='../src/sh.c' object='sh.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sh.o `test -f '../src/sh.c' || echo '$(srcdir)/'`../src/sh.c
-
-sh.obj: ../src/sh.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sh.obj -MD -MP -MF $(DEPDIR)/sh.Tpo -c -o sh.obj `if test -f '../src/sh.c'; then $(CYGPATH_W) '../src/sh.c'; else $(CYGPATH_W) '$(srcdir)/../src/sh.c'; fi`
-	$(am__mv) $(DEPDIR)/sh.Tpo $(DEPDIR)/sh.Po
-#	source='../src/sh.c' object='sh.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sh.obj `if test -f '../src/sh.c'; then $(CYGPATH_W) '../src/sh.c'; else $(CYGPATH_W) '$(srcdir)/../src/sh.c'; fi`
-
-general.o: ../src/general.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT general.o -MD -MP -MF $(DEPDIR)/general.Tpo -c -o general.o `test -f '../src/general.c' || echo '$(srcdir)/'`../src/general.c
-	$(am__mv) $(DEPDIR)/general.Tpo $(DEPDIR)/general.Po
-#	source='../src/general.c' object='general.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o general.o `test -f '../src/general.c' || echo '$(srcdir)/'`../src/general.c
-
-general.obj: ../src/general.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT general.obj -MD -MP -MF $(DEPDIR)/general.Tpo -c -o general.obj `if test -f '../src/general.c'; then $(CYGPATH_W) '../src/general.c'; else $(CYGPATH_W) '$(srcdir)/../src/general.c'; fi`
-	$(am__mv) $(DEPDIR)/general.Tpo $(DEPDIR)/general.Po
-#	source='../src/general.c' object='general.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o general.obj `if test -f '../src/general.c'; then $(CYGPATH_W) '../src/general.c'; else $(CYGPATH_W) '$(srcdir)/../src/general.c'; fi`
-
-vesicle.o: ../src/vesicle.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vesicle.o -MD -MP -MF $(DEPDIR)/vesicle.Tpo -c -o vesicle.o `test -f '../src/vesicle.c' || echo '$(srcdir)/'`../src/vesicle.c
-	$(am__mv) $(DEPDIR)/vesicle.Tpo $(DEPDIR)/vesicle.Po
-#	source='../src/vesicle.c' object='vesicle.o' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vesicle.o `test -f '../src/vesicle.c' || echo '$(srcdir)/'`../src/vesicle.c
-
-vesicle.obj: ../src/vesicle.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vesicle.obj -MD -MP -MF $(DEPDIR)/vesicle.Tpo -c -o vesicle.obj `if test -f '../src/vesicle.c'; then $(CYGPATH_W) '../src/vesicle.c'; else $(CYGPATH_W) '$(srcdir)/../src/vesicle.c'; fi`
-	$(am__mv) $(DEPDIR)/vesicle.Tpo $(DEPDIR)/vesicle.Po
-#	source='../src/vesicle.c' object='vesicle.obj' libtool=no \
-#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
-#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vesicle.obj `if test -f '../src/vesicle.c'; then $(CYGPATH_W) '../src/vesicle.c'; else $(CYGPATH_W) '$(srcdir)/../src/vesicle.c'; fi`
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -526,7 +434,7 @@
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(codir)" "$(DESTDIR)$(confusetestdir)" "$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"; do \
+	for dir in "$(DESTDIR)$(confusetestdir)" "$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -561,9 +469,8 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-coPROGRAMS clean-confusetestPROGRAMS \
-	clean-doxygentestPROGRAMS clean-float3cmpPROGRAMS \
-	clean-generic mostlyclean-am
+clean-am: clean-confusetestPROGRAMS clean-doxygentestPROGRAMS \
+	clean-float3cmpPROGRAMS clean-generic mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -583,7 +490,7 @@
 
 info-am:
 
-install-data-am: install-coPROGRAMS install-confusetestPROGRAMS \
+install-data-am: install-confusetestPROGRAMS \
 	install-doxygentestPROGRAMS install-float3cmpPROGRAMS
 
 install-dvi: install-dvi-am
@@ -629,26 +536,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-coPROGRAMS uninstall-confusetestPROGRAMS \
+uninstall-am: uninstall-confusetestPROGRAMS \
 	uninstall-doxygentestPROGRAMS uninstall-float3cmpPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-coPROGRAMS \
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
 	clean-confusetestPROGRAMS clean-doxygentestPROGRAMS \
 	clean-float3cmpPROGRAMS clean-generic ctags distclean \
 	distclean-compile distclean-generic distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-coPROGRAMS install-confusetestPROGRAMS install-data \
-	install-data-am install-doxygentestPROGRAMS install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-float3cmpPROGRAMS install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-coPROGRAMS \
+	install-confusetestPROGRAMS install-data install-data-am \
+	install-doxygentestPROGRAMS install-dvi install-dvi-am \
+	install-exec install-exec-am install-float3cmpPROGRAMS \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags uninstall uninstall-am \
 	uninstall-confusetestPROGRAMS uninstall-doxygentestPROGRAMS \
 	uninstall-float3cmpPROGRAMS
 
diff --git a/test/Makefile.am b/test/Makefile.am
index 7442980..f8962fb 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,5 +9,3 @@
 confusetest_PROGRAMS=confusetest
 confusetest_SOURCES=confusetest.c
 confusetest_LDFLAGS=-lconfuse
-co_PROGRAMS=co
-co_SOURCES=co.c ../src/sh.c ../src/general.c ../src/vesicle.c
diff --git a/test/Makefile.in b/test/Makefile.in
index 2c88880..434bbde 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -35,7 +35,6 @@
 doxygentest_PROGRAMS = doxygentest$(EXEEXT)
 float3cmp_PROGRAMS = float3cmp$(EXEEXT)
 confusetest_PROGRAMS = confusetest$(EXEEXT)
-co_PROGRAMS = co$(EXEEXT)
 subdir = test
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -46,14 +45,10 @@
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(codir)" "$(DESTDIR)$(confusetestdir)" \
+am__installdirs = "$(DESTDIR)$(confusetestdir)" \
 	"$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"
-PROGRAMS = $(co_PROGRAMS) $(confusetest_PROGRAMS) \
-	$(doxygentest_PROGRAMS) $(float3cmp_PROGRAMS)
-am_co_OBJECTS = co.$(OBJEXT) sh.$(OBJEXT) general.$(OBJEXT) \
-	vesicle.$(OBJEXT)
-co_OBJECTS = $(am_co_OBJECTS)
-co_LDADD = $(LDADD)
+PROGRAMS = $(confusetest_PROGRAMS) $(doxygentest_PROGRAMS) \
+	$(float3cmp_PROGRAMS)
 am_confusetest_OBJECTS = confusetest.$(OBJEXT)
 confusetest_OBJECTS = $(am_confusetest_OBJECTS)
 confusetest_LDADD = $(LDADD)
@@ -73,10 +68,10 @@
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(co_SOURCES) $(confusetest_SOURCES) $(doxygentest_SOURCES) \
+SOURCES = $(confusetest_SOURCES) $(doxygentest_SOURCES) \
 	$(float3cmp_SOURCES)
-DIST_SOURCES = $(co_SOURCES) $(confusetest_SOURCES) \
-	$(doxygentest_SOURCES) $(float3cmp_SOURCES)
+DIST_SOURCES = $(confusetest_SOURCES) $(doxygentest_SOURCES) \
+	$(float3cmp_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -174,7 +169,6 @@
 float3cmp_SOURCES = float3cmp.c
 confusetest_SOURCES = confusetest.c
 confusetest_LDFLAGS = -lconfuse
-co_SOURCES = co.c ../src/sh.c ../src/general.c ../src/vesicle.c
 all: all-am
 
 .SUFFIXES:
@@ -209,43 +203,6 @@
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-install-coPROGRAMS: $(co_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(codir)" || $(MKDIR_P) "$(DESTDIR)$(codir)"
-	@list='$(co_PROGRAMS)'; test -n "$(codir)" || list=; \
-	for p in $$list; do echo "$$p $$p"; done | \
-	sed 's/$(EXEEXT)$$//' | \
-	while read p p1; do if test -f $$p; \
-	  then echo "$$p"; echo "$$p"; else :; fi; \
-	done | \
-	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-	sed 'N;N;N;s,\n, ,g' | \
-	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
-	    else { print "f", $$3 "/" $$4, $$1; } } \
-	  END { for (d in files) print "f", d, files[d] }' | \
-	while read type dir files; do \
-	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-	    test -z "$$files" || { \
-	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(codir)$$dir'"; \
-	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(codir)$$dir" || exit $$?; \
-	    } \
-	; done
-
-uninstall-coPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(co_PROGRAMS)'; test -n "$(codir)" || list=; \
-	files=`for p in $$list; do echo "$$p"; done | \
-	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-	      -e 's/$$/$(EXEEXT)/' `; \
-	test -n "$$list" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(codir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(codir)" && rm -f $$files
-
-clean-coPROGRAMS:
-	-test -z "$(co_PROGRAMS)" || rm -f $(co_PROGRAMS)
 install-confusetestPROGRAMS: $(confusetest_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(confusetestdir)" || $(MKDIR_P) "$(DESTDIR)$(confusetestdir)"
@@ -357,9 +314,6 @@
 
 clean-float3cmpPROGRAMS:
 	-test -z "$(float3cmp_PROGRAMS)" || rm -f $(float3cmp_PROGRAMS)
-co$(EXEEXT): $(co_OBJECTS) $(co_DEPENDENCIES) $(EXTRA_co_DEPENDENCIES) 
-	@rm -f co$(EXEEXT)
-	$(LINK) $(co_OBJECTS) $(co_LDADD) $(LIBS)
 confusetest$(EXEEXT): $(confusetest_OBJECTS) $(confusetest_DEPENDENCIES) $(EXTRA_confusetest_DEPENDENCIES) 
 	@rm -f confusetest$(EXEEXT)
 	$(confusetest_LINK) $(confusetest_OBJECTS) $(confusetest_LDADD) $(LIBS)
@@ -376,13 +330,9 @@
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/co.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/confusetest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doxygentest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float3cmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/general.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vesicle.Po@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -397,48 +347,6 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-sh.o: ../src/sh.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sh.o -MD -MP -MF $(DEPDIR)/sh.Tpo -c -o sh.o `test -f '../src/sh.c' || echo '$(srcdir)/'`../src/sh.c
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/sh.Tpo $(DEPDIR)/sh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/sh.c' object='sh.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sh.o `test -f '../src/sh.c' || echo '$(srcdir)/'`../src/sh.c
-
-sh.obj: ../src/sh.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sh.obj -MD -MP -MF $(DEPDIR)/sh.Tpo -c -o sh.obj `if test -f '../src/sh.c'; then $(CYGPATH_W) '../src/sh.c'; else $(CYGPATH_W) '$(srcdir)/../src/sh.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/sh.Tpo $(DEPDIR)/sh.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/sh.c' object='sh.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sh.obj `if test -f '../src/sh.c'; then $(CYGPATH_W) '../src/sh.c'; else $(CYGPATH_W) '$(srcdir)/../src/sh.c'; fi`
-
-general.o: ../src/general.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT general.o -MD -MP -MF $(DEPDIR)/general.Tpo -c -o general.o `test -f '../src/general.c' || echo '$(srcdir)/'`../src/general.c
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/general.Tpo $(DEPDIR)/general.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/general.c' object='general.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o general.o `test -f '../src/general.c' || echo '$(srcdir)/'`../src/general.c
-
-general.obj: ../src/general.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT general.obj -MD -MP -MF $(DEPDIR)/general.Tpo -c -o general.obj `if test -f '../src/general.c'; then $(CYGPATH_W) '../src/general.c'; else $(CYGPATH_W) '$(srcdir)/../src/general.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/general.Tpo $(DEPDIR)/general.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/general.c' object='general.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o general.obj `if test -f '../src/general.c'; then $(CYGPATH_W) '../src/general.c'; else $(CYGPATH_W) '$(srcdir)/../src/general.c'; fi`
-
-vesicle.o: ../src/vesicle.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vesicle.o -MD -MP -MF $(DEPDIR)/vesicle.Tpo -c -o vesicle.o `test -f '../src/vesicle.c' || echo '$(srcdir)/'`../src/vesicle.c
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/vesicle.Tpo $(DEPDIR)/vesicle.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/vesicle.c' object='vesicle.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vesicle.o `test -f '../src/vesicle.c' || echo '$(srcdir)/'`../src/vesicle.c
-
-vesicle.obj: ../src/vesicle.c
-@am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vesicle.obj -MD -MP -MF $(DEPDIR)/vesicle.Tpo -c -o vesicle.obj `if test -f '../src/vesicle.c'; then $(CYGPATH_W) '../src/vesicle.c'; else $(CYGPATH_W) '$(srcdir)/../src/vesicle.c'; fi`
-@am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/vesicle.Tpo $(DEPDIR)/vesicle.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../src/vesicle.c' object='vesicle.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vesicle.obj `if test -f '../src/vesicle.c'; then $(CYGPATH_W) '../src/vesicle.c'; else $(CYGPATH_W) '$(srcdir)/../src/vesicle.c'; fi`
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -526,7 +434,7 @@
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(codir)" "$(DESTDIR)$(confusetestdir)" "$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"; do \
+	for dir in "$(DESTDIR)$(confusetestdir)" "$(DESTDIR)$(doxygentestdir)" "$(DESTDIR)$(float3cmpdir)"; do \
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
@@ -561,9 +469,8 @@
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-coPROGRAMS clean-confusetestPROGRAMS \
-	clean-doxygentestPROGRAMS clean-float3cmpPROGRAMS \
-	clean-generic mostlyclean-am
+clean-am: clean-confusetestPROGRAMS clean-doxygentestPROGRAMS \
+	clean-float3cmpPROGRAMS clean-generic mostlyclean-am
 
 distclean: distclean-am
 	-rm -rf ./$(DEPDIR)
@@ -583,7 +490,7 @@
 
 info-am:
 
-install-data-am: install-coPROGRAMS install-confusetestPROGRAMS \
+install-data-am: install-confusetestPROGRAMS \
 	install-doxygentestPROGRAMS install-float3cmpPROGRAMS
 
 install-dvi: install-dvi-am
@@ -629,26 +536,25 @@
 
 ps-am:
 
-uninstall-am: uninstall-coPROGRAMS uninstall-confusetestPROGRAMS \
+uninstall-am: uninstall-confusetestPROGRAMS \
 	uninstall-doxygentestPROGRAMS uninstall-float3cmpPROGRAMS
 
 .MAKE: install-am install-strip
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-coPROGRAMS \
+.PHONY: CTAGS GTAGS all all-am check check-am clean \
 	clean-confusetestPROGRAMS clean-doxygentestPROGRAMS \
 	clean-float3cmpPROGRAMS clean-generic ctags distclean \
 	distclean-compile distclean-generic distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-coPROGRAMS install-confusetestPROGRAMS install-data \
-	install-data-am install-doxygentestPROGRAMS install-dvi \
-	install-dvi-am install-exec install-exec-am \
-	install-float3cmpPROGRAMS install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-generic mostlyclean mostlyclean-compile \
-	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-coPROGRAMS \
+	install-confusetestPROGRAMS install-data install-data-am \
+	install-doxygentestPROGRAMS install-dvi install-dvi-am \
+	install-exec install-exec-am install-float3cmpPROGRAMS \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags uninstall uninstall-am \
 	uninstall-confusetestPROGRAMS uninstall-doxygentestPROGRAMS \
 	uninstall-float3cmpPROGRAMS
 

--
Gitblit v1.9.3