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

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

?? batch.c

?? DOS源碼
?? C
?? 第 1 頁 / 共 5 頁
字號:
	}

	return(total);
}

MLOCAL BOOLEAN CDECL test_cond(cptr)
BYTE	**cptr;
{
	BYTE	*cmd,*str1, *str2, *ptr;
	DTA	search;
	BOOLEAN not, cond, neg,is_user;
	BYTE	level;
        BYTE    c[]=" \n";
        WORD	attr;
	UWORD   userid;
	LONG	val1,val2;

        cmd=*cptr;
        not = cond = NO;			/* Initialise the Flags     */

	if(!strnicmp(cmd = deblank(cmd), "not", 3)) {
	    not = YES;
	    cmd = deblank(cmd+3);
	}

	switch(if_index(&cmd)) {
	
	    /*
	     *	EXIST Option extract the possibly ambiguous filename
	     *	and check if it exists.
	     */
	    case 0:
		cmd = deblank(get_filename(heap(), cmd, YES));
		cond = !ms_x_first(heap(), ATTR_STD|ATTR_HID, &search);
		break;
		
	    /*
	     * DIREXIST Option checks if the given directory exists
	     */
	    case 1:
		cmd = deblank(get_filename(heap(), cmd, YES));
		attr = ms_x_chmod(heap(), ATTR_ALL, 0);
		if (attr < 0) cond = FALSE;
		else cond = (attr & 0x10);
		break;

	    /*
	     *	ERRORLEVEL Option extract the decimal number from the
	     *	command line.
	     */
	    case 2:
		level = 0;
		neg = FALSE;
		
		if(*cmd =='-') {
		    neg = TRUE;
		    cmd++;
		}

		if(!isdigit(*cmd)) {		/* SYNTAX error if the	    */ 
		    syntax();			/* first character is not a */
		    return FALSE;			/* digit.		    */
		}

		while(isdigit(*cmd))
		    level = level * 10 + (*cmd++ - '0');

		level = level & 0x00FF;

		if (neg) level = -level;

	        cond = (level<=(err_ret & 0x00FF)); 
		break;


/*RG-02*/
#if !defined(NOXBATCH)
#if (defined(CDOSTMP) || defined(CDOS))
	    /*
	     *	KEY ["string"] [==] [""] Search for the string "string" and
             *  display it if it exists, then read a key and echo it.
             *  However, if the string to match is null "" then do a keyboard
             *  status check and return TRUE if there is no key there
	     */
	    case 3:
		    cmd = deblank(cmd);
                ptr=cmd;
                if (display_string(&ptr)!=0)
                    return FALSE;

        	    cmd = deblank(ptr); 
	        while(*cmd == '=')		/* Remove any "=" string     */
	            cmd++;

	        cmd = deblank(cmd);
                if ((*cmd==0)||(*(cmd+1)!=' ')) { /* check for condition */
 	            syntax();
                    return FALSE;
                }

                /* read a character from the keyboard */
    	        c[0]=bdos(C_RAWIO, 0xFD);	/* Get a character from console */

                /* echo the char typed */
	        if (echoflg) 				/* echo to screen if wanted */
		    putc(c[0]);
	        crlf();			/* print cr/lf			*/
                
                /* check if it matches */
                if((tolower(c[0])==*cmd)||(toupper(c[0])==*cmd))
                    cond=TRUE;
                else 
                    cond=FALSE;

                /* skip the condition */
	        while (*cmd!=' ')
                    cmd++; /* skip the char */
        
		    break;

#endif
#if !defined (NOSECURITY) && (defined(CDOSTMP) || defined(CDOS))
	    /*
	     *	USERID Option extract the 4 digit hex user id
	     *	and check if it is us.
	     */
	    case 4:
                if (!login_enabled())
                    return FALSE;
		    cmd = deblank(cmd);
	        if(aschextobin(cmd)==get_user_on_station())
                    cond=TRUE;
                else
                    cond=FALSE;
                
                do {   /* skip past the user id */
                    if ((*cmd>='0' && *cmd<='9')
                        ||(tolower(*cmd)>='a' && tolower(*cmd)<='f'))
                        cmd++; /* skip the hex digit */
                    else {
               		    syntax();	
		            return FALSE;
                    }
	        } while (*cmd!=' ');
		break;

            /*
	     *	LOGINNAME Option extract the loginname and check if it is us.
	     */
	    case 5:
                if (!login_enabled())
                    return FALSE;
                is_user=TRUE;

            /*
	     *	GROUPNAME Option extract the loginname and check if it is us.
	     */
	    case 6:
                if (!login_enabled())
                    return FALSE;
		    cmd = deblank(cmd);
                if(aschextobin(user_info.userid)!=get_user_on_station()) {
	            if(get_user_info(get_user_on_station())!=0) {
                        syntax();
                        is_user=cond=FALSE;
			return FALSE;
                    }
                }
                if((is_user==TRUE)&&(strncmp(strlwr(cmd),strlwr(user_info.loginname),strlen(user_info.loginname))==0)) {
                    cond=TRUE;
                    cmd+=strlen(user_info.loginname);
                }
                else if((is_user!=TRUE)&&(strncmp(strlwr(cmd),strlwr(user_info.groupname),strlen(user_info.groupname))==0)) {
                    cond=TRUE;
                    cmd+=strlen(user_info.groupname);
                }
                else {
                    cond=FALSE;
	            while (*cmd!=' ')
                        cmd++; /* skip the name */
                }
                if (*cmd!=' ') {
                    is_user=cond=FALSE;
                }
                is_user=FALSE;
		break;

#endif
#endif /*NOXBATCH*/
/*RG-02-end*/            
            /*
	     *	String comparison option.
	     */
	    default:
		str1 = cmd;			/* Extract String 1	    */

		while ((!is_blank(cmd)) && (*cmd != '=') &&
		       ((*cmd != '!') || (cmd[1]!= '=')) &&
		       (*cmd != '<') && (*cmd != '>')) {

		    cmd = skip_char(cmd);
		}

		str2 = cmd;
		cmd = deblank(cmd);

		attr = get_operator(cmd++);

		if (attr == -1) {
		    syntax();
		    return(FALSE);
		}

		*str2 = 0;

		if (*cmd == '=' || *cmd == '>') cmd++;

		cmd = deblank(cmd);
		str2 = cmd;
		while (!is_blank(cmd)) cmd = skip_char(cmd);
		*cmd++ = 0;

		if (*str1 == '#') {
		    val1 = get_decimal(str1);
		    val2 = get_decimal(str2);    
		    switch(attr) {
		      case OP_EQ: cond = (val1==val2); break;
		      case OP_NE: cond = (val1!=val2); break;
		      case OP_LT: cond = (val1<val2); break;
		      case OP_LE: cond = (val1<=val2); break;
		      case OP_GT: cond = (val1>val2); break;
		      case OP_GE: cond = (val1>=val2); break;
		    }
		}
		else switch(attr) {
		case OP_EQ:
		    cond = (strcmp(str1,str2) == 0);
		    break;
		case OP_NE:
		    cond = (strcmp(str1,str2) != 0);
		    break;
		case OP_LT:
		    cond = (strcmp(str1,str2) < 0);
		    break;
		case OP_LE:
		    cond = (strcmp(str1,str2) <= 0);
		    break;
		case OP_GT:
		    cond = (strcmp(str1,str2) > 0);
		    break;
		case OP_GE:
		    cond = (strcmp(str1,str2) >= 0);
		    break;
		}
		break;
	}

	if(not) 				/* if negated condition     */
	    cond = !cond;

        *cptr=cmd;
        return cond; /* write result back */
}

#if !defined(NOXBATCH)
BOOLEAN is_it_or(BYTE *cmd)
{
	cmd--;
	if ((*cmd != 0) && (*cmd != '\t') && (*cmd != ' '))
	    return FALSE;
        cmd++;
	if (strnicmp(cmd, "or", 2) != 0)
	    return FALSE;
	cmd+=2;    
	if ((*cmd != '\t') && (*cmd != ' '))
	    return FALSE;
	return TRUE;
}
#endif
GLOBAL VOID CDECL cmd_if(cmd)
BYTE	*cmd;
{
        BOOLEAN cond;
        
	ifcond=cond=test_cond(&cmd);
	
	if(!*deblank(cmd)) {		/* and return a SYNTAX error*/
	    syntax();			/* if it is empty.	    */
	    return;
	}
        if(!cond) {
#if !defined(NOXBATCH)
	    while (!is_it_or(cmd) &&
		       (*cmd != 0)) {
	        if (strnicmp(cmd,"ECHO",4)==0) return;       
	        cmd++;
	    }
            if (*cmd==0) return; /* no OR's so quit now */
	    
	    if_context = TRUE;
	    
	    docmd(deblank(cmd), YES); /* New command starts at "or" */
            
#endif
        }
	else {
	    cmd = deblank(cmd);

	    if (strnicmp(cmd,"AND",3)) {
		if (parse(cmd)) return;	  /* IF won't have been 'parsed' for */
					  /* > or < redirectors so do it now */
	    }

	    if_context = TRUE;
	    				  /* Execute command if the    */
	    docmd(cmd, YES);              /* condition flag is TRUE    */
	}
        if_context=FALSE;
}

/*RG-03*/
#if !defined(NOXBATCH)
GLOBAL VOID CDECL cmd_or(cmd)
BYTE	*cmd;
{
        BOOLEAN cond;
        BYTE    *org_cmd;
        
        cond=test_cond(&cmd);
	if(!*deblank(cmd)) {		/* and return a SYNTAX error*/
	    syntax();			/* if it is empty.	    */
	    return;
	}
        if(!cond) {
       	    org_cmd = cmd;			/* now look for "OR" */
	    while (!is_it_or(cmd) &&
		   (*cmd != 0)) {
		if (strnicmp(cmd,"ECHO",4)==0) while(*cmd) cmd++;
		else cmd++;
	    }
            if (*cmd==0) { /* oh dear, no ORs */
                if (ifcond) /* but so far so good, so do command anyway */
	           docmd(deblank(org_cmd), YES); 
                return;
            }
	    docmd(deblank(cmd), YES); /* New command starts at "or" */
            return;
        }
	else {
            cmd = deblank(cmd);
	    
	    if (strnicmp(cmd,"AND",3)) {
	        if (parse(cmd)) return;	  /* IF won't have been 'parsed' for */
					  /* > or < redirectors so do it now */
	    }
	    
	    ifcond=cond;                 /* Execute command if the    */
	    docmd(cmd, YES);    	 /* condition flag is TRUE    */
        }
}
#endif /*NOXBATCH*/
/*RG-03-end*/


GLOBAL VOID CDECL cmd_for(s)
BYTE *s;
{
FCONTROL *fc;
BYTE *bp1;

	fc = (FCONTROL *) heap_get(sizeof(FCONTROL));

						/* Allocate Control Struct  */
	if(forptr)				/* and prevent nesting of  */
	    goto for_error;			/* FOR Command. 	   */

	s = deblank(s); 			/* Remove leading blanks   */
	if ((*s++ != '%') ||			/* Get the FOR variable    */
	    (fc->forvar = *s++) < ' ')		/* character and save	   */
	    goto for_error;

	if(strnicmp(s = deblank(s), "in", 2))	/* Check for the correct   */
	    goto for_error;			/* command syntax.	   */

	s = deblank(s+2);
	if (*s++ != '(')
	    goto for_error;

	fc->files = (BYTE *)heap();		/* Allocate FOR parameter  */
	while(*s && *s != ')') {		/* buffer and scan the	   */
	    bp1 = (BYTE *)heap();		/* command line generating */
						/* zero terminated strings */
	    while(strchr(batch_sep, *s))	/* Skip any separators	   */
		s = skip_char(s);

	    while(   *s != ')' &&		/* then copy all valid	   */
		     !strchr(batch_sep, *s))	/* characters into buffer  */
		      				/* then zero terminate	   */
		copy_char(&bp1, &s);

	    *bp1++ = '\0';
	    heap_get(strlen(heap()) + 1);	/* Preserve String	    */
	}
	
	*(BYTE *)heap_get(1) = '\0'; 		/* Final String is zero     */
						/* bytes in length	    */
	
	s = deblank(s);
	if(*s++ != ')')
	    goto for_error;
	
	if(strnicmp(s = deblank(s), "do", 2))
	    goto for_error;

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

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

	fc->cmd = (BYTE *)heap_get(strlen(s = deblank(s+2)) +1);
	strcpy(fc->cmd, s);

	fc->sflg = NO;			/* File matching inactive  */
	for_flag = YES; 		/* Turn FOR processing ON  */
	forptr = fc;			/* Save control Structure  */
	return;
	
for_error:				/* When a Syntax error occurs	*/
	heap_set((BYTE *) fc);		/* restore the heap and print	*/
	syntax();			/* an error message.		*/
	return;
}

GLOBAL VOID for_end()
{
	if(for_flag) {
	    heap_set((BYTE *) forptr);	/* Terminate FOR processing	*/
	    forptr = (FCONTROL *) NULL; /* restore the HEAP and reset	*/
	    for_flag = NO;		/* control flags.		*/
	}
}

/*.pa*/
/*
 *	This command generates the displayed prompt based on the contents
 *	of the string PROMPT= in the environment. Otherwise the default
 *	prompt string DEFAULT_PROMPT is used.
 */

MLOCAL BOOLEAN prompt_flg = FALSE;	/* Prompt Flag 			*/

MLOCAL VOID prompt()			/* display command line prompt	*/
{
	REG BYTE *cp;
	BYTE	 buf[MAX_PATHLEN];
	BYTE	 c;
#if !STACK
	BYTE	 cpbuf[MAX_ENVLEN];
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人激情图片网| 国内外成人在线视频| 欧美综合久久久| 亚洲国产精品欧美一二99| 欧美日韩精品欧美日韩精品一综合| 亚洲精品久久久蜜桃| 欧美日韩一区二区欧美激情| 天天亚洲美女在线视频| 4438成人网| 懂色av中文字幕一区二区三区| 中文一区二区在线观看| 91成人网在线| 老司机精品视频线观看86| 国产欧美精品一区aⅴ影院| 91网站黄www| 日本在线不卡一区| 欧美激情一区二区三区全黄| 91丨九色porny丨蝌蚪| 婷婷六月综合亚洲| 久久久久久久网| 欧美系列在线观看| 黄一区二区三区| 亚洲少妇中出一区| 日韩欧美激情一区| 色综合网站在线| 免费欧美日韩国产三级电影| 国产精品天干天干在线综合| 欧美日韩在线一区二区| 狠狠狠色丁香婷婷综合激情| 亚洲人妖av一区二区| 日韩一区二区三区观看| 不卡av免费在线观看| 国产一区二区三区综合| 亚洲日本欧美天堂| 欧美大片一区二区| 色哟哟欧美精品| 蜜臀av国产精品久久久久| 国产精品久久国产精麻豆99网站| 欧美日韩国产精品成人| 成人av资源网站| 久草中文综合在线| 亚洲成人免费观看| 国产精品久久久久久户外露出 | 中文字幕一区二区三区蜜月| 欧美精品在线观看播放| 91丨porny丨中文| 国产在线视视频有精品| 亚洲777理论| 亚洲欧美激情插| 欧美国产欧美综合| 精品久久国产字幕高潮| 欧美日韩一区二区不卡| k8久久久一区二区三区| 国产真实乱偷精品视频免| 奇米一区二区三区| 亚洲v中文字幕| 亚洲尤物在线视频观看| 亚洲国产精品高清| 欧美成人精品1314www| 91精品国产综合久久香蕉的特点| 欧美在线观看一区| 91久久免费观看| av不卡免费在线观看| 国产成人精品网址| 国产91丝袜在线播放九色| 久久99精品久久久久久动态图| 婷婷久久综合九色综合伊人色| 亚洲精品视频观看| 亚洲综合免费观看高清完整版在线| 国产精品国产自产拍高清av| 国产人成一区二区三区影院| 亚洲桃色在线一区| 中文字幕av资源一区| 国产精品女人毛片| 国产精品家庭影院| 亚洲免费观看高清在线观看| 成人欧美一区二区三区黑人麻豆 | 成人丝袜高跟foot| 国产精品18久久久久久vr| 国产高清亚洲一区| 丁香激情综合国产| 91丝袜呻吟高潮美腿白嫩在线观看| 成人午夜免费av| av中文字幕在线不卡| 91丨porny丨在线| 欧美午夜宅男影院| 欧美精品亚洲一区二区在线播放| 欧美精品亚洲二区| 日韩免费高清av| 国产婷婷色一区二区三区| 久久精品网站免费观看| 国产精品久久久一区麻豆最新章节| 日韩美女视频一区二区| 亚洲综合免费观看高清完整版在线| 亚洲最大色网站| 日本va欧美va瓶| 成人网在线播放| 欧美在线你懂得| 亚洲精品在线网站| 国产精品乱码一区二区三区软件| 亚洲人午夜精品天堂一二香蕉| 亚洲电影视频在线| 国产自产视频一区二区三区| 成人高清在线视频| 欧美三区免费完整视频在线观看| 制服丝袜成人动漫| 国产精品色哟哟网站| 一卡二卡三卡日韩欧美| 免费观看成人av| 91精品国产一区二区三区| 久久夜色精品国产噜噜av| 国产精品国产成人国产三级| 亚洲中国最大av网站| 国产在线日韩欧美| 欧美中文字幕一区二区三区| 精品捆绑美女sm三区| 亚洲精品老司机| 国产精品亚洲午夜一区二区三区| 一本一道久久a久久精品| 日韩一区二区三区精品视频| 中文在线一区二区| 美女免费视频一区二区| 日本精品一级二级| 久久精品视频一区二区| 亚洲一区二区三区视频在线| 国产乱色国产精品免费视频| 91福利小视频| 国产精品拍天天在线| 麻豆成人在线观看| 92国产精品观看| 久久久综合视频| 视频精品一区二区| 91福利视频久久久久| 日本一区二区三区四区| 天天色综合天天| 日本韩国欧美在线| 国产精品剧情在线亚洲| 韩国精品主播一区二区在线观看| 在线观看免费视频综合| 国产精品女人毛片| 国产黄色精品网站| 欧美zozozo| 日本欧美在线观看| 欧美影院一区二区三区| 亚洲色图丝袜美腿| 成人高清在线视频| 国产性天天综合网| 狠狠久久亚洲欧美| 日韩一二在线观看| 日韩精品欧美成人高清一区二区| 色综合久久中文字幕| 奇米色777欧美一区二区| 91黄视频在线观看| 亚洲精品视频在线观看网站| 成人小视频免费在线观看| 久久精品免费在线观看| 久久国产视频网| 精品久久久久一区| 国产揄拍国内精品对白| 精品国产sm最大网站免费看| 午夜一区二区三区视频| 欧美日韩高清影院| 丝袜美腿亚洲综合| 91麻豆精品国产无毒不卡在线观看| 无码av免费一区二区三区试看| 欧美午夜电影在线播放| 性感美女极品91精品| 欧美顶级少妇做爰| 男女男精品视频网| 欧美sm极限捆绑bd| 黄页网站大全一区二区| 国产亚洲综合在线| av电影在线观看一区| 亚洲欧美日本在线| 在线视频中文字幕一区二区| 亚洲v精品v日韩v欧美v专区| 欧美一区二区三区不卡| 紧缚捆绑精品一区二区| 久久精品在这里| 成人免费高清视频| 一区二区在线看| 制服.丝袜.亚洲.中文.综合| 美国av一区二区| 国产精品网站在线观看| 日本电影欧美片| 日韩精品一二区| 国产丝袜欧美中文另类| 91一区二区在线| 亚洲成人一区二区在线观看| 日韩欧美激情一区| 成人av网在线| 性做久久久久久| 久久久一区二区三区| 99re在线视频这里只有精品| 亚洲高清一区二区三区| 久久青草国产手机看片福利盒子| 99久久99久久久精品齐齐| 视频一区国产视频| 欧美激情综合五月色丁香小说| 欧洲一区二区av|