if(strchr(special, *c)) {
// closing special char (or second backslash)
- if(is_attron(stack, *c)) {
+ if((stack->top)(stack, *c)) {
switch(*c) {
// print escaped backslash
(stack->pop)(stack);
// treat special as regular char
- } else if(is_attron(stack, '\\')) {
+ } else if((stack->top)(stack, '\\')) {
wprintw(window, "%c", *c);
// remove backslash from stack
(stack->delete)(stack);
}
-int is_attron(cstack_t *stack, char c) {
- // test if char is on top of stack
- if(stack->head >= 0) {
- if((stack->top)(stack) == c) {
- return 1;
- }
- }
- return 0;
-}
-
void fade_out(WINDOW *window, int trans, int colors) {
int i; // increment
if(colors) {