X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=pc-tools%2Fldc2%2Fsrc%2Fmain.cpp;h=f8274103d6d8db868da086181623cc8d94043dd3;hb=798b0c1d967a7d8ac3c7a867d41bfa7b8e824048;hp=36cb22ed22c06fb9b1463f4e176cfb3073154f29;hpb=4e1d6c7f0835829d41c2dff7c15baec4d15f8318;p=h316.git diff --git a/pc-tools/ldc2/src/main.cpp b/pc-tools/ldc2/src/main.cpp index 36cb22e..f827410 100644 --- a/pc-tools/ldc2/src/main.cpp +++ b/pc-tools/ldc2/src/main.cpp @@ -1,3 +1,7 @@ +/* ldc2 preliminary main program */ + +#include +#include #include #include @@ -5,6 +9,10 @@ #include "tape_block.hh" #include "data_block.hh" +#include "argread.hh" + +using namespace std; + void tape_start(void* m){ printf("tape_start\n"); } @@ -13,27 +21,45 @@ void tape_stop(void* m){ printf("tape_stop\n"); } -int main(){ + + + +void dump_vector(vector arguments){ + for (vector::iterator iter=arguments.begin();iter"); + ar.add_param("h","help","Give help",&help_needed); + ar.add_free_param("","File to read data from",&file_set,&filename); + + + + dump_vector(ar.read_args(argc,args)); + + if (help_needed==1) dump_vector(ar.get_help()); + + printf("Hallo %s!\n",name.c_str()); + exit(0); tape_block * myblock=0; do{ if (myblock) delete myblock; myblock=tape_block::gen_from_fd(0); - + vector desc=myblock->get_description(); for (vector::iterator iter=desc.begin(); iter!=desc.end();iter++) printf("%s\n",(*iter).c_str()); - - -// if ((myblock->get_type()==0)&&(myblock->get_subtype()==050)){ -// data_block * dp=(data_block *)myblock; -// printf ("0-50 symbol name: %s\n",dp->extract_string(4).c_str()); -// printf ("0-50 symbol name: %s\n",dp->extract_string(11).c_str()); -// printf ("Block size:%i\n",dp->get_word_size()); -// } } while (myblock->get_state()==tape_block::TBS_OK); - printf("---"); - printf("State:%i\n",myblock->get_state()); - printf("raw size:%i\n",myblock->get_raw_size()); return 0; } +