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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? splash.h

?? SPLASH is a c++ class library that implements many of the Perl constructs and data types, including
?? H
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Version 1.90
 * Written by Jim Morris,  morris@netcom.com
 * Kudos to Larry Wall for inventing Perl
 * Copyrights only exist on the regex stuff, and all have been left intact.
 * The only thing I ask is that you let me know of any nifty fixes or
 * additions.
 * 
 * Credits:
 * I'd like to thank Michael Golan <mg@Princeton.EDU> for his critiques
 * and clever suggestions. Some of which have actually been implemented
 */

#ifndef	_SPLASH_H
#define	_SPLASH_H

#include <string.h>
#include "regexp.h"

#ifdef	DEBUG
#include	<stdio.h>
#endif

#define	INLINE	inline

//************************************************************
// This is the base class for SPList, it handles the underlying
// dynamic array mechanism
//************************************************************

template<class T>
class SPListBase
{
private:
    enum{ALLOCINC=20};
    T *a;
    int cnt;
    int first;
    int allocated;
    int allocinc;
    void grow(int amnt= 0, int newcnt= -1);

protected:
    void compact(const int i);

public:
#ifdef	USLCOMPILER
    // USL 3.0 bug with enums losing the value
    SPListBase(int n= 20)
#else
    SPListBase(int n= ALLOCINC)
#endif
    {
	a= new T[n];
	cnt= 0;
        first= n>>1;
	allocated= n;
	allocinc= n;
#	ifdef	DEBUG
	fprintf(stderr, "SPListBase(int %d) a= %p, first= %d\n", allocinc, a, first);
#	endif
    }

    SPListBase(const SPListBase<T>& n);
    SPListBase<T>& SPListBase<T>::operator=(const SPListBase<T>& n);
    virtual ~SPListBase(){
#       ifdef	DEBUG
	fprintf(stderr, "~SPListBase() a= %p, allocinc= %d\n", a, allocinc);
#       endif
	delete [] a;
    }

    INLINE T& operator[](const int i);
    INLINE const T& operator[](const int i) const;

    int count(void) const{ return cnt; }

    void add(const T& n);
    void add(const int i, const T& n);
    void erase(void){ cnt= 0; first= (allocated>>1);}
};

// forward declarations
class SPStringList;
class Slice;
template <class T> class SPList;
template <class T> class SubList;

//************************************************************
// Slice class to keep track of, and create, slices
//************************************************************

#include <stdarg.h>
class Slice
{
private:
    SPList<Range> *rl;

public:
    inline Slice();
    Slice(const char *); // parse the string to get a slice
    Slice(int n, ...); // list of indices to add to slice
    inline Slice(const Slice& slc);
    inline Slice(const Range& r);
    inline ~Slice();
     
    inline int count(void) const;
    inline const Range& operator[](int i) const;
    void add(int i); // add one element to slice
    friend ostream& operator<<(ostream&, const Slice&);
};

//************************************************************
// Allows assignment to slices of a list
//************************************************************

template <class T>
class SubList
{
private:
    // This has to be a pointer because we don't know the size of Splice
    // and there is a nasty cyclic interdependency between the next 3 classes
    Slice *sl; // because we may want to use a temp in call T/O convenience with efficiency
    SPList<T>& l;

public:
    SubList(SPList<T>& lst, const Slice& slc);
    SubList(SPList<T>& lst, int st, int len);
    SubList(SPList<T>& lst, const Range& r);
    ~SubList();
 
    SubList<T>& operator=(const SPList<T>& lst);
    friend class SPList<T>;
};

//************************************************************
// SPList
//************************************************************

template <class T>
class SPList: private SPListBase<T>
{
public:

    SPList(int sz= 10): SPListBase<T>(sz){}
    SPList(const SubList<T>& sbl);
    
    // stuff I want public to see from SPListBase
    T& operator[](const int i){return SPListBase<T>::operator[](i);}
    const T& operator[](const int i) const{return SPListBase<T>::operator[](i);}
    SPListBase<T>::count;   // some compilers don't like this

    // add perl-like synonyms
    void reset(void){ erase(); }
    int scalar(void) const { return count(); }

    operator void*() { return count()?this:0; } // so it can be used in tests
    int isempty(void) const{ return !count(); } // for those that don't like the above (hi michael)

    T pop(void);

    void push(const T& a){ add(a);}
    void push(const SPList<T>& l);

    T shift(void);
    
    int unshift(const T& a){ add(0, a); return count(); }
    int unshift(const SPList<T>& l);

    SPList<T> reverse(void);
    SPList<T> sort();
    
    SPList<T> splice(int offset, int len, const SPList<T>& l);
    SPList<T> splice(int offset, int len);
    SPList<T> splice(int offset);

    SubList<T> operator()(int st, int len){return SubList<T>(*this, st, len);}
    SubList<T> operator()(const Range& r){return SubList<T>(*this, r);}
    SubList<T> operator()(const Slice& slc){return SubList<T>(*this, slc);}
    SubList<T> operator()(const char *s);
};

//****************************************************************
// just a mechanism for self deleteing strings which can be hacked
//****************************************************************

class TempString
{
private:
    char *str;
public:
    TempString(const char *s)    
    {
	str= new char[strlen(s) + 1];
        strcpy(str, s);
    }
    
    TempString(const char *s, int len)    
    {
        str= new char[len + 1];
        if(len) strncpy(str, s, len);
        str[len]= '\0';
    }

    ~TempString(){ delete [] str; }

    operator char*() const { return str; }
};

//************************************************************
// This class takes care of the mechanism behind variable
// length strings
//************************************************************

class VarString
{
private:
    enum{ALLOCINC=32};
    char *a;
    int len;
    int allocated;
    int allocinc;
    INLINE void grow(int n= 0);

public:
#ifdef	USLCOMPILER
    // USL 3.0 bug with enums losing the value
    INLINE VarString(int n= 32);
#else
    INLINE VarString(int n= ALLOCINC);
#endif

    INLINE VarString(const VarString& n);
    INLINE VarString(const char *);
    INLINE VarString(const char* s, int n);
    INLINE VarString(char);

    ~VarString(){
#       ifdef	DEBUG
	fprintf(stderr, "~VarString() a= %p, allocinc= %d\n", a, allocinc);
#       endif
	delete [] a;
    }

    VarString& operator=(const VarString& n);
    VarString& operator=(const char *);

    INLINE const char operator[](const int i) const;
    INLINE char& operator[](const int i);

    operator const char *() const{ return a; }

    int length(void) const{ return len; }

    void add(char);
    void add(const char *);
    void add(int, const char *);
    void remove(int, int= 1);

    void erase(void){ len= 0; }
};

class SPStringList;

//************************************************************
// Implements the perl specific string functionality 
//************************************************************

class SPString
{
private:
    VarString pstr;  // variable length string mechanism
    
public:
    class substring;
    friend class substring;
    
    SPString():pstr(){}
    SPString(const SPString& n) : pstr(n.pstr){}     
    SPString(const char *s) : pstr(s){}
    SPString(const char c) : pstr(c){}
    SPString(const substring& sb) : pstr(sb.pt, sb.len){}
    
    SPString& operator=(const char *s){pstr= s; return *this;}        
    SPString& operator=(const SPString& n); 
    SPString& operator=(const substring& sb);

    operator const char*() const{return pstr;}
    const char operator[](int n) const{ return pstr[n]; }

    int length(void) const{ return pstr.length(); }
    
    char chop(void);
    
    int index(const SPString& s, int offset= 0);    
    int rindex(const SPString& s, int offset= -1);
    substring substr(int offset, int len= -1);
    substring substr(const Range& r){ return substr(r.start(), r.length());}
        
    int m(const char *, const char *opts=""); // the regexp match m/.../ equiv
    int m(Regexp&);
    int m(const char *, SPStringList&, const char *opts="");
    int m(Regexp&, SPStringList&);
   
    int tr(const char *, const char *, const char *opts="");
    int s(const char *, const char *, const char *opts="");

    SPStringList split(const char *pat= "[ \t\n]+", int limit= -1);
    
    int operator<(const SPString& s) const { return (strcmp(pstr, s) < 0); }
    int operator>(const SPString& s) const { return (strcmp(pstr, s) > 0); }
    int operator<=(const SPString& s) const { return (strcmp(pstr, s) <= 0); }
    int operator>=(const SPString& s) const { return (strcmp(pstr, s) >= 0); }
    int operator==(const SPString& s) const { return (strcmp(pstr, s) == 0); }
    int operator!=(const SPString& s) const { return (strcmp(pstr, s) != 0); }

    int operator<(const char *s) const { return (strcmp(pstr, s) < 0); }
    int operator>(const char *s) const { return (strcmp(pstr, s) > 0); }
    int operator<=(const char *s) const { return (strcmp(pstr, s) <= 0); }
    int operator>=(const char *s) const { return (strcmp(pstr, s) >= 0); }
    int operator==(const char *s) const { return (strcmp(pstr, s) == 0); }
    int operator!=(const char *s) const { return (strcmp(pstr, s) != 0); }

    friend int operator<(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) < 0); }
    friend int operator>(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) > 0); }
    friend int operator<=(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) <= 0); }
    friend int operator>=(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) >= 0); }
    friend int operator==(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) == 0); }
    friend int operator!=(const char *s, const SPString& sp)  { return (strcmp(s, sp.pstr) != 0); }

    SPString operator+(const SPString& s) const;
    SPString operator+(const char *s) const;
    SPString operator+(char c) const;
    friend SPString operator+(const char *s1, const SPString& s2);

    SPString& operator+=(const SPString& s){pstr.add(s); return *this;}
    SPString& operator+=(const char *s){pstr.add(s); return *this;}
    SPString& operator+=(char c){pstr.add(c); return *this;}
 
private:
    void insert(int pos, int len, const char *pt, int nlen);

    // This idea lifted from NIH class library -
    // to handle substring LHS assignment
    // Note if subclasses can't be used then take external and make
    // the constructors private, and specify friend SPString
    class substring
    {
    public:
        int pos, len;
	SPString& str;
	char *pt;
    public:
        substring(SPString& os, int p, int l) : str(os)
	{
	    if(p > os.length()) p= os.length();
	    if((p+l) > os.length()) l= os.length() - p;
	    pos= p; len= l;
	    if(p == os.length()) pt= 0; // append to end of string
	    else pt= &os.pstr[p];       // +++ WARNING this may be illegal as nested classes
	                                // can't access its enclosing classes privates!
	}

        void operator=(const SPString& s)
        {
            if(&str == &s){ // potentially overlapping
		VarString tmp(s);
		str.insert(pos, len, tmp, strlen(tmp));
	    }else str.insert(pos, len, s, s.length());
        }
        
        void operator=(const substring& s)
        {
	    if(&str == &s.str){ // potentially overlapping
		VarString tmp(s.pt, s.len);
		str.insert(pos, len, tmp, strlen(tmp));
	    }else str.insert(pos, len, s.pt, s.len);
        }

        void operator=(const char *s)
        {
            str.insert(pos, len, s, strlen(s));
        }
    };
};

//************************************************************
// SPStringList
//************************************************************

class SPStringList: public SPList<SPString>
{
public:
    SPStringList(int sz= 6):SPList<SPString>(sz){}
    // copy lists, need to duplicate all internal strings
    SPStringList(const SPStringList& n);

    SPStringList& operator=(const SPList<SPString>& n);
 
    int split(const char *str, const char *pat= "[ \t\n]+", int limit= -1);
    SPString join(const char *pat= " ");
    int m(const char *rege, const char *targ, const char *opts=""); // makes list of sub exp matches
    friend SPStringList m(const char *pat, const char *str, const char *opts="");
    SPStringList grep(const char *rege, const char *opts=""); // trys rege against elements in list
};

//************************************************************
// Streams operators
//************************************************************

template <class T>
istream& operator>>(istream& ifs, SPList<T>& arr)
{
T a;
    // Should I reset arr first?
    arr.reset(); // I think so, to be consistent
    
    while(ifs >> a){
	arr.push(a);
//	cout << "<" << a << ">" << endl;
    };
    return ifs;    
}

template <class T>
ostream& operator<<(ostream& os,  const SPList<T>& arr)
{

    for(int i=0;i<arr.count();i++){
#ifdef	TEST
	os << "[" << i << "]" << arr[i] << " ";
    }
    os << endl; 
#else
	os << arr[i] << endl;
    }
#endif
    return os;   
}

istream& operator>>(istream& ifs, SPString& s);
istream& operator>>(istream& ifs, SPStringList& sl);
ostream& operator<<(ostream& os,  const SPString& arr);
ostream& operator<<(ostream& os,  const SPStringList& arr);

//************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色图天堂网| 国产精品欧美久久久久无广告| 日韩欧美综合一区| 亚洲欧美日韩电影| 国产一区二区三区四区五区入口 | 精品国产凹凸成av人导航| 国产精品网站一区| 精品一区二区三区蜜桃| 欧美日韩亚洲综合一区二区三区| 国产色综合久久| 美女一区二区三区| 欧美精品在线观看一区二区| 一区免费观看视频| 成人午夜在线免费| 久久女同精品一区二区| 青青草伊人久久| 欧美日韩免费观看一区二区三区| 综合久久综合久久| 不卡视频在线观看| 欧美激情综合五月色丁香| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美日韩国产一区| 图片区日韩欧美亚洲| 欧美日韩国产精选| 婷婷国产在线综合| 欧美精品久久99久久在免费线| 亚洲精品精品亚洲| 在线影院国内精品| 亚洲高清在线视频| 91精品婷婷国产综合久久| 日韩精品一级中文字幕精品视频免费观看 | 成人综合婷婷国产精品久久| 日韩一级完整毛片| 蜜臀久久99精品久久久久久9 | 成人综合婷婷国产精品久久| 久久精品视频免费| 成人综合日日夜夜| 1区2区3区欧美| 色婷婷综合久久久久中文一区二区 | 欧美日韩大陆在线| 日韩电影在线免费观看| 欧美一区二区三区婷婷月色| 日本一不卡视频| 精品国产免费一区二区三区四区| 经典三级视频一区| 国产亚洲精久久久久久| 粉嫩aⅴ一区二区三区四区五区| 国产日产欧产精品推荐色 | 久久久精品蜜桃| 成人免费视频免费观看| 亚洲视频 欧洲视频| 欧美亚洲国产一区二区三区va| 亚洲一区二区免费视频| 51精品久久久久久久蜜臀| 美日韩一区二区| 国产精品毛片久久久久久久| 日本福利一区二区| 久久99日本精品| 中文字幕不卡的av| 久久午夜色播影院免费高清| 国产成人综合自拍| 亚洲精品视频一区| 日韩精品自拍偷拍| av一二三不卡影片| 轻轻草成人在线| 中文字幕亚洲综合久久菠萝蜜| 91传媒视频在线播放| 久久99久久99小草精品免视看| 国产蜜臀av在线一区二区三区| 色哟哟欧美精品| 久久99精品久久久久| 亚洲麻豆国产自偷在线| 日韩欧美国产综合| 色综合天天视频在线观看| 久久97超碰色| 亚洲色图制服诱惑| 久久久精品欧美丰满| 欧美三日本三级三级在线播放| 国产乱码精品一区二区三区忘忧草| 亚洲欧美日韩国产中文在线| 精品久久久久久最新网址| 91久久精品网| 成人免费毛片高清视频| 久久电影网站中文字幕| 亚洲va天堂va国产va久| 中文字幕一区二区三区视频 | 久久精品夜夜夜夜久久| 精品视频色一区| 99久久久久久| 国产一区二区不卡在线| 日本女人一区二区三区| 亚洲精品午夜久久久| 中文字幕免费在线观看视频一区| 日韩欧美国产综合| 9191精品国产综合久久久久久| 26uuu亚洲| 4438x亚洲最大成人网| 欧美性色欧美a在线播放| av中文字幕一区| 成人天堂资源www在线| 国内精品视频666| 久久99深爱久久99精品| 美美哒免费高清在线观看视频一区二区| 一区二区三区色| 亚洲三级久久久| 综合电影一区二区三区| 国产日韩av一区| 欧美国产激情一区二区三区蜜月| 精品欧美黑人一区二区三区| 欧美精品成人一区二区三区四区| 在线观看日韩毛片| 日本韩国一区二区三区| 色噜噜狠狠成人网p站| 色综合网色综合| 色乱码一区二区三区88| 91麻豆国产在线观看| 色综合天天性综合| 色综合一个色综合| 欧美天堂亚洲电影院在线播放| 97se亚洲国产综合自在线不卡| eeuss鲁片一区二区三区在线看| 成人av午夜电影| 色综合天天综合在线视频| 欧美主播一区二区三区| 欧美日韩激情一区二区三区| 欧美二区三区的天堂| 欧美一级一级性生活免费录像| 91精品国产91久久久久久一区二区| 6080yy午夜一二三区久久| 日韩精品一区在线观看| 久久九九国产精品| 亚洲美女精品一区| 午夜av电影一区| 欧美影院精品一区| 欧美精品第1页| 欧美精品一区二区精品网| 国产精品水嫩水嫩| 亚洲午夜在线视频| 久久99国产精品麻豆| 成人午夜又粗又硬又大| 欧美色网站导航| www国产成人| 亚洲另类中文字| 日本美女一区二区| 成人av中文字幕| 欧美伦理电影网| 国产欧美一区二区三区鸳鸯浴| 亚洲色图另类专区| 美女被吸乳得到大胸91| 成a人片亚洲日本久久| 91精品午夜视频| 国产精品成人免费精品自在线观看| 亚洲午夜羞羞片| 国产成人精品1024| 欧美日韩卡一卡二| 欧美国产日韩精品免费观看| 亚洲国产日产av| 大白屁股一区二区视频| 欧美一级高清大全免费观看| 国产精品久久久久久久久久久免费看 | 欧美大白屁股肥臀xxxxxx| 国产精品久久久久久久午夜片| 视频一区视频二区在线观看| 成人av网址在线| 日韩欧美一区二区视频| 亚洲综合视频网| 成人午夜在线播放| 欧美电影免费观看高清完整版在线观看 | 粉嫩蜜臀av国产精品网站| 欧美日韩1234| 亚洲免费观看视频| 国产成a人亚洲| 日韩免费观看2025年上映的电影| 亚洲欧美国产毛片在线| 国产精品一区免费视频| 欧美一区二区视频观看视频| 亚洲免费在线观看视频| 成人在线一区二区三区| 亚洲精品在线观| 久久不见久久见免费视频7| 欧美视频一二三区| 亚洲综合偷拍欧美一区色| 99国产精品99久久久久久| 国产调教视频一区| 国产在线精品一区二区三区不卡 | 久久久亚洲午夜电影| 青青草精品视频| 欧美一区二区视频免费观看| 亚洲第一狼人社区| 欧美三级中文字幕| 亚洲国产精品久久艾草纯爱| 91在线porny国产在线看| 中文字幕在线不卡| 成人免费毛片app| 中文字幕一区二区三区在线观看 | 欧洲一区二区三区免费视频| 亚洲人吸女人奶水| 99这里只有精品| 亚洲码国产岛国毛片在线| 色一情一伦一子一伦一区|