Commit dce23afc authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@300 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 4c1c21c1
......@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "pd-msvc\s"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /YX /FD /c
# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "NOPTHREAD" /YX /FD /c
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
# ADD RSC /l 0xc07 /d "NDEBUG"
BSC32=bscmake.exe
......@@ -66,7 +66,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "pd-msvc\sd"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /FR /YX /FD /GZ /c
# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "NOPTHREAD" /FR /YX /FD /GZ /c
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe
......
......@@ -76,23 +76,23 @@ flext_base::AtomList &flext_base::AtomList::Append(const t_atom &a)
for(int i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]);
SetAtom(nlst[cnt],a);
lst = nlst;
if(lst) delete[] lst;
lst = nlst;
++cnt;
delete[] lst;
return *this;
}
flext_base::AtomList &flext_base::AtomList::Append(const AtomList &a)
flext_base::AtomList &flext_base::AtomList::Append(int argc,const t_atom *argv)
{
t_atom *nlst = new t_atom[cnt+a.Count()];
t_atom *nlst = new t_atom[cnt+argc];
int i;
for(i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]);
for(i = 0; i < a.Count(); ++i) SetAtom(nlst[cnt+i],a.Atoms()[i]);
for(i = 0; i < argc; ++i) SetAtom(nlst[cnt+i],argv[i]);
if(lst) delete[] lst;
lst = nlst;
cnt += a.Count();
delete[] lst;
cnt += argc;
return *this;
}
......@@ -103,24 +103,34 @@ flext_base::AtomList &flext_base::AtomList::Prepend(const t_atom &a)
for(int i = 0; i < cnt; ++i) SetAtom(nlst[i+1],lst[i]);
SetAtom(nlst[0],a);
if(lst) delete[] lst;
lst = nlst;
++cnt;
delete[] lst;
return *this;
}
flext_base::AtomList &flext_base::AtomList::Prepend(const AtomList &a)
flext_base::AtomList &flext_base::AtomList::Prepend(int argc,const t_atom *argv)
{
t_atom *nlst = new t_atom[cnt+a.Count()];
t_atom *nlst = new t_atom[cnt+argc];
int i;
for(i = 0; i < a.Count(); ++i) SetAtom(nlst[i],a.Atoms()[i]);
for(i = 0; i < cnt; ++i) SetAtom(nlst[a.Count()+i],lst[i]);
for(i = 0; i < argc; ++i) SetAtom(nlst[i],argv[i]);
for(i = 0; i < cnt; ++i) SetAtom(nlst[argc+i],lst[i]);
if(lst) delete[] lst;
lst = nlst;
cnt += a.Count();
delete[] lst;
cnt += argc;
return *this;
}
flext_base::AtomList flext_base::AtomList::GetPart(int offs,int len) const
{
if(offs+len > Count()) {
len = Count()-offs;
if(len < 0) len = 0;
}
return AtomList(len,Atoms()+offs);
}
......@@ -630,11 +630,20 @@ public:
//! Append an atom to the list
AtomList &Append(const t_atom &a);
//! Append an atom list to the list
AtomList &Append(const AtomList &a);
AtomList &Append(int argc,const t_atom *argv);
//! Append an atom list to the list
AtomList &Append(const AtomList &a) { return Append(a.Count(),a.Atoms()); }
//! Prepend an atom to the list
AtomList &Prepend(const t_atom &a);
//! Prepend an atom list to the list
AtomList &Prepend(const AtomList &a);
AtomList &Prepend(int argc,const t_atom *argv);
//! Prepend an atom list to the list
AtomList &Prepend(const AtomList &a) { return Prepend(a.Count(),a.Atoms()); }
//! Get a part of the list
AtomList GetPart(int offs,int len) const;
//! Set to a part of the list
AtomList &Part(int offs,int len) { return (*this = GetPart(offs,len)); }
protected:
int cnt;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment