summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2010-12-01 01:30:20 +0000
committerLászló Németh <nemeth@numbertext.org>2010-12-01 01:30:20 +0000
commit830eccebc359c9cf4f1596651eb7bd7a71ed0952 (patch)
tree9c8ef278e052db6b055e2591c2d2c519503f33fb
parentf86ce87baa84b2e576c4eb61706f71766aa4bef6 (diff)
downloadhyphen-830eccebc359c9cf4f1596651eb7bd7a71ed0952.tar.gz
NOHYPHEN fix
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--configure.in4
-rw-r--r--hyphen.c4
4 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 519d851..60534ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-01 László Németh <nemeth at OOo>:
+ * hyphen.c: NOHYPHEN fix for a special case (NOHYPHEN
+ character in starting position, eg. "-example")
+
2010-11-27 László Németh <nemeth at OOo>:
* hyphen.c: add NOHYPHEN feature
to handle special hyphenation at hyphens and apostrophes,
diff --git a/NEWS b/NEWS
index c1a6f10..81ccd1e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+2010-12-01 Hyphen 2,7,1 bug fix release
+
2010-11-27 Hyphen 2.7 release:
- The new hyphenation problem of OpenOffice.org 3.2, related to its
modified word breaking of words with hyphen characters, can be fixed
diff --git a/configure.in b/configure.in
index e66d4c2..69c2acf 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
-AC_INIT([hyphen],[2.7],[nemeth@openoffice.org])
-AM_INIT_AUTOMAKE(hyphen,2.7)
+AC_INIT([hyphen],[2.7.1],[nemeth@openoffice.org])
+AM_INIT_AUTOMAKE(hyphen,2.7.1)
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
diff --git a/hyphen.c b/hyphen.c
index 700a8e1..93685b1 100644
--- a/hyphen.c
+++ b/hyphen.c
@@ -1078,7 +1078,7 @@ int hnj_hyphen_hyphenate2 (HyphenDict *dict,
char * nhy = (char *) strstr(word, nh);
while (nhy) {
hyphens[nhy - word + strlen(nh) - 1] = 0;
- hyphens[nhy - word - 1] = 0;
+ if (nhy - word - 1 >= 0) hyphens[nhy - word - 1] = 0;
nhy = (char *) strstr(nhy + 1, nh);
}
nh = nh + strlen(nh) + 1;
@@ -1114,7 +1114,7 @@ int hnj_hyphen_hyphenate3 (HyphenDict *dict,
char * nhy = (char *) strstr(word, nh);
while (nhy) {
hyphens[nhy - word + strlen(nh) - 1] = 0;
- hyphens[nhy - word - 1] = 0;
+ if (nhy - word - 1 >= 0) hyphens[nhy - word - 1] = 0;
nhy = (char *) strstr(nhy + 1, nh);
}
nh = nh + strlen(nh) + 1;