aboutsummaryrefslogtreecommitdiff
path: root/src/pj_apply_vgridshift.c
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2010-06-11 01:51:24 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2010-06-11 01:51:24 +0000
commitec678c07c2acb83da8a2187c541b8a2e452dec4b (patch)
treea4c004a6e88d7330fe9d1c6ed793129831b5bdca /src/pj_apply_vgridshift.c
parenta7290836114dc82b35eceb1efcb5ecdf605d335f (diff)
downloadPROJ-ec678c07c2acb83da8a2187c541b8a2e452dec4b.tar.gz
PROJ-ec678c07c2acb83da8a2187c541b8a2e452dec4b.zip
preliminary implementation of projCtx API
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1854 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_apply_vgridshift.c')
-rw-r--r--src/pj_apply_vgridshift.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pj_apply_vgridshift.c b/src/pj_apply_vgridshift.c
index 7696ea19..2d514587 100644
--- a/src/pj_apply_vgridshift.c
+++ b/src/pj_apply_vgridshift.c
@@ -59,21 +59,22 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
if( *gridlist_p == NULL )
{
*gridlist_p =
- pj_gridlist_from_nadgrids( pj_param(defn->params,listname).s,
+ pj_gridlist_from_nadgrids( pj_get_ctx(defn),
+ pj_param(defn->params,listname).s,
gridlist_count_p );
if( *gridlist_p == NULL || *gridlist_count_p == 0 )
- return pj_errno;
+ return defn->ctx->last_errno;
}
if( tables == NULL || *gridlist_count_p == 0 )
{
- pj_errno = -38;
+ pj_ctx_set_errno( defn->ctx, -38);
return -38;
}
tables = *gridlist_p;
- pj_errno = 0;
+ defn->ctx->last_errno = 0;
for( i = 0; i < point_count; i++ )
{
@@ -126,9 +127,9 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
}
/* load the grid shift info if we don't have it. */
- if( ct->cvs == NULL && !pj_gridinfo_load( gi ) )
+ if( ct->cvs == NULL && !pj_gridinfo_load( pj_get_ctx(defn), gi ) )
{
- pj_errno = -38;
+ pj_ctx_set_errno( defn->ctx, -38 );
return -38;
}
@@ -190,7 +191,7 @@ int pj_apply_vgridshift( PJ *defn, const char *listname,
fprintf( stderr, "\n" );
}
- pj_errno = PJD_ERR_GRID_AREA;
+ pj_ctx_set_errno( defn->ctx, PJD_ERR_GRID_AREA );
return PJD_ERR_GRID_AREA;
}
}