| delorie.com/archives/browse.cgi | search | 
> But that would conflict with how snprintf should work: it should NOT > fail if it runs out of space. Instead, it needs to stop writing into > the (full) buffer, but should still count characters _produced by > doprnt, because it needs to return the number of characters that > _would_ have been written had the buffer been large enough. The > easiest way to do that is to hide the fact that the buffer overflowed > from _doprnt, and let it keep going. Hmmm... OK. I still think flsbuf should handle the exception case, not the putc macro.
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |