Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Before this refactoring, the sprintf functions, which write formatted data to a character buffer, were implemented by wrapping the result buffer in a temporary FILE object and then deferring to the equivalent fprintf function."

*headdesk*



That's actually common practice. Look at other libc implementations.

Even the original implementation did that:

http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc...

http://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/libc...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: