Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ICE_Bool ICE_Tag_StrExist(ICE_StringStd string_std_, ICE_TagID * tag_id_if_exist_)
- {
- int nb_string_in_pool = 0;
- char * all_pool_in_string = strpool_collate(&ICE_GLOBJ_TAGMANAGER.pool, &nb_string_in_pool);
- char * temp = all_pool_in_string;
- for (int i = 0; i < nb_string_in_pool; i++)
- {
- if (!strcmp(temp, string_std_))
- goto ANSWER_TRUE;
- while (*temp != '\0')
- temp++;
- temp += 2;
- }
- ANSWER_FALSE:
- *tag_id_if_exist_ = 0;
- strpool_free_collated(&ICE_GLOBJ_TAGMANAGER.pool, all_pool_in_string);
- return ICE_False;
- ANSWER_TRUE:
- *tag_id_if_exist_ = strpool_inject(&ICE_GLOBJ_TAGMANAGER.pool, string_std_, ICE_StringStd_Size(string_std_));
- strpool_free_collated(&ICE_GLOBJ_TAGMANAGER.pool, all_pool_in_string);
- return ICE_True;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement