| 1 |
This is gpgrt.info, produced by makeinfo version 6.8 from gpgrt.texi. |
| 2 |
|
| 3 |
This manual is for Libgpg-error (version 1.61, 7 November 2023), which |
| 4 |
is a library for code used by all GnuPG related packages. |
| 5 |
|
| 6 |
Copyright (C) 2014, 2022 g10 Code GmbH |
| 7 |
|
| 8 |
Permission is granted to copy, distribute and/or modify this |
| 9 |
document under the terms of the GNU General Public License as |
| 10 |
published by the Free Software Foundation; either version 2 of the |
| 11 |
License, or (at your option) any later version. The text of the |
| 12 |
license can be found in the section entitled "GNU General Public |
| 13 |
License". |
| 14 |
INFO-DIR-SECTION Libraries |
| 15 |
START-INFO-DIR-ENTRY |
| 16 |
* libgpg-error: (gpgrt). Error codes and common code for GnuPG. |
| 17 |
END-INFO-DIR-ENTRY |
| 18 |
|
| 19 |
|
| 20 |
File: gpgrt.info, Node: Top, Next: Introduction, Up: (dir) |
| 21 |
|
| 22 |
The Libgpg-error Library |
| 23 |
************************ |
| 24 |
|
| 25 |
This manual is for Libgpg-error (version 1.61, 7 November 2023), which |
| 26 |
is a library for code used by all GnuPG related packages. |
| 27 |
|
| 28 |
Copyright (C) 2014, 2022 g10 Code GmbH |
| 29 |
|
| 30 |
Permission is granted to copy, distribute and/or modify this |
| 31 |
document under the terms of the GNU General Public License as |
| 32 |
published by the Free Software Foundation; either version 2 of the |
| 33 |
License, or (at your option) any later version. The text of the |
| 34 |
license can be found in the section entitled "GNU General Public |
| 35 |
License". |
| 36 |
|
| 37 |
* Menu: |
| 38 |
|
| 39 |
* Introduction:: What is Libgpg-error. |
| 40 |
* Preparation:: What you should do before using the library. |
| 41 |
* Generalities:: General library functions and data types. |
| 42 |
* Tools:: Utility tools |
| 43 |
|
| 44 |
Appendices |
| 45 |
|
| 46 |
* Library Copying:: The GNU Lesser General Public License |
| 47 |
says how you can copy and share Libgpg-error. |
| 48 |
* Copying:: The GNU General Public License says how you |
| 49 |
can copy and share some parts of Libgpg-error. |
| 50 |
|
| 51 |
Indices |
| 52 |
|
| 53 |
* Concept Index:: Index of concepts and programs. |
| 54 |
* Function and Data Index:: Index of functions, variables and data types. |
| 55 |
|
| 56 |
|
| 57 |
File: gpgrt.info, Node: Introduction, Next: Preparation, Prev: Top, Up: Top |
| 58 |
|
| 59 |
1 Introduction |
| 60 |
************** |
| 61 |
|
| 62 |
Libgpg-error is a library to provide error codes for GnuPG and relates |
| 63 |
software as well as some other general purpose functions. It is planned |
| 64 |
to eventually rename this library to "gpgrt" (for GnuPG RunTime). |
| 65 |
|
| 66 |
* Menu: |
| 67 |
|
| 68 |
* Getting Started:: How to use this manual. |
| 69 |
* Features:: A glance at Libgpg-error’s features. |
| 70 |
* Overview:: Overview about the library. |
| 71 |
|
| 72 |
|
| 73 |
File: gpgrt.info, Node: Getting Started, Next: Features, Up: Introduction |
| 74 |
|
| 75 |
1.1 Getting Started |
| 76 |
=================== |
| 77 |
|
| 78 |
This manual documents the Libgpg-error library application programming |
| 79 |
interface (API). The goal is to that all functions and data types |
| 80 |
provided by the library are explained. However, for now this is only a |
| 81 |
stub and not very useful. |
| 82 |
|
| 83 |
|
| 84 |
File: gpgrt.info, Node: Features, Next: Overview, Prev: Getting Started, Up: Introduction |
| 85 |
|
| 86 |
1.2 Features |
| 87 |
============ |
| 88 |
|
| 89 |
TBD |
| 90 |
|
| 91 |
|
| 92 |
File: gpgrt.info, Node: Overview, Prev: Features, Up: Introduction |
| 93 |
|
| 94 |
1.3 Overview |
| 95 |
============ |
| 96 |
|
| 97 |
The Libgpg-error library is fully thread-safe, where it makes sense to |
| 98 |
be thread-safe. |
| 99 |
|
| 100 |
TBD |
| 101 |
|
| 102 |
|
| 103 |
File: gpgrt.info, Node: Preparation, Next: Generalities, Prev: Introduction, Up: Top |
| 104 |
|
| 105 |
2 Preparation |
| 106 |
************* |
| 107 |
|
| 108 |
To use Libgpg-error, you have to perform some changes to your sources |
| 109 |
and the build system. The necessary changes are small and explained in |
| 110 |
the following sections. At the end of this chapter, it is described how |
| 111 |
the library is initialized, and how the requirements of the library are |
| 112 |
verified. |
| 113 |
|
| 114 |
* Menu: |
| 115 |
|
| 116 |
* Header:: What header file you need to include. |
| 117 |
* Building sources:: How to build sources using the library. |
| 118 |
* Building sources using Automake:: How to build sources with the help of Automake. |
| 119 |
* Initializing the library:: How to initialize the library. |
| 120 |
* Multi-Threading:: How Libgpg-error can be used in a MT environment. |
| 121 |
|
| 122 |
|
| 123 |
File: gpgrt.info, Node: Header, Next: Building sources, Up: Preparation |
| 124 |
|
| 125 |
2.1 Header |
| 126 |
========== |
| 127 |
|
| 128 |
All interfaces (data types and functions) of the library are defined in |
| 129 |
the header file 'gpg-error.h'. You must include this in all source |
| 130 |
files using the library, either directly or through some other header |
| 131 |
file, like this: |
| 132 |
|
| 133 |
#include <gpg-error.h> |
| 134 |
|
| 135 |
Note well that the header file is platform specific and may only be |
| 136 |
used on the platform for which it has been build. |
| 137 |
|
| 138 |
The name space of Libgpg-error is 'gpg_*' and 'gpgrt*' for function |
| 139 |
and type names and 'GPG_*' and 'GPGRT_*' for other symbols. In addition |
| 140 |
the same name prefixes with one prepended underscore are reserved for |
| 141 |
internal use and should never be used by an application. |
| 142 |
|
| 143 |
Certain parts of gpg-error.h may be included by defining these macros: |
| 144 |
|
| 145 |
'GPG_ERR_ENABLE_GETTEXT_MACROS' |
| 146 |
Define to provide macros to map the internal gettext API to |
| 147 |
standard names. This has only an effect on Windows platforms. |
| 148 |
|
| 149 |
'GPGRT_ENABLE_ES_MACROS' |
| 150 |
Define to provide "es_" macros for the estream functions. |
| 151 |
|
| 152 |
|
| 153 |
File: gpgrt.info, Node: Building sources, Next: Building sources using Automake, Prev: Header, Up: Preparation |
| 154 |
|
| 155 |
2.2 Building sources |
| 156 |
==================== |
| 157 |
|
| 158 |
If you want to compile a source file including the 'gpg-error.h' header |
| 159 |
file, you must make sure that the compiler can find it in the directory |
| 160 |
hierarchy. This is accomplished by adding the path to the directory in |
| 161 |
which the header file is located to the compilers include file search |
| 162 |
path (via the '-I' option). |
| 163 |
|
| 164 |
However, the path to the include file is determined at the time the |
| 165 |
source is configured. To solve this problem, Libgpg-error ships with a |
| 166 |
pkg-config file: gpg-error.pc. |
| 167 |
|
| 168 |
The options that need to be added to the compiler invocation at |
| 169 |
compile time are output by the '--cflags' option to 'pkg-config'. The |
| 170 |
following example shows how it can be used at the command line: |
| 171 |
|
| 172 |
gcc -c foo.c $(pkg-config --cflags gpg-error) |
| 173 |
|
| 174 |
Adding the output of 'pkg-config --cflags gpg-error' to the |
| 175 |
compiler’s command line will ensure that the compiler can find the |
| 176 |
Libgpg-error header file. |
| 177 |
|
| 178 |
A similar problem occurs when linking the program with the library. |
| 179 |
Again, the compiler has to find the library files. For this to work, |
| 180 |
the path to the library files has to be added to the library search path |
| 181 |
(via the '-L' option). For this, the option '--libs' to 'pkg-config' |
| 182 |
can be used. The example shows how to link 'foo.o' with the |
| 183 |
Libgpg-error library to a program 'foo'. |
| 184 |
|
| 185 |
gcc -o foo foo.o $(pkg-config --libs gpg-error) |
| 186 |
|
| 187 |
Of course you can also combine both examples to a single command by |
| 188 |
specifying both options to 'pkg-config': |
| 189 |
|
| 190 |
gcc -o foo foo.c $(pkg-config --cflags --libs gpg-error) |
| 191 |
|
| 192 |
For GnuPG and its friends, which are usually needed to be built |
| 193 |
earlier in a stage of OS bootstrap, Libgpg-error ships the small helper |
| 194 |
program 'gpgrt-config'. This helper program is a sort of 'pkg-config' |
| 195 |
replacement for limited environment, supporting cross compilation, as |
| 196 |
well as multilib and multi-arch installation. Note that 'gpgrt-config' |
| 197 |
is not for general use for other programs. 'gpgrt-config' requires |
| 198 |
invocation with the option '--lib=' so that it locates the appropriate |
| 199 |
path to 'gpg-error.pc'. |
| 200 |
|
| 201 |
|
| 202 |
File: gpgrt.info, Node: Building sources using Automake, Next: Initializing the library, Prev: Building sources, Up: Preparation |
| 203 |
|
| 204 |
2.3 Building sources using Automake |
| 205 |
=================================== |
| 206 |
|
| 207 |
It is much easier if you use GNU Automake instead of writing your own |
| 208 |
Makefiles. If you do that, you do not have to worry about finding and |
| 209 |
invoking the 'pkg-config' or 'gpgrt-config' script at all. Libgpg-error |
| 210 |
provides an extension to Automake that does all the work for you. That |
| 211 |
is offered by 'gpg-error.m4'. |
| 212 |
|
| 213 |
-- Macro: AM_PATH_GPG_ERROR ([MINIMUM-VERSION], [ACTION-IF-FOUND], |
| 214 |
[ACTION-IF-NOT-FOUND]) |
| 215 |
Check whether Libgpg-error (at least version MINIMUM-VERSION, if |
| 216 |
given) exists on the host system. If it is found, execute |
| 217 |
ACTION-IF-FOUND, otherwise do ACTION-IF-NOT-FOUND, if given. |
| 218 |
|
| 219 |
Additionally, the function defines 'GPG_ERROR_CFLAGS' to the flags |
| 220 |
needed for compilation of the program to find the 'gpg-error.h' |
| 221 |
header file, and 'GPG_ERROR_LIBS' to the linker flags needed to |
| 222 |
link the program to the Libgpg-error library. |
| 223 |
|
| 224 |
This macro searches for 'gpgrt-config' along the PATH. |
| 225 |
|
| 226 |
You can use the defined Autoconf variables like this in your |
| 227 |
'Makefile.am': |
| 228 |
|
| 229 |
AM_CPPFLAGS = $(GPG_ERROR_CFLAGS) |
| 230 |
LDADD = $(GPG_ERROR_LIBS) |
| 231 |
|
| 232 |
|
| 233 |
File: gpgrt.info, Node: Initializing the library, Next: Multi-Threading, Prev: Building sources using Automake, Up: Preparation |
| 234 |
|
| 235 |
2.4 Initializing the library |
| 236 |
============================ |
| 237 |
|
| 238 |
Before the library can be used, it should initialize itself. This is |
| 239 |
achieved by invoking the function 'gpgrt_check_version' described below. |
| 240 |
|
| 241 |
Also, it is often desirable to check that the version of Libgpg-error |
| 242 |
used is indeed one which fits all requirements. Even with binary |
| 243 |
compatibility, new features may have been introduced, but due to problem |
| 244 |
with the dynamic linker an old version may actually be used. So you may |
| 245 |
want to check that the version is okay right after program startup. |
| 246 |
|
| 247 |
-- Function: const char * gpgrt_check_version (const char *REQ_VERSION) |
| 248 |
|
| 249 |
The function 'gpgrt_check_version' initializes some subsystems used |
| 250 |
by Libgpg-error and must be invoked before any other function in |
| 251 |
the library. *Note Multi-Threading::. |
| 252 |
|
| 253 |
Furthermore, this function returns the version number of the |
| 254 |
library. It can also verify that the version number is higher than |
| 255 |
a certain required version number REQ_VERSION, if this value is not |
| 256 |
a null pointer. |
| 257 |
|
| 258 |
|
| 259 |
File: gpgrt.info, Node: Multi-Threading, Prev: Initializing the library, Up: Preparation |
| 260 |
|
| 261 |
2.5 Multi-Threading |
| 262 |
=================== |
| 263 |
|
| 264 |
TBD. |
| 265 |
|
| 266 |
|
| 267 |
File: gpgrt.info, Node: Generalities, Next: Tools, Prev: Preparation, Up: Top |
| 268 |
|
| 269 |
3 Generalities |
| 270 |
************** |
| 271 |
|
| 272 |
TBD. (Description of the error function may be taken from Libgcrypt.) |
| 273 |
|
| 274 |
|
| 275 |
File: gpgrt.info, Node: Tools, Next: Library Copying, Prev: Generalities, Up: Top |
| 276 |
|
| 277 |
4 Tools |
| 278 |
******* |
| 279 |
|
| 280 |
* Menu: |
| 281 |
|
| 282 |
* gpg-error-config:: Print required compiler flags |
| 283 |
* gpgrt-config:: Helper tool for querying installed libraries |
| 284 |
|
| 285 |
|
| 286 |
File: gpgrt.info, Node: gpg-error-config, Next: gpgrt-config, Up: Tools |
| 287 |
|
| 288 |
4.1 Print required compiler flags |
| 289 |
================================= |
| 290 |
|
| 291 |
'gpg-error-config' is a tool that is used to configure to determine the |
| 292 |
compiler and linker flags that should be used to compile and link |
| 293 |
programs that use Libgpg-error. |
| 294 |
|
| 295 |
This tool is now obsolete. Instead, please use pkg-config with |
| 296 |
gpg-error.pc for your new program, or use gpg-error.m4 which uses |
| 297 |
gpgrt-config and gpg-error.pc internally. |
| 298 |
|
| 299 |
'gpg-error-config' accepts the following options: |
| 300 |
|
| 301 |
'--mt' |
| 302 |
Provide output appropriate for multithreaded programs. '--mt' is |
| 303 |
only useful when combined with other options, and must be the first |
| 304 |
option if present. |
| 305 |
|
| 306 |
'--version' |
| 307 |
Print the currently installed version of Libgpg-error on the |
| 308 |
standard output. |
| 309 |
|
| 310 |
'--libs' |
| 311 |
Print the linker flags that are necessary to link a program using |
| 312 |
Libgpg-error. |
| 313 |
|
| 314 |
'--cflags' |
| 315 |
Print the compiler flags that are necessary to compile a program |
| 316 |
using Libgpg-error. |
| 317 |
|
| 318 |
'--prefix=PREFIX' |
| 319 |
If specified, use PREFIX instead of the installation prefix that |
| 320 |
Libgpg-error was built with when computing the output for the |
| 321 |
'--cflags' and '--libs' options. This option is also used for the |
| 322 |
exec prefix if '--exec-prefix' was not specified. This option must |
| 323 |
be specified before any '--libs' or '--cflags' options. |
| 324 |
|
| 325 |
'--exec-prefix=PREFIX' |
| 326 |
If specified, use PREFIX instead of the installation exec prefix |
| 327 |
that Libgpg-error was built with when computing the output for the |
| 328 |
'--cflags' and '--libs' options. This option must be specified |
| 329 |
before any '--libs' or '--cflags' options. |
| 330 |
|
| 331 |
|
| 332 |
File: gpgrt.info, Node: gpgrt-config, Prev: gpg-error-config, Up: Tools |
| 333 |
|
| 334 |
4.2 gpgrt-config - Helper tool for querying installed libraries. |
| 335 |
================================================================ |
| 336 |
|
| 337 |
'gpgrt-config' is a script tool that is used by the autoconf macros |
| 338 |
shipped with gnupg software (e.g., AM_PATH_GPG_ERROR and AM_PATH_GPGME) |
| 339 |
to determine the compiler and linker flags that should be used to |
| 340 |
compile and link programs that use the specific library (e.g., |
| 341 |
libgpg-error or libgpgme). 'gpgrt-config' uses pkg-config .pc files as |
| 342 |
data source. |
| 343 |
|
| 344 |
Apart from options 'gpgrt-config' accepts a single argument 'module' |
| 345 |
specifying the basename (without the ".pc"-suffix) of the pkg-config |
| 346 |
file to be used as input. 'module' will default to 'gpg-error' if it is |
| 347 |
not specified. |
| 348 |
|
| 349 |
'gpgrt-config' accepts the following options: |
| 350 |
|
| 351 |
'--libdir=LIBDIR' |
| 352 |
Parent directory path of pkgconfig file search path. e.g., |
| 353 |
'gpgrt-config --libdir=/usr/lib --exists gpgme' will parse |
| 354 |
'/usr/lib/pkgconfig/gpgme.pc'. |
| 355 |
|
| 356 |
'--exists' |
| 357 |
Test whether the pkg-config file 'module.pc' exist and exits with |
| 358 |
success or error accordingly. |
| 359 |
|
| 360 |
'--modversion' |
| 361 |
Print the currently installed version of 'module' on the standard |
| 362 |
output. |
| 363 |
|
| 364 |
'--libs' |
| 365 |
Print the linker flags that are necessary to link a program using |
| 366 |
the 'module'. |
| 367 |
|
| 368 |
'--cflags' |
| 369 |
Print the compiler flags that are necessary to compile a program |
| 370 |
using the 'module'. |
| 371 |
|
| 372 |
'--static' |
| 373 |
Modifies output if linking statically instead of dynamically. |
| 374 |
|
| 375 |
'--variable=VARNAME' |
| 376 |
Output variable VARNAME from the module's pkg-config file. |
| 377 |
|
| 378 |
'gpgrt-config' is tried to be compatible to pkg-config, and to support |
| 379 |
cross build well, but it is not intended to be a replacement. |
| 380 |
|
| 381 |
|
| 382 |
File: gpgrt.info, Node: Library Copying, Next: Copying, Prev: Tools, Up: Top |
| 383 |
|
| 384 |
GNU Lesser General Public License |
| 385 |
********************************* |
| 386 |
|
| 387 |
Version 2.1, February 1999 |
| 388 |
|
| 389 |
Copyright (C) 1991, 1999 Free Software Foundation, Inc. |
| 390 |
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
| 391 |
|
| 392 |
Everyone is permitted to copy and distribute verbatim copies |
| 393 |
of this license document, but changing it is not allowed. |
| 394 |
|
| 395 |
[This is the first released version of the Lesser GPL. It also counts |
| 396 |
as the successor of the GNU Library Public License, version 2, hence the |
| 397 |
version number 2.1.] |
| 398 |
|
| 399 |
Preamble |
| 400 |
======== |
| 401 |
|
| 402 |
The licenses for most software are designed to take away your freedom to |
| 403 |
share and change it. By contrast, the GNU General Public Licenses are |
| 404 |
intended to guarantee your freedom to share and change free software--to |
| 405 |
make sure the software is free for all its users. |
| 406 |
|
| 407 |
This license, the Lesser General Public License, applies to some |
| 408 |
specially designated software--typically libraries--of the Free Software |
| 409 |
Foundation and other authors who decide to use it. You can use it too, |
| 410 |
but we suggest you first think carefully about whether this license or |
| 411 |
the ordinary General Public License is the better strategy to use in any |
| 412 |
particular case, based on the explanations below. |
| 413 |
|
| 414 |
When we speak of free software, we are referring to freedom of use, |
| 415 |
not price. Our General Public Licenses are designed to make sure that |
| 416 |
you have the freedom to distribute copies of free software (and charge |
| 417 |
for this service if you wish); that you receive source code or can get |
| 418 |
it if you want it; that you can change the software and use pieces of it |
| 419 |
in new free programs; and that you are informed that you can do these |
| 420 |
things. |
| 421 |
|
| 422 |
To protect your rights, we need to make restrictions that forbid |
| 423 |
distributors to deny you these rights or to ask you to surrender these |
| 424 |
rights. These restrictions translate to certain responsibilities for |
| 425 |
you if you distribute copies of the library or if you modify it. |
| 426 |
|
| 427 |
For example, if you distribute copies of the library, whether gratis |
| 428 |
or for a fee, you must give the recipients all the rights that we gave |
| 429 |
you. You must make sure that they, too, receive or can get the source |
| 430 |
code. If you link other code with the library, you must provide |
| 431 |
complete object files to the recipients, so that they can relink them |
| 432 |
with the library after making changes to the library and recompiling it. |
| 433 |
And you must show them these terms so they know their rights. |
| 434 |
|
| 435 |
We protect your rights with a two-step method: (1) we copyright the |
| 436 |
library, and (2) we offer you this license, which gives you legal |
| 437 |
permission to copy, distribute and/or modify the library. |
| 438 |
|
| 439 |
To protect each distributor, we want to make it very clear that there |
| 440 |
is no warranty for the free library. Also, if the library is modified |
| 441 |
by someone else and passed on, the recipients should know that what they |
| 442 |
have is not the original version, so that the original author's |
| 443 |
reputation will not be affected by problems that might be introduced by |
| 444 |
others. |
| 445 |
|
| 446 |
Finally, software patents pose a constant threat to the existence of |
| 447 |
any free program. We wish to make sure that a company cannot |
| 448 |
effectively restrict the users of a free program by obtaining a |
| 449 |
restrictive license from a patent holder. Therefore, we insist that any |
| 450 |
patent license obtained for a version of the library must be consistent |
| 451 |
with the full freedom of use specified in this license. |
| 452 |
|
| 453 |
Most GNU software, including some libraries, is covered by the |
| 454 |
ordinary GNU General Public License. This license, the GNU Lesser |
| 455 |
General Public License, applies to certain designated libraries, and is |
| 456 |
quite different from the ordinary General Public License. We use this |
| 457 |
license for certain libraries in order to permit linking those libraries |
| 458 |
into non-free programs. |
| 459 |
|
| 460 |
When a program is linked with a library, whether statically or using |
| 461 |
a shared library, the combination of the two is legally speaking a |
| 462 |
combined work, a derivative of the original library. The ordinary |
| 463 |
General Public License therefore permits such linking only if the entire |
| 464 |
combination fits its criteria of freedom. The Lesser General Public |
| 465 |
License permits more lax criteria for linking other code with the |
| 466 |
library. |
| 467 |
|
| 468 |
We call this license the "Lesser" General Public License because it |
| 469 |
does _Less_ to protect the user's freedom than the ordinary General |
| 470 |
Public License. It also provides other free software developers Less of |
| 471 |
an advantage over competing non-free programs. These disadvantages are |
| 472 |
the reason we use the ordinary General Public License for many |
| 473 |
libraries. However, the Lesser license provides advantages in certain |
| 474 |
special circumstances. |
| 475 |
|
| 476 |
For example, on rare occasions, there may be a special need to |
| 477 |
encourage the widest possible use of a certain library, so that it |
| 478 |
becomes a de-facto standard. To achieve this, non-free programs must be |
| 479 |
allowed to use the library. A more frequent case is that a free library |
| 480 |
does the same job as widely used non-free libraries. In this case, |
| 481 |
there is little to gain by limiting the free library to free software |
| 482 |
only, so we use the Lesser General Public License. |
| 483 |
|
| 484 |
In other cases, permission to use a particular library in non-free |
| 485 |
programs enables a greater number of people to use a large body of free |
| 486 |
software. For example, permission to use the GNU C Library in non-free |
| 487 |
programs enables many more people to use the whole GNU operating system, |
| 488 |
as well as its variant, the GNU/Linux operating system. |
| 489 |
|
| 490 |
Although the Lesser General Public License is Less protective of the |
| 491 |
users' freedom, it does ensure that the user of a program that is linked |
| 492 |
with the Library has the freedom and the wherewithal to run that program |
| 493 |
using a modified version of the Library. |
| 494 |
|
| 495 |
The precise terms and conditions for copying, distribution and |
| 496 |
modification follow. Pay close attention to the difference between a |
| 497 |
"work based on the library" and a "work that uses the library". The |
| 498 |
former contains code derived from the library, whereas the latter must |
| 499 |
be combined with the library in order to run. |
| 500 |
|
| 501 |
GNU LESSER GENERAL PUBLIC LICENSE |
| 502 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 503 |
|
| 504 |
0. This License Agreement applies to any software library or other |
| 505 |
program which contains a notice placed by the copyright holder or |
| 506 |
other authorized party saying it may be distributed under the terms |
| 507 |
of this Lesser General Public License (also called "this License"). |
| 508 |
Each licensee is addressed as "you". |
| 509 |
|
| 510 |
A "library" means a collection of software functions and/or data |
| 511 |
prepared so as to be conveniently linked with application programs |
| 512 |
(which use some of those functions and data) to form executables. |
| 513 |
|
| 514 |
The "Library", below, refers to any such software library or work |
| 515 |
which has been distributed under these terms. A "work based on the |
| 516 |
Library" means either the Library or any derivative work under |
| 517 |
copyright law: that is to say, a work containing the Library or a |
| 518 |
portion of it, either verbatim or with modifications and/or |
| 519 |
translated straightforwardly into another language. (Hereinafter, |
| 520 |
translation is included without limitation in the term |
| 521 |
"modification".) |
| 522 |
|
| 523 |
"Source code" for a work means the preferred form of the work for |
| 524 |
making modifications to it. For a library, complete source code |
| 525 |
means all the source code for all modules it contains, plus any |
| 526 |
associated interface definition files, plus the scripts used to |
| 527 |
control compilation and installation of the library. |
| 528 |
|
| 529 |
Activities other than copying, distribution and modification are |
| 530 |
not covered by this License; they are outside its scope. The act |
| 531 |
of running a program using the Library is not restricted, and |
| 532 |
output from such a program is covered only if its contents |
| 533 |
constitute a work based on the Library (independent of the use of |
| 534 |
the Library in a tool for writing it). Whether that is true |
| 535 |
depends on what the Library does and what the program that uses the |
| 536 |
Library does. |
| 537 |
|
| 538 |
1. You may copy and distribute verbatim copies of the Library's |
| 539 |
complete source code as you receive it, in any medium, provided |
| 540 |
that you conspicuously and appropriately publish on each copy an |
| 541 |
appropriate copyright notice and disclaimer of warranty; keep |
| 542 |
intact all the notices that refer to this License and to the |
| 543 |
absence of any warranty; and distribute a copy of this License |
| 544 |
along with the Library. |
| 545 |
|
| 546 |
You may charge a fee for the physical act of transferring a copy, |
| 547 |
and you may at your option offer warranty protection in exchange |
| 548 |
for a fee. |
| 549 |
|
| 550 |
2. You may modify your copy or copies of the Library or any portion of |
| 551 |
it, thus forming a work based on the Library, and copy and |
| 552 |
distribute such modifications or work under the terms of Section 1 |
| 553 |
above, provided that you also meet all of these conditions: |
| 554 |
|
| 555 |
a. The modified work must itself be a software library. |
| 556 |
|
| 557 |
b. You must cause the files modified to carry prominent notices |
| 558 |
stating that you changed the files and the date of any change. |
| 559 |
|
| 560 |
c. You must cause the whole of the work to be licensed at no |
| 561 |
charge to all third parties under the terms of this License. |
| 562 |
|
| 563 |
d. If a facility in the modified Library refers to a function or |
| 564 |
a table of data to be supplied by an application program that |
| 565 |
uses the facility, other than as an argument passed when the |
| 566 |
facility is invoked, then you must make a good faith effort to |
| 567 |
ensure that, in the event an application does not supply such |
| 568 |
function or table, the facility still operates, and performs |
| 569 |
whatever part of its purpose remains meaningful. |
| 570 |
|
| 571 |
(For example, a function in a library to compute square roots |
| 572 |
has a purpose that is entirely well-defined independent of the |
| 573 |
application. Therefore, Subsection 2d requires that any |
| 574 |
application-supplied function or table used by this function |
| 575 |
must be optional: if the application does not supply it, the |
| 576 |
square root function must still compute square roots.) |
| 577 |
|
| 578 |
These requirements apply to the modified work as a whole. If |
| 579 |
identifiable sections of that work are not derived from the |
| 580 |
Library, and can be reasonably considered independent and separate |
| 581 |
works in themselves, then this License, and its terms, do not apply |
| 582 |
to those sections when you distribute them as separate works. But |
| 583 |
when you distribute the same sections as part of a whole which is a |
| 584 |
work based on the Library, the distribution of the whole must be on |
| 585 |
the terms of this License, whose permissions for other licensees |
| 586 |
extend to the entire whole, and thus to each and every part |
| 587 |
regardless of who wrote it. |
| 588 |
|
| 589 |
Thus, it is not the intent of this section to claim rights or |
| 590 |
contest your rights to work written entirely by you; rather, the |
| 591 |
intent is to exercise the right to control the distribution of |
| 592 |
derivative or collective works based on the Library. |
| 593 |
|
| 594 |
In addition, mere aggregation of another work not based on the |
| 595 |
Library with the Library (or with a work based on the Library) on a |
| 596 |
volume of a storage or distribution medium does not bring the other |
| 597 |
work under the scope of this License. |
| 598 |
|
| 599 |
3. You may opt to apply the terms of the ordinary GNU General Public |
| 600 |
License instead of this License to a given copy of the Library. To |
| 601 |
do this, you must alter all the notices that refer to this License, |
| 602 |
so that they refer to the ordinary GNU General Public License, |
| 603 |
version 2, instead of to this License. (If a newer version than |
| 604 |
version 2 of the ordinary GNU General Public License has appeared, |
| 605 |
then you can specify that version instead if you wish.) Do not |
| 606 |
make any other change in these notices. |
| 607 |
|
| 608 |
Once this change is made in a given copy, it is irreversible for |
| 609 |
that copy, so the ordinary GNU General Public License applies to |
| 610 |
all subsequent copies and derivative works made from that copy. |
| 611 |
|
| 612 |
This option is useful when you wish to copy part of the code of the |
| 613 |
Library into a program that is not a library. |
| 614 |
|
| 615 |
4. You may copy and distribute the Library (or a portion or derivative |
| 616 |
of it, under Section 2) in object code or executable form under the |
| 617 |
terms of Sections 1 and 2 above provided that you accompany it with |
| 618 |
the complete corresponding machine-readable source code, which must |
| 619 |
be distributed under the terms of Sections 1 and 2 above on a |
| 620 |
medium customarily used for software interchange. |
| 621 |
|
| 622 |
If distribution of object code is made by offering access to copy |
| 623 |
from a designated place, then offering equivalent access to copy |
| 624 |
the source code from the same place satisfies the requirement to |
| 625 |
distribute the source code, even though third parties are not |
| 626 |
compelled to copy the source along with the object code. |
| 627 |
|
| 628 |
5. A program that contains no derivative of any portion of the |
| 629 |
Library, but is designed to work with the Library by being compiled |
| 630 |
or linked with it, is called a "work that uses the Library". Such |
| 631 |
a work, in isolation, is not a derivative work of the Library, and |
| 632 |
therefore falls outside the scope of this License. |
| 633 |
|
| 634 |
However, linking a "work that uses the Library" with the Library |
| 635 |
creates an executable that is a derivative of the Library (because |
| 636 |
it contains portions of the Library), rather than a "work that uses |
| 637 |
the library". The executable is therefore covered by this License. |
| 638 |
Section 6 states terms for distribution of such executables. |
| 639 |
|
| 640 |
When a "work that uses the Library" uses material from a header |
| 641 |
file that is part of the Library, the object code for the work may |
| 642 |
be a derivative work of the Library even though the source code is |
| 643 |
not. Whether this is true is especially significant if the work |
| 644 |
can be linked without the Library, or if the work is itself a |
| 645 |
library. The threshold for this to be true is not precisely |
| 646 |
defined by law. |
| 647 |
|
| 648 |
If such an object file uses only numerical parameters, data |
| 649 |
structure layouts and accessors, and small macros and small inline |
| 650 |
functions (ten lines or less in length), then the use of the object |
| 651 |
file is unrestricted, regardless of whether it is legally a |
| 652 |
derivative work. (Executables containing this object code plus |
| 653 |
portions of the Library will still fall under Section 6.) |
| 654 |
|
| 655 |
Otherwise, if the work is a derivative of the Library, you may |
| 656 |
distribute the object code for the work under the terms of Section |
| 657 |
6. Any executables containing that work also fall under Section 6, |
| 658 |
whether or not they are linked directly with the Library itself. |
| 659 |
|
| 660 |
6. As an exception to the Sections above, you may also combine or link |
| 661 |
a "work that uses the Library" with the Library to produce a work |
| 662 |
containing portions of the Library, and distribute that work under |
| 663 |
terms of your choice, provided that the terms permit modification |
| 664 |
of the work for the customer's own use and reverse engineering for |
| 665 |
debugging such modifications. |
| 666 |
|
| 667 |
You must give prominent notice with each copy of the work that the |
| 668 |
Library is used in it and that the Library and its use are covered |
| 669 |
by this License. You must supply a copy of this License. If the |
| 670 |
work during execution displays copyright notices, you must include |
| 671 |
the copyright notice for the Library among them, as well as a |
| 672 |
reference directing the user to the copy of this License. Also, |
| 673 |
you must do one of these things: |
| 674 |
|
| 675 |
a. Accompany the work with the complete corresponding |
| 676 |
machine-readable source code for the Library including |
| 677 |
whatever changes were used in the work (which must be |
| 678 |
distributed under Sections 1 and 2 above); and, if the work is |
| 679 |
an executable linked with the Library, with the complete |
| 680 |
machine-readable "work that uses the Library", as object code |
| 681 |
and/or source code, so that the user can modify the Library |
| 682 |
and then relink to produce a modified executable containing |
| 683 |
the modified Library. (It is understood that the user who |
| 684 |
changes the contents of definitions files in the Library will |
| 685 |
not necessarily be able to recompile the application to use |
| 686 |
the modified definitions.) |
| 687 |
|
| 688 |
b. Use a suitable shared library mechanism for linking with the |
| 689 |
Library. A suitable mechanism is one that (1) uses at run |
| 690 |
time a copy of the library already present on the user's |
| 691 |
computer system, rather than copying library functions into |
| 692 |
the executable, and (2) will operate properly with a modified |
| 693 |
version of the library, if the user installs one, as long as |
| 694 |
the modified version is interface-compatible with the version |
| 695 |
that the work was made with. |
| 696 |
|
| 697 |
c. Accompany the work with a written offer, valid for at least |
| 698 |
three years, to give the same user the materials specified in |
| 699 |
Subsection 6a, above, for a charge no more than the cost of |
| 700 |
performing this distribution. |
| 701 |
|
| 702 |
d. If distribution of the work is made by offering access to copy |
| 703 |
from a designated place, offer equivalent access to copy the |
| 704 |
above specified materials from the same place. |
| 705 |
|
| 706 |
e. Verify that the user has already received a copy of these |
| 707 |
materials or that you have already sent this user a copy. |
| 708 |
|
| 709 |
For an executable, the required form of the "work that uses the |
| 710 |
Library" must include any data and utility programs needed for |
| 711 |
reproducing the executable from it. However, as a special |
| 712 |
exception, the materials to be distributed need not include |
| 713 |
anything that is normally distributed (in either source or binary |
| 714 |
form) with the major components (compiler, kernel, and so on) of |
| 715 |
the operating system on which the executable runs, unless that |
| 716 |
component itself accompanies the executable. |
| 717 |
|
| 718 |
It may happen that this requirement contradicts the license |
| 719 |
restrictions of other proprietary libraries that do not normally |
| 720 |
accompany the operating system. Such a contradiction means you |
| 721 |
cannot use both them and the Library together in an executable that |
| 722 |
you distribute. |
| 723 |
|
| 724 |
7. You may place library facilities that are a work based on the |
| 725 |
Library side-by-side in a single library together with other |
| 726 |
library facilities not covered by this License, and distribute such |
| 727 |
a combined library, provided that the separate distribution of the |
| 728 |
work based on the Library and of the other library facilities is |
| 729 |
otherwise permitted, and provided that you do these two things: |
| 730 |
|
| 731 |
a. Accompany the combined library with a copy of the same work |
| 732 |
based on the Library, uncombined with any other library |
| 733 |
facilities. This must be distributed under the terms of the |
| 734 |
Sections above. |
| 735 |
|
| 736 |
b. Give prominent notice with the combined library of the fact |
| 737 |
that part of it is a work based on the Library, and explaining |
| 738 |
where to find the accompanying uncombined form of the same |
| 739 |
work. |
| 740 |
|
| 741 |
8. You may not copy, modify, sublicense, link with, or distribute the |
| 742 |
Library except as expressly provided under this License. Any |
| 743 |
attempt otherwise to copy, modify, sublicense, link with, or |
| 744 |
distribute the Library is void, and will automatically terminate |
| 745 |
your rights under this License. However, parties who have received |
| 746 |
copies, or rights, from you under this License will not have their |
| 747 |
licenses terminated so long as such parties remain in full |
| 748 |
compliance. |
| 749 |
|
| 750 |
9. You are not required to accept this License, since you have not |
| 751 |
signed it. However, nothing else grants you permission to modify |
| 752 |
or distribute the Library or its derivative works. These actions |
| 753 |
are prohibited by law if you do not accept this License. |
| 754 |
Therefore, by modifying or distributing the Library (or any work |
| 755 |
based on the Library), you indicate your acceptance of this License |
| 756 |
to do so, and all its terms and conditions for copying, |
| 757 |
distributing or modifying the Library or works based on it. |
| 758 |
|
| 759 |
10. Each time you redistribute the Library (or any work based on the |
| 760 |
Library), the recipient automatically receives a license from the |
| 761 |
original licensor to copy, distribute, link with or modify the |
| 762 |
Library subject to these terms and conditions. You may not impose |
| 763 |
any further restrictions on the recipients' exercise of the rights |
| 764 |
granted herein. You are not responsible for enforcing compliance |
| 765 |
by third parties with this License. |
| 766 |
|
| 767 |
11. If, as a consequence of a court judgment or allegation of patent |
| 768 |
infringement or for any other reason (not limited to patent |
| 769 |
issues), conditions are imposed on you (whether by court order, |
| 770 |
agreement or otherwise) that contradict the conditions of this |
| 771 |
License, they do not excuse you from the conditions of this |
| 772 |
License. If you cannot distribute so as to satisfy simultaneously |
| 773 |
your obligations under this License and any other pertinent |
| 774 |
obligations, then as a consequence you may not distribute the |
| 775 |
Library at all. For example, if a patent license would not permit |
| 776 |
royalty-free redistribution of the Library by all those who receive |
| 777 |
copies directly or indirectly through you, then the only way you |
| 778 |
could satisfy both it and this License would be to refrain entirely |
| 779 |
from distribution of the Library. |
| 780 |
|
| 781 |
If any portion of this section is held invalid or unenforceable |
| 782 |
under any particular circumstance, the balance of the section is |
| 783 |
intended to apply, and the section as a whole is intended to apply |
| 784 |
in other circumstances. |
| 785 |
|
| 786 |
It is not the purpose of this section to induce you to infringe any |
| 787 |
patents or other property right claims or to contest validity of |
| 788 |
any such claims; this section has the sole purpose of protecting |
| 789 |
the integrity of the free software distribution system which is |
| 790 |
implemented by public license practices. Many people have made |
| 791 |
generous contributions to the wide range of software distributed |
| 792 |
through that system in reliance on consistent application of that |
| 793 |
system; it is up to the author/donor to decide if he or she is |
| 794 |
willing to distribute software through any other system and a |
| 795 |
licensee cannot impose that choice. |
| 796 |
|
| 797 |
This section is intended to make thoroughly clear what is believed |
| 798 |
to be a consequence of the rest of this License. |
| 799 |
|
| 800 |
12. If the distribution and/or use of the Library is restricted in |
| 801 |
certain countries either by patents or by copyrighted interfaces, |
| 802 |
the original copyright holder who places the Library under this |
| 803 |
License may add an explicit geographical distribution limitation |
| 804 |
excluding those countries, so that distribution is permitted only |
| 805 |
in or among countries not thus excluded. In such case, this |
| 806 |
License incorporates the limitation as if written in the body of |
| 807 |
this License. |
| 808 |
|
| 809 |
13. The Free Software Foundation may publish revised and/or new |
| 810 |
versions of the Lesser General Public License from time to time. |
| 811 |
Such new versions will be similar in spirit to the present version, |
| 812 |
but may differ in detail to address new problems or concerns. |
| 813 |
|
| 814 |
Each version is given a distinguishing version number. If the |
| 815 |
Library specifies a version number of this License which applies to |
| 816 |
it and "any later version", you have the option of following the |
| 817 |
terms and conditions either of that version or of any later version |
| 818 |
published by the Free Software Foundation. If the Library does not |
| 819 |
specify a license version number, you may choose any version ever |
| 820 |
published by the Free Software Foundation. |
| 821 |
|
| 822 |
14. If you wish to incorporate parts of the Library into other free |
| 823 |
programs whose distribution conditions are incompatible with these, |
| 824 |
write to the author to ask for permission. For software which is |
| 825 |
copyrighted by the Free Software Foundation, write to the Free |
| 826 |
Software Foundation; we sometimes make exceptions for this. Our |
| 827 |
decision will be guided by the two goals of preserving the free |
| 828 |
status of all derivatives of our free software and of promoting the |
| 829 |
sharing and reuse of software generally. |
| 830 |
|
| 831 |
NO WARRANTY |
| 832 |
|
| 833 |
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO |
| 834 |
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE |
| 835 |
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS |
| 836 |
AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY |
| 837 |
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT |
| 838 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 839 |
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND |
| 840 |
PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE |
| 841 |
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR |
| 842 |
OR CORRECTION. |
| 843 |
|
| 844 |
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
| 845 |
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY |
| 846 |
MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE |
| 847 |
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, |
| 848 |
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR |
| 849 |
INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF |
| 850 |
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU |
| 851 |
OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY |
| 852 |
OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN |
| 853 |
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| 854 |
|
| 855 |
END OF TERMS AND CONDITIONS |
| 856 |
|
| 857 |
How to Apply These Terms to Your New Libraries |
| 858 |
============================================== |
| 859 |
|
| 860 |
If you develop a new library, and you want it to be of the greatest |
| 861 |
possible use to the public, we recommend making it free software that |
| 862 |
everyone can redistribute and change. You can do so by permitting |
| 863 |
redistribution under these terms (or, alternatively, under the terms of |
| 864 |
the ordinary General Public License). |
| 865 |
|
| 866 |
To apply these terms, attach the following notices to the library. |
| 867 |
It is safest to attach them to the start of each source file to most |
| 868 |
effectively convey the exclusion of warranty; and each file should have |
| 869 |
at least the "copyright" line and a pointer to where the full notice is |
| 870 |
found. |
| 871 |
|
| 872 |
ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES. |
| 873 |
Copyright (C) YEAR NAME OF AUTHOR |
| 874 |
|
| 875 |
This library is free software; you can redistribute it and/or modify it |
| 876 |
under the terms of the GNU Lesser General Public License as published by |
| 877 |
the Free Software Foundation; either version 2.1 of the License, or (at |
| 878 |
your option) any later version. |
| 879 |
|
| 880 |
This library is distributed in the hope that it will be useful, but |
| 881 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 882 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 883 |
Lesser General Public License for more details. |
| 884 |
|
| 885 |
You should have received a copy of the GNU Lesser General Public |
| 886 |
License along with this library; if not, write to the Free Software |
| 887 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, |
| 888 |
USA. |
| 889 |
|
| 890 |
Also add information on how to contact you by electronic and paper |
| 891 |
mail. |
| 892 |
|
| 893 |
You should also get your employer (if you work as a programmer) or |
| 894 |
your school, if any, to sign a "copyright disclaimer" for the library, |
| 895 |
if necessary. Here is a sample; alter the names: |
| 896 |
|
| 897 |
Yoyodyne, Inc., hereby disclaims all copyright interest in the library |
| 898 |
`Frob' (a library for tweaking knobs) written by James Random Hacker. |
| 899 |
|
| 900 |
SIGNATURE OF TY COON, 1 April 1990 |
| 901 |
Ty Coon, President of Vice |
| 902 |
|
| 903 |
That's all there is to it! |
| 904 |
|
| 905 |
|
| 906 |
File: gpgrt.info, Node: Copying, Next: Concept Index, Prev: Library Copying, Up: Top |
| 907 |
|
| 908 |
GNU General Public License |
| 909 |
************************** |
| 910 |
|
| 911 |
Version 2, June 1991 |
| 912 |
|
| 913 |
Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
| 914 |
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
| 915 |
|
| 916 |
Everyone is permitted to copy and distribute verbatim copies |
| 917 |
of this license document, but changing it is not allowed. |
| 918 |
|
| 919 |
Preamble |
| 920 |
======== |
| 921 |
|
| 922 |
The licenses for most software are designed to take away your freedom to |
| 923 |
share and change it. By contrast, the GNU General Public License is |
| 924 |
intended to guarantee your freedom to share and change free software--to |
| 925 |
make sure the software is free for all its users. This General Public |
| 926 |
License applies to most of the Free Software Foundation's software and |
| 927 |
to any other program whose authors commit to using it. (Some other Free |
| 928 |
Software Foundation software is covered by the GNU Library General |
| 929 |
Public License instead.) You can apply it to your programs, too. |
| 930 |
|
| 931 |
When we speak of free software, we are referring to freedom, not |
| 932 |
price. Our General Public Licenses are designed to make sure that you |
| 933 |
have the freedom to distribute copies of free software (and charge for |
| 934 |
this service if you wish), that you receive source code or can get it if |
| 935 |
you want it, that you can change the software or use pieces of it in new |
| 936 |
free programs; and that you know you can do these things. |
| 937 |
|
| 938 |
To protect your rights, we need to make restrictions that forbid |
| 939 |
anyone to deny you these rights or to ask you to surrender the rights. |
| 940 |
These restrictions translate to certain responsibilities for you if you |
| 941 |
distribute copies of the software, or if you modify it. |
| 942 |
|
| 943 |
For example, if you distribute copies of such a program, whether |
| 944 |
gratis or for a fee, you must give the recipients all the rights that |
| 945 |
you have. You must make sure that they, too, receive or can get the |
| 946 |
source code. And you must show them these terms so they know their |
| 947 |
rights. |
| 948 |
|
| 949 |
We protect your rights with two steps: (1) copyright the software, |
| 950 |
and (2) offer you this license which gives you legal permission to copy, |
| 951 |
distribute and/or modify the software. |
| 952 |
|
| 953 |
Also, for each author's protection and ours, we want to make certain |
| 954 |
that everyone understands that there is no warranty for this free |
| 955 |
software. If the software is modified by someone else and passed on, we |
| 956 |
want its recipients to know that what they have is not the original, so |
| 957 |
that any problems introduced by others will not reflect on the original |
| 958 |
authors' reputations. |
| 959 |
|
| 960 |
Finally, any free program is threatened constantly by software |
| 961 |
patents. We wish to avoid the danger that redistributors of a free |
| 962 |
program will individually obtain patent licenses, in effect making the |
| 963 |
program proprietary. To prevent this, we have made it clear that any |
| 964 |
patent must be licensed for everyone's free use or not licensed at all. |
| 965 |
|
| 966 |
The precise terms and conditions for copying, distribution and |
| 967 |
modification follow. |
| 968 |
|
| 969 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 970 |
|
| 971 |
1. This License applies to any program or other work which contains a |
| 972 |
notice placed by the copyright holder saying it may be distributed |
| 973 |
under the terms of this General Public License. The "Program", |
| 974 |
below, refers to any such program or work, and a "work based on the |
| 975 |
Program" means either the Program or any derivative work under |
| 976 |
copyright law: that is to say, a work containing the Program or a |
| 977 |
portion of it, either verbatim or with modifications and/or |
| 978 |
translated into another language. (Hereinafter, translation is |
| 979 |
included without limitation in the term "modification".) Each |
| 980 |
licensee is addressed as "you". |
| 981 |
|
| 982 |
Activities other than copying, distribution and modification are |
| 983 |
not covered by this License; they are outside its scope. The act |
| 984 |
of running the Program is not restricted, and the output from the |
| 985 |
Program is covered only if its contents constitute a work based on |
| 986 |
the Program (independent of having been made by running the |
| 987 |
Program). Whether that is true depends on what the Program does. |
| 988 |
|
| 989 |
2. You may copy and distribute verbatim copies of the Program's source |
| 990 |
code as you receive it, in any medium, provided that you |
| 991 |
conspicuously and appropriately publish on each copy an appropriate |
| 992 |
copyright notice and disclaimer of warranty; keep intact all the |
| 993 |
notices that refer to this License and to the absence of any |
| 994 |
warranty; and give any other recipients of the Program a copy of |
| 995 |
this License along with the Program. |
| 996 |
|
| 997 |
You may charge a fee for the physical act of transferring a copy, |
| 998 |
and you may at your option offer warranty protection in exchange |
| 999 |
for a fee. |
| 1000 |
|
| 1001 |
3. You may modify your copy or copies of the Program or any portion of |
| 1002 |
it, thus forming a work based on the Program, and copy and |
| 1003 |
distribute such modifications or work under the terms of Section 1 |
| 1004 |
above, provided that you also meet all of these conditions: |
| 1005 |
|
| 1006 |
a. You must cause the modified files to carry prominent notices |
| 1007 |
stating that you changed the files and the date of any change. |
| 1008 |
|
| 1009 |
b. You must cause any work that you distribute or publish, that |
| 1010 |
in whole or in part contains or is derived from the Program or |
| 1011 |
any part thereof, to be licensed as a whole at no charge to |
| 1012 |
all third parties under the terms of this License. |
| 1013 |
|
| 1014 |
c. If the modified program normally reads commands interactively |
| 1015 |
when run, you must cause it, when started running for such |
| 1016 |
interactive use in the most ordinary way, to print or display |
| 1017 |
an announcement including an appropriate copyright notice and |
| 1018 |
a notice that there is no warranty (or else, saying that you |
| 1019 |
provide a warranty) and that users may redistribute the |
| 1020 |
program under these conditions, and telling the user how to |
| 1021 |
view a copy of this License. (Exception: if the Program |
| 1022 |
itself is interactive but does not normally print such an |
| 1023 |
announcement, your work based on the Program is not required |
| 1024 |
to print an announcement.) |
| 1025 |
|
| 1026 |
These requirements apply to the modified work as a whole. If |
| 1027 |
identifiable sections of that work are not derived from the |
| 1028 |
Program, and can be reasonably considered independent and separate |
| 1029 |
works in themselves, then this License, and its terms, do not apply |
| 1030 |
to those sections when you distribute them as separate works. But |
| 1031 |
when you distribute the same sections as part of a whole which is a |
| 1032 |
work based on the Program, the distribution of the whole must be on |
| 1033 |
the terms of this License, whose permissions for other licensees |
| 1034 |
extend to the entire whole, and thus to each and every part |
| 1035 |
regardless of who wrote it. |
| 1036 |
|
| 1037 |
Thus, it is not the intent of this section to claim rights or |
| 1038 |
contest your rights to work written entirely by you; rather, the |
| 1039 |
intent is to exercise the right to control the distribution of |
| 1040 |
derivative or collective works based on the Program. |
| 1041 |
|
| 1042 |
In addition, mere aggregation of another work not based on the |
| 1043 |
Program with the Program (or with a work based on the Program) on a |
| 1044 |
volume of a storage or distribution medium does not bring the other |
| 1045 |
work under the scope of this License. |
| 1046 |
|
| 1047 |
4. You may copy and distribute the Program (or a work based on it, |
| 1048 |
under Section 2) in object code or executable form under the terms |
| 1049 |
of Sections 1 and 2 above provided that you also do one of the |
| 1050 |
following: |
| 1051 |
|
| 1052 |
a. Accompany it with the complete corresponding machine-readable |
| 1053 |
source code, which must be distributed under the terms of |
| 1054 |
Sections 1 and 2 above on a medium customarily used for |
| 1055 |
software interchange; or, |
| 1056 |
|
| 1057 |
b. Accompany it with a written offer, valid for at least three |
| 1058 |
years, to give any third party, for a charge no more than your |
| 1059 |
cost of physically performing source distribution, a complete |
| 1060 |
machine-readable copy of the corresponding source code, to be |
| 1061 |
distributed under the terms of Sections 1 and 2 above on a |
| 1062 |
medium customarily used for software interchange; or, |
| 1063 |
|
| 1064 |
c. Accompany it with the information you received as to the offer |
| 1065 |
to distribute corresponding source code. (This alternative is |
| 1066 |
allowed only for noncommercial distribution and only if you |
| 1067 |
received the program in object code or executable form with |
| 1068 |
such an offer, in accord with Subsection b above.) |
| 1069 |
|
| 1070 |
The source code for a work means the preferred form of the work for |
| 1071 |
making modifications to it. For an executable work, complete |
| 1072 |
source code means all the source code for all modules it contains, |
| 1073 |
plus any associated interface definition files, plus the scripts |
| 1074 |
used to control compilation and installation of the executable. |
| 1075 |
However, as a special exception, the source code distributed need |
| 1076 |
not include anything that is normally distributed (in either source |
| 1077 |
or binary form) with the major components (compiler, kernel, and so |
| 1078 |
on) of the operating system on which the executable runs, unless |
| 1079 |
that component itself accompanies the executable. |
| 1080 |
|
| 1081 |
If distribution of executable or object code is made by offering |
| 1082 |
access to copy from a designated place, then offering equivalent |
| 1083 |
access to copy the source code from the same place counts as |
| 1084 |
distribution of the source code, even though third parties are not |
| 1085 |
compelled to copy the source along with the object code. |
| 1086 |
|
| 1087 |
5. You may not copy, modify, sublicense, or distribute the Program |
| 1088 |
except as expressly provided under this License. Any attempt |
| 1089 |
otherwise to copy, modify, sublicense or distribute the Program is |
| 1090 |
void, and will automatically terminate your rights under this |
| 1091 |
License. However, parties who have received copies, or rights, |
| 1092 |
from you under this License will not have their licenses terminated |
| 1093 |
so long as such parties remain in full compliance. |
| 1094 |
|
| 1095 |
6. You are not required to accept this License, since you have not |
| 1096 |
signed it. However, nothing else grants you permission to modify |
| 1097 |
or distribute the Program or its derivative works. These actions |
| 1098 |
are prohibited by law if you do not accept this License. |
| 1099 |
Therefore, by modifying or distributing the Program (or any work |
| 1100 |
based on the Program), you indicate your acceptance of this License |
| 1101 |
to do so, and all its terms and conditions for copying, |
| 1102 |
distributing or modifying the Program or works based on it. |
| 1103 |
|
| 1104 |
7. Each time you redistribute the Program (or any work based on the |
| 1105 |
Program), the recipient automatically receives a license from the |
| 1106 |
original licensor to copy, distribute or modify the Program subject |
| 1107 |
to these terms and conditions. You may not impose any further |
| 1108 |
restrictions on the recipients' exercise of the rights granted |
| 1109 |
herein. You are not responsible for enforcing compliance by third |
| 1110 |
parties to this License. |
| 1111 |
|
| 1112 |
8. If, as a consequence of a court judgment or allegation of patent |
| 1113 |
infringement or for any other reason (not limited to patent |
| 1114 |
issues), conditions are imposed on you (whether by court order, |
| 1115 |
agreement or otherwise) that contradict the conditions of this |
| 1116 |
License, they do not excuse you from the conditions of this |
| 1117 |
License. If you cannot distribute so as to satisfy simultaneously |
| 1118 |
your obligations under this License and any other pertinent |
| 1119 |
obligations, then as a consequence you may not distribute the |
| 1120 |
Program at all. For example, if a patent license would not permit |
| 1121 |
royalty-free redistribution of the Program by all those who receive |
| 1122 |
copies directly or indirectly through you, then the only way you |
| 1123 |
could satisfy both it and this License would be to refrain entirely |
| 1124 |
from distribution of the Program. |
| 1125 |
|
| 1126 |
If any portion of this section is held invalid or unenforceable |
| 1127 |
under any particular circumstance, the balance of the section is |
| 1128 |
intended to apply and the section as a whole is intended to apply |
| 1129 |
in other circumstances. |
| 1130 |
|
| 1131 |
It is not the purpose of this section to induce you to infringe any |
| 1132 |
patents or other property right claims or to contest validity of |
| 1133 |
any such claims; this section has the sole purpose of protecting |
| 1134 |
the integrity of the free software distribution system, which is |
| 1135 |
implemented by public license practices. Many people have made |
| 1136 |
generous contributions to the wide range of software distributed |
| 1137 |
through that system in reliance on consistent application of that |
| 1138 |
system; it is up to the author/donor to decide if he or she is |
| 1139 |
willing to distribute software through any other system and a |
| 1140 |
licensee cannot impose that choice. |
| 1141 |
|
| 1142 |
This section is intended to make thoroughly clear what is believed |
| 1143 |
to be a consequence of the rest of this License. |
| 1144 |
|
| 1145 |
9. If the distribution and/or use of the Program is restricted in |
| 1146 |
certain countries either by patents or by copyrighted interfaces, |
| 1147 |
the original copyright holder who places the Program under this |
| 1148 |
License may add an explicit geographical distribution limitation |
| 1149 |
excluding those countries, so that distribution is permitted only |
| 1150 |
in or among countries not thus excluded. In such case, this |
| 1151 |
License incorporates the limitation as if written in the body of |
| 1152 |
this License. |
| 1153 |
|
| 1154 |
10. The Free Software Foundation may publish revised and/or new |
| 1155 |
versions of the General Public License from time to time. Such new |
| 1156 |
versions will be similar in spirit to the present version, but may |
| 1157 |
differ in detail to address new problems or concerns. |
| 1158 |
|
| 1159 |
Each version is given a distinguishing version number. If the |
| 1160 |
Program specifies a version number of this License which applies to |
| 1161 |
it and "any later version", you have the option of following the |
| 1162 |
terms and conditions either of that version or of any later version |
| 1163 |
published by the Free Software Foundation. If the Program does not |
| 1164 |
specify a version number of this License, you may choose any |
| 1165 |
version ever published by the Free Software Foundation. |
| 1166 |
|
| 1167 |
11. If you wish to incorporate parts of the Program into other free |
| 1168 |
programs whose distribution conditions are different, write to the |
| 1169 |
author to ask for permission. For software which is copyrighted by |
| 1170 |
the Free Software Foundation, write to the Free Software |
| 1171 |
Foundation; we sometimes make exceptions for this. Our decision |
| 1172 |
will be guided by the two goals of preserving the free status of |
| 1173 |
all derivatives of our free software and of promoting the sharing |
| 1174 |
and reuse of software generally. |
| 1175 |
|
| 1176 |
NO WARRANTY |
| 1177 |
|
| 1178 |
12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO |
| 1179 |
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE |
| 1180 |
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS |
| 1181 |
AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
| 1182 |
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT |
| 1183 |
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 1184 |
FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND |
| 1185 |
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE |
| 1186 |
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR |
| 1187 |
OR CORRECTION. |
| 1188 |
|
| 1189 |
13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN |
| 1190 |
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY |
| 1191 |
MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE |
| 1192 |
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, |
| 1193 |
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR |
| 1194 |
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
| 1195 |
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU |
| 1196 |
OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY |
| 1197 |
OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN |
| 1198 |
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
| 1199 |
|
| 1200 |
END OF TERMS AND CONDITIONS |
| 1201 |
|
| 1202 |
How to Apply These Terms to Your New Programs |
| 1203 |
============================================= |
| 1204 |
|
| 1205 |
If you develop a new program, and you want it to be of the greatest |
| 1206 |
possible use to the public, the best way to achieve this is to make it |
| 1207 |
free software which everyone can redistribute and change under these |
| 1208 |
terms. |
| 1209 |
|
| 1210 |
To do so, attach the following notices to the program. It is safest |
| 1211 |
to attach them to the start of each source file to most effectively |
| 1212 |
convey the exclusion of warranty; and each file should have at least the |
| 1213 |
"copyright" line and a pointer to where the full notice is found. |
| 1214 |
|
| 1215 |
ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES. |
| 1216 |
Copyright (C) 19YY NAME OF AUTHOR |
| 1217 |
|
| 1218 |
This program is free software; you can redistribute it and/or |
| 1219 |
modify it under the terms of the GNU General Public License |
| 1220 |
as published by the Free Software Foundation; either version 2 |
| 1221 |
of the License, or (at your option) any later version. |
| 1222 |
|
| 1223 |
This program is distributed in the hope that it will be useful, |
| 1224 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 1225 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 1226 |
GNU General Public License for more details. |
| 1227 |
|
| 1228 |
You should have received a copy of the GNU General Public License along |
| 1229 |
with this program; if not, write to the Free Software Foundation, Inc., |
| 1230 |
59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 1231 |
|
| 1232 |
Also add information on how to contact you by electronic and paper |
| 1233 |
mail. |
| 1234 |
|
| 1235 |
If the program is interactive, make it output a short notice like |
| 1236 |
this when it starts in an interactive mode: |
| 1237 |
|
| 1238 |
Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR |
| 1239 |
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details |
| 1240 |
type `show w'. This is free software, and you are welcome |
| 1241 |
to redistribute it under certain conditions; type `show c' |
| 1242 |
for details. |
| 1243 |
|
| 1244 |
The hypothetical commands 'show w' and 'show c' should show the |
| 1245 |
appropriate parts of the General Public License. Of course, the |
| 1246 |
commands you use may be called something other than 'show w' and 'show |
| 1247 |
c'; they could even be mouse-clicks or menu items--whatever suits your |
| 1248 |
program. |
| 1249 |
|
| 1250 |
You should also get your employer (if you work as a programmer) or |
| 1251 |
your school, if any, to sign a "copyright disclaimer" for the program, |
| 1252 |
if necessary. Here is a sample; alter the names: |
| 1253 |
|
| 1254 |
Yoyodyne, Inc., hereby disclaims all copyright |
| 1255 |
interest in the program `Gnomovision' |
| 1256 |
(which makes passes at compilers) written |
| 1257 |
by James Hacker. |
| 1258 |
|
| 1259 |
SIGNATURE OF TY COON, 1 April 1989 |
| 1260 |
Ty Coon, President of Vice |
| 1261 |
|
| 1262 |
This General Public License does not permit incorporating your |
| 1263 |
program into proprietary programs. If your program is a subroutine |
| 1264 |
library, you may consider it more useful to permit linking proprietary |
| 1265 |
applications with the library. If this is what you want to do, use the |
| 1266 |
GNU Library General Public License instead of this License. |
| 1267 |
|
| 1268 |
|
| 1269 |
File: gpgrt.info, Node: Concept Index, Next: Function and Data Index, Prev: Copying, Up: Top |
| 1270 |
|
| 1271 |
Concept Index |
| 1272 |
************* |
| 1273 |
|
| 1274 |
|