X-RDate: Mon, 12 Oct 1998 18:12:44 +0100 (IST)
Received: from mailgate.ul.ie ([136.201.1.23]) by exch-staff1.ul.ie with SMTP
 (Microsoft Exchange Internet Mail Service Version 5.5.1960.3) id 4QKT1J2B;
 Mon, 12 Oct 1998 17:39:50 +0100
Received: from centauri.lci.ulsa.mx by mailgate.ul.ie with SMTP (PP) id
 <07836-0@mailgate.ul.ie>; Mon, 12 Oct 1998 17:55:27 +0000
Received: from localhost (filters@localhost) by centauri.lci.ulsa.mx
 (8.8.7/8.8.7) with SMTP id DAA19536; Mon, 12 Oct 1998 03:35:22 -0500
Date: Mon, 12 Oct 1998 03:35:22 -0500 (CDT)
Reply-To: Filters Proyect <filters@centauri.lci.ulsa.mx>
Message-ID: <Pine.LNX.3.96.981012025845.18827H-101000@centauri.lci.ulsa.mx>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="231244123-63504888-908179209=:18827"
Content-ID: <Pine.LNX.3.96.981012030124.18827J@centauri.lci.ulsa.mx>
XFMstatus: 0200
From: Filters Proyect <filters@centauri.lci.ulsa.mx>
To: Caolan McNamara <Caolan.McNamara@ul.ie>,
 Andrew Scriven <andy.scriven@research.natpower.co.uk>
Subject: OLEdecod

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--231244123-63504888-908179209=:18827
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.3.96.981012030124.18827K@centauri.lci.ulsa.mx>

Hello.

Andrew, I have studied your excellent code. Thank you for writting it! I
never though that a replacement for LAOLA in C could be done in a very few
lines of code.  And thank you to explain me about directories in OLE files
too. It is easy, but I didn't understood until you explain it to me. Thank
you again. 

As attachment (gzipped), I send you guys my own version of the Andrew's
code.  Andrew, if you like it, you could incorporate it to your own version:

Changes:

* Added a lot of validations (memory allocations and file access).
* Named OLEdecod (Andrew please, rename it again if you want).
* Include the Caolan's read from memory functions (Andrew's functions
  didn't work for me, in Intel, I don't know why).
* Simplified the memory pps structure. Before, pps_list was a pointer to
  an array of pointers to pps_entry. Now, pps_list is a pointer to an
  array of pps_entry. Less memory to allocate!
* Each pps of type file (called by Microsoft streams) are now saved in
  separated temporal files, wich names are in pps_list.
* Added freeOLEtree function, wich should be called after processing the
  tree (see main.c).
* In pps_entry, changed type of next, previous and dir fields: now are U32
  (unsigned long int) for simplicity.
* Added an example (main.c) wich shows how to visit only the top level
  streams (Caolan, see that file).
* Added VERBOSE symbol. Compile the attachment using -DVERBOSE, please.
* Added more bytes that I would want.
* Tested on MS-DOS (compiled with Borland C++ 3.1).

Missing:

* Don't know how to interpret seconds and days fields.
* The solution to MAXBLOCKS artificial limit.
  Here, one proposed solution:
     Before extract the sbd block list, read all the number blocks from
     BDepot and count it, then allocate the nedded memory and finally
     extract the list.
  This solution should be easy, and fast because we read from memory.
  The same goes for root_list.
* Write and test big endian version of Caolan's read from memory functions.

And that's all.

Hope you like it. Please, send me your opinions and flames.


-- Filters Proyect Maintainer: Arturo Tena <filters@centauri.lci.ulsa.mx>
<http://centauri.lci.ulsa.mx/~filters/> (this server is down in weekends :( ) 


--231244123-63504888-908179209=:18827
Content-Type: APPLICATION/X-GUNZIP; NAME="all.c.gz"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.96.981012030009.18827I@centauri.lci.ulsa.mx>
Content-Description: 

[encoded data, 8085 characters]
AA==

--231244123-63504888-908179209=:18827--
