Revision: 10582 http://pure-data.svn.sourceforge.net/pure-data/?rev=10582&view=rev Author: mukau Date: 2009-01-21 13:39:15 +0000 (Wed, 21 Jan 2009)
Log Message: ----------- + added mooPdUtils.h and some MOO_UNUSED macros
Modified Paths: -------------- trunk/externals/moocow/autoreconf.sh trunk/externals/moocow/deque/src/Makefile.am trunk/externals/moocow/deque/src/Makefile.in trunk/externals/moocow/deque/src/dsqueue.c trunk/externals/moocow/extended/Makefile trunk/externals/moocow/flite/Makefile.am trunk/externals/moocow/flite/Makefile.in trunk/externals/moocow/flite/config/.cvsignore trunk/externals/moocow/flite/flite.c trunk/externals/moocow/pdstring/src/Makefile.am trunk/externals/moocow/pdstring/src/Makefile.in trunk/externals/moocow/pdstring/src/any2string.c trunk/externals/moocow/pdstring/src/pdstring.c trunk/externals/moocow/pdstring/src/string2any.c trunk/externals/moocow/sprinkler/Makefile.am trunk/externals/moocow/sprinkler/Makefile.in trunk/externals/moocow/sprinkler/sprinkler.c trunk/externals/moocow/weightmap/src/Makefile.am trunk/externals/moocow/weightmap/src/Makefile.in trunk/externals/moocow/weightmap/src/weightmap.c
Added Paths: ----------- trunk/externals/moocow/common/ trunk/externals/moocow/common/mooPdUtils.h trunk/externals/moocow/deque/src/mooPdUtils.h trunk/externals/moocow/flite/mooPdUtils.h trunk/externals/moocow/pdstring/src/mooPdUtils.h trunk/externals/moocow/sprinkler/mooPdUtils.h trunk/externals/moocow/weightmap/src/mooPdUtils.h
Property Changed: ---------------- trunk/externals/moocow/extended/ trunk/externals/moocow/flite/config/
Modified: trunk/externals/moocow/autoreconf.sh =================================================================== --- trunk/externals/moocow/autoreconf.sh 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/autoreconf.sh 2009-01-21 13:39:15 UTC (rev 10582) @@ -1,15 +1,23 @@ #!/bin/sh
+subdirs=(deque flite gfsm pdstring readdir sprinkler weightmap) + if test -n "$*" ; then dirs=("$@") elif test "`basename "$PWD"`" = "moocow" ; then - dirs=(deque flite gfsm pdstring readdir sprinkler weightmap) + for d in "${subdirs[@]}"; do + $0 "$d" + done elif test "`basename "$PWD"`" = "extended" ; then - dirs=(../deque ../flite ../gfsm ../pdstring ../readdir ../sprinkler ../weightmap) + for d in "${subdirs[@]}"; do + $0 "../$d" + done else dirs=(.) fi -echo "$0: dirs=(${dirs[@]})"
-exec autoreconf --install --force --verbose "${dirs[@]}" -#--symlink +if test -n "$dirs"; then + echo "$0: dirs=(${dirs[@]})" + exec autoreconf --install --force --verbose "${dirs[@]}" + #--symlink +fi
Added: trunk/externals/moocow/common/mooPdUtils.h =================================================================== --- trunk/externals/moocow/common/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/common/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1,18 @@ +/*=============================================================================*\ + * File: mooPdUtils.h + * Author: Bryan Jurish moocow@ling.uni-potsdam.de + * Description: some generic utilities for pd externals + *=============================================================================*/ + +#ifndef _MOO_PD_UTILS_H +#define _MOO_PD_UTILS_H + +/*-- MOO_UNUSED : macro for unused attributes; to avoid compiler warnings */ +#ifdef __GNUC__ +# define MOO_UNUSED __attribute__((unused)) +#else +# define MOO_UNUSED +#endif + + +#endif /* _MOO_PD_UTILS_H */
Property changes on: trunk/externals/moocow/common/mooPdUtils.h ___________________________________________________________________ Added: svn:eol-style + native
Modified: trunk/externals/moocow/deque/src/Makefile.am =================================================================== --- trunk/externals/moocow/deque/src/Makefile.am 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/deque/src/Makefile.am 2009-01-21 13:39:15 UTC (rev 10582) @@ -44,6 +44,7 @@ #-----------------------------------------------------------------------
deque_SOURCES = \ + mooPdUtils.h \ squeue.c squeue.h \ dsqueue.c dsqueue.h \ deque.c
Modified: trunk/externals/moocow/deque/src/Makefile.in =================================================================== --- trunk/externals/moocow/deque/src/Makefile.in 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/deque/src/Makefile.in 2009-01-21 13:39:15 UTC (rev 10582) @@ -202,6 +202,7 @@ # sources #----------------------------------------------------------------------- deque_SOURCES = \ + mooPdUtils.h \ squeue.c squeue.h \ dsqueue.c dsqueue.h \ deque.c
Modified: trunk/externals/moocow/deque/src/dsqueue.c =================================================================== --- trunk/externals/moocow/deque/src/dsqueue.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/deque/src/dsqueue.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -16,6 +16,8 @@ #include "dsqueue.h" #include "squeue.h"
+#include "mooPdUtils.h" + /*---------------------------------------------------------------------- * Creation / Deletion *----------------------------------------------------------------------*/ @@ -151,7 +153,7 @@
/// Returns an iterator for the next datum in the queue, or /// NULL if already at end-of-queue. -dsqueue_iter_t dsqueue_iter_next(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +dsqueue_iter_t dsqueue_iter_next(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { while (dsqi.block) { dsqi.sqi = squeue_iter_next(dsqi.block->sq, dsqi.sqi); if (dsqi.sqi) break; @@ -162,7 +164,7 @@
/// Returns an iterator for the previous datum in the queue, /// or NULL if already at beginning-of-queue. -dsqueue_iter_t dsqueue_iter_prev(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +dsqueue_iter_t dsqueue_iter_prev(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { while (dsqi.block) { dsqi.sqi = squeue_iter_prev(dsqi.block->sq, dsqi.sqi); if (dsqi.sqi) break; @@ -172,7 +174,7 @@ }
/// Returns a true value if p is a valid iterator value, false otherwise. -char dsqueue_iter_valid(dsqueue_t *dsq, dsqueue_iter_t dsqi) { +char dsqueue_iter_valid(MOO_UNSUED dsqueue_t *dsq, dsqueue_iter_t dsqi) { return (dsqi.block && dsqi.sqi && squeue_iter_valid(dsqi.block->sq, dsqi.sqi)); }
Added: trunk/externals/moocow/deque/src/mooPdUtils.h =================================================================== --- trunk/externals/moocow/deque/src/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/deque/src/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1 @@ +link ../../common/mooPdUtils.h \ No newline at end of file
Property changes on: trunk/externals/moocow/deque/src/mooPdUtils.h ___________________________________________________________________ Added: svn:special + *
Property changes on: trunk/externals/moocow/extended ___________________________________________________________________ Added: svn:ignore + *~ .*~ *_stamp *.stamp build.moo
Modified: trunk/externals/moocow/extended/Makefile =================================================================== --- trunk/externals/moocow/extended/Makefile 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/extended/Makefile 2009-01-21 13:39:15 UTC (rev 10582) @@ -35,7 +35,7 @@ # --with-pd-extdir="$(MOOCOW_BUILD)/externs"
##-- defaults -CFLAGS ?= -g -O2 +CFLAGS ?= -g -O2 -Wall -Winline -W pd_src ?= $(CURDIR)/../../../pd
Modified: trunk/externals/moocow/flite/Makefile.am =================================================================== --- trunk/externals/moocow/flite/Makefile.am 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/flite/Makefile.am 2009-01-21 13:39:15 UTC (rev 10582) @@ -45,7 +45,7 @@ #----------------------------------------------------------------------- # sources #----------------------------------------------------------------------- -flite_SOURCES = flite.c +flite_SOURCES = flite.c mooPdUtils.h
#----------------------------------------------------------------------- # external compilation : flags
Modified: trunk/externals/moocow/flite/Makefile.in =================================================================== --- trunk/externals/moocow/flite/Makefile.in 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/flite/Makefile.in 2009-01-21 13:39:15 UTC (rev 10582) @@ -221,7 +221,7 @@ #----------------------------------------------------------------------- # sources #----------------------------------------------------------------------- -flite_SOURCES = flite.c +flite_SOURCES = flite.c mooPdUtils.h AM_CPPFLAGS = $(DEFS) $(IFLAGS) $(DFLAGS) AM_CFLAGS = $(OFLAGS) $(WFLAGS) $(AFLAGS) flite_LDFLAGS = $(LFLAGS)
Property changes on: trunk/externals/moocow/flite/config ___________________________________________________________________ Modified: svn:ignore - *~ .*~ *.o *.pd_linux .deps .libs autom4te.cache config.log config.status stamp-h* config.h
#configure #aclocal.m4 #Makefile.in #install-sh #mkinstalldirs #missing #config.guess #config.sub #depcomp #ltmain.sh #config.h.in
+ *~ .*~ *.o *.pd_linux .deps .libs Makefile autom4te.cache config.log config.status stamp-h* config.h
#configure #aclocal.m4 #Makefile.in #install-sh #mkinstalldirs #missing #config.guess #config.sub #depcomp #ltmain.sh #config.h.in
Modified: trunk/externals/moocow/flite/config/.cvsignore =================================================================== --- trunk/externals/moocow/flite/config/.cvsignore 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/flite/config/.cvsignore 2009-01-21 13:39:15 UTC (rev 10582) @@ -4,6 +4,7 @@ *.pd_linux .deps .libs +Makefile autom4te.cache config.log config.status
Modified: trunk/externals/moocow/flite/flite.c =================================================================== --- trunk/externals/moocow/flite/flite.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/flite/flite.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -10,6 +10,7 @@
#include <m_pd.h> +#include "mooPdUtils.h"
/* black magic */ #ifdef NT @@ -23,7 +24,7 @@
#include <math.h> #include <flite/flite.h> -#include "flite/cst_wave.h" +#include <flite/cst_wave.h>
/*-------------------------------------------------------------------- * DEBUG @@ -133,7 +134,7 @@ /*-------------------------------------------------------------------- * flite_text : set text-buffer *--------------------------------------------------------------------*/ -void flite_text(t_flite *x, t_symbol *s, int argc, t_atom *argv) { +void flite_text(t_flite *x, MOO_UNUSED t_symbol *s, int argc, t_atom *argv) { int i, alen, buffered; t_symbol *asym;
Added: trunk/externals/moocow/flite/mooPdUtils.h =================================================================== --- trunk/externals/moocow/flite/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/flite/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1 @@ +link ../common/mooPdUtils.h \ No newline at end of file
Property changes on: trunk/externals/moocow/flite/mooPdUtils.h ___________________________________________________________________ Added: svn:special + *
Modified: trunk/externals/moocow/pdstring/src/Makefile.am =================================================================== --- trunk/externals/moocow/pdstring/src/Makefile.am 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/pdstring/src/Makefile.am 2009-01-21 13:39:15 UTC (rev 10582) @@ -49,11 +49,11 @@ # sources #-----------------------------------------------------------------------
-pdstring_SOURCES = pdstring.c +pdstring_SOURCES = pdstring.c mooPdUtils.h
-any2string_SOURCES = any2string.c +any2string_SOURCES = any2string.c mooPdUtils.h
-string2any_SOURCES = string2any.c +string2any_SOURCES = string2any.c mooPdUtils.h
#----------------------------------------------------------------------- # external compilation : flags
Modified: trunk/externals/moocow/pdstring/src/Makefile.in =================================================================== --- trunk/externals/moocow/pdstring/src/Makefile.in 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/pdstring/src/Makefile.in 2009-01-21 13:39:15 UTC (rev 10582) @@ -214,9 +214,9 @@ #----------------------------------------------------------------------- # sources #----------------------------------------------------------------------- -pdstring_SOURCES = pdstring.c -any2string_SOURCES = any2string.c -string2any_SOURCES = string2any.c +pdstring_SOURCES = pdstring.c mooPdUtils.h +any2string_SOURCES = any2string.c mooPdUtils.h +string2any_SOURCES = string2any.c mooPdUtils.h
#GLIB_IFLAGS = @GLIB_IFLAGS@ #GLIB_LFLAGS = @GLIB_LFLAGS@
Modified: trunk/externals/moocow/pdstring/src/any2string.c =================================================================== --- trunk/externals/moocow/pdstring/src/any2string.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/pdstring/src/any2string.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -26,6 +26,7 @@
#include <string.h> #include <m_pd.h> +#include "mooPdUtils.h"
#ifdef HAVE_CONFIG_H # include "config.h" @@ -148,7 +149,7 @@ /*-------------------------------------------------------------------- * new */ -static void *any2string_new(t_symbol *sel, int argc, t_atom *argv) +static void *any2string_new(MOO_UNUSED t_symbol *sel, int argc, t_atom *argv) { t_any2string *x = (t_any2string *)pd_new(any2string_class);
Added: trunk/externals/moocow/pdstring/src/mooPdUtils.h =================================================================== --- trunk/externals/moocow/pdstring/src/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/pdstring/src/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1 @@ +link ../../common/mooPdUtils.h \ No newline at end of file
Property changes on: trunk/externals/moocow/pdstring/src/mooPdUtils.h ___________________________________________________________________ Added: svn:special + *
Modified: trunk/externals/moocow/pdstring/src/pdstring.c =================================================================== --- trunk/externals/moocow/pdstring/src/pdstring.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/pdstring/src/pdstring.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -24,6 +24,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *=============================================================================*/ #include <m_pd.h> +#include "mooPdUtils.h"
/* black magic */ #ifdef NT @@ -75,7 +76,7 @@ /*-------------------------------------------------------------------- * help */ -static void pdstring_help(t_pdstring *x) +static void pdstring_help(MOO_UNUSED t_pdstring *x) { post(""); post("pdstring: byte-string externals version " PACKAGE_VERSION " by Bryan Jurish");
Modified: trunk/externals/moocow/pdstring/src/string2any.c =================================================================== --- trunk/externals/moocow/pdstring/src/string2any.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/pdstring/src/string2any.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -137,7 +137,7 @@ /*-------------------------------------------------------------------- * anything */ -static void string2any_anything(t_string2any *x, t_symbol *sel, int argc, t_atom *argv) +static void string2any_anything(t_string2any *x, MOO_UNUSED t_symbol *sel, int argc, t_atom *argv) { int i0=0, i;
@@ -162,7 +162,7 @@ /*-------------------------------------------------------------------- * new */ -static void *string2any_new(t_symbol *sel, int argc, t_atom *argv) +static void *string2any_new(MOO_UNUSED t_symbol *sel, int argc, t_atom *argv) { t_string2any *x = (t_string2any *)pd_new(string2any_class);
Modified: trunk/externals/moocow/sprinkler/Makefile.am =================================================================== --- trunk/externals/moocow/sprinkler/Makefile.am 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/sprinkler/Makefile.am 2009-01-21 13:39:15 UTC (rev 10582) @@ -143,7 +143,7 @@ #-----------------------------------------------------------------------
sprinkler_SOURCES = \ - sprinkler.c + sprinkler.c mooPdUtils.h
#----------------------------------------------------------------------- # external compilation : flags
Modified: trunk/externals/moocow/sprinkler/Makefile.in =================================================================== --- trunk/externals/moocow/sprinkler/Makefile.in 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/sprinkler/Makefile.in 2009-01-21 13:39:15 UTC (rev 10582) @@ -266,7 +266,7 @@ # sources #----------------------------------------------------------------------- sprinkler_SOURCES = \ - sprinkler.c + sprinkler.c mooPdUtils.h
AM_CPPFLAGS = $(IFLAGS) $(DFLAGS) AM_CFLAGS = $(OFLAGS) $(WFLAGS) $(AFLAGS)
Added: trunk/externals/moocow/sprinkler/mooPdUtils.h =================================================================== --- trunk/externals/moocow/sprinkler/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/sprinkler/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1 @@ +link ../common/mooPdUtils.h \ No newline at end of file
Property changes on: trunk/externals/moocow/sprinkler/mooPdUtils.h ___________________________________________________________________ Added: svn:special + *
Modified: trunk/externals/moocow/sprinkler/sprinkler.c =================================================================== --- trunk/externals/moocow/sprinkler/sprinkler.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/sprinkler/sprinkler.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -11,7 +11,7 @@ * + formerly 'forward.c' * * - * Copyright (c) 2002,2004 Bryan Jurish. + * Copyright (c) 2002-2009 Bryan Jurish. * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. @@ -34,6 +34,7 @@ *=============================================================================*/
#include <m_pd.h> +#include "mooPdUtils.h"
/* black magic */ #ifdef NT @@ -144,7 +145,7 @@ outlet_anything(x->x_thru, dst, argc, argv); }
-static void sprinkler_list(t_sprinkler *x, t_symbol *s, int argc, t_atom *argv) +static void sprinkler_list(t_sprinkler *x, MOO_UNUSED t_symbol *s, int argc, t_atom *argv) { #ifdef SPRINKLER_DEBUG post("sprinkler_debug : sprinkler_list : argc=%d", argc); @@ -156,7 +157,7 @@ /*-------------------------------------------------------------------- * newmethod, freemethod */ -void *sprinkler_new(t_symbol *s) +void *sprinkler_new(MOO_UNUSED t_symbol *s) { t_sprinkler *x = (t_sprinkler *)pd_new(sprinkler_class); x->x_thru = outlet_new(&x->x_obj, &s_anything);
Modified: trunk/externals/moocow/weightmap/src/Makefile.am =================================================================== --- trunk/externals/moocow/weightmap/src/Makefile.am 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/weightmap/src/Makefile.am 2009-01-21 13:39:15 UTC (rev 10582) @@ -45,7 +45,7 @@ #-----------------------------------------------------------------------
weightmap_SOURCES = \ - weightmap.c + weightmap.c mooPdUtils.h
#----------------------------------------------------------------------- # external compilation : flags
Modified: trunk/externals/moocow/weightmap/src/Makefile.in =================================================================== --- trunk/externals/moocow/weightmap/src/Makefile.in 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/weightmap/src/Makefile.in 2009-01-21 13:39:15 UTC (rev 10582) @@ -202,7 +202,7 @@ # sources #----------------------------------------------------------------------- weightmap_SOURCES = \ - weightmap.c + weightmap.c mooPdUtils.h
AM_CPPFLAGS = $(IFLAGS) $(DFLAGS) AM_CFLAGS = $(OFLAGS) $(WFLAGS) $(AFLAGS)
Added: trunk/externals/moocow/weightmap/src/mooPdUtils.h =================================================================== --- trunk/externals/moocow/weightmap/src/mooPdUtils.h (rev 0) +++ trunk/externals/moocow/weightmap/src/mooPdUtils.h 2009-01-21 13:39:15 UTC (rev 10582) @@ -0,0 +1 @@ +link ../../common/mooPdUtils.h \ No newline at end of file
Property changes on: trunk/externals/moocow/weightmap/src/mooPdUtils.h ___________________________________________________________________ Added: svn:special + *
Modified: trunk/externals/moocow/weightmap/src/weightmap.c =================================================================== --- trunk/externals/moocow/weightmap/src/weightmap.c 2009-01-21 13:10:19 UTC (rev 10581) +++ trunk/externals/moocow/weightmap/src/weightmap.c 2009-01-21 13:39:15 UTC (rev 10582) @@ -6,10 +6,8 @@ * * - inspired in part by Yves Degoyon's 'probalizer' object * - + * Copyright (c) 2002-2009 Bryan Jurish. * - * Copyright (c) 2002-2006 Bryan Jurish. - * * For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. * @@ -32,6 +30,7 @@
#include <m_pd.h> +#include "mooPdUtils.h"
/* black magic */ #ifdef NT @@ -108,7 +107,7 @@ /*-------------------------------------------------------------------- * map : set selected values (no resize) *--------------------------------------------------------------------*/ -void weightmap_map(t_weightmap *x, t_symbol *s, int argc, t_atom *argv) { +void weightmap_map(t_weightmap *x, MOO_UNUSED t_symbol *s, int argc, t_atom *argv) { int i, idx; float wt;
@@ -154,9 +153,8 @@ /*-------------------------------------------------------------------- * set : set the entire weight-vector in one go (with possible resize) *--------------------------------------------------------------------*/ -void weightmap_set(t_weightmap *x, t_symbol *s, int argc, t_atom *argv) { +void weightmap_set(t_weightmap *x, MOO_UNUSED t_symbol *s, int argc, t_atom *argv) { int i; - float wt;
if (x->x_nvalues != argc) { // set number of elements
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.