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

That code is just as easily converted to use snprintf, and then you don't need to worry about the . Or -1.


snprintf is C99 IIRC. Which means legacy C89 compilers (or worse!) don't have it.


Which brings it back again to my initial comment: "I don't understand why functions like gets and sprintf weren't removed from the standard and headers a long time ago."

And by a long time I mean before 1989 (certainly before 1999).




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

Search: