diff options
author | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-30 05:17:14 +0000 |
---|---|---|
committer | dj <dj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-30 05:17:14 +0000 |
commit | 742e08035182528fe4e51101ea8978866884a9d9 (patch) | |
tree | 7fa9026331aee4d137d546a906440eca5ea8ad78 /libiberty/vsnprintf.c | |
parent | 7601a55c681d4d36e04c20f91f57bb4d6e71e9f3 (diff) | |
download | ppe42-gcc-742e08035182528fe4e51101ea8978866884a9d9.tar.gz ppe42-gcc-742e08035182528fe4e51101ea8978866884a9d9.zip |
* snprintf.c: Doc fix.
* vsnprintf.c: Doc fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147998 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/vsnprintf.c')
-rw-r--r-- | libiberty/vsnprintf.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libiberty/vsnprintf.c b/libiberty/vsnprintf.c index 7df5bd88e52..5470df2223b 100644 --- a/libiberty/vsnprintf.c +++ b/libiberty/vsnprintf.c @@ -27,13 +27,15 @@ the executable file might be covered by the GNU General Public License. */ @deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, va_list @var{ap}) -This function is similar to vsprintf, but it will print at most -@var{n} characters. On error the return value is -1, otherwise it -returns the number of characters that would have been printed had -@var{n} been sufficiently large, regardless of the actual value of -@var{n}. Note some pre-C99 system libraries do not implement this -correctly so users cannot generally rely on the return value if the -system version of this function is used. +This function is similar to @code{vsprintf}, but it will write to +@var{buf} at most @code{@var{n}-1} bytes of text, followed by a +terminating null byte, for a total of @var{n} bytes. On error the +return value is -1, otherwise it returns the number of characters that +would have been printed had @var{n} been sufficiently large, +regardless of the actual value of @var{n}. Note some pre-C99 system +libraries do not implement this correctly so users cannot generally +rely on the return value if the system version of this function is +used. @end deftypefn |