22.5.14b - fputs implementation