From 9419b42ade1f1d35a61c05f0f7ce9aab2eeff3c7 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 1 Nov 2020 13:34:32 +0100 Subject: Remove proj_api.h Removes proj_api.h from the public API. The contents of the header file has been moved to proj_internal.h verbatim and any references to proj_api.h has been changed to proj_internal.h. The documentation of proj_api.h has been removed. The only exception to this is the API migration guides which still mention the old API. Fixes #837 --- src/tests/test228.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/test228.cpp') diff --git a/src/tests/test228.cpp b/src/tests/test228.cpp index 8ae17c87..b27ebf2f 100644 --- a/src/tests/test228.cpp +++ b/src/tests/test228.cpp @@ -30,7 +30,7 @@ #define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H #endif -#include "proj_api.h" +#include "proj_internal.h" #include /* for printf declaration */ -- cgit v1.2.3 From 9e50c8c0e207191c4c7bb6883f7ad485df04fc2c Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sun, 1 Nov 2020 14:56:17 +0100 Subject: Remove ACCEPT_USE_OF_DEPRECATED_PROJ_API_H macro --- src/tests/test228.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/tests/test228.cpp') diff --git a/src/tests/test228.cpp b/src/tests/test228.cpp index b27ebf2f..bffb8e79 100644 --- a/src/tests/test228.cpp +++ b/src/tests/test228.cpp @@ -26,10 +26,6 @@ * DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#ifndef ACCEPT_USE_OF_DEPRECATED_PROJ_API_H -#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H -#endif - #include "proj_internal.h" #include /* for printf declaration */ -- cgit v1.2.3 From aa46197d66ce70ece382bf955326c46b13f35864 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 14 Nov 2020 22:55:31 +0100 Subject: Weed out proj_api.h datatypes and replace them with their proj.h counterparts --- src/tests/test228.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/tests/test228.cpp') diff --git a/src/tests/test228.cpp b/src/tests/test228.cpp index bffb8e79..ae2eb9cc 100644 --- a/src/tests/test228.cpp +++ b/src/tests/test228.cpp @@ -50,9 +50,9 @@ static volatile int started = 0; static void* thread_main(void* unused) { - projCtx p_proj_ctxt; - projPJ p_WGS84_proj; - projPJ p_OSGB36_proj; + PJ_CONTEXT *p_proj_ctxt; + PJ *p_WGS84_proj; + PJ * p_OSGB36_proj; (void)unused; __sync_add_and_fetch(&started, 1); -- cgit v1.2.3 From f4dc79075c19706dda6e3253c2f224e9df468291 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 30 Nov 2020 01:35:59 +0100 Subject: API cleanup: unexport number of internal symbols, and remove/replace a few unused ones --- src/tests/test228.cpp | 109 -------------------------------------------------- 1 file changed, 109 deletions(-) delete mode 100644 src/tests/test228.cpp (limited to 'src/tests/test228.cpp') diff --git a/src/tests/test228.cpp b/src/tests/test228.cpp deleted file mode 100644 index ae2eb9cc..00000000 --- a/src/tests/test228.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/****************************************************************************** - * - * Project: PROJ - * Purpose: Test - * Author: Even Rouault - * - ****************************************************************************** - * Copyright (c) 2014, Even Rouault - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - ****************************************************************************/ - -#include "proj_internal.h" -#include /* for printf declaration */ - - -#ifdef _WIN32 - -int main(int argc, char* argv[]) -{ - printf("Test not yet ported on Win32\n"); - return 0; -} - -#else - -#include -#include -#include -#include - -static volatile int run = 0; -static volatile int started = 0; - -static void* thread_main(void* unused) -{ - PJ_CONTEXT *p_proj_ctxt; - PJ *p_WGS84_proj; - PJ * p_OSGB36_proj; - (void)unused; - - __sync_add_and_fetch(&started, 1); - while(run == 0); - - p_proj_ctxt=pj_ctx_alloc(); - p_WGS84_proj=pj_init_plus_ctx(p_proj_ctxt,"+proj=longlat " - "+ellps=WGS84 +datum=WGS84"); - p_OSGB36_proj=pj_init_plus_ctx(p_proj_ctxt, - "+proj=longlat +ellps=airy +datum=OSGB36 +nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb"); - - while(run) - { - double x, y; - int proj_ret; - - x = -5.2*DEG_TO_RAD; - y = 50*DEG_TO_RAD; - proj_ret = pj_transform(p_WGS84_proj, - p_OSGB36_proj, 1, 1, &x, &y, nullptr ); - x *= RAD_TO_DEG; - y *= RAD_TO_DEG; - /*printf("%.18f %.18f\n", x, y); */ - assert(proj_ret == 0); - assert(fabs(x - -5.198965207267856492) < 1e-15); - assert(fabs(y - 49.999396074140378232) < 1e-15); - } - - pj_free (p_OSGB36_proj); - pj_free (p_WGS84_proj); - return nullptr; -} - -int main() -{ - int i; - - pthread_t tid1, tid2; - pthread_attr_t attr1, attr2; - - pthread_attr_init(&attr1); - pthread_attr_init(&attr2); - - pthread_create(&tid1, &attr1, thread_main, nullptr); - pthread_create(&tid2, &attr2, thread_main, nullptr); - while(started != 2); - run = 1; - for(i=0;i<2;i++) - sleep(1); - run = 0; - return 0; -} - -#endif /* _WIN32 */ -- cgit v1.2.3