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

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

?? misc.c

?? 這是針對(duì) Linux (i386)平臺(tái)的 minigui 3.6.2 開發(fā)包(MiniGUI-Processes 運(yùn)行模式)。
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
    int max_sect_nr = 15;    ETC_S *petc;    if (!(fp = fopen(pEtcFile, "r")))         return ETC_FILENOTFOUND;    petc = (ETC_S*) malloc (sizeof(ETC_S));    petc->section_nr = 0;    /* we allocate 15 sections first */    petc->sections = (PETCSECTION) malloc (sizeof(ETCSECTION)*max_sect_nr);    while (etc_ReadSection (fp, petc->sections + petc->section_nr) == ETC_OK) {        petc->section_nr ++;        if (petc->section_nr == max_sect_nr) {            /* add 5 sections each time we realloc */            max_sect_nr += 5;            petc->sections = realloc (petc->sections, sizeof(ETCSECTION)*max_sect_nr);        }    }    fclose (fp);    return (GHANDLE)petc;}int GUIAPI UnloadEtcFile (GHANDLE hEtc){    int i;    ETC_S *petc = (ETC_S*) hEtc;    if (!petc)        return -1;    for (i=0; i<petc->section_nr; i++) {        PETCSECTION psect = petc->sections + i;        int j;        if (!psect)           continue;        for (j=0; j<psect->key_nr; j++) {            free (psect->keys[j]);            free (psect->values[j]);        }        free (psect->keys);        free (psect->values);        free (psect->name);    }    free (petc->sections);    free (petc);    return 0;}int GUIAPI GetValueFromEtc (GHANDLE hEtc, const char* pSection,                            const char* pKey, char* pValue, int iLen){    int i;    ETC_S *petc = (ETC_S*) hEtc;    PETCSECTION psect = NULL;    if (!petc || !pValue)        return -1;    for (i=0; i<petc->section_nr; i++) {        psect = petc->sections + i;        if (!psect)           continue;        if (strcmp (psect->name, pSection) == 0) {            break;        }    }    if (i >= petc->section_nr)        return ETC_SECTIONNOTFOUND;    for (i=0; i<psect->key_nr; i++) {        if (strcmp (psect->keys[i], pKey) == 0) {            break;        }    }    if (i >= psect->key_nr)        return ETC_KEYNOTFOUND;    if (iLen > 0) { /* get value */        strncpy (pValue, psect->values[i], iLen);    }    else { /* set value */        free (psect->values[i]);        psect->values[i] = strdup(pValue);    }    return ETC_OK;}int GUIAPI GetIntValueFromEtc (GHANDLE hEtc, const char* pSection,                               const char* pKey, int* value){    int ret;    char szBuff [51];    ret = GetValueFromEtc (hEtc, pSection, pKey, szBuff, 50);    if (ret < 0) {        return ret;    }    *value = strtol (szBuff, NULL, 0);    if ((*value == LONG_MIN || *value == LONG_MAX) && errno == ERANGE)        return ETC_INTCONV;    return ETC_OK;}/* Function: GetValueFromEtcFile(const char* pEtcFile, const char* pSection, *                               const char* pKey, char* pValue, int iLen); * Parameter: *     pEtcFile: etc file path name. *     pSection: Section name. *     pKey:     Key name. *     pValue:   The buffer will store the value of the key. *     iLen:     The max length of value string. * Return: *     int               meaning *     ETC_FILENOTFOUND           The etc file not found.  *     ETC_SECTIONNOTFOUND        The section is not found.  *     ETC_EKYNOTFOUND        The Key is not found. *     ETC_OK            OK. */int GUIAPI GetValueFromEtcFile(const char* pEtcFile, const char* pSection,                               const char* pKey, char* pValue, int iLen){    FILE* fp;    char tempSection [ETC_MAXLINE + 2];    if (!(fp = fopen(pEtcFile, "r")))         return ETC_FILENOTFOUND;    if (pSection)         if (etc_LocateSection (fp, pSection, NULL) != ETC_OK) {             fclose (fp);             return ETC_SECTIONNOTFOUND;         }    if (etc_LocateKeyValue (fp, pKey, pSection != NULL,                 pValue, iLen, NULL, tempSection) != ETC_OK) {         fclose (fp);         return ETC_KEYNOTFOUND;    }    fclose (fp);    return ETC_OK;}/* Function: GetIntValueFromEtcFile(const char* pEtcFile, const char* pSection, *                               const char* pKey); * Parameter: *     pEtcFile: etc file path name. *     pSection: Section name. *     pKey:     Key name. * Return: *     int                      meaning *     ETC_FILENOTFOUND             The etc file not found.  *     ETC_SECTIONNOTFOUND          The section is not found.  *     ETC_EKYNOTFOUND              The Key is not found. *     ETC_OK                       OK. */int GUIAPI GetIntValueFromEtcFile(const char* pEtcFile, const char* pSection,                               const char* pKey, int* value){    int ret;    char szBuff [51];    ret = GetValueFromEtcFile (pEtcFile, pSection, pKey, szBuff, 50);    if (ret < 0)        return ret;    *value = strtol (szBuff, NULL, 0);    if ((*value == LONG_MIN || *value == LONG_MAX) && errno == ERANGE)        return ETC_INTCONV;    return ETC_OK;}static int etc_CopyAndLocate (FILE* etc_fp, FILE* tmp_fp,                 const char* pSection, const char* pKey, char* tempSection){    if (pSection && etc_LocateSection (etc_fp, pSection, tmp_fp) != ETC_OK)        return ETC_SECTIONNOTFOUND;    if (etc_LocateKeyValue (etc_fp, pKey, pSection != NULL,                 NULL, 0, tmp_fp, tempSection) != ETC_OK)        return ETC_KEYNOTFOUND;    return ETC_OK;}static int etc_FileCopy (FILE* sf, FILE* df){    char line [ETC_MAXLINE + 1];        while (fgets (line, ETC_MAXLINE + 1, sf) != NULL)        if (fputs (line, df) == EOF) {            return ETC_FILEIOFAILED;        }    return ETC_OK;}/* Function: SetValueToEtcFile(const char* pEtcFile, const char* pSection, *                               const char* pKey, char* pValue); * Parameter: *     pEtcFile: etc file path name. *     pSection: Section name. *     pKey:     Key name. *     pValue:   Value. * Return: *     int                      meaning *     ETC_FILENOTFOUND         The etc file not found. *     ETC_TMPFILEFAILED        Create tmp file failure. *     ETC_OK                   OK. */int GUIAPI SetValueToEtcFile (const char* pEtcFile, const char* pSection,                               const char* pKey, char* pValue){    FILE* etc_fp;    FILE* tmp_fp;    int rc;    char tempSection [ETC_MAXLINE + 2];#ifndef HAVE_TMPFILE    char tmp_nam [256];    sprintf (tmp_nam, "/tmp/mg-etc-tmp-%lx", time(NULL));    if ((tmp_fp = fopen (tmp_nam, "w+")) == NULL)        return ETC_TMPFILEFAILED;#else    if ((tmp_fp = tmpfile ()) == NULL)        return ETC_TMPFILEFAILED;#endif    if (!(etc_fp = fopen (pEtcFile, "r+"))) {        fclose (tmp_fp);#ifndef HAVE_TMPFILE        unlink (tmp_nam);#endif        if (!(etc_fp = fopen (pEtcFile, "w"))) {            return ETC_FILEIOFAILED;        }        fprintf (etc_fp, "[%s]\n", pSection);        fprintf (etc_fp, "%s=%s\n", pKey, pValue);        fclose (etc_fp);        return ETC_OK;    }    switch (etc_CopyAndLocate (etc_fp, tmp_fp, pSection, pKey, tempSection)) {    case ETC_SECTIONNOTFOUND:        fprintf (tmp_fp, "\n[%s]\n", pSection);        fprintf (tmp_fp, "%s=%s\n", pKey, pValue);        break;        case ETC_KEYNOTFOUND:        fprintf (tmp_fp, "%s=%s\n\n", pKey, pValue);        fprintf (tmp_fp, "%s\n", tempSection);    break;    default:        fprintf (tmp_fp, "%s=%s\n", pKey, pValue);        break;    }    if ((rc = etc_FileCopy (etc_fp, tmp_fp)) != ETC_OK)        goto error;        // replace etc content with tmp file content    // truncate etc content first    fclose (etc_fp);    if (!(etc_fp = fopen (pEtcFile, "w"))) {        fclose (tmp_fp);#ifndef HAVE_TMPFILE        unlink (tmp_nam);#endif        return ETC_FILEIOFAILED;    }        rewind (tmp_fp);    rc = etc_FileCopy (tmp_fp, etc_fp);error:    fclose (etc_fp);    fclose (tmp_fp);#ifndef HAVE_TMPFILE    unlink (tmp_nam);#endif    return rc;}/****************************** Ping and Beep *********************************/void GUIAPI Ping(void){    putchar ('\a');    fflush (stdout);}#if !defined (__NOUNIX__) && !defined(__CYGWIN__) && defined(i386)#include <linux/kd.h>#include <asm/param.h>void GUIAPI Tone (int frequency_hz, int duration_ms){    /* FIXME: Tone will not work in X Window */    long argument = (1190000 / frequency_hz) | ((duration_ms / (1000/HZ)) << 16);    ioctl (0, KDMKTONE, (long) argument);}#endifchar* strnchr (const char* s, size_t n, int c){    size_t i;        for (i=0; i<n; i++) {        if ( *s == c)            return (char *)s;        s ++;    }    return NULL;}int substrlen (const char* text, int len, char delimiter, int* nr_delim){    char* substr;    *nr_delim = 0;    if ( (substr = strnchr (text, len, delimiter)) == NULL)        return len;    len = substr - text;    while (*substr == delimiter) {        (*nr_delim) ++;        substr ++;    }    return len;}char * strtrimall( char *src){    int  nIndex1;    int  nLen;    if (src == NULL)        return NULL;    if (src [0] == '\0')        return src;    nLen = strlen (src);    nIndex1 = 0;    while (isspace (src [nIndex1]))        nIndex1 ++;    if (nIndex1 == nLen) {        *src = '\0';        return src;    }    strcpy (src, src + nIndex1);    nLen = strlen (src);    nIndex1 = nLen - 1;    while (isspace (src [nIndex1]))        nIndex1 --;    src [nIndex1 + 1] = '\0';      return src;}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久久久久久久| 久久久午夜精品理论片中文字幕| 国产区在线观看成人精品| 在线观看网站黄不卡| 国产成人综合亚洲网站| 日本午夜一本久久久综合| 18涩涩午夜精品.www| 精品sm捆绑视频| 91麻豆精品国产91久久久更新时间| 成人免费视频国产在线观看| 久久99精品久久久久久国产越南 | 一区二区三区自拍| 久久奇米777| 日韩精品综合一本久道在线视频| 91蜜桃在线免费视频| 丁香天五香天堂综合| 狠狠色狠狠色综合系列| 亚洲成av人片| 亚洲欧美日韩国产一区二区三区| 久久久精品免费免费| 欧美成人女星排行榜| 欧美一区二区成人6969| 欧美日韩电影一区| 欧美日韩你懂的| 欧美视频中文字幕| 欧洲亚洲精品在线| 在线观看免费视频综合| 一本一本大道香蕉久在线精品| 国产盗摄女厕一区二区三区| 国产一区二区三区最好精华液| 男男成人高潮片免费网站| 视频在线观看一区| 男男gaygay亚洲| 免费观看91视频大全| 看国产成人h片视频| 麻豆高清免费国产一区| 免费欧美在线视频| 免费成人av资源网| 国内精品嫩模私拍在线| 国产在线精品一区二区三区不卡| 激情五月婷婷综合网| 狠狠色2019综合网| 国产寡妇亲子伦一区二区| 国产精品白丝jk白祙喷水网站| 国产成人欧美日韩在线电影| 高潮精品一区videoshd| 成人18视频在线播放| 91社区在线播放| 欧美色网一区二区| 日韩欧美一区二区不卡| 久久久亚洲高清| 国产精品美日韩| 亚洲蜜桃精久久久久久久| 午夜精品一区二区三区电影天堂 | 成人一区二区视频| 91女神在线视频| 欧美精品vⅰdeose4hd| 日韩精品一区在线| 中文字幕av一区二区三区高| ...av二区三区久久精品| 一区二区三区高清| 老司机精品视频一区二区三区| 国产激情视频一区二区在线观看| av激情综合网| 欧美日韩高清一区二区三区| 日韩精品一区二区在线观看| 欧美激情综合五月色丁香小说| 亚洲黄色小说网站| 轻轻草成人在线| 国产成人综合亚洲91猫咪| 日本韩国欧美在线| 欧美一区二区免费观在线| 国产亚洲欧美日韩日本| 亚洲一区二区三区精品在线| 国内精品写真在线观看| 91年精品国产| 精品国产网站在线观看| **网站欧美大片在线观看| 日韩福利电影在线观看| yourporn久久国产精品| 欧美蜜桃一区二区三区| 国产欧美视频一区二区| 亚洲成av人在线观看| 粉嫩av一区二区三区在线播放| 欧美日韩一级二级| 国产精品麻豆一区二区| 久久激情综合网| 色嗨嗨av一区二区三区| 久久久精品国产免费观看同学| 亚洲第四色夜色| 高清av一区二区| 日韩免费视频一区| 亚洲线精品一区二区三区八戒| 国产精品18久久久| 欧美一区在线视频| 亚洲综合激情网| 成人福利视频网站| 久久综合狠狠综合久久激情 | 日韩国产欧美一区二区三区| 99综合电影在线视频| 精品精品欲导航| 香蕉成人啪国产精品视频综合网| 懂色av一区二区三区免费观看| 欧美高清视频不卡网| 综合久久国产九一剧情麻豆| 国产精品一区二区在线播放| 欧美一级xxx| 午夜婷婷国产麻豆精品| 91蝌蚪porny| 中文字幕av一区二区三区免费看| 久久99日本精品| 4438x成人网最大色成网站| 一区二区在线看| 91色乱码一区二区三区| 国产精品毛片无遮挡高清| 国产精品原创巨作av| 亚洲精品一区二区三区影院| 日韩高清不卡在线| 欧美日韩精品福利| 亚洲成人免费观看| 欧美专区亚洲专区| 亚洲欧美欧美一区二区三区| 99视频在线精品| 中文字幕一区在线观看视频| 成人免费视频视频| 国产精品免费aⅴ片在线观看| 韩国毛片一区二区三区| 久久综合色鬼综合色| 精品一区二区av| 久久亚洲综合色一区二区三区 | 九九国产精品视频| 欧美精品一区二区三| 狠狠色狠狠色合久久伊人| 久久久精品欧美丰满| 国产成人免费xxxxxxxx| 中文字幕乱码久久午夜不卡 | 色噜噜狠狠色综合欧洲selulu| 亚洲视频免费在线| 91国内精品野花午夜精品| 亚洲一线二线三线视频| 欧美日韩在线一区二区| 五月激情六月综合| 欧美电影免费提供在线观看| 久久国产生活片100| 久久美女艺术照精彩视频福利播放| 国产在线精品一区二区| 欧美高清在线一区| 91在线精品秘密一区二区| 一区二区三区在线免费观看| 欧美精品在线观看播放| 国产综合一区二区| 国产精品久久午夜夜伦鲁鲁| 91欧美激情一区二区三区成人| 亚洲一二三区在线观看| 欧美一级日韩免费不卡| 国产一区二区三区国产| 亚洲私人影院在线观看| 欧美日韩一区视频| 国内偷窥港台综合视频在线播放| 日本一区二区三区dvd视频在线| 91亚洲精华国产精华精华液| 五月天丁香久久| 国产日韩欧美电影| 欧美三级电影一区| 激情五月婷婷综合| 亚洲精品免费在线| 精品日韩一区二区| 99re免费视频精品全部| 日本午夜一区二区| 国产精品久久久久一区二区三区共| 在线精品视频小说1| 久久av中文字幕片| 亚洲欧美一区二区三区极速播放| 欧美日韩另类一区| 国产成人亚洲综合a∨婷婷图片| 一区二区三区在线免费观看| 26uuu另类欧美| 欧美性极品少妇| 国产成人8x视频一区二区| 亚洲成人自拍一区| 欧美国产禁国产网站cc| 欧美丰满少妇xxxxx高潮对白| 风流少妇一区二区| 午夜不卡av免费| 亚洲国产精品激情在线观看| 精品视频一区二区不卡| 丁香激情综合五月| 免费日本视频一区| 亚洲一区二区三区四区在线免费观看| 久久人人97超碰com| 69久久夜色精品国产69蝌蚪网| 成人黄色av网站在线| 久草精品在线观看| 午夜精品久久久久久久蜜桃app| 国产精品素人一区二区| 日韩一级黄色片| 欧美探花视频资源| 91网址在线看| 国产成人亚洲综合色影视| 麻豆精品一区二区|