aboutsummaryrefslogtreecommitdiff
path: root/src/pj_gc_reader.c
AgeCommit message (Collapse)Author
2018-05-15IWYU: Partial PJ_natearth.c..rtodms.cKurt Schwehr
2018-03-11Remove 'pj_' prefix from static functionsKristian Evers
Functions should only be prefixed with 'pj_' when they can be used in other parts of the code base and not just within a single file. Takes care of the last step in #675.
2018-03-11Remove angle brackets for proj headers (#849)Thomas Knudsen
* Avoid using angle brackets for PROJ headers. Switching from #include <proj.h> to #include "proj.h", and correspondingly for projects.h and proj_api.h, reduces the risk of accidentally picking up a system installed older version of the header while building a new version of PROJ. * Also handle geodesic.h
2017-12-17Declare non-local variables as const where possibleAaron Puchert
Having non-const variables of static lifetime or even global scope is usually a bad idea. These variables are inherently constants, and this should be enforced. This required marking some functions as not modifying input parameters and marking some pointers as pointers to const. One advantage is that the compiler usually puts const static variables in a read-only code segment, so they can't be modified physically. This can be verified with `nm` (on POSIX systems). To avoid changes to the public API, functions returning non-const pointers to data tables were left intact, but the returned data may not be modified. Internally we prefer using the proj_list_* functions over the pj_get_*_ref functions, because the former return const pointers.
2017-10-19Prevent crashes and leaks on allocation failure (#606)Aaron Puchert
* Prevent crashes and leaks on allocation failure Memory allocation can fail. We need to gracefully handle this case and prevent dereferencing null pointers. * Make NULL checks consistent within a file * Properly report allocation errors * Improve cleanup in pj_gc_reader.c * Implement pj_strdup and use instead of strdup The function strdup is not part of ANSI C 89, but a POSIX extension. Therefore we can not rely on it being available on all platforms.
2017-05-30catalog: memory leak and crashes related fixesEven Rouault
* pj_transform() crashes on a catalog that has no matching grid * pj_free() and pj_gc_unloadall() badly interact. No longer try to free the catalog object in pj_free(). That is the job of pj_gc_unloadall() * Fix memory leaks in pj_gc_readcatalog() and pj_gc_unloadall() Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1923 Credit to OSS Fuzz.
2017-02-28Enable cppcheck and fix related mostly false-positive warningsEven Rouault
2015-07-07Make pj_init() locale safe and no longer modify locale (#226)Even Rouault
Remove setlocale() use in pj_init_ctx(), and replace uses of atof() & strtod() by their locale safe variants pj_atof() and pj_strtod(). Proj versions from now advertize #define PJ_LOCALE_SAFE 1 in proj_api.h and export pj_atof() & pj_strtod()
2015-05-31Remove unused $Id$ keywords.Elliott Sales de Andrade
2015-05-30Remove unused function.Elliott Sales de Andrade
2015-05-30Fix unused function argument warnings.Elliott Sales de Andrade
2013-06-22upgrade to the new file apiFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2348 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-06-22bulk of file api implementation complete and workingFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2345 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-06-19first nearly working grid catalog implementationFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2219 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-06-18preliminary work on grid catalogsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2218 4e78687f-474d-0410-85f9-8d5e500ac6b2