Better doc.
[egate.git] / doc / egate.sgml
1 <!doctype linuxdoc system>
2
3 <!--
4   $Id: egate.sgml,v 1.10 1996/06/06 10:24:57 adam Exp $
5 -->
6
7 <article>
8 <title>Email/Z39.50 gateway guide
9 <author>Europagate, 1996
10 <date>$Revision: 1.10 $
11 <abstract>
12 This document describes a Email server that provides access to the
13 Z39.50 protocol.
14 </abstract>
15
16 <toc>
17
18 <sect>Introduction
19
20 <p>
21 This document describes an email server (ES) system developed
22 within the EUROPAGATE project. The first part of this document
23 serves as an administrators guide, while the second part is a 
24 follow-up on the Design deliverable (WP4.1) that outlines the
25 deviations from the design. Also, the second part contains
26 a quick overview of the source code.
27
28 The software distribution also includes a Web to Z39.50 gateway. Refer
29 to the web.txt documentation about installation on this gateway.
30
31 <sect>Installation
32
33 <p>
34 An ANSI C compiler is required in order to compile the ES software.
35
36 The ES can use either CNIDR's Zdist package or the YAZ package from
37 Index Data to interface the Z39.50 protocol. So you need to obtain
38 one of these first.
39
40 The zdist package can be found in:
41
42 <htmlurl
43 url="ftp://ftp.cnidr.org/pub/NIDR.tools/zdist/zdist102b1-1.tar.Z" 
44  name="ftp://ftp.cnidr.org/pub/NIDR.tools/zdist/zdist102b1-1.tar.Z">
45
46 The zdist package doesn't support result-set references. Also, it has a few
47 bugs. Therefore we've included a patch <tt/zdist.patch/ which fixes
48 some of these bugs.
49 Run patch in the directory above <tt/zdist102b1-1/:
50 <verb>patch <zdist.path</verb>
51 The ES server only depends on <tt>libz3950.a</tt> so you only need
52 to build the zdist software in the directory <tt/libz3950/.
53
54 YAZ can be found at the FTP host:
55
56 <htmlurl url="ftp://ftp.indexdata.dk/index/yaz"
57  name="ftp://ftp.indexdata.dk/index/yaz">
58
59 The ES also uses GNU's regex package to parse regular expressions. 
60 The ES has been tested with regex-0.12. Some systems, such as Linux,
61 come with the regex package preinstalled.
62
63 Unpack <tt>egate.tar.gz</tt> and edit the top level <tt/Makefile/. Specify
64 where the GNU regex package is located by setting the variables <tt/REGEXOBJ/
65 and <tt/REGXINC/. 
66
67 A little further down the <tt/Makefile/ you find a section called
68 <tt/Common settings/ where you specify the location of either YAZ or zdist.
69 On some systems, you may have to set the <tt/ELIB/ as well to link with
70 BSD socket libraries.
71
72 If you intend only to compile the Email server and not the Web server
73 you don't have to worry about the section entitled <tt/WWW gateway settings/.
74
75 The shell variables <tt/CC/ and <tt/CFLAGS/ are used by the
76 <tt/Makefile/ so you may set these in your shell before you start
77 compiling.
78
79 Now, type <tt/make email/. 
80
81 <p>
82 If the compilation succeeds, you should install the software in some
83 standard location.
84 Edit the <tt/Makefile/ and set EMAILLIBDIR to the installation
85 directory. Since, the ES is executed by the mail system, and not by a
86 user, this directory shouldn't be globally executable.
87
88 When satisfied, type <tt/make install.email/.
89
90 Three executables are installed in EMAILLIBDIR:
91 <descrip>
92 <tag/eti/ The email transport interface. This program receives
93 incoming mail, identifies the user, and delivers the mail request
94 to the monitor or kernel (depending on configuration).
95 <tag/monitor/ The monitor
96  is optional component. The main objective
97 of the monitor is to limit the number of simultanous running kernel
98 processes.
99 <tag/kernel/ The kernel process is the core of the ES. It parses
100 the user's requests and interfaces the Z39.50 protocols.
101 </descrip>
102
103 The <tt/sendmail/ or a similar program delivers the mail to the
104 <tt/eti/ program. The <tt/sendmail/ program usually runs as user
105 <tt/mail/ or some other special user name. We strongly suggest that
106 you create a special user and group for the ES software. In this case
107 you should use <tt/chmod/ to and set the 'set user ID on execution'
108 bits on the executable files and give that user read/write/execute
109 permissions in EMAILLIBDIR.
110
111 The mail system needs to know about the ES. Pick some name that serves
112 as the ES user and edit <tt/aliases/ used by your mail system (usually 
113 <tt>usr/lib/aliases</tt>). Now add the following line:
114
115 <tt>es:"|/usr/local/lib/es/eti </tt><em>options</em><tt>"</tt>
116
117 In this example the mail user name is <tt/es/ and the EMAILLIBDIR is
118 <tt>/usr/local/lib/es</tt>.
119
120 The ES system can operate with or without the monitor. When using
121 the monitor the number of simultanous running kernels can be
122 controlled. If the <tt>eti</tt> program is started with 
123 two dashes (<tt>--</tt>) it will operate without the monitor and
124 the options specified after the two dashes are transferred to the
125 kernel.
126
127 <sect1>Running with the monitor
128
129 <p>
130 The monitor must be running at all times in this mode. You should
131 start the monitor in one of your boot scripts (rc). For example this
132 might be put in a boot script:
133
134 <tscreen><verb>
135 (cd /usr/local/lib/es; ./monitor -d -l mon.log -- -d -l kernel.log &)
136 </verb></tscreen>
137
138 Here the monitor is started with the options <tt>-d -l mon.log</tt>
139 and the options after the two dashes are transferred to the 
140 kernel. In this mode, the eti should contact the monitor (and not
141 the kernel), so the following might be put in the aliases file:
142
143 <tscreen><verb>
144 es:"|/usr/local/lib/es/eti -c /usr/local/lib/es"
145 </verb></tscreen>
146
147 The eti sets current directory to the path specified by option <tt>-c</tt>.
148
149 <sect1>Running without the monitor
150
151 <p>
152 In this mode you should never start the monitor. 
153 The eti will contact the kernel directly. The following line could
154 be put in your aliases file:
155
156 <tscreen><verb>
157 es:"|/usr/local/lib/es/eti -c /usr/local/lib/es -- -d -l kernel.log"
158 </verb></tscreen>
159
160 <sect1>eti
161
162 <p>
163 The eti program accepts the following options:
164 <descrip>
165 <tag><tt>-l </tt>log</tag> The log file. If absent stderr is used.
166 <tag><tt>-d</tt></tag> Turns on debugging.
167 <tag><tt>-c </tt>dir</tag> Sets current directory to dir.
168 <tag><tt>-H</tt></tag> Help message.
169 <tag><tt>--</tt></tag> Indicates that the eti program should contact the
170 kernel (and not the monitor. All options after this one are transferred
171 to the kernel
172 </descrip>
173
174 <sect1>monitor
175
176 <p>
177 The monitor program accepts the following command line options:
178 <descrip>
179 <tag><tt>-l </tt>log</tag> The log file. If absent stderr is used.
180 <tag><tt>-d</tt></tag> Turns on debugging.
181 <tag><tt>-H</tt></tag> Help message.
182 <tag><tt>--</tt></tag> Precedes options that are transferred to the kernel
183 </descrip>
184
185 The monitor normally reads the resource <tt>default.res</tt> in
186 current directory. You can change this behaviour by specifying an
187 alternate file on the command line.
188
189 <sect1>kernel
190
191 <p>
192 List of options observed by the kernel:
193 <descrip>
194 <tag><tt>-d</tt></tag> Turns on debugging.
195 <tag><tt>-t </tt>target</tag> Opens connection to target (for testing only).
196 <tag><tt>-g </tt>lang</tag> Set language name.
197 <tag><tt>-o </tt>res</tag> Overriding resource file name. These
198 resources override both <tt>default.res</tt> and all user resources.
199 <tag><tt>-h </tt>host</tag> Override host name (for testing only).
200 <tag><tt>-p </tt>port</tag> Override port no (for testing only).
201 <tag><tt>-l </tt>log</tag> Specify log file.
202 <tag><tt>-H</tt></tag> Help message.
203 </descrip>
204
205 The kernel normally reads the resource <tt>default.res</tt> in
206 current directory. You can change this behaviour by specifying an
207 alternate file on the command line.
208
209 <sect>Managing the system
210
211 <sect1>Summary of files
212 <p>
213
214 To maintain the ES you need to know the files it uses. These are:
215 <descrip>
216 <tag>*.res</tag> Resource files with several settings that control
217  how the system operates, such as definition of targets, messages, etc.
218 <tag>*.bib</tag> Bib-1 attribute mapping files. These files describe
219  the mapping between CCL and the RPN query.
220 <tag>user.db</tag> Database of users. Only the eti process accesses
221  this file.
222 <tag>user.*.r</tag> Resource file for a user &mdash; accessed by the kernel
223  &mdash; only created when the user uses the <tt>def</tt> command.
224 <tag>user.*.p</tag> Persistency file for a user &mdash; accessed by
225  the kernel
226  process. 
227 </descrip>
228
229 The ES system is mostly managed by resource files. The following
230 are example resource files that comes with the ES:
231 <descrip>
232 <tag><tt>default.res</tt></tag> General resource with reasonable defaults. 
233  This file is read by the monitor and the kernel.
234 <tag><tt>loc.res</tt></tag> Resource file for Library of Congress test
235  server.
236 <tag><tt>drewdb.res</tt></tag> Resource file for Data Research's test
237  server.
238 <tag><tt>lang.uk.res</tt></tag> Resource file for english conversation.
239 <tag><tt>lang.dk.res</tt></tag> Resource file for danish conversation.
240 </descrip>
241
242 <sect1>Resources
243
244 <p>
245 Most general resources should be set in the file <tt>default.res</tt>. 
246 Some of the resources may be changed (overridden) by the user, while 
247 others may be overridden by individual target defintions. 
248 The complete scenario is depicted below:
249 <tscreen><verb>
250        +-------------+
251        | default.res |
252        +-------------+
253               |          +--------------+
254               |<---------| "target.res" | 
255               |          +--------------+
256               |
257               |          +--------------+
258               |<---------| user.x.res   |
259               |          +--------------+
260               |
261               |          +--------------+
262               |<---------| "lang.res"   |
263               |          +--------------+
264               |
265               |          +--------------+
266               |<---------| "override"   |
267               |          +--------------+
268             result
269 </verb></tscreen>
270
271 The following describes the general resources:
272 <descrip>
273 <tag>gw.reply.mta</tag> Name of MTA program &mdash; default
274  <tt>/usr/lib/sendmail</tt>.
275 <tag>gw.reply.tmp.prefix</tag> Prefix of temporary files used by the ES.
276 <tag>gw.reply.tmp.dir</tag> Name of directory with temporary files.
277 <tag>gw.marc.log</tag> If this resource is specified, retrieved MARC
278  records will be appended to this file.
279 <tag>gw.timeout</tag> Idle time before the kernel exits. When the
280  kernel exits, the Z39.50 persistency layer will reconnect when
281  necessary.
282 <tag>gw.resultset</tag> If this setting is 1, the Z39.50 client will
283  use named result sets. If 0, the Z39.50 system will always use 
284  <tt/Default/ as result-set name.
285 <tag>gw.persist</tag> If this setting 1, the persistency is enabled;
286  disabled otherwise.
287 <tag>gw.max.process</tag> This settings is the maximum number of
288  simultaneous kernel processes &mdash; only used by the monitor.
289 <tag>gw.ignore.which</tag> Some targets doesn't indicate whether
290  a record is a diagnostic messaage or a database record. If this
291  setting is 1, the ES will always try to interpret the record as a
292  database record in ISO2709 format. If 0, the ES will use the
293  record type.
294 <tag>gw.default.show</tag> Default number of records to retrieve and display
295  when using the show command. This setting may be changed by the user
296  with the <tt>def defaultshow</tt> command.
297 <tag>gw.max.show</tag> This setting specifies the maximum number of
298  records the user may retrieve in one show command &mdash; default 100.
299 <tag>gw.autoshow</tag> Number of records to retrieve in a find
300  command &mdash; default 0. This setting may be changed by the user by
301  the <tt>def autoshow</tt> command.
302 <tag>gw.display.format</tag> Default display format. This setting may
303  be changed by the user by the <tt>def f</tt> command.
304 <tag>gw.language</tag> Current language. This setting may be
305 changed by the user with the <tt>def lang</tt> command. When the 
306  langauge is set to something, say x, then the resource gw.lang.x 
307  should hold a name of a resource file read by the kernel.
308 <tag>gw.lang.<em/x/</tag> Specifies name of resource file for 
309  language <em/x/.
310 <tag>gw.target.<em/name/ </tag> Name of resource file of target
311  <em/name/.
312 <tag>gw.portno</tag> Z39.50 target port number &mdash; default 210.
313 <tag>gw.hostname</tag> Z39.50 target host name.
314 <tag>gw.bibset</tag> Name of file with Bib-1 attribute mapping.
315 <tag>gw.databases</tag> Available databases on target.
316 <tag>gw.description</tag> Description of a target. This message
317  is returned to the user when the connection is established with the
318  target.
319 <tag>gw.account</tag> Z39.50 Authentication string &mdash; default
320  empty (i.e. none).
321 </descrip>
322
323 <sect1>Messages
324
325 <p>
326 There are several resource settings that deal with language 
327 dependencies. These fall into the following categories that
328 depend on the resource name prefixes:
329 <descrip>
330 <tag>gw.msg</tag> Miscellaneous messages.
331 <tag>gw.err</tag> Error messages.
332 <tag>gw.bib1.diag.<em/no/</tag> Diagnostic error message indicated by
333  <em/no/.
334 <tag>gw.help</tag> Help/description of various commands.
335 <tag>ccl.command</tag> CCL command names.
336 <tag>ccl.token</tag> CCL tokens names.
337 </descrip>
338
339 Refer to the sample files, <tt>default.res</tt>, <tt>lang.uk.res</tt>
340 and <tt>lang.dk.res</tt> for all available settings.
341
342 <sect1>Target definitions
343
344 <p>
345 To add a target definition called <em/mytarget/ you need to make a resource 
346 entry in <tt>default.res</tt> called <tt>gw.target.</tt><em>mytarget</em>.
347 The value of this resource is the name of a resource file &mdash; for 
348 example <em>mytarget</em><tt>.res</tt>. The resource file should at least
349 define the resources: <tt/gw.hostname/, <tt/gw.databases/ and 
350 <tt/gw.description/. You might also consider specifying
351 <tt/gw.account/, <tt/gw.bibset/, <tt/gw.resultset/ and <tt/gw.portno/
352 in the target resource file. The user only needs to use the command
353 <tt>target </tt><em>mytarget</em> to use the target. Also, since we
354 already specified database names, the user doesn't need to use the
355 <tt/base/ command.
356
357 <sect1>CCL to RPN mapping
358
359 <p>
360 The mapping between CCL-queries and RPN are stored in files &mdash;
361 normally with the suffix <tt>.bib</tt>. We will refer these
362 files as bibset-files. You might consult the file <tt/default.bib/
363 to see an example of such file.
364
365 The mapping is necessary because targets usually only support a little
366 subset of the Bib-1 attribute set and because the CCL qualifiers
367 (field names) are not standardized. A bibset-file is specified
368 by the <tt/gw.bibset/ resource.
369
370 Column zero of a bib-file line either hold a hash character (<tt/#/)
371 indicating a comment in which case the rest of the line is
372 ignored; or a CCL qualifier.
373
374 The name of the CCL qualifier is up to you. However, the special
375 qualifier name <tt/term/ applies to the case where no qualifier
376 is specified in CCL. The CCL qualifier is
377 followed by one or more mapping specifications. A mapping
378 specification takes the form:
379
380 <em/type/<tt/=/<em/value/<tt/,/<em/value/...
381
382 The type is simply one of the six Bib-1 attribute query types:
383 <descrip>
384 <tag/u/ Use attribute. Value is an integer.
385 <tag/t/ Truncation attribute. Value is an integer; or the
386  value is a combination of:
387   <descrip>
388   <tag/l/ This character indicates that the CCL parser should allow
389   left truncation (2) if indicated by a <tt/?/ on the left side
390   of a term.
391   <tag/r/ This character indicates that the CCL parser should allow
392   right truncation (1) if indicated by a <tt/?/ on the right side
393   of a term.
394   <tag/b/ This character indicates that the CCL parser should allow
395   both left and right (3) truncation indicated by a <tt/?/ on both
396   left and right side of a term.
397   <tag/n/ This character indicates that the CCL parser should announce
398   no truncation (100) if no truncation was specified.
399   </descrip>
400 <tag/p/ Position attribute. Valus is an integer.
401 <tag/s/ Structure attribute. Value is an integer; or the
402  value is <tt/pw/ in which case the CCL parser announces word (2) or
403  phrase (1) depending on the number of adjacent terms.
404 <tag/r/ Relation attribute. Value is an integer; or the value is
405  <tt/o/ in which case, the CCL parser will select <em/less than/, 
406  <em/less than or equal/, ... <em/greater than/ &mdash; depending on
407  the relation specified in CCL.
408 <tag/p/ Position attribute. Value is an integer.
409 </descrip>
410
411 Consider these bibset-lines:
412 <tscreen><verb>
413 term t=l,r,b s=pw
414 au= u=1 t=l,r,b s=pw
415 date u=30 r=o
416 </verb></tscreen>
417 The first line describes the mapping in when no qualifiers are
418 present, as in:
419 <tscreen><verb>
420 find foo bar?
421 </verb></tscreen>
422 In this case the right truncation is enabled and the structure is
423 <em/phrase/.
424
425 The second line is used in this search:
426 <tscreen><verb>
427 find au=andersen
428 </verb></tscreen>
429 where the use attribute is <em/author/ and the structure is <em/word/.
430
431 The third line is used in:
432 <tscreen><verb>
433 find date>1990
434 </verb></tscreen>
435 where the use attribute is <em/date/ and the relation is <em/greater than/.
436
437 <sect>Implementation
438
439 <p>
440 The implementation of the email server includes all the modules described
441 in the design deliverable. 
442
443 The work was roughly carried out as follows:
444 <enum>
445 <item>The logging facilities and resource management utilities were
446  implemented &mdash; virtually all other modules depend on these
447  modules.
448 <item>A minimal ES was implemented &mdash; including a high-level
449  API to the Z39.50 sub-system and a CCL parser with a few
450  commands, such as FIND and SHOW. This version displayed MARC
451  records in a raw format. This version served as base for the URP.
452 <item>The first version of the MARC display formatting tool, FML,
453  was implemented and included in the ES.
454 <item>The ETI program was implemented along with the IPC 
455  (interprocess communication) utilities based on FIFOs. Facilities
456  to keep connections alive (to Z39.50 targets) was implemented.
457  To identify a user, a file-resident symbol table (small database) was 
458  implemented which maps a email username to a unique integer (email userid). 
459 <item>The protocol persistency was implemented and more CCL commands
460  were added.
461 <item>The monitor program was implemented.
462 </enum>
463
464 The following sections cover the most important modules in the ES and
465 deviations from the design.
466
467 <sect1>Z39.50 Interface layer
468
469 <p>
470 The design report specified that the Zdist toolkit from CNIDR would
471 be used in the ES to provide access to the Z39.50 protocol. The package
472 was choosen bacause it is easy to use and, more important, we felt
473 that the API would be reasonably stable and supported.
474
475 Nevertheless it turned out that CNIDR choose to change the API 
476 completely around January 1995 and announced a new version 
477 called zdist102b1-1. 
478
479 <em>Note: As of this date the newest version of Zdist is still
480 zdist102b1-1. CNIDR seems to concentracte on their Isite package
481 which also includes a Zdist package presumably similar to the
482 standalone Zdist package</em>
483
484 During the work with the Zdist package a few bugs were discovered.
485 Fortunately, they could be solved within a few days. We also
486 discovered that the package lacks result-set references.
487 We posted the bug fixes to Kevin Gamiel who is responsible for 
488 the package but we didn't get responses. So, eventually, we weren't
489 satisfied with the package after all.
490
491 In February some of us began the development of a new Z39.50 package 
492 called YAZ &mdash; in retrospect somewhat motivated by the 
493 experiences with existing Z39.50/SR toolkits.
494
495 To support result-set references we chose to incorporate a YAZ 
496 interface in the ES also. And we designed and implemented a 
497 simple high-level Z39.50 origin API that supported both Zdist and YAZ.
498
499 The protocol persistency module was implemented on top of
500 the high-level API and not on top of Zdist. The obvious 
501 advantage is that the persistency module is not tied to one 
502 particular Z39.50/SR package.
503
504 Persistency information stored for each user is simply:
505 <itemize>
506 <item>hostname and port number.
507 <item>authentication string
508 <item>selected database(s)
509 <item>next result set number
510 <item>next result set position
511 <item>result set information
512 </itemize>
513
514 Information about each result set includes:
515 <itemize>
516 <item>name
517 <item>size (number of hits)
518 <item>database(s)
519 <item>query
520 </itemize>
521
522 A persistency file is removed each time a new target is selected.
523 It is our experiences that the persistency files are very small.
524
525 <sect1>CCL
526
527 <p>
528 The CCL was implemented as described in the design. A CCL utility
529 was made as a separate module which implements a tokenization
530 package and a parser which translates from FIND to RPN. The
531 data structure used to represent the RPN query is also used in
532 Z39.50 search API on top of YAZ or Zdist. 
533
534 The CCL parser is quite configurable. Token names can be redefined to
535 one or more names (aliases). Also, the specification of mapping
536 between CCL field names (qualifiers) and Bib-1 attributes can be
537 specified in either the C API or a file.
538
539 Although the Z39.50 system in the ES uses the Bib-1 attribute set, the 
540 CCL parser itself is not tied to Bib-1.
541
542 <sect1>FML
543
544 <p>
545 The FML system is used to handle the presentation of MARC
546 records. There are some deviations to the design report, however.
547 The most important changes are:
548 <itemize>
549 <item>The <tt/expr/ function is not implemented. Instead arithmetic
550 operators <tt/plus/, <tt/minus/, <tt/mult/ and <tt/div/ are
551 implemented. Also relational operators <tt/gt/, <tt/lt/ ... are
552 implemented.
553 <item>The <tt/lindex/ function is called <tt/index/ and it is a binary
554 operator where the left operand is the list and the right operand is
555 the index integer.
556 <item>The MARC extraction routines are not implemented.
557 Instead, a MARC record is transferred as an argument
558 to a formatting-routine (in list notation). The formatting
559 routine then extracts fields from the list by list/string
560 manipulation functions.
561 <item>A new statement, <tt/bin/, is implemented to define
562 binary operators (functions). 
563 </itemize>
564
565 <sect1>IPC
566
567 <p>
568 As described in the design, FIFOs are used to communicate between
569 the ETI, monitor and kernel. The ES can run without the monitor,
570 however. The primary reason for the presence of the monitor was
571 to assure that the kernel releases the resources used by the
572 persistency layer. But, since the persistency layer did turn out to
573 use virtually no disk space at all, there was no point in starting
574 a kernel process to remove its files &mdash; hence this facility 
575 was not implemented. The only purpose of the monitor is to keep the
576 number of running kernels at a maximum level and even that
577 is probably useless since most unices will swap kernel processes
578 out anyway.
579
580 The idle time
581 before a kernel exits and saves its persistency file is not
582 controlled by the monitor. Saving the persistency file and
583 keeping it is usually a good approach &mdash; even when a
584 user doesn't reference/show old result-sets since the user
585 has a notion of <em/current target/ and database.
586
587 <sect1>Source
588
589 <p>
590 In this section a short description of each source module is
591 given. Each module is implemented in a separate sub directory. 
592 Any public headers are located in the <tt/include/ directory.
593
594 <descrip>
595 <tag/res+log/ is an implementation of the logging system
596 and the resource management sub system. Note that the
597 resource module depends on the logging facility. Logging
598 is implemented in <tt>gw-log.c</tt> and <tt/gw-log.h/. The
599 file <tt>gw-log-test.c</tt> is small test program for the
600 logging system. The core of the resource management is implemented
601 in <tt>gw-res.c</tt>. The files <tt>gw-res-bool.c</tt> and
602 <tt>gw-res-int.c</tt> implement two utility routines &mdash
603 on top of the resource management. The header file
604 <tt>gw-resp.h</tt> is a private header file and <tt>gw-res.h</tt>
605 is a public header file.
606
607 <tag/ccl/ implements CCL to RPN mapping and a tokenization 
608  utility for other CCL commands. The mapping function is
609  implemented in <tt>cclfind.c</tt>. Qualifiers are handled in 
610  <tt>cclqual.c</tt> while reading of qualifier mappings from a
611  file is implemented in <tt>cclqfile.c</tt>. Scanning is implemented
612  in <tt>ccltoken.c</tt>. String utilities, which might be changed if
613  other character sets are needed, is implemented in
614  <tt>cclstr.c</tt>. Table of error messages is implemented in
615  <tt>cclerrms.c</tt>.
616
617 <tag/util/ implements various utilities:
618   <descrip>
619   <tag>MARC utility</tag> implemented in <tt>iso2709</tt>...
620   <tag>Database utility</tag> implemented in <tt>gw-db.[ch]</tt>. This
621    utility is used to map a user (email) to an integer.
622   <tag>String queue utility</tag> implemented in <tt>strqueue.[ch]</tt>. This
623    utiltiy is used to queue incoming mail in the ETI, kernel and
624    the monitor.
625   <tag>Pretty printer</tag> implemented in <tt>ttyemit.[ch]</tt>
626    &mdash; used by the URP.
627   <tag>FIFO IPC utiltiy</tag> implemented in <tt>gip*.[ch]</tt> &mdash;
628    used by the ETI, kernel and monitor.    
629   </descrip>
630
631 <tag/fml/ implements FML. The top level functions are implemented
632  in <tt>fml.c</tt>, <tt>fmlcall.c</tt> and <tt>fmlcalls.c</tt>.
633  Scanning is implemented in <tt>fmltoken.c</tt>.
634  Memory management is implemented in <tt>fmlmem.c</tt>. 
635  Arithmetic operators are implemented in <tt>fmlarit.c</tt>. 
636  String manipulation functions are implemented in <tt>fmlstr.c</tt>.
637  Relational operators are implemented in <tt>fmlrel.c</tt>.
638  List maniuplations are performed in <tt>fmllist.c</tt>.
639  FML symbol table management is implemented in <tt>fmlsym.c</tt>.
640  Conversion from ISO2709 to list notation is implemented in
641  <tt>fmlmarc.c</tt>.
642
643 <tag/zlayer-zdist/ implements the high-level Z39.50 API on top
644   of Zdist. This task is implemented in <tt>zaccess.c</tt>. The
645  public header file is called <tt>zaccess.h</tt>.
646
647 <tag/zlayer-yaz/ implements the high-level Z39.50 API on top
648   of YAZ. This task is implemented in <tt>zaccess.c</tt>. The
649  public header file is called <tt>zaccess.h</tt>.
650
651 <tag/kernel/ implements the ETI, kernel and monitor. The kernel
652  itself is implemented in <tt>main.c</tt>, <tt>urp.c</tt> and
653  <tt>persist.c</tt>. The ETI is implemented in <tt>eti.c</tt> and
654  the monitor is implemented <tt>monitor.c</tt>.
655 </descrip>
656
657 <sect>LICENSE
658
659 <p>
660  Copyright &copy; 1995-1996, the EUROPAGATE consortium (see below).
661
662  The EUROPAGATE consortium members are:
663
664 <itemize>
665 <item>University College Dublin
666 <item>Danmarks Teknologiske Videnscenter
667 <item>An Chomhairle Leabharlanna
668 <item>Consejo Superior de Investigaciones Cientificas
669 </itemize>
670
671  Permission to use, copy, modify, distribute, and sell this software and
672  its documentation, in whole or in part, for any purpose, is hereby granted,
673  provided that:
674
675  1. This copyright and permission notice appear in all copies of the
676  software and its documentation. Notices of copyright or attribution
677  which appear at the beginning of any file must remain unchanged.
678
679  2. The names of EUROPAGATE or the project partners may not be used to
680  endorse or promote products derived from this software without specific
681  prior written permission.
682
683  3. Users of this software (implementors and gateway operators) agree to
684  inform the EUROPAGATE consortium of their use of the software. This
685  information will be used to evaluate the EUROPAGATE project and the
686  software, and to plan further developments. The consortium may use
687  the information in later publications.
688  
689  4. Users of this software agree to make their best efforts, when
690  documenting their use of the software, to acknowledge the EUROPAGATE
691  consortium, and the role played by the software in their work.
692
693  THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND,
694  EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
695  WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
696  IN NO EVENT SHALL THE EUROPAGATE CONSORTIUM OR ITS MEMBERS BE LIABLE
697  FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF
698  ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
699  OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND
700  ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
701  USE OR PERFORMANCE OF THIS SOFTWARE.
702
703 </article>