Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'u':
- placeholder = ungets_index;
- while (ungets_index >= 0)
- operator_or_error_overread[index_error++] = ungets_string[ungets_index--];
- ungets_index = placeholder;
- break;
- case 'r':
- printf("Cleared ungets_string[]: %s\n", ungets_string);
- cleararray(ungets_string, ungets_index);
- printf("Current ungets_string: %s", ungets_string);
- ungets_index = 0;
- break;
- case '\n':
- mrp = pop();
- printf("\t%.8f\n", mrp);
- cleararray(ungets_string, ungets_index);
- ungets_index = 0;
- printf("Current ungets_string: %s", ungets_string);
- break;
- void cleararray(char array[], int endofdata)
- {
- int i = 0;
- while (i <= endofdata)
- {
- array[i] = '\0';
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment