计算机操作系统实验指导书

2026/1/16 15:47:13

《操作系统管理》实验指导书

void DirF(); /*Dir FileSystem*/ void CdF(); /*Change Dir*/ void CreateF(); /*Create File*/ void DeleteF(); /*Delete File*/ void ModifyFM(); /*Modify FileMode*/ void OpenF(); /*Open File*/ void CloseF(); /*Close File*/ void ReadF(); /*Read File*/ void WriteF(); /*Write File*/ void QuitF(); /*Quit FileSystem*/ void help();

if((fp_mfd=fopen(\ {fp_mfd=fopen(\

for(i=0;i

if(loginsuc==1) /*Login Successfully*/ {while (1) {wgetchar=0; if (choiceend==1)

{printf(\

else printf(\ gets(choice);

strcpy(choice,ltrim(rtrim(strlwr(choice)))); if (strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else if(strcmp(choice,\ else choice1=12;

switch(choice1) fclose(fp_mfd); }

46

《操作系统管理》实验指导书

{case 1:DirF();choiceend=1;break;

case 2:CreateF();choiceend=1;if(!wgetchar) getchar();break; case 3:DeleteF();choiceend=1;if(!wgetchar)getchar();break; case 4:ModifyFM();choiceend=1;if(!wgetchar) getchar();break; case 5:choiceend=1;OpenF();if (!wgetchar) getchar();break; case 6:choiceend=1;CloseF();if (!wgetchar) getchar();break; case 7:choiceend=1;ReadF();if (!wgetchar) getchar();break; case 8:choiceend=1;WriteF();if (!wgetchar) getchar();break; case 9:printf(\

QuitF();exit(0);break; case 10:choiceend=1;clrscr();break; case 11:CdF();choiceend=1;break; case 20:help();choiceend=1;break; default:choiceend=0; } }

}

else printf(\}

void help(void) {

printf(\

printf(\}

char *rtrim(char *str) /*remove the trailing blanks.*/ {int n=strlen(str)-1; while(n>=0) {if(*(str+n)!=' ') {*(str+n+1)='\\0';

break; }

else n--; }

if (n<0) str[0]='\\0'; return str; }

char *ltrim(char *str) /*remove the heading blanks.*/ {char *rtrim(char *str); strrev(str); rtrim(str); strrev(str); return str;

47


计算机操作系统实验指导书.doc 将本文的Word文档下载到电脑
搜索更多关于: 计算机操作系统实验指导书 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219