Why not leave your functions but have them invoke the libraries instead?
> setup_terminal(); enable_input(); while(...) inp = read_character(); .....
vs
> readline()
So yes I could've stubbed out the other stuff and replaced just one, but that's just adding tech debt
Otherwise you may get that you have your function, you think everywhere is using it, you make it fix a bug. And poof, you introduced bugs at the other call sites.