stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: design of testuite exceptions
Date Mon, 17 Jul 2006 23:31:33 GMT
Martin Sebor wrote:
> _rw_bufcat() is supposed to fail when the requested amount of memory
> exceeds the maximum (Buffer::maxsize). When the format string starts
> with the %{*} directive, maxsize is set to the value of the first
> argument in the argument list. So some of the pieces necessary to
> make this possible are in place, but not all of them. In addition,
> the code that is there is buggy and needs to be fixed to make the
> feature usable. The bottom line is that something like
> rw_snprintf (buffer, size, "...", ...) should do what we want. Let
> me look into it.

Here's a patch that lets us call rw_snprintf() to format a string
into a fixed-size buffer:

It's not quite as "elegant" as it should be (or rather, it uses
a hack to get it to work) but it's better than nothing for now.


View raw message