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

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

?? fullpath.c

?? C標準庫源代碼,能提高對C的理解,不錯的哦
?? C
字號:
/***
*fullpath.c -
*
*       Copyright (c) 1987-1997, Microsoft Corporation. All rights reserved.
*
*Purpose: contains the function _fullpath which makes an absolute path out
*       of a relative path. i.e.  ..\pop\..\main.c => c:\src\main.c if the
*       current directory is c:\src\src
*
*******************************************************************************/

#ifndef _MAC

#include <cruntime.h>
#include <stdio.h>
#include <direct.h>
#include <errno.h>
#include <stdlib.h>
#include <internal.h>
#include <tchar.h>
#include <windows.h>


/***
*_TSCHAR *_fullpath( _TSCHAR *buf, const _TSCHAR *path, maxlen );
*
*Purpose:
*
*       _fullpath - combines the current directory with path to form
*       an absolute path. i.e. _fullpath takes care of .\ and ..\
*       in the path.
*
*       The result is placed in buf. If the length of the result
*       is greater than maxlen NULL is returned, otherwise
*       the address of buf is returned.
*
*       If buf is NULL then a buffer is malloc'ed and maxlen is
*       ignored. If there are no errors then the address of this
*       buffer is returned.
*
*       If path specifies a drive, the curent directory of this
*       drive is combined with path. If the drive is not valid
*       and _fullpath needs the current directory of this drive
*       then NULL is returned.  If the current directory of this
*       non existant drive is not needed then a proper value is
*       returned.
*       For example:  path = "z:\\pop" does not need z:'s current
*       directory but path = "z:pop" does.
*
*
*
*Entry:
*       _TSCHAR *buf  - pointer to a buffer maintained by the user;
*       _TSCHAR *path - path to "add" to the current directory
*       int maxlen - length of the buffer pointed to by buf
*
*Exit:
*       Returns pointer to the buffer containing the absolute path
*       (same as buf if non-NULL; otherwise, malloc is
*       used to allocate a buffer)
*
*Exceptions:
*
*******************************************************************************/


_TSCHAR * __cdecl _tfullpath (
        _TSCHAR *UserBuf,
        const _TSCHAR *path,
        size_t maxlen
        )
{
        _TSCHAR *buf;
        _TSCHAR *pfname;
        unsigned long count;


        if ( !path || !*path )  /* no work to do */
            return( _tgetcwd( UserBuf, maxlen ) );

        /* allocate buffer if necessary */

        if ( !UserBuf )
            if ( !(buf = malloc(_MAX_PATH * sizeof(_TSCHAR))) ) {
                errno = ENOMEM;
                return( NULL );
            }
            else
                maxlen = _MAX_PATH;
        else
            buf = UserBuf;

        count = GetFullPathName ( path,
                                  maxlen,
                                  buf,
                                  &pfname );

        if ( count >= maxlen ) {
            if ( !UserBuf )
                free(buf);
            errno = ERANGE;
            return( NULL );
        }
        else if ( count == 0 ) {
            if ( !UserBuf )
                free(buf);
            _dosmaperr( GetLastError() );
            return( NULL );
        }

        return( buf );

}

#else  /* _MAC */

#include <cruntime.h>
#include <stdio.h>
#include <direct.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <internal.h>
#include <macos\osutils.h>
#include <macos\files.h>
#include <macos\errors.h>
#ifdef _MBCS
#include <mbdata.h>
#include <mbctype.h>
#include <mbstring.h>
int __cdecl isdbcscode (const char *, const char *);
#endif  /* _MBCS */


/***
*char *_fullpath( char *buf, const char *path, maxlen );
*
*Purpose:
*
*       _fullpath - combines the current directory with path to form
*       an absolute path. i.e. _fullpath takes care of ::
*       in the path.
*
*       The result is placed in buf. If the length of the result
*       is greater than maxlen NULL is returned, otherwise
*       the address of buf is returned.
*
*       If buf is NULL then a buffer is malloc'ed and maxlen is
*       ignored. If there are no errors then the address of this
*       buffer is returned.
*
*
*Entry:
*       char *buf  - pointer to a buffer maintained by the user;
*       char *path - path to "add" to the current directory
*       int maxlen - length of the buffer pointed to by buf
*
*Exit:
*       Returns pointer to the buffer containing the absolute path
*       (same as buf if non-NULL; otherwise, malloc is
*       used to allocate a buffer)
*
*Exceptions:
*
*******************************************************************************/

char * __cdecl _fullpath (
        char *UserBuf,
        const char *path,
        size_t maxlen
        )
{
        char    *buf;
        size_t   cbPath;

        if( !path || !*path )   /* no work to do */
            return( _getcwd( UserBuf, maxlen ) );

        if (UserBuf && (strlen(path) > maxlen))
            return NULL;

        /* allocate buffer if necessary */

        if( !UserBuf )
        {
            if( !(buf = malloc(_MAX_PATH)) )
            {
                 errno = ENOMEM;
                 return( NULL );
            }
            else
            {
                maxlen = _MAX_PATH;
            }
        }
        else
        {
            buf = UserBuf;
        }

        cbPath = strlen(path);
        if (cbPath > maxlen)
        {
            if (!UserBuf)
            {
                free(buf);
            }
            errno = ERANGE;
            return NULL;
        }

        maxlen = maxlen - cbPath;
        if (*path == ':')
        {
            maxlen++;        //this ":" is not counted
        }

        if ((*path == ':') ||
#ifndef _MBCS
            (strstr(path, ":") == NULL) )
#else  /* _MBCS */
            (_mbsstr(path, ":") == NULL) )
#endif  /* _MBCS */
        {
            //partial path
            if (_getcwd( buf, maxlen ) != NULL)
            {
                if (*path == ':')
                {
                    strcat(buf, path+1);
                }
                else
                {
                    strcat(buf, path);
                }
            }
            else
            {
                if (!UserBuf)
                {
                    free(buf);
                }
                return( NULL);
            }
        }
        else
        {
            //fullpath
            strcpy(buf, path);
        }

        return buf;

}


#ifdef _MBCS
/***
*       int isdbcscode( char *path, char *buf );
*
*Purpose:
*
*       isdbcscode - Check DBCS Code
*
*Entry:
*       char *path - full path
*       char *buf  - pointer to a buffer maintained by the user;
*
*Exit:
*       TRUE    : -1
*       FALSE   : 0
*
*Exceptions:
*
*******************************************************************************/

int __cdecl __isdbcscode(const char *path, const char *buf)
{
        while(path <= buf && *path++) {
            if(_ISLEADBYTE( *(path - 1) ) )
                if(path == buf)
                    return(-1);
                else
                    path++;
        }

        return 0;

}
#endif  /* _MBCS */

#endif  /* _MAC */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产精品影院| 欧美色精品天天在线观看视频| 中文字幕第一区二区| 视频一区欧美精品| 日韩精品一区二区三区在线播放| 午夜精品成人在线视频| 久久久影院官网| av成人老司机| 日韩黄色在线观看| 亚洲最新在线观看| 91精品国产91久久综合桃花| 国产精品538一区二区在线| 国产欧美视频一区二区三区| 色综合久久久久久久| 秋霞电影网一区二区| 中文字幕av不卡| 国产精品国产自产拍在线| 欧美精品在线观看一区二区| 成人免费视频播放| 日韩av一级片| 夜夜亚洲天天久久| 免费一级欧美片在线观看| 蜜桃av一区二区在线观看| 亚洲欧美电影一区二区| 亚洲精品在线网站| 欧美日韩在线一区二区| 69久久99精品久久久久婷婷 | 白白色亚洲国产精品| 国产99久久久国产精品潘金 | 欧美日本在线视频| 一本久久精品一区二区| 欧美精品aⅴ在线视频| 久久久影视传媒| 夜夜爽夜夜爽精品视频| 麻豆精品一区二区三区| 91亚洲永久精品| 99在线精品视频| 欧美男男青年gay1069videost| 久久色.com| 亚洲精品一区二区三区蜜桃下载| 国产精品女同互慰在线看| 精品国产一区二区精华| 亚洲视频小说图片| 亚洲精品一二三四区| 亚洲综合在线免费观看| 国产中文字幕精品| 国产一区二区精品久久91| 国产美女久久久久| 欧美日韩日本视频| 最新高清无码专区| 久久精品国产99国产| 久久66热re国产| 国产99久久久国产精品免费看| 欧美午夜影院一区| 欧美一级一区二区| 亚洲最新在线观看| 91色porny| 国产欧美精品区一区二区三区 | 日韩三级视频中文字幕| 日韩精品一区二区在线| 一区二区三区中文免费| 豆国产96在线|亚洲| 欧美刺激午夜性久久久久久久| 久久奇米777| 男女男精品网站| 欧美性xxxxx极品少妇| 亚洲欧洲一区二区三区| 五月天亚洲精品| 欧洲一区二区三区免费视频| 日韩欧美亚洲国产另类| 午夜在线成人av| 国产美女在线精品| 欧美va亚洲va在线观看蝴蝶网| 五月天精品一区二区三区| 欧美性一级生活| 一区二区免费在线播放| 欧日韩精品视频| 亚洲乱码国产乱码精品精可以看| 成人免费毛片嘿嘿连载视频| 国产欧美精品日韩区二区麻豆天美| 久久99精品久久久久久国产越南 | 欧美视频一区二区在线观看| 亚洲欧美乱综合| 久久久亚洲精华液精华液精华液| 亚洲视频在线一区观看| 日本精品免费观看高清观看| 视频一区二区三区中文字幕| 亚洲一区二区三区四区五区黄| 免费欧美在线视频| 久久aⅴ国产欧美74aaa| 久色婷婷小香蕉久久| 日韩国产精品久久| 国产一区二区主播在线| 99视频一区二区| 综合亚洲深深色噜噜狠狠网站| 国产福利精品导航| 日本伊人色综合网| 欧美日韩在线综合| 青青草原综合久久大伊人精品优势| 91色.com| 亚洲成人av电影在线| 欧美日韩美少妇| 亚洲一区二区在线免费看| 99re亚洲国产精品| 中文字幕亚洲不卡| 国产女人水真多18毛片18精品视频| 3atv一区二区三区| 青青草国产精品亚洲专区无| 91一区在线观看| 国产色爱av资源综合区| 国产精品自拍在线| 丰满放荡岳乱妇91ww| 色噜噜狠狠色综合欧洲selulu| 欧美日韩在线播放| 精品粉嫩超白一线天av| 自拍偷拍亚洲激情| 国产成人综合亚洲网站| 成人在线一区二区三区| 国产欧美日韩视频在线观看| 精品国产乱码久久久久久1区2区 | 精品久久国产字幕高潮| 成人午夜精品一区二区三区| 午夜久久久久久电影| 中文字幕中文在线不卡住| 88在线观看91蜜桃国自产| 成人av在线电影| 91精品国产色综合久久不卡蜜臀| 国内一区二区在线| 亚洲成a人v欧美综合天堂| 中文字幕不卡在线播放| 91精品国产品国语在线不卡| 91小视频在线| 国产999精品久久久久久绿帽| 日韩精品成人一区二区三区| 亚洲精品一二三区| 国产精品久久久久久久久动漫 | 欧美激情在线观看视频免费| 91精品在线观看入口| 在线亚洲一区二区| 成人av在线观| 欧美一区二区三区的| 欧美体内she精视频| www.激情成人| 成人激情黄色小说| 国产裸体歌舞团一区二区| 久久超碰97人人做人人爱| 午夜精品久久久久久久久| 亚洲精品高清视频在线观看| 亚洲欧洲一区二区在线播放| 国产精品视频观看| 国产精品丝袜久久久久久app| 精品国产123| 久久综合久久综合久久综合| 精品久久久久久久久久久院品网| 在线成人小视频| 欧美一级夜夜爽| 日韩欧美综合一区| 欧美大肚乱孕交hd孕妇| 日韩欧美激情一区| 欧美精品一区二区三区蜜桃| 久久久久久久综合色一本| www激情久久| 国产精品三级视频| 最新久久zyz资源站| 一区二区三区日韩精品视频| 亚洲自拍都市欧美小说| 亚洲成人自拍网| 久久精品国内一区二区三区| 国产真实乱对白精彩久久| 国产夫妻精品视频| 91在线精品秘密一区二区| 91高清在线观看| 欧美挠脚心视频网站| 精品免费日韩av| 欧美极品aⅴ影院| 一级中文字幕一区二区| 日本欧美在线观看| 91精品国产福利在线观看| 精品日韩欧美在线| 国产精品视频第一区| 亚洲国产日日夜夜| 九九国产精品视频| 成人成人成人在线视频| 欧美亚日韩国产aⅴ精品中极品| 日韩一卡二卡三卡国产欧美| 久久久久国产精品厨房| 成人免费一区二区三区视频| 亚洲成人一区二区在线观看| 国产综合久久久久影院| 色婷婷国产精品综合在线观看| 欧美麻豆精品久久久久久| 久久久久久久av麻豆果冻| 亚洲一区二区三区国产| 久久黄色级2电影| 在线亚洲一区观看| 久久久无码精品亚洲日韩按摩| 亚洲天堂2016| 国产一区二区久久| 欧美高清hd18日本| 亚洲视频精选在线|