summaryrefslogtreecommitdiff
path: root/troff/n8.c
diff options
context:
space:
mode:
Diffstat (limited to 'troff/n8.c')
-rw-r--r--troff/n8.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/troff/n8.c b/troff/n8.c
index fa8c484db773b..65e9a1b01b8ae 100644
--- a/troff/n8.c
+++ b/troff/n8.c
@@ -67,12 +67,12 @@
* hyphenation
*/
-int *hbuf;
-int NHEX;
-int *nexth;
-tchar *hyend;
+static int *hbuf;
+static int NHEX;
+static int *nexth;
+static tchar *hyend;
#define THRESH 160 /*digram goodness threshold*/
-int thresh = THRESH;
+static int thresh = THRESH;
static void hyphenhnj(void);
@@ -550,9 +550,7 @@ casehylang(void)
path = malloc(l);
snprintf(path, l, "%s/hyph_%s.dic", HYPDIR, hylang);
} else {
- l = strlen(hylang) + 1;
- path = malloc(l);
- n_strcpy(path, hylang, l);
+ path = strdup(hylang);
}
if ((dicthnj = hnj_hyphen_load(path)) == NULL) {
errprint("Can't load %s", path);