Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* case_str = find_word(buffer, "case ");
- char* first_brace = case_str;
- while(true)
- {
- if(*first_brace == 0) { assert(false); }
- if(*first_brace == '{') { break; }
- first_brace++;
- }
- int brace_count = 1;
- char last_brace = first_brace + 1;
- while(true)
- {
- if(*last_brace == 0) { assert(false); }
- if(*last_brace == '{') { brace_count++; }
- if(*last_brace == '}')
- {
- brace_count--;
- if(brace_count == 0)
- {
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement