[PD-cvs] externals/grill/flext/source Makefile.am,NONE,1.1 flatom_pr.cpp,1.19,1.20 flext.h,1.22,1.23 flmap.h,1.3,1.4 flsimd.cpp,1.13,1.14 flsupport.cpp,1.39,1.40 flsupport.h,1.70,1.71 flxlet.cpp,1.6,1.7

Thomas Grill xovo at users.sourceforge.net
Tue Oct 26 22:03:54 CEST 2004


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

Modified Files:
	flatom_pr.cpp flext.h flmap.h flsimd.cpp flsupport.cpp 
	flsupport.h flxlet.cpp 
Added Files:
	Makefile.am 
Log Message:
 ""

--- NEW FILE: Makefile.am ---
#
# automake template
# added by tim blechmann
#

lib_LIBRARIES = libflext.a libflext_d.a libflext_t.a libflext_td.a 

SRCS_FLEXT = \
	flbase.cpp \
	flext.cpp \
	flbuf.cpp \
	fldsp.cpp \
	fllib.cpp \
	flxlet.cpp \
	flattr.cpp \
	flattr_ed.cpp \
	flsupport.cpp \
	flutil.cpp \
	flatom.cpp \
	flatom_pr.cpp \
	flthr.cpp \
	fltimer.cpp \
	flsimd.cpp \
	flout.cpp \
	flatom_app.cpp \
	flatom_part.cpp \
	flitem.cpp \
	flmeth.cpp \
	flmsg.cpp \
	flproxy.cpp \
	flqueue.cpp \
	flbind.cpp

pkginclude_HEADERS = \
	flprefix.h \
	flstdc.h \
	flbase.h \
	flclass.h \
	flext.h \
	flsupport.h \
	flmap.h \
	fldsp.h \
	flinternal.h \
	fldefs.h \
	fldefs_hdr.h \
	fldefs_setup.h \
	fldefs_methcb.h \
	fldefs_meththr.h \
	fldefs_methadd.h \
	fldefs_methbind.h \
	fldefs_methcall.h \
	fldefs_attrcb.h \
	fldefs_attrvar.h \
	fldefs_attradd.h


if SNDOBJ
SRCS_SNDOBJ = flsndobj.cpp
HDRS_SNDOBJ = flsndobj.cpp
LIB_SNDOBJ = -lsndobj
endif

if STK
SRCS_STK = flstk.cpp
HDRS_STK = flstk.cpp
LIB_STK =  -lstk
endif

pkginclude_HEADERS += $(HDRS_SNDOBJ) $(HDRS_STK)
FRAMEWORKS = @FRAMEWORKS@


# for static libraries we can use automake
libflext_a_SOURCES    = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_d_a_SOURCES  = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_t_a_SOURCES  = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_td_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)

libflext_a_CXXFLAGS    = @OPT_FLAGS@ @INCLUDEDIR@ 
libflext_d_a_CXXFLAGS  = @INCLUDEDIR@ -g -DFLEXT_DEBUG
libflext_t_a_CXXFLAGS  = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS 
libflext_td_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS 

libflext_a_LDFLAGS_    = @OPT_FLAGS@ @INCLUDEDIR@ $(patsubst %,-framework %,$(FRAMEWORKS))
libflext_d_a_LDFLAGS_  = @INCLUDEDIR@ -g -DFLEXT_DEBUG $(patsubst %,-framework %,$(FRAMEWORKS))
libflext_t_a_LDFLAGS_  = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_THREADS $(patsubst %,-framework %,$(FRAMEWORKS))
libflext_td_a_LDFLAGS_ = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_THREADS $(patsubst %,-framework %,$(FRAMEWORKS))

# for shared libraries, we can't ...
libflext_la_CXXFLAGS   = @OPT_FLAGS@ @INCLUDEDIR@ -DFLEXT_SHARED -DFLEXT_EXPORTS $(DEFS)
libflext_d_la_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG -DFLEXT_SHARED -DFLEXT_EXPORTS $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)

libflext_la_LDFLAGS_   = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS) $(patsubst %,-framework %,$(FRAMEWORKS))
libflext_d_la_LDFLAGS_ = @DYNAMIC_LDFLAGS@ $(LIB_STK) $(LIB_SNDOBJ) $(LDFLAGS) $(patsubst %,-framework %,$(FRAMEWORKS))

libflext_la_NAME = libflext. at SOEXT@
libflext_d_la_NAME = libflext_d. at SOEXT@


all-local: $(libflext_la_NAME) $(libflext_d_la_NAME)

$(libflext_la_NAME): $(patsubst %.cpp,libflext_la-%.o,$(SRCS_FLEXT))
	$(CXX) -shared $(libflext_la_LDFLAGS_) $(LIBS) -o $(libflext_la_NAME) $^

libflext_la-%.o: %.cpp
	$(CXX) -shared -c $(libflext_la_CXXFLAGS) $< -o $@

$(libflext_d_la_NAME): $(patsubst %.cpp,libflext_d_la-%.o,$(SRCS_FLEXT))
	$(CXX) -shared $(libflext_d_la_LDFLAGS_) $(LIBS) -o $(libflext_d_la_NAME) $^

libflext_d_la-%.o: %.cpp
	$(CXX) -shared -c $(libflext_d_la_CXXFLAGS) $< -o $@

install-exec-local: 
	$(libLIBRARIES_INSTALL) $(libflext_la_NAME) $(DESTDIR)$(libdir)
	$(libLIBRARIES_INSTALL) $(libflext_d_la_NAME) $(DESTDIR)$(libdir)
Index: flsimd.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsimd.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** flsimd.cpp	21 Jun 2004 13:58:19 -0000	1.13
--- flsimd.cpp	26 Oct 2004 20:03:37 -0000	1.14
***************
*** 36,40 ****
          #include <emmintrin.h> // SSE2
          #include <mm3dnow.h> // 3DNow!
!     #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__ALTIVEC__)
          #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
              #include <sys/sysctl.h> 
--- 36,40 ----
          #include <emmintrin.h> // SSE2
          #include <mm3dnow.h> // 3DNow!
!     #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__VEC__)
          #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
              #include <sys/sysctl.h> 
***************
*** 48,52 ****
          #include <altivec.h>
          #include <vectorOps.h>
!     #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__ALTIVEC__)
          #include <sys/sysctl.h> 
          #include <vecLib/vecLib.h>
--- 48,52 ----
          #include <altivec.h>
          #include <vectorOps.h>
!     #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__VEC__)
          #include <sys/sysctl.h> 
          #include <vecLib/vecLib.h>
***************
*** 273,277 ****
      if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2;
  #elif FLEXT_CPU == FLEXT_CPU_PPC 
- 
      #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
  
--- 273,276 ----
***************
*** 298,302 ****
  
  
! #if FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
  
  /* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */
--- 297,301 ----
  
  
! #if FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
  
  /* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */
***************
*** 387,392 ****
          }
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0) {
!             if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
                  // aligned src, aligned dst
                  __asm {
--- 386,391 ----
          }
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0) {
!             if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
                  // aligned src, aligned dst
                  __asm {
***************
*** 436,440 ****
          }
          else {
!             if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
                  // unaligned src, aligned dst
                  __asm {
--- 435,439 ----
          }
          else {
!             if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
                  // unaligned src, aligned dst
                  __asm {
***************
*** 510,514 ****
  }
  
! #if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
  // because of some frame code Altivec stuff should be in seperate functions....
  
--- 509,513 ----
  }
  
! #if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
  // because of some frame code Altivec stuff should be in seperate functions....
  
***************
*** 684,688 ****
          }
  
!         if((reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0) {
              // aligned version
              __asm {
--- 683,687 ----
          }
  
!         if((reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0) {
              // aligned version
              __asm {
***************
*** 718,722 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst)) 
          SetAltivec(dst,cnt,s);
--- 717,721 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst)) 
          SetAltivec(dst,cnt,s);
***************
*** 770,775 ****
          }
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
--- 769,774 ----
          }
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
***************
*** 843,847 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          MulAltivec(dst,src,op,cnt);
--- 842,846 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          MulAltivec(dst,src,op,cnt);
***************
*** 906,913 ****
          }
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
          ) {
!             if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,[n]
--- 905,912 ----
          }
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
          ) {
!             if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,[n]
***************
*** 987,991 ****
          }
          else {
!             if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,[n]
--- 986,990 ----
          }
          else {
!             if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,[n]
***************
*** 1073,1077 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) 
          MulAltivec(dst,src,op,cnt);
--- 1072,1076 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) 
          MulAltivec(dst,src,op,cnt);
***************
*** 1136,1141 ****
          }
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
--- 1135,1140 ----
          }
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
***************
*** 1203,1207 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          AddAltivec(dst,src,op,cnt);
--- 1202,1206 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          AddAltivec(dst,src,op,cnt);
***************
*** 1265,1272 ****
          cnt -= n<<4;
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
          ) {
!             if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,dword ptr [n]
--- 1264,1271 ----
          cnt -= n<<4;
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
          ) {
!             if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,dword ptr [n]
***************
*** 1346,1350 ****
          }
          else {
!             if((reinterpret_cast<unsigned long>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,dword ptr [n]
--- 1345,1349 ----
          }
          else {
!             if((reinterpret_cast<size_t>(op)&(__alignof(__m128)-1)) == 0) {
                  __asm {
                      mov     ecx,dword ptr [n]
***************
*** 1431,1435 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
          AddAltivec(dst,src,op,cnt);
--- 1430,1434 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
          AddAltivec(dst,src,op,cnt);
***************
*** 1498,1503 ****
          }
  
!         if((reinterpret_cast<unsigned long>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<unsigned long>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
--- 1497,1502 ----
          }
  
!         if((reinterpret_cast<size_t>(src)&(__alignof(__m128)-1)) == 0
!             && (reinterpret_cast<size_t>(dst)&(__alignof(__m128)-1)) == 0
          ) {
              // aligned version
***************
*** 1573,1577 ****
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          ScaleAltivec(dst,src,opmul,opadd,cnt);
--- 1572,1576 ----
      }
      else
! #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
      if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) 
          ScaleAltivec(dst,src,opmul,opadd,cnt);

Index: flmap.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flmap.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** flmap.h	11 Aug 2004 04:04:25 -0000	1.3
--- flmap.h	26 Oct 2004 20:03:37 -0000	1.4
***************
*** 22,37 ****
  */
  
  //! Base class for maps
  class AnyMap:
!     public std::map<unsigned int,unsigned int>
  {
!     typedef std::map<unsigned int,unsigned int> Parent;
  public:
      AnyMap();
      ~AnyMap();
!     iterator find(unsigned int k);
!     unsigned int &operator [](unsigned int k);
  
!     typedef std::pair<unsigned int,unsigned int> pair;
  };
  
--- 22,40 ----
  */
  
+ //! Key/Value type for AnyMap... must have size of pointer!
+ typedef size_t AnyMapType;
+ 
  //! Base class for maps
  class AnyMap:
!     public std::map<AnyMapType,AnyMapType>
  {
!     typedef std::map<AnyMapType,AnyMapType> Parent;
  public:
      AnyMap();
      ~AnyMap();
!     iterator find(AnyMapType k);
!     AnyMapType &operator [](AnyMapType k);
  
!     typedef std::pair<AnyMapType,AnyMapType> pair;
  };
  
***************
*** 67,73 ****
  	};
  
!     inline iterator find(K k) { return AnyMap::find(*(unsigned int *)&k); }
!     inline T &operator [](K k) { return *(T *)&(AnyMap::operator [](*(unsigned int *)&k)); }
!     inline void erase(K k) { AnyMap::erase(*(unsigned int *)&k); }
  };
  
--- 70,76 ----
  	};
  
!     inline iterator find(K k) { return AnyMap::find(*(AnyMapType *)&k); }
!     inline T &operator [](K k) { return *(T *)&(AnyMap::operator [](*(AnyMapType *)&k)); }
!     inline void erase(K k) { AnyMap::erase(*(AnyMapType *)&k); }
  };
  

Index: flxlet.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flxlet.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** flxlet.cpp	21 Jun 2004 13:58:20 -0000	1.6
--- flxlet.cpp	26 Oct 2004 20:03:50 -0000	1.7
***************
*** 23,27 ****
  { 
      if(d) {
!         int ln = strlen(d);
          desc = new char[ln+1];
          memcpy(desc,d,ln);
--- 23,27 ----
  { 
      if(d) {
!         size_t ln = strlen(d);
          desc = new char[ln+1];
          memcpy(desc,d,ln);
***************
*** 54,58 ****
      if(xi) {
          if(xi->desc) delete[] xi->desc;
!         int ln = strlen(d);
          xi->desc = new char[ln+1];
          memcpy(xi->desc,d,ln);
--- 54,58 ----
      if(xi) {
          if(xi->desc) delete[] xi->desc;
!         size_t ln = strlen(d);
          xi->desc = new char[ln+1];
          memcpy(xi->desc,d,ln);

Index: flext.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flext.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** flext.h	26 Sep 2004 22:55:15 -0000	1.22
--- flext.h	26 Oct 2004 20:03:36 -0000	1.23
***************
*** 24,31 ****
  
  //! \brief flext version number
! #define FLEXT_VERSION 407
  
  //! \brief flext version string
! #define FLEXT_VERSTR "0.4.7"
  
  //! @}
--- 24,31 ----
  
  //! \brief flext version number
! #define FLEXT_VERSION 408
  
  //! \brief flext version string
! #define FLEXT_VERSTR "0.4.8pre"
  
  //! @}

Index: flsupport.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** flsupport.cpp	23 Aug 2004 02:33:17 -0000	1.39
--- flsupport.cpp	26 Oct 2004 20:03:38 -0000	1.40
***************
*** 169,173 ****
  {
  	const size_t ovh = sizeof(size_t)+sizeof(char *);
! 	const unsigned long alignovh = bitalign/8-1;
  	bytes += ovh+alignovh;
  
--- 169,173 ----
  {
  	const size_t ovh = sizeof(size_t)+sizeof(char *);
! 	const size_t alignovh = bitalign/8-1;
  	bytes += ovh+alignovh;
  
***************
*** 196,200 ****
  	FLEXT_ASSERT(blk);
  
! 	char *ablk = reinterpret_cast<char *>((reinterpret_cast<unsigned long>(blk)+ovh+alignovh) & ~alignovh);
  	*(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk;
  	*(size_t *)(ablk-sizeof(size_t)) = bytes;
--- 196,200 ----
  	FLEXT_ASSERT(blk);
  
! 	char *ablk = reinterpret_cast<char *>((reinterpret_cast<size_t>(blk)+ovh+alignovh) & ~alignovh);
  	*(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk;
  	*(size_t *)(ablk-sizeof(size_t)) = bytes;
***************
*** 237,241 ****
      \todo size checking
  */
! void flext::GetAString(const t_atom &a,char *buf,int szbuf)
  { 
  #if FLEXT_SYS == FLEXT_SYS_PD
--- 237,241 ----
      \todo size checking
  */
! void flext::GetAString(const t_atom &a,char *buf,size_t szbuf)
  { 
  #if FLEXT_SYS == FLEXT_SYS_PD
***************
*** 288,291 ****
  AnyMap::AnyMap() {}
  AnyMap::~AnyMap() {}
! AnyMap::iterator AnyMap::find(unsigned int k) { return Parent::find(k); }
! unsigned int &AnyMap::operator [](unsigned int k) { return Parent::operator [](k); }
--- 288,291 ----
  AnyMap::AnyMap() {}
  AnyMap::~AnyMap() {}
! AnyMap::iterator AnyMap::find(AnyMapType k) { return Parent::find(k); }
! AnyMapType &AnyMap::operator [](AnyMapType k) { return Parent::operator [](k); }

Index: flsupport.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flsupport.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** flsupport.h	23 Aug 2004 02:33:17 -0000	1.70
--- flsupport.h	26 Oct 2004 20:03:38 -0000	1.71
***************
*** 65,69 ****
  		//! Test for alignment
  		static bool IsAligned(void *ptr,int bitalign = 128)	{ 
!             return (reinterpret_cast<unsigned long>(ptr)&(bitalign-1)) == 0; 
          }
  	//!	@}  FLEXT_S_MEMORY  	
--- 65,69 ----
  		//! Test for alignment
  		static bool IsAligned(void *ptr,int bitalign = 128)	{ 
!             return (reinterpret_cast<size_t>(ptr)&(bitalign-1)) == 0; 
          }
  	//!	@}  FLEXT_S_MEMORY  	
***************
*** 257,261 ****
  
  	//! Print an atom
! 	static bool PrintAtom(const t_atom &a,char *buf,int bufsz);
  	//! Scan an atom
  	static bool ScanAtom(t_atom &a,const char *buf);
--- 257,261 ----
  
  	//! Print an atom
! 	static bool PrintAtom(const t_atom &a,char *buf,size_t bufsz);
  	//! Scan an atom
  	static bool ScanAtom(t_atom &a,const char *buf);
***************
*** 264,268 ****
  	static t_atom *CopyList(int argc,const t_atom *argv);
  	//! Print an atom list
! 	static bool PrintList(int argc,const t_atom *argv,char *buf,int bufsz);
  
  	//! Copy a memory region
--- 264,268 ----
  	static t_atom *CopyList(int argc,const t_atom *argv);
  	//! Print an atom list
! 	static bool PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz);
  
  	//! Copy a memory region
***************
*** 413,417 ****
  	static const char *GetString(const t_atom &a) { t_symbol *s = GetSymbol(a); return s?GetString(s):NULL; }  
  	//! Check for a string and get its value 
! 	static void GetAString(const t_atom &a,char *buf,int szbuf);
  	//! Set the atom to represent a string
  	static void SetString(t_atom &a,const char *c) { SetSymbol(a,MakeSymbol(c)); }
--- 413,417 ----
  	static const char *GetString(const t_atom &a) { t_symbol *s = GetSymbol(a); return s?GetString(s):NULL; }  
  	//! Check for a string and get its value 
! 	static void GetAString(const t_atom &a,char *buf,size_t szbuf);
  	//! Set the atom to represent a string
  	static void SetString(t_atom &a,const char *c) { SetSymbol(a,MakeSymbol(c)); }

Index: flatom_pr.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/flext/source/flatom_pr.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** flatom_pr.cpp	18 Sep 2004 04:00:29 -0000	1.19
--- flatom_pr.cpp	26 Oct 2004 20:03:36 -0000	1.20
***************
*** 24,28 ****
  
  // \TODO take bufsz into account!
! bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz)
  {
      bool ok = true;
--- 24,28 ----
  
  // \TODO take bufsz into account!
! bool flext::PrintAtom(const t_atom &a,char *buf,size_t bufsz)
  {
      bool ok = true;
***************
*** 38,42 ****
          else {
              const char *c = GetString(a);
!             int len = strlen(c);
              if(len < bufsz) {
                  memcpy(buf,c,len); buf[len] = 0;
--- 38,42 ----
          else {
              const char *c = GetString(a);
!             size_t len = strlen(c);
              if(len < bufsz) {
                  memcpy(buf,c,len); buf[len] = 0;
***************
*** 71,75 ****
  }
  
! bool flext::PrintList(int argc,const t_atom *argv,char *buf,int bufsz)
  {
      bool ok = true;
--- 71,75 ----
  }
  
! bool flext::PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz)
  {
      bool ok = true;
***************
*** 78,82 ****
  
          if(PrintAtom(argv[i],buf,bufsz)) {
!             int len = strlen(buf);
              buf += len,bufsz -= len;
          }
--- 78,82 ----
  
          if(PrintAtom(argv[i],buf,bufsz)) {
!             size_t len = strlen(buf);
              buf += len,bufsz -= len;
          }





More information about the Pd-cvs mailing list