Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://mswordview-0.5.14-1.src.rpm:946930/mswordview-0.5.14.tar.gz  info  downloads

mswordview/ 40755    764    764           0  6720755475  12155 5ustar  caolancaolanmswordview/CHANGELOG100644    764    764      156702  6720755470  13532 0ustar  caolancaolanChanges to to 0.5.14
	* i have to make changes to the configure script to link -lXpm in the
	correct place.
	* scream, i had to put back in part of the signal configure script, bear
	with be, why does *everything* work on my machine but nowhere else :-), 
ALL TODO
	gcc -o conftest -I/tmp/include -L/tmp/lib -g -O2     
	-lm -L/tmp/lib -lttf -L/tmp/lib -lXpm conftest.c 
	-lgdwmf -lwmf -lxgd -ldib -L/usr/lib   -lX11 -lsocket  -lnsl
	has to become
	gcc -o conftest -I/tmp/include -L/tmp/lib -g -O2     
	-lgdwmf -lwmf -lxgd -ldib -L/usr/lib -lttf -lXpm -lX11 -lsocket  
	-lnsl -lm conftest.c 
	* get ordinary unicode > utf conversion code, and do fontname comparisons
	with the converted texts. modify decode_letter and decode_s_chp to
	use this new stuff instead of the old.
	* wvSummary not noticing that ole files aren't!.
	* colspan support, find the smallest common unit, and restart the
	table handling.
	* rowspan support
	* add a fidge factor to the gcf part so as to fudge out insignificent
	twip differences

	4 table rowspan/colspan support

	* use twips from config file throughout mswordview
	I want...
	* move LDFLAGS into LIBS and rerun configure, bring home latest configure.
	* add support for the elements, such as bold and italic,
	* test with fib, port it over to the new clean interface.
	* save word 6 and word 2 in similar format
	
	* dont parse a $ with a \ before it.
	* implement whatever special drawing format there is.
	* patch thai handling back in.
	* look at the complex code and try and pare it down to
	readable size. also do the same to the decode_letter thing
	as well, so as to make that simpler.
	* its too complex, im going to strip out everything from decode_simple
	and start going through it again simpler.
	* test that continous sections and endnotes at the end of section, and
	other things like that do what i think they should do.
	* placement of footnotes, what does "treat like endnotes" really mean ?
	* make sure captions are alright, especially formatting.
	* must implement fully handling for 16bit chars, taking into account 
	conversion from cp1252. two modes, one where we are in iso9660 mode
	and one where we are in unicode/utf-8 mode.
	* bits for anld are wrong
	* bookmarks embedded in html tags break them, constructs such as e.g
	<A href="stuff">stuf<a name="here">f</a></A> are being output even though
	thats well wrong in html.
	* allow the various colors that im using to specifiy different attributes to
	be modified by the user.
	* hmm, with bookmarks implemented, it might not be too hard to do 
	the toc
	* optional html correct handling of lists.
	* place all wingding and symbolfont names directly in the makefile for
	make install.
	* convert the cross-referenced "above/below", into hyperlinked above and 
	below.
	* optional support for specifying special fonts, not recommended for use
	on publishing for internet sites, but useful for internal use for those 
	of you who have done the funky chicken dance with unix netscape to work 
	with ms winding etc fonts or are using ie/netscape on windows.
	* all the fields, document background colour.
	* it might be possible to support right indentation, if its simultaneous
	with equal left indentation by using <blockquote> instead of <dir>, but
	i dont see that as essential.
	* inside/outside page numbering doesnt work, dont know where its set, one
	of the DOP fields ?
	* two pass parser for finding best fit html tables for word tables.
	* gtk+dps wysiwyg viewer, output to ps from this
	* --> xml support ??, im told that xml is the way to go, i dont know a thing
	about it yet, so the next task is to learn it.
	* use incremental zlib functions to do decompressing rather than use mmap,
	someone who doesnt have mmap on their system can send me a patch for this one
	;-)
	* hyperlink sequence fields ?
	* doesnt compile under neXt & needs to use gcc for hpux 10.20 ?
	* do an autoconf check for mman.h and dont do compression if not there.
	* where did my word5 copy go ?
Changes to to 0.5.13
	* a mad person reports that it can be compiled under vms !, im awaiting
	patches.
	* changed doc version testing to the knowledge base article on the
	matter.
	* removed duplicate fib code from mswordview.c
	* added wvGetEmpty_PLCF,wvGetFRD,wvGetFRD_PLCF.
	* added wvGetFFN,wvGetFFN_STTBF,wvReleaseFFN_STTBF,wvGetFONTSIGNATURE &
	wvGetPANOSE.
	* removed the reinstall handlers from the configure script, that should
	sort out the configure problems on some systems, irix in point.
Changes to to 0.5.12
	* patch from Cliff Miller <cbm@research.bell-labs.com> to
	fix TTF_CFLAGS in configure and Makefile.
	* small bug with ending tables. Seeing as you cant place text tags
	like bold and italic between cell elements in html and expect them to
	do the right thing, you have to do a little dance where character properties
	are stopped and restarted for each character cell. I had forgotten to
	reenable the ordinary nontable mechanism immediately after the end of the 
	table.
Changes to to 0.5.11
	* we now extract the document title and display it
	in the title field, using the default config.
	* add bold and italic element handling, you can change these
	html tags to you hearts content now.
	* I confirmed that $title works fine.
	* I ported over Somar Software's summaryinfo stream stuff, so
	now wvSummary can print the title and last saved date of an
	ole document according to the summaryinfo stream.
	* added bit shifting to awk script.
	* added warning for duplicate offset in script.
	* i have a spiffy logo.
	* added more stuff to the summary into thing, it might very
	well be complete, the previews of summary info are stored as
	a wmf file, so in conjunction with libwmf you can get all
	of this.
	* added a wv-incconfig and wv-libconfig and installed the
	appropiate include and lib files, so as to start making the
	process of using mswordview as a lib more possible. this
	still needs quite a bit of work.
	* allowed optional sections in element string, use [] for them.
	* worked font config into the main code.
	* bw wanted and got ...
		1 $title fix
		2 element support (bold&italic&font)
		3 --configfile switch
	* fixed an amazingly stupid bug that crept in with the introduction
	of wvGetFIB.
	* noticed that new doc start code wasnt occuring in fastsaved files.
	* aaaaaagh!!!, i had forgotten to munge the wierd long offsets into
	their correct halved form, no wonder so much wierdness crept into
	fast saved files, its amazing how well it worked nonetheless, this
	should at the least mak parsing fastsaved files with tables much
	shorter!.
Changes to to 0.5.10
	* added document header and footers to the config file.
	* addded pixels per twip to the config file.
	* allowed " as part of a string if escaped.
	* added code to use the beginning and ending tags.
	* allowed multiline strings in config file.
	* use the two twip values.
Changes to to 0.5.9
	* i never reran autoconf !
	* added a patch i got ages ago and forgot to add
	dos/windows support for .exe extension to the configure
	thing
	* added some deep magic to blip handling.
	* addded check for wmf record sizes < 3 in libwmf.
	* fixed BSE record to eat empty space, and resync.
	* fixed Makefile.in in oledecod dir.
	* much purify related thingies found.
	* remove last bug to fix last buggy file of current run.
Changes to to 0.5.8
	* blip code changed, new one looks much better.
	* would you believe that i was always one out when decoding
	styles, great bullet proof code though :-), it kept on trucking
	and resynced itself with the data again for the most part, that 
	bug must be in there for months at this stage !
	* new blip code now in operation, appears to do at least the
	old blip codes functionality for 0x08 blips, how did i get 0x01
	blips ?
	* made configure script get heroic when searching for components,
	checks for for includes and libs both below a --with-stuff dir, and
	also inside it as well.
	* finished 0x01, checked offsets.
	* had to add guessing code to figure out whether to use a delay_stream 
	or not.
	* allow resized images (well let netscape do it) for 0x01 graphics.
	* tested wmf's with text with readonly font dir, no problem there.
Changes to to 0.5.7
	* fixed bug that causes crashes on tables.
Changes to to 0.5.6
	* variable handling, add a subst function that substitutes
	real things for variables in the config file.
	* updated my homepage, god i love the gimp. All i have to
	do to change the graphics on my page is to load a different
	set of text files to the scheme interpreter in the gimp and
	ta-da out pops my new pages, in the bad old days i'd have 
	been at it for days.
	* have a mechanism to expand variables in place, only recogonized
	variable is patterndir, will have more later of course :-).
	* some magic dohickying to get the libz in /usr/lib to be tested
	before ending up with the possibly crap one that some systems
	stick in /usr/X11R6/lib.
	* do a for loop to install the graphics now, should sort out
	some people;s broken install scripts, gagh!
	* cleaned up config file with purify, all systems are go for
	first public release with basic config file support.
	* remembered to add ttf support to mswordview as well.
	* added support for variables in the lex code.
	* fixed zlib configure script again.
Changes to to 0.5.5
	* added in support for an external config file. The external
	file allows a start and end to a style to be user defined, i.e
	h1 for the start of a heading 1 style. Its possible to disable
	or enable handling of bold, italic and font size/face changes
	inside of a style, this is only started now, so its far from
	finished. Please *dont* use this file for the moment, im working
	on it.
	* this is an interim release to fix the configure script problem
	that i had, and to add to the documentation as to the libwmf stuff.
Changes up to 0.5.4
	* well now, ive been away for a while working on libwmf, which is now
	complete enough to use. download it from 
	http://www.csn.ul.ie/~caolan/docs/libwmf.html, and install it and
	run mswordview's configure and compile and ta-da, mswordview can now
	handle wmf files.
	* added a fallback from a failure to find -lz to -lgz, a problem on
	SuSE linux im told.
	* found that old redhat's appear to have a libz in the X lib dir, that
	is old and crappy and doesnt link to my thing, didnt put in a word
	around, but mentioned it in the documentation.
	* created file with h1 to h9, verfied that the lex code and so on
	works together fine with mswordview.
Changes up to 0.5.3
	* begun adding all fields to structures, and marking them implemented or
	not.
	* strikethrough and underline for revision text
	* found the bounds of the comment in the main document, i put a name tags
	on them, and place comment begin and end graphics around them, at this
	stage remember that the -a option to remove comments exists, as even one
	comment in a doc can make the whole thing pretty unreadable :-), but the
	support is in there if you need it. 
	* revisions are given underline for added text, and the strikethrough color
	for deleted text the same as word does it.
	* begin and end for deleted and added revision text is shown with graphic
	tags, added a -r --norevisions option to ignore that stuff.
	* names for revision text
	* put revisions authors names in yellow text.
	* i dont even *pretend* that im outputting good html btw, just working
	html under netscape. once everything is working i might go back
	through and work out correctly the dependancies between all the html
	outputting code, that'll be part of the overall cleanup im doing to make
	this modular enough to be used with abiword as a word97 importer.
	* time and date of the revisions are included as well.
	* think that ive completed revision text, but i need more tests before
	ill be sure.
	* in comments theres always a pagenum field that word itself doesnt 
	show in comments, so ive stuck code in that disables this field if
	its at the beginning of a comment, also verified that comments work
	in fastsaved mode, though what is the story with that page number 
	in annotations, hmm its bothering me somewhat.
	* titchy bug where i included the wrong end of comment graphic.
	* put square brackets around comment links, i believe this completes 
	comment support.
	* titchy bug in the time field for revisions.
	* properties of text that change during a revision are listed as well.
	* found the location of what sets the footnote & endnote styles of 
	numbering and other settings for endnotes and footnotes in the DOP, there
	were missing from the copy that www.wotsit.org has, ive sent them the 
	added section.
	* extracted the DOP fully.
	* footnotes and endnotes now get the correct formatting of the numbers,
	i.e lettered, roman or arabic etc, damn missing page of the spec, i
	was searching for that for ages.
	* i have some old code that gives the correct starting point for endnotes
	and footnotes so im leaving it in for now, but i can now use the DOP
	instead for this info.
	* endnotes should now be put either at the end of the doc, or at the end
	of the section depending on what word does, needs testing.

Changes up to 0.5.2
	* implemented auto text color colour check for table cells, no more
	  black on black, or black on blue. i must look closely at what other
	  auto changes word makes, and where else i might have to put that code.
	* some uber-simple greyscaling code when table look says no-color.
	* verified it works under AIX, made a few changes that showed up due
	to its stricter malloc, theres probably a few more malloc related
	issues hiding in there.
	* column breaks show up as well now.
	* the various types of section breaks are distinguisable from the
	others, and from page breaks.
	* a few changes to make sure formatting and tables get on better 
	together.
	* sequence field supported, i.e caption numbering, i just use the last
	fields that msword left in there.
	* changed hyperlinking so that it works with bookmarks that are in
	comments (annotations).
	* i now support multiple bookmarks that end on the same location.
	* multiple bookmarks that start on the same location should be supported,
	but no examples yet.
	* the comment author initials are extracted and used in the main document
	when referencing comments.
	* comments now end when they are supposed to, only the correct comments get
	included, should work for fastsave, not tested.
	* removed unused variables, sorted out a few other warnings, maybe itll
	squeak by the irix compiler now ?
	* names and initial info for comments is extracted as well, and stuck in a 
	table at the end of the document.
	* fixed the <a name= for comments, should work in fast saved.
	* custom graphics for annotations.
Changes up to 0.5.1
	* forgot to change the version no in the source.
	* damn sunsite broke connection half way through uploading.
Changes up to 0.5.0
	* Martin Kalms <kalms@lysator.liu.se>, configure fix for sunos 4.1 in
	relation to strerror.
	* added option where you can ignore table widths.
	* custom graphics for comments.
	* endnote autonumbering now works, now defaults in roman numerals.
	* fast save footnote problem fixed, though i think things might be
	even more complex that i thought, so keep an eye on that area.
	* footnotes are in a colour of their own.
	* symbols as footnotes, required a change to the 4a30 sprm that might fix
	a few other char formatting issues.
	* restarting footnotes on each page, and each section works, this is 
	encoded in the the number itself it appears, a href and a name, and some 
	invalid html code fixed in the footnote area as well, footnotes are now in 
	a colour of their own *but* the location of whatever sets the footnote & 
	endnote styles of numbering is unknown, i havent figured it out.
	* all endnotes are listed at the end of the section rather than optionally
	at the end of the document, i dont know how this is done, doesnt appear 
	documented.
	* textmarks / bookmarks and explicit hyperlinking supported, bugs in 
	old code removed hopefully and internal hyperlinks put in via insert
	hyperlink are supported.
	* support for bookmarks, i.e they are converted to <a name>[text]</a> html 
	code.
	* converted cross-referenced textmarks/bookmarks into hyperlinks.
	* wmf files can now be decompressed thanks to peter.brandstrom@ericsson.com
	now i need a wmf --> something useful converter. i see that theres a new
	one available off the gimp plugin page, with some uberhacking it might
	do the trick, the notes/wmf dir has a goodly chunk of info on the format if
	anyone wants to do it for me.
	* when bookmarks are embedded in bookmarks something odd appears to occur, 
	but nonetheless the ms save as html does the same, so im assuming that its 
	ok
	* added bookmark support to fastsaved, should work fine, not tested.
	* pagebreak gifs are correctly centered if the next para is a centered etc 
	one.
	* author field supported.
	* proper positioning of page numbers, general layout of headers appears
	to be fine, except that tab stops are used in headers to center, left
	and right align headers, which doesnt work so well in html mode.
	* added defensive code to some sort of list bug.
	* mimic strike-through and double st by setting the text color to either
	#ed32ff or #ff7332
	* disallow height commands inside tables, as the model of paragraph heights
	doesnt fit well with the architecture for tables, so im ignoring them in
	tables, hopefully noone will notice :-)
	* fixed a small bug in sprm which was causing errors later in lists.
	* tables and paragraph formatting were misaligned across td boundries.
	so now i clear specials and fonts on entry to a table, and on exit of each
	cell, hopefully i broke nothing else on doing so.
	* at least one really bad conversion with a file called RESUME.doc, but in
	my defence i looked at the msword conversion of this to html, and its just
	as buggered up so rasp ;-P
	* added credits file
	* found problem in decompress code, i didnt make it good enough for real
	world usage, i now use mmapping so make my life easier, dont know if this
	is fully portable, works on linux and solaris.
	* oledecod had bugs on cleanup, so sent filters group wmf.doc and 
	Contribu.doc to demo the problems.
	* i now use oledecod 0.0.4 which fixes cleanup problems, but Contribu.doc
	style problems continue, they return 5 but laola can extract the streams
	nonetheless while oledecode cannot, i modified the original laolareplace.c
	to handle this as well.
	* oledecod 0.0.4 has a bug in relation to 1812bb.doc, laolareplace.old.c
	hasnt this bug, so im back to using that again.
	* those ffffffff's in lists that haunted me in earlier releases are *back*
	grrrrr!!, anyway ive another massive nasty workaround that im using that
	hasnt crashed any docs, and appears to do the right thing, at least in
	propos~s.doc
	* wmf decompression code changed to use mmap, replaces the original code
	that ate memory, if mmapping doesnt work try looking at the zlib docs
	and change the code to fixed buffer incremental decompression.
	* added a bailout to ignore encrypted documents, wonder how id decrypt
	them if i had the correct password, anyone know ?
	* added a bug fix for crossreference parsing.
	* beginnings of tables of contents included, doesnt always work yet.
	* bug where if the word file ends on a table, the table wasnt closed off is
	fixed.
	* bug where non built in graphic types were causing hangs.
	* im now often happily (if slowly) converting 90 and 100 page documents,
	the only thing i really am unhappy with is table handling, which is
	also one of the reasons the conversion is *soooo* slow sometimes, the
	other reason is those godforsaken fastsaved files.
	* fixed some other mem related bugs, converted sucessfully the last two 
	problem docs without crashes.
	* table looks are somewhat supported, though theres no support for last
	row and last column different from the rest of the cells as of yet, this
	will have to wait until multi pass on tables is implemented.
	* the foregrounds and character attributes in general for tables appear
	to always set correctly in general, but i believe i have to look into
	how the "auto" text color selects is final colour, as ive been assuming
	that it gets set to black, which is a fairly valid assumption most
	of the time, but not always, so a few docs will have black text on
	black backgrounds in table cells, but the situation is much improved.
	* ran purify over mswordview, removed a load of dodgy code out of it, theres
	still a bug or two hiding in the list code, which i belive is the reason
	that lists are sometimes missing in complex documents, e.g meeting.doc
	i think i love purify, its the bees knees.
	* dib's are now extracted as well, though i dont do anything with them yet,
	this fixes yet more crashes.
	* fixed laolareplace.old.c, which is the version im going to use for this
	release, to work on 64bit platforms, a few longs had crept into the code
	there which shagged the whole thing up. I havent done extensive tests on
	64bit yet, but im confident that itll work.
	* fixed defines to make it work if theres no zlib present.
	* no crashes after running mswordview on 300 megs of uploaded files.
	* good enough to upload to sunsite, version number reflects this.
changes up to 0.4.9
	--This is an interim release while im in scotland until later this november--
	added features are that the gateway is included, endnotes are supported,
	pagebreaks that split tables are supported and some more bugs are fixed,
	especially in relation to graphics.
	* added -o - option to gateway, like i should have about 4 releases
	ago.
	* fixed graphics again, forgot to reset the extra amount that some have
	before the graphic data begins, means more jpgs and pngs should work.
	* endnote text done in simple saved
	* cleaned up beginning whitespace from footnotes/endnotes/comments.
	* endnotes in complex mode is in, needs testing.
	* changed url code to match the other field code, fixes a big bug there.
	* header and footer colours were wrong again, fixed.
	* indent drift is fixed again, moved do_indent into decode_?_specials
	* pagebreaks can occur in the middle of a table, this sort of confusion
	is fixed for full saved files, and is probably fixed for fastsaved files
	* pagebreaks now look like they occur after footers,footnotes and endnotes.
	* custom graphics replace <hr>'s as there were too many of them at the
	bottom of a page to figure out what was what.
	* custom graphics for footnotes, and comments
changes up to 0.4.8
	* this has a slew of bug fixes related to graphics and a new option
	to put images in a certain directory
	* fixed f006 code in blip handling, removing a slew of hangs.
	* ignore every graphic that isnt an understood type, removes hangs.
	* figured out when theres an extra 16 bytes to delete from the beginning
	of a blit, and where one of my magical 17s were coming from
	* got a bug fix off Harry Shamansky (shamansky@adinc.com) as to why
	the default make wouldnt work under irix.
	* the current spid handling was mismatching spids and the graphics
	involved.
	* i cant handle forms, or ole data, so ive added a check to avoid
	doing them, removes crashes.
	* also ive added some other code to watch out for unsupported graphic
	features.
	* msword can include wmf and emf files, these are stored in compressed
	form, using lz encoding in a fashion supposedly compatable with the zlib 
	library, but i havent been able to decompress them yet and even if i 
	could i dont know of any source to convert wmf/emf files to anything 
	usable under linux
	* ive changed blip handling, so that it works better, well i believe its
	more crash resitant, but im still not 100% happy with 0x01 handling.
	* if you insert a bmp via insert->picture->from file, it appears to
	be converted to png for you, handy.
	* paragraph indentation is back in, lists and table were confusing the
	indentation code.
	* fixed titchy bug so that space at beginning of lists isnt underlined.
	* support paragraphs whose first lines indentation is greater that the rest
	of it
	* support vertical space between paragraphs.
	* sorted out end_para for the first paragraph found in complex mode, i think
	i have it right now, in passing i reckon a load of those pap searches
	in complex mode are unneeded, but i dont want to rock a working boat, if it
	aint broke dont fix it as an uncle of mine used say, though we did seem to
	spend an awful amount of time panically fixing things that broke 
	dramaticlly after years of neglect.
	* finally settled on dirs for left indentation, blockquotes indent from both 
	sides automatically
	* added an option to put graphics in a specified dir.
	* added an option to find the graphics at a specified url.
	* updated man page.
	* made another change to blip handling, fixes some problems.
changes up to 0.4.7
	* warning !, in this release mswordview no longer outputs by default to
	the screen. use -o - for this behaviour. This is an interim release to
	reassure people that im still working on it, its got quite a few new
	features and bug fixes since 0.4.4 read down for them all.
	* implemented tabbing with trans gif, optionally use hardspaces or 
	dont do it at all.
	* added some support for borders such that the vertical space between 
	paragraphs due to width of borders is retained through the use of 
	vertical trans gif space.
changes up to 0.4.6
	* indentation of paragraphs dithered to <blockquote>'s is out again as it 
	its doing strange things on long complicated documents.
	* table cell shading done, fully supported i believe.
	* drew all the available table patterns in all available colors, 
	made small transparent gifs out of them, if someone wants to do 
	better copies of the ms ones go ahead, use the convert.sh script
	in the patterns dir to generate pics in all necessary colors.
	* text color support is in
	* word underline, which iswhere whitespace isnt underlined is supported.
	* courier as an alternative to courier new, times alternative to
	times new roman font face, helvetica as an alternative for everything 
	else.
	* all caps supported, Small caps supported, though i want full tests
	of those two babies in all modes. Similiar to the fontfaces these two 
	babies are only supported in ascii languages, as i dont really know how 
	to convert utf-8 unicode into upper case !
	* text animations supported by converting them to blink :-)
	features-examples dir added, supported-font-features.doc has what i
	believe is all the font features that word supports demonstrated in it.
	id be happy to have omissions noted, mswordview now supports
	1) font size
	2) colored text, (in headers and footers as well)
	3) font face in ascii based languages
	4) underline, including word underline, where whitespace is nt underlined
	5) super and sub script
	6) All caps and small caps (ascii based languages only)
	7) text animations dithered to blink tag
	mswordview doesnt support due to html limitations (at least i dont think
	i can do them)
	strikethrough,double strikethrough,shadowed and outlined text, embossed
	or engraved text. 
	"hidden text" is shown, coz i dont know the purpose of it yet
	all caps, small caps and font face for non ascii languages.
	character spacing
	* centralized pap initialization code
	* fixed a crash causing blip bug
	* fixed a crash due to sep sprms showing up in a papx !!, i ignored them
	im sure that will bite me hard in the future, but ive documented it here so
	i wont forget.
	- Problem:
		now we have a problem with paragraph properties which is only making
	a difference now that i want to use the paragraph justification codes.
	there exist pieces which have fc's greater than the maximum one listed
	in the plcfbtePapx !, ive been pushing them around for the last 2 days to
	no avail, im beginning to think that maybe this means that they have no
	native formatting of their own, the catch is to find the paragaph that they
	belong to, the spec says to find that by taking the smallest fc in fkp
	tables that is bigger than the current fc, but there *is none* thats bigger.
	my thought is to remember if this piece is the beginning of a paragraph
	mark and if not inherit the previous piece's formatting, and keep going
	backward until we get one. If it is then either im supposed to default to
	a new one or go forward to find one.
	+  Solution: Ah-ha i believe i have it, 
		+ firstly varient 1 gpprls have to be supported, and i had some offsetting 
		in them wrong
		+ secondly i had a very subtle bug where i changed the value of the avalrgfc,
		from when i didnt know why sometimes they were +400000000, of course i now
		use it to determine if the end of the piece if twice the distance of its 
		reported character len of not, and with the val reset i ocassionally had
		the piece recorded as being too long, so the paragraph properties of the 
		wrong paragraph were being used.
	* added is paragraph formatting information, supported well is
		1) centering,		center
		2) right justification , div align=right
	* made a closing paragraph thing like the closing chp for the blurb at the
	bottom to avoid having the version info centered of justified.
	* 0x01 fSpec graphics are now supported in addition to 0x08 graphics 
	  while both of these are draw objects, only non-vector graphics are supported, and 
	  only partial support of those i.e png and jpg.
	  as with the 0x08 graphics theres a lot of magic emperically derived offsets being used
	  to put it together, so dont be too surprised at getting corrupt images.
	  though i *have* fixed a bug in png handling i believe for 0x08 graphic which was the
	  previous subset i supported.
changes up to 0.4.5
	* i now open graphic and doc files in binary mode to support platforms where this
	makes a difference.
	* replaced laola, perl no longer required, thanks to the mighty
	Andrew Scriven who replaced the OLE functionality i needed with C
	* got a bug fix off above to handle files with more blocks
	* optional support for fontface if the text if an ascii based one,
	i.e if were guaranteed that this is a western european language
	then we do font faces, fastsaves will probably confuse this test and
	mean we wont get faces even when we can handle them correctly.
	* changed indent method for outline lists to multiple hard spaces, rather
	than <dir>'s, in the future ill make an optional proper html conversion,
	but it wont look like the original, so its a TO-DO.
	* indentation of paragraphs dithered to <blockquote>'s is in, alpha support.
	* absolute width and height of tables is in as well.
	* i now default to outputting to a file whose name is the same as the input
	file, with .html appended. graphics are output to the files with the same 
	prefix as the .html file. use -o - to output to stdio
	* new ole code was broken on a few files ( 1 :-) ), fixed this. 
changes up to 0.4.4
	* a good few bug reports in, crashes and what not, i got the use
	of purify on a sun box (thanks to martin mellody et al) and sorted
	out *all* the uninitilized mem reads there, (3000 of them in the course
	of a typical conversion!!), it still leaks memory like a sieve but thats
	not important for mswordview, though i will sort that out. purify is
	a wonderful piece of work i have to say.
	* changed ffffffff handling for lists, i think it means that
	the list in question isnt actually there, so to skip it.
	* changed blockquotes to dir, looks neater and word itself does
	it, biggest software company in the world cant be wrong, can it ?
	:-)
changes up to 0.4.3
	* oops, i shafted the inclusion of getopt for systems that need it.
changes up to 0.4.2
	* fixed broken simple mode footnotes (doh!)
	* fixed bug in blip where having drawings where none
	of them was a picture caused a crash
changes up to 0.4.1
	* did some tweaking to remove a crash.
changes up to 0.4.0
	* and big breaking news, preliminary graphic support is now in!!
	yes, gifs/pngs/jpgs added to a document through the 
	insert->picture->from file mechanism now convert correctly. They
	are stored in the office draw format which ive just cracked the 
	rough layout of. (through the handy ms spec on the msdn site),
	graphic support is messy for now, as the files are generated in
	the cwd of mswordview and named graphic*mswv.*, ill tidy it up
	later, this news is too good to not get an announcement.
changes up to 0.3.0
	* added -m  --mainonly option if you dont want headers and footers.
	* added a few more places to look for lls-mswordview
	search order is now
	1 in the path.
	2 the same dir as lls was run from if ran absolutely.
	3 the current dir.
	4 a dir called laola off the absolute path.
	5 a dir called laola off the current dir.
	but stuff line ../../mswordview isnt in there though, coz folk should
	just put lls-mswordview into their path dammit!
	* diffent numbering formats for pagenumbering is in, a vs i vs 1 etc.
	* gpprls for sep's work now, complex sections are in.
	* found some strange code in clx_headers and clx_footers so i blew it 
	away.
	* section support in for simple saved files.
	* sections that restart pagenumbering work now.
	* sections that have no footers/headers at the beginning work now.
	* complex support for sections is in as well, should work hopefully
	needs extensive testing.
	* TO-DO text color, eventually font faces, but no sleep lost on that i have
	to say.
	* TO-DO shaded cells in a table, think up a better table handling method.
	* i now stick a space into an empty cell so that it shows up.
	* another U8 wraparound bug removed.
	* i now use the piecetable for simple docs, so as to skip over sections
	that arent to be processed, i.e the simple format is just as complex as
	the complex format :-), i think ive done this right and it wont break 
	anything, ill have to wait and see though.
	* changed slightly the portions of a field that dont get printed,
	to make some html ones work, hope i havent shafted anything else.
	* hmm, really need to cleanup character handling, unicode &
	special reserved ms symbols and so on, im just plinking at
	them for the moment.
	* aghh, found another U8 overflow, what possessed me to put
	them in in the first place ?, i should have guessed that
	there would be hundreds of pieces in a file.
	* received report that it compiles and runs with
	Sparc solaris 2.5.1 - sparcworks compiler
	&
	Intel x86 solaris 2.5.1 - gcc compiler
	* added patch from diakka <diakka@staff.sinanet.com> to run
	create_bins on a make rather than make install
changes up to 0.2.2
	* compiled it on a solaris account i got, and its fine, got 
	confirmation that it works from Will Renkel <renkel@cig.mot.com>
	* changed fastsaved chpnextfc check to be >= rather that >, hope that i 
	dont break anything cox of it.
	* foolish error, U8 used for number of pieces, extended to U16
	* changed embedded link handling to not end character properties in
	the middle of a URL !
	* changed embedded link handling so as to *not* place "" around urls,
	as sometimes they are there already, and not having them doesnt hurt,
	though it offends my sense as to how they should be done.
	* would you *believe* these ms guys, now they are hitting me with
	file offsets that are past the end of the file !!, so now i have to
	watch out for that, the complex format is *such* a collection of
	hacks, ah-ha ive just checked in word, this file crashes word :-)
	so this is the first reported case of mswordview being better than 
	msword, though i have to say that in recovery mode word pulled loads
	of text out of it that i didnt get, :-(, still its a corrupt file
	so doing anything at all is a success.
	* i forgot to reset the higher list levels when changing a lower one,
	fixed now, i think ive it right.
	* added a define of SA_RESTART to 0 if it isnt there. bash does it so
	i should get away with it, sunos seems to need it.
	* added a little patch from Zachariah Baum <zack@studioarchetype.com>,
	that should help get around folk who run mswordview absolutely and dont 
	stick lls-mswordview in their path, ie make and then dont make install.
	* fixed yet more bugs, for some reason i thought that
	the order of evaluation was from right to left !!!!
	i.e i was doing 
		if ((*p == 'a') && (p!=NULL))
	doh!
	* changed web interface so that utf-8 is always on.
	* font characteristics turn off when going into tables now.
	and turn back on when inside, gets rid of some off look
	and feel.
	* checked out corel's wordperfect import functionality with
	office 97 files, conversion isnt as good as mswordview i think.
	missing header numbers, and one or two didnt convert at all.
	though of course corel retains layout which mswordview cant
	do with html, and does shading, ill check pictures at some stage.
	* have a report that suns pcfileviewer similarly covers about 50%
	of mswordview's functionality and vice versa.
	* gzipped uploaded word file collection has just hit 120megs :-)
	* i now look at this section table so i know whether its a section
	break or page break. If its a section break, then the header/footers
	revert to the beginning again.
	TO-DO, add an space to empty cells to make them look reasonable in 
	netscape.
	TO-DO check page numbering with sections.
	TO-DO, do endnotes, should be easy. make new pic to replace hr
	lines, theres too many hrs now at the bottom of a page to make
	sense to anyone anymore. if theres no footers, then dont do
	the lines.
	TO-DO, continue with the sent files since 0.1.0, and the rest
	of them.
changes up to 0.2.1
	* removed bug that caused lists to drift further and further
	right.
	1. checked out the blockquote indention for lists, doesnt
	appear to be right for srom*.doc, fixed now
	took closer look at font scanning in decode_letter,
	in particular special chars, the < 39 wasnt precise enough, being
	in a wingding/symbol font seems to make you automatically a special
	char.
	2. something not fully right with lists that take their
	text as special chars (i.e sectionnumber), not done by ms in
	an obvious fashion. edit doc down to just the 2 headers and then
	see what happens.
	3 AHA!!!, 1 and 2 are wrong, as was previous ideas to ignore lists
	that appear to have nothing in them, they are there to artifically
	bump lists up to a different starting number without requiring a
	seperate list definition for each one, ms shoves in dummy elements
	to get the list up to the right number, the section id just before
	one of them threw me entirely, i thought the section number should
	have been the text of the list. ive got it now!
	* 3 above is *rubbish*, thats not it at all, i was right originally,
	ignore those 0 len lists, and the problem was with my list restarting
	mechanism which didnt work if there was more that 1 list between list
	section that had to continue numbering.
	* numerical outline list sublevels will retain the prefix of the 
	above levels, this required a change of the number figuring out code,
	its now rather heavy of silliness, but it works, i dont love it and
	im sure lists will be back to get me again at some stage, but outline
	lists now work, in particular the 
	1
	1.1
	1.1.1
	style.
	* TO-DO sections, srom*.doc has them, check them out.
	* TO-DO change web interface so that the utf-8 can kick in if 
	needs be.
	* fixed bug where the new piecetable check in simple saved
	files fell apart after hitting a footer.
	(tempcp = tempcp, rather than realcp=tempcp, doh!)
changes up to 0.2.0
	* well arse again, ive revised my ideas as to what consititutes
	the end of a piece, rather than the beginning the the next piece as
	i was doing, i now believe thats its the beginning of the piece +
	the twiddled cp len. makes more sense, and removes crashes from the
	latest doc i was given.
	* distinguishs between odd & even page footers.
	* TO-DO odd & even headers
	* added the tm symbol as a special case, theres quite a large
	range of unicode that ms is using that is part of the customizable
	section, i.e theres loads of glyphs that ms can use that are not
	part of the standard unicode set, the tm appears to be one of hundreds.
	eventuallly ill have to get a table of them.
	* woweee, is ms an evil designer of data formats, they have two
	types of simple saved docs i thought, those in 8 bit (basically ascii) 
	and those in 16bit (unicode), hah bloody hah, ive been given one which is a 
	mixture of both, and i have to use the damn piecetable to shove it together.
	and its not as if the document shifted into a different language of 
	anything. if this was fastsaved id not blink an eye, but simple saved, 
	come *on*, why bother calling it simple saved. so i have to keep an eye 
	on the piecetable to determine what exact offset to use after all.
	* added a huge bit filthy hack in for more list twiddlings, the 
	previously mentioned unknown 4 byte sequence now rears its head
	as an optional 8 byte sequence !!, but always ffffffff, it might
	be some kind of flag or summat. anyhow i now chew up any 4 bytes
	consisting of this if they show up in the place that they might
	appear, this removes a large crash that occurs otherewise, as all
	the counters get thrown off course by them.
changes up to 0.1.1
	* added Makefile patch from Pavel.Roskin@ecsoft.co.uk (says it works
	on hpux)
	* well the good news is that the unicode utf-8 is working for
	taiwanese and im sure other languages, the bad news is that everyones
	telling me that noone in their language group is actually using unicode :-)
	so i suppose i require a huge unicode --> JIS/EUC/KSC/Big5/GB converter.
	:-)
	* rudimentary support for annotations, i havent too many examples of these 
	  but i think they'll work fairly well.
	* rudimentary support for all special ascii codes for time,page no etc.
	p.s by rudimentary support i mean that if asked for e.g the current date
	in a particular format i output the date, maybe in the correct format
	maybe not. i.e the meaning is the same, though the look might be different.
	* added a supported sprm, that changes chp information totally to the
	chp of a different style.
	* added support for custom footnotes, had to do a bit of a hack to
	get the <a name> stuff right, hopefully it'll always work, even if it
	doesn't itll still be readable.
	* twiddled the char formatting dependancies about again, really ill have
	to redesign that a bit.
	* broke the mswordview.c file down a bit into other files. 
changes up to 0.1.0
	* hell ive enough done to warrent a new numbering system.
	so from now on
	x.y.z
	x is a stable bug free (hah) release. folk packaging for commercial
	unices probably should wait for these releases (none yet, i know)
	y is a new feature or enough bugs fixed that you better use this
	version if you want to keep up with the jones. 
	z is some small bug or change that is small enough that i wont upload
	it to sunsite et al automatically, itll be mostly for me.
	* added a defaultfont size option, so that if you think the output is
	too big or small, you can skrink or enlarge it.
	* added a horizontal padding option, you have the option of 3 different
	ways to handle a run of multiple line breaks, though the default is probably 
	the best.
	* tweaked char formatting system, TO-DO overhaul all of that, theres quite
	a few dependancies between the tags thats becoming a little to difficult
	to do by hand, a little stack is called for methinks.
	* added some support for a type of holdover list format found in docs
	converted to word8 from older versions. works on the one i have so far
	though theres more testing to be done with it. missing bullets and 
	incorrect numbering may be related to this. pass them on to me.
	* battered LFO's into submission, this time they'll stay down (i hope).
	found a 4 byte field that i cant figure out where it came from. *shrug*
	wouldnt be the first time that happened though.
	* changed footer and header handling, i now take notice if the first pages
	headers and footers are different that all the others. i still dont get
	section breaks, which i think impact on this, i dont have any examples of
	this to work against. Theres a discrepency between header/footer documentation
	and what i see before me in the hex, maybe im missing something.
	* ok theres some difficulty with tables, ive implemented this baby as a
	one pass parser, later ill have to add multipass (or backpatch) to figure out 
	the number of pages so as to get that field right, but with ms tables you can 
	start off with 2 cols then go to e.g 4 in the same table, you dont know in 
	advance how many rows and cols there are in maxiumum, or which ones span which,
	which is a pain in the butt, really as far as word is concerned each row 
	is a table into itself, so ive done it this way

	- each table has the cols of the first row counted and the widths
	  figured out in % of the page width, if a subsequent row has a different
	  number of rows or different widths than the previous row a new table 
	  will be begun. the % width will cause netscape to line them up correctly.
	  itll do for now. not perfect i know but hey what is. Itll do the job
	  for the primary task which is making word readable as close to the 
	  original layout as possible within html. 
	- to get the tap that tells me all the above we have to scan forward
	  until we find a rowend char, and get the pap of that to get the tap.
	  and with fastsaved theres the usual complexity
	- The problem will be that netscape and other browsers dont take the 
	  width% as their primary factor in determing the actual width of a cell, 
	  if the text in it cannot be broken on a space then the cell is expanded 
	  to fit, breaking the lineing up. Im considering a somewhat more sophisticated
	  (and questionable) technique where i stick the tables together using
	  dithering of the cells to a (max 64 cell (msdefined)) cell grid. using colspan
	  and so on to do it.
	* TO-DO theres something called a header text box that i have to figure out
	  and some companion of it for the main doc. i have to implement something to
	  handle these beasts.
	* TO-DO more testing for bugs and stuff.
	* TO-DO code overhaul to simplify it.
	* TO-DO support all fields, ive some supporte page no, date and time.
	but not perfectly in the same format that word has them in.
	* TO-DO,figure out how to extract ole embedded msoffice draw and equation
	editors data, and see if i can get them converted as well.
	* TO-DO provide alternative outputs, tex/rtf and friends. ive a load of
	formatting information that i think i can get into those formats.
	* TO-DO provide basic formatting for html, i.e centering.
	* TO-DO think about writing word docs :-), now that would be a hunk of work.
	so to all you asking me about it i recommend you dont even bother with it,
	just write rtf files and get on with it, thats even what ms did for word 8,
	saving as word 6/95 just creates a rtf file, if its good enough for them, its 
	good enough for us.
	* TO-THINK-ABOUT i dont keep very much information in memory really, i just work
	out what i need for any given instant and drag it out of the file, and then dump it
	often to only get it again in a few seconds. this leads to an impressive amounting
	of seeking back and forth across the streams. theres a groove burnt in my hd where
	im working, its not really optimum behaviour, (works though :-) )
	* NEED_HELP-ON, can this compile and work under sgi ?, have success reports
	from linux, solaris,hpux,aix,freebsd and one failure to compile under sgi, ive
	one message that it compiles under os/2, though it needs some work to do that.
changes up to 0.0.27
	* know how to do the right thing with embedded sprm list
	gets rid of a few wild bugs.
	* found the list documentation after all, maybe i forgot
	to download it the last time (doh!), or it wasnt there
	when i downloaded it. so i removed all of my rather good
	but unnecessary hex determined code.
	* added a special case for "*" in lists, make it a bullet
	point instead, seems to be the right thing to do (?)
	* changed laola commands name to append -mswordview to avoid
	overwriting newer lls commands etc.
	* changed the INC in perl files to reflect final install dir.
	* TO-WORRY-ABOUT, quite a few ??'s displayed in netscape when
	dealing with those utf-8 docs, dont know if thats my lack of
	correct fonts, or a great big dirty bug. also ive a few special
	cases in the decode_letter to translate letters into what *i* think
	they should be, its rather questionable and very emperically based.
	* added some hook code to protect lists from pagebreaks. 
	in doing so i notice that my complex code is a wee bit confused, but
	it works, so im leaving it alone for now, the added code doesnt make
	for reability but hey, neither does any of the rest of the code :-)
	* fiddled list interpertation so that ilfo isnt looked at until the
	last pap and chp sprms have changed it. fixes difficulties in fast
	saved files.
	* TO-DO
	(list stuff) LFO override not implemented correctly may cause crashes.
	this is surely the last major list related thing to do.
	restarts are probably incorrect as are a few other minor list 
	related bits and pieces
changes up to 0.0.26
	* changed laola lib to a subdir of mswordview and changed laola
	program names to custom mswordview ones, to avoid clashing
	with newer versions or original version of laola, as ive
	doctored things slightly for my own needs.
	* applied Martin Schultze patch to add lib path to perl include
	path, though i twiddled it to make a nice tree in my lib.
	* lists start on the correct number (well ones that are simple
	numerals do anyway).
	* understand list continuing and restarting now.
	* added a defensive patch from Peter Silva <Peter.Silva@ec.gc.ca>
	* lists now get the char formatting that they should get.
	* yes!, sorted lists out, have bulleted lists, arabic & roman numerals,
	lowercase and uppercase lettering systems done. multilevel also works
	i believe, works on all examples i have anyway
	* fixed bug that made mswordview fail on files without an extension
	* TO-DO look at list indentation, if they are true multilevel then
	i blockquote them (for now), but if they have a set indentation value
	then like all the other layout constructs i dont preserve this into 
	html.
	* TO-DO fields, table of contents should be easier with lists
	done.
	* TO-DO find out if my unicode (utf-8) support actually works
	for anyone except me. What fonts do various people need, this
	is a general netscape question.
	* middleterm TO-DO, reorganize tags to external data files, to make extensible
	to other formats, i.e raw ascii, an attempt at latex, rtf. 
changes up to 0.0.25
	* changed list handling slightly, removes a bug where
	you get too many list levels inserted
	* i believe that most lists will now be handled correctly as to
	whether they are numbers or not. I have isolated the undocumented
	section and have a handle on the situation so its just a matter
	to comparing theory with practice again.
	* removed bug where header pap gets used in the main document
	following a header
	* finished checking all uploaded files beginning with a, yipee.
	now theres quite a few elements not addressed yet in those files, but 
	i understand whats involved, in short, section support, proper list 
	support, justification support (centering anyway) decoding of the DATE 
	and TIME fields, would you believe that the TIME field can encode the 
	DATE, despite the fact that theres a DATE field whos job this is !, 
	gagh what can you do with people who do this to you. but anyhow the 
	uploaded all convert without crash, all text is in the right place, and
	in the right language ( i think :-) ).  all bold,italic,font sizes,
	underline, manual page breaks, the content of footnotes,footers 
	and headers is all shown, albeit not always the way they appear in 
	word, yeah we're getting there.
	* changed utf conversion code as the original code i was using wasnt
	quite gpl compatable, anyhow new code is better designed for my needs.
	* TO-DO, grr!! is someone reading this log, as after my weeks holidays
	i note thats theres a huge amout of files beginning with a to go through
	again, i never did make it to b.
changes up to 0.0.24
	* fixed NULL complex pap bug.
	* supports underline tag now as well :-)
	* footnotes supported, all the ones referenced before a 
    pagebreak get listed at the manual pagebreaks and document
	end . (thats a <hr> in my current output, splitting word docs
	into different files is a challenge id rather not accept for 
	now as itd just be guesswork and mess), not checked in fastsave
	yet though.
	* TO-DO support sections, so as to know what pages get headers
	and which dont, etc.
	* TO-DO proper table of contents, the text is now listed
	but theres no link between the table of contents and the
	text it purports to describe, for the moment.
	* TO-DO differenciate between different types of underline
	i.e word for word etc
	* EVENTUALLY-TO-DO, i have come across one case where a symbol 
	used in a footnote isnt working !, if i create one of my own
	it works fine, but when i alter the given one it still 
	occurs, strange.
changes up to 0.0.23
	* verified it works on linux, aix and solaris.
	* fixed a very silly overflow byte vs int bug. 
	* overhauled unicode conversion, fixed my sprm
	size detection.
	* changed table handling so that tables dont
	end prematurely.
	* fixed img insertion dummying of wingding font 
	support.
	* massively changed my paragraph end detection for
	complex files, i had the idea all wrong, but close
	enough that it worked on fairly uniformly formatted
	files.
	* works with all uploaded files beginning with A and a
	theres soooo many to go through :-), im looking
	forward to getting to b soon.
	* TO-DO, continue checking against uploaded files,
	verify header and footer support, start on list
	information (dum de dum dum dummmm)
changes up to 0.0.22
	* check for errno
	* fix list related crash bug, found by Wayne Roberts 
	<milcom@netcom.com>
	* TO-DO, go through the 50 megs of uploaded word
	files and see do the convert fairly correctly :-)
	lists need to be done better. i need to confirm
	language conversion. and check out table of
	contents field.
changes up to 0.0.21
	* for simple format i now decode to utf-8, when appropiate.
	on viewing many docs with windows netscape 4 it works
	fine, i dont have the X fonts to do half of the
	languages under my own X, but hopefully those
	in the various language blocks can figure out
	fonts for themselves ?
	* complex format non-west-european docs might
	still be shagged, id love to hear from an asian
	language group as to whether or not the utf8 works
	for them
	* some bug fixes by Pavel Machek <pavel@Elf.ucw.cz>
changes up to 0.0.20
	* headers are fairly correct now, the spec and me 
	are confused as to headers and footers though, so 
	while i *can* do headers and footers, it might require
	a bit of fine tuning, so i need docs with all sorts
	of header and footer types in them until im sure im right
	, but its close enough.
	* docs with subdocs in them should return the output of
	the main doc now.
	*to do, from the veritable deluge of documents in languages
	i cant read :-), id better handle the non-standard, well
	non standard to me anyway ! russian and one or two
	others that i hope fall out in the process, asian
	would be wonderful.
changes up to 0.0.19
	* header support added to complex format
	* wingding font hack added like symbol font
	* headers are still not right, footers and headers are all 
	appearing at the top of the document, ive more work to do on
	that next.
	* ive shagged up the parsing of lls output, so docs with
	ole inside ole will not work even though theres no good reason
	they dont, bear with me on this
	* mswordview.wrapper added to allow inline viewing of word docs.
changes up to 0.0.18
	* new option to not change msword headings to html headings to 
	support those dodgy people who dont use them correctly.
	* fixed what looks like a specialized case for recognizing tables
	* fixed the lack of - sign.
	* have a new group of files that convert correctly.
	* these are minor changes, ill add header handling to complex
	format tomorrow
changes up to 0.0.17
	* lack of getopt.h on some systems taken into account now.
	* sub and super scripting now in for simple format.
	* laola.pl changed to continue even if it thinks the file is
	the wrong length.
	* added option to not attempt to dummy up formatting done with
	whitespace.
	* using gifs for symbols, this will do for html output, for
	other output in the future we'll have to organize something a 
	little more sohpisticated
	* i have some alpha support for headers in at the moment, 
	if you have headers you "might" see them in russet text.
mswordview/COPYING100644    764    764       43101  6631246533  13313 0ustar  caolancaolan

		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                          675 Mass Ave, Cambridge, MA 02139, 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

	Appendix: 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) 19yy  <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., 675 Mass Ave, Cambridge, MA 02139, 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.

  <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.

mswordview/CREDITS100644    764    764        2210  6714023621  13245 0ustar  caolancaolanAndrew Scriven <andy.scriven@research.natpower.co.uk>, originator of ole code
Arturo Tena <arturo@directmail.org> <filters@centauri.lci.ulsa.mx>, ole changes
Peter Brandstrom <peter.brandstrom@ericsson.com>, original wmf decompression
Martin Schwartz, <schwartz@cs.tu-berlin.de>, original laola for ole decodation
	without which this would never have existed.
Richard Bradbury <rjb@oregan.net>, for telling me what was wrong with 64bit
	platforms.
Martin Kalms <kalms@lysator.liu.se>, configure fix for sunos 4.1
Harry Shamansky (shamansky@adinc.com), irix makefile patch
OKUNISHI Fujikazu <fuji0924@mbox.kyoto-inet.or.jp>, configure additions for .exe 
	extension to mswordview under windows/dos/os2
Pavel.Roskin@ecsoft.co.uk, hpux makefile patch
Peter Silva <Peter.Silva@ec.gc.ca>, defensive patch
Pavel Machek <pavel@Elf.ucw.cz>, some buglet patches
diakka <diakka@staff.sinanet.com>, a make patch
Zachariah Baum <zack@studioarchetype.com>, little laola finding patch
Martin Vorlaender <martin@radiogaga.harz.de>, found a few piddling bugs that i would
	never have found, while he was compiling it under (wait for it) VMS.

if ive forgotten anyone mail me.
mswordview/INSTALL100644    764    764       34147  6707044444  13324 0ustar  caolancaolanMSWordView
==========
It should all work hunky dory from a ./configure followed by 
make and make install, a few sample word 8 files to try this out 
are included in the examples dir. Recommended libraries to also
install to convert wmf files are the zlib library and libwmf 
library, read on for details and download locations.

Configure Options
=================
mswordview now requires zlib to be able to uncompress wmf files,
use 
./configure --with-zlib=dir_above_zlibs_include&lib_dirs
if configure does not find zlib on its own, if configure
does not find zlib then mswordview will still make, but it'll
warn you about this feature loss. zlib can be found at
http://www.cdrom.com/pub/infozip/zlib

mswordview also needs libwmf to be able to convert wmf files
to gif files for inclusion in the html output use
./configure --with-wmf==dir_above_libwmf_include&lib_dirs
if configure does not find libwmf on its own, if configure
does not find libwmf then mswordview will still make, but it'll
warn you that it can't convert those wmf's. libwmf can be
found at 
http://www.csn.ul.ie/~caolan/docs/libwmf.html

mswordview also needs freetype to be able to allow libwmf to
output text in its conversion of wmf files to gif.
./configure --with-ttf=dir_above_ttf_includes&lib_dirs
it can be found at
http://www.freetype.org
*note* libwmf also has to be compiled with freetype support for this
to work.

In each case the dir argument to configure can either be the dir 
*above* the include and lib dirs where the component can be found. 
Or the actual dir where *both* the lib and include files exist.


But in general if you install zlib,libwmf and freetype, then you just have
to do
./configure
make

Compilation Problems
====================

(1) Make does nothing except complain
If for some reason the standard make didnt work i.e.
if make gives up without compiling a single thing then try 
gmake -f Makefile 
instead, this is a for systems with old make, like Irix for example.

(2) Cant install mswordview from a make install
If install fails due to some systems not allowing installs into user dirs
change the INSTALL variable in the Makefiles to the path of the included
install-sh, this is the kind of thing that happens on AIX.

(3) Final link fails with "undefined reference to `uncompress'"
Now there is one possible problem that i've come across, for some reason
on my old redhat4.2 system there was a libz.a in /usr/X11R6/lib that
mswordview was linking against rather than the correct one in /usr/lib.
To fix that i just deleted it :-). You can recognize this problem if the
make breaks like this at link time
gcc -lm -o mswordview mswordview.o laolareplace.old.o support.o list.o 
	piecetable.o stylesheet.o sprm.o blip.o utf.o init_chp.o field.o 
	formatting.o references.o gpprl.o papchpsep.o hyperlink.o decompresswmf.o 
	table.o annotations.o dop.o roman.o  oledecod/oledecod.o -lz   
	-L/usr/X11R6/lib  -lX11  -lgdwmf -lwmf -lxgd -ldib -lXpm -lttf 
decompresswmf.o: In function `decompress':
decompresswmf.o(.text+0x211): undefined reference to `uncompress'
gmake: *** [mswordview] Error 1

The solution is to either delete /usr/X11R6/lib/libz.a or place -L/usr/lib
or -L/usr/local/lib (which ever one has libz.a in it) before -lz i.e
gcc -lm -o mswordview mswordview.o laolareplace.old.o support.o list.o 
    piecetable.o stylesheet.o sprm.o blip.o utf.o init_chp.o field.o 
	formatting.o references.o gpprl.o papchpsep.o hyperlink.o decompresswmf.o 
	table.o annotations.o dop.o roman.o  oledecod/oledecod.o -L/usr/lib
	-L/usr/X11R6/lib  -lX11  -lgdwmf -lwmf -lxgd -ldib -lXpm -lttf

The current configure script is tweaked to attempt to work around this one
case of distribution madness, which im told is due to usage of the imake 
system and gnuplot or something.

Supported Platforms
===================
Ive gotten this to work myself so far on Linux/AIX/Solaris/OSF1 and Windows
(for windows skip to windows section) and ive heard that irix/hpux/bsd also 
work, and i had one report that with some magic it works on os/2. One mad
person ported it to AmigaOS, check the homepage for a link to that insanity.

MSWordView for Windows
======================

Its trivial to compile mswordview with the cygwin32 package, available from 
www.cygnus.com.  get that package and install it, then unpack mswordview and 
run ./configure.  then just add -DWINDOWS to the compiler flags are you are off. 
i.e. change
CC = gcc
to
CC = gcc -DWINDOWS
The only thing that extra define does is change the / to \, in the scanning of a 
command line so as to find the name of the word doc without the prepended path.

I haven't tried mswordview under windows since zlib or the wmblib library were
needed to be installed for full functionality, but i imagine that compiling them
under cygwin32 would go smoothly as well, let me know on that one.

Running MSWordView from Netscape
================================
theres some scripts in helper-scripts that were sent to me to
get netscape to use mswordview as a helper application. I dont
know anything about them, and they might not work, especially
as the program changes while they dont, but they are a useful
resource, i believe the nsopen nswordview are you're best bet
for this.

Support Files
=============
mswordview currently uses gifs to replace the wingding and symbol fonts 
and a set of custom graphics for pattern backgrounds for tables, and some
graphics for end of a page, footnotes etc, so do the make install to put
them in the place that mswordview will reference them, or use the commandline
options to set their location.

MSWordView Crashes
==================
I don't believe you. You question the worthiness of my Code? I should kill
you where you stand!, but seriously, follow these steps to help me.

make clean first
add -g -DDEBUG to the flags to the c compiler to generate
a stack of debugging info if things go wrong for you.

if you get a crash please recompile mswordview with 
CC options -g -DDEBUG, run and send the output to a temporary
file, and generate a core dump
for tcsh 
limit core unlimited
and run again
then do
gdb mswordview core
and type
backtrace
send the output of gdb to me with the bugreport and the output
from the -DDEBUG mswordview and if possible send me the file that 
mswordview crashed on as well. if the word file is particulary 
big compress it for me please. please mention your platform and
mswordview version.


C.

HomePage and Contact Details
============================
http://www.csn.ul.ie/~caolan/docs/MSWordView.html

Caolan.McNamara@ul.ie

standard configure help file follows...

Basic 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.

mswordview/Makefile.in100644    764    764       10133  6720111302  14304 0ustar  caolancaolanEXEEXT = @EXEEXT@

LDFLAGS = @LDFLAGS@

LIBS =  @ZLIB_LIBS@ @LIBS@ @WMF_LIBS@ @XPM_LIBS@ @TTF_LIBS@

GETOPT = @LIBOBJS@

CC = @CC@

LEX = @LEX@

SHELL=/bin/sh

RANLIB = @RANLIB@

AR = ar

INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@

@SET_MAKE@

prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
bindir = @bindir@
libdir = @libdir@
mandir = @mandir@
includedir = @includedir@
PERL = @PERL@

CFLAGS = @CFLAGS@ @DEFS@ @ZLIB_CFLAGS@ -Ioledecod -I. @TTF_CFLAGS@ @WMF_CFLAGS@ -DTTFDIR=\"$(libdir)/mswordview/ttf\" -DCONFIGFILE=\"$(libdir)/mswordview/config-mswordview\" -DPATTERNDIR=\"file:$(libdir)/mswordview/patterns\" -DSYMBOLFONTDIR=\"file:$(libdir)/mswordview/symbolfont\" -DWINGDINGFONTDIR=\"file:$(libdir)/mswordview/wingdingfont\"

MKINSTALLDIRS = $(srcdir)/mkinstalldirs

SHELL = /bin/sh

.SUFFIXES: .C .o

MYOBJECTS =	\
	mswordview.o \
	laolareplace.old.o \
	support.o \
	list.o \
	piecetable.o \
	stylesheet.o \
	sprm.o \
	blip.o \
	utf.o \
	init_chp.o \
	field.o \
	formatting.o \
	references.o \
	gpprl.o \
	papchpsep.o \
	hyperlink.o \
	decompresswmf.o \
	table.o \
	annotations.o \
	dop.o \
	roman.o \
	doc_limits.o \
	fib.o \
	frd.o \
	atrd.o \
	sed.o \
	font.o \
	ffn.o \
	generic.o \
	error.o \
	SttbfAssoc.o \
	summary.o \
	filetime.o \
	lex.yy.o 

OLE = oledecod/oledecod.o

CRYPT = crypt/rc4.o crypt/md5.o

all: mswordview$(EXEEXT) wvSummary$(EXEEXT) wv-libconfig wv-incconfig

mswordview$(EXEEXT):  main.o $(GETOPT) OLEDECODE libwv.a
	 $(CC)  -o $@ main.o $(GETOPT) -L. -lwv $(OLE) $(LIBS)  $(LDFLAGS)

wvSummary$(EXEEXT): wvSummary.o $(GETOPT) OLEDECODE libwv.a
	 $(CC)  -o $@ wvSummary.o $(GETOPT) -L. -lwv $(OLE) $(LIBS)  $(LDFLAGS)

wv-libconfig: Makefile
	rm -f wv-libconfig
	echo \#\!/bin/sh > wv-libconfig
	echo echo -L $(libdir) -lwv $(LIBS) $(LDFLAGS) >> wv-libconfig

wv-incconfig: Makefile
	rm -f wv-incconfig
	echo \#\!/bin/sh > wv-incconfig
	echo echo @ZLIB_CFLAGS@ -I$(includedir) @WMF_CFLAGS@ >> wv-incconfig

lex.yy.c: parser.lex
	$(LEX) parser.lex

testparse$(EXEEXT):  testparse.o $(GETOPT) OLEDECODE libwv.a
	 $(CC)  -o $@ testparse.o $(GETOPT) -L. -lwv $(OLE) $(LIBS)  $(LDFLAGS)

support.o: support.c Makefile
	$(CC) $(CFLAGS) -c $*.c 

laolareplace.o: laolareplace.c Makefile
	$(CC) $(CFLAGS) -c $*.c 

libwv.a:	$(MYOBJECTS)
	$(AR) rc libwv.a $(MYOBJECTS) 
	$(RANLIB) libwv.a

OLEDECODE:
	@echo making oledecod in oledecod
	@(cd oledecod && $(MAKE)) || exit 1

CRYPTCODE:
	@echo making rc4 in crypt
	@(cd crypt && $(MAKE)) || exit 1


%.o: %.c 
	$(CC) $(CFLAGS) -c $*.c 

cleansub:
	@echo cleaning oledecod in oledecod
	@(cd oledecod && $(MAKE) clean) || exit 1

clean: cleansub
	rm -rf $(MYOBJECTS) $(GETOPT) mswordview$(EXEEXT) wvSummary$(EXEEXT) core a.out *.a

distclean: realcleansub
	rm -rf config.cache config.status config.log Makefile config.h *.a *.o wv-incconfig wv-libconfig wvSummary$(EXEEXT) mswordview$(EXEEXT) core out* analyze/* .pure

realclean: distclean
	rm -rf lex.yy.c

realcleansub:
	@echo real cleaning oledecod in oledecod
	@(cd oledecod && $(MAKE) realclean) || exit 1

installdirs:
	$(MKINSTALLDIRS) $(bindir) \
	$(mandir) \
	$(mandir)/man1 \
	$(libdir) \
	$(libdir)/mswordview \
	$(libdir)/mswordview/symbolfont \
	$(libdir)/mswordview/wingdingfont \
	$(libdir)/mswordview/patterns \
	$(libdir)/mswordview/ttf
	

install: installdirs $(srcdir)/mswordview$(EXEEXT)
	$(INSTALL) $(srcdir)/mswordview$(EXEEXT) $(bindir)/mswordview$(EXEEXT)
	$(INSTALL) $(srcdir)/wv-libconfig $(bindir)/wv-libconfig
	$(INSTALL) $(srcdir)/wv-incconfig $(bindir)/wv-incconfig
	$(INSTALL_DATA) $(srcdir)/mswordview.1 $(mandir)/man1/
	$(INSTALL_DATA) $(srcdir)/config-mswordview $(libdir)/mswordview/config-mswordview
	for filename in symbolfont/*.gif; do \
		$(INSTALL_DATA) $$filename $(libdir)/mswordview/symbolfont; \
	done
	for filename in wingdingfont/*.gif; do \
		$(INSTALL_DATA) $$filename $(libdir)/mswordview/wingdingfont; \
	done
	for filename in patterns/*.gif patterns/*.jpg; do \
		$(INSTALL_DATA) $$filename $(libdir)/mswordview/patterns; \
	done
	$(INSTALL_DATA) mswordview.h $(includedir)/wv.h
	$(INSTALL_DATA) $(srcdir)/libwv.a $(libdir)/libwv.a


#  DO  NOT  DELETE THIS LINE -- make depend depends on it.
mswordview/TESTING100644    764    764        3133  6702643335  13301 0ustar  caolancaolanhow i test

1) every now and then i run the testall.sh script over the incuded doc
files and a few selected trouble makers that ive received.

2) i have a set of supported features documents that display what
mswordview should be able to do, i regularly check these to see if theres
any feature rot.

3) occasionally i repeat the above test while using purify and identify
out of bounds and mem leaks.

4) once a week i run the huge test of (1) over the 300 megs of uploaded
documents that i have received on poor old skynet.csn.ul.ie, many of these
are not word 8 docs as people often upload rtf & word 6/7 & excel docs as
well, but its a good brute force test for crashes, but no good to see if
the conversion makes sense.

5) i scan through the comments tha uploaders make of their files to identify 
trouble docs and visually scan the output, making changes if necessary.

some tools

i still use laola's lls to help me find errors, its a great piece of kit
to have. i also gives me other ole code to compare against the one thats
included in mswordview, if both of them cant decode a file, then theres 
pretty good evidence that somethings buggered in the ole tables, when word
hangs on them as well, thats probably becomes definite.

never having gotten the hang of hexdump i use the little jhex script that
was posted in the linux-gazette at one stage as my hex reader. And theres
nothing like doing a diff on the text output of a hexdump to find what
changes between two versions of the same file, but with a different style
chosen.

purify is also the biz for tracking down mem leaks and uninitilized memory
elements.
mswordview/blip.c100644    764    764      124262  6716645435  13412 0ustar  caolancaolan#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "config.h"
#include "mswordview.h"

extern FILE *outputfile;
extern FILE *erroroutput;
extern char *outputfilename;
extern char *imagesdir;

fsp_list *wvParseEscher(U32 fcDggInfo,U32 lcbDggInfo,FILE *escherstream,FILE *delaystream, fbse_list **pic_list);

int external_knowledge_0x01 = 0;/*when we magically know that we will not
							      be using a delay stream, i.e. big gobs of
								  emperical evidence, left external so that
								  if im wrong it'll be looking me in the face
								*/

char failsafe[1];

extern int errno;

U16 idlist[NOOFIDS] = {0,0x216,0x3D4,0x542,0x6E0,0x46A,0x7A8,0x800};


long get_picture_header(U32 fcPic,FILE *data, U32 *len, U16 *datatype)
	{
	U8 i,j;
	error(erroroutput,"seeking to %x\n",fcPic);
	fseek(data,fcPic,SEEK_SET);
	*len = read_32ubit(data);
	error(erroroutput,"the no of bytes in this PIC is %d\n",*len);
	i = getc(data);
	error(erroroutput,"the no of bytes of the PIC is %x\n",i);
	*datatype = read_16ubit(data);
	error(erroroutput,"an mm is %x\n",*datatype);
	error(erroroutput,"an mm is %x\n",read_16ubit(data));
	error(erroroutput,"an mm is %x\n",read_16ubit(data));
	error(erroroutput,"an mm is %x\n",read_16ubit(data));
	for (j=0;j<(i-13);j++)
		getc(data);
	*len = *len - i;
	return(ftell(data));
	}


obj_by_spid * get_blips(U32 fcDggInfo,U32 lcbDggInfo,FILE *tablefd,FILE *mainfd,int *noofblips,int streamtype,obj_by_spid **realhead)
	{
	U16 element;
	U32 len;
	U32 fulllen=0;
	U32 full02len=0;
	U32 full00len=0;
	long pos02;
	long pos00;
	U32 templen1;
	U32 templen2;
	U32 noofpics;
	U32 offset;
	int i;
	FILE *graphic;
	char *buffer=NULL;
	obj_by_spid *head=NULL;
	obj_by_spid *p=NULL;
	char *imageprefix=NULL;

	int currentspid=0;
	
	U16 spids[1024];
	char **names;
	int *no;
	char *names01[1024];
	static char *names08[1024];
	static int no01=0;
	static int no08=0;
	int decompressf=0;
	int decodewmf=0;
	U32 inlen=0;
	U32 outlen=0;

	U16 id;
	U32 op;
	U16 msofbh;
	U16 extra=0;
	U32 flags;
	fsp_list *afsp_list;
	fbse_list *afbse_list;


	afsp_list = wvParseEscher(fcDggInfo,lcbDggInfo,tablefd,mainfd,&afbse_list);


	wvGetSPID(0x402,afsp_list,afbse_list);


	while(afsp_list != NULL)
		{
		error(erroroutput,"test spid is %x\n",afsp_list->afsp.spid);
		afsp_list = afsp_list->next;
		}

	*noofblips=0;

	if (imagesdir == NULL)
		{
		imageprefix = malloc(strlen(outputfilename)+1);
		if (imageprefix == NULL)
			{
			fprintf(erroroutput,"arrgh, no mem\n");
			exit(-1);
			}
		strcpy(imageprefix,outputfilename);
		}
	else
		{
		imageprefix = malloc(strlen(imagesdir)+2+strlen(ms_basename(outputfilename)));
		if (imageprefix == NULL)
			{
			fprintf(erroroutput,"arrgh, no mem\n");
			exit(-1);
			}
		sprintf(imageprefix,"%s/%s",imagesdir,ms_basename(outputfilename));
		}


	if (streamtype == 0x01)
		{
		mainfd=tablefd;
		names=names01;
		no = &no01;
		memset(names, 0, 1024);
		}
	else		
		{
		names=names08;
		no = &no08;
		}

	if ( (*no) == 0)	
		memset(names, 0, 1024);

	if ((realhead != NULL) && (*realhead != NULL))
		{
		error(erroroutput,"adding onto an existing list\n");
		p=*realhead;
		head=*realhead;
		error(erroroutput,"REAL TEST, filename is %s\n",(*realhead)->filename);
		error(erroroutput,"head isnt null here\n");

		error(erroroutput,"TEST, no is %d, filename is %s\n",*no,p->filename);

		while (p->next != NULL)
			p = p->next;
		}

	fseek(tablefd,fcDggInfo,SEEK_SET);

	while(fulllen < lcbDggInfo)
		{
		error(erroroutput,"at this moment fullen is %d, lcbDggInfo is %d, pos is %x, streamtype is %d\n",fulllen,lcbDggInfo,ftell(tablefd),streamtype);
		msofbh = read_16ubit(tablefd);
		element = read_16ubit(tablefd);
		len = read_32ubit(tablefd);

		fulllen+=8;
		error(erroroutput,"len is %x, element is %x\n",len,element);
		error(erroroutput,"dec, fullen is %d, lcbDggInfo is %d\n",fulllen,lcbDggInfo);
		switch (element)
			{
			case 0xf000:
				error(erroroutput,"f000 here\n");
				pos00 = ftell(tablefd);
				full00len=0;
				templen2 = len;
				while (full00len < templen2)
					{
					error(erroroutput,"at this moment full00en is %d, templen is %d\n",full00len,templen2);
					msofbh = read_16ubit(tablefd);
					element = read_16ubit(tablefd);
					len = read_32ubit(tablefd);
					full00len+=8;
					error(erroroutput,"len is %x, element is %x\n",len,element);
					error(erroroutput,"dec, fullen is %d, lcbDggInfo is %d\n",full00len,lcbDggInfo);
					switch (element)
						{
						case 0xf006:
							error(erroroutput,"1-->%d\n",read_32ubit(tablefd));
							error(erroroutput,"2-->%d\n",read_32ubit(tablefd));
							error(erroroutput,"3-->%d\n",read_32ubit(tablefd));
							noofpics = read_32ubit(tablefd);
							full00len+=16;
							error(erroroutput,"there are %d pics visible\n",noofpics);
							/*
							for (i=0;i<noofpics;i++)
								{
								read_32ubit(tablefd);
								read_32ubit(tablefd);
								full00len+=8;
								}
							*/
							for (i=16;i<len;i++)
								{
								getc(tablefd);
								full00len++;
								}
							break;
						case 0xf00b:
							id = read_16ubit(tablefd);
							op = read_32ubit(tablefd);
							error(erroroutput,"id is %x\n",id);
							error(erroroutput,"op is %x\n",op);
							full00len+=6;

							if ((id & 0x4000) && (!(id & 0x8000)))
								{
								error(erroroutput,"talking about blit id of %x,mine %x\n",op,id&0x3fff);
								p->filename=names[op-1];
								if (p->filename==NULL)
									{
									/*
									this means that there was no blip in the blip store to match with this,
									from looking at it it looks like this means that there will be data in
									the client data to fill this blank
									so im going to temporarily allow a temp in the filename when we come
									to blips to be assigned
									*/
									}
								}

							if (p==NULL)
								error(erroroutput,"SO p is NULL\n");
							else if (p->filename == NULL)
								error(erroroutput,"SO p->filenamae is NULL\n");
							else
								error(erroroutput,"SO spid %x has a filename of %s\n",p->spid,p->filename);

							for(i=0;i<len-6;i++)
								{
								getc(tablefd);
								full00len++;
								}
							break;
						case 0xf001: /*container for pics*/
							break;
						case 0xf007: /*a pic, yeah!!*/
							error(erroroutput,"window pic type is %d\n",getc(tablefd));	
							error(erroroutput,"mac pic type is %d\n",getc(tablefd));	
							full00len+=2;
							for(i=0;i<18;i++)
								getc(tablefd);
							full00len+=18;
							error(erroroutput,"pic data len is (%x)\n",read_32ubit(tablefd));
							error(erroroutput,"blid no is %d\n",read_32ubit(tablefd));
							offset = read_32ubit(tablefd);
							full00len+=12;
							error(erroroutput,"file offset into main stream is %x\n",offset);

							read_32ubit(tablefd);
							full00len+=4;

							buffer = malloc(strlen("-graphic100-mswv.tiff")+80+strlen(imageprefix));
							if (buffer==NULL)
								{
								fprintf(erroroutput,"no mem\n");
								exit(-1);
								}

							error(erroroutput,"were at %x\n",ftell(tablefd));
							if ((offset != 0xffffffffUL) || (streamtype == 0x01))
								{
								if (streamtype == 0x08)
									fseek(mainfd,offset,SEEK_SET);
								error(erroroutput,"were at %x\n",ftell(mainfd));
								msofbh = read_16ubit(mainfd);
								error(erroroutput,"msofbh is %x, inst is %x\n",msofbh ,msofbh>> 4);
								msofbh = msofbh >> 4;
								extra=0;
								for (i=0;i<NOOFIDS;i++)
									{
									if ((msofbh ^ idlist[i]) == 1)
										{
										error(erroroutput,"extra 16\n");
										extra=16;
										}
									}
								element = read_16ubit(mainfd);
								error(erroroutput,"element is %x\n",element);
								len = read_32ubit(mainfd);
								if (streamtype == 0x01)
									full00len+=8;
								error(erroroutput,"graphic len is %x, pos is %x\n",len,ftell(mainfd));

								if ((element >= 0xf018) && (element <= 0xf117))
									{
									switch (element - 0xf018)
										{
										case 6:
											sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"png");
											for(i=0;i<(17+extra);i++)
												getc(mainfd);
											len-=(17+extra);
											if (streamtype == 0x01)
												full00len+=(17+extra);
											break;
										case 5:
											sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"jpg");
											error(erroroutput,"extra is %d\n",extra);
											for(i=0;i<(17+extra);i++)
												getc(mainfd);
											len-=(17+extra);
											if (streamtype == 0x01)
												full00len+=(17+extra);
											error(erroroutput,"jpg the current pos of the beast is %x\n",ftell(mainfd));
											break;
										case 4:
											sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"pict");
											for(i=0;i<(17+extra);i++)
												getc(mainfd);
											len-=(17+extra);
											if (streamtype == 0x01)
												full00len+=(17+extra);
											break;
										case 3:
											decompressf = setdecom();
											if (decompressf)
												sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"wmf");
											else
												sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"wmf.lz");
											decodewmf=1;
											for(i=0;i<(16+extra);i++)
												getc(mainfd);
											outlen = read_32ubit(mainfd);
											error(erroroutput,"uncompressed size would be %d\n",outlen);
											for(i=0;i<24;i++)
												getc(mainfd);
											inlen = read_32ubit(mainfd);
											error(erroroutput,"compressed size is %d\n",inlen);
											error(erroroutput,"compression is %d\n",getc(mainfd));
											error(erroroutput,"filter is %d\n",getc(mainfd));
											len-=(50+extra);
											if (streamtype == 0x01)
												full00len+=(50+extra);
											break;
										case 2:
											decompressf = setdecom();
											if (decompressf)
												sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"emf");
											else
												sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"emf.lz");
											for(i=0;i<(16+extra);i++)
												getc(mainfd);
											outlen = read_32ubit(mainfd);
											error(erroroutput,"uncompressed size would be %d\n",outlen);
											for(i=0;i<24;i++)
												getc(mainfd);
											inlen = read_32ubit(mainfd);
											error(erroroutput,"compressed size is %d\n",inlen);
											error(erroroutput,"compression is %d\n",getc(mainfd));
											error(erroroutput,"filter is %d\n",getc(mainfd));
											len-=(50+extra);
											if (streamtype == 0x01)
												full00len+=(50+extra);
											break;
										case 7:
											sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"dib");
											for(i=0;i<(17+extra);i++)
												getc(mainfd);
											len-=(17+extra);
											if (streamtype == 0x01)
												full00len+=(17+extra);
											break;
										default:
											sprintf(buffer,"%s-graphic-dontknow%d-mswv-%d.jpg",imageprefix,(*no)+1,streamtype);
											len=0;
											break;
										}


									error(erroroutput,"this the current pos of the beast is %x\n",ftell(mainfd));

									if (decompressf)
										/*
										graphic = tmpfile();
										*/
										graphic = fopen("/tmp/test.wmf.lzzed","w+b");
									else
										graphic = fopen(buffer,"wb");

									if (graphic == NULL)
										{
										error(erroroutput,"warning couldnt create file %s, ignoring \n(failure was :%s)\n",buffer,strerror(errno));
										for (i=0;i<len;i++)
											{
											getc(mainfd);
											if (streamtype == 0x01)
												full00len++;
											}
										}
									else
										{
										error(erroroutput,"len changed to %d\n",len);
										for (i=0;i<len;i++)
											{
											putc(getc(mainfd),graphic);
											if (streamtype == 0x01)
												full00len++;
											}
										if (decompressf)
											{
											fflush(graphic);
											rewind(graphic);
											decompress(graphic,buffer,inlen,outlen);
											decompressf=0;
											}
											
										fclose(graphic);
										if (decodewmf)
											convertwmf(buffer);
										}
									}

								if (buffer!=NULL)
									names[(*no)++] = buffer;
								else
									(*no)++;

								error(erroroutput,"name is %s, index %d\n",names[(*no)-1],(*no)-1);

								error(erroroutput,"blit no %d is filename %s\n",*no,names[(*no)-1]);


								if (p != NULL)
									if (p->filename == NULL)
										p->filename = buffer;
								
								error(erroroutput,"THE FILENAME is %s\n",buffer);
								}
							else
								{
								error(erroroutput,"would have been %s-graphic-badoffset%d-mswv.jpg",imageprefix,(*no)+1);
								error(erroroutput,"THE FILENAME is %s\n",buffer);
								free(buffer);
								}
							error(erroroutput,"location is %x\n",ftell(tablefd));
							break;
						default:
							error(erroroutput,"unrecognized element %x len is %d\n",element,len);
							error(erroroutput,"were here at %x\n",ftell(tablefd));
							for(i=0;i<len;i++)
								{
								getc(tablefd);
								full00len++;
								}
							break;
						}
					}
				templen2++;
				fulllen+=templen2;
				pos00+=templen2;
				error(erroroutput,"the position to seek to is fulllen is %d,%x\n",fulllen,pos00);
				fseek(tablefd,pos00,SEEK_SET);
				break;
			case 0xf002: /*container for page or something*/
				error(erroroutput,"f002 here\n");
				pos02 = ftell(tablefd);
				full02len=0;
				templen1 = len;
				while (full02len < templen1)
					{
					error(erroroutput,"at this moment full02en is %d, templen is %d\n",full02len,templen1);
					msofbh = read_16ubit(tablefd);
					element = read_16ubit(tablefd);
					len = read_32ubit(tablefd);
					full02len+=8;
					error(erroroutput,"len is %x, element is %x\n",len,element);
					error(erroroutput,"dec, fullen is %d, lcbDggInfo is %d\n",full02len,lcbDggInfo);
					switch (element)
						{
						case 0xf008: /*msofbtDg*/
							read_32ubit(tablefd);
							read_32ubit(tablefd);
							full02len+=8;
							break;
						case 0xf003: /*container for many shapes*/
							break;
						case 0xf004: /*container for a shape*/
							break;
						case 0xf00a:
							spids[currentspid++] = read_32ubit(tablefd);
							error(erroroutput,"The ID of this ENTITY is %x\n",spids[currentspid-1]);
							/*
							this is the identity of the object, the real spid as far 
							as im concerned, following this will be the shape property
							table that will have a list of blits associated with
							this id, (referred to by an index into the previous blit 
							table)
							*/
							flags = read_32ubit(tablefd);
							error(erroroutput,"flags is %x\n",flags);

							if (head == NULL)
								{
								head = (obj_by_spid*) malloc(sizeof(obj_by_spid));
								error(erroroutput,"head is null\n");
								if (head == NULL)
									{
									error(erroroutput,"no mem\n");
									exit(-1);
									}
								p = head;
								}
							else
								{
								p->next = (obj_by_spid*) malloc(sizeof(obj_by_spid));
								error(erroroutput,"head is not null\n");
								if (p->next == NULL)
									{
									error(erroroutput,"no mem\n");
									exit(-1);
									}
								p = p->next;
								}
							
							p->spid = spids[currentspid-1];
							/*
							p->filename = failsafe;
							*/
							p->filename = NULL;
							p->next = NULL;
							(*noofblips)++;
							
							full02len+=8;
							for(i=0;i<len-8;i++)
								{
								getc(tablefd);
								full02len++;
								}
							break;
						case 0xf00b:
							id = read_16ubit(tablefd);
							op = read_32ubit(tablefd);
							error(erroroutput,"id is %x\n",id);
							error(erroroutput,"op is %x\n",op);

							if ((id & 0x4000) && (!(id & 0x8000)))
								{
								error(erroroutput,"talking about blit id of %x,mine %x\n",op,id&0x3fff);
								p->filename=names[op-1];
								if (p->filename==NULL)
									{
									/*
									this means that there was no blip in the blip store to match with this,
									from looking at it it looks like this means that there will be data in
									the client data to fill this blank
									so im going to temporarily allow a temp in the filename when we come
									to blips to be assigned
									*/
									}
								}

							if (p==NULL)
								error(erroroutput,"SO p is NULL\n");
							else if (p->filename == NULL)
								error(erroroutput,"SO p->filenamae is NULL\n");
							else
								error(erroroutput,"SO spid %x has a filename of %s\n",p->spid,p->filename);

							full02len+=6;
							for(i=0;i<len-6;i++)
								{
								getc(tablefd);
								full02len++;
								}
							break;
						default:
							error(erroroutput,"unrecognized element %x len is %d\n",element,len);
							error(erroroutput,"were here at %x\n",ftell(tablefd));
							for(i=0;i<len;i++)
								{
								getc(tablefd);
								full02len++;
								}
							break;
						}
					}
				templen1++;
				fulllen+=templen1;
				pos02+=templen1;
				error(erroroutput,"the position to seek to is fulllen %d,%x\n",fulllen,pos02);
				fseek(tablefd,pos02,SEEK_SET);
				break;
			case 0xf005: /*container for shape rules*/
				break;
			case 0xf004: /*container for a shape*/
				break;
			case 0xf007: /*a pic, yeah!!*/
				error(erroroutput,"window pic type is %d\n",getc(tablefd));	
				error(erroroutput,"mac pic type is %d\n",getc(tablefd));	
				fulllen+=2;
				for(i=0;i<18;i++)
					getc(tablefd);
				fulllen+=18;
				error(erroroutput,"pic data len is (%x)\n",read_32ubit(tablefd));
				error(erroroutput,"blid no is %d\n",read_32ubit(tablefd));
				offset = read_32ubit(tablefd);
				fulllen+=12;
				error(erroroutput,"file offset into main stream is %x\n",offset);

				read_32ubit(tablefd);
				fulllen+=4;

				buffer = malloc(strlen("-graphic100-mswv.tiff")+80+strlen(imageprefix));
				if (buffer==NULL)
					{
					fprintf(erroroutput,"no mem\n");
					exit(-1);
					}

				error(erroroutput,"were at %x\n",ftell(tablefd));
				if ((offset != 0xffffffffUL) || (streamtype == 0x01))
					{
					if (streamtype == 0x08)
						fseek(mainfd,offset,SEEK_SET);
					error(erroroutput,"were at %x\n",ftell(mainfd));
					msofbh = read_16ubit(mainfd);
					error(erroroutput,"element is %x, inst is %x\n",msofbh ,msofbh>> 4);
					msofbh = msofbh >> 4;
					extra=0;
					for (i=0;i<NOOFIDS;i++)
						{
						if ((msofbh ^ idlist[i]) == 1)
							{
							error(erroroutput,"extra 16\n");
							extra=16;
							}
						}
					element = read_16ubit(mainfd);
					len = read_32ubit(mainfd);
					if (streamtype == 0x01)
						fulllen+=8;
					error(erroroutput,"graphic len is %x, element is %x\n",len,element);

					if ((element >= 0xf018) && (element <= 0xf117))
						{
						switch (element - 0xf018)
							{
							case 6:
								sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"png");
								for(i=0;i<(17+extra);i++)
									getc(mainfd);
								len-=(17+extra);
								if (streamtype == 0x01)
									fulllen+=(17+extra);
								break;
							case 5:
								sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"jpg");
								for(i=0;i<(17+extra);i++)
									getc(mainfd);
								len-=(17+extra);
								if (streamtype == 0x01)
									fulllen+=(17+extra);
								break;
							case 4:
								sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"pict");
								for(i=0;i<(17+extra);i++)
									getc(mainfd);
								len-=(17+extra);
								if (streamtype == 0x01)
									fulllen+=(17+extra);
								break;
							case 3:
								decompressf = setdecom();
								if (decompressf)
									sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"wmf");
								else
									sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"wmf.lz");
								decodewmf=1;
								for(i=0;i<(16+extra);i++)
									getc(mainfd);
								outlen = read_32ubit(mainfd);
								error(erroroutput,"uncompressed size would be %d\n",outlen);
								for(i=0;i<24;i++)
									getc(mainfd);
								inlen = read_32ubit(mainfd);
								error(erroroutput,"compressed size is %d\n",inlen);
								error(erroroutput,"compression is %d\n",getc(mainfd));
								error(erroroutput,"filter is %d\n",getc(mainfd));
								len-=(50+extra);
								if (streamtype == 0x01)
									fulllen+=(50+extra);
								break;
							case 2:
								decompressf = setdecom();
								if (decompressf)
									sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"emf");
								else
									sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"emf.lz");
								for(i=0;i<(16+extra);i++)
									getc(mainfd);
								outlen = read_32ubit(mainfd);
								error(erroroutput,"uncompressed size would be %d\n",outlen);
								for(i=0;i<24;i++)
									getc(mainfd);
								inlen = read_32ubit(mainfd);
								error(erroroutput,"compressed size is %d\n",inlen);
								error(erroroutput,"compression is %d\n",getc(mainfd));
								error(erroroutput,"filter is %d\n",getc(mainfd));
								len-=(50+extra);
								if (streamtype == 0x01)
									fulllen+=(50+extra);
								break;
							case 7:
								sprintf(buffer,"%s-graphic%d-mswv-%d.%s",imageprefix,(*no)+1,streamtype,"dib");
								for(i=0;i<(17+extra);i++)
									getc(mainfd);
								len-=(17+extra);
								if (streamtype == 0x01)
									fulllen+=(17+extra);
								break;
							default:
								sprintf(buffer,"%s-graphic-dontknow%d-mswv-%d.jpg",imageprefix,(*no)+1,streamtype);
								len=0;
								break;
							}

						error(errorou