OSDN Git Service

Modified Eos/Makefile
[eos/hostdependX86LINUX64.git] / src / Tools / mrcImage / mrcImageDilation / src / init.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 #include <math.h>
5 #include "../inc/config.h"
6 #include "genUtil.h"
7 #include "String.h"
8 #include "File.h"
9 #include "Memory.h"
10
11
12 void
13 init0(mrcImageDilationInfo* info)
14 {
15     info->fptIn = NULL;    info->flagIn = 0;
16     info->fptOut = NULL;    info->flagOut = 0;
17     info->fptOutSE = NULL;    info->flagOutSE = 0;
18     info->SEmode = 0;    info->flagSEmode = 0;
19     info->radius = 2;    info->flagradius = 0;
20     info->n = 5;    info->flagn = 0;
21     info->fptconfigFile = NULL;    info->flagconfigFile = 0;
22     info->mode = 0;    info->flagmode = 0;
23 }
24
25 void
26 init1(mrcImageDilationInfo* info)
27 {
28     char s[1024];
29     int i;
30     if(!info->flagIn) {
31         stringGetFromFile(s, "In", stdin, stdout, 0);
32         info->In = stringGetNthWord(s, 1, " ,\t");
33         info->flagIn++;
34     }
35     if(info->flagIn) {
36         info->fptIn = fileOpen(info->In, "r");
37     }
38     
39     if(!info->flagOut) {
40         stringGetFromFile(s, "Out", stdin, stdout, 0);
41         info->Out = stringGetNthWord(s, 1, " ,\t");
42         info->flagOut++;
43     }
44     if(info->flagOut) {
45         info->fptOut = fileOpen(info->Out, "w");
46     }
47     
48     if(info->flagOutSE) {
49         info->fptOutSE = fileOpen(info->OutSE, "w");
50     }
51     
52     if(info->flagSEmode) {
53     }
54     
55     if(info->flagradius) {
56     }
57     
58     if(info->flagn) {
59     }
60     
61     if(info->flagconfigFile) {
62         info->fptconfigFile = fileOpen(info->configFile, "r");
63     }
64     
65     if(info->flagmode) {
66     }
67     
68 }
69 #ifdef KHOROS
70 #include <stdio.h>
71 #include "bootstrap.h"
72 #include "dataserv.h"
73 #include "datamanip.h"
74 extern void func_usage_additions(void);
75 extern void func_free_args(kexit_status status, kaddr client_data);
76 extern void func_get_args(kform* pane);
77
78 void
79 func_usage_additions(void)
80 {
81 }
82 void
83 func_free_args(kexit_status status, kaddr client_data)
84 {
85 }
86 void
87 func_get_args(kform* pane)
88 {
89 }
90 void
91 khorosInit(int argc, char* argv[])
92 {
93     char* eospath;
94     char  panepath[1024];
95     FILE* fpt;
96     
97     eospath = getenv("EOS_HOME");
98     sprintf(panepath, "%s/src/Tools/mrcImage/mrcImageDilation/src/mrcImageDilation.pane", eospath);
99     khoros_initialize(argc, argv, "EOS");
100     fpt = fopen(panepath, "r");    if(NULL!=fpt) {
101         fclose(fpt);
102         kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcImageDilation",
103                      func_usage_additions,
104                      func_get_args,
105                      func_free_args);
106     }
107 }
108 #endif /* KHOROS */