home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-09 | 53.9 KB | 1,417 lines |
- Newsgroups: comp.sources.misc
- From: torsten@diku.dk (Torsten Poulin Nielsen)
- Subject: v41i084: p2latex - Pascal to LaTeX v1.0, Part02/03
- Message-ID: <1994Jan10.035552.13730@sparky.sterling.com>
- X-Md4-Signature: 30d3bc707c3bc5f81604f58a962bbe00
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Mon, 10 Jan 1994 03:55:52 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: torsten@diku.dk (Torsten Poulin Nielsen)
- Posting-number: Volume 41, Issue 84
- Archive-name: p2latex/part02
- Environment: UNIX, AmigaDOS
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: LICENSE Makefile.amiga allocate.c getopt.c p2latex.0.UU
- # version.c
- # Wrapped by kent@sparky on Sun Jan 9 21:45:40 1994
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 2 (of 3)."'
- if test -f 'LICENSE' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'LICENSE'\"
- else
- echo shar: Extracting \"'LICENSE'\" \(17983 characters\)
- sed "s/^X//" >'LICENSE' <<'END_OF_FILE'
- X
- X GNU GENERAL PUBLIC LICENSE
- X Version 2, June 1991
- X
- X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- X 675 Mass Ave, Cambridge, MA 02139, USA
- X Everyone is permitted to copy and distribute verbatim copies
- X of this license document, but changing it is not allowed.
- X
- X Preamble
- X
- X The licenses for most software are designed to take away your
- Xfreedom to share and change it. By contrast, the GNU General Public
- XLicense is intended to guarantee your freedom to share and change free
- Xsoftware--to make sure the software is free for all its users. This
- XGeneral Public License applies to most of the Free Software
- XFoundation's software and to any other program whose authors commit to
- Xusing it. (Some other Free Software Foundation software is covered by
- Xthe GNU Library General Public License instead.) You can apply it to
- Xyour programs, too.
- X
- X When we speak of free software, we are referring to freedom, not
- Xprice. Our General Public Licenses are designed to make sure that you
- Xhave the freedom to distribute copies of free software (and charge for
- Xthis service if you wish), that you receive source code or can get it
- Xif you want it, that you can change the software or use pieces of it
- Xin new free programs; and that you know you can do these things.
- X
- X To protect your rights, we need to make restrictions that forbid
- Xanyone to deny you these rights or to ask you to surrender the rights.
- XThese restrictions translate to certain responsibilities for you if you
- Xdistribute copies of the software, or if you modify it.
- X
- X For example, if you distribute copies of such a program, whether
- Xgratis or for a fee, you must give the recipients all the rights that
- Xyou have. You must make sure that they, too, receive or can get the
- Xsource code. And you must show them these terms so they know their
- Xrights.
- X
- X We protect your rights with two steps: (1) copyright the software, and
- X(2) offer you this license which gives you legal permission to copy,
- Xdistribute and/or modify the software.
- X
- X Also, for each author's protection and ours, we want to make certain
- Xthat everyone understands that there is no warranty for this free
- Xsoftware. If the software is modified by someone else and passed on, we
- Xwant its recipients to know that what they have is not the original, so
- Xthat any problems introduced by others will not reflect on the original
- Xauthors' reputations.
- X
- X Finally, any free program is threatened constantly by software
- Xpatents. We wish to avoid the danger that redistributors of a free
- Xprogram will individually obtain patent licenses, in effect making the
- Xprogram proprietary. To prevent this, we have made it clear that any
- Xpatent must be licensed for everyone's free use or not licensed at all.
- X
- X The precise terms and conditions for copying, distribution and
- Xmodification follow.
- X
- X GNU GENERAL PUBLIC LICENSE
- X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- X
- X 0. This License applies to any program or other work which contains
- Xa notice placed by the copyright holder saying it may be distributed
- Xunder the terms of this General Public License. The "Program", below,
- Xrefers to any such program or work, and a "work based on the Program"
- Xmeans either the Program or any derivative work under copyright law:
- Xthat is to say, a work containing the Program or a portion of it,
- Xeither verbatim or with modifications and/or translated into another
- Xlanguage. (Hereinafter, translation is included without limitation in
- Xthe term "modification".) Each licensee is addressed as "you".
- X
- XActivities other than copying, distribution and modification are not
- Xcovered by this License; they are outside its scope. The act of
- Xrunning the Program is not restricted, and the output from the Program
- Xis covered only if its contents constitute a work based on the
- XProgram (independent of having been made by running the Program).
- XWhether that is true depends on what the Program does.
- X
- X 1. You may copy and distribute verbatim copies of the Program's
- Xsource code as you receive it, in any medium, provided that you
- Xconspicuously and appropriately publish on each copy an appropriate
- Xcopyright notice and disclaimer of warranty; keep intact all the
- Xnotices that refer to this License and to the absence of any warranty;
- Xand give any other recipients of the Program a copy of this License
- Xalong with the Program.
- X
- XYou may charge a fee for the physical act of transferring a copy, and
- Xyou may at your option offer warranty protection in exchange for a fee.
- X
- X 2. You may modify your copy or copies of the Program or any portion
- Xof it, thus forming a work based on the Program, and copy and
- Xdistribute such modifications or work under the terms of Section 1
- Xabove, provided that you also meet all of these conditions:
- X
- X a) You must cause the modified files to carry prominent notices
- X stating that you changed the files and the date of any change.
- X
- X b) You must cause any work that you distribute or publish, that in
- X whole or in part contains or is derived from the Program or any
- X part thereof, to be licensed as a whole at no charge to all third
- X parties under the terms of this License.
- X
- X c) If the modified program normally reads commands interactively
- X when run, you must cause it, when started running for such
- X interactive use in the most ordinary way, to print or display an
- X announcement including an appropriate copyright notice and a
- X notice that there is no warranty (or else, saying that you provide
- X a warranty) and that users may redistribute the program under
- X these conditions, and telling the user how to view a copy of this
- X License. (Exception: if the Program itself is interactive but
- X does not normally print such an announcement, your work based on
- X the Program is not required to print an announcement.)
- X
- XThese requirements apply to the modified work as a whole. If
- Xidentifiable sections of that work are not derived from the Program,
- Xand can be reasonably considered independent and separate works in
- Xthemselves, then this License, and its terms, do not apply to those
- Xsections when you distribute them as separate works. But when you
- Xdistribute the same sections as part of a whole which is a work based
- Xon the Program, the distribution of the whole must be on the terms of
- Xthis License, whose permissions for other licensees extend to the
- Xentire whole, and thus to each and every part regardless of who wrote it.
- X
- XThus, it is not the intent of this section to claim rights or contest
- Xyour rights to work written entirely by you; rather, the intent is to
- Xexercise the right to control the distribution of derivative or
- Xcollective works based on the Program.
- X
- XIn addition, mere aggregation of another work not based on the Program
- Xwith the Program (or with a work based on the Program) on a volume of
- Xa storage or distribution medium does not bring the other work under
- Xthe scope of this License.
- X
- X 3. You may copy and distribute the Program (or a work based on it,
- Xunder Section 2) in object code or executable form under the terms of
- XSections 1 and 2 above provided that you also do one of the following:
- X
- X a) Accompany it with the complete corresponding machine-readable
- X source code, which must be distributed under the terms of Sections
- X 1 and 2 above on a medium customarily used for software interchange; or,
- X
- X b) Accompany it with a written offer, valid for at least three
- X years, to give any third party, for a charge no more than your
- X cost of physically performing source distribution, a complete
- X machine-readable copy of the corresponding source code, to be
- X distributed under the terms of Sections 1 and 2 above on a medium
- X customarily used for software interchange; or,
- X
- X c) Accompany it with the information you received as to the offer
- X to distribute corresponding source code. (This alternative is
- X allowed only for noncommercial distribution and only if you
- X received the program in object code or executable form with such
- X an offer, in accord with Subsection b above.)
- X
- XThe source code for a work means the preferred form of the work for
- Xmaking modifications to it. For an executable work, complete source
- Xcode means all the source code for all modules it contains, plus any
- Xassociated interface definition files, plus the scripts used to
- Xcontrol compilation and installation of the executable. However, as a
- Xspecial exception, the source code distributed need not include
- Xanything that is normally distributed (in either source or binary
- Xform) with the major components (compiler, kernel, and so on) of the
- Xoperating system on which the executable runs, unless that component
- Xitself accompanies the executable.
- X
- XIf distribution of executable or object code is made by offering
- Xaccess to copy from a designated place, then offering equivalent
- Xaccess to copy the source code from the same place counts as
- Xdistribution of the source code, even though third parties are not
- Xcompelled to copy the source along with the object code.
- X
- X 4. You may not copy, modify, sublicense, or distribute the Program
- Xexcept as expressly provided under this License. Any attempt
- Xotherwise to copy, modify, sublicense or distribute the Program is
- Xvoid, and will automatically terminate your rights under this License.
- XHowever, parties who have received copies, or rights, from you under
- Xthis License will not have their licenses terminated so long as such
- Xparties remain in full compliance.
- X
- X 5. You are not required to accept this License, since you have not
- Xsigned it. However, nothing else grants you permission to modify or
- Xdistribute the Program or its derivative works. These actions are
- Xprohibited by law if you do not accept this License. Therefore, by
- Xmodifying or distributing the Program (or any work based on the
- XProgram), you indicate your acceptance of this License to do so, and
- Xall its terms and conditions for copying, distributing or modifying
- Xthe Program or works based on it.
- X
- X 6. Each time you redistribute the Program (or any work based on the
- XProgram), the recipient automatically receives a license from the
- Xoriginal licensor to copy, distribute or modify the Program subject to
- Xthese terms and conditions. You may not impose any further
- Xrestrictions on the recipients' exercise of the rights granted herein.
- XYou are not responsible for enforcing compliance by third parties to
- Xthis License.
- X
- X 7. If, as a consequence of a court judgment or allegation of patent
- Xinfringement or for any other reason (not limited to patent issues),
- Xconditions are imposed on you (whether by court order, agreement or
- Xotherwise) that contradict the conditions of this License, they do not
- Xexcuse you from the conditions of this License. If you cannot
- Xdistribute so as to satisfy simultaneously your obligations under this
- XLicense and any other pertinent obligations, then as a consequence you
- Xmay not distribute the Program at all. For example, if a patent
- Xlicense would not permit royalty-free redistribution of the Program by
- Xall those who receive copies directly or indirectly through you, then
- Xthe only way you could satisfy both it and this License would be to
- Xrefrain entirely from distribution of the Program.
- X
- XIf any portion of this section is held invalid or unenforceable under
- Xany particular circumstance, the balance of the section is intended to
- Xapply and the section as a whole is intended to apply in other
- Xcircumstances.
- X
- XIt is not the purpose of this section to induce you to infringe any
- Xpatents or other property right claims or to contest validity of any
- Xsuch claims; this section has the sole purpose of protecting the
- Xintegrity of the free software distribution system, which is
- Ximplemented by public license practices. Many people have made
- Xgenerous contributions to the wide range of software distributed
- Xthrough that system in reliance on consistent application of that
- Xsystem; it is up to the author/donor to decide if he or she is willing
- Xto distribute software through any other system and a licensee cannot
- Ximpose that choice.
- X
- XThis section is intended to make thoroughly clear what is believed to
- Xbe a consequence of the rest of this License.
- X
- X 8. If the distribution and/or use of the Program is restricted in
- Xcertain countries either by patents or by copyrighted interfaces, the
- Xoriginal copyright holder who places the Program under this License
- Xmay add an explicit geographical distribution limitation excluding
- Xthose countries, so that distribution is permitted only in or among
- Xcountries not thus excluded. In such case, this License incorporates
- Xthe limitation as if written in the body of this License.
- X
- X 9. The Free Software Foundation may publish revised and/or new versions
- Xof the General Public License from time to time. Such new versions will
- Xbe similar in spirit to the present version, but may differ in detail to
- Xaddress new problems or concerns.
- X
- XEach version is given a distinguishing version number. If the Program
- Xspecifies a version number of this License which applies to it and "any
- Xlater version", you have the option of following the terms and conditions
- Xeither of that version or of any later version published by the Free
- XSoftware Foundation. If the Program does not specify a version number of
- Xthis License, you may choose any version ever published by the Free Software
- XFoundation.
- X
- X 10. If you wish to incorporate parts of the Program into other free
- Xprograms whose distribution conditions are different, write to the author
- Xto ask for permission. For software which is copyrighted by the Free
- XSoftware Foundation, write to the Free Software Foundation; we sometimes
- Xmake exceptions for this. Our decision will be guided by the two goals
- Xof preserving the free status of all derivatives of our free software and
- Xof promoting the sharing and reuse of software generally.
- X
- X NO WARRANTY
- X
- X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
- XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
- XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
- XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
- XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
- XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
- XREPAIR OR CORRECTION.
- X
- X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
- XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
- XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
- XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
- XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
- XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- XPOSSIBILITY OF SUCH DAMAGES.
- X
- X END OF TERMS AND CONDITIONS
- X
- X Appendix: How to Apply These Terms to Your New Programs
- X
- X If you develop a new program, and you want it to be of the greatest
- Xpossible use to the public, the best way to achieve this is to make it
- Xfree software which everyone can redistribute and change under these terms.
- X
- X To do so, attach the following notices to the program. It is safest
- Xto attach them to the start of each source file to most effectively
- Xconvey the exclusion of warranty; and each file should have at least
- Xthe "copyright" line and a pointer to where the full notice is found.
- X
- X <one line to give the program's name and a brief idea of what it does.>
- X Copyright (C) 19yy <name of author>
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 2 of the License, or
- X (at your option) any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- XAlso add information on how to contact you by electronic and paper mail.
- X
- XIf the program is interactive, make it output a short notice like this
- Xwhen it starts in an interactive mode:
- X
- X Gnomovision version 69, Copyright (C) 19yy name of author
- X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- X This is free software, and you are welcome to redistribute it
- X under certain conditions; type `show c' for details.
- X
- XThe hypothetical commands `show w' and `show c' should show the appropriate
- Xparts of the General Public License. Of course, the commands you use may
- Xbe called something other than `show w' and `show c'; they could even be
- Xmouse-clicks or menu items--whatever suits your program.
- X
- XYou should also get your employer (if you work as a programmer) or your
- Xschool, if any, to sign a "copyright disclaimer" for the program, if
- Xnecessary. Here is a sample; alter the names:
- X
- X Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- X `Gnomovision' (which makes passes at compilers) written by James Hacker.
- X
- X <signature of Ty Coon>, 1 April 1989
- X Ty Coon, President of Vice
- X
- XThis General Public License does not permit incorporating your program into
- Xproprietary programs. If your program is a subroutine library, you may
- Xconsider it more useful to permit linking proprietary applications with the
- Xlibrary. If this is what you want to do, use the GNU Library General
- XPublic License instead of this License.
- END_OF_FILE
- if test 17983 -ne `wc -c <'LICENSE'`; then
- echo shar: \"'LICENSE'\" unpacked with wrong size!
- fi
- # end of 'LICENSE'
- fi
- if test -f 'Makefile.amiga' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Makefile.amiga'\"
- else
- echo shar: Extracting \"'Makefile.amiga'\" \(888 characters\)
- sed "s/^X//" >'Makefile.amiga' <<'END_OF_FILE'
- X#
- X# Amiga Makefile for p2latex (SAS/C v5.10b)
- X# Torsten Poulin <torsten@diku.dk>
- X#
- X
- XPRG = p2latex
- X
- XLEX = flex
- XLEXOPTS = -i -8
- X# ^ so we can handle 8-bit char sets
- X
- XROFF = groff
- XROFFOPTS = -Tlatin1
- X
- XCC = lc
- XLCFLAGS = -cis -v -O -mt
- XLINKER = blink
- XBLINKFLAGS = nodebug smallcode smalldata
- XLIBS = lib:lc.lib
- XSTARTUP = lib:c.o
- X
- XOBJ = alloca.o p2latex.o main.o getopt.o getopt1.o \
- X version.o allocate.o
- X
- X
- X$(PRG): $(OBJ)
- X $(LINKER) $(STARTUP) $(OBJ) lib $(LIBS) $(BLINKFLAGS) to $(PRG)
- X
- X.c.o:
- X $(CC) $(LCFLAGS) $*
- X
- X.l.c:
- X $(LEX) $(LEXOPTS) $<
- X copy clone lex.yy.c $*.c
- X -delete lex.yy.c
- X
- Xmanual: p2latex.1
- X $(ROFF) $(ROFFOPTS) -man p2latex.1 > p2latex.0
- X
- Xclean:
- X -delete $(OBJ)
- X
- Xalloca.o: alloca.c
- Xp2latex.c: p2latex.l
- Xp2latex.o: p2latex.c
- Xmain.o: main.c getopt.h
- Xgetopt.o: getopt.c getopt.h
- Xgetopt1.o: getopt1.c getopt.h
- Xversion.o: version.c
- Xallocate.o: allocate.c
- END_OF_FILE
- if test 888 -ne `wc -c <'Makefile.amiga'`; then
- echo shar: \"'Makefile.amiga'\" unpacked with wrong size!
- fi
- # end of 'Makefile.amiga'
- fi
- if test -f 'allocate.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'allocate.c'\"
- else
- echo shar: Extracting \"'allocate.c'\" \(1311 characters\)
- sed "s/^X//" >'allocate.c' <<'END_OF_FILE'
- X/* Allocate and clear storage for bison,
- X Copyright (C) 1984, 1989 Free Software Foundation, Inc.
- X
- XThis file is part of Bison, the GNU Compiler Compiler.
- X
- XBison is free software; you can redistribute it and/or modify
- Xit under the terms of the GNU General Public License as published by
- Xthe Free Software Foundation; either version 2, or (at your option)
- Xany later version.
- X
- XBison is distributed in the hope that it will be useful,
- Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
- XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- XGNU General Public License for more details.
- X
- XYou should have received a copy of the GNU General Public License
- Xalong with Bison; see the file COPYING. If not, write to
- Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
- X
- X
- X#include <stdio.h>
- X
- Xextern char *calloc();
- Xextern void done();
- X
- Xextern char *program_name;
- X
- Xchar *
- Xmallocate(n)
- Xregister unsigned n;
- X{
- X register char *block;
- X
- X /* Avoid uncertainty about what an arg of 0 will do. */
- X if (n == 0)
- X n = 1;
- X block = calloc(n,1);
- X if (block == NULL)
- X {
- X fprintf(stderr, "%s: memory exhausted\n", program_name);
- X exit(1);
- X }
- X
- X return (block);
- X}
- X
- X/* This name is used by alloca.c. */
- X
- Xchar *
- Xxmalloc (n)
- X unsigned int n;
- X{
- X return mallocate (n);
- X}
- END_OF_FILE
- if test 1311 -ne `wc -c <'allocate.c'`; then
- echo shar: \"'allocate.c'\" unpacked with wrong size!
- fi
- # end of 'allocate.c'
- fi
- if test -f 'getopt.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'getopt.c'\"
- else
- echo shar: Extracting \"'getopt.c'\" \(18791 characters\)
- sed "s/^X//" >'getopt.c' <<'END_OF_FILE'
- X/* Getopt for GNU.
- X NOTE: getopt is now part of the C library, so if you don't know what
- X "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
- X before changing it!
- X
- X Copyright (C) 1987, 88, 89, 90, 91, 1992 Free Software Foundation, Inc.
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 2, or (at your option)
- X any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
- X
- X/* AIX requires this to be the first thing in the file. */
- X#ifdef __GNUC__
- X#define alloca __builtin_alloca
- X#else /* not __GNUC__ */
- X#ifdef sparc
- X#include <alloca.h>
- X#else
- X#ifdef _AIX
- X #pragma alloca
- X#else
- Xchar *alloca ();
- X#endif
- X#endif /* sparc */
- X#endif /* not __GNUC__ */
- X
- X#ifdef LIBC
- X/* For when compiled as part of the GNU C library. */
- X#include <ansidecl.h>
- X#endif
- X
- X#include <stdio.h>
- X
- X/* This needs to come after some library #include
- X to get __GNU_LIBRARY__ defined. */
- X#ifdef __GNU_LIBRARY__
- X#undef alloca
- X#include <stdlib.h>
- X#else /* Not GNU C library. */
- X#define __alloca alloca
- X#endif /* GNU C library. */
- X
- X
- X#ifndef __STDC__
- X#define const
- X#endif
- X
- X/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
- X long-named option. Because this is not POSIX.2 compliant, it is
- X being phased out. */
- X#define GETOPT_COMPAT
- X
- X/* This version of `getopt' appears to the caller like standard Unix `getopt'
- X but it behaves differently for the user, since it allows the user
- X to intersperse the options with the other arguments.
- X
- X As `getopt' works, it permutes the elements of ARGV so that,
- X when it is done, all the options precede everything else. Thus
- X all application programs are extended to handle flexible argument order.
- X
- X Setting the environment variable POSIXLY_CORRECT disables permutation.
- X Then the behavior is completely standard.
- X
- X GNU application programs can use a third alternative mode in which
- X they can distinguish the relative order of options and other arguments. */
- X
- X#include "getopt.h"
- X
- X/* For communication from `getopt' to the caller.
- X When `getopt' finds an option that takes an argument,
- X the argument value is returned here.
- X Also, when `ordering' is RETURN_IN_ORDER,
- X each non-option ARGV-element is returned here. */
- X
- Xchar *optarg = 0;
- X
- X/* Index in ARGV of the next element to be scanned.
- X This is used for communication to and from the caller
- X and for communication between successive calls to `getopt'.
- X
- X On entry to `getopt', zero means this is the first call; initialize.
- X
- X When `getopt' returns EOF, this is the index of the first of the
- X non-option elements that the caller should itself scan.
- X
- X Otherwise, `optind' communicates from one call to the next
- X how much of ARGV has been scanned so far. */
- X
- Xint optind = 0;
- X
- X/* The next char to be scanned in the option-element
- X in which the last option character we returned was found.
- X This allows us to pick up the scan where we left off.
- X
- X If this is zero, or a null string, it means resume the scan
- X by advancing to the next ARGV-element. */
- X
- Xstatic char *nextchar;
- X
- X/* Callers store zero here to inhibit the error message
- X for unrecognized options. */
- X
- Xint opterr = 1;
- X
- X/* Describe how to deal with options that follow non-option ARGV-elements.
- X
- X If the caller did not specify anything,
- X the default is REQUIRE_ORDER if the environment variable
- X POSIXLY_CORRECT is defined, PERMUTE otherwise.
- X
- X REQUIRE_ORDER means don't recognize them as options;
- X stop option processing when the first non-option is seen.
- X This is what Unix does.
- X This mode of operation is selected by either setting the environment
- X variable POSIXLY_CORRECT, or using `+' as the first character
- X of the list of option characters.
- X
- X PERMUTE is the default. We permute the contents of ARGV as we scan,
- X so that eventually all the non-options are at the end. This allows options
- X to be given in any order, even with programs that were not written to
- X expect this.
- X
- X RETURN_IN_ORDER is an option available to programs that were written
- X to expect options and other ARGV-elements in any order and that care about
- X the ordering of the two. We describe each non-option ARGV-element
- X as if it were the argument of an option with character code 1.
- X Using `-' as the first character of the list of option characters
- X selects this mode of operation.
- X
- X The special argument `--' forces an end of option-scanning regardless
- X of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- X `--' can cause `getopt' to return EOF with `optind' != ARGC. */
- X
- Xstatic enum
- X{
- X REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
- X} ordering;
- X
- X#ifdef __GNU_LIBRARY__
- X#include <string.h>
- X#define my_index strchr
- X#define my_bcopy(src, dst, n) memcpy ((dst), (src), (n))
- X#else
- X
- X/* Avoid depending on library functions or files
- X whose names are inconsistent. */
- X
- Xchar *getenv ();
- X
- Xstatic char *
- Xmy_index (string, chr)
- X char *string;
- X int chr;
- X{
- X while (*string)
- X {
- X if (*string == chr)
- X return string;
- X string++;
- X }
- X return 0;
- X}
- X
- Xstatic void
- Xmy_bcopy (from, to, size)
- X char *from, *to;
- X int size;
- X{
- X int i;
- X for (i = 0; i < size; i++)
- X to[i] = from[i];
- X}
- X#endif /* GNU C library. */
- X
- X/* Handle permutation of arguments. */
- X
- X/* Describe the part of ARGV that contains non-options that have
- X been skipped. `first_nonopt' is the index in ARGV of the first of them;
- X `last_nonopt' is the index after the last of them. */
- X
- Xstatic int first_nonopt;
- Xstatic int last_nonopt;
- X
- X/* Exchange two adjacent subsequences of ARGV.
- X One subsequence is elements [first_nonopt,last_nonopt)
- X which contains all the non-options that have been skipped so far.
- X The other is elements [last_nonopt,optind), which contains all
- X the options processed since those non-options were skipped.
- X
- X `first_nonopt' and `last_nonopt' are relocated so that they describe
- X the new indices of the non-options in ARGV after they are moved. */
- X
- Xstatic void
- Xexchange (argv)
- X char **argv;
- X{
- X int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
- X char **temp = (char **) __alloca (nonopts_size);
- X
- X /* Interchange the two blocks of data in ARGV. */
- X
- X my_bcopy (&argv[first_nonopt], temp, nonopts_size);
- X my_bcopy (&argv[last_nonopt], &argv[first_nonopt],
- X (optind - last_nonopt) * sizeof (char *));
- X my_bcopy (temp, &argv[first_nonopt + optind - last_nonopt], nonopts_size);
- X
- X /* Update records for the slots the non-options now occupy. */
- X
- X first_nonopt += (optind - last_nonopt);
- X last_nonopt = optind;
- X}
- X
- X/* Scan elements of ARGV (whose length is ARGC) for option characters
- X given in OPTSTRING.
- X
- X If an element of ARGV starts with '-', and is not exactly "-" or "--",
- X then it is an option element. The characters of this element
- X (aside from the initial '-') are option characters. If `getopt'
- X is called repeatedly, it returns successively each of the option characters
- X from each of the option elements.
- X
- X If `getopt' finds another option character, it returns that character,
- X updating `optind' and `nextchar' so that the next call to `getopt' can
- X resume the scan with the following option character or ARGV-element.
- X
- X If there are no more option characters, `getopt' returns `EOF'.
- X Then `optind' is the index in ARGV of the first ARGV-element
- X that is not an option. (The ARGV-elements have been permuted
- X so that those that are not options now come last.)
- X
- X OPTSTRING is a string containing the legitimate option characters.
- X If an option character is seen that is not listed in OPTSTRING,
- X return '?' after printing an error message. If you set `opterr' to
- X zero, the error message is suppressed but we still return '?'.
- X
- X If a char in OPTSTRING is followed by a colon, that means it wants an arg,
- X so the following text in the same ARGV-element, or the text of the following
- X ARGV-element, is returned in `optarg'. Two colons mean an option that
- X wants an optional arg; if there is text in the current ARGV-element,
- X it is returned in `optarg', otherwise `optarg' is set to zero.
- X
- X If OPTSTRING starts with `-' or `+', it requests different methods of
- X handling the non-option ARGV-elements.
- X See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
- X
- X Long-named options begin with `--' instead of `-'.
- X Their names may be abbreviated as long as the abbreviation is unique
- X or is an exact match for some defined option. If they have an
- X argument, it follows the option name in the same ARGV-element, separated
- X from the option name by a `=', or else the in next ARGV-element.
- X When `getopt' finds a long-named option, it returns 0 if that option's
- X `flag' field is nonzero, the value of the option's `val' field
- X if the `flag' field is zero.
- X
- X The elements of ARGV aren't really const, because we permute them.
- X But we pretend they're const in the prototype to be compatible
- X with other systems.
- X
- X LONGOPTS is a vector of `struct option' terminated by an
- X element containing a name which is zero.
- X
- X LONGIND returns the index in LONGOPT of the long-named option found.
- X It is only valid when a long-named option has been found by the most
- X recent call.
- X
- X If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- X long-named options. */
- X
- Xint
- X_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- X int argc;
- X char *const *argv;
- X const char *optstring;
- X const struct option *longopts;
- X int *longind;
- X int long_only;
- X{
- X int option_index;
- X
- X optarg = 0;
- X
- X /* Initialize the internal data when the first call is made.
- X Start processing options with ARGV-element 1 (since ARGV-element 0
- X is the program name); the sequence of previously skipped
- X non-option ARGV-elements is empty. */
- X
- X if (optind == 0)
- X {
- X first_nonopt = last_nonopt = optind = 1;
- X
- X nextchar = NULL;
- X
- X /* Determine how to handle the ordering of options and nonoptions. */
- X
- X if (optstring[0] == '-')
- X {
- X ordering = RETURN_IN_ORDER;
- X ++optstring;
- X }
- X else if (optstring[0] == '+')
- X {
- X ordering = REQUIRE_ORDER;
- X ++optstring;
- X }
- X else if (getenv ("POSIXLY_CORRECT") != NULL)
- X ordering = REQUIRE_ORDER;
- X else
- X ordering = PERMUTE;
- X }
- X
- X if (nextchar == NULL || *nextchar == '\0')
- X {
- X if (ordering == PERMUTE)
- X {
- X /* If we have just processed some options following some non-options,
- X exchange them so that the options come first. */
- X
- X if (first_nonopt != last_nonopt && last_nonopt != optind)
- X exchange ((char **) argv);
- X else if (last_nonopt != optind)
- X first_nonopt = optind;
- X
- X /* Now skip any additional non-options
- X and extend the range of non-options previously skipped. */
- X
- X while (optind < argc
- X && (argv[optind][0] != '-' || argv[optind][1] == '\0')
- X#ifdef GETOPT_COMPAT
- X && (longopts == NULL
- X || argv[optind][0] != '+' || argv[optind][1] == '\0')
- X#endif /* GETOPT_COMPAT */
- X )
- X optind++;
- X last_nonopt = optind;
- X }
- X
- X /* Special ARGV-element `--' means premature end of options.
- X Skip it like a null option,
- X then exchange with previous non-options as if it were an option,
- X then skip everything else like a non-option. */
- X
- X if (optind != argc && !strcmp (argv[optind], "--"))
- X {
- X optind++;
- X
- X if (first_nonopt != last_nonopt && last_nonopt != optind)
- X exchange ((char **) argv);
- X else if (first_nonopt == last_nonopt)
- X first_nonopt = optind;
- X last_nonopt = argc;
- X
- X optind = argc;
- X }
- X
- X /* If we have done all the ARGV-elements, stop the scan
- X and back over any non-options that we skipped and permuted. */
- X
- X if (optind == argc)
- X {
- X /* Set the next-arg-index to point at the non-options
- X that we previously skipped, so the caller will digest them. */
- X if (first_nonopt != last_nonopt)
- X optind = first_nonopt;
- X return EOF;
- X }
- X
- X /* If we have come to a non-option and did not permute it,
- X either stop the scan or describe it to the caller and pass it by. */
- X
- X if ((argv[optind][0] != '-' || argv[optind][1] == '\0')
- X#ifdef GETOPT_COMPAT
- X && (longopts == NULL
- X || argv[optind][0] != '+' || argv[optind][1] == '\0')
- X#endif /* GETOPT_COMPAT */
- X )
- X {
- X if (ordering == REQUIRE_ORDER)
- X return EOF;
- X optarg = argv[optind++];
- X return 1;
- X }
- X
- X /* We have found another option-ARGV-element.
- X Start decoding its characters. */
- X
- X nextchar = (argv[optind] + 1
- X + (longopts != NULL && argv[optind][1] == '-'));
- X }
- X
- X if (longopts != NULL
- X && ((argv[optind][0] == '-'
- X && (argv[optind][1] == '-' || long_only))
- X#ifdef GETOPT_COMPAT
- X || argv[optind][0] == '+'
- X#endif /* GETOPT_COMPAT */
- X ))
- X {
- X const struct option *p;
- X char *s = nextchar;
- X int exact = 0;
- X int ambig = 0;
- X const struct option *pfound = NULL;
- X int indfound;
- X
- X while (*s && *s != '=')
- X s++;
- X
- X /* Test all options for either exact match or abbreviated matches. */
- X for (p = longopts, option_index = 0; p->name;
- X p++, option_index++)
- X if (!strncmp (p->name, nextchar, s - nextchar))
- X {
- X if (s - nextchar == strlen (p->name))
- X {
- X /* Exact match found. */
- X pfound = p;
- X indfound = option_index;
- X exact = 1;
- X break;
- X }
- X else if (pfound == NULL)
- X {
- X /* First nonexact match found. */
- X pfound = p;
- X indfound = option_index;
- X }
- X else
- X /* Second nonexact match found. */
- X ambig = 1;
- X }
- X
- X if (ambig && !exact)
- X {
- X if (opterr)
- X fprintf (stderr, "%s: option `%s' is ambiguous\n",
- X argv[0], argv[optind]);
- X nextchar += strlen (nextchar);
- X optind++;
- X return '?';
- X }
- X
- X if (pfound != NULL)
- X {
- X option_index = indfound;
- X optind++;
- X if (*s)
- X {
- X if (pfound->has_arg > 0)
- X optarg = s + 1;
- X else
- X {
- X if (opterr)
- X {
- X if (argv[optind - 1][1] == '-')
- X /* --option */
- X fprintf (stderr,
- X "%s: option `--%s' doesn't allow an argument\n",
- X argv[0], pfound->name);
- X else
- X /* +option or -option */
- X fprintf (stderr,
- X "%s: option `%c%s' doesn't allow an argument\n",
- X argv[0], argv[optind - 1][0], pfound->name);
- X }
- X nextchar += strlen (nextchar);
- X return '?';
- X }
- X }
- X else if (pfound->has_arg == 1)
- X {
- X if (optind < argc)
- X optarg = argv[optind++];
- X else
- X {
- X if (opterr)
- X fprintf (stderr, "%s: option `%s' requires an argument\n",
- X argv[0], argv[optind - 1]);
- X nextchar += strlen (nextchar);
- X return '?';
- X }
- X }
- X nextchar += strlen (nextchar);
- X if (longind != NULL)
- X *longind = option_index;
- X if (pfound->flag)
- X {
- X *(pfound->flag) = pfound->val;
- X return 0;
- X }
- X return pfound->val;
- X }
- X /* Can't find it as a long option. If this is not getopt_long_only,
- X or the option starts with '--' or is not a valid short
- X option, then it's an error.
- X Otherwise interpret it as a short option. */
- X if (!long_only || argv[optind][1] == '-'
- X#ifdef GETOPT_COMPAT
- X || argv[optind][0] == '+'
- X#endif /* GETOPT_COMPAT */
- X || my_index (optstring, *nextchar) == NULL)
- X {
- X if (opterr)
- X {
- X if (argv[optind][1] == '-')
- X /* --option */
- X fprintf (stderr, "%s: unrecognized option `--%s'\n",
- X argv[0], nextchar);
- X else
- X /* +option or -option */
- X fprintf (stderr, "%s: unrecognized option `%c%s'\n",
- X argv[0], argv[optind][0], nextchar);
- X }
- X nextchar += strlen (nextchar);
- X optind++;
- X return '?';
- X }
- X }
- X
- X /* Look at and handle the next option-character. */
- X
- X {
- X char c = *nextchar++;
- X char *temp = my_index (optstring, c);
- X
- X /* Increment `optind' when we start to process its last character. */
- X if (*nextchar == '\0')
- X optind++;
- X
- X if (temp == NULL || c == ':')
- X {
- X if (opterr)
- X {
- X if (c < 040 || c >= 0177)
- X fprintf (stderr, "%s: unrecognized option, character code 0%o\n",
- X argv[0], c);
- X else
- X fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c);
- X }
- X return '?';
- X }
- X if (temp[1] == ':')
- X {
- X if (temp[2] == ':')
- X {
- X /* This is an option that accepts an argument optionally. */
- X if (*nextchar != '\0')
- X {
- X optarg = nextchar;
- X optind++;
- X }
- X else
- X optarg = 0;
- X nextchar = NULL;
- X }
- X else
- X {
- X /* This is an option that requires an argument. */
- X if (*nextchar != 0)
- X {
- X optarg = nextchar;
- X /* If we end this ARGV-element by taking the rest as an arg,
- X we must advance to the next element now. */
- X optind++;
- X }
- X else if (optind == argc)
- X {
- X if (opterr)
- X fprintf (stderr, "%s: option `-%c' requires an argument\n",
- X argv[0], c);
- X c = '?';
- X }
- X else
- X /* We already incremented `optind' once;
- X increment it again when taking next ARGV-elt as argument. */
- X optarg = argv[optind++];
- X nextchar = NULL;
- X }
- X }
- X return c;
- X }
- X}
- X
- Xint
- Xgetopt (argc, argv, optstring)
- X int argc;
- X char *const *argv;
- X const char *optstring;
- X{
- X return _getopt_internal (argc, argv, optstring,
- X (const struct option *) 0,
- X (int *) 0,
- X 0);
- X}
- X
- X#ifdef TEST
- X
- X/* Compile with -DTEST to make an executable for use in testing
- X the above definition of `getopt'. */
- X
- Xint
- Xmain (argc, argv)
- X int argc;
- X char **argv;
- X{
- X int c;
- X int digit_optind = 0;
- X
- X while (1)
- X {
- X int this_option_optind = optind ? optind : 1;
- X
- X c = getopt (argc, argv, "abc:d:0123456789");
- X if (c == EOF)
- X break;
- X
- X switch (c)
- X {
- X case '0':
- X case '1':
- X case '2':
- X case '3':
- X case '4':
- X case '5':
- X case '6':
- X case '7':
- X case '8':
- X case '9':
- X if (digit_optind != 0 && digit_optind != this_option_optind)
- X printf ("digits occur in two different argv-elements.\n");
- X digit_optind = this_option_optind;
- X printf ("option %c\n", c);
- X break;
- X
- X case 'a':
- X printf ("option a\n");
- X break;
- X
- X case 'b':
- X printf ("option b\n");
- X break;
- X
- X case 'c':
- X printf ("option c with value `%s'\n", optarg);
- X break;
- X
- X case '?':
- X break;
- X
- X default:
- X printf ("?? getopt returned character code 0%o ??\n", c);
- X }
- X }
- X
- X if (optind < argc)
- X {
- X printf ("non-option ARGV-elements: ");
- X while (optind < argc)
- X printf ("%s ", argv[optind++]);
- X printf ("\n");
- X }
- X
- X exit (0);
- X}
- X
- X#endif /* TEST */
- END_OF_FILE
- if test 18791 -ne `wc -c <'getopt.c'`; then
- echo shar: \"'getopt.c'\" unpacked with wrong size!
- fi
- # end of 'getopt.c'
- fi
- if test -f 'p2latex.0.UU' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'p2latex.0.UU'\"
- else
- echo shar: Extracting \"'p2latex.0.UU'\" \(10914 characters\)
- sed "s/^X//" >'p2latex.0.UU' <<'END_OF_FILE'
- Xbegin 664 p2latex.0
- XM"@H*4#),051%6"@Q*2 @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
- XM(" @(" @(" @(" @(% R3$%415@H,2D*"@I."$Y!"$%-"$U%"$4*(" @(" @
- XM(' R;&%T97@@+2!A(%!A<V-A;"!T;R!,851E6"!C;VYV97)T97(*"E,(4UD(
- XM64X(3D\(3U (4%,(4TD(25,(4PH@(" @(" @< AP,@@R; AL80AA= AT90AE
- XM> AX(%L@7PAO7PAP7PAT7PAI7PAO7PAN7PAS(%T@6R!?"&9?"&E?"&Q?"&4@
- XM70H*1 A$10A%4PA30PA#4@A220A)4 A05 A420A)3PA/3@A."B @(" @("!P
- XM"' R"#)L"&QA"&%T"'1E"&5X"'@@(&ES("!A("!T;V]L(&9O<B!G96YE<F%T
- XM:6YG(%\(3%\(85\(5%\(95\(6"!S;W5R8V5S(&9R;VT@7PA)7PA37PA/"B @
- XM(" @("!?"%!?"&%?"'-?"&-?"&%?"&P@<')O9W)A;7,N("!)="!R96-O9VYI
- XM>F5S(&%L;"!K97EW;W)D<RP@<W1R:6YG<RP@86YD"B @(" @("!C;VUM96YT
- XM<RX@5&AE<V4@<F5C;V=N:7IE9"!P87)T<R!C86X@8F4@='EP97-E="!I;B!D
- XM:69F97(M"B @(" @("!E;G0@9F]N=',N("!P"' R"#)L"&QA"&%T"'1E"&5X
- XM"'@@(&-A;B @9V5N97)A=&4@(&-O;7!L971E("!?"$Q?"&%?"%1?"&5?"%@@
- XM(&9I;&5S"B @(" @("!W:&EC:" @8V%N(&)E('!A<W-E9"!D:7)E8W1L>2!T
- XM:')O=6=H(&P(;&$(870(=&4(97@(>"@Q*2!O<B!P87)T<R!O9@H@(" @(" @
- XM7PA,7PAA7PA47PAE7PA8(&9I;&5S('=H:6-H(&-A;B!B92!I;F-L=61E9" @
- XM:6X@(&]T:&5R("!?"$Q?"&%?"%1?"&5?"%@@(&9I;&5S"B @(" @(" H96ET
- XM:&5R(&UA;G5A;&QY(&]R('=I=&@@=&AE(%P(7&D(:6X(;G (<'4(=70(="!O
- XM<B!<"%QI"&EN"&YC"&-L"&QU"'5D"&1E"&4@8V]M;6%N9',I+@H*(" @(" @
- XM($EF('1H92!["'LM""UO"&\L""PM""TM""UO"&]U"'5T"'1P"'!U"'5T"'1]
- XM"'T@;W!T:6]N(&ES(&=I=F5N+"!T:&4@;W5T<'5T(&ES("!W<FET+0H@(" @
- XM(" @=&5N("!T;R @=&AE("!S<&5C:69I960@9FEL92X@268@=&AE('L(>RT(
- XM+7 (<"P(+"T(+2T(+7 (<&D(:7 (<&4(97T(?2!O<'1I;VX@:7,*(" @(" @
- XM(&=I=F5N+"!T:&4@;W5T<'5T(&ES('=R:71T96X@=&\@7PAS7PAT7PAD7PAO
- XM7PAU7PAT("AI="!I<R!A;B!E<G)O<B @=&\*(" @(" @('5S92 @8F]T:" @
- XM;W!T:6]N<R!T;V=E=&AE<BDN($EF(&YO;F4@;V8@=&AE<V4@;W!T:6]N<R!A
- XM<F4*(" @(" @('5S960L('1H92!O=71P=70@:7,@=W)I='1E;B!T;R!A(&9I
- XM;&4N($EF('1H92!I;G!U=" @8V]M97,*(" @(" @(&9R;VT@(&$@(&9I;&4L
- XM('1H92!L87-T(&-O;7!O;F5N="!O9B!T:&%T(&YA;64@=VET:"!@+G1E>"<*
- XM(" @(" @(&%P<&5N9&5D(&ES('5S960@87,@=&AE(&]U='!U="!F:6QE;F%M
- XM92X*"D\(3U (4%0(5$D(24\(3TX(3E,(4PH@(" @(" @< AP,@@R; AL80AA
- XM= AT90AE> AX(')E8V]G;FEZ97,@=&AE(&]P=&EO;G,@9&5S8W)I8F5D(&)E
- XM;&]W+B @5&AE("!L;VYG"B @(" @("!F;W)M<R @8V%N+" @=6YL97-S("!D
- XM:7-A8FQE9" @8GD@=&AE('!E<G-O;B!W:&\@:6YS=&%L;&5D"B @(" @("!P
- XM"' R"#)L"&QA"&%T"'1E"&5X"'@L(&%L<V\@8F4@:6YT<F]D=6-E9"!B>2!A
- XM(& K)R!O<B!@+2<@:6YS=&5A9"!O9B!T:&4*(" @(" @(% (4$\(3U,(4TD(
- XM25@(6"X(+C((,B!C;VUP;&EA;G0@8"TM)RX*"B @(" @(" M""UC"&,L""P@
- XM+0@M+0@M8PAC;PAO;0AM< AP; AL90AE= AT90AE+0@M9@AF:0AI; AL90AE
- XM"B @(" @(" @(" @(" @5&AE("!O=71P=70@:7,@96YV96QO<&5D(&EN(&-O
- XM;6UA;F1S('1H870@<')O9'5C92!A"B @(" @(" @(" @(" @8V]M<&QE=&4@
- XM7PA,7PAA7PA47PAE7PA8(&1O8W5M96YT+@H*(" @(" @("T(+64(92P(+" M
- XM""TM""UE"&5N"&YD"&0M""UC"&-O"&]M"&UM"&UE"&5N"&YT"'0@7PAD7PAI
- XM7PAS7PAT7PAA7PAN7PAC7PAE"B @(" @(" @(" @(" @5&AI<R!C:&%N9V5S
- XM('1H92!D:7-T86YC92!B971W965N('1H92 @7PA07PAA7PAS7PAC7PAA7PAL
- XM("!K97DM"B @(" @(" @(" @(" @=V]R9" @90AE;@AN9 AD("AO<'1I;VYA
- XM;&QY(&9O;&QO=V5D(&)Y(& [)R!O<B!@+B<I(&%N9"!A"B @(" @(" @(" @
- XM(" @9F]L;&]W:6YG("!C;VUM96YT+B @($1E9F%U;'0@(&ES("!F;W5R("!T
- XM:6UE<R @=&AE"B @(" @(" @(" @(" @:6YD96YT871I;VX@('-T97 @('-I
- XM>F4@*'-E92!T:&4@>PA[+0@M:0AI+ @L+0@M+0@M:0AI;@AN9 AD90AE;@AN
- XM= AT80AA= AT:0AI;PAO;@AN?0A]"B @(" @(" @(" @(" @;W!T:6]N*2X*
- XM"B @(" @(" M""UF"&8L""P@+0@M+0@M9@AF80AA;@AN8PAC>0AY"B @(" @
- XM(" @(" @(" @5&AE(&]U='!U="!A<'!R;WAI;6%T97,@=&AE('-T>6QE('5S
- XM960@(&EN("!.:6ML875S"B @(" @(" @(" @(" @5VER=&@Z(%\(4%\(<E\(
- XM;U\(9U\(<E\(85\(;5\(<U\(*U\(1%\(85\(=%\(82!?"%-?"'1?"')?"'5?
- XM"&-?"'1?"'5?"')?"&5?"'-?"#U?"%!?"')?"&]?"&=?"')?"&%?"&U?"',N
- XM"@H@(" @(" @+0@M: AH+ @L("T(+2T(+6@(:&4(96$(860(9&4(97((<@H@
- XM(" @(" @(" @(" @($5A8V@@('!A9V4@(&]F(&]U='!U="!H87,@82!H96%D
- XM97(@9VEV:6YG('1H92!I;G!U= H@(" @(" @(" @(" @(&9I;&5N86UE+B @
- XM(" @(%1H:7,@(" @(&]P=&EO;B @(" @:6UP;&EE<R @(" @('1H90H@(" @
- XM(" @(" @(" @('L(>RT(+6,(8RP(+"T(+2T(+6,(8V\(;VT(;7 (<&P(;&4(
- XM970(=&4(92T(+68(9FD(:6P(;&4(97T(?2!O<'1I;VXN"@H@(" @(" @+0@M
- XM:0AI+ @L("T(+2T(+6D(:6X(;F0(9&4(96X(;G0(=&$(870(=&D(:6\(;VX(
- XM;B!?"&Q?"&5?"&Y?"&=?"'1?"&@*(" @(" @(" @(" @("!':79E<R @=&AE
- XM("!A;6]U;G0@(&]F(&EN9&5N=&%T:6]N(&9O<B!E86-H(&QE861I;F<*(" @
- XM(" @(" @(" @("!B;&%N:R H=&%B<R!A<F4@8V]N=F5R=&5D('1O("!B;&%N
- XM:W,I+B @1&5F875L=" @:7,*(" @(" @(" @(" @("!@,"XU96TG+@H*"@H*
- XM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
- XM(" @(" @(" @(" @(" @(" @(#$*"@H*"@I0,DQ!5$58*#$I(" @(" @(" @
- XM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @4#),051%6"@Q
- XM*0H*"B @(" @(" M""UN"&XL""P@+0@M+0@M;@AN;PAO+0@M80AA; AL:0AI
- XM9PAG;@AN;0AM90AE;@AN= AT"B @(" @(" @(" @(" @0V]M;65N=',@8F5L
- XM;VYG:6YG('1O('-T871E;65N=',@87)E(&%L:6=N960@=&\@=&AE"B @(" @
- XM(" @(" @(" @<FEG:'0@;6%R9VEN(&)Y(&1E9F%U;'0N("!9;W4@(&-A;B @
- XM='5R;B @;V9F("!T:&ES"B @(" @(" @(" @(" @8F5H879I;W5R('=I=&@@
- XM=&AI<R!O<'1I;VXN"@H@(" @(" @+0@M;PAO+ @L("T(+2T(+6\(;W4(=70(
- XM=' (<'4(=70(="!?"&9?"&E?"&Q?"&4*(" @(" @(" @(" @("!4:&4@;W5T
- XM<'5T(&ES('=R:71T96X@;VX@7PAF7PAI7PAL7PAE+@H*(" @(" @("T(+7 (
- XM<"P(+" M""TM""UP"'!I"&EP"'!E"&4*(" @(" @(" @(" @("!4:&4@;W5T
- XM<'5T(&=O97,@=&\@7PAS7PAT7PAD7PAO7PAU7PAT+@H*(" @(" @("T(+7,(
- XM<RP(+" M""TM""UF"&9O"&]N"&YT"'0M""US"'-I"&EZ"'IE"&4@7PAF7PAO
- XM7PAN7PAT7PAS7PAI7PAZ7PAE"B @(" @(" @(" @(" @5&AE("!?"$Q?"&%?
- XM"%1?"&5?"%@@<V]U<F-E(&ES('-E="!I;B!?"&9?"&]?"&Y?"'1?"'-?"&E?
- XM"'I?"&5P="X@($1E9F%U;'0@:7,*(" @(" @(" @(" @("!@,3 G+B!4:&ES
- XM(&]P=&EO;B!I<R!M96%N:6YG;&5S<R @:68@(&YO=" @=7-E9" @:6X*(" @
- XM(" @(" @(" @("!C;VUB:6YA=&EO;B!W:71H('L(>RT(+6,(8RP(+"T(+2T(
- XM+6,(8V\(;VT(;7 (<&P(;&4(970(=&4(92T(+68(9FD(:6P(;&4(97T(?2X*
- XM"B @(" @(" M""U#"$,L""P@+0@M+0@M8PAC;PAO;0AM;0AM90AE;@AN= AT
- XM+0@M9@AF;PAO;@AN= AT(%\(9E\(;U\(;E\(= H@(" @(" @(" @(" @(%1H
- XM92!C;VUM96YT<R!A<F4@<V5T(&EN('1H92!G:79E;B!?"&9?"&]?"&Y?"'0N
- XM("!$969A=6QT(&ES"B @(" @(" @(" @(" @8&ET)RX*"B @(" @(" M""U(
- XM"$@L""P@+0@M+0@M: AH90AE80AA9 AD90AE<@AR+0@M9@AF;PAO;@AN= AT
- XM(%\(9E\(;U\(;E\(= H@(" @(" @(" @(" @(%1H92!H96%D97)S(&%R92!S
- XM970@:6X@=&AE(&=I=F5N(%\(9E\(;U\(;E\(="X@($1E9F%U;'0@(&ES"B @
- XM(" @(" @(" @(" @8'-L)RX*"B @(" @(" M""U)"$DL""P@+0@M+0@M:0AI
- XM9 AD90AE;@AN= AT:0AI9@AF:0AI90AE<@AR+0@M9@AF;PAO;@AN= AT(%\(
- XM9E\(;U\(;E\(= H@(" @(" @(" @(" @(%1H92!I9&5N=&EF:65R<R!A<F4@
- XM<V5T(&EN('1H92!G:79E;B!?"&9?"&]?"&Y?"'0N("!$969A=6QT"B @(" @
- XM(" @(" @(" @:7,@8&ET)RX*"B @(" @(" M""U+"$LL""P@+0@M+0@M:PAK
- XM90AE>0AY=PAW;PAO<@AR9 AD+0@M9@AF;PAO;@AN= AT(%\(9E\(;U\(;E\(
- XM= H@(" @(" @(" @(" @(%1H92!K97EW;W)D<R!A<F4@<V5T(&EN('1H92!G
- XM:79E;B!?"&9?"&]?"&Y?"'0N("!$969A=6QT(&ES"B @(" @(" @(" @(" @
- XM8&)F)RX*"B @(" @(" M""U3"%,L""P@+0@M+0@M<PAS= AT<@AR:0AI;@AN
- XM9PAG+0@M9@AF;PAO;@AN= AT(%\(9E\(;U\(;E\(= H@(" @(" @(" @(" @
- XM(%1H92 @<W1R:6YG("!A;F0@8VAA<F%C=&5R(&-O;G-T86YT<R!A<F4@<V5T
- XM(&EN('1H90H@(" @(" @(" @(" @(&=I=F5N(%\(9E\(;U\(;E\(="X@($1E
- XM9F%U;'0@:7,@8'1T)RX*"B @(" @(" M""U4"%0L""P@+0@M+0@M= AT80AA
- XM8@AB<PAS= AT;PAO< AP(%\(=U\(:5\(9%\(=%\(: H@(" @(" @(" @(" @
- XM(%1H92!W:61T:"!O9B!T86)S(&ES(%\(=U\(:5\(9%\(=%\(:"X@($1E9F%U
- XM;'0@:7,@8#@G+@H*(" @(" @("T(+58(5BP(+" M""TM""UV"'9E"&5R"')S
- XM"'-I"&EO"&]N"&X*(" @(" @(" @(" @("!0<FEN=',@=&AE('9E<G-I;VX@
- XM;G5M8F5R(&]N(%\(<U\(=%\(9%\(95\(<E\(<BX*"B @(" @("!4;R!G:79E
- XM(&YO(&]P=&EO;G,@870@(&%L;" @:7,@('1H92 @<V%M92 @87,@(&=I=FEN
- XM9R @=&AE"B @(" @("!O<'1I;VYS"B @(" @(" @(" @(" @+6D@,"XU96T@
- XM+7,@,3 @+4,@:70@+4@@<VP@+4D@:70@+4L@8F8@+5,@='0@+50@. H*1 A$
- XM20A)00A!1PA'3@A.3PA/4PA35 A420A)0PA#4PA3"B @(" @("!?"$-?"&%?
- XM"&Y?""=?"'0@7PAU7PAS7PAE(%\(>U\(+5\(<%\(+%\(+5\(+5\(<%\(:5\(
- XM<%\(95\(?2!?"&%?"&Y?"&0@7PA[7P@M7PAO7P@L7P@M7P@M7PAO7PAU7PAT
- XM7PAP7PAU7PAT7PA](%\(=%\(;U\(9U\(95\(=%\(:%\(95\(<@H@(" @(" @
- XM(" @(" @($%T(&UO<W0@;VYE(&]F('1H:7,@;W!T:6]N<R!M87D@8F4@9VEV
- XM96XN"@H*(" @(" @(%\(0U\(85\(;E\()U\(="!?"&]?"'!?"&5?"&X@7PA@
- XM7P@\7PAF7PAI7PAL7PAE7P@^7P@G(%\(9E\(;U\(<B!?"')?"&5?"&%?"&1?
- XM"&E?"&Y?"&<*(" @(" @(" @(" @("!4:&4@<')O9W)A;2!F86EL960@=&\@
- XM;W!E;B \9FEL93X@9F]R(')E861I;F<N"@H*"@H@(" @(" @(" @(" @(" @
- XM(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
- XM(" @,@H*"@H*"E R3$%415@H,2D@(" @(" @(" @(" @(" @(" @(" @(" @
- XM(" @(" @(" @(" @(" @(" @("!0,DQ!5$58*#$I"@H*(" @(" @(%\(0U\(
- XM85\(;E\()U\(="!?"&]?"'!?"&5?"&X@7PA@7P@\7PAF7PAI7PAL7PAE7P@^
- XM7P@G(%\(9E\(;U\(<B!?"'=?"')?"&E?"'1?"&E?"&Y?"&<*(" @(" @(" @
- XM(" @("!4:&4@('!R;V=R86T@9F%I;&5D('1O(&]P96X@/&9I;&4^(&9O<B!W
- XM<FET:6YG+B!!;&P*(" @(" @(" @(" @("!O=71P=70@:7,@=W)I='1E;B!I
- XM;B!T:&4@8W5R<F5N="!D:7)E8W1O<GD@(&EF("!N;W0*(" @(" @(" @(" @
- XM("!E>'!L:6-I=&QY(&-H86YG960@8GD@>PA[+0@M;PAO+ @L+0@M+0@M;PAO
- XM=0AU= AT< AP=0AU= AT?0A]+@H*"B @(" @("!?"%9?"&E?"')?"'1?"'5?
- XM"&%?"&P@7PAM7PAE7PAM7PAO7PAR7PAY(%\(95\(>%\(:%\(85\(=5\(<U\(
- XM=%\(95\(9 H@(" @(" @(" @(" @(%1H92 @<')O9W)A;2!F86EL960@=&\@
- XM86QL;V-A=&4@<W1O<F%G92X@07,@=&AI<R!I<PH@(" @(" @(" @(" @(&]N
- XM;'D@9&]N92!F;W(@=&AE(&-O;G-T<G5C=&EO;B!O9B!T:&4@;W5T<'5T("!F
- XM:6QE+0H@(" @(" @(" @(" @(&YA;64L("!T:&ES("!E<G)O<B!W:6QL(&YO
- XM<FUA;&QY(&EN9&EC871E(&$@<')O9W)A;0H@(" @(" @(" @(" @(&5R<F]R
- XM+@H*1@A&20A)3 A,10A%4PA3"B @(" @("!?"&9?"&%?"&Y?"&-?"'E?"&A?
- XM"&5?"&%?"&1?"&E?"&Y?"&=?"'-?""Y?"'-?"'1?"'D*(" @(" @(" @(" @
- XM("!5<V5D(&)Y('1H92!O=71P=70@=VAE;B M""UH"&@@;W(@("T(+2T(+6@(
- XM:&4(96$(860(9&4(97((<B @:7,@('-P96-I+0H@(" @(" @(" @(" @(&9I
- XM960N"@I5"%5."$Y2"%)%"$53"%-4"%12"%))"$E#"$-4"%1)"$E/"$]."$Y3
- XM"%,*(" @(" @(' (<#((,FP(;&$(870(=&4(97@(>"!I<R!F<F5E.R!A;GEO
- XM;F4@;6%Y(')E9&ES=')I8G5T92!C;W!I97,@;V8@< AP,@@R; AL80AA= AT
- XM90AE> AX"B @(" @("!T;R!A;GEO;F4@=6YD97(@=&AE('1E<FUS('-T871E
- XM9"!I;B!T:&4@1TY5($=E;F5R86P@4'5B;&EC"B @(" @("!,:6-E;F-E+"!A
- XM(&-O<'D@;V8@=VAI8V@@86-C;VUP86YI97,@96%C:"!C;W!Y(&]F(' (<#((
- XM,FP(;&$(870(=&4(97@(>"X*"B @(" @("!4;W)S=&5N("!0;W5L:6X@(&5N
- XM8V]U<F%G97,@('EO=2 @=&\@(&EM<')O=F4@(&%N9" @97AT96YD"B @(" @
- XM("!P"' R"#)L"&QA"&%T"'1E"&5X"'@L("!A;F0@=7)G97,@=&AA="!Y;W4@
- XM8V]N=')I8G5T92!Y;W5R(&5X=&5N<VEO;G,@=&\*(" @(" @('1H92!W;W)L
- XM9"X*"E,(4T4(144(12!!"$%,"$Q3"%-/"$\*(" @(" @(&,(8RL(*RL(*S((
- XM,FP(;&$(870(=&4(97@(>"@Q*2P@; AL80AA= AT90AE> AX*#$I"@I!"$%5
- XM"%54"%1("$A/"$]2"%(*(" @(" @(%1O<G-T96X@4&]U;&EN("AT;W)S=&5N
- XM0&1I:W4N9&LI"@H@(" @(" @< AP,@@R; AL80AA= AT90AE> AX(&ES(&1E
- XM<FEV960@9G)O;2!V97)S:6]N(#(N,"!O9B @8PAC*P@K*P@K,@@R; AL80AA
- XM= AT90AE> AX("!W<FET=&5N"B @(" @("!B>2!*;V5R9R!(96ET:V]E='1E
- XM<@H*(" @(" @(%1H92!O<FEG:6YA;"!C"&,K""LK""LR"#)L"&QA"&%T"'1E
- XM"&5X"'@@=V%S('=R:71T96X@8GD@3F]R8F5R="!+:65S96PN"@H@(" @(" @
- XM5&AI<R @;6%N=6%L("!P86=E("!I<R @86X@(&%D87!T960@=F5R<VEO;B!O
- XM9B!T:&4@;VYE(&9O<@H@(" @(" @8PAC*P@K*P@K,@@R; AL80AA= AT90AE
- XM> AX+@@N"@I""$)5"%5'"$=3"%,*(" @(" @($]N;'D@:VYO=W,@86)O=70@
- XM56YI>"!P871H;F%M97,N(%1H=7,L('-O;64@($%M:6=A1$]3("!A;F0*(" @
- XM(" @(&%L;" @35,M1$]3(&EN<'5T(&9I;&5N86UE<R!W:6QL('EI96QD('5N
- XM97AP96-T960@<F5S=6QT<RX*(" @(" @(%1H:7,@('!R;V)L96T@("!C86X@
- XM("!B92 @(&-I<F-U;79E;G1E9" @(&)Y(" @=7-I;F<@("!T:&4*(" @(" @
- XM('L(>RT(+6\(;RP(+"T(+2T(+6\(;W4(=70(=' (<'4(=70(='T(?2!O<'1I
- XM;VXN"@H@(" @(" @0F5W87)E("!O9B @9FEL96YA;65S("!T:&%T("!A<F4@
- XM=&]O(&QO;F<@9F]R('1H92!A<'!E;F1E9 H@(" @(" @8"YT97@G('1O(&9I
- XM="X@($ET('=O=6QD(&)E(&$@<VAA;64@:68@=&AE("!?"%!?"&%?"'-?"&-?
- XM"&%?"&P@('-O=7)C90H@(" @(" @9FEL92!W87,@:6YA9'9E<G1E;G1L>2!O
- XM=F5R=W)I='1E;B!B>2!T:&4@7PA,7PAA7PA47PAE7PA8(&9I;&4N"@H*"@H*
- XM"@H*(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
- X:(" @(" @(" @(" @(" @(" @(" @(#,*"@H@
- X
- Xend
- END_OF_FILE
- if test 10914 -ne `wc -c <'p2latex.0.UU'`; then
- echo shar: \"'p2latex.0.UU'\" unpacked with wrong size!
- else
- echo shar: Uudecoding \"'p2latex.0'\" \(7901 characters\)
- cat p2latex.0.UU | uudecode
- if test 7901 -ne `wc -c <'p2latex.0'`; then
- echo shar: \"'p2latex.0'\" uudecoded with wrong size!
- else
- rm p2latex.0.UU
- fi
- fi
- # end of 'p2latex.0.UU'
- fi
- if test -f 'version.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'version.c'\"
- else
- echo shar: Extracting \"'version.c'\" \(62 characters\)
- sed "s/^X//" >'version.c' <<'END_OF_FILE'
- Xchar *version_string = "p2latex version 1.0 (Patchlevel 0)";
- X
- END_OF_FILE
- if test 62 -ne `wc -c <'version.c'`; then
- echo shar: \"'version.c'\" unpacked with wrong size!
- fi
- # end of 'version.c'
- fi
- echo shar: End of archive 2 \(of 3\).
- cp /dev/null ark2isdone
- MISSING=""
- for I in 1 2 3 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 3 archives.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-