xlhtml/0040755000076400007640000000000007500147312012525 5ustar jackshckjackshckxlhtml/CVS/0040755000076400007640000000000007473177123013174 5ustar jackshckjackshckxlhtml/CVS/Root0100644000076400007640000000006307473177123014036 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/CVS/Repository0100644000076400007640000000000707473177123015270 0ustar jackshckjackshckxlhtml xlhtml/CVS/Entries0100644000076400007640000000145007473177123014525 0ustar jackshckjackshck/AUTHORS/1.4/Thu May 16 15:37:26 2002// /COPYING/1.1.1.1/Wed Mar 20 15:31:37 2002// /INSTALL/1.1.1.1/Wed Mar 20 15:31:38 2002// /Makefile.am/1.1.1.1/Wed Mar 20 15:31:36 2002// /Makefile.in/1.5/Fri May 10 15:17:47 2002// /NEWS/1.1.1.1/Wed Mar 20 15:31:39 2002// /README/1.1.1.1/Wed Mar 20 15:31:39 2002// /aclocal.m4/1.2/Fri May 10 15:17:47 2002// /config.guess/1.1.1.1/Wed Mar 20 15:31:41 2002// /config.h.in/1.4/Fri May 10 15:17:47 2002// /config.sub/1.1.1.1/Wed Mar 20 15:31:43 2002// /configure/1.4/Fri May 10 15:17:47 2002// /configure.in/1.3/Wed Apr 17 22:09:58 2002// /install-sh/1.1.1.1/Wed Mar 20 15:31:55 2002// /missing/1.1.1.1/Wed Mar 20 15:31:55 2002// /mkinstalldirs/1.1.1.1/Wed Mar 20 15:31:55 2002// /stamp-h.in/1.1.1.1/Wed Mar 20 15:31:55 2002// /xlhtml.spec/1.1/Thu May 16 15:21:35 2002// D xlhtml/CVS/Entries.Log0100644000076400007640000000005407473177126015247 0ustar jackshckjackshckA D/cole//// A D/ppthtml//// A D/xlhtml//// xlhtml/Makefile.am0100644000076400007640000000011107446125530014556 0ustar jackshckjackshckSUBDIRS = cole xlhtml ppthtml EXTRA_DIST = README-xlhtml README-ppthtml xlhtml/AUTHORS0100644000076400007640000000016407470751066013610 0ustar jackshckjackshck Current Maintainer: Charles Wyble Original Author: Steve Grubb xlhtml/COPYING0100644000076400007640000004311007446125531013564 0ustar jackshckjackshck GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xlhtml/INSTALL0100644000076400007640000001722707446125532013575 0ustar jackshckjackshckBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. xlhtml/cole/0040755000076400007640000000000007500147312013447 5ustar jackshckjackshckxlhtml/cole/CVS/0040755000076400007640000000000007473177124014117 5ustar jackshckjackshckxlhtml/cole/CVS/Root0100644000076400007640000000006307473177123014760 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/CVS/Repository0100644000076400007640000000001407473177123016210 0ustar jackshckjackshckxlhtml/cole xlhtml/cole/CVS/Entries0100644000076400007640000000147507473177124015457 0ustar jackshckjackshck/AUTHORS/1.4/Thu May 16 16:31:32 2002// /COPYING/1.1.1.1/Wed Mar 20 15:31:59 2002// /ChangeLog/1.4/Tue Apr 9 00:22:58 2002// /DOWNLOAD/1.1.1.1/Wed Mar 20 15:31:59 2002// /Makefile.am/1.3/Thu Apr 18 17:22:08 2002// /Makefile.in/1.5/Thu Apr 18 17:22:08 2002// /NEWS/1.1.1.1/Wed Mar 20 15:32:00 2002// /THANKS/1.2/Tue Apr 9 23:55:14 2002// /TODO/1.3/Tue Apr 9 23:55:14 2002// /cole-config.in/1.1.1.1/Wed Mar 20 15:32:01 2002// /cole.c/1.3/Fri May 10 16:08:58 2002// /cole.h.in/1.2/Thu Apr 11 17:16:38 2002// /internal.c/1.1.1.1/Wed Mar 20 15:32:04 2002// /internal.h/1.1.1.1/Wed Mar 20 15:32:04 2002// /olecod.c/1.1.1.1/Wed Mar 20 15:32:07 2002// /oledecod.c/1.2/Fri May 10 16:08:58 2002// /support.c/1.2/Fri May 10 16:08:58 2002// /support.h/1.1.1.1/Wed Mar 20 15:32:09 2002// /version.c.in/1.1.1.1/Wed Mar 20 15:32:09 2002// D xlhtml/cole/CVS/Entries.Log0100644000076400007640000000005307473177126016170 0ustar jackshckjackshckA D/doc//// A D/examples//// A D/utils//// xlhtml/cole/ChangeLog0100644000076400007640000000511207454432142015223 0ustar jackshckjackshck 2.0.1 Arturo Tena (1999-08): + Fixed bug in cole.h which didn't include stdio.h. + New util: cole_extract. + Updated documentation. 2.0.0 Arturo Tena (1999-07): + New good looking API: it's modeled after `stdio.h' ANSI C calls. + Documentation of all public calls. + OLEdecode and OLEcode are now internal functions and they must be not called. + Write files (ie. what OLEcode() used to do) is not implemented by now. 1.0.1 Arturo Tena (1999-06-25): User level: + Fixed a bug that may prevent from compile under Solaris. 1.0.0: Arturo Tena User level: + Autoconf-ified (now cole have configure script). + Automake-ified (now Makefile have standard targets). + Objects archived now in a static library: libcole.a. + Can compile a dynamic library. + Check endianess of machine. + Fix some bugs when reading damaged files. + Added --enable-cole-verbose option. + Added --enable-osf-align-check (thanks to Bernhard Reiter). + A cole.spec file to make a RPM package and a cole.lsm to MetaLab archive. + Documentation written. Developer Level: + Added some macros and functions in support.h + Change name from test to test_exitf define. + Create a new test and test_call_exitf define. + Rename max function to max3 (preparing to compile in Borland C). + fil_swriteU8 disappeared. + Clean up some files. 0.1.0: Arturo Tena + Change name from oledecod to cole. + Add olecod.c and olecod.h. + Modified demo.c to call OLEcod. + Changed pps->name, first character can be from 00 to 10, or so, as originally is in ole 2 files. + Modified some errors in OLEdecod. + Create test suit, some doc files. + Improve this README. 0.0.6: Arturo Tena + Fix the checking while reordering pps list. + Add instructions on how to apply patches. 0.0.5: Arturo Tena + Fix the "Add some fool integrity checking while reading small block depot" fix. Was > instead <=. =) + While reading a broken OLE file, added some checking while reordering pps list. + Added return parameter to freeOLEtree function. + Some general clean up. 0.0.4: Arturo Tena + Fix one stupid error while erasing the OLE tree. + Add some fool integrity checking while reading small block depot. 0.0.3: Arturo Tena + Add one parameter to OLEdecod; max_level, which is the maximum level stream we will extract into files. + Changed name from main.c to demo.c + Added a simple Makefile + Added this README file. xlhtml/cole/AUTHORS0100644000076400007640000000012207470757344014531 0ustar jackshckjackshck Current maintainer: ******************* Charles Wyble xlhtml/cole/COPYING0100644000076400007640000004310507446125557014522 0ustar jackshckjackshck GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xlhtml/cole/doc/0040755000076400007640000000000007473177125014232 5ustar jackshckjackshckxlhtml/cole/doc/CVS/0040755000076400007640000000000007473177125014665 5ustar jackshckjackshckxlhtml/cole/doc/CVS/Root0100644000076400007640000000006307473177124015526 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/doc/CVS/Repository0100644000076400007640000000002007473177124016753 0ustar jackshckjackshckxlhtml/cole/doc xlhtml/cole/doc/CVS/Entries0100644000076400007640000000112207473177125016212 0ustar jackshckjackshck/HACKING/1.1.1.1/Wed Mar 20 15:32:10 2002// /Makefile.am/1.1.1.1/Wed Mar 20 15:32:09 2002// /Makefile.in/1.1.1.1/Wed Mar 20 15:32:10 2002// /bugs.sgml/1.1.1.1/Wed Mar 20 15:32:11 2002// /cole-manual.sgml/1.1.1.1/Wed Mar 20 15:32:11 2002// /cole-manual.sgml-old/1.1.1.1/Wed Mar 20 15:32:14 2002// /cole-sections.txt/1.1.1.1/Wed Mar 20 15:32:14 2002// /compile.sgml/1.1.1.1/Wed Mar 20 15:32:14 2002// /gpl.sgml/1.1.1.1/Wed Mar 20 15:32:15 2002// /introduction.sgml/1.1.1.1/Wed Mar 20 15:32:16 2002// /legal.sgml/1.1.1.1/Wed Mar 20 15:32:16 2002// /using.sgml/1.1.1.1/Wed Mar 20 15:32:16 2002// D xlhtml/cole/doc/CVS/Entries.Log0100644000076400007640000000004107473177125016731 0ustar jackshckjackshckA D/cole-manual//// A D/tmpl//// xlhtml/cole/doc/Makefile.am0100644000076400007640000000377607446125571016276 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in EXTRA_DIST = cole-manual.sgml \ introduction.sgml \ compile.sgml \ using.sgml \ bugs.sgml \ gpl.sgml \ legal.sgml \ HACKING \ cole-manual.sgml-old dist-hook: all cp $(srcdir)/cole-sections.txt $(distdir) cp -r $(srcdir)/tmpl $(distdir) cp -r $(srcdir)/cole-manual $(distdir) # Headers to scan for declarations scanned_headers = ../internal.h ../support.h ./cole.h # The name of the module. DOC_MODULE = cole # The top-level SGML file. DOC_MAIN_SGML_FILE = cole-manual.sgml # The directory containing the source code (if it contains documentation). DOC_SOURCE_DIR = $(top_srcdir) # The directory where the documentation will be installed TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) scan: cp $(top_builddir)/cole.h $(srcdir); \ (cd $(srcdir); \ gtkdoc-scan --module=$(DOC_MODULE) $(scanned_headers); \ rm cole.h) templates: scan (cd $(srcdir); \ gtkdoc-mktmpl --module=$(DOC_MODULE)) sgml: (cd $(srcdir); \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)) html: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2html $(DOC_MAIN_SGML_FILE); \ rm BUGS) rtf: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2rtf $(DOC_MAIN_SGML_FILE); \ -rm BUGS) ps: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2ps $(DOC_MAIN_SGML_FILE); \ -rm BUGS) regenerate-all: templates sgml html clean-local: (cd $(srcdir); \ rm -f *~ *.bak *.hierarchy *.signals *.args; \ rm -fr DBTOHTML_OUTPUT_DIR* *.junk $(DOC_MODULE)-decl-list.txt) maintainer-clean-local: clean (cd $(srcdir); \ rm -rf sgml html cole-manual tmpl/*.bak; \ rm -rf $(DOC_MODULE)-decl.txt) # if db2html generate subdirectories, it's broken the next rule # install-data-local: all # $(INSTALL) -d $(TARGET_DIR) # $(INSTALL) ./cole-manual/* $(TARGET_DIR) ## Solaris make doesn't like directory as a target... .PHONY : ps rtf html sgml templates scan xlhtml/cole/doc/HACKING0100644000076400007640000001420107446125572015213 0ustar jackshckjackshck/* cole - A free C OLE library. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ Pre-hacking: ************ If you want to play, you'll need: + An ANSI C system (libraries and C compiler). + GNU m4, GNU automake-1.4, GNU autoconf 2.13 and GNU libtool 1.3.2 if you want to change `configure.in' or some `Makefile.am'. + DocBook 3.x tools and gtk-doc (from GNOME CVS (http://cvs.gnome.org/)) if you want to make a distribution. Tests: ****** If you write a new public call, write their documentation: see comments before the implementation of other public calls, and write a test and put in in `examples' directory. API: **** The API 2.x must be modelled after `stdio.h' ANSI C calls, but cleanner. This means the arguments must be the minimal that the call _really_ needs. The last argument of most of calls must be `COLERRNO *colerrno'. This must be set if an error is found when calling some other call or a system call, but colerrno can be NULL, so always use `if (colerrno != NULL) *colerrno = COLE_...'. All the public calls neet to have a `COLERRNO *colerrno' argument, except those that simply can not fail. If you create a new error code, insert it in the list of the colerrno argument in the document comment above the function with the new error code, insert in enum _COLERRNO, add a comment there, add an entry in cole_perror and review all the sources that call the function that have the new error code in order to catch the new error (inclusive utils and examples directories). When writting a call that calls another calls which returns colerrno, say in documentation something like: ` * @colerrno: error value (COLE_AAA, errors from calls cole_XXX(), cole_XXY() and COLE_XXZ())' if the call that you are writting calls cole_XXX, cole_XXY and COLE_XXZ and returns COLE_AAA by itself. Implementation: *************** When you write the code to check the return value from a function with switch, always write a default case (in the most cases the default case will return a COLE_UNKNOWN). If you use if's, write an else case. Documentation: ************** If you modified `cole-manual.sgml', you must run `make html' in the `doc' subdirectory. If you modified the templates, you must run `make sgml' and then `make html' in the `doc' subdirectory. If you modified `cole-sections.txt'... well, I guess you must run `make templates' and then `make sgml' and then `make html' in the `doc' subdirectory (but I'm not sure because I'm lerning this gtk-doc thing). If you changed the existing comment of a function, structure, etc, you must run `make sgml' and then `make html' in the `doc' subdirectory. If you changed the parameters of some function, run `make templates' and then `make sgml' and then `make html'. If you added, renamed or deleted some function, well you tell me what to do. All targets in the `Makefile' in the `doc' subdirectory modifies sources, that way the documentation can be updated when checked in CVS. Before you regenerate documentation, must have a build directory with all the code compiled, because `cole.h' file is needed. FlashPix file format: ********************* Seems to me that "Root Entry" pps number is zero (like MS files), but it has no name! I mean, pps_list[0].type == 5, but pps_list[0].name[0] == 0. ********************** * OLD HACKING DOCUMENT ********************** Hacking: ******** Ok, next few lines are for people trying to understand the cole code. to code a OLE2 file (which is done by OLEcode) is done it two fases: process and generate. process insert all the information in the Structure, and generate reads this Structure and write the actual output_file (wich is an ole2 file) by copying real files and some parts of Structure to output_file. in the generate stage we know the actual blocks where each stream is stored, so in this stage this start block is written in Root. functions of process stage starts with process_* and add_*. functions of generating stage starts with generate_* and write_*. the size property of `Root Entry' pps is the actual size of sbfile, and always is a multiple of 0x40. A graph of Structure following: [missing, remember me I must do it] size of Input (Input.size) is never used, it's no necessary. In any case, what info we should write there? Same case as Input.blocks. somewhere in process stage, name of real files are copied by reference, that means two vars will point to the same memory posittion. one var is in pps_entry * stream_list names, and the other is in sbfile and Input in Structure. But it's ok. notes: a ole2 file can or not contain small streams. if there are, it will have SDepot, although in Structure always SDepot exist, SDepot->size == sbfile->size == 0 if file do not contain small streams it seems to me a ole2 file could not have big streams, just small streams. BUT it will at least one block that is taken by BDepot, because in BDepot store block chains for SDepot and Root It seems that Solaris doesn't like directories as targets... must be a file. This is a problem in doc/Makefile. about the code: it's spaguetticode. I know. Long var names. I know. Help me to fix it. comments are generally after the line it comments, as explanation of what i have done. advices: when doing a change, verify the program works with files with SDepot and files with out SDepot (files with or without small streams) if you change the version number, change it both in configure.in file and in doc/cole-manual.sgml. xlhtml/cole/doc/cole-manual/0040755000076400007640000000000007473177125016427 5ustar jackshckjackshckxlhtml/cole/doc/cole-manual/CVS/0040755000076400007640000000000007473177125017062 5ustar jackshckjackshckxlhtml/cole/doc/cole-manual/CVS/Root0100644000076400007640000000006307473177125017724 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/doc/cole-manual/CVS/Repository0100644000076400007640000000003407473177125021156 0ustar jackshckjackshckxlhtml/cole/doc/cole-manual xlhtml/cole/doc/cole-manual/CVS/Entries0100644000076400007640000000155107473177125020415 0ustar jackshckjackshck/bugs.html/1.1.1.1/Wed Mar 20 15:32:16 2002// /cole-api.html/1.1.1.1/Wed Mar 20 15:32:20 2002// /cole-internals.html/1.1.1.1/Wed Mar 20 15:32:22 2002// /copyright-and-disclaimer.html/1.1.1.1/Wed Mar 20 15:32:22 2002// /docbook.css/1.1.1.1/Wed Mar 20 15:32:22 2002// /features.html/1.1.1.1/Wed Mar 20 15:32:23 2002// /gpl-license-how-to-apply.html/1.1.1.1/Wed Mar 20 15:32:23 2002// /gpl-license-terms.html/1.1.1.1/Wed Mar 20 15:32:24 2002// /gpl-license.html/1.1.1.1/Wed Mar 20 15:32:24 2002// /how-to-compile.html/1.1.1.1/Wed Mar 20 15:32:25 2002// /index.html/1.1.1.1/Wed Mar 20 15:32:25 2002// /introduction.html/1.1.1.1/Wed Mar 20 15:32:25 2002// /legal-issues.html/1.1.1.1/Wed Mar 20 15:32:25 2002// /libcole.html/1.1.1.1/Wed Mar 20 15:32:25 2002// /requirements-to-compile.html/1.1.1.1/Wed Mar 20 15:32:26 2002// /trademarks.html/1.1.1.1/Wed Mar 20 15:32:26 2002// D xlhtml/cole/doc/cole-manual/CVS/Entries.Log0100644000076400007640000000003207473177125021126 0ustar jackshckjackshckA D/stylesheet-images//// xlhtml/cole/doc/cole-manual/bugs.html0100644000076400007640000000743607446125600020253 0ustar jackshckjackshckBugs

Chapter 4. Bugs

cole developers have done their best effort to fix all the bugs of cole. But may be some of the are still hidden in the code. If you found one (or many!), please send a report to the maintainer (<arturo@directmail.org>). When sending a report, please:

  1. Describe with detail the behavior of cole and why you think it's a bug.

  2. Configure cole using the argument --enable-verbose and send the output showing the bug.

  3. Send the content of the variables cole_version and cole_host_info that the cole release you are using have. You wil have to write a little program to do this, but it will help much. =)

  4. If you can, send the most small source code that shows the bug in action. May be you want to send the Structured Storage file you have been processing.

  5. You can send the files config.log and config.cache (which were created by configure) if you want.

Thank you very much.

Following is the BUGS file for this release.


Report bugs to the maintainer (see the file `AUTHORS' for details).
Please, along with your detailed report, send the cole's output when compiled
using `--enable-verbose' (see the files `README' and `INSTALL' for details).


Current bugs:
**************

None.


Fixed bugs:
************

Reported that cole can't read files biggers that 8Mb. UPDATE: oledecod.c is
changed now to read additional blocks to the bbd. This fixes the bug.

Reported strange bug in cole 0.1.0 using Solaris using `../demo sprsheet.xls'
in examples directory. We need more test there! UPDATE: Seems to be fixed in
cole 1.0.0 with the endianess care code.


Possible bugs:
**************

* cole is not reentrant safe (it's in TODO):
  What happend if, in any program, one user tries to decode and/or code
  two files (the same or diferent)? Because static vars, will it get
  broke? I think yes, mmmh...
xlhtml/cole/doc/cole-manual/cole-api.html0100644000076400007640000016212107446125604021001 0ustar jackshckjackshckAPI

API

Name

API -- Public cole API for the present release.

Synopsis


#include <cole/cole.h>


#define     COLE_MAJOR_VERSION
#define     COLE_MINOR_VERSION
#define     COLE_MICRO_VERSION
extern      int cole_major_version;
extern      int cole_minor_version;
extern      int cole_micro_version;
extern      char *cole_version;
extern      char *cole_host_info;
enum        COLERRNO;
void        cole_perror                     (const char *s,
                                             COLERRNO colerrno);
struct      COLEFS;
struct      COLEDIR;
struct      COLEDIRENT;
struct      COLEFILE;
COLEFS*     cole_mount                      (char *filename,
                                             COLERRNO *colerrno);
int         cole_umount                     (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);
int         cole_print_tree                 (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);
int         cole_locate_filename            (COLEFS *colefilesystem,
                                             char *filename,
                                             void *info,
                                             COLE_LOCATE_ACTION_FUNC *action,
                                             COLERRNO *colerrno);
int         cole_recurse_tree               (COLEFS *colefilesystem,
                                             void *info,
                                             COLE_RECURSE_DIR_FUNC *inroot,
                                             COLE_RECURSE_DIRENT_FUNC *indirentry,
                                             COLE_RECURSE_DIR_FUNC *indir,
                                             COLE_RECURSE_DIR_FUNC *outdir,
                                             COLE_RECURSE_VISIT_DIR_FUNC *visitdir,
                                             COLERRNO *colerrno);
COLEFILE*   cole_fopen                      (COLEFS *colefilesystem,
                                             char *filename,
                                             COLERRNO *colerrno);
COLEFILE*   cole_fopen_direntry             (COLEDIRENT *coledirentry,
                                             COLERRNO *colerrno);
int         cole_fclose                     (COLEFILE *colefile,
                                             COLERRNO *colerrno);
size_t      cole_fread                      (COLEFILE *colefile,
                                             void *ptr,
                                             size_t size,
                                             COLERRNO *colerrno);
int         cole_feof                       (COLEFILE *colefile);
size_t      cole_fsize                      (COLEFILE *colefile);
size_t      cole_ftell                      (COLEFILE *colefile);
int         cole_fseek                      (COLEFILE *colefile,
                                             size_t delta,
                                             COLE_SEEK_FLAG direction,
                                             COLERRNO *colerrno);
int         cole_frewind                    (COLEFILE *colefile,
                                             COLERRNO *colerrno);
COLEDIR*    cole_opendir_rootdir            (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);
COLEDIR*    cole_opendir_direntry           (COLEDIRENT *coledirentry,
                                             COLERRNO *colerrno);
int         cole_closedir                   (COLEDIR *coledir,
                                             COLERRNO *colerrno);
COLEDIRENT* cole_visiteddirentry            (COLEDIR *coledir);
COLEDIRENT* cole_nextdirentry               (COLEDIR *coledir);
int         cole_direntry_isdir             (COLEDIRENT *coledirentry);
int         cole_direntry_isfile            (COLEDIRENT *coledirentry);
char*       cole_dir_getname                (COLEDIR *coledir);
size_t      cole_dir_getsize                (COLEDIR *coledir);
long        cole_dir_getsec1                (COLEDIR *coledir);
long        cole_dir_getsec2                (COLEDIR *coledir);
long        cole_dir_getdays1               (COLEDIR *coledir);
long        cole_dir_getdays2               (COLEDIR *coledir);
char*       cole_direntry_getname           (COLEDIRENT *coledirentry);
size_t      cole_direntry_getsize           (COLEDIRENT *coledirentry);
long        cole_direntry_getdays1          (COLEDIRENT *coledirentry);
long        cole_direntry_getsec1           (COLEDIRENT *coledirentry);
long        cole_direntry_getdays2          (COLEDIRENT *coledirentry);
long        cole_direntry_getsec2           (COLEDIRENT *coledirentry);

Description

Note: The separator character for filename components is '/'. So, a filename argument can be something like "/Macros/VB/Project1".

Details

COLE_MAJOR_VERSION

#define COLE_MAJOR_VERSION 2

COLE_MINOR_VERSION

#define COLE_MINOR_VERSION 0

COLE_MICRO_VERSION

#define COLE_MICRO_VERSION 1

cole_major_version

extern int cole_major_version;

cole_minor_version

extern int cole_minor_version;

cole_micro_version

extern int cole_micro_version;

cole_version

extern char *cole_version;

cole_host_info

extern char *cole_host_info;

enum COLERRNO

enum COLERRNO {
/* & = means that you can use perror(3) call to print an error message */
/* you can always use cole_perror to print an error message */
	COLE_EFIRST,		/* Leave this at first place */
/*&*/	COLE_EMEMORY,		/* Failed malloc(3) or realloc(3) */
/*&*/	COLE_EOPENFILE,		/* Failed fopen(3) */
/*&*/	COLE_ECLOSEFILE,	/* Failed fclose(3) */
/*&*/	COLE_EREAD,		/* Failed fread(3) */
/*&*/	COLE_EWRITE,		/* Failed fwrite(3) */
/*&*/	COLE_EREMOVE,		/* Failed remove(3) */
/*&*/	COLE_ETMPNAM,		/* Failed tmpnam(3) */
/*&*/	COLE_ESEEK,		/* Failed fseek(3) */
/*&*/	COLE_EERRNO,		/* Some system call failed */
	COLE_ENOFILESYSTEM,	/* File is not a filesystem */
	COLE_EINVALIDFILESYSTEM,/* Filesystem is broken, it's invalid */
	COLE_EISNOTDIR,		/* Directory entry is not a directory */
	COLE_EISNOTFILE,	/* Directory entry is not a file */
	COLE_EFILENOTFOUND,	/* Doesn't exist a file with the given name */
	COLE_EOF,		/* End of file has been reached */
	COLE_EMEMBERISNOTDIR,	/* A member of the filename is not
				   a directory */
	COLE_EBROKENFILENAME,	/* The filename is not right written */
	COLE_EFILENAMEISNOTFILE,/* Filename is not a file */
	COLE_EFSEEKDELTA,	/* Delta argument is not valid */
	COLE_EFSEEKFLAG,	/* Flag argument is not valid */
	COLE_EUNKNOWN,		/* An unknown error ocurred, can be a bug */
	COLE_ELAST		/* Leave this at last place */
};

cole_perror ()

void        cole_perror                     (const char *s,
                                             COLERRNO colerrno);

Prints a message on the standard error output, describing the error colerrno, preceding it with the string s, a semicolon and a space. It handles COLE_EERRNO value too, calling perror(3).

s : string to print before the error message. It can be NULL.
colerrno : error value of which a message will be printed.

struct COLEFS

struct COLEFS {
	/* This structure is for internal use only, not for the public API */
	pps_entry *tree;
	U32 root;			/* entry root, root pps_entry */
	U8 *BDepot;
	U8 *SDepot;
	FILE *sbfile;
	char *sbfilename;
	FILE *file;			/* actual file (the filesystem) */
};

struct COLEDIR

struct COLEDIR {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	struct _COLEDIRENT visited_entry;
	struct _COLEFS *fs;		/* father */
};

struct COLEDIRENT

struct COLEDIRENT {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	struct _COLEDIR *dir;		/* father */
};

struct COLEFILE

struct COLEFILE {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	FILE *file;			/* actual extracted file */
	char *filename;			/* actual extracted file's name */
	U32 filesize;			/* actual extracted file size */
	struct _COLEFS *fs;		/* father */
	U32 pos;			/* file pointer position */
};

cole_mount ()

COLEFS*     cole_mount                      (char *filename,
                                             COLERRNO *colerrno);

Mounts the filesystem which is in filename.

filename : name of the file with the filesystem.
colerrno : error value (COLE_EMEMORY, COLE_EOPENFILE, COLE_ENOFILESYSTEM, COLE_EINVALIDFILESYSTEM, COLE_EUNKNOWN).
Returns : a filesystem in success, or NULL in other case.

cole_umount ()

int         cole_umount                     (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);

Umounts the filesystem colefilesystem.

colefilesystem : filesystem to umount.
colerrno : error value (COLE_ECLOSEFILE, COLE_EREMOVE).
Returns : zero in success, no zero in other case.

cole_print_tree ()

int         cole_print_tree                 (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);

Prints on the standard output the tree of files and directories contained in colefilesystem. Currently this call always success.

colefilesystem : filesystem of which the tree will be printed.
colerrno : error value (errors from call cole_recurse_tree()).
Returns : zero in success, no zero in other case.

cole_locate_filename ()

int         cole_locate_filename            (COLEFS *colefilesystem,
                                             char *filename,
                                             void *info,
                                             COLE_LOCATE_ACTION_FUNC *action,
                                             COLERRNO *colerrno);

Locate the filename in the filesystem colefilesystem, calling action when it's found. info is arbitrary pointer passed to action. Currently, filename must begin with a '/' character, it means filename is the absolute filename.

colefilesystem : filesystem where to locate filename.
filename : name of the file or directory to be located.
info : arbitrary pointer passed to action.
action : pointer to the function that is called when founding filename.
colerrno : error value (COLE_EUNKNOWN, COLE_EMEMBERISNOTDIR, COLE_EFILENOTFOUND, COLE_EBROKENFILENAME, errors from call cole_recurse_tree()).
Returns : zero in success, 1 in other case.

cole_recurse_tree ()

int         cole_recurse_tree               (COLEFS *colefilesystem,
                                             void *info,
                                             COLE_RECURSE_DIR_FUNC *inroot,
                                             COLE_RECURSE_DIRENT_FUNC *indirentry,
                                             COLE_RECURSE_DIR_FUNC *indir,
                                             COLE_RECURSE_DIR_FUNC *outdir,
                                             COLE_RECURSE_VISIT_DIR_FUNC *visitdir,
                                             COLERRNO *colerrno);

Recurse the filesystem colefilesystem, calling the functions pointed by inroot, indirentry, indir and outdirectory when start visiting root directory, start visiting any directory entry (file or directory), start visiting a directory or end visiting a directory, respectively. If visitdir returns no zero or it's NULL, the directory is visited, otherwise is not visited. info is a arbitrary pointer which is passed to the functions pointed by inroot, indirentry, indir and outdirectory: it may be used to share arbitrary information between them.

colefilesystem : filesystem to recurse.
info : arbitrary pointer passed to the functions.
inroot : pointer to the function that is called when start visiting root directory. It can be NULL.
indirentry : pointer to the function that is called when start visiting any directory entry (file or directory). It can be NULL.
indir : pointer to the function that is called when start visiting a directory. It can be NULL.
outdir : pointer to the function that is called when end visiting a directory. It can be NULL.
visitdir : pointer to the function that is called to know if visit a directory. It can be NULL.
colerrno : error value (errors from calls cole_opendir_rootdir(), cole_opendir_direntry(), cole_closedir() and inroot, indirentry, indir, and outdir functions).
Returns : zero if recursed all the tree, no zero in other case.

cole_fopen ()

COLEFILE*   cole_fopen                      (COLEFS *colefilesystem,
                                             char *filename,
                                             COLERRNO *colerrno);

Opens the file with the name filename in the filesystem colefilesystem. Currently, filename must begin with a '/' character, it means filename is the absolute filename.

colefilesystem : filesystem in which filename is in.
filename : name of the file to open.
colerrno : error value (COLE_EFILENOTFOUND, errors from calls cole_opendir_rootdir(), cole_fopen_direntry() and cole_locate_filename()).
Returns : a file in success, or NULL in other case.

cole_fopen_direntry ()

COLEFILE*   cole_fopen_direntry             (COLEDIRENT *coledirentry,
                                             COLERRNO *colerrno);

Opens a directory entry as file.

coledirentry : directory entry to be opened as file.
colerrno : error value (COLE_EISNOTFILE, COLE_EMEMORY, COLE_ETMPNAM, COLE_EOPENFILE, COLE_EINVALIDFILESYSTEM, COLE_EREAD, COLE_EWRITE, COLE_EUNKNOWN).
Returns : a file in success, or NULL in other case.

cole_fclose ()

int         cole_fclose                     (COLEFILE *colefile,
                                             COLERRNO *colerrno);

Closes the file colefile.

colefile : file to be closed.
colerrno : error value (COLE_ECLOSEFILE, CLOSE_EREMOVE).
Returns : zero in sucess, no zero in other case.

cole_fread ()

size_t      cole_fread                      (COLEFILE *colefile,
                                             void *ptr,
                                             size_t size,
                                             COLERRNO *colerrno);

Reads size bytes from colefile and store them in the location given by ptr. If not success, the file position indicator is not changed.

colefile : file to be read.
ptr : memory location where the bytes will be stored.
size : how many bytes will be read.
colerrno : error value (COLE_EOF, COLE_EREAD, COLE_ESEEK).
Returns : in sucess the number of bytes actually readed (maximum size) or zero in other case.

cole_feof ()

int         cole_feof                       (COLEFILE *colefile);

Tests if the end of file has been reached in colefile.

colefile : file to be tested.
Returns : no zero if the end of file has been reached, zero in other case.

cole_fsize ()

size_t      cole_fsize                      (COLEFILE *colefile);

colefile : file of which its size will be returned.
Returns :the size in bytes of the file colefile.

cole_ftell ()

size_t      cole_ftell                      (COLEFILE *colefile);

Get the current value of the file position indicator for the file colefile.

colefile : file of which the file position indicator will be get.
Returns : The file position.

cole_fseek ()

int         cole_fseek                      (COLEFILE *colefile,
                                             size_t delta,
                                             COLE_SEEK_FLAG direction,
                                             COLERRNO *colerrno);

Sets the value of the file position indicator for the file colefile delta bytes from the beginning of the file, forward from the current position, backward from the current position, or from the end of the file, if direction is COLE_SEEK_SET, COLE_SEEK_BACKWARD, COLE_SEEK_FORWARD or COLE_SEEK_END, respectively. The file position indicator will always be <= colefile->filesize. If you delta is such that the previous line would not true, cole_fseek fails.

colefile : file of which its file position indicator will be set.
delta : number of bytes that the file position indicator will be moved.
direction : from where start to count the delta bytes.
colerrno : error value (COLE_EFSEEKDELTA).
Returns : zero in success, no zero in other case.

cole_frewind ()

int         cole_frewind                    (COLEFILE *colefile,
                                             COLERRNO *colerrno);

Sets the value of the file position indicator for the file colefile in the beginning of the file.

colefile : file of which its file position indicator will be rewind.
colerrno : error value (error from call cole_fseek()).
Returns : zero in success, no zero in other case.

cole_opendir_rootdir ()

COLEDIR*    cole_opendir_rootdir            (COLEFS *colefilesystem,
                                             COLERRNO *colerrno);

Opens the root directory of the filesystem colefilesystem as directory.

colefilesystem : filesystem of which the root directory will be opened.
colerrno : error value (COLE_EMEMORY).
Returns : a directory in success, or NULL in other case.

cole_opendir_direntry ()

COLEDIR*    cole_opendir_direntry           (COLEDIRENT *coledirentry,
                                             COLERRNO *colerrno);

Opens a directory entry as directory.

coledirentry : directory entry to be opened as directory.
colerrno : error value (COLE_EISNOTDIR, COLE_EMEMORY).
Returns : a directory in success, or NULL in other case.

cole_closedir ()

int         cole_closedir                   (COLEDIR *coledir,
                                             COLERRNO *colerrno);

Closes the directory coledir. Currently this call always success.

coledir : directory to be closed.
colerrno : error value().
Returns : zero in success, no zero in other case.

cole_visiteddirentry ()

COLEDIRENT* cole_visiteddirentry            (COLEDIR *coledir);

coledir : 
Returns : 

cole_nextdirentry ()

COLEDIRENT* cole_nextdirentry               (COLEDIR *coledir);

coledir : 
Returns : 

cole_direntry_isdir ()

int         cole_direntry_isdir             (COLEDIRENT *coledirentry);

Tests if the directory entry coledirentry is a directory.

coledirentry : directory entry to be tested.
Returns : no zero if it is a directory, zero in other case.

cole_direntry_isfile ()

int         cole_direntry_isfile            (COLEDIRENT *coledirentry);

Tests if the directory entry coledirentry is a file.

coledirentry : directory entry to be tested.
Returns : no zero if it is a directory, zero in other case.

cole_dir_getname ()

char*       cole_dir_getname                (COLEDIR *coledir);

coledir : 
Returns : 

cole_dir_getsize ()

size_t      cole_dir_getsize                (COLEDIR *coledir);

coledir : 
Returns : 

cole_dir_getsec1 ()

long        cole_dir_getsec1                (COLEDIR *coledir);

coledir : 
Returns : 

cole_dir_getsec2 ()

long        cole_dir_getsec2                (COLEDIR *coledir);

coledir : 
Returns : 

cole_dir_getdays1 ()

long        cole_dir_getdays1               (COLEDIR *coledir);

coledir : 
Returns : 

cole_dir_getdays2 ()

long        cole_dir_getdays2               (COLEDIR *coledir);

coledir : 
Returns : 

cole_direntry_getname ()

char*       cole_direntry_getname           (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

cole_direntry_getsize ()

size_t      cole_direntry_getsize           (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

cole_direntry_getdays1 ()

long        cole_direntry_getdays1          (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

cole_direntry_getsec1 ()

long        cole_direntry_getsec1           (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

cole_direntry_getdays2 ()

long        cole_direntry_getdays2          (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

cole_direntry_getsec2 ()

long        cole_direntry_getsec2           (COLEDIRENT *coledirentry);

coledirentry : 
Returns : 

xlhtml/cole/doc/cole-manual/cole-internals.html0100644000076400007640000006001007446125606022223 0ustar jackshckjackshckInternals

Internals

Name

Internals -- cole internals - don't trust in anything here, because it may (and will) change.

Synopsis



struct      COLEFS;
struct      COLEDIRENT;
struct      COLEDIR;
struct      COLEFILE;
#define     F32
#define     F64
#define     U8
#define     U16
#define     U32
U16         fil_sreadU16                    (U8 *in);
U32         fil_sreadU32                    (U8 *in);
F64         fil_sreadF64                    (U8 *in);
void        fil_swriteU16                   (U8 *dest,
                                             U16 *src);
void        fil_swriteU32                   (U8 *dest,
                                             U32 *src);
#define     verbose_return                  ()
#define     test                            (t,retval)
#define     test_exitf                      (t,retval,func)
#define     test_call                       (t,typeretval)
#define     test_call_exitf                 (t,typeretval,func)
#define     report_bug                      (prog)
#define     assert_return                   (prog,t,retval)
#define     verbose_d                       (n)
#define     verbose                         (s)
#define     verbose_wonl                    (s)
#define     verboseU8                       (expr)
#define     verboseU16                      (expr)
#define     verboseU32                      (expr)
#define     verboseS                        (expr)
#define     verboseS_wonl                   (expr)
#define     warning                         (t)
#define     verboseU32Array                 (array,len)
#define     verboseU8Array_force            (rec,len,reclen)
#define     verboseU8Array                  (rec,len,reclen)

Description

Contains calls to access directly the file system, and endianess care calls.

Details

struct COLEFS

struct COLEFS {
	/* This structure is for internal use only, not for the public API */
	pps_entry *tree;
	U32 root;			/* entry root, root pps_entry */
	U8 *BDepot;
	U8 *SDepot;
	FILE *sbfile;
	char *sbfilename;
	FILE *file;			/* actual file (the filesystem) */
};

struct COLEDIRENT

struct COLEDIRENT {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	struct _COLEDIR *dir;		/* father */
};

struct COLEDIR

struct COLEDIR {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	struct _COLEDIRENT visited_entry;
	struct _COLEFS *fs;		/* father */
};

struct COLEFILE

struct COLEFILE {
	/* This structure is for internal use only, not for the public API */
	U32 entry;
	FILE *file;			/* actual extracted file */
	char *filename;			/* actual extracted file's name */
	U32 filesize;			/* actual extracted file size */
	struct _COLEFS *fs;		/* father */
	U32 pos;			/* file pointer position */
};

F32

#define     F32

F64

#define     F64

U8

#define U8      unsigned char

U16

#define     U16

U32

#define     U32

fil_sreadU16 ()

U16         fil_sreadU16                    (U8 *in);

in : 
Returns : 

fil_sreadU32 ()

U32         fil_sreadU32                    (U8 *in);

in : 
Returns : 

fil_sreadF64 ()

F64         fil_sreadF64                    (U8 *in);

in : 
Returns : 

fil_swriteU16 ()

void        fil_swriteU16                   (U8 *dest,
                                             U16 *src);

dest : 
src : 

fil_swriteU32 ()

void        fil_swriteU32                   (U8 *dest,
                                             U32 *src);

dest : 
src : 

verbose_return()

#define     verbose_return()

test()

#define     test(t,retval)

t : 
retval : 

test_exitf()

#define     test_exitf(t,retval,func)

t : 
retval : 
func : 

test_call()

#define     test_call(t,typeretval)

t : 
typeretval : 

test_call_exitf()

#define     test_call_exitf(t,typeretval,func)

t : 
typeretval : 
func : 

report_bug()

#define     report_bug(prog)

prog : 

assert_return()

#define     assert_return(prog,t,retval)

prog : 
t : 
retval : 

verbose_d()

#define     verbose_d(n)

n : 

verbose()

#define     verbose(s)

s : 

verbose_wonl()

#define     verbose_wonl(s)

s : 

verboseU8()

#define     verboseU8(expr)

expr : 

verboseU16()

#define     verboseU16(expr)

expr : 

verboseU32()

#define     verboseU32(expr)

expr : 

verboseS()

#define     verboseS(expr)

expr : 

verboseS_wonl()

#define     verboseS_wonl(expr)

expr : 

warning()

#define     warning(t)

t : 

verboseU32Array()

#define     verboseU32Array(array,len)

array : 
len : 

verboseU8Array_force()

#define     verboseU8Array_force(rec,len,reclen)

rec : 
len : 
reclen : 

verboseU8Array()

#define     verboseU8Array(rec,len,reclen)

rec : 
len : 
reclen : 

xlhtml/cole/doc/cole-manual/copyright-and-disclaimer.html0100644000076400007640000000447707446125606024205 0ustar jackshckjackshckCopyright and disclaimer

Copyright and disclaimer

This document is copyright 1999 by Roberto Arturo Tena Sánchez. This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This document is provided as is without any express or implied warranties. While every effort has been taken to ensure the accuracy of the information contained in this document, the author/maintainer/contributors assume(s) no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

xlhtml/cole/doc/cole-manual/docbook.css0100755000076400007640000000157007446125606020561 0ustar jackshckjackshck.BOOK .TITLE { text-align: center } .BOOK .SUBTITLE { text-align: center } .BOOK .CORPAUTHOR { text-align: center } .BOOK .AUTHOR { text-align: center } .BOOK .AFFILIATION { text-align: center } .BOOK .EDITEDBY { text-align: center } .BOOK .EDITOR { text-align: center } .BOOK .GRAPHIC { text-align: center } .ARTICLE .TITLE { text-align: center } .ARTICLE .SUBTITLE { text-align: center } .ARTICLE .CORPAUTHOR { text-align: center } .ARTICLE .AUTHOR { text-align: center } .ARTICLE .AFFILIATION { text-align: center } .ARTICLE .EDITEDBY { text-align: center } .ARTICLE .EDITOR { text-align: center } .ARTICLE .GRAPHIC { text-align: center } .ARTICLE .ABSTRACT { margin-left: 0.5in; margin-right: 0.5in; font-style: italic } xlhtml/cole/doc/cole-manual/features.html0100644000076400007640000000524707446125607021136 0ustar jackshckjackshckFeatures

Features

cole 2.x release series:

  • Can open Structured Storage files generated with programs from Microsoft, StarDivision and FlashPix.

  • Is written in C, for better performance.

  • Should compile in UNIX-like systems with ANSI C libraries and a ANSI C compiler.

  • Has a new good-looking API, modelled after ANSI C stdio.h routines.

  • Uses standard automake, autoconf and libtool generated files.

  • Provides a standard configure script.

  • Builds shared (dynamic) libraries if the plattform and libtool support it.

  • Provides standard targets in the Makefile (ie. install, clean, etc).

  • Can use (thanks to the configure script) plattform dependent system calls for better performance.

xlhtml/cole/doc/cole-manual/gpl-license-how-to-apply.html0100644000076400007640000001163307446125607024054 0ustar jackshckjackshckHow to Apply These Terms to Your New Programs

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.

one line to give the program's name and a brief idea of what it does.
Copyright (C) year  name of author

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year  name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'.  This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.

The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.

xlhtml/cole/doc/cole-manual/gpl-license-terms.html0100644000076400007640000003403207446125610022636 0ustar jackshckjackshckTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it's not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it's up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

xlhtml/cole/doc/cole-manual/gpl-license.html0100644000076400007640000001173607446125610021514 0ustar jackshckjackshckGNU GENERAL PUBLIC LICENSE

Chapter 6. GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it's not allowed.

Preamble

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.

xlhtml/cole/doc/cole-manual/how-to-compile.html0100644000076400007640000001147607446125611022157 0ustar jackshckjackshckHow to compile cole

Chapter 2. How to compile cole

The file INSTALL in the source code gives detailed instructions on how to configure, compile and install cole.

Briefly, you need to run the GNU standard configure script, with the arguments you want. To see the arguments that configure accepts, run ./configure --help. The most usual argument is --prefix=PREFIX, which tells configure to install cole in the directory PREFIX. After that, you need to run make to compile cole, and make install to install it.

The configure script accepts, besides the standard arguments, the following flags:

--enable-osf-check. Turn on short align for OSF compiler. If you have errors while compiling under OSF1, enable this flag.
--enable-verbose. Turn on verbose. It is useful if you want to send a bug report. It is useful for cole developers too.
--enable-debug Turn on GNU CC debug flags. It is useful for cole developers, so may be you don't want to use it.

A tipical session is shown below.

$ ls
cole-2.0.0.tar.gz
$ gzip -d cole-2.0.0.tar.gz
$ tar -xf cole-2.0.0.tar
$ ls
cole-2.0.0.tar      cole-2.0.0/
$ cd cole-2.0.0
$ ./configure --prefix=/opt
...
Configured cole release 2.0.0 
$ make
...
$ make install
...
$ make clean
...

When installing, a shell script named cole-config will be installed in PREFIX/bin if you used the the --prefix=PREFIX argument, or in /usr/local/bin if you didn't. That directory must be listed in the content of the enviroment variable PATH when configuring another program that uses cole.

If you system support it, will be compiled and installed shared libraries, to minimize size of the executables. By this reason, is important to include the directory PREFIX/bin or /usr/local/bin (which appropiate) in the file that your system command ldconfig reads in order to regenerate the list of shared libraries (in some systems, you can list the directory in the content of the enviroment variable LD_LIBRARY_PATH instead).

xlhtml/cole/doc/cole-manual/index.html0100644000076400007640000000471607446125611020422 0ustar jackshckjackshckcole Library Reference Manualxlhtml/cole/doc/cole-manual/introduction.html0100644000076400007640000000704507446125611022032 0ustar jackshckjackshckIntroduction

Chapter 1. Introduction

What is cole?

cole is a free C OLE library.

cole is distributed under the terms of the GNU General Public License (GPL) to give an impulse to the Free Software. cole distribution license is compatible with the Open Source definition.

Using cole, you can access Microsoft' Structured Storage files. The most popular Microsoft's programs generate Structured Storage files, incluiding the Microsoft' suite for offices. StarDivision' suite (StarOffice) generate Structured Storage files too. FlashPix file format is Structured Storage too.

What is a Structured Storage file? Inside a Structured Storage file there is a filesystem, with directories and files, which Microsoft calls containers and streams. Using cole you can travel through such filesystem and access the files.

cole doesn't know about internal structure of a stream, it only reads the raw data. You can use the Microsoft's documentation available at http://msdn.microsoft.com or the information available at http://www.wotsit.org to know the binary file format of the streams. If you know anything in the side of StarDivision email me. FlashPix file format is well documented.

cole was developed using the information available at http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/guide.html and the OLE::Storage Perl module from the same site, and no information from any other source (incluiding Microsoft) has been used.

xlhtml/cole/doc/cole-manual/legal-issues.html0100644000076400007640000000523507446125611021705 0ustar jackshckjackshckLegal issues

Chapter 5. Legal issues

Distribution and Freedom

cole is Free Software, which means is distributed under a license that protect your freedom. cole distribution license is compatible with the Open Source definition.

cole is distributed under the terms of the GNU General Public License (GPL). A copy of the license is in the file COPYING in the source code and in this document. Particulary, this means at least two things:

  1. All the code statically or dinamically linked against cole must be distributed under the terms of a license compatible with GPL.

  2. If you change the cole source code and you want to distribute a compiled version, you must release the changed cole source code too.

xlhtml/cole/doc/cole-manual/libcole.html0100644000076400007640000001025507446125611020717 0ustar jackshckjackshckcole Library

Chapter 3. cole Library

Table of Contents
API — Public cole API for the present release.
Internals — cole internals - don't trust in anything here, because it may (and will) change.

This is the documentation autogenerated from the source code. It have the cole API for this release, and some internal structures and internal calls.

Note: what Microsoft calls stream is called file in this project, storage is called directory and docfile (a Structured Storage file) is called filesystem.

The files in the subdirectory examples in the source code show the complete public API in action. Briefly, if you know how to use the stdio.h ANSI C calls, cole API will be very easy for you.

If you use autoconf in your own proyect, the included file cole.m4 may be useful for you. It contains the m4 macro AM_PATH_COLE that detect the presense or ausence of the cole library in the system being configured. To use it:

  1. If cole is not installed in your system (i.e. aclocal can't find cole.m4), add the content of cole.m4 to your own acinclude.m4 file (create it in case you haven't one).

  2. Add a line like AM_PATH_COLE(2.0.0, [LIBS="$LIBS $COLE_LIBS" CFLAGS="$CFLAGS $COLE_CFLAGS"]) to your configure.in file. Here we are requesting for cole release 2.0.0, and adding the necessary flags to LIBS and CFLAGS.

  3. Run aclocal to generate the file aclocal.m4. This file will have many m4 macros, incluiding the cole m4 macro, and

  4. Run autoconf to generate the script configure.

Many API calls take an argument at the end called colerrno. If it's not NULL and the call failed, it store the error code for fail, if any (if the call was successfully ended, its value is not modified).

xlhtml/cole/doc/cole-manual/requirements-to-compile.html0100644000076400007640000000342007446125612024074 0ustar jackshckjackshckRequirements to compile

Requirements to compile

To have a system with ANSI C libraries, a ANSI C compiler, a make program and the shell /bin/sh.

xlhtml/cole/doc/cole-manual/trademarks.html0100644000076400007640000000451407446125612021445 0ustar jackshckjackshckTrademarks

Trademarks

"Microsoft Word", "Microsoft Excel", "Microsoft Publisher" and "Microsoft Power Point" are trademarks of Microsoft Corporation.

"StarOffice" may be is a trademark of StarDivision.

"FlashPix" may be is a trademark.

"UNIX" is a trademark.

"Free Software" is not trademark of anyone, but it's an important term in the Free Software community, and for the Free Software Foundation.

All other trademarks are the property of their respective owners.

If another trademark is mentioned in this document and it needs to be listed above, please email to the maintainer (<arturo@directmail.org>).

xlhtml/cole/doc/cole-manual/stylesheet-images/0040755000076400007640000000000007473177125022063 5ustar jackshckjackshckxlhtml/cole/doc/cole-manual/stylesheet-images/CVS/0040755000076400007640000000000007473177125022516 5ustar jackshckjackshckxlhtml/cole/doc/cole-manual/stylesheet-images/CVS/Root0100644000076400007640000000006307473177125023360 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/doc/cole-manual/stylesheet-images/CVS/Repository0100644000076400007640000000005607473177125024616 0ustar jackshckjackshckxlhtml/cole/doc/cole-manual/stylesheet-images xlhtml/cole/doc/cole-manual/stylesheet-images/CVS/Entries0100644000076400007640000000106407473177125024050 0ustar jackshckjackshck/caution.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /home.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /important.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /next.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /note.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /prev.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /tip.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /toc-blank.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /toc-minus.gif/1.1.1.1/Wed Mar 20 15:32:26 2002// /toc-plus.gif/1.1.1.1/Wed Mar 20 15:32:27 2002// /up.gif/1.1.1.1/Wed Mar 20 15:32:27 2002// /warning.gif/1.1.1.1/Wed Mar 20 15:32:27 2002// D xlhtml/cole/doc/cole-manual/stylesheet-images/caution.gif0100755000076400007640000000201707446125612024206 0ustar jackshckjackshckGIF87a÷!!11BBZZcckkss{{„„„„sŒŒŒŒsŒŒŒ””””s””{œœœœsœœ{œœ”œœœ¥¥¥¥c¥¥œ¥¥¥µµµµZµµcµµµ½½½½cÎÎÎÎÎÖÖÖÖÎÖÖÖÞÞÞÞ1ÞÞ9ÞÞBçççç1çç9çççïïïïï÷÷÷÷÷÷÷÷1÷÷÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,ôuH° Áƒ_Ä@È ‰6DHB $N$ø¢Á 4>pиña (e|ˆ¸QGE(YÀéaäD`ÊèP 8j’,XÑEJt@ÃP?MºeH›œL)ƒ‚€%¸ªd)ð¥Ø üäJC¨Ž¨geŒp`-[ tÄààÆYÌ«b 16|ø‹ÀÁÙÜûÁoÊ "ؕтd‚‰=àHÉ)UDF¸W4Ê  „•áÂÂ热-—X«ÂöÆÄ‹¹B¾Ý²åÎÄ'†Æ¡:ùo ·Ä ÂùÀ€;xlhtml/cole/doc/cole-manual/stylesheet-images/home.gif0100755000076400007640000000174307446125612023501 0ustar jackshckjackshckGIF87a#÷Œ!Œ!)”)1œ1BœBJ¥Jc­cs½s„½„ŒÆŒ”Δ¥Î¥µÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,#È%H° Áƒ*\Ȱ¡C4p ÁA24 @`42D@` Pè ‚J F`á I“(%X°`Ì@p@Ê ÈXAPŸJ``@ :H€:µä­¼)ðäÖœ\ €EÙ $Pµ6-Yå‚`U{¶«„« ‹Ö”&d õ@HˆAAÁˆ+^Ì!A‚Œ.Îla³„°Š\ͺµë†;xlhtml/cole/doc/cole-manual/stylesheet-images/important.gif0100755000076400007640000000207107446125612024561 0ustar jackshckjackshckGIF87a÷)))999BB1BBBJJJRRRZZ)ccccRccckkBkkkssR{{{„„„ŒŒŒŒ9ŒŒ{ŒŒŒ””Z””Œ”””œœZœœcœœ{œœœ¥¥c¥¥„¥¥”¥¥œ¥¥¥­­!­­9­­k­­{­­„­­Œ­­¥­­­µµJµµRµµŒµµµ½½½½Z½½„½½œ½½½ÆÆÆÆZÆÆÆÎÎsÎÎÎÖÖÖÖRÖÖcÖÖkÖÖÖÞÞÞÞ!ÞÞ1ÞÞ9ÞÞRÞÞÞçççç!çç)çç1ççZççcçç{çççïïïïïï1ïïBïïï÷÷÷÷÷÷1÷÷9÷÷J÷÷÷ÿÿÿÿÿÿÿÿ!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,þ·Hp‰Aƒ*ܲĆˆ ""BÄae!A+3,|Ò¤cG,à°È0ƒ‡$WRªT©CƒˆŠ ­dˆÑd¥Í”ML¸ˆ9Ó& |Üܰs Ž5WR@AR•M< ¸$J› ˜rSG 8Pܼ"i'c9,Ù""ÈØLd‹ÇOW¾`ÂØ+D2ÜÍ«2$þ<öG+ Æ;ÖÈ;$3¾ùÄÂ%ŠElqÁõæ 9æÞ¬»¥Ç‡±Ìá b­•:nB`jà‡M,0жö@؇/nò… 7µ ½)R¡ˆ „ó0r¡ 5žŒ}Â"ƒ ’­ET@A¤=‘*¨X‹žª ø'ÒO;xlhtml/cole/doc/cole-manual/stylesheet-images/next.gif0100755000076400007640000000170407446125612023524 0ustar jackshckjackshckGIF87a#÷„Œ!Œ!)”)1œ1BœBJ¥JR­Rc­ckµk„½„ŒÆŒ”Δ¥Î¥­Ö­µÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,#©+H° Áƒ*\Ȱ¡Ã‚L(!âć %pQ† "8T@€€À(¦>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~€€€‚‚‚ƒƒƒ„„„………†††‡‡‡ˆˆˆ‰‰‰ŠŠŠ‹‹‹ŒŒŒŽŽŽ‘‘‘’’’“““”””•••–––———˜˜˜™™™ššš›››œœœžžžŸŸŸ   ¡¡¡¢¢¢£££¤¤¤¥¥¥¦¦¦§§§¨¨¨©©©ªªª«««¬¬¬­­­®®®¯¯¯°°°±±±²²²³³³´´´µµµ¶¶¶···¸¸¸¹¹¹ººº»»»¼¼¼½½½¾¾¾¿¿¿ÀÀÀÁÁÁÂÂÂÃÃÃÄÄÄÅÅÅÆÆÆÇÇÇÈÈÈÉÉÉÊÊÊËËËÌÌÌÍÍÍÎÎÎÏÏÏÐÐÐÑÑÑÒÒÒÓÓÓÔÔÔÕÕÕÖÖÖ×××ØØØÙÙÙÚÚÚÛÛÛÜÜÜÝÝÝÞÞÞßßßàààáááâââãããäääåååæææçççèèèéééêêêëëëìììíííîîîïïïðððñññòòòóóóôôôõõõööö÷÷÷øøøùùùúúúûûûüüüýýýþþþÿÿÿ,þÿ HðœAƒ*Ø«¥R:[˜ð1F¥¬{Çñœ1J”&R<÷ÐÅÎ(ÕZø®ÔÊ“[öªHi&L‚5 :+u³b)“öL¸S`Q‚ÆzÕRÚËÛA„ÿJ‹êí5k¥ÕræÍš3F„ F¤tnë9© · <—Ò˜³9M½u élF²ßQ£E‰”=5k-5öޤ·»Sîáz˜Ò¿wÖ=ëQb½sTö¸$eJ{Jq\³Ç«±=@žýWËšÀZ!×lž3ƦÂR±Æ<-%3!c[BŽ*òŸÓã'{ÙÆšxèÎá¯yýǨøÀ^” Süj l¿ÃÄŠQî9o;µ6‡‰$HÜÚ;xlhtml/cole/doc/cole-manual/stylesheet-images/prev.gif0100755000076400007640000000166007446125612023523 0ustar jackshckjackshckGIF87a#÷„Œ!Œ!)”)1œ1BœBJ¥JR­Rkµks½s„½„ŒÆŒ”Δ¥Î¥­Ö­ÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,#•)H° Áƒ*\Ȱ¡CƒH|ð°b‚P±¡‚( @‘":ü(P`DÀ@ œ4À‘¡ Œ¤€‚  ÐÀÓž>A,J¨‚¡$ õ(u Uœ0Ùð"A zh@’#X‡¤A¢@ H˜@W¥ß¿€; ;xlhtml/cole/doc/cole-manual/stylesheet-images/tip.gif0100755000076400007640000000200507446125612023335 0ustar jackshckjackshckGIF87a÷  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~€€€‚‚‚ƒƒƒ„„„………†††‡‡‡ˆˆˆ‰‰‰ŠŠŠ‹‹‹ŒŒŒŽŽŽ‘‘‘’’’“““”””•••–––———˜˜˜™™™ššš›››œœœžžžŸŸŸ   ¡¡¡¢¢¢£££¤¤¤¥¥¥¦¦¦§§§¨¨¨©©©ªªª«««¬¬¬­­­®®®¯¯¯°°°±±±²²²³³³´´´µµµ¶¶¶···¸¸¸¹¹¹ººº»»»¼¼¼½½½¾¾¾¿¿¿ÀÀÀÁÁÁÂÂÂÃÃÃÄÄÄÅÅÅÆÆÆÇÇÇÈÈÈÉÉÉÊÊÊËËËÌÌÌÍÍÍÎÎÎÏÏÏÐÐÐÑÑÑÒÒÒÓÓÓÔÔÔÕÕÕÖÖÖ×××ØØØÙÙÙÚÚÚÛÛÛÜÜÜÝÝÝÞÞÞßßßàààáááâââãããäääåååæææçççèèèéééêêêëëëìììíííîîîïïïðððñññòòòóóóôôôõõõööö÷÷÷øøøùùùúúúûûûüüüýýýþþþÿÿÿ,êÿ HðœAƒ*xÎX)J¥"BtvoaÂ{½&ž»·±!%JÎ,2„èM¤3ˆïQêUQä¿s¥j)TÙK!Ìs W&tVªåÀ{{B¬ÁY°TI†¥ˆ¼7‚¥yF•¹Ð›Ñ…*‰^UÈhϪ k…„é“`Ö”xŽÒËž )åH»vä[¨?ÇÐ]ØömÝ÷ôªåëö&VÁ½¹ý'öð^…¥Bþ³êxpBÀ#ÏD¬°WÍVñ2 ±g-O¼z3&™ £ÖkQ«ÐÙk‘ý='Û˜ËÉ”=x"m‹çŠŒ|ü_@;xlhtml/cole/doc/cole-manual/stylesheet-images/toc-blank.gif0100755000076400007640000000013707446125612024417 0ustar jackshckjackshckGIF89a ³€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿ, ðɇ¦½8Ûª»§`%‚_Æ•¨tf;xlhtml/cole/doc/cole-manual/stylesheet-images/toc-minus.gif0100755000076400007640000000151307446125612024462 0ustar jackshckjackshckGIF89a ÷„„„ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ, 08P€Áƒ*L¨PÆ64‘¢1:ܘPàÄ?V"A‚;xlhtml/cole/doc/cole-manual/stylesheet-images/toc-plus.gif0100755000076400007640000000151607446125613024316 0ustar jackshckjackshckGIF89a ÷„„„ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ, 38P€Áƒ*L¨PC6tx0¢Á‡hÔH1¡Ç‡)6)qäD‘ œ;xlhtml/cole/doc/cole-manual/stylesheet-images/up.gif0100755000076400007640000000163207446125613023173 0ustar jackshckjackshckGIF87a#÷„Œ!Œ!)”)1œ1BœBc­ckµk„½„ŒÆŒ”ΔµÞµÆÞÆÎçÎÖïÖçïçï÷ïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,##H° Áƒ*\Èpàƒ DhÀ`„† €Œˆ@ ƒ €D(’d ,(°`¥Á–KF@Pò›qîÌ©P‚Bàó¨Ã "0P“ÀƒTrL€ jNjjMÈs¬B|4˶m€;xlhtml/cole/doc/cole-manual/stylesheet-images/warning.gif0100755000076400007640000000203407446125613024211 0ustar jackshckjackshckGIF87a÷!)1BJRZks{„Œ””{{œRRœZZœ{{¥¥99¥JJ¥„„¥””¥¥¥­­11­””µµ))µŒŒµœœµ¥¥µµµ½½­­½µµÆÆÆÆÆÆÎÎÎÎ))ÖÖ))ÖÖÖÞÞÞÞçç!!çççïïïïï÷÷÷÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,þyÈCŒƒâ Èp`Š6Dœ¸a‡… аp#‡ÇQ\̈#E…Ž Sæ@q#ÁPªL‰"ƒK"NªìðÀ…J–SpT9‚@€2C^”!éÇðù3Œ 3shÀ@Œ™7 ÀðÕÄœz {5kŒdeKvæŒÌ‹5+‚öŽÍšC ‚ûÎÑ€ªJºYg0@€,ŠSjˆêuf 8@ ˜Ùa@€3T¾˜ ƒGèÑ;¨P}¡µ@NNIã2C"tïÎñÂ͸ag}Q;ãmÑ7fDŸ>£…oçu˜À½;w ¶ ;xlhtml/cole/doc/Makefile.in0100644000076400007640000001475507446125572016307 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ DLLTOOL = @DLLTOOL@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ VERSION = @VERSION@ VERSION_INFO = @VERSION_INFO@ EXTRA_DIST = cole-manual.sgml introduction.sgml compile.sgml using.sgml bugs.sgml gpl.sgml legal.sgml HACKING cole-manual.sgml-old # Headers to scan for declarations scanned_headers = ../internal.h ../support.h ./cole.h # The name of the module. DOC_MODULE = cole # The top-level SGML file. DOC_MAIN_SGML_FILE = cole-manual.sgml # The directory containing the source code (if it contains documentation). DOC_SOURCE_DIR = $(top_srcdir) # The directory where the documentation will be installed TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-hook info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean-local clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am \ maintainer-clean-local @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean dist-hook: all cp $(srcdir)/cole-sections.txt $(distdir) cp -r $(srcdir)/tmpl $(distdir) cp -r $(srcdir)/cole-manual $(distdir) scan: cp $(top_builddir)/cole.h $(srcdir); \ (cd $(srcdir); \ gtkdoc-scan --module=$(DOC_MODULE) $(scanned_headers); \ rm cole.h) templates: scan (cd $(srcdir); \ gtkdoc-mktmpl --module=$(DOC_MODULE)) sgml: (cd $(srcdir); \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)) html: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2html $(DOC_MAIN_SGML_FILE); \ rm BUGS) rtf: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2rtf $(DOC_MAIN_SGML_FILE); \ -rm BUGS) ps: (cd $(srcdir); \ cat ../BUGS | sed "s/>/>/g" | sed "s/ BUGS; \ db2ps $(DOC_MAIN_SGML_FILE); \ -rm BUGS) regenerate-all: templates sgml html clean-local: (cd $(srcdir); \ rm -f *~ *.bak *.hierarchy *.signals *.args; \ rm -fr DBTOHTML_OUTPUT_DIR* *.junk $(DOC_MODULE)-decl-list.txt) maintainer-clean-local: clean (cd $(srcdir); \ rm -rf sgml html cole-manual tmpl/*.bak; \ rm -rf $(DOC_MODULE)-decl.txt) # if db2html generate subdirectories, it's broken the next rule # install-data-local: all # $(INSTALL) -d $(TARGET_DIR) # $(INSTALL) ./cole-manual/* $(TARGET_DIR) .PHONY : ps rtf html sgml templates scan # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/cole/doc/bugs.sgml0100644000076400007640000000265507446125573016063 0ustar jackshckjackshck cole developers have done their best effort to fix all the bugs of cole. But may be some of the are still hidden in the code. If you found one (or many!), please send a report to the maintainer (&maintainer-email-ulink;). When sending a report, please: Describe with detail the behavior of cole and why you think it's a bug. Configure cole using the argument --enable-verbose and send the output showing the bug. Send the content of the variables cole_version and cole_host_info that the cole release you are using have. You wil have to write a little program to do this, but it will help much. =) If you can, send the most small source code that shows the bug in action. May be you want to send the Structured Storage file you have been processing. You can send the files config.log and config.cache (which were created by configure) if you want. Thank you very much. Following is the BUGS file for this release. &BUGS-File; xlhtml/cole/doc/cole-manual.sgml0100644000076400007640000000345507446125573017317 0ustar jackshckjackshck <arturo@directmail.org>"> ]> cole Library Reference Manual 1998, 1999 &author-name-full; Introduction &Introduction; How to compile cole &How-To-Compile; cole Library This is the documentation autogenerated from the source code. It have the cole API for this release, and some internal structures and internal calls. Note: what Microsoft calls stream is called file in this project, storage is called directory and docfile (a Structured Storage file) is called filesystem. &Using-cole; &cole-API; &cole-Internals; Bugs &Bugs; Legal issues &Legal; &GPL-License-Chapter; xlhtml/cole/doc/cole-manual.sgml-old0100644000076400007640000013225407446125576020076 0ustar jackshckjackshck <arturo@directmail.org>"> &author-email;"> <arturo@directmail.org>"> free"> GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "> ]> cole Programmer Reference cole &this-release; Arturo Tena &author-email-address; 1999 &author-name-full; &license; What is cole? cole is a free C OLE library. cole is distributed under the terms of the GNU General Public License (GPL) to give an impulse to the Free Software. Using cole, you can access Microsoft' `Structured Storage' files. The most popular Microsoft's programs generate `Structured Storage' files, incluiding the Microsoft' suite for offices. StarDivision' suite (StarOffice) generate `Structured Storage' files too. FlashPix file format is `Structured Storage' too. What is a `Structured Storage' file? Inside a `Structured Storage' file there is a filesystem, with directories and files, which Microsoft calls `containers' and `streams'. Using cole you can travel through that filesystem and read the files. cole doesn't know about internal structure of a stream, it only reads the raw data. You can use then the Microsoft's documentation available at http://msdn.microsoft.com or the information available at http://www.wotsit.org to read that structure. If you know anything in the side of StarDivision email me. FlashPix is well documented. cole was developed using the information available at http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/guide.html, and no information from any other source (incluiding Microsoft) has been used. Where to get cole source code You can get the most recent stable release of cole from the Filters Project home page or from Metalab (former SunSite) archive. Compiling How to compile A standard configure script is provided. You can read the instructions in the file INSTALL. A typical configuration/compilation/installation session is shown next. $ ls cole-&this-release;.tar.gz $ gzip -d cole-&this-release;.tar.gz $ tar -xf cole-&this-release;.tar $ ls cole-&this-release;.tar.gz cole-&this-release;/ $ cd cole-&this-release; $ ./configure --prefix=/usr/local ... Configured cole release &this-release; $ make ... $ make install ... $ make clean ... You can add the following flags to configure: --enable-cole-verbose. To make cole verbose everything. Usefull when debugging cole. --enable-osf-align-check. If you have errors while compiling under OSF1, enable this flag. Please, if you have some error with cole, send the cole's output when compiled using --enable-cole-verbose to the maintainer. For additional instructions, read the file INSTALL. If you have problems, you should read the Filters Project FAQ and later email to the maintainer. Only a static library is compiled by default. If you want compile a shared library too, you have to include the flag --enable-shared when running configure, and the program that dinamically links against cole shared library still needs to be under a license compatible with GPL. This is because cole is under GPL license, not LGPL license. Supported plattforms cole has been successfully tested under (as reported by uname -mrsv or with the system information): Linux 2.0.36 #1 Wed Feb 17 19:45:41 EST 1999 i586 Linux 2.0.35 #1 Thu Jul 23 14:01:04 EDT 1998 i586 OSF1 V5.0 564 alpha OSF1 V4.0 564 alpha Solaris in Ultra Sparc (sparc-sun-solaris2.5.1) Arturo Tena <arturo@directmail.org> SunOS 5.6 Generic_105181-03 sun4u Matthew Evans <matthewe@its.caltech.edu> Windows NT 4.0 SP4 with Cygwin b20.1 with CoolView DLL Martin Scharpf <martin.scharpf@bbraun.com> If you have a different one, it will be useful to hear about you. Please, email to the maintainer. Using cole is used to access Microsoft OLE's &ss; and &cf;. Specifically, cole extracts the structures named streams from a &ssf;. Each stream is written to a new file. A dynamic tree in memory is created to store the name of the streams and the name of the files where they are written, besides other information. cole doesn't know the structure of each stream, it only extract them to new files. If you want to know the structure of a particular stream, you can read the Microsoft's documentation, or seach in Wotsit. Using that documentation, you can read the extracted streams searching for the actual information. API cole has two major functions: OLEdecode and OLEcode. The first takes an &ssf; and divide it into streams. The last takes streams and generate an &ssf; (the stream_list structure and the streams itself must be valid, but cole doesn't provide functions to validate them by now). #include <cole/cole.h> int OLEdecode char *OLEfilename pps_entry **stream_list U32 *root U16 max_level This function extracts the streams of the file wich name is OLEfilename and generate a array of pps_entry's named stream_list. The array make a tree (ie. each pps_entry have fields such as next for brothers and dir for children pps_entry's) with root pps_entry root, and this tree stores the stream's names, the names of the temporal files where the streams were written and other information. Only streams with level minor than or equal to max_level are extracted, but all streams are extracted if max_level is zero. OLEdecode returns one of the following numbers: 0. Sucess. 4. Couldn't open OLEfilename file (can use perror(3)). 8. OLEfilename file seems to be a plain text file, not a &ssf;. 9. OLEfilename is a binary file, but it's not a &ssf;. 5. Error reading from file, means OLEfilename file has a faulty &ss; format. 6. Error removing temporal files. 7. Error creating temporal files. 10. Error allocating memory, there's no more memory. #include <stdio.h> #include <cole/cole.h> struct pps_block { char name[0x20]; /* name of the stream */ U8 type; /* type of this pps: 5 == root of stream_list, 1 == dir, 2 == stream */ char filename[L_tmpnam]; /* temporal file name where the stream were written, valid only if type == 2 */ U32 size; /* the size of the temporal file, valid only if type == 2 */ U32 next; /* next pps_entry in this directory, brother pps */ U32 dir; /* pps_entry children, valid only if type != 2 */ U16 level; /* level of the pps in the tree */ U32 seconds1; /* time creation */ U32 seconds2; /* time creation */ U32 days1; /* date creation */ U32 days2; /* date creation */ /* ... */ }; typedef struct pps_block pps_entry; pps_entry structure describes one extrated stream. #include <cole/cole.h> int OLEcode const char *OLEfilename int trunc pps_entry *stream_list U32 root This function takes the stream_list tree (which have a root pps_entry root and describes some existing valid streams) and generate a &ssf; named OLEfilename. If trunc is zero and OLEfilename exists, returns 2 (see below), in any other case OLEfilename will be created or recreated as needed. OLEcode returns one of the following numbers: 0. All goes OK. 1. Error writting in OLEfilename (can use perror(3)). 2. trunc is zero and OLEfilename exist. 3. Can't create OLEfilename (can use perror(3)). 10. Error allocating memory, there's no more memory. 11. Error reading stream's temporal files. 12. Error reading stream_list, it's broken. #include <cole/cole.h> int freeOLEtree pps_entry *stream_list You must call this function at the end of processing the streams, to free memory and remove the stream files. #include <cole/cole.h> void verbosePPSTree pps_entry *stream_list U32 root int level You can use this function to display the tree of a &ssf;. Linking You need link your program against libcole.a. This means is ok: $ cc yourprogram.o libcole.a -o yourprogram If you use threads, take in count that cole is not reentrant safe (cole 2.0.0 will be reentrant safe). An example The following example is similar to the included file demo.c. It opens, display the tree and closes a &ssf;: #include <stdio.h> #include <cole/cole.h> You need to include cole/cole.h header to use the cole functions. int main (int argc, char **argv) { int result; pps_entry *stream_tree; U32 root_stream; U32 stream; if (argc != 3) { fprintf (stderr, "cole example 1. cole is a free C OLE library.\n"); fprintf (stderr, "Usage: coleexample1 srcFILE destFILE.\n"); fprintf (stderr, "Note: if srcFILE and destFILE are the same file, it will be overwritten.\n"); return 1; } Just argument checks. verbose ("Decoding ************************************"); result = OLEdecode (argv[1], &stream_tree, &root_stream, 0); Here we call OLEdecode in order to extract the structure of the &ssf; which name is stored in argv[1]. The structure will be stored in stream_tree, and the root of the structure in root_stream (we will need the root later). The last argument indicate the level of the structure that OLEdecode will extract, if it's zero it will extract all the levels. fprintf (stderr, "OLEdecode output = %d\n", result); if (result != 0) { fprintf (stderr, "Decoding: "); perror (argv[1]); return 1; } else verbose ("Success decoding"); printf ("******* Stream tree:\n"); verbosePPSTree (stream_tree, root_stream, 0); verbosePPSTree is a cole function that prints to the standard output the complete tree of a &ssf;. With the last parameter equal to zero, we are printing all levels of the structure. printf ("******* Top level no directory streams:\n"); /* travel through the top level no directory streams, just follows next field and ignore type 1 fileds */ for (stream = stream_tree[root_stream].dir; stream != 0xffffffff; stream = stream_tree[stream].next) { if (stream_tree[stream].type != 1 && stream_tree[stream].level == 1) if (!isprint(stream_tree[stream].name[0])) printf ("'\\x%02x%s'\n", stream_tree[stream].name[0], stream_tree[stream].name+1); else printf ("'%s'\n", stream_tree[stream].name); } With this code, we are traveling in the structure, which is a tree in an array, this means it's a tree of structures with indexes for the brothers and the children (if any). As you can see, the actual names of the streams may begin with no printable characters. verbose ("Coding **************************************"); result = OLEcode (argv[2], 1, stream_tree, root_stream); If you want to read the raw streams you only need OLEdecode function. But if you want to generate a &ssf;, you need to have the raw streams, the tree in an array structure and the root of such tree to use OLEcode. cole &this-release; doesn't provide functions to such tasks, wait for cole 2.0.0. fprintf (stderr, "OLEcode output = %d\n", result); if (result != 0) { fprintf (stderr, "Coding "); perror (argv[2]); return 1; } else verbose ("Success coding\n"); verbose ("Freeing *************************************"); /* need to free all the allocated memory */ result = freeOLEtree (stream_tree); If you used OLEdecode, you must use freeOLEtree after process the raw stream. fprintf (stderr, "freeOLEtree output = %d\n", result); return result; } When you run this example, the following output is produced: $ ./coleexample1 examples/text.doc text2.doc OLEdecode output = 0 ******* Stream tree: DIR 00 'Root Entry' FILE 01 98 ' CompObj' FILE 03 312 ' SummaryInformation' FILE 04 2381 'WordDocument' FILE 02 20 ' Ole' ******* Top level no directory streams: '\x01CompObj' '\x05SummaryInformation' 'WordDocument' '\x01Ole' OLEcode output = 0 freeOLEtree output = 0 Another example The next example opens a file, and guess what version of Microsoft Excel generated the file. #include <stdio.h> #include <string.h> #include <cole/cole.h> int main (int argc, char **argv) { pps_entry *stream_tree; U32 root_stream; U32 stream; FILE * f; unsigned char buff[6]; if (argc != 2) { fprintf (stderr, "cole example 2. cole is a free C OLE library.\n"); fprintf (stderr, "Usage: coleexample2 FILE.\n"); return 1; } if (OLEdecode (argv[1], &stream_tree, &root_stream, 0)) { printf ("File is not a Microsoft Excel one.\n"); return 1; } for (stream = stream_tree[root_stream].dir; stream != 0xffffffff; stream = stream_tree[stream].next) { if (stream_tree[stream].type != 1 && stream_tree[stream].level == 1) if (!strcmp(stream_tree[stream].name, "Workbook") || !strcmp(stream_tree[stream].name, "Book")) { /* Book stream found */ f = fopen (stream_tree[stream].filename, "rb"); if (f == NULL) { perror ("Error opening temporal file"); freeOLEtree (stream_tree); return 1; } if (fread (buff, 1, 6, f) != 6) { perror ("Error reading temporal file"); fclose (f); freeOLEtree (stream_tree); return 1; } /* the next is from the internal structure of a Excel stream */ if (buff[0] != 0x09 || buff[1] != 0x08) { printf ("File is not a Microsoft Excel one.\n"); fclose (f); freeOLEtree (stream_tree); return 1; } if (buff[4] != 0x00 || (buff[5] != 0x05 && buff[5] != 0x06)) { printf ("File is from an unknown Microsoft Excel version.\n"); fclose (f); freeOLEtree (stream_tree); return 1; } if (buff[5] == 0x05) printf ("File is from Microsoft Excel version 5 or 7.\n"); else printf ("File is from Microsoft Excel version 8.\n"); fclose (f); freeOLEtree (stream_tree); return 0; } } printf ("File is not a Microsoft Excel one.\n"); freeOLEtree (stream_tree); return 0; } When you run this example, the following output is produced: $ coleexample2 examples/sprsheet.xls File is from Microsoft Excel version 5 or 7. $ coleexample2 examples/text.doc File is not a Microsoft Excel one. $ coleexample2 README File is not a Microsoft Excel one. Miscelaneous issues Current maintainer The current cole's maintainer is &maintainer-name-full; &maintainer-email-ulink;. Patches How to apply a patch An example is better that an explanation. Here we will patch to upgrade from 0.1.0 release to 1.0.0 release. $ ls cole-0.1.0/ cole-0.1.0-1.0.0.diff $ cd cole-0.1.0 $ patch -Np1 < ../cole-0.1.0-1.0.0.diff $ cd .. $ mv cole-0.1.0 cole-1.0.0 $ ls cole-1.0.0/ cole-0.1.0-1.0.0.diff How to make a patch If you fix or add some code, we will very glad if you send the patch to the maintainer. The right way to make a patch is to have two directories: the original (here cole-1.0.0) and another when your changes have been made (here cole-1.0.0-myfix). $ ls cole-1.0.0/ cole-1.0.0-myfix/ $ LC_ALL=C TZ=UTC0 diff -Naur cole-1.0.0 cole-1.0.0-myfix > cole-1.0.0-patch $ ls cole-1.0.0/ cole-1.0.0-my-fix/ cole-1.0.0-patch You can then send cole-1.0.0-patch to the maintainer explaining what did you fix or what did you add. References cole homepage. OLE-Storage. (formely LAOLA). Authors: see the file AUTHORS. GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it's not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it's not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it's up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the program's name and a brief idea of what it does. Copyright (C) year name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Legal issues Trademarks "Microsoft Word", "Microsoft Excel", "Microsoft Publisher" and "Microsoft Power Point" are trademarks of Microsoft Corporation. "Free Software" is not trademark of anyone, but it's an important term in the Free Software community, and for the Free Software Foundation. All other trademarks are the property of their respective owners. If there is a trademark here that needs to be listed formally above, please email to the &maintainer-email-ulink; so it can be added. Copyright and disclaimer &license; This document is provided as is without any express or implied warranties. While every effort has been taken to ensure the accuracy of the information contained in this document, the author/maintainer/contributors assume(s) no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. xlhtml/cole/doc/cole-sections.txt0100644000076400007640000000236707446125576017552 0ustar jackshckjackshck
internals Internals COLEFS COLEDIRENT COLEDIR COLEFILE F32 F64 U8 U16 U32 fil_sreadU16 fil_sreadU32 fil_sreadF64 fil_swriteU16 fil_swriteU32 verbose_return test test_exitf test_call test_call_exitf report_bug assert_return verbose_d verbose verbose_wonl verboseU8 verboseU16 verboseU32 verboseS verboseS_wonl warning verboseU32Array verboseU8Array_force verboseU8Array
cole/cole.h
api API COLE_MAJOR_VERSION COLE_MINOR_VERSION COLE_MICRO_VERSION cole_major_version cole_minor_version cole_micro_version cole_version cole_host_info COLERRNO cole_perror COLEFS COLEDIR COLEDIRENT COLEFILE cole_mount cole_umount cole_print_tree cole_locate_filename cole_recurse_tree cole_fopen cole_fopen_direntry cole_fclose cole_fread cole_feof cole_fsize cole_ftell cole_fseek cole_frewind cole_opendir_rootdir cole_opendir_direntry cole_closedir cole_visiteddirentry cole_nextdirentry cole_direntry_isdir cole_direntry_isfile cole_dir_getname cole_dir_getsize cole_dir_getsec1 cole_dir_getsec2 cole_dir_getdays1 cole_dir_getdays2 cole_direntry_getname cole_direntry_getsize cole_direntry_getdays1 cole_direntry_getsec1 cole_direntry_getdays2 cole_direntry_getsec2
xlhtml/cole/doc/compile.sgml0100644000076400007640000000550007446125576016546 0ustar jackshckjackshck The file INSTALL in the source code gives detailed instructions on how to configure, compile and install cole. Briefly, you need to run the GNU standard configure script, with the arguments you want. To see the arguments that configure accepts, run ./configure --help. The most usual argument is --prefix=PREFIX, which tells configure to install cole in the directory PREFIX. After that, you need to run make to compile cole, and make install to install it. The configure script accepts, besides the standard arguments, the following flags: --enable-osf-check. Turn on short align for OSF compiler. If you have errors while compiling under OSF1, enable this flag. --enable-verbose. Turn on verbose. It is useful if you want to send a bug report. It is useful for cole developers too. --enable-debug Turn on GNU CC debug flags. It is useful for cole developers, so may be you don't want to use it. A tipical session is shown below. $ ls cole-2.0.0.tar.gz $ gzip -d cole-2.0.0.tar.gz $ tar -xf cole-2.0.0.tar $ ls cole-2.0.0.tar cole-2.0.0/ $ cd cole-2.0.0 $ ./configure --prefix=/opt ... Configured cole release 2.0.0 $ make ... $ make install ... $ make clean ... When installing, a shell script named cole-config will be installed in PREFIX/bin if you used the the --prefix=PREFIX argument, or in /usr/local/bin if you didn't. That directory must be listed in the content of the enviroment variable PATH when configuring another program that uses cole. If you system support it, will be compiled and installed shared libraries, to minimize size of the executables. By this reason, is important to include the directory PREFIX/bin or /usr/local/bin (which appropiate) in the file that your system command ldconfig reads in order to regenerate the list of shared libraries (in some systems, you can list the directory in the content of the enviroment variable LD_LIBRARY_PATH instead). xlhtml/cole/doc/gpl.sgml0100644000076400007640000004610307446125577015705 0ustar jackshckjackshck GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it's not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it's not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it's up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the program's name and a brief idea of what it does. Copyright (C) year name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xlhtml/cole/doc/introduction.sgml0100644000076400007640000000656007446125600017632 0ustar jackshckjackshck What is cole? cole is a free C OLE library. cole is distributed under the terms of the GNU General Public License (GPL) to give an impulse to the Free Software. cole distribution license is compatible with the Open Source definition. Using cole, you can access Microsoft' Structured Storage files. The most popular Microsoft's programs generate Structured Storage files, incluiding the Microsoft' suite for offices. StarDivision' suite (StarOffice) generate Structured Storage files too. FlashPix file format is Structured Storage too. What is a Structured Storage file? Inside a Structured Storage file there is a filesystem, with directories and files, which Microsoft calls containers and streams. Using cole you can travel through such filesystem and access the files. cole doesn't know about internal structure of a stream, it only reads the raw data. You can use the Microsoft's documentation available at http://msdn.microsoft.com or the information available at http://www.wotsit.org to know the binary file format of the streams. If you know anything in the side of StarDivision email me. FlashPix file format is well documented. cole was developed using the information available at http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/guide.html and the OLE::Storage Perl module from the same site, and no information from any other source (incluiding Microsoft) has been used. Features cole 2.x release series: Can open Structured Storage files generated with programs from Microsoft, StarDivision and FlashPix. Is written in C, for better performance. Should compile in UNIX-like systems with ANSI C libraries and a ANSI C compiler. Has a new good-looking API, modelled after ANSI C stdio.h routines. Uses standard automake, autoconf and libtool generated files. Provides a standard configure script. Builds shared (dynamic) libraries if the plattform and libtool support it. Provides standard targets in the Makefile (ie. install, clean, etc). Can use (thanks to the configure script) plattform dependent system calls for better performance. Requirements to compile To have a system with ANSI C libraries, a ANSI C compiler, a make program and the shell /bin/sh. xlhtml/cole/doc/legal.sgml0100644000076400007640000000474707446125600016202 0ustar jackshckjackshck Distribution and Freedom cole is Free Software, which means is distributed under a license that protect your freedom. cole distribution license is compatible with the Open Source definition. cole is distributed under the terms of the GNU General Public License (GPL). A copy of the license is in the file COPYING in the source code and in this document. Particulary, this means at least two things: All the code statically or dinamically linked against cole must be distributed under the terms of a license compatible with GPL. If you change the cole source code and you want to distribute a compiled version, you must release the changed cole source code too. Trademarks "Microsoft Word", "Microsoft Excel", "Microsoft Publisher" and "Microsoft Power Point" are trademarks of Microsoft Corporation. "StarOffice" may be is a trademark of StarDivision. "FlashPix" may be is a trademark. "UNIX" is a trademark. "Free Software" is not trademark of anyone, but it's an important term in the Free Software community, and for the Free Software Foundation. All other trademarks are the property of their respective owners. If another trademark is mentioned in this document and it needs to be listed above, please email to the maintainer (&maintainer-email-ulink;). Copyright and disclaimer This document is copyright 1999 by &author-name-full;. This document is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is provided as is without any express or implied warranties. While every effort has been taken to ensure the accuracy of the information contained in this document, the author/maintainer/contributors assume(s) no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. xlhtml/cole/doc/using.sgml0100644000076400007640000000350207446125600016227 0ustar jackshckjackshck The files in the subdirectory examples in the source code show the complete public API in action. Briefly, if you know how to use the stdio.h ANSI C calls, cole API will be very easy for you. If you use autoconf in your own proyect, the included file cole.m4 may be useful for you. It contains the m4 macro AM_PATH_COLE that detect the presense or ausence of the cole library in the system being configured. To use it: If cole is not installed in your system (i.e. aclocal can't find cole.m4), add the content of cole.m4 to your own acinclude.m4 file (create it in case you haven't one). Add a line like AM_PATH_COLE(2.0.0, [LIBS="$LIBS $COLE_LIBS" CFLAGS="$CFLAGS $COLE_CFLAGS"]) to your configure.in file. Here we are requesting for cole release 2.0.0, and adding the necessary flags to LIBS and CFLAGS. Run aclocal to generate the file aclocal.m4. This file will have many m4 macros, incluiding the cole m4 macro, and Run autoconf to generate the script configure. Many API calls take an argument at the end called colerrno. If it's not NULL and the call failed, it store the error code for fail, if any (if the call was successfully ended, its value is not modified). xlhtml/cole/doc/tmpl/0040755000076400007640000000000007473177125015206 5ustar jackshckjackshckxlhtml/cole/doc/tmpl/CVS/0040755000076400007640000000000007473177125015641 5ustar jackshckjackshckxlhtml/cole/doc/tmpl/CVS/Root0100644000076400007640000000006307473177125016503 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/doc/tmpl/CVS/Repository0100644000076400007640000000002507473177125017735 0ustar jackshckjackshckxlhtml/cole/doc/tmpl xlhtml/cole/doc/tmpl/CVS/Entries0100644000076400007640000000030607473177125017171 0ustar jackshckjackshck/.cvsignore/1.1.1.1/Wed Mar 20 15:32:27 2002// /api.sgml/1.1.1.1/Wed Mar 20 15:32:27 2002// /cole-unused.sgml/1.1.1.1/Wed Mar 20 15:32:27 2002// /internals.sgml/1.1.1.1/Wed Mar 20 15:32:27 2002// D xlhtml/cole/doc/tmpl/.cvsignore0100644000076400007640000000000607446125613017172 0ustar jackshckjackshck*.bak xlhtml/cole/doc/tmpl/api.sgml0100644000076400007640000001100507446125613016630 0ustar jackshckjackshck API Public cole API for the present release. Note: The separator character for filename components is '/'. So, a filename argument can be something like "/Macros/VB/Project1". @s: @colerrno: @filename: @colerrno: @Returns: @colefilesystem: @colerrno: @Returns: @colefilesystem: @colerrno: @Returns: @colefilesystem: @filename: @info: @action: @colerrno: @Returns: @colefilesystem: @info: @inroot: @indirentry: @indir: @outdir: @visitdir: @colerrno: @Returns: @colefilesystem: @filename: @colerrno: @Returns: @coledirentry: @colerrno: @Returns: @colefilesystem: @colefile: @colerrno: @Returns: @colefile: @ptr: @size: @colerrno: @Returns: @colefile: @Returns: @colefile: @Returns: @colefile: @Returns: @colefile: @delta: @direction: @colerrno: @Returns: @colefile: @colerrno: @Returns: @colefilesystem: @colerrno: @Returns: @coledirentry: @colerrno: @Returns: @coledir: @colerrno: @Returns: @coledir: @Returns: @coledir: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: @coledir: @Returns: @coledir: @Returns: @coledir: @Returns: @coledir: @Returns: @coledir: @Returns: @coledir: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: @coledirentry: @Returns: xlhtml/cole/doc/tmpl/cole-unused.sgml0100644000076400007640000000143607446125613020311 0ustar jackshckjackshck @colefilesystem: @colerrno: @Returns: @OLEfilename: @trunc: @stream_list: @root: @Returns: @tree: @Returns: @colefile: @Returns: @coledir: @Returns: @pps_list: @root_pps: @level: @OLEfilename: @stream_list: @root: @_BDepot: @_SDepot: @_sbfile: @_input: @max_level: @Returns: @colefile: xlhtml/cole/doc/tmpl/internals.sgml0100644000076400007640000000501307446125613020060 0ustar jackshckjackshck Internals cole internals - don't trust in anything here, because it may (and will) change. Contains calls to access directly the file system, and endianess care calls. @in: @Returns: @in: @Returns: @in: @Returns: @dest: @src: @dest: @src: @t: @retval: @t: @retval: @func: @t: @typeretval: @t: @typeretval: @func: @prog: @prog: @t: @retval: @n: @s: @s: @expr: @expr: @expr: @expr: @expr: @t: @array: @len: @rec: @len: @reclen: @rec: @len: @reclen: xlhtml/cole/DOWNLOAD0100644000076400007640000000023207446125557014613 0ustar jackshckjackshck cole's WWW home page is in: There you will find references to the most recent version of cole' source code. xlhtml/cole/Makefile.am0100644000076400007640000000055507457600300015507 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in EXTRA_DIST = README-cole README-CVS DOWNLOAD ChangeLog ChangeLog-from1to2 TODO THANKS AUTHORS BUGS doc/* examples/* utils/* noinst_LIBRARIES = libcole.a libcole_a_SOURCES = cole.c internal.c oledecod.c olecod.c support.c version.c internal.h support.h #AM_CFLAGS = -Wall -Wcast-align -Wpointer-arith xlhtml/cole/Makefile.in0100644000076400007640000001651707500147261015526 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ VERSION = @VERSION@ EXTRA_DIST = README-cole README-CVS DOWNLOAD ChangeLog ChangeLog-from1to2 TODO THANKS AUTHORS BUGS doc/* examples/* utils/* noinst_LIBRARIES = libcole.a libcole_a_SOURCES = cole.c internal.c oledecod.c olecod.c support.c version.c internal.h support.h mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = version.c cole.h LIBRARIES = $(noinst_LIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libcole_a_LIBADD = libcole_a_OBJECTS = cole.o internal.o oledecod.o olecod.o support.o \ version.o AR = ar CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = AUTHORS COPYING ChangeLog Makefile.am Makefile.in NEWS \ THANKS TODO cole.h.in version.c.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(libcole_a_SOURCES) OBJECTS = $(libcole_a_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps cole/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status version.c: $(top_builddir)/config.status version.c.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status cole.h: $(top_builddir)/config.status cole.h.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-noinstLIBRARIES: clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) distclean-noinstLIBRARIES: maintainer-clean-noinstLIBRARIES: .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: libcole.a: $(libcole_a_OBJECTS) $(libcole_a_DEPENDENCIES) -rm -f libcole.a $(AR) cru libcole.a $(libcole_a_OBJECTS) $(libcole_a_LIBADD) $(RANLIB) libcole.a tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = cole distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/doc $(distdir)/examples $(distdir)/utils @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile $(LIBRARIES) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ mostlyclean-am clean: clean-am distclean-am: distclean-noinstLIBRARIES distclean-compile \ distclean-tags distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean #AM_CFLAGS = -Wall -Wcast-align -Wpointer-arith # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/cole/NEWS0100644000076400007640000000502707446125560014161 0ustar jackshckjackshck 2.0.1 Arturo Tena (1999-08): + Fixed bug in cole.h which didn't include stdio.h. + New util: cole_extract. + Updated documentation. 2.0.0 Arturo Tena (1999-07): + New good looking API: it's modeled after `stdio.h' ANSI C calls. + Documentation of all public calls. + OLEdecode and OLEcode are now internal functions and they must be not called. + Write files (ie. what OLEcode() used to do) is not implemented by now. 1.0.1 Arturo Tena (1999-06-25): User level: + Fixed a bug that may prevent from compile under Solaris. 1.0.0: Arturo Tena User level: + Autoconf-ified (now cole have configure script). + Automake-ified (now Makefile have standard targets). + Objects archived now in a static library: libcole.a. + Can compile a dynamic library. + Check endianess of machine. + Fix some bugs when reading damaged files. + Added --enable-cole-verbose option. + Added --enable-osf-align-check (thanks to Bernhard Reiter). + A cole.spec file to make a RPM package and a cole.lsm to MetaLab archive. + Documentation written. Inside code: + Added some macros and functions in support.h + Change name from test to test_exitf define. + Create a new test and test_call_exitf define. + Rename max function to max3 (preparing to compile in Borland C). + fil_swriteU8 disappeared. + Clean up some files. 0.1.0: Arturo Tena + Change name from oledecod to cole. + Add olecod.c and olecod.h. + Modified demo.c to call OLEcod. + Changed pps->name, first character can be from 00 to 10, or so, as originally is in ole 2 files. + Modified some errors in OLEdecod. + Create test suit, some doc files. + Improve this README. 0.0.6: Arturo Tena + Fix the checking while reordering pps list. + Add instructions on how to apply patches. 0.0.5: Arturo Tena + Fix the "Add some fool integrity checking while reading small block depot" fix. Was > instead <=. =) + While reading a broken OLE file, added some checking while reordering pps list. + Added return parameter to freeOLEtree function. + Some general clean up. 0.0.4: Arturo Tena + Fix one stupid error while erasing the OLE tree. + Add some fool integrity checking while reading small block depot. 0.0.3: Arturo Tena + Add one parameter to OLEdecod; max_level, which is the maximum level stream we will extract into files. + Changed name from main.c to demo.c + Added a simple Makefile + Added this README file. xlhtml/cole/THANKS0100644000076400007640000000136107454677542014405 0ustar jackshckjackshck Thank you to everyone that has contributed to this project! (If you can't find your name here, please email the current maintainer). Thanks to: ********** The LAOLA guy: Martin Schwartz. Without his amazing hack into Structured Storage and Compound Files this work would have never been possible. The Engineering Computer Laboratory of La Salle University Mexico, Campus Mexico City, for supporting Arturo Tena in cole development. Bernhard Reiter . OSF fixes. Shaw Terwilliger . C++ fix. Caolan McNamara . Debug and more. Martin Scharpf . Debug. David Rysdam. The memory dump function used by cole in pre 1.x and 1.x releases. xlhtml/cole/TODO0100644000076400007640000000542107454677542014163 0ustar jackshckjackshck HIGH PRIORITY: ************** * Review all the documentation for style errors and so on. PLEASE, ENGLISH SPEAKERS, HELP ME HERE!!! * Improve example of cole_recurse_tree() in examples/filesystem.c: include actual callback functions, not just NULLs. * Write tests for all calls of the API: Improve example/directory.c: missing some calls to test. * Call all the calls of the API in examples/demo.c. * Implement more API calls, like `stdio.h' ANSI C calls. * Search for `FIXME' in the source code... and fix some =). MEDIUM: ******* * Improve tests, they must actually test the output of the public calls. * Investigate if it is possible to use `const' in static version variables. * Test cole_fopen() using wired filenames. ie "/", "//", "", etc. May be a function that check the filename could be written. * Check input arguments of each call of the API, returning an colerror if there are an error. * Say in the documentation that many other files can be `Structured Storage' files too. * May be in cole 3.x, create a double char type in order to handle the complete directory and file names. * Investigate how to avoid content of the structures COLEFILE and so on be documented in the api document (their must be documented only in the internal document). * Investigate how to force that calls begining with `_' to be in documentation (their will be in internals). * Make api section is before internals section in generated documentation, but COLEFS, COLEFILE, COLEDIR and COLEDIRENT must be documented in internals, not in api. * Make cole fork safe. * Make reentrant safe. * Review Martin Schwartz mail: ---QUOTE--- It might be helpful to you to have a look at the perl 5 (Ole::Storage) release file "Storage.pm" method "ole_head", giving some additional info about big- and smallblocksize (offset 0x1e, 0x20) as well as about Extended Block Depot for very large files (offset 0x44, 0x48). And, sorry for my screwed up namegiving... ---END QUOTE--- The Extended Block Depot is implemented now, but bigblocksize and smallblocksize are not implented yet. * Really use the results of the configure guesses, with #ifdef HAVE_x in code. * Make it compile using DJGPP and Borland C (we may need a custom Makefile and a custom config.h). * Use void `swab(const void *from, void *to, size_t n);' (in fil_sread* calls) if present, for performance, in support.c. * Replace cole_direntry_getday[12] and cole_direntry_getsec[12] calls with another calls that return something useful. * Divide the RPM in cole and cole-devel packages (may be it's not necessary, because cole package is not much big). NOT URGENT: *********** * Use some package to discover uninitializated memory, use some profile package, etc. * Use zlib to support compressed files. xlhtml/cole/cole-config.in0100644000076400007640000000164607446125561016203 0ustar jackshckjackshck#! /bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ usage() { cat < */ #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" #include "cole.h" #else #include "cole.h.in" #endif #include "internal.h" #include /** * cole_perror: * @s: string to print before the error message. It can be NULL. * @colerrno: error value of which a message will be printed. * * Prints a message on the standard error output, describing the error * @colerrno, preceding it with the string @s, a semicolon and a space. * It handles COLE_EERRNO value too, calling perror(3). */ void cole_perror (const char *s, COLERRNO colerrno) { if (s != NULL) fprintf (stderr, "%s: ", s); switch (colerrno) { case COLE_EMEMORY: case COLE_ECLOSEFILE: case COLE_EWRITE: case COLE_EREMOVE: case COLE_ETMPNAM: case COLE_ESEEK: case COLE_EERRNO: perror ("cole"); break; case COLE_EOPENFILE: fprintf (stderr, "cole - Cannot open the file\n"); exit(1); break; case COLE_ENOFILESYSTEM: fprintf (stderr, "cole - The file is not a OLE2 file\n"); break; case COLE_EINVALIDFILESYSTEM: fprintf (stderr, "cole - The file has a short OLE2 header or it is not really an OLE2 file.\n"); break; case COLE_EISNOTDIR: fprintf (stderr, "cole - The OLE2 entry is not a substorage object\n"); break; case COLE_EISNOTFILE: fprintf (stderr, "cole - The substorage object is not valid\n"); break; case COLE_EFILENOTFOUND: fprintf (stderr, "cole - OLE2 object not found\n"); break; case COLE_EOF: fprintf (stderr, "cole - End of stream object has been reached\n"); break; case COLE_EMEMBERISNOTDIR: fprintf (stderr, "cole - The OLE2 object searched for is not " "a substorage object\n"); break; case COLE_EBROKENFILENAME: fprintf (stderr, "cole - Illegal OLE object name\n"); break; case COLE_EFILENAMEISNOTFILE: fprintf (stderr, "cole - The OLE2 object is not a stream\n"); break; case COLE_EFSEEKDELTA: fprintf (stderr, "cole - The seek offset is an illegal value\n"); break; case COLE_EFSEEKFLAG: fprintf (stderr, "cole - The Seek Flag is not valid\n"); break; case COLE_EREAD: fprintf (stderr, "cole - Short read length returned...the file is probably corrupted\n"); break; case COLE_EUNKNOWN: fprintf (stderr, "cole - An unknown error ocurred in the cole libary (might be a bug)\n"); break; default: fprintf (stderr, "cole - An unknown error %d ocurred in the cole libabry (might be a bug)\n", colerrno); break; } } /** * cole_mount: * @filename: name of the file with the filesystem. * @colerrno: error value (COLE_EMEMORY, COLE_EOPENFILE, COLE_ENOFILESYSTEM, * COLE_EINVALIDFILESYSTEM, COLE_EUNKNOWN). * * Mounts the filesystem which is in @filename. * * Returns: a filesystem in success, or NULL in other case. */ COLEFS * cole_mount (char *filename, COLERRNO *colerrno) { COLEFS * ret; ret = (COLEFS *)malloc (sizeof (COLEFS)); if (ret == NULL) { if (colerrno != NULL) *colerrno = COLE_EMEMORY; return NULL; } switch (__OLEdecode (filename, &ret->tree, &ret->root, &ret->BDepot, &ret->SDepot, &ret->sbfile, &ret->sbfilename, &ret->file, 0)) { case 0: /* success */ break; case 10: if (colerrno != NULL) *colerrno = COLE_EMEMORY; free (ret); return NULL; case 7: case 4: if (colerrno != NULL) *colerrno = COLE_EOPENFILE; free (ret); return NULL; case 8: case 9: if (colerrno != NULL) *colerrno = COLE_ENOFILESYSTEM; free (ret); return NULL; case 5: if (colerrno != NULL) *colerrno = COLE_EINVALIDFILESYSTEM; free (ret); return NULL; default: if (colerrno != NULL) *colerrno = COLE_EUNKNOWN; free (ret); return NULL; } return ret; } /** * cole_umount: * @colefilesystem: filesystem to umount. * @colerrno: error value (COLE_ECLOSEFILE, COLE_EREMOVE). * * Umounts the filesystem @colefilesystem. * * Returns: zero in success, no zero in other case. */ int cole_umount (COLEFS *colefilesystem, COLERRNO *colerrno) { int ret; ret = 0; free (colefilesystem->BDepot); free (colefilesystem->tree); if (fclose (colefilesystem->file) && !ret) { if (colerrno != NULL) *colerrno = COLE_ECLOSEFILE; ret = 1; } if (colefilesystem->SDepot != NULL) { free (colefilesystem->SDepot); /* may no exist SDepot because there are not small files */ /* assert (colefilesystem->sbfile != NULL); */ /* assert (colefilesystem->sbfilename != NULL); */ if (fclose (colefilesystem->sbfile) && !ret) { if (colerrno != NULL) *colerrno = COLE_ECLOSEFILE; ret = 1; } #if defined(__WIN32__) || (__BORLANDC__) if (remove (colefilesystem->sbfilename) && !ret) { if (colerrno != NULL) *colerrno = COLE_EREMOVE; ret = 1; } #endif free (colefilesystem->sbfilename); } free (colefilesystem); return ret; } /** * cole_print_tree: * @colefilesystem: filesystem of which the tree will be printed. * @colerrno: error value (errors from call cole_recurse_tree()). * * Prints on the standard output the tree of files and directories contained * in @colefilesystem. * Currently this call always success. * * Returns: zero in success, no zero in other case. */ static COLE_RECURSE_DIR_FUNC __cole_print_tree_indir; static COLE_RECURSE_DIR_FUNC __cole_print_tree_outdir; static COLE_RECURSE_DIR_FUNC __cole_print_tree_inroot; static COLE_RECURSE_DIRENT_FUNC __cole_print_tree_indirentry; int cole_print_tree (COLEFS *colefilesystem, COLERRNO *colerrno) { long level; level = 1; if (cole_recurse_tree (colefilesystem, &level, __cole_print_tree_inroot, __cole_print_tree_indirentry, __cole_print_tree_indir, __cole_print_tree_outdir, NULL, colerrno)) { return 1; } return 0; } static int __cole_print_tree_indir(COLEDIR *cd, void *info, COLERRNO *colerrno) { /* * ATTENTION: if you modify this function so it modifies colerrno: * Modify colerrno comment in the functions that call it, * ie. cole_print_tree(). */ (*((long*)info))++; return 0; } static int __cole_print_tree_outdir(COLEDIR *cd, void *info, COLERRNO *colerrno) { /* * ATTENTION: if you modify this function so it modifies colerrno: * Modify colerrno comment in the functions that call it, * ie. cole_print_tree(). */ (*((long*)info))--; return 0; } static int __cole_print_tree_inroot(COLEDIR *cd, void *info, COLERRNO *colerrno) { /* * ATTENTION: if you modify this function so it modifies colerrno: * Modify colerrno comment in the functions that call it, * ie. cole_print_tree(). */ char *entry_name; printf ("DIR "); printf (" %7zu", cole_dir_getsize (cd)); printf (" %08lx-%08lx %08lx-%08lx", cole_dir_getdays1 (cd), cole_dir_getsec1 (cd), cole_dir_getdays2 (cd), cole_dir_getsec2 (cd)); entry_name = cole_dir_getname (cd); if (!isprint ((int)entry_name[0])) printf (" '\\x%02x%s'\n", entry_name[0], entry_name+1); else printf (" '%s'\n", entry_name); return 0; } static int __cole_print_tree_indirentry(COLEDIRENT *cde, void *info, COLERRNO *colerrno) { /* * ATTENTION: if you modify this function so it modifies colerrno: * Modify colerrno comment in the functions that call it, * ie. cole_print_tree(). */ char *entry_name; long level; long i; level = *((long*)info); for (i = 0; i < level; i++) { if (i == level - 1) printf ("\\--"); else printf ("| "); } if (cole_direntry_isdir (cde)) printf ("DIR "); else if (cole_direntry_isfile (cde)) printf ("FILE"); else printf ("????"); printf (" %7zu", cole_direntry_getsize (cde)); printf (" %08lx-%08lx %08lx-%08lx", cole_direntry_getdays1 (cde), cole_direntry_getsec1 (cde), cole_direntry_getdays2 (cde), cole_direntry_getsec2 (cde)); entry_name = cole_direntry_getname (cde); if (!isprint ((int)entry_name[0])) printf (" '\\x%02x%s'\n", entry_name[0], entry_name+1); else printf (" '%s'\n", entry_name); return 0; } /** * cole_opendir_rootdir: * @colefilesystem: filesystem of which the root directory will be opened. * @colerrno: error value (COLE_EMEMORY). * * Opens the root directory of the filesystem @colefilesystem as directory. * * Returns: a directory in success, or NULL in other case. */ COLEDIR * cole_opendir_rootdir (COLEFS *colefilesystem, COLERRNO *colerrno) { COLEDIR *ret; ret = (COLEDIR *)malloc (sizeof (COLEDIR)); if (ret == NULL) { if (colerrno != NULL) *colerrno = COLE_EMEMORY; return NULL; } ret->fs = colefilesystem; ret->entry = ret->fs->root; ret->visited_entry.dir = ret; ret->visited_entry.entry = ret->fs->tree[ ret->entry ].dir; return ret; } /** * cole_opendir_direntry: * @coledirentry: directory entry to be opened as directory. * @colerrno: error value (COLE_EISNOTDIR, COLE_EMEMORY). * * Opens a directory entry as directory. * * Returns: a directory in success, or NULL in other case. */ COLEDIR * cole_opendir_direntry (COLEDIRENT *coledirentry, COLERRNO *colerrno) { COLEDIR *ret; if (!cole_direntry_isdir (coledirentry)) { if (colerrno != NULL) *colerrno = COLE_EISNOTDIR; return NULL; } ret = (COLEDIR *)malloc (sizeof (COLEDIR)); if (ret == NULL) { if (colerrno != NULL) *colerrno = COLE_EMEMORY; return NULL; } ret->fs = coledirentry->dir->fs; ret->entry = coledirentry->entry; ret->visited_entry.dir = ret; ret->visited_entry.entry = ret->fs->tree[ ret->entry ].dir; return ret; } /** * cole_closedir: * @coledir: directory to be closed. * @colerrno: error value (). * * Closes the directory @coledir. * Currently this call always success. * * Returns: zero in success, no zero in other case. */ int cole_closedir (COLEDIR *coledir, COLERRNO *colerrno) { free (coledir); return 0; } COLEDIRENT * cole_visiteddirentry (COLEDIR *coledir) { if (coledir->visited_entry.entry == 0xffffffffUL) return NULL; return &coledir->visited_entry; } COLEDIRENT * cole_nextdirentry (COLEDIR *coledir) { if (coledir->visited_entry.entry == 0xffffffffUL) return NULL; coledir->visited_entry.entry = coledir->fs->tree [ coledir->visited_entry.entry ].next; if (coledir->visited_entry.entry == 0xffffffffUL) return NULL; return &coledir->visited_entry; } /** * cole_direntry_isdir: * @coledirentry: directory entry to be tested. * * Tests if the directory entry @coledirentry is a directory. * * Returns: no zero if it is a directory, zero in other case. */ int cole_direntry_isdir (COLEDIRENT *coledirentry) { return coledirentry->dir->fs->tree[ coledirentry->entry ].type == _COLE_TYPE_DIR; } /** * cole_direntry_isfile: * @coledirentry: directory entry to be tested. * * Tests if the directory entry @coledirentry is a file. * * Returns: no zero if it is a directory, zero in other case. */ int cole_direntry_isfile (COLEDIRENT *coledirentry) { return coledirentry->dir->fs->tree[ coledirentry->entry ].type == _COLE_TYPE_FILE; } char * cole_direntry_getname (COLEDIRENT *coledirentry) { return coledirentry->dir->fs->tree[ coledirentry->entry ].name; } size_t cole_direntry_getsize (COLEDIRENT *coledirentry) { /* FIXME is it cast needed? */ return coledirentry->dir->fs->tree[ coledirentry->entry ].size; } long cole_direntry_getsec1 (COLEDIRENT *coledirentry) { /* seconds1 is U32, long is at least U32 in all plattforms, isn't it? */ return coledirentry->dir->fs->tree[ coledirentry->entry ].seconds1; } long cole_direntry_getsec2 (COLEDIRENT *coledirentry) { /* seconds2 is U32, long is at least U32 in all plattforms, isn't it? */ return coledirentry->dir->fs->tree[ coledirentry->entry ].seconds2; } long cole_direntry_getdays1 (COLEDIRENT *coledirentry) { /* days1 is U32, long is at least U32 in all plattforms, isn't it? */ return coledirentry->dir->fs->tree[ coledirentry->entry ].days1; } long cole_direntry_getdays2 (COLEDIRENT *coledirentry) { /* days2 is U32, long is at least U32 in all plattforms, isn't it? */ return coledirentry->dir->fs->tree[ coledirentry->entry ].days2; } char * cole_dir_getname (COLEDIR *coledir) { return coledir->fs->tree[ coledir->entry ].name; } size_t cole_dir_getsize (COLEDIR *coledir) { /* FIXME is it cast needed? */ return coledir->fs->tree[ coledir->entry ].size; } long cole_dir_getsec1 (COLEDIR *coledir) { /* seconds1 is U32, long is at least U32 in all plattforms, isn't it? */ return coledir->fs->tree[ coledir->entry ].seconds1; } long cole_dir_getsec2 (COLEDIR *coledir) { /* seconds2 is U32, long is at least U32 in all plattforms, isn't it? */ return coledir->fs->tree[ coledir->entry ].seconds2; } long cole_dir_getdays1 (COLEDIR *coledir) { /* days1 is U32, long is at least U32 in all plattforms, isn't it? */ return coledir->fs->tree[ coledir->entry ].days1; } long cole_dir_getdays2 (COLEDIR *coledir) { /* days2 is U32, long is at least U32 in all plattforms, isn't it? */ return coledir->fs->tree[ coledir->entry ].days2; } /** * cole_fopen: * @colefilesystem: filesystem in which @filename is in. * @filename: name of the file to open. * @colerrno: error value (COLE_EFILENOTFOUND, errors from calls * cole_opendir_rootdir(), cole_fopen_direntry() and * cole_locate_filename()). * * Opens the file with the name @filename in the filesystem @colefilesystem. * Currently, @filename must begin with a '/' character, it means @filename is * the absolute filename. * * Returns: a file in success, or NULL in other case. */ struct _cole_fopen_info { COLEFILE *file; int succ; COLERRNO colerrno; }; static COLE_LOCATE_ACTION_FUNC _cole_fopen_action; COLEFILE * cole_fopen (COLEFS *colefilesystem, char *filename, COLERRNO *colerrno) { struct _cole_fopen_info info; if (cole_locate_filename (colefilesystem, filename, &info, _cole_fopen_action, colerrno)) { /* couldn't locate the filename */ /* colerrno is set */ return NULL; } if (info.succ) return info.file; if (colerrno != NULL) *colerrno = info.colerrno; return NULL; } static void _cole_fopen_action (COLEDIRENT *cde, void *_info) { struct _cole_fopen_info *info; info = (struct _cole_fopen_info *)_info; if (!cole_direntry_isfile(cde)) { info->colerrno = COLE_EFILENAMEISNOTFILE; info->succ = 0; return; } info->file = cole_fopen_direntry (cde, &info->colerrno); if (info->file == NULL) { /* colerrno is set */ info->succ = 0; return; } info->succ = 1; } /** * cole_fopen_direntry: * @coledirentry: directory entry to be opened as file. * @colerrno: error value (COLE_EISNOTFILE, COLE_EMEMORY, COLE_ETMPNAM, * COLE_EOPENFILE, COLE_EINVALIDFILESYSTEM, COLE_EREAD, * COLE_EWRITE, COLE_EUNKNOWN). * * Opens a directory entry as file. * * Returns: a file in success, or NULL in other case. */ COLEFILE * cole_fopen_direntry (COLEDIRENT *coledirentry, COLERRNO *colerrno) { COLEFILE *ret; if (!cole_direntry_isfile (coledirentry)) { if (colerrno != NULL) *colerrno = COLE_EISNOTFILE; return NULL; } ret = (COLEFILE *)malloc (sizeof (COLEFILE)); if (ret == NULL) { if (colerrno != NULL) *colerrno = COLE_EMEMORY; return NULL; } ret->fs = coledirentry->dir->fs; ret->entry = coledirentry->entry; switch (__cole_extract_file (&ret->file, &ret->filename, ret->fs->tree[ ret->entry ].size, ret->fs->tree[ ret->entry ].start, ret->fs->BDepot, ret->fs->SDepot, ret->fs->sbfile, ret->fs->file)) { case 0: /* success */ break; case 1: if (colerrno != NULL) *colerrno = COLE_EMEMORY; free (ret); return NULL; case 2: if (colerrno != NULL) *colerrno = COLE_ETMPNAM; free (ret); return NULL; case 3: if (colerrno != NULL) *colerrno = COLE_EOPENFILE; free (ret); return NULL; case 4: if (colerrno != NULL) *colerrno = COLE_EINVALIDFILESYSTEM; free (ret); return NULL; case 5: if (colerrno != NULL) *colerrno = COLE_EREAD; free (ret); return NULL; case 6: if (colerrno != NULL) *colerrno = COLE_EWRITE; free (ret); return NULL; default: if (colerrno != NULL) *colerrno = COLE_EUNKNOWN; free (ret); return NULL; } /* because the original fopen(3) leaves the file pointer in the beginning */ rewind (ret->file); ret->pos = 0; ret->filesize = ret->fs->tree[ ret->entry ].size; return ret; } /** * cole_fclose: * @colefile: file to be closed. * @colerrno: error value (COLE_ECLOSEFILE, CLOSE_EREMOVE). * * Closes the file @colefile. * * Returns: zero in sucess, no zero in other case. */ int cole_fclose (COLEFILE *colefile, COLERRNO *colerrno) { int ret; ret = 0; if (fclose (colefile->file) && !ret) { if (colerrno != NULL) *colerrno = COLE_ECLOSEFILE; ret = 1; } if (remove (colefile->filename) && !ret) { if (colerrno != NULL) *colerrno = COLE_EREMOVE; ret = 1; } free (colefile->filename); free (colefile); return ret; } /** * cole_fread: * @colefile: file to be read. * @ptr: memory location where the bytes will be stored. * @size: how many bytes will be read. * @colerrno: error value (COLE_EOF, COLE_EREAD, COLE_ESEEK). * * Reads @size bytes from @colefile and store them in the location given * by @ptr. If not success, the file position indicator is not changed. * * Returns: in sucess the number of bytes actually readed (maximum @size) * or zero in other case. */ size_t cole_fread (COLEFILE *colefile, void *ptr, size_t size, COLERRNO *colerrno) { size_t bytes_read, bytes_to_read; long tbytes; /* Check to see if going past end... */ if ((colefile->pos + size) > colefile->filesize) tbytes = colefile->filesize - colefile->pos; else tbytes = size; if (tbytes <= 0) return 0; bytes_to_read = (size_t)tbytes; bytes_read = fread (ptr, 1, bytes_to_read, colefile->file); /* assert (size && (colefile->pos + bytes_read > colefile->pos)); */ colefile->pos += bytes_read; /* assert (!feof (colefile->file) && ftell (colefile->file) == colefile->pos); */ if (bytes_read != size) { /* Linux man page says that fread returns a `short item count (or zero)' when an error of end of file ocurrs. A short count OR zero? We are hopping that fread always returns zero. */ if (feof (colefile->file)) { if (colerrno != NULL) *colerrno = COLE_EOF; return 0; } else if (ferror (colefile->file)) { if (colerrno != NULL) *colerrno = COLE_EREAD; return 0; } } /* assert (size != 0 && bytes_read != 0); */ /* assert (bytes_read <= size); */ return bytes_read; } /** * cole_ftell: * @colefile: file of which the file position indicator will be get. * * Get the current value of the file position indicator for the file * @colefile. * * Returns: The file position. */ size_t cole_ftell (COLEFILE *colefile) { return colefile->pos; } /** * cole_fseek: * @colefile: file of which its file position indicator will be set. * @delta: number of bytes that the file position indicator will be moved. * @direction: from where start to count the @delta bytes. * @colerrno: error value (COLE_EFSEEKDELTA). * * Sets the value of the file position indicator for the file @colefile * @delta bytes from the beginning of the file, forward from the current * position, backward from the current position, or from the end of the * file, if @direction is COLE_SEEK_SET, COLE_SEEK_BACKWARD, * COLE_SEEK_FORWARD or COLE_SEEK_END, respectively. * The file position indicator will always be <= @colefile->filesize. * If you @delta is such that the previous line would not true, cole_fseek * fails. * * Returns: zero in success, no zero in other case. */ int cole_fseek (COLEFILE *colefile, size_t delta, COLE_SEEK_FLAG direction, COLERRNO *colerrno) { if ((int)delta < 0) { if (colerrno != NULL) *colerrno = COLE_EFSEEKDELTA; return 1; } switch (direction) { case COLE_SEEK_SET: if (delta <= colefile->filesize) { colefile->pos = delta; return 0; } else { if (colerrno != NULL) *colerrno = COLE_EFSEEKDELTA; return 1; } case COLE_SEEK_END: if (delta <= colefile->filesize) { colefile->pos = colefile->filesize - delta; return 0; } else { if (colerrno != NULL) *colerrno = COLE_EFSEEKDELTA; return 1; } case COLE_SEEK_BACKWARD: if (delta <= colefile->pos) { colefile->pos = colefile->pos - delta; return 0; } else { if (colerrno != NULL) *colerrno = COLE_EFSEEKDELTA; return 1; } case COLE_SEEK_FORWARD: if (delta <= colefile->filesize - colefile->pos) { colefile->pos = colefile->pos + delta; return 0; } else { if (colerrno != NULL) *colerrno = COLE_EFSEEKDELTA; return 1; } default: if (colerrno != NULL) *colerrno = COLE_EFSEEKFLAG; return 1; } } /** * cole_frewind: * @colefile: file of which its file position indicator will be rewind. * @colerrno: error value (error from call cole_fseek()). * * Sets the value of the file position indicator for the file @colefile * in the beginning of the file. * * Returns: zero in success, no zero in other case. */ int cole_frewind (COLEFILE *colefile, COLERRNO *colerrno) { if (cole_fseek (colefile, 0, COLE_SEEK_SET, colerrno)) return 1; return 0; } /** * cole_fsize: * @colefile: file of which its size will be returned. * * Returns the size in bytes of the file @colefile. */ size_t cole_fsize (COLEFILE *colefile) { return colefile->filesize; } /** * cole_feof: * @colefile: file to be tested. * * Tests if the end of file has been reached in @colefile. * * Returns: no zero if the end of file has been reached, zero in other case. */ int cole_feof (COLEFILE *colefile) { /* assert ((colefile->pos == colefile->fs->tree[ colefile->entry ].size) && feof (colefile->file)); */ return (colefile->pos == colefile->filesize); } /** * cole_recurse_tree: * @colefilesystem: filesystem to recurse. * @info: arbitrary pointer passed to the functions. * @inroot: pointer to the function that is called when start visiting root * directory. It can be NULL. * @indirentry: pointer to the function that is called when start visiting any * directory entry (file or directory). It can be NULL. * @indir: pointer to the function that is called when start visiting a * directory. It can be NULL. * @outdir: pointer to the function that is called when end visiting a * directory. It can be NULL. * @visitdir: pointer to the function that is called to know if visit a * directory. It can be NULL. * @colerrno: error value (errors from calls cole_opendir_rootdir(), * cole_opendir_direntry(), cole_closedir() and * inroot, indirentry, indir, and outdir functions). * * Recurse the filesystem @colefilesystem, calling the functions pointed by * @inroot, @indirentry, @indir and @outdirectory when start visiting * root directory, start visiting any directory entry (file or directory), * start visiting a directory or end visiting a directory, respectively. * If @visitdir returns no zero or it's NULL, the directory is visited, * otherwise is not visited. * @info is a arbitrary pointer which is passed to the functions pointed by * @inroot, @indirentry, @indir and @outdirectory: it may be used to share * arbitrary information between them. * * Returns: zero if recursed all the tree, no zero in other case. */ static int __cole_recurse_tree (COLEDIR *_cd, long level, void *info, COLE_RECURSE_DIR_FUNC *inroot, COLE_RECURSE_DIRENT_FUNC *indirentry, COLE_RECURSE_DIR_FUNC *indir, COLE_RECURSE_DIR_FUNC *outdir, COLE_RECURSE_VISIT_DIR_FUNC *visitdir, COLERRNO *colerrno); int cole_recurse_tree (COLEFS *colefilesystem, void *info, COLE_RECURSE_DIR_FUNC *inroot, COLE_RECURSE_DIRENT_FUNC *indirentry, COLE_RECURSE_DIR_FUNC *indir, COLE_RECURSE_DIR_FUNC *outdir, COLE_RECURSE_VISIT_DIR_FUNC *visitdir, COLERRNO *colerrno) { COLEDIR * cd; cd = cole_opendir_rootdir (colefilesystem, colerrno); if (cd == NULL) return 1; if (__cole_recurse_tree (cd, 1, info, inroot, indirentry, indir, outdir, visitdir, colerrno)) { cole_closedir (cd, NULL); /* colerrno is set */ return 1; } if (cole_closedir (cd, colerrno)) { /* colerrno is set */ return 1; } return 0; } static int __cole_recurse_tree (COLEDIR *_cd, long level, void *info, COLE_RECURSE_DIR_FUNC *inroot, COLE_RECURSE_DIRENT_FUNC *indirentry, COLE_RECURSE_DIR_FUNC *indir, COLE_RECURSE_DIR_FUNC *outdir, COLE_RECURSE_VISIT_DIR_FUNC *visitdir, COLERRNO *colerrno) { /* * ATTENTION: if you modify __cole_recurse_tree() so it modifies colerrno * besides in calling inroot, indirentry, indir, outdir, cole_opendir_direntry * or cole_closedir: * Modify colerrno comment in the functions that call it, * ie. cole_recurse_tree(). */ /* ATTENTION: This is a recursive function */ COLEDIRENT * cde; COLEDIR * cd; if (level == 1) { /* The following lines are only executed on Root Entry */ if (inroot != NULL) { if ( (*inroot) (_cd, info, colerrno) ) { /* colerrno is set */ return 1; } } } /* Iterate through childrens */ for (cde = cole_visiteddirentry (_cd); cde != NULL; cde = cole_nextdirentry (_cd)) { if (indirentry != NULL) { if ( (*indirentry) (cde, info, colerrno) ) { /* colerrno is set */ return 1; } } /* RECURSIVE CALL */ if (cole_direntry_isdir (cde)) { cd = cole_opendir_direntry (cde, colerrno); if (cd == NULL) { /* colerrno is set */ return 1; } if (indir != NULL) { if ( (*indir) (cd, info, colerrno) ) { /* colerrno is set */ cole_closedir (cd, NULL); return 1; } } if ( (visitdir == NULL) || ((*visitdir)(cd, info)) ) { if (__cole_recurse_tree (cd, level + 1, info, inroot, indirentry, indir, outdir, visitdir, colerrno)) { /* colerrno is set */ cole_closedir (cd, NULL); return 1; } } if (outdir != NULL) { if ( (*outdir) (cd, info, colerrno) ) { /* colerrno is set */ cole_closedir (cd, NULL); return 1; } } if (cole_closedir (cd, colerrno)) { /* colerrno is set */ return 1; } } } return 0; } /** * cole_locate_filename: * @colefilesystem: filesystem where to locate @filename. * @filename: name of the file or directory to be located. * @info: arbitrary pointer passed to @action. * @action: pointer to the function that is called when founding @filename. * @colerrno: error value (COLE_EUNKNOWN, COLE_EMEMBERISNOTDIR, * COLE_EFILENOTFOUND, COLE_EBROKENFILENAME, errors * from call cole_recurse_tree()). * * Locate the @filename in the filesystem @colefilesystem, calling @action when * it's found. @info is arbitrary pointer passed to @action. * Currently, @filename must begin with a '/' character, it means @filename is * the absolute filename. * * Returns: zero in success, 1 in other case. */ struct __cole_locate_filenameinfo { COLE_LOCATE_ACTION_FUNC *action; void *info; char *filename; char *current; int visitdir; }; static COLE_RECURSE_DIRENT_FUNC __cole_locate_filename_indirentry; static COLE_RECURSE_VISIT_DIR_FUNC __cole_locate_filename_visitdir; int cole_locate_filename (COLEFS *colefilesystem, char *filename, void *info, COLE_LOCATE_ACTION_FUNC *action, COLERRNO *colerrno) { struct __cole_locate_filenameinfo _info; COLERRNO _colerrno; /* FIXME allow no absolute paths */ if (filename[0] != '/') { if (colerrno != NULL) *colerrno = COLE_EBROKENFILENAME; return 1; } _info.action = action; _info.info = info; _info.filename = filename; _info.current = filename + 1; if (cole_recurse_tree (colefilesystem, &_info, NULL, __cole_locate_filename_indirentry, NULL, NULL, __cole_locate_filename_visitdir, &_colerrno)) { if (_colerrno == COLE_ELAST+1) { /* file was found */ return 0; } if (colerrno != NULL) *colerrno = _colerrno; return 1; } if (colerrno != NULL) *colerrno = COLE_EFILENOTFOUND; return 1; } static int __cole_locate_filename_visitdir (COLEDIR *cd, void *info) { return ((struct __cole_locate_filenameinfo *)info)->visitdir; } static int __cole_locate_filename_indirentry (COLEDIRENT *cde, void *_info, COLERRNO *colerrno) { char *entry_name; struct __cole_locate_filenameinfo *info; char *pcurrent; char *pentry_name; info = (struct __cole_locate_filenameinfo *)_info; entry_name = cole_direntry_getname (cde); for (pcurrent = info->current, pentry_name = entry_name; *pcurrent && *pentry_name && *pcurrent != '/'; pcurrent++, pentry_name++) { if (*pcurrent != *pentry_name) { info->visitdir = 0; /* don't visit this directory */ return 0; /* don't break recurse */ } } switch (*pentry_name) { case 0: switch (*pcurrent) { case '/': if (!cole_direntry_isdir (cde)) { if (colerrno != NULL) *colerrno = COLE_EMEMBERISNOTDIR; return 1; /* break recurse */ } pcurrent++; /* jump the '/' character */ info->current = pcurrent; /* check if it's the last component of filename */ if (!(*info->current)) { /* last component of filename reached */ if (info->action != NULL) { (*(info->action)) (cde, info->info); } if (colerrno != NULL) *colerrno = COLE_ELAST+1; return 1; /* break recurse */ } info->visitdir = 1; /* visit this directory */ return 0; /* don't break recurse */ case 0: /* last component of filename reached */ if (info->action != NULL) { (*(info->action)) (cde, info->info); } if (colerrno != NULL) *colerrno = COLE_ELAST+1; return 1; /* break recurse */ default: info->visitdir = 0; /* don't visit this directory */ return 0; /* don't break recurse */ } default: switch (*pcurrent) { case 0: info->visitdir = 0; /* don't visit this directory */ return 0; /* don't break recurse */ case '/': info->visitdir = 0; /* don't visit this directory */ return 0; /* don't break recurse */ default: if (colerrno != NULL) *colerrno = COLE_EUNKNOWN; return 1; /* break recurse */ } } } xlhtml/cole/cole.h.in0100644000076400007640000001701207455342366015164 0ustar jackshckjackshck/* cole - A free C OLE library. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #ifndef __COLE_H #define __COLE_H #ifdef __cplusplus extern "C" { #endif /* * Attention: this API is documentated in the `doc' subdirectory */ /* Just to get size_t */ #include #ifndef COLE_INTERNAL_H #include "internal.h" /* For _COLE struct definitions */ #endif #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) /**************************************************************/ /* autoconf defines size_t as unsigned if not defined. */ /* Uncomment these ONLY if you don't have a size_t */ /* #ifndef size_t */ /* #define size_t unsigned */ /* #endif */ /**************************************************************/ #endif /* * ********************************************************************** * version info * ********************************************************************** */ #define COLE_MAJOR_VERSION @COLE_MAJOR@ #define COLE_MINOR_VERSION @COLE_MINOR@ #define COLE_MICRO_VERSION @COLE_MICRO@ extern int cole_major_version; extern int cole_minor_version; extern int cole_micro_version; extern char *cole_version; extern char *cole_host_info; /* * ********************************************************************** * errors * ********************************************************************** */ enum _COLERRNO { /* & = means that you can use perror(3) call to print an error message */ /* you can always use cole_perror to print an error message */ COLE_EFIRST, /* Leave this at first place */ /*&*/ COLE_EMEMORY, /* Failed malloc(3) or realloc(3) */ /*&*/ COLE_EOPENFILE, /* Failed fopen(3) */ /*&*/ COLE_ECLOSEFILE, /* Failed fclose(3) */ /*&*/ COLE_EREAD, /* Failed fread(3) */ /*&*/ COLE_EWRITE, /* Failed fwrite(3) */ /*&*/ COLE_EREMOVE, /* Failed remove(3) */ /*&*/ COLE_ETMPNAM, /* Failed tmpnam(3) */ /*&*/ COLE_ESEEK, /* Failed fseek(3) */ /*&*/ COLE_EERRNO, /* Some system call failed */ COLE_ENOFILESYSTEM, /* File is not a filesystem */ COLE_EINVALIDFILESYSTEM,/* Filesystem is broken, it's invalid */ COLE_EISNOTDIR, /* Directory entry is not a directory */ COLE_EISNOTFILE, /* Directory entry is not a file */ COLE_EFILENOTFOUND, /* Doesn't exist a file with the given name */ COLE_EOF, /* End of file has been reached */ COLE_EMEMBERISNOTDIR, /* A member of the filename is not a directory */ COLE_EBROKENFILENAME, /* The filename is not right written */ COLE_EFILENAMEISNOTFILE,/* Filename is not a file */ COLE_EFSEEKDELTA, /* Delta argument is not valid */ COLE_EFSEEKFLAG, /* Flag argument is not valid */ COLE_EUNKNOWN, /* An unknown error ocurred, can be a bug */ COLE_ELAST /* Leave this at last place */ }; typedef enum _COLERRNO COLERRNO; void cole_perror (const char *s, COLERRNO colerrno); /* * ********************************************************************** * other enums * ********************************************************************** */ enum _COLE_SEEK_FLAG { COLE_SEEK_SET, COLE_SEEK_FORWARD, COLE_SEEK_BACKWARD, COLE_SEEK_END }; typedef enum _COLE_SEEK_FLAG COLE_SEEK_FLAG; /* * ********************************************************************** * structures * ********************************************************************** */ /* These are opaque data types, because the internal structure will change */ typedef struct _COLEFS COLEFS; typedef struct _COLEDIR COLEDIR; typedef struct _COLEDIRENT COLEDIRENT; typedef struct _COLEFILE COLEFILE; /* * ********************************************************************** * functions types * ********************************************************************** */ typedef int (COLE_RECURSE_DIR_FUNC) (COLEDIR *coledir, void *info, COLERRNO *colerrno); typedef int (COLE_RECURSE_DIRENT_FUNC) (COLEDIRENT *coledirentry, void *info, COLERRNO *colerrno); typedef int (COLE_RECURSE_VISIT_DIR_FUNC) (COLEDIR *coledir, void *info); typedef void (COLE_LOCATE_ACTION_FUNC) (COLEDIRENT *coledirentry, void *info); /* * ********************************************************************** * calls * ********************************************************************** */ /* *********** * filesystem * ***********/ COLEFS * cole_mount (char *filename, COLERRNO *colerrno); int cole_umount (COLEFS *colefilesystem, COLERRNO *colerrno); int cole_print_tree (COLEFS *colefilesystem, COLERRNO *colerrno); int cole_locate_filename (COLEFS *colefilesystem, char *filename, void *info, COLE_LOCATE_ACTION_FUNC *action, COLERRNO *colerrno); int cole_recurse_tree (COLEFS *colefilesystem, void *info, COLE_RECURSE_DIR_FUNC *inroot, COLE_RECURSE_DIRENT_FUNC *indirentry, COLE_RECURSE_DIR_FUNC *indir, COLE_RECURSE_DIR_FUNC *outdir, COLE_RECURSE_VISIT_DIR_FUNC *visitdir, COLERRNO *colerrno); /* *********** * file * ***********/ COLEFILE * cole_fopen (COLEFS *colefilesystem, char *filename, COLERRNO *colerrno); COLEFILE * cole_fopen_direntry (COLEDIRENT *coledirentry, COLERRNO *colerrno); int cole_fclose (COLEFILE *colefile, COLERRNO *colerrno); size_t cole_fsize (COLEFILE *colefile); size_t cole_fread (COLEFILE *colefile, void *ptr, size_t size, COLERRNO *colerrno); int cole_feof (COLEFILE *colefile); size_t cole_ftell (COLEFILE *colefile); int cole_fseek (COLEFILE *colefile, size_t delta, COLE_SEEK_FLAG direction, COLERRNO *colerrno); int cole_frewind (COLEFILE *colefile, COLERRNO *colerrno); /* *********** * directory and directory entry * ***********/ COLEDIR * cole_opendir_rootdir (COLEFS *colefilesystem, COLERRNO *colerrno); COLEDIR * cole_opendir_direntry (COLEDIRENT *coledirentry, COLERRNO *colerrno); int cole_closedir (COLEDIR *coledir, COLERRNO *colerrno); COLEDIRENT * cole_visiteddirentry (COLEDIR *coledir); COLEDIRENT * cole_nextdirentry (COLEDIR *coledir); char * cole_dir_getname (COLEDIR *coledir); size_t cole_dir_getsize (COLEDIR *coledir); long cole_dir_getdays1 (COLEDIR *coledir); long cole_dir_getsec1 (COLEDIR *coledir); long cole_dir_getdays2 (COLEDIR *coledir); long cole_dir_getsec2 (COLEDIR *coledir); char * cole_direntry_getname (COLEDIRENT *coledirentry); size_t cole_direntry_getsize (COLEDIRENT *coledirentry); long cole_direntry_getdays1 (COLEDIRENT *coledirentry); long cole_direntry_getsec1 (COLEDIRENT *coledirentry); long cole_direntry_getdays2 (COLEDIRENT *coledirentry); long cole_direntry_getsec2 (COLEDIRENT *coledirentry); int cole_direntry_isdir (COLEDIRENT *coledirentry); int cole_direntry_isfile (COLEDIRENT *coledirentry); #ifdef __cplusplus } #endif #endif /* __COLE_H */ xlhtml/cole/internal.c0100644000076400007640000000614607446125564015451 0ustar jackshckjackshck/* cole - A free C OLE library. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include #include #if !(defined( __WIN32__ ) || defined( __BORLANDC__ )) #include #endif #include "internal.h" #define MIN(a,b) ((a)<(b) ? (a) : (b)) int __cole_extract_file (FILE **file, char **filename, U32 size, U32 pps_start, U8 *BDepot, U8 *SDepot, FILE *sbfile, FILE *inputfile) { /* FIXME rewrite this cleaner */ U16 BlockSize, Offset; U8 *Depot; FILE *infile; long FilePos; size_t bytes_to_copy; U8 Block[0x0200]; #if defined( __WIN32__ ) || defined( __BORLANDC__ ) FILE *ret; *filename = (char *)malloc (TMPNAM_LEN); if (*filename == NULL) return 1; if (tmpnam (*filename) == NULL) { free (*filename); return 2; } ret = fopen (*filename, "w+b"); *file = ret; if (ret == NULL) { free (*filename); return 3; } #else int ret; *filename = malloc (TMPNAM_LEN); if (*filename == NULL) return 1; strcpy(*filename, "/tmp/xlHtmlXXXXXX"); ret = mkstemp(*filename); if (ret == -1) { free(*filename); return 2; } *file = fdopen(ret, "w+b"); if (*file == NULL) { free(*filename); close(ret); return 3; } /* unlink() is called so this file deletes when we are done with it */ unlink(*filename); #endif if (size >= 0x1000) { /* read from big block depot */ Offset = 1; BlockSize = 0x0200; infile = inputfile; Depot = BDepot; } else { /* read from small block file */ Offset = 0; BlockSize = 0x40; infile = sbfile; Depot = SDepot; } while (pps_start != 0xfffffffeUL /*&& pps_start != 0xffffffffUL && pps_start != 0xfffffffdUL*/) { FilePos = (long)((pps_start + Offset) * BlockSize); if (FilePos < 0) { fclose (*file); remove (*filename); free (*filename); return 4; } bytes_to_copy = MIN ((U32)BlockSize, size); if (fseek (infile, FilePos, SEEK_SET)) { fclose (*file); remove (*filename); free (*filename); return 4; } fread (Block, bytes_to_copy, 1, infile); if (ferror (infile)) { fclose (*file); remove (*filename); free (*filename); return 5; } fwrite (Block, bytes_to_copy, 1, *file); if (ferror (*file)) { fclose (*file); remove (*filename); free (*filename); return 6; } pps_start = fil_sreadU32 (Depot + (pps_start * 4)); size -= MIN ((U32)BlockSize, size); if (size == 0) break; } return 0; } xlhtml/cole/internal.h0100644000076400007640000001074607446125564015457 0ustar jackshckjackshck/* cole - A free C OLE library. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #ifndef COLE_INTERNAL_H #define COLE_INTERNAL_H #ifdef __cplusplus extern "C" { #endif #include #ifndef COLE_SUPPORT_H #include "support.h" #endif #if defined( __WIN32__ ) || defined( __BORLANDC__ ) #define TMPNAM_LEN L_tmpnam #else #define TMPNAM_LEN 18 /* /tmp/xlHtmlXXXXXX + NULL */ #endif /* This structure describe one stream. */ struct pps_block { char name[0x20]; char filename[TMPNAM_LEN]; /* valid only if type == 2 */ U8 type; /* 5 == root, 1 == dir, 2 == file */ U32 size; /* the size of the file, valid only if type == 2 */ U32 next; /* next entry in this level, in this directory */ U32 dir; /* valid only if type != 2 */ U16 level; /* level in the ole tree */ U32 seconds1; U32 seconds2; U32 days1; U32 days2; U32 start; /* start block */ /* private fields, used only inside OLEdecoded and OLEcode, don't modify them if you want to use OLEcode */ U32 previous; /* previous pps, valid before reordering */ U32 ppsnumber; /* pps number */ }; typedef struct pps_block pps_entry; /* Create a OLE stream tree from a file. Input: char *Olefilename = File to be decoded (ie. .xsl, .doc, .ppt). . pps_entry ** stream_list = The stream tree. . U32 * root = The number of root dir in stream_list. . U8 **_BDepot, U8 **_SDepot, FILE **_sbfile, char **_sbfilename, . FILE **_input, . = Exposes internals, read only. . U16 max_level = The maximum level on stream tree in which . streams will be actually extracted . to a file. 0 (zero) means extract all. Output: 0 = Sucess. . 4 = Couldn't open OLEfilename file (can use perror). . 8 = OLEfilename file seems to contain plain text, not OLE file. . 9 = OLEfilename is a binary file, but it have not OLEfile format. . 5 = Error reading from file, means OLEfilename file has a faulty . OLE file format (UPDATE: not always). . 6 = Error removing temporal files. <-- this is never returned now . 7 = Error creating temporal files, can use perror. . 10 = Error allocating memory, there's no more memory. */ int __OLEdecode (char *OLEfilename, pps_entry ** stream_list, U32 * root, U8 **_BDepot, U8 **_SDepot, FILE **_sbfile, char **_sbfilename, FILE **_input, U16 max_level); /* * FROM COLE 2.0.0 API */ struct _COLEFS { /* This structure is for internal use only, not for the public API */ pps_entry *tree; U32 root; /* entry root, root pps_entry */ U8 *BDepot; U8 *SDepot; FILE *sbfile; char *sbfilename; FILE *file; /* actual file (the filesystem) */ }; struct _COLEDIRENT { /* This structure is for internal use only, not for the public API */ U32 entry; struct _COLEDIR *dir; /* father */ }; struct _COLEDIR { /* This structure is for internal use only, not for the public API */ U32 entry; struct _COLEDIRENT visited_entry; struct _COLEFS *fs; /* father */ }; struct _COLEFILE { /* This structure is for internal use only, not for the public API */ U32 entry; FILE *file; /* actual extracted file */ char *filename; /* actual extracted file's name */ U32 filesize; /* actual extracted file size */ struct _COLEFS *fs; /* father */ U32 pos; /* file pointer position */ }; int __cole_extract_file (FILE **file, char **filename, U32 size, U32 pps_start, U8 *BDepot, U8 *SDepot, FILE *sbfile, FILE *inputfile); #define _COLE_TYPE_DIR 1 #define _COLE_TYPE_FILE 2 #define _COLE_TYPE_ROOT 5 #ifdef __cplusplus } #endif #endif /* COLE_INTERNAL_H */ xlhtml/cole/olecod.c0100644000076400007640000011422207446125567015100 0ustar jackshckjackshck/* OLEcode - Generate a Microsoft OLE 2 file from given streams. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include #include #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "cole.h" #else #include "cole.h.in" #endif #include "support.h" #include "internal.h" #ifdef COLE_VERBOSE #define VERBOSE #else #undef VERBOSE #endif /* warning: some lines are longer than 80 characters */ struct str_MY_FILE { enum { real, MY_FILE_list, block_list, root_list } type; U32 size; /* size of list _itself_ */ U32 *blocks; /* size in big blocks (0x0200) of the information that contains this file */ union union_file { struct str_real { char *name; /* file name */ U32 ppsnumber; /* ppsnumber of pps property in stream_list */ } real; struct str_MY_FILE *MY_FILE_list; U32 *block_list; U8 *root_list; } file; }; typedef struct str_MY_FILE MY_FILE; static MY_FILE Input; static MY_FILE *sbfile; static MY_FILE *SDepot; static MY_FILE *BDepot; static MY_FILE *bbd_list; static MY_FILE *Root; /* starting and sizing blocks (calculated in calculate_blocks()) */ static U32 header_blocks; /* how many blocks takes header */ static U32 big_streams_blocks; /* how many blocks takes big streams */ static U32 sbfile_blocks; /* how many blocks takes sbfile (small streams) */ static U32 SDepot_blocks; /* how many blocks takes SDepot */ static U32 BDepot_blocks; /* how many blocks takes BDepot */ static U32 Root_blocks; /* how many blocks takes Root */ static U32 sbfile_start_block; /* where sbfile starts */ static U32 SDepot_start_block; /* where SDepot starts */ static U32 Root_start_block; /* where Root starts */ static U32 BDepot_start_block; /* where BDepot starts */ static FILE *output_file; /* the output file OLE2 file */ static U8 output_block[0x0200]; /* used as buffer to write later to output_file */ static U16 pos_block; /* position inside output_block from where the next write will happen, when it cames 0x0200 must write the block to output_file and make pos_block = 0x00 */ static U32 next_block; /* number of the next block to be written in output_file. the first block is -1, the second 0, the third 1 and so on */ /* process stage functions */ static int process_Root (pps_entry * pps_list, U32 root); static U32 max_pps_referenced (pps_entry * pps_list, U32 node); static U32 max3 (U32 a, U32 b, U32 c, U32 d); static int process_streams (pps_entry * pps_list, pps_entry * root); static int add_stream_to_sbfile_and_SDepot (U32 size, char *name, U32 ppsnumber); static int add_stream_to_Input_and_BDepot (U32 size, char *name, U32 ppsnumber); static int add_entry_to_Root (pps_entry * node, U32 start_block); static U32 add_MY_FILE_entry (MY_FILE * list, U32 size); static int pps2root (U8 pps[0x80], pps_entry * node, U32 start_block); static void reset_links_in_Input (void); static void reset_links_in_BDepot (void); static void reset_links_in_SDepot (void); /* generate starge functions */ static int generate_ole2_file (const char *filename, int trunc); static int generate_header (void); static int generate_recursive (MY_FILE * list); static int generate_SDepot (void); static int generate_Root (void); static int generate_BDepot (void); static int generate_real_file (MY_FILE * MY_FILE_file); static int write_block_list (U32 start_count, MY_FILE *list, int write_end_chain); static int write_root_list (MY_FILE * list); static void calculate_blocks (void); /* support functions for both stages */ static U32 sum_block_list (MY_FILE * list); /* useless function by now, may be later */ /* static U32 sum_MY_FILE_list (MY_FILE * list); */ static U32 sum_blocks_MY_FILE_list (MY_FILE * list); static void ends (void); #define size2blocks(s,b) (!(s) ? 1 : (1+((s)-1)/(b))) #define size2blocks_preserve_zero(s,b) (!(s) ? 0 : (1+((s)-1)/(b))) #define clean_block(b,s) memset((b),0xff,(s)) #define init_MY_FILE(n, t, s, b, f) { \ (n)->type = t; \ (n)->size = (s); \ (n)->blocks = (b); \ (n)->file.t = (f); \ } #define init_MY_FILE_real(n, t, s, b, f, p) { \ n->type = t; \ n->size = s; \ n->blocks = b; \ n->file.real.name = f; \ n->file.real.ppsnumber = p; \ } #define reset_links() { reset_links_in_Input(); reset_links_in_BDepot(); reset_links_in_SDepot(); } /* if this block is full, write it to output_file and restart using this block */ #define check_output_block_boundary() { \ if (pos_block == 0x0200) { \ test_exitf (fwrite (output_block, 0x0200, 1, output_file) == 1, 1, dummy()); \ next_block++; \ pos_block = 0x00; \ } \ } #define write_until_output_block_boundary(clean) { \ if (pos_block != 0x00) { \ if (clean && pos_block%0x0200) \ clean_block (output_block + pos_block, (pos_block/0x0200 + 1)*0x0200 - pos_block); \ test_exitf (fwrite (output_block, 1, 0x0200, output_file) == 0x0200, 1, dummy ()); \ next_block++; \ pos_block = 0x00; \ } \ } #define write_until_output_block_small_boundary(clean) { \ if (pos_block % 0x40) { \ if (clean) \ clean_block (output_block + pos_block, (pos_block/0x40 + 1)*0x40 - pos_block); \ assert (pos_block+(pos_block/0x40 + 1)*0x40 - pos_block == (pos_block/0x40 + 1)*0x40); \ pos_block += (U16)((pos_block/0x40 + 1)*0x40 - pos_block); \ } \ } #define write_rest_of_output_block_with_null_pps() { \ if (pos_block != 0x00) { \ int zzzi; \ U16 U16zero = 0x0000U; \ clean_block (output_block + pos_block, 0x0200 - pos_block); \ for (zzzi = 0; zzzi < 4; zzzi++) \ if (zzzi*0x80 >= pos_block) \ fil_swriteU16 (output_block + zzzi*0x80 + 0x40, &U16zero); \ } \ } #define dummy() /* may be should be (means no op, do nothing): #define dummy() {1;} or may be: #define dummy() {;} */ /* Exit codes: 0 = All goes OK. 1 = error writting in OLEfilename, can use perror 2 = trunc == 0 and file exist 3 = can't create OLEfilename, can use perror 10 = Error allocating memory, there's no more memory 11 = Error reading streams files 12 = Error reading stream_list, it's broken */ int __OLEcode (const char *OLEfilename, int trunc, pps_entry * stream_list, U32 root) { verbose ("calling: OLEcode ()"); assert (OLEfilename != NULL); assert (stream_list != NULL); /* -- init static things -- */ output_file = NULL; clean_block (output_block, 0x0200); /* just needed clean up once, for security reasons */ pos_block = 0x00; next_block = 0xffffffffUL; /* it need to be 0xffffffffUL, because next time we make next_block++ it must be zero (bad hack? next_block is always 32 bits) */ BDepot = SDepot = bbd_list = NULL; Root = NULL; sbfile = NULL; /* -- allocate initial memory needed for my files (Structure called at HACKING) -- */ /* Input: 5 entries in Input: for sbfile, for SDepot, for BDepot, for bbd_list and for Root */ init_MY_FILE ((&Input), MY_FILE_list, 5 * sizeof (MY_FILE), NULL, malloc (Input.size)); /* Input->blocks is not needed */ test_exitf (Input.file.MY_FILE_list != NULL, 10, ends ()); reset_links_in_Input (); /* bbd_list */ init_MY_FILE (bbd_list, block_list, sizeof (U32), NULL, malloc (bbd_list->size)); /* bbd_list is not needed */ /* bbd_list->blocks is not needed */ test_exitf (bbd_list->file.block_list != NULL, 10, ends ()); bbd_list->file.block_list[0] = 1; /* because BDepot starts with 3 entries */ /* BDepot */ init_MY_FILE (BDepot, block_list, 3 * sizeof (U32), bbd_list->file.block_list, malloc (BDepot->size)); test_exitf (BDepot->file.block_list != NULL, 10, ends ()); BDepot->file.block_list[0] = BDepot->file.block_list[1] = BDepot->file.block_list[2] = 0; /* sbfile, SDepot and Root are size 0 by now */ /* sbfile */ init_MY_FILE (sbfile, MY_FILE_list, 0, BDepot->file.block_list, NULL); /* SDepot */ init_MY_FILE (SDepot, block_list, 0, BDepot->file.block_list + 1, NULL); /* Root */ init_MY_FILE (Root, root_list, 0, BDepot->file.block_list + 2, NULL); /* -- process streams -- */ test_call (process_Root (stream_list, root), int); test_call (process_streams (stream_list, &stream_list[root]), int); /* how can I call ends() if process_streams fails? */ /* -- actually generate ole2 file -- */ test_call (generate_ole2_file (OLEfilename, trunc), int); return 0; } /* reviewed when coding ole2 file */ static int process_Root (pps_entry * pps_list, U32 root) { U32 pps_list_entries; U32 i; verbose ("calling: process_Root ()"); pps_list_entries = (1 + max_pps_referenced (pps_list, root)); verboseU32 (pps_list_entries); for (i = 0; i < pps_list_entries; i++) test_call (add_entry_to_Root (pps_list + i, 0x00000000UL), int); /* start_block = 0x00000000UL is a dummy value. The real start block: for files in SDepot is written in Root in generate_real_file(), for files in BDepot is written in Root in generate_real_file(), and for sbfile: the default is written in process_streams() and the real, if any, is written when generating the first small stream in generate_real_file(). But 0x00000000UL is a perfect value to directory entries (type=1) About sizes: every pps have its size, incluiding sbfile, that value will be comparated later in generate_real_file(). */ return 0; } #define MAX(a,b) ((a) > (b) ? (a) : (b)) static U32 max3 (U32 a, U32 b, U32 c, U32 d) { U32 m = 0; /*verbose ("calling: max3 ()");*/ m = MAX (m, a); m = MAX (m, b); m = MAX (m, c); m = MAX (m, d); return m; } static U32 max_pps_referenced (pps_entry * pps_list, U32 node) { U32 max_pps; /*verbose ("calling: max_pps_referenced ()");*/ max_pps = max3 (node, pps_list[node].previous != 0xffffffffUL ? pps_list[node].previous : 0, pps_list[node].next != 0xffffffffUL ? pps_list[node].next : 0, pps_list[node].dir != 0xffffffffUL ? pps_list[node].dir : 0); if (pps_list[node].previous != 0xffffffffUL) max_pps = MAX (max_pps, max_pps_referenced (pps_list, pps_list[node].previous)); if (pps_list[node].next != 0xffffffffUL) max_pps = MAX (max_pps, max_pps_referenced (pps_list, pps_list[node].next)); if (pps_list[node].dir != 0xffffffffUL) max_pps = MAX (max_pps, max_pps_referenced (pps_list, pps_list[node].dir)); return max_pps; } /* reviewed when coding ole2 file */ static int process_streams (pps_entry * pps_list, pps_entry * node) { U32 U32end_chain = 0xfffffffeUL; verbose ("calling: process_streams ()"); test_exitf (node->name[0], 12, dummy()); switch (node->type) { case 1: /* dir */ warning (node->size == 0); if (node->dir != 0xffffffffUL) test_call (process_streams (pps_list, &pps_list[node->dir]), int); if (node->next != 0xffffffffUL) test_call (process_streams (pps_list, &pps_list[node->next]), int); break; case 5: /* root dir */ assert (*(Root->file.root_list + 0x42) == 5); /* write the default start block of SDepot: empty if there are no sbfile at all */ fil_swriteU32 (Root->file.root_list + 0x74, &U32end_chain); if (node->dir != 0xffffffffUL) test_call (process_streams (pps_list, &pps_list[node->dir]), int); if (node->next != 0xffffffffUL) test_call (process_streams (pps_list, &pps_list[node->next]), int); break; case 2: /* file */ test_exitf (node->dir == 0xffffffffUL, 12, dummy()); if (node->size < 0x1000) /* must be in sbfile, and its block list in SDepot */ test_call (add_stream_to_sbfile_and_SDepot ( node->size, node->filename, node->ppsnumber), int) else /* node->size >= 0x1000 */ /* must be in Input, and its block list in BDepot */ test_call (add_stream_to_Input_and_BDepot ( node->size, node->filename, node->ppsnumber), int); if (node->next != 0xffffffffUL) test_call (process_streams (pps_list, &pps_list[node->next]), int); break; default: return 12; } return 0; } /* reviewed when processing Root */ static int add_entry_to_Root (pps_entry * node, U32 start_block) { U32 entry_number; U8 * new_entry_Root; verbose ("calling: add_entry_to_Root ()"); /* 1. add entry in Root */ entry_number = add_MY_FILE_entry (Root, 0 /*dummy value, not used*/); test_exitf (entry_number != 0xffffffffUL, 10, dummy ()); new_entry_Root = Root->file.root_list + entry_number * 0x80; /* 2. write info about the new stream in the new entry in Root */ pps2root (new_entry_Root, node, start_block); /* 3. update Input entry of Root */ /* update blocks size of Root (need Root->size updated) */ *(Root->blocks) = size2blocks (Root->size, 0x0200); /* 4. update Input entry of BDepot */ /* update blocks size of BDepot (need blocks size of Root updated */ *(BDepot->blocks) = size2blocks (sum_block_list (BDepot) * sizeof (U32), 0x0200); return 0; } /* reviewed when processing streams */ static int add_stream_to_sbfile_and_SDepot (U32 size, char *name, U32 ppsnumber) { U32 entry_number; U32 * new_entry_SDepot; MY_FILE * new_entry_sbfile; verbose ("calling: add_stream_to_sbfile_and_SDepot ()"); /* must be called only by process streams */ /* 1. add entries in SDepot and sbfile */ /* add in SDepot */ entry_number = add_MY_FILE_entry (SDepot, size); test_exitf (entry_number != 0xffffffffUL, 10, dummy ()); new_entry_SDepot = SDepot->file.block_list + entry_number; /* add in sbfile */ entry_number = add_MY_FILE_entry (sbfile, size); test_exitf (entry_number != 0xffffffffUL, 10, dummy ()); new_entry_sbfile = sbfile->file.MY_FILE_list + entry_number; /* 2. write info about the new stream in the new entry in SDepot */ /* write info in new entry (info related with parameter size) */ /* write blocks size of stream added */ *new_entry_SDepot = size2blocks (size, 0x40); /* 0x40 because is small stream */ /* 3. update Input entry of SDepot */ /* update blocks size of SDepot (need info in new_entry_SDepot written) */ *(SDepot->blocks) = size2blocks (sum_block_list (SDepot) * sizeof (U32), 0x0200); /* 4. write info about the new stream in the new entry in sbfile */ /* write info in new entry (info related with parameter size */ /* and block size depot) */ /* write size of stream added */ /* and write blocks size link of stream added */ init_MY_FILE_real (new_entry_sbfile, real, size, new_entry_SDepot, name, ppsnumber); /* 5. update Input entry of sbfile */ /* update blocks size of sbfile (need info in new_entry_sbfile->size */ /* and new_entry_sbfile->blocks written) */ *(sbfile->blocks) = size2blocks (sum_blocks_MY_FILE_list (sbfile) * 0x40, 0x0200); /* 6. update Input entry of BDepot */ /* update blocks size of BDepot (need blocks size of */ /* SDepot and sbfile updated */ *(BDepot->blocks) = size2blocks (sum_block_list (BDepot) * sizeof (U32), 0x0200); return 0; } /* reviewed when processing streams */ static int add_stream_to_Input_and_BDepot (U32 size, char *name, U32 ppsnumber) { U32 entry_number; MY_FILE * new_entry_Input; U32 * new_entry_BDepot; verbose ("calling: add_stream_to_Input_and_BDepot ()"); /* must be called only by process streams */ /* 1. add entries in BDepot and Input */ /* add in BDepot */ entry_number = add_MY_FILE_entry (BDepot, size); test_exitf (entry_number != 0xffffffffUL, 10, dummy ()); new_entry_BDepot = BDepot->file.block_list + entry_number; /* add in Input */ entry_number = add_MY_FILE_entry (&Input, size); test_exitf (entry_number != 0xffffffffUL, 10, dummy ()); new_entry_Input = Input.file.MY_FILE_list + entry_number; /* 2. write info about the new stream in the new entry in BDepot */ /* write info in new entry (info related with parameter size) */ /* write blocks size of stream added */ *new_entry_BDepot = size2blocks (size, 0x0200); /* 0x0200 because is big stream */ /* 3. update Input entry of BDepot */ /* update blocks size of BDepot (need info in new_entry_BDepot written) */ *(BDepot->blocks) = size2blocks (sum_block_list (BDepot) * sizeof (U32), 0x0200); /* 4. write info about the new stream in the new entry in Input */ /* write info in new entry (info related with parameter size */ /* and block size depot) */ /* write size of stream added */ /* and write blocks size link of stream added */ init_MY_FILE_real (new_entry_Input, real, size, new_entry_BDepot, name, ppsnumber); /* 5. ?? update Input entry of Input ?? */ /* this seems to be not aplicable here, not needed */ /* 6. update Input entry of BDepot */ /* update blocks size of BDepot (need blocks size of */ /* BbDepot and ?? Input ?? updated */ *(BDepot->blocks) = size2blocks (sum_block_list (BDepot) * sizeof (U32), 0x0200); return 0; } /* reviewed all conditions */ static U32 add_MY_FILE_entry (MY_FILE * list, U32 size) { #if __GNUC__ == 2 static char cff[] = "cole2357"; #define nextff(var) static void * nextff_##var = (&nextff_##var); \ nextff_##var=&##var; nextff (cff); #endif verbose ("calling: add_MY_FILE_entry ()"); #ifdef VERBOSE if (list == &Input) { verbose_wonl ("add_MY_FILE_entry: list = &Input, "); } else if (list == sbfile) { verbose_wonl ("add_MY_FILE_entry: list = sbfile, "); } else if (list == SDepot) { verbose_wonl ("add_MY_FILE_entry: list = SDepot, "); } else if (list == BDepot) { verbose_wonl ("add_MY_FILE_entry: list = BDepot, "); } else if (list == bbd_list) { verbose_wonl ("add_MY_FILE_entry: list = bbd_list, "); } else if (list == Root) { verbose_wonl ("add_MY_FILE_entry: list = Root, "); } else { verbose_wonl ("add_MY_FILE_entry: list = UNKNOWN (ERROR!), "); } verboseU32 (size); #endif assert (list != NULL); switch (list->type) { /* reviewed when adding to sbfile */ /* reviewed when adding to Input */ case MY_FILE_list: { MY_FILE *new_MY_FILE_list; U32 new_entry; assert (list == sbfile || list == &Input); /* actually add */ list->size = list->size + sizeof (MY_FILE); new_MY_FILE_list = realloc (list->file.MY_FILE_list, list->size); list->file.MY_FILE_list = new_MY_FILE_list; test_exitf (new_MY_FILE_list != NULL, 0xffffffffUL, dummy ()); new_entry = list->size / sizeof (MY_FILE) - 1; reset_links (); return new_entry; } /* reviewed when adding to SDepot */ /* reviewed when adding to BDepot */ case block_list: { U32 *new_block_list; U32 new_entry; assert (list == SDepot || list == BDepot); /* actually add */ list->size = list->size + sizeof (U32); new_block_list = realloc (list->file.block_list, list->size); list->file.block_list = new_block_list; test_exitf (new_block_list != NULL, 0xffffffffUL, dummy ()); new_entry = list->size / sizeof (U32) - 1; reset_links (); return new_entry; } /* reviewed when adding to Root */ case root_list: { U32 new_entry; U8 *new_root_list; assert (list == Root); /* actually add */ list->size = list->size + 0x80; new_root_list = realloc (list->file.root_list, list->size); list->file.root_list = new_root_list; test_exitf (new_root_list != NULL, 0xffffffffUL, dummy ()); new_entry = list->size / 0x80 - 1; reset_links (); return new_entry; } default: if (SDepot->file.block_list!=NULL) { verboseU32Array (SDepot->file.block_list, SDepot->size / sizeof(U32)); verboseU32 (Root->size); verboseU32Array (BDepot->file.block_list, BDepot->size / sizeof(U32)); verboseU32 (*(bbd_list->file.block_list)); } assert ("list->type UNKNOWN in add_MY_FILE_entry" == NULL); return 0; } } /* reviewed when adding to Root */ static int pps2root (U8 pps[0x80], pps_entry * node, U32 start_block) { U16 i; U16 size_of_name; /* next vars are constant, should it be static for performance? */ U8 U8magiczero = 0x00; U32 U32magiczero = 0x00000000UL; U32 U32magic1 = 0x00020900UL; U32 U32magic2 = 0x46000000UL; verbose ("calling: pps2root ()"); verboseU32 (node->ppsnumber); verboseU32 ((U32) (pps - Root->file.root_list)); assert (node->ppsnumber == (U32)(pps - Root->file.root_list)/0x80); clean_block (pps, 0x80); /* name and its size */ size_of_name = (U16)(2 * (strlen (node->name) + 1)); /* 2 * because zero follow each char */ for (i = 0; i < size_of_name; i++) *(pps + i) = (U8)(i % 2 ? 0x00 : *(node->name + (i / 2))); fil_swriteU16 (pps + 0x40, &size_of_name); /* other variables */ *(pps + 0x42) = node->type; fil_swriteU32 (pps + 0x44, &node->previous); fil_swriteU32 (pps + 0x48, &node->next); fil_swriteU32 (pps + 0x4c, &node->dir); fil_swriteU32 (pps + 0x64, &node->seconds1); fil_swriteU32 (pps + 0x68, &node->days1); fil_swriteU32 (pps + 0x6c, &node->seconds2); fil_swriteU32 (pps + 0x70, &node->days1); fil_swriteU32 (pps + 0x74, &start_block); fil_swriteU32 (pps + 0x78, &node->size); /* constant magic numbers */ *(pps + 0x43) = U8magiczero; fil_swriteU32 (pps + 0x50, &U32magic1); fil_swriteU32 (pps + 0x54, &U32magiczero); fil_swriteU32 (pps + 0x58, &U32magiczero); fil_swriteU32 (pps + 0x5c, &U32magic2); fil_swriteU32 (pps + 0x60, &U32magiczero); fil_swriteU32 (pps + 0x7c, &U32magiczero); verboseU8Array (pps, 1, 0x80); return 0; } static U32 sum_block_list (MY_FILE * list) { U32 sum = 0; U32 *block; /*verbose ("calling: sum_block_list ()");*/ assert (list != NULL); assert (list->type == block_list); for (block = list->file.block_list; (U32)(((U8 *) block - (U8 *) list->file.block_list)) < list->size; block++) sum += *block; return sum; } /* static U32 sum_MY_FILE_list (MY_FILE * list) { U32 sum = 0; MY_FILE *file; verbose ("calling: sum_MY_FILE_list ()"); assert (list != NULL); assert (list->type == MY_FILE_list); for (file = list->file.MY_FILE_list; ((U8 *) file - (U8 *) list->file.MY_FILE_list) < list->size; file++) sum += file->size; return sum; } */ static U32 sum_blocks_MY_FILE_list (MY_FILE * list) { U32 sum = 0; MY_FILE *file; /*verbose ("calling: sum_blocks_MY_FILE_list ()");*/ assert (list != NULL); assert (list->type == MY_FILE_list); for (file = list->file.MY_FILE_list; (U32)((U8 *) file - (U8 *) list->file.MY_FILE_list) < list->size; file++) if (file->blocks != NULL) sum += *(file->blocks); return sum; } static void reset_links_in_Input (void) { verbose ("calling: reset_links_in_Input ()"); sbfile = Input.file.MY_FILE_list + 4; SDepot = Input.file.MY_FILE_list + 3; BDepot = Input.file.MY_FILE_list + 1; bbd_list = Input.file.MY_FILE_list; Root = Input.file.MY_FILE_list + 2; } static void reset_links_in_BDepot (void) { U32 i; verbose ("calling: reset_links_in_BDepot ()"); sbfile->blocks = BDepot->file.block_list; SDepot->blocks = BDepot->file.block_list + 1; Root->blocks = BDepot->file.block_list + 2; /* relink big streams block sizes in Input with BDepot entries */ for (i = 0; i < (Input.size / sizeof (MY_FILE)) - 5; i++) Input.file.MY_FILE_list[i + 5].blocks = BDepot->file.block_list + i + 3; } static void reset_links_in_SDepot (void) { U32 i; verbose ("calling: reset_links_in_SDepot ()"); /* relink small streams block sizes in sbfile with SDepot entries */ for (i = 0; i < sbfile->size / sizeof (MY_FILE); i++) sbfile->file.MY_FILE_list[i].blocks = SDepot->file.block_list + i; } static int generate_ole2_file (const char *filename, int trunc) { verbose ("calling: generate_ole2_file ()"); if (!trunc) { output_file = fopen (filename, "r"); test_exitf (output_file == NULL, 2, ends ()); } output_file = fopen (filename, "wb"); test_exitf (output_file != NULL, 3, ends ()); test_call (generate_header (), int); test_call (generate_recursive (&Input), int); /* some tricky here: if there are only small streams, no big streams, next line wich is in generate_real_file will never be executed. so we do it here, if only is correct is harmless calling it here */ write_until_output_block_boundary (1); test_call (generate_SDepot (), int); test_call (generate_Root (), int); test_call (generate_BDepot (), int); fclose (output_file); return 0; } static int generate_header (void) { U32 identifier1 = 0xe011cfd0UL; U32 identifier2 = 0xe11ab1a1UL; U32 U32magiczero = 0x00000000UL; U32 U32magic1 = 0x0003003bUL; U32 U32magic2 = 0x0009fffeUL; U32 U32magic3 = 0x00000006UL; U32 U32magic4 = 0x00001000UL; U32 U32magic5 = 0x00000001UL; U32 U32magic6 = 0xfffffffeUL; verbose ("calling: generate_header ()"); calculate_blocks (); fil_swriteU32 (output_block + 0x30, &Root_start_block); fil_swriteU32 (output_block + 0x3c, &SDepot_start_block); fil_swriteU32 (output_block + 0x2c, &BDepot_blocks); /* constant magic numbers */ fil_swriteU32 (output_block + 0x00, &identifier1); fil_swriteU32 (output_block + 0x04, &identifier2); fil_swriteU32 (output_block + 0x08, &U32magiczero); fil_swriteU32 (output_block + 0x0c, &U32magiczero); fil_swriteU32 (output_block + 0x10, &U32magiczero); fil_swriteU32 (output_block + 0x14, &U32magiczero); fil_swriteU32 (output_block + 0x18, &U32magic1); fil_swriteU32 (output_block + 0x1c, &U32magic2); fil_swriteU32 (output_block + 0x20, &U32magic3); fil_swriteU32 (output_block + 0x24, &U32magiczero); fil_swriteU32 (output_block + 0x28, &U32magiczero); fil_swriteU32 (output_block + 0x34, &U32magiczero); fil_swriteU32 (output_block + 0x38, &U32magic4); fil_swriteU32 (output_block + 0x40, &U32magic5); fil_swriteU32 (output_block + 0x44, &U32magic6); fil_swriteU32 (output_block + 0x48, &U32magiczero); pos_block = 0x4c; return 0; } /* reviewed all cases */ static int generate_recursive (MY_FILE * list) { MY_FILE *p_MY_FILE_list; verbose ("calling: generate_recursive ()"); switch (list->type) { /* reviewed when generating Input and sbfile */ case MY_FILE_list: for (p_MY_FILE_list = list->file.MY_FILE_list; (U32)((U8*)p_MY_FILE_list - (U8*)list->file.root_list) < list->size; p_MY_FILE_list++) test_call (generate_recursive (p_MY_FILE_list), int); break; /* reviewed when generating bbd_list, BDepot and SDepot */ case block_list: if (list == bbd_list) { test_call (write_block_list (BDepot_start_block, bbd_list, 0), int); write_until_output_block_boundary (1); break; } else if (list == BDepot) /* we want to skip generate BDepot by now */ break; else if (list == SDepot) /* we want to skip generate SDepot by now */ break; else assert ("list->type==block_list but list UNKNOWN in generate_recursive"==NULL); /* reviewed when generating Root */ case root_list: /* we want to skip generate Root by now */ assert (list == Root); break; case real: /* we are generating big and small streams here */ test_call (generate_real_file (list), int); break; default: assert ("list->type UNKNOWN in generate_recursive" == NULL); } return 0; } static int generate_SDepot (void) { verbose ("calling: generate_SDepot ()"); test_call (write_block_list (1, SDepot, 1), int); write_until_output_block_boundary (1); return 0; } static int generate_Root (void) { verbose ("calling: generate_Root ()"); test_call (write_root_list (Root), int); write_rest_of_output_block_with_null_pps (); write_until_output_block_boundary (0); return 0; } static int generate_BDepot (void) { MY_FILE SDepot_and_Root_block_list; MY_FILE file_block_list; U32 next_block_link; verbose ("calling: generate_BDepot ()"); next_block_link = 0xffffffffUL + header_blocks + 1; /* + 1 because is the ___next link___ */ /* 1. generate sbfile block list */ assert (next_block_link == sbfile_start_block + 1); /* + 1 because is the ___next link___ */ init_MY_FILE ((&file_block_list), block_list, sizeof (U32), NULL, BDepot->file.block_list); /* the blocks that takes sbfile are in the first entry in BDepot */ verboseU32 ((*(BDepot->file.block_list))); test_call (write_block_list (next_block_link, &file_block_list, 1), int); /* update next_block_link */ next_block_link += sbfile_blocks; /* 2. generate big streams block list */ assert (next_block_link == sbfile_start_block + sbfile_blocks + 1); /* + 1 because is the ___next link___ */ init_MY_FILE ((&file_block_list), block_list, BDepot->size - 3 * sizeof (U32), NULL, BDepot->file.block_list + 3); /* 3 because the first three entries in BDepot are sbfile, SDepot and Root */ test_call (write_block_list (next_block_link, &file_block_list, 1), int); /* update next_block_link */ next_block_link += sum_block_list (&file_block_list); /* 3. generate SDepot and Root block list */ if (sbfile->size > 0) /* if there are sbfile */ assert (next_block_link == SDepot_start_block + 1); /* + 1 because is the ___next link___ */ init_MY_FILE ((&SDepot_and_Root_block_list), block_list, 2 * sizeof (U32), NULL, BDepot->file.block_list + 1); /* + 1 because the first entry in BDepot is sbfile block */ test_call (write_block_list (next_block_link, &SDepot_and_Root_block_list, 1), int); /* 4. finish */ write_until_output_block_boundary (1); return 0; } static int generate_real_file (MY_FILE * MY_FILE_file) { FILE *file; int n_read; U8 * pps; U32 total_bytes; U32 sbfile_size; static U32 last_small_stream_next_block = 0; static int sbfile_start_block_set = 0; static int sbfile_may_need_write_until_boundary = 0; verbose ("calling: generate_real_file ()"); /* FIXME MARK 3 */ /* all seems to be working until here... I hope. Test is welcome! */ /*verboseU16 (sbfile_start_block_set);*/ /*verboseU16 (sbfile_may_need_write_until_boundary);*/ /*verboseU16 (pos_block);*/ assert (pos_block <= 0x0200); assert (pos_block % 0x40 == 0); /* open real file */ assert (MY_FILE_file->file.real.name[0]); file = fopen (MY_FILE_file->file.real.name, "rb"); test_exitf (file != NULL, 11, dummy ()); /* write Root start_block's of this file */ if (MY_FILE_file->size >= 0x1000) { /* generating big stream */ /* first, end writting sbfile, if any */ if (sbfile_may_need_write_until_boundary) { /* this happens after all small strams have been generated but before the first big stream is generated */ write_until_output_block_boundary (1); sbfile_may_need_write_until_boundary = 0; } /* then, continue with this big stream */ /* write start block of this stream in its Root pps */ verboseU32 (next_block); pps = Root->file.root_list + MY_FILE_file->file.real.ppsnumber * 0x80; fil_swriteU32 (pps + 0x74, &next_block); } else { /* generating small stream */ /* do nothing, start block of small streams was written in proces_streams */ /* write start block of this stream in its Root pps */ pps = Root->file.root_list + MY_FILE_file->file.real.ppsnumber * 0x80; fil_swriteU32 (pps + 0x74, &last_small_stream_next_block); last_small_stream_next_block += *(MY_FILE_file->blocks); /* small blocks */ /* write sbfile start block in root directory pps in Root, if not done */ if (!sbfile_start_block_set) { /* this happens before generate the first small stream that makes sbfile */ verbose ("generating sbfile"); verbose ("SUPPOSING: first entry in Root is root entry"); /* write start block of sbfile */ assert (sbfile_start_block == next_block); fil_swriteU32 (Root->file.root_list + 0x74, &next_block); sbfile_size = sum_blocks_MY_FILE_list (sbfile) * 0x40; verboseU32 (sbfile_size); /* compare calculated sbfile size with original */ assert (sbfile_size == fil_sreadU32 (Root->file.root_list + 0x78)); sbfile_start_block_set = 1; sbfile_may_need_write_until_boundary = 1; } } verboseS (MY_FILE_file->file.real.name); total_bytes = 0; /* copy real file to output_file */ while (!feof (file)) { n_read = fread (output_block+pos_block, 1, 0x0200-pos_block, file); test_exitf (!ferror (file), 11, dummy ()); if (n_read < 0x0200-pos_block) /* if it was readed less than it could be possible */ assert (feof (file)); pos_block += (U16)n_read; total_bytes += n_read; check_output_block_boundary (); } test_exitf (total_bytes == MY_FILE_file->size, 12, dummy()); if (MY_FILE_file->size >= 0x1000) /* generating big stream */ write_until_output_block_boundary (1) else /* generating small stream */ write_until_output_block_small_boundary (1); /* close real file */ fclose (file); return 0; } int write_block_list (U32 start_count, MY_FILE * list, int write_end_chain) { U32 *p; U32 n; U32 end_chain = 0xfffffffeUL; U32 value_to_write; U32 delta; verbose ("calling: write_block_list ()"); assert (list->type == block_list); /* Was (list->type = block_list) - SG */ assert (pos_block <= 0x01fc); /* 0x01fc = 0x0200 - sizeof(U32) */ delta = start_count; if (list->size == 0) return 0; /* we are done */ for (p = list->file.block_list; (U32)((U8 *) p - (U8 *) list->file.block_list) < list->size; p++) { for (n = 0; n < *p; n++) { /* this allow bbd_list runs over the block number 2 */ check_output_block_boundary (); /* if it's the last block in chain */ if (write_end_chain && !(n + 1 < *p)) value_to_write = end_chain; else value_to_write = n + delta; fil_swriteU32 (output_block + pos_block, &value_to_write); pos_block += (U16)sizeof (U32); assert (pos_block <= 0x0200); } delta += n; } check_output_block_boundary (); return 0; } static int write_root_list (MY_FILE * list) { U8 * p; verbose ("calling: write_root_list ()"); assert (list != NULL); assert (pos_block == 0); assert (list->type == root_list); assert (list->size > 0); for (p = list->file.root_list; (U32)(p - list->file.root_list) < list->size; p += 0x80) { memcpy (output_block+(p-list->file.root_list)%0x0200, p, 0x80); /*verboseU8Array ((output_block+(p-list->file.root_list)%0x0200), 1, 0x80);*/ verboseU32 (fil_sreadU32 (p + 0x74)); #ifdef VERBOSE { U32 written_start_block; U32 file_size; U8 * h; written_start_block = fil_sreadU32 ( output_block+(p-list->file.root_list)%0x0200 + 0x74 ); file_size = fil_sreadU32 ( output_block+(p-list->file.root_list)%0x0200 + 0x78 ); for (h = output_block+(p-list->file.root_list)%0x0200; *h; h+=2) if (isprint (*h)) printf ("%c", *h); else printf ("\\0x%02x", *h); printf (": "); verboseU32 (written_start_block); verboseU32 (file_size); } #endif pos_block += (U16)0x80; assert (pos_block <= (U16)0x0200); check_output_block_boundary (); } return 0; } static void ends (void) { #ifdef VERBOSE static int called; verbose ("calling: ends ()"); if (called++) verbose ("DANGER: ends called more than once"); #endif /* sbfile SDepot BDepot Root Input */ if (output_file != NULL) fclose (output_file); } /* reviewed when done */ static void calculate_blocks (void) { MY_FILE big_streams_list; verbose ("calling: calculate_blocks ()"); /* preparing */ init_MY_FILE ((&big_streams_list), MY_FILE_list, Input.size - 5 * sizeof (MY_FILE), NULL, Input.file.MY_FILE_list + 5); /* 5 because the first 5 entries in Input are for bbd_list, BDepot, Root, SDepot and sbfile */ /* calculate sizes */ assert (*(BDepot->blocks) == *(bbd_list->file.block_list)); assert (*(Root->blocks) == size2blocks (Root->size, 0x0200)); verboseU32 ((*(sbfile->blocks))); verboseU32 ((size2blocks (sum_blocks_MY_FILE_list (sbfile) * 0x40, 0x0200))); assert (*(sbfile->blocks) == size2blocks_preserve_zero ( sum_blocks_MY_FILE_list (sbfile) * 0x40, 0x0200)); assert (*(SDepot->blocks) == size2blocks_preserve_zero ( (sum_block_list (SDepot) * sizeof (U32)), 0x0200)); BDepot_blocks = *(BDepot->blocks); SDepot_blocks = *(SDepot->blocks); Root_blocks = *(Root->blocks); sbfile_blocks = *(sbfile->blocks); big_streams_blocks = sum_blocks_MY_FILE_list (&big_streams_list); header_blocks = size2blocks ((19 + BDepot_blocks) * sizeof(U32), 0x0200); /* 19 + because the first 19 U32 doesn't belong to BDepot_blocks, but to header */ /* calculate starting */ sbfile_start_block = 0xffffffffUL + header_blocks; /* if there are sbfile, should start in sbfile_start_block */ Root_start_block = 0xffffffffUL + header_blocks + sbfile_blocks + big_streams_blocks + SDepot_blocks; /* 0xffffffffUL because first block is -1, second 0, third 1 and son on */ if (SDepot_blocks > 0) /* if there are small streams*/ SDepot_start_block = 0xffffffffUL + header_blocks + sbfile_blocks + big_streams_blocks; else /* SDepot_blocks == 0 */ /* if there are not small streams, neither sbfile, neither SDepot */ SDepot_start_block = 0xfffffffeUL; BDepot_start_block = 0xffffffffUL + header_blocks + sbfile_blocks + big_streams_blocks + SDepot_blocks + Root_blocks; verboseU32 (header_blocks); verboseU32 (big_streams_blocks); verboseU32 (sbfile_blocks); verboseU32 (SDepot_blocks); } #undef VERBOSE /* You can use next lines to print some parts of Structure */ /* verboseU32Array (SDepot->file.block_list, SDepot->size / sizeof(U32)); verboseU8Array (Root->file.root_list, Root->size / 0x80, 0x80); verboseU32Array (BDepot->file.block_list, BDepot->size / sizeof (U32)); verboseU32 (*(bbd_list->file.block_list)); */ xlhtml/cole/oledecod.c0100644000076400007640000005556107466770232015420 0ustar jackshckjackshck/* OLEdecode - Decode Microsoft OLE files into its components. Copyright (C) 1998, 1999 Andrew Scriven This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Released under GPL, written by Andrew Scriven Copyright (C) 1998, 1999 Andrew Scriven */ /* ----------------------------------------------------------------------- Andrew Scriven Research and Engineering Electron Building, Windmill Hill, Whitehill Way, Swindon, SN5 6PB, UK Phone (44) 1793 896206, Fax (44) 1793 896251 ----------------------------------------------------------------------- */ /* *Extremely* modified by Arturo Tena */ #include #include #include #include #include #include #include #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "cole.h" #include "config.h" #include /* for unlink() */ #else #include "cole.h.in" #endif /* FIXME: replace all VERBOSE with COLE_VERBOSE */ #ifdef COLE_VERBOSE #define VERBOSE #else #undef VERBOSE #endif #include "support.h" #include "internal.h" #define ENTRYCHUNK 20 /* number of entries in root_list and sbd_list will be added each time. must be at least 1 */ #define MIN(a,b) ((a)<(b) ? (a) : (b)) /* reorder pps tree, from tree structure to a linear one, and write the level numbers, returns zero if OLE format fails, returns no zero if success */ static int reorder_pps_tree (pps_entry * root_pps, U16 level); /* free memory used (except the pps tree) */ static void ends (void); /* close and remove files in the tree */ /* closeOLEtreefiles --- outdated because not to generate the real files by now --- cole 2.0.0 */ /* static void closeOLEtreefiles (pps_entry * tree, U32 root); */ /* Verbose pps tree. Input: pps_list: stream list. root_pps: root pps. level: how much levels will be extracted. Output: none. */ static void verbosePPSTree (pps_entry * pps_list, U32 root_pps, int level); static FILE *input; static U8 *Block; static U8 *Blockx; static U8 *BDepot, *SDepot, *Root; static pps_entry *pps_list; static U32 num_of_pps; static FILE *sbfile; /* sbfilename is stored in *_sbfilename instead -- cole 2.0.0 */ /* static char sbfilename[L_tmpnam]; */ static U32 *sbd_list; static U32 *root_list; int __OLEdecode (char *OLEfilename, pps_entry ** stream_list, U32 * root, U8 **_BDepot, U8 **_SDepot, FILE **_sbfile, char **_sbfilename, FILE **_input, U16 max_level) { int c; U32 num_bbd_blocks; U32 num_xbbd_blocks; U32 bl; U32 i, j, len; U8 *s, *p, *t; long FilePos; /* FilePos is long, not U32, because second argument of fseek is long */ /* initialize static variables */ input = sbfile = NULL; Block = Blockx = BDepot = SDepot = Root = NULL; pps_list = NULL; num_of_pps = 0; /* sbfilename is stored in *_sbfilename instead -- cole 2.0.0 */ /* sbfilename[0] = 0; */ root_list = sbd_list = NULL; /* initalize return parameters */ *stream_list = NULL; /* open input file */ verbose ("open input file"); input = fopen (OLEfilename, "rb"); test_exitf (input != NULL, 4, ends ()); *_input = input; /* fast check type of file */ verbose ("fast testing type of file"); test_exitf ((c = getc (input)) != EOF, 5, ends ()); test_exitf (ungetc (c, input) != EOF, 5, ends ()); /* test_exitf (!isprint (c), 8, ends ()); OpenBSD suggestion to comment this out */ test_exitf (c == 0xd0, 9, ends ()); /* read header block */ verbose ("read header block"); Block = (U8 *) malloc (0x0200); test_exitf (Block != NULL, 10, ends ()); fread (Block, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); /* really check type of file */ rewind (input); verbose ("testing type of file"); test_exitf (fil_sreadU32 (Block) != 0xd0cf11e0UL, 9, ends ()); test_exitf (fil_sreadU32 (Block + 0x04) != 0xa1b11ae1UL, 9, ends ()); /* read big block depot */ verbose ("read big block depot (bbd)"); num_bbd_blocks = fil_sreadU32 (Block + 0x2c); num_xbbd_blocks = fil_sreadU32 (Block + 0x48); verboseU32 (num_bbd_blocks); verboseU32 (num_xbbd_blocks); BDepot = (U8 *) malloc (0x0200 * (num_bbd_blocks + num_xbbd_blocks)); test_exitf (BDepot != NULL, 10, ends ()); *_BDepot = BDepot; s = BDepot; assert (num_bbd_blocks <= (0x0200 / 4 - 1) * num_xbbd_blocks + (0x0200 / 4) - 19); /* the first 19 U32 in header does not belong to bbd_list */ for (i = 0; i < MIN (num_bbd_blocks, 0x0200 / 4 - 19); i++) { /* note: next line may be needed to be cast to long in right side */ FilePos = 0x0200 * (1 + fil_sreadU32 (Block + 0x4c + (i * 4))); assert (FilePos >= 0); test_exitf (!fseek (input, FilePos, SEEK_SET), 5, ends ()); fread (s, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); s += 0x0200; } Blockx = (U8 *) malloc (0x0200); test_exitf (Blockx != NULL, 10, ends ()); bl = fil_sreadU32 (Block + 0x44); for (i = 0; i < num_xbbd_blocks; i++) { FilePos = 0x0200 * (1 + bl); assert (FilePos >= 0); test_exitf (!fseek (input, FilePos, SEEK_SET), 5, ends ()); fread (Blockx, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); for (j=0; j < 0x0200 / 4 - 1;j++) /* last U32 is for the next bl */ { if (fil_sreadU32 (Blockx + (j * 4)) == 0xfffffffeUL || fil_sreadU32 (Blockx + (j * 4)) == 0xfffffffdUL || fil_sreadU32 (Blockx + (j * 4)) == 0xffffffffUL) break; /* note: next line may be needed to be cast to long in right side */ FilePos = 0x0200 * (1 + fil_sreadU32 (Blockx + (j * 4))); assert (FilePos >= 0); test_exitf (!fseek (input, FilePos, SEEK_SET), 5, ends ()); fread (s, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); s += 0x0200; } bl = fil_sreadU32 (Blockx + 0x0200 - 4); } verboseU8Array (BDepot, (num_bbd_blocks+num_xbbd_blocks), 0x0200); /* extract the sbd block list */ verbose ("extract small block depot (sbd) block list"); sbd_list = (U32 *) malloc (ENTRYCHUNK * 4); test_exitf (sbd_list != NULL, 10, ends ()); sbd_list[0] = fil_sreadU32 (Block + 0x3c); /* -2 signed long int == 0xfffffffe unsinged long int */ for (len = 1; sbd_list[len - 1] != 0xfffffffeUL; len++) { test_exitf (len != 0, 5, ends ()); /* means file is too big */ /* if memory allocated in sbd_list is all used, allocate more memory */ if (!(len % ENTRYCHUNK)) { U32 *newspace; newspace = realloc (sbd_list, (1 + len / ENTRYCHUNK) * ENTRYCHUNK * 4); test_exitf (newspace != NULL, 10, ends ()); sbd_list = newspace; } sbd_list[len] = fil_sreadU32 (BDepot + (sbd_list[len - 1] * 4)); /*verboseU32 (len);*/ /*verboseU32 (sbd_list[0]);*/ /*verboseU32 (sbd_list[1]);*/ if (sbd_list[len] != 0xfffffffeUL) test_exitf (sbd_list[len] <= num_bbd_blocks * 0x0200 - 4, 5, ends ()); test_exitf (sbd_list[len] != 0xfffffffdUL && sbd_list[len] != 0xffffffffUL, 5, ends ()); } len--; verboseU32Array (sbd_list, len+1); /* read in small block depot, if there's any small block */ if (len == 0) { SDepot = NULL; verbose ("not read small block depot (sbd): there's no small blocks"); } else { verbose ("read small block depot (sbd)"); SDepot = (U8 *) malloc (0x0200 * len); test_exitf (SDepot != NULL, 10, ends ()); s = SDepot; for (i = 0; i < len; i++) { FilePos = 0x0200 * (1 + sbd_list[i]); assert (FilePos >= 0); test_exitf (!fseek (input, FilePos, SEEK_SET), 5, ends ()); fread (s, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); s += 0x200; } verboseU8Array (SDepot, len, 0x0200); } *_SDepot = SDepot; /* extract the root block list */ verbose ("extract root block depot (root) block list"); root_list = (U32 *) malloc (ENTRYCHUNK * 4); test_exitf (root_list != NULL, 10, ends ()); root_list[0] = fil_sreadU32 (Block + 0x30); for (len = 1; root_list[len - 1] != 0xfffffffeUL; len++) { test_exitf (len != 0, 5, ends ()); /* means file is too long */ /* if memory allocated in root_list is all used, allocate more memory */ if (!(len % ENTRYCHUNK)) { U32 *newspace; newspace = realloc (root_list, (1 + len / ENTRYCHUNK) * ENTRYCHUNK * 4); test_exitf (newspace != NULL, 10, ends ()); root_list = newspace; } root_list[len] = fil_sreadU32 (BDepot + (root_list[len - 1] * 4)); test_exitf (root_list[len] != 0xfffffffdUL && root_list[len] != 0xffffffffUL, 5, ends ()); } len--; verboseU32Array (root_list, len+1); /* read in root block depot */ verbose ("read in root block depot (Root)"); Root = (U8 *) malloc (0x0200 * len); test_exitf (Root != NULL, 10, ends ()); s = Root; for (i = 0; i < len; i++) { FilePos = 0x0200 * (root_list[i] + 1); assert (FilePos >= 0); test_exitf (!fseek (input, FilePos, SEEK_SET), 5, ends ()); fread (s, 0x0200, 1, input); test_exitf (!ferror (input), 5, ends ()); s += 0x200; } verboseU8Array (Root, len, 0x0200); /* assign space for pps list */ verbose ("read pps list"); num_of_pps = len * 4; /* each sbd block have 4 pps */ *stream_list = pps_list = (pps_entry *)malloc(num_of_pps*sizeof(pps_entry)); test_exitf (pps_list != NULL, 10, ends ()); /* read pss entry details and look out for "Root Entry" */ verbose ("read pps entry details"); for (i = 0; i < num_of_pps; i++) { U16 size_of_name; s = Root + (i * 0x80); /* read the number */ pps_list[i].ppsnumber = i; /* read the name */ size_of_name = (U16)MIN (0x40, fil_sreadU16 (s + 0x40)); pps_list[i].name[0] = 0; if (size_of_name == 0) continue; for (p = (U8 *) pps_list[i].name, t = s; t < s + size_of_name; t++) *p++ = *t++; /* makes visible the non printable first character */ /* if (!isprint (pps_list[i].name[0]) && pps_list[i].name[0]) pps_list[i].name[0] += 'a'; */ /* read the pps type */ pps_list[i].type = *(s + 0x42); if (pps_list[i].type == 5) { assert (i == 0); *root = i; /* this pps is the root */ } /* read the others fields */ pps_list[i].previous = fil_sreadU32 (s + 0x44); pps_list[i].next = fil_sreadU32 (s + 0x48); pps_list[i].dir = fil_sreadU32 (s + 0x4c); pps_list[i].start = fil_sreadU32 (s + 0x74); pps_list[i].size = fil_sreadU32 (s + 0x78); pps_list[i].seconds1 = fil_sreadU32 (s + 0x64); pps_list[i].seconds2 = fil_sreadU32 (s + 0x6c); pps_list[i].days1 = fil_sreadU32 (s + 0x68); pps_list[i].days2 = fil_sreadU32 (s + 0x70); } /* NEXT IS VERBOSE verbose */ #ifdef VERBOSE { U32 i; printf ("before reorder pps tree\n"); printf ("pps type prev next dir start level size name\n"); for (i = 0; i < num_of_pps; i++) { if (!pps_list[i].name[0]) { printf (" -\n"); continue; } printf ("%08lx ", pps_list[i].ppsnumber); printf ("%d ", pps_list[i].type); printf ("%08lx ", pps_list[i].previous); printf ("%08lx ", pps_list[i].next); printf ("%08lx ", pps_list[i].dir); printf ("%08lx ", pps_list[i].start); printf ("%04x ", pps_list[i].level); printf ("%08lx ", pps_list[i].size); printf ("'%c", !isprint (pps_list[i].name[0]) ? ' ' : pps_list[i].name[0]); printf ("%s'\n", pps_list[i].name+1); } } #endif /* go through the tree made with pps entries, and reorder it so only the next link is used (move the previous-link-children to the last visited next-link-children) */ test_exitf (reorder_pps_tree (&pps_list[*root], 0), 9, ends ()); /* NEXT IS VERBOSE verbose */ #ifdef VERBOSE { U32 i; printf ("after reorder pps tree\n"); printf ("pps type prev next dir start level size name\n"); for (i = 0; i < num_of_pps; i++) { if (!pps_list[i].name[0]) { printf (" -\n"); continue; } printf ("%08lx ", pps_list[i].ppsnumber); printf ("%d ", pps_list[i].type); printf ("%08lx ", pps_list[i].previous); printf ("%08lx ", pps_list[i].next); printf ("%08lx ", pps_list[i].dir); printf ("%08lx ", pps_list[i].start); printf ("%04x ", pps_list[i].level); printf ("%08lx ", pps_list[i].size); printf ("'%c", !isprint (pps_list[i].name[0]) ? ' ' : pps_list[i].name[0]); printf ("%s\n", pps_list[i].name+1); } } /* NEXT IS VERBOSE verbose */ verbosePPSTree (pps_list, *root, 0); #endif /* generates pps real files */ /* NOTE: by this moment, the pps tree, wich is made with pps_list entries, is reordered */ verbose ("create pps files"); { U8 *Depot; FILE *OLEfile, *infile; U16 BlockSize, Offset; size_t bytes_to_read; U32 pps_size, pps_start; assert (num_of_pps >= 1); /* i < 1 --- before i < num_of_pps --- changed so not to generate the real files by now --- cole 2.0.0 */ /* may be later we can rewrite this code in order to only extract the sbfile, may be using __cole_extract_file call to avoid duplicated code --- cole 2.0.0 */ for (i = 0; i < 1; i++) { pps_list[i].filename[0] = 0; /* storage pps and non-valid-pps (except root) does not need files */ /* because FlashPix file format have a root of type 5 but with no name, we must to check if the non-valid-pps is root */ if (pps_list[i].type == 1 || (!pps_list[i].name[0] && pps_list[i].type != 5)) continue; /* pps that have level > max_level will not be extracted */ if (max_level != 0 && pps_list[i].level > max_level) continue; pps_size = pps_list[i].size; pps_start = pps_list[i].start; /* FIXME MARK 2 */ /* How we get sure pps_start doesn't point to a block bigger than the real file (input of sbfile) have? */ /* create the new file */ if (pps_list[i].type == 5) /* root entry, sbfile must be generated */ { if (SDepot == NULL) { /* if there are not small blocks, not generate sbfile */ *_sbfilename = NULL; *_sbfile = NULL; break; } assert (i == *root); assert (i == 0); /* tmpnam (sbfile) and next calls --- commented out so not to generate the real files by now --- sbfilename is stored in *_sbfilename instead --- cole 2.0.0 */ /* tmpnam (sbfilename); test_exitf (sbfilename[0], 7, ends ()); sbfile = OLEfile = fopen (sbfilename, "wb+"); test_exitf (OLEfile != NULL, 7, ends ()); verboseS (sbfilename); */ #if defined( __WIN32__ ) || defined( __BORLANDC__ ) *_sbfilename = (U8 *)malloc (TMPNAM_LEN); test_exitf (*_sbfilename != NULL, 10, ends ()); tmpnam (*_sbfilename); test_exitf (*_sbfilename[0], 7, ends ()); sbfile = OLEfile = fopen (*_sbfilename, "w+b"); #else { int ret; *_sbfilename = (U8 *)malloc (TMPNAM_LEN); test_exitf (*_sbfilename != NULL, 10, ends ()); strcpy(*_sbfilename, "/tmp/xlHtmlXXXXXX"); ret = mkstemp(*_sbfilename); if (ret == -1) { free(*_sbfilename); test_exitf (ret == -1, 7, ends ()); } sbfile = OLEfile = fdopen(ret, "w+b"); /* unlink() is called so this file deletes when we are done with it */ unlink(*_sbfilename); } #endif *_sbfile = sbfile; test_exitf (OLEfile != NULL, 7, ends ()); verboseS (*_sbfilename); } else /* other entry, save in a file */ { /* this branch is never executed now */ #if defined( __WIN32__ ) || defined( __BORLANDC__ ) tmpnam (pps_list[i].filename); test_exitf (pps_list[i].filename[0], 7, ends ()); verbose(pps_list[i].name + (!isprint(pps_list[i].name[0]) ? 1 : 0)); OLEfile = fopen (pps_list[i].filename, "wb"); #else int ret; strcpy(pps_list[i].filename, "/tmp/xlHtmlXXXXXX"); ret = mkstemp(pps_list[i].filename); test_exitf (ret == -1, 7, ends ()); OLEfile = fdopen(ret, "wb"); #endif test_exitf (OLEfile != NULL, 7, ends ()); verbose (pps_list[i].filename); } if (pps_size >= 0x1000 /*is in bbd */ || OLEfile == sbfile /*is root */ ) { /* read from big block depot */ Offset = 1; BlockSize = 0x0200; assert (input != NULL); assert (BDepot != NULL); infile = input; Depot = BDepot; } else { /* read from small block file */ Offset = 0; BlockSize = 0x40; assert (sbfile != NULL); assert (SDepot != NULL); infile = sbfile; Depot = SDepot; } /* -2 signed long int == 0xfffffffe unsinged long int */ while (pps_start != 0xfffffffeUL) { #ifdef VERBOSE printf ("reading pps %08lx block %08lx from %s\n", pps_list[i].ppsnumber, pps_start, Depot == BDepot ? "big block depot" : "small block depot"); #endif FilePos = (pps_start + Offset) * BlockSize; assert (FilePos >= 0); bytes_to_read = MIN ((U32)BlockSize, pps_size); fseek (infile, FilePos, SEEK_SET); fread (Block, bytes_to_read, 1, infile); test_exitf (!ferror (infile), 5, ends ()); fwrite (Block, bytes_to_read, 1, OLEfile); test_exitf (!ferror (infile), 5, ends ()); pps_start = fil_sreadU32 (Depot + (pps_start * 4)); pps_size -= MIN ((U32)BlockSize, pps_size); if (pps_size == 0) pps_start = 0xfffffffeUL; } if (OLEfile == sbfile) /* if small block file generated */ rewind (OLEfile); /* rewind because we will read it later */ /*else if (!fclose (OLEfile))*/ /* close the pps file */ /* don't know what to do here */ /*;*/ } /* if (sbfile != NULL) --- commented out so conservate sbfile open --- cole 2.0.0 */ /* if (sbfile != NULL) { fclose (sbfile); if (!remove (sbfilename)) ; sbfile = NULL; } */ } ends (); return 0; } /* reorder pps tree and write levels */ /* not sure if it is safe declare last_next_link_visited inside reorder_pps_tree function */ static U32 *last_next_link_visited; static int reorder_pps_tree (pps_entry * node, U16 level) { /* NOTE: in next, previous and dir link, 0xffffffff means point to nowhere (NULL) */ node->level = level; /* reorder subtrees, if there's any */ if (node->dir != 0xffffffffUL) { if (node->dir > num_of_pps || !pps_list[node->dir].name[0]) return 0; else if (!reorder_pps_tree (&pps_list[node->dir], (U16)(level + 1))) return 0; } /* reorder next-link subtree, saving the most next link visited */ if (node->next != 0xffffffffUL) { if (node->next > num_of_pps || !pps_list[node->next].name[0]) return 0; else if (!reorder_pps_tree (&pps_list[node->next], level)) return 0; } else last_next_link_visited = &node->next; /* move the prev child to the next link and reorder it, if there's any */ if (node->previous != 0xffffffffUL) { if (node->previous > num_of_pps || !pps_list[node->previous].name[0]) return 0; else { *last_next_link_visited = node->previous; node->previous = 0xffffffffUL; if (!reorder_pps_tree (&pps_list[*last_next_link_visited], level)) return 0; } } return 1; } /* verbose pps tree */ static void verbosePPSTree (pps_entry * pps_list, U32 start_entry, int level) { U32 entry; int i; #if __GNUC__ == 2 static char cff[] = "cole235711"; #define nextff(var) static void * nextff_var = (&nextff_var); \ nextff_var=&var; nextff (cff); #endif for (entry = start_entry; entry != 0xffffffffUL; entry = pps_list[entry].next) { if (pps_list[entry].type == 2) { for (i = 0; i < level * 3; i++) printf (" "); printf ("FILE %02x %8d '%c%s'\n", (int)pps_list[entry].ppsnumber, (int)pps_list[entry].size, !isprint((int)pps_list[entry].name[0]) ? ' ' : pps_list[entry].name[0], pps_list[entry].name+1); } else { for (i = 0; i < level * 3; i++) printf (" "); printf ("DIR %02x '%c%s'\n", (int)pps_list[entry].ppsnumber, !isprint((int)pps_list[entry].name[0]) ? ' ' : pps_list[entry].name[0], pps_list[entry].name+1); verbosePPSTree (pps_list, pps_list[entry].dir, level + 1); } } } /* closeOLEtreefiles --- outdated because not to generate the real files by now --- cole 2.0.0 */ /* #define freeNoNULL(x) { if ((x) != NULL) free (x); } static int errorClosingTreeFiles; void closeOLEtreefiles (pps_entry * tree, U32 root) { #ifdef VERBOSE printf ("Visiting entry 0x%08lx to erase file\n", tree[root].ppsnumber); #endif if (tree[root].previous != 0xffffffffUL) closeOLEtreefiles (tree, tree[root].previous); if (tree[root].next != 0xffffffffUL) closeOLEtreefiles (tree, tree[root].next); if (tree[root].type != 2 && tree[root].dir != 0xffffffffUL) { #ifdef VERBOSE printf ("Going down to directory 0x%08lx to erase files\n", tree[root].dir); #endif closeOLEtreefiles (tree, tree[root].dir); } else if (tree[root].type == 2) if (!remove (tree[root].filename)) { #ifdef VERBOSE printf ("Success removing %s\n", tree[root].filename); #endif } else { #ifdef VERBOSE printf ("Failed to remove %s\n", tree[root].filename); #endif errorClosingTreeFiles = 1; } } */ /* freeOLEtree is now useless: it only free tree -- cole 2.0.0 */ /* Free all the memory allocated in the tree. Output: 0 = Sucess. . 6 = Error removing some temporal stream files. */ /* int freeOLEtree (pps_entry * tree); */ /* int freeOLEtree (pps_entry * tree) { */ /* errorCloseingTreeFiles --- doesn't exists because closeOLEtreefiles was outdated because not to generate the real files by now --- cole 2.0.0 */ /* errorClosingTreeFiles = 0; */ /* if (tree != NULL) { */ /* closeOLEtreefiles --- outdated because not to generate the real files by now --- cole 2.0.0 */ /* closeOLEtreefiles (tree, 0); */ /* free (tree); } */ /* errorCloseingTreeFiles --- doesn't exists because closeOLEtreefiles was outdated because not to generate the real files by now --- cole 2.0.0 */ /*return*/ /* errorClosingTreeFiles ? 6 : */ /*0;*/ /*}*/ /* free memory used (except the pps tree) */ #define freeNoNULL(x) { if ((x) != NULL) free (x); } static void ends (void) { /* if (input != NULL) and next lines --- commented out so conservate input file open --- cole 2.0.0 */ /* if (input != NULL) fclose (input); */ freeNoNULL (Block); freeNoNULL (Blockx); /* freeNoNULL (BDepot) and next line --- commented out so conservate depots --- cole 2.0.0 */ /* freeNoNULL (BDepot); freeNoNULL (SDepot); */ freeNoNULL (Root); freeNoNULL (sbd_list); freeNoNULL (root_list); /* if (sbfile != NULL) and next lines --- commented out so conservate sbfile open --- cole 2.0.0 */ /* if (sbfile != NULL) { fclose (sbfile); if (!remove (sbfilename)) ; } */ } #undef VERBOSE xlhtml/cole/support.c0100644000076400007640000000730207466770232015344 0ustar jackshckjackshck/* Support - Provides some big and little endian abstraction functions, besides another things. Copyright (C) 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ /* Some code was from Caolan, but I have replaced all the code, now all code here is mine, so I changed copyright announce in cole-1.0.0. Arturo Tena */ #include #include "support.h" U16 fil_sreadU16 (U8 * in) { return (in[1] << 8) | in[0]; } U32 fil_sreadU32 (U8 * in) { U32 i0 = in[0], i1 = in[1], i2 = in[2], i3 = in[3]; return (i3 << 24) | (i2 << 16) | (i1 << 8) | i0; } F64 fil_sreadF64 (U8 * in) { F64 ret; #ifdef WORDS_BIGENDIAN *( ((U8*)(&ret)) + 7 ) = *in; *( ((U8*)(&ret)) + 6 ) = *(in+1); *( ((U8*)(&ret)) + 5 ) = *(in+2); *( ((U8*)(&ret)) + 4 ) = *(in+3); *( ((U8*)(&ret)) + 3 ) = *(in+4); *( ((U8*)(&ret)) + 2 ) = *(in+5); *( ((U8*)(&ret)) + 1 ) = *(in+6); *( (U8*)(&ret) ) = *(in+7); #else /* !WORDS_BIGENDIAN */ memcpy (&ret, in, 8); #endif return ret; } void fil_swriteU16 (U8 * dest, U16 * src) { #ifdef WORDS_BIGENDIAN *(dest) = *(((U8*)src)+1); *(dest+1) = *((U8*)src); #else /* !WORDS_BIGENDIAN */ *(dest) = *((U8*)src); *(dest+1) = *(((U8*)src)+1); #endif } void fil_swriteU32 (U8 * dest, U32 * src) { #ifdef WORDS_BIGENDIAN fil_swriteU16 (dest, ( U16* )( ((U8*)src)+2 ) ); fil_swriteU16 (dest+2, (U16*)src); #else /* !WORDS_BIGENDIAN */ fil_swriteU16 (dest, (U16*)src); fil_swriteU16 (dest+2, ( U16* )( ((U8*)src)+2 ) ); #endif } /*-* @func (void) __cole_dump dump the content of memory @param (void *) m memory position which content will be dumped @param (void *) start memory position from where calculate offset @param (int) length size in bytes of the dumped memory @param (char *) msg optional message, can be NULL *-*/ void __cole_dump (void *_m, void *_start, int length, char *msg) { unsigned char * pm; char buff[18]; long achar; unsigned char * m; unsigned char * start; if (_m == NULL) { printf ("VERBOSE: can't dump because m is NULL\n"); return; } if (_start == NULL) { printf ("VERBOSE: can't dump because start is NULL\n"); return; } m = (unsigned char *)_m; start = (unsigned char *)_start; buff[8] = '-'; buff[17] = 0; if (msg != NULL) printf ("VERBOSE: %s (from 0x%08tx length 0x%08x (%d)):\n", msg, m - start, length, length); for (pm = m; pm - m < length; pm++) { achar = (pm - m) % 16; /* print offset */ if (achar == 0) printf ("%08tx ", (pm - m) + (m - start)); /* write char in the right column buffer */ buff[achar + (achar < 8 ? 0 : 1)] = (char)((isprint (*pm) ? *pm : '.')); /* print next char */ if (! ((pm - m + 1) % 16)) /* print right column */ printf ("%02x %s\n", *pm, buff); else if (! ((pm - m + 1) % 8)) printf ("%02x-", *pm); else printf ("%02x ", *pm); } achar = (pm - m) % 16; if (achar) { int i; for (i = 0; i < (16 - achar) * 3 - 1; i++) printf (" "); if (achar != 8) buff [achar] = 0; printf (" %s\n", buff); } } xlhtml/cole/support.h0100644000076400007640000001621707446125571015354 0ustar jackshckjackshck/* Support - Provides some big and little endian abstraction functions. Copyright (C) 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ /* Some code was from Caolan, but I have replaced all the code, now all code here is mine, so I changed copyright announce in cole-1.0.0. Arturo Tena */ #ifndef COLE_SUPPORT_H #define COLE_SUPPORT_H #ifdef __cplusplus extern "C" { #endif #include #include #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* F32 */ #if SIZEOF_FLOAT == 4 #define F32 float #elif SIZEOF_DOUBLE == 4 #define F32 double #elif SIZEOF_LONG_DOUBLE == 4 #define F32 long double #else #error No 4 byte length float type found. #endif /* F64 */ #if SIZEOF_DOUBLE == 8 #define F64 double #elif SIZEOF_LONG_DOUBLE == 8 #define F64 long double #else #error No 8 byte length float type found. #endif /* U8 */ #if SIZEOF_UNSIGNED_CHAR == 1 #define U8 unsigned char #else #error No 1 byte length type found. #error Char is not a byte! Mmmh... maybe you need another compiler. #endif /* U16 */ #if SIZEOF_UNSIGNED_INT == 2 #define U16 unsigned int #elif SIZEOF_UNSIGNED_SHORT == 2 #define U16 unsigned short #elif SIZEOF_UNSIGNED_LONG == 2 #define U16 unsigned long #else #error No 2 byte length type found. #endif /* S16 */ #if SIZEOF_UNSIGNED_INT == 2 #define S16 signed int #elif SIZEOF_UNSIGNED_SHORT == 2 #define S16 signed short #elif SIZEOF_UNSIGNED_LONG == 2 #define S16 signed long #else #error No 2 byte length type found. #endif /* U32 */ #if SIZEOF_UNSIGNED_LONG == 4 #define U32 unsigned long #elif SIZEOF_UNSIGNED_INT == 4 #define U32 unsigned int #elif SIZEOF_UNSIGNED_LONG_LONG == 4 #define U32 unsigned long long #else #error No 4 byte length type found. #endif /* S32 */ #if SIZEOF_UNSIGNED_LONG == 4 #define S32 signed long #elif SIZEOF_UNSIGNED_INT == 4 #define S32 signed int #elif SIZEOF_UNSIGNED_LONG_LONG == 4 #define S32 signed long long #else #error No 4 byte length type found. #endif #else /* Borland or Wintel constants */ #define F32 float #define F64 double #define U8 unsigned char #define U16 unsigned short #define S16 signed short #define U32 unsigned long #define S32 signed long #endif U16 fil_sreadU16 (U8 * in); U32 fil_sreadU32 (U8 * in); F64 fil_sreadF64 (U8 * in); void fil_swriteU16 (U8 * dest, U16 * src); void fil_swriteU32 (U8 * dest, U32 * src); void __cole_dump (void *_m, void *_start, int length, char *msg); #define verbose_return() \ { \ verbose_wonl ("returning from "); \ verbose_wonl (__FILE__); \ verbose_wonl (":"); \ verbose_d (__LINE__); \ } #define test(t,retval) \ { \ if (!(t)) \ { \ verbose_return (); \ return retval; \ } \ } #define test_exitf(t,retval,func) \ { \ if (!(t)) \ { \ func; \ verbose_return (); \ return (retval); \ } \ } #define test_call(t,typeretval) \ { \ typeretval retval; \ retval = (t); \ if (retval) \ { \ verbose_return () \ return (retval); \ } \ } #define test_call_exitf(t,typeretval,func) \ { \ typeretval retval; \ retval = (t); \ if (retval) \ { \ func; \ verbose_return () \ return (retval); \ } \ } #define report_bug(prog) \ { \ fprintf (stderr, #prog": A bug have been found: %s:%d\n"#prog \ ":Please, download a most recent version and try again\n", \ __FILE__, __LINE__); \ } #define assert_return(prog,t,retval) \ { \ if (!(t)) \ { \ fprintf (stderr, #prog": Condition "#t" is not valid: %s:%d\n", \ __FILE__, __LINE__); \ report_bug (prog); \ return (retval); \ } \ } #ifdef VERBOSE #define verbose_d(n) { printf ("%d\n", n); } #define verbose(s) { puts(s); } #define verbose_wonl(s) { printf (s); } #define verboseU8(expr) { printf (#expr " = 0x%02x\n", expr); } #define verboseU16(expr) { printf (#expr " = 0x%04x\n", expr); } #define verboseU32(expr) { printf (#expr " = 0x%08x\n", expr); } #define verboseS(expr) { printf (#expr " = %s\n", expr); } #define verboseS_wonl(expr) { printf (#expr " = %s", expr); } #define warning(t) { if (!(t)) printf ("warning: %s is false\n", #t); } #else /* ifndef VERBOSE */ #define verbose_d(n) ; #define verbose(s) ; #define verbose_wonl(s) ; #define verboseU8(expr) ; #define verboseU16(expr) ; #define verboseU32(expr) ; #define verboseS(expr) #define verboseS_wonl(expr) #define warning(t) #endif /* ifdef VERBOSE */ #ifdef VERBOSE #define verboseU32Array(array,len) \ { \ U32 temp; \ for (temp = 0; temp < len; temp++) \ printf (#array "[%lu] = 0x%08lx\n", temp, array [temp]); \ } #else #define verboseU32Array(array,len) #endif #define verboseU8Array_force(rec,len,reclen) \ __cole_dump ((rec), (rec), ((len)*(reclen)), ""); #ifdef VERBOSE #define verboseU8Array(rec,len,reclen) verboseU8Array_force(rec,len,reclen) #else #define verboseU8Array(rec,len,reclen) #endif #ifdef __cplusplus } #endif #endif /* COLE_SUPPORT_H */ xlhtml/cole/version.c.in0100644000076400007640000000076507446125571015726 0ustar jackshckjackshck#ifndef __BORLANDC__ int cole_major_version = @COLE_MAJOR@; int cole_minor_version = @COLE_MINOR@; int cole_micro_version = @COLE_MICRO@; char * cole_version = "@COLE_MAJOR@.@COLE_MINOR@.@COLE_MICRO@"; char * cole_host_info = "@HOST_ALIAS_NAME@ (@HOST_CANONICAL_NAME@): @HOST_CPU@, @HOST_VENDOR@, @HOST_OS@"; #else int cole_major_version = 2; int cole_minor_version = 0; int cole_micro_version = 1; char * cole_version = "2.0.1"; char * cole_host_info = "BORLANDC (Windows): i386, GPL, Win32"; #endif xlhtml/cole/examples/0040755000076400007640000000000007473177126015304 5ustar jackshckjackshckxlhtml/cole/examples/CVS/0040755000076400007640000000000007473177126015737 5ustar jackshckjackshckxlhtml/cole/examples/CVS/Root0100644000076400007640000000006307473177125016600 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/examples/CVS/Repository0100644000076400007640000000002507473177125020032 0ustar jackshckjackshckxlhtml/cole/examples xlhtml/cole/examples/CVS/Entries0100644000076400007640000000123207473177126017266 0ustar jackshckjackshck/Makefile.am/1.1.1.1/Wed Mar 20 15:32:27 2002// /Makefile.in/1.1.1.1/Wed Mar 20 15:32:28 2002// /README-examples/1.1.1.1/Wed Mar 20 15:32:28 2002// /demo.c/1.1.1.1/Wed Mar 20 15:32:28 2002// /directory.c/1.1.1.1/Wed Mar 20 15:32:28 2002// /file.c/1.1.1.1/Wed Mar 20 15:32:29 2002// /filesystem.c/1.1.1.1/Wed Mar 20 15:32:29 2002// /present.sdd/1.1.1.1/Wed Mar 20 15:32:30 2002// /sprsheet.sdc/1.1.1.1/Wed Mar 20 15:32:31 2002// /sprsheet.xls/1.1.1.1/Wed Mar 20 15:32:32 2002// /text.doc/1.1.1.1/Wed Mar 20 15:32:40 2002// /text.sdw/1.1.1.1/Wed Mar 20 15:32:41 2002// /topsrcdir.h.in/1.1.1.1/Wed Mar 20 15:32:41 2002// /version.c/1.1.1.1/Wed Mar 20 15:32:41 2002// D xlhtml/cole/examples/Makefile.am0100644000076400007640000000047407446125613017334 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in EXTRA_DIST = present.sdd sprsheet.sdc sprsheet.xls text.doc text.sdw \ README-examples INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libcole.la TESTS = filesystem directory file version noinst_PROGRAMS = filesystem directory file demo version xlhtml/cole/examples/Makefile.in0100644000076400007640000002323107446125614017342 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ DLLTOOL = @DLLTOOL@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ VERSION = @VERSION@ VERSION_INFO = @VERSION_INFO@ EXTRA_DIST = present.sdd sprsheet.sdc sprsheet.xls text.doc text.sdw README-examples INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libcole.la TESTS = filesystem directory file version noinst_PROGRAMS = filesystem directory file demo version mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = topsrcdir.h PROGRAMS = $(noinst_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ filesystem_SOURCES = filesystem.c filesystem_OBJECTS = filesystem.o filesystem_LDADD = $(LDADD) filesystem_DEPENDENCIES = $(top_builddir)/libcole.la filesystem_LDFLAGS = directory_SOURCES = directory.c directory_OBJECTS = directory.o directory_LDADD = $(LDADD) directory_DEPENDENCIES = $(top_builddir)/libcole.la directory_LDFLAGS = file_SOURCES = file.c file_OBJECTS = file.o file_LDADD = $(LDADD) file_DEPENDENCIES = $(top_builddir)/libcole.la file_LDFLAGS = demo_SOURCES = demo.c demo_OBJECTS = demo.o demo_LDADD = $(LDADD) demo_DEPENDENCIES = $(top_builddir)/libcole.la demo_LDFLAGS = version_SOURCES = version.c version_OBJECTS = version.o version_LDADD = $(LDADD) version_DEPENDENCIES = $(top_builddir)/libcole.la version_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in topsrcdir.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = filesystem.c directory.c file.c demo.c version.c OBJECTS = filesystem.o directory.o file.o demo.o version.o all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status topsrcdir.h: $(top_builddir)/config.status topsrcdir.h.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: filesystem: $(filesystem_OBJECTS) $(filesystem_DEPENDENCIES) @rm -f filesystem $(LINK) $(filesystem_LDFLAGS) $(filesystem_OBJECTS) $(filesystem_LDADD) $(LIBS) directory: $(directory_OBJECTS) $(directory_DEPENDENCIES) @rm -f directory $(LINK) $(directory_LDFLAGS) $(directory_OBJECTS) $(directory_LDADD) $(LIBS) file: $(file_OBJECTS) $(file_DEPENDENCIES) @rm -f file $(LINK) $(file_LDFLAGS) $(file_OBJECTS) $(file_LDADD) $(LIBS) demo: $(demo_OBJECTS) $(demo_DEPENDENCIES) @rm -f demo $(LINK) $(demo_LDFLAGS) $(demo_OBJECTS) $(demo_LDADD) $(LIBS) version: $(version_OBJECTS) $(version_DEPENDENCIES) @rm -f version $(LINK) $(version_LDFLAGS) $(version_OBJECTS) $(version_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = examples distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done check-TESTS: $(TESTS) @failed=0; all=0; \ srcdir=$(srcdir); export srcdir; \ for tst in $(TESTS); do \ if test -f $$tst; then dir=.; \ else dir="$(srcdir)"; fi; \ if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \ all=`expr $$all + 1`; \ echo "PASS: $$tst"; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="$$failed of $$all tests failed"; \ fi; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes"; \ test "$$failed" -eq 0 info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-noinstPROGRAMS distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir check-TESTS \ info-am info dvi-am dvi check check-am installcheck-am installcheck \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/cole/examples/README-examples0100644000076400007640000000050407446125614017767 0ustar jackshckjackshck present.sdd - StarOffice 5.0 presentation. sprsheet.sdc - StarOffice 5.0 spreadsheet. sprsheet.xls - Microsoft Excel 95 spreadsheet. text.sdw - StarOffice 5.0 text. All the files above was generated using the free StarOffice 5.0 Personal Edition. text.doc - Microsoft Word 97 text with an incrusted image. xlhtml/cole/examples/demo.c0100644000076400007640000000742107446125614016370 0ustar jackshckjackshck/* cole - A free C OLE library. cole using sample. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include /* To compile this file outside cole source tree, you must include here instead */ #include #define PRGNAME "demo" #define BUFFER_SIZE 128 int main (int argc, char **argv) { COLEFS * cfs; COLEDIR * cd; COLEDIRENT * cde; COLEFILE * cf; COLERRNO colerrno; char * entry_name; char buffer[BUFFER_SIZE]; size_t char_read; size_t char_read_total; if (argc != 2) { fprintf (stderr, "cole demo. cole is a free C OLE library.\n" "Usage: demo \n"); return 1; } /* * version info */ printf ("Version info: (%d.%d.%d) (%d.%d.%d) (%s)\n", COLE_MAJOR_VERSION, COLE_MINOR_VERSION, COLE_MICRO_VERSION, cole_major_version, cole_minor_version, cole_micro_version, cole_version); printf ("Host info: (%s)\n", cole_host_info); cfs = cole_mount (argv[1], &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } if (cole_print_tree (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } cd = cole_opendir_rootdir (cfs, &colerrno); if (cd == NULL) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } for (cde = cole_visiteddirentry (cd); cde != NULL; cde = cole_nextdirentry (cd)) { if (cole_direntry_isdir (cde)) printf ("DIR "); else if (cole_direntry_isfile (cde)) { printf ("FILE "); /* open the file using their direntry */ cf = cole_fopen_direntry (cde, &colerrno); if (cf == NULL) { cole_perror ("travel", colerrno); cole_closedir (cd, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_fclose (cf, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_closedir (cd, NULL); cole_umount (cfs, NULL); exit (1); } } else printf ("???? "); printf ("%7u ", cole_direntry_getsize (cde)); entry_name = cole_direntry_getname (cde); printf ("%08lx-%08lx %08lx-%08lx\t", cole_direntry_getdays1 (cde), cole_direntry_getsec1 (cde), cole_direntry_getdays2 (cde), cole_direntry_getsec2 (cde)); if (!isprint ((int)entry_name[0])) printf ("'\\x%02x%s'\n", entry_name[0], entry_name+1); else printf ("'%s'\n", entry_name); } if (cole_closedir (cd, &colerrno)) { cole_umount (cfs, NULL); exit (1); } cf = cole_fopen (cfs, "\005SummaryInformation", &colerrno); if (cf == NULL) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } char_read_total = 0; printf ("Reading: "); while ((char_read = cole_fread (cf, buffer, BUFFER_SIZE, &colerrno))) { printf ("[%d]", char_read); char_read_total += char_read; } cole_perror (PRGNAME, colerrno); printf ("\nRead %d bytes from the stream '\\005SummaryInformation'\n", char_read_total); if (cole_fclose (cf, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit (1); } exit (0); } xlhtml/cole/examples/directory.c0100644000076400007640000000541207446125614017446 0ustar jackshckjackshck/* cole - A free C OLE library. cole test. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include #include #include /* MISSING TO TEST: cole_opendir_direntry cole_dir_getname cole_dir_getsize cole_dir_getdays1 cole_dir_getsec1 cole_dir_getdays2 cole_dir_getsec2 */ #define PRGNAME "directory" int main (int argc, char **argv) { COLEFS * cfs; COLEDIR * cd; COLEDIRENT * cde; COLEFILE * cf; char * entry_name; COLERRNO colerrno; cfs = cole_mount (COLE_TOPSRCDIR"/examples/text.doc", &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } cd = cole_opendir_rootdir (cfs, &colerrno); if (cd == NULL) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } for (cde = cole_visiteddirentry (cd); cde != NULL; cde = cole_nextdirentry (cd)) { if (cole_direntry_isdir (cde)) printf ("DIR "); else if (cole_direntry_isfile (cde)) { printf ("FILE"); /* open the file using their direntry */ cf = cole_fopen_direntry (cde, &colerrno); if (cf == NULL) { cole_perror ("travel", colerrno); cole_closedir (cd, NULL); cole_umount (cfs, NULL); exit (1); } /* Here we process cf */ if (cole_fclose (cf, &colerrno)) { cole_perror ("travel", colerrno); cole_closedir (cd, NULL); cole_umount (cfs, NULL); exit (1); } } else printf ("????"); printf (" %7u", cole_direntry_getsize (cde)); entry_name = cole_direntry_getname (cde); if (!isprint ((int)entry_name[0])) printf ("' \\x%02x%s'", entry_name[0], entry_name+1); else printf ("'%s'", entry_name); printf ("\t%08lx-%08lx %08lx-%08lx", cole_direntry_getdays1 (cde), cole_direntry_getsec1 (cde), cole_direntry_getdays2 (cde), cole_direntry_getsec2 (cde)); printf ("\n"); } if (cole_closedir (cd, &colerrno)) { cole_perror ("travel", colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } exit (0); } xlhtml/cole/examples/file.c0100644000076400007640000001123607446125615016363 0ustar jackshckjackshck/* cole - A free C OLE library. cole test. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include #include /* cole_fopen_direntry is tested in `directory.c' */ #define PRGNAME "file" #define BUFFER_SIZE 128 #define FILENAME2_SIZE 108004 int main (int argc, char **argv) { COLEFS * cfs; COLEFILE * cf; COLERRNO colerrno; char buffer[BUFFER_SIZE]; size_t char_read; size_t char_read_total; char *filename2 = "/ObjectPool/_994231763/\001Ole10Native"; char *filename2_pretty = "/ObjectPool/_994231763/\\001Ole10Native"; cfs = cole_mount (COLE_TOPSRCDIR"/examples/text.doc", &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } cf = cole_fopen (cfs, filename2, &colerrno); if (cf == NULL) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } printf ("File size: %d\n", cole_fsize (cf)); if (cole_fsize (cf) != FILENAME2_SIZE) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); char_read_total = 0; while ((char_read = cole_fread (cf, buffer, BUFFER_SIZE, &colerrno))) char_read_total += char_read; cole_perror (PRGNAME, colerrno); printf ("File position: %d\n", cole_ftell (cf)); printf ("Read %d bytes from the stream `%s'\n", char_read_total, filename2_pretty); if (cole_frewind (cf, &colerrno)) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_ftell (cf) != 0) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_fseek (cf, 0, COLE_SEEK_END, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_ftell (cf) != FILENAME2_SIZE) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_fseek (cf, 200, COLE_SEEK_END, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_ftell (cf) != FILENAME2_SIZE - 200) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_fseek (cf, 100, COLE_SEEK_FORWARD, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_ftell (cf) != FILENAME2_SIZE - 200 + 100) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_fseek (cf, 200, COLE_SEEK_BACKWARD, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_ftell (cf) != FILENAME2_SIZE - 200 + 100 - 200) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (!cole_fseek (cf, FILENAME2_SIZE + 1, COLE_SEEK_SET, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_fseek (cf, FILENAME2_SIZE, COLE_SEEK_END, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } if (cole_ftell (cf) != 0) { fprintf (stderr, "Test failed\n"); cole_fclose (cf, NULL); cole_umount (cfs, NULL); exit (1); } printf ("File position: %d\n", cole_ftell (cf)); if (cole_fclose (cf, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit (1); } exit (0); } xlhtml/cole/examples/filesystem.c0100644000076400007640000000435507446125615017634 0ustar jackshckjackshck/* cole - A free C OLE library. cole test. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include #include #define PRGNAME "filesystem" /* To test cole_locate_filename() */ struct str_info { char *name; size_t size; }; COLE_LOCATE_ACTION_FUNC check_size; int main (int argc, char **argv) { COLEFS * cfs; COLERRNO colerrno; /* To test cole_locate_filename() */ #define FILENAME "/ObjectPool/_994231763/\001Ole10Native" struct str_info info = { FILENAME, 108004 }; cfs = cole_mount (COLE_TOPSRCDIR"/examples/text.doc", &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } if (cole_print_tree (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_locate_filename (cfs, FILENAME, &info, check_size, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_recurse_tree (cfs, NULL, NULL, NULL, NULL, NULL, NULL, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } exit (0); } /* To test cole_locate_filename() */ void check_size (COLEDIRENT *cde, void *_info) { struct str_info *info = (struct str_info *)_info; if (info->size != cole_direntry_getsize (cde)) printf ("SIZE OF `%s' DOESN'T CHECK!\n", info->name); else printf ("Size of `%s' is ok\n", info->name); } xlhtml/cole/examples/present.sdd0100644000076400007640000005100007446125616017446 0ustar jackshckjackshckÐÏࡱá;þÿ %þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿþÿÿÿþÿÿÿ þÿÿÿ !"#$þÿÿÿ&'þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿ þÿÿÿþÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿ ÿÿÿÿ!r\V¼…щЀ)ä°± PresentationStarImpress 5.0äêÿÿ>þÿÿ{… SSfxDocumentInfo  Arturo Tena ¯ã0(_ Arturo Tena ¯ã0(_ uKô Info 0 Info 1 Info 2 Info 3 ¯ã0Ø–XL<TASK,0,1 1,0,100,1,þÿà…ŸòùOh«‘+'³Ù0 h t € Œ ˜¤¸ÌØäðü2@€ Ä}@pšJ2@˃ÍC5¾@˃ÍC5¾ Arturo Tena Arturo Tena»»ÿÿäXOutdevItemPool 1èèéêëìíîïðñòóôõö÷øùúûüý   è)èéêëìíîïðñùúûüýþ     &'()*+,-./06789:;UVWXYZ[\]ècèéêëìíîïðñòóôõö÷øùúûüýþÿ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstètèéêëìíîïðñòóôõö÷øùúûüýþÿ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef”•–—˜™š›œžŸ ¡dîìŸ0\t¹'è@qXXº'é,@­ÿÿÿÿX»'ê.@ß–2XXX¼'ë @ÿÿÿÿ€X½'ìž@µÿÿÿÿArrowÿÿÿÿ ArrowÿÿÿÿdÈdXXXS¾'íc@(ÿÿÿÿArrowÿÿÿÿdÈdXX¿'î.@^,¼ÈXXXÀ'ï"@,ÈXXÁ'ð@¸XXÂ'ñ@ÛXòò @õóó @ ôô @!õõ @7öö @M÷÷ @cøø @y´'ú@›XXµ'ûb@ÿÿÿÿ€¸¸ÿÿÿÿÿÿ€€€€€ÿÿÿÿ€ÿÿÌÌ™™ÿÿÿÿ€ÿÿÿÿÿÿXX X2XD¶'ü6@Oÿÿÿÿÿÿÿÿÿÿ22ddX·'ý(@ƒÿÿÿÿX¸'þ"@±ÿÿÿÿBMvv(@@SDÄ@x^íSI Ã0 ô¯sŒ½å\è zéüÿ ª–46•Z…Bn›8x‘Ç)1²Ì”³.<è§”B+ï Ì„¨ Þ¢Ï40:prf š‡·í|q±ìüâÊ]~½+Háë•~|ðWíF¼ðúúMñbÀöž þâPÙ@úaüoÌCÄ“Ø[½È¡z¼6~U{Û߃<ª½Õ?¥†ü–{¿rü=+Îý÷ô—|´¨ý•¿.©MåÛxò³åG¦ Ü«±Xÿÿ @Ë @á @÷ @  @#  @9  @O  @e  @{  @‘   @§   @½   @Ó   @é   @ÿ  @  @+  @A  @W  @m  @ƒ  @™  @¯  @Å ;(+@å XX,, @ ÿÿÿÿ€€€€€€€X--"@? ,ÈXX.."@m ,ÈXX// @‹ 00 @¡ 11 @· 22 @Í 33 @ã 44 @ù 55 @ 66 @% II @; JJ:@q  Rh%…)XXXX&KK@¡ XX(L @¿ MM @Õ NN @ë OO @ PP @ QQ@3 XRR @M SS @c TT @y UU@” XVV@º XXWW @Ø XX @î YY @ZZ @[[ @0\\ @F]] @\__ @r`` @ˆaa @žbb @´cc @Êdd @àee @öùùX@Bè¹'è¹'ë¼'XXX X&X,X2j@¸ú´'ûµ'ûµ'ûµ'ú´'ûµ'XXX&X,X8XD**<@XXXX X&77<@LXXXX X&HHR@¦£+'£+'XXX X,X2X8ffª@XQQVVJJKKQQVVJJKKJJKKJJJJKKUUVVXXX&XDXVXhXt8pªÖ€ï)Wž´Êàö "8bÐFtŠ ¶Ìâø$:Pf|’¨¾Ôê,BXn„¬Ø4J`vŒ¢¸Îäú@ h ~ ” ª À Ö ö " 8 W — ­ à ٠ï   1 G ] s ‰ Ÿ µ  ×  } Pò% EditEngineItemPool¤ ¬Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f0u6'› @Üœœ @ò ð@ Æxdddx˜ddd˜¸ ddd¸ ØdddØødddøddd8ddd8XdddXxdddx ˜!ddd˜!XX!X4XGXZXmX€X“X¦X¹<(ž@ X (Ÿò@ì€StarBats°!"K€StarBats°!"K€StarBats°!"K€StarBats°!r7€Starbats°$rK€StarbatsR$=K€Starbats¼$;K€Starbats¼$AKXXGX€X¹XòX+XdX@'  @ dddddXddÈddÈxdddx˜ddd˜¸ ddd¸ ØdddØødddøddd 8ddd8 XdddX xdddxXX!X4XGXZXmX€X“X¦X¹XÌXßA'¡Š@¬dddddd¤dÒddôdddd,ddÈddddXXX&X2X>XJXVXb1'¢@ídÈX+'£(@XXX'¤ @;!'¥@] €X'¦@‡ timesX'§ ¤@ Nd 4d d öd {d îd §d hd Ûd Ád d XXX"X,X6X@XJXTX^XhXr?(¨ @Q'©@q XX'ª@” X'«@³ X'¬@× XX'­@ú X'®@ X%'¯ @3S'° @I"'± @_'² @u$:6VT~9mƒ©Óƒ™Áàÿ'Fe{‘§BP!'¥€'¦times'§Od .~2p *õ)StandardStandard¾é!è¹'éº'ê»'ë¼'ì½'í¾'î¿'ïÀ'ðÁ'ñÂ'ú´'ûµ'ü¶'ý·'þ¸'+;(,,--..Ÿ ( @'¡A'¢1'£+'¥!'¦'§'©'ª'«'¬'­'®'Object with arrowStandardObject with arrow¿éè¹'ê»'ë¼'ì½'î¿'ïÀ'ðÁ'Object with shadowStandardObject with shadowÀé+;(,,--..Object without fillStandardObject without fillÁéú´'TextStandardTextÂéè¹'ú´' Text bodyStandard Text bodyÃéè¹'ú´'§'Text body justfiedStandardText body justfiedÄéè¹'ú´'£+'First line indentStandardFirst line indentÅéè¹'ú´' @'TitleStandardTitleÆéè¹'ú´'§'Title1StandardTitle1Çé è¹'ú´'ûµ'+;(,,--..£+'§'Title2StandardTitle2Èé ê»'ûµ'+;(,,--.. @'¡A'£+'§'HeadingStandardHeadingÉéè¹'ú´'¡A'§'Heading1StandardHeading1Êéè¹'ú´'¡A'§'©'Heading2StandardHeading2Ëéè¹'ú´'¡A'§'©'¬'Dimension LineStandardDimension LineÌéè¹'ì½'í¾'î¿'ïÀ'ú´'§'Home~LT~Gliederung 1Home~LT~Gliederung 1þ¯ÿÿÏé Ÿ ( @'¡A'£+'¥!'¦'§'©'ª'«'¬'­'®'Home~LT~Gliederung 2Home~LT~Gliederung 1Home~LT~Gliederung 2þ¯ÿÿÐéŸ ( @'¡A'§'Home~LT~Gliederung 3Home~LT~Gliederung 2Home~LT~Gliederung 3þ¯ÿÿÑéŸ ( @'¡A'§'Home~LT~Gliederung 4Home~LT~Gliederung 3Home~LT~Gliederung 4þ¯ÿÿÒé @'¡A'§' Home~LT~Gliederung 5Home~LT~Gliederung 4Home~LT~Gliederung 5þ¯ÿÿÓé @'¡A'§' Home~LT~Gliederung 6Home~LT~Gliederung 5Home~LT~Gliederung 6þ¯ÿÿÔé @'¡A'§' Home~LT~Gliederung 7Home~LT~Gliederung 6Home~LT~Gliederung 7þ¯ÿÿÕé @' ¡A'§' Home~LT~Gliederung 8Home~LT~Gliederung 7Home~LT~Gliederung 8þ¯ÿÿÖé @' ¡A'§' Home~LT~Gliederung 9Home~LT~Gliederung 8Home~LT~Gliederung 9þ¯ÿÿ×é @' ¡A'§' Home~LT~Titel Home~LT~Titelþ¯ÿÿÍéè¹'ú´'QQŸ (£+'¥!'¦'§' ©'ª'«'¬'­'®'Home~LT~UntertitelHome~LT~Gliederung 1Home~LT~Untertitelþ¯ÿÿÝéQQ @'£+'Home~LT~NotizenHome~LT~Notizenþ¯ÿÿÚé è¹'ú´'¥!'¦'§'©'ª'«'¬'­'®'Home~LT~HintergrundobjekteHome~LT~Hintergrundobjekteþ¯ÿÿØé+;(,,--..Home~LT~HintergrundHome~LT~Hintergrundþ¯ÿÿÙéè¹'ú´'TitleTitle@ÍéBackground objectsBackground objects@Øé Background Background@ÙéNotesNotes@Úé Outline 1 Outline 1@Ïé Outline 2 Outline 1 Outline 2@Ðé Outline 3 Outline 2 Outline 3@Ñé Outline 4 Outline 3 Outline 4@Òé Outline 5 Outline 4 Outline 5@Óé Outline 6 Outline 5 Outline 6@Ôé Outline 7 Outline 6 Outline 7@Õé Outline 8 Outline 7 Outline 8@Öé Outline 9 Outline 8 Outline 9@×éühÄDˆÞ2nÐ8~Ì †€ìR¸„êP Ö 8 °  ^ € ¼ è 4 g š Í 3 f ™ DrMdû ì JoeMl0¯ã0LŒX¯ã0à(_¯ã0LŒXÿÿOÐDrLy LAYER_LAYOUTDrLy LAYER_BCKGRNDDrLy LAYER_BACKGRNDOBJDrLyLAYER_CONTROLSDrLy!LAYER_MEASURELINESDrMPÀ&JoeM$mTÐÐÐÐDrML DrOb<SVDr&©Ð 1&DrOb<SVDr&<Ðzd&DrOb<SVDr&©ë- 14LDrOb<SVDr&<ë-zd4LDrXXgg fHome~LT~GliederungÿDrMP8¶JoeM`mRDrML DrOb€SVDr&`mR'Home~LT~Hintergrundþ¯`mRDrXXgg NHome~LT~GliederungÿDrMPoåJoeMT$mÐÐÐÐDrML DrObÒSVDr&ê òBQ0! Home~LT~Titelþ¯wê òBQ0XxV4B1CôClick to move the slide Home~LT~Titelþ¯ž<(ÿÿDrObÝSVDr&Ö ó3>Gw]#Home~LT~Notizenþ¯€Ö ó3>Gw]axV4B1LôClick to edit the notes formatHome~LT~Notizenþ¯ž<(ÿÿDrXXgg VHome~LT~GliederungÿDrPgäbJoeM$mTÐÐÐÐDrML8DrMD,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDrXX Handoutsgg FHome~LT~GliederungÿDrPg›!JoeM`mRDrML8DrMD,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDrOb¿SVDr&]'ÏßG‰ Standardi]'ÏßG‰ JxV4B15ôJust to say: hello, world!StandardÿÿDrXXgg FHome~LT~GliederungÿDrPgùoJoeMT$mÐÐÐÐDrML8DrMD,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDrOb<SVDr&ê òBQ0DrObÑSVDr&Ö ó3>Gx]#Home~LT~Notizenþ¯tÖ ó3>Gx]UxV4B1@ôClick to add notesHome~LT~Notizenþ¯ž<(ÿÿDrXXgg VHome~LT~GliederungÿDrXX:þÿÿGeneric PostScript PrinterGENERIC PostScriptD<+Aáí `õ@0d,,lprXH"xjp'5 y$¨1$È&P¶ó8ð‹:è!È­-(4˜ž1C340`2¨‚¨78àû >0°>0À>0 98°98À98Ð98`ç:pç:`ÔpÔØ0è0xˆ9ˆˆ9˜ÀC¨ÀC˜!¨! L°LÀþAÐþA€ÌCÌCˆô-˜ô-˜¯!¨¯!¨Ÿ9¸Ÿ9¨8¨8€*5*5È=0Ø=0°ÆÀÆHÛXÛÀËÐËlprà>0&5 &5°&5À&5Ð&5öC öC°öCÀöCÐöCàöCðöC÷C>0(>08>0H>0X>0h>0x>0ˆ>0ø889898(98898H98X98h98x98ˆ980 000@0P0`0p0€00 0°0À0`:p:€:: :°:À:Ð:à:ð::: :0:@:8EHEXEhEGENERICÈEØEèEøEEH DrVwP SVDr€ SVDr:SVDrôôôôSVDrALayout:SVDrôôôôSVDrÜ#SVDr SVDr# SVDr0 SVDr1 SVDr3 SVDr4SVDr@SVDr SVDrD SVDrP SVDrQ¿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDrHL DrHL DrHL äêÿÿ>þÿÿ{… SRoot Entryÿÿÿÿÿÿÿÿ!r\V¼…щЀ)ä°±CompObjÿÿÿÿEOle ÿÿÿÿÿÿÿÿÿÿÿÿpersist elements"ÿÿÿÿSfxDocumentInfo ÿÿÿÿÿÿÿÿuSfxWindowsÿÿÿÿÿÿÿÿSfxStyleSheetsÿÿÿÿÿÿÿÿÿÿÿÿ*SummaryInformation(ÿÿÿÿÿÿÿÿ8StarDrawDocument3$ÿÿÿÿÿÿÿÿÿÿÿÿ5ÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿxlhtml/cole/examples/sprsheet.sdc0100644000076400007640000004000007446125617017621 0ustar jackshckjackshckÐÏࡱá;þÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿþÿÿÿ þÿÿÿþÿÿÿþÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿ þÿÿÿþÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿ ÿÿÿÿa¸¥ÆÖ…щˀ)ä°± Spreadsheet StarCalc 5.0Ò»SfxDocumentInfo  Arturo Tena ¯ã0XqX Arturo Tena ¯ã0XqX uKô Info 0 Info 1 Info 2 Info 3 ¯ã0 "X<TASK,0,131,0,100,1,100/60/0;0;tw:270;0/2/0/0/0/0/2/0/0/0/0;;þÿà…ŸòùOh«‘+'³Ù0 h t € Œ ˜¤¸ÌØäðü1@@pšJ2@³v>C5¾@³v>C5¾ Arturo Tena Arturo TenaB ,BBÇ»»ÿÿ¹ScDocumentPool >ddefghijklmnopqrstuwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œždždefghijklmnopqrstuvwxyz{~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ d defghijklmnpqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡d¡defghijklmnopqtuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£ˆ„ 0'e@z@dX'f@™X'g@¸X'h@×Xò'n@÷Xõ'q@Xe'x@9X'z'@l€ÀÀÀÀÀÀ€X('|Q@É €2€2€2€2X''}@ëX@'‚!@dddXA'ƒ@>ŽdŽdXC'‡@dªXžž @w 1ÿô»»ÿÿÞEditEngineItemPool¤ OŸ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0i Pw 11ô»»ÿÿEditEngineItemPool¤ TŸ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f30“{(¶@pèX P¥ÿ¶ 1ÿô»»ÿÿÞEditEngineItemPool¤ ‹Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0¥ P³ 1Lô»»ÿÿEditEngineItemPool¤ ”Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6fB0â{(¶(@ÚpèpçXX Pôÿ (ÿ)¶¶ 1ÿô»»ÿÿÞEditEngineItemPool¤ æ Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0 P  1Sô»»ÿÿEditEngineItemPool¤ ë Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6fJ0A {(¶0@9 p‚¯ã0pæXX! PS ÿ, ÿ¶¶ XXSŸŸÁ@D1ÿô»»ÿÿÞEditEngineItemPool¤ f Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0€ PŽ  16ô»»ÿÿEditEngineItemPool¤ k Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f30ª {(¶@¦ päX P¼ Page ÿ¶ 1ÿô»»ÿÿÞEditEngineItemPool¤ §Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0Á PÏ 1ÿô»»ÿÿÞEditEngineItemPool¤ °Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0Ê PØ 1Qô»»ÿÿEditEngineItemPool¤ µŸ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6fB0{(¶(@ûpäpåXX P Page ÿ / ÿ¶¶ 1ÿô»»ÿÿÞEditEngineItemPool¤  Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0& P4 XXXJ' Z@ª}''‚@'ƒA'‡C'z'|('}''‚@'ƒA'‡C'XX,K'¡Z@}''‚@'ƒA'‡C'z'|('}''‚@'ƒA'‡C'XX,0On­Íï"¡Îô1 þd{P¿$'m @'‚ndnddnA'ƒndndB'„C'‡Ð/à=••d––+9ES[BÓÏ2Á ˜StandardStandardšåResultStandardResult›åf'g'h'Result2ResultResult2œåxe'HeadingStandardHeadingåe'f'g'nò'Heading1HeadingHeading1žåqõ'StandardStandard¤å}''žžŸŸ J'¡K'ReportReport¥å}''žžŸŸ J'¡K'6t¦ì!gBì»»ÿÿÞEditEngineItemPool¤ ~Ÿ¯Ÿ¡¢£¤¥¦§¨©ª«¬­±²³Ÿ³Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°²³´´žŸ ¡¢£¤¥¦§©ª«¬­®¯°±²³´µ6f 0˜ P¦-B¾!BStandard ÿ|,B$BB%BPÃB.BB/BB(B| "  EstandarEstandard#.###,00#ûÿ.ùÿ###ûÿ,úÿ00ûÿSystem #.##0 CCC#ûÿ.ùÿ##0ûÿ ÿÿCCCPts #.##0;[RED]-Pts #.##0 Pts ÿÿ#ûÿ.ùÿ##0ûÿ-Pts ÿÿ#ûÿ.ùÿ##0ûÿRED$ DD/MM/AAAADD/ÿÿMM/ÿÿAAAA def/System%DD/MM/AADD/ÿÿMM/ÿÿAA def/System&NNNND "de" MMMM "de" AAAANNNND de ÿÿMMMM  de ÿÿAAAASystem'D "de" MMM "de" AAD de ÿÿMMM de ÿÿAA def/System. [HH]:MM:SS,00 [þÿHH ]þÿ:ÿÿMM:ÿÿSS ,ÿÿ00ûÿKD "de" MMM "de" AAAAD de ÿÿMMM de ÿÿAAAA def/SystemLD "de" MMMM "de" AAAAD de ÿÿMMMM  de ÿÿAAAA def/SystemMNN D "de" MMM "de" AANN ÿÿD de ÿÿMMM de ÿÿAA def/SystemNNN D "de" MMMM "de" AAAANN ÿÿD de ÿÿMMMM  de ÿÿAAAA def/SystemONNNND "de" MMMM "de" AAAANNNND de ÿÿMMMM  de ÿÿAAAA def/SystemP D. MMM. AAAAD. ÿÿMMM. ÿÿAAAADIN 5008 (EN 28601)Q D. MMMM AAAAD. ÿÿMMMM  ÿÿAAAADIN 5008 (EN 28601)RMM-DDMM-ÿÿDDDIN 5008 (EN 28601)SAA-MM-DDAA-ÿÿMM-ÿÿDDDIN 5008 (EN 28601)T AAAA-MM-DDAAAA-ÿÿMM-ÿÿDDDIN 5008 (EN 28601)UWWWWÿÿÿÿBPn„€©Œˆ¦˜˜œž¦¬ª™™ƒ‘•b"B«@BXPBG Hello, world!@Àð?@B/BWAB}}BB)HELLOStandard€ÀÀÀÀÀÀ"BP@BBAB}}BB*Sheet2Standard€ÀÀÀÀÀÀ"BP@BBAB}}BB*Sheet3Standard€ÀÀÀÀÀÀ&BB)Bdü©ñÒMbP? kÐ*BC€ÀÀÀÀÀÀ Grid colordddd+BþþÿÿGeneric PostScript PrinterGENERIC PostScriptD<+Aáí  nfd,,lpr Info 1 Info 2 Info 3 ¯ã00Ù”\<Š*ž lprSW5HDR.0¯ã0œñW! ÿÿ Frameformatÿÿ ZeichenformatÿÿTextformatvorlageStandardÿÿRoot 5Standard  Illustration Table TextY . ä:Xo8(R.(R.(R.)4 GENERIC.scs0ˆÿÿ°9Root Entryÿÿÿÿÿÿÿÿa¸¥ÆÖ…щˀ)ä°±@CompObjÿÿÿÿAOle ÿÿÿÿÿÿÿÿÿÿÿÿpersist elements"ÿÿÿÿSfxDocumentInfo ÿÿÿÿÿÿÿÿuSfxWindowsÿÿÿÿÿÿÿÿASfxStyleSheetsÿÿÿÿÿÿÿÿÿÿÿÿ¦SummaryInformation(ÿÿÿÿÿÿÿÿ8StarCalcDocument"ÿÿÿÿÿÿÿÿÿÿÿÿÄÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿxlhtml/cole/examples/sprsheet.xls0100644000076400007640000001200007446125620017647 0ustar jackshckjackshckÐÏࡱá;þÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿ þÿÿÿþÿÿÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ l ÉáÁ¿Àâ\ Mr X BäœHELLOSheet2Sheet3=àZÏ?N*8X@"Ú1Èÿ¥Arial1Èÿ¼¥Arial1Èÿ¥Arial1Èÿ¼¥Arial1Èÿ¥Arial#,##0\ "DM";\-#,##0\ "DM"!#,##0\ "DM";[Red]\-#,##0\ "DM""#,##0.00\ "DM";\-#,##0.00\ "DM"'$#,##0.00\ "DM";[Red]\-#,##0.00\ "DM"<*9_-* #,##0\ "DM"_-;\-* #,##0\ "DM"_-;_-* "-"\ "DM"_-;_-@_-<)9_-* #,##0\ _D_M_-;\-* #,##0\ _D_M_-;_-* "-"\ _D_M_-;_-@_-D,A_-* #,##0.00\ "DM"_-;\-* #,##0.00\ "DM"_-;_-* "-"??\ "DM"_-;_-@_-D+A_-* #,##0.00\ _D_M_-;\-* #,##0.00\ _D_M_-;_-* "-"??\ _D_M_-;_-@_-àõÿ À àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ à À à+õÿ øÀ à)õÿ øÀ à õÿ øÀ à,õÿ øÀ à*õÿ øÀ “€ÿ“€ÿ“€ÿ“€ÿ“€ÿ“€ÿ’â8ÿÿÿÿÿÿÿÿÿÿÿÿ€€€€€€€€€ÀÀÀ€€€€€ÿ€ `ÿÿÀ àà`€ÿ€€€ÀÀÀÿ€ÿÿÿÿÿÿ€€€€€ÿÏÿiÿÿàÿàÿÿ€¦ÊðÝœ³³îããã*où?¸ÍH„6•ŒAŽ^B bzbO¬–––/¾(fvEE>j(…9jJ2…BBB… ÏHELLO… ?Sheet2… OSheet3 l É  dü©ñÒMbP?_*+‚€%ÿŒ11Á&A Seite &Pƒ„¡"1DrungÁ°‚Á`à?Á°‚Á`à?ðSheet2Sheet3U }    Hello, world!)ð?@> ¶ l É l É þÿ ÿÿÿÿÀFMicrosoft Excel 5.0-TabelleBiff5Root EntryÿÿÿÿÿÿÿÿÀF@Book ÿÿÿÿ_Ole ÿÿÿÿÿÿÿÿÿÿÿÿCompObjÿÿÿÿÿÿÿÿÿÿÿÿJxlhtml/cole/examples/text.doc0100644000076400007640000036100007446125630016745 0ustar jackshckjackshckÐÏࡱá>þÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥ÁI ¿Ubjbj²³²³  ÐÙÐÙUÿÿÿÿÿÿ]œœœœœœœ°°°°° ¼ °Ù¶Ôêêêêêêêž      $ôƒVÄœêêêêêÄXœœêêÔXXXêdœêœêž°°œœœœêžXFXžœœžêÈ Ûä*Õ¾°°N žThis is a test The next line have a incrusted object:  INCRUSTAR Paint.Picture  67QRTUýöýìöýjÓÅB; UVmH jUmH mH 6Uýýý6U°Ð/ °à=!°¥"°¥#‰$‰%°Dd½¾ " èèðB² ð S ðA?¿ ÿð€bðjsŽ[‹•‹¸ÏiÕzBçzÿFD±nð>sŽ[‹•‹¸ÏiÕzBçzÿ‰PNG  IHDR½¾ï!™ÉgAMA±ˆ•˜ô¦ pHYsÃĈ.>£ÏIDATxœíÜÍŽÛJ „ÑòEÞÿ•s Žõc©Õ$‹d}Èb6ÁØÒq³%ÛóÂ_(u·ÿ¢€J™Ü¨™äFÍ$7j&¹Q3ÉšInÔLfþÓëýƒîýtíþzó:øYuJsJÍôØ–œ–Ýw³ÝÓˆN¿¦ÖÑißìœÒ•TŠ^ï«[·/֒Öå•ï7šV{¶ÞˆmÆ'âñœ¶§`õ~tÅþFt¨²GƒeûbÑ!É V^O‰Nx^h°øý)ÝÔ¡Êòt¿¯©%Ç-ßC½Ú¦UHŽjd°ÞˆŽsîh`5§DÇ­40Ü߈ŽCAh`»/ÓâÐÀüzJtŒ EÏë¦Îò¢Ñ æséZržD€Nn4­ì ZνÖÑYÍAsœS¢ó0Ž 5òÝ߈ÎtLh°/‰ÈÐ æzJtnŇaß'xæ9¢D¢¿+ %g+DºÑ´: ‚×Ñ9Š âç”è\‰ âÝ@t6exún :ÑO¨‡ˆ€4h@ä¼ÇÈ©ª¥uÃ?­ŠN¨QZ7à¦S r»+êhÞ øè4@ƒ nÀD§qŽÓÓ ê¸Ùæ¼ätBƒRn§U34(å4êhPÍ "è0\ù»WÎ |éô›P£ŠnàE§+”u{:Ñ ²XžÈÞhPÜͶ%KN{4¨ïfù´õÝ`)¡y×À Ñšz¸ÁÀjŒÜà–7…Oêä³t4¡65sƒû§\höêçfÛÉ’#4µtsqZ Íq-Ýà¡9­«œÒš_½º‘+×SÍÑ^×›ÑOB³W{78•!4É ù¸Ü'LÇÉ €Ë÷oÔ;¹¹y¿X›ß2Dg¯Þnvïï‘|é“»ÆnNn ‹Î¯ººùùN‚èœÖÒÍÅ·Ÿt~\?7O޳Ԓ󮟛¯ÎÑhZÔÌÍÄY½:¹™žP¢³©›‡ÅëáfÉç÷Dç£n~èStÞUw³ü“º© ¸Ÿ—·\r꺱C£iUÖõJÓžNQ7_YŒ§Þt*ºq;é”sãüUË®tj¹ ù~nK:…Ü~©»ßM*nØþ@õ%§„4ͦU~7 hŽ~o]:ÉÝð 9úíEédvÆfÔƒNf7_1 5 “Ö ù™àAlSN7œê7ÐŒ2Ó!sÓÍ(-&7ÝÐŒr>G7=Ñì–aÉápÓMÂiÅáæ«VhFÙè¸á>@~¥¢í¦ù„ú*P7B³- 87BsT:An„æ<ú£áFh&"[rÜÝÍŸ§•¯¡¹1G7B3+¸ë)¡¹%/7O5q|t\ÜhB=ŒŽ½¡YÓq3v#4¦Å-9–n„fy4ÓÊÌÐÅAÇÆÐ˜F@ÇÀÐ8Mgµ¡q+”Žñõ”ИGg©›è›˜ ze®s£ E’Ë«÷µàìî>P¡ñÌýEûx½†Ü7:ûb¡ É—Îj7B˜#Çnþü¬Bò¢³b_¬Ø²ß&GÏWYd¿ÈM^‹–ÜmwÉYGGnêf9­ä¦tftä¦z67Jt®fÒz£f’5“ܨ™äFÍ$7j&¹Q3ÉšInÔLr£f’5“ܨ™þtâ†a–šIEND®B`‚þÿÿÿ þÿÿÿýÿÿÿþÿÿÿêîýÿÿÿ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€Root EntryÀ‚´íDí  'A|*B¼Bÿÿÿÿÿÿÿÿ  ÀFÀðs*Õ¾Àl€*Õ¾@ <@Data\m@u  'A<@tB²\m@ ÿÿÿÿÿÿÿÿÿÿÿÿ‰Oýÿoüÿ=  'A<@WordDocument ÿÿÿÿÿÿÿÿObjectPool ÿÿÿÿ`€²*Õ¾Àl€*Õ¾_994231763ÿÿÿÿÿÿÿÿ ÀF`€²*Õ¾`êÊ*Õ¾Ole ÿÿÿÿÿÿÿÿÿÿÿÿCompObjÿÿÿÿMObjInfoÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿ þÿÿÿ þÿÿÿ !"#$%&þÿÿÿ(þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿ ÿÿÿÿ ÀFPBrushPBrushPBrushô9²qþÿ à…ŸòùOh«‘+'³Ù0\ˆ¨´ÄÐà ðü  $ 0<DLTäThis is a testhisivanis vanOle10Nativeÿÿÿÿÿÿÿÿÿÿÿÿä¥1TableÿÿÿÿÙSummaryInformation( ÿÿÿÿŒDocumentSummaryInformation8ÿÿÿÿÿÿÿÿÿÿÿÿ Ø‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéþÿÿÿëìíïþÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿà¥BMÆ¥6(½¾¥ÄÄÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNormal ivanl 1anMicrosoft Word 8.0@Œ†G@v%*Õ¾@•l*Õ¾ Fþÿ ÕÍÕœ.“—+,ù®DÕÍÕœ.“—+,ù®@ü hp€ˆ˜  ¨°¸ À ÛäULSA U³  This is a test Título˜ 6> _PID_GUIDäAN{54254FE1-40EB-11D3-A102-006008C3305A} [$@ñÿ$NormalmH FA@òÿ¡FFuente de párrafo predeter.U ÿÿÿÿUUU6QSU:”ÿ•€!$-.4WWÿÿivanC:\Mis documentos\text.docÿ@€$dtUP@GTimes New Roman5€Symbol3& Arial"qˆÄ©©º7¦«º7¦ Fì#¥À´´€r0UÿÿThis is a testivanivanþÿ ÿÿÿÿ ÀFDocumento Microsoft Word MSWCompObjÿÿÿÿÿÿÿÿÿÿÿÿ'kÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿordDocWord.Document.8ô9²qxlhtml/cole/examples/text.sdw0100644000076400007640000001700007446125631016774 0ustar jackshckjackshckÐÏࡱá;þÿ  þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿþÿÿÿ þÿÿÿ þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿþÿÿÿþÿÿÿþÿÿÿ þÿÿÿþÿÿÿþÿÿÿþÿÿÿ !þÿÿÿ#$%&'(þÿÿÿ*+,-./0123456789:;<=þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿ ÿÿÿÿÑù ®…Ѫ´`—ÚVTextStarWriter 5.0Š*ž SfxDocumentInfo  Arturo Tena ¯ã0„ Arturo Tena ¯ã08ñW uKô Info 0 Info 1 Info 2 Info 3 ¯ã00Ù”\<TASK,0,1*2,0,100,1,3000;1710;100;0;0;10890;5790;0;0»»ÿÿßSWG, A<  #$%&'()*./0123456789:;<=>?@ABCDGHK  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFQRSTUŒ 0W’Pá$' '(l, Ø, D , °, , ˆ, ô, `#, Ì', 8,, ¤0, 5, |9, è=, 6')J2< 7StandardStandard@ÿÿÉSW5HDR.0¯ã0œñW!ÿÿOutline0 #Zþÿà…ŸòùOh«‘+'³Ù0 h t € Œ ˜¤¸ÌØäðü3@€L”]@pšJ2@k|ÂB5¾@€¾í΃4¾ Arturo Tena Arturo TenaSW5HDR.0¯ã0œñW! ÿÿ Frameformatÿÿ ZeichenformatÿÿTextformatvorlageStandardÿÿRoot 5Standard  Illustration Table TextY .Y .Y .P½p¶ Ãÿÿ2$99 €SAAPÐ/à=APndnddnAPndndSAAPÐ/à=APndnddnAPndndZSW5HDR.0¯ã0œñWC(505w(Build:2555)(SV505)]DAddress bookÿaddress! ÿÿ Frameformatÿÿ ZeichenformatÿÿTextformatvorlageStandardÿÿRoot 5Standard  Illustration Table Textd 1 ÿÿÿÿÿÿ4 ÿÿÿÿÿÿ5*ÿÿjY .Y .Y .6N!Tþÿ Hello, world!JþÿÿGeneric PostScript PrinterGENERIC PostScriptDáí d,,lprlprGENERIC7 UcÒ\¯U88Ð/à=?ÿÿÐBÐ/à=Unnô&5P€Â$Unnô&5?þÿ؇Bô& lZRoot EntryÿÿÿÿÿÿÿÿÑù ®…Ѫ´`—ÚV€CompObjÿÿÿÿ<Ole ÿÿÿÿÿÿÿÿÿÿÿÿpersist elements"ÿÿÿÿSfxDocumentInfo ÿÿÿÿÿÿÿÿuSfxWindowsÿÿÿÿÿÿÿÿ8SfxStyleSheetsÿÿÿÿÿÿÿÿ;SwNumRulesÿÿÿÿÿÿÿÿÿÿÿÿUSummaryInformation( ÿÿÿÿÿÿÿÿ8SwPageStyleSheets$ÿÿÿÿ ÿÿÿÿ"—StarWriterDocument&ÿÿÿÿÿÿÿÿÿÿÿÿ)ÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿxlhtml/cole/examples/topsrcdir.h.in0100644000076400007640000000202307446125631020057 0ustar jackshckjackshck/* cole - A free C OLE library. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #ifndef COLE_TOPSRCDIR_H #define COLE_TOPSRCDIR_H #ifdef __cplusplus extern "C" { #endif #define COLE_TOPSRCDIR "@top_srcdir@" #ifdef __cplusplus } #endif #endif /* COLE_TOPSRCDIR_H */ xlhtml/cole/examples/version.c0100644000076400007640000000240207446125631017122 0ustar jackshckjackshck/* cole - A free C OLE library. cole test. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include #include int main (int argc, char **argv) { printf ("cole version (defines): %d.%d.%d\n", COLE_MAJOR_VERSION, COLE_MINOR_VERSION, COLE_MICRO_VERSION); printf ("cole version (variables): %d.%d.%d\n", cole_major_version, cole_minor_version, cole_micro_version); printf ("cole version (cole_version): %s\n", cole_version); printf ("cole host: %s\n", cole_host_info); exit (0); } xlhtml/cole/utils/0040755000076400007640000000000007473177126014626 5ustar jackshckjackshckxlhtml/cole/utils/CVS/0040755000076400007640000000000007473177126015261 5ustar jackshckjackshckxlhtml/cole/utils/CVS/Root0100644000076400007640000000006307473177126016123 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/cole/utils/CVS/Repository0100644000076400007640000000002207473177126017352 0ustar jackshckjackshckxlhtml/cole/utils xlhtml/cole/utils/CVS/Entries0100644000076400007640000000045207473177126016613 0ustar jackshckjackshck/Makefile.am/1.1.1.1/Wed Mar 20 15:32:41 2002// /Makefile.in/1.1.1.1/Wed Mar 20 15:32:41 2002// /cole_extract.c/1.1.1.1/Wed Mar 20 15:32:42 2002// /cole_isfs.c/1.1.1.1/Wed Mar 20 15:32:42 2002// /cole_isfs_fast.c/1.1.1.1/Wed Mar 20 15:32:42 2002// /cole_tree.c/1.1.1.1/Wed Mar 20 15:32:42 2002// D xlhtml/cole/utils/Makefile.am0100644000076400007640000000027507446125631016655 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libcole.la noinst_PROGRAMS = cole_tree cole_isfs cole_isfs_fast cole_extract xlhtml/cole/utils/Makefile.in0100644000076400007640000002115107446125631016662 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ DLLTOOL = @DLLTOOL@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ NM = @NM@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@ VERSION = @VERSION@ VERSION_INFO = @VERSION_INFO@ INCLUDES = -I$(top_srcdir) LDADD = $(top_builddir)/libcole.la noinst_PROGRAMS = cole_tree cole_isfs cole_isfs_fast cole_extract mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ cole_tree_SOURCES = cole_tree.c cole_tree_OBJECTS = cole_tree.o cole_tree_LDADD = $(LDADD) cole_tree_DEPENDENCIES = $(top_builddir)/libcole.la cole_tree_LDFLAGS = cole_isfs_SOURCES = cole_isfs.c cole_isfs_OBJECTS = cole_isfs.o cole_isfs_LDADD = $(LDADD) cole_isfs_DEPENDENCIES = $(top_builddir)/libcole.la cole_isfs_LDFLAGS = cole_isfs_fast_SOURCES = cole_isfs_fast.c cole_isfs_fast_OBJECTS = cole_isfs_fast.o cole_isfs_fast_LDADD = $(LDADD) cole_isfs_fast_DEPENDENCIES = $(top_builddir)/libcole.la cole_isfs_fast_LDFLAGS = cole_extract_SOURCES = cole_extract.c cole_extract_OBJECTS = cole_extract.o cole_extract_LDADD = $(LDADD) cole_extract_DEPENDENCIES = $(top_builddir)/libcole.la cole_extract_LDFLAGS = CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = cole_tree.c cole_isfs.c cole_isfs_fast.c cole_extract.c OBJECTS = cole_tree.o cole_isfs.o cole_isfs_fast.o cole_extract.o all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps utils/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: cole_tree: $(cole_tree_OBJECTS) $(cole_tree_DEPENDENCIES) @rm -f cole_tree $(LINK) $(cole_tree_LDFLAGS) $(cole_tree_OBJECTS) $(cole_tree_LDADD) $(LIBS) cole_isfs: $(cole_isfs_OBJECTS) $(cole_isfs_DEPENDENCIES) @rm -f cole_isfs $(LINK) $(cole_isfs_LDFLAGS) $(cole_isfs_OBJECTS) $(cole_isfs_LDADD) $(LIBS) cole_isfs_fast: $(cole_isfs_fast_OBJECTS) $(cole_isfs_fast_DEPENDENCIES) @rm -f cole_isfs_fast $(LINK) $(cole_isfs_fast_LDFLAGS) $(cole_isfs_fast_OBJECTS) $(cole_isfs_fast_LDADD) $(LIBS) cole_extract: $(cole_extract_OBJECTS) $(cole_extract_DEPENDENCIES) @rm -f cole_extract $(LINK) $(cole_extract_LDFLAGS) $(cole_extract_OBJECTS) $(cole_extract_LDADD) $(LIBS) tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = utils distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile $(PROGRAMS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-noinstPROGRAMS clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-noinstPROGRAMS distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile mostlyclean-libtool distclean-libtool \ clean-libtool maintainer-clean-libtool tags mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/cole/utils/cole_extract.c0100644000076400007640000000430607446125632017441 0ustar jackshckjackshck/* cole - A free C OLE library. cole_extract - Extract a file from a filesystem. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include /* To compile this file outside cole source tree, you must include here instead */ #include #define PRGNAME "cole_extract" #define BUFFER_SIZE 128 int main (int argc, char **argv) { COLEFS *cfs; COLEFILE *cf; COLERRNO colerrno; char buffer[BUFFER_SIZE]; size_t char_read; if (argc != 3) { fprintf (stderr, "cole_extract. Extract a file from a " "filesystem to the standard output.\n" "Usage: "PRGNAME" \n" " FILE - File with the filesystem.\n" " INFILE - Filename of the file to extract.\n"); exit (1); } cfs = cole_mount (argv[1], &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } cf = cole_fopen (cfs, argv[2], &colerrno); if (cf == NULL) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } while ((char_read = cole_fread (cf, buffer, BUFFER_SIZE, &colerrno))) { if (fwrite (buffer, 1, char_read, stdout) != char_read) { break; } } if (!cole_feof (cf)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_fclose (cf, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit (1); } exit (0); } xlhtml/cole/utils/cole_isfs.c0100644000076400007640000000335607446125632016737 0ustar jackshckjackshck/* cole - A free C OLE library. cole_isfs - Guess if a file is a valid filesystem. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include /* To compile this file outside cole source tree, you must include here instead */ #include #define PRGNAME "cole_isfs" int main (int argc, char **argv) { COLEFS * cfs; COLERRNO colerrno; if (argc != 2) { fprintf (stderr, PRGNAME". Prints `yes' if the file is a " "valid filesystem, otherwise it prints `no'.\n" "Usage: "PRGNAME" \n"); exit (1); } cfs = cole_mount (argv[1], &colerrno); if (cfs == NULL) { switch (colerrno) { case COLE_ENOFILESYSTEM: case COLE_EINVALIDFILESYSTEM: printf ("no\n"); break; case COLE_EMEMORY: case COLE_EOPENFILE: case COLE_EUNKNOWN: default: cole_perror (PRGNAME, colerrno); break; } exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit (1); } printf ("yes\n"); exit (0); } xlhtml/cole/utils/cole_isfs_fast.c0100644000076400007640000000342007446125632017744 0ustar jackshckjackshck/* cole - A free C OLE library. cole_isfs_fast - Fast guess if a file is a valid filesystem. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include /* To compile this file outside cole source tree, you must include here instead */ #include #define PRGNAME "cole_isfs_fast" int main (int argc, char **argv) { FILE *file; unsigned char sign[8]; if (argc != 2) { fprintf (stderr, PRGNAME". Prints `yes' if the file is a " "valid filesystem, otherwise it prints `no'. " "The test is not much accurate.\n" "Usage: "PRGNAME" \n"); exit (1); } file = fopen (argv[1], "rb"); if (file == NULL) { perror (PRGNAME); exit (1); } fread (sign, 1, 8, file); if ( sign[0] != 0xd0 || sign[1] != 0xcf || sign[2] != 0x11 || sign[3] != 0xe0 || sign[4] != 0xa1 || sign[5] != 0xb1 || sign[6] != 0x1a || sign[7] != 0xe1) { printf ("no\n"); fclose (file); exit (1); } fclose (file); printf ("yes\n"); exit (0); } xlhtml/cole/utils/cole_tree.c0100644000076400007640000000312007446125632016717 0ustar jackshckjackshck/* cole - A free C OLE library. cole_tree - Prints the tree of a filesystem. Copyright 1998, 1999 Roberto Arturo Tena Sanchez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Arturo Tena */ #include /* To compile this file outside cole source tree, you must include here instead */ #include #define PRGNAME "cole_tree" int main (int argc, char **argv) { COLEFS * cfs; COLERRNO colerrno; if (argc != 2) { fprintf (stderr, "cole_tree. Prints the tree of a filesystem.\n" "Usage: "PRGNAME" \n"); exit (1); } cfs = cole_mount (argv[1], &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } if (cole_print_tree (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); cole_umount (cfs, NULL); exit (1); } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit (1); } exit (0); } xlhtml/Makefile.in0100644000076400007640000002542707500147251014603 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ VERSION = @VERSION@ SUBDIRS = cole xlhtml ppthtml EXTRA_DIST = README-xlhtml README-ppthtml ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = DIST_COMMON = README ./stamp-h.in AUTHORS COPYING INSTALL Makefile.am \ Makefile.in NEWS aclocal.m4 config.guess config.h.in config.sub \ configure configure.in install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/NEWS0100644000076400007640000000000007446125533013221 0ustar jackshckjackshckxlhtml/README0100644000076400007640000000000207446125533013404 0ustar jackshckjackshck xlhtml/aclocal.m40100644000076400007640000001251507500147251014370 0ustar jackshckjackshckdnl aclocal.m4 generated automatically by aclocal 1.4-p5 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # isc-posix.m4 serial 1 (gettext-0.10.40) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) # still uses it. Otherwise, the use in gettext.m4 makes autoheader # give these diagnostics: # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX undefine([AC_ISC_POSIX]) AC_DEFUN([AC_ISC_POSIX], [ dnl This test replaces the obsolescent AC_ISC_POSIX kludge. AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) ] ) xlhtml/config.guess0100755000076400007640000010047507446125535015065 0ustar jackshckjackshck#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then CC_FOR_BUILD="$HOST_CC" else if test x"$CC" != x; then CC_FOR_BUILD="$CC" else CC_FOR_BUILD=cc fi fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-cbm ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in *ia64) echo "${UNAME_MACHINE}-unknown-linux" exit 0 ;; i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; elf_i?86) echo "${UNAME_MACHINE}-pc-linux" exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32arm*) echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" exit 0 ;; armelf_linux*) echo "${UNAME_MACHINE}-unknown-linux-gnu" exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" exit 0 ;; elf32ppc | elf32ppclinux) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unkown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c < /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __MIPSEB__ printf ("%s-unknown-linux-gnu\n", argv[1]); #endif #ifdef __MIPSEL__ printf ("%sel-unknown-linux-gnu\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy elif test "${UNAME_MACHINE}" = "s390"; then echo s390-ibm-linux && exit 0 else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i?86:*:5:7*) # Fixed at (any) Pentium or better UNAME_MACHINE=i586 if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i?86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-W:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 xlhtml/config.h.in0100644000076400007640000000225607466762233014572 0ustar jackshckjackshck/* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ #undef const /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* The number of bytes in a double. */ #undef SIZEOF_DOUBLE /* The number of bytes in a float. */ #undef SIZEOF_FLOAT /* The number of bytes in a long double. */ #undef SIZEOF_LONG_DOUBLE /* The number of bytes in a unsigned char. */ #undef SIZEOF_UNSIGNED_CHAR /* The number of bytes in a unsigned int. */ #undef SIZEOF_UNSIGNED_INT /* The number of bytes in a unsigned long. */ #undef SIZEOF_UNSIGNED_LONG /* The number of bytes in a unsigned long long. */ #undef SIZEOF_UNSIGNED_LONG_LONG /* The number of bytes in a unsigned short. */ #undef SIZEOF_UNSIGNED_SHORT /* Define if you have the header file. */ #undef HAVE_MALLOC_H /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION xlhtml/config.sub0100755000076400007640000006123307446125537014530 0ustar jackshckjackshck#! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Free Software Foundation, Inc. # # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el | mcore \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | fr30 | avr) basic_machine=$basic_machine-unknown ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i[34567]86) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ | bs2000-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; i386-go32 | go32) basic_machine=i386-unknown os=-go32 ;; i386-mingw32 | mingw32) basic_machine=i386-unknown os=-mingw32 ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-unknown os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc | sparcv9) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i[34567]86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; -nsk) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -*MiNT) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f301-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -*MiNT) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os xlhtml/configure0100755000076400007640000021107107500147256014442 0ustar jackshckjackshck#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file= # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:552: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 HOST_CANONICAL_NAME=$host HOST_ALIAS_NAME=${host_alias} HOST_CPU=${host_cpu} HOST_VENDOR=${host_vendor} HOST_OS=${host_os} # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:595: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:648: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { echo "configure: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" 1>&2; exit 1; } fi test "$2" = conftestfile ) then # Ok. : else { echo "configure: error: newly created file is older than distributed files! Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi test "$program_prefix" != NONE && program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:705: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=xlhtml/xlhtml VERSION=0.5.1 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:751: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo "configure:764: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf echo "$ac_t""found" 1>&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo "configure:777: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake echo "$ac_t""found" 1>&6 else AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo "configure:790: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader echo "$ac_t""found" 1>&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo "configure:803: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo echo "$ac_t""found" 1>&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$ac_t""missing" 1>&6 fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:823: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:853: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:904: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:936: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 947 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:983: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:1011: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1045: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 echo "configure:1074: checking for strerror in -lcposix" >&5 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lcposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lcposix" else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1117: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 for ac_hdr in malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1200: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:1239: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1314: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo "configure:1418: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS #include #include #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else rm -rf conftest* ac_cv_type_size_t=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 if test $ac_cv_type_size_t = no; then cat >> confdefs.h <<\EOF #define size_t unsigned EOF fi echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6 echo "configure:1451: checking size of unsigned char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(unsigned char)); return(0); } EOF if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_char=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_char=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_unsigned_char" 1>&6 cat >> confdefs.h <&6 echo "configure:1490: checking size of unsigned short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(unsigned short)); return(0); } EOF if { (eval echo configure:1509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_short=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_short=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_unsigned_short" 1>&6 cat >> confdefs.h <&6 echo "configure:1529: checking size of unsigned int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(unsigned int)); return(0); } EOF if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_int=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_int=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6 cat >> confdefs.h <&6 echo "configure:1568: checking size of unsigned long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(unsigned long)); return(0); } EOF if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_long=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6 cat >> confdefs.h <&6 echo "configure:1607: checking size of unsigned long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(unsigned long long)); return(0); } EOF if { (eval echo configure:1626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long_long=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_unsigned_long_long=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6 cat >> confdefs.h <&6 echo "configure:1646: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(float)); return(0); } EOF if { (eval echo configure:1665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_float=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_float" 1>&6 cat >> confdefs.h <&6 echo "configure:1685: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(double)); return(0); } EOF if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_double=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_double" 1>&6 cat >> confdefs.h <&6 echo "configure:1724: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < int main() { FILE *f=fopen("conftestval", "w"); if (!f) return(1); fprintf(f, "%d\n", sizeof(long double)); return(0); } EOF if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_long_double=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6 cat >> confdefs.h <&6 echo "configure:1763: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include int main() { #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ; return 0; } EOF if { (eval echo configure:1781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include int main() { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } EOF if { (eval echo configure:1796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_bigendian=no fi rm -f conftest* else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_c_bigendian=yes fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_c_bigendian" 1>&6 if test $ac_cv_c_bigendian = yes; then cat >> confdefs.h <<\EOF #define WORDS_BIGENDIAN 1 EOF fi echo $ac_n "checking build system type""... $ac_c" 1>&6 echo "configure:1854: checking build system type" >&5 build_alias=$build case "$build_alias" in NONE) case $nonopt in NONE) build_alias=$host_alias ;; *) build_alias=$nonopt ;; esac ;; esac build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 if test $host != $build; then ac_tool_prefix=${host_alias}- else ac_tool_prefix= fi # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1880: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP="strip" fi fi STRIP="$ac_cv_prog_STRIP" if test -n "$STRIP"; then echo "$ac_t""$STRIP" 1>&6 else echo "$ac_t""no" 1>&6 fi COLE_MAJOR=2 COLE_MINOR=0 COLE_MICRO=2 COLE_MAJOR_PLUS_COLE_MINOR=2 trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile cole/Makefile cole/version.c cole/cole.h xlhtml/Makefile ppthtml/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@HOST_CANONICAL_NAME@%$HOST_CANONICAL_NAME%g s%@HOST_ALIAS_NAME@%$HOST_ALIAS_NAME%g s%@HOST_CPU@%$HOST_CPU%g s%@HOST_VENDOR@%$HOST_VENDOR%g s%@HOST_OS@%$HOST_OS%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@RANLIB@%$RANLIB%g s%@CPP@%$CPP%g s%@build@%$build%g s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@STRIP@%$STRIP%g s%@COLE_MAJOR@%$COLE_MAJOR%g s%@COLE_MINOR@%$COLE_MINOR%g s%@COLE_MICRO@%$COLE_MICRO%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 xlhtml/configure.in0100644000076400007640000000301107500147100015021 0ustar jackshckjackshckAC_INIT dnl Host AC_CANONICAL_HOST HOST_CANONICAL_NAME=$host HOST_ALIAS_NAME=${host_alias} HOST_CPU=${host_cpu} HOST_VENDOR=${host_vendor} HOST_OS=${host_os} AC_SUBST(HOST_CANONICAL_NAME) AC_SUBST(HOST_ALIAS_NAME) AC_SUBST(HOST_CPU) AC_SUBST(HOST_VENDOR) AC_SUBST(HOST_OS) AM_INIT_AUTOMAKE(xlhtml/xlhtml, 0.5.1) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_PROG_RANLIB AC_ISC_POSIX AC_CHECK_HEADERS(malloc.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_CHECK_SIZEOF(unsigned char) AC_CHECK_SIZEOF(unsigned short) AC_CHECK_SIZEOF(unsigned int) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(unsigned long long) AC_CHECK_SIZEOF(float) AC_CHECK_SIZEOF(double) AC_CHECK_SIZEOF(long double) AC_C_BIGENDIAN AC_CHECK_TOOL([STRIP],[strip]) dnl 4a) Increment when remove or change interfaces. dnl [USER SHOULD UPDATE] COLE_MAJOR=2 dnl 4a) 5) Increment when add interfaces. dnl 6) Set to zero when remove (or change) interfaces. dnl [PROGRAMMERS SHOULD LOOK WHAT'S NEW] COLE_MINOR=0 dnl 3) Increment when interfaces not changed at all, dnl only bug fixes or internal changes. dnl 4b) Set to zero when add, remove or change interfaces. dnl [ONLY MAINTAINER SHOULD CARE] COLE_MICRO=2 dnl dnl Set this too (I don't know how to do it automatically =) ): COLE_MAJOR_PLUS_COLE_MINOR=2 dnl AC_SUBST(COLE_MAJOR) AC_SUBST(COLE_MINOR) AC_SUBST(COLE_MICRO) AC_OUTPUT([Makefile cole/Makefile cole/version.c cole/cole.h xlhtml/Makefile ppthtml/Makefile]) xlhtml/install-sh0100755000076400007640000001273607446125553014553 0ustar jackshckjackshck#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 xlhtml/missing0100755000076400007640000001421307446125553014136 0ustar jackshckjackshck#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 xlhtml/mkinstalldirs0100755000076400007640000000133307446125553015344 0ustar jackshckjackshck#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1.1.1 2002/03/20 15:31:55 slidedraw Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here xlhtml/stamp-h.in0100644000076400007640000000001207500147260014416 0ustar jackshckjackshcktimestamp xlhtml/xlhtml.spec0100644000076400007640000000266007500147150014712 0ustar jackshckjackshckName: xlhtml Summary: A program that converts MS Excel files to useful formats. Version: 0.5.1 Release: 1 Copyright: GPL Group: Applications/File Source: http://prdownloads.sourceforge.net/chicago/xlhtml-0.5.tgz BuildRoot: /var/tmp/%{name}-buildroot %description xlhtml generates HTML, XML, csv and tab-delimited versions of MS Excel spreadsheets. Known to work with XLS files of MS Excel 95, 97 and 2000. Also included is ppthtml, a utility for converting MS PowerPoint 95/97 presentations to HTML. %prep %setup %build ./configure make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" mv ppthtml/README ppthtml/ppt-README mv ppthtml/THANKS ppthtml/ppt-THANKS mv ppthtml/ChangeLog ppthtml/ppt-ChangeLog %install mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1 install -s -m 755 xlhtml/xlhtml $RPM_BUILD_ROOT/usr/bin install -s -m 755 ppthtml/ppthtml $RPM_BUILD_ROOT/usr/bin install -m 644 xlhtml/xlhtml.1 $RPM_BUILD_ROOT/usr/share/man/man1 install -m 644 ppthtml/ppthtml.1 $RPM_BUILD_ROOT/usr/share/man/man1 %clean if ! [ "$RPM_BUILD_ROOT" = "/" ]; then rm -rf $RPM_BUILD_ROOT; fi %files %defattr(-,root,root) %doc AUTHORS COPYING xlhtml/README xlhtml/THANKS xlhtml/TODO xlhtml/ChangeLog ppthtml/ppt-README ppthtml/ppt-THANKS ppthtml/ppt-ChangeLog /usr/bin/xlhtml /usr/bin/ppthtml /usr/share/man/man1/xlhtml.1* /usr/share/man/man1/ppthtml.1* %changelog * Wed May 15 2002 Vaclav Dvorak - first version of RPM spec file xlhtml/ppthtml/0040755000076400007640000000000007500147311014214 5ustar jackshckjackshckxlhtml/ppthtml/CVS/0040755000076400007640000000000007473177126014667 5ustar jackshckjackshckxlhtml/ppthtml/CVS/Root0100644000076400007640000000006307473177126015531 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/ppthtml/CVS/Repository0100644000076400007640000000001707473177126016764 0ustar jackshckjackshckxlhtml/ppthtml xlhtml/ppthtml/CVS/Entries0100644000076400007640000000066707473177126016231 0ustar jackshckjackshck/ChangeLog/1.1.1.1/Wed Mar 20 15:32:42 2002// /Makefile.am/1.3/Thu Apr 18 17:22:08 2002// /Makefile.in/1.4/Thu Apr 18 17:22:08 2002// /README/1.2/Thu May 16 16:31:32 2002// /THANKS/1.1.1.1/Wed Mar 20 15:32:43 2002// /Test.ppt/1.1.1.1/Wed Mar 20 15:32:43 2002// /nspptview/1.1.1.1/Wed Mar 20 15:32:43 2002// /pptdump.c/1.2/Thu May 16 16:31:32 2002// /ppthtml.1/1.1.1.1/Wed Mar 20 15:32:44 2002// /ppthtml.c/1.3/Thu May 16 16:31:32 2002// D xlhtml/ppthtml/ChangeLog0100644000076400007640000000034707446125632016002 0ustar jackshckjackshck ppthtml ChangeLog 0.3 10/19/2001 * Renamed the program to ppthtml...all lowercase 0.2.8 01/14/2000 * Added man page * Added Unicode patch from Hironori * Many Bug Fixes 0.0.0 10/13/1999 *So far its just a dream. :) xlhtml/ppthtml/Makefile.am0100644000076400007640000000053707457600300016255 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1 INCLUDES = -I../cole noinst_PROGRAMS = pptdump man_MANS = ppthtml.1 bin_SCRIPTS = nspptview bin_PROGRAMS = ppthtml LDADD = ../cole/libcole.a ppthtml_SOURCES = ppthtml.c #AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith xlhtml/ppthtml/Makefile.in0100644000076400007640000002473307500147274016277 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ VERSION = @VERSION@ EXTRA_DIST = README ChangeLog TODO THANKS test.ppt ppthtml.1 INCLUDES = -I../cole noinst_PROGRAMS = pptdump man_MANS = ppthtml.1 bin_SCRIPTS = nspptview bin_PROGRAMS = ppthtml LDADD = ../cole/libcole.a ppthtml_SOURCES = ppthtml.c mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ ppthtml_OBJECTS = ppthtml.o ppthtml_LDADD = $(LDADD) ppthtml_DEPENDENCIES = ../cole/libcole.a ppthtml_LDFLAGS = pptdump_SOURCES = pptdump.c pptdump_OBJECTS = pptdump.o pptdump_LDADD = $(LDADD) pptdump_DEPENDENCIES = ../cole/libcole.a pptdump_LDFLAGS = SCRIPTS = $(bin_SCRIPTS) CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README ChangeLog Makefile.am Makefile.in THANKS DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(ppthtml_SOURCES) pptdump.c OBJECTS = $(ppthtml_OBJECTS) pptdump.o all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps ppthtml/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: ppthtml: $(ppthtml_OBJECTS) $(ppthtml_DEPENDENCIES) @rm -f ppthtml $(LINK) $(ppthtml_LDFLAGS) $(ppthtml_OBJECTS) $(ppthtml_LDADD) $(LIBS) pptdump: $(pptdump_OBJECTS) $(pptdump_DEPENDENCIES) @rm -f pptdump $(LINK) $(pptdump_LDFLAGS) $(pptdump_OBJECTS) $(pptdump_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) list='$(bin_SCRIPTS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = ppthtml distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-binSCRIPTS install-exec: install-exec-am install-data-am: install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man uninstall: uninstall-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(mandir)/man1 mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \ mostlyclean-compile mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \ clean-tags clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-noinstPROGRAMS \ distclean-compile distclean-tags distclean-generic \ clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS \ install-man1 uninstall-man1 install-man uninstall-man tags \ mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ distdir info-am info dvi-am dvi check check-am installcheck-am \ installcheck install-exec-am install-exec install-data-am install-data \ install-am install uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean #AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/ppthtml/README0100644000076400007640000000510007470757344015110 0ustar jackshckjackshckWelcome to ppthtml. I. INTRODUCTION The ppthtml program will take a PowerPoint 97/95 file as input and convert it to html. The output is via standard out so it can be re-directed to files or piped to filters or used as a gateway to the internet. II. INSTALLATION To build this application, from the top directory, type: ./configure --prefix=/ make make install Then to finish it up, you will need to go into netscape and tell the navigator to use the nspptview script to handle Microsoft Excel files. e.g. /nspptview %s You should be able to then browse to a file and open it. There is a file included in the ppthtml directory you can test with, test.ppt. The shell script nspptview works well. You may need to modify the path in it to fit you system, though. Also, depending on where you install it, you may have to modify your PATH environmental variable. III. UNINSTALLING You may want to keep the tar directory around since you can do a make uninstall later. In the meantime, I suggest doing a make clean after installation to get the size down. IV. COMMANDLINE OPTIONS ppthtml now has several command line options that let you tailor its output. The command is now: ppthtml [] file.ppt V. PERFORMANCE TUNING There are also some user "tunable" parameters in the beginning of the ppthtml.c file. If you get a red message at the bottom of your web browser after converting a big presentation, these are the parameters to adjust. Generally, you would adjust them up in value. I have them adjusted to what I call normal for my usage. Your usage may differ. Don't increase them greatly...just 10-15% and re-compile. If that don't work, increase another 10-15% until it works. VI. TROUBLESHOOTING Using Netscape, you may occassionally see a file not found error. This usually comes when printing or going back to a previously converted file. This is the default behavior and it can be changed by commenting out the rm $tmp* in nspptview. I do this so you don't have files hanging around in your tmp directory where other people might be able to see them. In general, if you can type ppthtml and get a usage error message, the PATH is working. If you don't, your PATH environmental variable needs adjusting. Next try passing the full path to ppthtml of the file you want converted. If it has problems with it, you may have a file the system can't interpret. To check your installation, try passing the full path of ppthtml/threads.ppt and see what it does with that. Charles N Wyble jackshck@thewybles.com xlhtml/ppthtml/THANKS0100644000076400007640000000023407446125633015137 0ustar jackshckjackshck Arturo Tena for the cole 2.0 library Caolan McNamara for MSWordView...where I got the nsopen & nsxlview scripts Hironori Sakamoto for the unicode patch xlhtml/ppthtml/Test.ppt0100644000076400007640000002300007446125633015664 0ustar jackshckjackshckÐÏࡱá>þÿ  þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿ þÿÿÿþÿÿÿ þÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿd›Oφꪹ)è ÑžßÚ¿ € PowerPoint Document(ÿÿÿÿJSummaryInformation(ÿÿÿÿÿÿÿÿxDocumentSummaryInformation8ÿÿÿÿÿÿÿÿÿÿÿÿ¸è;é(€àà€ òˆ/È 0ÒÕä·DTimes New Roman8¶b8¶bD²bøÓ0h²bh²b~Ô0·DArialNew Roman8¶b8¶bD²bøÓ0h²bh²b~Ô0" ·DCourier Newman8¶b8¶bD²bøÓ0h²bh²b~Ô01©  @£nÿý?" dd@ÿÿïÿÿÿÿÿÿ  @@``€€ |ðtð(  c ð$ƒ¿Àÿ@ñ÷ðó€Ðoúgþý4LdLdt²b~Ô0l²b¦n ¾üÿÿ²ÿÿÿpûppû@ ?Ù Ú%ð8óóêøuï `ð ÿÿÿ€€€Ì™33ÌÌÌÿ²²²`ð ÿÿÿÿÿÿÿ™ÿÿÿ–––`ð ÿÿÌff3€€3™3€3ÌÿÌf`ð ÿÿÿ333ÝÝÝ€€€MMMêêê`ð ÿÿÿ€€€ÿÌfÿÌÌÀÀÀ`ð ÿÿÿ€€€ÀÀÀfÿÿ™`ð ÿÿÿ€€€3™ÿ™ÿÌÌ̲²²£>ÿý?" dd@ÿÿïÿÿÿÿÿÿ,£|ÿý?" ddØ@ÿÿïÿÿÿÿÿÿ € Ô €" Ð@€ ð`€»€ £nÿý?" dd@ÿÿïÿÿÿÿÿÿ   @@``€€P£R    @ ` €`£ p£>€£> ÓðËððcð( ð ððÒ ð “ ð6€Tv‡ƒ¿Àÿ ð€°ÐPðà v ðTŸ¨ Click to edit Master title style¢!ª !ð ð ƒ ð0€ vƒ¿Àÿ ðà°Ððà v 𞟨RClick to edit Master text styles Second level Third level Fourth level Fifth level¢!    ª Sðµ ð ƒ ð0€t vƒ¿Àÿ ð`°`€ðà v ð=Ÿ¨*¡øð· ð ƒ ð0€Ô vƒ¿Àÿ ð`°Ð€ðà  v ð?Ÿ¨*¡úð· ð ƒ ð0€4!vƒ¿Àÿ ð` Ѐðà v ð?Ÿ¨*¡ØðH ð ƒ ð0ƒ“ŽŸ‹”Þ½h¿ÿ ?ð ÿÿÿ€€€Ì™33ÌÌÌÿ²²²î„ï€ 4ð, ððÄð( ð ðð¶¢ ð £ ð<€”$v…‡¿ƒ¿ÀÿðÀ%à ðJŸ¨6This is the first Slide - Text Box 1 - Times New Romanð΢ ð £ ð<€T%v…‡¿ƒ¿Àÿð© v•É  ðbŸ¨*This is the first Slide Text Box 2 - Arial¡+*ðH ð ƒ ð0ƒ“ŽŸ‹”Þ½h¿ÿ ?ð ÿÿÿ€€€Ì™33ÌÌÌÿ²²²î¶ï€ fð^0ð ðöð( ð(²0*x ð ðÌ¢ ð £ ð<€´%v…‡¿ƒ¿Àÿð`|€ ð`Ÿ¨(This is Slide 2 Text Box 1 - Courier New¡)(ðê¢ ð £ ð<€T€ñ…‡¿ƒ¿Àÿð f,Ü  ð~Ÿ¨DThis is Slide 2 Text Box 2 - Times New Roman Point 1 Point 2 Point 3¡-EðH ð ƒ ð0ƒ“ŽŸ‹”Þ½h¿ÿ ?ð ÿÿÿ€€€Ì™33ÌÌÌÿ²²²r@CÀ Lõƒ  þÿÿÿ !"#$þÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿ à…ŸòùOh«‘+'³Ù0H `h€˜ °¼ Ü è ôäNo Slide Title Steven Grubbe Steven Grubbe1evMicrosoft PowerPointP@À _PID_GUIDäAN{9615C8E0-83AC-11D3-AA80-00105A11E842}ö$_À‘ã& ôbSteven GrubbCurrent Userÿÿÿÿÿÿÿÿÿÿÿÿ%,ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿxlhtml/ppthtml/nspptview0100755000076400007640000000107007446125633016210 0ustar jackshckjackshck#!/bin/csh if ($#argv != 1) then echo "Usage: $0 file.doc" exit 1 endif set source = $argv[1] #Generate a unique html filename (/tmp/scriptname.pidnum.html) #set com = $0 #set tmp = /tmp/$com:t.$$ #set html = $tmp.html set tmp = `mktemp -q /tmp/nspptview.XXXXXX` || exit 1 set tmp2 = `mktemp -q $tmp/nspptview.XXXXXX` || exit 1 set html = $tmp2.html ppthtml $source > $html if ((!(-r $html)) | ($status)) then echo "$0"": failed to generate HTML file" exit 1 endif #File exists and is of length > 0, so open it nsopen $html rm -rf $tmp* exit 0 xlhtml/ppthtml/pptdump.c0100644000076400007640000002401307470757344016071 0ustar jackshckjackshck/* pptdump - dumps individual records for analysis Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h" #else #include "config.h.in" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h.in" #endif #include #include #include /* for strcpy() */ #include /* For isprint */ #define MODE 1 #define PRGNAME "pptdump" #define MAX_COLS 64 #define MAX_ROWS 512 static char FileName[2][32] = /* The section of the PowerPoint File we read */ { "/PowerPoint Document", /* Power Point 97 & 2000 */ "/PP40" /* Everything else ? */ }; /* Function Prototypes */ COLE_LOCATE_ACTION_FUNC dump_file; static void output_type_string(int); /* Global data */ static char filename[128]; int main (int argc, char **argv) { int f_ptr = 0; COLEFS * cfs; COLERRNO colerrno; if (argc < 2) { fprintf (stderr, "pptdump - Outputs PowerPoint file records for analysis.\n" "Usage: "PRGNAME" \n"); exit (1); } else { strncpy(filename, argv[1], 124); cfs = cole_mount (filename, &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } } while (cole_locate_filename (cfs, FileName[f_ptr], NULL, dump_file, &colerrno)) { if (f_ptr) { cole_perror (PRGNAME, colerrno); if (colerrno == COLE_EFILENOTFOUND) fprintf(stderr, "Section: PowerPoint Document\n"); break; } else /* Don't do this... */ f_ptr++; } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } return 0; } void dump_file(COLEDIRENT *cde, void *_info) { unsigned long cversion=0, cinstance=0, ctype=0, clength=0, ctarget=0, ccount = 0; unsigned char buf[16]; COLEFILE *cf; COLERRNO err; cf = cole_fopen_direntry(cde, &err); /* Ouput Header */ printf("\n"); printf("%s", filename); printf("\n"); /* Output body */ #if (MODE == 1) while (cole_fread(cf, buf, 8, &err)) /* For mode >= 1 */ #else while (cole_fread(cf, buf, 1, &err)) #endif { if (MODE == 0) { if (ccount == 0) { cinstance = buf[0]; ctype = 0; clength = 0; ctarget = 80; /* ficticious number */ printf("\n
\n"); } else if (ccount == 1) { cinstance |= (buf[0]<<8); cversion = cinstance &0x000F; cinstance = (cinstance>>4); } else if (ccount == 2) ctype = (unsigned)buf[0]; else if (ccount == 3) ctype |= (buf[0]<<8)&0x00000FFFL; else if (ccount == 4) clength = (unsigned)buf[0]; else if (ccount == 5) clength |= (buf[0]<<8); else if (ccount == 6) clength |= (buf[0]<<16); else if (ccount == 7) { clength |= (buf[0]<<24); ctarget = clength; if (cversion == 0x0F) { printf("Container"); ccount = -1; } else printf("Atom"); printf(" - Version:%02X Instance:%02X, Type:%03X, Length:%08X - ", (int)cversion, (int)cinstance, (int)ctype, (int)clength); output_type_string(ctype); puts("
\n"); } if (ccount > 7) { /* Here is where we want to process the data */ /* based on the opcode... */ /* process_atom(buf[0]); */ if (isprint(buf[0])) putc(buf[0], stdout); } if (ccount == (ctarget+7)) ccount = 0; else ccount++; } else /* mode >= 1 */ { printf("%02x %02x %02x %02x %02x %02x %02x %02x         ", (unsigned)buf[0], (unsigned)buf[1], (unsigned)buf[2], (unsigned)buf[3], (unsigned)buf[4], (unsigned)buf[5], (unsigned)buf[6], (unsigned)buf[7]); putchar(buf[0]); putchar(buf[1]); putchar(buf[2]); putchar(buf[3]); putchar(buf[4]); putchar(buf[5]); putchar(buf[6]); putchar(buf[7]); printf("
"); } } /* Output Tail */ printf("\n"); cole_fclose(cf, &err); } static void output_type_string(int type) { switch (type) { case 0x0001: puts("SubContainerCompleted"); break; case 0x0002: puts("IRRAtom"); break; case 0x0003: puts("PSS"); break; case 0x0004: puts("SubContainerException"); break; case 0x0006: puts("ClientSignal1"); break; case 0x0007: puts("ClientSignal2"); break; case 0x000A: puts("PowerPointStateAtom"); break; case 0x03E8: puts("Document"); break; case 0x03E9: puts("Document Atom"); break; case 0x03EA: puts("End Document"); break; case 0x03EB: puts("Slide Persist"); break; case 0x03EC: puts("SlideBase"); break; case 0x03ED: puts("SlideBase Atom"); break; case 0x03EE: puts("Slide"); break; case 0x03EF: puts("Slide Atom"); break; case 0x03F0: puts("Notes"); break; case 0x03F1: puts("Notes Atom"); break; case 0x03F2: puts("Environment"); break; case 0x03F3: puts("SlidePersistAtom"); break; case 0x03F4: puts("Scheme"); break; case 0x03F5: puts("Scheme Atom"); break; case 0x03F6: puts("DocViewInfo"); break; case 0x03F7: puts("SlideLayout Atom"); break; case 0x03F8: puts("MainMaster"); break; case 0x03F9: puts("SlideInfo Atom"); break; case 0x03FA: puts("SlideViewInfo"); break; case 0x03FB: puts("Guide Atom"); break; case 0x03FC: puts("ViewInfo"); break; case 0x03FD: puts("ViewInfo Atom"); break; case 0x03FE: puts("SlideViewInfo Atom"); break; case 0x03FF: puts("VBAInfo"); break; case 0x0400: puts("VBAInfo Atom"); break; case 0x0401: puts("SSDocInfo Atom"); break; case 0x0402: puts("Summary"); break; case 0x0403: puts("Texture"); break; case 0x0404: puts("VBASlideInfo"); break; case 0x0405: puts("VBASlideInfo Atom"); break; case 0x0406: puts("DocRoutingSlip"); break; case 0x0407: puts("OutlineViewInfo"); break; case 0x0408: puts("SorterViewInfo"); break; case 0x0409: puts("ExObjList"); break; case 0x040A: puts("ExObjList Atom"); break; case 0x040B: puts("PPDrawingGroup"); break; case 0x040C: puts("PPDrawing"); break; case 0x0410: puts("NamedShows - Several"); break; case 0x0411: puts("NamedShow - One"); break; case 0x0412: puts("NamedShowSlides"); break; case 0x07D0: puts("List"); break; case 0x07D5: puts("Font Collection"); break; case 0x07E1: puts("ListPlaceHolder"); break; case 0x07E3: puts("BookMarkCollection"); break; case 0x07E4: puts("SoundCollection"); break; case 0x07E5: puts("SoundColl Atom"); break; case 0x07E6: puts("Sound"); break; case 0x07E7: puts("SoundData"); break; case 0x07E9: puts("BookMarkSeed Atom"); break; case 0x07EA: puts("GuideList"); break; case 0x07EB: puts("RunArray"); break; case 0x07EC: puts("RunArray Atom"); break; case 0x07ED: puts("ArrayElement Atom"); break; case 0x07EE: puts("Int4Array Atom"); break; case 0x07EF: puts("ColorScheme Atom"); break; case 0x07F0: puts("ColorSchemeAtom"); break; case 0x0BC0: puts("OEShape"); break; case 0x0BC1: puts("ExObjRef Atom"); break; case 0x0BC3: puts("OEPlaceholder Atom"); break; case 0x0BCC: puts("GrColor"); break; case 0x0BD1: puts("Grect Atom"); break; case 0x0BD7: puts("GRatio Atom"); break; case 0x0BD8: puts("GScaling"); break; case 0x0BDA: puts("GPoint Atom"); break; case 0x0BDB: puts("OEShape Atom"); break; case 0x0F9E: puts("OutlineTextRef Atom"); break; case 0x0F9F: puts("TextHeader Atom"); break; case 0x0FA0: puts("TextChars Atom"); break; case 0x0FA1: puts("StyleTextProp Atom"); break; case 0x0FA2: puts("BaseTextProp Atom"); break; case 0x0FA3: puts("TxMasterStyle Atom"); break; case 0x0FA4: puts("TxCFStyle Atom"); break; case 0x0FA5: puts("TxPFStyle Atom"); break; case 0x0FA6: puts("TextRuler Atom"); break; case 0x0FA7: puts("TextBookMark Atom"); break; case 0x0FA8: puts("TextBytes Atom"); break; case 0x0FA9: puts("TxSiStyle Atom"); break; case 0x0FAA: puts("TextSpecInfo"); break; case 0x0FAB: puts("DefaultRuler Atom"); break; case 0x0FB7: puts("FontEntity Atom"); break; case 0x0FB8: puts("FontEmbedData"); break; case 0x0FB9: puts("TypeFace"); break; case 0x0FBA: puts("CString"); break; case 0x0FBB: puts("ExternalObject"); break; case 0x0FC1: puts("MetaFile"); break; case 0x0FC2: puts("ExOleObj"); break; case 0x0FC3: puts("ExOleObj Atom"); break; case 0x0FE9: puts("ExQuickTime"); break; case 0x0FD9: puts("HeadersFooters"); break; case 0x0FDA: puts("HeadersFooters Atom"); break; case 0x0FF0: puts("SlideListWithText"); break; case 0x0FF1: puts("AnimationInfoAtom"); break; case 0x0FF2: puts("InteractiveInfo"); break; case 0x0FF5: puts("UserEditAtom"); break; case 0x0FF6: puts("CurrentUserAtom"); break; case 0x0FF7: puts("DateTimeMCAtom "); break; default: puts("Unknown Type"); break; } } xlhtml/ppthtml/ppthtml.10100644000076400007640000000275307446125634016007 0ustar jackshckjackshck.TH ppthtml 1 "October 13, 2001" "ppthtml" .SH NAME ppthtml \- A program for converting Microsoft Power Point Files .ppt .SH SYNOPSIS .B ppthtml .RI Filename .br .SH DESCRIPTION This manual page explains the .B ppthtml program. The program .B ppthtml is used to convert Microsoft Power Point files into either html or tab delimitted ASCII. The program can be interfaced with helper scripts for viewing email attachments. Most use of this program is through the helper scripts and one would probably rarely resort to using the commandline interface. .SH NOTES To interface to Netscape Navigator: first locate the help scripts nspptview & nsopen. Go into the Edit Preferences dialog box. Click on the Navigator Category and hilight the Applications menu item. Look for Microsoft Excel Worksheet. If you don't see it create one. The MIME type should be: application/vnd.ms-powerpoint The suffixes should be: ppt,ppa,pps,pot,pwz In the handled by section of the dialog box, check the Application checkbox and set the path to wherever the nspptview helper script is located and pass a %s argument. For example, if nspptview is located in /usr/local/bin, then you would put: /usr/local/bin/nspptview %s in the Application path box.. (As a side note, make sure the nspptview script can find the ppthtml program or it won't work.) Click on the OK and you are done. You should be able to use the Test.ppt file that is distributed with the program to verify its configured correctly. .SH AUTHOR Charles N Wyble xlhtml/ppthtml/ppthtml.c0100644000076400007640000002305607470757344016076 0ustar jackshckjackshck/* pptHtml - Format a PowerPoint Presentation into Html Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h" #else #include "config.h.in" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h.in" #include #endif #include #include /* for strcpy() */ #include /* For isprint */ #include /* For exitt() */ #define PRGNAME "pptHtml" #if !(defined( __WIN32__ ) || defined( __BORLANDC__ )) #define PRGVER VERSION #else #define PRGVER "0.4" #endif #define WORK_SIZE 8192 static char FileName[2][32] = /* The section of the PowerPoint File we read */ { "/PowerPoint Document", /* Power Point 97 & 2000 */ "/PP40" /* Everything else ? */ }; /* Function Prototypes */ COLE_LOCATE_ACTION_FUNC dump_file; static void container_processor(int); static void atom_processor(int, int, int, unsigned char); static void print_unicode(unsigned char *, int); static void print_utf8(unsigned short c); static void put_utf8(unsigned short c); /* Global data */ static char filename[128]; static unsigned char working_buffer[WORK_SIZE]; static int buf_idx=0; static int output_this_container = 0; static int past_first_slide = 0; static int last_container = 0; int main (int argc, char **argv) { int f_ptr = 0; COLEFS * cfs; COLERRNO colerrno; if (argc < 2) { fprintf (stderr, "pptHtml - Outputs Power Point files as Html.\n" "Usage: "PRGNAME" \n"); exit (1); } else { strncpy(filename, argv[1], 124); #if defined( __WIN32__ ) || defined( __BORLANDC__ ) { char *ptr = strchr(filename, ':'); if (ptr) { int len; char new_drive[MAXPATH]; fnsplit(filename, new_drive, 0, 0, 0); if (new_drive[0] >= 'a') setdisk(new_drive[0] - 'a'); else setdisk(new_drive[0] - 'A'); ptr++; /* Get past the colon */ len = strlen(ptr); memmove(filename, ptr, len); filename[len] = 0; } } #endif cfs = cole_mount (filename, &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } } while (cole_locate_filename (cfs, FileName[f_ptr], NULL, dump_file, &colerrno)) { if (f_ptr) { /* Two strikes...we're out! */ cole_perror (PRGNAME, colerrno); if (colerrno == COLE_EFILENOTFOUND) fprintf(stderr, "Section: PowerPoint Document\n"); break; } else /* Don't do this... */ f_ptr++; } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } return 0; } void dump_file(COLEDIRENT *cde, void *_info) { unsigned long version=0, instance=0, type=0, length=0, target=0, count=0; unsigned char buf[16]; COLEFILE *cf; COLERRNO err; cf = cole_fopen_direntry(cde, &err); /* Ouput Header */ printf("\n"); printf("%s", filename); printf("\n"); /* Output body */ while (cole_fread(cf, buf, 1, &err)) { if (count == 0) { instance = buf[0]; type = 0; length = 0; target = 80; /* ficticious number */ } else if (count == 1) { instance |= (buf[0]<<8); version = instance &0x000F; instance = (instance>>4); } else if (count == 2) type = (unsigned)buf[0]; else if (count == 3) type |= (buf[0]<<8)&0x00000FFFL; else if (count == 4) length = (unsigned)buf[0]; else if (count == 5) length |= (buf[0]<<8); else if (count == 6) length |= (buf[0]<<16); else if (count == 7) { length |= (buf[0]<<24); target = length; if (version == 0x0F) { /* Do container level Processing */ container_processor(type); count = -1; } } if (count > 7) { /* Here is where we want to process the data based on the Atom type... */ atom_processor(type, count-8, target-1, buf[0]); } if (count == (target+7)) count = 0; else count++; } if (past_first_slide) printf("
"); printf(" 
\n"); /* Output Credit */ printf("
Created with pptHtml
\n" ); /* Output Tail */ printf("\n"); cole_fclose(cf, &err); } static void container_processor(int type) { if (type == 0x03EE) { if (past_first_slide) printf("


\n"); else past_first_slide = 1; } switch (type) { case 0x000D: if (last_container == 0x11) /* suppress notes info */ output_this_container = 0; else output_this_container = 1; break; case 0x0FF0: output_this_container = 1; break; default: /* printf("Cont:%x|\n", type); */ output_this_container = 0; break; } last_container = type; } static void atom_processor(int type, int count, int buf_last, unsigned char data) { if ((buf_idx >= WORK_SIZE)||(output_this_container == 0)) return; if (count == 0) { memset(working_buffer, 0, WORK_SIZE); buf_idx = 0; } switch (type) { case 0x0FA0: /* Text String in unicode */ working_buffer[buf_idx++] = data; if (count == buf_last) { /* printf("Atom:%x|\n", type); */ /* working_buffer[buf_idx++] = 0; */ /* printf("%s
\n", working_buffer); */ print_unicode(working_buffer, buf_idx); printf("
\n"); } break; case 0x0FA8: /* Text String in ASCII */ working_buffer[buf_idx++] = data; if (count == buf_last) { int i; /* working_buffer[buf_idx++] = 0; */ /* printf("Atom:%x|\n", type); */ for (i=0;i\n"); else putchar(working_buffer[i]); } printf("
\n"); } break; case 0x0FBA: /* CString - unicode... */ working_buffer[buf_idx++] = data; if (count == buf_last) { /* working_buffer[buf_idx++] = 0; */ /* printf("%s
\n", working_buffer); */ /* printf("Atom:%x|\n", type); */ print_unicode(working_buffer, buf_idx); printf("
\n"); } break; default: break; } } static void print_unicode(unsigned char *ucs, int len) { int i; for (i = 0; i < len; i += 2) print_utf8(ucs[i] | (ucs[i+1] << 8)); } static void OutputCharCorrected(unsigned char c) { switch (c) { /* Special char handlers here... */ case '\r': printf("
\n"); break; case 0x3C: printf("<"); break; case 0x3E: printf(">"); break; case 0x26: printf("&"); break; case 0x22: printf("""); break; /* Also need to cover 128-159 since MS uses this area... */ case 0x80: /* Euro Symbol */ printf("€"); break; case 0x82: /* baseline single quote */ printf("‚"); break; case 0x83: /* florin */ printf("ƒ"); break; case 0x84: /* baseline double quote */ printf("„"); break; case 0x85: /* ellipsis */ printf("…"); break; case 0x86: /* dagger */ printf("†"); break; case 0x87: /* double dagger */ printf("‡"); break; case 0x88: /* circumflex accent */ printf("ˆ"); break; case 0x89: /* permile */ printf("‰"); break; case 0x8A: /* S Hacek */ printf("Š"); break; case 0x8B: /* left single guillemet */ printf("‹"); break; case 0x8C: /* OE ligature */ printf("Œ"); break; case 0x8E: /* #LATIN CAPITAL LETTER Z WITH CARON */ printf("Ž"); break; case 0x91: /* left single quote ? */ printf("‘"); break; case 0x92: /* right single quote ? */ printf("’"); break; case 0x93: /* left double quote */ printf("“"); break; case 0x94: /* right double quote */ printf("”"); break; case 0x95: /* bullet */ printf("•"); break; case 0x96: /* endash */ printf("–"); break; case 0x97: /* emdash */ printf("—"); break; case 0x98: /* tilde accent */ printf("˜"); break; case 0x99: /* trademark ligature */ printf("™"); break; case 0x9A: /* s Haceks Hacek */ printf("š"); break; case 0x9B: /* right single guillemet */ printf("›"); break; case 0x9C: /* oe ligature */ printf("œ"); break; case 0x9F: /* Y Dieresis */ printf("Ÿ"); break; default: putchar(c); break; } } static void print_utf8(unsigned short c) { if (c == 0) return; if (c < 0x80) OutputCharCorrected(c); else if (c < 0x800) { putchar(0xC0 | (c >> 6)); put_utf8(c); } else { putchar(0xE0 | (c >> 12)); put_utf8(c >> 6); put_utf8(c); } } static void put_utf8(unsigned short c) { putchar(0x0080 | ((short)c & 0x003F)); } xlhtml/xlhtml/0040755000076400007640000000000007500147312014035 5ustar jackshckjackshckxlhtml/xlhtml/CVS/0040755000076400007640000000000007473177127014510 5ustar jackshckjackshckxlhtml/xlhtml/CVS/Root0100644000076400007640000000006307473177126015351 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/xlhtml/CVS/Repository0100644000076400007640000000001607473177126016603 0ustar jackshckjackshckxlhtml/xlhtml xlhtml/xlhtml/CVS/Entries0100644000076400007640000000177207473177127016050 0ustar jackshckjackshck/ChangeLog/1.9/Thu May 16 15:20:20 2002// /Makefile.am/1.9/Wed May 15 01:58:35 2002// /Makefile.in/1.14/Wed May 15 01:58:35 2002// /README/1.2/Thu May 16 16:31:32 2002// /THANKS/1.1.1.1/Wed Mar 20 15:32:47 2002// /TODO/1.2/Wed May 15 01:58:35 2002// /Test.xls/1.1.1.1/Wed Mar 20 15:32:49 2002/-kb/ /ascii.c/1.6/Thu May 16 16:31:32 2002// /doxygen.conf/1.2/Wed May 15 01:58:35 2002// /gpdemo/1.1.1.1/Wed Mar 20 15:32:50 2002// /html.c/1.9/Thu May 16 16:31:32 2002// /nsopen/1.1.1.1/Wed Mar 20 15:32:50 2002// /nsxlview/1.1.1.1/Wed Mar 20 15:32:50 2002// /support.c/1.7/Thu May 16 16:31:32 2002// /support.h/1.2/Thu May 16 16:17:56 2002// /tuneable.h/1.3/Thu May 16 16:31:32 2002// /version.h/1.3/Thu Apr 11 04:01:05 2002// /xlcdump.c/1.2/Thu May 16 16:31:32 2002// /xldump.c/1.3/Thu May 16 16:31:32 2002// /xlhtml.1/1.2/Thu May 16 15:20:20 2002// /xlhtml.c/1.21/Thu May 16 16:31:32 2002// /xlhtml.h/1.11/Thu May 16 16:31:32 2002// /xls-handler/1.1.1.1/Wed Mar 20 15:32:59 2002// /xml.c/1.8/Thu May 16 16:31:32 2002// D xlhtml/xlhtml/CVS/Entries.Log0100644000076400007640000000002007473177127016551 0ustar jackshckjackshckA D/contrib//// xlhtml/xlhtml/contrib/0040755000076400007640000000000007473177127015515 5ustar jackshckjackshckxlhtml/xlhtml/contrib/CVS/0040755000076400007640000000000007473177127016150 5ustar jackshckjackshckxlhtml/xlhtml/contrib/CVS/Root0100644000076400007640000000006307473177127017012 0ustar jackshckjackshck:ext:slidedraw@cvs.chicago.sf.net:/cvsroot/chicago xlhtml/xlhtml/contrib/CVS/Repository0100644000076400007640000000002607473177127020245 0ustar jackshckjackshckxlhtml/xlhtml/contrib xlhtml/xlhtml/contrib/CVS/Entries0100644000076400007640000000110107473177127017472 0ustar jackshckjackshck/convertXLS.cgi/1.1.1.1/Wed Mar 20 15:33:02 2002// /convertXLS.html/1.1.1.1/Wed Mar 20 15:33:02 2002// /convertXLS.txt/1.1.1.1/Wed Mar 20 15:33:02 2002// /excel2text/1.1.1.1/Wed Mar 20 15:33:02 2002// /excel2text.txt/1.1.1.1/Wed Mar 20 15:33:02 2002// /nsopen/1.1.1.1/Wed Mar 20 15:33:02 2002// /nsxlview/1.1.1.1/Wed Mar 20 15:33:02 2002// /uploader.pl/1.1.1.1/Wed Mar 20 15:33:03 2002// /uploader.txt/1.1.1.1/Wed Mar 20 15:33:03 2002// /xlhtml.dtd/1.1.1.1/Wed Mar 20 15:33:03 2002// /xlhtml.dtd.txt/1.1.1.1/Wed Mar 20 15:33:03 2002// /xlv/1.1.1.1/Wed Mar 20 15:33:03 2002// D xlhtml/xlhtml/contrib/convertXLS.cgi0100755000076400007640000003360607446125656020260 0ustar jackshckjackshck#!/usr/bin/perl # # File Upload Script, slightly modified by Caolan.McNamara@ul.ie to # serve as a msword to html gateway. # original notice follows # # modify lines 89 & 401 for your own configuration. # # # # # File Upload Script Version 6.00 # Created by Jeff Carnahan jeffc@terminalp.com # Created on: 4/8/95 Last Modified on: 01/23/98 23:06 # Scripts Archive: http://www.terminalp.com/scripts/ # # --------------------------------------------------------------------- # # Copyright (C) 1996 Jeffrey D. Carnahan # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # A full copy of the GNU General Public License can be retrieved from # http://www.terminalp.com/scripts/license.shtml # # - Jeff Carnahan Variable: # $SAVE_DIRECTORY # --> Function: # Defines the path to the directory # on the server that should be used # as the folder to save files into. # --> Directory Permissions: # a+rwx # --> Additional Notes: # This path should not have a # trailing forward slash. Also # remember that this is a path, not # a URL. Use something similar to: # # /home/myself/www/uploads # $MAXIMUM_UPLOAD = 0; # # --> Variable: # $MAXIMUM_UPLOAD # --> Function: # Defines the number of bytes that # can be uploaded. Files that exceed # this limit will not be saved on the # server. # --> Additional Notes: # Set this to zero in order to # disable size checking. # $ALLOW_INDEX = 0; # # --> Variable: # $ALLOW_INDEX # --> Function: # If set to zero, files whose # names begin with the word # index will not be saved. # # Set to one to allow files # named index* to be uploaded. # --> Additional Notes: # $SUCCESS_LOCATION = "" # # --> Variable: # $SUCCESS_LOCATION # --> Function: # Defines the URL that users # should be redirected to if # the script works properly. If # this is left blank, a default # page will be returned to the # user. # --> Additional Notes: # This is a COMPLETE URL, not # a path. } # # End of Configurable Options. # --------------------------------------------------------------------- # --------------------------------------------------------------------- # --> Do Not Change Anything Below This Line. <-- # # --------------------------------------------------------------------- # --------------------------------------------------------------------- $| = 1; chop $SAVE_DIRECTORY if ($SAVE_DIRECTORY =~ /\/$/); use CGI qw(:standard); $query = new CGI; if ( (!(-e $SAVE_DIRECTORY)) || (!(-W $SAVE_DIRECTORY)) || (!(-d $SAVE_DIRECTORY)) ) { print header; print <<__END_OF_HTML_CODE__; Error: Bad Directory

Bad Directory

The directory you specified:

\$SAVE_DIRECTORY = "$SAVE_DIRECTORY";

is invalid. This problem is caused by one of the three following reasons:
  1. The directory doesn't exist. Make sure that this directory is a complete path name, not a URL or something similar. It should look similar to /home/username/public_html/uploads

  2. The directory isn't writable. Make sure that this directory is writable by all users. At your UNIX command prompt, type chmod 777 $SAVE_DIRECTORY

  3. The directory you specified isn't really a directory. Make sure that this is indeed a directory and not a file.

__END_OF_HTML_CODE__ exit; } foreach $key (sort {$a <=> $b} $query->param()) { next if ($key =~ /^\s*$/); next if ($query->param($key) =~ /^\s*$/); next if ($key !~ /^file-to-upload-(\d+)$/); $Number = $1; if ($query->param($key) =~ /([^\/\\]+)$/) { $Filename = $1; $Filename =~ s/^\.+//; $File_Handle = $query->param($key); if (!$ALLOW_INDEX && $Filename =~ /^index/i) { print header; print <<__END_OF_HTML_CODE__; Error: Filename Problem

Filename Problem

You attempted to upload a file that isn't properly formatted. The system administrator has decided that you can't upload files that begin with the word 'index'. Please rename the file on your computer, and try uploading it again.


__END_OF_HTML_CODE__ exit; } } else { $FILENAME_IN_QUESTION = $query->param($key); print header; print <<__END_OF_HTML_CODE__; Error: Filename Problem

Filename Problem

You attempted to upload a file that isn't properly formatted. The file in question is $FILENAME_IN_QUESTION Please rename the file on your computer, and attempt to upload it again. Files may not have forward or backward slashes in their names. Also, they may not be prefixed with one (or more) periods.


__END_OF_HTML_CODE__ exit; } if (!open(OUTFILE, ">$SAVE_DIRECTORY\/$Filename")) { print "Content-type: text/plain\n\n"; print "-------------------------\n"; print "Error:\n"; print "-------------------------\n"; print "File: $SAVE_DIRECTORY\/$Filename\n"; print "-------------------------\n"; print "There was an error opening the Output File\n"; print "for Writing.\n\n"; print "Make sure that the directory:\n"; print "$SAVE_DIRECTORY\n"; print "has been chmodded with the permissions '777'.\n\n"; print "Also, make sure that if your attempting\n"; print "to overwrite an existing file, that the\n"; print "existing file is chmodded '666' or better.\n\n"; print "The Error message below should help you diagnose\n"; print "the problem.\n\n"; print "Error: $!\n"; exit; } undef $BytesRead; undef $Buffer; while ($Bytes = read($File_Handle,$Buffer,1024)) { $BytesRead += $Bytes; print OUTFILE $Buffer; } push(@Files_Written, "$SAVE_DIRECTORY\/$Filename"); $TOTAL_BYTES += $BytesRead; $Confirmation{$File_Handle} = $BytesRead; close($File_Handle); close(OUTFILE); chmod (0666, "$SAVE_DIRECTORY\/$Filename"); } $FILES_UPLOADED = scalar(keys(%Confirmation)); if ($TOTAL_BYTES > $MAXIMUM_UPLOAD && $MAXIMUM_UPLOAD > 0) { foreach $File (@Files_Written) { unlink $File; } print header; print <<__END_OF_HTML_CODE__; Error: Limit Reached

Limit Reached

You have reached your upload limit. You attempted to upload $FILES_UPLOADED files, totalling $TOTAL_BYTES. This exceeds the maximum limit of $MAXIMUM_UPLOAD bytes, set by the system administrator. None of your files were successfully saved. Please try again.


__END_OF_HTML_CODE__ exit; } if ($SUCCESS_LOCATION !~ /^\s*$/) { print $query->redirect($SUCCESS_LOCATION); } else { print header; $command = join(' ',"/opt/bin/xlhtml -a ","\"$SAVE_DIRECTORY\/$Filename\""); system($command); system "rm -f $SAVE_DIRECTORY/$Filename"; foreach $key (keys (%Confirmation)) { print "$key - $Confirmation{$key} bytes\n"; } print <<__END_OF_HTML_CODE__;


__END_OF_HTML_CODE__ exit; } # --------------------------------------------------------------------- # EOF xlhtml/xlhtml/contrib/convertXLS.html0100644000076400007640000000237307446125656020454 0ustar jackshckjackshck MS Excel Spreadsheet converter Web Gateway

An Excel Sheet converter Web Gateway

This is a web gateway converter for Excel Spreadsheet documents to html. This tool will convert any Microsoft Excel spreadsheet (XLS) file you send it, and then display the results in HTML format for you to read with your web browser.

To use this tool, press the Browse button below, and select the MS Excel XLS document you want to convert. Then Press the Upload File button to send it here for conversion.

File:
 


xlhtml/xlhtml/contrib/convertXLS.txt0100644000076400007640000000107207446125656020322 0ustar jackshckjackshckconvertXLS is a cgi-bin script that allows you to set up a file conversion server. There are no restrictions on file size. To set it up on Apache: 1) copy convertXLS.html to /home/httpd/html 2) copy convertXLS.cgi to /home/httpd/cgi-bin 3) Change to the cgi-bin directory in step 2 and open the convertXLS.cgi file with an editor. Find line 388 and change the path to where you installed xlhtml. To Test: 1) start Netscape and goto http://localhost/convertXLS.html 2) Browse to xlhtml directory and chose Test.xls if you don't have an Excel file. xlhtml/xlhtml/contrib/excel2text0100755000076400007640000000060407446125656017527 0ustar jackshckjackshck#!/bin/sh # excel2text - convert MS Excel files to ASCII text # # Written by Gary Johnson, Agilent Technologies . prog=${0##*/} htmlfile=$1.html if [ $# -ne 1 ] then echo "Usage: $prog file" >&2 exit 2 fi if [ -f $htmlfile ] then echo "$prog: $htmlfile already exists." >&2 exit 2 fi xlhtml -te $1 > $htmlfile w3m -dump $htmlfile rm -f $htmlfile xlhtml/xlhtml/contrib/excel2text.txt0100644000076400007640000000167407446125656020352 0ustar jackshckjackshckTo enable Mutt to display Excel attachments, follow these steps. 1. Make sure the following programs are in a directory in your PATH: excel2text xlhtml w3m 2. Add these lines to Mutt's mailcap file: application/excel; excel2text %s; copiousoutput application/ms-Excel; excel2text %s; copiousoutput application/msexcel; excel2text %s; copiousoutput application/vnd.ms-excel; excel2text %s; copiousoutput application/x-excel; excel2text %s; copiousoutput application/x-msexcel; excel2text %s; copiousoutput 3. To have Mutt automatically expand Excel attachments in-line, in addition to being able to view the attachments from the attachments menu, add these lines to Mutt's configuration file (e.g., ~/.muttrc): auto_view application/excel application/ms-Excel auto_view application/msexcel application/vnd.ms-excel auto_view application/x-excel application/x-msexcel xlhtml/xlhtml/contrib/nsopen0100755000076400007640000000075307446125656016747 0ustar jackshckjackshck#!/bin/sh if [ $# != 1 ]; then echo "Usage: $0 file" exit 1 fi file=$1 if [ ! -f $file ] then echo "$0: $file is not a file!" exit 2 fi if [ ! -r $file ] then echo "$0: File $file cannot be read" exit 4 fi #Try to open file in an existing netscape window (netscape -no-about-splash -remote "openFile(${file})") >& /dev/null #if this fails, it means that netscape is not running, so start it if [ $status ] then netscape -no-about-splash -no-install file:${file} fi xlhtml/xlhtml/contrib/nsxlview0100755000076400007640000000135407446125656017322 0ustar jackshckjackshck#!/bin/bash file=$1 if [ "$file"xx == xx ] then echo "Usage: $0 file.doc" exit 1 fi source=$1 #Generate a unique html filename (/tmp/scriptname.pidnum.html) # should use mkstemp, this is wholly bogus. com=basename $0 tmp=/tmp/${com}:t.$$ html=${tmp}.html xlhtml $source > $html if [ ! $? ] then echo "xlhtml failed" exit 4 fi if [ ! -s $html ] then echo "$0: failed to generate HTML file" exit 1 fi #File exists and is of length > 0, so open it nsopen $html #I do NOT remove the html file so that the user can click #on the "Back" button without generating a "file not found" #error - but uncomment the next line if you want it. if [ "$tmp"zz == zz ]; then echo "Aargh: \$tmp was null." else rm ${tmp}* fi exit 0 xlhtml/xlhtml/contrib/uploader.pl0100755000076400007640000002053007446125657017666 0ustar jackshckjackshck#!/usr/bin/perl =pod primary key is in $in{'pk'} FILE ITSELF is in the data somehow Then we offer a variety of links to go to next -- enterimage for all entries with a text entry but no photo entry? =cut sub mydie($){ print <<"BLAM";
Error $_[0] BLAM exit } flock LOG,LOCK_EX; seek(LOG,0,2); print LOG scalar(localtime)," $ENV{'REMOTE_ADDR'} $0 $$;$S\n"; print <<"FOO"; Content-Type: text/html FOO foreach $C (split(';',$ENV{'HTTP_COOKIE'})){ $C =~ m/^(\w+)=(.*)$/ and $Cookies{$1} = $2; }; &ReadParsearoni; =pod $in{'filename'} is the file name. while(my ($k,$v) = each %in){ print "$k --> $v
\n"; }; =cut # adjust path to your xlhtml executable in the next line print `/opt/bin/xlhtml -a $in{'filename'}`; unlink $in{'filename'}; # comment out to keep uploaded files exit; sub PrintForm(){ print < Excel Spreadsheet Converter
What Excel file to display?
  
 
FORM exit; }; =pod file uploading code ripped from # Perl Routines to Manipulate CGI input # cgi-lib@pobox.com # $Id: uploader.pl,v 1.1.1.1 2002/03/20 15:33:03 slidedraw Exp $ # # Copyright (c) 1993-1998 Steven E. Brenner # For more information, see: # http://cgi-lib.stanford.edu/cgi-lib/ and modified heavily. (david nicol davidnicol@acm.org 02/22/1999) and yet again (david nicol davidnicol@acm.org 09/27/1999) =cut sub ReadParsearoni { # Parameters affecting cgi-lib behavior # User-configurable parameters affecting file upload. # Do not change the following parameters unless you have special reasons $cgi_lib'bufsize = 8192; # default buffer size when reading multipart $cgi_lib'maxbound = 100; # maximum boundary length to be encounterd # Get several useful env variables $type = $ENV{'CONTENT_TYPE'}; $len = $ENV{'CONTENT_LENGTH'}; $meth = $ENV{'REQUEST_METHOD'}; $maxdata = 131072; # maximum bytes to accept via POST - 2^17 if ($len > $maxdata) { mydie "Excel file is too large, at $len. The maximum size permitted is $maxdata"; } unless ($ENV{'CONTENT_TYPE'} =~ m#^multipart/form-data#) { # mydie "expecting multipart/form-data to upload an Excel Spreadsheet"; PrintForm; }; local ($buf, $boundary, $head, @heads, $cd, $ct, $fname, $ctype, $blen); local ($bpos, $lpos, $left, $amt, $fn, $ser); local ($bufsize, $maxbound) = ($cgi_lib'bufsize, $cgi_lib'maxbound); # The following lines exist solely to eliminate spurious warning messages $buf = ''; ($boundary) = $type =~ /boundary="([^"]+)"/; #"; # find boundary ($boundary) = $type =~ /boundary=(\S+)/ unless $boundary; mydie ("Boundary not provided: probably a bug in your server") unless $boundary; $boundary = "--" . $boundary; $blen = length ($boundary); if ($ENV{'REQUEST_METHOD'} ne 'POST') { mydie("Invalid request method for multipart/form-data: $meth\n"); } $writefiles = './tempdata/'; stat ($writefiles); mydie "Cannot write to directory $writefiles" unless -d _ && -w _; # read in the data and split into parts: # put headers in @in and data in %in # General algorithm: # There are two dividers: the border and the '\r\n\r\n' between # header and body. Iterate between searching for these # Retain a buffer of size(bufsize+maxbound); the latter part is # to ensure that dividers don't get lost by wrapping between two bufs # Look for a divider in the current batch. If not found, then # save all of bufsize, move the maxbound extra buffer to the front of # the buffer, and read in a new bufsize bytes. If a divider is found, # save everything up to the divider. Then empty the buffer of everything # up to the end of the divider. Refill buffer to bufsize+maxbound # Note slightly odd organization. Code before BODY: really goes with # code following HEAD:, but is put first to 'pre-fill' buffers. BODY: # is placed before HEAD: because we first need to discard any 'preface,' # which would be analagous to a body without a preceeding head. $left = $len; PART: # find each part of the multi-part while reading data while (1) { die $@ if $errflag; $amt = ($left > $bufsize+$maxbound-length($buf) ? $bufsize+$maxbound-length($buf): $left); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); mydie "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; $in{$name} .= "\0" if defined $in{$name}; $in{$name} .= $fn if $fn; $name=~/([-\w]+)/; # This allows $insfn{$name} to be untainted if (defined $1) { $insfn{$1} .= "\0" if defined $insfn{$1}; $insfn{$1} .= $fn if $fn; } BODY: while (($bpos = index($buf, $boundary)) == -1) { if ($left == 0 && $buf eq '') { foreach $value (values %insfn) { unlink(split("\0",$value)); } mydie("cgi-lib.pl: reached end of input while seeking boundary " . "of multipart. Format of CGI input is wrong.\n"); } die $@ if $errflag; if ($name) { # if no $name, then it's the prologue -- discard if ($fn) { print FILE substr($buf, 0, $bufsize); } else { $in{$name} .= substr($buf, 0, $bufsize); } } $buf = substr($buf, $bufsize); $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; } if (defined $name) { # if no $name, then it's the prologue -- discard if ($fn) { print FILE substr($buf, 0, $bpos-2); } else { $in {$name} .= substr($buf, 0, $bpos-2); } # kill last \r\n } close (FILE); last PART if substr($buf, $bpos + $blen, 2) eq "--"; substr($buf, 0, $bpos+$blen+2) = ''; $amt = ($left > $bufsize+$maxbound-length($buf) ? $bufsize+$maxbound-length($buf) : $left); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; undef $head; undef $fn; HEAD: while (($lpos = index($buf, "\r\n\r\n")) == -1) { if ($left == 0 && $buf eq '') { foreach $value (values %insfn) { unlink(split("\0",$value)); } mydie("cgi-lib: reached end of input while seeking end of " . "headers. Format of CGI input is wrong.\n$buf"); } die $@ if $errflag; $head .= substr($buf, 0, $bufsize); $buf = substr($buf, $bufsize); $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; } $head .= substr($buf, 0, $lpos+2); push (@in, $head); @heads = split("\r\n", $head); ($cd) = grep (/^\s*Content-Disposition:/i, @heads); ($ct) = grep (/^\s*Content-Type:/i, @heads); ($name) = $cd =~ /\bname="([^"]+)"/i; #"; ($name) = $cd =~ /\bname=([^\s:;]+)/i unless defined $name; ($fname) = $cd =~ /\bfilename="([^"]*)"/i; #"; # filename can be null-str ($fname) = $cd =~ /\bfilename=([^\s:;]+)/i unless defined $fname; $incfn{$name} .= (defined $in{$name} ? "\0" : "") . (defined $fname ? $fname : ""); ($ctype) = $ct =~ /^\s*Content-type:\s*"([^"]+)"/i; #"; ($ctype) = $ct =~ /^\s*Content-Type:\s*([^\s:;]+)/i unless defined $ctype; $inct{$name} .= (defined $in{$name} ? "\0" : "") . $ctype; $fn = $writefiles."temp$$"."a"; while (-e $fn){ $fn++ }; open (FILE, ">$fn") || mydie("Couldn't open $fn $!\n"); #print "Wanting to write " and mydie("Couldn't open $fn $!\n"); substr($buf, 0, $lpos+4) = ''; undef $fname; undef $ctype; } if ($errflag) { local ($errmsg, $value); $errmsg = $@ || $errflag; foreach $value (values %insfn) { unlink(split("\0",$value)); } mydie($errmsg); } else { # everything's ok. } } xlhtml/xlhtml/contrib/uploader.txt0100644000076400007640000000206607446125657020073 0ustar jackshckjackshckuploader.pl is a cgi-bin wrapper that allows a server with xlhtml to convert xls files via the Netscape Upload form. Note: there is a file size limit of 128K. Here's the steps to get it working on Apache: 1) With a editor, go to line 45 and correct the path to the xlhtml executable on your system. You can use 'which xlhtml' if you don't know. Also, line 1 may need changing depending on where perl is on your system. 2) Copy the file uploader to /home/httpd/cgi-bin 3) cd /home/httpd/cgi-bin 4) chmod +x uploader.pl from the cgi-bin directory 5) In the cgi-bin directory mkdir tempdata 6) chmod 0007 tempdata 7) In Netscape, type: http://localhost/cgi-bin/uploader.pl and press Enter. If it is setup correctly, you should have a form and then you can select Test.xls if you don't have one and try it. enjoy ________________________________________________________________________ David Nicol 816.235.1187 nicold@umkc.edu "Atomkraft? Nein, danke!" -- Martin Schwartz xlhtml/xlhtml/contrib/xlhtml.dtd0100644000076400007640000000313007446125657017515 0ustar jackshckjackshck xlhtml/xlhtml/contrib/xlhtml.dtd.txt0100644000076400007640000000010607446125657020333 0ustar jackshckjackshckxlhtml.dtd is the dtd file that is needed for the XML output option. xlhtml/xlhtml/contrib/xlv0100755000076400007640000000361107446125657016253 0ustar jackshckjackshck#!/usr/bin/perl -w # # xlv - pass xl file thru xlHtml and display as plain text # The point of this script is to produce legible approximation of the # spreadsheet within 80 columns, sacrificing data as necessary to fit. # This aids reading mail with mutt. Works well for phone lists and stuff # like that. # # Copyright Asher Blum November 2000 # Released per the GNU General Public License use strict; my $term_width = 80; undef $/; my $xls = <>; my $fn = "/tmp/$$.xls"; open "XL", ">$fn" or die "Can't open XLS: $!"; print XL $xls; close XL; open HTML, "xlhtml $fn |" or die "Can't start xlhtml: $!"; my $page = ; close HTML; my @table; $page =~ s/ / /g; $page =~ s/\s+/ /g; my @rows = split(/]*>/i, $page); shift @rows; my @total_width = my @width = map 0, split /]*>/i, $rows[ 0 ]; foreach my $row(@rows) { my @cells = split /]*>/i, $row; shift @cells; pop @cells; for(0..$#cells) { $cells[ $_ ] =~ s/<[^>]+>//g; $cells[ $_ ] =~ s/\s+$//; $width[ $_ ] = length($cells[ $_ ]) unless $width[ $_ ] > length($cells[ $_ ]); $total_width[ $_ ] += length($cells[ $_ ]); } push @table, [ @cells ]; } # Now trim the widths to fit avail terminal width my @avg_width = map($_ / @rows, @total_width); my @waste_width = map($width[ $_ ] - $avg_width[ $_ ], 0..$#width); while(sum(@width) > $term_width - @width) { # remember, we waste 1 space my $mw = most_wasteful(); $width[ most_wasteful() ]--; @waste_width = map($width[ $_ ] - $avg_width[ $_ ], 0..$#width); } foreach my $row(@table) { for(0..(@$row - 1)) { printf('%-' . $width[ $_ ] . '.' . $width[ $_ ] . 's ', $row->[ $_ ]); } print"\n"; } sub sum { my $s; $s += $_ for @_; $s; } sub most_wasteful { my $max = 0; for(0..$#waste_width) { $max = $_ if $waste_width[ $_ ] > $max; } $max; } xlhtml/xlhtml/ChangeLog0100644000076400007640000002160007500147014015602 0ustar jackshckjackshck xlHtml ChangeLog 0.5.1 06/07/02 - Vaclav Dvorak * Temporary fix for non-Unicode 8-bit characters in utf-8 output until real charset conversion is in place * Fixed some typos and formatting * Fixed closing of tag * Fixed invalid XML output - missing quotes aroud size attribute of * Made rowspan and colspan attributes instead of content of in XML output * Updated doxygen.conf and in-source documentation and comments * Fixed SST code when a string on the boundary of a BIFF SST and CONTINUE starts as Unicode and continues as 8-bit or vice versa; indication: raw Unicode (A.b.c.d., where . is character 0x00) in output, or MaxStringsExceeded * Enabled compilation warnings, made sure there are none * More code modularization * Fixed handling of fonts (fixes some segfaults, closes bug 529044) * Added some Alpha portability fixes. 0.5 04/13/02 * Fixed some memory leaks * Increased file name limit to 256 characters 0.4.9.3 03/19/02 * Began code modularization * Changed pointers to xlhtml web site 0.4.9.2 03/13/02 * Turned over xlhtml to Charles Wyble * Added a patch to support bold formatting 0.4.9.1 03/10/02 * Fixed bug in cole.c which causes errors reading ppthtml files - Takahiro Kambe * Fixed bug in page name output for non-html output * xlhtml now uses Microsoft CodePages - Victor Wagner 0.4.9.0 12/09/01 * Cleanup of cole library to pass lint better * Added command line switches for --help --ascii, usage - Charles Wyble * Don't read past buffer end on malformed fonts. 0.4 12/03/01 * removed spurrious tab before closing XML tag - Mike Ralphson * Fixed bug in trim edges * Many signed / unsigned cleanups * Updated the xldump utility - Charles Wyble * Added xlcdump utility to dump chart information - Charles Wyble * Added doxygen doco generation - Rafael Kitover * Added patch to support String Formulas - Rafael Kitover * Changed unsupported numeric formats to output using floating point technique with the decimal suppressed. Was truncating to MAXINT. * Fixed bug where CSV was not escaping currency fields - Rafael Kitover * Fixed bug where unknown field types were not escaped in CSV - Rafael Kitover * Fixed bug in cell merging where the whole row was selected * Fixed bug in mailto hyperlink * Now supports custom colors * New command line option -nh to suppress header & body tags in html * Fixed bug where tab delimited was allowing an extra tab at the EOL * Fixed bug in blank cells for CSV output - Thorsten Koch * Added test for negative value in cole_fread * Optimized html further so it suppresses alignment of blank rows * Improved portability to DOS & WIN32 * Moved everything over to U8, U16, U32, F32, & F64 data types. This is in effort to improve support on 64 bit platforms. * Added the xlv script from Asher Blum 0.3 10/19/01 * Added drive letter check for DOS & Windows * Fixed situation where ellipses were not being rendered correctly * Fixed Unicode problem in Label Cells * Fixed problem where cells created by row data were not being updated when the cell was officially created. * Program renamed to xlhtml...all lowercase. * Moved xlHtml over to a new makefile system. It does a static build now. * Finished moving cole library to mkstemp from tempnam() * Cole library unlinks temp files after opening so they are deleted * Fixed Numeric formats that need a comma * Fixed font name to not have Rich Text * Added bounds checking to Row Info opcode * Fixed hyperlinks that are unicode. * Scripts changed to use mkstemp * Added support for many currency & accounting formats * Aggressive optimizations make smaller html now * Fixed several cases where Ascii output had html in it * Added CSV output patch from Rob Arnold * Added support for multiple fonts in same cell * Added patch for continuation from Hironori * Added support for multiple style attributes in same cell * Added support for Hyperlinks * Added XML patch from Jason Venner * Added xls-handler for Apache 0.2.8 01/14/2001 * Added man page * Improved Error Messages - David Brukman * Added empty SST strings - David Brukman * Fixed bug in RKtoDouble - David Brukman * Fixed extended string + rich string * Fixed a misplaced array initialization for ws_array * Fixed problem where the html closing tags were being output during error messages when -asc option was given * Changed all the comments over to standard C comments for increased portability 0.2.6 12/26/1999 * xlHtml is now self-scaling to whatever xls file you are viewing * More Unicode fixups * Added -m command line option to suppress multibyte * Added -asc & -dp commandline options to get ascii output and dump spreadsheet parameters. * Added -xp -xc -xr commandline options to extract a range of columns and rows on a page. This will facilitate integration with gnuplot. * Fixed RK floating point bug * Increased precision from 6 digits to 15 digits. 0.2.4 12/04/1999 * Added Cell Merging capabilities * Added -te command line option to "trim the edges" (empty rows or columns at the edges of a worksheet). * Added the contributed excel2text script to let mutt clients see xls attachments * Added a -v command line switch for version information * Added code to optimize font size statements similar to font face * Fixed Unicode bugs in font name and sheet name - Thanks Hironori ! * Re-wrote the cole_fread function. Changes were submitted to Arturo. 0.2.2 11/05/1999 * Fixed problem with date calculation * Fixed cells that had a string with only spaces in it * Unicode, unicode, unicode * Fixed a formula handling error for Excel 95 * Many little bug fixes * Ported to Borland C++ 5.0 under Win32 0.2.0 10/11/1999 * Added support for fraction data formats * Added -c command line option to center tables * Added -bc command line option to override the background color * Added -tc command line optine to override the text color * Added -bi command line option to add a background image * Added better support for Excel 95 & 5.0. Had to disable colors since it looked crazy. Probably has a different palette. * Added -a command line to use aggressive optimization. This doesn't generate closing tags for TD & TR tags. This could be a problem for older browsers. * Further reduced generated html output. * Program now displays the last saved value of a formula. * Added command line option to suppress warning that formula data may be stale or inaccurate. * Updated uploader.pl documentation * Added nsopen *bash* script in contrib directory 0.1.8 9/29/1999 * Added support for text built-in cell format * Reduced the amount of html output * Upgraded to the cole-2.0.1 Library * Moved xlHtml and all its files into the xlHtml directory 0.1.6 9/25/1999 * Re-designed the Test.xls file to really workout xlHtml * Added support for most built-in cell formats: date, time, number, and scientific formats * Added support for general formatting * Fixed MS induced glitch in LabelSST - only very large files would have this problem. * Fixed bug in default Row XF's - only seen in colored blank cells * Optimized html tags. Avg 40% less html! * Added more documentation in README-xlHtml * Cleaned out document folder. It had some files that were created from the ./configure script. Reduced total tar size significantly. * Fixed bug in RK number conversion 0.1.4 9/15/1999 * Added support for Sub & Superscripting * Added -nc command line option to uncolored output * Added support for font sizes * Added support for vertical alignment * Added 16 more colors to built-in palette * Added default row formatting * Added support for left, center, & right justification 0.1.2 9/11/1999 * Added Support for Bold, Underline, and Itallics Fonts * Now extracts Font Name * Colorizes Fonts based on default palette - 40 colors * Continue Record Support added for big files * Better protection for corrupt files 0.1.0 8/23/1999 * Added Support for RK & MulRK cells * Now pulls the title & last updated date from Global Data * Added stubs for all cell types that will be supported * Minor corrections based on BIFF8 specs 0.0.6 08/20/1999 * Added support for Multiple Worksheets * Added support for BoolErr for Office 97 files * Added support for Worksheet's title from the tab * Test.xls in examples directory is now Multi-worksheet 0.0.4 08/17/1999 * Added support for Floating Point (Number) Cells * Added basic support to collect font info * Added basic support to collect cell attributes * Added several error messages * Added lots of comments to the code 0.0.2 08/13/1999 First public release. * Packaged with the cole library and hacked the Makefile and configure scripts. * added disclaimer for floating point since its not correct. * string support is finished. * Labels are now supported. 0.0.1 08/8/1999 Initial Release. * So far it supports most strings, empty cells, and integers. xlhtml/xlhtml/Makefile.am0100644000076400007640000000123207470340313016066 0ustar jackshckjackshck## Process this file with automake to produce Makefile.in EXTRA_DIST = README ChangeLog TODO THANKS Test.xls Test.html xlhtml.1 INCLUDES = -I../cole noinst_PROGRAMS = xldump xlcdump noinst_SCRIPTS = xls-handler gpdemo man_MANS = xlhtml.1 bin_SCRIPTS = nsopen nsxlview bin_PROGRAMS = xlhtml LDADD = ../cole/libcole.a -lm xlhtml_SOURCES = support.c xlhtml.c html.c ascii.c xml.c xldump_SOURCES = xldump.c xlcdump_SOURCES = xlcdump.c AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith doc: doxygen.conf xlhtml.c ascii.c xml.c html.c support.c xlhtml.h tuneable.h @echo Generating documentation... doxygen doxygen.conf @echo done. distclean: rm -rf doc xlhtml/xlhtml/Makefile.in0100644000076400007640000002611207500147265016110 0ustar jackshckjackshck# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ COLE_MAJOR = @COLE_MAJOR@ COLE_MICRO = @COLE_MICRO@ COLE_MINOR = @COLE_MINOR@ HOST_ALIAS_NAME = @HOST_ALIAS_NAME@ HOST_CANONICAL_NAME = @HOST_CANONICAL_NAME@ HOST_CPU = @HOST_CPU@ HOST_OS = @HOST_OS@ HOST_VENDOR = @HOST_VENDOR@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ VERSION = @VERSION@ EXTRA_DIST = README ChangeLog TODO THANKS Test.xls Test.html xlhtml.1 INCLUDES = -I../cole noinst_PROGRAMS = xldump xlcdump noinst_SCRIPTS = xls-handler gpdemo man_MANS = xlhtml.1 bin_SCRIPTS = nsopen nsxlview bin_PROGRAMS = xlhtml LDADD = ../cole/libcole.a -lm xlhtml_SOURCES = support.c xlhtml.c html.c ascii.c xml.c xldump_SOURCES = xldump.c xlcdump_SOURCES = xlcdump.c AM_CFLAGS = -Wall -Wshadow -Wcast-align -Wpointer-arith mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ xlhtml_OBJECTS = support.o xlhtml.o html.o ascii.o xml.o xlhtml_LDADD = $(LDADD) xlhtml_DEPENDENCIES = ../cole/libcole.a xlhtml_LDFLAGS = xldump_OBJECTS = xldump.o xldump_LDADD = $(LDADD) xldump_DEPENDENCIES = ../cole/libcole.a xldump_LDFLAGS = xlcdump_OBJECTS = xlcdump.o xlcdump_LDADD = $(LDADD) xlcdump_DEPENDENCIES = ../cole/libcole.a xlcdump_LDFLAGS = SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ man1dir = $(mandir)/man1 MANS = $(man_MANS) NROFF = nroff DIST_COMMON = README ChangeLog Makefile.am Makefile.in THANKS TODO DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best SOURCES = $(xlhtml_SOURCES) $(xldump_SOURCES) $(xlcdump_SOURCES) OBJECTS = $(xlhtml_OBJECTS) $(xldump_OBJECTS) $(xlcdump_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps xlhtml/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done mostlyclean-noinstPROGRAMS: clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) distclean-noinstPROGRAMS: maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: xlhtml: $(xlhtml_OBJECTS) $(xlhtml_DEPENDENCIES) @rm -f xlhtml $(LINK) $(xlhtml_LDFLAGS) $(xlhtml_OBJECTS) $(xlhtml_LDADD) $(LIBS) xldump: $(xldump_OBJECTS) $(xldump_DEPENDENCIES) @rm -f xldump $(LINK) $(xldump_LDFLAGS) $(xldump_OBJECTS) $(xldump_LDADD) $(LIBS) xlcdump: $(xlcdump_OBJECTS) $(xlcdump_DEPENDENCIES) @rm -f xlcdump $(LINK) $(xlcdump_LDFLAGS) $(xlcdump_OBJECTS) $(xlcdump_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else if test -f $(srcdir)/$$p; then \ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) list='$(bin_SCRIPTS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done install-man1: $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @list='$(man1_MANS)'; \ l2='$(man_MANS)'; for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done install-man: $(MANS) @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-man1 uninstall-man: @$(NORMAL_UNINSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = xlhtml distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-binPROGRAMS install-binSCRIPTS install-exec: install-exec-am install-data-am: install-man install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-man uninstall: uninstall-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(MANS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(mandir)/man1 mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \ mostlyclean-compile mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-binPROGRAMS clean-noinstPROGRAMS clean-compile \ clean-tags clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-binPROGRAMS distclean-noinstPROGRAMS \ distclean-compile distclean-tags distclean-generic \ clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-noinstPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \ clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS \ install-man1 uninstall-man1 install-man uninstall-man tags \ mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ distdir info-am info dvi-am dvi check check-am installcheck-am \ installcheck install-exec-am install-exec install-data-am install-data \ install-am install uninstall-am uninstall all-redirect all-am all \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean doc: doxygen.conf xlhtml.c ascii.c xml.c html.c support.c xlhtml.h tuneable.h @echo Generating documentation... doxygen doxygen.conf @echo done. distclean: rm -rf doc # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xlhtml/xlhtml/README0100644000076400007640000001230507470757344014735 0ustar jackshckjackshckWelcome to xlhtml. I. INTRODUCTION The xlhtml program will take an Excel 95, or 97 file as input and convert it to highly optimized html. The output is via standard out so it can be re-directed to files or piped to filters or used as a gateway on the internet. II. INSTALLATION If you are upgrading, run the 'make uninstall' target from the original directory before following these steps. To build this application, from the top directory type: ./configure --prefix=/ make make install Then to finish it up, you will need to go into netscape and tell the navigator to use the nsxlview script to handle Microsoft Excel files. e.g. /nsxlview %s You should be able to then browse to a file and open it. There is a file included in the xlhtml directory you can test with: Test.xls. The shell scripts: nsxlview & nsopen may need modification to correct the paths to fit your system. Also, depending on where you install it, you may have to modify your PATH environmental variable. III. UNINSTALLING You may want to keep this directory around since you can do a make uninstall later. In the meantime, I suggest doing a make clean after installation to minimize disk space useage. IV. COMMANDLINE OPTIONS xlhtml now has several command line options that let you tailor its output. The command is now: xlhtml [-nc -a -fw -bc -tc -bi -c] file.xls Where -nc tells it not to colorize the output. -a aggressively optimize html by removing or VALIGN="bottom" Some older browsers may not display properly in this mode. -fw suppress formula warnings about accuracy -bc Override the background color. e.g. -bg808080 for gray -tc Override the text color. e.g. -tcFF0000 for red -bi Use background image e.g. -bi/home/httpd/icon/tar.gif -c Centers the tables horizontally -te Trims empty rows & columns at the edges of a worksheet -v Prints program version -m No encoding for multibyte -asc Ascii out of -dp and extraction data (-x?) -dp Dump page count and max columns and rows per page -xp Page for extraction (zero based) -xc Columns (separated by a dash) for extraction (zero based) -xr Rows (separated by a dash) to be extracted (zero based) An example of the extraction command line is: xlhtml -fw -asc -xp:0 -xr:2-6 -xc:0-1 Test.xls The extraction output is: Formatted output of cells by column left to right, columns separated by a tab, end of row is: 0x0A, end of file: \n\n *NOTE: Run the gpdemo file for a demonstration plot in Netscape. Also, you MUST specify all 3 -x commands or the results may not be as desired. V. PERFORMANCE TUNING There are some user "tunable" parameters in the beginning of the xlhtml.c file. The program allocates resources in chunks so that it scales efficiently without wasting memory. The smaller the chunks, the less wasted memory. The trade off, though, is that it has to allocate memory more often - which slows things down. Odds are, you should never need to change them from the default. VI. INTERNATIONAL CHARACTERS xlhtml uses three different character sets. It tries to use ascii until it finds a character greater than 127. At this point, it switches to the windows-1252 characterset. If the excel file specifies any 2 byte characters, it switches to utf-8. This handles most situations correctly. If however, you find yourself with a system that does not support utf-8 (text mode browsers & some versions of unix) and you need multi-byte support, try using the program lv.It can be downloaded from: http://www.ff.iij4u.or.jp/~nrt/lv/ The text only browser, w3m, could be used as follows for Japanese: xlhtml file.xls | lv -Iu8 -Oej | w3m -T text/html (Thanks to Hironori Sakamoto for this suggestion.) VII. TROUBLESHOOTING Using Netscape, you may occassionally see a file not found error. This usually comes when printing or going back to a previously converted file. This is the default behavior and it can be changed by commenting out the rm $tmp* in nsxlview. I do this so you don't have files hanging around in your tmp directory where other people might be able to see them. In general, if you can type xlhtml and get a usage error message, the PATH is working. If you don't, your PATH environmental variable needs adjusting. Next try passing the full path to xlhtml of the file you want converted. If it has problems with it, you may have a file the system can't interpret. To check your installation, try passing the full path of xlhtml/Test.xls and see what it does with that. If you get an error message saying "get another compiler"...this comes from the cole library. It needs a recent copy of automake, autoconf, or libtool. You can manually adjust the header files if you know you machine data sizes. VIII. CONTRIBUTED SCRIPTS xlhtml now has a contributed scripts directory. If you look in the xlhtml/contrib directory you will find what people are giving me. I cannot offer support for files I didn't create, but there is contact information with the files. If you have something to share...send it to me. If you've contributed...THANKS! Charles N Wyble jackshck@thewybles.com xlhtml/xlhtml/THANKS0100644000076400007640000000073107446125637014765 0ustar jackshckjackshck Arturo Tena for the cole 2.0 library Caolan McNamara for MSWordView...where I got the nsopen & nsxlview scripts David Nicol for the Uploader Perl script Bradley Marshall for converting the nsxlview & nsopen scripts to bash Glen Stewart for rounding up the convertXLS scripts Hironori Sakamoto for several BIG unicode patches Gary Johnson for the excel2text mutt script David Brukman for xlhtml patch Jason Venner for the XML patch Asher Blum for the xlv script xlhtml/xlhtml/TODO0100644000076400007640000000124307470340313014524 0ustar jackshckjackshck- Update documentation - Implement real character set conversion (using iconv); there should be a command-line option to set output charset and another to override input charset. Default: auto-detection for both. - Define an XML DTD and stick to it. Look into the OpenOffice spreadsheet format - we don't need two different spreadsheet XML formats... - Modularize code. Separate XLS reading into a library, make a frontend with various output formats: XML, HTML, CSV... - Make main_line_processor()'s working buffer grow dynamically - Notes from Steve Grubb: - Support String formulas - Reduce memory footprint - Support data types by using their format string xlhtml/xlhtml/Test.xls0100644000076400007640000010100007446125641015503 0ustar jackshckjackshckÐÏࡱá>þÿ ?þÿÿÿþÿÿÿ>ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ òÌÉá°Áâ\p Steve Grubb B°a= œ¯¼=h<L,¨8X@"·Ú1ÈÿZArial1ÈÿZArial1ÈÿZArial1ÈÿZArial1È ZArial1Èÿ¼ZArial1È ¼ZArial1ÈÿZArial1ÈÿZArial1È9ZArial1ÈZArial1È ZArial1È:ZArial1È8ZArial1ÈZArial1È>ZArial1È?ZArial1ÈZArial1È5ZArial1ÈZArial1ÈZArial1È6ZArial1ÈZArial1È4ZArial1È2ZArial1È1ZArial1È0ZArial1ÈZArial1È7ZArial1ÈZArial1È3ZArial1È ZArial1È ZArial1ÈZArial1È(ZArial1È=ZArial1ÈZArial1È-ZArial1È/ZArial1È+ZArial1È*ZArial1È)ZArial1È,ZArial1È.ZArial1È ZArial1È ZArial1È ZArial1 ÿZArial1ðÿZArial1ÿZArial1hÿZArial1àÿZArial1ÐÿZArial1ÀÿZArial1ÈÿZArial1*ðÿZ Comic Sans MS1.ÿZBrush Script MT1ðÿZVerdana1.ðÿZTimes New Roman1&ðÿZ Courier New1È;ZArial1È<ZArial1´ ZArial1´$ZArial1ÈÿZArial1ÈÿZArial1ðÿ¼ZArial1Èÿ¼ZArial"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)7*2_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).))_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?,:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)6+1_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)¤m/d¥ "$"#,##0.00 ¦mmmm\-yy§mmmm\ d\,\ yyyy ¨mm/dd/yy© dd\-mmm\-yyª0.0000000000000000%« 0.000000000000000000000000000000àõÿ À àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ àõÿ ôÀ à À à+õÿ øÀ à)õÿ øÀ à,õÿ øÀ à*õÿ øÀ à@ôÿôÀ à?ôÿôÀ à õÿ øÀ à À à À à"À à À à!À à!À à À à  À à @ @ À à ff@ @ À à UU@ @ À à UU  À à   À à UU‘‘À à- H à, H< à+ H; à* H: à) H8 à( H à' H? à& H à% H5 à$ H à# H à" H à! H à  H6 à H à H à H4 à H2 à H9 à H7 à  H à H0 à H1 à H à H= à H( à  H à H à  H à H3 à H à H à H. à H, à H) à H* à  H+ à. À à/ À à @ à @ à @ à @ à @ à @ à @ à @ à @! à @" à @# à @$ à @% à @& à @' à @ à0 À à1 À à2 À à3 À à4 À à5 À à6 À à À ठÀ à À à À à À à À à À à- À à. À à/ À à À ॠÀ à  À à  À à, À à  À à7 À à!À à#À à8 À à9 À à: À à; À à< À à= H/ à  À ঠÀ à§ À à À à"À à À à7 À à> H- à À à7 À à?Q À à?Q À à«"À àª"À à"À “€ÿ“€ÿ“€ÿ“€ÿ“€ ÿ“€ÿ“€ÿ“€ÿ`…i'General…¼3Formats… Ë@Text…>FColors…—P Hyperlinks…”T Bar ChartŒ®AVG HTML_CodePageäœ HTML_Control`°, 'Hyperlinks'!$A$1:$A$6'Text'!$A$1:$E$18'General'!$A$1:$D$36'Colors'!$A$1:$G$40'Formats'!$A$1:$J$36"HTML_Description HTML_Email$ HTML_HeaderFormats' HTML_LastUpdate8/5/01HTML_LineAfter HTML_LineBefore' HTML_Name Steven Grubb HTML_OBDlg2 HTML_OBDlg4HTML_OS+ HTML_PathFile D:\Test.html  HTML_TitleTest range;üˈCell 1Cell 2Cell 3Cell 4Cell 5Cell 6Cell 7Cell 8Cell 9Cell 10Cell 11Cell 12Cell 13Cell 15Cell 16Cell 17Cell 18Cell 19Cell 20Cell 21Cell 22Cell 23Cell 24Cell 25Cell 26Cell 27Cell 28Cell 29Cell 30Cell 31Cell 32Cell 33Cell 34Cell 35Cell 36Cell 37Cell 38Cell 39Cell 40Cell 14 Subscript Superscript8 Pts10 Pts12 Pts14 Pts18 Pts24 Pts36 Pts48 PtsDatesTimeGeneralNumberCurrency Scientific AccountingFractionBold UnderlinedLeftCenteredRightArialTimes New Roman Comic Sans Courier NewVerdana Brush Script JustificationModifier Fonts 12 Pts Font SizingColors From Patterns PickerSUMA4+1A3+1A2+1A1+1ActualAnswerFormulaPercentage no decimalsCurrency - Big NumbersNumber - Big NumbersUnformatted Dates &their Julian numberBooleanErrors Divide by 0Unknown FunctionA5-A2A5*A4A6/A4 Bad ValueA5-A4A1/0 AVG(A3:A7)(SUM(A1:A10 C1:C10))Bad IntersectionA3+A13 Bad ReferenceVLOOKUP(0.1,range,2,TRUE)Not ApplicableRATE(0, -200, 8000)Problem with a NumberMAXMINCOUNT AVERAGECommon FunctionsNumber - Big Numbers with commaAccounting - Big Numbers&Percentage 2 decimals - bigger numbers%Percentage 2 decimals - small numbersItalics<>&" Less Than Greater Than AmpersandQuoteSpecial Html CharactersMax Precision NumbersLink to dump.cwww linkFtp link mailto link file protocol Regular Bold Itallics Underlined Red Blue & Elipse General!D2ÿ‚$ x­lT»£e ód[Cl«“rúâF.xÅ”|Øì[CíÕC + Ç ¯ I!1†*Ï!·M"5ÐÅ~Ð0ÀtäÅÐÅÀtpQðw€Åׇ0 Ð0¶{T0ÞÏ}‡0¶{T0ÞÏTƼÆ(ÆÞÏÞÏO„08ÆìÏà×á×¶ÌxÆi‡p0r*  Ç  Çr*  º‰p0¶{T0 Ä{T0 Ó%( ´T0ÈÆtÇ0Å0–×0Ð0zm0Ç0Ñ Çü E0Å0ì£Ç0Ñ Çý Ç Éß¿0 Ç(  Ét†©0ÇÿÿÿÿrangeTitleileren0]rlink =œ ¤ œÈ(ï0 y˜Èÿ0Æ{T0‚T0®ˆ0‚T0#-y5 p¢00y, yüy5 0ÈŸ0pÔðwèÈ`„T0 {T0ì{È {T0°ÿl¹ówXÊówÿÿÿÿ`ÈŽè´wè`„T0„È`„T0héxÈÆ0°L`„T0„ÈÚ¬p08×0›¬p0Õ0˜È¤ È Ð"t¤ È S]0¤ ¬‚ yÉ$Éô PÉ%…0HÉHÉ–a0¦adévÅÿÿÿÿaˆÿÿÿÿhé ˆüêÑ0‹ˆCell 1Cell 2Cell òÌÉ %C)}23  dü©ñÒMbP?_*+‚€%Áƒ„MHP LaserJet 4PÔ@gþXX@MSUDHP LaserJet 4Pä<d ¡"dXXà?à?U} Ž } } q} } ª%T0€ìû  ðG 0 0 0 _0mT ý €Oý €Pý €Q½‚ð?‚ð?~ tð? @ÿ DÀ~ @ý N ‚@ÿ DÀ~ ‚@ý M @ÿ DÀ~ @ý L @ÿ DÀ~ @ý K"ð?ÿ DÀDÀ~ ð?ý _"@ ÿ DÀDÀ~ @ý \" @ÿ DÀDÀ~ @ý ] uà`ÿÿþZÀ Formulaý uQý ‡ý €n# .@ÿ %ÀÀ§ ~ .@ý J#@ ÿ % ÀÀB~ @ý j#ð?ÿ % ÀÀB~ ð?ý k# @ÿ % ÀÀB~  @ý l#@ÿ % ÀÀB~ @ý m¾ ý €Wý €X ÿÿÿ DÀý `ý Y(ÿÿý#%ÀÀBÿý aý Z"ÿÿÿ DÀDÀý [ý ^4ÿÿÿ' % ÀÀ% ÀÀ*ý bý c"ÿÿÿ DÀ* Àý dý e-*ÿÿÿš™™™™™¹?#Bf*ý fý g1|$ÿÿÿ@iÀ@@B<$ý hý iý |ý tý x×>Ò0*$@@@@BBBKCCCMM LTN`NY]!T0"#$ìý !uý !yý "vý "zý #wý #{ý $…ý $†× À<>¶@   òÌÉ $–5„?|@  dü©ñÒMbP?_*+‚€%Áƒ„MHP LaserJet 4PÔ@gþXX@MSUDHP LaserJet 4Pä<d ¡"dXXà?à?U} Ç } Ž } U } Ç } } } ã} U } U$  T0   ì û     €„@ 0  0        0  ½…ð?àá@sÝá@½@â@`â@ý U½ð?àá@Ýá@½@â@`â@ý  V½`Éá@c€Éá@d Éá@eÀÉá@½}àÉá@~Êá@ Êá@ý  2~ hØ?i«ªªªªªÚ?fUUUUUUÝ?~ gà?j±[°[á?k·` ¶` ¦?lͶJ‰rfá?ý  3½ð?^@À^@X9´Èv¾ó?½ð¿^ÀÀ^ÀX9´Èv¾ó¿ý  4½ mð?m^@mÀ^@ mX9´Èv¾ó?½ mð¿m^ÀmÀ^À mX9´Èv¾ó¿ý m5¾ mmmm¾ mmmmm ½ m€„.AmS„×m_„× mÙÎw€„.A½ m€„.Ám³{(èm§{(è mÙÎw€„.Áý mT¾ mmmm¾ mmmmm ½ „€„.A„S„ׄ_„× „ÙÎw€„.A½ „€„.Á„³{(è„§{(è „ÙÎw€„.Áý „o½nð?n^@nÀ^@nX9´Èv¾ó?½nð¿n^ÀnÀ^ÀnX9´Èv¾ó¿ý  n6½nˆÃ@npÇ@nÈ@nÈ@n½nˆÃÀnpÇÀnÈÀnÈÀý  nS¾nnnnnnnnnn ~ oð?oú~j¼t“ˆ?o(í ¾0‰?oö vöE‰?~ oð¿oú~j¼t“ˆ¿o(í ¾0‰¿oö vöE‰¿ý  or½oð?o^@oÀ^@oX9´Èv¾ó?½oð¿o^ÀoÀ^ÀoX9´Èv¾ó¿ý  oq¾oooo¾oooo½|ð?|^@|À^@|X9´Èv¾ó?|½|ð¿|^À|À^À|X9´Èv¾ó¿ý  oR½pð?p^@pÀ^@pX9´Èv¾ó?½pð¿p^ÀpÀ^ÀpX9´Èv¾ó¿ý  p7½qð?q^@qÀ^@qX9´Èv¾ó?½qð¿q^ÀqÀ^ÀqX9´Èv¾ó¿ý  q8¾qqqq¾qqqqq ½qˆÃ@q©„.Aq_ =q¢E¶óˆÃ@½qˆÃÀq©„.Áq§öÂÿq¢E¶óˆÃÀý  qp½rð?r^@rÀ^@rX9´Èv¾ó?½rð¿r^ÀrÀ^ÀrX9´Èv¾ó¿ý  r9×0F ¤@@L„jj&j&jj\–j$tjj&j! T0# €q!ˆ×ÿ»R—;¾ !ˆˆ!‰›æ‡´€eÒA¾ !‰‰ý ! }½<#qH“@qÈ@qH“@qÈ@q€ þ@qPÔ2Aqd‰gAqÈÀqH“Àý # q8×ÄN>¶@# å!!!! òÌÉ ÙBßE  dü©ñÒMbP?_*+‚€%Áƒ„MNLaserJet 4PÜpcXXLetter ÿÿÿÿ9ÿÿÿÿÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ''''¡"dXXà?à?U} ã} ª} Ž}  T08€ìû , \ È„@ X0 x°0ý :ý sý ;ý Fý t<ý =ý u>ý Eý ]?ý y@ý zBý Gý vAý wDý xCý Gý ŠH¾ ŠŠý \*ý +ý ],ý ^-ý _.ý `/ý J)ý a0ý K(ý b1ý ƒ× ®8888>¶@å  òÌÉ <HºL"P  dü©ñÒMbP?_*+‚€%Áƒ„MHP LaserJet 4PÔ@gþXX@MSUDHP LaserJet 4Pä<d ¡"dXXà?à?U< T00 0 0ìû  0 „@ 0  0  0 _ówóG´wý ‚"ý ƒý { !ý Iý H#ý Gý F$ý Eý Cý D ý B ý A ý @ ý „ý ?'ý > ý =ý <ý ;ý :ý 9ý 8ý 7ý 6ý 4ý 5ý 3ý 2ý 1ý 0ý /ý .ý -×DŠl"" T0!"#ì$û%&'*,„@-0./001234 560789 :_;ý ,ý !+ ý "*!ý #)"ý $(#ý %'$ý &&%ý '%&ý *ŠI¾ *ŠŠ,L-M.N/O0[1P2Q3R4S5T6U7V8W9X:Y;Z×6 à >¶@  å ** òÌÉ SQ%R  dü©ñÒMbP?_*+‚€%Áƒ„¡"à?à?U} qT0ìûý †~ý ‡ý †€ý †ý †‚תP>¶@¸lÐÉêyùºÎŒ‚ªK© ÀF\xlHtml-dev\xlHtml\dump.cÿÿ­Þ¸`ÐÉêyùºÎŒ‚ªK© àÉêyùºÎŒ‚ªK© ,ftp://ftp.xlhtml.org/¸hÐÉêyùºÎŒ‚ªK© àÉêyùºÎŒ‚ªK© 4mailto:no_spam@xlhtml.org¸†ÐÉêyùºÎŒ‚ªK© ÀFc:\autoexec.batÿÿ­Þ$c:\autoexec.bat¸bÐÉêyùºÎŒ‚ªK© àÉêyùºÎŒ‚ªK© .http://www.xlhtml.org/  òÌɃ„¡"Ceà?à?3` °4Ð#ÈA` °4Ð#ÈB` °4Ð#ðC` °4Ð#ÈD0 «0 Ó3 Idd 3QQ ;QQÿÿ3_4E4D$% èÿÿÿÜÿÿÿ±M 3O&AQ4$% èÿÿÿÜÿÿÿ±M 3O&BQ4FAåÒR D 3O—‘  0 3 bï#M43*#M! ÿÿ M4% #ÂÛM3O(&DQ X Axis'4% 6VaCMZ3O'&DQ Y Axis'4523 €€€ ÀÀÀO43–" h³)3Oh³% èÿÿÿÜÿÿÿ±M3OQ4444% O_ÂM03OG&CQ  Bar Chart'44eeð?@@@@e>  Id þÿà…ŸòùOh«‘+'³Ù0˜8@Xl „ä Steven Grubbx Steve GrubbMicrosoft Excel@€¾›>)ß¾þÿÕÍÕœ.“—+,ù®DÕÍÕœ.“—+,ù®\ PXd lt|„ Œ Ýäm1 GeneralFormatsTextColors Hyperlinks Bar Chart  WorksheetsCharts¨(RZ² _PID_GUID _PID_HLINKSäAN{631A6FC0-4AFB-11D3-AA80-00105A11E842}Aì,%http://www.xlhtml.org/\`c:\autoexec.batlomailto:no_spam@xlhtml.orgGftp://ftp.xlhtml.org/:\xlHtml-dev\xlHtml\dump.c  !"#$%&'()*+,-þÿÿÿ/012345þÿÿÿ789:;<=þÿÿÿýÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿRoot Entryÿÿÿÿÿÿÿÿ ÀFþÿÿÿWorkbookÿÿÿÿÿÿÿÿÿÿÿÿZSummaryInformation(ÿÿÿÿ.DocumentSummaryInformation8ÿÿÿÿÿÿÿÿÿÿÿÿ6xlhtml/xlhtml/ascii.c0100644000076400007640000000530607470757344015314 0ustar jackshckjackshck/*! \file ascii.c \brief ASCII and CSV output for xlhtml */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "xlhtml.h" #include "support.h" void OutputPartialTableAscii(void) { int i, j, k; SetupExtraction(); /* Here's where we dump the Html Page out */ for (i=first_sheet; i<=last_sheet; i++) /* For each worksheet */ { if (ws_array[i] == 0) continue; if ((ws_array[i]->biggest_row == -1)||(ws_array[i]->biggest_col == -1)) continue; if (ws_array[i]->c_array == 0) continue; /* Now dump the table */ for (j=ws_array[i]->first_row; j<=ws_array[i]->biggest_row; j++) { for (k=ws_array[i]->first_col; k<=ws_array[i]->biggest_col; k++) { int safe, numeric=0; cell *c = ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]; /* This stuff happens for each cell... */ if (c) { numeric = IsCellNumeric(c); if (!numeric && Csv) printf("\""); safe = IsCellSafe(c); if (c->ustr.str) { if (safe) output_formatted_data(&(c->ustr), xf_array[c->xfmt]->fmt_idx, numeric, IsCellFormula(c)); else OutputString(&(c->ustr)); } else if (!Csv) printf(" "); /* Empty cell... */ } else { /* Empty cell... */ if (!Csv) printf(" "); else printf("\""); } if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]) /* Honor Column spanning ? */ { if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan != 0) k += ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan-1; } if (!numeric && Csv) printf("\""); if (Csv && (k < ws_array[i]->biggest_col)) { /* big cheat here: quoting everything! */ putchar(','); /* Csv Cell Separator */ } else { if (( !Csv )&&( k != ws_array[i]->biggest_col )) putchar('\t'); /* Ascii Cell Separator */ } } if (Csv) printf("\r\n"); else putchar(0x0A); /* Row Separator */ } if (!Csv) printf("\n\n"); /* End of Table 2 LF-CR */ } } xlhtml/xlhtml/doxygen.conf0100644000076400007640000007046107470340313016370 0ustar jackshckjackshck# Doxyfile 1.2.3 # This file describes the settings to be used by doxygen for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = xlhtml # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese, # Korean, Hungarian, Spanish, Romanian, Russian, Croatian, Polish, # Portuguese and Slovene. OUTPUT_LANGUAGE = English # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these class will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. It is allowed to use relative paths in the argument list. STRIP_FROM_PATH = # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a class diagram (in Html and LaTeX) for classes with base or # super classes. Setting the tag to NO turns the diagrams off. CLASS_DIAGRAMS = NO # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower case letters. If set to YES upper case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # users are adviced to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explict @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # reimplements. INHERIT_DOCS = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = NO # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # The ENABLE_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = xlhtml.c ascii.c xml.c html.c support.c xlhtml.h tuneable.h # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. INPUT_FILTER = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse. FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimised for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using a WORD or other. # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assigments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. Warning: This feature # is still experimental and very incomplete. GENERATE_XML = NO #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = #--------------------------------------------------------------------------- # Configuration::addtions related to external references #--------------------------------------------------------------------------- # The TAGFILES tag can be used to specify one or more tagfiles. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented file showing # the direct and indirect include dependencies of the file with other # documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to # YES then doxygen will generate a graph for each documented header file showing # the documented files that directly or indirectly include this file INCLUDED_BY_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found on the path. DOT_PATH = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES #--------------------------------------------------------------------------- # Configuration::addtions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO # The CGI_NAME tag should be the name of the CGI script that # starts the search engine (doxysearch) with the correct parameters. # A script with this name will be generated by doxygen. CGI_NAME = search.cgi # The CGI_URL tag should be the absolute URL to the directory where the # cgi binaries are located. See the documentation of your http daemon for # details. CGI_URL = # The DOC_URL tag should be the absolute URL to the directory where the # documentation is located. If left blank the absolute path to the # documentation, with file:// prepended to it, will be used. DOC_URL = # The DOC_ABSPATH tag should be the absolute path to the directory where the # documentation is located. If left blank the directory on the local machine # will be used. DOC_ABSPATH = # The BIN_ABSPATH tag must point to the directory where the doxysearch binary # is installed. BIN_ABSPATH = /usr/local/bin/ # The EXT_DOC_PATHS tag can be used to specify one or more paths to # documentation generated for other projects. This allows doxysearch to search # the documentation for these projects as well. EXT_DOC_PATHS = xlhtml/xlhtml/gpdemo0100755000076400007640000000212007446125642015241 0ustar jackshckjackshck#!/bin/csh # File to render set source = Test.xls #Generate a unique html filename (/tmp/scriptname.pidnum.html) set com = $0 set tmp = /tmp/$com:t.$$ set gpcommand = $tmp.gp set gpdata = $tmp.dat set gpout = $tmp.gif # create gnuplot command file echo "set terminal gif small size 250,125 interlace xfdf5e6 x000000 x404040 x0000ff x00ff00" > $gpcommand echo "set grid ytics" >> $gpcommand echo "set nokey" >> $gpcommand echo "set nolabel" >> $gpcommand echo "set data style lines" >> $gpcommand echo "set noxzeroaxis" >> $gpcommand echo "set noyzeroaxis" >> $gpcommand echo 'set output "'$gpout'"' >> $gpcommand echo 'plot "'$gpdata'"' >> $gpcommand # create the data file xlhtml -fw -asc -xp:0 -xc:0-1 -xr:2-6 $source > $gpdata if ((!(-s $gpcommand)) | (!(-s $gpdata)) |($status)) then echo "$0: failed to generate gnuplot command or data files" exit 1 endif #File exists and is of length > 0, so do it... gnuplot $gpcommand if (!(-s $gpout)) then echo "$0: failed to generate gif file" exit 1 endif # Display the results in Netscape nsopen $gpout # Clean up rm $tmp* exit 0 xlhtml/xlhtml/html.c0100644000076400007640000002006507470757344015167 0ustar jackshckjackshck/*! \file html.c \brief HTML output for xlhtml */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "xlhtml.h" #include "support.h" #include /* prototypes for functions in this file */ void output_header(void); void output_footer(void); void OutputTableHTML(void) { int i, j, k; output_header(); if (center_tables) { printf("
"); do_cr(); } SetupExtraction(); /* Here's where we dump the Html Page out */ for (i=first_sheet; i<=last_sheet; i++) /* For each worksheet */ { update_default_font(i); if (ws_array[i] == 0) continue; if ((ws_array[i]->biggest_row == -1)||(ws_array[i]->biggest_col == -1)) continue; if (ws_array[i]->c_array == 0) continue; trim_sheet_edges(i); /* Print its name */ if (next_ws_title > 0) { if (ws_array[i]->ws_title.str) { printf("

"); OutputString(&ws_array[i]->ws_title); printf("


"); do_cr(); } else { printf("

(Unknown Page)


"); do_cr(); } } /* Now dump the table */ printf(""); do_cr(); printf(""); do_cr(); for (j=ws_array[i]->first_row; j<=ws_array[i]->biggest_row; j++) { update_default_alignment(i, j); printf(""); else { if (strcmp(default_alignment, "left") != 0) printf(" ALIGN=\"%s\"", default_alignment); if (!aggressive) printf(" VALIGN=\"bottom\">\n"); else printf(">"); } for (k=ws_array[i]->first_col; k<=ws_array[i]->biggest_col; k++) { output_cell(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k],0); /* This stuff happens for each cell... */ if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]) { if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan != 0) k += ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan-1; } } if (!aggressive) printf("\n"); } printf("

"); do_cr(); } if (center_tables) { printf("
"); do_cr(); } /* Print the author's name in itallics... */ if (author.str) { printf("Spreadsheet's Author: "); OutputString(&author); printf("
"); do_cr(); } /* Print when & how the file was last updated. */ printf("Last Updated "); if (lastUpdated) printf("%s  ", lastUpdated); switch (file_version) { case EXCEL95: printf("with Excel 5.0 or 95"); break; case EXCEL97: printf("with Excel 97"); break; default: printf("with Excel ????"); break; } printf("
"); do_cr(); /* Next print Disclaimers... */ if (NoFormat) { printf("
* This cell's format is not supported.
"); do_cr(); } if ((notAccurate)&&(formula_warnings)) { printf("
** This cell's data may not be accurate.
"); do_cr(); } if (NotImplemented) { printf("
*** This cell's data type will be supported in the future.
"); do_cr(); } if (Unsupported) { printf("
**** This cell's type is unsupported.
"); do_cr(); } /* Now out exceeded capacity warnings... */ if (MaxWorksheetsExceeded || MaxRowExceeded || MaxColExceeded || MaxStringsExceeded || MaxFontsExceeded || MaxPalExceeded || MaxXFExceeded || MaxFormatsExceeded ) printf("", colorTab[0x0A]); if (MaxWorksheetsExceeded) { printf("The Maximum Number of Worksheets was exceeded, you might want to increase it.
"); do_cr(); } if (MaxRowExceeded) { printf("The Maximum Number of Rows was exceeded, you might want to increase it.
"); do_cr(); } if (MaxColExceeded) { printf("The Maximum Number of Columns was exceeded, you might want to increase it.
"); do_cr(); } if (MaxStringsExceeded) { printf("The Maximum Number of Strings was exceeded, you might want to increase it.
"); do_cr(); } if (MaxFontsExceeded) { printf("The Maximum Number of Fonts was exceeded, you might want to increase it.
"); do_cr(); } if (MaxPalExceeded) { printf("The Maximum Number of Color Palettes was exceeded, you might want to increase it.
"); do_cr(); } if (MaxXFExceeded) { printf("The Maximum Number of Extended Formats was exceeded, you might want to increase it.
"); do_cr(); } if (MaxFormatsExceeded) { printf("The Maximum Number of Formats was exceeded, you might want to increase it.
"); do_cr(); } if (MaxWorksheetsExceeded || MaxRowExceeded || MaxColExceeded || MaxStringsExceeded || MaxFontsExceeded || MaxPalExceeded || MaxXFExceeded || MaxFormatsExceeded ) printf("
"); printf(" 
"); do_cr(); /* Output Credit */ printf("
Created with xlhtml %s
", VERSION); do_cr(); /* Output Tail */ output_footer(); } void output_header(void) { /* Ouput Header */ if (NoHeaders) return; if (!aggressive) { printf(""); do_cr(); } printf("\n"); printf("\n"); do_cr(); printf("", CodePage); else { switch (UnicodeStrings) { case 0: printf("iso-8859-1\">"); /* Latin-1 */ break; case 1: printf("windows-1252\">"); /* Microsoft */ break; default: printf("utf-8\">"); /* Unicode */ break; } } do_cr(); if (!aggressive) { printf(""); do_cr(); } printf(""); if (title) printf("%s", title); else printf("%s", filename); printf(""); do_cr(); printf(""); do_cr(); do_cr(); printf("
"); do_cr(); } void output_footer(void) { if (NoHeaders) return; printf(""); do_cr(); fflush(stdout); } void output_start_html_attr(html_attr *h, unsigned int fnt_idx, int do_underlines) { if (fnt_idx < next_font) { if (((font_array[fnt_idx]->underline&0x0023) > 0)&&(do_underlines)) { printf(""); h->uflag = 1; } if (font_array[fnt_idx]->bold >= 0x02BC) { h->bflag = 1; printf(""); } if (font_array[fnt_idx]->attr & 0x0002) { h->iflag = 1; printf(""); } if (font_array[fnt_idx]->attr & 0x0008) { h->sflag = 1; printf(""); } if ((font_array[fnt_idx]->super & 0x0003) == 0x0001) { h->spflag = 1; printf(""); } else if ((font_array[fnt_idx]->super & 0x0003) == 0x0002) { h->sbflag = 1; printf(""); } } } void output_end_html_attr(html_attr *h) { if (h->sbflag) { printf(""); h->sbflag = 0; } else if (h->spflag) { printf(""); h->spflag = 0; } if (h->sflag) { printf(""); h->sflag = 0; } if (h->iflag) { printf(""); h->iflag = 0; } if (h->bflag) { printf(""); h->bflag = 0; } if (h->uflag) { if (h->uflag == 1) printf(""); else printf(""); h->uflag = 0; } if (h->fflag) { printf("
"); h->fflag = 0; } } xlhtml/xlhtml/nsopen0100755000076400007640000000067407446125642015304 0ustar jackshckjackshck#!/bin/csh if ($#argv != 1) then echo "Usage: $0 file" exit 1 endif set file = $argv[1] if (!(-r $file)) then echo "$0"": File $file cannot be read" exit 1 endif #Try to open file in an existing netscape window (netscape -no-about-splash -remote "openFile(${file})") >& /dev/null #if this fails, it means that netscape is not running, so start it if ($status) then netscape -no-about-splash -no-install file:${file} endif xlhtml/xlhtml/nsxlview0100755000076400007640000000107107446125642015651 0ustar jackshckjackshck#!/bin/csh if ($#argv != 1) then echo "Usage: $0 file.xls" exit 1 endif set source = $argv[1] #Generate a unique html filename (/tmp/scriptname.pidnum.html) #set com = $0 #set tmp = /tmp/$com:t.$$ #set html = $tmp.html set tmp = `mktemp -q /tmp/nsxlview.XXXXXX` || exit 1 set tmp2 = `mktemp -q $tmp/nsxlview.XXXXXX` || exit 1 set html = $tmp2.html xlhtml -a $source > $html if ((!(-r $html)) | ($status)) then echo "$0"": failed to generate HTML file" exit 1 endif #File exists and is of length > 0, so open it nsopen $html rm -rf $tmp* exit 0 xlhtml/xlhtml/support.c0100644000076400007640000001241107470757344015733 0ustar jackshckjackshck/*! \file support.c \brief Various support functions for xlhtml. */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "support.h" #include #include #include "../cole/cole.h" #include void print_version(void) { printf("xlhtml %s \nCopyright (c) 1999-2002, Charles Wyble\n" "Released under GPL.\n", VERSION ); exit(0); } void display_usage(void) { fprintf(stderr, "\nxlhtml converts excel files (.xls) to Html.\n" "Copyright (c) 1999-2001, Charles Wyble. Released under GPL.\n" "Usage: xlhtml [-xp:# -xc:#-# -xr:#-# -bc###### -bi???????? -tc######] \n" "\t-a: aggressive html optimization\n" "\t-asc ascii output for -dp & -x? options\n" "\t-csv comma separated value output for -dp & -x? options\n" "\t-xml XML output\n" "\t-bc: Set default background color - default white\n" "\t-bi: Set background image path\n" "\t-c: Center justify tables\n" "\t-dp: Dumps page count and max rows & colums per page\n" "\t-v: Prints program version number\n" "\t-fw: Suppress formula warnings\n" "\t-m: No encoding for multibyte\n" "\t-nc: No Colors - black & white\n" "\t-nh: No Html Headers\n" "\t-tc: Set default text color - default black\n" "\t-te: Trims empty rows & columns at the edges of a worksheet\n" "\t-xc: Columns (separated by a dash) for extraction (zero based)\n" "\t-xp: Page extracted (zero based)\n" "\t-xr: Rows (separated by a dash) to be extracted (zero based)\n"); fprintf(stderr, "\nReport bugs to jackshck@thewybles.com\n"); exit (1); } void do_cr(void) { extern int aggressive; if (!aggressive) putchar('\n'); } U16 getShort(U8 *ptr) { if (ptr == 0) return (U16)0; return (U16)((*(ptr+1)<<8)+*ptr); } /*! This is used in the RK number, so signedness counts */ S32 getLong(U8 *ptr) { if (ptr == 0) return (S32)0; return (S32)(*(ptr+3)<<24)+(*(ptr+2)<<16)+(*(ptr+1)<<8)+*ptr; } #ifndef WORDS_BIGENDIAN /* Defined in */ /*! Little Endian - 0x86 family */ void getDouble(U8 *ptr, F64 *d) { size_t i; F64 dd; U8 *t = (U8 *)ⅆ for (i=0; i (((y%4) == 0) ? 366 : 365)) num -= ((y++%4) == 0) ? 366 : 365; *year = y; t = num; if (DatesR1904) *year += 4; /* Adjust for McIntosh... */ if ((*year%4) == 0) { /* Leap Year */ for (i=0; i<12; i++) { if (t <= ldays[i]) break; t -= ldays[i]; } } else { for (i=0; i<12; i++) { if (t <= ndays[i]) break; t -= ndays[i]; } } /* Some fixups... */ *month = 1+i; if (t == 0) t = 1; *day = t; *year = *year % 100; } typedef S32 swords[2]; /*! avoids trouble from gcc -O2 type-based alias analysis */ #define noaliasdub(type,ptr) \ (((union{swords sw; F64 dub;} *)(ptr))->sw) #ifndef WORDS_BIGENDIAN /*! Defined in */ /*! Little Endian - 0x86 family */ void RKtoDouble(S32 n, F64 *d) { noaliasdub(swords,d)[0] = 0; noaliasdub(swords,d)[1] = n << 2; } #else /*! Big Endian version - UltraSparc's, etc. */ void RKtoDouble(S32 n, F64 *d) { U8 *ptr = (U8 *)&n; noaliasdub(swords,d)[1] = 0; noaliasdub(swords,d)[0] = ((*(ptr+0)<<24)+(*(ptr+1)<<16)+(*(ptr+2)<<8)+(*(ptr+3))) << 2; } #endif xlhtml/xlhtml/support.h0100644000076400007640000000076207470755664015751 0ustar jackshckjackshck#ifndef __SUPPORT_H_INCLUDED #define __SUPPORT_H_INCLUDED #include "../cole/cole.h" extern void display_usage(void); extern void NumToDate(long num, int *year, int *month, int *day); extern U16 getShort(U8 *ptr); extern void getDouble(U8 *ptr, F64 *d); extern int null_string(U8 *str); extern void print_version(void); extern void do_cr(void); extern void FracToTime(U8 *cnum, int *hr, int *minut, int *sec, int *msec); extern S32 getLong(U8 *ptr); extern void RKtoDouble(S32 n, F64 *d); #endif xlhtml/xlhtml/tuneable.h0100644000076400007640000000251007470757344016022 0ustar jackshckjackshck/*! \file tuneable.h \brief Values for tuning performance of xlhtml */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /*! \brief Increments to allocate extended formats */ #define XFORMATS_INCR 64 /*! \brief Increments to allocate fonts */ #define FONTS_INCR 32 /*! \brief Increments to allocate worksheet pages */ #define WORKSHEETS_INCR 4 /*! \brief Increments to allocate Columns per Worksheet page */ #define COLS_INCR (U16)24 /*! \brief Increments to allocate Rows per Worksheet page */ #define ROWS_INCR (U32)128 /*! \brief Increments to allocate the string array */ #define STRINGS_INCR 256UL xlhtml/xlhtml/version.h0100644000076400007640000000003007500147235015665 0ustar jackshckjackshck#define VERSION "0.5.1" xlhtml/xlhtml/xlcdump.c0100644000076400007640000002064407470757344015702 0ustar jackshckjackshck/* xlcdump - dumps individual chart records for analysis Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* Created by ./configure script */ #include "cole.h" #else #include "config.h.in" /* Created by ./configure script */ #include "cole.h.in" #include /* for umask */ #endif #include #include #include /* for strcpy() */ #include /* For isprint */ #define MODE 0 /* 0 - ascii; 1 - hex */ #define TEXT 0 /* In ascii mode, 0 - ascii, 1 - hex */ #define PRGNAME "xlcdump" #define MAX_COLS 64 #define MAX_ROWS 512 static char FileName[2][12] = /* The section of the Excel Spreadsheet we read in */ { "/Workbook", /* Office 97 */ "/Book" /* Everything else ? */ }; /* Function Prototypes */ COLE_LOCATE_ACTION_FUNC dump_file; static void output_opcode_string(int); /* Global data */ static char filename[128]; int main (int argc, char **argv) { int f_ptr = 0; COLEFS * cfs; COLERRNO colerrno; if (argc < 2) { fprintf (stderr, "dump - Outputs excel chart records for analysis.\n" "Usage: "PRGNAME" \n"); exit (1); } else { strncpy(filename, argv[1], 124); cfs = cole_mount (filename, &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } } while (cole_locate_filename (cfs, FileName[f_ptr], NULL, dump_file, &colerrno)) { if (f_ptr) { cole_perror (PRGNAME, colerrno); break; } else f_ptr++; } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } return 0; } void dump_file(COLEDIRENT *cde, void *_info) { unsigned int length=0, opcode=0, target=0, count = 0; unsigned char buf[16]; COLEFILE *cf; COLERRNO err; cf = cole_fopen_direntry(cde, &err); /* Ouput Header */ printf("\n"); printf("%s", filename); printf("\n"); /* Output body */ #if (MODE == 1) while (cole_fread(cf, buf, 8, &err)) /* For mode >= 1 */ #else while (cole_fread(cf, buf, 1, &err)) #endif { if (MODE == 0) { if (count == 0) { length = 0; opcode = (unsigned)buf[0]; target = 80; /* ficticious number */ printf("
"); } else if (count == 1) opcode |= (buf[0]<<8)&0x0000FFFFL; else if (count == 2) length = (unsigned)buf[0]; else if (count == 3) { length |= (buf[0]<<8); target = length; printf("
\nLength:%04X Opcode:%04X - ", length, opcode); output_opcode_string(opcode); puts("
\n"); } if (count > 3) { /* Here is where we want to process the data */ /* based on the opcode... */ #if (TEXT == 0) if (isprint(buf[0])) putc(buf[0], stdout); #else printf("%02X ", buf[0]); if (((count-3) % 8) == 0) printf("
\n"); #endif } if (count == (target+3)) count = 0; else count++; } else /* mode >= 1 */ { printf("%02x %02x %02x %02x %02x %02x %02x %02x         ", (unsigned)buf[0], (unsigned)buf[1], (unsigned)buf[2], (unsigned)buf[3], (unsigned)buf[4], (unsigned)buf[5], (unsigned)buf[6], (unsigned)buf[7]); putchar(buf[0]); putchar(buf[1]); putchar(buf[2]); putchar(buf[3]); putchar(buf[4]); putchar(buf[5]); putchar(buf[6]); putchar(buf[7]); printf("
\n"); } } /* Output Tail */ printf("\n"); cole_fclose(cf, &err); } static void output_opcode_string(int opcode) { switch (opcode&0x00FF) { case 0x10: case 0x01: puts("UNITS: Chart Units"); break; case 0x02: puts("CHART: Location and overall chart dimensions"); break; case 0x03: puts("SERIES: Series Definition"); break; case 0x06: puts("DATAFORMAT: Series and Data Point Numbers"); break; case 0x07: puts("LINEFORMAT: Style of a line or border"); break; case 0x09: puts("MARKERFORMAT: Style of a line marker"); break; case 0x0A: puts("AREAFORMAT: Colors and patterns for an area"); break; case 0x0B: puts("PIEFORMAT: Position of the pie slice"); break; case 0x0C: puts("ATTACHEDLABEL: Series data/value labels"); break; case 0x0D: puts("SERIESTEXT: Legend/category/value text"); break; case 0x14: puts("CHARTFORMAT: Parent record for chart group"); break; case 0x15: puts("LEGEND: Legend type and position"); break; case 0x16: puts("SERIESLIST: Specifies the series in an overlay chart"); break; case 0x17: puts("BAR: Chart group is a bar or column chart group"); break; case 0x18: puts("LINE: Chart group is a line chart group"); break; case 0x19: puts("PIE: Chart group is a pie chart group"); break; case 0x1A: puts("AREA: Chart group is an area chart group"); break; case 0x1B: puts("SCATTER: Chart group is a scatter chart group"); break; case 0x1C: puts("CHARTLINE: Drop/Hi-Lo/Series Lines on a line chart"); break; case 0x1D: puts("AXIS: Axis Type"); break; case 0x1E: puts("TICK: Tick marks and labels format"); break; case 0x1F: puts("VALUERANGE: Defines value axis scale"); break; case 0x20: puts("CATSERRANGE: Defines a category or series axis"); break; case 0x21: puts("AXISLINEFORMAT: Defines a line that spans an axis"); break; case 0x22: puts("CHARTFORMTLINK: Not Used"); break; case 0x24: puts("DEFAULTTEXT: Default data label text properties"); break; case 0x25: puts("TEXT: Defines display of text fields"); break; case 0x26: puts("FONTX: Font Index"); break; case 0x27: puts("OBJECTLINK: Attaches Text to chart or chart item"); break; case 0x32: puts("FRAME: Defines border shape around displayed text"); break; case 0x33: puts("BEGIN: Defines the beginning of an object"); break; case 0x34: puts("END: Defines the end of an object"); break; case 0x35: puts("PLOTAREA: Frame belongs to ploat area"); break; case 0x3A: puts("3d Chart group"); break; case 0x3C: puts("PICF: Picture Format"); break; case 0x3D: puts("DROPBAR: Defines drop bars"); break; case 0x3E: puts("RADAR: Chart group is a radar chart group"); break; case 0x3F: puts("SURFACE: Chart group is a surface chart group"); break; case 0x40: puts("RADARAREA: Chart group is a radar area chart group"); break; case 0x41: puts("AXISPARENT: Axis size and location"); break; case 0x43: puts("LEGENDXN: Legend Exception"); break; case 0x44: puts("SHTPROPS: Sheet Properties"); break; case 0x45: puts("SERTOCRT: Series chart-group index"); break; case 0x46: puts("AXESUSED: Number of axes sets"); break; case 0x48: puts("SBASEREF: PivotTable Reference"); break; case 0x4A: puts("SERPARENT: Trendline or Errorbar series index"); break; case 0x4B: puts("SERAUXTREND: Series trendline"); break; case 0x4E: puts("IFMT: Number-Format Index"); break; case 0x4F: puts("POS: Position information"); break; case 0x50: puts("ALRUNS: Text formatting"); break; case 0x51: puts("AI: Linked data"); break; case 0x5B: puts("Series ErrorBar"); break; case 0x5D: puts("SERFMT: Series Format"); break; case 0x60: puts("FBI: Font Basis"); break; case 0x61: puts("BOPPOP: Bar of pie/pie of pie chart options"); break; case 0x62: puts("AXCEXT: Axis options"); break; case 0x63: puts("DAT: Data Table Options"); break; case 0x64: puts("PLOTGROWTH: Font scale factors"); break; case 0x65: puts("SIINDEX: Series Index"); break; case 0x66: puts("GELFRAME: Fill data"); break; case 0x67: puts("Custom bar of pie/ pie of pie chart options"); break; default: puts("Unknown Chart Opcode"); break; } } xlhtml/xlhtml/xldump.c0100644000076400007640000003065107470757344015536 0ustar jackshckjackshck/* dump - dumps individual records for analysis Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* Created by ./configure script */ #include "cole.h" #else #include "config.h.in" /* Created by ./configure script */ #include "cole.h.in" #include /* for umask */ #endif #include #include #include /* for strcpy() */ #include /* For isprint */ #define MODE 0 /* 0 - ascii; 1 - hex */ #define TEXT 0 /* In ascii mode, 0 - ascii, 1 - hex */ #define PRGNAME "xldump" #define MAX_COLS 64 #define MAX_ROWS 512 static char FileName[2][12] = /* The section of the Excel Spreadsheet we read in */ { "/Workbook", /* Office 97 */ "/Book" /* Everything else ? */ }; /* Function Prototypes */ COLE_LOCATE_ACTION_FUNC dump_file; /*static void main_line_processor(int opcode, char data);*/ static void output_opcode_string(int); /* Global data */ static char filename[128]; int main (int argc, char **argv) { int f_ptr = 0; COLEFS * cfs; COLERRNO colerrno; if (argc < 2) { fprintf (stderr, "dump - Outputs excel file records for analysis.\n" "Usage: "PRGNAME" \n"); exit (1); } else { strncpy(filename, argv[1], 124); cfs = cole_mount (filename, &colerrno); if (cfs == NULL) { cole_perror (PRGNAME, colerrno); exit (1); } } while (cole_locate_filename (cfs, FileName[f_ptr], NULL, dump_file, &colerrno)) { if (f_ptr) { cole_perror (PRGNAME, colerrno); break; } else f_ptr++; } if (cole_umount (cfs, &colerrno)) { cole_perror ("travel", colerrno); exit (1); } return 0; } void dump_file(COLEDIRENT *cde, void *_info) { unsigned int length=0, opcode=0, target=0, count = 0; unsigned char buf[16]; COLEFILE *cf; COLERRNO err; cf = cole_fopen_direntry(cde, &err); /* Ouput Header */ printf("\n"); printf("%s", filename); printf("\n"); /* Output body */ #if (MODE == 1) while (cole_fread(cf, buf, 8, &err)) /* For mode >= 1 */ #else while (cole_fread(cf, buf, 1, &err)) #endif { if (MODE == 0) { if (count == 0) { length = 0; opcode = (unsigned)buf[0]; target = 80; /* ficticious number */ printf("
"); } else if (count == 1) opcode |= (buf[0]<<8)&0x0000FFFFL; else if (count == 2) length = (unsigned)buf[0]; else if (count == 3) { length |= (buf[0]<<8); target = length; printf("
\nLength:%04X Opcode:%04X - ", length, opcode); output_opcode_string(opcode); puts("
\n"); } if (count > 3) { /* Here is where we want to process the data */ /* based on the opcode... */ #if (TEXT == 0) if (isprint(buf[0])) putc(buf[0], stdout); #else printf("%02X ", buf[0]); if (((count-3) % 8) == 0) printf("
\n"); #endif } if (count == (target+3)) count = 0; else count++; } else /* mode >= 1 */ { printf("%02x %02x %02x %02x %02x %02x %02x %02x         ", (unsigned)buf[0], (unsigned)buf[1], (unsigned)buf[2], (unsigned)buf[3], (unsigned)buf[4], (unsigned)buf[5], (unsigned)buf[6], (unsigned)buf[7]); putchar(buf[0]); putchar(buf[1]); putchar(buf[2]); putchar(buf[3]); putchar(buf[4]); putchar(buf[5]); putchar(buf[6]); putchar(buf[7]); printf("
\n"); } } /* Output Tail */ printf("\n"); cole_fclose(cf, &err); } /*static void main_line_processor(int opcode, char data) { } */ static void output_opcode_string(int opcode) { switch (opcode&0x00FF) { /* start of documented general opcodes */ case 0x0A: puts("\nEOF: End of File"); break; case 0x0C: puts("CALCCOUNT: Iteration count"); break; case 0x0D: puts("CalcMode: Calculation mode"); break; case 0x0E: puts("Precision"); break; case 0x0F: puts("Reference Mode"); break; case 0x10: puts("Delta: Iteration Increment"); break; case 0x11: puts("Iteration Mode"); break; case 0x12: puts("Protection Flag"); break; case 0x13: puts("Protection Password"); break; case 0x14: puts("Print Header on each page"); break; case 0x15: puts("Print Footer on each page"); break; case 0x16: puts("External Count: Number of external references"); break; case 0x17: puts("External reference"); break; case 0x18: puts("NAME"); break; case 0x19: puts("Windows are Protected"); break; case 0x1A: puts("Vertical Page Breaks"); break; case 0x1B: puts("Horizontal Page Breaks"); break; case 0x1C: puts("Cell Note"); break; case 0x1D: puts("Selection"); break; case 0x22: puts("1904 date system"); break; case 0x26: puts("Left Margin Measurement"); break; case 0x27: puts("Right Margin Measurement"); break; case 0x28: puts("Top Margin Measurement"); break; case 0x29: puts("Bottom Margin Measurement"); break; case 0x2A: puts("Print Row/Column Labels"); break; case 0x2B: puts("Print Gridlines Flag"); break; case 0x2F: puts("File is Password protected"); break; case 0x31: puts("FONT"); break; case 0x3C: puts("Continues long records"); break; case 0x3D: puts("Window1"); break; case 0x40: puts("BACKUP: Save Backup Version of the File"); break; case 0x41: puts("Number of Panes and their position"); break; case 0x42: puts("CODEPAGE: Default code page"); break; case 0x4D: puts("PLS: Environment specific print record"); break; case 0x50: puts("DCON: Data consolidation information"); break; case 0x51: puts("DCONREF: Data consolidation references"); break; case 0x52: puts("DCONNAME: Data Consolidation Named References"); break; case 0x55: puts("DEFCOLWIDTH: Default Column Width"); break; case 0x59: puts("XCT: CRN Record Count"); break; case 0x5A: puts("CRN: Nonresident operands"); break; case 0x5B: puts("FILESHARING:File-sharing information"); break; case 0x5C: puts("Write Access"); break; case 0x5D: puts("OBJ: Describes a Graphic object"); break; case 0x5E: puts("UNCALCED: Recalculation Status"); break; case 0x5F: puts("SAVERECALC: Recalculate before save"); break; case 0x60: puts("TEMPLATE: Workbook is a template"); break; case 0x63: puts("OBJPROTECT: Objects are protected"); break; case 0x7D: puts("COLINFO: Column formatting information"); break; case 0x7E: puts("RK Number"); break; case 0x7F: puts("IMDATA: Image data"); break; case 0x80: puts("GUTS: Size of row and column gutters"); break; case 0x81: puts("WSBOOL: Additional workspace information"); break; case 0x82: puts("GRIDSET: State change of gridlines option"); break; case 0x83: puts("HCENTER: Center between horizontal margins"); break; case 0x84: puts("VCENTER: Center between vertical margins"); break; case 0x85: puts("BoundSheet"); break; case 0x86: puts("WRITEPROT: Workbook is Write-protected"); break; case 0x87: puts("ADDIN: Workbook is add-in macro"); break; case 0x88: puts("EDG: Edition globals"); break; case 0x89: puts("PUB: Publisher"); break; case 0x8C: puts("COUNTRY: Default country and WIN.INI Country"); break; case 0x8D: puts("HIDEOBJ: Object display options"); break; case 0x90: puts("SORT: Sorting options"); break; case 0x91: puts("SUB: Subscriber"); break; case 0x92: puts("Palette Info"); break; case 0x94: puts("LHRECORD: .WK? File Conversion Information"); break; case 0x95: puts("LHNGRAPH: Named Graph Information"); break; case 0x96: puts("SOUND: Sound note"); break; case 0x98: puts("LPR: Sheet was printed using LINE.PRINT()"); break; case 0x99: puts("STANDARDWIDTH: Standard column width"); break; case 0x9A: puts("FNGROUPNAME: Function Group name"); break; case 0x9B: puts("FILTERMODE: Sheet contains filtered list"); break; case 0x9C: puts("FNGROUPCOUNT: Built-in function group count"); break; case 0x9D: puts("AUTOFILTERINFO: Drop Down Arrow Count"); break; case 0x9E: puts("AUTOFILTER: AutoFilter data"); break; case 0xA0: puts("SCL: Window Zoom magnification"); break; case 0xA1: puts("Page Setup"); break; case 0xA9: puts("COORDLIST: Polygon Object Vertex coordinates"); break; case 0xAB: puts("GCW: Global Column-Wdith flags"); break; case 0xAE: puts("SCENMAN: Scenario Output data"); break; case 0xAF: puts("PROT4REV: Shared Workbook protection flag"); break; case 0xB0: puts("SXVIEW: View Definition"); break; case 0xB1: puts("SXVD: View Fields"); break; case 0xB2: puts("SXVI: View Item"); break; case 0xB4: puts("SXIVD: Row/Column Field Ids"); break; case 0xB5: puts("SXLI: Line item array"); break; case 0xB6: puts("SXPI: Page item"); break; case 0xB8: puts("DOCROUTE: Routing slip information"); break; case 0xB9: puts("RECIPNAME: Recipient name"); break; case 0xBC: puts("SHRFMLA: Shared formula"); break; case 0xBD: puts("MULRK: Multiple RK cells"); break; case 0xBE: puts("Multiple Blanks"); break; case 0xC1: puts("MMS: ADDMENU/DELMENU Record Group count"); break; case 0xC2: puts("ADDMENU: Menu Addition"); break; case 0xC3: puts("DELMENU: Menu Deletion"); break; case 0xC5: puts("SXDI: Data Item"); break; case 0xC6: puts("SXDB: PivtoTable Cache Data"); break; case 0xCD: puts("SXSTRING: String"); break; case 0xD0: puts("SXTBL: Multiple Consolidation Source Info"); break; case 0xD1: puts("SXTBRGIITM: Page Item Name Count"); break; case 0xD2: puts("SXTBPG: Page Item Indexes"); break; case 0xD3: puts("OBPROJ: Visual Basic Project"); break; case 0xD5: puts("SXIDSTM: Stream ID"); break; case 0xD6: puts("RString"); break; case 0xD7: puts("DBCELL: Stream offsets"); break; case 0xDA: puts("BOOKBOOL: Workbook option flag"); break; /* error in ms docs case 0xDC: puts("PARAMQRY: Query parameters"); break; case 0xDC: puts("SXEXT: External source information"); break; */ case 0xDD: puts("SCENPROTECT: Scenario protection"); break; case 0xDE: puts("OLESIZE: Size of an OLE object"); break; case 0xDF: puts("UDDESC: Description string for chart autoformat"); break; case 0xE0: puts("Extended Format"); break; case 0xE1: puts("INTERFACEHDR: Beginning of User Interface Records"); break; case 0xE2: puts("INTERFACEEND: End of User interface records"); break; case 0xE3: puts("SXVS: View source"); break; case 0xEA: puts("TABIDCONF: Sheet tab ID of Conflict history"); break; case 0xEB: puts("MSODRAWINGGROUP: MS Office Drawing Group"); break; case 0xEC: puts("MSODRAWING: MS Office Drawing"); break; case 0xED: puts("MS Office Drawing Selection"); break; case 0xF0: puts("SXRULE: PivotTable Rule data"); break; case 0xF1: puts("SXEX: PivotTable Extended information"); break; case 0xF2: puts("SXFILT: PivotTable Rule Filter"); break; case 0xF6: puts("SXNAME: PivotTable Name"); break; case 0xF7: puts("SXSELECT: PivotTable Selection Information"); break; case 0xF8: puts("PivotTable Name Pair"); break; case 0xF9: puts("PivotTable Parsed Expression"); break; case 0xFB: puts("PivotTable Format Record"); break; case 0xFC: puts("Shared String Table"); break; case 0xFD: puts("Cell Value, String Constant/SST"); break; case 0xFF: puts("Extended Shared String Table"); break; default: puts("Unknown Opcode"); break; } } xlhtml/xlhtml/xlhtml.10100644000076400007640000000634207470747064015451 0ustar jackshckjackshck.\"Created with GNOME Manpages Editor Wizard .\"http://gmanedit.sourceforge.net .\"Sergio Rua .\"Updated by hand of Vaclav Dvorak .\" .TH xlhtml 1 "May 15, 2002" "xlhtml" .SH NAME xlhtml \- A program for converting Microsoft Excel Files .xls .SH SYNOPSIS .B xlhtml .RB [ \-nc ] .RB [ \-a ] .RB [ \-fw ] .RB [ \-bc\fINNNNNN\fP ] .RB [ \-tc\fINNNNNN\fP ] .RB [ \-bi\fI/path\fP ] .RB [ \-c ] .RB [ \-te ] .RB [ \-v ] .RB [ \-m ] .RB [ \-asc ] .RB [ \-dp ] .RB [ \-xp:\fIN\fP ] .RB [ \-xc:\fIN\fP ] .RB [ \-xr:\fIN\fP ] .RB [ \-xml ] .RB [ \-csv ] .RB \fIFILE\fP .br .SH DESCRIPTION This manual page explains the .B xlhtml program. The program .B xlhtml is used to convert Microsoft Excel Spreadsheet files into either html or tab delimitted ASCII. The program can be interfaced with helper scripts for viewing email attachments. Most use of this program is through the helper scripts and one would probably rarely resort to using the commandline interface. .SH OPTIONS .TP .BR \-nc tells it not to colorize the output. .TP .BR \-a aggressively optimize html by removing or VALIGN="bottom". Some older browsers may not display properly in this mode. .TP .BR \-fw suppress formula warnings about accuracy .TP .BR \-bc Override the background color. e.g. -bg808080 for gray .TP .BR \-tc Override the text color. e.g. -tcFF0000 for red .TP .BR \-bi Use background image. e.g. -bi/home/httpd/icon/tar.gif .TP .BR \-c Centers the tables horizontally .TP .BR \-te Trims empty rows & columns at the edges of a worksheet .TP .BR \-v Prints program version .TP .BR \-m No encoding for multibyte .TP .BR \-asc Ascii out of -dp and extraction data (-x?) .TP .BR \-dp Dump page count and max columns and rows per page .TP .BR \-xp Page for extraction (zero based) .TP .BR \-xc Columns (separated by a dash) for extraction (zero based) .TP .BR \-xr Rows (separated by a dash) to be extracted (zero based) .TP .BR \-xml Output in XML .TP .BR \-csv Output in Comma Separated Values .TP .BR \-nh Suppress header and body tags in html output .PP An example of the extraction command line is: xlhtml -fw -asc -xp:0 -xr:2-6 -xc:0-1 Test.xls The extraction output is: Formatted output of cells by column left to right, columns separated by a tab, end of row is: 0x0A, end of file: \\n\\n .SH NOTES To interface to Netscape Navigator: first locate the help scripts nsxlview & nsopen. Go into the Edit Preferences dialog box. Click on the Navigator Category and hilight the Applications menu item. Look for Microsoft Excel Worksheet. If you don't see it create one. The MIME type should be: application/vnd.ms-excel, the suffixes should be: xls,xlt,xlm,xld,xla,xlc,xlw,xll. In the handled by section of the dialog box, check the Application checkbox and set the path to wherever the nsxlview helper script is located and pass a %s argument. For example, if nsxlview is located in /usr/local/bin, then you would put: /usr/local/bin/nsxlview %s in the Application path box. (As a side note, make sure the nsxlview script can find the xlhtml program or it won't work.) Click on the OK and you are done. You should be able to use the Test.xls file that is distributed with the program to verify its configured correctly. .SH AUTHOR Steve Grubb, Charles N Wyble xlhtml/xlhtml/xlhtml.c0100644000076400007640000027461007470757344015542 0ustar jackshckjackshck/*! \file xlhtml.c \brief converts MS Excel files to useful formats xlhtml generates HTML, XML, csv and tab-delimited versions of MS Excel spreadsheets. */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "tuneable.h" #include "xlhtml.h" #include "support.h" static U16 HARD_MAX_ROWS = HARD_MAX_ROWS_97; static char SectionName[2][12] = /* The section of the Excel Stream where the workbooks are kept */ { "/Workbook", /*!< Excel 97 & 2000 */ "/Book" /*!< Everything else ? */ }; int numCustomColors = 0; U8 **customColors = 0; char colorTab[MAX_COLORS][8] = { "000000", /* FIXME: Need to find these first 8 colors! */ "FFFFFF", "FFFFFF", "FFFFFF", "FFFFFF", "FFFFFF", "FFFFFF", "FFFFFF", "FFFFFF", /*0x08 - This one's Black, too ??? */ "FFFFFF", /* This one's normal */ "red", /* "FF0000", */ "lime", /* "00FF00", */ "blue", /* "0000FF", */ "FFFF00", "FF00FF", "aqua", /* "00FFFF", */ "800000", /* 0x10 */ "green", /* "008000", */ "navy", /* "000080", */ "808000", "800080", "teal", /* "008080", */ "C0C0C0", "gray", /* "808080", */ "9999FF", /* 0x18 */ "993366", "FFFFCC", "CCFFFF", "660066", "FF8080", "0066CC", "CCCCFF", "000080", "FF00FF", /* 0x20 */ "FFFF00", "00FFFF", "800080", "800000", "008080", "0000FF", "00CCFF", /* 0x28 */ "CCFFFF", "CCFFCC", "FFFF99", "99CCFF", "FF99CC", "CC99FF", "FFCC99", "3366FF", /* 0x30 */ "33CCCC", "99CC00", "FFCC00", "FF9900", "FF6600", "666699", "969696", "003366", /* 0x38 */ "339966", "003300", "333300", "993300", "993366", "333399", "333333", "FFFFFF" /* 0x40 */ }; int DatesR1904 = 0; /*!< Flag that the dates are based on McIntosh Dates system */ /* FIXME: Support major languages here...not just English */ const char month_abbr[12][5] = { "Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec" }; /* Function Prototypes */ /* This function is in xml.c */ extern void OutputTableXML(void); /* This function is in ascii.c */ void OutputPartialTableAscii(void); /* These functions are in html.c */ extern void OutputTableHTML(void); extern void output_start_html_attr(html_attr *h, unsigned int, int); extern void output_end_html_attr(html_attr *h); extern void output_footer(void); extern void output_header(void); COLE_LOCATE_ACTION_FUNC scan_file; void main_line_processor(U16, U16, U32, U16, U8); void decodeBoolErr(U16, U16, char *); void PrintFloatComma(char *, int, F64); void print_as_fraction(F64, int); void incr_f_cnt(uni_string *); int get_default_font(void); void OutputCharCorrected(U8); void update_crun_info(U16 *loc, U16 *fnt_idx, U16 crun_cnt, U8 *fmt_run); void put_utf8(U16); void print_utf8(U16); void uni_string_clear(uni_string *); int uni_string_comp(uni_string *, uni_string *); void html_flag_init(html_attr *h); void output_start_font_attribute(html_attr *h, U16 fnt_idx); /* The array update functions */ int ws_init(int); int add_more_worksheet_ptrs(void); int resize_c_array(work_sheet *, U32, U16); void add_wb_array(U16, U16, U16, U16, U8, U8 *, U16, U16, U8 *); void update_cell_xf(U16, U16, U16); void update_cell_hyperlink(U16 r, U16 c, U8 *hyperlink, int len, U16 type); void add_str_array(U8, U8 *, U16, U8 *, U8); void add_font(U16, U16, U16, U16, U16, U8, U16, U8 *, U16); void add_ws_title(U16, U8 *, U16); void add_xf_array(U16 fnt_idx, U16 fmt_idx, U16 gen, U16 align, U16 indent, U16 b_style, U16 b_l_color, U32 b_t_color, U16 cell_color); /* Global data */ char filename[256]; int file_version = 0; U32 next_string=0; unsigned int next_font=0, next_ws_title=0, next_xf=0; int sheet_count=-2; /*!< Number of worksheets found */ uni_string default_font; /*!< Font for table */ int default_fontsize = 3; /*!< Default font size for table */ char *default_alignment = 0; /*!< Alignment for table */ int first_sheet = 0; /*!< First worksheet to display */ int last_sheet = WORKSHEETS_INCR-1; /*!< The last worksheet to display */ S16 xp=0, xr1=-1, xr2=-1, xc1=-1, xc2=-1; /*!< Extraction info... */ int currency_symbol = '$'; /*!< What to use for currency */ U16 str_formula_row = 0; /*!< Data holders for string formulas */ U16 str_formula_col = 0; /*!< Data holders for string formulas */ U16 str_formula_format = 0; /*!< Data holders for string formulas */ /* Limits */ unsigned int max_fonts = FONTS_INCR; unsigned int max_xformats = XFORMATS_INCR; unsigned long max_strings = STRINGS_INCR; unsigned int max_worksheets = WORKSHEETS_INCR; /* Global arrays */ xf_attr **xf_array; work_sheet **ws_array; uni_string **str_array; font_attr **font_array; fnt_cnt *f_cnt; int fnt_size_cnt[7]; /*!< Html has only 7 sizes... */ uni_string author; char *title = 0; char *lastUpdated = 0; /* Command Line flags */ int use_colors = 1; /*!< Whether or not to use colors in output */ int aggressive = 0; /*!< Aggressive html optimization */ int formula_warnings = 1; /*!< Whether or not to suppress formula warnings */ int center_tables = 0; /*!< Whether or not to center justify tables or leave it left */ int trim_edges = 0; /*!< Whether or not to trim the edges of columns or rows */ char *default_text_color = "000000"; char *default_background_color="FFFFFF"; char *default_image=NULL; /*!< Point to background image */ int Ascii = 0; /*!< Whether or not to out ascii instaed of html */ int Csv = 0; /*!< Whether or not to out csv instaed of html */ int OutputXML = 0; /*!< Output as xml */ int DumpPage = 0; /*!< Dump page count & max cols & rows */ int Xtract = 0; /*!< Extract a range on a page. */ int MultiByte = 0; /*!< Output as multibyte */ int NoHeaders = 0; /*!< Don't output html header */ /* Some Global Flags */ int notAccurate = 0; /*!< Flag used to indicate that stale data was used */ int NoFormat = 0; /*!< Flag used to indicated unimplemented format */ int NotImplemented = 0; /*!< Flag to print unimplemented cell type message */ int Unsupported = 0; /*!< Flag to print unsupported cell type message */ int MaxPalExceeded = 0; int MaxXFExceeded = 0; int MaxFormatsExceeded = 0; int MaxColExceeded = 0; int MaxRowExceeded = 0; int MaxWorksheetsExceeded = 0; int MaxStringsExceeded = 0; int MaxFontsExceeded = 0; int UnicodeStrings = 0; /*!< 0==ASCII, 1==windows-1252, 2==uft-8 */ int CodePage = 0; /*!< Micosoft CodePage as specified in the Excel file. */ int main (int argc, char **argv) { int i, f_ptr = 0; U16 k; U32 j; COLEFS * cfs; COLERRNO colerrno; if (argc < 2) { printf("Incorrect usage. Try xlhtml --help for more information\n"); exit(0); } else { strncpy(filename, argv[argc-1], 252); filename[252] = 0; for (i=1; i<(argc-1); i++) { if (strcmp(argv[i], "-nc") == 0) use_colors = 0; else if(strcmp(argv[i], "-xml") == 0 ) OutputXML = 1; else if (strcmp(argv[i], "-asc") == 0) Ascii = 1; else if (strcmp(argv[i], "--ascii") == 0) Ascii = 1; else if (strcmp(argv[i], "-csv") == 0) { Ascii = 1; Csv = 1; } else if (strcmp(argv[i], "-a") == 0) aggressive = 1; else if (strcmp(argv[i], "-fw") == 0) formula_warnings = 0; else if (strcmp(argv[i], "-c") == 0) center_tables = 1; else if (strcmp(argv[i], "-dp") == 0) DumpPage = 1; else if (strcmp(argv[i], "-m") == 0) MultiByte = 1; else if (strncmp(argv[i], "-tc", 3) == 0) { default_text_color = &argv[i][3]; if (strlen(default_text_color) != 6) display_usage(); } else if (strncmp(argv[i], "-bc", 3) == 0) { default_background_color = &argv[i][3]; if (strlen(default_background_color) != 6) display_usage(); } else if (strncmp(argv[i], "-bi", 3) == 0) { default_image = &argv[i][3]; use_colors = 0; } else if (strncmp(argv[i], "-te", 3) == 0) trim_edges = 1; else if (strcmp(argv[i], "-v") == 0) print_version(); else if(strcmp(argv[i], "-nh") == 0 ) NoHeaders = 1; else if (strncmp(argv[i], "-xc:", 4) == 0) { int d1, d2; if (sscanf(argv[i] + 4, "%d-%d", &d1, &d2) != 2) { fprintf(stderr, "column range %s not valid, expected -xc:FIRST-LAST\n", argv[i] + 4); display_usage(); } xc1 = (S16)d1; xc2 = (S16)d2; Xtract = 1; if (xc1 > xc2) { fprintf(stderr, "last column must be >= the first\n"); exit(1); } } else if (strncmp(argv[i], "-xp:", 4) == 0) { Xtract = 1; xp = (S16)atoi(&(argv[i][4])); if (xp < 0) { fprintf(stderr, "Negative numbers are illegal.\n"); exit(1); } } else if (strncmp(argv[i], "-xr:", 4) == 0) { char *ptr, *buf; Xtract = 1; buf = strdup(argv[i]); ptr = strrchr(buf, '-'); xr2 = (S16)atoi(ptr+1); *ptr = 0; ptr = strchr(buf, ':'); xr1 = (S16)atoi(ptr+1); free(buf); if (xr1 > xr2) { fprintf(stderr, "row's 2nd digit must be >= the first\n"); exit(1); } } else display_usage(); } if (strcmp(filename, "-v") == 0) { print_version(); } if (strcmp(filename, "--version") == 0) { print_version(); } if (strcmp(filename, "--help") == 0) display_usage(); if (strcmp(filename, "-?") == 0) display_usage(); } if (Ascii) { /* Disable it if DumpPage or Xtract isn't used... */ if (!(DumpPage||Xtract)) Ascii = 0; } if (Xtract) trim_edges = 0; /* No trimming when extracting... */ if (OutputXML) aggressive = 0; /* Init arrays... */ ws_array = (work_sheet **)malloc(max_worksheets * sizeof(work_sheet *)); for (i=0; i<(int)max_worksheets; i++) ws_array[i] = 0; str_array = (uni_string **)malloc(max_strings*sizeof(uni_string *)); for (i=0; i<(int)max_strings; i++) str_array[i] = 0; font_array = (font_attr **)malloc(max_fonts * sizeof(font_attr *)); f_cnt = (fnt_cnt *)malloc(max_fonts * sizeof(fnt_cnt)); for (i=0; i<(int)max_fonts; i++) { /* I assume these won't fail since we are just starting up... */ font_array[i] = 0; f_cnt[i].name = 0; } xf_array = (xf_attr **)malloc(max_xformats * sizeof(xf_attr *)); for (i=0; i<(int)max_xformats; i++) xf_array[i] = 0; uni_string_clear(&author); uni_string_clear(&default_font); umask(GLOBAL_UMASK); #if defined( __WIN32__ ) || defined( __BORLANDC__ ) { char *ptr = strchr(filename, ':'); if (ptr) { int len; char new_drive[MAXPATH]; fnsplit(filename, new_drive, 0, 0, 0); if (new_drive[0] >= 'a') setdisk(new_drive[0] - 'a'); else setdisk(new_drive[0] - 'A'); ptr++; /* Get past the colon */ len = strlen(ptr); memmove(filename, ptr, len); filename[len] = 0; } } #endif /* If successful, this calls scan_file to extract the work book... */ cfs = cole_mount(filename, &colerrno); if (cfs == NULL) { cole_perror (NULL, colerrno); exit(1); } while (cole_locate_filename (cfs, SectionName[f_ptr], NULL, scan_file, &colerrno)) { if (f_ptr) { /* Two strikes...we're out! */ cole_perror (PRGNAME, colerrno); if (colerrno == COLE_EFILENOTFOUND) fprintf(stderr, "Section: Workbook\n"); break; } else f_ptr++; } if (cole_umount (cfs, &colerrno)) { cole_perror (PRGNAME, colerrno); exit(1); } for (i=0; istr) free(str_array[i]->str); free(str_array[i]); } } for (i=0; i<(int)max_fonts; i++) { if (font_array[i]) { if (font_array[i]->name.str) free(font_array[i]->name.str); free(font_array[i]); if (f_cnt[i].name) { if (f_cnt[i].name->str) free(f_cnt[i].name->str); free(f_cnt[i].name); } } } for (i=0; i<(int)max_worksheets; i++) { if (ws_array[i]) { if (ws_array[i]->ws_title.str) free(ws_array[i]->ws_title.str); if (ws_array[i]->c_array) { for (j=0; jmax_rows; j++) { for (k=0; kmax_cols; k++) { if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]) { if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->ustr.str) free(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->ustr.str); if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->ustr.fmt_run) free(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->ustr.fmt_run); if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->h_link.str) free(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->h_link.str); free(ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]); } } } free(ws_array[i]->c_array); } free(ws_array[i]); } } for (i=0; i<(int)max_xformats; i++) { if (xf_array[i]) free(xf_array[i]); } if (numCustomColors) { for (i=0; i 3) main_line_processor(opcode, version, count-4, target, buf[0]); else if (count == 0) opcode = (U16)buf[0]; else if (count == 1) version = (U16)buf[0]; else if (count == 2) target = (U16)buf[0]; else if (count == 3) target |= (U16)(buf[0]<<8); if ((count >= 3) && (count == (U32)target + 3)) count = 0; else count++; if (MaxColExceeded || MaxRowExceeded || MaxWorksheetsExceeded) break; /* We're outta memory and therefore...done */ } cole_fclose(cf, &err); if (Ascii) { if (DumpPage) { /* Output the XLS Parameters */ int i; printf("There are %d pages total.\n", sheet_count+1); for (i=0; i<=sheet_count; i++) { printf("Page:%d Name:%s MaxRow:%ld MaxCol:%ld\n", i, ws_array[i]->ws_title.str ? (char *)ws_array[i]->ws_title.str : "(Unknown Page)", (long)ws_array[i]->biggest_row, (long)ws_array[i]->biggest_col); } } else if (Xtract) OutputPartialTableAscii(); } else { if (DumpPage) { /* Output the XLS Parameters */ int i; output_header(); printf("

There are %d pages total.

\n", sheet_count+1); for (i=0; i<=sheet_count; i++) { printf("

Page:%d Name:%s MaxRow:%ld MaxCol:%ld

\n", i, ws_array[i]->ws_title.str ? (char *)ws_array[i]->ws_title.str : "(Unknown Page)", (long)ws_array[i]->biggest_row, (long)ws_array[i]->biggest_col); } output_footer(); } else { if( OutputXML ) OutputTableXML(); else OutputTableHTML(); } } } void SetupExtraction(void) { if (Xtract) { /* Revise the page settings... */ /* printf("-%d %d %d %d %d
\n", xp, xr1, xr2, xc1, xc2); */ if ((xp >= first_sheet)&&(xp <= last_sheet)&&(xp <= sheet_count)) { first_sheet = xp; last_sheet = xp; if (xr1 < 0) { xr1 = (S16)ws_array[xp]->first_row; xr2 = (S16)ws_array[xp]->biggest_row; } else if ((xr1 >= ws_array[xp]->first_row)&&(xr1 <= ws_array[xp]->biggest_row) &&(xr2 >= ws_array[xp]->first_row)&&(xr2 <= ws_array[xp]->biggest_row)) { ws_array[xp]->first_row = xr1; ws_array[xp]->biggest_row = xr2; if (xc1 < 0) { xc1 = ws_array[xp]->first_col; xc2 = ws_array[xp]->biggest_col; } else if((xc1 >= ws_array[xp]->first_col)&&(xc1 <= ws_array[xp]->biggest_col) &&(xc2 >= ws_array[xp]->first_col)&&(xc2 <= ws_array[xp]->biggest_col)) { ws_array[xp]->first_col = xc1; ws_array[xp]->biggest_col = xc2; } else { if (Ascii) fprintf(stderr, "Error - Col not in range during extraction" " (%d or %d not in [%d..%d])\n", xc1, xc2, ws_array[xp]->first_col, ws_array[xp]->biggest_col); else { printf("Error - Col not in range during extraction.\n"); output_footer(); } return; } } else { if (Ascii) fprintf(stderr, "Error - Row not in range during extraction" " (%d or %d not in [%ld..%ld])\n", xr1, xr2, (long)ws_array[xp]->first_row, (long)ws_array[xp]->biggest_row); else { printf("Error - Row not in range during extraction."); output_footer(); } return; } } else { if (Ascii) fprintf(stderr, "Error - Page not in range during extraction."); else { printf("Error - Page not in range during extraction."); output_footer(); } return; } } } /*! * This function gets called once for every single byte of record data. * \brief Process the record data. * \param opcode the opcode of the current BIFF record * \param version the version (?) of the current BIFF record * \param count the absolute offset in the record data * \param last the size of the record data * \param data the character being processed */ void main_line_processor(U16 opcode, U16 version, U32 count, U16 last, U8 data) { int cont_opcode = 0; /* is this the CONTINUE opcode? */ static U16 last_opcode = -1; /* holds last non-CONTINUE opcode */ static U8 working_buffer[WBUFF_SIZE]; static unsigned int bufidx = 0; /* the index into the working buffer */ static unsigned int buflast = 0; /* the expected length of the working buffer */ /* Needed by the SST Opcode 0xFC: */ static U8 str_options = 0; static int buf_16bit = 0; static int now_16bit = 0; static int after_str_header = 0; static U16 num_chars = 0; static U16 num_fmt_runs = 0; static U32 fareast_bytes = 0; static U16 nonascii = 0; /* On start of record, reset stuff. */ if (count == 0) { if (opcode != 0x3C) /* not CONTINUE opcode */ { last_opcode = opcode; bufidx = 0; buflast = 0; memset(working_buffer, 0, WBUFF_SIZE); } } if (opcode == 0x3C) { opcode = last_opcode; cont_opcode = 1; } /* Abort processing if too big. Next opcode will reset everything. */ if (bufidx >= WBUFF_SIZE) { /* this will be printed many times; leave it this way since it's temporary * anyway - the buffer must be made dynamic */ fprintf(stderr, "Warning: working buffer overflow!\n"); return; } /* no chart processing for now. */ if (version == 0x0010) return; switch (opcode) { case 0x2F: /* File is password protected */ printf("File is password protected. Exiting..."); exit(1); case 0x09: /* BOF */ working_buffer[bufidx++] = data; if (bufidx == last) { if (file_version == 0) { /* File version info can be gathered here... * 4 = Excel version 4 * 1280 = Excel version 5 * 0500 = Excel 95 * 1536 = Excel 97 */ if (version == 8) file_version = getShort(&working_buffer[0]); else file_version = version; if (file_version == EXCEL95) { use_colors = 0; HARD_MAX_ROWS = HARD_MAX_ROWS_95; } /* printf("Biff:%X\n", file_version); */ } sheet_count++; if (sheet_count >= (int)max_worksheets) add_more_worksheet_ptrs(); } break; case 0x01: /* Blank */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, c, f; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); if (version == 2) f = getShort(&working_buffer[4]); else f = 0; add_wb_array(r, c, f, opcode, (U16)0, (U8 *)0, 0, (U16)0, 0); } break; case 0x02: /* Integer */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, c, i, f; char temp[32]; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); if (version == 2) { f = getShort(&working_buffer[4]); i = getShort(&working_buffer[7]); sprintf(temp, "%d", i); } else { f = 0; Unsupported++; strcpy(temp, OutputXML ? "INT" : "****INT"); } add_wb_array(r, c, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, NULL); } break; case 0x03: /* Number - Float */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, c, f; F64 d; char temp[64]; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); if (version == 2) { f = getShort(&working_buffer[4]); getDouble(&working_buffer[6], &d); sprintf(temp, "%.15g", d); } else { /* Who knows what the future looks like */ f = 0; Unsupported = 1; sprintf(temp, "****FPv:%d", version); } add_wb_array(r, c, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, 0); } break; case 0xD6: /* RString */ working_buffer[bufidx++] = data; if ((bufidx == 8)&&(buflast == 0)) buflast = 8 + getShort(&working_buffer[6]); if (buflast) { if (bufidx == buflast) { U16 r, c, l, f; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); f = getShort(&working_buffer[4]); l = getShort(&working_buffer[6]); working_buffer[8+l] = 0; add_wb_array(r, c, f, opcode, (U16)0, &working_buffer[8], (U16)strlen((char *)&working_buffer[8]), 0, 0); } } break; case 0x04: /* Label - UNI */ working_buffer[bufidx++] = data; if (file_version == EXCEL95) { if (bufidx == last) { U16 r, c, f; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); f = getShort(&working_buffer[4]); working_buffer[bufidx] = 0; add_wb_array(r, c, f, opcode, (U16)0, &working_buffer[8], (U16)strlen((char *)&working_buffer[8]), 0, 0); } } else if (file_version == EXCEL97) { /* Remember, bufidx is 1 more than it should be */ if ((bufidx == 8)&&(buflast == 0)) { /* buflast = working_buffer[7]; */ num_chars = getShort(&working_buffer[6]); buflast = num_chars + 9; } if (bufidx == 9) { if (working_buffer[8] == 1) buflast = (num_chars << 1) + 9; } if (buflast) { if (bufidx == buflast) { U16 r, c, f; U16 len; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); if (version == 2) f = getShort(&working_buffer[4]); else /* Unknown version */ f = 0; working_buffer[bufidx] = 0; len = (U16)strlen((char *)&working_buffer[8]); if (working_buffer[8] == 1) { UnicodeStrings = 2; add_wb_array(r, c, f, opcode, (U16)2, &working_buffer[9], (U16)(num_chars << 1), 0, 0); } else add_wb_array(r, c, f, opcode, (U16)0, &working_buffer[8], len, 0, 0); } } } break; case 0x05: /* Boolerr */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, c, f; char temp[16]; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); if (version == 2) { f = getShort(&working_buffer[4]); decodeBoolErr(working_buffer[6], working_buffer[7], temp); add_wb_array(r, c, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, 0); } else { f = 0; Unsupported = 1; strcpy(temp, "****Bool"); add_wb_array(r, c, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, 0); } } break; case 0xFC: /* Packed String Array A.K.A. SST - Shared String Table */ /* Format of the SST: * - bytes 0-3: total number of strings in the workbook (32-bit int) * - bytes 4-7: number of strings following this header (32-bit int) * - from byte 8: strings; count is in the preceding int * Format of the individual strings: * - bytes 0-1: LN = number of characters (not bytes!) in the string (16-bit int) * - byte 2: option flags (see below) * - from byte 3: * if rich-text flag set: * - RT = number of rich-text formatting runs (16-bit int) * if far-east flag set: * - FE = far-east data size (32-bit int) * LN characters, either 8-bit or 16-bit each * if rich-text flag set: * - RT-times repeated: * - first formatted character, zero-based (16-bit int) * - index to font record (16-bit int) * if far-east flag set: * - unknown extended data about phonetic, keyboard etc. (FE bytes) * Option flags (byte 2 in string) is a bit field: * - bit 0 (01h): 0 = 8-bit characters, 1 = 16-bit characters * - bit 2 (04h): 0 = no far-east info, 1 = contains far-east info * - bit 3 (08h): 0 = no rich-text formatting, 1 = contains rich-text formatting * * The CONTINUE opcode has a special case for the SST: when a string * is split into two records, there is one additional byte at the start * of the second record, which indicates (like the option flags at the * start of the string) with its bit 0 whether the continuation has * 8-bit or 16-bit characters. Thus, the strings can start with 8-bit * characters and continue with 16-bit characters, or vice versa. */ if ((count == 0) && !cont_opcode) { /* initialize variables */ bufidx = 0; after_str_header = 0; } if ((count < 8) && !cont_opcode) /*! \todo For now, ignore the SST header. Ideally, we should * process at most the number of strings that is stored in * the header, ignoring the rest. Fortunately, the case when * this would be necessary doesn't seem to occur. */ break; if ((count == 0) && cont_opcode && after_str_header) { now_16bit = data & 0x01; if (now_16bit && !buf_16bit) { /* previous chunk was not Unicode but this one is */ int i; /* we will be doubling the buffer contents * => check if there is space */ if (2*buflast >= WBUFF_SIZE) { bufidx = WBUFF_SIZE + 1; break; } if (bufidx >= num_chars) { /* weird - we got a unicode flag, but we're * actually already done with the string data */ now_16bit = 0; } else { buf_16bit = 1; if (bufidx > 0) for (i = bufidx-1; i >= 0; i--) { working_buffer[2*i] = working_buffer[i]; working_buffer[2*i+1] = 0; } bufidx = 2 * bufidx; buflast = 2*num_chars + 4*num_fmt_runs + fareast_bytes; } } break; } working_buffer[bufidx++] = data; if (buf_16bit && !now_16bit && after_str_header && (bufidx < (2*num_chars))) /* ASCII -> unicode */ working_buffer[bufidx++] = 0; if (! after_str_header) /* Header processor */ { if (bufidx == 0x03) /* After 3 locations we have length */ { /* and option flags... */ num_chars = getShort(&working_buffer[0]); str_options = working_buffer[2]; now_16bit = buf_16bit = str_options & 0x01; } if ((bufidx == 0x03) && ((str_options & 0x0C) == 0)) { /* Normal run */ num_fmt_runs = 0; fareast_bytes = 0; buflast = num_chars << buf_16bit; after_str_header = 1; } else if ((bufidx == 0x05) && ((str_options & 0x0C) == 0x08)) { /* Rich-text formatted string only */ num_fmt_runs = getShort(&working_buffer[3]); fareast_bytes = 0; buflast = (num_chars << buf_16bit) + (num_fmt_runs*4); after_str_header = 1; } else if ((bufidx == 0x07) && ((str_options & 0x0C) == 0x04)) { /* Extended (Far-East) string only */ num_fmt_runs = 0; fareast_bytes = getLong(&working_buffer[3]); buflast = (num_chars << buf_16bit) + fareast_bytes; after_str_header = 1; } else if ((bufidx == 0x09) && ((str_options & 0x0C) == 0x0C)) { /* Rich-text formatted string + Extended (Far-East) string */ num_fmt_runs = getShort(&working_buffer[3]); fareast_bytes = getLong(&working_buffer[5]); buflast = (num_chars << buf_16bit) + fareast_bytes + (num_fmt_runs*4); after_str_header = 1; } else if (bufidx >= 0x09) { /* Houston, we have a problem. This should never happen. */ fprintf(stderr, "An error in SST processing occured. Please contact the author.\n"); bufidx = WBUFF_SIZE + 1; /* simulate buffer overflow to skip rest of opcode */ break; } if (after_str_header) { /* the string data is now starting */ if (buflast == 0) { /* special case for empty strings */ add_str_array(0, (U8 *)0, 0, 0, 0); after_str_header = 0; } else { memset(working_buffer, 0, WBUFF_SIZE); nonascii = 0; } bufidx = 0; } } else /* payload processor */ { if (data > 127) nonascii = 1; if (bufidx == buflast) { U8 uni; U16 len = (U16)(num_chars << buf_16bit); if (buf_16bit) { uni = 2; UnicodeStrings = 2; } else uni = nonascii; working_buffer[bufidx] = 0; if (num_fmt_runs) add_str_array(uni, working_buffer, len, working_buffer+len, num_fmt_runs); else add_str_array(uni, working_buffer, len, 0, 0); if (uni > UnicodeStrings) /* Try to "upgrade" charset */ UnicodeStrings = uni; bufidx = 0; after_str_header = 0; memset(working_buffer, 0, WBUFF_SIZE); } } break; case 0xFD: /* String Array Index A.K.A. LABELSST */ working_buffer[count] = data; if (count == (last - 1)) { U32 i; U16 r, c, f; /* This is byte reversed... */ r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); f = getShort(&working_buffer[4]); i = getLong(&working_buffer[6]); if (i < next_string) { /* printf("String used:%d\n", (int)i); */ if (str_array[i]) { if (str_array[i]->str) add_wb_array( r, c, f, opcode, str_array[i]->uni, str_array[i]->str, str_array[i]->len, str_array[i]->crun_cnt, str_array[i]->fmt_run); } else /* Error, so just set it empty */ add_wb_array( r, c, f, opcode, (U16)0, (U8 *)"String Table Error", 18, 0, 0); } else MaxStringsExceeded = 1; } break; case 0x31: /* Font */ working_buffer[bufidx++] = data; if ((file_version == EXCEL95) && (bufidx == last) && (last >= 15)) { /* Microsoft doesn't stick to their documentation. Excel 97 is supposed to be 0x0231...but it's not. Have to use file_version to separate them. */ unsigned int i; U16 size, attr, c_idx, b, su; U8 u; size = getShort(&working_buffer[0]); attr = getShort(&working_buffer[2]); c_idx = getShort(&working_buffer[4]); b = getShort(&working_buffer[6]); su = getShort(&working_buffer[8]); u = working_buffer[10]; buflast = working_buffer[14]; for (i=0; i= 16)) { /* Microsoft doesn't stick to their documentation. Excel 97 is supposed to be 0x0231...but it's not. Have to use file_version to separate them. */ unsigned int i; U16 len; U16 size, attr, c_idx, b, su; U8 u, uni; size = getShort(&working_buffer[0]); attr = getShort(&working_buffer[2]); c_idx = getShort(&working_buffer[4]); b = getShort(&working_buffer[6]); su = getShort(&working_buffer[8]); u = working_buffer[10]; buflast = working_buffer[14]; if (working_buffer[15] & 0x01) { uni = 2; len = 2 * (U16)buflast; for (i=0; i= 0x80U) uni = 1; } } working_buffer[len] = 0; /* printf("S:%04X A:%04X C:%04X B:%04X SU:%04X U:%02X\n", size, attr,c_idx,b,su,u); printf("BL:%d L:%d Uni:%d\n", buflast, len, uni); printf("%X %X %X %X\n", working_buffer[15], working_buffer[16], working_buffer[17], working_buffer[18]); printf("f:%s\n", working_buffer); */ add_font(size, attr, c_idx, b, su, u, uni, &working_buffer[0], len); } break; case 0x14: /* Header */ break; case 0x15: /* Footer */ break; case 0x06: /* Formula */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, c, f; U8 calc_val[64]; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[2]); f = getShort(&working_buffer[4]); if ((working_buffer[12] == 0xFF)&&(working_buffer[13] == 0xFF)) { /* Formula evaluates to Bool, Err, or String */ if (working_buffer[6] == 1) /* Boolean */ { decodeBoolErr(working_buffer[8], 0, (char *)calc_val); opcode = 0x0105; } else if (working_buffer[6] == 2) /* Err */ { decodeBoolErr(working_buffer[8], 1, (char *)calc_val); opcode = 0x0105; } else { /* String UNI */ str_formula_row = r; str_formula_col = c; str_formula_format = f; break; } } else { /* Otherwise...this is a number */ F64 n; getDouble(&working_buffer[6], &n); sprintf((char *)calc_val, "%.15g", n); opcode = 0x0103; /* To fix up OutputCellFormatted... */ } add_wb_array(r, c, f, opcode, (U16)0, calc_val, (U16)strlen((char *)calc_val), 0, 0); } break; case 0x07: /* String Formula Results */ working_buffer[bufidx++] = data; if (bufidx == last) { U8 *str; U8 uni = 0; U16 len = getShort(&working_buffer[0]); if (len > (last-3)) len = (U16)(last-3); if (file_version == EXCEL97) { /* Check for unicode. Terminate the buffer at 2x len since unicode is 2bytes per char. Then see if strlen is short...upperbyte is usually 0 in western chararcter sets. */ int t = len << 1; if ((t+3) < WBUFF_SIZE) working_buffer[t+3] = 0; else working_buffer[len+3] = 0; if ((len+3) < last) { uni = 2; len = (U16)t; } str = &working_buffer[3]; } else if (file_version == EXCEL95) { str = &working_buffer[2]; working_buffer[len+2] = 0; } else { if (OutputXML) str = (U8*)"String Formula"; else str = (U8*)"***String Formula"; len = (U16)strlen((char*)str); NotImplemented++; } add_wb_array(str_formula_row, str_formula_col, str_formula_format, opcode, uni, str, len, 0, 0); } break; case 0x5C: /* Author's name A.K.A. WRITEACCESS */ working_buffer[bufidx++] = data; if ((bufidx == last)&&(author.str == 0)) { if (file_version == EXCEL97) { author.len = getShort(&working_buffer[0]); if ((int)working_buffer[2] & 0x01) { author.len *= (U16)2; author.uni = 2; } else author.uni = 0; if (author.len > (last-2)) author.len = (U16)(last-2); author.str = (U8 *)malloc(author.len+1); if (author.str) { memcpy(author.str, &working_buffer[3], author.len); author.str[author.len] = 0; } } else if (file_version == EXCEL95) { author.len = working_buffer[0]; author.str = (U8 *)malloc(author.len+1); if (author.str) { memcpy(author.str, &working_buffer[1], author.len); author.str[author.len] = 0; } author.uni = 0; } } break; case 0x08: /* Row Data */ /* There's actually some other interesting things here that we're not collecting. For now, we'll Just get the dimensions of the sheet. */ working_buffer[bufidx++] = data; if (bufidx == last) { /* question...what is the actual limit? This can go as high as 64K. Is this really OK? */ U16 i, r, fc, lc, d, xf; r = getShort(&working_buffer[0]); fc = getShort(&working_buffer[2]); lc = (U16)(getShort(&working_buffer[4]) - (U16)1); d = getShort(&working_buffer[12]); xf = getShort(&working_buffer[14]); if (ws_array[sheet_count] == 0) if (ws_init(sheet_count)) return; if (r > ws_array[sheet_count]->biggest_row) { if (r < ws_array[sheet_count]->max_rows) ws_array[sheet_count]->biggest_row = r; else { /* Resize the array... */ if (MaxRowExceeded == 0) { int diff = (r/ROWS_INCR) + 1; if(resize_c_array(ws_array[sheet_count], ROWS_INCR*diff, 0)) { ws_array[sheet_count]->biggest_row = ws_array[sheet_count]->max_rows - 1; MaxRowExceeded = 1; return; } else ws_array[sheet_count]->biggest_row = r; } else return; } } if (lc > ws_array[sheet_count]->biggest_col) { if (lc < ws_array[sheet_count]->max_cols) ws_array[sheet_count]->biggest_col = lc; else { /* Resize array... */ if (MaxColExceeded == 0) { int diff = (lc/COLS_INCR) + 1; if (resize_c_array(ws_array[sheet_count], 0, (U16)(COLS_INCR*diff))) { ws_array[sheet_count]->biggest_col = (S16)(ws_array[sheet_count]->max_cols - 1); MaxColExceeded = 1; lc = ws_array[sheet_count]->max_cols; } else ws_array[sheet_count]->biggest_col = lc; } else lc = ws_array[sheet_count]->max_cols; } } if ((fc < ws_array[sheet_count]->max_cols)&&(d & 0x0080)) /* fGhostDirty flag */ { for (i=fc; i>2; switch (t) { case 0: RKtoDouble(n2, &d); sprintf(temp, "%.15g", d); break; case 1: RKtoDouble(n2, &d); sprintf(temp, "%.15g", d / 100.0); break; case 2: sprintf(temp, "%ld", (long)n2); break; default: d = (F64) n2; sprintf(temp, "%.15g", d / 100.0 ); break; } add_wb_array(r, c, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, 0); } break; case 0xBC: /* Shared Formula's */ /* working_buffer[bufidx++] = data; if (bufidx == last) { int fr, lr, fc, lc, i, j; fr = getShort(&working_buffer[0]); lr = getShort(&working_buffer[2]); fc = working_buffer[4]; lc = working_buffer[5]; for (i=fr; i<=lr; i++) { for (j=fc; j<=lc; j++) add_wb_array(i, j, (U16)0, opcode, 0, "***SHRFORMULA", 13); } NotImplemented = 1; } */ break; case 0x21: /* Arrays */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 fr, lr, fc, lc, i, j; fr = getShort(&working_buffer[0]); lr = getShort(&working_buffer[2]); fc = working_buffer[4]; lc = working_buffer[5]; for (i=fr; i<=lr; i++) { for (j=fc; j<=lc; j++) add_wb_array(i, j, (U16)0, opcode, 0, (U8 *)"***Array", 8, 0, 0); } NotImplemented = 1; } break; case 0xBD: /* MULRK */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, fc, lc; int i; r = getShort(&working_buffer[0]); fc = getShort(&working_buffer[2]); lc = getShort(&working_buffer[last-2]); for (i=0; i<=(lc-fc); i++) { U32 t; S32 n2, n; /* Must be signed long !!! */ U16 f; F64 d; char temp[64]; f = getShort(&working_buffer[4+(i*6)]); n = getLong(&working_buffer[6+(i*6)]); t = n & 0x03; n2 = n>>2; switch (t) { case 0: RKtoDouble(n2, &d); sprintf(temp, "%.15g", d); break; case 1: RKtoDouble(n2, &d); sprintf(temp, "%.15g", d / 100.0); break; case 2: sprintf(temp, " %ld", (S32)n2); break; default: d = (F64) n2; sprintf(temp, "%.15g", d / 100.0 ); break; } /* printf("%08X %02X %s %d %d\n", n2, t, temp, r, fc+i); */ add_wb_array(r, fc+i, f, opcode, (U16)0, (U8 *)temp, (U16)strlen(temp), 0, 0); } } break; case 0xBE: /* MULBLANK */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 r, fc, lc, j, f; r = getShort(&working_buffer[0]); fc = getShort(&working_buffer[2]); lc = getShort(&working_buffer[last-2]); for (j=0; j<=(lc-fc); j++) { /* This just stores format strings... */ f = getShort(&working_buffer[4+(j*2)]); add_wb_array(r, fc+j, f, opcode, (U16)0, (U8 *)0, (U16)0, 0, 0); } } break; case 0x18: /* Name UNI */ working_buffer[bufidx++] = data; if (bufidx == last) { char *ptr; working_buffer[bufidx] = 0; ptr = (char *)strstr((char *)&working_buffer[15], "LastUpdate"); if (ptr) { ptr += 13; lastUpdated = (char *)malloc(strlen(ptr)+1); if (lastUpdated) strcpy(lastUpdated, ptr); } else { ptr = (char *)strstr((char *)&working_buffer[15], "Title"); if (ptr) { ptr += 8; title = (char *)malloc(strlen(ptr)+1); if (title) strcpy(title, ptr); } } } break; case 0xE0: /* Extended format */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 fnt_idx; U16 fmt_idx; U16 gen; U16 align; U16 indent; U16 b_style; U16 b_l_color; U32 b_t_color; U16 cell_color; fnt_idx = getShort(&working_buffer[0]); fmt_idx = getShort(&working_buffer[2]); gen = getShort(&working_buffer[4]); align = getShort(&working_buffer[6]); indent = getShort(&working_buffer[8]); b_style = getShort(&working_buffer[10]); if (file_version == EXCEL95) { b_l_color = 0; b_t_color = 0; cell_color = (U16)(getShort(&working_buffer[12]) & (U16)0x1FFF); } else /* Excel 97 + */ { b_l_color = getShort(&working_buffer[12]); b_t_color = getLong(&working_buffer[14]); cell_color = getShort(&working_buffer[18]); } /* printf("XF:%02X FG:%02X BG:%02X\n", next_xf, cell_color&0x007F, (cell_color&0x1F80)>>7); */ /* printf("XF:%02X M:%02X b_t:%04X
\n", next_xf, indent, b_t_color); */ add_xf_array(fnt_idx, fmt_idx, gen, align, indent, b_style, b_l_color, b_t_color, cell_color); } break; case 0xE5: /* CELL MERGE INSTRUCTIONS */ working_buffer[bufidx++] = data; if (bufidx == last) { U16 num, fr, lr, fc, lc, i, j, k; ws_array[sheet_count]->spanned = 1; num = getShort(&working_buffer[0]); if (ws_array[sheet_count]->c_array == 0) return; for (i=0; ic_array) { if ((fr > lr)||(fr > ws_array[sheet_count]->biggest_row)||(lr > ws_array[sheet_count]->biggest_row)) lr = (U16)ws_array[sheet_count]->biggest_row; if ((fc > lc)||(fc > ws_array[sheet_count]->biggest_col)||(lc > ws_array[sheet_count]->biggest_col)) lc = ws_array[sheet_count]->biggest_col; for(j=fr; j<=lr; j++) { /* For each row */ for(k=fc; k<=lc; k++) { /* for each column */ c = ws_array[sheet_count]->c_array[(j*ws_array[sheet_count]->max_cols)+k]; if (c != 0) { c->spanned = 1; c->rowspan = 0; if (k == fc) c->colspan = (U16)((lc-fc)+1); else c->colspan = 0; } /* else { / Need to create one... printf("Bad One at:%d %d %d
\n", sheet_count, j, k); } */ } } } /* Now reset the first one... */ /* printf("s:%d fr:%d fc:%d lr:%d lc:%d
\n", sheet_count, fr, fc, lr, lc); */ c = ws_array[sheet_count]->c_array[(fr*ws_array[sheet_count]->max_cols)+fc]; if (c != 0) { c->spanned = 0; c->rowspan = (U16)(lr-fr); c->colspan = (U16)(lc-fc); if (c->rowspan) c->rowspan++; if (c->colspan) c->colspan++; } } } } break; case 0xB8: /* Hyperlink */ working_buffer[bufidx++] = data; if (bufidx == last) { /* This is based on Office 97 info... */ U16 r, c, uni_type, off; U32 len; r = getShort(&working_buffer[0]); c = getShort(&working_buffer[4]); if (working_buffer[32] == 0xE0) { /* Unicode format */ len = getLong(&working_buffer[48]); off = 52; uni_type = 2; } else { /* Ascii format */ len = getLong(&working_buffer[50]); off = 54; uni_type = 0; } if (len > (U32)(bufidx - off)) { /* correct misidentified links */ if (uni_type == 0) { off = 36; uni_type = 2; len = getLong(&working_buffer[32]) * 2; } else len = bufidx - off; /* safety measure to make sure it doen't blow up */ } update_cell_hyperlink(r, c, &working_buffer[off], len, uni_type); } break; case 0x92: /* Color Palette */ working_buffer[bufidx++] = data; if (bufidx == last) { /* This is based on Office 97 info... */ int i; U8 red, green, blue; U16 cnt = getShort(&working_buffer[0]); numCustomColors = cnt; customColors = (U8 **)calloc(cnt+1, sizeof(char *)); for (i=0; i= (int)max_worksheets) return 1; ws_array[i] = (work_sheet *)malloc(sizeof(work_sheet)); if (ws_array[i]) { ws_array[i]->spanned = 0; ws_array[i]->first_row = 0; ws_array[i]->biggest_row = -1; ws_array[i]->max_rows = ROWS_INCR; ws_array[i]->first_col = 0; ws_array[i]->biggest_col = -1; ws_array[i]->max_cols = COLS_INCR; uni_string_clear(&ws_array[i]->ws_title); ws_array[i]->c_array = (cell **)malloc(ROWS_INCR*COLS_INCR*sizeof(cell *)); if (ws_array[i]->c_array == 0) return 1; for (j=0; jc_array[(j*ws_array[i]->max_cols)+k] = 0; } else return 1; return 0; } /*! returns 1 on error, 0 on success */ int add_more_worksheet_ptrs(void) { work_sheet **tws_array; int pages; if (MaxWorksheetsExceeded) return 1; if (sheet_count > (int)max_worksheets) pages = (((sheet_count - max_worksheets)/WORKSHEETS_INCR) + 1) * WORKSHEETS_INCR; else pages = WORKSHEETS_INCR; tws_array = (work_sheet **)realloc(ws_array, (max_worksheets + pages) * sizeof(work_sheet *)); if (tws_array == NULL) { MaxWorksheetsExceeded = 1; return 1; } else { /* Next init the array... */ unsigned int i; ws_array = tws_array; for (i=max_worksheets; ic_array == 0) return 1; tc_array = (cell **)malloc((ws->max_rows+new_rows)*(ws->max_cols+new_cols)*sizeof(cell *)); if (tc_array == NULL) return 1; else { U32 j; U16 k; memset(tc_array, 0, (ws->max_rows+new_rows)*(ws->max_cols+new_cols)*sizeof(cell *)); for (j=0; j<(ws->max_rows); j++) { for (k=0; kmax_cols; k++) tc_array[(j*(ws->max_cols+new_cols))+k] = ws->c_array[(j*ws->max_cols)+k]; } ws->max_cols += new_cols; ws->max_rows += new_rows; free(ws->c_array); ws->c_array = tc_array; } return 0; } void add_wb_array(U16 r, U16 c, U16 xf, U16 type, U8 uni, U8 *str, U16 len, U16 crun_cnt, U8 *fmt_run) { work_sheet *ws; if ((sheet_count < 0)||(r > HARD_MAX_ROWS)||(c > HARD_MAX_COLS)) return; if (sheet_count >= (int)max_worksheets) { if (add_more_worksheet_ptrs()) return; } if (ws_array[sheet_count] == 0) { if (ws_init(sheet_count)) return; } ws = ws_array[sheet_count]; if (r >= ws->max_rows) { if (MaxRowExceeded) return; else { int diff = ((r-ws->max_rows)/ROWS_INCR)+1; if(resize_c_array(ws, ROWS_INCR*diff, 0)) { MaxRowExceeded = 1; return; } } } if (c >= ws->max_cols) { if (MaxColExceeded) return; else { U16 diff = (U16)(((c-ws->max_cols)/COLS_INCR)+1); if(resize_c_array(ws, 0, (U16)(COLS_INCR*diff))) { MaxColExceeded = 1; return; } } } if (ws->c_array[(r*ws->max_cols)+c] == 0) { if (r > ws_array[sheet_count]->biggest_row) ws_array[sheet_count]->biggest_row = r; if (c > ws_array[sheet_count]->biggest_col) ws_array[sheet_count]->biggest_col = c; ws->c_array[(r*ws->max_cols)+c] = (cell *)malloc(sizeof(cell)); if (ws->c_array[(r*ws->max_cols)+c]) { if (str) { ws->c_array[(r*ws->max_cols)+c]->ustr.str = (U8 *)malloc(len+1); if (ws->c_array[(r*ws->max_cols)+c]->ustr.str) { memcpy(ws->c_array[(r*ws->max_cols)+c]->ustr.str, str, len); ws->c_array[(r*ws->max_cols)+c]->ustr.str[len] = 0; } ws->c_array[(r*ws->max_cols)+c]->ustr.uni = uni; ws->c_array[(r*ws->max_cols)+c]->ustr.len = len; if (fmt_run && crun_cnt) { int rlen = crun_cnt*4; ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run = malloc(rlen); if (ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run) { memcpy(ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run, fmt_run, rlen); ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = crun_cnt; } else ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = 0; } else { ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run = 0; ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = 0; } } else uni_string_clear(&ws->c_array[(r*ws->max_cols)+c]->ustr); ws->c_array[(r*ws->max_cols)+c]->xfmt = xf; ws->c_array[(r*ws->max_cols)+c]->type = type; ws->c_array[(r*ws->max_cols)+c]->spanned = 0; ws->c_array[(r*ws->max_cols)+c]->rowspan = 0; ws->c_array[(r*ws->max_cols)+c]->colspan = 0; uni_string_clear(&ws->c_array[(r*ws->max_cols)+c]->h_link); } } else /* Default attributes already copied */ { if (r > ws_array[sheet_count]->biggest_row) ws_array[sheet_count]->biggest_row = r; if (c > ws_array[sheet_count]->biggest_col) ws_array[sheet_count]->biggest_col = c; if (str) { /* Check if a place holder is there and free it */ if (ws->c_array[(r*ws->max_cols)+c]->ustr.str != 0) free(ws->c_array[(r*ws->max_cols)+c]->ustr.str); ws->c_array[(r*ws->max_cols)+c]->ustr.str = (U8 *)malloc(len+1); if (ws->c_array[(r*ws->max_cols)+c]->ustr.str) { memcpy(ws->c_array[(r*ws->max_cols)+c]->ustr.str, str, len); ws->c_array[(r*ws->max_cols)+c]->ustr.str[len] = 0; } ws->c_array[(r*ws->max_cols)+c]->ustr.len = len; ws->c_array[(r*ws->max_cols)+c]->ustr.uni = uni; if (fmt_run && crun_cnt) { int rlen = crun_cnt*4; ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run = malloc(rlen); if (ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run) { memcpy(ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run, fmt_run, rlen); ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = crun_cnt; } else ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = 0; } else { ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run = 0; ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = 0; } } else { if (ws->c_array[(r*ws->max_cols)+c]->ustr.str == 0) { ws->c_array[(r*ws->max_cols)+c]->ustr.len = 0; ws->c_array[(r*ws->max_cols)+c]->ustr.uni = 0; ws->c_array[(r*ws->max_cols)+c]->ustr.fmt_run = 0; ws->c_array[(r*ws->max_cols)+c]->ustr.crun_cnt = 0; } } ws->c_array[(r*ws->max_cols)+c]->xfmt = xf; ws->c_array[(r*ws->max_cols)+c]->type = type; ws->c_array[(r*ws->max_cols)+c]->spanned = 0; ws->c_array[(r*ws->max_cols)+c]->rowspan = 0; ws->c_array[(r*ws->max_cols)+c]->colspan = 0; } } void update_cell_xf(U16 r, U16 c, U16 xf) { work_sheet *ws; if ((sheet_count < 0)||(r > HARD_MAX_ROWS)||(c > HARD_MAX_COLS)) return; if (sheet_count >= (int)max_worksheets) { if (add_more_worksheet_ptrs()) return; } if (ws_array[sheet_count] == 0) { if (ws_init(sheet_count)) return; } if (r >= ws_array[sheet_count]->max_rows) { if (MaxRowExceeded) return; else { int diff = ((r-ws_array[sheet_count]->max_rows)/ROWS_INCR)+1; if(resize_c_array(ws_array[sheet_count], ROWS_INCR*diff, 0)) { MaxRowExceeded = 1; return; } } } if (c >= ws_array[sheet_count]->max_cols) { if (MaxColExceeded) return; else { int diff = ((c-ws_array[sheet_count]->max_cols)/COLS_INCR)+1; if (resize_c_array(ws_array[sheet_count], 0, (U16)(COLS_INCR*diff))) { MaxColExceeded = 1; return; } } } ws = ws_array[sheet_count]; if (ws->c_array[(r*ws->max_cols)+c] == 0) { ws->c_array[(r*ws->max_cols)+c] = (cell *)malloc(sizeof(cell)); if (ws->c_array[(r*ws->max_cols)+c]) { uni_string_clear(&ws->c_array[(r*ws->max_cols)+c]->ustr); ws->c_array[(r*ws->max_cols)+c]->xfmt = xf; ws->c_array[(r*ws->max_cols)+c]->type = 1; /* This is the Blank Cell type */ if (r > ws_array[sheet_count]->biggest_row) ws_array[sheet_count]->biggest_row = r; if (c > ws_array[sheet_count]->biggest_col) ws_array[sheet_count]->biggest_col = c; ws->c_array[(r*ws->max_cols)+c]->spanned = 0; ws->c_array[(r*ws->max_cols)+c]->rowspan = 0; ws->c_array[(r*ws->max_cols)+c]->colspan = 0; uni_string_clear(&ws->c_array[(r*ws->max_cols)+c]->h_link); } } /* else { printf("R:%02X C:%02X XF:%02X is:%02X\n", r, c, xf, ws->c_array[r][c]->xfmt); } */ } void update_cell_hyperlink(U16 r, U16 c, U8 *hyperlink, int len, U16 uni) { work_sheet *ws; if (sheet_count < 0) /* Used to do a "0 <" check on r & c */ return; if (sheet_count >= (int)max_worksheets) { if (add_more_worksheet_ptrs()) return; } if (ws_array[sheet_count] == 0) { if (ws_init(sheet_count)) return; } if (r >= ws_array[sheet_count]->max_rows) { if (MaxRowExceeded) return; else { int diff = ((r-ws_array[sheet_count]->max_rows)/ROWS_INCR)+1; if(resize_c_array(ws_array[sheet_count], ROWS_INCR*diff, 0)) { MaxRowExceeded = 1; return; } } } if (c >= ws_array[sheet_count]->max_cols) { if (MaxColExceeded) return; else { int diff = ((c-ws_array[sheet_count]->max_cols)/COLS_INCR)+1; if(resize_c_array(ws_array[sheet_count], 0, (U16)(COLS_INCR*diff))) { MaxColExceeded = 1; return; } } } ws = ws_array[sheet_count]; if (ws->c_array[(r*ws->max_cols)+c] == 0) { /* should not get here, but just in case */ return; } if (ws->c_array[(r*ws->max_cols)+c]->h_link.str == 0) { ws->c_array[(r*ws->max_cols)+c]->h_link.str = (U8 *)malloc(len); if (ws->c_array[(r*ws->max_cols)+c]->h_link.str) memcpy(ws->c_array[(r*ws->max_cols)+c]->h_link.str, hyperlink, len); ws->c_array[(r*ws->max_cols)+c]->h_link.uni = uni; if (len) { if (uni < 2) ws->c_array[(r*ws->max_cols)+c]->h_link.len = (U16)(len-1); else ws->c_array[(r*ws->max_cols)+c]->h_link.len = (U16)(len-2); } } /* else { printf("R:%02X C:%02X XF:%02X is:%s\n", r, c, xf, ws->c_array[r][c]->h_link.str); } */ } void add_str_array(U8 uni, U8 *str, U16 len, U8 *fmt_run, U8 crun_cnt) { if ((str == 0)||(len == 0)) { next_string++; /* increment for empty strings, too */ return; } if (next_string >= max_strings) { uni_string **tstr_array; size_t new_size = (max_strings + STRINGS_INCR) * sizeof(uni_string *); tstr_array = (uni_string **)realloc(str_array, new_size); if (tstr_array == NULL) { MaxStringsExceeded = 1; /* fprintf(stderr, "%s: cannot allocate %d bytes for string storage %d: %s", PRGNAME, new_size, errno, strerror(errno)); */ return; } else { unsigned long i; str_array = tstr_array; /* Clear the new string slots */ for (i=max_strings; i<(max_strings + STRINGS_INCR); i++) str_array[i] = 0; max_strings += STRINGS_INCR; } } if (str_array[next_string] == 0) { str_array[next_string] = (uni_string *)malloc(sizeof(uni_string)); if (str_array[next_string]) { str_array[next_string]->str = (U8 *)malloc(len+1); if (str_array[next_string]->str) { memcpy(str_array[next_string]->str, str, len); str_array[next_string]->str[len] = 0; str_array[next_string]->len = len; str_array[next_string]->uni = uni; if (fmt_run && crun_cnt) { int rlen = crun_cnt*4; str_array[next_string]->fmt_run = malloc(rlen); if (str_array[next_string]->fmt_run) { memcpy(str_array[next_string]->fmt_run, fmt_run, rlen); str_array[next_string]->crun_cnt = crun_cnt; } else str_array[next_string]->crun_cnt = 0; } else { str_array[next_string]->fmt_run = 0; str_array[next_string]->crun_cnt = 0; } } } } next_string++; } void add_font(U16 size, U16 attr, U16 c_idx, U16 bold, U16 super, U8 underline, U16 uni, U8 *n, U16 len) { if (n == 0) return; if (next_font >= max_fonts) { font_attr **tfont_array; fnt_cnt *tf_cnt; tfont_array = (font_attr **)realloc(font_array, (max_fonts * FONTS_INCR) * sizeof(font_attr *)); tf_cnt = (fnt_cnt *)realloc(f_cnt, (max_fonts * FONTS_INCR) * sizeof(fnt_cnt)); if ((tf_cnt == NULL) || (tfont_array == NULL)) { MaxFontsExceeded = 1; return; } else { /* Next init the array... */ unsigned int i; font_array = tfont_array; f_cnt = tf_cnt; for (i=max_fonts; iname.str = (U8 *)malloc(len+1); if (font_array[next_font]->name.str) { font_array[next_font]->attr = attr; font_array[next_font]->c_idx = c_idx; font_array[next_font]->bold = bold; font_array[next_font]->super = super; font_array[next_font]->underline = underline; font_array[next_font]->name.uni = uni; memcpy(font_array[next_font]->name.str, n, len); font_array[next_font]->name.str[len] = 0; font_array[next_font]->name.len = len; font_array[next_font]->name.fmt_run = 0; font_array[next_font]->name.crun_cnt = 0; /* We will "pre-digest" the font size.. */ if (size >= 0x02D0) /* 36 pts */ font_array[next_font]->size = 7; else if (size >= 0x01E0) /* 24 pts */ font_array[next_font]->size = 6; else if (size >= 0x0168) /* 18 pts */ font_array[next_font]->size = 5; else if (size >= 0x00F0) /* 12 pts */ font_array[next_font]->size = 4; else if (size >= 0x00C8) /* 10 pts */ font_array[next_font]->size = 3; else if (size >= 0x00A0) /* 8 pts */ font_array[next_font]->size = 2; else font_array[next_font]->size = 1; } } } next_font++; if (next_font == 4) /* Per the doc's - number 4 doesn't exist. */ next_font++; } void add_ws_title(U16 uni, U8 *n, U16 len) { if (n == 0) return; if (next_ws_title >= max_worksheets) { if (add_more_worksheet_ptrs()) return; } if (ws_array[next_ws_title] == 0) { if (ws_init(next_ws_title)) return; } if (ws_array[next_ws_title]->ws_title.str == 0) { ws_array[next_ws_title]->ws_title.str = (U8 *)malloc(len+1); if (ws_array[next_ws_title]->ws_title.str) { ws_array[next_ws_title]->ws_title.uni = uni; memcpy(ws_array[next_ws_title]->ws_title.str, n, len); ws_array[next_ws_title]->ws_title.str[len] = 0; ws_array[next_ws_title]->ws_title.len = len; ws_array[next_ws_title]->ws_title.crun_cnt = 0; ws_array[next_ws_title]->ws_title.fmt_run = 0; } } next_ws_title++; } void add_xf_array(U16 fnt_idx, U16 fmt_idx, U16 gen, U16 align, U16 indent, U16 b_style, U16 b_l_color, U32 b_t_color, U16 cell_color) { if (next_xf >= max_xformats) { xf_attr **txf_array; txf_array = (xf_attr **)realloc(xf_array, (max_xformats + XFORMATS_INCR) * sizeof(xf_attr *)); if (txf_array == NULL) { MaxXFExceeded = 1; return; } else { unsigned int i; xf_array = txf_array; for (i=max_xformats; i<(max_xformats + XFORMATS_INCR); i++) xf_array[i] = 0; max_xformats += XFORMATS_INCR; } } if (xf_array[next_xf] == 0) { xf_array[next_xf] = (xf_attr *)malloc(sizeof(xf_attr)); if (xf_array[next_xf]) { xf_array[next_xf]->fnt_idx = fnt_idx; xf_array[next_xf]->fmt_idx = fmt_idx; xf_array[next_xf]->gen = gen; xf_array[next_xf]->align = align; xf_array[next_xf]->indent = indent; xf_array[next_xf]->b_style = b_style; xf_array[next_xf]->b_l_color = b_l_color; xf_array[next_xf]->b_t_color = b_t_color; xf_array[next_xf]->cell_color = cell_color; } next_xf++; } } void decodeBoolErr(U16 value, U16 flag, char *str) { if (str == 0) return; if (flag == 0) { if (value == 1) strcpy(str, "TRUE"); else strcpy(str, "FALSE"); } else { switch(value) { case 0x00: strcpy(str, "#NULL!"); break; case 0x07: strcpy(str, "#DIV/0!"); break; case 0x0F: strcpy(str, "#VALUE!"); break; case 0x17: strcpy(str, "#REF!"); break; case 0x1D: strcpy(str, "#NAME?"); break; case 0x24: strcpy(str, "#NUM!"); break; case 0x2A: strcpy(str, "#N/A"); break; default: strcpy(str, "#ERR"); break; } } } int IsCellNumeric(cell *c) { int ret_val = 0; switch (c->type & 0x00FF) { case 0x02: /* Int */ case 0x03: /* Float */ /* case 0x06: */ /* Formula */ /* case 0x08: */ case 0x7E: /* RK */ /* case 0xBC: */ /* case 0x21: */ case 0xBD: /* MulRK */ ret_val = 1; break; default: break; } return ret_val; } /*! \retval 0 not safe at all. \retval 1 extended format is OK \retval 2 Fonts OK */ int IsCellSafe(cell *c) { int safe = 0; if (c->xfmt < next_xf) { if (xf_array[c->xfmt]) { safe = 1; if (xf_array[c->xfmt]->fnt_idx < next_font) { if (font_array[xf_array[c->xfmt]->fnt_idx]) safe = 2; } } } return safe; } int IsCellFormula(cell *c) { if ((c->type > 0x0100)||(c->type == 0x0006)) return 1; else return 0; } void output_cell(cell *c, int xml) { html_attr h; if (c == NULL) printf( xml ? ">" : " "); else if (c->spanned != 0) { if (xml) printf(">"); return; } else { /* Determine whether or not it is of numeric origin.. */ int numeric = IsCellNumeric(c); /* 0=Text 1=Numeric */ html_flag_init(&h); if (c->xfmt == 0) { /* Unknown format... */ printf( xml ? ">" : ""); /* This section doesn't use Unicode */ if (c->ustr.str) OutputString(&(c->ustr)); else printf( xml ? "" : " "); } else { /* This is the BIFF7 & 8 stuff... */ int safe; int nullString = 1; safe = IsCellSafe(c); if (c->ustr.str) { if (c->ustr.uni < 2) /* UNI? */ nullString = null_string(c->ustr.str); else nullString = 0; } /* First take care of text color & alignment */ printf( xml ? "" : "rowspan != 0)||(c->colspan != 0)) { if (c->colspan) printf( xml ? " colspan=\"%d\"" : " COLSPAN=\"%d\"", c->colspan); if (c->rowspan) printf( xml ? " rowspan=\"%d\"" : " ROWSPAN=\"%d\"", c->rowspan); } if ((safe > 0)&&(!nullString)) { switch(xf_array[c->xfmt]->align & 0x0007) { /* Override default table alignment when needed */ case 2: case 6: /* Center across selection */ if (strcmp(default_alignment, "center") != 0) printf( xml ? "" : " ALIGN=\"center\""); break; case 0: /* General alignment */ if (numeric) /* Numbers */ { if (strcmp(default_alignment, "right") != 0) printf( xml ? "" : " ALIGN=\"right\""); } else if ((c->type & 0x00FF) == 0x05) { /* Boolean */ if (strcmp(default_alignment, "center") != 0) printf( xml ? "" : " ALIGN=\"center\""); } else { if (strcmp(default_alignment, "left") != 0) printf( xml ? "" : " ALIGN=\"left\""); } break; case 3: if (strcmp(default_alignment, "right") != 0) printf( xml ? "" : " ALIGN=\"right\""); break; case 1: default: if (strcmp(default_alignment, "left") != 0) printf( xml ? "" : " ALIGN=\"left\""); break; } switch((xf_array[c->xfmt]->align & 0x0070)>>4) { case 0: printf( xml ? "" : " VALIGN=\"top\""); break; case 1: printf( xml ? "" : " VALIGN=\"middle\""); break; case 2: /* General alignment */ if (safe > 1) { if ((font_array[xf_array[c->xfmt]->fnt_idx]->super & 0x0003) == 0x0001) printf( xml ? "" : " VALIGN=\"top\""); /* Superscript */ } break; default: if (safe > 1) { if ((font_array[xf_array[c->xfmt]->fnt_idx]->super & 0x0003) == 0x0001) printf( xml ? "" : " VALIGN=\"top\""); /* Superscript */ } break; } } /* Next do the bgcolor... BGCOLOR="" */ if (safe && use_colors) { int fgcolor; /* int bgcolor = (xf_array[c->xfmt]->cell_color & 0x3F80) >> 7; */ fgcolor = (xf_array[c->xfmt]->cell_color & 0x007F); /* printf(" XF:%X BG Color:%d, FG Color:%d", c->xfmt, bgcolor, fgcolor); */ /* Might be better by blending bg & fg colors? If valid, fgcolor != black and fgcolor != white */ if( ! xml ) { if (numCustomColors) { if (fgcolor < numCustomColors) { if (strcmp(default_background_color, (char *)customColors[fgcolor-8]) != 0) printf(" BGCOLOR=\"%s\"", customColors[fgcolor-8]); } } else { if (fgcolor < MAX_COLORS) { if (strcmp(default_background_color, colorTab[fgcolor]) != 0) printf(" BGCOLOR=\"%s\"", colorTab[fgcolor]); } } } } /* Next set the border color... */ if (safe && use_colors) { int lcolor, rcolor, tcolor, bcolor; lcolor = xf_array[c->xfmt]->b_l_color & 0x007F; rcolor = (xf_array[c->xfmt]->b_l_color & 0x3F80) >> 7; tcolor = xf_array[c->xfmt]->b_t_color & 0x007F; bcolor = (xf_array[c->xfmt]->b_t_color & 0x3F80) >> 7; if (((lcolor & rcolor & tcolor & bcolor) == lcolor)&&(lcolor < MAX_COLORS)) { /* if they are all the same...do it...that is if it's different from BLACK */ if (numCustomColors == 0) /* Don't do custom borders */ { if ((strcmp(colorTab[lcolor], "000000") != 0)&&(strcmp(colorTab[lcolor], "FFFFFF") != 0)) { if( !xml ) printf(" BORDERCOLOR=\"%s\"", colorTab[lcolor]); } } } } /* Close up the or ... */ printf(">"); /* Next set font properties */ if (safe > 1 && !xml ) { if (!nullString) output_start_font_attribute(&h, xf_array[c->xfmt]->fnt_idx); } /* Finally, take care of font modifications */ if ((safe > 1)&&(!nullString)) { if ((font_array[xf_array[c->xfmt]->fnt_idx]->underline&0x0023) > 0) { if (c->h_link.str) { printf("h_link.uni) { if (memchr((char *)c->h_link.str, ':', c->h_link.len) == 0) { if (memchr((char *)c->h_link.str, '@', c->h_link.len)) printf("mailto:"); } } OutputString(&(c->h_link)); printf("\">"); h.uflag = 2; } else { printf(""); h.uflag = 1; } } output_start_html_attr(&h, xf_array[c->xfmt]->fnt_idx, 0); } if (c->ustr.str) { if (safe) output_formatted_data(&(c->ustr), xf_array[c->xfmt]->fmt_idx, numeric, IsCellFormula(c)); else OutputString(&(c->ustr)); } else printf( xml ? "" : " "); /* printf(" T:%02X", c->type & 0x00FF); */ } /* Now close the tags... */ output_end_html_attr(&h); } if (!aggressive) printf( xml ? "" : "\n"); } void output_formatted_data(uni_string *u, U16 idx, int numeric, int formula) { if ((idx < max_xformats)&&(u->str)) { if ((formula_warnings)&&(formula)) { if( OutputXML ) printf( "" ); else printf("** "); notAccurate++; } if (numeric) { int year, month, date; long num; F64 dnum; int hr, minu, sec, msec; /* printf("idx:%d ", idx); */ switch (idx) { case 0x00: /* General */ dnum = atof((char *)u->str); printf("%.15g", dnum); break; case 0x01: /* Number 0 */ dnum = atof((char *)u->str); printf("%.0f", dnum); break; case 0x02: /* Number 0.00 */ dnum = atof((char *)u->str); printf("%.2f", dnum); break; case 0x03: /* Number w/comma 0,000 */ PrintFloatComma("%.0f", 0, (F64)atof((char *)u->str)); break; case 0x04: /* Number w/comma 0,000.00 */ PrintFloatComma("%.2f", 0, (F64)atof((char *)u->str)); break; case 0x05: /* Currency, no decimal */ PrintFloatComma("%.0f", 1, (F64)atof((char *)u->str)); break; case 0x06: /* Currency, no decimal Red on Neg */ PrintFloatComma("%.0f", 1, (F64)atof((char *)u->str)); break; case 0x07: /* Currency with decimal */ PrintFloatComma("%.2f", 1, (F64)atof((char *)u->str)); break; case 0x08: /* Currency with decimal Red on Neg */ PrintFloatComma("%.2f", 1, (F64)atof((char *)u->str)); break; case 0x09: /* Percent 0% */ if (Csv) printf("\""); dnum = 100.0*atof((char *)u->str); printf("%.0f%%", dnum); if (Csv) printf("\""); break; case 0x0A: /* Percent 0.00% */ if (Csv) printf("\""); dnum = 100.0*atof((char *)u->str); printf("%.2f%%", dnum); if (Csv) printf("\""); break; case 0x0B: /* Scientific 0.00+E00 */ if (Csv) printf("\""); dnum = atof((char *)u->str); printf("%.2E", dnum); if (Csv) printf("\""); break; case 0x0C: /* Fraction 1 number e.g. 1/2, 1/3 */ if (Csv) printf("\""); dnum = atof((char *)u->str); print_as_fraction(dnum, 1); if (Csv) printf("\""); break; case 0x0D: /* Fraction 2 numbers e.g. 1/50, 25/33 */ if (Csv) printf("\""); dnum = atof((char *)u->str); print_as_fraction(dnum, 2); if (Csv) printf("\""); break; case 0x0E: /* Date: m-d-y */ if (Csv) printf("\""); num = atol((char *)u->str); NumToDate(num, &year, &month, &date); printf("%d-%d-%02d", month, date, year); if (Csv) printf("\""); break; case 0x0F: /* Date: d-mmm-yy */ if (Csv) printf("\""); num = atol((char *)u->str); NumToDate(num, &year, &month, &date); printf("%d-%s-%02d", date, month_abbr[month-1], year); if (Csv) printf("\""); break; case 0x10: /* Date: d-mmm */ if (Csv) printf("\""); num = atol((char *)u->str); NumToDate(num, &year, &month, &date); printf("%d-%s", date, month_abbr[month-1]); if (Csv) printf("\""); break; case 0x11: /* Date: mmm-yy */ if (Csv) printf("\""); num = atol((char *)u->str); NumToDate(num, &year, &month, &date); printf("%s-%02d", month_abbr[month-1], year); if (Csv) printf("\""); break; case 0x12: /* Time: h:mm AM/PM */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, 0, 0); if (hr == 0) printf("12:%02d AM", minu); else if (hr < 12) printf("%d:%02d AM", hr, minu); else if (hr == 12) printf("12:%02d PM", minu); else printf("%d:%02d PM", hr-12, minu); if (Csv) printf("\""); break; case 0x13: /* Time: h:mm:ss AM/PM */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, &sec, 0); if (hr == 0) printf("12:%02d:%02d AM", minu, sec); else if (hr < 12) printf("%d:%02d:%02d AM", hr, minu, sec); else if (hr == 12) printf("12:%02d:%02d PM", minu, sec); else printf("%d:%02d:%02d PM", hr-12, minu, sec); if (Csv) printf("\""); break; case 0x14: /* Time: h:mm */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, 0, 0); printf("%d:%02d", hr, minu); if (Csv) printf("\""); break; case 0x15: /* Time: h:mm:ss */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, &sec, 0); if ((hr != 0)||(minu != 0)||(sec != 0)) printf("%d:%02d:%02d", hr, minu, sec); else { if (Ascii) putchar(' '); else printf(OutputXML ? "" : " "); } if (Csv) printf("\""); break; case 0x25: /* Number with comma, no decimal */ if (Csv) printf("\""); PrintFloatComma("%.0f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x26: /* Number with comma, no decimal, red on negative */ if (Csv) printf("\""); PrintFloatComma("%.0f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x27: /* Number with comma & decimal */ if (Csv) printf("\""); PrintFloatComma("%.2f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x28: /* Number with comma & decimal, red on negative */ if (Csv) printf("\""); PrintFloatComma("%.2f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x29: /* Number with comma, no decimal */ if (Csv) printf("\""); PrintFloatComma("%.2f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x2a: /* Currency, no decimal */ if (Csv) printf("\""); PrintFloatComma("%.0f", 1, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x2B: /* Number w/comma & decimal 0,000.00 */ if (Csv) printf("\""); PrintFloatComma("%.2f", 0, (F64)atof((char *)u->str)); if (Csv) printf("\""); break; case 0x2C: /* Accounting Currency $0,000.00 */ { F64 acc_val = atof((char *)u->str); if (Csv) printf("\""); if (acc_val < 0.0) PrintFloatComma(" (%.2f)", 1, fabs(acc_val)); else PrintFloatComma(" %.2f", 1, acc_val); if (Csv) printf("\""); break; } case 0x2D: /* Time: mm:ss */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, &sec, 0); printf("%02d:%02d", minu, sec); if (Csv) printf("\""); break; case 0x2E: /* Time: [h]:mm:ss */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, &sec, 0); if (hr) printf("%d:%02d:%02d", hr, minu, sec); else printf("%02d:%02d", minu, sec); if (Csv) printf("\""); break; case 0x2F: /* Time: mm:ss.0 */ if (Csv) printf("\""); FracToTime(u->str, &hr, &minu, &sec, &msec); printf("%02d:%02d.%01d", minu, sec, msec); if (Csv) printf("\""); break; case 0x31: /* Text - if we are here...it's a number */ dnum = atof((char *)u->str); printf("%g", dnum); break; default: /* Unsupported...but, if we are here, it's a number */ { char *ptr = strchr((char *)u->str, '.'); if( OutputXML ) printf( "" ); dnum = atof((char *)u->str); if (ptr) { if (Csv) printf("\"%.15g\"", dnum ); else if (OutputXML) printf("%.15g", dnum ); else printf("%.15g *", dnum ); } else { num = atol((char *)u->str); if (Csv) printf("%ld", num); else if (OutputXML) printf("%ld", num ); else printf("%ld *", num ); } /* printf(" F:%02X", idx); */ NoFormat++ ; } break; } } else /* Text data */ OutputString(u); } else /* Error handling just dump it. */ OutputString(u); } void PrintFloatComma(char *fformat, int is_currency, F64 d) { int len, int_len, dec_len; char *ptr2, buf[64]; sprintf(buf, fformat, fabs(d)); len = strlen(buf); ptr2 = strchr(buf, '.'); if (ptr2) { int_len = ptr2 - buf; dec_len = len - int_len; if (isdigit(buf[0]) == 0) { char *ptr = &buf[0]; while (isdigit(*ptr) == 0) { int_len--; ptr++; if (*ptr == 0) break; } } } else { int_len = len; dec_len = 0; } if (int_len > 3) { /* we have to do it the hard way... */ char rbuf[64], buf2[64]; int neg, i, j, count=0; if (d < 0.0) neg = 1; else neg = 0; /* reverse the string. It's easier to work this way. */ for (i=0, j=len-1; i= 1.0) { int n = (int)w; printf("%d ", n); r = w - (F64)n; } else r = w; /* Get closest fraction - brute force */ for (j=lim; j>0.0; j--) { for (i=lim; i>=0.0; i--) { if ( fabs((i/j)-r) <= closest) { closest = fabs((i/j)-r); ci = (int)i; cj = (int)j; } } } /* Done, print it... */ if (ci != 0) printf("%d/%d", ci, cj); } void trim_sheet_edges(unsigned int sheet) { cell *ce; int not_done = 1; S32 r; U16 c; if ((sheet >= max_worksheets)||(ws_array[sheet] == 0)|| (trim_edges == 0)||(ws_array[sheet]->spanned)) return; if (ws_array[sheet]->c_array == 0) return; if ( (ws_array[sheet]->biggest_row == -1) || (ws_array[sheet]->biggest_col == -1) ) return; /* First find top edge */ for (r=ws_array[sheet]->first_row; r<=ws_array[sheet]->biggest_row; r++) { for (c=ws_array[sheet]->first_col; c<=ws_array[sheet]->biggest_col; c++) { /* This stuff happens for each cell... */ ce = ws_array[sheet]->c_array[(r*ws_array[sheet]->max_cols)+c]; if (ce) { if (ce->ustr.str) { if (!null_string(ce->ustr.str)) { not_done = 0; break; } } } } if (!not_done) break; } if (not_done) ws_array[sheet]->first_row = ws_array[sheet]->biggest_row; else ws_array[sheet]->first_row = r; /* Second Find bottom edge */ not_done = 1; for (r=ws_array[sheet]->biggest_row; r>(S32)ws_array[sheet]->first_row; r--) { for (c=ws_array[sheet]->first_col; c<=ws_array[sheet]->biggest_col; c++) { /* This stuff happens for each cell... */ ce = ws_array[sheet]->c_array[(r*ws_array[sheet]->max_cols)+c]; if (ce) { if (ce->ustr.str) { if (!null_string(ce->ustr.str)) { not_done = 0; break; } } } } if (!not_done) break; } ws_array[sheet]->biggest_row = r; /* Third find left edge */ not_done = 1; for (c=ws_array[sheet]->first_col; c<=ws_array[sheet]->biggest_col; c++) { for (r=ws_array[sheet]->first_row; r<=ws_array[sheet]->biggest_row; r++) { /* This stuff happens for each cell... */ ce = ws_array[sheet]->c_array[(r*ws_array[sheet]->max_cols)+c]; if (ce) { if (ce->ustr.str) { if (!null_string(ce->ustr.str)) { not_done = 0; break; } } } } if (!not_done) break; } if (not_done) ws_array[sheet]->first_col = ws_array[sheet]->biggest_col; else ws_array[sheet]->first_col = c; /* Last, find right edge */ not_done = 1; for (c=ws_array[sheet]->biggest_col; c>ws_array[sheet]->first_col; c--) { for (r=ws_array[sheet]->first_row; r<=ws_array[sheet]->biggest_row; r++) { /* This stuff happens for each cell... */ ce = ws_array[sheet]->c_array[(r*ws_array[sheet]->max_cols)+c]; if (ce) { if (ce->ustr.str) { if (!null_string(ce->ustr.str)) { not_done = 0; break; } } } } if (!not_done) break; } ws_array[sheet]->biggest_col = c; } /*************** *! Figures out the best font & alignment for the current table. * Also sets the default_font and default_alignment. ****************/ void update_default_font(unsigned int sheet) { cell *ce; int r, c, f; if ((sheet >= max_worksheets)||(ws_array[sheet] == 0)) return; if (ws_array[sheet]->c_array == 0) return; /* Clear the book-keeping info... */ for (r=0; rstr) free(f_cnt[r].name->str); free(f_cnt[r].name); f_cnt[r].name = 0; } } if (default_font.str) free(default_font.str); for (r=0; r<7; r++) fnt_size_cnt[r] = 0; /* Now check each cell to see what it's using. */ for (r=ws_array[sheet]->first_row; r<=ws_array[sheet]->biggest_row; r++) { for (c=ws_array[sheet]->first_col; c<=ws_array[sheet]->biggest_col; c++) { /* This stuff happens for each cell... */ ce = ws_array[sheet]->c_array[(r*ws_array[sheet]->max_cols)+c]; if (ce) { if ((ce->xfmt < next_xf)&&(ce->ustr.str)) { if (strcmp((char *)ce->ustr.str, " ")) { if (ce->xfmt < next_xf) { if (xf_array[ce->xfmt]) { unsigned int fn = xf_array[ce->xfmt]->fnt_idx; if (fn < next_font) { if (font_array[fn]) { if (font_array[fn]->name.str) { /* Here's where we check & increment count... */ incr_f_cnt(&(font_array[fn]->name)); if ((font_array[fn]->size < 8)&&(font_array[fn]->size)) fnt_size_cnt[font_array[fn]->size-1]++; } } } } } } } } } } f = get_default_font(); if (f == -1) { default_font.str = (U8 *)malloc(6); if (default_font.str) { strcpy((char *)default_font.str, "Arial"); default_font.uni = 0; default_font.len = 5; } } else { default_font.str = (U8 *)malloc(f_cnt[f].name->len+1); if (default_font.str) { memcpy(default_font.str, f_cnt[f].name->str, f_cnt[f].name->len); default_font.str[f_cnt[f].name->len] = 0; default_font.uni = f_cnt[f].name->uni; default_font.len = f_cnt[f].name->len; } } /* Find the font size with the most counts... Just re-using variables, c - max cnt, f = position of max cnt */ c = 0; f = 3; for (r=0; r<7; r++) { if (fnt_size_cnt[r] > c) { c = fnt_size_cnt[r]; f = r; } } if (fnt_size_cnt[2] == c) /* favor size 3... */ default_fontsize = 3; else default_fontsize = f+1; for (r=0; rstr != 0) free(f_cnt[r].name->str); free(f_cnt[r].name); f_cnt[r].name= 0; } } } void incr_f_cnt(uni_string *name) { int i; if ((name == 0)||(name->str == 0)||(name->str[0] == 0)) return; for (i=0; istr = (U8 *)malloc(name->len+1); if (f_cnt[i].name->str) { memcpy(f_cnt[i].name->str, name->str, name->len); f_cnt[i].name->str[name->len] = 0; f_cnt[i].name->uni = name->uni; f_cnt[i].name->len = name->len; f_cnt[i].cnt = 1; break; } } } } } int get_default_font(void) { int i, m = -1; for (i=0; istr) { if (f_cnt[i].cnt > m) m = i; } } } return m; } void update_default_alignment(unsigned int sheet, int row) { int i, left = 0, center = 0, right = 0; cell *c; if ((sheet >= max_worksheets)||(ws_array[sheet] == 0)) return; if (ws_array[sheet]->c_array == 0) return; for (i=ws_array[sheet]->first_col; i<=ws_array[sheet]->biggest_col; i++) { /* This stuff happens for each cell... */ c = ws_array[sheet]->c_array[(row*ws_array[sheet]->max_cols)+i]; if (c) { int numeric = IsCellNumeric(c); if (c->xfmt == 0) { /* Unknown format... */ left++; } else { /* Biff 8 stuff... */ if ((c->xfmt < next_xf)&&(c->ustr.str)) { if (strcmp((char *)c->ustr.str, " ")) { if (xf_array[c->xfmt]) { switch(xf_array[c->xfmt]->align & 0x0007) { /* Override default table alignment when needed */ case 2: case 6: /* Center across selection */ center++; break; case 0: /* General alignment */ if (numeric) /* Numbers */ right++; else if ((c->type & 0x00FF) == 0x05) /* Boolean */ center++; else left++; break; case 3: right++; break; case 1: /* fall through... */ default: left++; break; } } } } } } } if ((center == 0)&&(left == 0)&&(right == 0)) default_alignment = ""; else if ((center >= left)&&(center >= right)) /* Favor center since it's the longest word */ default_alignment = "center"; else if ((right >= center)&&(right >= left)) default_alignment = "right"; /* Favor right since it's second longest */ else default_alignment = "left"; } void OutputString(uni_string *u) { unsigned int i; if (u == 0) return; if (u->uni < 2) { if (null_string(u->str)) { if (Ascii == 0) printf(OutputXML ? "" : " "); else if (!Csv) printf(" "); } else { if (Ascii) /* If Ascii output requested, simply output the string */ { /* These are broken up for performance */ if (Csv) { for (i=0; ilen; i++) { if (u->str[i] == 0x22) printf("\"\""); else putchar(u->str[i]); } } else { for (i=0; ilen; i++) putchar(u->str[i]); } return; } if (u->crun_cnt) { U16 loc, fnt_idx, crun_cnt=0; int format_changed = 0; html_attr h_flags; /* read the first format run */ update_crun_info(&loc, &fnt_idx, crun_cnt, u->fmt_run); html_flag_init(&h_flags); for (i=0; ilen; i++) { if (i == loc) { /* Time to change formats */ if (format_changed) { /* if old attributs, close */ output_end_html_attr(&h_flags); } else { /* FIXME: Also need to consider that a font may already be set for the cell, in which case a closing tag should be set. */ format_changed = 1; } /* set new attr */ output_start_font_attribute(&h_flags, fnt_idx); output_start_html_attr(&h_flags, fnt_idx, 1); /* get next fmt_run */ if (crun_cnt < u->crun_cnt) { crun_cnt++; update_crun_info(&loc, &fnt_idx, crun_cnt, u->fmt_run); } } OutputCharCorrected(u->str[i]); } if (format_changed) { output_end_html_attr(&h_flags); } } else { for (i=0; ilen; i++) OutputCharCorrected(u->str[i]); } } } else { if (u->len == 0) { if (Ascii) printf(" "); else printf(OutputXML ? "" : " "); } else { if (u->len == 2) { if (memcmp(u->str, "& ", 2) == 0) printf("…"); else { for (i=0; ilen; i+=2) print_utf8(getShort(&(u->str[i]))); } } else { for (i=0; ilen; i+=2) print_utf8(getShort(&(u->str[i]))); } } } } void OutputCharCorrected(U8 c) { if (MultiByte && (c & 0x80)) { putchar(c); return; } switch (c) { /* Special char handlers here... */ case 0x3C: /* '<' - less than */ printf("<"); break; case 0x3E: /* '>' - greater than */ printf(">"); break; case 0x26: /* '&' - ampersand */ printf("&"); break; case 0x22: /* '"' - double quote */ printf("""); break; /* Also need to cover 128-159 since MS uses this area... */ case 0x80: /* Euro Symbol */ printf("€"); break; case 0x82: /* baseline single quote */ printf("‚"); break; case 0x83: /* florin */ printf("ƒ"); break; case 0x84: /* baseline double quote */ printf("„"); break; case 0x85: /* ellipsis */ printf("…"); break; case 0x86: /* dagger */ printf("†"); break; case 0x87: /* double dagger */ printf("‡"); break; case 0x88: /* circumflex accent */ printf("ˆ"); break; case 0x89: /* permile */ printf("‰"); break; case 0x8A: /* S Hacek */ printf("Š"); break; case 0x8B: /* left single guillemet */ printf("‹"); break; case 0x8C: /* OE ligature */ printf("Œ"); break; case 0x8E: /* #LATIN CAPITAL LETTER Z WITH CARON */ printf("Ž"); break; case 0x91: /* left single quote ? */ printf("‘"); break; case 0x92: /* right single quote ? */ printf("’"); break; case 0x93: /* left double quote */ printf("“"); break; case 0x94: /* right double quote */ printf("”"); break; case 0x95: /* bullet */ printf("•"); break; case 0x96: /* endash */ printf("–"); break; case 0x97: /* emdash */ printf("—"); break; case 0x98: /* tilde accent */ printf("˜"); break; case 0x99: /* trademark ligature */ printf("™"); break; case 0x9A: /* s Hacek */ printf("š"); break; case 0x9B: /* right single guillemet */ printf("›"); break; case 0x9C: /* oe ligature */ printf("œ"); break; case 0x9F: /* Y Dieresis */ printf("Ÿ"); break; case 0xE1: /* a acute */ printf("á"); break; case 0xE9: /* e acute */ printf("é"); break; case 0xED: /* i acute */ printf("í"); break; case 0xF3: /* o acute */ printf("ó"); break; case 0xFA: /* u acute */ printf("ú"); break; case 0xFD: /* y acute */ printf("ý"); break; case 0xC1: /* A acute */ printf("Á"); break; case 0xC9: /* E acute */ printf("É"); break; case 0xCD: /* I acute */ printf("Í"); break; case 0xD3: /* O acute */ printf("Ó"); break; case 0xDA: /* U acute */ printf("Ú"); break; case 0xDD: /* Y acute */ printf("Ý"); break; case 0xB0: /* degrees */ printf("deg."); break; default: putchar(c); break; } } void update_crun_info(U16 *loc, U16 *fmt_idx, U16 crun_cnt, U8 *fmt_run) { U16 tloc, tfmt_idx; U16 offset = (U16)(crun_cnt*4); tloc = getShort(&fmt_run[offset]); tfmt_idx = getShort(&fmt_run[offset+2]); *loc = tloc; *fmt_idx = tfmt_idx; } void put_utf8(U16 c) { putchar((int)0x0080 | (c & 0x003F)); } void print_utf8(U16 c) { if (c < 0x80) OutputCharCorrected(c); else if (c < 0x800) { putchar(0xC0 | (c >> 6)); put_utf8(c); } else { putchar(0xE0 | (c >> 12)); put_utf8((U16)(c >> 6)); put_utf8(c); } } void uni_string_clear(uni_string *str) { if (str == 0) return; str->str = 0; str->uni = 0; str->len = 0; str->fmt_run = 0; str->crun_cnt = 0; } int uni_string_comp(uni_string *s1, uni_string *s2) { if ((s1 == 0)||(s2 == 0)) return -1; if ((s1->str == 0)||(s2->str == 0)) return -1; if ((s1->uni == s2->uni) && (s1->len == s2->len)) return memcmp(s1->str, s2->str, s1->len); else return -1; } void html_flag_init(html_attr *h) { h->fflag = 0; h->bflag = 0; h->iflag = 0; h->sflag = 0; h->uflag = 0; h->sbflag = 0; h->spflag = 0; } void output_start_font_attribute(html_attr *h, U16 fnt_idx) { if (uni_string_comp(&default_font, &(font_array[fnt_idx]->name)) != 0) { h->fflag = 1; printf("name)); printf("\""); } if (font_array[fnt_idx]->c_idx != 0x7FFF) { char color[8]; if (numCustomColors) { if ((font_array[fnt_idx]->c_idx < numCustomColors)&&use_colors) strcpy(color, (char *)customColors[font_array[fnt_idx]->c_idx-8]); else strcpy(color, "000000"); } else { if ((font_array[fnt_idx]->c_idx < MAX_COLORS)&&use_colors) strcpy(color, colorTab[font_array[fnt_idx]->c_idx]); else strcpy(color, "000000"); } if (strcmp(color, "000000") != 0) { if (h->fflag) printf(" COLOR=\"%s\"", color); else { h->fflag = 1; printf("super & 0x0003) { if (h->fflag) printf(" SIZE=\"2\""); /* Sub & Superscript */ else { h->fflag = 1; printf("fflag) { if (font_array[fnt_idx]->size != default_fontsize) printf(" SIZE=\"%d\"", font_array[fnt_idx]->size); } else { if (font_array[fnt_idx]->size != default_fontsize) { h->fflag = 1; printf("size); } } } if (h->fflag) printf(">"); } xlhtml/xlhtml/xlhtml.h0100644000076400007640000001321607470757344015540 0ustar jackshckjackshck/*! \file xlhtml.h \brief Header file for xlhtml */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __XLHTML_H_INCLUDED #define __XLHTML_H_INCLUDED #if !(defined( __BORLANDC__ ) || defined( __WIN32__ )) #include "config.h" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h" #else #include "config.h.in" /* Created by ./configure script */ #include "support.h" /* Needs to be before internal.h */ #include "internal.h" /* Needs to be before cole */ #include "cole.h.in" #include /* for umask */ #include #endif #include /* For atof(), calloc() */ #include /* For string functions */ #include /* For fabs() */ #include /* For isprint() */ #include /* Used by packed string array Opcode: 0xFC */ #define HARD_MAX_ROWS_97 0x7FFE /*!< Used in add_wb_array to prevent OOM */ #define HARD_MAX_ROWS_95 0x3FFF /*!< Used in add_wb_array to prevent OOM */ #define HARD_MAX_COLS 256 /*!< Used in add_wb_array to prevent OOM */ /********************************** * * Don't change anything below here... * ************************************/ #define PRGNAME "xlhtml" #define WBUFF_SIZE 8240 /*!< The working buffer. SB 522+10+4(header) bytes minimum = 536 */ #define MAX_COLORS 65 /*!< This is the size of the built-in color table */ #define EXCEL95 0x500 /*!< This is the file stamp for biff7 - Excel 5 & 95 */ #define EXCEL97 0x600 /*!< This is the file stamp for biff8 - Excel 97 & 2000 */ #if !(defined( __WIN32__ ) || defined( __BORLANDC__ )) #include #define GLOBAL_UMASK (S_IXUSR|S_IWGRP|S_IRGRP|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH) #else #define GLOBAL_UMASK (2) #endif /*! \brief This encapsulates the Unicode String */ typedef struct { U8 uni; /*!< Unicode String: 0==ASCII/8859-1, 1==windows-1252, 2==utf-8 */ U8 *str; /*!< Characters of string */ U16 len; /*!< Length of string */ U8 *fmt_run; /*!< formatting run, short pairs: offset, index to font */ U8 crun_cnt; /*!< The count of format runs */ } uni_string; /*! \brief This is everything we need for a cell */ typedef struct { U16 xfmt; /*!< The high bit will tell us which version 0 =< 2; 1 == 2+ */ U16 type; /*!< This will record the record type that generated the cell */ U16 spanned; /*!< If 1 don't output */ uni_string ustr; /*!< The cell's displayed contents */ U16 rowspan; /*!< rows to span */ U16 colspan; /*!< columns to span */ uni_string h_link; /*!< If a hyperlinked cell, this is the link*/ } cell; /*! \brief This encapsulates some information about each worksheet */ typedef struct { U32 first_row; S32 biggest_row; U32 max_rows; U16 first_col; S16 biggest_col; U16 max_cols; uni_string ws_title; cell **c_array; U16 spanned; } work_sheet; /*! \brief This is everything we need to know about fonts */ typedef struct { U16 size; U16 attr; U16 c_idx; U16 bold; U16 super; U8 underline; uni_string name; } font_attr; typedef struct { uni_string *name; U16 cnt; } fnt_cnt; /*! \brief This covers the Extended Format records */ typedef struct { U16 fnt_idx; U16 fmt_idx; U16 gen; U16 align; U16 indent; U16 b_style; U16 b_l_color; U32 b_t_color; U16 cell_color; } xf_attr; /*! \brief HTML Attribute */ typedef struct { int fflag; /*!< Font Flag */ int bflag; /*!< Bold Flag */ int iflag; /*!< Itallic Flag */ int sflag; /*!< Strike thru flag */ int uflag; /*!< Underline flag */ int sbflag; /*!< Subscript */ int spflag; /*!< Superscript */ } html_attr; extern int first_sheet; extern int last_sheet; extern char filename[256]; extern char *default_text_color; extern char *default_background_color; extern char *default_image; extern int aggressive; extern int center_tables; extern int NoHeaders; extern int formula_warnings; extern int Csv; extern xf_attr **xf_array; extern work_sheet **ws_array; extern font_attr **font_array; extern uni_string default_font; extern unsigned int next_font; extern unsigned int next_ws_title; extern int default_fontsize; extern char *default_alignment; extern char *title; extern uni_string author; extern char *lastUpdated; extern int file_version; extern char colorTab[MAX_COLORS][8]; extern int NoFormat; extern int notAccurate; extern int NotImplemented; extern int Unsupported; extern int MaxPalExceeded; extern int MaxXFExceeded; extern int MaxFormatsExceeded; extern int MaxColExceeded; extern int MaxRowExceeded; extern int MaxWorksheetsExceeded; extern int MaxStringsExceeded; extern int MaxFontsExceeded; extern int UnicodeStrings; extern int CodePage; void OutputString (uni_string *); void output_cell (cell *, int); int IsCellNumeric (cell *); int IsCellSafe (cell *); int IsCellFormula (cell *); void output_formatted_data (uni_string *, U16, int, int); void SetupExtraction (void); void trim_sheet_edges (unsigned int); void update_default_font (unsigned int); void update_default_alignment (unsigned int, int); #endif xlhtml/xlhtml/xls-handler0100755000076400007640000000013507446125653016215 0ustar jackshckjackshck#!/bin/sh echo "Content-type: text/html" echo echo /usr/local/bin/xlhtml $PATH_TRANSLATED xlhtml/xlhtml/xml.c0100644000076400007640000001254107470757344015023 0ustar jackshckjackshck/*! \file xml.c \brief XML output for xlhtml */ /* Copyright 2002 Charles N Wyble This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "xlhtml.h" void OutputTableXML(void) { int i, j, k; printf( "\n"); /* Latin-1 */ break; case 1: printf("windows-1252\"?>\n"); /* Microsoft */ break; default: printf("utf-8\"?>\n"); /* Unicode */ break; } SetupExtraction(); printf( "\n" ); printf( "\t\n" ); /* Here's where we dump the Html Page out */ for (i=first_sheet; i<=last_sheet; i++) /* For each worksheet */ { trim_sheet_edges(i); update_default_font(i); if (ws_array[i] == 0) continue; if ((ws_array[i]->biggest_row == -1)||(ws_array[i]->biggest_col == -1)) continue; if (ws_array[i]->c_array == 0) continue; printf( "\t\t\n" ); printf( "\t\t\t%d\n", i ); /* Print its name */ if (next_ws_title > 0) { if (ws_array[i]->ws_title.str) { printf("\t\t\t"); OutputString(&ws_array[i]->ws_title); printf("\n"); } else printf("\t\t\t(Unknown Page)\n"); } printf( "\t\t\t%ld\n", (unsigned long)ws_array[i]->first_row ); printf( "\t\t\t%d\n", (int) ws_array[i]->biggest_row ); printf( "\t\t\t%ld\n", (long) ws_array[i]->first_col ); printf( "\t\t\t%d\n", (int)ws_array[i]->biggest_col ); printf( "\t\t\t\n" ); for (j=ws_array[i]->first_row; j<=ws_array[i]->biggest_row; j++) { update_default_alignment(i, j); printf("\t\t\t\t\n"); for (k=ws_array[i]->first_col; k<=ws_array[i]->biggest_col; k++) { printf("\t\t\t\t\tc_array[(j*ws_array[i]->max_cols)+k], 1); /* This stuff happens for each cell... */ printf("\n" ); if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]) { if (ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan != 0) k += ws_array[i]->c_array[(j*ws_array[i]->max_cols)+k]->colspan-1; } } printf("\t\t\t\t\n"); } printf( "\t\t\t\n" ); printf("\t\t\n"); } printf( "\t\n" ); /* Print the author's name in itallics... */ if (author.str) { printf("\t"); OutputString(&author); printf("\n"); } /* Print when & how the file was last updated. */ if (lastUpdated) printf("\t%s", lastUpdated); printf( "\t" ); switch (file_version) { case EXCEL95: printf("using Excel 5.0 or 95"); break; case EXCEL97: printf("using Excel 97/2000"); break; default: printf("using Excel ????"); break; } printf("\n"); /* Next print Disclaimers... */ if (NoFormat) printf("\t%d\n", NoFormat ); if ((notAccurate)&&(formula_warnings)) printf("\t%d\n", notAccurate ); if (NotImplemented) printf("\t%d\n", NotImplemented ); if (Unsupported) printf("\t%d\n", Unsupported ); /* Now out exceeded capacity warnings... */ if (MaxWorksheetsExceeded) printf("\tThe Maximum Number of Worksheets were exceeded, you might want to increase it.\n "); if (MaxRowExceeded) printf("\tThe Maximum Number of Rows were exceeded, you might want to increase it.\n "); if (MaxColExceeded) printf("\tThe Maximum Number of Columns were exceeded, you might want to increase it.\n"); if (MaxStringsExceeded) printf("\tThe Maximum Number of Strings were exceeded, you might want to increase it.\n"); if (MaxFontsExceeded) printf("\tThe Maximum Number of Fonts were exceeded, you might want to increase it.\n"); if (MaxPalExceeded) printf("\tThe Maximum Number of Color Palettes were exceeded, you might want to increase it.\n"); if (MaxXFExceeded) printf("\tThe Maximum Number of Extended Formats were exceeded, you might want to increase it.\n"); if (MaxFormatsExceeded) printf("\tThe Maximum Number of Formats were exceeded, you might want to increase it.\n"); /* Output Credit */ printf("\tCreated with xlhtml %s\n", VERSION); printf("\thttp://chicago.sf.net/xlhtml/\n"); printf( "\n" ); } xlhtml/xlhtml/rats0100644000076400007640000000556707475454362014764 0ustar jackshckjackshckxlcdump.c:63: High: fprintf xldump.c:64: High: fprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. xlcdump.c:102: High: fixed size local buffer xldump.c:103: High: fixed size local buffer xlhtml.c:404: High: fixed size local buffer xlhtml.c:799: High: fixed size local buffer xlhtml.c:824: High: fixed size local buffer xlhtml.c:925: High: fixed size local buffer xlhtml.c:1461: High: fixed size local buffer xlhtml.c:1539: High: fixed size local buffer xlhtml.c:1763: High: fixed size local buffer xlhtml.c:3046: High: fixed size local buffer xlhtml.c:3075: High: fixed size local buffer xlhtml.c:3873: High: fixed size local buffer Extra care should be taken to ensure that character arrays that are allocated on the stack are used safely. They are prime targets for buffer overflow attacks. xlhtml.c:813: High: strcpy xlhtml.c:1595: High: strcpy xlhtml.c:1605: High: strcpy xlhtml.c:3877: High: strcpy xlhtml.c:3884: High: strcpy Check to be sure that argument 2 passed to this function call will not copy more data than can be handled, resulting in a buffer overflow. xlhtml.c:2514: High: printf xlhtml.c:2527: High: printf xlhtml.c:2531: High: printf xlhtml.c:2549: High: printf xlhtml.c:2553: High: printf xlhtml.c:2555: High: printf xlhtml.c:2564: High: printf xlhtml.c:2570: High: printf xlhtml.c:2575: High: printf xlhtml.c:2580: High: printf xlhtml.c:2585: High: printf xlhtml.c:2590: High: printf xlhtml.c:2596: High: printf xlhtml.c:2599: High: printf xlhtml.c:2605: High: printf xlhtml.c:2612: High: printf xlhtml.c:2715: High: printf xlhtml.c:2724: High: printf xlhtml.c:2904: High: printf xlhtml.c:3128: High: printf xlhtml.c:3543: High: printf xlhtml.c:3623: High: printf Check to be sure that the non-constant format string passed as argument 1 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. xlhtml.c:3048: High: sprintf Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. xlhtml.c:3048: High: sprintf Check to be sure that the format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Additionally, the format string could contain `%s' without precision that could result in a buffer overflow. xlhtml.c:1836: Medium: realloc xlhtml.c:2201: Medium: realloc xlhtml.c:2269: Medium: realloc xlhtml.c:2270: Medium: realloc xlhtml.c:2375: Medium: realloc Don't use on memory intended to be secure, because the old structure will not be zeroed out. xlhtml/Makefile.vc0100644000076400007640000000057007473200573014603 0ustar jackshckjackshck all:config.h cd cole $(MAKE) -f Makefile.vc all cd ..\xlhtml $(MAKE) -f Makefile.vc all cd ..\ppthtml $(MAKE) -f Makefile.vc all cd .. clean: -del config.h cd cole $(MAKE) -f Makefile.vc clean cd ..\xlhtml $(MAKE) -f Makefile.vc clean cd ..\ppthtml $(MAKE) -f Makefile.vc clean cd .. config.h: config.h.in copy$? $@ echo #define VERSION "0.5" >> $@ # eof xlhtml/Makefile.bc0100644000076400007640000000060207473177604014563 0ustar jackshckjackshck all:config.h cd cole $(MAKE) -f Makefile.bc all cd ..\xlhtml $(MAKE) -f Makefile.bc all cd ..\ppthtml $(MAKE) -f Makefile.bc all cd .. clean: -del config.h cd cole $(MAKE) -f Makefile.bc clean cd ..\xlhtml $(MAKE) -f Makefile.bc clean cd ..\ppthtml $(MAKE) -f Makefile.bc clean cd .. config.h: config.h.in copy$? $@ type && ! \#define VERSION "0.5" | >> $@ # eof