| 1 | |
| 2 | #include <stdio.h> |
| 3 | #include <unistd.h> |
| 4 | |
| 5 | #include "tape_block.hh" |
| 6 | |
| 7 | void tape_start(void* m){ |
| 8 | printf("tape_start\n"); |
| 9 | } |
| 10 | |
| 11 | void tape_stop(void* m){ |
| 12 | printf("tape_stop\n"); |
| 13 | } |
| 14 | |
| 15 | int main(){ |
| 16 | tape_block * myblock=0; |
| 17 | do{ |
| 18 | if (myblock) delete myblock; |
| 19 | myblock=tape_block::gen_from_fd(0); |
| 20 | printf ("Block type:%2o-%o\n",myblock->get_type(),myblock->get_subtype()); |
| 21 | } while (myblock->get_state()==tape_block::TBS_OK); |
| 22 | printf("---"); |
| 23 | printf("State:%i\n",myblock->get_state()); |
| 24 | printf("raw size:%i\n",myblock->get_raw_size()); |
| 25 | return 0; |
| 26 | } |