diff --git a/src/sys/ubixfsv2/btree.cpp b/src/sys/ubixfsv2/btree.cpp index a8b6c3e..6228c86 100644 --- a/src/sys/ubixfsv2/btree.cpp +++ b/src/sys/ubixfsv2/btree.cpp @@ -420,23 +420,19 @@ bTree::inodeSearch(ubixfsInode * inode, const char * key) { if (inode == NULL || key == NULL) return NULL; int result = strcmp(inode->name, key); -cout << "inode->name: " << inode->name << " key: " << key << " 1result: " << result << endl; if (result == 0) return inode; if (result < 0) { inode = inode->next; while (inode != NULL && ((result = strcmp(inode->name, key)) < 0)) { -cout << "inode->name: " << inode->name << " key: " << key << " 2result: " << result << endl; inode = inode->next; } // while } else { inode = inode->prev; while (inode != NULL && ((result = strcmp(inode->name, key)) > 0)) { -cout << "inode->name: " << inode->name << " key: " << key << " 3result: " << result << endl; inode = inode->prev; } // while } // else -cout << "result in inodeSearch: " << result << endl; return (result == 0 ? inode : NULL); } // bTree::inodeSearch diff --git a/src/sys/ubixfsv2/main.cpp b/src/sys/ubixfsv2/main.cpp index 30e35a4..5ee6de6 100644 --- a/src/sys/ubixfsv2/main.cpp +++ b/src/sys/ubixfsv2/main.cpp @@ -16,8 +16,8 @@ strcpy(inode -> name, "temp123"); bTree * tree = new bTree(inode); - for (i = 0; i < 2; i++) { - // if (i%1000 == 0) + for (i = 0; i < 100000; i++) { + if (i%1000 == 0) cout << "-_- i = "<Find("temp123"); - if (tmpInode != NULL) cout << "found: " << tmpInode->name << endl; -#if 0 - tmpInode = tree->GetFirstNode(); + ubixfsInode * tmpInode = tmpInode = tree->GetFirstNode(); if (tmpInode == NULL) cout << "GetFirstNode() returns null" << endl; while (tmpInode != NULL) { cout << "node[" << i++ << "]: " << tmpInode->name << endl; tmpInode = tmpInode->next; } // while -#endif + cout << sizeof(struct bNode) << endl; // tree->Info();