diff options
Diffstat (limited to 'src/pj_init.c')
| -rw-r--r-- | src/pj_init.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index 59bd2c88..622e80bf 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -1,6 +1,4 @@ /****************************************************************************** - * $Id$ - * * Project: PROJ.4 * Purpose: Initialize projection object from string definition. Includes * pj_init(), pj_init_plus() and pj_free() function. @@ -37,8 +35,6 @@ #include <locale.h> #include <ctype.h> -PJ_CVSID("$Id$"); - typedef struct { projCtx ctx; PAFile fid; @@ -54,7 +50,7 @@ typedef struct { static const char *fill_buffer(pj_read_state *state, const char *last_char) { size_t bytes_read; - int char_remaining, char_requested; + size_t char_remaining, char_requested; /* -------------------------------------------------------------------- */ /* Don't bother trying to read more if we are at eof, or if the */ @@ -414,16 +410,15 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { /* put arguments into internal linked list */ if (argc <= 0) { pj_ctx_set_errno( ctx, -1 ); goto bum_call; } - for (i = 0; i < argc; ++i) - if (i) - curr = curr->next = pj_mkparam(argv[i]); - else - start = curr = pj_mkparam(argv[i]); + start = curr = pj_mkparam(argv[0]); + for (i = 1; i < argc; ++i) { + curr->next = pj_mkparam(argv[i]); + curr = curr->next; + } if (ctx->last_errno) goto bum_call; /* check if +init present */ if (pj_param(ctx, start, "tinit").i) { - paralist *last = curr; int found_def = 0; if (!(curr = get_init(ctx,&start, curr, @@ -643,7 +638,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { void pj_free(PJ *P) { if (P) { - paralist *t = P->params, *n; + paralist *t, *n; /* free parameter list elements */ for (t = P->params; t; t = n) { |
