aboutsummaryrefslogtreecommitdiff
path: root/dw/hyphenator.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-11-06 21:06:40 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2012-11-06 21:06:40 +0100
commit38a11ee868dd7bf5a57e68c972f1b126d38dfb26 (patch)
tree10d28d4070ad6f5cc5f15a0c857bd984273579f8 /dw/hyphenator.cc
parent2e217082100a213c5d716d84dbf696826de64379 (diff)
add copright notice to hyphenation patterns in test directory
Add code to ignore lines starting with '%' when parsing pattern files as comments. noticed-by: corvid <corvid@lavabit.com>
Diffstat (limited to 'dw/hyphenator.cc')
-rw-r--r--dw/hyphenator.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dw/hyphenator.cc b/dw/hyphenator.cc
index 6774f1c8..6af77603 100644
--- a/dw/hyphenator.cc
+++ b/dw/hyphenator.cc
@@ -51,7 +51,7 @@ Hyphenator::Hyphenator (core::Platform *platform,
while (!feof (patF)) {
char buf[LEN + 1];
char *s = fgets (buf, LEN, patF);
- if (s) {
+ if (s && s[0] != '%') { // ignore lines starting with '%' as comment
// TODO Better exit with an error, when the line is too long.
int l = strlen (s);
if (s[l - 1] == '\n')
@@ -73,7 +73,7 @@ Hyphenator::Hyphenator (core::Platform *platform,
while (!feof (excF)) {
char buf[LEN + 1];
char *s = fgets (buf, LEN, excF);
- if (s) {
+ if (s && s[0] != '%') { // ignore lines starting with '%' as comment
// TODO Better exit with an error, when the line is too long.
int l = strlen (s);
if (s[l - 1] == '\n')