[Gridflow-cvs] [svn] commit: r4297 - in /trunk: configure format/netpbm.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Oct 22 17:32:54 EDT 2009


Author: matju
Date: Thu Oct 22 17:32:52 2009
New Revision: 4297

Log:
<netpbm.h> should be loaded the way that ./configure found it

Modified:
    trunk/configure
    trunk/format/netpbm.c

Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Thu Oct 22 17:32:52 2009
@@ -793,17 +793,20 @@
 for k   in $conf[:OPTIONS] do f.puts "\#define #{k}" end
 for k,v in $conf[:DEFINES] do f.puts "\#define #{k} "+v.inspect end
 
-def include_here(f,a,b)
+def include_here(f,a,b,c=false)
   return unless $conf[:FEATURES][b]
   f.puts "\#ifdef #{a}_INCLUDE_HERE"
+  f.puts "extern \"C\" {"
   for inc in $conf[:FEATURES][b].uses_h.to_a do
     f.puts "\#include <#{inc}>"
   end
+  f.puts "};"
   f.puts "\#endif"
 end
 include_here f,"DC1394", :dc1394
 include_here f,"LIBMPEG", :mpeg3
 include_here f,"QUICKTIMEHW",:quicktimehw
+include_here f,"NETPBM",:netpbm,true
 
 f.puts "
 \#endif /* __CONFIG_H */"

Modified: trunk/format/netpbm.c
==============================================================================
--- trunk/format/netpbm.c (original)
+++ trunk/format/netpbm.c Thu Oct 22 17:32:52 2009
@@ -21,18 +21,16 @@
 	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#define NETPBM_INCLUDE_HERE
 #include "../gridflow.h.fcs"
-extern "C" {
-#include <pam.h>
-};
 
 \class FormatNetPBM : Format {
 	struct pam inpam, outpam;
 	\grin 0
 	\constructor (t_symbol *mode, string filename) {
 		Format::_0_open(0,0,mode,filename);
-		memset(& inpam,sizeof(pam),0);
-		memset(&outpam,sizeof(pam),0);
+		memset(& inpam,0,sizeof(pam));
+		memset(&outpam,0,sizeof(pam));
 	}
 	\decl 0 bang ();
 };



More information about the Gridflow-cvs mailing list