From 186c6e3303ccef8e833026e4e9dbaa76be6cb93b Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Fri, 1 Apr 2016 23:10:44 +0200 Subject: First steps toward simplified macros/internals The brief version:: In an attempt to make proj.4 code slightly more secure and much easier to read and maintain, I'm trying to eliminate a few unfortunate design decisions from the early days of proj.4 The work will be *very* intrusive, especially in the PJ_xxx segment of the code tree, but great care has been taken to design a process that can be implemented stepwise and localized, one projection at a time, then finalized with a relatively small and concentrated work package. The (very) long version: See the comments in PJ_minimal.c --- src/proj_api.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/proj_api.h') diff --git a/src/proj_api.h b/src/proj_api.h index b482c0f5..dd25d61a 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -130,6 +130,8 @@ char *pj_get_def(projPJ, int); projPJ pj_latlong_from_proj( projPJ ); void *pj_malloc(size_t); void pj_dalloc(void *); +void *pj_calloc (size_t n, size_t size); +void *pj_dealloc (void *ptr); char *pj_strerrno(int); int *pj_get_errno_ref(void); const char *pj_get_release(void); -- cgit v1.2.3 From eeea65526dfd0301a7759a978a5b8fcbcf5baecd Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 5 Apr 2016 19:05:06 +0200 Subject: Some initial work on internal regression tests Need these to reduce the chance I'm screwing up something during this rather intrusive code surgery --- src/proj_api.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/proj_api.h') diff --git a/src/proj_api.h b/src/proj_api.h index dd25d61a..24a6f053 100644 --- a/src/proj_api.h +++ b/src/proj_api.h @@ -168,6 +168,9 @@ char *pj_ctx_fgets(projCtx ctx, char *line, int size, PAFile file); PAFile pj_open_lib(projCtx, const char *, const char *); +int pj_run_selftests (int verbosity); + + #define PJ_LOG_NONE 0 #define PJ_LOG_ERROR 1 #define PJ_LOG_DEBUG_MAJOR 2 -- cgit v1.2.3