aboutsummaryrefslogtreecommitdiff
path: root/doc/grecs_asprintf.3
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-08-08 08:53:46 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-08-08 08:53:46 +0300
commitbd5b7c29986b8106595f35cbe303fc44cf8c4d0d (patch)
tree84b39cc6d228b3642f7105c48162193a05982882 /doc/grecs_asprintf.3
parent102d1b9c1a94548dfa0c498845c77933db6a7738 (diff)
downloadgrecs-bd5b7c29986b8106595f35cbe303fc44cf8c4d0d.tar.gz
grecs-bd5b7c29986b8106595f35cbe303fc44cf8c4d0d.tar.bz2
Rename the projectargot
Diffstat (limited to 'doc/grecs_asprintf.3')
-rw-r--r--doc/grecs_asprintf.388
1 files changed, 0 insertions, 88 deletions
diff --git a/doc/grecs_asprintf.3 b/doc/grecs_asprintf.3
deleted file mode 100644
index 25279be..0000000
--- a/doc/grecs_asprintf.3
+++ /dev/null
@@ -1,88 +0,0 @@
1.\" This file is part of grecs -*- nroff -*-
2.\" Copyright (C) 2007-2016 Sergey Poznyakoff
3.\"
4.\" Grecs is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by
6.\" the Free Software Foundation; either version 3, or (at your option)
7.\" any later version.
8.\"
9.\" Grecs is distributed in the hope that it will be useful,
10.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12.\" GNU General Public License for more details.
13.\"
14.\" You should have received a copy of the GNU General Public License
15.\" along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16.\"
17.TH GRECS_ASPRINTF 3 "May 4, 2011" "GRECS" "Grecs User Reference"
18.SH NAME
19grecs_asprintf, grecs_vasprintf \- print to allocated string
20.SH SYNOPSIS
21.nf
22.B #include <grecs.h>
23.sp
24.BI "int grecs_vasprintf(char " "**pbuf" ", size_t " "*psize" \
25 ", const char " "*format" ", "
26.ti +17
27.BI "va_list " "ap" );
28.br
29.BI "int grecs_asprintf(char " "**pbuf" ", size_t " "*psize" \
30 ", const char *" "format" ", ...);"
31.SH DESCRIPTION
32The functions
33.BI grecs_asprintf ()
34and
35.BI grecs_vasprintf ()
36are analogs of
37.BR sprintf (3)
38and
39.BR vsprintf (3),
40except that they operate on dynamically allocated buffers.
41.PP
42If, on entry to the function, \fB*pbuf\fR is NULL and \fB*psize\fR is
430, both functions will allocate a buffer large enough to hold the
44formatted message and will fill it with the formatted text.
45.PP
46If \fB*pbuf\fR is not NULL, \fBpsize\fR must point to its actual size.
47If that size is not large enough to accomodate the formatted message,
48the buffer will be reallocated accordingly, otherwise it will remain
49unchanged.
50.PP
51In both cases, if the buffer has been reallocated, on return
52\fBpbuf\fR will contain its new address and \fBpsize\fR its new size.
53.PP
54For initial allocation,
55.BR grecs_malloc (3)
56is used. To reallocate memory, both functions use
57.BR grecs_realloc (3).
58.SH RETURN VALUE
59None. If memory allocation fails, a diagnostics is output and the
60program is terminated.
61.SH "SEE ALSO"
62.BR grecs_malloc (3),
63.BR grecs_realloc (3).
64.SH AUTHORS
65Sergey Poznyakoff
66.SH "BUG REPORTS"
67Report bugs to <gray+grecs@gnu.org.ua>.
68.SH COLOPHON
69The \fBGrecs\fR library is constantly changing, so this manual page
70may be incorrect or out-of-date. For the latest copy of \fBGrecs\fR
71documentation, visit <http://www.gnu.org.ua/software/grecs>.
72.SH COPYRIGHT
73Copyright \(co 2011 Sergey Poznyakoff
74.br
75.na
76License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
77.br
78.ad
79This is free software: you are free to change and redistribute it.
80There is NO WARRANTY, to the extent permitted by law.
81.\" Local variables:
82.\" eval: (add-hook 'write-file-hooks 'time-stamp)
83.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_]* [0-9] \""
84.\" time-stamp-format: "%:B %:d, %:y"
85.\" time-stamp-end: "\""
86.\" time-stamp-line-limit: 20
87.\" end:
88

Return to:

Send suggestions and report system problems to the System administrator.