curs_set(0) removes the blinking cursor from the animation.
The combination of nodelay(stdscr, TRUE); and getch(); handles any input whilst the animation is running (non-blocking). This stops it's being display in the terminal after the command finishes.
Trailing whitespace was auto-removed by emacs when adding previous two points.
A couple of UX tweaks:
curs_set(0)
removes the blinking cursor from the animation.nodelay(stdscr, TRUE);
andgetch();
handles any input whilst the animation is running (non-blocking). This stops it's being display in the terminal after the command finishes.