diff --git a/OpenChange/unrtf-0.21.2.diff b/OpenChange/unrtf-0.21.2.diff index 1920d0467..1c054cac1 100644 --- a/OpenChange/unrtf-0.21.2.diff +++ b/OpenChange/unrtf-0.21.2.diff @@ -1,6 +1,6 @@ diff -durpN unrtf-0.21.2.old/outputs/html.conf unrtf-0.21.2/outputs/html.conf --- unrtf-0.21.2.old/outputs/html.conf 2010-08-15 08:44:09.000000000 -0400 -+++ unrtf-0.21.2/outputs/html.conf 2011-11-09 13:55:25.289763561 -0500 ++++ unrtf-0.21.2/outputs/html.conf 2011-11-09 15:48:29.982798286 -0500 @@ -5,7 +5,7 @@ comment_end --> @@ -12,7 +12,7 @@ diff -durpN unrtf-0.21.2.old/outputs/html.conf unrtf-0.21.2/outputs/html.conf diff -durpN unrtf-0.21.2.old/src/attr.c unrtf-0.21.2/src/attr.c --- unrtf-0.21.2.old/src/attr.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/attr.c 2011-11-09 09:55:11.557465363 -0500 ++++ unrtf-0.21.2/src/attr.c 2011-11-09 15:48:29.990798214 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -1262,7 +1262,7 @@ diff -durpN unrtf-0.21.2.old/src/attr.c unrtf-0.21.2/src/attr.c diff -durpN unrtf-0.21.2.old/src/attr.h unrtf-0.21.2/src/attr.h --- unrtf-0.21.2.old/src/attr.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/attr.h 2011-11-09 09:55:11.561465361 -0500 ++++ unrtf-0.21.2/src/attr.h 2011-11-09 15:48:29.990798214 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -1412,7 +1412,7 @@ diff -durpN unrtf-0.21.2.old/src/attr.h unrtf-0.21.2/src/attr.h +#endif /* ATTR_H */ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c --- unrtf-0.21.2.old/src/convert.c 2011-06-07 08:00:23.000000000 -0400 -+++ unrtf-0.21.2/src/convert.c 2011-11-09 09:55:11.561465361 -0500 ++++ unrtf-0.21.2/src/convert.c 2011-11-09 15:52:04.710787385 -0500 @@ -1,24 +1,24 @@ /*=========================================================================== @@ -4576,7 +4576,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c + } + if (w->hash_index) + { -+ str=hash_get_string (w->hash_index); ++ str=hash_get_string (oc->conversion, w->hash_index); + fprintf(stderr,"string is %s\n", str); + } #endif @@ -6856,7 +6856,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c } -@@ -3652,37 +3664,226 @@ word_print_core (Word *w) +@@ -3652,37 +3664,225 @@ word_print_core (Word *w) *=======================================================================*/ void @@ -6942,7 +6942,6 @@ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c +{ + size_t fullname_len; + char *fullname; -+ int rc; + + if (!options->output_format || !options->config_directory) + return 0; @@ -7107,7 +7106,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.c unrtf-0.21.2/src/convert.c } diff -durpN unrtf-0.21.2.old/src/convert.h unrtf-0.21.2/src/convert.h --- unrtf-0.21.2.old/src/convert.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/convert.h 2011-11-09 09:55:11.565465360 -0500 ++++ unrtf-0.21.2/src/convert.h 2011-11-09 15:48:29.998798267 -0500 @@ -36,18 +36,135 @@ #ifndef _CONVERT @@ -7251,7 +7250,7 @@ diff -durpN unrtf-0.21.2.old/src/convert.h unrtf-0.21.2/src/convert.h diff -durpN unrtf-0.21.2.old/src/defs.h unrtf-0.21.2/src/defs.h --- unrtf-0.21.2.old/src/defs.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/defs.h 2011-11-09 09:55:11.565465360 -0500 ++++ unrtf-0.21.2/src/defs.h 2011-11-09 15:48:29.998798267 -0500 @@ -64,9 +64,6 @@ #define SKIP_ONE_WORD 2 #endif @@ -7271,7 +7270,7 @@ diff -durpN unrtf-0.21.2.old/src/defs.h unrtf-0.21.2/src/defs.h +#define DEFAULT_OUTPUT "html" diff -durpN unrtf-0.21.2.old/src/error.c unrtf-0.21.2/src/error.c --- unrtf-0.21.2.old/src/error.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/error.c 2011-11-09 09:55:11.565465360 -0500 ++++ unrtf-0.21.2/src/error.c 2011-11-09 15:48:29.998798267 -0500 @@ -51,27 +51,11 @@ #include #endif @@ -7316,7 +7315,7 @@ diff -durpN unrtf-0.21.2.old/src/error.c unrtf-0.21.2/src/error.c #endif diff -durpN unrtf-0.21.2.old/src/error.h unrtf-0.21.2/src/error.h --- unrtf-0.21.2.old/src/error.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/error.h 2011-11-09 09:55:11.569465360 -0500 ++++ unrtf-0.21.2/src/error.h 2011-11-09 15:48:29.998798267 -0500 @@ -37,9 +37,10 @@ #define CHECK_MALLOC_SUCCESS(XX) { if ((XX)==NULL) { fprintf (stderr, "internal error: cannot allocate memory in %s at %d\n", __FILE__, __LINE__); exit (1); }} @@ -7331,7 +7330,7 @@ diff -durpN unrtf-0.21.2.old/src/error.h unrtf-0.21.2/src/error.h diff -durpN unrtf-0.21.2.old/src/hash.c unrtf-0.21.2/src/hash.c --- unrtf-0.21.2.old/src/hash.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/hash.c 2011-11-09 09:55:11.569465360 -0500 ++++ unrtf-0.21.2/src/hash.c 2011-11-09 15:48:29.998798267 -0500 @@ -53,24 +53,16 @@ #include #endif @@ -7536,14 +7535,16 @@ diff -durpN unrtf-0.21.2.old/src/hash.c unrtf-0.21.2/src/hash.c +} diff -durpN unrtf-0.21.2.old/src/hash.h unrtf-0.21.2/src/hash.h --- unrtf-0.21.2.old/src/hash.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/hash.h 2011-11-09 09:55:11.569465360 -0500 -@@ -32,11 +32,11 @@ ++++ unrtf-0.21.2/src/hash.h 2011-11-09 15:51:52.846788680 -0500 +@@ -32,11 +32,15 @@ * 16 Dec 07, daved@physiol.usyd.edu.au: updated to GPL v3 *--------------------------------------------------------------------*/ ++#ifndef HASH_H ++#define HASH_H 1 + +struct ConversionContext; -- -extern void hash_init (void); -extern unsigned long hash_stats (void); -extern unsigned long hash_get_index (char *); @@ -7555,9 +7556,10 @@ diff -durpN unrtf-0.21.2.old/src/hash.h unrtf-0.21.2/src/hash.h +extern char* hash_get_string (const struct ConversionContext *, unsigned long); +extern void hash_free (struct ConversionContext *); ++#endif /* HASH_H */ diff -durpN unrtf-0.21.2.old/src/main.c unrtf-0.21.2/src/main.c --- unrtf-0.21.2.old/src/main.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/main.c 2011-11-09 09:55:11.569465360 -0500 ++++ unrtf-0.21.2/src/main.c 2011-11-09 15:48:29.998798267 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -7979,7 +7981,7 @@ diff -durpN unrtf-0.21.2.old/src/main.c unrtf-0.21.2/src/main.c - diff -durpN unrtf-0.21.2.old/src/main.h unrtf-0.21.2/src/main.h --- unrtf-0.21.2.old/src/main.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/main.h 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/main.h 2011-11-09 15:48:29.998798267 -0500 @@ -35,21 +35,8 @@ * 17 Jan 10, daved@physiol.usyd.edu.au: change CONFIG_DIR to drop outputs/ *--------------------------------------------------------------------*/ @@ -8005,7 +8007,7 @@ diff -durpN unrtf-0.21.2.old/src/main.h unrtf-0.21.2/src/main.h +#define USAGE "unrtf [--version] [--verbose] [--help] [--nopict|-n] [--noremap] [--html] [--text] [--vt] [--latex] [--rtf] [-P config_search_path] [-t )] " diff -durpN unrtf-0.21.2.old/src/Makefile.am unrtf-0.21.2/src/Makefile.am --- unrtf-0.21.2.old/src/Makefile.am 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/Makefile.am 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/Makefile.am 2011-11-09 15:48:29.998798267 -0500 @@ -13,7 +13,6 @@ unrtf_SOURCES = attr.c attr.h \ malloc.c malloc.h \ output.c output.h \ @@ -8016,7 +8018,7 @@ diff -durpN unrtf-0.21.2.old/src/Makefile.am unrtf-0.21.2/src/Makefile.am util.c util.h \ diff -durpN unrtf-0.21.2.old/src/malloc.c unrtf-0.21.2/src/malloc.c --- unrtf-0.21.2.old/src/malloc.c 2010-07-09 01:13:05.000000000 -0400 -+++ unrtf-0.21.2/src/malloc.c 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/malloc.c 2011-11-09 15:48:29.998798267 -0500 @@ -135,19 +135,19 @@ total_malloced (void) { *=======================================================================*/ @@ -8056,7 +8058,7 @@ diff -durpN unrtf-0.21.2.old/src/malloc.c unrtf-0.21.2/src/malloc.c } diff -durpN unrtf-0.21.2.old/src/malloc.h unrtf-0.21.2/src/malloc.h --- unrtf-0.21.2.old/src/malloc.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/malloc.h 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/malloc.h 2011-11-09 15:48:29.998798267 -0500 @@ -32,9 +32,10 @@ * 09 Nov 08, arkadiusz.firus@gmail.com: added my_realloc *--------------------------------------------------------------------*/ @@ -8072,7 +8074,7 @@ diff -durpN unrtf-0.21.2.old/src/malloc.h unrtf-0.21.2/src/malloc.h +extern char * my_strdup (struct ConversionContext *, char*); diff -durpN unrtf-0.21.2.old/src/my_iconv.c unrtf-0.21.2/src/my_iconv.c --- unrtf-0.21.2.old/src/my_iconv.c 2010-08-16 00:12:43.000000000 -0400 -+++ unrtf-0.21.2/src/my_iconv.c 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/my_iconv.c 2011-11-09 15:48:29.998798267 -0500 @@ -12,154 +12,133 @@ #include #include @@ -8314,7 +8316,7 @@ diff -durpN unrtf-0.21.2.old/src/my_iconv.c unrtf-0.21.2/src/my_iconv.c diff -durpN unrtf-0.21.2.old/src/my_iconv.h unrtf-0.21.2/src/my_iconv.h --- unrtf-0.21.2.old/src/my_iconv.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/my_iconv.h 2011-11-09 09:55:11.573465361 -0500 ++++ unrtf-0.21.2/src/my_iconv.h 2011-11-09 15:48:29.998798267 -0500 @@ -5,6 +5,9 @@ * Purpose: my_conv definitions *--------------------------------------------------------------------*/ @@ -8344,7 +8346,7 @@ diff -durpN unrtf-0.21.2.old/src/my_iconv.h unrtf-0.21.2/src/my_iconv.h +#endif /* _MY_ICONV */ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c --- unrtf-0.21.2.old/src/output.c 2011-06-07 08:04:38.000000000 -0400 -+++ unrtf-0.21.2/src/output.c 2011-11-09 09:55:11.577465362 -0500 ++++ unrtf-0.21.2/src/output.c 2011-11-09 15:50:35.126792073 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -8393,16 +8395,17 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c *--------------------------------------------------------------------*/ -@@ -64,7 +64,7 @@ +@@ -64,7 +64,8 @@ #include "output.h" #include "main.h" #include "convert.h" - +#include "unrtf.h" ++#include "user.h" #ifndef HAVE_ATTR_H #include "attr.h" -@@ -79,16 +79,16 @@ +@@ -79,16 +80,16 @@ *=======================================================================*/ OutputPersonality* @@ -8426,7 +8429,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } /*======================================================================== -@@ -102,13 +102,15 @@ op_create () +@@ -102,13 +103,15 @@ op_create () void op_free (OutputPersonality *op) { @@ -8446,7 +8449,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c /*======================================================================== * Name: op_translate_char -@@ -119,102 +121,110 @@ op_free (OutputPersonality *op) +@@ -119,102 +122,110 @@ op_free (OutputPersonality *op) *=======================================================================*/ char * @@ -8636,7 +8639,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } #if 0 /* daved - 0.21.2 */ -@@ -227,123 +237,122 @@ op_translate_char (OutputPersonality *op +@@ -227,123 +238,122 @@ op_translate_char (OutputPersonality *op *=======================================================================*/ char * @@ -8848,7 +8851,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } #endif -@@ -357,113 +366,115 @@ op_translate_str (OutputPersonality *op, +@@ -357,113 +367,115 @@ op_translate_str (OutputPersonality *op, *=======================================================================*/ char * @@ -9047,7 +9050,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } #endif /*======================================================================== -@@ -475,123 +486,113 @@ op_translate_doublet (OutputPersonality +@@ -475,123 +487,113 @@ op_translate_doublet (OutputPersonality *=======================================================================*/ void @@ -9274,7 +9277,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } -@@ -604,123 +605,113 @@ op_begin_std_fontsize (OutputPersonality +@@ -604,123 +606,113 @@ op_begin_std_fontsize (OutputPersonality *=======================================================================*/ void @@ -9501,7 +9504,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } #if 1 /* AK3 - AF */ -@@ -734,7 +725,7 @@ op_end_std_fontsize (OutputPersonality * +@@ -734,7 +726,7 @@ op_end_std_fontsize (OutputPersonality * void add_alias(OutputPersonality *op, int nr, char *text) { @@ -9510,7 +9513,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c } /*======================================================================== -@@ -745,9 +736,8 @@ add_alias(OutputPersonality *op, int nr, +@@ -745,9 +737,8 @@ add_alias(OutputPersonality *op, int nr, *=======================================================================*/ char * @@ -9524,7 +9527,7 @@ diff -durpN unrtf-0.21.2.old/src/output.c unrtf-0.21.2/src/output.c - diff -durpN unrtf-0.21.2.old/src/output.h unrtf-0.21.2/src/output.h --- unrtf-0.21.2.old/src/output.h 2010-08-11 21:09:02.000000000 -0400 -+++ unrtf-0.21.2/src/output.h 2011-11-09 09:55:11.577465362 -0500 ++++ unrtf-0.21.2/src/output.h 2011-11-09 15:48:30.002798270 -0500 @@ -44,227 +44,228 @@ typedef Collection Aliases; @@ -9912,7 +9915,7 @@ diff -durpN unrtf-0.21.2.old/src/output.h unrtf-0.21.2/src/output.h - diff -durpN unrtf-0.21.2.old/src/parse.c unrtf-0.21.2/src/parse.c --- unrtf-0.21.2.old/src/parse.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/parse.c 2011-11-09 09:55:11.577465362 -0500 ++++ unrtf-0.21.2/src/parse.c 2011-11-09 15:48:30.002798270 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -10583,7 +10586,7 @@ diff -durpN unrtf-0.21.2.old/src/parse.c unrtf-0.21.2/src/parse.c } diff -durpN unrtf-0.21.2.old/src/parse.h unrtf-0.21.2/src/parse.h --- unrtf-0.21.2.old/src/parse.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/parse.h 2011-11-09 09:55:11.581465362 -0500 ++++ unrtf-0.21.2/src/parse.h 2011-11-09 15:48:30.002798270 -0500 @@ -38,8 +38,6 @@ #include "word.h" #endif @@ -10676,7 +10679,7 @@ diff -durpN unrtf-0.21.2.old/src/path.h unrtf-0.21.2/src/path.h -void show_dirs(); diff -durpN unrtf-0.21.2.old/src/unrtf.h unrtf-0.21.2/src/unrtf.h --- unrtf-0.21.2.old/src/unrtf.h 1969-12-31 19:00:00.000000000 -0500 -+++ unrtf-0.21.2/src/unrtf.h 2011-11-09 09:55:11.581465362 -0500 ++++ unrtf-0.21.2/src/unrtf.h 2011-11-09 15:48:30.002798270 -0500 @@ -0,0 +1,55 @@ +/*=========================================================================== + GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -10735,7 +10738,7 @@ diff -durpN unrtf-0.21.2.old/src/unrtf.h unrtf-0.21.2/src/unrtf.h +#endif /* UNRTF_H */ diff -durpN unrtf-0.21.2.old/src/user.c unrtf-0.21.2/src/user.c --- unrtf-0.21.2.old/src/user.c 2011-06-07 08:08:17.000000000 -0400 -+++ unrtf-0.21.2/src/user.c 2011-11-09 09:55:11.581465362 -0500 ++++ unrtf-0.21.2/src/user.c 2011-11-09 15:48:30.002798270 -0500 @@ -7,7 +7,7 @@ *---------------------------------------------------------------------- * Changes: @@ -11165,7 +11168,7 @@ diff -durpN unrtf-0.21.2.old/src/user.c unrtf-0.21.2/src/user.c diff -durpN unrtf-0.21.2.old/src/user.h unrtf-0.21.2/src/user.h --- unrtf-0.21.2.old/src/user.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/user.h 2011-11-09 09:55:11.585465361 -0500 ++++ unrtf-0.21.2/src/user.h 2011-11-09 15:48:30.002798270 -0500 @@ -151,9 +151,10 @@ #ifndef _USER @@ -11181,7 +11184,7 @@ diff -durpN unrtf-0.21.2.old/src/user.h unrtf-0.21.2/src/user.h #endif diff -durpN unrtf-0.21.2.old/src/word.c unrtf-0.21.2/src/word.c --- unrtf-0.21.2.old/src/word.c 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/word.c 2011-11-09 09:55:11.585465361 -0500 ++++ unrtf-0.21.2/src/word.c 2011-11-09 15:48:30.002798270 -0500 @@ -1,23 +1,23 @@ /*============================================================================= - GNU UnRTF, a command-line program to convert RTF documents to other formats. @@ -11504,7 +11507,7 @@ diff -durpN unrtf-0.21.2.old/src/word.c unrtf-0.21.2/src/word.c diff -durpN unrtf-0.21.2.old/src/word.h unrtf-0.21.2/src/word.h --- unrtf-0.21.2.old/src/word.h 2010-07-03 22:30:58.000000000 -0400 -+++ unrtf-0.21.2/src/word.h 2011-11-09 09:55:11.585465361 -0500 ++++ unrtf-0.21.2/src/word.h 2011-11-09 15:48:30.002798270 -0500 @@ -41,14 +41,15 @@ typedef struct _w { struct _w * child; } Word;