PostGIS  2.1.10dev-r@@SVN_REVISION@@
lwutil.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "../postgis_config.h"
#include "liblwgeom_internal.h"
#include "lwgeom_log.h"
Include dependency graph for lwutil.c:

Go to the source code of this file.

Functions

static void * default_allocator (size_t size)
 
static void default_freeor (void *mem)
 
static void * default_reallocator (void *mem, size_t size)
 
static void default_noticereporter (const char *fmt, va_list ap)
 
static void default_errorreporter (const char *fmt, va_list ap)
 
void lwnotice (const char *fmt,...)
 Write a notice out to the notice handler. More...
 
void lwerror (const char *fmt,...)
 Write a notice out to the error handler. More...
 
void lwgeom_set_handlers (lwallocator allocator, lwreallocator reallocator, lwfreeor freeor, lwreporter errorreporter, lwreporter noticereporter)
 This function is called by programs which want to set up custom handling for memory management and error reporting. More...
 
const char * lwtype_name (uint8_t type)
 Return the type name string associated with a type number (e.g. More...
 
void * lwalloc (size_t size)
 
void * lwrealloc (void *mem, size_t size)
 
void lwfree (void *mem)
 
void trim_trailing_zeros (char *str)
 
char * lwmessage_truncate (char *str, int startpos, int endpos, int maxlength, int truncdirection)
 
char getMachineEndian (void)
 
void error_if_srid_mismatch (int srid1, int srid2)
 
int clamp_srid (int srid)
 Return a valid SRID from an arbitrary integer Raises a notice if what comes out is different from what went in. More...
 

Variables

lwallocator lwalloc_var = default_allocator
 
lwreallocator lwrealloc_var = default_reallocator
 
lwfreeor lwfree_var = default_freeor
 
lwreporter lwnotice_var = default_noticereporter
 
lwreporter lwerror_var = default_errorreporter
 
static char * lwgeomTypeName []