diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-03-11 13:35:17 +0000 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-03-11 13:35:17 +0000 |
commit | bd10656ef12c1c3fee804ddb51a0c69c3a03af48 (patch) | |
tree | 069fe4b39210028723b07ecd5a0e01e915920483 /README.md | |
parent | 287092309b1093a461836213364a3b42f9a9845b (diff) |
Add README.md
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ba1eb6 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +This is a simple inline implementation of the GNU functions asprintf() and +vasprintf(). This header requires only a conforming C99 (or higher) compiler +and standard library. + +The usage is identical to your system's sprintf() and vsprintf(), respectively, +except that the first argument is a pointer to a pointer to char, rather than +a pointer directly to a char buffer. On a successful call, a new buffer large +enough to hold the resulting string is allocated and assigned through the +first parameter. This buffer must be passed to free() to avoid memory leaks.
\ No newline at end of file |