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

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

?? simpleini.h

?? This code is Address book code for Windows Mobile. This source code support windows mobile 5.0 over.
?? H
?? 第 1 頁 / 共 5 頁
字號:
            return true;
        }
        ++a_pData;
    }

    // check for suffix
    if (IsSpace(*--a_pData)) {
        return true;
    }

    return false;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
bool
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::IsNewLineChar(
    SI_CHAR a_c
    ) const
{
    return (a_c == '\n' || a_c == '\r');
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
bool
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::LoadMultiLineText(
    SI_CHAR *&          a_pData,
    const SI_CHAR *&    a_pVal,
    const SI_CHAR *     a_pTagName,
    bool                a_bAllowBlankLinesInComment
    ) const
{
    // we modify this data to strip all newlines down to a single '\n'
    // character. This means that on Windows we need to strip out some
    // characters which will make the data shorter.
    // i.e.  LINE1-LINE1\r\nLINE2-LINE2\0 will become
    //       LINE1-LINE1\nLINE2-LINE2\0
    // The pDataLine entry is the pointer to the location in memory that
    // the current line needs to start to run following the existing one.
    // This may be the same as pCurrLine in which case no move is needed.
    SI_CHAR * pDataLine = a_pData;
    SI_CHAR * pCurrLine;

    // value starts at the current line
    a_pVal = a_pData;

    // find the end tag. This tag must start in column 1 and be
    // followed by a newline. No whitespace removal is done while
    // searching for this tag.
    SI_CHAR cEndOfLineChar = *a_pData;
    for(;;) {
        // if we are loading comments then we need a comment character as
        // the first character on every line
        if (!a_pTagName && !IsComment(*a_pData)) {
            // if we aren't allowing blank lines then we're done
            if (!a_bAllowBlankLinesInComment) {
                break;
            }

            // if we are allowing blank lines then we only include them
            // in this comment if another comment follows, so read ahead
            // to find out.
            SI_CHAR * pCurr = a_pData;
            int nNewLines = 0;
            while (IsSpace(*pCurr)) {
                if (IsNewLineChar(*pCurr)) {
                    ++nNewLines;
                    SkipNewLine(pCurr);
                }
                else {
                    ++pCurr;
                }
            }

            // we have a comment, add the blank lines to the output
            // and continue processing from here
            if (IsComment(*pCurr)) {
                for (; nNewLines > 0; --nNewLines) *pDataLine++ = '\n';
                a_pData = pCurr;
                continue;
            }

            // the comment ends here
            break;
        }

        // find the end of this line
        pCurrLine = a_pData;
        while (*a_pData && !IsNewLineChar(*a_pData)) ++a_pData;

        // move this line down to the location that it should be if necessary
        if (pDataLine < pCurrLine) {
            size_t nLen = (size_t) (a_pData - pCurrLine);
            memmove(pDataLine, pCurrLine, nLen * sizeof(SI_CHAR));
            pDataLine[nLen] = '\0';
        }

        // end the line with a NULL
        cEndOfLineChar = *a_pData;
        *a_pData = 0;

        // if are looking for a tag then do the check now. This is done before
        // checking for end of the data, so that if we have the tag at the end
        // of the data then the tag is removed correctly.
        if (a_pTagName &&
            (!IsLess(pDataLine, a_pTagName) && !IsLess(a_pTagName, pDataLine)))
        {
            break;
        }

        // if we are at the end of the data then we just automatically end
        // this entry and return the current data.
        if (!cEndOfLineChar) {
            return true;
        }

        // otherwise we need to process this newline to ensure that it consists
        // of just a single \n character.
        pDataLine += (a_pData - pCurrLine);
        *a_pData = cEndOfLineChar;
        SkipNewLine(a_pData);
        *pDataLine++ = '\n';
    }

    // if we didn't find a comment at all then return false
    if (a_pVal == a_pData) {
        a_pVal = NULL;
        return false;
    }

    // the data (which ends at the end of the last line) needs to be
    // null-terminated BEFORE before the newline character(s). If the
    // user wants a new line in the multi-line data then they need to
    // add an empty line before the tag.
    *--pDataLine = '\0';

    // if looking for a tag and if we aren't at the end of the data,
    // then move a_pData to the start of the next line.
    if (a_pTagName && cEndOfLineChar) {
        SI_ASSERT(IsNewLineChar(cEndOfLineChar));
        *a_pData = cEndOfLineChar;
        SkipNewLine(a_pData);
    }

    return true;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
SI_Error
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::CopyString(
    const SI_CHAR *& a_pString
    )
{
    size_t uLen = 0;
    if (sizeof(SI_CHAR) == sizeof(char)) {
        uLen = strlen((const char *)a_pString);
    }
    else if (sizeof(SI_CHAR) == sizeof(wchar_t)) {
        uLen = wcslen((const wchar_t *)a_pString);
    }
    else {
        for ( ; a_pString[uLen]; ++uLen) /*loop*/ ;
    }
    ++uLen; // NULL character
    SI_CHAR * pCopy = new SI_CHAR[uLen];
    if (!pCopy) {
        return SI_NOMEM;
    }
    memcpy(pCopy, a_pString, sizeof(SI_CHAR)*uLen);
    m_strings.push_back(pCopy);
    a_pString = pCopy;
    return SI_OK;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
SI_Error
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::AddEntry(
    const SI_CHAR * a_pSection,
    const SI_CHAR * a_pKey,
    const SI_CHAR * a_pValue,
    const SI_CHAR * a_pComment,
    bool            a_bCopyStrings
    )
{
    SI_Error rc;
    bool bInserted = false;

    SI_ASSERT(!a_pComment || IsComment(*a_pComment));

    // if we are copying strings then make a copy of the comment now
    // because we will need it when we add the entry.
    if (a_bCopyStrings && a_pComment) {
        rc = CopyString(a_pComment);
        if (rc < 0) return rc;
    }

    // check for existence of the section first if we need string copies
    typename TSection::iterator iSection = m_data.end();
    if (a_bCopyStrings) {
        iSection = m_data.find(a_pSection);
        if (iSection == m_data.end()) {
            // if the section doesn't exist then we need a copy as the
            // string needs to last beyond the end of this function
            // because we will be inserting the section next
            rc = CopyString(a_pSection);
            if (rc < 0) return rc;
        }
    }

    // create the section entry
    if (iSection == m_data.end()) {
        Entry oKey(a_pSection, ++m_nOrder);
        if (a_pComment && (!a_pKey || !a_pValue)) {
            oKey.pComment = a_pComment;
        }
        typename TSection::value_type oEntry(oKey, TKeyVal());
        typedef typename TSection::iterator SectionIterator;
        std::pair<SectionIterator,bool> i =
            m_data.insert(oEntry);
        iSection = i.first;
        bInserted = true;
    }
    if (!a_pKey || !a_pValue) {
        // section only entries are specified with pItem and pVal as NULL
        return bInserted ? SI_INSERTED : SI_UPDATED;
    }

    // check for existence of the key
    TKeyVal & keyval = iSection->second;
    typename TKeyVal::iterator iKey = keyval.find(a_pKey);

    // make string copies if necessary
    if (a_bCopyStrings) {
        if (m_bAllowMultiKey || iKey == keyval.end()) {
            // if the key doesn't exist then we need a copy as the
            // string needs to last beyond the end of this function
            // because we will be inserting the key next
            rc = CopyString(a_pKey);
            if (rc < 0) return rc;
        }

        // we always need a copy of the value
        rc = CopyString(a_pValue);
        if (rc < 0) return rc;
    }

    // create the key entry
    if (iKey == keyval.end() || m_bAllowMultiKey) {
        Entry oKey(a_pKey, ++m_nOrder);
        if (a_pComment) {
            oKey.pComment = a_pComment;
        }
        typename TKeyVal::value_type oEntry(oKey, NULL);
        iKey = keyval.insert(oEntry);
        bInserted = true;
    }
    iKey->second = a_pValue;
    return bInserted ? SI_INSERTED : SI_UPDATED;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
const SI_CHAR *
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetValue(
    const SI_CHAR * a_pSection,
    const SI_CHAR * a_pKey,
    const SI_CHAR * a_pDefault,
    bool *          a_pHasMultiple
    ) const
{
    if (a_pHasMultiple) {
        *a_pHasMultiple = false;
    }
    if (!a_pSection || !a_pKey) {
        return a_pDefault;
    }
    typename TSection::const_iterator iSection = m_data.find(a_pSection);
    if (iSection == m_data.end()) {
        return a_pDefault;
    }
    typename TKeyVal::const_iterator iKeyVal = iSection->second.find(a_pKey);
    if (iKeyVal == iSection->second.end()) {
        return a_pDefault;
    }

    // check for multiple entries with the same key
    if (m_bAllowMultiKey && a_pHasMultiple) {
        typename TKeyVal::const_iterator iTemp = iKeyVal;
        if (++iTemp != iSection->second.end()) {
            if (!IsLess(a_pKey, iTemp->first.pItem)) {
                *a_pHasMultiple = true;
            }
        }
    }

    return iKeyVal->second;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
bool
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetAllValues(
    const SI_CHAR * a_pSection,
    const SI_CHAR * a_pKey,
    TNamesDepend &  a_values
    ) const
{
    if (!a_pSection || !a_pKey) {
        return false;
    }
    typename TSection::const_iterator iSection = m_data.find(a_pSection);
    if (iSection == m_data.end()) {
        return false;
    }
    typename TKeyVal::const_iterator iKeyVal = iSection->second.find(a_pKey);
    if (iKeyVal == iSection->second.end()) {
        return false;
    }

    // insert all values for this key
    a_values.push_back(iKeyVal->second);
    if (m_bAllowMultiKey) {
        ++iKeyVal;
        while (iKeyVal != iSection->second.end() && !IsLess(a_pKey, iKeyVal->first.pItem)) {
            a_values.push_back(Entry(iKeyVal->second, iKeyVal->first.nOrder));
            ++iKeyVal;
        }
    }

    return true;
}

template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
int
CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetSectionSize(
    const SI_CHAR * a_pSection
    ) const
{
    if (!a_pSection) {
        return -1;
    }

    typename TSection::const_iterator iSection = m_data.find(a_pSection);
    if (iSection == m_data.end()) {
        return -1;
    }
    const TKeyVal & section = iSection->second;

    // if multi-key isn't permitted then the section size is
    // the number of keys that we have.
    if (!m_bAllowMultiKey || section.empty()) {
        return (int) section.size();
    }

    // otherwise we need to count them
    int nCount = 0;
    const SI_CHAR * pLastKey = NULL;
    typename TKeyVal::const_iterator iKeyVal = section.begin();
    for (int n = 0; iKeyVal != section.end(); ++iKeyVal, ++n) {
        if (!pLastKey || IsLess(pLastKey, iKeyVal->first.pItem)) {
            ++nCount;
            pLastKey = iKeyVal->first.pItem;
        }
    }
    return nCount;
}

template<class SI_CHAR, class

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品久久久蜜桃| 国产欧美一区二区精品性色| 国产xxx精品视频大全| 亚洲成人综合网站| 久久久不卡网国产精品一区| 欧美亚洲丝袜传媒另类| 国产很黄免费观看久久| 免费在线观看精品| 亚洲国产视频在线| 国产精品久久久久久久久免费相片| 91精品国产色综合久久| 日本电影欧美片| 国产凹凸在线观看一区二区| 毛片av中文字幕一区二区| 亚洲高清一区二区三区| 亚洲欧美日韩国产手机在线 | 欧美亚洲免费在线一区| 国产成人av资源| 激情欧美一区二区三区在线观看| 亚洲国产一二三| 亚洲综合小说图片| 亚洲乱码国产乱码精品精可以看 | 亚洲乱码国产乱码精品精小说| 国产欧美一区二区在线| www成人在线观看| 日韩一区二区三区在线| 欧美日韩日日夜夜| 91久久精品国产91性色tv| 国产成人精品三级| 福利一区二区在线观看| 国产激情一区二区三区| 激情伊人五月天久久综合| 免费观看久久久4p| 日本最新不卡在线| 免费观看一级特黄欧美大片| 日本午夜一本久久久综合| 亚洲午夜一区二区三区| 亚洲国产精品一区二区www| 一区二区三区四区在线免费观看| 亚洲人123区| 一区二区三区在线视频播放| 亚洲精品午夜久久久| 亚洲人精品午夜| 一区二区三区欧美激情| 亚洲午夜精品17c| 亚洲一区视频在线观看视频| 午夜天堂影视香蕉久久| 五月天网站亚洲| 久久精品国产在热久久| 久久激情五月激情| 国产福利精品导航| 91麻豆123| 欧美另类videos死尸| 欧美一区二区日韩| 久久婷婷综合激情| 国产精品电影院| 一区二区三区在线免费观看| 视频一区二区中文字幕| 麻豆传媒一区二区三区| 懂色av一区二区夜夜嗨| 成人国产在线观看| 欧洲一区二区av| 欧美一区二区私人影院日本| 精品国产乱码久久久久久牛牛| 国产日韩精品一区二区三区 | 国产精品一区2区| 99精品桃花视频在线观看| 欧美日韩在线不卡| 精品久久久三级丝袜| 亚洲欧洲另类国产综合| 亚洲成人午夜影院| 激情综合色丁香一区二区| 丁香婷婷综合网| 欧美视频三区在线播放| 久久综合九色综合久久久精品综合| 国产亚洲福利社区一区| 一区二区三区资源| 极品美女销魂一区二区三区| 91麻豆视频网站| 日韩一级黄色大片| 最新国产の精品合集bt伙计| 日韩在线卡一卡二| av网站免费线看精品| 在线电影欧美成精品| 中文字幕欧美一| 美国一区二区三区在线播放| 91麻豆自制传媒国产之光| 日韩亚洲欧美在线| 亚洲欧洲美洲综合色网| 久久成人麻豆午夜电影| 91久久线看在观草草青青| 欧美v国产在线一区二区三区| 一区二区三区在线免费播放| 国产一区二区三区日韩| 欧美视频一区二区| 国产精品视频在线看| 麻豆成人久久精品二区三区小说| 一本久久a久久精品亚洲| 欧美变态凌虐bdsm| 亚洲国产精品久久人人爱蜜臀| 国产精品中文欧美| 欧美一卡在线观看| 一区二区三区高清| 成人激情小说网站| 久久久久久久久久久电影| 亚洲成年人影院| 成人av动漫网站| 精品国产伦一区二区三区观看体验| 亚洲综合色在线| 99在线热播精品免费| 国产日产亚洲精品系列| 久久精品国产在热久久| 制服.丝袜.亚洲.中文.综合| 亚洲视频免费看| 成人黄色777网| 国产日韩精品一区二区三区| 精品亚洲porn| 日韩欧美不卡在线观看视频| 日本成人在线不卡视频| 欧美在线观看视频一区二区三区| 亚洲欧洲99久久| 成人激情文学综合网| 国产免费成人在线视频| 国产乱人伦精品一区二区在线观看| 日韩欧美一区在线观看| 日本美女一区二区三区| 欧美天天综合网| 亚洲成人一区在线| 欧美日韩二区三区| 亚洲高清免费视频| 欧美日韩国产成人在线免费| 一区二区不卡在线播放| 91激情在线视频| 亚洲黄色av一区| 在线观看免费一区| 亚洲自拍偷拍网站| 欧美精选在线播放| 免费在线看成人av| 日韩精品一区二区三区视频| 精品亚洲aⅴ乱码一区二区三区| 精品日韩av一区二区| 狠狠色丁香久久婷婷综| 亚洲精品在线观| 国产精品一区二区在线观看不卡 | 老司机精品视频线观看86| 欧美精品一级二级三级| 视频在线观看一区二区三区| 制服丝袜日韩国产| 国产主播一区二区三区| 中文久久乱码一区二区| 91丨九色丨黑人外教| 一区二区欧美视频| 91精品国产色综合久久不卡电影| 九九精品一区二区| 国产精品天天看| 欧美亚洲综合色| 三级久久三级久久| 精品国产凹凸成av人网站| 丁香激情综合国产| 亚洲亚洲精品在线观看| 日韩免费一区二区三区在线播放| 国产大陆a不卡| 亚洲欧美日韩综合aⅴ视频| 欧美高清视频在线高清观看mv色露露十八| 日韩国产在线观看| 国产免费成人在线视频| 欧美三区在线观看| 国模一区二区三区白浆| 亚洲欧洲精品天堂一级| 欧美男女性生活在线直播观看| 久久国产夜色精品鲁鲁99| 国产喷白浆一区二区三区| 色偷偷一区二区三区| 青青草精品视频| 国产精品毛片久久久久久| 欧美午夜寂寞影院| 国产一区二区免费在线| 一区二区三区中文字幕电影| 日韩美女一区二区三区四区| 成人av片在线观看| 美女视频免费一区| 亚洲天堂成人在线观看| 正在播放一区二区| av电影一区二区| 老司机免费视频一区二区三区| 1024成人网色www| 日韩欧美一区二区视频| 色综合久久88色综合天天| 国产一区在线观看麻豆| 亚洲国产精品人人做人人爽| 国产日韩精品视频一区| 91麻豆精品国产91| 91麻豆自制传媒国产之光| 国产一区二区三区在线观看免费 | 99国产精品国产精品毛片| 日本午夜一本久久久综合| 亚洲欧美激情小说另类| 久久久久国产免费免费| 91精品国产综合久久久久久漫画 | 国产高清视频一区|