home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-bin0.lha / info / kpathsea.info-2 (.txt) < prev    next >
GNU Info File  |  1996-10-12  |  46KB  |  775 lines

  1. This is Info file kpathsea.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/contrib/unixtex/kpathsea/kpathsea.texi.
  3. START-INFO-DIR-ENTRY
  4. * Kpathsea: (kpathsea).        File lookup along search paths.
  5. END-INFO-DIR-ENTRY
  6.   This file documents the Kpathsea library for path searching.
  7.   Copyright (C) 1993, 94, 95 Karl Berry.
  8.   Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.   Permission is granted to copy and distribute modified versions of this
  12. manual under the conditions for verbatim copying, provided also that the
  13. sections entitled "Freedom" and "GNU General Public License" are
  14. included exactly as in the original, and provided that the entire
  15. resulting derived work is distributed under the terms of a permission
  16. notice identical to this one.
  17.   Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that the sections entitled "Freedom" and "GNU General
  20. Public License" may be included in a translation approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: kpathsea.info,  Node: Basic glyph lookup,  Next: Fontmap,  Up: Glyph lookup
  23. Basic glyph lookup
  24. ------------------
  25.   When Kpathsea looks for a bitmap font NAME at resolution DPI in a
  26. format FORMAT, it first checks each directory in the search path for a
  27. file `NAME.DPIFORMAT'; for example, `cmr10.300pk'.  Kpathsea looks for
  28. a PK file first, then a GF file.
  29.   If that fails, Kpathsea looks for `dpiDPI/NAME.FORMAT'; for example,
  30. `dpi300/cmr10.pk'. This is how fonts are typically stored on
  31. filesystems (like DOS's) that permit only three-character extensions.
  32.   If that fails, Kpathsea looks for a font with a close-enough DPI.
  33. "Close enough" is defined (by the macro `KPSE_BITMAP_TOLERANCE' in
  34. `kpathsea/tex-glyph.h') to be `DPI / 500 + 1', which is slightly more
  35. than the 0.2% allowed by the DVI standard.
  36. File: kpathsea.info,  Node: Fontmap,  Next: MakeTeX... scripts,  Prev: Basic glyph lookup,  Up: Glyph lookup
  37. Fontmap
  38. -------
  39.   If a bitmap font is not found with the original name (see the previous
  40. section), Kpathsea looks through any "fontmap" files for an "alias" for
  41. the original font name.  These files are named `texfonts.map' and are
  42. searched for along the usual glyph path.
  43.   This feature is intended to help in two respects:
  44.   1. An alias name is limited in length only by available memory, not
  45.      by your filesystem.  Therefore, if you want to ask for
  46.      `Adobe-Lucida-Bold-Sans=Typewriter' instead of `plcbst', you can.
  47.   2. A few fonts have historically had multiple names: specifically,
  48.      LaTeX's "circle font" has variously been known as `circle10',
  49.      `lcircle10', and `lcirc10'.  Aliases can make all the names
  50.      equivalent, so that it no longer matters what the name of the
  51.      installed file is; TeX documents will find their favorite name.
  52.   The format of fontmap files is straightforward: the first word on each
  53. line is the true filename; the second word is the alias; subsequent
  54. words are ignored.  A "word" is a sequence of non-whitespace
  55. characters.  Blank lines are ignored; comments start with `%' and
  56. continue to end-of-line.
  57.   If an alias has an extension, it matches only those files with that
  58. extension; otherwise, it matches anything with the same root,
  59. regardless of extension.  For example, an alias `foo.tfm' matches only
  60. when exactly `foo.tfm' is being searched for; but an alias `foo'
  61. matches `foo.vf', `foo.300pk', etc.
  62.   As an example, here are the fontmap entries that make the circle fonts
  63. equivalent. These are in the distributed `texfonts.map' in the Web2C
  64. distribution.
  65.      circle10    lcircle10
  66.      circle10    lcirc10
  67.      lcircle10    circle10
  68.      lcircle10    lcirc10
  69.      lcirc10        circle10
  70.      lcirc10        lcircle10
  71. File: kpathsea.info,  Node: MakeTeX... scripts,  Next: Fallback font,  Prev: Fontmap,  Up: Glyph lookup
  72. `MakeTeX'... scripts
  73. --------------------
  74.   If Kpathsea cannot find a bitmap font, by either its original name or
  75. a fontmap alias, it can be configured to invoke an external program to
  76. create it.  The same mechanism can be used for other nonexistent files.
  77.   The script is passed the name of the file to create and possibly other
  78. arguments, as explained below.  It must echo the full pathname of the
  79. file it created (and nothing else) to standard output; it can write
  80. diagnostics to standard error.
  81. * Menu:
  82. * MakeTeX... script names::
  83. * MakeTeX... script arguments::
  84. File: kpathsea.info,  Node: MakeTeX... script names,  Next: MakeTeX... script arguments,  Up: MakeTeX... scripts
  85. `MakeTeX'... script names
  86. .........................
  87.   The following table shows the default name of the script for each
  88. possible file types.  (The source is the variable `kpse_make_specs' in
  89. `kpathsea/tex-make.c'.)
  90. `MakeTeXPK'
  91.      Glyph fonts.
  92. `MakeTeXTeX'
  93.      TeX input files.
  94. `MakeTeXMF'
  95.      Metafont input files.
  96. `MakeTeXTFM'
  97.      TFM files.
  98. These names are overridden by an environment variable specific to the
  99. program--for example, `DVIPSMAKEPK' for Dvipsk.
  100.   If a `MakeTeX...' script fails, the invocation is appended to a file
  101. `missfont.log' in the current directory. If the current directory is
  102. not writable and the environment variable `TEXMFOUTPUT' is set, its
  103. value is used. Otherwise, nothing is written.
  104. File: kpathsea.info,  Node: MakeTeX... script arguments,  Prev: MakeTeX... script names,  Up: MakeTeX... scripts
  105. `MakeTeX'... script arguments
  106. .............................
  107.   The first argument to a `MakeTeX'... script is always the name of the
  108. file to be created.
  109.   For `MakeTeXPK', three or four additional arguments are also passed,
  110. via corresponding environment variables:
  111.   1. The dpi to make the font at (`KPATHSEA_DPI').
  112.   2. The "base dpi" the program is operating at (`MAKETEX_BASE_DPI'),
  113.      i.e., the assumed resolution of the output device.
  114.   3. A "magstep" string suitable for the Metafont `mag' variable
  115.      (`MAKETEX_MAG').
  116.   4. Optionally, a Metafont mode name to assign to the Metafont `mode'
  117.      variable (`MAKETEX_MODE').  Otherwise, (the default) `MakeTeXPK'
  118.      guesses the mode from the resolution.  *Note TeX directory
  119.      structure: TeX directory structure.
  120.   5. Optionally, a directory name. If the directory is absolute, it is
  121.      used as-is. Otherwise, it is appended to the root destination
  122.      directory set in the script (from environment variables `DESTDIR'
  123.      or `MTP_DESTDIR' or a compile-time default). If this argument is
  124.      not supplied, the mode name is appended to the root destination
  125.      directory.
  126. Kpathsea sets `KPATHSEA_DPI' appropriately for each attempt at building
  127. a font.  It's up to the program using Kpathsea to set the others.
  128. (*Note Calling sequence::.)
  129.   You can change the specification for the arguments passed to the
  130. external script by setting the environment variable named as the script
  131. name, but all capitals--`MAKETEXPK', for example.  If you've changed
  132. the script name by setting (say) `DVIPSMAKEPK' to `foo', then the spec
  133. is taken from the environment variable `FOO'.
  134.   The spec can contain any variable references, to the above variables
  135. or any others you might have set.  As an example, the default spec for
  136. `MakeTeXPK' is:
  137.      $KPATHSEA_DPI $MAKETEX_BASE_DPI $MAKETEX_MAG $MAKETEX_MODE
  138. The convention of passing the name of the file to be created as the
  139. first argument cannot be changed.
  140. File: kpathsea.info,  Node: Fallback font,  Prev: MakeTeX... scripts,  Up: Glyph lookup
  141. Fallback font
  142. -------------
  143.   If a bitmap font cannot be found or created at the requested size,
  144. Kpathsea looks for the font at a set of "fallback resolutions".  You
  145. specify these resolutions as a colon-separated list (like search paths).
  146. Kpathsea looks first for a program-specific environment variable (e.g.,
  147. `DVIPSSIZES' for Dvipsk), then the environment variable `TEXSIZES',
  148. then a default specified at compilation time (the Make variable
  149. `default_texsizes').  You can set this list to be empty if you prefer
  150. to find fonts at their stated size or not at all.
  151.   Finally, if the font cannot be found even at the fallback resolutions,
  152. Kpathsea looks for a fallback font, typically `cmr10'.  Programs must
  153. enable this feature by assigning to the global variable
  154. `kpse_fallback_font' or calling `kpse_init_prog' (*note Calling
  155. sequence::.); the default is no such fallback font.
  156. File: kpathsea.info,  Node: TeX directory structure,  Next: Programming,  Prev: TeX searching,  Up: Top
  157. TeX directory structure
  158. ***********************
  159.   (This section obviously not really written yet; sorry.  See
  160. `kpathsea/HIER'.)
  161.   By default, the bitmap font paths end with `$MAKETEX_MODE', thus
  162. including the device name (i.e., the Metafont mode) in the path.  This
  163. is to make it possible to distinguish two different devices with the
  164. same resolution--write/white and write/black 300dpi printers, for
  165. example.
  166.   However, since most sites don't have this complication, Kpathsea
  167. (specifically, `kpse_init_prog' in `kpathsea/proginit.c') has a special
  168. case: if the mode has not been explicitly set by the user (or in a
  169. configuration file), it sets `MAKETEX_MODE' to `/'.  This makes the
  170. default PK path, for example, expand into `.../pk//', so fonts will be
  171. found even if there is no subdirectory for the mode.  (If your site has
  172. only one printer, for example.)
  173.   To make the paths independent of the mode, simply edit `texmf.cnf.in'
  174. before installation, or the installed `texmf.cnf'.  *Note Default
  175. paths::.
  176.   *Note `MakeTeX'... script arguments: MakeTeX... script arguments, for
  177. how this interacts with `MakeTeXPK'.
  178. File: kpathsea.info,  Node: Programming,  Next: Copying,  Prev: TeX directory structure,  Up: Top
  179. Programming
  180. ***********
  181.   This chapter is for programmers who wish to use Kpathsea. *Note
  182. Introduction::, for the conditions under which you may do so. (If you
  183. do this, I'd appreciate a note, just to satisfy my curiousity.)
  184. * Menu:
  185. * Overview: Programming overview:     Introduction.
  186. * Calling sequence::             Specifics of what to call.
  187. * Config: Programming with config files:    Getting info from texmf.cnf.
  188. File: kpathsea.info,  Node: Programming overview,  Next: Calling sequence,  Up: Programming
  189. Programming overview
  190. ====================
  191.   Aside from this manual, your best source of information is the source
  192. to the programs I've modified to use Kpathsea (also listed in the
  193. introduction). Of those, Dviljk is probably the simplest, and hence a
  194. good place to start. Xdvik adds VF support and the complication of X
  195. resources. Dvipsk adds the complication of its own config files.
  196.   Beyond these of examples of use, the `.h' files in the Kpathsea
  197. source describe the interfaces and functionality (and of course the
  198. `.c' files define the actual routines, which are the ultimate
  199. documentation).  `pathsearch.h' declares the basic searching routine.
  200. `tex-file.h' and `tex-glyph.h' define the interfaces for looking up
  201. particular kinds of files.
  202.   The library provides no way for an external program to register new
  203. file types: `tex-file.[ch]' must be modified to do this. For example,
  204. Kpathsea has support for looking up Dvips config files, even though
  205. obviously no program other than Dvips will ever want to do so. I felt
  206. this was acceptable, since along with new file types should also come
  207. new defaults in `texmf.cnf' (and its descendant `paths.h'), since it's
  208. best for users if they can modify one configuration file for all kinds
  209. of paths.
  210.   Kpathsea does not open any files or parse any formats itself. Its
  211. purpose is only to return filenames. The GNU font utilities source does
  212. contain libraries to read TFM, GF, and PK files.
  213. File: kpathsea.info,  Node: Calling sequence,  Next: Programming with config files,  Prev: Programming overview,  Up: Programming
  214. Calling sequence
  215. ================
  216.   The typical way to use Kpathsea in your program goes something like
  217. this:
  218.   1. Call `kpse_set_progname' with `argv[0]'; This is the only
  219.      initialization that is mandatory to take full advantage of
  220.      Kpathsea--specifically, for the `.PROGRAM' feature of config files
  221.      (*note Config files::.).
  222.      `kpse_set_progname' sets the global variables
  223.      `program_invocation_name' and `program_invocation_short_name'.  It
  224.      also initializes debugging flags based on the environment variable
  225.      `KPATHSEA_DEBUG', if that is set.  set.
  226.      The GNU C library provides these two global variables itself; in
  227.      this case, the call to `kpse_set_program' does nothing. But you
  228.      (as a software author) most likely do not want to force people
  229.      installing your program to have glibc.
  230.   2. Set debugging options. *Note Debugging::. If your program doesn't
  231.      have a debugging flag already, you can define one and set
  232.      `kpathsea_debug' to the number that the user supplies (see
  233.      Dviljk), or you can just omit this altogether (people can always
  234.      set `KPATHSEA_DEBUG').  If you do have runtime debugging already,
  235.      you need to merge Kpathsea's options with yours (see Dvipsk and
  236.      Xdvik).
  237.   3. If your program has its own configuration files that can define
  238.      search paths, you should assign those paths to the `client_path'
  239.      member in the appropriate element of the `kpse_format_info' array.
  240.      (This array is indexed by file type; see `tex-file.h'.)  See
  241.      `resident.c' in Dvipsk for an example.
  242.   4. Call `kpse_init_prog' (see `proginit.c'). It's useful for the DVI
  243.      drivers, at least, but for other programs it may be simpler to
  244.      extract the parts of it that actually apply.  This does not
  245.      initialize any paths, it just looks for (and sets) certain
  246.      environment variables and other random information.  (A search
  247.      path is always initialized at the first call to find a file of
  248.      that type; this eliminates much useless work, e.g., initializing
  249.      the BibTeX search paths in a DVI driver.)
  250.   5. The routine to actually find a file of type FORMAT is
  251.      `kpse_find_FORMAT', defined in `tex-file.h'. These are macros that
  252.      expand to a call to `kpse_find_file'.  You can call, say,
  253.      `kpse_find_tfm' after doing only the first of the initialization
  254.      steps above--Kpathsea will read the generic config file
  255.      `texmf.cmf', look for environment variables, and do the expansions
  256.      at the first lookup.
  257.   6. To find PK and/or GF bitmap fonts, the routines are `kpse_find_pk',
  258.      `kpse_find_gf' and `kpse_find_glyph', defined in `tex-glyph.h'.
  259.      These return a structure in addition to the resultant filename,
  260.      because fonts can be found in so many ways. See the documentation
  261.      in the source.
  262.   Kpathsea also provides many utility routines. Some are generic: hash
  263. tables, memory allocation, string concatenation and copying, string
  264. lists, reading input lines of unlimited length, etc. Others are
  265. filename-related: default path, tilde, and variable expansion, `stat'
  266. calls, etc. (Perhaps someday I'll move the former to a separate
  267. library.)
  268.   The `c-*.h' header files can also help your program adapt to many
  269. different systems.  You will almost certainly want to use Autoconf for
  270. configuring your software if you use Kpathsea; I strongly recommend
  271. using Autoconf regardless.  You can get it by ftp from
  272. `prep.ai.mit.edu' in `pub/gnu/autoconf-*.tar.gz', or from any of its
  273. mirrors.
  274. File: kpathsea.info,  Node: Programming with config files,  Prev: Calling sequence,  Up: Programming
  275. Programming with config files
  276. =============================
  277.   You can use the same `texmf.cnf' configuration file as Kpathsea for
  278. your program. This will help installers do all configuration in one
  279. place.
  280.   To retrieve a value VAR, the best way is to call `kpse_var_expand' on
  281. the string `$VAR'. This will look first for an environment variable
  282. VAR, then a config file value. The result will be the value found, or
  283. the empty string. This function is declared in `kpathsea/variable.h'.
  284.   If for some reason you want to retrieve a value *only* from a config
  285. file, not automatically looking for a corresponding environment
  286. variable, call `kpse_cnf_get' (declared in `kpathsea/cnf.h') with the
  287. string VAR.
  288.   No initialization calls are needed.
  289. File: kpathsea.info,  Node: Copying,  Next: Freedom,  Prev: Programming,  Up: Top
  290. GNU GENERAL PUBLIC LICENSE
  291. **************************
  292.                          Version 2, June 1991
  293.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  294.      675 Mass Ave, Cambridge, MA 02139, USA
  295.      
  296.      Everyone is permitted to copy and distribute verbatim copies
  297.      of this license document, but changing it is not allowed.
  298. Preamble
  299. ========
  300.   The licenses for most software are designed to take away your freedom
  301. to share and change it.  By contrast, the GNU General Public License is
  302. intended to guarantee your freedom to share and change free
  303. software--to make sure the software is free for all its users.  This
  304. General Public License applies to most of the Free Software
  305. Foundation's software and to any other program whose authors commit to
  306. using it.  (Some other Free Software Foundation software is covered by
  307. the GNU Library General Public License instead.)  You can apply it to
  308. your programs, too.
  309.   When we speak of free software, we are referring to freedom, not
  310. price.  Our General Public Licenses are designed to make sure that you
  311. have the freedom to distribute copies of free software (and charge for
  312. this service if you wish), that you receive source code or can get it
  313. if you want it, that you can change the software or use pieces of it in
  314. new free programs; and that you know you can do these things.
  315.   To protect your rights, we need to make restrictions that forbid
  316. anyone to deny you these rights or to ask you to surrender the rights.
  317. These restrictions translate to certain responsibilities for you if you
  318. distribute copies of the software, or if you modify it.
  319.   For example, if you distribute copies of such a program, whether
  320. gratis or for a fee, you must give the recipients all the rights that
  321. you have.  You must make sure that they, too, receive or can get the
  322. source code.  And you must show them these terms so they know their
  323. rights.
  324.   We protect your rights with two steps: (1) copyright the software, and
  325. (2) offer you this license which gives you legal permission to copy,
  326. distribute and/or modify the software.
  327.   Also, for each author's protection and ours, we want to make certain
  328. that everyone understands that there is no warranty for this free
  329. software.  If the software is modified by someone else and passed on, we
  330. want its recipients to know that what they have is not the original, so
  331. that any problems introduced by others will not reflect on the original
  332. authors' reputations.
  333.   Finally, any free program is threatened constantly by software
  334. patents.  We wish to avoid the danger that redistributors of a free
  335. program will individually obtain patent licenses, in effect making the
  336. program proprietary.  To prevent this, we have made it clear that any
  337. patent must be licensed for everyone's free use or not licensed at all.
  338.   The precise terms and conditions for copying, distribution and
  339. modification follow.
  340.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  341.   1. This License applies to any program or other work which contains a
  342.      notice placed by the copyright holder saying it may be distributed
  343.      under the terms of this General Public License.  The "Program",
  344.      below, refers to any such program or work, and a "work based on
  345.      the Program" means either the Program or any derivative work under
  346.      copyright law: that is to say, a work containing the Program or a
  347.      portion of it, either verbatim or with modifications and/or
  348.      translated into another language.  (Hereinafter, translation is
  349.      included without limitation in the term "modification".)  Each
  350.      licensee is addressed as "you".
  351.      Activities other than copying, distribution and modification are
  352.      not covered by this License; they are outside its scope.  The act
  353.      of running the Program is not restricted, and the output from the
  354.      Program is covered only if its contents constitute a work based on
  355.      the Program (independent of having been made by running the
  356.      Program).  Whether that is true depends on what the Program does.
  357.   2. You may copy and distribute verbatim copies of the Program's
  358.      source code as you receive it, in any medium, provided that you
  359.      conspicuously and appropriately publish on each copy an appropriate
  360.      copyright notice and disclaimer of warranty; keep intact all the
  361.      notices that refer to this License and to the absence of any
  362.      warranty; and give any other recipients of the Program a copy of
  363.      this License along with the Program.
  364.      You may charge a fee for the physical act of transferring a copy,
  365.      and you may at your option offer warranty protection in exchange
  366.      for a fee.
  367.   3. You may modify your copy or copies of the Program or any portion
  368.      of it, thus forming a work based on the Program, and copy and
  369.      distribute such modifications or work under the terms of Section 1
  370.      above, provided that you also meet all of these conditions:
  371.        a. You must cause the modified files to carry prominent notices
  372.           stating that you changed the files and the date of any change.
  373.        b. You must cause any work that you distribute or publish, that
  374.           in whole or in part contains or is derived from the Program
  375.           or any part thereof, to be licensed as a whole at no charge
  376.           to all third parties under the terms of this License.
  377.        c. If the modified program normally reads commands interactively
  378.           when run, you must cause it, when started running for such
  379.           interactive use in the most ordinary way, to print or display
  380.           an announcement including an appropriate copyright notice and
  381.           a notice that there is no warranty (or else, saying that you
  382.           provide a warranty) and that users may redistribute the
  383.           program under these conditions, and telling the user how to
  384.           view a copy of this License.  (Exception: if the Program
  385.           itself is interactive but does not normally print such an
  386.           announcement, your work based on the Program is not required
  387.           to print an announcement.)
  388.      These requirements apply to the modified work as a whole.  If
  389.      identifiable sections of that work are not derived from the
  390.      Program, and can be reasonably considered independent and separate
  391.      works in themselves, then this License, and its terms, do not
  392.      apply to those sections when you distribute them as separate
  393.      works.  But when you distribute the same sections as part of a
  394.      whole which is a work based on the Program, the distribution of
  395.      the whole must be on the terms of this License, whose permissions
  396.      for other licensees extend to the entire whole, and thus to each
  397.      and every part regardless of who wrote it.
  398.      Thus, it is not the intent of this section to claim rights or
  399.      contest your rights to work written entirely by you; rather, the
  400.      intent is to exercise the right to control the distribution of
  401.      derivative or collective works based on the Program.
  402.      In addition, mere aggregation of another work not based on the
  403.      Program with the Program (or with a work based on the Program) on
  404.      a volume of a storage or distribution medium does not bring the
  405.      other work under the scope of this License.
  406.   4. You may copy and distribute the Program (or a work based on it,
  407.      under Section 2) in object code or executable form under the terms
  408.      of Sections 1 and 2 above provided that you also do one of the
  409.      following:
  410.        a. Accompany it with the complete corresponding machine-readable
  411.           source code, which must be distributed under the terms of
  412.           Sections 1 and 2 above on a medium customarily used for
  413.           software interchange; or,
  414.        b. Accompany it with a written offer, valid for at least three
  415.           years, to give any third party, for a charge no more than your
  416.           cost of physically performing source distribution, a complete
  417.           machine-readable copy of the corresponding source code, to be
  418.           distributed under the terms of Sections 1 and 2 above on a
  419.           medium customarily used for software interchange; or,
  420.        c. Accompany it with the information you received as to the offer
  421.           to distribute corresponding source code.  (This alternative is
  422.           allowed only for noncommercial distribution and only if you
  423.           received the program in object code or executable form with
  424.           such an offer, in accord with Subsection b above.)
  425.      The source code for a work means the preferred form of the work for
  426.      making modifications to it.  For an executable work, complete
  427.      source code means all the source code for all modules it contains,
  428.      plus any associated interface definition files, plus the scripts
  429.      used to control compilation and installation of the executable.
  430.      However, as a special exception, the source code distributed need
  431.      not include anything that is normally distributed (in either
  432.      source or binary form) with the major components (compiler,
  433.      kernel, and so on) of the operating system on which the executable
  434.      runs, unless that component itself accompanies the executable.
  435.      If distribution of executable or object code is made by offering
  436.      access to copy from a designated place, then offering equivalent
  437.      access to copy the source code from the same place counts as
  438.      distribution of the source code, even though third parties are not
  439.      compelled to copy the source along with the object code.
  440.   5. You may not copy, modify, sublicense, or distribute the Program
  441.      except as expressly provided under this License.  Any attempt
  442.      otherwise to copy, modify, sublicense or distribute the Program is
  443.      void, and will automatically terminate your rights under this
  444.      License.  However, parties who have received copies, or rights,
  445.      from you under this License will not have their licenses
  446.      terminated so long as such parties remain in full compliance.
  447.   6. You are not required to accept this License, since you have not
  448.      signed it.  However, nothing else grants you permission to modify
  449.      or distribute the Program or its derivative works.  These actions
  450.      are prohibited by law if you do not accept this License.
  451.      Therefore, by modifying or distributing the Program (or any work
  452.      based on the Program), you indicate your acceptance of this
  453.      License to do so, and all its terms and conditions for copying,
  454.      distributing or modifying the Program or works based on it.
  455.   7. Each time you redistribute the Program (or any work based on the
  456.      Program), the recipient automatically receives a license from the
  457.      original licensor to copy, distribute or modify the Program
  458.      subject to these terms and conditions.  You may not impose any
  459.      further restrictions on the recipients' exercise of the rights
  460.      granted herein.  You are not responsible for enforcing compliance
  461.      by third parties to this License.
  462.   8. If, as a consequence of a court judgment or allegation of patent
  463.      infringement or for any other reason (not limited to patent
  464.      issues), conditions are imposed on you (whether by court order,
  465.      agreement or otherwise) that contradict the conditions of this
  466.      License, they do not excuse you from the conditions of this
  467.      License.  If you cannot distribute so as to satisfy simultaneously
  468.      your obligations under this License and any other pertinent
  469.      obligations, then as a consequence you may not distribute the
  470.      Program at all.  For example, if a patent license would not permit
  471.      royalty-free redistribution of the Program by all those who
  472.      receive copies directly or indirectly through you, then the only
  473.      way you could satisfy both it and this License would be to refrain
  474.      entirely from distribution of the Program.
  475.      If any portion of this section is held invalid or unenforceable
  476.      under any particular circumstance, the balance of the section is
  477.      intended to apply and the section as a whole is intended to apply
  478.      in other circumstances.
  479.      It is not the purpose of this section to induce you to infringe any
  480.      patents or other property right claims or to contest validity of
  481.      any such claims; this section has the sole purpose of protecting
  482.      the integrity of the free software distribution system, which is
  483.      implemented by public license practices.  Many people have made
  484.      generous contributions to the wide range of software distributed
  485.      through that system in reliance on consistent application of that
  486.      system; it is up to the author/donor to decide if he or she is
  487.      willing to distribute software through any other system and a
  488.      licensee cannot impose that choice.
  489.      This section is intended to make thoroughly clear what is believed
  490.      to be a consequence of the rest of this License.
  491.   9. If the distribution and/or use of the Program is restricted in
  492.      certain countries either by patents or by copyrighted interfaces,
  493.      the original copyright holder who places the Program under this
  494.      License may add an explicit geographical distribution limitation
  495.      excluding those countries, so that distribution is permitted only
  496.      in or among countries not thus excluded.  In such case, this
  497.      License incorporates the limitation as if written in the body of
  498.      this License.
  499.  10. The Free Software Foundation may publish revised and/or new
  500.      versions of the General Public License from time to time.  Such
  501.      new versions will be similar in spirit to the present version, but
  502.      may differ in detail to address new problems or concerns.
  503.      Each version is given a distinguishing version number.  If the
  504.      Program specifies a version number of this License which applies
  505.      to it and "any later version", you have the option of following
  506.      the terms and conditions either of that version or of any later
  507.      version published by the Free Software Foundation.  If the Program
  508.      does not specify a version number of this License, you may choose
  509.      any version ever published by the Free Software Foundation.
  510.  11. If you wish to incorporate parts of the Program into other free
  511.      programs whose distribution conditions are different, write to the
  512.      author to ask for permission.  For software which is copyrighted
  513.      by the Free Software Foundation, write to the Free Software
  514.      Foundation; we sometimes make exceptions for this.  Our decision
  515.      will be guided by the two goals of preserving the free status of
  516.      all derivatives of our free software and of promoting the sharing
  517.      and reuse of software generally.
  518.                                 NO WARRANTY
  519.  12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  520.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  521.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  522.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  523.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  524.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  525.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  526.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  527.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  528.      SERVICING, REPAIR OR CORRECTION.
  529.  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  530.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  531.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  532.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  533.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  534.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  535.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  536.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  537.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  538.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  539.                       END OF TERMS AND CONDITIONS
  540. Appendix: How to Apply These Terms to Your New Programs
  541. =======================================================
  542.   If you develop a new program, and you want it to be of the greatest
  543. possible use to the public, the best way to achieve this is to make it
  544. free software which everyone can redistribute and change under these
  545. terms.
  546.   To do so, attach the following notices to the program.  It is safest
  547. to attach them to the start of each source file to most effectively
  548. convey the exclusion of warranty; and each file should have at least
  549. the "copyright" line and a pointer to where the full notice is found.
  550.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  551.      Copyright (C) 19YY  NAME OF AUTHOR
  552.      
  553.      This program is free software; you can redistribute it and/or modify
  554.      it under the terms of the GNU General Public License as published by
  555.      the Free Software Foundation; either version 2 of the License, or
  556.      (at your option) any later version.
  557.      
  558.      This program is distributed in the hope that it will be useful,
  559.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  560.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  561.      GNU General Public License for more details.
  562.      
  563.      You should have received a copy of the GNU General Public License
  564.      along with this program; if not, write to the Free Software
  565.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  566.   Also add information on how to contact you by electronic and paper
  567. mail.
  568.   If the program is interactive, make it output a short notice like this
  569. when it starts in an interactive mode:
  570.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  571.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  572.      This is free software, and you are welcome to redistribute it
  573.      under certain conditions; type `show c' for details.
  574.   The hypothetical commands `show w' and `show c' should show the
  575. appropriate parts of the General Public License.  Of course, the
  576. commands you use may be called something other than `show w' and `show
  577. c'; they could even be mouse-clicks or menu items--whatever suits your
  578. program.
  579.   You should also get your employer (if you work as a programmer) or
  580. your school, if any, to sign a "copyright disclaimer" for the program,
  581. if necessary.  Here is a sample; alter the names:
  582.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  583.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  584.      
  585.      SIGNATURE OF TY COON, 1 April 1989
  586.      Ty Coon, President of Vice
  587.   This General Public License does not permit incorporating your
  588. program into proprietary programs.  If your program is a subroutine
  589. library, you may consider it more useful to permit linking proprietary
  590. applications with the library.  If this is what you want to do, use the
  591. GNU Library General Public License instead of this License.
  592. File: kpathsea.info,  Node: Freedom,  Next: Index,  Prev: Copying,  Up: Top
  593. Regain your programming freedom
  594. *******************************
  595.   Until a few years ago, programmers in the United States could write
  596. any program they wished.  This freedom has now been taken away by two
  597. developments: software patents, which grant the patent holder an
  598. absolute monopoly on some programming technique, and user interface
  599. copyright, which forbid compatible implementations of an existing user
  600. interface.
  601.   In Europe, especially through the GATT treaty, things are rapidly
  602. approaching the same pass.
  603. * Menu:
  604. * Software patents::            Algorithm monopolies.
  605. * User interface copyright::    Forbidding upward-compatibility.
  606. * What to do?::                 What to do?
  607. File: kpathsea.info,  Node: Software patents,  Next: User interface copyright,  Up: Freedom
  608. Software patents
  609. ================
  610.   The U.S. Patent and Trademark Office has granted numerous software
  611. patents on software techniques.  Patents are an absolute
  612. monopoly--independent reinvention is precluded.  This monopoly lasts
  613. for seventeen years, i.e., forever (with respect to computer science).
  614.   One patent relevant to TeX is patent 4,956,809, issued to the Mark
  615. Williams company on September 11, 1990, applied for in 1982, which
  616. covers (among other things)
  617.      representing in a standardized order consisting of a standard
  618.      binary structure file stored on auxiliary memory or transported on
  619.      a communications means, said standardized order being different
  620.      from a different order used on at least one of the different
  621.      computers;
  622.      Converting in each of the different computers binary data read
  623.      from an auxiliary data storage or communications means from the
  624.      standardized order to the natural order of the respective host
  625.      computer after said binary data are read from said auxiliary data
  626.      storage or communications means and before said binary data are
  627.      used by the respective host computer; and
  628.      Converting in each of the different computers binary data written
  629.      into auxiliary data storage or communications means from the
  630.      natural order of the respective host computer to the standardized
  631.      order prior to said writing.
  632. ... in other words, storing data on disk in a machine-independent
  633. order, as the DVI, TFM, GF, and PK file formats specify.  Even though
  634. TeX is "prior art" in this respect, the patent was granted (the patent
  635. examiners not being computer scientists, even less computer
  636. typographers).  Since there is a strong presumption in the courts of a
  637. patent's validity once it has been granted, there is a good chance that
  638. users or implementors of TeX could be successfully sued on the issue.
  639.   As another example, the X window system, which was intended to be able
  640. to be used freely by everyone, is now being threatened by two patents:
  641. 4,197,590 on the use of exclusive-or to redraw cursors, held by Cadtrak,
  642. a litigation company (this has been upheld twice in court); and
  643. 4,555,775, held by AT&T, on the use of backing store to redraw windows
  644. quickly.
  645.   Here is one excerpt from a recent mailing by the League for
  646. Programming Freedom (*note What to do?::.) which I feel sums up the
  647. situation rather well.  It comes from an article in `Think' magazine,
  648. issue #5, 1990.  The comments after the quote were written by Richard
  649. Stallman.
  650.          "You get value from patents in two ways," says Roger Smith, IBM
  651.         Assistant General Counsel, intellectual property law.
  652.      "Through fees,     and through licensing negotiations that give
  653.      IBM access to other     patents.
  654.      "The IBM patent portfolio gains us the freedom to do what we need
  655.      to     do through cross-licensing--it gives us access to the
  656.      inventions of     others that are the key to rapid innovation.
  657.      Access is far more     valuable to IBM than the fees it receives
  658.      from its 9,000 active     patents.  There's no direct calculation
  659.      of this value, but it's many     times larger than the fee income,
  660.      perhaps an order of magnitude     larger."
  661.   This information should dispel the belief that the patent system will
  662. "protect" a small software developer from competition from IBM.  IBM
  663. can always find patents in its collection which the small developer is
  664. infringing, and thus obtain a cross-license.
  665.   However, the patent system does cause trouble for the smaller
  666. companies which, like IBM, need access to patented techniques in order
  667. to do useful work in software.  Unlike IBM, the smaller companies do
  668. not have 9,000 patents and cannot usually get a cross-license.  No
  669. matter how hard they try, they cannot have enough patents to do this.
  670.   Only the elimination of patents from the software field can enable
  671. most software developers to continue with their work.
  672.   The value IBM gets from cross-licensing is a measure of the amount of
  673. harm that the patent system would do to IBM if IBM could not avoid it.
  674. IBM's estimate is that the trouble could easily be ten times the good
  675. one can expect from one's own patents--even for a company with 9,000 of
  676. them.
  677. File: kpathsea.info,  Node: User interface copyright,  Next: What to do?,  Prev: Software patents,  Up: Freedom
  678. User interface copyright
  679. ========================
  680.   (This section is copied from the GCC manual, by Richard Stallman.)
  681.      This section is a political message from the League for Programming
  682.      Freedom to the users of the GNU font utilities.  It is included
  683.      here as an expression of support for the League on my part.
  684.   Apple, Lotus and Xerox are trying to create a new form of legal
  685. monopoly: a copyright on a class of user interfaces.  These monopolies
  686. would cause serious problems for users and developers of computer
  687. software and systems.
  688.   Until a few years ago, the law seemed clear: no one could restrict
  689. others from using a user interface; programmers were free to implement
  690. any interface they chose.  Imitating interfaces, sometimes with changes,
  691. was standard practice in the computer field.  The interfaces we know
  692. evolved gradually in this way; for example, the Macintosh user interface
  693. drew ideas from the Xerox interface, which in turn drew on work done at
  694. Stanford and SRI.  1-2-3 imitated VisiCalc, and dBase imitated a
  695. database program from JPL.
  696.   Most computer companies, and nearly all computer users, were happy
  697. with this state of affairs.  The companies that are suing say it does
  698. not offer "enough incentive" to develop their products, but they must
  699. have considered it "enough" when they made their decision to do so.  It
  700. seems they are not satisfied with the opportunity to continue to compete
  701. in the marketplace--not even with a head start.
  702.   If Xerox, Lotus, and Apple are permitted to make law through the
  703. courts, the precedent will hobble the software industry:
  704.    * Gratuitous incompatibilities will burden users.  Imagine if each
  705.      car manufacturer had to arrange the pedals in a different order.
  706.    * Software will become and remain more expensive.  Users will be
  707.      "locked in" to proprietary interfaces, for which there is no real
  708.      competition.
  709.    * Large companies have an unfair advantage wherever lawsuits become
  710.      commonplace.  Since they can easily afford to sue, they can
  711.      intimidate small companies with threats even when they don't
  712.      really have a case.
  713.    * User interface improvements will come slower, since incremental
  714.      evolution through creative imitation will no longer be permitted.
  715.    * Even Apple, etc., will find it harder to make improvements if they
  716.      can no longer adapt the good ideas that others introduce, for fear
  717.      of weakening their own legal positions.  Some users suggest that
  718.      this stagnation may already have started.
  719.    * If you use GNU software, you might find it of some concern that
  720.      user interface copyright will make it hard for the Free Software
  721.      Foundation to develop programs compatible with the interfaces that
  722.      you already know.
  723. File: kpathsea.info,  Node: What to do?,  Prev: User interface copyright,  Up: Freedom
  724. What to do?
  725. ===========
  726.   (This section is copied from the GCC manual, by Richard Stallman.)
  727.   To protect our freedom from lawsuits like these, a group of
  728. programmers and users have formed a new grass-roots political
  729. organization, the League for Programming Freedom.
  730.   The purpose of the League is to oppose new monopolistic practices such
  731. as user-interface copyright and software patents; it calls for a return
  732. to the legal policies of the recent past, in which these practices were
  733. not allowed.  The League is not concerned with free software as an
  734. issue, and not affiliated with the Free Software Foundation.
  735.   The League's membership rolls include John McCarthy, inventor of Lisp,
  736. Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.
  737. Steele, Jr., author of well-known books on Lisp and C, as well as
  738. Richard Stallman, the developer of GNU CC.  Please join and add your
  739. name to the list.  Membership dues in the League are $42 per year for
  740. programmers, managers and professionals; $10.50 for students; $21 for
  741. others.
  742.   The League needs both activist members and members who only pay their
  743. dues.
  744.   To join, or for more information, phone (617) 492-0023 or write to:
  745.      League for Programming Freedom
  746.      1 Kendall Square #143
  747.      P.O. Box 9171
  748.      Cambridge, MA 02139
  749.   You can also send electronic mail to `league@prep.ai.mit.edu'.
  750.   Here are some suggestions from the League for things you can do to
  751. protect your freedom to write programs:
  752.    * Don't buy from Xerox, Lotus or Apple.  Buy from their competitors
  753.      or from the defendants they are suing.
  754.    * Don't develop software to work with the systems made by these
  755.      companies.
  756.    * Port your existing software to competing systems, so that you
  757.      encourage users to switch.
  758.    * Write letters to company presidents to let them know their conduct
  759.      is unacceptable.
  760.    * Tell your friends and colleagues about this issue and how it
  761.      threatens to ruin the computer industry.
  762.    * Above all, don't work for the look-and-feel plaintiffs, and don't
  763.      accept contracts from them.
  764.    * Write to Congress to explain the importance of this issue.
  765.           House Subcommittee on Intellectual Property
  766.           2137 Rayburn Bldg
  767.           Washington, DC 20515
  768.           
  769.           Senate Subcommittee on Patents, Trademarks and Copyrights
  770.           United States Senate
  771.           Washington, DC 20510
  772.      (These committees have received lots of mail already; let's give
  773.      them even more.)
  774.   Express your opinion!  You can make a difference.
  775.