mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-23 00:22:38 +00:00
Reorganize code to make comments have more sense
git-svn-id: http://svn.osgeo.org/postgis/trunk@15244 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
d7bdadac10
commit
44fbe97aa6
|
@ -77,53 +77,6 @@ static char *lwgeomTypeName[] =
|
|||
"Tin"
|
||||
};
|
||||
|
||||
/*
|
||||
* Default lwnotice/lwerror handlers
|
||||
*
|
||||
* Since variadic functions cannot pass their parameters directly, we need
|
||||
* wrappers for these functions to convert the arguments into a va_list
|
||||
* structure.
|
||||
*/
|
||||
|
||||
void
|
||||
lwnotice(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwnotice_var)(fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
lwerror(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwerror_var)(fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
lwdebug(int level, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwdebug_var)(level, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Default allocators
|
||||
*
|
||||
|
@ -152,6 +105,14 @@ default_reallocator(void *mem, size_t size)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Default lwnotice/lwerror handlers
|
||||
*
|
||||
* Since variadic functions cannot pass their parameters directly, we need
|
||||
* wrappers for these functions to convert the arguments into a va_list
|
||||
* structure.
|
||||
*/
|
||||
|
||||
static void
|
||||
default_noticereporter(const char *fmt, va_list ap)
|
||||
{
|
||||
|
@ -212,6 +173,47 @@ lwgeom_set_debuglogger(lwdebuglogger debuglogger) {
|
|||
if ( debuglogger ) lwdebug_var = debuglogger;
|
||||
}
|
||||
|
||||
void
|
||||
lwnotice(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwnotice_var)(fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
lwerror(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwerror_var)(fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
lwdebug(int level, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
/* Call the supplied function */
|
||||
(*lwdebug_var)(level, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const char*
|
||||
lwtype_name(uint8_t type)
|
||||
{
|
||||
|
@ -391,7 +393,7 @@ clamp_srid(int srid)
|
|||
( srid % ( SRID_MAXIMUM - SRID_USER_MAXIMUM - 1 ) );
|
||||
lwnotice("SRID value %d > SRID_MAXIMUM converted to %d", srid, newsrid);
|
||||
}
|
||||
|
||||
|
||||
return newsrid;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue