home *** CD-ROM | disk | FTP | other *** search
Wrap
#include <stdio.h> #include <dos.h> #include <string.h> #include <ctype.h> #include <sys\stat.h> #define black 0x0 #define blue 0x10 #define green 0x20 #define cyan 0x30 #define red 0x40 #define white 0x70 #define PgUp 18688 #define PgDn 20736 #define UP 18432 #define DOWN 20480 #define LEFT 19200 #define RIGHT 19712 #define Enter 13 #define Home 18176 #define End 20224 #define ESC 27 #define Del 21248 #define Ins 20992 #define F1 15104 #define F2 15360 #define F3 15616 #define F4 15872 #define F5 16128 #define F6 16384 #define F7 16640 #define F8 16896 #define F9 17152 #define F10 17408 typedef struct PPP { /* this is a database's structure */ char field[11]; char type; int length; int dec; struct PPP *last; /* poniter of the last block */ struct PPP *next; /* pointer of the next block */ char sele; char obj; int cla; }FIELD; extern FIELD *p,*p5; typedef struct MM { /*store base name*/ char mean[30]; char dbname[11]; /* the name of the database */ char mainkey[4][11]; /* mainkey of the database */ struct PPP *sstr; /* point to the database's structure */ struct PPP *estr;/* pointer for end of block of base*/ char flag; /*if finish base 0--not finish 1--finish*/ char serve; char path[30]; char sele; int sort; char join; struct MM *last; struct MM *next; }BASE ; extern BASE *root,*root3,*root5,*root6,*roothead;/* end*/ extern int basecount,selecount,fselecount,linknum,link[5]; extern char linkfield[5][4][11],workname[30],linktype,lan,insert; extern BASE *root2,*root1,*root4; extern FIELD *p1,*p2,*p4; extern int num[6],use; extern char file[13],PATH[30]; extern FIELD *NEXT(),*LAST(); extern FIELD *disp_f(),*disp_ch(); extern int ob,f; extern char condition[200],*con[6]; extern char class[3][100],classbak[3][11]; tj_t() { FILE *fp,*f1,*f2; char gsxih[50],copyright[60],copyr[13]; char tail[4], name[13],*tjtype[]={"╟≤╝╟┬╝╕÷╩²","╟≤╫ε╨í╓╡","╟≤╫ε┤≤╓╡","╟≤╞╜╛∙╓╡","╟≤╫▄║═"}; int i,j,k,key,tj,reuse; reuse=f=0; get_root(); root6=root1; /*----------------------------MAKE START---------------------------------*/ for(i=0;i<3;i++) { class[i][0]='\0'; classbak[i][0]='\0'; } if(num[3]==0) make_file(3); if((insert!='Y')&&(insert!='y')) r_mean(); strcpy(file,"tj_t"); itoa(num[3],tail,10); strcat(file,tail); strcpy(copyr,file); if((insert=='n')||(insert=='N')) w_menut(); /*-----------------------------WRITE TXT ---------------------------------*/ if(selecount!=1) { strcpy(name,file); strcat(name,".txt"); if((fp=fopen(name,"w"))==NULL) { error("▓╗─▄┤≥┐¬╬─╝■!"); exit(0); } root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=p=root2->sstr; while(p2!=NULL) { if((p2->sele=='Y')&&(p2->cla==0)) fprintf(fp,"#%s#,#%c#,%d,%d\n",p2->field,p2->type,p2->length,p2->dec); p2=p2->next; } } root2=root2->next; } fclose(fp); } /*-------------------------------end of txt-------------------------------*/ /*------------------------------gene head---------------------------------*/ strcpy(name,file); strcat(name,".prg"); if((fp=fopen(name,"w"))==NULL) { error("don't open file!"); exit(0); } fprintf(fp,"set echo off\nset talk off\nset safe off\n"); if((lan=='Y')||(lan=='y')) fprintf(fp,"set excl off\n"); else fprintf(fp, "set excl on\n"); fprintf(fp,"close all\n"); if(selecount!=1) { fprintf(fp,"sele 10\nuse dbstr excl\nif reccount()>1\n zap\n endif\n"); strcpy(name,file); strcat(name,".txt"); fprintf(fp,"append from %s deli with #\nuse\n",name); fprintf(fp,"creat dbf from dbstr\n"); } /*----------------------------selcetion & index-------------------------*/ root2=root; for(j=0;j<selecount;j++) { while(root2!=NULL) if(root2->sele=='Y') break; else root2=root2->next; if(root2->join=='Y') fprintf(fp,"if .not.file('%s\\%s.dbf')\nclear\n@12,10 say \"╬─╝■╗╣▓╗┤µ╘┌,─·╙ª╧╚╘╦╨╨▒≡╡─│╠╨≥,▓·╔·┤╦┐Γúí\" \nreturn\nendif\n",root2->path,root2->dbname); fprintf(fp,"sele %c\nuse %s\\%s ",j+65,root2->path,root2->dbname); if(root2->serve!='Y') fprintf(fp," excl \n"); else fprintf(fp," \n"); if(j!=0) { /*-----------------------------------lock---------------------------------*/ if(((lan=='y')||(lan=='Y'))&&(root2->serve=='Y')) { fprintf(fp,"do while .T.\ntime=0\ndo while .not.flock().and.time<250\n"); fprintf(fp,"time=time+1\nenddo\nif time<250\n"); } /*-----------------------------endlock------------------------------------*/ fprintf(fp,"index on"); for(i=0;i<link[j-1];i++) if(i==0) fprintf(fp, " %s",linkfield[j-1][i]); else fprintf(fp,"+%s",linkfield[j-1][i]); fprintf(fp," to ndx%-d\n",j-1);/*j-1*/ /*-------------------------unlock----------------------------------------*/ if(((lan=='y')||(lan=='Y'))&&(root2->serve=='Y')) { fprintf(fp,"unlock\nexit\nelse\nyes=' '\nclear\n@12,10 say \"╬─╝■╥╤▒╗╞Σ╦√╙├╗º,╝╠╨°╝╙╦°┬≡ú┐(Y/N)\" get yes\n"); fprintf(fp,"read\nclear\nif yes='N'.or.yes='n'\n@15,10 say \"╟δ╣²╥╗╗ß╢∙╘┘╙├\" \nwait\n"); fprintf(fp,"return\nendif\nendif\nenddo\n"); } /*----------------------------end unlock cance---------------------------*/ } root2=root2->next; } /*-------------------------set realtion----------------------------*/ if((linktype=='C')||(linktype=='c')) { for(j=0;j<selecount-1;j++) { fprintf(fp,"sele %c\nset relation to ",j+65); for(i=0;i<link[j];i++) if(i==0) fprintf(fp," %s",linkfield[j][i]); else fprintf(fp,"+%s",linkfield[j][i]); fprintf(fp," into %c\n",j+66); } } else for(j=0;j<selecount-1;j++) { fprintf(fp,"sele A\nset relation to "); for(i=0;i<link[j];i++) if(i==0) fprintf(fp, "%s",linkfield[j][i]); else fprintf(fp, "+%s",linkfield[j][i]); fprintf(fp," into %c\n",j+66); } /*----------------------------end relation-----------------------------*/ if(selecount>1) { fprintf(fp,"sele 10\nuse dbf excl\nnu=1\nsele a\n"); fprintf(fp,"do while .T.\n"); fprintf(fp,"go nu\n sele 10\nappen blank\nrepl "); root2=root; while(root2!=NULL) { if(root2->dbname[0]=='\0') root2->sele='N'; root2=root2->next; } root2=root; j=k=0; while(root2!=NULL) { if(root2->sele=='Y') { p2=p=root2->sstr; while(p2!=NULL) { if(p2->sele=='Y') { if(k<5) { fprintf(fp," %s with %c->%s ",p2->field,j+65,p2->field); k++; } else { fprintf(fp,"\nrepl "); fprintf(fp," %s with %c->%s ",p2->field,j+65,p2->field); k=1;} } p2=p2->next; } j++; } root2=root2->next; } fprintf(fp,"\nnu=nu+1\nsele 1\nif nu>reccount()\nexit\nendif\nenddo\nsele 10\n"); } else fprintf(fp,"copy to dbf.dbf\n"); /*--------------------------end of gene base -----------------------------*/ /*-----------------------statistics_class-field---------------------------*/ make_t(); print(4,10,6|1,"%d",0); print(4,30,6|1,"╤í╖╓└α╫╓╢╬"); root2=root; while(root2!=NULL) if(root2->sele=='Y') break; else root2=root2->next; if(root2->sele=='Y') { p=root2->sstr; p4=p2=p; } p1=disp_ch(p2); sele_ch(p2,p1,p4,3); /*-------------------------statistics_class--end--------------------------*/ /*-------------------------gene class base ----------------------------------*/ fprintf(fp,"\nclose all \nrun copy c:dbf.dbf c:base_jg.dbf >zl\n"); strcpy(name,file); strcat(name,"j.txt"); fprintf(fp,"sele 10\n use dbstr excl\nzap\nappen from %s deli with #\nuse\ncreat fl_temp from dbstr\n",name); fprintf(fp,"close all\nsele 10\nuse fl_temp excl\nzap\nuse base_jg excl\nindex on "); if(f==3) fprintf(fp," %s+%s+%s to flndx \n",class[0],class[1],class[2]); if(f==2) fprintf(fp,"%s+%s to flndx\n",class[0],class[1]); if(f==1) fprintf(fp,"%s to flndx\n",class[0]); fprintf(fp,"copy to fl_jg1.dbf\nset index to\n use\n"); fprintf(fp,"sele 1\nuse fl_jg1 excl\n"); k=f; if(k==3) fprintf(fp,"store '%s'-'+'-'%s'-'+'-'%s' to fen\n",class[0],class[1],class[2]); if(k==2) fprintf(fp,"store '%s'-'+'-'%s' to fen\n",class[0],class[1]); if(k==1) fprintf(fp,"fen='%s'\n",class[0]); fprintf(fp,"set uniq on\nindex on &fen to flndx0\nset index to flndx0\ndele all\nset uniq off\n"); fprintf(fp,"index on &fen to flndx0\nset index to flndx0\n go top\nnu=1\n"); fprintf(fp,"do while .T. \nbegin=nu\nbrec=recno()\nif deleted()\nskip\n nu=nu+1\n erec=recno()\nendif\n"); fprintf(fp,"do while .not.deleted().and..not.eof()\nskip\nnu=nu+1 \n erec=recno()\nenddo\n"); fprintf(fp,"erec=recno()\ncnt=nu-begin\n"); /*------------------------------gene class end----------------------------*/ /*--------------------------------write .jtxt-----------------------------*/ strcpy(name,file); strcat(name,"j.txt"); if((f1=fopen(name,"w"))==NULL) { error("don't open file!"); exit(0); } fclose(f1); if((f1=fopen(name,"a"))==NULL) { error("don't open file!"); exit(0); } root2=root; k=1; p2=NULL; while(root2!=NULL) { if(root2->sele=='Y') { p2=p=root2->sstr; while(p2!=NULL) { if((p2->cla==k)&&(p2->type!='N')) { fprintf(f1,"#%s#,#%c#,%d,%d\n",p2->field,p2->type,p2->length,p2->dec); root2=root; k++; break; } p2=p2->next; } } if(p2==NULL) root2=root2->next; else p2=NULL; } root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if((p2->cla!=0)&&(p2->type=='N')) fprintf(f1,"#%s#,#%c#,%d,%d\n",p2->field,p2->type,p2->length,p2->dec); p2=p2->next; } } root2=root2->next; } /*------------------------------end of write .jtxt------------------------*/ /*--------------------------select statistics type -----------------------*/ for(;;){ make_t(); print(4,30,6|1,"╟δ╤í═│╝╞└α╨═"); for(i=0;i<5;i++) print(7,i*12+5,0|15,"%s",tjtype[i]); i=0;tj=-1; print(7,5,0|75,"%s",tjtype[0]); make_ht(10); while(tj==-1) { key=getcc(); print(7,i*12+5,0|15,tjtype[i]); switch(key) { case LEFT: if(i==0) printf("\007"); else i--; break; case RIGHT: if(i==4) printf("\007"); else i++; break; case Enter: tj=i; break; deflaut : printf("\007"); } print(7,i*12+5,0|75,tjtype[i]); } /*----------------------select object fields-----------------------------*/ if(tj!=0) { make_t(); print(4,30,6|1,"╤í═│╝╞╫╓╢╬"); root2=root; while(root2!=NULL) if(root2->sele=='Y') break; else root2=root2->next; if(root2->sele=='Y') { p=root2->sstr; p4=p2=p; } /*0-all1--n*/ p1=disp_f(p2,1); sele_f(p2,p1,p4,1,0,0); /*--------------------------get add field --------------------------------*/ get_root(); root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { clear_win(0,0,4,79,6,0,black); print(4,5,6|1,"╟δ╩Σ╚δ┤µ╖┼╫╓╢╬ %s ═│╝╞╜ß╣√╡─╫╓╢╬├√",p2->field); add_field(1); fprintf(f1,"#%s#,#%c#,%d,%d\n",root5->estr->field,root5->estr->type,root5->estr->length,root5->estr->dec); } p2=p2->next; } } root2=root2->next; } } /*endif*/ else { get_root(); clear_win(0,0,4,79,6,0,black); print(4,5,6|1,"╟δ╩Σ╚δ┤µ╖┼╝╟┬╝╕÷╩²╡─╫╓╢╬├√"); add_field(1); fprintf(f1,"#%s#,#%c#,%d,%d\n",root5->sstr->field,root5->sstr->type,root5->sstr->length,root5->sstr->dec); } /*------------------select statistics condition---------------------------*/ for(;;) { make_t(); print(4,5,6|1,"╟δ╩Σ╚δ╠⌡╝■▒φ┤∩╩╜"); root2=root; while(root2!=NULL) if(root2->sele=='Y') break; else root2=root2->next; if(root2->sele=='Y') { p=root2->sstr; p4=p2=p; } clear_win(5,4,9,76,6,0,black); p1=disp_f(p2,0); if((sele_f(p2,p1,p4,2,0,0))==1) break; } /*2--condition*/ /*--------------------------------condition-------------------------------*/ /*--------------------------GENE TYPE STATIS------------------------------*/ if(reuse==0) fprintf(fp,"sele 10\nuse fl_temp excl\nappen blan\n"); switch(tj) { case 0: fprintf(fp,"\nsele 1\ngo brec\nll0=0\ncctc=0\n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) fprintf(fp,"store %s to l%-d\n",p2->field,i++); p2=p2->next; } } root2=root2->next; } fprintf(fp,"do while cctc<cnt\nif %s\nll0=ll0+1\nendif\ncctc=cctc+1\nskip\nenddo\n",condition); fprintf(fp,"sele 10\nrepl "); root2=root; i=0;j=0;k=0; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) { if(k==0) fprintf(fp,"%s with l%-d",p2->field,i++); else fprintf(fp, ",%s with l%-d",p2->field,i++); k=1; } p2=p2->next; } } root2=root2->next; } fprintf(fp,",%s with ll0\n",root5->sstr->field); break; case 1: i=0; fprintf(fp,"\nsele 1\ngo brec\nn=1\n"); root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if %s \nll%-d=%s\nelse\nll%-d=9999999999\nendif\nlll%d=0\n",condition,i,p2->field,i,i); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"do while n<=cnt \n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if ll%-d>=%s.and.%s\nll%-d=%s\nlll%-d=1\nendif\n",i,p2->field,condition,i,p2->field,i); i++; } p2=p2->next; } } root2=root2->next; } i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) fprintf(fp,"store %s to l%-d\n",p2->field,i++); p2=p2->next; } } root2=root2->next; } fprintf(fp,"skip\nn=n+1\nenddo\n"); fprintf(fp,"sele 10 \nrepl "); root2=root; i=0;j=0;k=0; p4=root5->sstr; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) { if(k==0) fprintf(fp,"%s with l%-d",p2->field,i++); else fprintf(fp,",%s with l%-d",p2->field,i++); k=1;} p2=p2->next; } } root2=root2->next; } root2=root; j=0; fprintf(fp,"\n"); p4=root5->sstr; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if lll%-d=1\n repl %s with ll%-d \n endif\n",j,p4->field,j); j++; p4=p4->next; } p2=p2->next; } } root2=root2->next; } break; case 2: i=0; fprintf(fp,"\nsele 1\ngo brec\nn=1\n"); root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if %s\nll%-d=%s\nelse\nll%-d=-9999999999\nendif\nlll%-d=0\n",condition,i,p2->field,i,i); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"do while n<=cnt \n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if ll%-d<=%s.and.%s\nll%-d=%s\nlll%-d=1\nendif\n",i,p2->field,condition,i,p2->field,i); i++;} p2=p2->next; } } root2=root2->next; } i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) fprintf(fp,"store %s to l%-d\n",p2->field,i++); p2=p2->next; } } root2=root2->next; } fprintf(fp,"skip\nn=n+1\nenddo\n"); fprintf(fp,"sele 10 \nrepl "); root2=root; p4=root5->sstr; i=0;j=0;k=0; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) { if(k==0) fprintf(fp,"%s with l%-d",p2->field,i++); else fprintf(fp,",%s with l%-d",p2->field,i++); k=1; } p2=p2->next; } } root2=root2->next; } root2=root; j=0; fprintf(fp,"\n"); while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if lll%-d=1 \nrepl %s with ll%-d\n endif\n",j,p4->field,j); j++; p4=p4->next; } p2=p2->next; } } root2=root2->next; } break; case 3: fprintf(fp,"\nsele 1\ngo brec\ncctc=0\nactc=0\n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) fprintf(fp,"store %s to l%-d\n",p2->field,i++); p2=p2->next; } } root2=root2->next; } i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"ll%-d=0\n",i); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"do while cctc<cnt\nif %s\n",condition); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"ll%-d=ll%-d+%s\n",i,i,p2->field); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"actc=actc+1\nendif\ncctc=cctc+1\nskip\nenddo\n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"if actc=0\nll%-d=0\nelse\nll%-d=ll%-d/actc\nendif\n",i,i,i); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"sele 10 \nrepl "); root2=root; p4=root5->sstr; i=0;j=0;k=0; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) { if(k==0) fprintf(fp,"%s with l%-d",p2->field,i++); else fprintf(fp,",%s with l%-d",p2->field,i++); k=1; } if(p2->obj=='Y') { if(k==0) fprintf(fp,"%s with ll%-d",p4->field,j++); else fprintf(fp,",%s with ll%-d",p4->field,j++); k=1; p4=p4->next; } p2=p2->next; } } root2=root2->next; } break; case 4: fprintf(fp,"\nsele 1\ngo brec\ncctc=0\n"); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) fprintf(fp,"store %s to l%-d\n",p2->field,i++); p2=p2->next; } } root2=root2->next; } i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"ll%-d=0\n",i); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"do while cctc<cnt\nif %s\n",condition); i=0; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->obj=='Y') { fprintf(fp,"ll%-d=ll%-d+%s\n",i,i,p2->field); i++; } p2=p2->next; } } root2=root2->next; } fprintf(fp,"endif\ncctc=cctc+1\nskip\nenddo\n"); p4=root5->sstr; fprintf(fp,"sele 10 \nrepl "); root2=root; i=0;j=0;k=0; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla!=0) { if(k==0) fprintf(fp,"%s with l%-d",p2->field,i++); else fprintf(fp,",%s with l%-d",p2->field,i++); k=1; } if(p2->obj=='Y') { if(k==0) fprintf(fp,"%s with ll%-d",p4->field,j++); else fprintf(fp,",%s with ll%-d",p4->field,j++); k=1; p4=p4->next; } p2=p2->next; } } root2=root2->next; } break; default: break; } /*---------------------------root5<-root6------------------------*/ p2=root5->sstr; while(p2!=NULL) { getmem(); if(root6->sstr==NULL) root6->sstr=root6->estr=p1; else { p1->last=root6->estr; root6->estr->next=p1; p1->next=NULL; root6->estr=p1; } strcpy(p1->field,p2->field); p1->type='N'; p1->length=p2->length; p1->dec=p2->dec; p2=p2->next; } /*------------------------------------------------------------*/ free(root5); clear_win(5,4,9,76,6,0,black); print(7,20,6|1,"╗╣╜°╨╨╞Σ╦√═│╝╞┬≡ú┐(Y/N) "); k=getcc(); reuse++; if((k=='N')||(k=='n')) break; } fprintf(fp,"\nsele 1\nif nu >reccount() \nexit \n endif\ngo erec \nenddo\n"); fprintf(fp,"set index to \n sele 10\nclose all\n"); fprintf(fp,"!del c:fl_jg1.dbf >zl\nuse fl_temp excl\ncopy to %s.dbf\nclose all\n",file); fprintf(fp,"! c:brow c:%s.dbf",file); fprintf(fp,"\n!copy c:%s.dbf c:%sj.dbf >zl\n",file,file); /*------------------------------re utili----------------------------------*/ clear_win(5,4,9,76,6,0,black); clear_win(13,4,20,75,6,0,black); print(7,20,6|1,"╥¬╢╘┤╦═│╝╞╜ß╣√┐Γ╜°╨╨═│╝╞┬≡ú┐(Y/N) "); root5=root6; root2=root; while(root2!=NULL) { if(root2->sele=='Y') { p2=root2->sstr; while(p2!=NULL) { if(p2->cla==0) p2->sele='N'; else p2->sele='Y'; p2=p2->next; } } root2=root2->next; } key=getcc(); fclose(f1); if((key=='Y')||(key=='y')) { read_key(); strcpy(root3->path,PATH); strcpy(copyright,"copy "); strcat(copyright,copyr); strcat(copyright,"j.txt "); strcat(copyright,root3->path); strcat(copyright,"\\"); strcat(copyright,root3->dbname); strcat(copyright,".txt"); system(copyright); fprintf(fp,"\n!copy c:%sj.dbf %s\\%s.dbf >zl\n",file,root3->path,root3->dbname); root3->serve='N'; root3->join='Y'; roothead->last=root3; root3->next=roothead; roothead=root3; roothead->sstr=NULL; roothead->estr=NULL; root3->serve='N'; root3->join='Y'; } else free(root6); /*-----------------------end of re----------------------------------------*/ /*-----------------------end---------------------------------------------*/ fprintf(fp,"clear\n"); fprintf(fp,"ser=' '\n@ 10,10 say \"┤╦═│╝╞╜ß╣√╥¬▒╕╖▌┬≡ú┐(Y/N)\" get ser\nread\n"); fprintf(fp,"if ser='Y'.or.ser='y'\n ser=space(30)\n@12,10 say \"╟δ╩Σ╚δ─┐┬╝╝░╬─╝■├√│╞:\" get ser\nread\n"); fprintf(fp,"!copy c:%sj.dbf &ser > zl\nendif\n",file); fprintf(fp,"!del c:dbf.dbf >zl\n"); clear_win(13,4,20,75,6,0,black); printf("\033[17;20H┤╦═│╝╞╜ß╣√╥¬╣▓╧φ┬≡ú┐(Y/N)"); k=getcc(); if((k=='Y')||(k=='y')) { print(19,10,6|1,"╩Σ╚δ╣▓╧φ─┐┬╝╝░╬─╝■├√: "); scanf("%s",gsxih); fprintf(fp,"!copy c:%sj.dbf %s >zl",file,gsxih); } fclose(fp); num[3]++; }/*end*/ /*----------------------------------MAKE HELP ---------------------------*/ make_ht(f) int f; { if(f==10) { print(f+5,30,6|1,"<╣ª─▄╦╡├≈>"); print(f+6,15,6|1,"╒Γ╨⌐╣ª─▄╩╟╙├╗º╘┌╜°╨╨╫╓╢╬═│╝╞╩▒,╧╡═│╦∙╠ß╣⌐╡─"); print(f+8,15,6|1,"╕≈╓╓═│╝╞╣ª─▄,╞Σ╓╨╟≤╝╟┬╝╕÷╩²--┐╔╤í╚╬╥Γ└α╨═╫╓╢╬;"); print(f+10,15,6|1,"╢°╞Σ╦ⁿ╡─╘≥▒╪╨δ╤í╩²╫╓╨═╫╓╢╬.╫╓╢╬╕÷╩²▓╗╧▐."); } } /*----------------------WRITE STATIS.TXT---------------------------------*/ w_menut() { FILE *fp; if((fp=fopen("statis3.txt","a"))==NULL) { error("don't open file statis.txt"); exit(1); } fprintf(fp,"#%s#,#%s#\n",workname,file); fclose(fp); } /*----------------------------END ALL ------------------------------------*/