aboutsummaryrefslogtreecommitdiff
path: root/src/apps/proj.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-11-18 10:43:16 +0100
committerKristian Evers <kristianevers@gmail.com>2020-11-20 16:40:40 +0100
commit56f0ad70054eea15e9671cd67aafd14bf7c11c74 (patch)
tree0b12d37bc05a327b3db460d9b81eb11a32302737 /src/apps/proj.cpp
parent43efca4ab87fb37a0931edcb6be11c0bd3784098 (diff)
downloadPROJ-56f0ad70054eea15e9671cd67aafd14bf7c11c74.tar.gz
PROJ-56f0ad70054eea15e9671cd67aafd14bf7c11c74.zip
Remove pj_errno and related functions
Diffstat (limited to 'src/apps/proj.cpp')
-rw-r--r--src/apps/proj.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/apps/proj.cpp b/src/apps/proj.cpp
index 8bfd99a3..a5c917f6 100644
--- a/src/apps/proj.cpp
+++ b/src/apps/proj.cpp
@@ -250,10 +250,8 @@ static void vprocess(FILE *fid) {
if (postscale) { dat_xy.x *= fscale; dat_xy.y *= fscale; }
}
- /* For some reason pj_errno does not work as expected in some */
- /* versions of Visual Studio, so using pj_get_errno_ref instead */
- if (*pj_get_errno_ref()) {
- emess(-1, pj_strerrno(*pj_get_errno_ref()));
+ if (proj_context_errno(nullptr)) {
+ emess(-1, proj_errno_string(proj_context_errno(nullptr)));
continue;
}
@@ -477,7 +475,7 @@ int main(int argc, char **argv) {
}
if (!(Proj = pj_init(pargc, pargv)))
emess(3,"projection initialization failure\ncause: %s",
- pj_strerrno(pj_errno));
+ proj_errno_string(proj_context_errno(nullptr)));
if (!proj_angular_input(Proj, PJ_FWD)) {
emess(3, "can't initialize operations that take non-angular input coordinates");