source: main/trunk/greenstone2/build-src/packages/rtftohtml/rtftohtml-gs.txt@ 37385

Last change on this file since 37385 was 37385, checked in by davidb, 14 months ago

Needed to update 3 source files due to changes in how gcc/clang on Mac works. See details in rtftohtml-gs.txt

  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1RTF TO HTML
2-----------
3
4This is based on version 2.7.5 of rtftohtml, which was last modified in
5November, 1994.
6It contains the text:
7###
8Initial Implementation by Chris Hector ([email protected])
9(c) 1994 by Chris Hector
10May be freely distributed.
11This translator was based on rtfskel.
12###
13The last known email address I can find for him is <[email protected]>.
14I think that <[email protected]> might reach him, but I'm not sure.
15
16
17Versions 3.0 of rtftohtml and up are released under a shareware license,
18and available from http://www.logictran.com (although it now has a new
19name). You can download a free binary version of the software for most
20platforms from this site.
21
22
23
24
25rtftohtml is based on RTF Tools, which is (c) April 1994 by Paul DuBois
26<[email protected]>
27
28RTF Tools has the notice:
29##
30Distribution Availability
31This software may be redistributed without restriction and used for any
32purpose whatsoever.
33##
34
35The supplied version understands RTF version 1.2, while the
36latest version of the specification is RTF 1.6 (May 1999).
37
38I have added some of the newer rtf codes that were preventing some files from
39being parsed properly, but they are not acted on. Most of them do not
40actually affect the content anyway. Depending on how the rtf was created,
41there might be tags that cause us to trip up and fail. If you have
42rtf files that Greenstone is not extracting text from, please send me
43some email ([email protected]).
44
45Note - we extract but do not convert Windows Metafile Format (.wmf) images.
46On unix systems, these can be converted with newer versions of ImageMagick
47(ie "convert" version 4.2.9 or newer).
48Also, libwmf (for unix and windows) is available for conversion at:
49http://wvware.sourceforge.net/projects/libwmf.html
50but we do not include it here due to its dependencies
51(eg libttf for truetype fonts).
52
53Embedded images such as jpegs and pngs are extracted fine, though.
54
55John McPherson ([email protected])
56June 2001.
57
58====
59When compiling with gcc v10, the following struct definition:
60
61struct SSStruct {
62 struct SDest SD;
63 int alloc;
64 int used;
65 struct SSData *data;
66} PNSave, FNSave;
67
68
69in:
70
71 htmlout.h
72
73caused a multiply defined linking error.
74
75The syntax used in the header file seeks to defined the struct 'SSStruct'
76and then introduce 2 global variables 'PNSave' and 'FNSave'. It was
77reasoned that this style of declaring a struct and then declaring global
78variables of this type has probably been deprecated, then then officially
79discontinued (by gcc v10). Rather than spending time delving into what
80is/isn't allowed in newer standards of C, the decision was made to
81simply rewrite the code so the actual declaration of the global variables
82was moved to htmlout.c
83
84David Bainbridge ([email protected])
85August 2021
86====
87
88
89For newer Macs, the command-line C compiler needs to have all external
90functions defined. The following files failed to extern exit(), and
91so we have had to add in #include <stdlib.h> to the following files:
92
93
94 rtftohtml_src/htmlout.c
95 rtftohtml_src/html-unix.c
96 rtftohtml_src/Libs/lib/mkrtf-ctrl.c
97
98David Bainbridge and Anupama Krishnan
99March 2023
100====
101
102
Note: See TracBrowser for help on using the repository browser.