1 diff -u misc/hyphen-2.4/csutil.c misc/build/hyphen-2.4/csutil.c
2 --- misc/hyphen-2.4/csutil.c 2003-06-01 02:04:00.000000000 +0200
3 +++ misc/build/hyphen-2.4/csutil.c 2008-06-04 10:03:40.000000000 +0200
8 -struct enc_entry encds[] = {
9 +static struct enc_entry encds[] = {
10 {"ISO8859-1",iso1_tbl},
11 {"ISO8859-2",iso2_tbl},
12 {"ISO8859-3",iso3_tbl},
13 Common subdirectories: misc/hyphen-2.4/doc and misc/build/hyphen-2.4/doc
14 diff -u misc/hyphen-2.4/hyphen.c misc/build/hyphen-2.4/hyphen.c
15 --- misc/hyphen-2.4/hyphen.c 2008-05-01 02:18:15.000000000 +0200
16 +++ misc/build/hyphen-2.4/hyphen.c 2008-06-04 10:06:57.000000000 +0200
19 hnj_strchomp(repl + 1);
21 - replcut = strlen(buf);
22 + replcut = (signed char) strlen(buf);
24 repl = hnj_strdup(repl + 1);
27 if ((((unsigned char) word[pc]) >> 6) != 2) pu++;
28 if ((ps < 0) && (replindex == pu)) {
31 + replindex = (signed char) pc;
33 if ((ps >= 0) && ((pu - ps) == replcut)) {
34 - replcut = (pc - replindex);
35 + replcut = (signed char) (pc - replindex);
40 dict[k]->states[state_num].repl = repl;
41 dict[k]->states[state_num].replindex = replindex;
43 - dict[k]->states[state_num].replcut = strlen(word);
44 + dict[k]->states[state_num].replcut = (signed char) strlen(word);
46 dict[k]->states[state_num].replcut = replcut;
52 - for (i = 0; i < j; i++)
53 + for (i = 0; i < word_size + 5; i++)
58 int hnj_hyphen_norm(const char *word, int word_size, char * hyphens,
59 char *** rep, int ** pos, int ** cut)
62 if ((((unsigned char) word[0]) >> 6) == 2) {
63 fprintf(stderr, "error - bad, non UTF-8 input: %s\n", word);
67 /* calculate UTF-8 character positions */
69 for (i = 0, j = -1; i < word_size; i++) {
70 /* beginning of an UTF-8 character (not '10' start bits) */
71 if ((((unsigned char) word[i]) >> 6) != 2) j++;
72 diff -u misc/hyphen-2.4/Makefile.am misc/build/hyphen-2.4/Makefile.am
73 --- misc/hyphen-2.4/Makefile.am 2008-04-30 12:33:44.000000000 +0200
74 +++ misc/build/hyphen-2.4/Makefile.am 2008-06-04 11:33:23.000000000 +0200
78 cp -f $(srcdir)/hyphen.tex hyphen.us
79 - patch < $(srcdir)/hyphen.patch
80 + $(GNUPATCH) < $(srcdir)/hyphen.patch
81 $(srcdir)/tbhyphext.sh <$(srcdir)/tbhyphext.tex >hyphen.us2
82 cat hyphen.us hyphen.us2 >hyphen.us3
84 -hyph_en_US.dic: hyphen.us3
85 - perl $(srcdir)/substrings.pl hyphen.us3 hyph_en_US.dic ISO8859-1 2 3 >/dev/null
87 + @echo "hyph_en_US.txt distributed with Hyphen library"
90 rm -rf hyphen.us* hyph_en_US.dic
91 diff -u misc/hyphen-2.4/Makefile.in misc/build/hyphen-2.4/Makefile.in
92 --- misc/hyphen-2.4/Makefile.in 2008-04-30 14:29:57.000000000 +0200
93 +++ misc/build/hyphen-2.4/Makefile.in 2008-06-04 11:33:44.000000000 +0200
97 cp -f $(srcdir)/hyphen.tex hyphen.us
98 - patch < $(srcdir)/hyphen.patch
99 + $(GNUPATCH) < $(srcdir)/hyphen.patch
100 $(srcdir)/tbhyphext.sh <$(srcdir)/tbhyphext.tex >hyphen.us2
101 cat hyphen.us hyphen.us2 >hyphen.us3
103 -hyph_en_US.dic: hyphen.us3
104 - perl $(srcdir)/substrings.pl hyphen.us3 hyph_en_US.dic ISO8859-1 2 3 >/dev/null
106 + @echo "hyph_en_US.txt distributed with Hyphen library"
109 rm -rf hyphen.us* hyph_en_US.dic
110 diff -u misc/hyphen-2.4/makefile.mk misc/build/hyphen-2.4/makefile.mk
111 --- misc/hyphen-2.4/makefile.mk 2008-06-04 10:43:21.000000000 +0200
112 +++ misc/build/hyphen-2.4/makefile.mk 2008-06-04 12:40:46.000000000 +0200
115 +#*************************************************************************
117 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
119 +# Copyright 2008 by Sun Microsystems, Inc.
121 +# OpenOffice.org - a multi-platform office productivity suite
123 +# $RCSfile: hyphen-2.4.patch,v $
125 +# $Revision: 1.1.4.2 $
127 +# This file is part of OpenOffice.org.
129 +# OpenOffice.org is free software: you can redistribute it and/or modify
130 +# it under the terms of the GNU Lesser General Public License version 3
131 +# only, as published by the Free Software Foundation.
133 +# OpenOffice.org is distributed in the hope that it will be useful,
134 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
135 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
136 +# GNU Lesser General Public License version 3 for more details
137 +# (a copy is included in the LICENSE file that accompanied this code).
139 +# You should have received a copy of the GNU Lesser General Public License
140 +# version 3 along with OpenOffice.org. If not, see
141 +# <http://www.openoffice.org/license.html>
142 +# for a copy of the LGPLv3 License.
144 +#*************************************************************************
146 +PRJ = ..$/..$/..$/..
153 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
155 +.INCLUDE : settings.mk
157 +# --- Files --------------------------------------------------------
159 +# !! not to be compiled because those belong to a stand alone programs: !!
160 +# $(SLO)$/createfp.obj\
161 +# $(SLO)$/testtextcat.obj
164 + $(SLO)$/hyphen.obj\
165 + $(SLO)$/hnjalloc.obj
167 +# --- Targets ------------------------------------------------------
171 +.INCLUDE : target.mk
172 Common subdirectories: misc/hyphen-2.4/tests and misc/build/hyphen-2.4/tests