From c752987457f50c1adf5051e1fd8167a5637f1e34 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 26 Oct 2004 20:03:50 +0000 Subject: "" svn path=/trunk/; revision=2169 --- externals/grill/flext/source/Makefile.am | 116 +++++++++++++++++++++++++++++ externals/grill/flext/source/flatom_pr.cpp | 8 +- externals/grill/flext/source/flext.h | 4 +- externals/grill/flext/source/flmap.h | 19 +++-- externals/grill/flext/source/flsimd.cpp | 57 +++++++------- externals/grill/flext/source/flsupport.cpp | 10 +-- externals/grill/flext/source/flsupport.h | 8 +- externals/grill/flext/source/flxlet.cpp | 4 +- 8 files changed, 172 insertions(+), 54 deletions(-) create mode 100755 externals/grill/flext/source/Makefile.am (limited to 'externals/grill/flext/source') diff --git a/externals/grill/flext/source/Makefile.am b/externals/grill/flext/source/Makefile.am new file mode 100755 index 00000000..49f0b5f7 --- /dev/null +++ b/externals/grill/flext/source/Makefile.am @@ -0,0 +1,116 @@ +# +# 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.@SOEXT@ +libflext_d_la_NAME = libflext_d.@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) \ No newline at end of file diff --git a/externals/grill/flext/source/flatom_pr.cpp b/externals/grill/flext/source/flatom_pr.cpp index 5b15648a..cfc69266 100644 --- a/externals/grill/flext/source/flatom_pr.cpp +++ b/externals/grill/flext/source/flatom_pr.cpp @@ -23,7 +23,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #endif // \TODO take bufsz into account! -bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz) +bool flext::PrintAtom(const t_atom &a,char *buf,size_t bufsz) { bool ok = true; if(IsFloat(a)) { @@ -37,7 +37,7 @@ bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz) *buf = 0; else { const char *c = GetString(a); - int len = strlen(c); + size_t len = strlen(c); if(len < bufsz) { memcpy(buf,c,len); buf[len] = 0; ok = true; @@ -70,14 +70,14 @@ bool flext::PrintAtom(const t_atom &a,char *buf,int bufsz) return ok; } -bool flext::PrintList(int argc,const t_atom *argv,char *buf,int bufsz) +bool flext::PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz) { bool ok = true; for(int i = 0; ok && i < argc && bufsz > 0; ++i) { if(i) { *(buf++) = ' '; --bufsz; } // prepend space if(PrintAtom(argv[i],buf,bufsz)) { - int len = strlen(buf); + size_t len = strlen(buf); buf += len,bufsz -= len; } else diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h index 8d8f6e74..4dc3f421 100644 --- a/externals/grill/flext/source/flext.h +++ b/externals/grill/flext/source/flext.h @@ -23,10 +23,10 @@ WARRANTIES, see the file, "license.txt," in this distribution. */ //! \brief flext version number -#define FLEXT_VERSION 407 +#define FLEXT_VERSION 408 //! \brief flext version string -#define FLEXT_VERSTR "0.4.7" +#define FLEXT_VERSTR "0.4.8pre" //! @} diff --git a/externals/grill/flext/source/flmap.h b/externals/grill/flext/source/flmap.h index c20b5ade..64d4f565 100644 --- a/externals/grill/flext/source/flmap.h +++ b/externals/grill/flext/source/flmap.h @@ -21,18 +21,21 @@ WARRANTIES, see the file, "license.txt," in this distribution. @{ */ +//! Key/Value type for AnyMap... must have size of pointer! +typedef size_t AnyMapType; + //! Base class for maps class AnyMap: - public std::map + public std::map { - typedef std::map Parent; + typedef std::map Parent; public: AnyMap(); ~AnyMap(); - iterator find(unsigned int k); - unsigned int &operator [](unsigned int k); + iterator find(AnyMapType k); + AnyMapType &operator [](AnyMapType k); - typedef std::pair pair; + typedef std::pair pair; }; //! Specialized map class for any 32-bit key/value types @@ -66,9 +69,9 @@ public: inline T &data() const { return *(T *)&second; } }; - 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); } + 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); } }; //! @} // FLEXT_SUPPORT diff --git a/externals/grill/flext/source/flsimd.cpp b/externals/grill/flext/source/flsimd.cpp index d3487790..12cdba7c 100755 --- a/externals/grill/flext/source/flsimd.cpp +++ b/externals/grill/flext/source/flsimd.cpp @@ -35,7 +35,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include // SSE #include // SSE2 #include // 3DNow! - #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__ALTIVEC__) + #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__VEC__) #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH #include #include @@ -47,7 +47,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include #include - #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__ALTIVEC__) + #elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__VEC__) #include #include #endif @@ -272,7 +272,6 @@ static unsigned long setsimdcaps() if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse; if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2; #elif FLEXT_CPU == FLEXT_CPU_PPC - #if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH int selectors[2] = { CTL_HW, HW_VECTORUNIT }; @@ -297,7 +296,7 @@ static unsigned long setsimdcaps() } -#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) /* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */ @@ -386,8 +385,8 @@ void flext::CopySamples(t_sample *dst,const t_sample *src,int cnt) prefetcht0 [eax+32] } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0) { - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { // aligned src, aligned dst __asm { mov eax,dword ptr [src] @@ -435,7 +434,7 @@ loopau: } } else { - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { // unaligned src, aligned dst __asm { mov eax,dword ptr [src] @@ -509,7 +508,7 @@ zero: #endif } -#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) // because of some frame code Altivec stuff should be in seperate functions.... static const vector float zero = (vector float)(0); @@ -683,7 +682,7 @@ void flext::SetSamples(t_sample *dst,int cnt,t_sample s) shufps xmm0,xmm0,0 } - if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0) { // aligned version __asm { mov ecx,[n] @@ -717,7 +716,7 @@ zero: while(cnt--) *(dst++) = s; } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst)) SetAltivec(dst,cnt,s); else @@ -769,8 +768,8 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) shufps xmm0,xmm0,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 + && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 ) { // aligned version __asm { @@ -842,7 +841,7 @@ zero: vsmul(src,1,&op,dst,1,cnt); } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) MulAltivec(dst,src,op,cnt); else @@ -905,10 +904,10 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int prefetcht0 [ebx+32] } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 + && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 ) { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { __asm { mov ecx,[n] mov eax,dword ptr [src] @@ -986,7 +985,7 @@ void flext::MulSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } } else { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { __asm { mov ecx,[n] mov eax,dword ptr [src] @@ -1072,7 +1071,7 @@ zero: vmul(src,1,op,1,dst,1,cnt); } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) MulAltivec(dst,src,op,cnt); else @@ -1135,8 +1134,8 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,t_sample op,int cnt) shufps xmm0,xmm0,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 + && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 ) { // aligned version __asm { @@ -1202,7 +1201,7 @@ loopu: while(cnt--) *(dst++) = *(src++)+op; } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) AddAltivec(dst,src,op,cnt); else @@ -1264,10 +1263,10 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int int n = cnt>>4; cnt -= n<<4; - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 + && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 ) { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { __asm { mov ecx,dword ptr [n] mov eax,dword ptr [src] @@ -1345,7 +1344,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int } } else { - if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { + if((reinterpret_cast(op)&(__alignof(__m128)-1)) == 0) { __asm { mov ecx,dword ptr [n] mov eax,dword ptr [src] @@ -1430,7 +1429,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int vadd(src,1,op,1,dst,1,cnt); } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst)) AddAltivec(dst,src,op,cnt); else @@ -1497,8 +1496,8 @@ void flext::ScaleSamples(t_sample *dst,const t_sample *src,t_sample opmul,t_samp shufps xmm1,xmm1,0 } - if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 - && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 + if((reinterpret_cast(src)&(__alignof(__m128)-1)) == 0 + && (reinterpret_cast(dst)&(__alignof(__m128)-1)) == 0 ) { // aligned version __asm { @@ -1572,7 +1571,7 @@ loopu: while(cnt--) *(dst++) = *(src++)*opmul+opadd; } else -#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__) +#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__) if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst)) ScaleAltivec(dst,src,opmul,opadd,cnt); else diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index 85d9720d..b4c3d09f 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -168,7 +168,7 @@ void flext_root::operator delete(void *blk) void *flext_root::NewAligned(size_t bytes,int bitalign) { const size_t ovh = sizeof(size_t)+sizeof(char *); - const unsigned long alignovh = bitalign/8-1; + const size_t alignovh = bitalign/8-1; bytes += ovh+alignovh; char *blk; @@ -195,7 +195,7 @@ void *flext_root::NewAligned(size_t bytes,int bitalign) } FLEXT_ASSERT(blk); - char *ablk = reinterpret_cast((reinterpret_cast(blk)+ovh+alignovh) & ~alignovh); + char *ablk = reinterpret_cast((reinterpret_cast(blk)+ovh+alignovh) & ~alignovh); *(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk; *(size_t *)(ablk-sizeof(size_t)) = bytes; return ablk; @@ -236,7 +236,7 @@ void flext_root::FreeAligned(void *blk) /*! \todo there is probably also a shortcut for Max and jMax \todo size checking */ -void flext::GetAString(const t_atom &a,char *buf,int szbuf) +void flext::GetAString(const t_atom &a,char *buf,size_t szbuf) { #if FLEXT_SYS == FLEXT_SYS_PD atom_string(const_cast(&a),buf,szbuf); @@ -287,5 +287,5 @@ void flext_root::error(const char *fmt,...) 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); } +AnyMap::iterator AnyMap::find(AnyMapType k) { return Parent::find(k); } +AnyMapType &AnyMap::operator [](AnyMapType k) { return Parent::operator [](k); } diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h index d9f5b540..69848762 100644 --- a/externals/grill/flext/source/flsupport.h +++ b/externals/grill/flext/source/flsupport.h @@ -64,7 +64,7 @@ public: static void FreeAligned(void *blk); //! Test for alignment static bool IsAligned(void *ptr,int bitalign = 128) { - return (reinterpret_cast(ptr)&(bitalign-1)) == 0; + return (reinterpret_cast(ptr)&(bitalign-1)) == 0; } //! @} FLEXT_S_MEMORY }; @@ -256,14 +256,14 @@ public: static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; } //! Print an atom - static bool PrintAtom(const t_atom &a,char *buf,int bufsz); + static bool PrintAtom(const t_atom &a,char *buf,size_t bufsz); //! Scan an atom static bool ScanAtom(t_atom &a,const char *buf); //! Copy a list of atoms 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); + static bool PrintList(int argc,const t_atom *argv,char *buf,size_t bufsz); //! Copy a memory region static void CopyMem(void *dst,const void *src,int bytes); @@ -412,7 +412,7 @@ public: //! Access the string value (without type check) 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); + 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)); } diff --git a/externals/grill/flext/source/flxlet.cpp b/externals/grill/flext/source/flxlet.cpp index 1d57177c..f3afb207 100755 --- a/externals/grill/flext/source/flxlet.cpp +++ b/externals/grill/flext/source/flxlet.cpp @@ -22,7 +22,7 @@ flext_base::xlet::xlet(type t,const char *d): tp(t),nxt(NULL) { if(d) { - int ln = strlen(d); + size_t ln = strlen(d); desc = new char[ln+1]; memcpy(desc,d,ln); desc[ln] = 0; @@ -53,7 +53,7 @@ void flext_base::DescXlet(int ix,const char *d,xlet *&root) if(xi) { if(xi->desc) delete[] xi->desc; - int ln = strlen(d); + size_t ln = strlen(d); xi->desc = new char[ln+1]; memcpy(xi->desc,d,ln); xi->desc[ln] = 0; -- cgit v1.2.1