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

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

?? batch.c

?? DOS源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
		case '\r':			/* carriage return */
		    if(*batch_ptr() != '\n')	/*  skip line feed */
			batch->offset--;	/* if present	   */
		    break;

		case '"':			/* Support Quoted strings   */
		    quote = !quote;		/* in batch files.	    */
		    goto save_it;

		case PIPE_CHAR: 		/* Handle Piped Output	    */
		    if(goto_flg || quote)	/* Ignore this character if */
			goto save_it;		/* we are searching for a   */
						/* Label or Quote.	    */
		    line[i] = '\0';
		    c = *deblank(line);		/* normal case we just      */
		    if ((c !='\0') && (c != ':') && following_command()) {
			c = '\r';		/* simulate a CR and set    */
			pipe_out = YES;		/* Pipe Output flag.	    */
		    } else if (c == ':') {	/* if it's a label */
		    	for(;(c != '\r') && (c != 0x1A); c = *batch_ptr())
			    if (c == 0x1A)	/* eat rest of the line     */
				batch->eof = YES;
			if(*batch_ptr() != '\n')/*  skip line feed */
			    batch->offset--;	/* if present	   */
			c = '\r';
		    } else {			/* if it's a syntax error    */
			swallow_line(line);	/* discard the rest of line  */
			i = 0;			/* start again with new line */
		    }
		    break;

		case '%':	/* The following code checks to see if the   */
				/* string starting at line[env_start-1] is   */
				/* define in the environment if it is then   */
				/* its definition replaces it in the input   */
				/* line. Otherwise no change is made.	     */
		    if(env_start) {
			env_start--;
			line[i] = '\0'; 		/* Terminate Input   */
			strcpy(env_str, line+env_start);/* Copy the String   */
			strupr(env_str);		/* and force string  */
			bp = (BYTE *)heap();		/* into Uppercase    */
			i = env_start;
			env_start = NULL;

			strcat(env_str,"=");
			if (env_scan(env_str,bp)) {
			    if (novell_extension(env_str,bp)) break;
			}
			
			while(*bp && i < MAX_LINE-1)
			    line[i++] = *bp++;
			break;
		    }
		    
		    c = *batch_ptr();
		    if (c == '\r') {
			batch->offset--;	/* rewind to point to '\r'   */
		    	break;			/* then break to normal code */
		    }
		    if (c < '0' || c > '9') {	/* if not a parameter	     */
			if(c != '%')		/* or a '%' character	     */
			    env_start = i+1;	/* save its start address in */
			goto save_it;		/* the string and wait for   */
		    }				/* the terminating '%'	     */
		    
		    n = c - '0' + batch->batshift;     /* get parameter # 0-9 and   */
						/* add in SHIFT offset	     */
		    s = batch->batcmd;
		    while(n-- && strlen(s))	/* skip all other parameters */
			s += strlen(s)+1;	/*   before the one we want  */

		    if((strlen(s) + i) >= MAX_LINE) /* Break if Greater than MAX_LINE*/
			break;
		    strcpy (line + i, s);	/* get the substitution */
		    i += strlen (s);		/* add in its size */
		    break;

		case 0x1a:
	    end_of_file:
		    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:
	    save_it:
		    if (i < MAX_LINE)
			line[i++] = c;
		    if (dbcs_lead(c)) {
			if ((c = *batch_ptr()) >= ' ' && i < MAX_LINE)
			    line[i++] = c;
		    }
		}
	} while (c != '\r');			/* repeat until CR	   */

	line[i] = '\0'; 			/* Terminate the line and  */

	if(batch->eof)
	    return;

#if 0	/* not DOS compatible */
	if(*batch_ptr() == 0x1A)		/* Check if the next this  */
	    batch->eof = YES;			/* the end of the file if  */
	else					/* YES then set the flag   */
	    batch->offset--;			/* force the character to  */
#endif						/* be re-read next time    */
	return; 				/* return to the caller    */
}

MLOCAL BOOLEAN following_command()
/* return true if we have a possible command on the rest of the line */
{
LONG	old_offset;
BOOLEAN	res = FALSE;
BYTE	*s;

	old_offset = batch->offset;		/* save batch offset */
	while (TRUE) {
	    s = batch_ptr();			/* look ahead at batch file */
	    if (*s == '\r' || *s == 0x1a || (!dbcs_lead(*s) && *s == PIPE_CHAR))
		break;
	    if (!is_blank(s)) {
	        res = TRUE;			/* possible command if we   */
		break;				/* hit non whitespace char  */
	    }
	    if (dbcs_lead(*s)) {
		s = batch_ptr();
		if (*s == '\r' || *s == 0x1a)
		    break;
	    }
	}
	batch->offset = old_offset;		/* restore batch offset */
	return res;
}

MLOCAL VOID swallow_line(s)
BYTE	*s;
/* there is a syntax error on this line - swallow it and say so */
{
BYTE	c;

	prompt();				/* possibly echo the prompt */
	if (echoflg)				/* echo to screen if wanted */
	    printf("%s%c",s,PIPE_CHAR);
	
	do {
	    c = *batch_ptr();
	    if (c ==  0x1a) {
		c = '\r';			/* pretend to be end of line*/
		batch->eof = YES;		/* We have come to the end  */
		break;				/* flag and mark end of line*/
	    }
	    if (echoflg)			/* echo to screen if wanted */
		putc(c);
	} while (c != '\r');
	if (echoflg)
	    putc('\n');

	if (*batch_ptr() != '\n')		/*  skip line feed */
		   batch->offset--;		/* if present	   */

	eprintf(MSG_SYNTAX);			/* report syntax error	*/
}

/*
 *	In order to improve performance of the batch file processing
 *	the Batch file is read in blocks of BATCH_BUF characters.
 *	and the routine BATCH_CHAR then returns a pointer to a character
 *	from the buffer (filling the buffer if required).
 */
MLOCAL BYTE *batch_ptr()
{
	BYTE FAR *buf;
	UWORD bufsize;
	UWORD i;
	
	if(batch->eof)
	    return(batch_eof);
	    
	if (batch->offset < batch_off ||
		batch->offset >= (batch_off + (LONG) (batch_cnt - 1))) {

	    batch_off = batch->offset;
	    ms_x_lseek (batch->stream, batch->offset, 0);
	    batch_cnt = far_read(batch->stream, gp_far_buff, sizeof(batch_buf));
	    if(batch_cnt <= 0) {
		batch->eof = YES;
		return(batch_eof);
	    }
	    for (i=0; i<sizeof(batch_buf); i++) batch_buf[i] = gp_far_buff[i];
	}
	return(&batch_buf[(UWORD) (batch->offset++ - batch_off)]);
}


/*.pa*/
/*
 *	BATCH FILE COMMANDS
 *	===================
 *
 *	The following commands are used almost entirely in BATCH files and
 *	have little or no meaning outside that environment.
 */
GLOBAL VOID CDECL cmd_shift ()
{
	batch->batshift++;		/* Increment the Shift Offset	*/
}


MLOCAL WORD label_ignore_char(s)
BYTE	*s;
{
	if (*s == '=') return(1);
	if (*s == ';') return(1);
	if (*s == ',') return(1);
	if (*s == ' ') return(1);
	return(0);
}

/*
 *	Extract the first a valid characters from the label and then
 *	zero terminate the resulting string.
 */
MLOCAL BYTE * make_label(label)
BYTE *label;  
{
REG BYTE *bp;
UWORD i;

	label = deblank(label);		/* remove leading white space */
	while (label_ignore_char(label))
	    label = skip_char(label);
	
	bp = label;
	
	while (is_filechar(bp))		/* skip over valid chars      */
	    bp = skip_char(bp);

	*bp = '\0';			/* make label zero terminated */
	return label;
}

GLOBAL VOID CDECL cmd_goto (label)		  /* goto label in batch file */
REG BYTE    *label;
{
UWORD	i;
BYTE	*bp, s[MAX_LINE+2]; 		/* Allocate buffer for Batch Input  */
	
	if (!batchflg)			/* if not in batch mode 	    */
	    return;			/* this command is ignored	    */

	if(*label == ':')		/* Ignore any leading ':'	    */
	    label++;
	
	label = make_label(label);	/* Convert to Label Format	    */

	batch->offset = 0L;		/* rewind the batch file	    */
	batch->eof = NO;		/* So it cannot be EOF		    */

	if(!batch_open())		/* Check the Batch file is open     */
	    return;			/* and stop if the function fails.  */

	while(!batch->eof) {		/* while not end of file read next  */
	    batch_read(s, YES); 	/* line and return the next command  */
	    bp = deblank(s);
	    if((*bp == ':') && !strnicmp(make_label(bp+1),label, 8))
		return;
	}

	batch_end();			/* Stop any further batch file	   */
	crlfflg = YES;			/* processing and print the error  */
	eprintf(MSG_LABEL, label);
}


GLOBAL VOID CDECL cmd_gosub (label)	  /* gosub label in batch file */
REG BYTE    *label;
{
UWORD	i;
BYTE	*bp, s[MAX_LINE+2]; 		/* Allocate buffer for Batch Input  */
	
	if (!batchflg)			/* if not in batch mode 	    */
	    return;			/* this command is ignored	    */

	if (batch->ret_offset[3] != 0L) {
		batch_end();
		crlfflg = YES;
		eprintf(MSG_GOSUB);
		return;
	}

	if(*label == ':')		/* Ignore any leading ':'	    */
	    label++;
	
	label = make_label(label);	/* Convert to Label Format	    */

	i = 0;
	while (batch->ret_offset[i] != 0L) i++;
	batch->ret_offset[i] = batch->offset;
	
	batch->offset = 0L;		/* rewind the batch file	    */
	batch->eof = NO;		/* So it cannot be EOF		    */

	if(!batch_open())		/* Check the Batch file is open     */
	    return;			/* and stop if the function fails.  */

	while(!batch->eof) {		/* while not end of file read next  */
	    batch_read(s, YES); 	/* line and return the next command  */
	    bp = deblank(s);
	    if((*bp == ':') && !strnicmp(make_label(bp+1),label, 8))
		return;
	}

	batch_end();			/* Stop any further batch file	   */
	crlfflg = YES;			/* processing and print the error  */
	eprintf(MSG_LABEL, label);
}

GLOBAL	VOID CDECL cmd_return()
{
	UWORD i;
	
	if (!batchflg) return;
	if (batch->ret_offset[0] == 0L) {
		batch_end();
		crlfflg = YES;
		eprintf(MSG_RETURN);
		return;
	}
	i = 0;
	while ((batch->ret_offset[i] != 0L)&&(i<4)) i++;
	batch->offset = batch->ret_offset[i-1];
	batch->ret_offset[i-1] = 0L;
}

#if SWITCH_ENABLED
GLOBAL	VOID CDECL cmd_switch(list)
REG BYTE	*list;
{
	BYTE	*list_start;
	BYTE	*label;
	WORD	i,j;
	BYTE	c;

	if (!batchflg) return;
	list_start = list;

switch_retry:
	list = list_start;
	i = psp_poke(STDIN,1);

#if defined(CDOSTMP)
	c =(BYTE) bdos(C_RAWIO, 0xFD);	/* Get a character from console */

	if ((c==0) ||(dbcs_lead(c)))
	    bdos(C_RAWIO, 0xFD);	/* skip second byte in DBCS pair */
#else
	c = (BYTE) msdos(MS_C_RAWIN, 0);/* Get a character from console */
	if ((c==0) || (dbcs_lead(c)))
	    msdos(MS_C_RAWIN, 0);	/* skip second byte in DBCS pair */
#endif
	psp_poke(STDIN,i);
	
	if (c==0x03) int_break();	/* check for CTRL-C */	
	if (c==0x0d) c = '1';		/* return gives default of 1 */
	
	i = (WORD) (c - '1');
	if (i<0 || i>8) goto switch_retry;	/* ignore invalid keys */

	j = 0;	
	while (j<i) {
		while (*list != ',' && *list != 0) list++;
		if (*list == 0) goto switch_retry;
		j++;
		list++;
		list = deblank(list);
	}
	label = list;
	while (*list != ',' && *list != 0) list++;
	*list = 0;
	cmd_gosub(label);
}
#endif


/*.pa*/
/*
 *	The IF command supports the following syntax:-
 *
 *	IF [NOT] string1 == string2 COMMAND
 *	IF [NOT] ERRORLEVEL n COMMAND
 *	IF [NOT] EXIST filename COMMAND
/*RG-02-
 *	IF [NOT] USERID n COMMAND
 *	IF [NOT] LOGINNAME string COMMAND
 *	IF [NOT] GROUPNAME string COMMAND
 *	IF [NOT] KEY ["string"] char COMMAND
 *
 */
#if defined(CDOSTMP) || defined(CDOS)
MLOCAL BYTE *if_opt[] = {"exist", "direxist", "errorlevel", "key", "userid", "loginname", "groupname", NULL };
#else
MLOCAL BYTE *if_opt[] = {"exist", "direxist", "errorlevel", NULL };
#endif
/*RG-02-end*/

MLOCAL UWORD if_index(cmd)
BYTE **cmd;
{
UWORD	i, j;

	for(i = 0; if_opt[i]; i++) {		/* Scan Through the option   */
	    j = strlen(if_opt[i]);		/* list and return the index */
						/* of the matching option    */
	    if(strnicmp(*cmd, if_opt[i], j))	/* and update the string     */
	        continue;			/* pointer.		     */
	    *cmd = deblank(*cmd+j);

	    while(*(*cmd) == '=')		/* Remove any "=" string     */
	        (*cmd)++;			/* present in the command    */
	    *cmd = deblank(*cmd);		/* Used by many install files*/
	    break;
	}

	return i;
}

#define	OP_EQ 0
#define OP_NE 1
#define OP_LE 2
#define OP_LT 3
#define OP_GE 4
#define OP_GT 5

MLOCAL	WORD get_operator(op)
BYTE	*op;
{
	if (op[0] == '=') return(OP_EQ);
	if (op[0] == '!' && op[1] == '=') return(OP_NE);
	if (op[0] == '<') {
	    if (op[1] == '>') return(OP_NE);
	    if (op[1] == '=') return(OP_LE);
	    return(OP_LT);
	}
	if (op[0] == '>') {
	    if (op[1] == '=') return(OP_GE);
	    return(OP_GT);
	}
	return(-1);
}

MLOCAL	LONG	get_decimal(s)
BYTE	*s;
{
	LONG	total = 0;
	
	if (*s == '#') s++;
	
	while (*s>='0' && *s<='9') {
	    total *= 10;
	    total += (LONG) (*s-'0');
	    s++;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区精品葵司在线| 成人黄色小视频| 久久精品噜噜噜成人av农村| 99精品久久久久久| 中文字幕一区二区三区色视频 | 国产成人av一区二区三区在线观看| 国产精品国产三级国产| 亚洲综合视频网| 色综合天天做天天爱| 国产精品久久久久久久第一福利| 色综合中文字幕国产 | av在线不卡免费看| 91在线观看地址| 制服丝袜av成人在线看| 自拍偷拍国产亚洲| 国产午夜精品久久久久久久| 国产精品视频在线看| 国产老妇另类xxxxx| 麻豆精品一二三| 亚洲精品videosex极品| 一本到一区二区三区| 欧美亚洲丝袜传媒另类| 亚洲综合小说图片| 国产欧美日韩视频一区二区| 国产精品色在线观看| 国产精品性做久久久久久| 久久新电视剧免费观看| 国产盗摄女厕一区二区三区| 精品国产乱码久久久久久蜜臀 | 欧美国产一区二区在线观看| 色综合欧美在线视频区| 亚洲电影激情视频网站| 欧美日韩亚州综合| 美腿丝袜亚洲一区| 国产精品九色蝌蚪自拍| 欧美高清你懂得| 日韩影院精彩在线| 国产欧美日韩三级| 91免费看视频| 久久精品免费观看| 夜夜亚洲天天久久| 精品国产一区二区在线观看| 国产成人综合在线播放| 婷婷国产在线综合| 亚洲色图在线播放| 久久午夜国产精品| 欧美精品日韩综合在线| 成人av电影观看| 美女视频一区二区| 一区二区三区中文字幕| 国产精品每日更新在线播放网址| 欧美日韩高清一区二区| 国内欧美视频一区二区| 亚洲乱码中文字幕| 精品久久久网站| 欧美体内she精高潮| 成人国产免费视频| 国产a精品视频| 韩国成人精品a∨在线观看| 艳妇臀荡乳欲伦亚洲一区| 国产精品久久夜| 亚洲精品国产第一综合99久久| 4438x亚洲最大成人网| 欧美三级蜜桃2在线观看| 99热精品国产| 国产福利电影一区二区三区| 看片网站欧美日韩| 久久国产精品99久久久久久老狼 | 337p粉嫩大胆噜噜噜噜噜91av| 成人免费毛片片v| 国产成人午夜精品影院观看视频 | 日日摸夜夜添夜夜添亚洲女人| 亚洲女爱视频在线| 国产喂奶挤奶一区二区三区| 欧美又粗又大又爽| 欧美性一区二区| 欧美日韩一区二区在线观看| 色呦呦日韩精品| 欧美日韩在线亚洲一区蜜芽| 日本韩国视频一区二区| 欧美日韩一区二区三区不卡 | 日韩一级在线观看| 欧美视频一区二区三区四区| 欧美一区二区在线看| 欧美xxxx老人做受| 久久久三级国产网站| 国产精品不卡视频| 天堂在线亚洲视频| 国产乱码精品一区二区三区五月婷| 国产麻豆视频一区| 成人国产精品免费观看动漫| 色诱亚洲精品久久久久久| 欧美在线999| 日韩小视频在线观看专区| 国产精品毛片久久久久久| 午夜国产精品一区| 国产精品一卡二| 色94色欧美sute亚洲13| 51久久夜色精品国产麻豆| 久久久高清一区二区三区| 国产精品久久久久影院亚瑟 | 国产激情91久久精品导航| 91福利在线免费观看| 日韩女优电影在线观看| 亚洲欧美偷拍另类a∨色屁股| 手机精品视频在线观看| av高清不卡在线| 日韩欧美亚洲国产另类| 亚洲少妇30p| 国产精品1024| 欧美一区二区精品久久911| 国产精品免费观看视频| 男男视频亚洲欧美| 色久综合一二码| 中文无字幕一区二区三区| 国产一区二区三区最好精华液| 91精品国产丝袜白色高跟鞋| 亚洲一区二区三区中文字幕| 成人激情免费网站| 国产视频911| 国产精品原创巨作av| 日韩欧美在线不卡| 亚洲午夜三级在线| 在线观看视频一区二区| 国产精品久久久久久妇女6080 | 色综合欧美在线| 亚洲人成精品久久久久| jvid福利写真一区二区三区| 日本一区二区电影| 国产精品一级二级三级| 国产欧美一二三区| 99久久精品免费| 亚洲小说欧美激情另类| 色拍拍在线精品视频8848| 亚洲激情av在线| 欧美日韩精品福利| 香蕉影视欧美成人| 555www色欧美视频| 日韩精品成人一区二区三区| 欧美日韩一区二区不卡| 日韩激情av在线| 这里只有精品99re| 五月天激情综合| 欧美大片在线观看一区二区| 一区二区三区精密机械公司| 欧美一级一区二区| 在线日韩av片| 亚洲综合色成人| 欧美日韩一区二区电影| 不卡的av在线播放| 国产精品二三区| 青青草97国产精品免费观看| 色婷婷综合久色| 亚洲欧美区自拍先锋| 成人性视频免费网站| 精品国产91久久久久久久妲己 | 精品在线视频一区| 久久午夜国产精品| 国产成人精品三级麻豆| 国产精品第一页第二页第三页| 成人精品国产福利| 亚洲精品高清在线| 欧美久久久久久久久中文字幕| 麻豆国产欧美一区二区三区| 精品国产sm最大网站| 91免费国产视频网站| 日韩影院精彩在线| 欧美一区二区视频免费观看| 国产一区二区免费看| 国产精品进线69影院| 97精品视频在线观看自产线路二| 亚洲欧美日韩国产中文在线| 欧美精品123区| 91麻豆高清视频| 国产一区二区三区av电影| 亚洲自拍偷拍图区| 久久久久国色av免费看影院| 在线区一区二视频| 成人免费电影视频| 久草中文综合在线| 亚洲主播在线播放| 中文字幕亚洲电影| 日韩免费性生活视频播放| 风间由美一区二区三区在线观看 | 欧美日韩精品专区| 国产91精品一区二区麻豆亚洲| 狠狠色丁香久久婷婷综合丁香| 丰满亚洲少妇av| 成a人片亚洲日本久久| 国产成人精品一区二区三区四区| 免费一级片91| 久久精品人人做人人综合| 精品国产电影一区二区| 日韩欧美一区二区久久婷婷| 欧美美女直播网站| 在线不卡a资源高清| 正在播放亚洲一区| 精品成人一区二区| 国产亚洲精品久| 亚洲色大成网站www久久九九|