63c6f04268ccbeb568d0315e78320e9574ee70a3
[opencv] / apps / Hawk / CVEiCL / EiC / README.BIN
1 -------------------------------------------------------------\r
2                    __THE EiC BINARY DISTRIBUTION__\r
3 \r
4                                   by\r
5 \r
6                                Ed Breen\r
7 -------------------------------------------------------------\r
8 Contents:\r
9 \r
10         COPYRIGHT\r
11         BINARY DISTRIBUTIONS\r
12         INSTALLATION NOTES\r
13         BRIEF INTRODUCTION\r
14         REPORTING BUGS \r
15         MAJOR KNOWN BUGS\r
16         APPENDIX\r
17                 BUILDING THE BINARY DISTRIBUTION\r
18 \r
19 -------------------------------------------------------------\r
20 COPYRIGHT\r
21 \r
22         Please refer to the LICENCE document provided\r
23 with this distribution. To proceed beyond this point,\r
24 is to agree with the licence agreement.\r
25 \r
26 -------------------------------------------------------------\r
27 BUGS OR QUESTIONS CAN BE DIRECTED TO:\r
28 \r
29 A Bug Report form is located at:\r
30  \r
31         http://pobox.com/~eic\r
32 \r
33 General questions to:\r
34 \r
35         Ed.Breen@Altavista.net\r
36 \r
37 -------------------------------------------------------------\r
38 BINARY DISTRIBUTIONS\r
39 \r
40 The following PLATFORM distributions are available:\r
41 \r
42 \r
43 EiC has been ported to: Linux, Solaris, Sun OS, DEC OSF, SGI IRIX,\r
44     HPUX, Solaris/i386, and NetBSD\r
45 \r
46 There also exist an alien port of EiC to the PowerPC 403 by\r
47 Larry Battraw.\r
48   \r
49 Its source code is available as well as pre-compiled binaries for the\r
50 following platforms:\r
51 \r
52         Releases version VERSION\r
53 \r
54         EiC_LINUX_VERSION.tgz      i486 Linux (elf)\r
55         EiC_SOLARIS_VERSION.tgz    SUN SPARC SOLARIS 2.x\r
56         EiC_SUNOS_VERSION.tgz      SUN OS 4.1.x\r
57         EiC_OSF1_VERSION.tgz       DEC ALPHA  OSF 3.x and 4.x\r
58         EiC_IRIX_VERSION.tgz       SGI IRIX 6.x\r
59 \r
60 \r
61 Each distribution contains a binary executable of eicc, documentation,\r
62 licence, and EiC's set of include files.\r
63 \r
64 Hard copies of the documentation, if desired, can be obtained on\r
65 request.\r
66 \r
67 --------------------------------------------------------------\r
68 INSTALLATION NOTES\r
69 \r
70         IMPORTANT:\r
71         \r
72         If EiC is not installed in /usr/local/EiC, or /usr/EiC, \r
73         you will need to explicity set were EiC's home directory\r
74         is as follows:\r
75                 To be able to run EiC properly you will now need to set the \r
76                 environmental variable HOMEofEiC.\r
77 \r
78                 The HOMEofEiC environmental variable must be set to\r
79                 point to the directory that contains the EiC include \r
80                 directory. For example: $HOME/EiC\r
81 \r
82                 In bash, ksh or zsh use:\r
83                         $ export HOMEofEiC=...\r
84                 In tcsh enter:\r
85                         $ setenv HOMEofEiC ...\r
86                 where the dots represent the name of the EiC directory\r
87 \r
88                 You may wish to include the command in one\r
89                 of your startup scripts such as the .cshrc or the\r
90                 .bashrc file.\r
91 \r
92         Also the HOMEofEiC environmental variable overrides automatic\r
93         detection of directories /usr/local/EiC and /usr/EiC. Inturn\r
94         /usr/local/EiC overrides /usr/EiC\r
95 \r
96 To install a BINARY distribution, first untar the appropriate PLATFORM\r
97 distribution:\r
98 \r
99         if using GNU tar\r
100         % tar xvzf EiC_PLATFORM_3_7_2.tgz\r
101 \r
102         else\r
103         % gunzip EiC_PLATFORM_3_7_2.tgz\r
104         % tar xvf EiC_PLATFORM_3_7_2.tar\r
105 \r
106 Now change to the directory EiC's directory:\r
107 \r
108         % cd EiC\r
109 \r
110 EiC is configured so that its home directory is the EiC directory that\r
111 it un-tarred into.  It uses this directory to hold its implementation\r
112 files and directories. However, during the installation procedure, the\r
113 install procedure will setup a link used for launching eicc, in the\r
114 directory specified by the macro definition INSTALL_DIR in the file\r
115 EiC/Makefile. By default, this directory will be ${HOME}/bin -- but\r
116 this is easily changed. Before installing EiC, first check what the\r
117 installation procedure will do, from the EiC directory enter (see the\r
118 Makefile for more details):\r
119 \r
120         % make -n installBinary\r
121 \r
122 If you wish to change the install directory; for example, say to\r
123 /usr/local/bin, then enter:\r
124 \r
125         % make INSTALL_DIR=/usr/local/bin installBinary\r
126 \r
127 However, if, as by default, you are installing a local version in your\r
128 home bin directory, then just enter:\r
129 \r
130         % make installBinary\r
131 \r
132 Now set HOMEofEiC (the example given is for tsch):\r
133 \r
134         % setenv HOMEofEiC $PWD\r
135         % rehash\r
136 \r
137 or\r
138         % export HOMEofEiC=$PWD\r
139 \r
140 Now run eic and when you want to exit just enter :exit\r
141 \r
142         % eic\r
143 \r
144 -------------------------------------------------------------------------\r
145 BRIEF INTRODUCTION\r
146 \r
147 To run EiC, enter:\r
148 \r
149         % eic\r
150 \r
151 In interactive mode, the user enters commands, or immediate\r
152 statements, at the interpreter prompt EiC #>; for example:\r
153 \r
154 EiC 1> #include <string.h>\r
155         (void)\r
156 EiC 2> #define PI 3.14159\r
157         (void)\r
158 EiC 3> PI * strlen("Hello, World!\n"); \r
159         43.98226\r
160 \r
161 The function `strlen' is a standard C function, which returns the\r
162 number of characters in the argument string, which happens to be in\r
163 this instance: "Hello, World!\n"; for example:\r
164 \r
165 EiC 4> strlen("Hello, World!\n");\r
166         14\r
167 \r
168 To exit  EiC, simply enter:\r
169 \r
170 EiC 5> :exit\r
171 \r
172 Note the colon:\r
173 \r
174 While EiC is an interactive C interpreter it can also be run in batch\r
175 mode:\r
176 \r
177         % eic foo.c\r
178 \r
179 For Futher information refer to EiC's documentation `EiC.ps'\r
180 \r
181 ----------------------------------------------------------------\r
182 REPORTING BUGS \r
183 \r
184 If you have need and wish to report a bug, use the following template,\r
185 follow the example given below and email it to the email address given\r
186 at the bottom of this document:\r
187 \r
188         REPORTER:\r
189         PLATFORM:\r
190         PROBLEM:\r
191         EXAMPLE:\r
192         POSSIBLE SOLUTION:\r
193         TESTPROGRAM:\r
194         STATUS: Not Fixed\r
195 \r
196 \r
197 However, before reporting any bug, and if possible, check that the\r
198 problem does not exist if the same source code is compiled and run\r
199 using your normal C/C++ compiler. If you have decided that you have\r
200 found a real bug, then the following example will help in preparing\r
201 your report (but don't worry if you can't suggest a possible solution):\r
202 \r
203   \r
204         REPORTER: Ed Breen\r
205         PLATFORM: Linux\r
206         PROBLEM: EiC does not cast structures properly via va_args.\r
207         EXAMPLE:\r
208 \r
209         #include <stdarg.h>\r
210         #include <stdio.h>\r
211 \r
212         typedef struct { int a, b; } ab_t;\r
213         ab_t a = {5,5};\r
214 \r
215         int p(char *fmt, ...)\r
216         {\r
217             ab_t x;\r
218             va_list ap;    \r
219             va_start(ap, fmt);\r
220     \r
221             x = va_arg(ap, ab_t);\r
222             va_end(ap);\r
223 \r
224             return x.a;\r
225         }\r
226 \r
227 \r
228         int main(void)\r
229         {\r
230             // the following call returns garbage!!!\r
231             printf("5 = %d\n",p("",a));\r
232             return 0;\r
233         }\r
234 \r
235         POSSIBLE SOLUTION:\r
236 \r
237         The solution is to get the stack code to `drefptr' the pointer\r
238 contained at the `ap' stack position, immediately before the `refmem'\r
239 instruction. Although, this is easy to do, it upsets other existing\r
240 code such as referencing members within an array of structures and\r
241 structure assignments -- a rethink is in order.\r
242 \r
243 \r
244         TESTPROGRAM:\r
245                 see above\r
246 \r
247         STATUS: Not Fixed, but the current EiC implementation\r
248                 flags the passing of a structure or union to\r
249                 a variadic function, such as shown above, as an error.\r
250 \r
251 \r
252 mail bug report to eic_free@geocities.com\r
253 \r
254 --------------------------------------------------------------------\r
255 MAJOR KNOWN BUGS\r
256 \r
257         (none at the moment)\r
258 \r
259 \r
260 \r
261 \r
262 \r
263 \r
264 \r
265 \r
266 \r
267 \r
268 \r
269 \r
270 \r
271 \r
272 \r
273 \r