patch set!

[email protected]
Newsgroups gmane.comp.gnu.gift.general
Message-ID <[email protected]>
here are the patches i've been talking about.

changelogs for each, etc etc.. 29 patches.

breifly, 
make gift build in a builddir (AKA, instead of doing "./configure; make" you do "mkdir build; cd build; ../configure ; make")
fix two buffer overflows (one mine, one davids)
move from uint32_t to uint_fast32_t, which is uint32_t on 32bit, and uint64_t on 64bit.
cleanups.. thats about it.

here goes!

Julia Longtin <[email protected]>

_______________________________________________
help-GIFT mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gift
00-ChangeLog (text/plain, 353 B)
--- ../../anoncvs/gift/ChangeLog	2006-10-22 09:59:12.000000000 -0500
+++ ChangeLog	2006-11-18 11:03:04.000000000 -0600
@@ -1,3 +1,9 @@
+2006-11-18    <[email protected]>
+
+	* bootstrap-cvs.sh
+	error out when a step fails.
+	remove --force from autoconf and aclocal invocations.
+
 2006-10-10    <[email protected]>
 
 	* FeatureExtraction/gabor.c
00-bootstrap_cvs_sh-remove_force_and_error_out.patch (text/plain, 1 KB)
--- ../../anoncvs/gift/bootstrap-cvs.sh	2006-02-28 07:48:21.000000000 -0600
+++ bootstrap-cvs.sh	2006-11-18 10:39:19.000000000 -0600
@@ -33,12 +33,12 @@
 echo "running libtoolize"
 libtoolize --force --ltdl  || { echo "Libtoolize failed. THIS MIGHT CAUSE PROBLEMS LATER, continuing " ; }
 echo "running aclocal" 
-aclocal --force -I . || { echo "bootstrap failed, because aclocal failed. exiting. " , exit 100; }
+aclocal -I . || { echo "bootstrap failed, because aclocal failed. exiting. " ; exit 100; }
 echo "...done"
 echo "running automake -a"
-automake -a --force ||  { echo "bootstrap failed, because automake failed. exiting." , exit 101; }
+automake -a ||  { echo "bootstrap failed, because automake failed. exiting." ; exit 101; }
 echo "...done"
 echo "running autoconf"
-autoconf ||    { echo "bootstrap failed, because autoconf failed. exiting." , exit 102; }
+autoconf ||    { echo "bootstrap failed, because autoconf failed. exiting." ; exit 102; }
 echo "...done"
 echo "Now you should be able to run ./configure"
01-ChangeLog (text/plain, 398 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 11:26:47.000000000 -0600
+++ ChangeLog	2006-11-18 11:40:45.000000000 -0600
@@ -3,6 +3,8 @@
 	* bootstrap-cvs.sh
 	error out when a step fails.
 	remove --force from autoconf and aclocal invocations.
+	* configure.in
+	call perl test program with a path, so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
01-configure_in-make_build_in_subdir.patch (text/plain, 604 B)
--- ../../dev3/gift/configure.in	2006-07-11 15:05:23.000000000 -0500
+++ configure.in	2006-11-18 11:10:17.000000000 -0600
@@ -66,7 +66,7 @@
 AC_PATH_PROG(PERL,perl)
 
 
-if perl gift-check-perl-config.pl "XML::DOM" "XML::XQL" "XML::XQL::DOM" "Text::Iconv" "HTTP::Request" "XML::Parser"; 
+if perl ${srcdir}/gift-check-perl-config.pl "XML::DOM" "XML::XQL" "XML::XQL::DOM" "Text::Iconv" "HTTP::Request" "XML::Parser"; 
 	then echo "Your perl setup seems to be OK for running the GIFT" ; else 
 	 AC_MSG_ERROR([There are some modules missing from your perl configuration. Please see the output above.])
 fi
02-ChangeLog (text/plain, 524 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 11:43:33.000000000 -0600
+++ ChangeLog	2006-11-18 12:02:21.000000000 -0600
@@ -5,6 +5,9 @@
 	remove --force from autoconf and aclocal invocations.
 	* configure.in
 	call perl test program with a path, so that we can build gift in a directory other than ${srcdir}
+	* dtd/Makefile.am
+	make mv invocations use ${top_builddir}, so that we can build gift in a directory other than ${srcdir}
+	replace "../" with appropriate autoconf variables.
 
 2006-10-10    <[email protected]>
02-dtd_Makefile_am-make_build_in_subdir.patch (text/plain, 864 B)
--- ../../dev2/gift/dtd/Makefile.am	2001-12-11 18:26:21.000000000 +0100
+++ dtd/Makefile.am	2006-10-31 22:22:31.000000000 +0100
@@ -1,14 +1,14 @@
 
-noinst_DATA= ../libMRML/cc/mrml_const.cc
+noinst_DATA= ${top_builddir}/libMRML/cc/mrml_const.cc
 
 #	
 # making a new mrml_const.cc if mrml.dtd has been changed
 #
-../libMRML/cc/mrml_const.cc: mrml.dtd
-	$(PERL) ../scripts/perl/gift-dtd-to-keywords.pl ../dtd/mrml.dtd mrml mrml_const charmer.mrml
-	mv mrml_const.h ../libMRML/include
-	mv mrml_const.cc ../libMRML/cc
-	mv mrml_const.java ../
+${top_builddir}/libMRML/cc/mrml_const.cc: mrml.dtd
+	$(PERL) ${top_builddir}/scripts/perl/gift-dtd-to-keywords.pl ${srcdir}/mrml.dtd mrml mrml_const charmer.mrml
+	mv mrml_const.h ${top_builddir}/libMRML/include
+	mv mrml_const.cc ${top_builddir}/libMRML/cc
+	mv mrml_const.java ${top_builddir}/
 
 EXTRA_DIST=mrml.dtd
03-ChangeLog (text/plain, 542 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 12:03:45.000000000 -0600
+++ ChangeLog	2006-11-18 12:18:55.000000000 -0600
@@ -8,6 +8,9 @@
 	* dtd/Makefile.am
 	make mv invocations use ${top_builddir}, so that we can build gift in a directory other than ${srcdir}
 	replace "../" with appropriate autoconf variables.
+	* libMRML/cc/CAttributeList.cc
+	include wordsize.h, so we can tell if we're a 64 or 32bit binary during build.
+	when dumping pointer as int, check the size of the pointer before casting.
 
 2006-10-10    <[email protected]>
03-libMRML_cc_CAttributeList_cc-check_size_of_pointer_before_dumping.patch (text/plain, 1 KB)
--- ../../dev3/gift/libMRML/cc/CAttributeList.cc	2006-02-28 07:48:22.000000000 -0600
+++ libMRML/cc/CAttributeList.cc	2006-11-18 12:14:09.000000000 -0600
@@ -27,6 +27,8 @@
 #include "libMRML/include/CMutex.h"
 #include <iostream>
 #include <algorithm>
+/* for __WORDSIZE */
+#include <bits/wordsize.h>
 extern CMutex* gMutex;
 
 CAttributeList::CAttributeList(const char * const * const inAttributeList){
@@ -94,7 +96,11 @@
       
     if(strcmp(i->second.first,
 		   i->second.second)){
-      cout << "DELETING FAILED" << flush << int(i->second.second) << flush << i->second.first << i->second.second << endl;
+#if __WORDSIZE==64 /* this should tell us what size a float* is, so that we can dump it properly.. */
+      cout << "DELETING FAILED" << flush << int64_t(i->second.second) << flush << i->second.first << i->second.second << endl;
+#else
+      cout << "DELETING FAILED" << flush << int32_t(i->second.second) << flush << i->second.first << i->second.second << endl;
+#endif
       assert(0);
     }
     delete[] i->second.first;
04-ChangeLog (text/plain, 505 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 12:27:56.000000000 -0600
+++ ChangeLog	2006-11-18 12:30:56.000000000 -0600
@@ -11,6 +11,8 @@
 	* libMRML/cc/CAttributeList.cc
 	include wordsize.h, so we can tell if we're a 64 or 32bit binary during build.
 	when dumping pointer as int, check the size of the pointer before casting.
+	* FeatureExtraction/Makefile.am
+	change $(top_srcdir) to $(top_builddir), so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
04-FeatureExtraction_Makefile_am-make_build_in_subdir.patch (text/plain, 638 B)
--- ../../dev/gift/FeatureExtraction/Makefile.am	2006-01-10 02:53:02.000000000 -0600
+++ FeatureExtraction/Makefile.am	2006-11-06 04:54:19.000000000 -0600
@@ -28,9 +28,9 @@
 
 gift_write_feature_descs_SOURCES= $(david_sources) write_feature_descs.c
 
-gift_extract_features_LDADD =  -L$(top_srcdir)/libSquirePPM -lSquirePPM -lm 
+gift_extract_features_LDADD =  -L$(top_builddir)/libSquirePPM -lSquirePPM -lm 
 
-gift_write_feature_descs_LDADD= -L$(top_srcdir)/libSquirePPM -lSquirePPM -lm 
+gift_write_feature_descs_LDADD= -L$(top_builddir)/libSquirePPM -lSquirePPM -lm 
 
 
 bin_PROGRAMS = gift-extract-features gift-write-feature-descs
05-ChangeLog (text/plain, 764 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 12:32:29.000000000 -0600
+++ ChangeLog	2006-11-18 12:53:08.000000000 -0600
@@ -13,6 +13,10 @@
 	when dumping pointer as int, check the size of the pointer before casting.
 	* FeatureExtraction/Makefile.am
 	change $(top_srcdir) to $(top_builddir), so that we can build gift in a directory other than ${srcdir}
+	* GIFTServer/Makefile.am
+	remove $(srcdir), not being used.
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	NOTE: in reality, before the "libraries" can be moved into being seperately installable packages, these paths need changed to <directory/target.h>
 
 2006-10-10    <[email protected]>
05-GIFTServer_Makefile_am-make_build_in_subdir.patch (text/plain, 572 B)
--- ../../dev3/gift/GIFTServer/Makefile.am	2003-04-22 03:03:46.000000000 -0500
+++ GIFTServer/Makefile.am	2006-11-18 12:49:25.000000000 -0600
@@ -16,7 +16,7 @@
 
 # include directories for all programs in this dir
 
-INCLUDES = -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(srcdir)   -I.
+INCLUDES = -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir) -I.
 
 #-------------------------------------------------
06-ChangeLog (text/plain, 723 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:04:43.000000000 -0600
+++ ChangeLog	2006-11-18 13:09:45.000000000 -0600
@@ -17,6 +17,8 @@
 	remove $(srcdir), not being used.
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	NOTE: in reality, before the "libraries" can be moved into being seperately installable packages, these paths need changed to <directory/target.h>
+	* libGIFTAcDistanceMatrix/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
06-libGIFTAcDistanceMatrix_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 935 B)
--- ../../dev/gift/libGIFTAcDistanceMatrix/cc/Makefile.am	2006-02-28 07:48:22.000000000 -0600
+++ libGIFTAcDistanceMatrix/cc/Makefile.am	2006-11-06 04:12:22.000000000 -0600
@@ -25,7 +25,7 @@
 
 libGIFTAcDistanceMatrix_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcInvertedFile/cc/.libs/libGIFTAcInvertedFile.a 
 
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcDistanceMatrix/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)/libGIFTQuBayesian/include -I$(HOME)/browsing/libGIFTQuBayesian/include
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcDistanceMatrix/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)/libGIFTQuBayesian/include -I$(top_srcdir) -I$(HOME)/browsing/libGIFTQuBayesian/include
 
 
 libGIFTAcDistanceMatrix_la_SOURCES= \
07-ChangeLog (text/plain, 725 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:11:06.000000000 -0600
+++ ChangeLog	2006-11-18 13:14:38.000000000 -0600
@@ -19,6 +19,8 @@
 	NOTE: in reality, before the "libraries" can be moved into being seperately installable packages, these paths need changed to <directory/target.h>
 	* libGIFTAcDistanceMatrix/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTAcHierarchy/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
07-libGIFTAcHierarchy_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 618 B)
--- ../../dev/gift/libGIFTAcHierarchy/cc/Makefile.am	2004-12-03 15:15:19.000000000 +0100
+++ libGIFTAcHierarchy/cc/Makefile.am	2006-11-01 04:24:01.000000000 +0100
@@ -30,7 +30,7 @@
 
 libGIFTAcHierarchy_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML 
 
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok 
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok -I$(top_srcdir)/
 
 
 libGIFTAcHierarchy_la_SOURCES= \
08-ChangeLog (text/plain, 734 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:16:38.000000000 -0600
+++ ChangeLog	2006-11-18 13:23:28.000000000 -0600
@@ -21,6 +21,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTAcHierarchy/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTAcInvertedFile/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
08-libGIFTAcInvertedFile_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 665 B)
--- ../../dev3/gift/libGIFTAcInvertedFile/cc/Makefile.am	2006-02-28 07:48:22.000000000 -0600
+++ libGIFTAcInvertedFile/cc/Makefile.am	2006-11-18 13:17:51.000000000 -0600
@@ -27,7 +27,7 @@
 
 libGIFTAcInvertedFile_la_LDFLAGS= -module "@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcURL2FTS/cc/.libs/libGIFTAcURL2FTS.a
 
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include 
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)
 
 
 #CAcIFFileSystem.cc: CAcIFFileSystem.pre-cc
09-ChangeLog (text/plain, 729 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:29:01.000000000 -0600
+++ ChangeLog	2006-11-18 13:28:54.000000000 -0600
@@ -23,6 +23,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTAcInvertedFile/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTAcPerl/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
09-libGIFTAcPerl_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 540 B)
--- /disk1/gift/src/merge/dev2/gift/libGIFTAcPerl/cc/Makefile.am	2002-02-26 14:20:18.000000000 +0100
+++ libGIFTAcPerl/cc/Makefile.am	2006-11-01 20:51:29.000000000 +0100
@@ -25,7 +25,7 @@
 
 libGIFTAcPerl_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ --rpath../../libMRML/cc/.libs/ -lMRML 
 
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include 
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include -I$(top_srcdir)
 
 # libGIFTAcPerl_a_SOURCES= 
 libGIFTAcPerl_la_SOURCES= \
10-ChangeLog (text/plain, 724 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:30:38.000000000 -0600
+++ ChangeLog	2006-11-18 13:32:10.000000000 -0600
@@ -25,6 +25,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTAcPerl/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTAcURL2FTS/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
10-libGIFTAcURL2FTS_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 531 B)
--- ../../dev3/gift/libGIFTAcURL2FTS/cc/Makefile.am	2002-02-26 07:20:18.000000000 -0600
+++ libGIFTAcURL2FTS/cc/Makefile.am	2006-11-18 13:31:34.000000000 -0600
@@ -25,7 +25,7 @@
 
 libGIFTAcURL2FTS_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML 
 INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcURL2FTS/include \
-	-I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok 
+	-I$(top_srcdir)/expat/xmlparse -I$(top_srcdir)/expat/xmltok -I$(top_srcdir)/
 
 libGIFTAcURL2FTS_la_SOURCES= \
 	CAcURL2FTS.cc\
11-ChangeLog (text/plain, 729 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:45:38.000000000 -0600
+++ ChangeLog	2006-11-18 13:45:32.000000000 -0600
@@ -27,6 +27,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTAcURL2FTS/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTQuHierarchy/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
11-libGIFTQuHierarchy_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 624 B)
--- ../../dev3/gift/libGIFTQuHierarchy/cc/Makefile.am	2004-12-03 08:15:20.000000000 -0600
+++ libGIFTQuHierarchy/cc/Makefile.am	2006-11-18 13:44:52.000000000 -0600
@@ -28,6 +28,6 @@
 
 libGIFTQuHierarchy_la_LDFLAGS=@PRE_INSTALL_LIBDIRS@ -lMRML -lGIFTAcHierarchy
 
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/libGIFTQuHierarchy/include
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcHierarchy/include -I$(top_srcdir)/libGIFTQuHierarchy/include -I$(top_srcdir)/
 
 libGIFTQuHierarchy_la_SOURCES= CQHierarchy.cc plug_in_fo.cc
12-ChangeLog (text/plain, 734 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 13:56:43.000000000 -0600
+++ ChangeLog	2006-11-18 13:56:26.000000000 -0600
@@ -29,6 +29,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTQuHierarchy/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTQuInvertedFile/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
12-libGIFTQuInvertedFile_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 668 B)
--- /disk1/gift/src/merge/dev2/gift/libGIFTQuInvertedFile/cc/Makefile.am	2006-02-28 14:48:22.000000000 +0100
+++ libGIFTQuInvertedFile/cc/Makefile.am	2006-11-01 20:41:28.000000000 +0100
@@ -29,7 +29,7 @@
 #
 # The trick here is: do not compile c code with the -D bool=char define.
 #-rdynamic
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTQuInvertedFile/include -I$(top_srcdir)/libGIFTAcInvertedFile/include 
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTQuInvertedFile/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/
 
 libGIFTQuInvertedFile_la_SOURCES= \
 	CWeightingFunction.cc \
13-ChangeLog (text/plain, 729 B)
--- ../../dev3/gift/ChangeLog	2006-11-18 14:00:15.000000000 -0600
+++ ChangeLog	2006-11-18 14:00:07.000000000 -0600
@@ -31,6 +31,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTQuInvertedFile/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libGIFTQuPerl/cc/Makefile.am
+	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 
 2006-10-10    <[email protected]>
13-libGIFTQuPerl_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 572 B)
--- ../../dev3/gift/libGIFTQuPerl/cc/Makefile.am	2002-02-26 07:20:19.000000000 -0600
+++ libGIFTQuPerl/cc/Makefile.am	2006-11-18 13:59:16.000000000 -0600
@@ -27,7 +27,7 @@
 #
 # The trick here is: do not compile c code with the -D bool=char define.
 #-rdynamic
-INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include -I$(top_srcdir)/libGIFTQuPerl/include 
+INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcPerl/include -I$(top_srcdir)/libGIFTQuPerl/include -I$(top_srcdir)/
 
 
 libGIFTQuPerl_la_SOURCES= \
14-ChangeLog (text/plain, 603 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 10:37:15.000000000 -0600
+++ ChangeLog	2006-11-19 10:48:54.000000000 -0600
@@ -33,6 +33,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libGIFTQuPerl/cc/Makefile.am
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
+	* libMRML/cc/Makefile.am
+	use $(srcdir)/ to find libMRML-config.pre-cc.
 
 2006-10-10    <[email protected]>
14-libMRML_cc_Makefile_am-make_build_in_subdir.patch (text/plain, 508 B)
--- ../../dev3/gift/libMRML/cc/Makefile.am	2006-01-10 02:53:03.000000000 -0600
+++ libMRML/cc/Makefile.am	2006-11-19 10:46:41.000000000 -0600
@@ -114,7 +114,7 @@
                 s§%LDFLAGS%§$(LDFLAGS)§g;\
                 s§%LIBS%§$(LIBS)§ g;\
                 s§%GIFT_MYSQL_DIR%§@GIFT_MYSQL_DIR@§g;\
-	        s§%libdir%§$(libdir)§g;"  < libMRML-config.pre-cc  > libMRML-config.cc
+	        s§%libdir%§$(libdir)§g;"  < $(srcdir)/libMRML-config.pre-cc  > libMRML-config.cc
 
 bin_PROGRAMS= libMRML-config
15-ChangeLog (text/plain, 522 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 11:06:05.000000000 -0600
+++ ChangeLog	2006-11-19 11:07:27.000000000 -0600
@@ -35,6 +35,8 @@
 	HACK: add $(top_srcdir) to the path, to fix #includes of the form "directory/include/target.h", so that we can build gift in a directory other than ${srcdir}
 	* libMRML/cc/Makefile.am
 	use $(srcdir)/ to find libMRML-config.pre-cc.
+	* libGIFTAcDistanceMatrix/cc/Makefile.am
+	link against .la file, instead of .a file. more portable this way.
 
 2006-10-10    <[email protected]>
15-libGIFTAcDistanceMatrix_cc_Makefile_am-use_portable_library.patch (text/plain, 796 B)
--- ../../dev/gift/libGIFTAcDistanceMatrix/cc/Makefile.am	2006-11-06 04:16:40.000000000 -0600
+++ libGIFTAcDistanceMatrix/cc/Makefile.am	2006-11-06 04:16:18.000000000 -0600
@@ -23,7 +23,7 @@
 
 lib_LTLIBRARIES = libGIFTAcDistanceMatrix.la
 
-libGIFTAcDistanceMatrix_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcInvertedFile/cc/.libs/libGIFTAcInvertedFile.a 
+libGIFTAcDistanceMatrix_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcInvertedFile/cc/.libs/libGIFTAcInvertedFile.la 
 
 INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcDistanceMatrix/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)/libGIFTQuBayesian/include -I$(top_srcdir) -I$(HOME)/browsing/libGIFTQuBayesian/include
16-ChangeLog (text/plain, 445 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 11:08:34.000000000 -0600
+++ ChangeLog	2006-11-19 11:09:09.000000000 -0600
@@ -37,6 +37,8 @@
 	use $(srcdir)/ to find libMRML-config.pre-cc.
 	* libGIFTAcDistanceMatrix/cc/Makefile.am
 	link against .la file, instead of .a file. more portable this way.
+	* libGIFTAcInvertedFile/cc/Makefile.am
+	link against .la file, instead of .a file. more portable this way.
 
 2006-10-10    <[email protected]>
16-libGIFTAcInvertedFile_cc_Makefile_am-use_portable_library.patch (text/plain, 648 B)
--- ../../dev2/gift/libGIFTAcInvertedFile/cc/Makefile.am	2006-11-19 11:19:54.000000000 -0600
+++ libGIFTAcInvertedFile/cc/Makefile.am	2006-11-19 11:18:43.000000000 -0600
@@ -25,7 +25,7 @@
 
 lib_LTLIBRARIES = libGIFTAcInvertedFile.la
 
-libGIFTAcInvertedFile_la_LDFLAGS= -module "@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcURL2FTS/cc/.libs/libGIFTAcURL2FTS.a
+libGIFTAcInvertedFile_la_LDFLAGS= -module "@PRE_INSTALL_LIBDIRS@" -lMRML ../../libGIFTAcURL2FTS/cc/.libs/libGIFTAcURL2FTS.la
 
 INCLUDES= -DHAS_BOOL -I$(top_srcdir)/libMRML/include -I$(top_srcdir)/libGIFTAcInvertedFile/include -I$(top_srcdir)/libGIFTAcURL2FTS/include -I$(top_srcdir)
17-ChangeLog (text/plain, 464 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 11:22:04.000000000 -0600
+++ ChangeLog	2006-11-19 11:29:50.000000000 -0600
@@ -39,6 +39,8 @@
 	link against .la file, instead of .a file. more portable this way.
 	* libGIFTAcInvertedFile/cc/Makefile.am
 	link against .la file, instead of .a file. more portable this way.
+	* libGIFTQuInvertedFile/cc/Makefile.am
+	link against .la file, instead of .a file. more portable this way.
 
 2006-10-10    <[email protected]>
17-libGIFTQuInvertedFile_cc_Makefile_am-use_portable_library.patch (text/plain, 514 B)
--- /disk1/gift/src/merge/dev2/gift/libGIFTQuInvertedFile/cc/Makefile.am	2006-11-01 21:56:07.000000000 +0100
+++ libGIFTQuInvertedFile/cc/Makefile.am	2006-11-01 20:42:30.000000000 +0100
@@ -23,7 +23,7 @@
 
 lib_LTLIBRARIES = libGIFTQuInvertedFile.la
 
-libGIFTQuInvertedFile_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@"  -lMRML ../../libGIFTAcInvertedFile/cc/.libs/libGIFTAcInvertedFile.a
+libGIFTQuInvertedFile_la_LDFLAGS="@PRE_INSTALL_LIBDIRS@"  -lMRML ../../libGIFTAcInvertedFile/cc/.libs/libGIFTAcInvertedFile.la
 
 
 #
18-ChangeLog (text/plain, 595 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 11:38:48.000000000 -0600
+++ ChangeLog	2006-11-19 11:36:05.000000000 -0600
@@ -41,6 +41,10 @@
 	link against .la file, instead of .a file. more portable this way.
 	* libGIFTQuInvertedFile/cc/Makefile.am
 	link against .la file, instead of .a file. more portable this way.
+	* FeatureExtraction/gabor.c
+	fix an off-by-one error in the addressing of value_plane_double_reversed. my fault.
+	* FeatureExtraction/rgb2hsv_utils.c
+	fix an off-by-one error in the addressing of value_plane_double_reversed. my fault.
 
 2006-10-10    <[email protected]>
18-FeatureExtraction_gabor_c-fix_pointer_error.patch (text/plain, 1 KB)
--- ../../anoncvs/gift/FeatureExtraction/gabor.c	2006-10-22 09:59:12.000000000 -0500
+++ FeatureExtraction/gabor.c	2006-11-15 07:33:38.000000000 -0600
@@ -95,7 +95,7 @@
 	target_kernal=kernelsxy[filter_scale*num_gabors_per_scale+orientation];
 	for (x = 0; x < width; x++) {
 	for (y = 0; y < height; y++) {
-		target_image=&image[(width*height)-(y*width+x+kernal_size[filter_scale]/2)];
+		target_image=&image[(width*height-1)-(y*width+x+kernal_size[filter_scale]/2)];
 		if ((x>=kernal_size[filter_scale]/2) && ((x+kernal_size[filter_scale]/2)<width))
 		  {
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
@@ -143,7 +143,7 @@
 	target_kernal=&target_kernal[kernal_size[filter_scale]];
 	for (x = 0; x < width; x++) {
 	for (y = 0; y < height; y++) {
-		target_image=&image[(width*height)-(y*width+x+kernal_size[filter_scale]/2)];
+		target_image=&image[(width*height-1)-(y*width+x+kernal_size[filter_scale]/2)];
 		if ((x>=kernal_size[filter_scale]/2) && ((x+kernal_size[filter_scale]/2)<width))
 		  {
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
18-FeatureExtraction_rgb2hsv_utils_c-fix_pointer_error.patch (text/plain, 591 B)
--- ../../anoncvs/gift/FeatureExtraction/rgb2hsv_utils.c	2006-07-20 12:09:15.000000000 -0500
+++ FeatureExtraction/rgb2hsv_utils.c	2006-11-08 16:09:08.000000000 -0600
@@ -202,7 +202,7 @@
 		(*im_hsv)->pixel[3*i + HUE] = (byte)rint((H/360.0)*max_col);
 		(*im_hsv)->pixel[3*i + SATURATION] = (byte)rint(S*max_col);
 		(*im_hsv)->pixel[3*i + VALUE] = (byte)rint(V*max_col);
-		(*im_hsv)->value_plane_double_reversed[num_pixels-i]=(V*max_col);
+		(*im_hsv)->value_plane_double_reversed[num_pixels-i-1]=(V*max_col);
 	}
 
 	add_comment((*im_hsv), "# Image converted from RGB to HSV format.\n");
19-ChangeLog (text/plain, 552 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 11:48:50.000000000 -0600
+++ ChangeLog	2006-11-19 11:57:06.000000000 -0600
@@ -45,6 +45,8 @@
 	fix an off-by-one error in the addressing of value_plane_double_reversed. my fault.
 	* FeatureExtraction/rgb2hsv_utils.c
 	fix an off-by-one error in the addressing of value_plane_double_reversed. my fault.
+	* FeatureExtraction/gabor.c
+	move from using an array to initialize the size of another array to using a define'd value. one less GCC warning, and slightly faster.
 
 2006-10-10    <[email protected]>
19-FeatureExtraction_gabor_c-remove_array_warning.patch (text/plain, 682 B)
--- ../../dev3/gift/FeatureExtraction/gabor.c	2006-11-15 07:50:31.000000000 -0600
+++ FeatureExtraction/gabor.c	2006-11-15 07:47:15.000000000 -0600
@@ -17,6 +17,8 @@
 
 static int kernal_size[num_gabor_scales] = {gabor_kernel_size_0, gabor_kernel_size_1, gabor_kernel_size_2};
 
+#define MAX_KERNAL_SIZE gabor_kernel_size_2
+
 void save_norm_double_pgm(double *double_im, int w, int h, char *fname) {
 
 	PPM *im;
@@ -89,7 +91,7 @@
 	double * target_kernal;
 	double * target_conv;
 	double * target_image;
-	double temparray[kernal_size[2]];
+	double temparray[MAX_KERNAL_SIZE];
 
 	/* first convolution */
 	target_kernal=kernelsxy[filter_scale*num_gabors_per_scale+orientation];
20-ChangeLog (text/plain, 547 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:02:38.000000000 -0600
+++ ChangeLog	2006-11-19 12:02:31.000000000 -0600
@@ -47,6 +47,8 @@
 	fix an off-by-one error in the addressing of value_plane_double_reversed. my fault.
 	* FeatureExtraction/gabor.c
 	move from using an array to initialize the size of another array to using a define'd value. one less GCC warning, and slightly faster.
+	* libSquirePPM/ppm_comment.c
+	fix an off-by-one error in the allocation of ppm->comments. NOT my fault. finally! :)
 
 2006-10-10    <[email protected]>
20-libSquirePPM_ppm_comment_c-fix_pointer_error.patch (text/plain, 464 B)
--- ../../anoncvs/gift/libSquirePPM/ppm_comment.c	2001-02-01 12:22:41.000000000 +0100
+++ libSquirePPM/ppm_comment.c	2006-11-09 05:27:17.000000000 +0100
@@ -40,7 +40,7 @@
 		free(the_ppm->comments);
 
 	the_ppm->comment_length = i + strlen(new_comment);
-	the_ppm->comments = malloc(the_ppm->comment_length*sizeof(char));
+	the_ppm->comments = malloc((the_ppm->comment_length+1)*sizeof(char));
 	i = 0;
 	if (original_comments != NULL) {
 		c = original_comments;
21-ChangeLog (text/plain, 578 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:03:35.000000000 -0600
+++ ChangeLog	2006-11-19 12:07:39.000000000 -0600
@@ -49,6 +49,8 @@
 	move from using an array to initialize the size of another array to using a define'd value. one less GCC warning, and slightly faster.
 	* libSquirePPM/ppm_comment.c
 	fix an off-by-one error in the allocation of ppm->comments. NOT my fault. finally! :)
+	* FeatureExtraction/gabor.c
+	move from using uint32_t to using uint_fast32_t. this becomes 64bit on AMD64, solving the (wierd) crashing issue.	
 
 2006-10-10    <[email protected]>
21-FeatureExtraction_gabor_c-change_datatypes.patch (text/plain, 870 B)
--- ../../dev3/gift/FeatureExtraction/gabor.c	2006-11-15 07:52:32.000000000 -0600
+++ FeatureExtraction/gabor.c	2006-11-15 07:55:50.000000000 -0600
@@ -54,8 +54,8 @@
 
 void create_filter_kernels(double ** kernelsxy) {
 
-	uint32_t i, j;
-	int32_t x, x_c; /* ints to force type promotion later */
+	uint_fast32_t i, j;
+	int_fast32_t x, x_c; /* ints to force type promotion later */
 	double u0, u, v, sigma, theta;
 
 	/* set the values of the kernels */
@@ -86,8 +86,8 @@
 /* conv and conv2 are just temporary space, for juggling image data between filters */
 void gabor_filter(double *image, int width, int height, int filter_scale, int orientation, double **kernelsxy, double *conv, double *conv2, double *output) {
 
-	uint32_t x, y;
-	uint32_t k;
+	uint_fast32_t x, y;
+	uint_fast32_t k;
 	double * target_kernal;
 	double * target_conv;
 	double * target_image;
22-ChangeLog (text/plain, 513 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:08:25.000000000 -0600
+++ ChangeLog	2006-11-19 12:11:25.000000000 -0600
@@ -51,6 +51,8 @@
 	fix an off-by-one error in the allocation of ppm->comments. NOT my fault. finally! :)
 	* FeatureExtraction/gabor.c
 	move from using uint32_t to using uint_fast32_t. this becomes 64bit on AMD64, solving the (wierd) crashing issue.	
+	* FeatureExtraction/gabor.c
+	formatting and comment additions. no functional changes in this patch.
 
 2006-10-10    <[email protected]>
22-FeatureExtraction_gabor_c-formatting_and_comments.patch (text/plain, 4.3 KB)
--- ../../dev2/gift/FeatureExtraction/gabor.c	2006-11-15 07:55:50.000000000 -0600
+++ FeatureExtraction/gabor.c	2006-11-15 08:03:00.000000000 -0600
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <malloc.h>
+/* for M_PI */
 #include <math.h>
 /* for memset(), others */
 #include <string.h>
@@ -9,7 +10,7 @@
 
 #include "gabor.h"
 
-/* for uint32_t */
+/* for uint_fast32_t, int_fast32_t */
 #include <stdint.h>
 
 /* note that all this is taken from the paper JaH98 in ~/tex/bib/squizz.bib */
@@ -69,13 +70,13 @@
 			x_c = kernal_size[i]/2; /* since sizes are odd, this gives the
 									       centre value */
 
-			kernelsxy[(i*num_gabors_per_scale+j)] = (double *)malloc(kernal_size[i]*sizeof(double)*4);
+			kernelsxy[i*num_gabors_per_scale+j] = (double *)malloc(kernal_size[i]*sizeof(double)*4);
 			for (x = 0; x < kernal_size[i]; x++) {
 				/* note that x is "y" for kernels 12 and 22 */
-				kernelsxy[(i*num_gabors_per_scale+j)][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*u*(x - x_c)));
-				kernelsxy[(i*num_gabors_per_scale+j)][x+kernal_size[i]] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*v*(x - x_c)));                    
-				kernelsxy[(i*num_gabors_per_scale+j)][x+kernal_size[i]*2] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*u*(x - x_c)));
-				kernelsxy[(i*num_gabors_per_scale+j)][x+kernal_size[i]*3] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*v*(x - x_c)));
+				kernelsxy[i*num_gabors_per_scale+j][x] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*u*(x - x_c)));
+				kernelsxy[i*num_gabors_per_scale+j][x+kernal_size[i]] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*cos(2*M_PI*v*(x - x_c)));                    
+				kernelsxy[i*num_gabors_per_scale+j][x+kernal_size[i]*2] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*u*(x - x_c)));
+				kernelsxy[i*num_gabors_per_scale+j][x+kernal_size[i]*3] = (1/(sqrt(2*M_PI)*sigma)*exp(-sq((x - x_c))/(2*sq(sigma)))*sin(2*M_PI*v*(x - x_c)));
 			}
 		}
 		u0 = u0/2;
@@ -103,13 +104,13 @@
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
 		      temparray[k]= target_kernal[k]*target_image[k];
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
-		      conv[((width*height)-1)-(x*height+y)] += temparray[k];
+		      conv[(width*height-1)-(x*height+y)] += temparray[k];
 		  }
 		else
 		  {
 		for (k=0; k < kernal_size[filter_scale]; k++) {
 			if ((x+kernal_size[filter_scale]/2 >= k) && (x+kernal_size[filter_scale]/2 < width+k)) {
-				conv[((width*height)-1)-(x*height+y)] +=
+				conv[(width*height-1)-(x*height+y)] +=
 					target_kernal[k]*target_image[k];
 			}
 		}
@@ -121,7 +122,7 @@
 	target_kernal=&target_kernal[kernal_size[filter_scale]];
 	for (x = 0; x < width; x++) {
 	for (y = 0; y < height; y++) {
-		target_conv=&conv[((width*height)-1)-(x*height+y+(kernal_size[filter_scale]/2))];
+		target_conv=&conv[(width*height-1)-(x*height+y+(kernal_size[filter_scale]/2))];
 		if (((y>=kernal_size[filter_scale]/2)) && ((y+kernal_size[filter_scale]/2)<height))
 		  {
 		    /* first do the matrix multiply, then do the summation, so the matrix multiply can be vectored. */
@@ -151,13 +152,13 @@
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
 		      temparray[k]= target_kernal[k]*target_image[k];
 		    for (k = 0; k < kernal_size[filter_scale]; k++)
-		      conv2[((width*height)-1)-(x*height+y)] += temparray[k];
+		      conv2[(width*height-1)-(x*height+y)] += temparray[k];
 		  }
 		else
 		  {
 		for (k=0; k < kernal_size[filter_scale]; k++) {
 			if ((x+kernal_size[filter_scale]/2 >= k) && (x+kernal_size[filter_scale]/2 < width+k)) {
-				conv2[((width*height)-1)-(x*height+y)] +=
+				conv2[(width*height-1)-(x*height+y)] +=
 					target_kernal[k]*target_image[k];
 			}
 		}
@@ -169,7 +170,7 @@
 	target_kernal=&target_kernal[kernal_size[filter_scale]];
 	for (x = 0; x < width; x++) {
 	for (y = 0; y < height; y++) {
-		target_conv=&conv2[((width*height)-1)-(x*height+y+(kernal_size[filter_scale]/2))];
+		target_conv=&conv2[(width*height-1)-(x*height+y+(kernal_size[filter_scale]/2))];
 		if (((y>=kernal_size[filter_scale]/2)) && ((y+kernal_size[filter_scale]/2)<height))
 		  {
 		    /* first do the matrix multiply, then do the summation, so the matrix multiply can be vectored. */
23-ChangeLog (text/plain, 483 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:13:09.000000000 -0600
+++ ChangeLog	2006-11-19 12:14:27.000000000 -0600
@@ -53,6 +53,8 @@
 	move from using uint32_t to using uint_fast32_t. this becomes 64bit on AMD64, solving the (wierd) crashing issue.	
 	* FeatureExtraction/gabor.c
 	formatting and comment additions. no functional changes in this patch.
+	* FeatureExtraction/extract_block_features.c
+	add missing headers, update a comment.
 
 2006-10-10    <[email protected]>
23-FeatureExtraction_extract_block_features_c-header_cleanups.patch (text/plain, 425 B)
--- ../../anoncvs/gift/FeatureExtraction/extract_block_features.c	2006-10-22 16:59:12.000000000 +0200
+++ FeatureExtraction/extract_block_features.c	2006-11-16 01:14:22.000000000 +0100
@@ -30,7 +30,13 @@
 /* for M_PI */
 #include <math.h>
 
-/* for uint32_t */
+/* for memset() */
+#include <string.h>
+
+/* for exit() */
+#include <stdlib.h>
+
+/* for uint32_t, uint_fast32_t */
 #include <stdint.h>
 
 #ifdef HAVE_CONFIG_H
24-ChangeLog (text/plain, 501 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:16:44.000000000 -0600
+++ ChangeLog	2006-11-19 12:25:06.000000000 -0600
@@ -55,6 +55,8 @@
 	formatting and comment additions. no functional changes in this patch.
 	* FeatureExtraction/extract_block_features.c
 	add missing headers, update a comment.
+	* FeatureExtraction/extract_block_features.c
+	move from the (erronous) use of j in output, to using gabor_filter(num_filter_scales-1). happened to work on AMD64.
 
 2006-10-10    <[email protected]>
24-FeatureExtraction_extract_block_features_c-switch_from_j_to_gabor_filter.patch (text/plain, 1 KB)
--- ../../dev3/gift/FeatureExtraction/extract_block_features.c	2006-11-19 12:16:44.000000000 -0600
+++ FeatureExtraction/extract_block_features.c	2006-11-19 12:22:29.000000000 -0600
@@ -680,7 +680,13 @@
 	for (scale = 0; scale < num_gabor_scales; scale++) {
 		for (orientation = 0; orientation < num_gabors_per_scale; orientation++) {
 			for (j = 0; j < num_gabor_ranges; j++) {
-				fprintf(out_file, "%d %d GABOR_HST SCALE, ORIENTATION, ENERGY UPPER BOUND = %d, %d, %f\n", feature_index, GABOR_HST, scale, orientation, j);
+#if num_gabor_ranges==16 /* again, we should really be checking the type... */
+				fprintf(out_file, "%d %d GABOR_HST SCALE, ORIENTATION, ENERGY UPPER BOUND = %d, %d, %f\n", feature_index, GABOR_HST, scale, orientation, gabor_ranges((num_gabor_ranges-1)));
+#else
+#if num_gabor_ranges==10
+				fprintf(out_file, "%d %d GABOR_HST SCALE, ORIENTATION, ENERGY UPPER BOUND = %d, %d, %d.000000\n", feature_index, GABOR_HST, scale, orientation, gabor_ranges((num_gabor_ranges-1)));
+#endif
+#endif
 				feature_index++;
 			}
 		}
25-ChangeLog (text/plain, 564 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:25:44.000000000 -0600
+++ ChangeLog	2006-11-19 12:32:49.000000000 -0600
@@ -57,6 +57,10 @@
 	add missing headers, update a comment.
 	* FeatureExtraction/extract_block_features.c
 	move from the (erronous) use of j in output, to using gabor_filter(num_filter_scales-1). happened to work on AMD64.
+	* FeatureExtraction/extract_block_features.c
+	move from using uint32_t to using uint_fast32_t.
+	* FeatureExtraction/gabor.c
+	move from accepting int to accepting uint_fast32_t.
 
 2006-10-10    <[email protected]>
25-FeatureExtraction_extract_block_features_c-convert_uint32_t_to_uint_fast32_t.patch (text/plain, 3.4 KB)
--- ../../dev3/gift/FeatureExtraction/extract_block_features.c	2006-11-16 15:44:35.000000000 +0100
+++ FeatureExtraction/extract_block_features.c	2006-11-16 15:37:56.000000000 +0100
@@ -108,32 +108,32 @@
 #endif
 
 /* this version just does the work. no variable width/height information is taken into account. 256x256. */
-void init_feature_variables(uint32_t colmap_size, uint32_t ** col_counts, uint32_t *** block_gabor_class, uint32_t *** gabor_histogram) {
+void init_feature_variables(uint_fast32_t colmap_size, uint_fast32_t ** col_counts, uint_fast32_t *** block_gabor_class, uint_fast32_t *** gabor_histogram) {
 
-	uint32_t i, j, k=0;
+	uint_fast32_t i, j, k=0;
 	/* colour features */
 	for (i = 0; i < num_colour_scales; i++) {
 		for (j = 0; j < num_blocks_at_scale(i); j++) {
-			col_counts[k++] = (uint32_t *)malloc(colmap_size*sizeof(uint32_t));
+			col_counts[k++] = (uint_fast32_t *)malloc(colmap_size*sizeof(uint_fast32_t));
 		}
 	}
 
 	/* Gabor features */
 	for (i = 0; i < num_gabor_scales; i++) {
-		block_gabor_class[i] = (uint32_t **)malloc(num_gabors_per_scale*sizeof(uint32_t *));
-		gabor_histogram[i] = (uint32_t **)malloc(num_gabors_per_scale*sizeof(uint32_t *));
+		block_gabor_class[i] = (uint_fast32_t **)malloc(num_gabors_per_scale*sizeof(uint_fast32_t *));
+		gabor_histogram[i] = (uint_fast32_t **)malloc(num_gabors_per_scale*sizeof(uint_fast32_t *));
 		for (j = 0; j < num_gabors_per_scale; j++) {
-			block_gabor_class[i][j] = (uint32_t *)malloc(square(image_size/gabor_block_size)*sizeof(uint32_t));
-			gabor_histogram[i][j] = (uint32_t *)calloc(num_gabor_ranges, sizeof(uint32_t));
+			block_gabor_class[i][j] = (uint_fast32_t *)malloc(square(image_size/gabor_block_size)*sizeof(uint_fast32_t));
+			gabor_histogram[i][j] = (uint_fast32_t *)calloc(num_gabor_ranges, sizeof(uint_fast32_t));
 		}
 	}
 }
 
-void extract_gabor_features(PPM *im_hsv, uint32_t *** block_gabor_class, uint32_t *** gabor_histogram) {
+void extract_gabor_features(PPM *im_hsv, uint_fast32_t *** block_gabor_class, uint_fast32_t *** gabor_histogram) {
 
-	int i, j, x, y, k;
-	int scale, orientation;
-	int energy_class;
+	uint_fast32_t i, j, x, y, k;
+	uint_fast32_t scale, orientation;
+	uint_fast32_t energy_class;
 	PPM *value_plane;
 	double *value_image_dbl, *filtered_image;
 	double *conv;
@@ -199,7 +199,7 @@
 	}
 }
 
-void extract_mode_features(PPM *im, uint32_t *colmap, uint32_t colmap_size, uint32_t ** col_counts, byte * block_mode, uint32_t * col_histogram) {
+void extract_mode_features(PPM *im, uint_fast32_t *colmap, uint_fast32_t colmap_size, uint_fast32_t ** col_counts, byte * block_mode, uint_fast32_t * col_histogram) {
 
 	int i, j, k, last_k, k1, m, n, r, x, y;
 	byte colour;
@@ -360,7 +360,7 @@
 			col_counts[k + 2][n] + col_counts[k + 3][n];
 }
 
-enum ppm_error write_mode_features(char *out_fname, uint32_t colmap_size, uint32_t * col_histogram, uint32_t *** block_gabor_class, uint32_t *** gabor_histogram, byte * block_mode) {
+enum ppm_error write_mode_features(char *out_fname, uint_fast32_t colmap_size, uint_fast32_t * col_histogram, uint_fast32_t *** block_gabor_class, uint_fast32_t *** gabor_histogram, byte * block_mode) {
 
 	FILE *out_file = NULL;
 	int feature_index;
@@ -535,7 +535,7 @@
 	return(PPM_OK);
 }
 
-void fts2blocks(char *fts_fname, byte * block_mode, uint32_t * col_histogram) {
+void fts2blocks(char *fts_fname, byte * block_mode, uint_fast32_t * col_histogram) {
 	
 	FILE *fts_file, *outfile;
 	int num_features, feature_index;
25-FeatureExtraction_gabor_c-convert_int_to_uint_fast32_t.patch (text/plain, 1.1 KB)
--- ../../dev2/gift/FeatureExtraction/gabor.c	2006-11-15 21:05:25.000000000 +0100
+++ FeatureExtraction/gabor.c	2006-11-16 16:11:53.000000000 +0100
@@ -16,7 +16,7 @@
 /* note that all this is taken from the paper JaH98 in ~/tex/bib/squizz.bib */
 /* (with my corrections!) */
 
-static int kernal_size[num_gabor_scales] = {gabor_kernel_size_0, gabor_kernel_size_1, gabor_kernel_size_2};
+static int_fast8_t kernal_size[num_gabor_scales] = {gabor_kernel_size_0, gabor_kernel_size_1, gabor_kernel_size_2};
 
 #define MAX_KERNAL_SIZE gabor_kernel_size_2
 
@@ -85,7 +85,7 @@
 
 /* conv, conv2, and output need to be cleared before feeding them to this function. */
 /* conv and conv2 are just temporary space, for juggling image data between filters */
-void gabor_filter(double *image, int width, int height, int filter_scale, int orientation, double **kernelsxy, double *conv, double *conv2, double *output) {
+void gabor_filter(double *image, uint_fast32_t width, uint_fast32_t height, uint_fast32_t filter_scale, uint_fast32_t orientation, double **kernelsxy, double *conv, double *conv2, double *output) {
 
 	uint_fast32_t x, y;
 	uint_fast32_t k;
26-ChangeLog (text/plain, 384 B)
--- ../../dev3/gift/ChangeLog	2006-11-19 12:34:49.000000000 -0600
+++ ChangeLog	2006-11-19 12:35:20.000000000 -0600
@@ -61,6 +61,8 @@
 	move from using uint32_t to using uint_fast32_t.
 	* FeatureExtraction/gabor.c
 	move from accepting int to accepting uint_fast32_t.
+	* FeatureExtraction/extract_block_features.c
+	remove unused variables.
 
 2006-10-10    <[email protected]>
26-FeatureExtraction_extract_block_features_c-remove_unused_variables.patch (text/plain, 901 B)
--- ../../dev2/gift/FeatureExtraction/extract_block_features.c	2006-11-16 15:37:56.000000000 +0100
+++ FeatureExtraction/extract_block_features.c	2006-11-16 15:39:50.000000000 +0100
@@ -134,8 +134,7 @@
 	uint_fast32_t i, j, x, y, k;
 	uint_fast32_t scale, orientation;
 	uint_fast32_t energy_class;
-	PPM *value_plane;
-	double *value_image_dbl, *filtered_image;
+	double *filtered_image;
 	double *conv;
 	double *conv2;
 	double gabor_mean;
@@ -201,9 +200,9 @@
 
 void extract_mode_features(PPM *im, uint_fast32_t *colmap, uint_fast32_t colmap_size, uint_fast32_t ** col_counts, byte * block_mode, uint_fast32_t * col_histogram) {
 
-	int i, j, k, last_k, k1, m, n, r, x, y;
+	int i, j, k, last_k, m, n, r, x, y;
 	byte colour;
-	int scale, block_size, num_blocks, old_num_blocks;
+	int scale, block_size, num_blocks;
 	int max_count, mode_index;
 	int b1, b2, b3, b4;
 #ifdef GENERATE_BLOCK_IMAGES
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.