[PD-cvs] externals/grill/flext/source flfeatures.h, NONE, 1.1 flbuf.cpp, 1.24, 1.25

Thomas Grill xovo at users.sourceforge.net
Mon Aug 22 21:20:29 CEST 2005


Update of /cvsroot/pure-data/externals/grill/flext/source
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1204/source

Modified Files:
	flbuf.cpp 
Added Files:
	flfeatures.h 
Log Message:
adapted for pd-devel 0.39
- better handling of click callback
- more compatible handling of attributes in patcher (hiding is now an option - define FLEXT_ATTRHIDE)
added flfeatures.h for compile-time version-specific feature detection
changes for devel_0_39 support


--- NEW FILE: flfeatures.h ---
/* 

flext - C++ layer for Max/MSP and pd (pure data) externals

Copyright (c) 2001-2005 Thomas Grill (gr at grrrr.org)
For information on usage and redistribution, and for a DISCLAIMER OF ALL
WARRANTIES, see the file, "license.txt," in this distribution.  

*/

/*! \file flfeatures.h
    \brief Detect version-specific features.
*/
 
#ifndef __FLFEATURES_H
#define __FLFEATURES_H

// check if PD API supports buffer dirty time
#if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION)
#if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38
// array locks have been removed in devel_0_39
	#define _FLEXT_HAVE_PD_GARRAYLOCKS
#endif
#if PD_MINOR_VERSION >= 36
    #define _FLEXT_HAVE_PD_GARRAYUPDATETIME
#endif
#endif

#if defined(MAC_VERSION) || defined(WIN_VERSION) 
    // not for OS9
    #define _FLEXT_HAVE_MAX_INUSEFLAG
#endif

#endif

Index: flbuf.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flbuf.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** flbuf.cpp	17 Jul 2005 11:33:38 -0000	1.24
--- flbuf.cpp	22 Aug 2005 19:20:27 -0000	1.25
***************
*** 14,17 ****
--- 14,18 ----
   
  #include "flext.h"
+ #include "flfeatures.h"
  
  #if FLEXT_SYS != FLEXT_SYS_JMAX
***************
*** 21,33 ****
  #endif
  
- // check if PD API supports buffer dirty time
- #if defined(PD_DEVEL_VERSION) && defined(PD_MAJOR_VERSION) && defined(PD_MINOR_VERSION)
- #if PD_MINOR_VERSION >= 36 && PD_MINOR_VERSION <= 38
- // garray_updatetime has been removed in devel_0_39
-     #define FLEXT_HAVE_GARRAYUPDATETIME
- 	#define FLEXT_HAVE_GARRAYLOCKS
- #endif
- #endif
- 
  #if FLEXT_SYS == FLEXT_SYS_MAX
  // defined in flsupport.cpp
--- 22,25 ----
***************
*** 185,189 ****
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
! #ifdef FLEXT_HAVE_GARRAYLOCKS
      garray_lock(arr);
  #endif
--- 177,181 ----
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
! #ifdef _FLEXT_HAVE_PD_GARRAYLOCKS
      garray_lock(arr);
  #endif
***************
*** 192,201 ****
      t_buffer *p = (t_buffer *)sym->s_thing;
      FLEXT_ASSERT(p);
! #if defined(MAC_VERSION) || defined(WIN_VERSION) 
      long old = p->b_inuse;
      p->b_inuse = 1;
      return old;
  #else
-     // undefined for OS9
      return 0;
  #endif
--- 184,192 ----
      t_buffer *p = (t_buffer *)sym->s_thing;
      FLEXT_ASSERT(p);
! #ifdef _FLEXT_HAVE_MAX_INUSEFLAG 
      long old = p->b_inuse;
      p->b_inuse = 1;
      return old;
  #else
      return 0;
  #endif
***************
*** 210,214 ****
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
! #ifdef FLEXT_HAVE_GARRAYLOCKS
      garray_unlock(arr);
  #endif
--- 201,205 ----
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
! #ifdef _FLEXT_HAVE_PD_GARRAYLOCKS
      garray_unlock(arr);
  #endif
***************
*** 216,221 ****
      t_buffer *p = (t_buffer *)sym->s_thing;
      FLEXT_ASSERT(p);
! #if defined(MAC_VERSION) || defined(WIN_VERSION) 
!     // not for OS9
      p->b_inuse = prv;
  #endif
--- 207,211 ----
      t_buffer *p = (t_buffer *)sym->s_thing;
      FLEXT_ASSERT(p);
! #ifdef _FLEXT_HAVE_MAX_INUSEFLAG 
      p->b_inuse = prv;
  #endif
***************
*** 340,344 ****
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
!     #ifdef FLEXT_HAVE_GARRAYUPDATETIME
      return isdirty || garray_updatetime(arr) > cleantime;
      #else
--- 330,334 ----
  #if FLEXT_SYS == FLEXT_SYS_PD
      FLEXT_ASSERT(arr);
!     #ifdef _FLEXT_HAVE_PD_GARRAYUPDATETIME
      return isdirty || garray_updatetime(arr) > cleantime;
      #else





More information about the Pd-cvs mailing list