aboutsummaryrefslogtreecommitdiff
path: root/src/pj_gridlist.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_gridlist.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_gridlist.c')
-rw-r--r--src/pj_gridlist.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/pj_gridlist.c b/src/pj_gridlist.c
index 52b44e42..3277bb5c 100644
--- a/src/pj_gridlist.c
+++ b/src/pj_gridlist.c
@@ -61,7 +61,7 @@ void pj_deallocate_grids()
grid_list = grid_list->next;
item->next = NULL;
- pj_gridinfo_free( item );
+ pj_gridinfo_free( pj_get_default_ctx(), item );
}
}
@@ -72,7 +72,8 @@ void pj_deallocate_grids()
/* last_nadgrids_list. */
/************************************************************************/
-static int pj_gridlist_merge_gridfile( const char *gridname,
+static int pj_gridlist_merge_gridfile( projCtx ctx,
+ const char *gridname,
PJ_GRIDINFO ***p_gridlist,
int *p_gridcount,
int *p_gridmax )
@@ -128,7 +129,7 @@ static int pj_gridlist_merge_gridfile( const char *gridname,
/* -------------------------------------------------------------------- */
/* Try to load the named grid. */
/* -------------------------------------------------------------------- */
- this_grid = pj_gridinfo_init( gridname );
+ this_grid = pj_gridinfo_init( ctx, gridname );
if( this_grid == NULL )
{
@@ -145,7 +146,7 @@ static int pj_gridlist_merge_gridfile( const char *gridname,
/* -------------------------------------------------------------------- */
/* Recurse to add the grid now that it is loaded. */
/* -------------------------------------------------------------------- */
- return pj_gridlist_merge_gridfile( gridname, p_gridlist,
+ return pj_gridlist_merge_gridfile( ctx, gridname, p_gridlist,
p_gridcount, p_gridmax );
}
@@ -159,7 +160,8 @@ static int pj_gridlist_merge_gridfile( const char *gridname,
/* the cost of building the list of tables each time. */
/************************************************************************/
-PJ_GRIDINFO **pj_gridlist_from_nadgrids( const char *nadgrids, int *grid_count)
+PJ_GRIDINFO **pj_gridlist_from_nadgrids( projCtx ctx, const char *nadgrids,
+ int *grid_count)
{
const char *s;
@@ -204,7 +206,7 @@ PJ_GRIDINFO **pj_gridlist_from_nadgrids( const char *nadgrids, int *grid_count)
if( *s == ',' )
s++;
- if( !pj_gridlist_merge_gridfile( name, &gridlist, grid_count,
+ if( !pj_gridlist_merge_gridfile( ctx, name, &gridlist, grid_count,
&grid_max)
&& required )
{