a less-mangled version of the simple_attr demo

This commit is contained in:
Dan Buch 2009-11-21 11:19:08 -05:00
parent 92c130fcd5
commit e396c88fd1

View File

@ -39,13 +39,15 @@ int main(int argc, char *argv[])
getyx(stdscr, y, x); /* get the current curser position */
move(y, x - 1); /* back up one space */
printw("%c%c", '/', ch); /* The actual printing is done here */
}
else
} else {
printw("%c", ch);
}
refresh();
if(prev == '*' && ch == '/')
attroff(A_BOLD); /* Switch it off once we got *
* and then / */
if(prev == '*' && ch == '/') {
attroff(A_BOLD); /* Switch it off once we got */
}
/* and then / */
prev = ch;
}
endwin(); /* End curses mode */