Go to the documentation of this file.
13 PGSt_PC_Logical file_logical,
14 PGSt_integer file_version,
15 char universal_references[][PGSd_UR_FIELD_SIZE]
83 PGSt_IO_Gen_FileHandle *handle;
84 PGSt_ephemHeader fileHeader;
85 PGSt_SMF_status retval = PGS_S_SUCCESS;
86 char filefunc[] = __FILE__
", GEO_get_ephatt_inputs";
89 if(universal_references ==
NULL)
97 if(PGS_IO_Gen_Open(file_logical, PGSd_IO_Gen_Read, &handle, file_version)
100 sprintf(msgbuf,
"PGS_IO_Gen_Open(%ld, %ld)",
101 (
long)file_logical, (
long)file_version);
108 if(fread(&fileHeader,
sizeof fileHeader, 1, handle) != 1)
111 PGS_SMF_SetUNIXMsg(
errno,
"during fread(fileHeader)", filefunc);
113 modsmf(
MODIS_E_GEO,
"fread(fileHeader)", filefunc);
120 if(fileHeader.nURs > 100)
121 byteswap((
char*)&fileHeader.nURs,
sizeof fileHeader.nURs);
126 if(fread(universal_references, PGSd_UR_FIELD_SIZE, fileHeader.nURs,
127 handle) != fileHeader.nURs)
130 PGS_SMF_SetUNIXMsg(
errno,
"during fread(universal_references",
133 modsmf(
MODIS_E_GEO,
"fread(universal_references)", filefunc);
139 universal_references[fileHeader.nURs][0] =
'\0';
142 if(PGS_IO_Gen_Close(handle) != PGS_S_SUCCESS)
143 modsmf(
MODIS_E_GEO,
"PGE_IO_Gen_Close()", filefunc);
#define MODIS_E_BAD_INPUT_ARG