Wrapped rint()'s in #ifdef HAVE_RINT
This commit is contained in:
parent
5c90891d01
commit
41515d1bae
1 changed files with 25 additions and 2 deletions
|
@ -23,6 +23,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <math.h> /* rint() */
|
#include <math.h> /* rint() */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h> /* atoi() atof() */
|
#include <stdlib.h> /* atoi() atof() */
|
||||||
|
@ -82,16 +86,32 @@ void rawReadDemHdr( fgRAWDEM *raw, char *hdr_file ) {
|
||||||
raw->ncols = atoi(value);
|
raw->ncols = atoi(value);
|
||||||
} else if ( strcmp(key, "ULXMAP") == 0 ) {
|
} else if ( strcmp(key, "ULXMAP") == 0 ) {
|
||||||
tmp = atof(value);
|
tmp = atof(value);
|
||||||
|
#ifdef HAVE_RINT
|
||||||
raw->ulxmap = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
raw->ulxmap = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
||||||
|
#else
|
||||||
|
# error Port me rint()
|
||||||
|
#endif
|
||||||
} else if ( strcmp(key, "ULYMAP") == 0 ) {
|
} else if ( strcmp(key, "ULYMAP") == 0 ) {
|
||||||
tmp = atof(value);
|
tmp = atof(value);
|
||||||
|
#ifdef HAVE_RINT
|
||||||
raw->ulymap = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
raw->ulymap = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
||||||
|
#else
|
||||||
|
# error Port me rint()
|
||||||
|
#endif
|
||||||
} else if ( strcmp(key, "XDIM") == 0 ) {
|
} else if ( strcmp(key, "XDIM") == 0 ) {
|
||||||
tmp = atof(value);
|
tmp = atof(value);
|
||||||
|
#ifdef HAVE_RINT
|
||||||
raw->xdim = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
raw->xdim = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
||||||
|
#else
|
||||||
|
# error Port me rint()
|
||||||
|
#endif
|
||||||
} else if ( strcmp(key, "YDIM") == 0 ) {
|
} else if ( strcmp(key, "YDIM") == 0 ) {
|
||||||
tmp = atof(value);
|
tmp = atof(value);
|
||||||
|
#ifdef HAVE_RINT
|
||||||
raw->ydim = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
raw->ydim = (int)rint(tmp * 3600.0); /* convert to arcsec */
|
||||||
|
#else
|
||||||
|
# error Port me rint()
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
/* ignore for now */
|
/* ignore for now */
|
||||||
}
|
}
|
||||||
|
@ -442,9 +462,12 @@ void rawProcessStrip( fgRAWDEM *raw, int lat_degrees, char *path ) {
|
||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.5 1998/04/18 03:59:46 curt
|
/* Revision 1.6 1998/04/27 03:32:03 curt
|
||||||
/* Incorporated into gnu automake/autoconf system.
|
/* Wrapped rint()'s in #ifdef HAVE_RINT
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.5 1998/04/18 03:59:46 curt
|
||||||
|
* Incorporated into gnu automake/autoconf system.
|
||||||
|
*
|
||||||
* Revision 1.4 1998/04/06 21:09:43 curt
|
* Revision 1.4 1998/04/06 21:09:43 curt
|
||||||
* Additional win32 support.
|
* Additional win32 support.
|
||||||
* Fixed a bad bug in dem file parsing that was causing the output to be
|
* Fixed a bad bug in dem file parsing that was causing the output to be
|
||||||
|
|
Loading…
Reference in a new issue