/*
   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
 */
/*
   Roberto Arturo Tena Sanchez <arturo@directmail.org>
 */

Pre-Hacking:
************

If you want to play, you'll need automake-1.4, autoconf 2.13, libtool 1.3.2
and the DocBook 3.x tools (or new versions). And a C compiler =).


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

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.
