diff options
Diffstat (limited to 'src/nad_init.c')
| -rw-r--r-- | src/nad_init.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nad_init.c b/src/nad_init.c index 571d2569..844dcad2 100644 --- a/src/nad_init.c +++ b/src/nad_init.c @@ -88,7 +88,7 @@ int nad_ctable_load( projCtx ctx, struct CTABLE *ct, PAFile fid ) pj_log( ctx, PJ_LOG_ERROR, "ctable loading failed on fread() - binary incompatible?" ); - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); return 0; } @@ -111,7 +111,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid ) if( ct == NULL || pj_ctx_fread( ctx, ct, sizeof(struct CTABLE), 1, fid ) != 1 ) { - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); pj_dalloc( ct ); return NULL; } @@ -120,7 +120,7 @@ struct CTABLE *nad_ctable_init( projCtx ctx, PAFile fid ) if( ct->lim.lam < 1 || ct->lim.lam > 100000 || ct->lim.phi < 1 || ct->lim.phi > 100000 ) { - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); pj_dalloc( ct ); return NULL; } @@ -167,7 +167,7 @@ int nad_ctable2_load( projCtx ctx, struct CTABLE *ct, PAFile fid ) "ctable2 loading failed on fread() - binary incompatible?\n" ); } - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); return 0; } @@ -193,7 +193,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid ) if( pj_ctx_fread( ctx, header, sizeof(header), 1, fid ) != 1 ) { - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); return NULL; } @@ -206,7 +206,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid ) if( strncmp(header,"CTABLE V2",9) != 0 ) { pj_log( ctx, PJ_LOG_ERROR, "ctable2 - wrong header!" ); - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); return NULL; } @@ -230,7 +230,7 @@ struct CTABLE *nad_ctable2_init( projCtx ctx, PAFile fid ) if( ct->lim.lam < 1 || ct->lim.lam > 100000 || ct->lim.phi < 1 || ct->lim.phi > 100000 ) { - pj_ctx_set_errno( ctx, -38 ); + pj_ctx_set_errno( ctx, PJD_ERR_FAILED_TO_LOAD_GRID ); pj_dalloc( ct ); return NULL; } |
