|
From: <il...@us...> - 2003-11-24 05:09:34
|
Update of /cvsroot/meshdb/src/geo/libgeo
In directory sc8-pr-cvs1:/tmp/cvs-serv6152
Modified Files:
ntv2.c
Log Message:
Removed invalid length modifiers on non-integral types.
Fixed an int that was being referred to in a format string as a double.
Index: ntv2.c
===================================================================
RCS file: /cvsroot/meshdb/src/geo/libgeo/ntv2.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ntv2.c 10 Aug 2002 03:51:32 -0000 1.1.1.1
+++ ntv2.c 24 Nov 2003 05:09:31 -0000 1.2
@@ -219,7 +219,7 @@
warnx("unknown grid scale '%.8s'", rec->u.s);
return -1;
}
- Vprintf("GS_TYPE %lf radians\n", nt->gs_scale);
+ Vprintf("GS_TYPE %f radians\n", nt->gs_scale);
}
else if (streq(rec->id, "VERSION ")) {
memcpy(nt->version, rec->u.s, sizeof nt->version - 1);
@@ -232,16 +232,16 @@
Vprintf("SYSTEM_T %.8s\n", nt->system_t);
} else if (streq(rec->id, "MAJOR_F ")) {
nt->major_f = HOSTDOUBLE(rec->u.d);
- Vprintf("MAJOR_F %lf\n", nt->major_f);
+ Vprintf("MAJOR_F %f\n", nt->major_f);
} else if (streq(rec->id, "MINOR_F ")) {
nt->minor_f = HOSTDOUBLE(rec->u.d);
- Vprintf("MINOR_F %lf\n", nt->minor_f);
+ Vprintf("MINOR_F %f\n", nt->minor_f);
} else if (streq(rec->id, "MAJOR_T ")) {
nt->major_t = HOSTDOUBLE(rec->u.d);
- Vprintf("MAJOR_T %lf\n", nt->major_t);
+ Vprintf("MAJOR_T %f\n", nt->major_t);
} else if (streq(rec->id, "MINOR_T ")) {
nt->minor_t = HOSTDOUBLE(rec->u.d);
- Vprintf("MINOR_T %lf\n", nt->minor_t);
+ Vprintf("MINOR_T %f\n", nt->minor_t);
} else
warnx("%s: unknown record ID %.8s", filename, rec->id);
rec++;
@@ -284,25 +284,25 @@
; /* ignored */
} else if (streq(rec->id, "S_LAT ")) {
g->s_lat = HOSTDOUBLE(rec->u.d) * nt->gs_scale;
- Vprintf(" S_LAT %lf\n", g->s_lat);
+ Vprintf(" S_LAT %f\n", g->s_lat);
} else if (streq(rec->id, "N_LAT ")) {
g->n_lat = HOSTDOUBLE(rec->u.d) * nt->gs_scale;
- Vprintf(" N_LAT %lf\n", g->n_lat);
+ Vprintf(" N_LAT %f\n", g->n_lat);
} else if (streq(rec->id, "W_LONG ")) {
g->w_lon = HOSTDOUBLE(rec->u.d) * nt->gs_scale;
- Vprintf(" W_LON %lf\n", g->w_lon);
+ Vprintf(" W_LON %f\n", g->w_lon);
} else if (streq(rec->id, "E_LONG ")) {
g->e_lon = HOSTDOUBLE(rec->u.d) * nt->gs_scale;
- Vprintf(" E_LON %lf\n", g->e_lon);
+ Vprintf(" E_LON %f\n", g->e_lon);
} else if (streq(rec->id, "LAT_INC ")) {
g->lat_inc = HOSTDOUBLE(rec->u.d)*nt->gs_scale;
- Vprintf(" LAT_INC %lf\n", g->lat_inc);
+ Vprintf(" LAT_INC %f\n", g->lat_inc);
} else if (streq(rec->id, "LONG_INC")) {
g->lon_inc = HOSTDOUBLE(rec->u.d)*nt->gs_scale;
- Vprintf(" LONG_INC %lf\n", g->lon_inc);
+ Vprintf(" LONG_INC %f\n", g->lon_inc);
} else if (streq(rec->id, "GS_COUNT")) {
g->gs_count = HOSTINT(rec->u.i);
- Vprintf(" GS_COUNT %lf\n", g->gs_count);
+ Vprintf(" GS_COUNT %d\n", g->gs_count);
} else
warnx("unknown subrecord id '%.8s'", rec->id);
rec++;
|