亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? splash.h

?? SPLASH is a c++ class library that implements many of the Perl constructs and data types, including
?? H
?? 第 1 頁 / 共 2 頁
字號:
// Implementation of template functions for splistbase
//************************************************************

template <class T>
INLINE T& SPListBase<T>::operator[](const int i)
{
    assert((i >= 0) && (first >= 0) && ((first+cnt) <= allocated));
    int indx= first+i;
        
    if(indx >= allocated){  // need to grow it
	grow((indx-allocated)+allocinc, i+1); // index as yet unused element
	indx= first+i;			  // first will have changed in grow()
    }
    assert(indx >= 0 && indx < allocated);

    if(i >= cnt) cnt= i+1;  // it grew
    return a[indx];
}

template <class T>
INLINE const T& SPListBase<T>::operator[](const int i) const
{
     assert((i >= 0) && (i < cnt));
     return a[first+i];
}

template <class T>
SPListBase<T>::SPListBase(const SPListBase<T>& n)
{
    allocated= n.allocated;
    allocinc= n.allocinc;
    cnt= n.cnt;
    first= n.first;
    a= new T[allocated];
    for(int i=0;i<cnt;i++) a[first+i]= n.a[first+i];
#ifdef	DEBUG
    fprintf(stderr, "SPListBase(SPListBase&) a= %p, source= %p\n", a, n.a);
#endif

}

template <class T>
SPListBase<T>& SPListBase<T>::operator=(const SPListBase<T>& n){
//  cout << "SPListBase<T>::operator=()" << endl;
    if(this == &n) return *this;
#ifdef	DEBUG
    fprintf(stderr, "~operator=(SPListBase&) a= %p\n", a);
#endif
    delete [] a; // get rid of old one
    allocated= n.allocated;
    allocinc= n.allocinc;
    cnt= n.cnt;
    first= n.first;
    a= new T[allocated];
    for(int i=0;i<cnt;i++) a[first+i]= n.a[first+i];
#ifdef	DEBUG
    fprintf(stderr, "operator=(SPListBase&) a= %p, source= %p\n", a, n.a);
#endif
    return *this;
}
/* 
** increase size of array, default means array only needs
** to grow by at least 1 either at the end or start
** First tries to re-center the first pointer
** Then will increment the array by the inc amount
*/
template <class T>
void SPListBase<T>::grow(int amnt, int newcnt){
int newfirst;
    
    if(amnt <= 0){ // only needs to grow by 1
        newfirst= (allocated>>1) - (cnt>>1); // recenter first
        if(newfirst > 0 && (newfirst+cnt+1) < allocated){ // this is all we need to do
            for(int i=0;i<cnt;i++){ // move rest up or down
                int idx= (first > newfirst) ? i : cnt-1-i;
                a[newfirst+idx]= a[first+idx];
	    }
#ifdef DEBUG
            fprintf(stderr, "SPListBase::grow() moved a= %p, first= %d, newfirst= %d, amnt= %d, cnt= %d, allocated= %d\n",
                    a, first, newfirst, amnt, cnt, allocated);
#endif
           first= newfirst;
           return;
        }
    }

    // that wasn't enough, so allocate more space
    if(amnt <= 0) amnt= allocinc; // default value
    if(newcnt < 0) newcnt= cnt;   // default
    allocated += amnt;
    T *tmp= new T[allocated];
    newfirst= (allocated>>1) - (newcnt>>1);
    for(int i=0;i<cnt;i++) tmp[newfirst+i]= a[first+i];
#ifdef	DEBUG
    fprintf(stderr, "SPListBase::grow() a= %p, old= %p, allocinc= %d, first= %d, amnt= %d, cnt= %d, allocated= %d\n",
            tmp, a, allocinc, first, amnt, cnt, allocated);
    fprintf(stderr, "~SPListBase::grow() a= %p\n", a);
#endif
    delete [] a;
    a= tmp;
    first= newfirst;
}

template <class T>
void SPListBase<T>::add(const T& n){
    if(cnt+first >= allocated) grow();
    assert((cnt+first) < allocated);
    a[first+cnt]= n;
#ifdef DEBUG
    fprintf(stderr, "add(const T& n): first= %d, cnt= %d, idx= %d, allocated= %d\n",
                first, cnt, first+cnt, allocated);
#endif
    cnt++;
}

template <class T>
void SPListBase<T>::add(const int ip, const T& n){
    assert(ip >= 0 && ip <= cnt);
    if(ip == 0){ // just stick it on the bottom
    	if(first <= 0) grow(); // make room at bottom for one more
    	assert(first > 0);
        first--;
        a[first]= n;
    }else{
        if((first+cnt+1) >= allocated) grow(); // make room at top for one more
        assert((first+cnt) < allocated && (first+ip) < allocated);
        for(int i=cnt;i>ip;i--) // shuffle up
	    a[first+i]= a[(first+i)-1];
        a[first+ip]= n;
    }
#ifdef DEBUG
    fprintf(stderr, "add(const int ip, const T& n): first= %d, cnt= %d, idx= %d, allocated= %d\n",
                first, cnt, first+ip, allocated);
#endif
    cnt++;
}

template <class T>
void SPListBase<T>::compact(const int n){ // shuffle down starting at n
int i;
    assert((n >= 0) && (n < cnt));
    if(n == 0) first++;
    else for(i=n;i<cnt-1;i++){
	    a[first+i]= a[(first+i)+1];
    }
    cnt--;
}

//************************************************************
// implementation of template functions for SPList
//************************************************************
template <class T>
T SPList<T>::pop(void)
{
T tmp;
int n= count()-1;
    if(n >= 0){
	tmp= (*this)[n];
	compact(n);
    }
    return tmp;
}

template <class T>
T SPList<T>::shift(void)
{
T tmp= (*this)[0];
    compact(0);
    return tmp;
}

template <class T>
void SPList<T>::push(const SPList<T>& l)
{
    for(int i=0;i<l.count();i++)
	add(l[i]);
}

template <class T>
int SPList<T>::unshift(const SPList<T>& l)
{
    for(int i=l.count()-1;i>=0;i--)
	unshift(l[i]);
    return count();
}

template <class T>
SPList<T> SPList<T>::reverse(void)
{
    SPList<T> tmp;
    for(int i=count()-1;i>=0;i--)
	tmp.add((*this)[i]);
    
    return tmp;	
}

template <class T>
SPList<T> SPList<T>::sort(void)
{
SPList<T> tmp(*this);
int n= tmp.scalar();

    for(int i=0;i<n-1;i++)
	for(int j=n-1;i<j;j--)
	    if(tmp[j] < tmp[j-1]){
		T temp = tmp[j];
		tmp[j] = tmp[j-1];
		tmp[j-1]= temp;
	    }
    
    return tmp;	
}

template <class T>
SPList<T> SPList<T>::splice(int offset, int len, const SPList<T>& l)
{
SPList<T> r= splice(offset, len);

    if(offset > count()) offset= count();
    for(int i=0;i<l.count();i++){
	add(offset+i, l[i]);	// insert into list
    }
    return r;
}

template <class T>
SPList<T>  SPList<T>::splice(int offset, int len)
{
SPList<T> r;

    if(offset >= count()) return r;
    for(int i=offset;i<offset+len;i++){
    	r.add((*this)[i]);
    }

    for(i=offset;i<offset+len;i++)
	compact(offset);
    return r;
}

template <class T>
SPList<T>  SPList<T>::splice(int offset)
{
SPList<T> r;

    if(offset >= count()) return r;
    for(int i=offset;i<count();i++){
	r.add((*this)[i]);
    }

    int n= count(); // count() will change so remember what it is
    for(i=offset;i<n;i++)
	compact(offset);
    return r;
}

template <class T>
SubList<T> SPList<T>::operator()(const char *s)
{
    return SubList<T>(*this, Slice(s));
}
//************************************************************
// VarString Implementation
//************************************************************

INLINE VarString::VarString(int n)
{
    a= new char[n];
    *a= '\0';
    len= 0;
    allocated= n;
    allocinc= n;
#   ifdef	DEBUG
    fprintf(stderr, "VarString(int %d) a= %p\n", allocinc, a);
#   endif
}

INLINE VarString::VarString(const char* s)
{
    int n= strlen(s) + 1;
    a= new char[n];
    strcpy(a, s);
    len= n-1;
    allocated= n;
    allocinc= ALLOCINC;
#   ifdef	DEBUG
    fprintf(stderr, "VarString(const char *(%d)) a= %p\n", allocinc, a);
#   endif
}

INLINE VarString::VarString(const char* s, int n)
{
    a= new char[n+1];
    if(n) strncpy(a, s, n);
    a[n]= '\0';
    len= n;
    allocated= n+1;
    allocinc= ALLOCINC;
#   ifdef	DEBUG
    fprintf(stderr, "VarString(const char *, int(%d)) a= %p\n", allocinc, a);
#   endif
}

INLINE VarString::VarString(char c)
{
    int n= 2;
    a= new char[n];
    a[0]= c; a[1]= '\0';
    len= 1;
    allocated= n;
    allocinc= ALLOCINC;
#   ifdef	DEBUG
    fprintf(stderr, "VarString(char (%d)) a= %p\n", allocinc, a);
#   endif
}


INLINE ostream& operator<<(ostream& os,  const VarString& arr)
{
#ifdef TEST
    os << "(" << arr.length() << ")" << (const char *)arr;
#else
    os << (const char *)arr;
#endif
	
    return os;    
}

INLINE const char VarString::operator[](const int i) const
{
     assert((i >= 0) && (i < len) && (a[len] == '\0'));
     return a[i];
}

INLINE char& VarString::operator[](const int i)
{
     assert((i >= 0) && (i < len) && (a[len] == '\0'));
     return a[i];
}

INLINE VarString::VarString(const VarString& n)
{
    allocated= n.allocated;
    allocinc= n.allocinc;
    len= n.len;
    a= new char[allocated];
    strcpy(a, n.a);
#ifdef	DEBUG
    fprintf(stderr, "VarString(VarString&) a= %p, source= %p\n", a, n.a);
#endif

}

//************************************************************
// Sublist and Slice stuff
//************************************************************

template <class T>
SubList<T>::SubList(SPList<T>& lst, const Slice& slc) : l(lst)
{
    sl= new Slice(slc);
}

template <class T>
SubList<T>::SubList(SPList<T>& lst, int st, int len) : l(lst)
{
    sl= new Slice(Range(st, st+len-1));
}

template <class T>
SubList<T>::SubList(SPList<T>& lst, const Range& r) : l(lst)
{
    sl= new Slice(r);
}

template <class T>
SubList<T>::~SubList()
{
    delete sl;
}

template <class T>
SubList<T>& SubList<T>::operator=(const SPList<T>& lst)
{
int n= 0;
    for(int i=0;i<sl->count();i++){
	for(int j=(*sl)[i].start();j<=(*sl)[i].end();j++){
            if(n < lst.count()) l[j]= lst[n++];
        }
    }        
    return *this;
}

template <class T>
SPList<T>::SPList(const SubList<T>& sbl)
{
    for(int i=0;i<sbl.sl->count();i++){
	for(int j=(*sbl.sl)[i].start();j<=(*sbl.sl)[i].end();j++)
	    (*this).push(sbl.l[j]);
    }
}

//************************************************************
// Slice inline stuff
//************************************************************

inline Slice::Slice(const Range& r)
{
    rl= new SPList<Range>;
    rl->push(r);
}

inline Slice::Slice()
{
    rl= new SPList<Range>;
}

inline Slice::Slice(const Slice& slc)
{
    rl= new SPList<Range>(*slc.rl);    
}


inline Slice::~Slice()
{
    delete rl;
}
     
inline int Slice::count(void) const
{
    return rl->count();
}

inline const Range& Slice::operator[](int i) const
{
    return (*rl)[i];
}


// For Old-timers compatibility
typedef SPStringList PerlStringList;
typedef SPString PerlString;
#define PerlList SPList
#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美大片一区二区三区| 成人在线视频首页| 91精品国产一区二区| 日韩中文字幕麻豆| 日韩精品一区二区三区三区免费 | 激情综合网激情| 国产网红主播福利一区二区| 大胆欧美人体老妇| 亚洲桃色在线一区| 欧美私人免费视频| 麻豆精品一区二区| 欧美激情在线一区二区三区| 91在线无精精品入口| 午夜视频久久久久久| 欧美大片在线观看一区二区| 国产精品一区二区三区99| 亚洲欧洲国产专区| 欧美日韩免费观看一区二区三区| 麻豆久久一区二区| 中文字幕 久热精品 视频在线| 色婷婷精品大在线视频| 免费精品视频最新在线| 国产精品视频一二三区| 欧美三级电影精品| 国产精品亚洲成人| 亚洲妇女屁股眼交7| 久久久91精品国产一区二区三区| 色偷偷成人一区二区三区91| 久久综合综合久久综合| 综合色中文字幕| 精品美女一区二区| 日本精品免费观看高清观看| 美女视频一区二区| 亚洲精品成人天堂一二三| 精品欧美一区二区在线观看| 色婷婷精品大在线视频| 国产剧情一区二区| 日韩和欧美一区二区| 中文字幕在线不卡视频| 精品动漫一区二区三区在线观看 | 一本色道久久综合狠狠躁的推荐| 奇米精品一区二区三区在线观看| 亚洲欧洲日韩综合一区二区| 欧美不卡在线视频| 欧美色大人视频| 99在线热播精品免费| 国产麻豆一精品一av一免费| 无吗不卡中文字幕| 亚洲免费观看高清完整版在线 | 欧美日韩日日骚| 成人妖精视频yjsp地址| 麻豆精品一二三| 午夜视黄欧洲亚洲| 亚洲欧美一区二区三区国产精品| 久久久久久久久久电影| 日韩小视频在线观看专区| 欧美刺激脚交jootjob| 色婷婷综合视频在线观看| 成人av网站免费| 国产一区在线不卡| 久久99蜜桃精品| 日本亚洲三级在线| 日韩影院精彩在线| 亚洲va欧美va人人爽| 亚洲精品精品亚洲| 亚洲人成网站在线| 亚洲啪啪综合av一区二区三区| 中文字幕第一页久久| 国产日韩欧美综合在线| 久久久久久久久久久久久女国产乱 | 欧美日韩视频专区在线播放| 91在线视频免费观看| 成人免费视频app| 丁香网亚洲国际| 成人免费av资源| 成人av在线播放网址| www.欧美日韩国产在线| 白白色亚洲国产精品| 色综合久久综合中文综合网| 一本色道久久综合狠狠躁的推荐 | 国产中文字幕精品| 韩国女主播一区| 国产福利一区二区三区视频| 国产精品亚洲第一区在线暖暖韩国| 国内成人免费视频| 成人手机在线视频| 色哟哟国产精品| 欧美性色黄大片| 88在线观看91蜜桃国自产| 7777精品伊人久久久大香线蕉 | 亚洲人成人一区二区在线观看| 国产精品对白交换视频| 亚洲综合在线免费观看| 亚洲成av人片在线| 久久激情五月激情| 国产a级毛片一区| 色婷婷av久久久久久久| 欧美日本在线一区| 久久尤物电影视频在线观看| 国产欧美在线观看一区| 亚洲男同性恋视频| 男女男精品视频| 国产精品一区三区| 91女神在线视频| 欧美一区二区精美| 欧美国产禁国产网站cc| 一区二区三区在线视频观看58 | 亚洲欧美韩国综合色| 亚洲国产精品久久艾草纯爱| 久久99最新地址| 一本到高清视频免费精品| 久久久久久久久久久久电影| 国产精品毛片高清在线完整版| 亚洲国产日韩a在线播放性色| 麻豆成人久久精品二区三区小说| 国产成人精品亚洲777人妖| 日本精品一级二级| 久久久久久久久99精品| 亚洲国产综合人成综合网站| 国产一区二区三区在线观看免费视频 | 7777精品伊人久久久大香线蕉经典版下载 | 色综合久久天天| 日韩一区二区三区av| 自拍偷拍欧美精品| 毛片av一区二区三区| 色乱码一区二区三区88| www成人在线观看| 亚洲高清在线精品| 成人sese在线| 精品国产乱子伦一区| 亚洲一区精品在线| 成人一级视频在线观看| 精品少妇一区二区三区免费观看| 亚洲乱码国产乱码精品精小说| 国产在线播放一区| 91精品国产综合久久久蜜臀图片| 国产精品久久免费看| 国内外成人在线| 91精品国产麻豆国产自产在线| 亚洲欧美视频在线观看| 国产suv一区二区三区88区| 欧美不卡激情三级在线观看| 亚洲夂夂婷婷色拍ww47| 99久久精品久久久久久清纯| 精品sm在线观看| 免费久久精品视频| 欧美精品777| 亚洲一区二区不卡免费| 色婷婷亚洲婷婷| 亚洲天堂免费看| 成人精品在线视频观看| 久久理论电影网| 久久成人免费网站| 91 com成人网| 日韩电影在线观看网站| 欧美日韩精品一区二区| 亚洲一区二区综合| 欧美最猛黑人xxxxx猛交| 成人欧美一区二区三区小说| 成人一级视频在线观看| 亚洲二区在线观看| 欧美亚洲精品一区| 亚洲一区视频在线| 欧美日韩一区二区三区四区| 亚洲一区二区三区影院| 欧洲另类一二三四区| 亚洲精品视频在线看| 色悠悠亚洲一区二区| 一区二区在线观看免费视频播放| 色综合中文字幕国产| 日本一区二区三区久久久久久久久不| 国产麻豆成人传媒免费观看| 久久色视频免费观看| 国产丶欧美丶日本不卡视频| 国产精品网站在线播放| av亚洲精华国产精华精| 亚洲精品免费在线观看| 精品视频1区2区3区| 日日夜夜精品免费视频| 日韩你懂的在线播放| 国产美女精品一区二区三区| 国产精品欧美久久久久无广告| 成人a免费在线看| 一区二区三区欧美日韩| 欧美三级中文字幕| 六月丁香婷婷色狠狠久久| 久久午夜老司机| 91美女片黄在线观看91美女| 一区二区三区成人| 日韩欧美国产一二三区| 国产精品自拍毛片| 综合久久久久久久| 欧美久久久久免费| 国产精品自在在线| 亚洲女爱视频在线| 日韩三级视频中文字幕| 懂色av一区二区三区免费看| 亚洲一区二区四区蜜桃| 日韩午夜在线观看视频| 不卡视频免费播放|