#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <assert.h>
#include <grass/gis.h>
Go to the source code of this file.
Defines | |
#define | _GNU_SOURCE |
Functions | |
int | G_asprintf (char **out, const char *fmt,...) |
safe replacement for asprintf() |
#define _GNU_SOURCE |
Definition at line 1 of file asprintf.c.
int G_asprintf | ( | char ** | out, | |
const char * | fmt, | |||
... | ||||
) |
safe replacement for asprintf()
Allocate a string large enough to hold the new output, including the terminating NUL, and return a pointer to the first parameter. The pointer should be passed to G_free() to release the allocated storage when it is no longer needed. Returns number of bytes written.
char | **out | |
char | *fmt |
Definition at line 61 of file asprintf.c.
References G_calloc(), G_free(), and NULL.