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

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

?? misc.c

?? miniucgui1.30版本的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: misc.c,v 1.32 2003/09/04 03:46:47 weiym Exp $**** misc.c: This file include some miscelleous functions. **** Copyright (C) 2003 Feynman Software.** Copyright (C) 1999 ~ 2002 Wei Yongming.**** Create date: 1998/12/31**** Current maintainer: Wei Yongming.*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*** TODO:*/ #include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <errno.h>#include <limits.h>#include <pwd.h>#include <sys/ioctl.h>#include <sys/types.h>#include <linux/kd.h>#include <asm/param.h>#include "common.h"#include "minigui.h"#include "gdi.h"#include "window.h"#include "misc.h"#ifndef _INCORE_RESchar ETCFILEPATH [MAX_PATH + 1];#define ETCFILENAME "MiniGUI.cfg"static BOOL LookForEtcFile (void){    char etcfile [MAX_PATH + 1];    char buff [10];    struct passwd *pwd;    if ((pwd = getpwuid (geteuid ())) != NULL) {        strcpy (etcfile, pwd->pw_dir);        if (etcfile [strlen (etcfile) - 1] != '/')            strcat (etcfile, "/");        strcat (etcfile, ".");        strcat (etcfile, ETCFILENAME);        if (GetValueFromEtcFile (etcfile, "system", "gal_engine", buff, 8) ==  ETC_OK) {            strcpy (ETCFILEPATH, etcfile);            return TRUE;        }    }    strcpy (etcfile, "/usr/local/etc/" ETCFILENAME);    if (GetValueFromEtcFile (etcfile, "system", "gal_engine", buff, 8) ==  ETC_OK) {        strcpy (ETCFILEPATH, etcfile);        return TRUE;    }    strcpy (etcfile, "/etc/" ETCFILENAME);    if (GetValueFromEtcFile (etcfile, "system", "gal_engine", buff, 8) ==  ETC_OK) {        strcpy (ETCFILEPATH, etcfile);        return TRUE;    }        return FALSE;}BOOL InitMisc (void){    if (!LookForEtcFile ())    {        fprintf (stderr, "MISC: Can not locate your MiniGUI.cfg file or bad files!\n");        return FALSE;    }    return TRUE;}void TerminateMisc (void){}#endif /* _INCORE_RES *//****************************** ETC file support ******************************/// This function locate the specified section in the etc file.static int etc_LocateSection(FILE* fp, const char* pSection, FILE* bak_fp){    char szBuff[ETC_MAXLINE + 1];    char* current;    char* tail;    while (TRUE) {        if (!fgets(szBuff, ETC_MAXLINE, fp)) {            if (feof (fp))                return ETC_SECTIONNOTFOUND;            else                return ETC_FILEIOFAILED;        }        else if (bak_fp && fputs (szBuff, bak_fp) == EOF)            return ETC_FILEIOFAILED;                current = szBuff;        while (*current == ' ' ||  *current == '\t') current++;         if (*current == ';' || *current == '#') continue;        if (*current++ == '[')             while (*current == ' ' ||  *current == '\t') current ++;        else            continue;        // Locate the tail.        tail = current;        while (*tail != ']' && *tail != '\n' &&              *tail != ';' && *tail != '#' && *tail != '\0')              tail++;        *tail = '\0';        while (*tail == ' ' || *tail == '\t') {            *tail = '\0';            tail--;         }                    if (strcmp (current, pSection) == 0)            return ETC_OK;     }    return ETC_SECTIONNOTFOUND;}// This function locate the specified key in the etc file.static int etc_LocateKeyValue(FILE* fp, const char* pKey,                                BOOL bCurSection, char* pValue, int iLen,                               FILE* bak_fp, char* nextSection){    char szBuff[ETC_MAXLINE + 1 + 1];    char* current;    char* tail;    char* value;    while (TRUE) {        if (!fgets(szBuff, ETC_MAXLINE, fp))            return ETC_FILEIOFAILED;        if (szBuff [strlen (szBuff) - 1] == '\n')            szBuff [strlen (szBuff) - 1] = '\0';        current = szBuff;        while (*current == ' ' ||  *current == '\t') current++;         if (*current == ';' || *current == '#') continue;        if (*current == '[') {            if (bCurSection) {                strcpy (nextSection, current);                return ETC_KEYNOTFOUND;             }            else                continue;        }        tail = current;        while (*tail != '=' && *tail != '\n' &&              *tail != ';' && *tail != '#' && *tail != '\0')              tail++;        value = tail + 1;        if (*tail != '=')            *value = '\0';         *tail-- = '\0';        while (*tail == ' ' || *tail == '\t') {            *tail = '\0';            tail--;         }                    if (strcmp (current, pKey) == 0) {            tail = value;            while (*tail != '\n' && *tail != '\0') tail++;            *tail = '\0';             if (pValue)                strncpy (pValue, value, iLen);            return ETC_OK;         }        else if (bak_fp && *current != '\0')            fprintf (bak_fp, "%s=%s\n", current, value);    }    return ETC_KEYNOTFOUND;}/* 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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产另类专区| 国产美女久久久久| 亚洲视频免费观看| 国产精品蜜臀av| 国产午夜亚洲精品理论片色戒 | 久久新电视剧免费观看| 91麻豆精品国产91久久久使用方法 | 精品国产区一区| 欧美一区二区三区视频免费播放| 精品视频免费在线| 欧美精品自拍偷拍| 51久久夜色精品国产麻豆| 91麻豆精品国产| 精品奇米国产一区二区三区| 精品久久一区二区| 久久久久国色av免费看影院| 久久久精品国产99久久精品芒果| 欧美亚日韩国产aⅴ精品中极品| 国产一区不卡视频| 盗摄精品av一区二区三区| 成人免费视频视频在线观看免费 | 成人在线视频一区| 91原创在线视频| 91丨porny丨户外露出| 日本精品一级二级| 91精品国产综合久久久久久久 | 亚洲一区二区三区爽爽爽爽爽| 一区二区三区日韩欧美精品| 26uuu精品一区二区| 精品国产不卡一区二区三区| 国产欧美精品一区二区三区四区 | 成人午夜视频在线观看| 91麻豆高清视频| 欧美日韩精品免费观看视频| 精品国精品国产尤物美女| 中文字幕亚洲视频| 亚洲电影你懂得| 国产在线播放一区二区三区| av电影在线观看不卡| 91久久精品一区二区三区| 91麻豆精品国产91久久久久久| 国产蜜臀97一区二区三区 | 亚洲国产精品黑人久久久| 国产精品第一页第二页第三页| 一区二区三区电影在线播| 蜜桃91丨九色丨蝌蚪91桃色| 成人黄页在线观看| 欧美久久一二三四区| 国产三级久久久| 亚洲午夜激情av| 国产一区二区美女| 欧美亚洲综合一区| 国产欧美综合色| 视频精品一区二区| 波多野结衣一区二区三区| 欧美裸体一区二区三区| 国产日韩欧美麻豆| 亚洲成av人片一区二区梦乃| 日av在线不卡| 免费日本视频一区| 99久久精品99国产精品| 欧美一区午夜视频在线观看| 国产精品素人一区二区| 日本亚洲最大的色成网站www| 成人激情黄色小说| 亚洲精品一区二区三区影院| 亚洲制服丝袜av| 成人小视频免费观看| 日韩美一区二区三区| 亚洲午夜av在线| av在线播放一区二区三区| 日韩精品一区国产麻豆| 亚洲国产视频直播| 菠萝蜜视频在线观看一区| 欧美成va人片在线观看| 一区二区三区免费看视频| 亚洲福中文字幕伊人影院| 99re亚洲国产精品| 欧美精品一区二区三区四区| 日韩精品一级二级| 91久久精品日日躁夜夜躁欧美| 国产亚洲精品久| 极品少妇xxxx偷拍精品少妇| 91麻豆精品国产| 亚洲成人午夜电影| 在线精品观看国产| 亚洲欧美一区二区久久| 成人av电影在线网| 国产色产综合产在线视频| 精品一区二区久久| 日韩欧美成人一区二区| 日韩专区在线视频| 欧美日韩你懂得| 成人免费一区二区三区视频| 亚洲制服欧美中文字幕中文字幕| 91一区在线观看| 中文字幕视频一区| 972aa.com艺术欧美| 国产精品麻豆99久久久久久| 国产成人精品aa毛片| 日本一区二区电影| 成人av在线电影| 国产精品欧美极品| 成人精品高清在线| 亚洲欧美自拍偷拍色图| www.色综合.com| 亚洲天天做日日做天天谢日日欢| 不卡影院免费观看| 亚洲婷婷在线视频| 欧美调教femdomvk| 日韩专区中文字幕一区二区| 日韩欧美你懂的| 亚洲欧美一区二区视频| 高清不卡一二三区| 国产精品久久网站| 一本色道亚洲精品aⅴ| 亚洲精品欧美二区三区中文字幕| 一本色道a无线码一区v| 亚洲在线免费播放| 51精品视频一区二区三区| 美女尤物国产一区| 国产亚洲婷婷免费| 成人一区二区三区中文字幕| 中文字幕日本不卡| 欧美三级资源在线| 日本强好片久久久久久aaa| 日韩精品一区二| 国产91精品露脸国语对白| 自拍视频在线观看一区二区| 欧洲av一区二区嗯嗯嗯啊| 三级在线观看一区二区| 色综合中文字幕国产 | 欧美日韩一二三| 美女诱惑一区二区| 国产精品污www在线观看| 一本色道久久综合精品竹菊| 日韩国产精品久久久| 久久天堂av综合合色蜜桃网| 色综合天天综合网天天看片| 石原莉奈在线亚洲二区| 日本一区免费视频| 在线观看不卡一区| 久久国产日韩欧美精品| 国产精品美女久久久久久久久| 欧美国产日韩在线观看| 久久久噜噜噜久久人人看| 不卡的av网站| 日本午夜精品视频在线观看| 久久精品欧美日韩精品| 色94色欧美sute亚洲线路一久| 丝袜美腿亚洲综合| 国产欧美日韩精品a在线观看| 欧美亚洲免费在线一区| 国产精品一区专区| 亚洲国产欧美在线人成| 久久久青草青青国产亚洲免观| 在线观看成人小视频| 国产美女一区二区| 亚洲成人tv网| 国产精品视频yy9299一区| 欧美丰满美乳xxx高潮www| 成人高清伦理免费影院在线观看| 肉色丝袜一区二区| 中文字幕亚洲视频| 久久久亚洲国产美女国产盗摄 | 91福利在线观看| 国产一区二区免费在线| 五月天激情综合网| 国产精品国产三级国产aⅴ中文| 欧美一区二区三区精品| 色天天综合久久久久综合片| 国产盗摄视频一区二区三区| 肉色丝袜一区二区| 一区二区三区视频在线看| 国产色91在线| 日韩欧美成人一区二区| 欧美日韩国产综合视频在线观看| 成人福利在线看| 国产成人小视频| 毛片av一区二区三区| 亚洲国产精品久久久久婷婷884| 国产精品国产馆在线真实露脸| 日韩女优毛片在线| 欧美日韩一区二区三区四区| 国产激情视频一区二区在线观看| 亚洲欧美一区二区三区极速播放| 亚洲国产高清在线观看视频| 久久伊人蜜桃av一区二区| 91精品国产一区二区三区香蕉| 色欧美片视频在线观看在线视频| 国产成人精品亚洲日本在线桃色| 免费日本视频一区| 婷婷综合另类小说色区| 一区二区视频在线| 中文字幕一区二区三区四区 | 久久国产麻豆精品| 奇米一区二区三区| 日韩精品欧美精品| 三级在线观看一区二区 | 色噜噜狠狠色综合欧洲selulu|