Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | fixing several typos reported by LinuxMinded |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
497f33bd73da1ac015018f7c87d47563 |
User & Date: | sandro 2014-11-28 18:46:19 |
Context
2014-12-03
| ||
18:03 | restricting the eval() SQL function to SPATIALITE_SECURITY=relaxed check-in: 3af3a81fdf user: sandro tags: trunk | |
2014-11-28
| ||
18:46 | fixing several typos reported by LinuxMinded check-in: 497f33bd73 user: sandro tags: trunk | |
2014-11-22
| ||
20:53 | switching to 4.2.1 release candidate 1 check-in: 2ffb78113e user: sandro tags: trunk | |
Changes
Changes to src/gaiageo/gg_xml.c.
2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 |
compressed = 1; return compressed; } GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob (const unsigned char *blob, int blob_size) { /* Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema validation or not */ int validated = 0; unsigned char flag; /* validity check */ if (!gaiaIsValidXmlBlob (blob, blob_size)) return -1; /* cannot be an XmlBLOB */ flag = *(blob + 1); |
| |
2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 |
compressed = 1;
return compressed;
}
GAIAGEO_DECLARE int
gaiaIsSchemaValidatedXmlBlob (const unsigned char *blob, int blob_size)
{
/* Checks if a valid XmlBLOB buffer has successfully passed a formal Schema validation or not */
int validated = 0;
unsigned char flag;
/* validity check */
if (!gaiaIsValidXmlBlob (blob, blob_size))
return -1; /* cannot be an XmlBLOB */
flag = *(blob + 1);
|
Changes to src/headers/spatialite/gaiaaux.h.
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
/** SQL log: statement start \param sqlite handle of the current DB connection \param sqllog_pk the Primary Key identifying the corresponding Log event. \n expected to be exactely the same returned by the most recent call to gaiaInsertIntoSqlLog() \param success expected to be TRUE if the SQL statement was succesfully executed. \param errMsg expected to be the error message returned by SQLite on failure, NULL on success. \sa gaiaInsertIntoSqlLog \note this function completes an \b event inserted into the SQL Log, and is expected to be invoked immediately \b after executing the SQL statement itself. |
| |
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
/**
SQL log: statement start
\param sqlite handle of the current DB connection
\param sqllog_pk the Primary Key identifying the corresponding Log event.
\n expected to be exactely the same returned by the most recent call to gaiaInsertIntoSqlLog()
\param success expected to be TRUE if the SQL statement was successfully executed.
\param errMsg expected to be the error message returned by SQLite on failure, NULL on success.
\sa gaiaInsertIntoSqlLog
\note this function completes an \b event inserted into the SQL Log, and
is expected to be invoked immediately \b after executing the SQL
statement itself.
|
Changes to src/headers/spatialite/gg_xml.h.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 ... 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 ... 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
Creates an XmlBLOB buffer \param p_cache a memory pointer returned by spatialite_alloc_connection() \param xml pointer to the XML document (XmlBLOB payload). \param xml_len lenght of the XML document (in bytes). \param compressed if TRUE the returned XmlBLOB will be zip-compressed. \param schemaURI if not NULL the XML document will be assumed to be valid only if it succesfully passes a formal Schema valitadion. \param result on completion will containt a pointer to XmlBLOB: NULL on failure. \param size on completion this variable will contain the XmlBLOB's size (in bytes) \param parsing_errors on completion this variable will contain all error/warning messages emitted during the XML Parsing step. Can be set to NULL so to ignore any message. \param schema_validation_errors on completion this variable will contain all error/warning messages emitted during the XML Schema Validation step. Can be set to NULL so to ignore any message. ................................................................................ \param size XmlBLOB's size (in bytes). \param indent if a negative value is passed the XMLDocument will be extracted exactly as it was when loaded. Otherwise it will be properly formatted using the required intenting (max. 8); ZERO means that the whole XML Document will consist of a single line. \param result pointer to the memory buffer containing the XML Document \param res_size dimension (in bytes) of the XML Document memory buffer (both values will be passed back after succesful completion). \sa gaiaXmlToBlob, gaiaXmlTextFromBlob \note the returned XMLDocument will always respect the internal encoding declaration, and may not support any further processing as SQLite TEXT if it's not UTF-8. ................................................................................ */ GAIAGEO_DECLARE void gaiaXmlBlobCompression (const unsigned char *blob, int in_size, int compressed, unsigned char **result, int *out_size); /** Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema validation or not \param blob pointer to the XmlBLOB buffer. \param size XmlBLOB's size (in bytes). \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB but not schema-validated; -1 in any other case. |
| | | |
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 ... 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 ... 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 |
Creates an XmlBLOB buffer \param p_cache a memory pointer returned by spatialite_alloc_connection() \param xml pointer to the XML document (XmlBLOB payload). \param xml_len lenght of the XML document (in bytes). \param compressed if TRUE the returned XmlBLOB will be zip-compressed. \param schemaURI if not NULL the XML document will be assumed to be valid only if it successfully passes a formal Schema valitadion. \param result on completion will containt a pointer to XmlBLOB: NULL on failure. \param size on completion this variable will contain the XmlBLOB's size (in bytes) \param parsing_errors on completion this variable will contain all error/warning messages emitted during the XML Parsing step. Can be set to NULL so to ignore any message. \param schema_validation_errors on completion this variable will contain all error/warning messages emitted during the XML Schema Validation step. Can be set to NULL so to ignore any message. ................................................................................ \param size XmlBLOB's size (in bytes). \param indent if a negative value is passed the XMLDocument will be extracted exactly as it was when loaded. Otherwise it will be properly formatted using the required intenting (max. 8); ZERO means that the whole XML Document will consist of a single line. \param result pointer to the memory buffer containing the XML Document \param res_size dimension (in bytes) of the XML Document memory buffer (both values will be passed back after successful completion). \sa gaiaXmlToBlob, gaiaXmlTextFromBlob \note the returned XMLDocument will always respect the internal encoding declaration, and may not support any further processing as SQLite TEXT if it's not UTF-8. ................................................................................ */ GAIAGEO_DECLARE void gaiaXmlBlobCompression (const unsigned char *blob, int in_size, int compressed, unsigned char **result, int *out_size); /** Checks if a valid XmlBLOB buffer has successfully passed a formal Schema validation or not \param blob pointer to the XmlBLOB buffer. \param size XmlBLOB's size (in bytes). \return TRUE or FALSE if the BLOB actually is a valid XmlBLOB but not schema-validated; -1 in any other case. |
Changes to src/shapefiles/validator.c.
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
....
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
|
fprintf (out,
"\t\t\t<tr><td colspan=\"2\" class=\"wng\">This layer contains valid but dubious Geometries;<br>");
fprintf (out, "a repair action is suggested.</td></tr>\n");
}
else if (report->n_repaired > 0)
{
fprintf (out,
"\t\t\t<tr><td colspan=\"2\" class=\"ok\">This layer has been succesfully repaired and is now completely valid;<br>");
fprintf (out,
"doesn't require any further corrective action.</td></tr>\n");
}
else
{
fprintf (out,
"\t\t\t<tr><td colspan=\"2\" class=\"ok\">This layer already was completely valid;<br>");
................................................................................
{
p_msg = "NONE: this layer was already fully valid";
cls_msg = "nil";
}
else if (n_discarded == 0 && n_failures == 0)
{
p_msg =
"NONE: this layer has been succesfully sanitized and is now fully valid";
cls_msg = "ok";
}
else if (n_discarded == 0 && n_failures > 0)
{
p_msg = "Please check all discarded fragments";
cls_msg = "wng";
}
|
|
|
|
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
....
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
|
fprintf (out, "\t\t\t<tr><td colspan=\"2\" class=\"wng\">This layer contains valid but dubious Geometries;<br>"); fprintf (out, "a repair action is suggested.</td></tr>\n"); } else if (report->n_repaired > 0) { fprintf (out, "\t\t\t<tr><td colspan=\"2\" class=\"ok\">This layer has been successfully repaired and is now completely valid;<br>"); fprintf (out, "doesn't require any further corrective action.</td></tr>\n"); } else { fprintf (out, "\t\t\t<tr><td colspan=\"2\" class=\"ok\">This layer already was completely valid;<br>"); ................................................................................ { p_msg = "NONE: this layer was already fully valid"; cls_msg = "nil"; } else if (n_discarded == 0 && n_failures == 0) { p_msg = "NONE: this layer has been successfully sanitized and is now fully valid"; cls_msg = "ok"; } else if (n_discarded == 0 && n_failures > 0) { p_msg = "Please check all discarded fragments"; cls_msg = "wng"; } |
Changes to src/spatialite/spatialite.c.
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 ..... 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 ..... 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 ..... 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 29082 29083 29084 29085 |
{ /* SQL function: / RTreeAlign(RTree-table-name, PKID-value, BLOBencoded geometry) / / attempts to update the associated R*Tree, returning: / / -1 - if some invalid arg was passed / 1 - succesfull update / 0 - update failure / */ unsigned char *p_blob = NULL; int n_bytes = 0; sqlite3_int64 pkid; const char *rtree_table; ................................................................................ } else { ret = 0; spatialite_e ("Unable to parse: %s\n", filename); goto stop_dxf; } spatialite_e ("\n*** DXF file succesfully loaded\n"); ret = 1; stop_dxf: /* destroying the DXF parser */ gaiaDestroyDxfParser (dxf); return ret; } ................................................................................ / XB_Create(BLOB XMLdocument, bool compressed, int InternalSchemaURI) / / returns the current XmlBlob by parsing an XMLdocument / or NULL if any error is encountered / / - the XMLdocument should be "well formed" / - if *compressed* is TRUE (default) the XmlBlob would be zipped / - if *SchemaURI* in not NULL then only XMLdocuments succesfully / passing a formal Schema Validation will be accepted as valid / - if *InternalSchamaURI* is defined (any numeric value) then an / attempt will be made in order to identify a SchemaURI defined / internally within the XMLDocument itself. / if such internal SchemaURI doesn't exists, or if the formal / Schema Validation fails, NULL will be returned. */ ................................................................................ { /* SQL function: / XB_SchemaValidate(XmlBLOB, text SchemaURI) / XB_SchemaValidate(XmlBLOB, text SchemaURI, bool compressed) / XB_SchemaValidate(XmlBLOB, int InternalSchemaURI) / XB_SchemaValidate(XmlBLOB, int InternalSchemaURI, bool compressed) / / returns a validated XmlBLOB object if the SchemaValidation was succesfull / or NULL if any error is encountered */ int len; unsigned char *p_result = NULL; const unsigned char *p_blob; int n_bytes; unsigned char *xml; |
| | | | |
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 ..... 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 ..... 28813 28814 28815 28816 28817 28818 28819 28820 28821 28822 28823 28824 28825 28826 28827 ..... 29071 29072 29073 29074 29075 29076 29077 29078 29079 29080 29081 29082 29083 29084 29085 |
{ /* SQL function: / RTreeAlign(RTree-table-name, PKID-value, BLOBencoded geometry) / / attempts to update the associated R*Tree, returning: / / -1 - if some invalid arg was passed / 1 - successful update / 0 - update failure / */ unsigned char *p_blob = NULL; int n_bytes = 0; sqlite3_int64 pkid; const char *rtree_table; ................................................................................ } else { ret = 0; spatialite_e ("Unable to parse: %s\n", filename); goto stop_dxf; } spatialite_e ("\n*** DXF file successfully loaded\n"); ret = 1; stop_dxf: /* destroying the DXF parser */ gaiaDestroyDxfParser (dxf); return ret; } ................................................................................ / XB_Create(BLOB XMLdocument, bool compressed, int InternalSchemaURI) / / returns the current XmlBlob by parsing an XMLdocument / or NULL if any error is encountered / / - the XMLdocument should be "well formed" / - if *compressed* is TRUE (default) the XmlBlob would be zipped / - if *SchemaURI* in not NULL then only XMLdocuments successfully / passing a formal Schema Validation will be accepted as valid / - if *InternalSchamaURI* is defined (any numeric value) then an / attempt will be made in order to identify a SchemaURI defined / internally within the XMLDocument itself. / if such internal SchemaURI doesn't exists, or if the formal / Schema Validation fails, NULL will be returned. */ ................................................................................ { /* SQL function: / XB_SchemaValidate(XmlBLOB, text SchemaURI) / XB_SchemaValidate(XmlBLOB, text SchemaURI, bool compressed) / XB_SchemaValidate(XmlBLOB, int InternalSchemaURI) / XB_SchemaValidate(XmlBLOB, int InternalSchemaURI, bool compressed) / / returns a validated XmlBLOB object if the SchemaValidation was successful / or NULL if any error is encountered */ int len; unsigned char *p_result = NULL; const unsigned char *p_blob; int n_bytes; unsigned char *xml; |