aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2003-08-20 13:23:58 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2003-08-20 13:23:58 +0000
commit0bb2ec9f4142f9962957e472094acba4ff5a5c17 (patch)
tree7a13fe08f43b2e18e6b5c68f099f44d6b1a918db /src
parent11a1031c581490a87e3c7c03265103d491011776 (diff)
downloadPROJ-0bb2ec9f4142f9962957e472094acba4ff5a5c17.tar.gz
PROJ-0bb2ec9f4142f9962957e472094acba4ff5a5c17.zip
Avoid unsigned char / char casting issues for VC++.
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1154 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src')
-rw-r--r--src/pj_gridinfo.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/pj_gridinfo.c b/src/pj_gridinfo.c
index 2a6c5221..e4aafde6 100644
--- a/src/pj_gridinfo.c
+++ b/src/pj_gridinfo.c
@@ -29,6 +29,9 @@
******************************************************************************
*
* $Log$
+ * Revision 1.5 2003/08/20 13:23:58 warmerda
+ * Avoid unsigned char / char casting issues for VC++.
+ *
* Revision 1.4 2003/03/19 03:36:41 warmerda
* Fixed so swap_words() works when it should.
*
@@ -372,7 +375,7 @@ static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
return 0;
}
- if( strncmp(header,"SUB_NAME",8) != 0 )
+ if( strncmp((const char *) header,"SUB_NAME",8) != 0 )
{
pj_errno = -38;
return 0;
@@ -396,7 +399,7 @@ static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
/* Initialize a corresponding "ct" structure. */
/* -------------------------------------------------------------------- */
ct = (struct CTABLE *) pj_malloc(sizeof(struct CTABLE));
- strncpy( ct->id, header + 8, 8 );
+ strncpy( ct->id, (const char *) header + 8, 8 );
ct->id[8] = '\0';
ct->ll.lam = - *((double *) (header+7*16+8)); /* W_LONG */
@@ -460,7 +463,7 @@ static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
/* -------------------------------------------------------------------- */
/* Attach to the correct list or sublist. */
/* -------------------------------------------------------------------- */
- if( strncmp(header+24,"NONE",4) == 0 )
+ if( strncmp((const char *)header+24,"NONE",4) == 0 )
{
if( gi != gilist )
{
@@ -476,7 +479,8 @@ static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
PJ_GRIDINFO *lnk;
PJ_GRIDINFO *gp = gilist;
- while( gp != NULL && strncmp(gp->ct->id,header+24,8) != 0 )
+ while( gp != NULL
+ && strncmp(gp->ct->id,(const char*)header+24,8) != 0 )
gp = gp->next;
if( gp == NULL )
@@ -484,7 +488,7 @@ static int pj_gridinfo_init_ntv2( FILE *fid, PJ_GRIDINFO *gilist )
if( getenv("PROJ_DEBUG") != NULL )
fprintf( stderr, "pj_gridinfo_init_ntv2(): "
"failed to find parent %8.8s for %.\n",
- header+24, gi->ct->id );
+ (const char *) header+24, gi->ct->id );
for( lnk = gp; lnk->next != NULL; lnk = lnk->next ) {}
lnk->next = gi;