aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-03-11 12:52:33 +0100
committerGitHub <noreply@github.com>2018-03-11 12:52:33 +0100
commit665e9b60b4df97e17f82f036db0f6eecf87894b2 (patch)
tree06728101d9b0b9bb7525639596b8b0796c412efc /src
parentac8452eea01b26e0fc263c1cf51cc7137dfda23c (diff)
parent6faab2a0140955f6878b3d226e8a13028d1f79b3 (diff)
downloadPROJ-665e9b60b4df97e17f82f036db0f6eecf87894b2.tar.gz
PROJ-665e9b60b4df97e17f82f036db0f6eecf87894b2.zip
Merge pull request #847 from kbevers/proj_strerrno
Add proj_errno_string function
Diffstat (limited to 'src')
-rw-r--r--src/pj_strerrno.c9
-rw-r--r--src/proj.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/pj_strerrno.c b/src/pj_strerrno.c
index c2221e58..d881ae7b 100644
--- a/src/pj_strerrno.c
+++ b/src/pj_strerrno.c
@@ -1,10 +1,11 @@
/* list of projection system pj_errno values */
-#include "projects.h"
#include <stdio.h>
#include <errno.h>
#include <string.h>
+#include "proj.h"
+#include "projects.h"
- static const char * const
+static const char * const
pj_err_list[] = {
"no arguments in initialization list", /* -1 */
"no options found in 'init' file", /* -2 */
@@ -96,3 +97,7 @@ char *pj_strerrno(int err) {
sprintf( note, "invalid projection system error (%d)", (err > -9999)? err: -9999);
return note;
}
+
+const char* proj_errno_string(int err) {
+ return pj_strerrno(err);
+}
diff --git a/src/proj.h b/src/proj.h
index 4da78351..0025f3ad 100644
--- a/src/proj.h
+++ b/src/proj.h
@@ -349,6 +349,7 @@ int proj_errno (const PJ *P);
int proj_errno_set (const PJ *P, int err);
int proj_errno_reset (const PJ *P);
int proj_errno_restore (const PJ *P, int err);
+const char* proj_errno_string (int err);
/* Scaling and angular distortion factors */
PJ_FACTORS proj_factors(PJ *P, PJ_COORD lp);