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

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

?? cenvarg.c

?? C標準庫源代碼
?? C
字號:
/***
*cenvarg.c - set up environment, command line blocks
*
*       Copyright (c) 1986-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
*       defines _cenvarg() - setup environment/command line blocks
*
*******************************************************************************/

#include <cruntime.h>
#include <stdio.h>
#include <errno.h>
#include <msdos.h>
#include <stdlib.h>
#include <stdarg.h>
#include <internal.h>
#include <string.h>
#include <awint.h>
#include <tchar.h>
#include <dbgint.h>

#define ENV_MAX 32767

/* local tchar */
#ifdef WPRFLAG
#define _tenvptr    _wenvptr
#else  /* WPRFLAG */
#define _tenvptr    _aenvptr
#endif  /* WPRFLAG */

/***
*int _cenvarg(argv, envp, argblk, envblk, name) - set up cmd line/environ
*
*Purpose:
*       Set up the block forms of  the environment and the command line.
*       If "envp" is null, "_environ" is used instead.
*       File handle info is passed in the environment if _fileinfo is !0.
*
*Entry:
*       _TSCHAR **argv   - argument vector
*       _TSCHAR **envp   - environment vector
*       _TSCHAR **argblk - pointer to pointer set to malloc'ed space for args
*       _TSCHAR **envblk - pointer to pointer set to malloc'ed space for env
*       _TSCHAR *name    - name of program being invoked
*
*Exit:
*       returns 0 if ok, -1 if fails
*       stores through argblk and envblk
*       (calls malloc)
*
*Exceptions:
*
*******************************************************************************/

#ifdef WPRFLAG
int __cdecl _wcenvarg (
#else  /* WPRFLAG */
int __cdecl _cenvarg (
#endif  /* WPRFLAG */
        const _TSCHAR * const *argv,
        const _TSCHAR * const *envp,
        _TSCHAR **argblk,
        _TSCHAR **envblk,
        const _TSCHAR *name
        )
{
        REG1 const _TSCHAR * const *vp;
        REG2 unsigned tmp;
        REG3 _TSCHAR *cptr;
        unsigned arg_len;
        int cfi_len;            /* counts the number of file handles in CFI */

        /*
         * Null environment pointer "envp" means use global variable,
         * "_environ"
         */

        int cwd_start;
        int cwd_end;            /* length of "cwd" strings in environment */

        /*
         * Allocate space for command line string
         *  tmp counts the number of bytes in the command line string
         *      including spaces between arguments
         *  An empty string is special -- 2 bytes
         */

        for (vp = argv, tmp = 2; *vp; tmp += _tcslen(*vp++) + 1) ;

        arg_len = tmp;

        /*
         * Allocate space for the command line plus 2 null bytes
         */

        if ( (*argblk = _malloc_crt(tmp * sizeof(_TSCHAR))) == NULL)
        {
                *envblk = NULL;
                errno = ENOMEM;
                _doserrno = E_nomem;
                return(-1);
        }

        /*
         * Allocate space for environment strings
         *  tmp counts the number of bytes in the environment strings
         *      including nulls between strings
         *  Also add "_C_FILE_INFO=" string
         */
        if (envp)
                for (vp = envp, tmp = 2; *vp; tmp += _tcslen(*vp++) + 1) ;

        /*
         * The _osfile and _osfhnd arrays are passed as binary data in
         * dospawn.c
         */
        cfi_len = 0;    /* no _C_FILE_INFO */

        if (!envp)
                *envblk = NULL;
        else {
                /*
                 * Now that we've decided to pass our own environment block,
                 * compute the size of the "current directory" strings to
                 * propagate to the new environment.
                 */

#ifdef WPRFLAG
            /*
             * Make sure wide environment exists.
             */
            if (!_wenvptr)
            {
                    if ((_wenvptr = (wchar_t *)__crtGetEnvironmentStringsW()) == NULL)
                    return -1;
            }
#else  /* WPRFLAG */
            if (!_aenvptr)
            {
                    if ((_aenvptr = (char *)__crtGetEnvironmentStringsA()) == NULL)
                    return -1;
            }
#endif  /* WPRFLAG */

            /*
                 * search for the first one
                 */
                for (cwd_start = 0;
                     _tenvptr[cwd_start] != _T('\0') &&
                       _tenvptr[cwd_start] != _T('=');
                     cwd_start += _tcslen(&_tenvptr[cwd_start]) + 1)
                {
                }

                /* find the total size of all contiguous ones */
                cwd_end = cwd_start;
                while (_tenvptr[cwd_end+0] == _T('=') &&
                       _tenvptr[cwd_end+1] != _T('\0') &&
                       _tenvptr[cwd_end+2] == _T(':') &&
                       _tenvptr[cwd_end+3] == _T('='))
                {
                        cwd_end += 4 + _tcslen(&_tenvptr[cwd_end+4]) + 1;
                }
                tmp += cwd_end - cwd_start;

                /*
                 * Allocate space for the environment strings plus extra null byte
                 */
                if( !(*envblk = _malloc_crt(tmp * sizeof(_TSCHAR))) )
            {
                        _free_crt(*argblk);
                        *argblk = NULL;
                        errno = ENOMEM;
                        _doserrno = E_nomem;
                        return(-1);
                }

        }

        /*
         * Build the command line by concatenating the argument strings
         * with spaces between, and two null bytes at the end.
         * NOTE: The argv[0] argument is followed by a null.
         */

        cptr = *argblk;
        vp = argv;

        if (!*vp)       /* Empty argument list ? */
                ++cptr; /* just two null bytes */
        else {          /* argv[0] must be followed by a null */
                _tcscpy(cptr, *vp);
                cptr += _tcslen(*vp++) + 1;
        }

        while( *vp ) {
                _tcscpy(cptr, *vp);
                cptr += _tcslen(*vp++);
                *cptr++ = ' ';
        }

        *cptr = cptr[ -1 ] = _T('\0'); /* remove extra blank, add double null */

        /*
         * Build the environment block by concatenating the environment
         * strings with nulls between and two null bytes at the end
         */

        cptr = *envblk;

        if (envp != NULL) {
                /*
                 * Copy the "cwd" strings to the new environment.
                 */
                memcpy(cptr, &_tenvptr[cwd_start], (cwd_end - cwd_start) * sizeof(_TSCHAR));
                cptr += cwd_end - cwd_start;

                /*
                 * Copy the environment strings from "envp".
                 */
                vp = envp;
                while( *vp ) {
                        _tcscpy(cptr, *vp);
                        cptr += 1 + _tcslen(*vp++);
                }
        }

        if (cptr != NULL) {
                if (cptr == *envblk) {
                        /*
                         * Empty environment block ... this requires two
                         * nulls.
                         */
                        *cptr++ = _T('\0');
                }
                /*
                 * Extra null terminates the segment
                 */
                *cptr = _T('\0');
        }

#ifdef WPRFLAG
        _free_crt(_wenvptr);
        _wenvptr = NULL;
#else  /* WPRFLAG */
        _free_crt(_aenvptr);
        _aenvptr = NULL;
#endif  /* WPRFLAG */
        return(0);
}


#ifndef _M_IX86

/***
*int _capture_argv(arglist, static_argv, max_static_entries) - set up argv array
*       for exec?? functions
*
*Purpose:
*       Set up the argv array for the exec?? functions by captures the
*       arguments from the passed va_list into the static_argv array.  If the
*       size of the static_argv array as specified by the max_static_entries
*       parameter is not large enough, then allocates a dynamic array to hold
*       the arguments. Return the address of the final argv array.  If NULL
*       then not enough memory to hold argument array.  If different from
*       static_argv parameter then call must free the return argv array when
*       done with it.
*
*       The scan of the arglist is terminated when a NULL argument is
*       reached. The terminating NULL parameter is stored in the resulting
*       argv array.
*
*Entry:
*       va_list *arglist          - pointer to variable length argument list.
*       _TSCHAR *firstarg            - first argument to store in array
*       _TSCHAR **static_argv        - pointer to static argv to use.
*       size_t max_static_entries - maximum number of entries that can be
*                                   placed in static_argv array.
*
*Exit:
*       returns NULL if no memory.
*       Otherwise returns pointer to argv array.
*       (sometimes calls malloc)
*
*Exceptions:
*
*******************************************************************************/

#ifdef WPRFLAG
_TSCHAR ** __cdecl _wcapture_argv(
#else  /* WPRFLAG */
_TSCHAR ** __cdecl _capture_argv(
#endif  /* WPRFLAG */
        va_list *arglist,
        const _TSCHAR *firstarg,
        _TSCHAR **static_argv,
        size_t max_static_entries
        )
{
        _TSCHAR ** argv;
        _TSCHAR * nextarg;
        size_t i;
        size_t max_entries;

        nextarg = (_TSCHAR *)firstarg;
        argv = static_argv;
        max_entries = max_static_entries;
        i = 0;
        for (;;) {
            if (i >= max_entries) {
                if (argv == static_argv)
                    argv = _malloc_crt((max_entries * 2) * sizeof(_TSCHAR *));
                else
                    argv = _realloc_crt(argv, (max_entries * 2) * sizeof(_TSCHAR *));

                if (argv == NULL) break;
                max_entries += max_entries;
            }

            argv[ i++ ] = nextarg;
            if (nextarg == NULL) break;
            nextarg = va_arg(*arglist, _TSCHAR *);
        }

        return argv;
}

#endif  /* _M_IX86 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线18| 99热在这里有精品免费| 91在线丨porny丨国产| 中文字幕免费一区| 国产剧情一区二区三区| 日韩午夜激情av| 日韩黄色免费电影| 欧美男女性生活在线直播观看| 一区二区三区中文字幕在线观看| 99久久精品国产一区二区三区| 蜜桃av一区二区三区电影| 91精品国产综合久久久蜜臀粉嫩| 爽好多水快深点欧美视频| 中文字幕高清一区| 日韩一区二区在线观看视频| 99re亚洲国产精品| 国产黄人亚洲片| 亚洲柠檬福利资源导航| 色综合久久88色综合天天免费| 亚洲视频免费观看| 欧美日本一区二区三区四区 | 日本不卡123| 精品国产一区二区三区四区四| 精品一区二区三区影院在线午夜 | 国产亚洲欧美日韩俺去了| 成人精品免费看| 综合分类小说区另类春色亚洲小说欧美| 欧美猛男男办公室激情| 色婷婷综合久色| 成人h动漫精品| 东方aⅴ免费观看久久av| 精品一区二区三区在线观看| 日本亚洲欧美天堂免费| 欧美—级在线免费片| 精品免费视频一区二区| 色综合久久中文字幕| 成人激情图片网| 成人性生交大片免费看视频在线 | 国产成人在线免费观看| 国精产品一区一区三区mba桃花| 国产精品不卡视频| 制服丝袜激情欧洲亚洲| 欧美日韩国产片| 欧美久久一二三四区| 高清久久久久久| 国产传媒一区在线| 国产suv精品一区二区6| 国产精品影视在线观看| 国产不卡在线播放| av在线免费不卡| 91小视频在线观看| 国产麻豆欧美日韩一区| 亚洲第一久久影院| 国产精品欧美极品| 精品盗摄一区二区三区| 精品成人私密视频| 国产欧美日韩久久| 精品日产卡一卡二卡麻豆| 精品国产乱码久久久久久图片| 欧美变态tickle挠乳网站| 久久这里只有精品首页| 欧美精品v国产精品v日韩精品 | 久久久久免费观看| 日韩一区二区视频在线观看| 欧美一区二区黄| 精品国产露脸精彩对白| 欧美成人三级电影在线| 国产精品日日摸夜夜摸av| 18成人在线视频| 久久久久国产精品麻豆ai换脸| 国产精品福利av| 亚洲专区一二三| 亚洲欧美aⅴ...| 日韩精品久久理论片| 国产一区二区三区日韩| 91免费看视频| 欧美一级片在线| 国产精品久久久久影院亚瑟| 亚洲韩国精品一区| 亚洲一区二区美女| 久久不见久久见免费视频7 | 久久久精品黄色| 亚洲老司机在线| 亚洲人亚洲人成电影网站色| 亚洲成人一区二区在线观看| 久久99国产精品久久| 99久久精品国产麻豆演员表| 在线不卡的av| 亚洲欧洲一区二区三区| 日韩av高清在线观看| 成人午夜在线视频| 51久久夜色精品国产麻豆| 中文字幕精品一区 | 丁香婷婷综合色啪| 欧美伦理电影网| 国产精品久久久久久久久久免费看 | 成人国产精品免费观看动漫| 欧美日本在线一区| 中文字幕一区二区三区av| 麻豆国产精品777777在线| 不卡视频在线看| 日韩欧美一级片| 26uuu精品一区二区| 亚洲制服丝袜一区| 国产伦精一区二区三区| 884aa四虎影成人精品一区| 国产精品久久久久影院老司| 捆绑变态av一区二区三区| 一本久久综合亚洲鲁鲁五月天| 欧美va在线播放| 天堂va蜜桃一区二区三区| 99精品视频在线免费观看| 久久综合色综合88| 丝袜美腿高跟呻吟高潮一区| 91麻豆国产自产在线观看| 国产日韩欧美高清| 成人免费视频caoporn| 日韩欧美国产一区在线观看| 亚洲午夜一区二区三区| aaa亚洲精品| 国产精品日韩精品欧美在线| 九一九一国产精品| 欧美一区二区播放| 天涯成人国产亚洲精品一区av| 久88久久88久久久| 日韩一区二区电影| 偷拍自拍另类欧美| 欧美日韩精品福利| 亚洲一区二区视频| 色噜噜偷拍精品综合在线| 欧美一区二区三区爱爱| 亚洲成年人影院| 色av成人天堂桃色av| 亚洲人妖av一区二区| av电影在线观看一区| 亚洲欧洲性图库| 99在线精品免费| 亚洲男人都懂的| 色悠悠久久综合| 亚洲综合色视频| 欧美日韩国产一级片| 舔着乳尖日韩一区| 日韩片之四级片| 黄色精品一二区| 国产色产综合产在线视频| 国产在线播放一区二区三区| 久久综合久久综合久久综合| 加勒比av一区二区| 久久嫩草精品久久久久| 盗摄精品av一区二区三区| 国产精品你懂的在线欣赏| 9i看片成人免费高清| 亚洲精品日日夜夜| 欧美日韩aaa| 蜜桃91丨九色丨蝌蚪91桃色| 久久综合狠狠综合久久激情| 国产成人亚洲精品青草天美| 国产精品国产三级国产三级人妇 | 久久新电视剧免费观看| 国产一区不卡视频| 国产精品萝li| 在线观看免费一区| 国产精品天天看| 色噜噜狠狠色综合中国| 日日摸夜夜添夜夜添精品视频| 日韩免费观看2025年上映的电影| 国产成人在线观看免费网站| **网站欧美大片在线观看| 欧美日韩一区二区欧美激情| 亚洲婷婷国产精品电影人久久| 91黄色免费版| 麻豆国产一区二区| 一二三四社区欧美黄| 91精品午夜视频| 国产高清在线精品| 亚洲精品国产成人久久av盗摄| 欧美一区二区三区免费| 懂色av噜噜一区二区三区av| 一区二区三区四区乱视频| 精品乱码亚洲一区二区不卡| www.在线欧美| 美女在线观看视频一区二区| 国产精品亲子伦对白| 精品视频一区二区不卡| 国产另类ts人妖一区二区| 一区二区三区高清不卡| 26uuuu精品一区二区| 日本韩国欧美国产| 国产一二三精品| 亚洲国产精品久久人人爱蜜臀| 久久久久久麻豆| 在线观看精品一区| 国产91在线看| 日本大胆欧美人术艺术动态| 亚洲欧洲精品天堂一级| 日韩免费观看2025年上映的电影| 色婷婷av久久久久久久| 国产在线视视频有精品| 亚洲国产成人91porn| 成人欧美一区二区三区白人|