内容发布更新时间 : 2024/12/26 15:41:05星期一 下面是文章的全部内容请认真阅读。
Buf_Room.Bufsize=0; return 0; }
int Buf_Fill_Tree(Pfangjianzhonglei pHead) { Pfangjian pRoom; for(pRoom=pHead->first;pRoom;pRoom=pRoom->next)
Buf_Room.Buffer[Buf_Room.Bufsize++]=pRoom;
return 0; }
int huodekefangzhonglei(FILE * pf,Pfangjianzhonglei sub_tree)
{ if(!feof(pf)) fread(sub_tree,sizeof(fangjianzhonglei),1,pf);
if(!feof(pf)) return 1; else return 0; }
int huodekefang(FILE * pf,Pfangjian room) { if(!feof(pf)) fread(room,sizeof(fangjian),1,pf); if(!feof(pf)) return 1; else return 0; }
int huodekehu(FILE * pf,Pkehu custom) { if(!feof(pf)) fread(custom,sizeof(custom),1,pf); if(!feof(pf)) return 1; else return 0; }
int xierukefang(FILE * pf,Pfangjianzhonglei sub_tree) { return fwrite(sub_tree,sizeof(fangjianzhonglei),1,pf);
}
int xierukefangxinxi(FILE * pf,Pfangjian room) {
16
return fwrite(room,sizeof(fangjian),1,pf); }
int xierukehuxinxi(FILE * pf,Pkehu custom) { return fwrite(custom,sizeof(kehu),1,pf); }
int tianjiazhonglei(Pfangjianzhonglei pRST) { char * szTitles=\ int i,num; Pfangjianzhonglei pRST2; for(i=0;pRST;pRST=pRST->next,i++) pRST2=pRST; pRST2->next=(Pfangjianzhonglei)malloc(sizeof(fangjianzhonglei)); pRST=pRST2->next; printf(\ scanf(\ huodenkefang(pRST,num); pRST->zhonglei=i+'0'; pRST->next=NULL; return 0; }
#define IR_X 100 #define IR_Y 100 #define IR_CX 100 #define IR_C 20
int tianjiakefang(Pfangjianzhonglei pRST) { const char * szRoom=\ char Buf[BUFSIZE]; int num,i; Pfangjianzhonglei pRST2; Pfangjian pRF; Buf[0]='\\0'; printf(\ scanf(\ for(i=1,pRST2=pRST;i
17
pRF=pRST2->first; pRST2->shuliang++; while(pRF->next) pRF=pRF->next; pRF->next=(Pfangjian)malloc(sizeof(fangjian)); pRF=pRF->next; huodekefangxinxi(pRF); pRF->next=NULL; return 0; }
#define IC_Y 160 #define IC_Y2 220 int tianjiakehu(Pfangjianzhonglei pRST) { const char * szTree=\ const char * szRoom=\ const char * szName=\ char Room[BUFSIZE]; int type,i; Pfangjianzhonglei pRST2; Pfangjian pRF; Pkehu pCu; printf(\ scanf(\ printf(\ scanf(\ for(i=1,pRST2=pRST;pRST2->zhonglei!=type+'0';pRST2=pRST2->next,i++)
; if(!pRST2) return 0; pRF=pRST2->first;
while(!strcmp(pRF->num,Room)&&pRF)
pRF=pRF->next; if(!pRF) return 0;
pCu=pRF->Record;
18
while(pCu->next) pCu=pCu->next; pCu->next=(Pkehu)malloc(sizeof(kehu));
pCu=pCu->next; pCu->next=NULL; pRF->times++; huodekehuxinxi(pCu); return 0; }
int sousuokefangzhonglei(Pfangjianzhonglei pRST){ const char * szTree=\ const char * szError=\ char Buf[BUFSIZE]; int type; Buf[0]='\\0'; printf(\ scanf(\ while(pRST){ if(pRST->zhonglei==type+'0'){ Buf_Clear(); Buf_Fill_Tree(pRST); Display(); return 1; } pRST=pRST->next; } getch(); return 0; }
int sousuokefangxinxi(Pfangjianzhonglei pRST){ const char * szTree=\ const char * szRoom=\ const char * szError[]={\ \ char Buf2[BUFSIZE]; int type,room; Pfangjian pRF; printf(\
19
scanf(\ printf(\ scanf(\ while(pRST){ if(pRST->zhonglei==type+'0'){
pRF=pRST->first; while(pRF){ if(!strcmp(pRF->num,Buf2)){ zhanxiankefang(pRF); return 1; }/*if*/ pRF=pRF->next; }/*while*/ printf(\
return 0; }/*if*/ pRST=pRST->next; }/*while*/ printf(\ getch(); return 0; }
int sousuokehu(Pfangjianzhonglei pRST)
{ const char * szName=\
const char * szError=\ char Buf[BUFSIZE]; Pfangjian pRF; Pkehu pCu; Buf[0]='\\0'; printf(\ scanf(\ while(pRST){ pRF=pRST->first; while(pRF){ pCu=pRF->Record;
while(pCu){ if(!strcmp(pCu->name,Buf)){ zhanxiankehu(pCu); return 0;
20