RTF TO HTML
-----------

This is based on version 2.7.5 of rtftohtml, which was last modified in
November, 1994.
It contains the text:
###
Initial Implementation by Chris Hector (cjh@cray.com)
(c) 1994 by Chris Hector
May be freely distributed.
This translator was based on rtfskel.
###
The last known email address I can find for him is <cjh@cray.com>.
I think that <chris@sunpack.com> might reach him, but I'm not sure.


Versions 3.0 of rtftohtml and up are released under a shareware license,
and available from http://www.logictran.com (although it now has a new
name). You can download a free binary version of the software for most
platforms from this site.




rtftohtml is based on RTF Tools, which is (c) April 1994 by Paul DuBois
<dubois@primate.wisc.edu>

RTF Tools has the notice:
##
Distribution Availability
This software may be redistributed without restriction and used for any
purpose whatsoever.
##

The supplied version understands RTF version 1.2, while the
latest version of the specification is RTF 1.6 (May 1999).

I have added some of the newer rtf codes that were preventing some files from
being parsed properly, but they are not acted on. Most of them do not
actually affect the content anyway. Depending on how the rtf was created,
there might be tags that cause us to trip up and fail. If you have
rtf files that Greenstone is not extracting text from, please send me
some email (jrm21@cs.waikato.ac.nz).

Note - we extract but do not convert Windows Metafile Format (.wmf) images.
On unix systems, these can be converted with newer versions of ImageMagick
(ie "convert" version 4.2.9 or newer).
Also, libwmf (for unix and windows) is available for conversion at:
http://wvware.sourceforge.net/projects/libwmf.html
but we do not include it here due to its dependencies
(eg libttf for truetype fonts).

Embedded images such as jpegs and pngs are extracted fine, though.

John McPherson (jrm21@cs.waikato.ac.nz)
June 2001.

====
When compiling with gcc v10, the following struct definition:

struct SSStruct {
        struct SDest SD;
        int alloc;
        int used;
        struct SSData *data;
} PNSave, FNSave;


in:

  htmlout.h

caused a multiply defined linking error.

The syntax used in the header file seeks to defined the struct 'SSStruct'
and then introduce 2 global variables 'PNSave' and 'FNSave'.  It was
reasoned that this style of declaring a struct and then declaring global
variables of this type has probably been deprecated, then then officially
discontinued (by gcc v10).  Rather than spending time delving into what
is/isn't allowed in newer standards of C, the decision was made to
simply rewrite the code so the actual declaration of the global variables
was moved to htmlout.c

David Bainbridge (davidb@waikato.ac.nz)
August 2021
====


For newer Macs, the command-line C compiler needs to have all external
functions defined.  The following files failed to extern exit(), and
so we have had to add in #include <stdlib.h> to the following files:


  rtftohtml_src/htmlout.c 
  rtftohtml_src/html-unix.c 
  rtftohtml_src/Libs/lib/mkrtf-ctrl.c 

David Bainbridge and Anupama Krishnan
March 2023
====


