[PD-cvs] SF.net SVN: pure-data:[10423] trunk/externals/moocow

mukau at users.sourceforge.net mukau at users.sourceforge.net
Thu Dec 4 15:47:47 CET 2008


Revision: 10423
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10423&view=rev
Author:   mukau
Date:     2008-12-04 14:47:46 +0000 (Thu, 04 Dec 2008)

Log Message:
-----------
+ added 'unused' attributes to gfsm externals code
+ updated extended/Makefile: don't call ./autogen.sh for gfsm stuff

Modified Paths:
--------------
    trunk/externals/moocow/extended/Makefile
    trunk/externals/moocow/gfsm/src/atom_alphabet.c
    trunk/externals/moocow/gfsm/src/pd_alphabet.c
    trunk/externals/moocow/gfsm/src/pd_automaton.c
    trunk/externals/moocow/gfsm/src/pd_automaton.h
    trunk/externals/moocow/gfsm/src/pd_gfsm.c
    trunk/externals/moocow/gfsm/src/pd_state.c

Modified: trunk/externals/moocow/extended/Makefile
===================================================================
--- trunk/externals/moocow/extended/Makefile	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/extended/Makefile	2008-12-04 14:47:46 UTC (rev 10423)
@@ -24,7 +24,7 @@
 MOOCOW_DIR    ?=$(shell pwd)
 MOOCOW_BUILD  ?=$(MOOCOW_DIR)/build.moo
 MOOCOW_MFLAGS ?=DESTDIR=""
-MOOCOW_BUILD_VERSION ?=0.02
+MOOCOW_BUILD_VERSION ?=0.03
 
 CONFIGURE_ARGS=\
 	CFLAGS="$(CFLAGS)" \
@@ -41,7 +41,7 @@
 
 ##======================================================================
 ## Rules: default
-all: config build.stamp
+all: build.stamp
 
 ##======================================================================
 ## Rules: subdirectory: dummy
@@ -111,7 +111,7 @@
 #GFSM_CONFIGURE_ARGS ?=
 
 gfsm.autogen_stamp: 
-	(cd $(GFSM_DIR); sh ./autogen.sh) || true
+#	(cd $(GFSM_DIR); sh ./autogen.sh) || true
 	touch $@
 
 gfsm.configure_stamp: gfsm.autogen_stamp
@@ -287,9 +287,9 @@
 configure: $(SUBDIRS:=.configure_stamp)
 
 config:
-	@echo "MOOCOW_BUILD_VERSION=$(MOOCOW_BUILD_VERSION)"
+	@echo "(moocow:debug) MOOCOW_BUILD_VERSION=$(MOOCOW_BUILD_VERSION)"
 
-build.stamp: $(SUBDIRS:=.build_stamp)
+build.stamp: config $(SUBDIRS:=.build_stamp)
 	rm -rf $(MOOCOW_BUILD)/noinstall
 	touch $@
 

Modified: trunk/externals/moocow/gfsm/src/atom_alphabet.c
===================================================================
--- trunk/externals/moocow/gfsm/src/atom_alphabet.c	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/atom_alphabet.c	2008-12-04 14:47:46 UTC (rev 10423)
@@ -78,7 +78,7 @@
 /*--------------------------------------------------------------
  * dup()
  */
-t_atom *gfsm_pd_atom_dup(gfsmPdAtomAlphabet *alph, t_atom *a)
+t_atom *gfsm_pd_atom_dup(GFSM_UNUSED gfsmPdAtomAlphabet *alph, t_atom *a)
 {
   //return (a ? copybytes(a, sizeof(t_atom)) : NULL);
   return (a ? gfsm_mem_dup_n(a,sizeof(t_atom)) : NULL);

Modified: trunk/externals/moocow/gfsm/src/pd_alphabet.c
===================================================================
--- trunk/externals/moocow/gfsm/src/pd_alphabet.c	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/pd_alphabet.c	2008-12-04 14:47:46 UTC (rev 10423)
@@ -280,7 +280,7 @@
 /*--------------------------------------------------------------------
  * pd_gfsm_alphabet_obj: insert
  */
-static void pd_gfsm_alphabet_obj_insert(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv)
+static void pd_gfsm_alphabet_obj_insert(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv)
 {
   if (argc < 1) {
     error("pd_gfsm_alphabet_obj_insert(): no atom to insert?");
@@ -294,7 +294,7 @@
 /*--------------------------------------------------------------------
  * pd_gfsm_alphabet_obj: atom2label
  */
-static void pd_gfsm_alphabet_obj_atom2label(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv)
+static void pd_gfsm_alphabet_obj_atom2label(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv)
 {
   if (argc < 1) {
     error("pd_gfsm_alphabet_obj_atom2label(): no arguments?");
@@ -308,7 +308,7 @@
 /*--------------------------------------------------------------------
  * pd_gfsm_alphabet_obj: atom2label_force
  */
-static void pd_gfsm_alphabet_obj_atom2label_force(t_pd_gfsm_alphabet_obj *x, t_symbol *s, int argc, t_atom *argv)
+static void pd_gfsm_alphabet_obj_atom2label_force(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *s, int argc, t_atom *argv)
 {
   if (argc < 1) {
     error("pd_gfsm_alphabet_obj_atom2label_force(): no arguments?");
@@ -351,7 +351,7 @@
 /*--------------------------------------------------------------------
  * pd_gfsm_alphabet_obj: rmatom()
  */
-static void pd_gfsm_alphabet_obj_rmatom(t_pd_gfsm_alphabet_obj *x, t_symbol *sel, int argc, t_atom *argv)
+static void pd_gfsm_alphabet_obj_rmatom(t_pd_gfsm_alphabet_obj *x, GFSM_UNUSED t_symbol *sel, int argc, t_atom *argv)
 {
   if (argc < 1) return;
   gfsm_alphabet_remove_key(x->x_alphabet_pd->x_alphabet, argv);

Modified: trunk/externals/moocow/gfsm/src/pd_automaton.c
===================================================================
--- trunk/externals/moocow/gfsm/src/pd_automaton.c	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/pd_automaton.c	2008-12-04 14:47:46 UTC (rev 10423)
@@ -197,12 +197,12 @@
 
   if (labs->len > 0) {
     int i;
-    if (x->x_argc < labs->len) {
+    if (x->x_argc < (int)labs->len) {
       size_t newsize = labs->len * sizeof(t_atom);
       x->x_argv = resizebytes(x->x_argv, x->x_argc*sizeof(t_atom), newsize);
       x->x_argc = labs->len;
     }
-    for (i=0; i < labs->len; i++) {
+    for (i=0; i < (int)labs->len; i++) {
       SETFLOAT(x->x_argv+i, (gfsmLabelVal)g_ptr_array_index(labs,i));
     }
     outlet_anything(x->x_valout, sel, labs->len, x->x_argv);
@@ -608,7 +608,7 @@
 /*--------------------------------------------------------------------
  * automaton_obj: draw_dot()
  */
-static void pd_gfsm_automaton_obj_draw_dot(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_draw_dot(t_pd_gfsm_automaton_obj *x, GFSM_UNUSED GIMME_ARGS)
 {
   t_pd_gfsm_alphabet_pd *ialph=NULL, *oalph=NULL, *salph=NULL;
   t_symbol
@@ -714,13 +714,13 @@
     //-- ensure labels exists, is cleared, & is sufficiently allocated
     if (!x->x_labels) {
       x->x_labels = g_ptr_array_sized_new(argc-1);
-    } else if (argc > x->x_labels->len) {
+    } else if (argc > (int)x->x_labels->len) {
       g_ptr_array_set_size(x->x_labels, argc);
     }
     x->x_labels->len = 0;
 
     //-- get labels
-    for (i=1; i < argc; i++) {
+    for (i=1; (int)i < argc; i++) {
       gfsmLabelVal lab = atom_getfloat(argv+i);
       //if (lab==gfsmEpsilon) continue; //-- ignore epsilons (?)
       g_ptr_array_add(x->x_labels, (gpointer)lab);
@@ -752,7 +752,7 @@
 /*--------------------------------------------------------------------
  * paths_unsafe()
  */
-static void pd_gfsm_automaton_obj_paths_unsafe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_paths_unsafe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
   //-- clear set first
   if (x->x_paths_s) gfsm_set_clear(x->x_paths_s);
@@ -778,7 +778,7 @@
 /*--------------------------------------------------------------------
  * paths_safe()
  */
-static void pd_gfsm_automaton_obj_paths_safe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_paths_safe(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
   gfsmAutomaton *fsm = x->x_automaton_pd->x_automaton;
 
@@ -795,7 +795,7 @@
 /*--------------------------------------------------------------------
  * path_first()
  */
-static void pd_gfsm_automaton_obj_path_first(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_path_first(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
   x->x_paths_i = 0;
   if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) {
@@ -808,9 +808,9 @@
 /*--------------------------------------------------------------------
  * path_next()
  */
-static void pd_gfsm_automaton_obj_path_next(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_path_next(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
-  if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i+1 < x->x_paths_a->len) {
+  if (x->x_paths_a && x->x_paths_i+1 < x->x_paths_a->len) { /*&& x->x_paths_i >= 0 : always true*/
     x->x_paths_i++;
     pd_gfsm_automaton_obj_outlet_float(x, sel, x->x_paths_i);
   } else {
@@ -824,7 +824,7 @@
 static void pd_gfsm_automaton_obj_path_nth(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
 {
   int ni = argc > 0 ? atom_getfloat(argv) : 0;
-  if (x->x_paths_a && ni >= 0 && ni < x->x_paths_a->len) {
+  if (x->x_paths_a && ni >= 0 && (guint)ni < x->x_paths_a->len) {
     x->x_paths_i = ni;
     pd_gfsm_automaton_obj_outlet_float(x, sel, x->x_paths_i);
   } else {
@@ -835,9 +835,9 @@
 /*--------------------------------------------------------------------
  * path_lo()
  */
-static void pd_gfsm_automaton_obj_path_lo(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_path_lo(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
-  if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) {
+  if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/
     gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i);
     pd_gfsm_automaton_obj_outlet_labels(x, sel, p->lo);
   }
@@ -849,9 +849,9 @@
 /*--------------------------------------------------------------------
  * path_hi()
  */
-static void pd_gfsm_automaton_obj_path_hi(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_path_hi(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
-  if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) {
+  if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/
     gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i);
     pd_gfsm_automaton_obj_outlet_labels(x, sel, p->hi);
   }
@@ -863,9 +863,9 @@
 /*--------------------------------------------------------------------
  * path_w()
  */
-static void pd_gfsm_automaton_obj_path_w(t_pd_gfsm_automaton_obj *x, GIMME_ARGS)
+static void pd_gfsm_automaton_obj_path_w(t_pd_gfsm_automaton_obj *x, GIMME_ARGS_NOCV)
 {
-  if (x->x_paths_a && x->x_paths_i >= 0 && x->x_paths_i < x->x_paths_a->len) {
+  if (x->x_paths_a && x->x_paths_i < x->x_paths_a->len) { /*&& x->x_paths_i >= 0*/
     gfsmPath *p = (gfsmPath*)g_ptr_array_index(x->x_paths_a,x->x_paths_i);
     pd_gfsm_automaton_obj_outlet_float(x, sel, p->w);
   }

Modified: trunk/externals/moocow/gfsm/src/pd_automaton.h
===================================================================
--- trunk/externals/moocow/gfsm/src/pd_automaton.h	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/pd_automaton.h	2008-12-04 14:47:46 UTC (rev 10423)
@@ -75,6 +75,7 @@
  */
 #define atom_getboolarg(which,argc,argv) (atom_getintarg(which,argc,argv)==0 ? FALSE : TRUE)
 #define GIMME_ARGS t_symbol *sel, int argc, t_atom *argv
+#define GIMME_ARGS_NOCV t_symbol *sel, GFSM_UNUSED int argc, GFSM_UNUSED t_atom *argv
 
 /*----------------------------------------------------------------------
  * utilities

Modified: trunk/externals/moocow/gfsm/src/pd_gfsm.c
===================================================================
--- trunk/externals/moocow/gfsm/src/pd_gfsm.c	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/pd_gfsm.c	2008-12-04 14:47:46 UTC (rev 10423)
@@ -61,7 +61,7 @@
 /*--------------------------------------------------------------------
  * pd_gfsm_dummy: free()
  */
-static void pd_gfsm_dummy_free(t_pd_gfsm_dummy *x)
+static void pd_gfsm_dummy_free(GFSM_UNUSED t_pd_gfsm_dummy *x)
 {}
 
 /*--------------------------------------------------------------------

Modified: trunk/externals/moocow/gfsm/src/pd_state.c
===================================================================
--- trunk/externals/moocow/gfsm/src/pd_state.c	2008-12-04 14:31:00 UTC (rev 10422)
+++ trunk/externals/moocow/gfsm/src/pd_state.c	2008-12-04 14:47:46 UTC (rev 10423)
@@ -48,7 +48,7 @@
 /*--------------------------------------------------------------------
  * new()
  */
-static void *pd_gfsm_state_new(t_symbol *sel, int argc, t_atom *argv)
+static void *pd_gfsm_state_new(GFSM_UNUSED t_symbol *sel, int argc, t_atom *argv)
 {
   t_symbol *name = &s_;
   t_pd_gfsm_state *x = (t_pd_gfsm_state *)pd_new(pd_gfsm_state_class);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list