64 if (basedir == NULL || product == NULL || version == NULL ||
68 len = (int)strlen(basedir);
70 if (len == 0 || strncmp(&(basedir[len-1]), slash, 1) == 0)
73 temp = (
char*)malloc((len + 256) *
sizeof(char));
77 if (camera == NULL || strlen(camera) == 0)
79 sprintf(temp,
"%s%sMISR_AM1_%s_P%03d_O%06d_%s.hdf",basedir,
80 slash,product,path,orbit,version);
82 sprintf(temp,
"%s%sMISR_AM1_%s_P%03d_%s.hdf",basedir,
83 slash,product,path,version);
86 sprintf(temp,
"%s%sMISR_AM1_%s_P%03d_O%06d_%s_%s.hdf",basedir,
87 slash,product,path,orbit,camera,version);
89 for (i = (
int)strlen(basedir); (unsigned)i < strlen(temp) - 4; ++i)
90 temp[i] = toupper(temp[i]);
#define MTK_ERR_CODE_JUMP(code)
MTKt_status MtkMakeFilename(const char *basedir, const char *product, const char *camera, int path, int orbit, const char *version, char **filename)
Given a base directory, product, camera, path, orbit, version.