change TESSEROID to MAG_TESSEROID
This commit is contained in:
@@ -564,7 +564,7 @@ void strstrip(char *str)
|
||||
|
||||
|
||||
/* Read a single tesseroid from a string */
|
||||
int gets_mag_tess(const char *str, TESSEROID *tess)
|
||||
int gets_mag_tess(const char *str, MAG_TESSEROID *tess)
|
||||
{
|
||||
double w, e, s, n, top, bot, dens, suscept, Bx, By, Bz, Rx, Ry, Rz;
|
||||
int nread, nchars;
|
||||
@@ -595,14 +595,14 @@ int gets_mag_tess(const char *str, TESSEROID *tess)
|
||||
}
|
||||
|
||||
//ELDAR BAYKIEV////////////////////////////////
|
||||
TESSEROID * read_mag_tess_model(FILE *modelfile, int *size)
|
||||
MAG_TESSEROID * read_mag_tess_model(FILE *modelfile, int *size)
|
||||
{
|
||||
TESSEROID *model, *tmp;
|
||||
MAG_TESSEROID *model, *tmp;
|
||||
int buffsize = 300, line, badinput = 0, error_exit = 0;
|
||||
char sbuff[10000];
|
||||
|
||||
/* Start with a single buffer allocation and expand later if necessary */
|
||||
model = (TESSEROID *)malloc(buffsize*sizeof(TESSEROID));
|
||||
model = (MAG_TESSEROID *)malloc(buffsize*sizeof(MAG_TESSEROID));
|
||||
if(model == NULL)
|
||||
{
|
||||
log_error("problem allocating initial memory to load tesseroid model.");
|
||||
@@ -630,7 +630,7 @@ TESSEROID * read_mag_tess_model(FILE *modelfile, int *size)
|
||||
if(*size == buffsize)
|
||||
{
|
||||
buffsize += buffsize;
|
||||
tmp = (TESSEROID *)realloc(model, buffsize*sizeof(TESSEROID));
|
||||
tmp = (MAG_TESSEROID *)realloc(model, buffsize*sizeof(MAG_TESSEROID));
|
||||
if(tmp == NULL)
|
||||
{
|
||||
/* Need to free because realloc leaves unchanged in case of
|
||||
@@ -660,7 +660,7 @@ TESSEROID * read_mag_tess_model(FILE *modelfile, int *size)
|
||||
/* Adjust the size of the model */
|
||||
if(*size != 0)
|
||||
{
|
||||
tmp = (TESSEROID *)realloc(model, (*size)*sizeof(TESSEROID));
|
||||
tmp = (MAG_TESSEROID *)realloc(model, (*size)*sizeof(MAG_TESSEROID));
|
||||
if(tmp == NULL)
|
||||
{
|
||||
/* Need to free because realloc leaves unchanged in case of
|
||||
|
Reference in New Issue
Block a user