home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #define pr(x) fprintf(fp,x)
- main(argc,argv)
- int argc;
- char *argv[];
- {
- FILE *fp;
- fp=fopen("diction.prg","w");
- fprintf(fp,"set talk off\nset safe off\ndo while .t.\n");
-
- pr("set color to /W\nclear\n") ;
- pr("set color to /N\n@6,22 clear to 16,62\n") ;
- pr("set color to W+/B\n@5,20 clear to 15,60\n") ;
- pr("set color to W+/B\n") ;
- fprintf(fp,"@5,20 say '========================================='\n");
- fprintf(fp,"@7,25 say 'ú▒íú╓≈ ╣╪ ╝ⁿ ╫╓ ╬¿ ╥╗ ╨╘ ╝∞ ▓Θ'\n");
- fprintf(fp,"@9,25 say 'ú▓íú╩² ╛▌ ┐Γ ╠╪ ╨╘ ╝∞ ▓Θ'\n");
- fprintf(fp,"@11,25 say 'ú│íú╩² ╛▌ ┐Γ ╫╓ ╢╬ ╠╪ ╨╘ ╝∞ ▓Θ'\n");
- fprintf(fp,"@13,25 say 'ú┤íú╦≈ ╥² ╬─ ╝■ ╠╪ ╨╘ ╝∞ ▓Θ'\n");
- fprintf(fp,"@15,20 say '========================================='\n");
- fprintf(fp,"selc='5'\nfname=space(8)\nflag=0\ncopath=' '\n");
- fprintf(fp,"@20 ,20 say '╟δ ╩Σ ╚δ ─· ╡─ ╤í ╘± (1--4),0╬¬═╦│÷: ' get selc\nread\n");
- fprintf(fp,"do case \n");
- fprintf(fp,"case selc='1'\n clea\n") ;
- pr(" do dbfmenu with fname, flag ,copath\n");
- fprintf(fp," if fname='0'\n loop\n endif\n");
- fprintf(fp," sele 10\n use db exclusive\n") ;
- fprintf(fp," sele 1\n use &copath\\&fname exclusive\n") ;
- fprintf(fp," sele 10\n loca for name=trim(fname)\n");
- fprintf(fp," condic=''\n ctc=1\n midname='mainkey'+str(ctc,1)\nkeyname=mainkey1\ncondic=&midname\ncond='len(trim(&keyname))=0'\n") ;
- fprintf(fp," sele 10\ndo while .t.\n if ctc=1\n exit\n endif\nmainname=&midname\n sele 1\n if type(mainname)='C'\n ");
- fprintf(fp," condic=condic+'+'+mainname\ncond=cond+'.and. len(trim('+mainname+'))=0'\n endif\n if type(&mainname)='D'\n");
- fprintf(fp," condic=condic+'+'+'dtoc('+midname+')'\n cond=cond+'.and.len(trim(dtoc('+mainname+')))=0'\nendif\n");
- fprintf(fp," if type(mainname)='N'\n condic=condic+'str('+mainname+'len(&mainname)'\ncond=cond+'.and.len(trim(str('+mainname+')))=0'\n");
- fprintf(fp," endif\n ctc=ctc+1\n if ctc>5\n exit\n endif\n\
- midname='mainkey'+str(ctc,1)\n sele 10\n if trim(&midname)=''\n exit\n\
- endif\n enddo\n");
- fprintf(fp," select 1\nindex on &condic to cnmo uniq\n set inde to cnmo\n");
- fprintf(fp," go top\nif .not.eof()\nif .not.&cond\n dele\n endif\n endif\nskip\n") ;
- fprintf(fp," do while .not.eof()\n dele\n skip\n enddo\n");
- fprintf(fp," use &copath\\&fname exclusive\n go top\n do while .not.eof()\n if dele()\n");
- fprintf(fp," recall\n else\n dele\n endif\n skip\n enddo\n");
- fprintf(fp," pack\n use\n sele 10\n use %s\\ndx exclusive\n loca for trim(┐Γ├√)=fname.and.\
- trim(╦≈╥²╬─╝■)<>''\n do while .not.eof()\n nf=╦≈╥²╬─╝■\n sele 1\n",argv[1]);
- fprintf(fp," use &copath\\&fname inde %s\\&nf exclusive\n reindex\n sele 10\n continue\n enddo\n",argv[1]);
- fprintf(fp," sele 10\n use\n sele 1\n use\ncase selc='2'\n run %s\\brow db.dbf\n",argv[1],argv[1]);
- fprintf(fp,"case selc='3'\n clea\n do dbfmenu with fname ,flag ,copath\n if fname<>'0'\n");
- fprintf(fp," sele 1\n use &copath\\&fname\n copy to buffwin stru exte\n run \
- %s\\brow buffwin.dbf\n endif\n",argv[1]);
- fprintf(fp,"case selc='4'\n clea\n do dbfmenu with fname ,flag ,copath\n if fname<>'0'\n");
- fprintf(fp," sele 10\n use %sndx exclusive\n copy to buffwin for (┐Γ├√=fname)\n\
- run %s\\brow buffwin.dbf\nendif\n",argv[1],argv[1]);
- fprintf(fp,"case selc='0'\n return\nendcase\n") ;
- fprintf(fp,"select 1\nuse\nenddo\n");
- fclose(fp);
- }
-