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

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

?? batch.c

?? Dos7.01的源代碼
?? C
?? 第 1 頁 / 共 5 頁
字號(hào):
	    }

	    if(forptr->sflg)			/* Search for the next file  */
		i = ms_x_next(&forptr->search); /* file on the disk if	     */
	    else				/* FOR_SFLG otherwise get first */
		i = ms_x_first(fp, ATTR_RO, &forptr->search);

	    if(i < 0) { 			/* If the search failed      */
		forptr->sflg = NO;		/* then update the FOR	     */
		forptr->files += strlen(fp)+1;	/* pointer to the next file  */
		continue;			/* in the search list.	     */
	    }					/* and get the next  entry   */

	    fp = (BYTE *) heap();
	    strip_path(forptr->files, fp);	/* Extract the Path	     */
	    strcat(fp, forptr->search.fname);	/* and then add the matching */
	    forptr->sflg = YES; 		/* filename and update the   */
	    strupr(fp); 			/* variables.		     */
	    break;				/* Force name to uppercase   */
	}

 	s = forptr->cmd;
 	t = line;
 	while (*s && (t - line) < MAX_LINE) {	/* Copy the command 	 */
 	    if(*s == '%' && *(s+1) == forptr->forvar) { /* line looking for  */
 		s += 2; 			/* the imbedded %c and insert*/
 		bp1 = fp;			/* the current substition    */
 		while(*bp1 && (t - line) < MAX_LINE) /* string pointed at by FP   */
 		    copy_char(&t, &bp1);
 		continue;
 	    }
 
 	    copy_char(&t, &s);
 	}
 
 	*t = '\0';	 			/* and terminate the string */
}

/*.pa*/
/*
 *	BATCH FILE CONTROL ROUTINES
 *	===========================
 *
 *	The following routines provide the interface from COMMAND.COM to
 *	a batch file. BATCH_START sets up all the local variables to enable
 *	batch processing while BATCH_END terminates batch processing. BATCH_READ
 *	reads a line of data from the batch file and expands it to contain the
 *	command line variables and variables from the environment.
 */
GLOBAL VOID batch_start(argv0, path, tail)
BYTE	*argv0;			/* Invoking Command	*/ 
BYTE	*path;			/* Complete filename	*/
BYTE	*tail;			/* Command Line Options	*/
{
BYTE *s2;
BYTE	dirbuf[MAX_PATHLEN];
WORD	i;

	if(batchflg)			/* If a batch file is currently */
	    batch_close();		/* close it. So minimum number	*/
					/* of handles are used. 	*/

	s2 = path;			/* Save the original Path	*/
	if((path = d_check(path)) == NULL)  /* Check that the file	*/
	    return;			    /* exists.			*/

	batch_new();			/* new incarnation of batch	*/
	
	forptr = (FCONTROL *) NULL;	/* Disable current FOR control	*/
	for_flag = NO;			/* and Global FOR flag		*/

	/*
	 *	Generate the full path specification for the batch file
	 *	and store in the batch control information. If the user
	 *	has specified the full path use it otherwise determine the
	 *	full path using ms_x_curdir.
	 */
	if (ddrive != -1 && *path != *pathchar) {
	    ms_x_curdir(ddrive+1, dirbuf);
	    sprintf(heap(), "%c:%s%s%s%s", ddrive + 'A',
					 pathchar,
					 dirbuf,
					 (*dirbuf ? pathchar : ""),
					 path);
	}
	else if (ddrive != -1)
	    sprintf(heap(), "%c:%s", ddrive + 'A', path);
	else
	    ms_x_expand(heap(), path);

	for (i=0; i<MAX_PATHLEN; i++)	/* save the batch pathname */
	    batch->batfile[i] = heap()[i];
	batch->batfile[MAX_PATHLEN-1] = 0;

	/*
	 *	Copy the invoking command and the individual elements
	 *	of the command line into a buffer ready for processing
	 */
	batch->batcmd = (BYTE *)heap();	/* Initialize Parameter Buffer	*/
	strcpy(heap(), argv0);		/* Copy the invoking command	*/
	heap_get(strlen(heap())+1);	/* and protect the buffer	*/

	while(*tail) {			/* While there are command line */
	    s2 = (BYTE *)heap();	/* parameters copy them 	*/
	    while(*tail && strchr(batch_sep, *tail))
		tail = skip_char(tail);

	    while(*tail && !strchr(batch_sep, *tail))
		copy_char(&s2, &tail);

	    *s2++ = '\0';
	    heap_get(strlen(heap()) + 1);
	}

	*(WORD *)heap_get(2) = 0;	/* Double NULL is a terminator	 */
					/* for command line params	 */

	if(in_flag & REDIR_ACTIVE)	/* If Input redirection has been */
	    in_flag |= REDIR_BATCH;	/* enabled for this command force*/
					/* it on for the complete command*/

	if(out_flag & REDIR_ACTIVE)	/* If Output redirection has been*/
	    out_flag |= REDIR_BATCH;	/* enabled for this command force*/
					/* it on for the complete command*/


	batchflg++;			/* increment batch flag		*/

	crlfflg  = YES;			/* print CR/LF after this  */
}

GLOBAL VOID batch_endall()		/* This terminates BATCH	*/
{					/* processing by closing ALL	*/
	while(batchflg) {		/* active batch files		*/
	    batch_end();
	}
}

GLOBAL VOID batch_end()			/* This function is called for	*/
{					/* both NORMAL and ABNORMAL	*/
	if(batchflg == 0)		/* termination of batch file	*/
	    return;			/* processing			*/

	boot_key_scan_code = 0;

	batch_close();			/* Close the Batch file 	*/
	for_end();			/* Terminate Any FOR command	*/
	batch_old();			/* Restore the previous batch 	*/
					/*  control structures to heap	*/
	if(--batchflg == 0) {
	    *batch_seg_ptr = 0;
	    echoflg = echoflg_save2;	/* Restore the original ECHO	*/
	    crlfflg = YES;		/* flag and set CR/LF flag when */
	}				/* returning to the keyboard.	*/
}


MLOCAL BOOLEAN batch_open()
{
WORD	h, i;
BYTE	*name;

	if(batch->eof) {		/* If the End of the batch file */
	    batch_end();		/* was discovered last time then*/
	    return FALSE;		/* End Batch file input and exit*/
	}
	
	if(batch->stream != CLOSED)
	    return batch->stream;

	name = heap();

	for (i=0; i<MAX_PATHLEN; i++)
	    name[i] = batch->batfile[i];
	while ((h = ms_x_open(name, OPEN_READ)) < 0) {
	    err_flag = TRUE;
	    eprintf(MSG_BATMISS, name);	/* prompt for batch file    */
	    heap_get(strlen(name)+1);
	    cmd_pause("");
	    heap_set(name);
	}
	err_flag = FALSE;
	batch->stream = h;
	return TRUE;
}

GLOBAL VOID batch_close()
{
	if(batchflg != 0 && 
	       batch->stream != CLOSED) {	/* Check if the batch file  */
	    batch_cnt = 0;			/* currently open if YES    */
	    ms_x_close(batch->stream);		/* then flush the internal  */
	    batch->stream = CLOSED;		/* buffer and close file.   */
	}
}

#if defined(DOSPLUS)

GLOBAL VOID inherit_batch_file(bc)
BCONTROL FAR *bc;
{
	WORD	i;
	BYTE	FAR *p_heap;
	BYTE	*l_heap;

	/* inherit any parent batch file first */
	if (bc->bcontrol) inherit_batch_file(bc->bcontrol);

	/* create a new batch structure */
	batch_new();

	batch->offset = bc->offset;	/* continue at same offset */
	for (i=0;i<4;i++) batch->ret_offset[i] = bc->ret_offset[i];
	batch->batshift = bc->batshift;

	for (i=0; i<MAX_PATHLEN; i++)	/* get the batch pathname */
	    batch->batfile[i] = bc->batfile[i];
	batch->batfile[MAX_PATHLEN-1] = 0;
	
	/* get command line */

	p_heap = MK_FP(*parent_psp+16,bc->batcmd);
	l_heap = heap();		

	while (1) {
	     while(*p_heap) *l_heap++ = *p_heap++;
	     *l_heap++ = *p_heap++;
	     if (*p_heap == 0) {
	         *l_heap = 0;
		 break;
	     }
	}
	heap_get(l_heap-heap());

	batchflg++;
}


GLOBAL VOID inherit_parent_state()
{
	UWORD	FAR *p;
	BCONTROL FAR *bc;
	UWORD	root_psp;
	
	root_psp = *parent_psp;
	while(1) {
	    p = MK_FP(root_psp-1,8);
	    if (p[0] == 0x4F43 && p[1] == 0x4D4D &&
	        p[2] == 0x4E41 && p[3] == 0x0044) break;
	
	    p = MK_FP(root_psp,0x16);
	    root_psp = *p;
	}	              

	
	p = MK_FP(root_psp+16,batch_seg_ptr);
#if 0
	printf("batch_seg_ptr = %04X:%04X\n",p);
	printf("parent batch_seg_ptr = %04X\n",*p); 
#endif
	if (*p == 0 || *p == 0xFFFF) return;
	
	bc = MK_FP(*p,0);

	inherit_batch_file(bc);	

	*p = 0;

	p = MK_FP(root_psp+16,&echoflg);
	echoflg = *p;
}
#endif

GLOBAL VOID batch_new()
/* save current batch file heap contexts to high memory */
{
BYTE   *hp_start;
WORD	hp_size;
UWORD	i;
BCONTROL FAR *bc;
#if defined(CDOSTMP)
UWORD FAR *ptr;
#endif

	if (batchflg != 0)
	    hp_start = batch->heap_start;
	else
	    hp_start = heap();

	hp_size = heap() - hp_start;

	i = (sizeof(BCONTROL) + hp_size + 15)/16;
	mem_alloc(&bc, &i, i, i);	/* allocate new batch structure */
	
	if (i == 0) {			/* if we can't allocate one	*/
	    longjmp(break_env, IA_HEAP);/* then pretend heap has run out*/
	}				/* to force termination.        */

	bc->bcontrol = batch;		/* Link to Previous Structure	*/
	batch = bc;			/* make this current batch struc*/
	batch->eof = NO;		/* Have not found the EOF yet	*/
	batch->offset = 0L;		/* start at beginning of File	*/
	for (i=0;i<4;i++) batch->ret_offset[i] = 0L;
	batch->batshift = 0;		/* No Shift Factor		*/
	batch->stream = CLOSED;		/* Batch file is not open	*/
	batch->fcontrol = forptr;	/* Save current FOR control	*/
	batch->heap_start = hp_start;	/* Save original heap		*/
	batch->heap_size = hp_size;

	for (i=0; i < hp_size; i++) {
	    batch->save_area[i] = hp_start[i];
	}

	heap_set(hp_start);		/* free up heap used by old batch */

#if defined(CDOSTMP)
	ptr = MK_FP(pd->P_PSP, TmpPspEchoFlgPtr);
	*ptr = (UWORD)&echoflg;
	ptr = (UWORD FAR *) &ptr;	/* coerce a FAR * to local data */
	i = FP_SEG(ptr);		/* so we can get local data segment */
	ptr = MK_FP(pd->P_PSP, TmpPspDataSeg);
	*ptr = i;			/* save local data segment */
	ptr = MK_FP(pd->P_PSP, TmpPspBatchSeg);
	*ptr = (UWORD)(((ULONG)batch) >> 16);
#else
	/* Get segment address of batch and put it where novell	*/
	/* can find it.						*/

	*batch_seg_ptr = (UWORD)(((ULONG)batch) >> 16);
#endif
}


MLOCAL VOID batch_old()
/* restore current batch file heap contents from high memory */
{
BCONTROL FAR *bc;
UWORD	i;
#if defined(CDOSTMP)
UWORD FAR *ptr;
#endif

	heap_set(batch->heap_start+batch->heap_size);
	for (i=0; i<batch->heap_size; i++) {
	    batch->heap_start[i] = batch->save_area[i];
	}
	bc = batch;
	forptr = batch->fcontrol;	/* Restore the previous for	*/
	for_flag = (BOOLEAN) forptr;	/*  control structures 		*/
	batch = batch->bcontrol;	/* restore ptr to previous batch */
	mem_free(&bc);			/* free up batch memory */
#if defined(CDOSTMP)
	ptr = MK_FP(pd->P_PSP, TmpPspBatchSeg);
	*ptr = (UWORD)(((ULONG)batch) >> 16);
#endif
}

/*
 *	Read lines repeatedly from the batch file until a line in 
 *	the correct format is read from the batch file or the EOF
 *	has been reached.
 */
MLOCAL VOID batch_read(line, goto_flg)
BYTE	*line;		/* Command Line Buffer		*/
BOOLEAN goto_flg;	/* Goto Command Flag		*/
{
BYTE	*l;		/* we need to deblank line */
	do {
	    batch_line(line, goto_flg);		/* Read the next line from  */
	    l = deblank(line);			/* the batch file and return*/
	    if(*l != ';') {
		if(goto_flg && *l == ':')	/* a line in the correct    */
		    return;			/* format.		    */

		if(!goto_flg && *l != ':')
		    return;
	    }
	} while(!batch->eof);
}

/*
 *	Read one line from the batch file and place the expanded data into
 *	the buffer LINE.
 */
MLOCAL VOID batch_line(line, goto_flg)
BYTE	*line;		/* Command Line Buffer		*/
BOOLEAN goto_flg;	/* Goto Command Flag		*/
{
REG WORD i;
REG BYTE *s;
WORD	n, env_start;
BYTE	c, *bp;
BYTE	env_str[128];
BOOLEAN quote = FALSE;
LONG old_offset;
int j;

	env_start = NULL;		/* Copy the environment into a	 */

#if 0
/* 'eject any line starting with 'rem' */
	old_offset = batch->offset;
	i=0;
	do{
	 switch(c=*batch_ptr()){
	 case  0x1a: 
	            batch->eof = YES;		/* We have come to the end  */
   	            c = '\r';			/* of the batch file so set */
    	            break;			/* flag and mark end of line*/
 	 default:
    		if (i < MAX_LINE)
			line[i++] = c;
    		if (dbcs_lead(c)) {
		 if ((c = *batch_ptr()) >= ' ' && i < MAX_LINE)
	    		line[i++] = c;
		}
	 }/*switch*/
	}while(c!='\r');
	
	if (*batch_ptr() != '\n')  batch->offset--;
	 	line[i]=0;
	j=0;
	while(line[j]){
		if (line[j] != ' ')
			break;
		j++;
		}
	if (( strlwr(line[j])   == 'r') &&
    	    ( strlwr(line[j+1]) == 'e') &&
    	    ( strlwr(line[j+2]) == 'm') &&
    	    ( strlwr(line[j+3]) == ' ')){
		if (echoflg)
			printf("%s\n",line);
		line[0]='\0';  
		return;
		}

	batch->offset = old_offset;
	batch->eof    = NO;

#endif
/*rbf-end*/
	
/* process line */
	i = 0;
	do {
 	    switch(c = *batch_ptr()) {
		case '\0':			/* In OS/2 install.bat file  */
#if 0
		    if (i < MAX_LINE)		/* "ECHO \0" displays blank  */
			line[i++] = '\r';	/* line - so we insert a CR  */
		    while (c != '\r') {		/* then swallow rest of line */
			c = *batch_ptr();	/* read next character - if  */
			if (c == 0x1a)		/* it's an EOF mark then use */
			    goto end_of_file;	/* end-of-file code else end */
		    }				/* up falling into '\r' code */
#else
		    c = *batch_ptr();
		    if ((c == '\r') && (i < MAX_LINE))
			line[i++] = '\r';
#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品sm在线观看| 欧美日韩中文字幕一区二区| av中文字幕亚洲| 欧美无砖专区一中文字| 日韩免费在线观看| 一区在线观看视频| 日韩成人一区二区| 国产精品一区一区| 在线免费观看日本欧美| 欧美成人精品高清在线播放| 中文子幕无线码一区tr| 午夜精品视频在线观看| 国产成人精品aa毛片| 欧美午夜精品久久久久久超碰| www久久精品| 亚洲一区视频在线| 国产成人av影院| 欧美福利视频一区| 国产精品乱子久久久久| 三级不卡在线观看| 不卡的电视剧免费网站有什么| 3751色影院一区二区三区| 国产精品无遮挡| 日本大胆欧美人术艺术动态| 成人动漫在线一区| 欧美刺激脚交jootjob| 亚洲日本在线观看| 国产精品一色哟哟哟| 欧美日韩国产成人在线免费| 中文字幕av资源一区| 看国产成人h片视频| 色哟哟国产精品| 久久日韩粉嫩一区二区三区| 婷婷亚洲久悠悠色悠在线播放| 成人免费三级在线| 精品电影一区二区三区| 一区二区三区不卡在线观看| 国产美女视频一区| 91精品国产综合久久久久| 亚洲视频精选在线| 国产成人免费视频网站高清观看视频 | 高潮精品一区videoshd| 欧美夫妻性生活| 亚洲在线观看免费| 99国产精品久久久久久久久久久| 精品欧美一区二区久久| 日精品一区二区三区| 欧美亚洲丝袜传媒另类| 亚洲天堂2016| 高清不卡一二三区| 久久嫩草精品久久久久| 老司机精品视频一区二区三区| 欧美日精品一区视频| 亚洲伦理在线精品| 99国内精品久久| 国产精品福利一区二区| 国产999精品久久久久久绿帽| 日韩精品在线看片z| 日本中文在线一区| 91麻豆精品91久久久久同性| 亚洲国产日韩在线一区模特| 在线观看视频91| 夜夜嗨av一区二区三区四季av | 日韩一区在线播放| fc2成人免费人成在线观看播放| 国产午夜一区二区三区| 国内精品国产成人国产三级粉色| 日韩欧美美女一区二区三区| 日本午夜精品一区二区三区电影| 欧美日韩免费电影| 日韩高清欧美激情| 日韩欧美你懂的| 狠狠久久亚洲欧美| 亚洲精品在线电影| 黄页网站大全一区二区| 久久精品一区蜜桃臀影院| 国产91在线观看| 国产精品国产三级国产普通话99 | 一区精品在线播放| 91色九色蝌蚪| 亚洲伊人色欲综合网| 欧美麻豆精品久久久久久| 日本免费新一区视频| 日韩精品中文字幕一区二区三区| 激情五月婷婷综合网| 国产欧美日产一区| 91视频.com| 亚洲国产综合在线| 日韩一级片在线播放| 国内精品伊人久久久久av一坑 | 国产综合色在线视频区| 久久精品人人做人人综合| 成人午夜激情片| 亚洲精品免费一二三区| 欧美日韩国产片| 精品制服美女丁香| 日本一区二区三级电影在线观看| eeuss鲁一区二区三区| 樱花草国产18久久久久| 欧美精品一二三| 国模一区二区三区白浆| √…a在线天堂一区| 欧美日韩一区二区三区在线 | 久久亚洲二区三区| 不卡电影一区二区三区| 香蕉乱码成人久久天堂爱免费| 日韩一区二区视频| 国产91清纯白嫩初高中在线观看| 亚洲精品欧美二区三区中文字幕| 欧美精品色一区二区三区| 国产在线精品不卡| 亚洲色图欧洲色图| 欧美一级欧美三级| 成人午夜电影小说| 日韩成人一级大片| 国产欧美一区二区三区沐欲| 在线免费观看日本欧美| 黄色小说综合网站| 一区二区三区在线免费播放| 日韩欧美亚洲一区二区| 91丨九色丨蝌蚪丨老版| 免费在线看一区| 最新热久久免费视频| 欧美日韩午夜精品| 国产传媒日韩欧美成人| 亚洲国产一区二区三区青草影视 | 国产精品888| 亚洲在线成人精品| 久久久久9999亚洲精品| 欧美亚洲国产一区在线观看网站| 国产一区在线观看麻豆| 亚洲综合男人的天堂| 国产午夜精品久久久久久免费视 | 五月综合激情网| 国产精品久久久久影院老司| 欧美一区二区日韩| 91成人看片片| 国产成人综合亚洲网站| 日本中文字幕不卡| 夜夜嗨av一区二区三区网页| 日本一区二区三区四区在线视频| 在线成人av影院| 色菇凉天天综合网| 国产91对白在线观看九色| 日韩国产成人精品| 亚洲精品国产无天堂网2021| 欧美激情艳妇裸体舞| 精品精品国产高清a毛片牛牛| 在线视频你懂得一区| 岛国一区二区三区| 精品一区二区三区久久| 日日夜夜免费精品| 一区二区三区资源| 亚洲欧洲一区二区三区| 国产日本亚洲高清| 精品国产亚洲在线| 在线综合亚洲欧美在线视频| 在线看国产日韩| 91免费版pro下载短视频| 成人午夜在线免费| 国产精品一二三四五| 久久不见久久见免费视频7| 视频一区二区不卡| 亚洲高清在线视频| 一区二区在线观看av| 中文字幕一区二区在线播放| 欧美极品少妇xxxxⅹ高跟鞋| 国产午夜亚洲精品羞羞网站| 精品久久久三级丝袜| 欧美成人一区二区| 欧美一级精品在线| 日韩一级二级三级| 日韩一区二区三区精品视频| 欧美丰满一区二区免费视频| 欧美综合久久久| 欧亚洲嫩模精品一区三区| 色www精品视频在线观看| 91丝袜美腿高跟国产极品老师| av午夜一区麻豆| www.色综合.com| 99久久久国产精品免费蜜臀| 99re免费视频精品全部| 一本色道久久综合亚洲精品按摩| 99精品欧美一区二区三区小说 | 亚洲丝袜美腿综合| 亚洲伦理在线免费看| 一区二区三区高清在线| 亚洲妇女屁股眼交7| 日韩精品久久久久久| 日本aⅴ精品一区二区三区| 蜜臀99久久精品久久久久久软件| 久久99精品国产.久久久久久| 狠狠色丁香九九婷婷综合五月| 国产一区二区久久| 成人aa视频在线观看| 色综合天天性综合| 欧美日韩激情一区二区三区| 欧美人狂配大交3d怪物一区| 欧美一区二区福利视频| 精品999久久久|