comparison src/getidblock.c @ 186:0a4f7ecd7452

more cleanup of external names in the shared library
author Carl Byington <carl@five-ten-sg.com>
date Mon, 13 Apr 2009 19:14:30 -0700
parents 6954d315aaa8
children 2f38c4ce606f
comparison
equal deleted inserted replaced
185:e0392999e9b8 186:0a4f7ecd7452
20 void dumper(uint64_t i_id); 20 void dumper(uint64_t i_id);
21 void dumper(uint64_t i_id) 21 void dumper(uint64_t i_id)
22 { 22 {
23 char *buf = NULL; 23 char *buf = NULL;
24 size_t readSize; 24 size_t readSize;
25 pst_desc_ll *ptr; 25 pst_desc_tree *ptr;
26 26
27 DEBUG_MAIN(("\n\n\nLooking at block index1 id %#"PRIx64"\n", i_id)); 27 DEBUG_MAIN(("\n\n\nLooking at block index1 id %#"PRIx64"\n", i_id));
28 28
29 if ((readSize = pst_ff_getIDblock_dec(&pstfile, i_id, &buf)) <= 0 || buf == 0) { 29 if ((readSize = pst_ff_getIDblock_dec(&pstfile, i_id, &buf)) <= 0 || buf == 0) {
30 DIE(("Error loading block\n")); 30 DIE(("Error loading block\n"));
50 if (ptr->desc && ptr->desc->i_id == i_id) 50 if (ptr->desc && ptr->desc->i_id == i_id)
51 break; 51 break;
52 ptr = pst_getNextDptr(ptr); 52 ptr = pst_getNextDptr(ptr);
53 } 53 }
54 if (!ptr) { 54 if (!ptr) {
55 ptr = (pst_desc_ll *) pst_malloc(sizeof(pst_desc_ll)); 55 ptr = (pst_desc_tree *) pst_malloc(sizeof(pst_desc_tree));
56 memset(ptr, 0, sizeof(pst_desc_ll)); 56 memset(ptr, 0, sizeof(pst_desc_tree));
57 ptr->desc = pst_getID(&pstfile, i_id); 57 ptr->desc = pst_getID(&pstfile, i_id);
58 } 58 }
59 pst_item *item = pst_parse_item(&pstfile, ptr, NULL); 59 pst_item *item = pst_parse_item(&pstfile, ptr, NULL);
60 if (item) pst_freeItem(item); 60 if (item) pst_freeItem(item);
61 } 61 }
62 } 62 }
63 63
64 64
65 void dump_desc(pst_desc_ll *ptr); 65 void dump_desc(pst_desc_tree *ptr);
66 void dump_desc(pst_desc_ll *ptr) 66 void dump_desc(pst_desc_tree *ptr)
67 { 67 {
68 while (ptr) { 68 while (ptr) {
69 DEBUG_MAIN(("\n\n\nLooking at block desc id %#"PRIx64"\n", ptr->d_id)); 69 DEBUG_MAIN(("\n\n\nLooking at block desc id %#"PRIx64"\n", ptr->d_id));
70 if (ptr->desc && ptr->desc->i_id) dumper(ptr->desc->i_id); 70 if (ptr->desc && ptr->desc->i_id) dumper(ptr->desc->i_id);
71 if (ptr->assoc_tree && ptr->assoc_tree->i_id) dumper(ptr->assoc_tree->i_id); 71 if (ptr->assoc_tree && ptr->assoc_tree->i_id) dumper(ptr->assoc_tree->i_id);