diff options
| author | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-11 17:29:17 +0100 |
|---|---|---|
| committer | Thomas Knudsen <thokn@sdfe.dk> | 2018-02-12 11:19:32 +0100 |
| commit | cc26b288fe0a208468068726bc4b38f4cf05ba47 (patch) | |
| tree | d19742da6d82541aecb2e3384cd7dca969be3cce /src/pj_init.c | |
| parent | e1a213b2d9a29d86b89547781a2e27d5fd01f111 (diff) | |
| download | PROJ-cc26b288fe0a208468068726bc4b38f4cf05ba47.tar.gz PROJ-cc26b288fe0a208468068726bc4b38f4cf05ba47.zip | |
typedef some recurring function signatures
Diffstat (limited to 'src/pj_init.c')
| -rw-r--r-- | src/pj_init.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pj_init.c b/src/pj_init.c index f54a2a92..3c36fc3a 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -470,22 +470,20 @@ pj_init(int argc, char **argv) { } -typedef PJ *(constructor)(PJ *); - -static constructor *pj_constructor (const char *name) { +static PJ_CONSTRUCTOR pj_locate_constructor (const char *name) { int i; char *s; for (i = 0; (s = pj_list[i].id) && strcmp(name, s) ; ++i) ; if (0==s) return 0; - return (constructor *) pj_list[i].proj; + return (PJ_CONSTRUCTOR) pj_list[i].proj; } PJ * pj_init_ctx(projCtx ctx, int argc, char **argv) { char *s, *name; - constructor *proj; + PJ_CONSTRUCTOR proj; paralist *curr, *init, *start; int i; int err; @@ -559,7 +557,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) { return pj_dealloc_params (ctx, start, PJD_ERR_PROJ_NOT_NAMED); name += 5; - proj = pj_constructor (name); + proj = pj_locate_constructor (name); if (0==proj) return pj_dealloc_params (ctx, start, PJD_ERR_UNKNOWN_PROJECTION_ID); |
