42 for (
int i = 0; i < numBreaks + 1; i++) {
43 int start = (i == 0 ? 0 : breakPos[i - 1]);
44 int end = (i == numBreaks ? strlen (word) : breakPos[i]);
47 for (
int j = start; j < end; j++)
51 if (strcmp(parts, buf) != 0) {
52 fprintf(stderr,
"mismatch input=%s output=%s expected=%s\n",
65 if (access(
path, F_OK) != 0) {
66 fprintf(stderr,
"cannot access %s file: %s",
path,
78 hyph(&h,
"supercalifragilisticexpialidocious",
"su-per-cal-ifrag-ilis-tic-ex-pi-ali-do-cious");
79 hyph(&h,
"incredible",
"in-cred-i-ble");
80 hyph(&h,
"hyphenation",
"hy-phen-ation");
81 hyph(&h,
"...",
"...");
88 hyph(&h,
"...",
"...");
89 hyph(&h,
"weiß",
"weiß");
90 hyph(&h,
"Ackermann",
"Acker-mann");
91 hyph(&h,
"Grundstücksverkehrsgenehmigungszuständigkeits",
92 "Grund-stücks-ver-kehrs-ge-neh-mi-gungs-zu-stän-dig-keits");
93 hyph(&h,
"Donaudampfschifffahrtskapitänsmützenknopf",
94 "Do-nau-dampf-schiff-fahrts-ka-pi-täns-müt-zen-knopf");
95 hyph(&h,
"www.dillo.org",
"www.dil-lo.org");
int * hyphenateWord(core::Platform *platform, const char *word, int *numBreaks)
Given a word, returns a list of the possible hyphenation points.
dw::fltk::FltkPlatform * platform
dw::Hyphenator get_hyphenator(const char *path)
void hyph(dw::Hyphenator *h, const char *word, const char *parts)