summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorkaa <kaa@disroot.org>2023-07-05 13:32:01 -0700
committerkaa <kaa@disroot.org>2023-07-05 13:32:01 -0700
commit8987d13d3c1a62d2d1db6ecabb29bc76f3529a44 (patch)
tree01ee36e8f13438d6cc707f9b918c9ce3af4a5ba4
parent09819bcd940492c8ccc48284880f8bc652a2845a (diff)
downloadhyp-8987d13d3c1a62d2d1db6ecabb29bc76f3529a44.tar.gz
Add spanish hyphenation patterns, and support for building an executable that finds those hyphenation patterns. HEAD master
-rw-r--r--config.h5
-rw-r--r--en.c4
-rw-r--r--es.c2
-rw-r--r--es/hyph_es.dic862
-rw-r--r--es/readme2
-rw-r--r--hyp.c2
-rw-r--r--makefile11
7 files changed, 878 insertions, 10 deletions
diff --git a/config.h b/config.h
index 8d0cd9f..69c5f26 100644
--- a/config.h
+++ b/config.h
@@ -13,8 +13,3 @@ char *taglist[] = {
 /* Words containing any of these characters
  are skipped. */
 char *skip = "&/-=~";
-
-/* Should the dictionary of hyphenation patterns be in
-a location other than the one specified here, replace this
-with the valid location. */
-char *dictfile = "/usr/local/share/hyphen/hyph_en_US.dic";
diff --git a/en.c b/en.c
new file mode 100644
index 0000000..bd8e0cf
--- /dev/null
+++ b/en.c
@@ -0,0 +1,4 @@
+/* Should the dictionary of hyphenation patterns be in
+a location other than the one specified here, replace this
+with the valid location. */
+extern char *dictfile = "/usr/local/share/hyphen/hyph_en_US.dic";
diff --git a/es.c b/es.c
new file mode 100644
index 0000000..91f99c8
--- /dev/null
+++ b/es.c
@@ -0,0 +1,2 @@
+/* This will be different for you. */
+extern char *dictfile = "/home/kaa/src/hyp/es/hyph_es.dic";
diff --git a/es/hyph_es.dic b/es/hyph_es.dic
new file mode 100644
index 0000000..861a61c
--- /dev/null
+++ b/es/hyph_es.dic
@@ -0,0 +1,862 @@
+UTF-8
+LEFTHYPHENMIN 2
+RIGHTHYPHENMIN 2
+.s2a5b2
+.s1a2
+.s1e3d2
+.s2e3l
+a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1g2
+1s2a3lá
+1s2a3le.
+1s2a3le1m
+1s2a3l2en.
+1s2a3le1s
+1s2a3lé
+1s2a3lo.
+sal2o1
+1s2a3ló.
+saló1
+s3a2n1c2
+s2an
+s3an3da
+sa2n1d2
+s3andá
+s3and2u
+1sa2n1g2
+2s3ange
+s3a1n2i
+s3a1n2u
+s5aren
+s2a1r
+s4a3re
+1s4a3rro1l
+sa1r4r
+sarr2o1
+1s4a3rró1l
+sarró1
+1s4a2r1z
+sa4s2e2a
+s2a1s
+s4a3s2e
+sa4s2e2á
+s7ast2i
+s6a2s3t4
+1sast1r
+1s2a1z
+sa3z2o3
+2s3a4zo1g2
+2s3a4zó1g2
+sa3zó1
+1sá
+2s1á2l1m
+sá1l
+sá2n
+2s1á1n2i
+2s1á2s1n
+sá1s
+2s1á2t4
+2s1b2
+4s1c2
+2s1d2
+1se.
+1s2e2a
+1s2e2á
+1s2e1c2
+s1e1d2
+se2d2u
+1s2ee
+1s2eé
+1s2e1g2
+s2e1l
+s3e2le
+1se3l2l
+1s2e3me
+se1m
+1s2empe3ñ
+se2m1p2
+1s2empé
+2s3empé1g2
+se2n
+1s2e2o1
+1s2e3q
+2s3e4qu2i
+seq2u
+1s2e1r
+1s2es.
+se1s2a2
+se1s1e
+1sé
+2s1f4
+2s1g2
+2s1h
+1s2i
+2s3j
+2s1l
+2s1m
+2s1n
+1s2o1
+2s3o4j
+1só1
+2s1p2
+2s3q
+2s3t4
+3s2u
+2s1v
+1t4
+3te.
+2te3a1l
+t2e2a
+2tea1n2o1
+te2an
+2te3a4y
+2teca1m
+t2e1c2
+tec4a
+2tecá1m
+te3cá
+2tec2o1
+3te3co.
+3tecos
+2te3c1r
+2te1d2
+2te1f4
+3tefe
+2teg2u
+t2e1g2
+2tej2u
+te3j
+2tema
+te1m
+2tem2u
+2te1n2o1
+2te3o4j
+t2e2o1
+2te1p2
+te1s1a2
+te1s1e
+2tete
+1t4e3t4
+2te1v
+2ti.
+t2i
+2ti1aé
+tia3n2o1
+ti2an
+2ti1a2u
+2tica1r4r
+ti1c2
+tic4a
+ti3c2a1r
+2ti1c2i1c2
+tic2i
+2ticle
+tic1l
+2t2icr2i
+ti3c1r
+3ti3d2o1
+ti1d2
+2tifa
+ti1f4
+2tigr4a
+ti1g2
+tig1r
+2tigu1b2
+tig2u
+2ti1h
+2t2i3i
+3timon
+ti1m
+tim2o1
+4tim2o1n2o1
+3ti1n2o1
+ti1n
+2ti1p2a1p2
+ti1p2
+tip4a
+2t2ipara1s2i
+tip2a1r
+tip4a3r4a
+tipar2a1s
+2t2ip2i
+3t2ip2ir2i
+tipi1r
+2tipú
+2tise1m
+ti1se
+2ti1sé
+2t2i1s2i
+2ti1s2o1
+2tit2o1
+1t4i1t4
+2titu1b2
+tit2u
+2tivi1r
+ti1v
+tiv2i
+2tí1g2
+2t4í1t4
+2t5m
+3trae.
+t1r
+tr4a
+tr2ae
+3trae1d2
+3traé
+3trai1g2
+tr2a2i
+3tr2aí
+3tra1l
+3trap2e2a
+tra1p2
+3t1r2a1r
+4t1ra1r4r
+3t4ra3t4
+3tra3y
+3trá
+3tr2i
+3tr2o1
+2tú
+2u
+u2ba1l
+u1b2
+ue1n4a
+uena3v
+ue1s2a2
+ui3n2o1
+u2i
+ui1n
+u1s2a2
+usa3t4
+u1se
+2u3u
+ú2l
+ú1n
+1v
+3v2a1r
+ve1s
+vé3a
+vo3h
+v2o1
+1x
+3xa
+3x2u
+3y
+ye1s
+2y2u
+1z
+z4a5re
+z2a1r
+2z1c2
+2z1g2
+2z1m
+2z1n
+3z2o1
+4zo1g2
+z2o4o2
+3zó1
+4zó1g2
+2z1t4
diff --git a/es/readme b/es/readme
new file mode 100644
index 0000000..37154d1
--- /dev/null
+++ b/es/readme
@@ -0,0 +1,2 @@
+Stolen from https://github.com/sbosio/rla-es/releases/tag/v2.7.
+Despite the strange spelling, the '.oxt' file is really just a zip archive.
diff --git a/hyp.c b/hyp.c
index 697fed5..3285b54 100644
--- a/hyp.c
+++ b/hyp.c
@@ -4,6 +4,8 @@
 #include <hyphen.h>
 #include "config.h"
 
+extern char *dictfile;
+
 /* Read a tag into a character array and return its length. */
 int
 readtag(char *tag, FILE *in, FILE *out)
diff --git a/makefile b/makefile
index f58cf19..84b0f21 100644
--- a/makefile
+++ b/makefile
@@ -4,16 +4,17 @@ CFLAGS = -Wall -I/usr/local/include
 CFLAGS += -std=c89
 LDFLAGS = -L/usr/local/lib -lhyphen
 LDFLAGS += -static
-out = hyp
 bindir = /home/kaa/bin
 
-all: $(out)
+all: hyp
 
-.c:
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+hyp:
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ en.c hyp.c
+hyp-es:
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ es.c hyp.c
 
 clean:
-	rm -f $(out)
+	rm -f hyp hyp-es
 
 install: all
 	cp hyp $(bindir)/hyp