PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ append_stringbuffer()

static int append_stringbuffer ( STRINGBUFFER buffer,
const char *  str 
)
static

Definition at line 807 of file raster2pgsql.c.

References _, stringbuffer_t::length, stringbuffer_t::line, rterror(), and rtrealloc().

Referenced by append_sql_to_buffer(), build_overview(), and convert_raster().

807  {
808  buffer->length++;
809 
810  buffer->line = rtrealloc(buffer->line, sizeof(char *) * buffer->length);
811  if (buffer->line == NULL) {
812  rterror(_("append_stringbuffer: Could not allocate memory for appending string to buffer"));
813  return 0;
814  }
815 
816  buffer->line[buffer->length - 1] = (char *) str;
817 
818  return 1;
819 }
#define _(String)
Definition: shpcommon.h:24
void rterror(const char *fmt,...)
Wrappers used for reporting errors and info.
Definition: rt_context.c:199
uint32_t length
Definition: raster2pgsql.h:196
void * rtrealloc(void *mem, size_t size)
Definition: rt_context.c:179
Here is the call graph for this function:
Here is the caller graph for this function: