OSDN Git Service

fb4fcde4b65101909a218f0cc3ea7129420980e0
[eos/hostdependX86LINUX64.git] / src / Tools / mrcImage / mrcImageSiemensStar / 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(mrcImageSiemensStarInfo* info)
14 {
15     info->fptOut = NULL;    info->flagOut = 0;
16     info->Nx = 256;    info->flagNx = 0;
17     info->Ny = 256;    info->flagNy = 0;
18     info->R = 64;    info->flagR = 0;
19     info->nRadial = 18;    info->flagnRadial = 0;
20     info->Delta = 1.72;    info->flagDelta = 0;
21     info->fptconfigFile = NULL;    info->flagconfigFile = 0;
22     info->mode = 0;    info->flagmode = 0;
23 }
24
25 void
26 init1(mrcImageSiemensStarInfo* info)
27 {
28     char s[1024];
29     int i;
30     if(!info->flagOut) {
31         stringGetFromFile(s, "Out", stdin, stdout, 0);
32         info->Out = stringGetNthWord(s, 1, " ,\t");
33         info->flagOut++;
34     }
35     if(info->flagOut) {
36         info->fptOut = fileOpen(info->Out, "w");
37     }
38     
39     if(info->flagNx) {
40     }
41     
42     if(info->flagNy) {
43     }
44     
45     if(info->flagR) {
46     }
47     
48     if(info->flagnRadial) {
49     }
50     
51     if(info->flagDelta) {
52     }
53     
54     if(info->flagconfigFile) {
55         info->fptconfigFile = fileOpen(info->configFile, "r");
56     }
57     
58     if(info->flagmode) {
59     }
60     
61 }
62 #ifdef KHOROS
63 #include <stdio.h>
64 #include "bootstrap.h"
65 #include "dataserv.h"
66 #include "datamanip.h"
67 extern void func_usage_additions(void);
68 extern void func_free_args(kexit_status status, kaddr client_data);
69 extern void func_get_args(kform* pane);
70
71 void
72 func_usage_additions(void)
73 {
74 }
75 void
76 func_free_args(kexit_status status, kaddr client_data)
77 {
78 }
79 void
80 func_get_args(kform* pane)
81 {
82 }
83 void
84 khorosInit(int argc, char* argv[])
85 {
86     char* eospath;
87     char  panepath[1024];
88     FILE* fpt;
89     
90     eospath = getenv("EOS_HOME");
91     sprintf(panepath, "%s/src/Tools/mrcImage/mrcImageSiemensStar/src/mrcImageSiemensStar.pane", eospath);
92     khoros_initialize(argc, argv, "EOS");
93     fpt = fopen(panepath, "r");    if(NULL!=fpt) {
94         fclose(fpt);
95         kclui_initialize(panepath, KGEN_NONE, "EOS", "mrcImageSiemensStar",
96                      func_usage_additions,
97                      func_get_args,
98                      func_free_args);
99     }
100 }
101 #endif /* KHOROS */