[PD-cvs] pd/src m_pd.h,1.4.4.11.2.33.2.19,1.4.4.11.2.33.2.20

Mathieu Bouchard matju at users.sourceforge.net
Sun Dec 31 06:37:56 CET 2006


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

Modified Files:
      Tag: desiredata
	m_pd.h 
Log Message:
another shot at the string API.


Index: m_pd.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
retrieving revision 1.4.4.11.2.33.2.19
retrieving revision 1.4.4.11.2.33.2.20
diff -C2 -d -r1.4.4.11.2.33.2.19 -r1.4.4.11.2.33.2.20
*** m_pd.h	20 Dec 2006 10:10:34 -0000	1.4.4.11.2.33.2.19
--- m_pd.h	31 Dec 2006 05:37:54 -0000	1.4.4.11.2.33.2.20
***************
*** 1,6 ****
! /* Copyright (c) 1997-1999 Miller Puckette.
! * For information on usage and redistribution, and for a DISCLAIMER OF ALL
! * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
! 
  
  #ifndef __m_pd_h_
--- 1,6 ----
! /* Copyright (c) 2006-2007 Mathieu Bouchard.
!    Copyright (c) 1997-1999 Miller Puckette.
!    For information on usage and redistribution, and for a DISCLAIMER OF ALL
!    WARRANTIES, see the file, "LICENSE.txt", in this distribution.  */
  
  #ifndef __m_pd_h_
***************
*** 74,89 ****
  typedef struct _symbol {
      char *s_name;           /* the const string that represents this symbol */
!     t_pd *s_thing;          /* pointer to the target of a receive-symbol,
! 				or to the bindlist of several targets */
!     struct _symbol *s_next; /* brochette of all symbols */
!     size_t s_size; /* size of symbol (DesireData support for NUL) */
  } t_symbol;
  
! typedef struct _string {
!     char *s_name;           /* the const string that represents this symbol */
!     size_t refcount;
!     struct _symbol *s_next; /* brochette of all strings */
!     size_t s_size;          /* size of string (DesireData support for NUL) */
! } t_string;
  
  typedef struct _array t_array;   /* g_canvas.h */
--- 74,90 ----
  typedef struct _symbol {
      char *s_name;           /* the const string that represents this symbol */
!     t_pd *s_thing;          /* pointer to the target of a receive-symbol or to the bindlist of several targets */
!     struct _symbol *s_next; /* brochette of all symbols (only for permanent symbols) */
!     size_t refcount;        /* refcount<0 means that the symbol is permanent */
!     size_t s_size;          /* size of s_name (support for NUL characters) */
  } t_symbol;
  
! typedef struct _list {
!     struct _atom *at;
!     t_pd *s_thing;          /* dummy (unused) */
!     struct _symbol *s_next; /* brochette of all symbols (only for permanent symbols) */
!     size_t refcount;        /* refcount<0 means that the symbol is permanent */
!     size_t s_size;          /* size of s_name (support for NUL characters) */
! } t_list;
  
  typedef struct _array t_array;   /* g_canvas.h */
***************
*** 119,123 ****
      t_float w_float;        /* A_FLOAT   */
      t_symbol *w_symbol;     /* A_SYMBOL  */
-     t_string *w_string;     /* A_STRING  */
      t_gpointer *w_gpointer; /* A_POINTER */
      t_array *w_array;       /* DS nested array? */
--- 120,123 ----
***************
*** 313,327 ****
  #define SETSTRING(atom, s)   ((atom)->a_type = A_SYMBOL,  (atom)->a_w.w_symbol = gensym(s))
  
! EXTERN t_float   atom_getfloat( t_atom *a);
! EXTERN t_int     atom_getint(   t_atom *a);
! EXTERN t_symbol *atom_getsymbol(t_atom *a);
! EXTERN t_string *atom_getstring(t_atom *a); /* for future use */
! EXTERN t_symbol *atom_gensym(   t_atom *a);
! EXTERN t_float   atom_getfloatarg( int which, int argc, t_atom *argv);
! EXTERN t_int     atom_getintarg(   int which, int argc, t_atom *argv);
! EXTERN t_symbol *atom_getsymbolarg(int which, int argc, t_atom *argv);
! EXTERN t_string *atom_getstringarg(int which, int argc, t_atom *argv); /* for future use */
  
! EXTERN void atom_string(t_atom *a, char *buf, unsigned int bufsize); /* has nothing to do with A_STRING */
  
  /* ------------------  binbufs --------------- */
--- 313,328 ----
  #define SETSTRING(atom, s)   ((atom)->a_type = A_SYMBOL,  (atom)->a_w.w_symbol = gensym(s))
  
! EXTERN t_float     atom_getfloat( t_atom *a);
! EXTERN t_int       atom_getint(   t_atom *a);
! EXTERN t_symbol   *atom_getsymbol(t_atom *a); /* t_symbol guaranteed to live forever */
! EXTERN const char *atom_getstring(t_atom *a); /* the return value should be used only immediately */
! EXTERN t_symbol   *atom_gensym(   t_atom *a);
! EXTERN t_float     atom_getfloatarg( int which, int argc, t_atom *argv);
! EXTERN t_int       atom_getintarg(   int which, int argc, t_atom *argv);
! EXTERN t_symbol   *atom_getsymbolarg(int which, int argc, t_atom *argv);
! EXTERN const char *atom_getstringarg(int which, int argc, t_atom *argv);
  
! /* this function should produce a literal, whereas getstring gives the exact string */
! EXTERN void atom_string(t_atom *a, char *buf, unsigned int bufsize);
  
  /* ------------------  binbufs --------------- */
***************
*** 376,380 ****
  EXTERN void pd_float(   t_pd *x, t_float f);
  EXTERN void pd_symbol(  t_pd *x, t_symbol *s);
! EXTERN void pd_string(  t_pd *x, t_string *s); /* for future use */
  EXTERN void pd_list(    t_pd *x, t_symbol *s, int argc, t_atom *argv);
  EXTERN void pd_anything(t_pd *x, t_symbol *s, int argc, t_atom *argv);
--- 377,381 ----
  EXTERN void pd_float(   t_pd *x, t_float f);
  EXTERN void pd_symbol(  t_pd *x, t_symbol *s);
! EXTERN void pd_string(  t_pd *x, const char *s); /* makes a refcounted symbol (copying s) */
  EXTERN void pd_list(    t_pd *x, t_symbol *s, int argc, t_atom *argv);
  EXTERN void pd_anything(t_pd *x, t_symbol *s, int argc, t_atom *argv);
***************
*** 418,422 ****
  EXTERN void outlet_float(   t_outlet *x, t_float f);
  EXTERN void outlet_symbol(  t_outlet *x, t_symbol *s);
! EXTERN void outlet_string(  t_outlet *x, t_string *s); /* for future use */
  EXTERN void outlet_list(    t_outlet *x, t_symbol *s, int argc, t_atom *argv);
  EXTERN void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv);
--- 419,423 ----
  EXTERN void outlet_float(   t_outlet *x, t_float f);
  EXTERN void outlet_symbol(  t_outlet *x, t_symbol *s);
! EXTERN void outlet_string(  t_outlet *x, const char *s); /* makes a refcounted symbol (copying s) */
  EXTERN void outlet_list(    t_outlet *x, t_symbol *s, int argc, t_atom *argv);
  EXTERN void outlet_anything(t_outlet *x, t_symbol *s, int argc, t_atom *argv);
***************
*** 425,429 ****
  EXTERN t_object *pd_checkobject(t_pd *x);
  
- 
  /* -------------------- canvases -------------- */
  
--- 426,429 ----
***************
*** 446,450 ****
  #define CLASS_PATCHABLE 3
  #define CLASS_NOINLET 8
! 
  #define CLASS_TYPEMASK 3
  
--- 446,450 ----
  #define CLASS_PATCHABLE 3
  #define CLASS_NOINLET 8
! #define CLASS_NEWATOM 16
  #define CLASS_TYPEMASK 3
  
***************
*** 786,793 ****
  #endif /* __m_pd_h_ */
  
! /* removed features:
     sys_fontwidth, sys_fontheight, t_widgetbehavior, class_setproperties,
     class_setwidget, class_setparentwidget, class_parentwidget, pd_getparentwidget,
     sys_pretendguibytes, sys_queuegui, sys_unqueuegui, getzbytes,
     gfxstub_new, gfxstub_deleteforkey
   */
--- 786,794 ----
  #endif /* __m_pd_h_ */
  
! /* removed functions:
     sys_fontwidth, sys_fontheight, t_widgetbehavior, class_setproperties,
     class_setwidget, class_setparentwidget, class_parentwidget, pd_getparentwidget,
     sys_pretendguibytes, sys_queuegui, sys_unqueuegui, getzbytes,
     gfxstub_new, gfxstub_deleteforkey
+    removed fields: te_width, te_type.
   */





More information about the Pd-cvs mailing list