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