COPYING
author J. Ali Harlow <ali@juiblex.co.uk>
Sat Oct 04 18:12:58 2014 +0100 (2014-10-04)
changeset 454 56ff755c268c
permissions -rw-r--r--
Only export symbols starting with razor_ in dynamic library.

Apart from being good practice to avoid clashes with higher-level
libraries and the application, this also fixes an obscure bug: The
gnulib library is used both by librazor (the dynamic library) and
by razor (the executable). In doing so, we want to have two separate
copies of the library despite the code duplication this involves.
Without the explicit limit to export only razor_ symbols, the razor
executable under mingw64 was picking up the getopt_long function
from librazor and the optind variable from libgnu which meant that
it did not see optind changing. Hiding librazor's copy of getopt
causes the linker to find libgnu's copy and everything works.

Note that under mingw librazor-#.dll still contains undocumented
(private) razor_ symbols but these will do no harm as long as nobody
tries to use them.
krh@212
     1
		    GNU GENERAL PUBLIC LICENSE
krh@212
     2
		       Version 2, June 1991
krh@212
     3
krh@212
     4
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
krh@212
     5
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
krh@212
     6
 Everyone is permitted to copy and distribute verbatim copies
krh@212
     7
 of this license document, but changing it is not allowed.
krh@212
     8
krh@212
     9
			    Preamble
krh@212
    10
krh@212
    11
  The licenses for most software are designed to take away your
krh@212
    12
freedom to share and change it.  By contrast, the GNU General Public
krh@212
    13
License is intended to guarantee your freedom to share and change free
krh@212
    14
software--to make sure the software is free for all its users.  This
krh@212
    15
General Public License applies to most of the Free Software
krh@212
    16
Foundation's software and to any other program whose authors commit to
krh@212
    17
using it.  (Some other Free Software Foundation software is covered by
krh@212
    18
the GNU Lesser General Public License instead.)  You can apply it to
krh@212
    19
your programs, too.
krh@212
    20
krh@212
    21
  When we speak of free software, we are referring to freedom, not
krh@212
    22
price.  Our General Public Licenses are designed to make sure that you
krh@212
    23
have the freedom to distribute copies of free software (and charge for
krh@212
    24
this service if you wish), that you receive source code or can get it
krh@212
    25
if you want it, that you can change the software or use pieces of it
krh@212
    26
in new free programs; and that you know you can do these things.
krh@212
    27
krh@212
    28
  To protect your rights, we need to make restrictions that forbid
krh@212
    29
anyone to deny you these rights or to ask you to surrender the rights.
krh@212
    30
These restrictions translate to certain responsibilities for you if you
krh@212
    31
distribute copies of the software, or if you modify it.
krh@212
    32
krh@212
    33
  For example, if you distribute copies of such a program, whether
krh@212
    34
gratis or for a fee, you must give the recipients all the rights that
krh@212
    35
you have.  You must make sure that they, too, receive or can get the
krh@212
    36
source code.  And you must show them these terms so they know their
krh@212
    37
rights.
krh@212
    38
krh@212
    39
  We protect your rights with two steps: (1) copyright the software, and
krh@212
    40
(2) offer you this license which gives you legal permission to copy,
krh@212
    41
distribute and/or modify the software.
krh@212
    42
krh@212
    43
  Also, for each author's protection and ours, we want to make certain
krh@212
    44
that everyone understands that there is no warranty for this free
krh@212
    45
software.  If the software is modified by someone else and passed on, we
krh@212
    46
want its recipients to know that what they have is not the original, so
krh@212
    47
that any problems introduced by others will not reflect on the original
krh@212
    48
authors' reputations.
krh@212
    49
krh@212
    50
  Finally, any free program is threatened constantly by software
krh@212
    51
patents.  We wish to avoid the danger that redistributors of a free
krh@212
    52
program will individually obtain patent licenses, in effect making the
krh@212
    53
program proprietary.  To prevent this, we have made it clear that any
krh@212
    54
patent must be licensed for everyone's free use or not licensed at all.
krh@212
    55
krh@212
    56
  The precise terms and conditions for copying, distribution and
krh@212
    57
modification follow.
krh@212
    58
krh@212
    59
		    GNU GENERAL PUBLIC LICENSE
krh@212
    60
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
krh@212
    61
krh@212
    62
  0. This License applies to any program or other work which contains
krh@212
    63
a notice placed by the copyright holder saying it may be distributed
krh@212
    64
under the terms of this General Public License.  The "Program", below,
krh@212
    65
refers to any such program or work, and a "work based on the Program"
krh@212
    66
means either the Program or any derivative work under copyright law:
krh@212
    67
that is to say, a work containing the Program or a portion of it,
krh@212
    68
either verbatim or with modifications and/or translated into another
krh@212
    69
language.  (Hereinafter, translation is included without limitation in
krh@212
    70
the term "modification".)  Each licensee is addressed as "you".
krh@212
    71
krh@212
    72
Activities other than copying, distribution and modification are not
krh@212
    73
covered by this License; they are outside its scope.  The act of
krh@212
    74
running the Program is not restricted, and the output from the Program
krh@212
    75
is covered only if its contents constitute a work based on the
krh@212
    76
Program (independent of having been made by running the Program).
krh@212
    77
Whether that is true depends on what the Program does.
krh@212
    78
krh@212
    79
  1. You may copy and distribute verbatim copies of the Program's
krh@212
    80
source code as you receive it, in any medium, provided that you
krh@212
    81
conspicuously and appropriately publish on each copy an appropriate
krh@212
    82
copyright notice and disclaimer of warranty; keep intact all the
krh@212
    83
notices that refer to this License and to the absence of any warranty;
krh@212
    84
and give any other recipients of the Program a copy of this License
krh@212
    85
along with the Program.
krh@212
    86
krh@212
    87
You may charge a fee for the physical act of transferring a copy, and
krh@212
    88
you may at your option offer warranty protection in exchange for a fee.
krh@212
    89
krh@212
    90
  2. You may modify your copy or copies of the Program or any portion
krh@212
    91
of it, thus forming a work based on the Program, and copy and
krh@212
    92
distribute such modifications or work under the terms of Section 1
krh@212
    93
above, provided that you also meet all of these conditions:
krh@212
    94
krh@212
    95
    a) You must cause the modified files to carry prominent notices
krh@212
    96
    stating that you changed the files and the date of any change.
krh@212
    97
krh@212
    98
    b) You must cause any work that you distribute or publish, that in
krh@212
    99
    whole or in part contains or is derived from the Program or any
krh@212
   100
    part thereof, to be licensed as a whole at no charge to all third
krh@212
   101
    parties under the terms of this License.
krh@212
   102
krh@212
   103
    c) If the modified program normally reads commands interactively
krh@212
   104
    when run, you must cause it, when started running for such
krh@212
   105
    interactive use in the most ordinary way, to print or display an
krh@212
   106
    announcement including an appropriate copyright notice and a
krh@212
   107
    notice that there is no warranty (or else, saying that you provide
krh@212
   108
    a warranty) and that users may redistribute the program under
krh@212
   109
    these conditions, and telling the user how to view a copy of this
krh@212
   110
    License.  (Exception: if the Program itself is interactive but
krh@212
   111
    does not normally print such an announcement, your work based on
krh@212
   112
    the Program is not required to print an announcement.)
krh@212
   113
krh@212
   114
These requirements apply to the modified work as a whole.  If
krh@212
   115
identifiable sections of that work are not derived from the Program,
krh@212
   116
and can be reasonably considered independent and separate works in
krh@212
   117
themselves, then this License, and its terms, do not apply to those
krh@212
   118
sections when you distribute them as separate works.  But when you
krh@212
   119
distribute the same sections as part of a whole which is a work based
krh@212
   120
on the Program, the distribution of the whole must be on the terms of
krh@212
   121
this License, whose permissions for other licensees extend to the
krh@212
   122
entire whole, and thus to each and every part regardless of who wrote it.
krh@212
   123
krh@212
   124
Thus, it is not the intent of this section to claim rights or contest
krh@212
   125
your rights to work written entirely by you; rather, the intent is to
krh@212
   126
exercise the right to control the distribution of derivative or
krh@212
   127
collective works based on the Program.
krh@212
   128
krh@212
   129
In addition, mere aggregation of another work not based on the Program
krh@212
   130
with the Program (or with a work based on the Program) on a volume of
krh@212
   131
a storage or distribution medium does not bring the other work under
krh@212
   132
the scope of this License.
krh@212
   133
krh@212
   134
  3. You may copy and distribute the Program (or a work based on it,
krh@212
   135
under Section 2) in object code or executable form under the terms of
krh@212
   136
Sections 1 and 2 above provided that you also do one of the following:
krh@212
   137
krh@212
   138
    a) Accompany it with the complete corresponding machine-readable
krh@212
   139
    source code, which must be distributed under the terms of Sections
krh@212
   140
    1 and 2 above on a medium customarily used for software interchange; or,
krh@212
   141
krh@212
   142
    b) Accompany it with a written offer, valid for at least three
krh@212
   143
    years, to give any third party, for a charge no more than your
krh@212
   144
    cost of physically performing source distribution, a complete
krh@212
   145
    machine-readable copy of the corresponding source code, to be
krh@212
   146
    distributed under the terms of Sections 1 and 2 above on a medium
krh@212
   147
    customarily used for software interchange; or,
krh@212
   148
krh@212
   149
    c) Accompany it with the information you received as to the offer
krh@212
   150
    to distribute corresponding source code.  (This alternative is
krh@212
   151
    allowed only for noncommercial distribution and only if you
krh@212
   152
    received the program in object code or executable form with such
krh@212
   153
    an offer, in accord with Subsection b above.)
krh@212
   154
krh@212
   155
The source code for a work means the preferred form of the work for
krh@212
   156
making modifications to it.  For an executable work, complete source
krh@212
   157
code means all the source code for all modules it contains, plus any
krh@212
   158
associated interface definition files, plus the scripts used to
krh@212
   159
control compilation and installation of the executable.  However, as a
krh@212
   160
special exception, the source code distributed need not include
krh@212
   161
anything that is normally distributed (in either source or binary
krh@212
   162
form) with the major components (compiler, kernel, and so on) of the
krh@212
   163
operating system on which the executable runs, unless that component
krh@212
   164
itself accompanies the executable.
krh@212
   165
krh@212
   166
If distribution of executable or object code is made by offering
krh@212
   167
access to copy from a designated place, then offering equivalent
krh@212
   168
access to copy the source code from the same place counts as
krh@212
   169
distribution of the source code, even though third parties are not
krh@212
   170
compelled to copy the source along with the object code.
krh@212
   171
krh@212
   172
  4. You may not copy, modify, sublicense, or distribute the Program
krh@212
   173
except as expressly provided under this License.  Any attempt
krh@212
   174
otherwise to copy, modify, sublicense or distribute the Program is
krh@212
   175
void, and will automatically terminate your rights under this License.
krh@212
   176
However, parties who have received copies, or rights, from you under
krh@212
   177
this License will not have their licenses terminated so long as such
krh@212
   178
parties remain in full compliance.
krh@212
   179
krh@212
   180
  5. You are not required to accept this License, since you have not
krh@212
   181
signed it.  However, nothing else grants you permission to modify or
krh@212
   182
distribute the Program or its derivative works.  These actions are
krh@212
   183
prohibited by law if you do not accept this License.  Therefore, by
krh@212
   184
modifying or distributing the Program (or any work based on the
krh@212
   185
Program), you indicate your acceptance of this License to do so, and
krh@212
   186
all its terms and conditions for copying, distributing or modifying
krh@212
   187
the Program or works based on it.
krh@212
   188
krh@212
   189
  6. Each time you redistribute the Program (or any work based on the
krh@212
   190
Program), the recipient automatically receives a license from the
krh@212
   191
original licensor to copy, distribute or modify the Program subject to
krh@212
   192
these terms and conditions.  You may not impose any further
krh@212
   193
restrictions on the recipients' exercise of the rights granted herein.
krh@212
   194
You are not responsible for enforcing compliance by third parties to
krh@212
   195
this License.
krh@212
   196
krh@212
   197
  7. If, as a consequence of a court judgment or allegation of patent
krh@212
   198
infringement or for any other reason (not limited to patent issues),
krh@212
   199
conditions are imposed on you (whether by court order, agreement or
krh@212
   200
otherwise) that contradict the conditions of this License, they do not
krh@212
   201
excuse you from the conditions of this License.  If you cannot
krh@212
   202
distribute so as to satisfy simultaneously your obligations under this
krh@212
   203
License and any other pertinent obligations, then as a consequence you
krh@212
   204
may not distribute the Program at all.  For example, if a patent
krh@212
   205
license would not permit royalty-free redistribution of the Program by
krh@212
   206
all those who receive copies directly or indirectly through you, then
krh@212
   207
the only way you could satisfy both it and this License would be to
krh@212
   208
refrain entirely from distribution of the Program.
krh@212
   209
krh@212
   210
If any portion of this section is held invalid or unenforceable under
krh@212
   211
any particular circumstance, the balance of the section is intended to
krh@212
   212
apply and the section as a whole is intended to apply in other
krh@212
   213
circumstances.
krh@212
   214
krh@212
   215
It is not the purpose of this section to induce you to infringe any
krh@212
   216
patents or other property right claims or to contest validity of any
krh@212
   217
such claims; this section has the sole purpose of protecting the
krh@212
   218
integrity of the free software distribution system, which is
krh@212
   219
implemented by public license practices.  Many people have made
krh@212
   220
generous contributions to the wide range of software distributed
krh@212
   221
through that system in reliance on consistent application of that
krh@212
   222
system; it is up to the author/donor to decide if he or she is willing
krh@212
   223
to distribute software through any other system and a licensee cannot
krh@212
   224
impose that choice.
krh@212
   225
krh@212
   226
This section is intended to make thoroughly clear what is believed to
krh@212
   227
be a consequence of the rest of this License.
krh@212
   228
krh@212
   229
  8. If the distribution and/or use of the Program is restricted in
krh@212
   230
certain countries either by patents or by copyrighted interfaces, the
krh@212
   231
original copyright holder who places the Program under this License
krh@212
   232
may add an explicit geographical distribution limitation excluding
krh@212
   233
those countries, so that distribution is permitted only in or among
krh@212
   234
countries not thus excluded.  In such case, this License incorporates
krh@212
   235
the limitation as if written in the body of this License.
krh@212
   236
krh@212
   237
  9. The Free Software Foundation may publish revised and/or new versions
krh@212
   238
of the General Public License from time to time.  Such new versions will
krh@212
   239
be similar in spirit to the present version, but may differ in detail to
krh@212
   240
address new problems or concerns.
krh@212
   241
krh@212
   242
Each version is given a distinguishing version number.  If the Program
krh@212
   243
specifies a version number of this License which applies to it and "any
krh@212
   244
later version", you have the option of following the terms and conditions
krh@212
   245
either of that version or of any later version published by the Free
krh@212
   246
Software Foundation.  If the Program does not specify a version number of
krh@212
   247
this License, you may choose any version ever published by the Free Software
krh@212
   248
Foundation.
krh@212
   249
krh@212
   250
  10. If you wish to incorporate parts of the Program into other free
krh@212
   251
programs whose distribution conditions are different, write to the author
krh@212
   252
to ask for permission.  For software which is copyrighted by the Free
krh@212
   253
Software Foundation, write to the Free Software Foundation; we sometimes
krh@212
   254
make exceptions for this.  Our decision will be guided by the two goals
krh@212
   255
of preserving the free status of all derivatives of our free software and
krh@212
   256
of promoting the sharing and reuse of software generally.
krh@212
   257
krh@212
   258
			    NO WARRANTY
krh@212
   259
krh@212
   260
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
krh@212
   261
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
krh@212
   262
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
krh@212
   263
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
krh@212
   264
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
krh@212
   265
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
krh@212
   266
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
krh@212
   267
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
krh@212
   268
REPAIR OR CORRECTION.
krh@212
   269
krh@212
   270
  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
krh@212
   271
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
krh@212
   272
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
krh@212
   273
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
krh@212
   274
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
krh@212
   275
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
krh@212
   276
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
krh@212
   277
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
krh@212
   278
POSSIBILITY OF SUCH DAMAGES.
krh@212
   279
krh@212
   280
		     END OF TERMS AND CONDITIONS
krh@212
   281
krh@212
   282
	    How to Apply These Terms to Your New Programs
krh@212
   283
krh@212
   284
  If you develop a new program, and you want it to be of the greatest
krh@212
   285
possible use to the public, the best way to achieve this is to make it
krh@212
   286
free software which everyone can redistribute and change under these terms.
krh@212
   287
krh@212
   288
  To do so, attach the following notices to the program.  It is safest
krh@212
   289
to attach them to the start of each source file to most effectively
krh@212
   290
convey the exclusion of warranty; and each file should have at least
krh@212
   291
the "copyright" line and a pointer to where the full notice is found.
krh@212
   292
krh@212
   293
    <one line to give the program's name and a brief idea of what it does.>
krh@212
   294
    Copyright (C) <year>  <name of author>
krh@212
   295
krh@212
   296
    This program is free software; you can redistribute it and/or modify
krh@212
   297
    it under the terms of the GNU General Public License as published by
krh@212
   298
    the Free Software Foundation; either version 2 of the License, or
krh@212
   299
    (at your option) any later version.
krh@212
   300
krh@212
   301
    This program is distributed in the hope that it will be useful,
krh@212
   302
    but WITHOUT ANY WARRANTY; without even the implied warranty of
krh@212
   303
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
krh@212
   304
    GNU General Public License for more details.
krh@212
   305
krh@212
   306
    You should have received a copy of the GNU General Public License along
krh@212
   307
    with this program; if not, write to the Free Software Foundation, Inc.,
krh@212
   308
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
krh@212
   309
krh@212
   310
Also add information on how to contact you by electronic and paper mail.
krh@212
   311
krh@212
   312
If the program is interactive, make it output a short notice like this
krh@212
   313
when it starts in an interactive mode:
krh@212
   314
krh@212
   315
    Gnomovision version 69, Copyright (C) year name of author
krh@212
   316
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
krh@212
   317
    This is free software, and you are welcome to redistribute it
krh@212
   318
    under certain conditions; type `show c' for details.
krh@212
   319
krh@212
   320
The hypothetical commands `show w' and `show c' should show the appropriate
krh@212
   321
parts of the General Public License.  Of course, the commands you use may
krh@212
   322
be called something other than `show w' and `show c'; they could even be
krh@212
   323
mouse-clicks or menu items--whatever suits your program.
krh@212
   324
krh@212
   325
You should also get your employer (if you work as a programmer) or your
krh@212
   326
school, if any, to sign a "copyright disclaimer" for the program, if
krh@212
   327
necessary.  Here is a sample; alter the names:
krh@212
   328
krh@212
   329
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
krh@212
   330
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
krh@212
   331
krh@212
   332
  <signature of Ty Coon>, 1 April 1989
krh@212
   333
  Ty Coon, President of Vice
krh@212
   334
krh@212
   335
This General Public License does not permit incorporating your program into
krh@212
   336
proprietary programs.  If your program is a subroutine library, you may
krh@212
   337
consider it more useful to permit linking proprietary applications with the
krh@212
   338
library.  If this is what you want to do, use the GNU Lesser General
krh@212
   339
Public License instead of this License.