gaiageo.h   gaiageo.h 
/* /*
gaiageo.h -- Gaia common support for geometries gaiageo.h -- Gaia common support for geometries
version 2.2, 2008 September 13 version 2.3, 2008 October 13
Author: Sandro Furieri a-furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/ http://www.mozilla.org/MPL/
skipping to change at line 30 skipping to change at line 30
License. License.
The Original Code is the SpatiaLite library The Original Code is the SpatiaLite library
The Initial Developer of the Original Code is Alessandro Furieri The Initial Developer of the Original Code is Alessandro Furieri
Portions created by the Initial Developer are Copyright (C) 2008 Portions created by the Initial Developer are Copyright (C) 2008
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
Klaus Foerster klaus.foerster@svg.cc
Alternatively, the contents of this file may be used under the terms of Alternatively, the contents of this file may be used under the terms of
either the GNU General Public License Version 2 or later (the "GPL"), or either the GNU General Public License Version 2 or later (the "GPL"), or
the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL. the terms of any one of the MPL, the GPL or the LGPL.
*/ */
/* stdio.h included for FILE objects. */
#include <stdio.h>
#ifdef DLL_EXPORT #ifdef DLL_EXPORT
#define GAIAGEO_DECLARE __declspec(dllexport) #define GAIAGEO_DECLARE __declspec(dllexport)
#else #else
#define GAIAGEO_DECLARE extern #define GAIAGEO_DECLARE extern
#endif #endif
#ifndef _GAIAGEO_H #ifndef _GAIAGEO_H
#define _GAIAGEO_H #define _GAIAGEO_H
#ifdef __cplusplus #ifdef __cplusplus
skipping to change at line 118 skipping to change at line 122
#define GAIA_MBR_OVERLAPS 5 #define GAIA_MBR_OVERLAPS 5
#define GAIA_MBR_TOUCHES 6 #define GAIA_MBR_TOUCHES 6
#define GAIA_MBR_WITHIN 7 #define GAIA_MBR_WITHIN 7
/* constants used for FilterMBR */ /* constants used for FilterMBR */
#define GAIA_FILTER_MBR_WITHIN 74 #define GAIA_FILTER_MBR_WITHIN 74
#define GAIA_FILTER_MBR_CONTAINS 77 #define GAIA_FILTER_MBR_CONTAINS 77
#define GAIA_FILTER_MBR_INTERSECTS 79 #define GAIA_FILTER_MBR_INTERSECTS 79
#define GAIA_FILTER_MBR_DECLARE 89 #define GAIA_FILTER_MBR_DECLARE 89
/* constants defining SVG default values */
#define GAIA_SVG_DEFAULT_RELATIVE 0
#define GAIA_SVG_DEFAULT_PRECISION 6
#define GAIA_SVG_DEFAULT_MAX_PRECISION 15
/* constants used for VirtualNetwork */
#define GAIA_NET_START 0x67
#define GAIA_NET_END 0x87
#define GAIA_NET_HEADER 0xc0
#define GAIA_NET_CODE 0xa6
#define GAIA_NET_ID 0xb5
#define GAIA_NET_NODE 0xde
#define GAIA_NET_ARC 0x54
#define GAIA_NET_TABLE 0xa0
#define GAIA_NET_FROM 0xa1
#define GAIA_NET_TO 0xa2
#define GAIA_NET_GEOM 0xa3
#define GAIA_NET_BLOCK 0xed
/* constants used for Coordinate Dimensions */
#define GAIA_XY 0x00
#define GAIA_XY_Z 0x01
#define GAIA_XY_M 0x02
#define GAIA_XY_Z_M 0x03
/* macros */ /* macros */
#define gaiaGetPoint(xy,v,x,y) {*x = *(xy + (v * 2)); \ #define gaiaGetPoint(xy,v,x,y) {*x = xy[(v) * 2]; \
*y = *(xy + ((v * 2) + 1));} *y = xy[(v) * 2 + 1];}
#define gaiaSetPoint(xy,v,x,y) {*(xy + (v * 2)) = x; \ #define gaiaSetPoint(xy,v,x,y) {xy[(v) * 2] = x; \
*(xy + ((v * 2) + 1)) = y;} xy[(v) * 2 + 1] = y;}
typedef struct gaiaPointStruct typedef struct gaiaPointStruct
{ {
/* an OpenGis POINT */ /* an OpenGis POINT */
double X; /* X,Y coordinates */ double X; /* X,Y coordinates */
double Y; double Y;
struct gaiaPointStruct *Next; /* for double-linked list */ struct gaiaPointStruct *Next; /* for double-linked list */
struct gaiaPointStruct *Prev; /* for double-linked list */ struct gaiaPointStruct *Prev; /* for double-linked list */
} gaiaPoint; } gaiaPoint;
typedef gaiaPoint *gaiaPointPtr; typedef gaiaPoint *gaiaPointPtr;
skipping to change at line 205 skipping to change at line 234
gaiaPointPtr FirstPoint; /* Points linked list - first */ gaiaPointPtr FirstPoint; /* Points linked list - first */
gaiaPointPtr LastPoint; /* Points linked list - last */ gaiaPointPtr LastPoint; /* Points linked list - last */
gaiaLinestringPtr FirstLinestring; /* Linestrings linked list - first */ gaiaLinestringPtr FirstLinestring; /* Linestrings linked list - first */
gaiaLinestringPtr LastLinestring; /* Linestrings linked list - last */ gaiaLinestringPtr LastLinestring; /* Linestrings linked list - last */
gaiaPolygonPtr FirstPolygon; /* Polygons linked list - first */ gaiaPolygonPtr FirstPolygon; /* Polygons linked list - first */
gaiaPolygonPtr LastPolygon; /* Polygons linked list - last */ gaiaPolygonPtr LastPolygon; /* Polygons linked list - last */
double MinX; /* MBR - BBOX */ double MinX; /* MBR - BBOX */
double MinY; /* MBR - BBOX */ double MinY; /* MBR - BBOX */
double MaxX; /* MBR - BBOX */ double MaxX; /* MBR - BBOX */
double MaxY; /* MBR - BBOX */ double MaxY; /* MBR - BBOX */
int DeclaredType; /* the declared TYPE for this Geometry */
} gaiaGeomColl; } gaiaGeomColl;
typedef gaiaGeomColl *gaiaGeomCollPtr; typedef gaiaGeomColl *gaiaGeomCollPtr;
typedef struct gaiaPreRingStruct
{
/* a LINESTRING used to build rings */
gaiaLinestringPtr Line; /* a LINESTRING pointer */
int AlreadyUsed; /* a switch to mark an already used line ele
ment */
struct gaiaPreRingStruct *Next; /* for linked list */
} gaiaPreRing;
typedef gaiaPreRing *gaiaPreRingPtr;
typedef struct gaiaValueStruct typedef struct gaiaValueStruct
{ {
/* a DBF field multitype value */ /* a DBF field multitype value */
short Type; /* the type */ short Type; /* the type */
char *TxtValue; /* the text value */ char *TxtValue; /* the text value */
int IntValue; /* the integer value */ sqlite3_int64 IntValue; /* the integer value */
double DblValue; /* the double value */ double DblValue; /* the double value */
} gaiaValue; } gaiaValue;
typedef gaiaValue *gaiaValuePtr; typedef gaiaValue *gaiaValuePtr;
typedef struct gaiaDbfFieldStruct typedef struct gaiaDbfFieldStruct
{ {
/* a DBF field definition - shapefile attribute */ /* a DBF field definition - shapefile attribute */
char *Name; /* field name */ char *Name; /* field name */
unsigned char Type; /* field type */ unsigned char Type; /* field type */
int Offset; /* buffer offset [this field begins at *buff er+offset* and extends for *length* bytes */ int Offset; /* buffer offset [this field begins at *buff er+offset* and extends for *length* bytes */
skipping to change at line 268 skipping to change at line 307
unsigned char *BufShp; /* the SHP I/O buffer */ unsigned char *BufShp; /* the SHP I/O buffer */
int ShpBfsz; /* the SHP buffer current size */ int ShpBfsz; /* the SHP buffer current size */
int ShpSize; /* current SHP size */ int ShpSize; /* current SHP size */
int ShxSize; /* current SHX size */ int ShxSize; /* current SHX size */
double MinX; /* the MBR/BBOX for the whole shapefile */ double MinX; /* the MBR/BBOX for the whole shapefile */
double MinY; double MinY;
double MaxX; double MaxX;
double MaxY; double MaxY;
void *IconvObj; /* opaque reference to ICONV converter */ void *IconvObj; /* opaque reference to ICONV converter */
char *LastError; /* last error message */ char *LastError; /* last error message */
unsigned char EffectiveType; /* the effective Geometry-type, as d etermined by gaiaShpAnalyze() */
} gaiaShapefile; } gaiaShapefile;
typedef gaiaShapefile *gaiaShapefilePtr; typedef gaiaShapefile *gaiaShapefilePtr;
/* function prototipes */ /* function prototipes */
GAIAGEO_DECLARE int gaiaEndianArch (void); GAIAGEO_DECLARE int gaiaEndianArch (void);
GAIAGEO_DECLARE short gaiaImport16 (const unsigned char *p, GAIAGEO_DECLARE short gaiaImport16 (const unsigned char *p,
int little_endian, int little_endian,
int little_endian_arch); int little_endian_arch);
GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_en dian, GAIAGEO_DECLARE int gaiaImport32 (const unsigned char *p, int little_en dian,
skipping to change at line 395 skipping to change at line 435
unsigned char **result, unsigned char **result,
int *size); int *size);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobMbr (const unsign ed GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromSpatiaLiteBlobMbr (const unsign ed
char *blob, char *blob,
unsigned int unsigned int
size); size);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromWkb (const unsigned char *blob, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromWkb (const unsigned char *blob,
unsigned int size); unsigned int size);
GAIAGEO_DECLARE void gaiaToWkb (gaiaGeomCollPtr geom, GAIAGEO_DECLARE void gaiaToWkb (gaiaGeomCollPtr geom,
unsigned char **result, int *size); unsigned char **result, int *size);
GAIAGEO_DECLARE int gaiaFromWkbNoCheck (const unsigned char *in,
unsigned int szin,
unsigned char **out, int *szout,
int srid);
GAIAGEO_DECLARE int gaiaToWkbNoCheck (const unsigned char *in,
unsigned int szin,
unsigned char **out, int *szout);
GAIAGEO_DECLARE char *gaiaToHexWkb (gaiaGeomCollPtr geom); GAIAGEO_DECLARE char *gaiaToHexWkb (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE void gaiaFreeValue (gaiaValuePtr p); GAIAGEO_DECLARE void gaiaFreeValue (gaiaValuePtr p);
GAIAGEO_DECLARE void gaiaSetNullValue (gaiaDbfFieldPtr field); GAIAGEO_DECLARE void gaiaSetNullValue (gaiaDbfFieldPtr field);
GAIAGEO_DECLARE void gaiaSetIntValue (gaiaDbfFieldPtr field, int value) GAIAGEO_DECLARE void gaiaSetIntValue (gaiaDbfFieldPtr field,
; sqlite3_int64 value);
GAIAGEO_DECLARE void gaiaSetDoubleValue (gaiaDbfFieldPtr field, GAIAGEO_DECLARE void gaiaSetDoubleValue (gaiaDbfFieldPtr field,
double value); double value);
GAIAGEO_DECLARE void gaiaSetStrValue (gaiaDbfFieldPtr field, char *str) ; GAIAGEO_DECLARE void gaiaSetStrValue (gaiaDbfFieldPtr field, char *str) ;
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAllocDbfField (char *name, GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAllocDbfField (char *name,
unsigned char type, unsigned char type,
int offset, int offset,
unsigned char length, unsigned char length,
unsigned char decimal s); unsigned char decimal s);
GAIAGEO_DECLARE void gaiaFreeDbfField (gaiaDbfFieldPtr p); GAIAGEO_DECLARE void gaiaFreeDbfField (gaiaDbfFieldPtr p);
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaCloneDbfField (gaiaDbfFieldPtr org) ; GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaCloneDbfField (gaiaDbfFieldPtr org) ;
GAIAGEO_DECLARE gaiaDbfListPtr gaiaAllocDbfList (void); GAIAGEO_DECLARE gaiaDbfListPtr gaiaAllocDbfList (void);
GAIAGEO_DECLARE void gaiaFreeDbfList (gaiaDbfListPtr list); GAIAGEO_DECLARE void gaiaFreeDbfList (gaiaDbfListPtr list);
GAIAGEO_DECLARE int gaiaIsValidDbfList (gaiaDbfListPtr list);
GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAddDbfField (gaiaDbfListPtr list, GAIAGEO_DECLARE gaiaDbfFieldPtr gaiaAddDbfField (gaiaDbfListPtr list,
char *name, char *name,
unsigned char type, unsigned char type,
int offset, int offset,
unsigned char length, unsigned char length,
unsigned char decimals) ; unsigned char decimals) ;
GAIAGEO_DECLARE void gaiaResetDbfEntity (gaiaDbfListPtr list); GAIAGEO_DECLARE void gaiaResetDbfEntity (gaiaDbfListPtr list);
GAIAGEO_DECLARE gaiaValuePtr gaiaCloneValue (gaiaValuePtr org); GAIAGEO_DECLARE gaiaValuePtr gaiaCloneValue (gaiaValuePtr org);
GAIAGEO_DECLARE gaiaDbfListPtr gaiaCloneDbfEntity (gaiaDbfListPtr org); GAIAGEO_DECLARE gaiaDbfListPtr gaiaCloneDbfEntity (gaiaDbfListPtr org);
GAIAGEO_DECLARE gaiaShapefilePtr gaiaAllocShapefile (void); GAIAGEO_DECLARE gaiaShapefilePtr gaiaAllocShapefile (void);
skipping to change at line 433 skipping to change at line 482
const char *path, const char *path,
const char *charFrom, const char *charFrom,
const char *charTo); const char *charTo);
GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp, GAIAGEO_DECLARE void gaiaOpenShpWrite (gaiaShapefilePtr shp,
const char *path, int shape, const char *path, int shape,
gaiaDbfListPtr list, gaiaDbfListPtr list,
const char *charFrom, const char *charFrom,
const char *charTo); const char *charTo);
GAIAGEO_DECLARE int gaiaReadShpEntity (gaiaShapefilePtr shp, GAIAGEO_DECLARE int gaiaReadShpEntity (gaiaShapefilePtr shp,
int current_row, int srid); int current_row, int srid);
GAIAGEO_DECLARE void gaiaShpAnalyze (gaiaShapefilePtr shp);
GAIAGEO_DECLARE int gaiaWriteShpEntity (gaiaShapefilePtr shp, GAIAGEO_DECLARE int gaiaWriteShpEntity (gaiaShapefilePtr shp,
gaiaDbfListPtr entity); gaiaDbfListPtr entity);
GAIAGEO_DECLARE void gaiaFlushShpHeaders (gaiaShapefilePtr shp); GAIAGEO_DECLARE void gaiaFlushShpHeaders (gaiaShapefilePtr shp);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseWkt (const unsigned char GAIAGEO_DECLARE gaiaGeomCollPtr gaiaParseWkt (const unsigned char
*dirty_buffer, short type) ; *dirty_buffer, short type) ;
GAIAGEO_DECLARE void gaiaOutWkt (gaiaGeomCollPtr geom, char **result); GAIAGEO_DECLARE void gaiaOutWkt (gaiaGeomCollPtr geom, char **result);
GAIAGEO_DECLARE void gaiaOutSvg (gaiaGeomCollPtr geom, char **result,
int relative, int precision);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaFromFgf (const unsigned char *blob,
unsigned int size);
GAIAGEO_DECLARE void gaiaToFgf (gaiaGeomCollPtr geom,
unsigned char **result, int *size,
int coord_dims);
GAIAGEO_DECLARE int gaiaDimension (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaDimension (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaGeometryType (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaGeometryType (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaGeometryAliasType (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaGeometryAliasType (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsEmpty (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaMbrsContains (gaiaGeomCollPtr mbr1, GAIAGEO_DECLARE int gaiaMbrsContains (gaiaGeomCollPtr mbr1,
gaiaGeomCollPtr mbr2); gaiaGeomCollPtr mbr2);
GAIAGEO_DECLARE int gaiaMbrsDisjoint (gaiaGeomCollPtr mbr1, GAIAGEO_DECLARE int gaiaMbrsDisjoint (gaiaGeomCollPtr mbr1,
gaiaGeomCollPtr mbr2); gaiaGeomCollPtr mbr2);
GAIAGEO_DECLARE int gaiaMbrsEqual (gaiaGeomCollPtr mbr1, GAIAGEO_DECLARE int gaiaMbrsEqual (gaiaGeomCollPtr mbr1,
gaiaGeomCollPtr mbr2); gaiaGeomCollPtr mbr2);
skipping to change at line 497 skipping to change at line 554
int srid, unsigned char **resul t, int srid, unsigned char **resul t,
int *size); int *size);
GAIAGEO_DECLARE int gaiaGetMbrMinX (const unsigned char *blob, GAIAGEO_DECLARE int gaiaGetMbrMinX (const unsigned char *blob,
unsigned int size, double *minx); unsigned int size, double *minx);
GAIAGEO_DECLARE int gaiaGetMbrMaxX (const unsigned char *blob, GAIAGEO_DECLARE int gaiaGetMbrMaxX (const unsigned char *blob,
unsigned int size, double *maxx); unsigned int size, double *maxx);
GAIAGEO_DECLARE int gaiaGetMbrMinY (const unsigned char *blob, GAIAGEO_DECLARE int gaiaGetMbrMinY (const unsigned char *blob,
unsigned int size, double *miny); unsigned int size, double *miny);
GAIAGEO_DECLARE int gaiaGetMbrMaxY (const unsigned char *blob, GAIAGEO_DECLARE int gaiaGetMbrMaxY (const unsigned char *blob,
unsigned int size, double *maxy); unsigned int size, double *maxy);
GAIAGEO_DECLARE const char *gaiaGetLocaleCharset (); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaBuildRings (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaConvertCharset (char **buf, const char *fromCs,
const char *toCs);
GAIAGEO_DECLARE int gaiaToUTF8 (char **buf, const char *fromCs,
const char *toCs);
GAIAGEO_DECLARE void *gaiaCreateUTF8Converter (const char *fromCS);
GAIAGEO_DECLARE void gaiaFreeUTF8Converter (void *cvtCS);
GAIAGEO_DECLARE char *gaiaConvertToUTF8 (void *cvtCS, const char *buf,
int len, int *err);
GAIAGEO_DECLARE int gaiaIsReservedSqliteName (const char *name);
GAIAGEO_DECLARE int gaiaIsReservedSqlName (const char *name);
GAIAGEO_DECLARE int gaiaIllegalSqlName (const char *name);
GAIAGEO_DECLARE void gaiaCleanSqlString (char *value);
#if OMIT_PROJ == 0 /* including PROJ.4 */ #if OMIT_PROJ == 0 /* including PROJ.4 */
GAIAGEO_DECLARE double gaiaRadsToDegs (double rads); GAIAGEO_DECLARE double gaiaRadsToDegs (double rads);
GAIAGEO_DECLARE double gaiaDegsToRads (double degs); GAIAGEO_DECLARE double gaiaDegsToRads (double degs);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaTransform (gaiaGeomCollPtr org,
char *proj_from, char *proj_from,
char *proj_to); char *proj_to);
#endif /* end including PROJ.4 */ #endif /* end including PROJ.4 */
skipping to change at line 571 skipping to change at line 616
double *y); double *y);
GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x, GAIAGEO_DECLARE int gaiaGetPointOnSurface (gaiaGeomCollPtr geom, double *x,
double *y); double *y);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr g eom, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollSimplify (gaiaGeomCollPtr g eom,
double tolerance); double tolerance);
GAIAGEO_DECLARE gaiaGeomCollPtr GAIAGEO_DECLARE gaiaGeomCollPtr
gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom, gaiaGeomCollSimplifyPreserveTopology (gaiaGeomCollPtr geom,
double tolerance); double tolerance);
GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom, GAIAGEO_DECLARE int gaiaGeomCollLength (gaiaGeomCollPtr geom,
double *length); double *length);
GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *len gth); GAIAGEO_DECLARE int gaiaGeomCollArea (gaiaGeomCollPtr geom, double *are a);
GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsSimple (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line); GAIAGEO_DECLARE int gaiaIsClosed (gaiaLinestringPtr line);
GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line); GAIAGEO_DECLARE int gaiaIsRing (gaiaLinestringPtr line);
GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom); GAIAGEO_DECLARE int gaiaIsValid (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom); GAIAGEO_DECLARE gaiaGeomCollPtr gaiaConvexHull (gaiaGeomCollPtr geom);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geo m, GAIAGEO_DECLARE gaiaGeomCollPtr gaiaGeomCollBuffer (gaiaGeomCollPtr geo m,
double radius, double radius,
int points); int points);
GAIAGEO_DECLARE gaiaGeomCollPtr gaiaPolygonize (gaiaGeomCollPtr geom,
int force_multipolygon);
#endif /* end including GEOS */ #endif /* end including GEOS */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _GAIAGEO_H */ #endif /* _GAIAGEO_H */
 End of changes. 19 change blocks. 
23 lines changed or deleted 70 lines changed or added


 spatialite.h   spatialite.h 
/* /*
spatialite.h -- Gaia spatial support for SQLite spatialite.h -- Gaia spatial support for SQLite
version 2.2, 2008 September 13 version 2.3, 2008 October 13
Author: Sandro Furieri a-furieri@lqt.it Author: Sandro Furieri a.furieri@lqt.it
-------------------------------------------------------------------------- ---- -------------------------------------------------------------------------- ----
Version: MPL 1.1/GPL 2.0/LGPL 2.1 Version: MPL 1.1/GPL 2.0/LGPL 2.1
The contents of this file are subject to the Mozilla Public License Versio n The contents of this file are subject to the Mozilla Public License Versio n
1.1 (the "License"); you may not use this file except in compliance with 1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/ http://www.mozilla.org/MPL/
skipping to change at line 60 skipping to change at line 60
#ifndef _SPATIALITE_H #ifndef _SPATIALITE_H
#define _SPATIALITE_H #define _SPATIALITE_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
{ {
#endif #endif
SPATIALITE_DECLARE const char *spatialite_version (void); SPATIALITE_DECLARE const char *spatialite_version (void);
SPATIALITE_DECLARE const char *virtualtext_version (void);
SPATIALITE_DECLARE void spatialite_init (int verbose); SPATIALITE_DECLARE void spatialite_init (int verbose);
SPATIALITE_DECLARE void dump_shapefile (sqlite3 * sqlite, char *table, SPATIALITE_DECLARE int dump_shapefile (sqlite3 * sqlite, char *table,
char *column, char *charset, char *column, char *charset,
char *shp_path, char *geom_type) char *shp_path, char *geom_type,
; int verbose, int *rows);
SPATIALITE_DECLARE void load_shapefile (sqlite3 * sqlite, char *shp_pat SPATIALITE_DECLARE int load_shapefile (sqlite3 * sqlite, char *shp_path
h, ,
char *table, char *charset, char *table, char *charset, int s
int srid, char *column); rid,
char *column, int verbose,
int *rows);
SPATIALITE_DECLARE double math_round (double value);
SPATIALITE_DECLARE sqlite3_int64 math_llabs (sqlite3_int64 value);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* _SPATIALITE_H */ #endif /* _SPATIALITE_H */
 End of changes. 4 change blocks. 
10 lines changed or deleted 15 lines changed or added


 sqlite3ext.h   sqlite3ext.h 
skipping to change at line 18 skipping to change at line 18
** May you find forgiveness for yourself and forgive others. ** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give. ** May you share freely, never taking more than you give.
** **
************************************************************************* *************************************************************************
** This header file defines the SQLite interface for use by ** This header file defines the SQLite interface for use by
** shared libraries that want to be imported as extensions into ** shared libraries that want to be imported as extensions into
** an SQLite instance. Shared libraries that intend to be loaded ** an SQLite instance. Shared libraries that intend to be loaded
** as extensions by SQLite should #include this file instead of ** as extensions by SQLite should #include this file instead of
** sqlite3.h. ** sqlite3.h.
** **
** @(#) $Id: sqlite3ext.h,v 1.24 2008/06/30 15:09:29 danielk1977 Exp $ ** @(#) $Id: sqlite3ext.h,v 1.25 2008/10/12 00:27:54 shane Exp $
*/ */
#ifndef _SQLITE3EXT_H_ #ifndef _SQLITE3EXT_H_
#define _SQLITE3EXT_H_ #define _SQLITE3EXT_H_
#include "sqlite3.h" #include "sqlite3.h"
typedef struct sqlite3_api_routines sqlite3_api_routines; typedef struct sqlite3_api_routines sqlite3_api_routines;
/* /*
** The following structure holds pointers to all of the SQLite API ** The following structure holds pointers to all of the SQLite API
** routines. ** routines.
** **
** WARNING: In order to maintain backwards compatibility, add new ** WARNING: In order to maintain backwards compatibility, add new
** interfaces to the end of this structure only. If you insert new ** interfaces to the end of this structure only. If you insert new
** interfaces in the middle of this structure, then older different ** interfaces in the middle of this structure, then older different
** versions of SQLite will not be able to load each others' shared ** versions of SQLite will not be able to load each others' shared
** libraries! ** libraries!
*/ */
struct sqlite3_api_routines { struct sqlite3_api_routines
void * (*aggregate_context)(sqlite3_context*,int nBytes); {
int (*aggregate_count)(sqlite3_context*); void *(*aggregate_context) (sqlite3_context *, int nBytes);
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*)); int (*aggregate_count) (sqlite3_context *);
int (*bind_double)(sqlite3_stmt*,int,double); int (*bind_blob) (sqlite3_stmt *, int, const void *, int n,
int (*bind_int)(sqlite3_stmt*,int,int); void (*)(void *));
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64); int (*bind_double) (sqlite3_stmt *, int, double);
int (*bind_null)(sqlite3_stmt*,int); int (*bind_int) (sqlite3_stmt *, int, int);
int (*bind_parameter_count)(sqlite3_stmt*); int (*bind_int64) (sqlite3_stmt *, int, sqlite_int64);
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName); int (*bind_null) (sqlite3_stmt *, int);
const char * (*bind_parameter_name)(sqlite3_stmt*,int); int (*bind_parameter_count) (sqlite3_stmt *);
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*)); int (*bind_parameter_index) (sqlite3_stmt *, const char *zName);
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*)); const char *(*bind_parameter_name) (sqlite3_stmt *, int);
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*); int (*bind_text) (sqlite3_stmt *, int, const char *, int n,
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*); void (*)(void *));
int (*busy_timeout)(sqlite3*,int ms); int (*bind_text16) (sqlite3_stmt *, int, const void *, int,
int (*changes)(sqlite3*); void (*)(void *));
int (*close)(sqlite3*); int (*bind_value) (sqlite3_stmt *, int, const sqlite3_value *);
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextR int (*busy_handler) (sqlite3 *, int (*)(void *, int), void *);
ep,const char*)); int (*busy_timeout) (sqlite3 *, int ms);
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTex int (*changes) (sqlite3 *);
tRep,const void*)); int (*close) (sqlite3 *);
const void * (*column_blob)(sqlite3_stmt*,int iCol); int (*collation_needed) (sqlite3 *, void *,
int (*column_bytes)(sqlite3_stmt*,int iCol); void (*)(void *, sqlite3 *, int eTextRep,
int (*column_bytes16)(sqlite3_stmt*,int iCol); const char *));
int (*column_count)(sqlite3_stmt*pStmt); int (*collation_needed16) (sqlite3 *, void *,
const char * (*column_database_name)(sqlite3_stmt*,int); void (*)(void *, sqlite3 *, int eTextRep,
const void * (*column_database_name16)(sqlite3_stmt*,int); const void *));
const char * (*column_decltype)(sqlite3_stmt*,int i); const void *(*column_blob) (sqlite3_stmt *, int iCol);
const void * (*column_decltype16)(sqlite3_stmt*,int); int (*column_bytes) (sqlite3_stmt *, int iCol);
double (*column_double)(sqlite3_stmt*,int iCol); int (*column_bytes16) (sqlite3_stmt *, int iCol);
int (*column_int)(sqlite3_stmt*,int iCol); int (*column_count) (sqlite3_stmt * pStmt);
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol); const char *(*column_database_name) (sqlite3_stmt *, int);
const char * (*column_name)(sqlite3_stmt*,int); const void *(*column_database_name16) (sqlite3_stmt *, int);
const void * (*column_name16)(sqlite3_stmt*,int); const char *(*column_decltype) (sqlite3_stmt *, int i);
const char * (*column_origin_name)(sqlite3_stmt*,int); const void *(*column_decltype16) (sqlite3_stmt *, int);
const void * (*column_origin_name16)(sqlite3_stmt*,int); double (*column_double) (sqlite3_stmt *, int iCol);
const char * (*column_table_name)(sqlite3_stmt*,int); int (*column_int) (sqlite3_stmt *, int iCol);
const void * (*column_table_name16)(sqlite3_stmt*,int); sqlite_int64 (*column_int64) (sqlite3_stmt *, int iCol);
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol); const char *(*column_name) (sqlite3_stmt *, int);
const void * (*column_text16)(sqlite3_stmt*,int iCol); const void *(*column_name16) (sqlite3_stmt *, int);
int (*column_type)(sqlite3_stmt*,int iCol); const char *(*column_origin_name) (sqlite3_stmt *, int);
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol); const void *(*column_origin_name16) (sqlite3_stmt *, int);
void * (*commit_hook)(sqlite3*,int(*)(void*),void*); const char *(*column_table_name) (sqlite3_stmt *, int);
int (*complete)(const char*sql); const void *(*column_table_name16) (sqlite3_stmt *, int);
int (*complete16)(const void*sql); const unsigned char *(*column_text) (sqlite3_stmt *, int iCol);
int (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int, const void *(*column_text16) (sqlite3_stmt *, int iCol);
const void*,int,const void*)); int (*column_type) (sqlite3_stmt *, int iCol);
int (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,in sqlite3_value *(*column_value) (sqlite3_stmt *, int iCol);
t,const void*,int,const void*)); void *(*commit_hook) (sqlite3 *, int (*)(void *), void *);
int (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)( int (*complete) (const char *sql);
sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sq int (*complete16) (const void *sql);
lite3_value**),void (*xFinal)(sqlite3_context*)); int (*create_collation) (sqlite3 *, const char *, int, void *,
int (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc int (*)(void *, int, const void *, int,
)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int, const void *));
sqlite3_value**),void (*xFinal)(sqlite3_context*)); int (*create_collation16) (sqlite3 *, const void *, int, void *,
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*); int (*)(void *, int, const void *, int,
int (*data_count)(sqlite3_stmt*pStmt); const void *));
sqlite3 * (*db_handle)(sqlite3_stmt*); int (*create_function) (sqlite3 *, const char *, int, int, void *,
int (*declare_vtab)(sqlite3*,const char*); void (*xFunc) (sqlite3_context *, int,
int (*enable_shared_cache)(int); sqlite3_value **),
int (*errcode)(sqlite3*db); void (*xStep) (sqlite3_context *, int,
const char * (*errmsg)(sqlite3*); sqlite3_value **),
const void * (*errmsg16)(sqlite3*); void (*xFinal) (sqlite3_context *));
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**); int (*create_function16) (sqlite3 *, const void *, int, int, void *,
int (*expired)(sqlite3_stmt*); void (*xFunc) (sqlite3_context *, int,
int (*finalize)(sqlite3_stmt*pStmt); sqlite3_value **),
void (*free)(void*); void (*xStep) (sqlite3_context *, int,
void (*free_table)(char**result); sqlite3_value **),
int (*get_autocommit)(sqlite3*); void (*xFinal) (sqlite3_context *));
void * (*get_auxdata)(sqlite3_context*,int); int (*create_module) (sqlite3 *, const char *, const sqlite3_module *,
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**); void *);
int (*global_recover)(void); int (*data_count) (sqlite3_stmt * pStmt);
void (*interruptx)(sqlite3*); sqlite3 *(*db_handle) (sqlite3_stmt *);
sqlite_int64 (*last_insert_rowid)(sqlite3*); int (*declare_vtab) (sqlite3 *, const char *);
const char * (*libversion)(void); int (*enable_shared_cache) (int);
int (*libversion_number)(void); int (*errcode) (sqlite3 * db);
void *(*malloc)(int); const char *(*errmsg) (sqlite3 *);
char * (*mprintf)(const char*,...); const void *(*errmsg16) (sqlite3 *);
int (*open)(const char*,sqlite3**); int (*exec) (sqlite3 *, const char *, sqlite3_callback, void *, char **
int (*open16)(const void*,sqlite3**); );
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); int (*expired) (sqlite3_stmt *);
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**); int (*finalize) (sqlite3_stmt * pStmt);
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void* void (*free) (void *);
); void (*free_table) (char **result);
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*); int (*get_autocommit) (sqlite3 *);
void *(*realloc)(void*,int); void *(*get_auxdata) (sqlite3_context *, int);
int (*reset)(sqlite3_stmt*pStmt); int (*get_table) (sqlite3 *, const char *, char ***, int *, int *, char
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*)); **);
void (*result_double)(sqlite3_context*,double); int (*global_recover) (void);
void (*result_error)(sqlite3_context*,const char*,int); void (*interruptx) (sqlite3 *);
void (*result_error16)(sqlite3_context*,const void*,int); sqlite_int64 (*last_insert_rowid) (sqlite3 *);
void (*result_int)(sqlite3_context*,int); const char *(*libversion) (void);
void (*result_int64)(sqlite3_context*,sqlite_int64); int (*libversion_number) (void);
void (*result_null)(sqlite3_context*); void *(*malloc) (int);
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*)); char *(*mprintf) (const char *, ...);
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*)); int (*open) (const char *, sqlite3 **);
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*)) int (*open16) (const void *, sqlite3 **);
; int (*prepare) (sqlite3 *, const char *, int, sqlite3_stmt **,
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*)) const char **);
; int (*prepare16) (sqlite3 *, const void *, int, sqlite3_stmt **,
void (*result_value)(sqlite3_context*,sqlite3_value*); const void **);
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*); void *(*profile) (sqlite3 *, void (*)(void *, const char *, sqlite_uint
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*, 64),
const char*,const char*),void*); void *);
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*)); void (*progress_handler) (sqlite3 *, int, int (*)(void *), void *);
char * (*snprintf)(int,char*,const char*,...); void *(*realloc) (void *, int);
int (*step)(sqlite3_stmt*); int (*reset) (sqlite3_stmt * pStmt);
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char void (*result_blob) (sqlite3_context *, const void *, int,
*,char const**,char const**,int*,int*,int*); void (*)(void *));
void (*thread_cleanup)(void); void (*result_double) (sqlite3_context *, double);
int (*total_changes)(sqlite3*); void (*result_error) (sqlite3_context *, const char *, int);
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*); void (*result_error16) (sqlite3_context *, const void *, int);
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*); void (*result_int) (sqlite3_context *, int);
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const* void (*result_int64) (sqlite3_context *, sqlite_int64);
,sqlite_int64),void*); void (*result_null) (sqlite3_context *);
void * (*user_data)(sqlite3_context*); void (*result_text) (sqlite3_context *, const char *, int,
const void * (*value_blob)(sqlite3_value*); void (*)(void *));
int (*value_bytes)(sqlite3_value*); void (*result_text16) (sqlite3_context *, const void *, int,
int (*value_bytes16)(sqlite3_value*); void (*)(void *));
double (*value_double)(sqlite3_value*); void (*result_text16be) (sqlite3_context *, const void *, int,
int (*value_int)(sqlite3_value*); void (*)(void *));
sqlite_int64 (*value_int64)(sqlite3_value*); void (*result_text16le) (sqlite3_context *, const void *, int,
int (*value_numeric_type)(sqlite3_value*); void (*)(void *));
const unsigned char * (*value_text)(sqlite3_value*); void (*result_value) (sqlite3_context *, sqlite3_value *);
const void * (*value_text16)(sqlite3_value*); void *(*rollback_hook) (sqlite3 *, void (*)(void *), void *);
const void * (*value_text16be)(sqlite3_value*); int (*set_authorizer) (sqlite3 *,
const void * (*value_text16le)(sqlite3_value*); int (*)(void *, int, const char *, const char *,
int (*value_type)(sqlite3_value*); const char *, const char *), void *);
char *(*vmprintf)(const char*,va_list); void (*set_auxdata) (sqlite3_context *, int, void *, void (*)(void *));
/* Added ??? */ char *(*snprintf) (int, char *, const char *, ...);
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg); int (*step) (sqlite3_stmt *);
/* Added by 3.3.13 */ int (*table_column_metadata) (sqlite3 *, const char *, const char *,
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**); const char *, char const **, char const **
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**) ,
; int *, int *, int *);
int (*clear_bindings)(sqlite3_stmt*); void (*thread_cleanup) (void);
/* Added by 3.4.1 */ int (*total_changes) (sqlite3 *);
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*, void *(*trace) (sqlite3 *, void (*xTrace) (void *, const char *), void
void (*xDestroy)(void *)); *);
/* Added by 3.5.0 */ int (*transfer_bindings) (sqlite3_stmt *, sqlite3_stmt *);
int (*bind_zeroblob)(sqlite3_stmt*,int,int); void *(*update_hook) (sqlite3 *,
int (*blob_bytes)(sqlite3_blob*); void (*)(void *, int, char const *, char const *,
int (*blob_close)(sqlite3_blob*); sqlite_int64), void *);
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int void *(*user_data) (sqlite3_context *);
64,int,sqlite3_blob**); const void *(*value_blob) (sqlite3_value *);
int (*blob_read)(sqlite3_blob*,void*,int,int); int (*value_bytes) (sqlite3_value *);
int (*blob_write)(sqlite3_blob*,const void*,int,int); int (*value_bytes16) (sqlite3_value *);
int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,in double (*value_double) (sqlite3_value *);
t,const void*,int,const void*),void(*)(void*)); int (*value_int) (sqlite3_value *);
int (*file_control)(sqlite3*,const char*,int,void*); sqlite_int64 (*value_int64) (sqlite3_value *);
sqlite3_int64 (*memory_highwater)(int); int (*value_numeric_type) (sqlite3_value *);
sqlite3_int64 (*memory_used)(void); const unsigned char *(*value_text) (sqlite3_value *);
sqlite3_mutex *(*mutex_alloc)(int); const void *(*value_text16) (sqlite3_value *);
void (*mutex_enter)(sqlite3_mutex*); const void *(*value_text16be) (sqlite3_value *);
void (*mutex_free)(sqlite3_mutex*); const void *(*value_text16le) (sqlite3_value *);
void (*mutex_leave)(sqlite3_mutex*); int (*value_type) (sqlite3_value *);
int (*mutex_try)(sqlite3_mutex*); char *(*vmprintf) (const char *, va_list);
int (*open_v2)(const char*,sqlite3**,int,const char*); /* Added ??? */
int (*release_memory)(int); int (*overload_function) (sqlite3 *, const char *zFuncName, int nArg);
void (*result_error_nomem)(sqlite3_context*); /* Added by 3.3.13 */
void (*result_error_toobig)(sqlite3_context*); int (*prepare_v2) (sqlite3 *, const char *, int, sqlite3_stmt **,
int (*sleep)(int); const char **);
void (*soft_heap_limit)(int); int (*prepare16_v2) (sqlite3 *, const void *, int, sqlite3_stmt **,
sqlite3_vfs *(*vfs_find)(const char*); const void **);
int (*vfs_register)(sqlite3_vfs*,int); int (*clear_bindings) (sqlite3_stmt *);
int (*vfs_unregister)(sqlite3_vfs*); /* Added by 3.4.1 */
int (*xthreadsafe)(void); int (*create_module_v2) (sqlite3 *, const char *, const sqlite3_module
void (*result_zeroblob)(sqlite3_context*,int); *,
void (*result_error_code)(sqlite3_context*,int); void *, void (*xDestroy) (void *));
int (*test_control)(int, ...); /* Added by 3.5.0 */
void (*randomness)(int,void*); int (*bind_zeroblob) (sqlite3_stmt *, int, int);
sqlite3 *(*context_db_handle)(sqlite3_context*); int (*blob_bytes) (sqlite3_blob *);
int (*extended_result_codes)(sqlite3*,int); int (*blob_close) (sqlite3_blob *);
int (*limit)(sqlite3*,int,int); int (*blob_open) (sqlite3 *, const char *, const char *, const char *,
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*); sqlite3_int64, int, sqlite3_blob **);
const char *(*sql)(sqlite3_stmt*); int (*blob_read) (sqlite3_blob *, void *, int, int);
int (*status)(int,int*,int*,int); int (*blob_write) (sqlite3_blob *, const void *, int, int);
int (*create_collation_v2) (sqlite3 *, const char *, int, void *,
int (*)(void *, int, const void *, int,
const void *), void (*)(void *));
int (*file_control) (sqlite3 *, const char *, int, void *);
sqlite3_int64 (*memory_highwater) (int);
sqlite3_int64 (*memory_used) (void);
sqlite3_mutex *(*mutex_alloc) (int);
void (*mutex_enter) (sqlite3_mutex *);
void (*mutex_free) (sqlite3_mutex *);
void (*mutex_leave) (sqlite3_mutex *);
int (*mutex_try) (sqlite3_mutex *);
int (*open_v2) (const char *, sqlite3 **, int, const char *);
int (*release_memory) (int);
void (*result_error_nomem) (sqlite3_context *);
void (*result_error_toobig) (sqlite3_context *);
int (*sleep) (int);
void (*soft_heap_limit) (int);
sqlite3_vfs *(*vfs_find) (const char *);
int (*vfs_register) (sqlite3_vfs *, int);
int (*vfs_unregister) (sqlite3_vfs *);
int (*xthreadsafe) (void);
void (*result_zeroblob) (sqlite3_context *, int);
void (*result_error_code) (sqlite3_context *, int);
int (*test_control) (int, ...);
void (*randomness) (int, void *);
sqlite3 *(*context_db_handle) (sqlite3_context *);
int (*extended_result_codes) (sqlite3 *, int);
int (*limit) (sqlite3 *, int, int);
sqlite3_stmt *(*next_stmt) (sqlite3 *, sqlite3_stmt *);
const char *(*sql) (sqlite3_stmt *);
int (*status) (int, int *, int *, int);
}; };
/* /*
** The following macros redefine the API routines so that they are ** The following macros redefine the API routines so that they are
** redirected throught the global sqlite3_api structure. ** redirected throught the global sqlite3_api structure.
** **
** This header file is also used by the loadext.c source file ** This header file is also used by the loadext.c source file
** (part of the main SQLite library - not an extension) so that ** (part of the main SQLite library - not an extension) so that
** it can get access to the sqlite3_api_routines structure ** it can get access to the sqlite3_api_routines structure
** definition. But the main library does not want to redefine ** definition. But the main library does not want to redefine
** the API. So the redefinition macros are only valid if the ** the API. So the redefinition macros are only valid if the
** SQLITE_CORE macros is undefined. ** SQLITE_CORE macros is undefined.
*/ */
#ifndef SQLITE_CORE #ifndef SQLITE_CORE
#define sqlite3_aggregate_context sqlite3_api->aggregate_context #define sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_aggregate_count sqlite3_api->aggregate_count #define sqlite3_aggregate_count sqlite3_api->aggregate_count
#endif
#define sqlite3_bind_blob sqlite3_api->bind_blob #define sqlite3_bind_blob sqlite3_api->bind_blob
#define sqlite3_bind_double sqlite3_api->bind_double #define sqlite3_bind_double sqlite3_api->bind_double
#define sqlite3_bind_int sqlite3_api->bind_int #define sqlite3_bind_int sqlite3_api->bind_int
#define sqlite3_bind_int64 sqlite3_api->bind_int64 #define sqlite3_bind_int64 sqlite3_api->bind_int64
#define sqlite3_bind_null sqlite3_api->bind_null #define sqlite3_bind_null sqlite3_api->bind_null
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count #define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index #define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name #define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
#define sqlite3_bind_text sqlite3_api->bind_text #define sqlite3_bind_text sqlite3_api->bind_text
#define sqlite3_bind_text16 sqlite3_api->bind_text16 #define sqlite3_bind_text16 sqlite3_api->bind_text16
skipping to change at line 267 skipping to change at line 312
#define sqlite3_create_module sqlite3_api->create_module #define sqlite3_create_module sqlite3_api->create_module
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2 #define sqlite3_create_module_v2 sqlite3_api->create_module_v2
#define sqlite3_data_count sqlite3_api->data_count #define sqlite3_data_count sqlite3_api->data_count
#define sqlite3_db_handle sqlite3_api->db_handle #define sqlite3_db_handle sqlite3_api->db_handle
#define sqlite3_declare_vtab sqlite3_api->declare_vtab #define sqlite3_declare_vtab sqlite3_api->declare_vtab
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache #define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
#define sqlite3_errcode sqlite3_api->errcode #define sqlite3_errcode sqlite3_api->errcode
#define sqlite3_errmsg sqlite3_api->errmsg #define sqlite3_errmsg sqlite3_api->errmsg
#define sqlite3_errmsg16 sqlite3_api->errmsg16 #define sqlite3_errmsg16 sqlite3_api->errmsg16
#define sqlite3_exec sqlite3_api->exec #define sqlite3_exec sqlite3_api->exec
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_expired sqlite3_api->expired #define sqlite3_expired sqlite3_api->expired
#endif
#define sqlite3_finalize sqlite3_api->finalize #define sqlite3_finalize sqlite3_api->finalize
#define sqlite3_free sqlite3_api->free #define sqlite3_free sqlite3_api->free
#define sqlite3_free_table sqlite3_api->free_table #define sqlite3_free_table sqlite3_api->free_table
#define sqlite3_get_autocommit sqlite3_api->get_autocommit #define sqlite3_get_autocommit sqlite3_api->get_autocommit
#define sqlite3_get_auxdata sqlite3_api->get_auxdata #define sqlite3_get_auxdata sqlite3_api->get_auxdata
#define sqlite3_get_table sqlite3_api->get_table #define sqlite3_get_table sqlite3_api->get_table
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_global_recover sqlite3_api->global_recover #define sqlite3_global_recover sqlite3_api->global_recover
#endif
#define sqlite3_interrupt sqlite3_api->interruptx #define sqlite3_interrupt sqlite3_api->interruptx
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid #define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
#define sqlite3_libversion sqlite3_api->libversion #define sqlite3_libversion sqlite3_api->libversion
#define sqlite3_libversion_number sqlite3_api->libversion_number #define sqlite3_libversion_number sqlite3_api->libversion_number
#define sqlite3_malloc sqlite3_api->malloc #define sqlite3_malloc sqlite3_api->malloc
#define sqlite3_mprintf sqlite3_api->mprintf #define sqlite3_mprintf sqlite3_api->mprintf
#define sqlite3_open sqlite3_api->open #define sqlite3_open sqlite3_api->open
#define sqlite3_open16 sqlite3_api->open16 #define sqlite3_open16 sqlite3_api->open16
#define sqlite3_prepare sqlite3_api->prepare #define sqlite3_prepare sqlite3_api->prepare
#define sqlite3_prepare16 sqlite3_api->prepare16 #define sqlite3_prepare16 sqlite3_api->prepare16
skipping to change at line 312 skipping to change at line 361
#define sqlite3_result_value sqlite3_api->result_value #define sqlite3_result_value sqlite3_api->result_value
#define sqlite3_rollback_hook sqlite3_api->rollback_hook #define sqlite3_rollback_hook sqlite3_api->rollback_hook
#define sqlite3_set_authorizer sqlite3_api->set_authorizer #define sqlite3_set_authorizer sqlite3_api->set_authorizer
#define sqlite3_set_auxdata sqlite3_api->set_auxdata #define sqlite3_set_auxdata sqlite3_api->set_auxdata
#define sqlite3_snprintf sqlite3_api->snprintf #define sqlite3_snprintf sqlite3_api->snprintf
#define sqlite3_step sqlite3_api->step #define sqlite3_step sqlite3_api->step
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata #define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup #define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
#define sqlite3_total_changes sqlite3_api->total_changes #define sqlite3_total_changes sqlite3_api->total_changes
#define sqlite3_trace sqlite3_api->trace #define sqlite3_trace sqlite3_api->trace
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings #define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
#endif
#define sqlite3_update_hook sqlite3_api->update_hook #define sqlite3_update_hook sqlite3_api->update_hook
#define sqlite3_user_data sqlite3_api->user_data #define sqlite3_user_data sqlite3_api->user_data
#define sqlite3_value_blob sqlite3_api->value_blob #define sqlite3_value_blob sqlite3_api->value_blob
#define sqlite3_value_bytes sqlite3_api->value_bytes #define sqlite3_value_bytes sqlite3_api->value_bytes
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16 #define sqlite3_value_bytes16 sqlite3_api->value_bytes16
#define sqlite3_value_double sqlite3_api->value_double #define sqlite3_value_double sqlite3_api->value_double
#define sqlite3_value_int sqlite3_api->value_int #define sqlite3_value_int sqlite3_api->value_int
#define sqlite3_value_int64 sqlite3_api->value_int64 #define sqlite3_value_int64 sqlite3_api->value_int64
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type #define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
#define sqlite3_value_text sqlite3_api->value_text #define sqlite3_value_text sqlite3_api->value_text
 End of changes. 10 change blocks. 
179 lines changed or deleted 218 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/