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

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

?? iniparser.c

?? C Library to read Windows INI file
?? C
?? 第 1 頁 / 共 2 頁
字號:
  This function queries a dictionary for a key. A key as read from an  ini file is given as "section:key". If the key cannot be found,  the notfound value is returned. *//*--------------------------------------------------------------------------*/double iniparser_getdouble(dictionary * d, char * key, double notfound){    char    *   str ;    str = iniparser_getstring(d, key, INI_INVALID_KEY);    if (str==INI_INVALID_KEY) return notfound ;    return atof(str);}/*-------------------------------------------------------------------------*//**  @brief    Get the string associated to a key, convert to a boolean  @param    d Dictionary to search  @param    key Key string to look for  @param    notfound Value to return in case of error  @return   integer  This function queries a dictionary for a key. A key as read from an  ini file is given as "section:key". If the key cannot be found,  the notfound value is returned.  A true boolean is found if one of the following is matched:  - A string starting with 'y'  - A string starting with 'Y'  - A string starting with 't'  - A string starting with 'T'  - A string starting with '1'  A false boolean is found if one of the following is matched:  - A string starting with 'n'  - A string starting with 'N'  - A string starting with 'f'  - A string starting with 'F'  - A string starting with '0'  The notfound value returned if no boolean is identified, does not  necessarily have to be 0 or 1. *//*--------------------------------------------------------------------------*/int iniparser_getboolean(dictionary * d, const char * key, int notfound){    char    *   c ;    int         ret ;    c = iniparser_getstring(d, key, INI_INVALID_KEY);    if (c==INI_INVALID_KEY) return notfound ;    if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') {        ret = 1 ;    } else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' || c[0]=='F') {        ret = 0 ;    } else {        ret = notfound ;    }    return ret;}/*-------------------------------------------------------------------------*//**  @brief    Finds out if a given entry exists in a dictionary  @param    ini     Dictionary to search  @param    entry   Name of the entry to look for  @return   integer 1 if entry exists, 0 otherwise  Finds out if a given entry exists in the dictionary. Since sections  are stored as keys with NULL associated values, this is the only way  of querying for the presence of sections in a dictionary. *//*--------------------------------------------------------------------------*/int iniparser_find_entry(    dictionary  *   ini,    char        *   entry){    int found=0 ;    if (iniparser_getstring(ini, entry, INI_INVALID_KEY)!=INI_INVALID_KEY) {        found = 1 ;    }    return found ;}/*-------------------------------------------------------------------------*//**  @brief    Set an entry in a dictionary.  @param    ini     Dictionary to modify.  @param    entry   Entry to modify (entry name)  @param    val     New value to associate to the entry.  @return   int 0 if Ok, -1 otherwise.  If the given entry can be found in the dictionary, it is modified to  contain the provided value. If it cannot be found, -1 is returned.  It is Ok to set val to NULL. *//*--------------------------------------------------------------------------*/int iniparser_set(dictionary * ini, char * entry, char * val){    return dictionary_set(ini, strlwc(entry), val) ;}/*-------------------------------------------------------------------------*//**  @brief    Delete an entry in a dictionary  @param    ini     Dictionary to modify  @param    entry   Entry to delete (entry name)  @return   void  If the given entry can be found, it is deleted from the dictionary. *//*--------------------------------------------------------------------------*/void iniparser_unset(dictionary * ini, char * entry){    dictionary_unset(ini, strlwc(entry));}/*-------------------------------------------------------------------------*//**  @brief	Load a single line from an INI file  @param    input_line  Input line, may be concatenated multi-line input  @param    section     Output space to store section  @param    key         Output space to store key  @param    value       Output space to store value  @return   line_status value *//*--------------------------------------------------------------------------*/static line_status iniparser_line(    char * input_line,    char * section,    char * key,    char * value){       line_status sta ;    char        line[ASCIILINESZ+1];    int         len ;    strcpy(line, strstrip(input_line));    len = (int)strlen(line);    sta = LINE_UNPROCESSED ;    if (len<1) {        /* Empty line */        sta = LINE_EMPTY ;    } else if (line[0]=='#') {        /* Comment line */        sta = LINE_COMMENT ;     } else if (line[0]=='[' && line[len-1]==']') {        /* Section name */        sscanf(line, "[%[^]]", section);        strcpy(section, strstrip(section));        strcpy(section, strlwc(section));        sta = LINE_SECTION ;    } else if (sscanf (line, "%[^=] = \"%[^\"]\"", key, value) == 2           ||  sscanf (line, "%[^=] = '%[^\']'",   key, value) == 2           ||  sscanf (line, "%[^=] = %[^;#]",     key, value) == 2) {        /* Usual key=value, with or without comments */        strcpy(key, strstrip(key));        strcpy(key, strlwc(key));        strcpy(value, strstrip(value));        /*         * sscanf cannot handle '' or "" as empty values         * this is done here         */        if (!strcmp(value, "\"\"") || (!strcmp(value, "''"))) {            value[0]=0 ;        }        sta = LINE_VALUE ;    } else if (sscanf(line, "%[^=] = %[;#]", key, value)==2           ||  sscanf(line, "%[^=] %[=]", key, value) == 2) {        /*         * Special cases:         * key=         * key=;         * key=#         */        strcpy(key, strstrip(key));        strcpy(key, strlwc(key));        value[0]=0 ;        sta = LINE_VALUE ;    } else {        /* Generate syntax error */        sta = LINE_ERROR ;    }    return sta ;}/*-------------------------------------------------------------------------*//**  @brief    Parse an ini file and return an allocated dictionary object  @param    ininame Name of the ini file to read.  @return   Pointer to newly allocated dictionary  This is the parser for ini files. This function is called, providing  the name of the file to be read. It returns a dictionary object that  should not be accessed directly, but through accessor functions  instead.  The returned dictionary must be freed using iniparser_freedict(). *//*--------------------------------------------------------------------------*/dictionary * iniparser_load(const char * ininame){    FILE * in ;    char line    [ASCIILINESZ+1] ;    char section [ASCIILINESZ+1] ;    char key     [ASCIILINESZ+1] ;    char tmp     [ASCIILINESZ+1] ;    char val     [ASCIILINESZ+1] ;    int  last=0 ;    int  len ;    int  lineno=0 ;    int  errs=0;    dictionary * dict ;    if ((in=fopen(ininame, "r"))==NULL) {        fprintf(stderr, "iniparser: cannot open %s\n", ininame);        return NULL ;    }    dict = dictionary_new(0) ;    if (!dict) {        fclose(in);        return NULL ;    }    memset(line,    0, ASCIILINESZ);    memset(section, 0, ASCIILINESZ);    memset(key,     0, ASCIILINESZ);    memset(val,     0, ASCIILINESZ);    last=0 ;    while (fgets(line+last, ASCIILINESZ-last, in)!=NULL) {        lineno++ ;        len = (int)strlen(line)-1;        /* Safety check against buffer overflows */        if (line[len]!='\n') {            fprintf(stderr,                    "iniparser: input line too long in %s (%d)\n",                    ininame,                    lineno);            dictionary_del(dict);            fclose(in);            return NULL ;        }        /* Get rid of \n and spaces at end of line */        while ((len>=0) &&                ((line[len]=='\n') || (isspace(line[len])))) {            line[len]=0 ;            len-- ;        }        /* Detect multi-line */        if (line[len]=='\\') {            /* Multi-line value */            last=len ;            continue ;        } else {            last=0 ;        }        switch (iniparser_line(line, section, key, val)) {            case LINE_EMPTY:            case LINE_COMMENT:            break ;            case LINE_SECTION:            errs = dictionary_set(dict, section, NULL);            break ;            case LINE_VALUE:            sprintf(tmp, "%s:%s", section, key);            errs = dictionary_set(dict, tmp, val) ;            break ;            case LINE_ERROR:            fprintf(stderr, "iniparser: syntax error in %s (%d):\n",                    ininame,                    lineno);            fprintf(stderr, "-> %s\n", line);            errs++ ;            break;            default:            break ;        }        memset(line, 0, ASCIILINESZ);        last=0;        if (errs<0) {            fprintf(stderr, "iniparser: memory allocation failure\n");            break ;        }    }    if (errs) {        dictionary_del(dict);        dict = NULL ;    }    fclose(in);    return dict ;}/*-------------------------------------------------------------------------*//**  @brief    Free all memory associated to an ini dictionary  @param    d Dictionary to free  @return   void  Free all memory associated to an ini dictionary.  It is mandatory to call this function before the dictionary object  gets out of the current context. *//*--------------------------------------------------------------------------*/void iniparser_freedict(dictionary * d){    dictionary_del(d);}/* vim: set ts=4 et sw=4 tw=75 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕免费在线观看视频一区| 高清beeg欧美| 精品国产免费视频| 国产91精品一区二区麻豆亚洲| 中文字幕av一区二区三区| 天堂一区二区在线| 精品av久久707| 色综合激情五月| 久久99久久99| 久久免费视频色| 欧美日韩三级一区| 成人永久看片免费视频天堂| 亚洲国产裸拍裸体视频在线观看乱了| 欧美v亚洲v综合ⅴ国产v| 极品销魂美女一区二区三区| 亚洲自拍偷拍九九九| 久久久久99精品国产片| 欧美日韩免费观看一区三区| 日韩不卡一区二区三区| 亚洲三级理论片| 久久综合狠狠综合久久综合88| 色先锋久久av资源部| 国产综合久久久久久久久久久久| 亚洲人成在线播放网站岛国| 精品福利一二区| 一本色道久久综合亚洲91| 国产成人啪免费观看软件| 日韩成人免费电影| 亚洲一区二区三区视频在线播放| 久久久夜色精品亚洲| 日韩欧美黄色影院| 在线电影院国产精品| 99九九99九九九视频精品| 久久aⅴ国产欧美74aaa| 日韩综合一区二区| 亚洲女与黑人做爰| 国产欧美日韩在线看| 亚洲乱码中文字幕| 久久精品免费在线观看| 久久亚区不卡日本| 日韩视频永久免费| 91麻豆精品91久久久久同性| 91视频一区二区三区| 在线中文字幕一区| 99精品视频一区二区三区| 高清成人免费视频| 国产精品综合二区| 成人欧美一区二区三区1314 | 91免费在线看| 成人黄色在线视频| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲欧美自拍偷拍色图| 久久综合久久综合九色| 日韩视频免费直播| 91精品国产乱| 色综合色综合色综合色综合色综合 | 国产成人丝袜美腿| 国产精品自拍av| 国产剧情一区在线| 国产凹凸在线观看一区二区| 国产精品一品二品| 国产精品一二三四| 日韩高清不卡一区| 日韩福利视频网| 久久99久久精品| 国产另类ts人妖一区二区| 国产不卡一区视频| 99视频精品在线| 欧美综合天天夜夜久久| 欧美日韩电影在线| 欧美一区二区福利在线| 欧美大片一区二区| 国产午夜一区二区三区| 日韩欧美国产三级电影视频| 欧美刺激午夜性久久久久久久| 久久久久久久久久电影| 亚洲嫩草精品久久| 经典一区二区三区| 色婷婷av一区二区三区之一色屋| 91麻豆精品国产自产在线| 国产亚洲美州欧州综合国| 亚洲一区二区三区四区五区中文| 久久99久久精品| 在线亚洲精品福利网址导航| 精品国产乱码久久久久久1区2区| 自拍偷拍亚洲综合| 久久66热偷产精品| 色悠悠亚洲一区二区| 亚洲精品一区在线观看| 玉米视频成人免费看| 国产麻豆精品在线观看| 欧美日韩亚洲国产综合| 国产精品天干天干在观线| 日本美女一区二区三区视频| 国产欧美1区2区3区| 亚洲一区二区三区免费视频| 国产一区二区三区综合| 欧美性色aⅴ视频一区日韩精品| 欧美精品一区二区三区蜜桃视频| 亚洲一本大道在线| 成人精品国产福利| 日韩一区二区电影| 亚洲综合久久av| 成人激情文学综合网| www国产成人| 日韩国产欧美在线视频| 色久综合一二码| 欧美激情在线一区二区| 老司机精品视频在线| 欧美日韩国产免费| 自拍偷拍欧美精品| 成人a免费在线看| 久久一二三国产| 蜜桃av一区二区在线观看 | 日本电影亚洲天堂一区| 国产网红主播福利一区二区| 蜜桃精品视频在线观看| 欧美久久婷婷综合色| 亚洲国产日日夜夜| 色婷婷亚洲精品| 亚洲少妇最新在线视频| 国产精品一二三区在线| 日韩欧美一卡二卡| 免费一区二区视频| 日韩一区二区免费在线观看| 视频在线观看一区二区三区| 欧美性猛交一区二区三区精品| 亚洲免费在线看| 色综合天天综合在线视频| 国产精品乱人伦中文| 麻豆专区一区二区三区四区五区| 69精品人人人人| 石原莉奈一区二区三区在线观看| 欧美午夜电影网| 香蕉成人伊视频在线观看| 欧美亚洲另类激情小说| 香港成人在线视频| 91麻豆精品国产91久久久久久| 午夜欧美在线一二页| 欧美日韩国产乱码电影| 日本成人在线不卡视频| 欧美电影免费观看高清完整版在线观看 | 麻豆成人91精品二区三区| 日韩视频一区在线观看| 韩国欧美国产一区| 欧美激情综合五月色丁香小说| 国产成人精品影视| 国产精品国产三级国产aⅴ原创| 成人精品视频一区二区三区尤物| 国产精品无码永久免费888| a级高清视频欧美日韩| 综合久久久久久| 欧美性猛片aaaaaaa做受| 日韩av网站免费在线| 精品第一国产综合精品aⅴ| 国产99精品国产| 一二三四区精品视频| 制服丝袜国产精品| 国精品**一区二区三区在线蜜桃| 国产日韩影视精品| 久久精品视频在线免费观看| 成人av网站在线| 亚洲午夜精品一区二区三区他趣| 欧美精品免费视频| 国产激情精品久久久第一区二区| 国产精品国产三级国产普通话99 | 制服丝袜一区二区三区| 韩国视频一区二区| 亚洲三级在线免费| 日韩一区二区在线观看视频| 国产成都精品91一区二区三| 亚洲情趣在线观看| 欧美精三区欧美精三区| 国产一区三区三区| 亚洲精品乱码久久久久久黑人| 欧美日韩mp4| 国产精品一卡二卡在线观看| 亚洲激情av在线| 精品国产乱码久久久久久老虎| 成人av在线播放网站| 蜜臀精品久久久久久蜜臀| 欧美国产精品一区二区| 欧美人与禽zozo性伦| 国产成人精品影视| 丝袜诱惑亚洲看片| 国产精品久久99| 日韩一区二区不卡| 91久久精品一区二区| 国产精一区二区三区| 香蕉久久一区二区不卡无毒影院| 欧美精品一区二区三区四区| 欧美在线看片a免费观看| 国产呦萝稀缺另类资源| 亚洲成人综合视频| 亚洲欧美在线观看| 亚洲精品在线网站| 欧美美女一区二区三区| 99国产精品99久久久久久| 久久国产人妖系列| 性久久久久久久久久久久 |