aboutsummaryrefslogtreecommitdiff
path: root/src/strerrno.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/strerrno.cpp
parent43efca4ab87fb37a0931edcb6be11c0bd3784098 (diff)
downloadPROJ-56f0ad70054eea15e9671cd67aafd14bf7c11c74.tar.gz
PROJ-56f0ad70054eea15e9671cd67aafd14bf7c11c74.zip
Remove pj_errno and related functions
Diffstat (limited to 'src/strerrno.cpp')
-rw-r--r--src/strerrno.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/strerrno.cpp b/src/strerrno.cpp
index 1c8673d0..3d0131c6 100644
--- a/src/strerrno.cpp
+++ b/src/strerrno.cpp
@@ -1,4 +1,4 @@
-/* list of projection system pj_errno values */
+/* list of projection system errno values */
#include <stddef.h>
#include <stdio.h>
@@ -74,10 +74,11 @@ pj_err_list[] = {
"network error", /* -62 */
/* When adding error messages, remember to update ID defines in
- projects.h, and transient_error array in pj_transform */
+ src/proj_internal.h and src/apps/gie.cpp */
};
-char *pj_strerrno(int err) {
+
+const char* proj_errno_string(int err) {
const int max_error = 9999;
static char note[50];
size_t adjusted_err;
@@ -98,7 +99,7 @@ char *pj_strerrno(int err) {
#endif
}
- /* PROJ.4 error codes are negative: -1 to -9999 */
+ /* PROJ error codes are negative: -1 to -9999 */
adjusted_err = err < -max_error ? max_error : -err - 1;
if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *)))
return (char *)pj_err_list[adjusted_err];
@@ -107,7 +108,3 @@ char *pj_strerrno(int err) {
(err > -max_error) ? err: -max_error);
return note;
}
-
-const char* proj_errno_string(int err) {
- return pj_strerrno(err);
-}