102 if (hdf_status ==
FAIL)
110 hdf_status =
SDend(sd_id);
111 if (hdf_status ==
FAIL)
136 char *coremeta = NULL;
139 char *temp_file_name;
141 char **temp_list = NULL;
143 int temp_list_max = 50;
147 GROUP grpNode = NULL;
152 if (nparam == NULL || paramlist == NULL)
165 printf(
"Unable to create odl aggregate locAggr\n");
177 temp_file_name = _tempnam(NULL, NULL);
178 temp = fopen(temp_file_name,
"w+");
186 fprintf(temp,
"%s",coremeta);
195 printf(
"Unable to convert to an odl structure\n");
202 grpNode =
FindGroup(aggNode,
"INVENTORYMETADATA");
211 temp_list = (
char**)calloc(temp_list_max,
sizeof(
char*));
212 if (temp_list == NULL)
215 node = base_node = aggNode;
221 if (temp_list_max == temp_count)
224 temp_list = (
char**)realloc(temp_list,temp_list_max);
225 if (temp_list == NULL)
229 temp_list[temp_count] = (
char*)malloc((strlen(node->
name) + 1) *
231 if (temp_list[temp_count] == NULL)
234 strcpy(temp_list[temp_count],node->
name);
244 *nparam = temp_count;
246 *paramlist = (
char**)malloc(temp_count *
sizeof(
char*));
247 if (*paramlist == NULL)
250 for (i = 0; i < temp_count; ++i)
251 (*paramlist)[i] = temp_list[i];
263 if (coremeta != NULL)
266 if (temp_list != NULL)
268 for (i = 0; i < temp_count; ++i)
284 char *coremeta = NULL;
287 char *temp_file_name;
289 char **temp_list = NULL;
291 int temp_list_max = 50;
295 GROUP grpNode = NULL;
300 if (nparam == NULL || paramlist == NULL)
313 printf(
"Unable to create odl aggregate locAggr\n");
325 temp_file_name = _tempnam(NULL, NULL);
326 temp = fopen(temp_file_name,
"w+");
334 fprintf(temp,
"%s",coremeta);
343 printf(
"Unable to convert to an odl structure\n");
350 grpNode =
FindGroup(aggNode,
"INVENTORYMETADATA");
359 temp_list = (
char**)calloc(temp_list_max,
sizeof(
char*));
360 if (temp_list == NULL)
363 node = base_node = aggNode;
369 if (temp_list_max == temp_count)
372 temp_list = (
char**)realloc(temp_list,temp_list_max);
373 if (temp_list == NULL)
377 temp_list[temp_count] = (
char*)malloc((strlen(node->
name) + 1) *
379 if (temp_list[temp_count] == NULL)
382 strcpy(temp_list[temp_count],node->
name);
392 *nparam = temp_count;
394 *paramlist = (
char**)malloc(temp_count *
sizeof(
char*));
395 if (*paramlist == NULL)
398 for (i = 0; i < temp_count; ++i)
399 (*paramlist)[i] = temp_list[i];
411 if (coremeta != NULL)
414 if (temp_list != NULL)
416 for (i = 0; i < temp_count; ++i)
AGGREGATE RemoveAggregate(AGGREGATE base_node)
#define MTK_ERR_CODE_JUMP(code)
GROUP FindGroup(AGGREGATE base_node, char *name)
HDFLIBAPI int32 SDstart(const char *name, int32 accs)
HDFLIBAPI intn SDend(int32 fid)
OBJECT NextSubObject(AGGREGATE base_node, AGGREGATE start_node)
MTKt_status MtkFileCoreMetaDataRawFid(int32 sds_id, char **coremeta)
Version of MtkFileCoreMetaDataRaw that takes an HDF SD file identifier rather than a filename...
MTKt_status MtkFileCoreMetaDataRawNcid(int ncid, char **coremeta)
#define MTK_ERR_COND_JUMP(code)
EXTERNL int nc_close(int ncid)
AGGREGATE NewAggregate(AGGREGATE base_node, AGGREGATE_KIND kind, char *name, char *classType)
EXTERNL int nc_open(const char *path, int mode, int *ncidp)