diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2004-09-14 18:04:34 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2004-09-14 18:04:34 +0000 |
| commit | 10c29a9e46c9a3e74462c6b53584bebc711db2cb (patch) | |
| tree | acc8281b6cdb900aa8a1c6d03bcd1884fe289ad1 /src/pj_pr_list.c | |
| parent | 543f672a7c62c9d92ade24c3c5c6f3344a2a54eb (diff) | |
| download | PROJ-10c29a9e46c9a3e74462c6b53584bebc711db2cb.tar.gz PROJ-10c29a9e46c9a3e74462c6b53584bebc711db2cb.zip | |
* src/pj_pr_list.c: Ensure unused parameters are not included
in the returned string (provided by Eric Miller).
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1225 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_pr_list.c')
| -rw-r--r-- | src/pj_pr_list.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pj_pr_list.c b/src/pj_pr_list.c index f7a62344..0be154b9 100644 --- a/src/pj_pr_list.c +++ b/src/pj_pr_list.c @@ -68,6 +68,11 @@ char *pj_get_def( PJ *P, int options ) for (t = P->params; t; t = t->next) { + /* skip unused parameters ... mostly appended defaults and stuff */ + if (!t->used) + continue; + + /* grow the resulting string if needed */ l = strlen(t->param) + 1; if( strlen(definition) + l + 5 > def_max ) { @@ -80,6 +85,7 @@ char *pj_get_def( PJ *P, int options ) definition = def2; } + /* append this parameter */ strcat( definition, " +" ); strcat( definition, t->param ); } |
