//命令分析函数
int checkorder(char *order)
{
char strdir[1024]="";
if(iscntrl(order[0])!=0)
{
printf("this system is not permit to out.\n");
return 0;
}
if(strcmp(order,"exit\n")==0)
{
printf("this system is not permit to out.");
return 0;
}
if(strcmp(order,"cd")==0)
{
strcpy(nowdir,"/zxt10");
return 0;
}
if(strncmp(order,"cd ",3)==0)
{
strncpy(strdir,order+3,strlen(order)-4);
if(cdstr(strdir)==1) printf("%s: not found\n",strdir);
return 2;
}