Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void UNPACK(const char* str, FILE* f) {
- int i = 0;
- while (str[i]) {
- if (str[i] == '(') {
- i++;
- int count = 0;
- while ('0' <= str[i] && str[i] <= '9') {
- count = count * 10 + str[i] - '0';
- i++;
- }
- i++;
- for (int j = 0; j < count; j++) {
- fprintf(f, "%c", str[i]);
- }
- }
- else {
- fprintf(f, "%c", str[i]);
- i++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement