aboutsummaryrefslogtreecommitdiff
path: root/src/dmstor.c
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2010-06-11 03:26:04 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2010-06-11 03:26:04 +0000
commitcf5c8cd32ebf39f7ff24c426ac00e75a7ae34da8 (patch)
treec7e18dad05709f747a2aaccb21da844ae6b43f24 /src/dmstor.c
parent02b4b8db7f5d3ce59baca4a38b8059538ccf3217 (diff)
downloadPROJ-cf5c8cd32ebf39f7ff24c426ac00e75a7ae34da8.tar.gz
PROJ-cf5c8cd32ebf39f7ff24c426ac00e75a7ae34da8.zip
roll projCtx through various other low level functions
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1856 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/dmstor.c')
-rw-r--r--src/dmstor.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dmstor.c b/src/dmstor.c
index 1cc99f62..f1da5379 100644
--- a/src/dmstor.c
+++ b/src/dmstor.c
@@ -17,6 +17,11 @@ vm[] = {
};
double
dmstor(const char *is, char **rs) {
+ return dmstor_ctx( pj_get_default_ctx(), is, rs );
+}
+
+ double
+dmstor_ctx(projCtx ctx, const char *is, char **rs) {
int sign, n, nl;
char *p, *s, work[MAX_WORK];
double v, tv;
@@ -46,7 +51,7 @@ dmstor(const char *is, char **rs) {
n = 2; break;
case 'r': case 'R':
if (nl) {
- pj_errno = -16;
+ pj_ctx_set_errno( ctx, -16 );
return HUGE_VAL;
}
++s;
@@ -58,7 +63,7 @@ dmstor(const char *is, char **rs) {
continue;
}
if (n < nl) {
- pj_errno = -16;
+ pj_ctx_set_errno( ctx, -16 );
return HUGE_VAL;
}
v += tv * vm[n];