mas01mc@560: #include "lshlib.h" mas01mc@560: mas01mc@560: int main(int argc, char **argv) { mas01mc@560: mas01mc@560: if(argc < 2){ mas01mc@560: cout << "Usage: " << argv[0] << " indexfile" << endl; mas01mc@560: exit(1); mas01mc@560: } mas01mc@560: mas01mc@560: LSH* lsh = 0; mas01mc@560: lsh = new LSH(argv[1], true); // Initialize empty LSH tables mas01mc@560: mas01mc@560: if(!lsh){ mas01mc@560: cerr << "Cannot open " << argv[1] << endl; mas01mc@560: exit(1); mas01mc@560: } mas01mc@560: mas01mc@560: char buf[1024]; mas01mc@560: int n; mas01mc@560: while(1){ mas01mc@560: printf("row#"); mas01mc@560: fflush(stdout); mas01mc@560: scanf("%s", &buf); mas01mc@560: if(strcmp("exit", buf)==0 || strcmp("quit", buf)==0){ mas01mc@560: exit(0); mas01mc@560: } mas01mc@560: n = atoi(buf); mas01mc@561: printf("*** LSH DISK ***\n"); mas01mc@560: lsh->dump_disk_row(argv[1], n); mas01mc@561: printf("*** LSH CORE (ARRAY) ***\n"); mas01mc@560: lsh->dump_core_row(n); mas01mc@560: } mas01mc@560: return 0; mas01mc@560: }