OSDN Git Service

mrcInfoSet has been updated and renewed to set FixedValues as default values.
[eos/base.git] / src / Tools / mrcImage / mrcInfoSet / 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(mrcInfoSetInfo* info)
14 {
15     info->fptIn = NULL;    info->flagIn = 0;
16     info->fptconfigFile = NULL;    info->flagconfigFile = 0;
17     info->Lengthx = 2.5;    info->flagLengthx = 0;
18     info->Lengthy = 2.5;    info->flagLengthy = 0;
19     info->Lengthz = 2.5;    info->flagLengthz = 0;
20     info->Fixed=0;
21     info->Interactive=0;
22     info->mode = 0;    info->flagmode = 0;
23 }
24
25 void
26 init1(mrcInfoSetInfo* 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->flagconfigFile) {
40         info->fptconfigFile = fileOpen(info->configFile, "r");
41     }
42     
43     if(info->flagLengthx) {
44     }
45     
46     if(info->flagLengthy) {
47     }
48     
49     if(info->flagLengthz) {
50     }
51     
52     if(info->flagmode) {
53     }
54     
55 }
56 #ifdef KHOROS
57 #include <stdio.h>
58 #include "bootstrap.h"
59 #include "dataserv.h"
60 #include "datamanip.h"
61 extern void func_usage_additions(void);
62 extern void func_free_args(kexit_status status, kaddr client_data);
63 extern void func_get_args(kform* pane);
64
65 void
66 func_usage_additions(void)
67 {
68 }
69 void
70 func_free_args(kexit_status status, kaddr client_data)
71 {
72 }
73 void
74 func_get_args(kform* pane)
75 {
76 }
77 void
78 khorosInit(int argc, char* argv[])
79 {
80     char* eospath;
81     char  panepath[1024];
82     FILE* fpt;
83     
84     eospath = getenv("EOS_HOME");
85     sprintf(panepath, "%s/src/Tools/mrcImage/mrcInfoSet/src/mrcInfoSet.pane", eospath);
86     khoros_initialize(argc, argv, "EOS");
87     fpt = fopen(panepath, "r");    if(NULL!=fpt) {
88         fclose(fpt);
89         kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcInfoSet",
90                      func_usage_additions,
91                      func_get_args,
92                      func_free_args);
93     }
94 }
95 #endif /* KHOROS */