G:/ScriptBasic/source/cftd.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include "conftree.h"
00004 #include "confpile.h"
00005 
00006 
00007 main(int argc,char *argv[]){
00008   int iError;
00009   tConfigTree MyCONF;
00010 
00011   if( argc < 3 ){
00012     fprintf(stderr,"Usage: cfgc binaryinput textoutput\n"
00013                    "\ndump config information.\n");
00014     exit(1);
00015     }
00016 
00017   cft_init(&MyCONF,NULL,NULL,NULL);
00018   iError = cft_ReadConfig(&MyCONF,argv[1]);
00019   if( iError != 0 ){
00020     fprintf(stderr,"Input file %s can not be processed.\n",argv[1]);
00021     fprintf(stderr,"The error code is %d\n",iError);
00022     exit(iError);
00023     }
00024 
00025 
00026   iError = cft_DumpConfig(&MyCONF,argv[2]);
00027   if( iError != 0 ){
00028     fprintf(stderr,"Output file %s can not be processed.\n",argv[1]);
00029     fprintf(stderr,"The error code is %d\n",iError);
00030     exit(iError);
00031     }
00032 
00033   exit(0);
00034   }

Generated on Sun Mar 12 23:56:26 2006 for ScriptBasic by  doxygen 1.4.6-NO