home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fb.zip / octave / doc / octave.i12 (.txt) < prev    next >
GNU Info File  |  2000-01-15  |  38KB  |  684 lines

  1. This is Info file octave, produced by Makeinfo-1.64 from the input file
  2. octave.tex.
  3. START-INFO-DIR-ENTRY
  4. * Octave: (octave).    Interactive language for numerical computations.
  5. END-INFO-DIR-ENTRY
  6.    Copyright (C) 1996, 1997 John W. Eaton.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided that
  12. the entire resulting derived work is distributed under the terms of a
  13. permission notice identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions.
  17. File: octave,  Node: Using Octave Mode,  Next: Running Octave From Within Emacs,  Prev: Installing EOS,  Up: Emacs
  18. Using Octave Mode
  19. =================
  20.    If you are lucky, your sysadmins have already arranged everything so
  21. that Emacs automatically goes into Octave mode whenever you visit an
  22. Octave code file as characterized by its extension `.m'.  If not,
  23. proceed as follows.
  24.   1. To begin using Octave mode for all `.m' files you visit, add the
  25.      following lines to a file loaded by Emacs at startup time,
  26.      typically your `~/.emacs' file:
  27.           (autoload 'octave-mode "octave-mod" nil t)
  28.           (setq auto-mode-alist
  29.                 (cons '("\\.m$" . octave-mode) auto-mode-alist))
  30.   2. Finally, to turn on the abbrevs, auto-fill and font-lock features
  31.      automatically, also add the following lines to one of the Emacs
  32.      startup files:
  33.           (add-hook 'octave-mode-hook
  34.                     (lambda ()
  35.                       (abbrev-mode 1)
  36.                       (auto-fill-mode 1)
  37.                       (if (eq window-system 'x)
  38.                           (font-lock-mode 1))))
  39.      See the Emacs manual for more information about how to customize
  40.      Font-lock mode.
  41.    In Octave mode, the following special Emacs commands can be used in
  42. addition to the standard Emacs commands.
  43. `C-h m'
  44.      Describe the features of Octave mode.
  45. `LFD'
  46.      Reindent the current Octave line, insert a newline and indent the
  47.      new line (`octave-reindent-then-newline-and-indent').  An abbrev
  48.      before point is expanded if `abbrev-mode' is non-`nil'.
  49. `TAB'
  50.      Indents current Octave line based on its contents and on previous
  51.      lines (`indent-according-to-mode').
  52.      Insert an "electric" semicolon (`octave-electric-semi').  If
  53.      `octave-auto-indent' is non-`nil', reindent the current line.  If
  54.      `octave-auto-newline' is non-`nil', automagically insert a newline
  55.      and indent the new line.
  56.      Start entering an abbreviation (`octave-abbrev-start').  If Abbrev
  57.      mode is turned on, typing ``C-h' or ``?' lists all abbrevs.  Any
  58.      other key combination is executed normally.  Note that all Octave
  59.      abbrevs start with a grave accent.
  60. `M-LFD'
  61.      Break line at point and insert continuation marker and alignment
  62.      (`octave-split-line').
  63. `M-TAB'
  64.      Perform completion on Octave symbol preceding point, comparing that
  65.      symbol against Octave's reserved words and builtin variables
  66.      (`octave-complete-symbol').
  67. `M-C-a'
  68.      Move backward to the beginning of a function
  69.      (`octave-beginning-of-defun').  With prefix argument N, do it that
  70.      many times if N is positive;  otherwise, move forward to the N-th
  71.      following beginning of a function.
  72. `M-C-e'
  73.      Move forward to the end of a function (`octave-end-of-defun').
  74.      With prefix argument N, do it that many times if N is positive;
  75.      otherwise, move back to the N-th preceding end of a function.
  76. `M-C-h'
  77.      Puts point at beginning and mark at the end of the current Octave
  78.      function, i.e., the one containing point or following point
  79.      (`octave-mark-defun').
  80. `M-C-q'
  81.      Properly indents the Octave function which contains point
  82.      (`octave-indent-defun').
  83. `M-;'
  84.      If there is no comment already on this line, create a code-level
  85.      comment (started by two comment characters) if the line is empty,
  86.      or an in-line comment (started by one comment character) otherwise
  87.      (`octave-indent-for-comment').  Point is left after the start of
  88.      the comment which is properly aligned.
  89. `C-c ;'
  90.      Puts the comment character `#' (more precisely, the string value of
  91.      `octave-comment-start') at the beginning of every line in the
  92.      region (`octave-comment-region').  With just `C-u' prefix
  93.      argument, uncomment each line in the region.  A numeric prefix
  94.      argument N means use N comment characters.
  95. `C-c :'
  96.      Uncomments every line in the region (`octave-uncomment-region').
  97. `C-c C-p'
  98.      Move one line of Octave code backward, skipping empty and comment
  99.      lines (`octave-previous-code-line').  With numeric prefix argument
  100.      N, move that many code lines backward (forward if N is negative).
  101. `C-c C-n'
  102.      Move one line of Octave code forward, skipping empty and comment
  103.      lines (`octave-next-code-line').  With numeric prefix argument N,
  104.      move that many code lines forward (backward if N is negative).
  105. `C-c C-a'
  106.      Move to the `real' beginning of the current line
  107.      (`octave-beginning-of-line').  If point is in an empty or comment
  108.      line, simply go to its beginning;  otherwise, move backwards to the
  109.      beginning of the first code line which is not inside a continuation
  110.      statement,  i.e., which does not follow a code line ending in `...'
  111.      or `\', or is inside an open parenthesis list.
  112. `C-c C-e'
  113.      Move to the `real' end of the current line (`octave-end-of-line').
  114.      If point is in a code line, move forward to the end of the first
  115.      Octave code line which does not end in `...' or `\' or is inside an
  116.      open parenthesis list.  Otherwise, simply go to the end of the
  117.      current line.
  118. `C-c M-C-n'
  119.      Move forward across one balanced begin-end block of Octave code
  120.      (`octave-forward-block').  With numeric prefix argument N, move
  121.      forward across N such blocks (backward if N is negative).
  122. `C-c M-C-p'
  123.      Move back across one balanced begin-end block of Octave code
  124.      (`octave-backward-block').  With numeric prefix argument N, move
  125.      backward across N such blocks (forward if N is negative).
  126. `C-c M-C-d'
  127.      Move forward down one begin-end block level of Octave code
  128.      (`octave-down-block').  With numeric prefix argument, do it that
  129.      many times;  a negative argument means move backward, but still go
  130.      down one level.
  131. `C-c M-C-u'
  132.      Move backward out of one begin-end block level of Octave code
  133.      (`octave-backward-up-block').  With numeric prefix argument, do it
  134.      that many times; a negative argument means move forward, but still
  135.      to a less deep spot.
  136. `C-c M-C-h'
  137.      Put point at the beginning of this block, mark at the end
  138.      (`octave-mark-block').  The block marked is the one that contains
  139.      point or follows point.
  140. `C-c ]'
  141.      Close the current block on a separate line (`octave-close-block').
  142.      An error is signaled if no block to close is found.
  143. `C-c f'
  144.      Insert a function skeleton, prompting for the function's name,
  145.      arguments and return values which have to be entered without parens
  146.      (`octave-insert-defun').
  147. `C-c C-h'
  148.      Search the function, operator and variable indices of all info
  149.      files with documentation for Octave for entries (`octave-help').
  150.      If used interactively, the entry is prompted for with completion.
  151.      If multiple matches are found, one can cycle through them using
  152.      the standard `,' (`Info-index-next') command of the Info reader.
  153.      The variable `octave-help-files' is a list of files to search
  154.      through and defaults to `'("octave")'.  If there is also an Octave
  155.      Local Guide with corresponding info file, say, `octave-LG', you can
  156.      have `octave-help' search both files by
  157.           (setq octave-help-files '("octave" "octave-LG"))
  158.      in one of your Emacs startup files.
  159.    A common problem is that the RET key does *not* indent the line to
  160. where the new text should go after inserting the newline.  This is
  161. because the standard Emacs convention is that RET (aka `C-m') just adds
  162. a newline, whereas LFD (aka `C-j') adds a newline and indents it.  This
  163. is particularly inconvenient for users with keyboards which do not have
  164. a special LFD key at all;  in such cases, it is typically more
  165. convenient to use RET as the LFD key (rather than typing `C-j').
  166.    You can make RET do this by adding
  167.      (define-key octave-mode-map "\C-m"
  168.        'octave-reindent-then-newline-and-indent)
  169. to one of your Emacs startup files.  Another, more generally applicable
  170. solution is
  171.      (defun RET-behaves-as-LFD ()
  172.        (let ((x (key-binding "\C-j")))
  173.          (local-set-key "\C-m" x)))
  174.      (add-hook 'octave-mode-hook 'RET-behaves-as-LFD)
  175. (this works for all modes by adding to the startup hooks, without having
  176. to know the particular binding of RET in that mode!).  Similar
  177. considerations apply for using M-RET as M-LFD.  As Barry A. Warsaw
  178. <bwarsaw@cnri.reston.va.us> says in the documentation for his
  179. `cc-mode', "This is a very common question. `:-)' If you want this to
  180. be the default behavior, don't lobby me, lobby RMS!"
  181.    The following variables can be used to customize Octave mode.
  182. `octave-auto-indent'
  183.      Non-`nil' means auto-indent the current line after a semicolon or
  184.      space.  Default is `nil'.
  185. `octave-auto-newline'
  186.      Non-`nil' means auto-insert a newline and indent after semicolons
  187.      are typed.  The default value is `nil'.
  188. `octave-blink-matching-block'
  189.      Non-`nil' means show matching begin of block when inserting a
  190.      space, newline or `;' after an else or end keyword.  Default is
  191.      `t'.  This is an extremely useful feature for automatically
  192.      verifying that the keywords match--if they don't, an error message
  193.      is displayed.
  194. `octave-block-offset'
  195.      Extra indentation applied to statements in block structures.
  196.      Default is 2.
  197. `octave-continuation-offset'
  198.      Extra indentation applied to Octave continuation lines.  Default
  199.      is 4.
  200. `octave-continuation-string'
  201.      String used for Octave continuation lines.  Normally `\'.
  202. `octave-mode-startup-message'
  203.      If `t' (default), a startup message is displayed when Octave mode
  204.      is called.
  205.    If Font Lock mode is enabled, Octave mode will display
  206.    * strings in `font-lock-string-face'
  207.    * comments in `font-lock-comment-face'
  208.    * the Octave reserved words (such as all block keywords) and the text
  209.      functions (such as `cd' or `who') which are also reserved using
  210.      `font-lock-keyword-face'
  211.    * the builtin operators (`&&', `<>', ...) using
  212.      `font-lock-reference-face'
  213.    * the builtin variables (such as `prefer_column_vectors', `NaN' or
  214.      `LOADPATH') in `font-lock-variable-name-face'
  215.    * and the function names in function declarations in
  216.      `font-lock-function-name-face'.
  217.    There is also rudimentary support for Imenu (currently, function
  218. names can be indexed).
  219.    You can generate TAGS files for Emacs from Octave `.m' files using
  220. the shell script `otags' that is installed alongside your copy of
  221. Octave.
  222.    Customization of Octave mode can be performed by modification of the
  223. variable `octave-mode-hook'.  If the value of this variable is
  224. non-`nil', turning on Octave mode calls its value.
  225.    If you discover a problem with Octave mode, you can conveniently
  226. send a bug report using `C-c C-b' (`octave-submit-bug-report').  This
  227. automatically sets up a mail buffer with version information already
  228. added.  You just need to add a description of the problem, including a
  229. reproducible test case and send the message.
  230. File: octave,  Node: Running Octave From Within Emacs,  Next: Using the Emacs Info Reader for Octave,  Prev: Using Octave Mode,  Up: Emacs
  231. Running Octave From Within Emacs
  232. ================================
  233.    The package `octave' provides commands for running an inferior
  234. Octave process in a special Emacs buffer.  Use
  235.      M-x run-octave
  236. to directly start an inferior Octave process.  If Emacs does not know
  237. about this command, add the line
  238.      (autoload 'run-octave "octave-inf" nil t)
  239. to your `.emacs' file.
  240.    This will start Octave in a special buffer the name of which is
  241. specified by the variable `inferior-octave-buffer' and defaults to
  242. `"*Inferior Octave*"'.  From within this buffer, you can interact with
  243. the inferior Octave process `as usual', i.e., by entering Octave
  244. commands at the prompt.  The buffer is in Inferior Octave mode, which
  245. is derived from the standard Comint mode, a major mode for interacting
  246. with an inferior interpreter.  See the documentation for `comint-mode'
  247. for more details, and use `C-h b' to find out about available special
  248. keybindings.
  249.    You can also communicate with an inferior Octave process from within
  250. files with Octave code (i.e., buffers in Octave mode), using the
  251. following commands.
  252. `C-c i l'
  253.      Send the current line to the inferior Octave process
  254.      (`octave-send-line').  With positive prefix argument N, send that
  255.      many lines.  If `octave-send-line-auto-forward' is non-`nil', go
  256.      to the next unsent code line.
  257. `C-c i b'
  258.      Send the current block to the inferior Octave process
  259.      (`octave-send-block').
  260. `C-c i f'
  261.      Send the current function to the inferior Octave process
  262.      (`octave-send-defun').
  263. `C-c i r'
  264.      Send the region to the inferior Octave process
  265.      (`octave-send-region').
  266. `C-c i s'
  267.      Make sure that `inferior-octave-buffer' is displayed
  268.      (`octave-show-process-buffer').
  269. `C-c i h'
  270.      Delete all windows that display the inferior Octave buffer
  271.      (`octave-hide-process-buffer').
  272. `C-c i k'
  273.      Kill the inferior Octave process and its buffer
  274.      (`octave-kill-process').
  275.    The effect of the commands which send code to the Octave process can
  276. be customized by the following variables.
  277. `octave-send-echo-input'
  278.      Non-`nil' means echo input sent to the inferior Octave process.
  279.      Default is `t'.
  280. `octave-send-show-buffer'
  281.      Non-`nil' means display the buffer running the Octave process after
  282.      sending a command (but without selecting it).  Default is `t'.
  283.    If you send code and there is no inferior Octave process yet, it
  284. will be started automatically.
  285.    The startup of the inferior Octave process is highly customizable.
  286. The variable `inferior-octave-startup-args' can be used for specifying
  287. command lines arguments to be passed to Octave on startup as a list of
  288. strings.  For example, to suppress the startup message and use
  289. `traditional' mode, set this to `'("-q" "--traditional")'.  You can
  290. also specify a startup file of Octave commands to be loaded on startup;
  291. note that these commands will not produce any visible output in the
  292. process buffer.  Which file to use is controlled by the variable
  293. `inferior-octave-startup-file'.  If this is `nil', the file
  294. `~/.emacs-octave' is used if it exists.
  295.    And finally, `inferior-octave-mode-hook' is run after starting the
  296. process and putting its buffer into Inferior Octave mode.  Hence, if you
  297. like the up and down arrow keys to behave in the interaction buffer as
  298. in the shell, and you want this buffer to use nice colors, add
  299.      (add-hook 'inferior-octave-mode-hook
  300.                (lambda ()
  301.                  (turn-on-font-lock)
  302.                  (define-key inferior-octave-mode-map [up]
  303.                    'comint-previous-input)
  304.                  (define-key inferior-octave-mode-map [down]
  305.                    'comint-next-input)))
  306. to your `.emacs' file.  You could also swap the roles of `C-a'
  307. (`beginning-of-line') and `C-c C-a' (`comint-bol') using this hook.
  308.      *Note:* If you set your Octave prompts to something different from
  309.      the defaults, make sure that `inferior-octave-prompt' matches them.
  310.      Otherwise, *nothing* will work, because Emacs will have no idea
  311.      when Octave is waiting for input, or done sending output.
  312. File: octave,  Node: Using the Emacs Info Reader for Octave,  Prev: Running Octave From Within Emacs,  Up: Emacs
  313. Using the Emacs Info Reader for Octave
  314. ======================================
  315.    You can also set up the Emacs Info reader for dealing with the
  316. results of Octave's `help -i'.  For this, the package `gnuserv' needs
  317. to be installed, which unfortunately still does not come with GNU Emacs
  318. (it does with XEmacs).  It can be retrieved from any GNU Emacs Lisp Code
  319. Directory archive, e.g.
  320. (ftp://ftp.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive), in the
  321. `packages' subdirectory.  The alpha version of an enhanced version of
  322. gnuserv is available at
  323. (ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz).
  324.    If `gnuserv' is installed, add the lines
  325.      (autoload 'octave-help "octave-hlp" nil t)
  326.      (require 'gnuserv)
  327.      (gnuserv-start)
  328. to your `.emacs' file.
  329.    You can use either `plain' Emacs Info or the function `octave-help'
  330. as your Octave info reader (for `help -i').  In the former case, set
  331. the Octave variable `INFO_PROGRAM' to `"info-emacs-info"'.  The latter
  332. is perhaps more attractive because it allows to look up keys in the
  333. indices of *several* info files related to Octave (provided that the
  334. Emacs variable `octave-help-files' is set correctly).  In this case,
  335. set `INFO_PROGRAM' to `"info-emacs-octave-help"'.
  336.    If you use Octave from within Emacs, these settings are best done in
  337. the `~/.emacs-octave' startup file (or the file pointed to by the Emacs
  338. variable `inferior-octave-startup-file').
  339.    % DO NOT EDIT!  Generated automatically by munge-texi.
  340. File: octave,  Node: Grammar,  Next: Copying,  Prev: Emacs,  Up: Top
  341. Grammar
  342. *******
  343.    Someday I hope to expand this to include a semi-formal description of
  344. Octave's language.
  345. * Menu:
  346. * Keywords::
  347. File: octave,  Node: Keywords,  Prev: Grammar,  Up: Grammar
  348. Keywords
  349. ========
  350.    The following identifiers are keywords, and may not be used as
  351. variable or function names:
  352.      all_va_args             endwhile
  353.      break                   for
  354.      case                    function
  355.      catch                   global
  356.      continue                gplot
  357.      else                    gsplot
  358.      elseif                  if
  359.      end                     otherwise
  360.      end_try_catch           return
  361.      end_unwind_protect      switch
  362.      endfor                  try
  363.      endfunction             unwind_protect
  364.      endif                   unwind_protect_cleanup
  365.      endswitch               while
  366.    The following command-like functions are also speical.  They may be
  367. used as simple variable names, but not as formal parameters for
  368. functions, or as the names of structure variables.  Failed assignments
  369. leave them undefined (you can recover the orginal definition as a
  370. function using clear).
  371.      casesen       echo          load          show
  372.      cd            edit_history  ls            type
  373.      chdir         format        more          which
  374.      clear         help          run_history   who
  375.      diary         history       save          whos
  376.      dir           hold          set
  377.    % DO NOT EDIT!  Generated automatically by munge-texi.
  378. File: octave,  Node: Copying,  Next: Concept Index,  Prev: Grammar,  Up: Top
  379. GNU GENERAL PUBLIC LICENSE
  380. **************************
  381.                          Version 2, June 1991
  382.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  383.      59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  384.      
  385.      Everyone is permitted to copy and distribute verbatim copies
  386.      of this license document, but changing it is not allowed.
  387. Preamble
  388. ========
  389.    The licenses for most software are designed to take away your
  390. freedom to share and change it.  By contrast, the GNU General Public
  391. License is intended to guarantee your freedom to share and change free
  392. software--to make sure the software is free for all its users.  This
  393. General Public License applies to most of the Free Software
  394. Foundation's software and to any other program whose authors commit to
  395. using it.  (Some other Free Software Foundation software is covered by
  396. the GNU Library General Public License instead.)  You can apply it to
  397. your programs, too.
  398.    When we speak of free software, we are referring to freedom, not
  399. price.  Our General Public Licenses are designed to make sure that you
  400. have the freedom to distribute copies of free software (and charge for
  401. this service if you wish), that you receive source code or can get it
  402. if you want it, that you can change the software or use pieces of it in
  403. new free programs; and that you know you can do these things.
  404.    To protect your rights, we need to make restrictions that forbid
  405. anyone to deny you these rights or to ask you to surrender the rights.
  406. These restrictions translate to certain responsibilities for you if you
  407. distribute copies of the software, or if you modify it.
  408.    For example, if you distribute copies of such a program, whether
  409. gratis or for a fee, you must give the recipients all the rights that
  410. you have.  You must make sure that they, too, receive or can get the
  411. source code.  And you must show them these terms so they know their
  412. rights.
  413.    We protect your rights with two steps: (1) copyright the software,
  414. and (2) offer you this license which gives you legal permission to copy,
  415. distribute and/or modify the software.
  416.    Also, for each author's protection and ours, we want to make certain
  417. that everyone understands that there is no warranty for this free
  418. software.  If the software is modified by someone else and passed on, we
  419. want its recipients to know that what they have is not the original, so
  420. that any problems introduced by others will not reflect on the original
  421. authors' reputations.
  422.    Finally, any free program is threatened constantly by software
  423. patents.  We wish to avoid the danger that redistributors of a free
  424. program will individually obtain patent licenses, in effect making the
  425. program proprietary.  To prevent this, we have made it clear that any
  426. patent must be licensed for everyone's free use or not licensed at all.
  427.    The precise terms and conditions for copying, distribution and
  428. modification follow.
  429.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  430.   0. This License applies to any program or other work which contains a
  431.      notice placed by the copyright holder saying it may be distributed
  432.      under the terms of this General Public License.  The "Program",
  433.      below, refers to any such program or work, and a "work based on
  434.      the Program" means either the Program or any derivative work under
  435.      copyright law: that is to say, a work containing the Program or a
  436.      portion of it, either verbatim or with modifications and/or
  437.      translated into another language.  (Hereinafter, translation is
  438.      included without limitation in the term "modification".)  Each
  439.      licensee is addressed as "you".
  440.      Activities other than copying, distribution and modification are
  441.      not covered by this License; they are outside its scope.  The act
  442.      of running the Program is not restricted, and the output from the
  443.      Program is covered only if its contents constitute a work based on
  444.      the Program (independent of having been made by running the
  445.      Program).  Whether that is true depends on what the Program does.
  446.   1. You may copy and distribute verbatim copies of the Program's
  447.      source code as you receive it, in any medium, provided that you
  448.      conspicuously and appropriately publish on each copy an appropriate
  449.      copyright notice and disclaimer of warranty; keep intact all the
  450.      notices that refer to this License and to the absence of any
  451.      warranty; and give any other recipients of the Program a copy of
  452.      this License along with the Program.
  453.      You may charge a fee for the physical act of transferring a copy,
  454.      and you may at your option offer warranty protection in exchange
  455.      for a fee.
  456.   2. You may modify your copy or copies of the Program or any portion
  457.      of it, thus forming a work based on the Program, and copy and
  458.      distribute such modifications or work under the terms of Section 1
  459.      above, provided that you also meet all of these conditions:
  460.        a. You must cause the modified files to carry prominent notices
  461.           stating that you changed the files and the date of any change.
  462.        b. You must cause any work that you distribute or publish, that
  463.           in whole or in part contains or is derived from the Program
  464.           or any part thereof, to be licensed as a whole at no charge
  465.           to all third parties under the terms of this License.
  466.        c. If the modified program normally reads commands interactively
  467.           when run, you must cause it, when started running for such
  468.           interactive use in the most ordinary way, to print or display
  469.           an announcement including an appropriate copyright notice and
  470.           a notice that there is no warranty (or else, saying that you
  471.           provide a warranty) and that users may redistribute the
  472.           program under these conditions, and telling the user how to
  473.           view a copy of this License.  (Exception: if the Program
  474.           itself is interactive but does not normally print such an
  475.           announcement, your work based on the Program is not required
  476.           to print an announcement.)
  477.      These requirements apply to the modified work as a whole.  If
  478.      identifiable sections of that work are not derived from the
  479.      Program, and can be reasonably considered independent and separate
  480.      works in themselves, then this License, and its terms, do not
  481.      apply to those sections when you distribute them as separate
  482.      works.  But when you distribute the same sections as part of a
  483.      whole which is a work based on the Program, the distribution of
  484.      the whole must be on the terms of this License, whose permissions
  485.      for other licensees extend to the entire whole, and thus to each
  486.      and every part regardless of who wrote it.
  487.      Thus, it is not the intent of this section to claim rights or
  488.      contest your rights to work written entirely by you; rather, the
  489.      intent is to exercise the right to control the distribution of
  490.      derivative or collective works based on the Program.
  491.      In addition, mere aggregation of another work not based on the
  492.      Program with the Program (or with a work based on the Program) on
  493.      a volume of a storage or distribution medium does not bring the
  494.      other work under the scope of this License.
  495.   3. You may copy and distribute the Program (or a work based on it,
  496.      under Section 2) in object code or executable form under the terms
  497.      of Sections 1 and 2 above provided that you also do one of the
  498.      following:
  499.        a. Accompany it with the complete corresponding machine-readable
  500.           source code, which must be distributed under the terms of
  501.           Sections 1 and 2 above on a medium customarily used for
  502.           software interchange; or,
  503.        b. Accompany it with a written offer, valid for at least three
  504.           years, to give any third party, for a charge no more than your
  505.           cost of physically performing source distribution, a complete
  506.           machine-readable copy of the corresponding source code, to be
  507.           distributed under the terms of Sections 1 and 2 above on a
  508.           medium customarily used for software interchange; or,
  509.        c. Accompany it with the information you received as to the offer
  510.           to distribute corresponding source code.  (This alternative is
  511.           allowed only for noncommercial distribution and only if you
  512.           received the program in object code or executable form with
  513.           such an offer, in accord with Subsection b above.)
  514.      The source code for a work means the preferred form of the work for
  515.      making modifications to it.  For an executable work, complete
  516.      source code means all the source code for all modules it contains,
  517.      plus any associated interface definition files, plus the scripts
  518.      used to control compilation and installation of the executable.
  519.      However, as a special exception, the source code distributed need
  520.      not include anything that is normally distributed (in either
  521.      source or binary form) with the major components (compiler,
  522.      kernel, and so on) of the operating system on which the executable
  523.      runs, unless that component itself accompanies the executable.
  524.      If distribution of executable or object code is made by offering
  525.      access to copy from a designated place, then offering equivalent
  526.      access to copy the source code from the same place counts as
  527.      distribution of the source code, even though third parties are not
  528.      compelled to copy the source along with the object code.
  529.   4. You may not copy, modify, sublicense, or distribute the Program
  530.      except as expressly provided under this License.  Any attempt
  531.      otherwise to copy, modify, sublicense or distribute the Program is
  532.      void, and will automatically terminate your rights under this
  533.      License.  However, parties who have received copies, or rights,
  534.      from you under this License will not have their licenses
  535.      terminated so long as such parties remain in full compliance.
  536.   5. You are not required to accept this License, since you have not
  537.      signed it.  However, nothing else grants you permission to modify
  538.      or distribute the Program or its derivative works.  These actions
  539.      are prohibited by law if you do not accept this License.
  540.      Therefore, by modifying or distributing the Program (or any work
  541.      based on the Program), you indicate your acceptance of this
  542.      License to do so, and all its terms and conditions for copying,
  543.      distributing or modifying the Program or works based on it.
  544.   6. Each time you redistribute the Program (or any work based on the
  545.      Program), the recipient automatically receives a license from the
  546.      original licensor to copy, distribute or modify the Program
  547.      subject to these terms and conditions.  You may not impose any
  548.      further restrictions on the recipients' exercise of the rights
  549.      granted herein.  You are not responsible for enforcing compliance
  550.      by third parties to this License.
  551.   7. If, as a consequence of a court judgment or allegation of patent
  552.      infringement or for any other reason (not limited to patent
  553.      issues), conditions are imposed on you (whether by court order,
  554.      agreement or otherwise) that contradict the conditions of this
  555.      License, they do not excuse you from the conditions of this
  556.      License.  If you cannot distribute so as to satisfy simultaneously
  557.      your obligations under this License and any other pertinent
  558.      obligations, then as a consequence you may not distribute the
  559.      Program at all.  For example, if a patent license would not permit
  560.      royalty-free redistribution of the Program by all those who
  561.      receive copies directly or indirectly through you, then the only
  562.      way you could satisfy both it and this License would be to refrain
  563.      entirely from distribution of the Program.
  564.      If any portion of this section is held invalid or unenforceable
  565.      under any particular circumstance, the balance of the section is
  566.      intended to apply and the section as a whole is intended to apply
  567.      in other circumstances.
  568.      It is not the purpose of this section to induce you to infringe any
  569.      patents or other property right claims or to contest validity of
  570.      any such claims; this section has the sole purpose of protecting
  571.      the integrity of the free software distribution system, which is
  572.      implemented by public license practices.  Many people have made
  573.      generous contributions to the wide range of software distributed
  574.      through that system in reliance on consistent application of that
  575.      system; it is up to the author/donor to decide if he or she is
  576.      willing to distribute software through any other system and a
  577.      licensee cannot impose that choice.
  578.      This section is intended to make thoroughly clear what is believed
  579.      to be a consequence of the rest of this License.
  580.   8. If the distribution and/or use of the Program is restricted in
  581.      certain countries either by patents or by copyrighted interfaces,
  582.      the original copyright holder who places the Program under this
  583.      License may add an explicit geographical distribution limitation
  584.      excluding those countries, so that distribution is permitted only
  585.      in or among countries not thus excluded.  In such case, this
  586.      License incorporates the limitation as if written in the body of
  587.      this License.
  588.   9. The Free Software Foundation may publish revised and/or new
  589.      versions of the General Public License from time to time.  Such
  590.      new versions will be similar in spirit to the present version, but
  591.      may differ in detail to address new problems or concerns.
  592.      Each version is given a distinguishing version number.  If the
  593.      Program specifies a version number of this License which applies
  594.      to it and "any later version", you have the option of following
  595.      the terms and conditions either of that version or of any later
  596.      version published by the Free Software Foundation.  If the Program
  597.      does not specify a version number of this License, you may choose
  598.      any version ever published by the Free Software Foundation.
  599.  10. If you wish to incorporate parts of the Program into other free
  600.      programs whose distribution conditions are different, write to the
  601.      author to ask for permission.  For software which is copyrighted
  602.      by the Free Software Foundation, write to the Free Software
  603.      Foundation; we sometimes make exceptions for this.  Our decision
  604.      will be guided by the two goals of preserving the free status of
  605.      all derivatives of our free software and of promoting the sharing
  606.      and reuse of software generally.
  607.                                 NO WARRANTY
  608.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  609.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  610.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  611.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  612.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  613.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  614.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  615.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  616.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  617.      SERVICING, REPAIR OR CORRECTION.
  618.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  619.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  620.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  621.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  622.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  623.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  624.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  625.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  626.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  627.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  628.                       END OF TERMS AND CONDITIONS
  629. Appendix: How to Apply These Terms to Your New Programs
  630. =======================================================
  631.    If you develop a new program, and you want it to be of the greatest
  632. possible use to the public, the best way to achieve this is to make it
  633. free software which everyone can redistribute and change under these
  634. terms.
  635.    To do so, attach the following notices to the program.  It is safest
  636. to attach them to the start of each source file to most effectively
  637. convey the exclusion of warranty; and each file should have at least
  638. the "copyright" line and a pointer to where the full notice is found.
  639.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  640.      Copyright (C) 19YY  NAME OF AUTHOR
  641.      
  642.      This program is free software; you can redistribute it and/or modify
  643.      it under the terms of the GNU General Public License as published by
  644.      the Free Software Foundation; either version 2 of the License, or
  645.      (at your option) any later version.
  646.      
  647.      This program is distributed in the hope that it will be useful,
  648.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  649.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  650.      GNU General Public License for more details.
  651.      
  652.      You should have received a copy of the GNU General Public License
  653.      along with this program; if not, write to the Free Software
  654.      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  655.      02111-1307, USA.
  656.    Also add information on how to contact you by electronic and paper
  657. mail.
  658.    If the program is interactive, make it output a short notice like
  659. this when it starts in an interactive mode:
  660.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  661.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  662.      type `show w'.  This is free software, and you are welcome
  663.      to redistribute it under certain conditions; type `show c'
  664.      for details.
  665.    The hypothetical commands `show w' and `show c' should show the
  666. appropriate parts of the General Public License.  Of course, the
  667. commands you use may be called something other than `show w' and `show
  668. c'; they could even be mouse-clicks or menu items--whatever suits your
  669. program.
  670.    You should also get your employer (if you work as a programmer) or
  671. your school, if any, to sign a "copyright disclaimer" for the program,
  672. if necessary.  Here is a sample; alter the names:
  673.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  674.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  675.      
  676.      SIGNATURE OF TY COON, 1 April 1989
  677.      Ty Coon, President of Vice
  678.    This General Public License does not permit incorporating your
  679. program into proprietary programs.  If your program is a subroutine
  680. library, you may consider it more useful to permit linking proprietary
  681. applications with the library.  If this is what you want to do, use the
  682. GNU Library General Public License instead of this License.
  683.    % DO NOT EDIT!  Generated automatically by munge-texi.
  684.