From: Mazet Laurent Date: Fri, 14 Jun 2024 14:04:40 +0000 (+0200) Subject: Revert "start translation table code" X-Git-Tag: v1.0~12 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=43dc70408a40d2ec4691344ef055cd3227ba9286;p=scrabble.git Revert "start translation table code" This reverts commit 0511fb5e4d8b1c695190402008ae33959fa08730. --- diff --git a/bag-de.h b/bag-de.h index fa0dd3f..9b05f9c 100644 --- a/bag-de.h +++ b/bag-de.h @@ -73,10 +73,6 @@ static lettervalue_t _lettervalues_de[NB_LETTERVALUES_DE] = { static char *_extra_help_de = "a, u, o for AE, UE, OE"; -#define NB_TRANSLATIONS_DE 3 - -static trans_t _trans_table_de[NB_TRANSLATIONS_DE] = { { 'a', "Ä" }, { 'u', "Ü" }, { 'o', "Ö" } }; - #endif /* __BAG_DE__ */ /* vim: set ts=4 sw=4 et: */ diff --git a/bag-es.h b/bag-es.h index 40ddbaa..974f396 100644 --- a/bag-es.h +++ b/bag-es.h @@ -71,10 +71,6 @@ static lettervalue_t _lettervalues_es[NB_LETTERVALUES_ES] = { static char *_extra_help_es = "c, l, n, r for CH, LL, NN, RR"; -#define NB_TRANSLATIONS_ES 4 - -static trans_t _trans_table_es[NB_TRANSLATIONS_ES] = { { 'c', "CH" }, { 'l', "LL" }, { 'n', "Ñ" }, { 'r', "RR" } }; - #endif /* __BAG_ES__ */ /* vim: set ts=4 sw=4 et: */ diff --git a/bag-nl.h b/bag-nl.h index 46c4f74..cd6794f 100644 --- a/bag-nl.h +++ b/bag-nl.h @@ -69,10 +69,6 @@ static lettervalue_t _lettervalues_nl[NB_LETTERVALUES_NL] = { static char *_extra_help_nl = "i for IJ"; -#define NB_TRANSLATIONS_NL 1 - -static trans_t _trans_table_nl[NB_TRANSLATIONS_NL] = { { 'i', "IJ" } }; - #endif /* __BAG_NL__ */ /* vim: set ts=4 sw=4 et: */ diff --git a/constant.c b/constant.c index 5033a37..0e0b000 100644 --- a/constant.c +++ b/constant.c @@ -36,8 +36,6 @@ board_t *getboard (char *name) static bag_t _bag = {0}; -static translation_t _translation = {0}; - bag_t *getbag (char *lang) { bag_t *pt = NULL; @@ -96,24 +94,4 @@ char *getextrahelp (char *lang) return pt; } -translation_t *gettranslationtable (char *lang) -{ - translation_t *pt = NULL; - - if (strcmp (lang, "de") == 0) { - pt = &_translation; - pt->nb = NB_TRANSLATIONS_DE; - pt->tab = _trans_table_de; - } else if (strcmp (lang, "es") == 0) { - pt = &_translation; - pt->nb = NB_TRANSLATIONS_ES; - pt->tab = _trans_table_es; - } else if (strcmp (lang, "nl") == 0) { - pt = &_translation; - pt->nb = NB_TRANSLATIONS_NL; - pt->tab = _trans_table_nl; - } - return pt; -} - /* vim: set ts=4 sw=4 et: */ diff --git a/constant.h b/constant.h index 7d4f485..1d7f0f4 100644 --- a/constant.h +++ b/constant.h @@ -9,8 +9,6 @@ bag_t *getbag (char *lang); char *getextrahelp (char *lang); -translation_t *gettranslationtable (char *lang); - #endif /* __CONSTANT_H__ */ /* vim: set ts=4 sw=4 et: */ diff --git a/type.h b/type.h index 7f08b76..6afcaa7 100644 --- a/type.h +++ b/type.h @@ -51,16 +51,6 @@ typedef struct { spelling_e *status; } word_t; -typedef struct { - char tile; - char *val; -} trans_t; - -typedef struct { - int nb; - trans_t *tab; -} translation_t; - #endif /* __TYPE_H__ */ /* vim: set ts=4 sw=4 et: */