[PD-cvs] pd/src g_template.c,1.1.1.3.2.2.2.2,1.1.1.3.2.2.2.3

Mathieu Bouchard matju at users.sourceforge.net
Sat May 8 21:34:46 CEST 2004


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32601

Modified Files:
      Tag: impd_0_37
	g_template.c 
Log Message:
g_template switching to pd_error() instead of error()


Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_template.c	27 Apr 2004 18:09:34 -0000	1.1.1.3.2.2.2.2
--- g_template.c	8 May 2004 19:34:43 -0000	1.1.1.3.2.2.2.3
***************
*** 169,176 ****
      	if (type == DT_FLOAT)
  	    val = *(t_float *)(((char *)wp) + onset);
!     	else if (loud) error("%s.%s: not a number",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) error("%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
      return (val);
--- 169,176 ----
      	if (type == DT_FLOAT)
  	    val = *(t_float *)(((char *)wp) + onset);
!     	else if (loud) pd_error(x,"%s.%s: not a number",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) pd_error(x,"%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
      return (val);
***************
*** 186,193 ****
      	if (type == DT_FLOAT)
      	    *(t_float *)(((char *)wp) + onset) = f;
!     	else if (loud) error("%s.%s: not a number",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) error("%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
  }
--- 186,193 ----
      	if (type == DT_FLOAT)
      	    *(t_float *)(((char *)wp) + onset) = f;
!     	else if (loud) pd_error(x,"%s.%s: not a number",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) pd_error(x,"%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
  }
***************
*** 203,210 ****
      	if (type == DT_SYMBOL)
  	    val = *(t_symbol **)(((char *)wp) + onset);
!     	else if (loud) error("%s.%s: not a symbol",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) error("%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
      return (val);
--- 203,210 ----
      	if (type == DT_SYMBOL)
  	    val = *(t_symbol **)(((char *)wp) + onset);
!     	else if (loud) pd_error(x,"%s.%s: not a symbol",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) pd_error(x,"%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
      return (val);
***************
*** 220,227 ****
      	if (type == DT_SYMBOL)
      	    *(t_symbol **)(((char *)wp) + onset) = s;
!     	else if (loud) error("%s.%s: not a symbol",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) error("%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
  }
--- 220,227 ----
      	if (type == DT_SYMBOL)
      	    *(t_symbol **)(((char *)wp) + onset) = s;
!     	else if (loud) pd_error(x,"%s.%s: not a symbol",
      	    x->t_sym->s_name, fieldname->s_name);
      }
!     else if (loud) pd_error(x,"%s.%s: no such field",
      	x->t_sym->s_name, fieldname->s_name);
  }
***************
*** 492,497 ****
  	    {
  	    	    /* don't know what to do here! */
! 	    	error("%s: template mismatch",
! 		    templatesym->s_name);
  	    }
  	    else
--- 492,496 ----
  	    {
  	    	    /* don't know what to do here! */
! 	    	pd_error(x, "%s: template mismatch", templatesym->s_name);
  	    }
  	    else
***************
*** 721,726 ****
      else
      {
!     	if (loud)
! 	    error("symbolic data field used as number");
      	return (0);
      }
--- 720,724 ----
      else
      {
!     	if (loud) pd_error(0,"symbolic data field used as number");
      	return (0);
      }
***************
*** 738,743 ****
      else
      {
!     	if (loud)
! 	    error("numeric data field used as symbol");
      	return (&s_);
      }
--- 736,740 ----
      else
      {
!     	if (loud) pd_error(0,"numeric data field used as symbol");
      	return (&s_);
      }
***************
*** 1088,1092 ****
      if (x->x_data.fd_type != A_ARRAY || !x->x_data.fd_var)
      {
!     	error("plot: needs an array field");
      	return (-1);
      }
--- 1085,1089 ----
      if (x->x_data.fd_type != A_ARRAY || !x->x_data.fd_var)
      {
!     	pd_error(x, "plot: needs an array field");
      	return (-1);
      }
***************
*** 1094,1103 ****
      	&arrayonset, &type, &elemtemplatesym))
      {
!     	error("plot: %s: no such field", x->x_data.fd_un.fd_varsym->s_name);
      	return (-1);
      }
      if (type != DT_ARRAY)
      {
!     	error("plot: %s: not an array", x->x_data.fd_un.fd_varsym->s_name);
      	return (-1);
      }
--- 1091,1100 ----
      	&arrayonset, &type, &elemtemplatesym))
      {
!     	pd_error(x,"plot: %s: no such field", x->x_data.fd_un.fd_varsym->s_name);
      	return (-1);
      }
      if (type != DT_ARRAY)
      {
!     	pd_error(x,"plot: %s: not an array", x->x_data.fd_un.fd_varsym->s_name);
      	return (-1);
      }
***************
*** 1130,1134 ****
      if (!(elemtemplate =  template_findbyname(elemtemplatesym)))
      {
!     	error("plot: %s: no such template", elemtemplatesym->s_name);
      	return (-1);
      }
--- 1127,1131 ----
      if (!(elemtemplate =  template_findbyname(elemtemplatesym)))
      {
!     	pd_error(0,"plot: %s: no such template", elemtemplatesym->s_name);
      	return (-1);
      }
***************
*** 1136,1140 ****
      	(elemtemplatecanvas = template_findcanvas(elemtemplate))))
      {
!     	error("plot: %s: no canvas for this template", elemtemplatesym->s_name);
      	return (-1);
      }
--- 1133,1137 ----
      	(elemtemplatecanvas = template_findcanvas(elemtemplate))))
      {
!     	pd_error(0,"plot: %s: no canvas for this template", elemtemplatesym->s_name);
      	return (-1);
      }





More information about the Pd-cvs mailing list