tputs - output commands to the terminal
#include <curses.h> int tputs(const char *str, int affcnt, int (*putfunc)(int));
Refer to putp().