1
2All source files marked "Copyright INRIA" in this distribution are
3distributed under the terms of the Q Public License version 1.0
4(included below).
5
6Binary versions of this software include some parts of the
7Objective Caml runtime system, which is distributed under the terms of
8the GNU LIBRARY GENERAL PUBLIC LICENSE Version 2.  (included below)
9
10
11Sources for  Objective Caml runtime system are available at
12http://caml.inria.fr/ocaml/distrib.html
13
14
15----------------------------------------------------------------------
16
17  As a special exception to the Q Public Licence, you may develop
18  application programs, reusable components and other software items
19  that link with the original or modified versions of the Software
20  and are not made available to the general public, without any of the
21  additional requirements listed in clause 6c of the Q Public licence.
22
23                   THE Q PUBLIC LICENSE version 1.0
24
25              Copyright (C) 1999 Troll Tech AS, Norway.
26                  Everyone is permitted to copy and
27                  distribute this license document.
28
29The intent of this license is to establish freedom to share and change
30the software regulated by this license under the open source model.
31
32This license applies to any software containing a notice placed by the
33copyright holder saying that it may be distributed under the terms of
34the Q Public License version 1.0. Such software is herein referred to
35as the Software. This license covers modification and distribution of
36the Software, use of third-party application programs based on the
37Software, and development of free software which uses the Software.
38
39                            Granted Rights
40
411. You are granted the non-exclusive rights set forth in this license
42provided you agree to and comply with any and all conditions in this
43license. Whole or partial distribution of the Software, or software
44items that link with the Software, in any form signifies acceptance of
45this license.
46
472. You may copy and distribute the Software in unmodified form
48provided that the entire package, including - but not restricted to -
49copyright, trademark notices and disclaimers, as released by the
50initial developer of the Software, is distributed.
51
523. You may make modifications to the Software and distribute your
53modifications, in a form that is separate from the Software, such as
54patches. The following restrictions apply to modifications:
55
56      a. Modifications must not alter or remove any copyright notices
57      in the Software.
58
59      b. When modifications to the Software are released under this
60      license, a non-exclusive royalty-free right is granted to the
61      initial developer of the Software to distribute your
62      modification in future versions of the Software provided such
63      versions remain available under these terms in addition to any
64      other license(s) of the initial developer.
65
664. You may distribute machine-executable forms of the Software or
67machine-executable forms of modified versions of the Software,
68provided that you meet these restrictions:
69
70      a. You must include this license document in the distribution.
71
72      b. You must ensure that all recipients of the machine-executable
73      forms are also able to receive the complete machine-readable
74      source code to the distributed Software, including all
75      modifications, without any charge beyond the costs of data
76      transfer, and place prominent notices in the distribution
77      explaining this.
78
79      c. You must ensure that all modifications included in the
80      machine-executable forms are available under the terms of this
81      license.
82
835. You may use the original or modified versions of the Software to
84compile, link and run application programs legally developed by you or
85by others.
86
876. You may develop application programs, reusable components and other
88software items that link with the original or modified versions of the
89Software. These items, when distributed, are subject to the following
90requirements:
91
92      a. You must ensure that all recipients of machine-executable
93      forms of these items are also able to receive and use the
94      complete machine-readable source code to the items without any
95      charge beyond the costs of data transfer.
96
97      b. You must explicitly license all recipients of your items to
98      use and re-distribute original and modified versions of the
99      items in both machine-executable and source code forms. The
100      recipients must be able to do so without any charges whatsoever,
101      and they must be able to re-distribute to anyone they choose.
102
103      c. If the items are not available to the general public, and the
104      initial developer of the Software requests a copy of the items,
105      then you must supply one.
106
107                       Limitations of Liability
108
109In no event shall the initial developers or copyright holders be
110liable for any damages whatsoever, including - but not restricted to -
111lost revenue or profits or other direct, indirect, special, incidental
112or consequential damages, even if they have been advised of the
113possibility of such damages, except to the extent invariable law, if
114any, provides otherwise.
115
116                             No Warranty
117
118The Software and this license document are provided AS IS with NO
119WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN,
120MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
121
122                            Choice of Law
123
124This license is governed by the Laws of France.
125
126----------------------------------------------------------------------
127
128		  GNU LIBRARY GENERAL PUBLIC LICENSE
129		       Version 2, June 1991
130
131 Copyright (C) 1991 Free Software Foundation, Inc.
132 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
133 Everyone is permitted to copy and distribute verbatim copies
134 of this license document, but changing it is not allowed.
135
136[This is the first released version of the library GPL.  It is
137 numbered 2 because it goes with version 2 of the ordinary GPL.]
138
139			    Preamble
140
141  The licenses for most software are designed to take away your
142freedom to share and change it.  By contrast, the GNU General Public
143Licenses are intended to guarantee your freedom to share and change
144free software--to make sure the software is free for all its users.
145
146  This license, the Library General Public License, applies to some
147specially designated Free Software Foundation software, and to any
148other libraries whose authors decide to use it.  You can use it for
149your libraries, too.
150
151  When we speak of free software, we are referring to freedom, not
152price.  Our General Public Licenses are designed to make sure that you
153have the freedom to distribute copies of free software (and charge for
154this service if you wish), that you receive source code or can get it
155if you want it, that you can change the software or use pieces of it
156in new free programs; and that you know you can do these things.
157
158  To protect your rights, we need to make restrictions that forbid
159anyone to deny you these rights or to ask you to surrender the rights.
160These restrictions translate to certain responsibilities for you if
161you distribute copies of the library, or if you modify it.
162
163  For example, if you distribute copies of the library, whether gratis
164or for a fee, you must give the recipients all the rights that we gave
165you.  You must make sure that they, too, receive or can get the source
166code.  If you link a program with the library, you must provide
167complete object files to the recipients so that they can relink them
168with the library, after making changes to the library and recompiling
169it.  And you must show them these terms so they know their rights.
170
171  Our method of protecting your rights has two steps: (1) copyright
172the library, and (2) offer you this license which gives you legal
173permission to copy, distribute and/or modify the library.
174
175  Also, for each distributor's protection, we want to make certain
176that everyone understands that there is no warranty for this free
177library.  If the library is modified by someone else and passed on, we
178want its recipients to know that what they have is not the original
179version, so that any problems introduced by others will not reflect on
180the original authors' reputations.
181
182  Finally, any free program is threatened constantly by software
183patents.  We wish to avoid the danger that companies distributing free
184software will individually obtain patent licenses, thus in effect
185transforming the program into proprietary software.  To prevent this,
186we have made it clear that any patent must be licensed for everyone's
187free use or not licensed at all.
188
189  Most GNU software, including some libraries, is covered by the ordinary
190GNU General Public License, which was designed for utility programs.  This
191license, the GNU Library General Public License, applies to certain
192designated libraries.  This license is quite different from the ordinary
193one; be sure to read it in full, and don't assume that anything in it is
194the same as in the ordinary license.
195
196  The reason we have a separate public license for some libraries is that
197they blur the distinction we usually make between modifying or adding to a
198program and simply using it.  Linking a program with a library, without
199changing the library, is in some sense simply using the library, and is
200analogous to running a utility program or application program.  However, in
201a textual and legal sense, the linked executable is a combined work, a
202derivative of the original library, and the ordinary General Public License
203treats it as such.
204
205  Because of this blurred distinction, using the ordinary General
206Public License for libraries did not effectively promote software
207sharing, because most developers did not use the libraries.  We
208concluded that weaker conditions might promote sharing better.
209
210  However, unrestricted linking of non-free programs would deprive the
211users of those programs of all benefit from the free status of the
212libraries themselves.  This Library General Public License is intended to
213permit developers of non-free programs to use free libraries, while
214preserving your freedom as a user of such programs to change the free
215libraries that are incorporated in them.  (We have not seen how to achieve
216this as regards changes in header files, but we have achieved it as regards
217changes in the actual functions of the Library.)  The hope is that this
218will lead to faster development of free libraries.
219
220  The precise terms and conditions for copying, distribution and
221modification follow.  Pay close attention to the difference between a
222"work based on the library" and a "work that uses the library".  The
223former contains code derived from the library, while the latter only
224works together with the library.
225
226  Note that it is possible for a library to be covered by the ordinary
227General Public License rather than by this special one.
228
229		  GNU LIBRARY GENERAL PUBLIC LICENSE
230   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
231
232  0. This License Agreement applies to any software library which
233contains a notice placed by the copyright holder or other authorized
234party saying it may be distributed under the terms of this Library
235General Public License (also called "this License").  Each licensee is
236addressed as "you".
237
238  A "library" means a collection of software functions and/or data
239prepared so as to be conveniently linked with application programs
240(which use some of those functions and data) to form executables.
241
242  The "Library", below, refers to any such software library or work
243which has been distributed under these terms.  A "work based on the
244Library" means either the Library or any derivative work under
245copyright law: that is to say, a work containing the Library or a
246portion of it, either verbatim or with modifications and/or translated
247straightforwardly into another language.  (Hereinafter, translation is
248included without limitation in the term "modification".)
249
250  "Source code" for a work means the preferred form of the work for
251making modifications to it.  For a library, complete source code means
252all the source code for all modules it contains, plus any associated
253interface definition files, plus the scripts used to control compilation
254and installation of the library.
255
256  Activities other than copying, distribution and modification are not
257covered by this License; they are outside its scope.  The act of
258running a program using the Library is not restricted, and output from
259such a program is covered only if its contents constitute a work based
260on the Library (independent of the use of the Library in a tool for
261writing it).  Whether that is true depends on what the Library does
262and what the program that uses the Library does.
263
264  1. You may copy and distribute verbatim copies of the Library's
265complete source code as you receive it, in any medium, provided that
266you conspicuously and appropriately publish on each copy an
267appropriate copyright notice and disclaimer of warranty; keep intact
268all the notices that refer to this License and to the absence of any
269warranty; and distribute a copy of this License along with the
270Library.
271
272  You may charge a fee for the physical act of transferring a copy,
273and you may at your option offer warranty protection in exchange for a
274fee.
275
276  2. You may modify your copy or copies of the Library or any portion
277of it, thus forming a work based on the Library, and copy and
278distribute such modifications or work under the terms of Section 1
279above, provided that you also meet all of these conditions:
280
281    a) The modified work must itself be a software library.
282
283    b) You must cause the files modified to carry prominent notices
284    stating that you changed the files and the date of any change.
285
286    c) You must cause the whole of the work to be licensed at no
287    charge to all third parties under the terms of this License.
288
289    d) If a facility in the modified Library refers to a function or a
290    table of data to be supplied by an application program that uses
291    the facility, other than as an argument passed when the facility
292    is invoked, then you must make a good faith effort to ensure that,
293    in the event an application does not supply such function or
294    table, the facility still operates, and performs whatever part of
295    its purpose remains meaningful.
296
297    (For example, a function in a library to compute square roots has
298    a purpose that is entirely well-defined independent of the
299    application.  Therefore, Subsection 2d requires that any
300    application-supplied function or table used by this function must
301    be optional: if the application does not supply it, the square
302    root function must still compute square roots.)
303
304These requirements apply to the modified work as a whole.  If
305identifiable sections of that work are not derived from the Library,
306and can be reasonably considered independent and separate works in
307themselves, then this License, and its terms, do not apply to those
308sections when you distribute them as separate works.  But when you
309distribute the same sections as part of a whole which is a work based
310on the Library, the distribution of the whole must be on the terms of
311this License, whose permissions for other licensees extend to the
312entire whole, and thus to each and every part regardless of who wrote
313it.
314
315Thus, it is not the intent of this section to claim rights or contest
316your rights to work written entirely by you; rather, the intent is to
317exercise the right to control the distribution of derivative or
318collective works based on the Library.
319
320In addition, mere aggregation of another work not based on the Library
321with the Library (or with a work based on the Library) on a volume of
322a storage or distribution medium does not bring the other work under
323the scope of this License.
324
325  3. You may opt to apply the terms of the ordinary GNU General Public
326License instead of this License to a given copy of the Library.  To do
327this, you must alter all the notices that refer to this License, so
328that they refer to the ordinary GNU General Public License, version 2,
329instead of to this License.  (If a newer version than version 2 of the
330ordinary GNU General Public License has appeared, then you can specify
331that version instead if you wish.)  Do not make any other change in
332these notices.
333
334  Once this change is made in a given copy, it is irreversible for
335that copy, so the ordinary GNU General Public License applies to all
336subsequent copies and derivative works made from that copy.
337
338  This option is useful when you wish to copy part of the code of
339the Library into a program that is not a library.
340
341  4. You may copy and distribute the Library (or a portion or
342derivative of it, under Section 2) in object code or executable form
343under the terms of Sections 1 and 2 above provided that you accompany
344it with the complete corresponding machine-readable source code, which
345must be distributed under the terms of Sections 1 and 2 above on a
346medium customarily used for software interchange.
347
348  If distribution of object code is made by offering access to copy
349from a designated place, then offering equivalent access to copy the
350source code from the same place satisfies the requirement to
351distribute the source code, even though third parties are not
352compelled to copy the source along with the object code.
353
354  5. A program that contains no derivative of any portion of the
355Library, but is designed to work with the Library by being compiled or
356linked with it, is called a "work that uses the Library".  Such a
357work, in isolation, is not a derivative work of the Library, and
358therefore falls outside the scope of this License.
359
360  However, linking a "work that uses the Library" with the Library
361creates an executable that is a derivative of the Library (because it
362contains portions of the Library), rather than a "work that uses the
363library".  The executable is therefore covered by this License.
364Section 6 states terms for distribution of such executables.
365
366  When a "work that uses the Library" uses material from a header file
367that is part of the Library, the object code for the work may be a
368derivative work of the Library even though the source code is not.
369Whether this is true is especially significant if the work can be
370linked without the Library, or if the work is itself a library.  The
371threshold for this to be true is not precisely defined by law.
372
373  If such an object file uses only numerical parameters, data
374structure layouts and accessors, and small macros and small inline
375functions (ten lines or less in length), then the use of the object
376file is unrestricted, regardless of whether it is legally a derivative
377work.  (Executables containing this object code plus portions of the
378Library will still fall under Section 6.)
379
380  Otherwise, if the work is a derivative of the Library, you may
381distribute the object code for the work under the terms of Section 6.
382Any executables containing that work also fall under Section 6,
383whether or not they are linked directly with the Library itself.
384
385  6. As an exception to the Sections above, you may also compile or
386link a "work that uses the Library" with the Library to produce a
387work containing portions of the Library, and distribute that work
388under terms of your choice, provided that the terms permit
389modification of the work for the customer's own use and reverse
390engineering for debugging such modifications.
391
392  You must give prominent notice with each copy of the work that the
393Library is used in it and that the Library and its use are covered by
394this License.  You must supply a copy of this License.  If the work
395during execution displays copyright notices, you must include the
396copyright notice for the Library among them, as well as a reference
397directing the user to the copy of this License.  Also, you must do one
398of these things:
399
400    a) Accompany the work with the complete corresponding
401    machine-readable source code for the Library including whatever
402    changes were used in the work (which must be distributed under
403    Sections 1 and 2 above); and, if the work is an executable linked
404    with the Library, with the complete machine-readable "work that
405    uses the Library", as object code and/or source code, so that the
406    user can modify the Library and then relink to produce a modified
407    executable containing the modified Library.  (It is understood
408    that the user who changes the contents of definitions files in the
409    Library will not necessarily be able to recompile the application
410    to use the modified definitions.)
411
412    b) Accompany the work with a written offer, valid for at
413    least three years, to give the same user the materials
414    specified in Subsection 6a, above, for a charge no more
415    than the cost of performing this distribution.
416
417    c) If distribution of the work is made by offering access to copy
418    from a designated place, offer equivalent access to copy the above
419    specified materials from the same place.
420
421    d) Verify that the user has already received a copy of these
422    materials or that you have already sent this user a copy.
423
424  For an executable, the required form of the "work that uses the
425Library" must include any data and utility programs needed for
426reproducing the executable from it.  However, as a special exception,
427the source code distributed need not include anything that is normally
428distributed (in either source or binary form) with the major
429components (compiler, kernel, and so on) of the operating system on
430which the executable runs, unless that component itself accompanies
431the executable.
432
433  It may happen that this requirement contradicts the license
434restrictions of other proprietary libraries that do not normally
435accompany the operating system.  Such a contradiction means you cannot
436use both them and the Library together in an executable that you
437distribute.
438
439  7. You may place library facilities that are a work based on the
440Library side-by-side in a single library together with other library
441facilities not covered by this License, and distribute such a combined
442library, provided that the separate distribution of the work based on
443the Library and of the other library facilities is otherwise
444permitted, and provided that you do these two things:
445
446    a) Accompany the combined library with a copy of the same work
447    based on the Library, uncombined with any other library
448    facilities.  This must be distributed under the terms of the
449    Sections above.
450
451    b) Give prominent notice with the combined library of the fact
452    that part of it is a work based on the Library, and explaining
453    where to find the accompanying uncombined form of the same work.
454
455  8. You may not copy, modify, sublicense, link with, or distribute
456the Library except as expressly provided under this License.  Any
457attempt otherwise to copy, modify, sublicense, link with, or
458distribute the Library is void, and will automatically terminate your
459rights under this License.  However, parties who have received copies,
460or rights, from you under this License will not have their licenses
461terminated so long as such parties remain in full compliance.
462
463  9. You are not required to accept this License, since you have not
464signed it.  However, nothing else grants you permission to modify or
465distribute the Library or its derivative works.  These actions are
466prohibited by law if you do not accept this License.  Therefore, by
467modifying or distributing the Library (or any work based on the
468Library), you indicate your acceptance of this License to do so, and
469all its terms and conditions for copying, distributing or modifying
470the Library or works based on it.
471
472  10. Each time you redistribute the Library (or any work based on the
473Library), the recipient automatically receives a license from the
474original licensor to copy, distribute, link with or modify the Library
475subject to these terms and conditions.  You may not impose any further
476restrictions on the recipients' exercise of the rights granted herein.
477You are not responsible for enforcing compliance by third parties to
478this License.
479
480  11. If, as a consequence of a court judgment or allegation of patent
481infringement or for any other reason (not limited to patent issues),
482conditions are imposed on you (whether by court order, agreement or
483otherwise) that contradict the conditions of this License, they do not
484excuse you from the conditions of this License.  If you cannot
485distribute so as to satisfy simultaneously your obligations under this
486License and any other pertinent obligations, then as a consequence you
487may not distribute the Library at all.  For example, if a patent
488license would not permit royalty-free redistribution of the Library by
489all those who receive copies directly or indirectly through you, then
490the only way you could satisfy both it and this License would be to
491refrain entirely from distribution of the Library.
492
493If any portion of this section is held invalid or unenforceable under any
494particular circumstance, the balance of the section is intended to apply,
495and the section as a whole is intended to apply in other circumstances.
496
497It is not the purpose of this section to induce you to infringe any
498patents or other property right claims or to contest validity of any
499such claims; this section has the sole purpose of protecting the
500integrity of the free software distribution system which is
501implemented by public license practices.  Many people have made
502generous contributions to the wide range of software distributed
503through that system in reliance on consistent application of that
504system; it is up to the author/donor to decide if he or she is willing
505to distribute software through any other system and a licensee cannot
506impose that choice.
507
508This section is intended to make thoroughly clear what is believed to
509be a consequence of the rest of this License.
510
511  12. If the distribution and/or use of the Library is restricted in
512certain countries either by patents or by copyrighted interfaces, the
513original copyright holder who places the Library under this License may add
514an explicit geographical distribution limitation excluding those countries,
515so that distribution is permitted only in or among countries not thus
516excluded.  In such case, this License incorporates the limitation as if
517written in the body of this License.
518
519  13. The Free Software Foundation may publish revised and/or new
520versions of the Library General Public License from time to time.
521Such new versions will be similar in spirit to the present version,
522but may differ in detail to address new problems or concerns.
523
524Each version is given a distinguishing version number.  If the Library
525specifies a version number of this License which applies to it and
526"any later version", you have the option of following the terms and
527conditions either of that version or of any later version published by
528the Free Software Foundation.  If the Library does not specify a
529license version number, you may choose any version ever published by
530the Free Software Foundation.
531
532  14. If you wish to incorporate parts of the Library into other free
533programs whose distribution conditions are incompatible with these,
534write to the author to ask for permission.  For software which is
535copyrighted by the Free Software Foundation, write to the Free
536Software Foundation; we sometimes make exceptions for this.  Our
537decision will be guided by the two goals of preserving the free status
538of all derivatives of our free software and of promoting the sharing
539and reuse of software generally.
540
541			    NO WARRANTY
542
543  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
544WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
545EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
546OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
547KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
548IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
549PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
550LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
551THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
552
553  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
554WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
555AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
556FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
557CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
558LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
559RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
560FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
561SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
562DAMAGES.
563
564		     END OF TERMS AND CONDITIONS
565
566     Appendix: How to Apply These Terms to Your New Libraries
567
568  If you develop a new library, and you want it to be of the greatest
569possible use to the public, we recommend making it free software that
570everyone can redistribute and change.  You can do so by permitting
571redistribution under these terms (or, alternatively, under the terms of the
572ordinary General Public License).
573
574  To apply these terms, attach the following notices to the library.  It is
575safest to attach them to the start of each source file to most effectively
576convey the exclusion of warranty; and each file should have at least the
577"copyright" line and a pointer to where the full notice is found.
578
579    <one line to give the library's name and a brief idea of what it does.>
580    Copyright (C) <year>  <name of author>
581
582    This library is free software; you can redistribute it and/or
583    modify it under the terms of the GNU Library General Public
584    License as published by the Free Software Foundation; either
585    version 2 of the License, or (at your option) any later version.
586
587    This library is distributed in the hope that it will be useful,
588    but WITHOUT ANY WARRANTY; without even the implied warranty of
589    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
590    Library General Public License for more details.
591
592    You should have received a copy of the GNU Library General Public
593    License along with this library; if not, write to the Free
594    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
595    MA 02111-1307, USA
596
597Also add information on how to contact you by electronic and paper mail.
598
599You should also get your employer (if you work as a programmer) or your
600school, if any, to sign a "copyright disclaimer" for the library, if
601necessary.  Here is a sample; alter the names:
602
603  Yoyodyne, Inc., hereby disclaims all copyright interest in the
604  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
605
606  <signature of Ty Coon>, 1 April 1990
607  Ty Coon, President of Vice
608
609That's all there is to it!
610