5 #include "../inc/config.h"
13 init0(mrc2hdfInfo* info)
15 info->fptIn = NULL; info->flagIn = 0;
16 info->fptInList = NULL; info->fptInListList = NULL; info->flagInList = 0;
17 info->fptInList2 = NULL; info->fptInList2List = NULL; info->flagInList2 = 0;
18 info->IR = 1.0; info->flagIR = 0;
19 info->IG = 0.0; info->flagIG = 0;
20 info->IB = 0.0; info->flagIB = 0;
21 info->IA = 1.0; info->flagIA = 0;
22 info->I2R = 0.0; info->flagI2R = 0;
23 info->I2G = 1.0; info->flagI2G = 0;
24 info->I2B = 0.0; info->flagI2B = 0;
25 info->I2A = 1.0; info->flagI2A = 0;
26 info->fptOut = NULL; info->flagOut = 0;
27 info->fptconfigFile = NULL; info->flagconfigFile = 0;
28 info->nResolution = 1; info->flagnResolution = 0;
29 info->hdf5mode = 1; info->flaghdf5mode = 0;
30 info->mode = 0; info->flagmode = 0;
34 init1(mrc2hdfInfo* info)
39 info->fptIn = fileOpen(info->In, "r");
42 if(info->flagInList) {
43 info->fptInListList = fileOpen(info->InListList, "r");
44 fseek(info->fptInListList, 0L, SEEK_SET);
46 while(NULL!=stringGetFromFile(s, "", info->fptInListList, stdout, 1)) {
49 info->fptInList = (FILE**)memoryAllocate(i*sizeof(FILE*), "in init1");
50 info->InList = (char**)memoryAllocate(i*sizeof(char*), "in init1");
52 fseek(info->fptInListList, 0L, SEEK_SET);
54 while(NULL!=stringGetFromFile(s, "", info->fptInListList, stdout, 1)) {
55 info->InList[i] = stringGetNthWord(s, 1, " ,\t");
56 info->fptInList[i] = fileOpen(info->InList[i],"r");
61 if(info->flagInList2) {
62 info->fptInList2List = fileOpen(info->InList2List, "r");
63 fseek(info->fptInList2List, 0L, SEEK_SET);
65 while(NULL!=stringGetFromFile(s, "", info->fptInList2List, stdout, 1)) {
68 info->fptInList2 = (FILE**)memoryAllocate(i*sizeof(FILE*), "in init1");
69 info->InList2 = (char**)memoryAllocate(i*sizeof(char*), "in init1");
70 info->flagInList2 = i;
71 fseek(info->fptInList2List, 0L, SEEK_SET);
73 while(NULL!=stringGetFromFile(s, "", info->fptInList2List, stdout, 1)) {
74 info->InList2[i] = stringGetNthWord(s, 1, " ,\t");
75 info->fptInList2[i] = fileOpen(info->InList2[i],"r");
105 stringGetFromFile(s, "Out", stdin, stdout, 0);
106 info->Out = stringGetNthWord(s, 1, " ,\t");
110 info->fptOut = fileOpen(info->Out, "w");
113 if(info->flagconfigFile) {
114 info->fptconfigFile = fileOpen(info->configFile, "r");
117 if(info->flagnResolution) {
120 if(info->flaghdf5mode) {
129 #include "bootstrap.h"
130 #include "dataserv.h"
131 #include "datamanip.h"
132 extern void func_usage_additions(void);
133 extern void func_free_args(kexit_status status, kaddr client_data);
134 extern void func_get_args(kform* pane);
137 func_usage_additions(void)
141 func_free_args(kexit_status status, kaddr client_data)
145 func_get_args(kform* pane)
149 khorosInit(int argc, char* argv[])
155 eospath = getenv("EOS_HOME");
156 sprintf(panepath, "%s/src/Tools/filter/mrc2hdf/src/mrc2hdf.pane", eospath);
157 khoros_initialize(argc, argv, "EOS");
158 fpt = fopen(panepath, "r"); if(NULL!=fpt) {
160 kclui_initialize(panepath, KGEN_NONE, "EOS", "mrc2hdf",
161 func_usage_additions,