aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-12-18 21:00:00 +0100
committerEven Rouault <even.rouault@spatialys.com>2019-12-18 21:00:00 +0100
commita70e477087ff05ab24a54b806d89b5e4b970ec0a (patch)
tree3cfc9e06209beed0f374116537f2e95d74dba6dc /src
parentf36d2374268608d276da45c96a7b4792ab8ffdb5 (diff)
downloadPROJ-a70e477087ff05ab24a54b806d89b5e4b970ec0a.tar.gz
PROJ-a70e477087ff05ab24a54b806d89b5e4b970ec0a.zip
Rename PJ_CONTEXT::fileapi member as fileapi_legacy
Diffstat (limited to 'src')
-rw-r--r--src/ctx.cpp8
-rw-r--r--src/fileapi.cpp10
-rw-r--r--src/proj_internal.h6
3 files changed, 11 insertions, 13 deletions
diff --git a/src/ctx.cpp b/src/ctx.cpp
index bcb6e1cc..4536582d 100644
--- a/src/ctx.cpp
+++ b/src/ctx.cpp
@@ -95,7 +95,7 @@ projCtx_t projCtx_t::createDefault()
projCtx_t ctx;
ctx.debug_level = PJ_LOG_NONE;
ctx.logger = pj_stderr_logger;
- ctx.fileapi = pj_get_default_fileapi();
+ ctx.fileapi_legacy = pj_get_default_fileapi();
if( getenv("PROJ_DEBUG") != nullptr )
{
@@ -133,7 +133,7 @@ projCtx_t::projCtx_t(const projCtx_t& other)
debug_level = other.debug_level;
logger = other.logger;
logger_app_data = other.logger_app_data;
- fileapi = other.fileapi;
+ fileapi_legacy = other.fileapi_legacy;
epsg_file_exists = other.epsg_file_exists;
set_search_paths(other.search_paths);
file_finder = other.file_finder;
@@ -268,7 +268,7 @@ void pj_ctx_set_fileapi( projCtx ctx, projFileAPI *fileapi )
{
if (nullptr==ctx)
return;
- ctx->fileapi = fileapi;
+ ctx->fileapi_legacy = fileapi;
}
/************************************************************************/
@@ -280,6 +280,6 @@ projFileAPI *pj_ctx_get_fileapi( projCtx ctx )
{
if (nullptr==ctx)
return nullptr;
- return ctx->fileapi;
+ return ctx->fileapi_legacy;
}
diff --git a/src/fileapi.cpp b/src/fileapi.cpp
index 70c7b5de..f39d94bb 100644
--- a/src/fileapi.cpp
+++ b/src/fileapi.cpp
@@ -141,7 +141,7 @@ static void stdio_fclose(PAFile file)
PAFile pj_ctx_fopen(projCtx ctx, const char *filename, const char *access)
{
- return ctx->fileapi->FOpen(ctx, filename, access);
+ return ctx->fileapi_legacy->FOpen(ctx, filename, access);
}
/************************************************************************/
@@ -149,7 +149,7 @@ PAFile pj_ctx_fopen(projCtx ctx, const char *filename, const char *access)
/************************************************************************/
size_t pj_ctx_fread(projCtx ctx, void *buffer, size_t size, size_t nmemb, PAFile file)
{
- return ctx->fileapi->FRead(buffer, size, nmemb, file);
+ return ctx->fileapi_legacy->FRead(buffer, size, nmemb, file);
}
/************************************************************************/
@@ -157,7 +157,7 @@ size_t pj_ctx_fread(projCtx ctx, void *buffer, size_t size, size_t nmemb, PAFile
/************************************************************************/
int pj_ctx_fseek(projCtx ctx, PAFile file, long offset, int whence)
{
- return ctx->fileapi->FSeek(file, offset, whence);
+ return ctx->fileapi_legacy->FSeek(file, offset, whence);
}
/************************************************************************/
@@ -165,7 +165,7 @@ int pj_ctx_fseek(projCtx ctx, PAFile file, long offset, int whence)
/************************************************************************/
long pj_ctx_ftell(projCtx ctx, PAFile file)
{
- return ctx->fileapi->FTell(file);
+ return ctx->fileapi_legacy->FTell(file);
}
/************************************************************************/
@@ -173,7 +173,7 @@ long pj_ctx_ftell(projCtx ctx, PAFile file)
/************************************************************************/
void pj_ctx_fclose(projCtx ctx, PAFile file)
{
- ctx->fileapi->FClose(file);
+ ctx->fileapi_legacy->FClose(file);
}
/************************************************************************/
diff --git a/src/proj_internal.h b/src/proj_internal.h
index 7d826414..93134946 100644
--- a/src/proj_internal.h
+++ b/src/proj_internal.h
@@ -214,9 +214,6 @@ size_t pj_trim_argc (char *args);
char **pj_trim_argv (size_t argc, char *args);
char *pj_make_args (size_t argc, char **argv);
-/* Lowest level: Minimum support for fileapi */
-void proj_fileapi_set (PJ *P, void *fileapi);
-
typedef struct { double r, i; } COMPLEX;
/* Forward declarations and typedefs for stuff needed inside the PJ object */
@@ -664,6 +661,7 @@ struct FACTORS {
/* NOTE: Remember to update src/strerrno.cpp, src/apps/gie.cpp and transient_error in */
/* src/transform.cpp when adding new value */
+// Legacy
struct projFileAPI_t;
struct projCppContext;
@@ -674,7 +672,7 @@ struct projCtx_t {
int debug_level = 0;
void (*logger)(void *, int, const char *) = nullptr;
void *logger_app_data = nullptr;
- struct projFileAPI_t *fileapi = nullptr;
+ struct projFileAPI_t *fileapi_legacy = nullptr; // for proj_api.h legacy API
struct projCppContext* cpp_context = nullptr; /* internal context for C++ code */
int use_proj4_init_rules = -1; /* -1 = unknown, 0 = no, 1 = yes */
int epsg_file_exists = -1; /* -1 = unknown, 0 = no, 1 = yes */