setpgrp(): what is it?

Seems, it is equivalent to “tcsetpgrp(STDIN_FILENO, setpgid(0, 0))”.

However, “setpgid()” is prototyped as:
int
setpgid(pid_t pid, pid_t pgid);

while “tcsetpgrp()” is said to be:
int
tcsetpgrp(int fildes, pid_t pgrp_id);

I mean to ask how can “int type error level” return code be passed as
“pid_t type process ID”?
Does “tcsetpgrp()” accept pgrp_id == 0 as “current program group ID”?

Tony.