From 3c71deb63229da1bf3e75470499048bdce378966 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 10 Sep 2018 09:55:17 +0300 Subject: Minor changes * elisp/ellinika-dict-mode.el: Use deactivate-input-method instead of deprecated inactivate-input-method. * elisp/ellinika-mode.el: Likewise. * src/ellinika/Makefile.am: Fix dependencies. * src/ellinika/elmorph.c: Minor changes for switch to Guile 2.2 --- src/ellinika/Makefile.am | 3 +++ src/ellinika/elmorph.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'src/ellinika') diff --git a/src/ellinika/Makefile.am b/src/ellinika/Makefile.am index 5f476ef..99a2918 100644 --- a/src/ellinika/Makefile.am +++ b/src/ellinika/Makefile.am @@ -73,6 +73,9 @@ DOT_X_FILES = elmorph.x utf8scm.x BUILT_SOURCES = $(DOT_X_FILES) DISTCLEANFILES = $(DOT_X_FILES) +phoneme.h phoneme.c: phoneme.y +elchr.c: phoneme.h + pkglibnames=elmorph install-data-hook: diff --git a/src/ellinika/elmorph.c b/src/ellinika/elmorph.c index 5094db8..ab5dea4 100644 --- a/src/ellinika/elmorph.c +++ b/src/ellinika/elmorph.c @@ -129,7 +129,7 @@ _elstr_dup(struct elstr *elstr) elnew = scm_gc_malloc(sizeof(*elstr), "Elstr"); elnew->str = calloc(elstr->len, sizeof(elnew->str[0])); if (!elnew->str) - scm_memory_error("_elstr_dup"); + scm_report_out_of_memory(); memcpy(elnew->str, elstr->str, sizeof(elstr->str[0]) * elstr->len); elnew->len = elstr->len; @@ -138,7 +138,7 @@ _elstr_dup(struct elstr *elstr) sizeof(elnew->phoneme[0])); if (!elnew->phoneme) { free(elnew->str); - scm_memory_error("_elstr_dup"); + scm_report_out_of_memory(); } memcpy(elnew->phoneme, elstr->phoneme, sizeof(elstr->phoneme[0]) * elstr->phoneme_count); @@ -150,7 +150,7 @@ _elstr_dup(struct elstr *elstr) elnew->sylmap = calloc(elstr->nsyl, sizeof(elnew->sylmap[0])); if (!elnew->sylmap) { free(elnew->str); - scm_memory_error("_elstr_dup"); + scm_report_out_of_memory(); } memcpy(elnew->sylmap, elstr->sylmap, sizeof(elstr->sylmap[0]) * elstr->nsyl); @@ -173,7 +173,7 @@ _elstr_concat(struct elstr *dest, struct elstr *src, const char *func_name) wp = realloc(dest->str, sizeof(dest->str[0]) * (dest->len + src->len)); if (!wp) - scm_memory_error(func_name); + scm_report_out_of_memory(); dest->str = wp; memcpy(dest->str + dest->len, src->str, @@ -181,7 +181,7 @@ _elstr_concat(struct elstr *dest, struct elstr *src, const char *func_name) dest->len += src->len; } -static scm_sizet +static size_t _elstr_free(SCM smob) { struct elstr *elstr = (struct elstr *) SCM_CDR(smob); @@ -789,7 +789,7 @@ _elstr_thema_aoristoy(SCM el, int destructive, const char *func_name) } } if (elmorph_thema_aoristoy(elstr->str, elstr->len, &wc, &wclen)) - scm_memory_error(func_name); + scm_report_out_of_memory(); free(elstr->str); elstr->str = wc; elstr->len = wclen; -- cgit v1.2.1