| 70 | } |
| 71 | |
| 72 | idhdl idrec::get(const char * s, int level) |
| 73 | { |
| 74 | assume(s!=NULL); |
| 75 | assume((level>=0) && (level<=1000)); //not really, but if it isnt in that bounds.. |
| 76 | idhdl h = this; |
| 77 | idhdl found=NULL; |
| 78 | int l; |
| 79 | const char *id_; |
| 80 | unsigned long i=iiS2I(s); |
| 81 | char *dummy=(char*)&i; |
| 82 | BOOLEAN less4=(dummy[SIZEOF_LONG-1]=='\0'); |
| 83 | while (h!=NULL) |
| 84 | { |
| 85 | omCheckAddr((ADDRESS)IDID(h)); |
| 86 | l=IDLEV(h); |
| 87 | if ((l==0)||(l==level)) |
| 88 | { |
| 89 | if (i==h->id_i) |
| 90 | { |
| 91 | id_=IDID(h); |
| 92 | if (less4 || (0 == strcmp(s+SIZEOF_LONG,id_+SIZEOF_LONG))) |
| 93 | { |
| 94 | if(l==level) return h; |
| 95 | found=h; |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | h = IDNEXT(h); |
| 100 | } |
| 101 | return found; |
| 102 | } |
| 103 | |
| 104 | idhdl idrec::get_level(const char * s, int level) |
| 105 | { |
no test coverage detected