From 8b2897406cfe9fd5892b3dee850cd7d273efa519 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Mar 2007 14:18:03 +0000 Subject: [PATCH] Schiffsbeschleunigung auf Englisch - needed a "$lt()" function --- src/common/util/translation.c | 37 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/src/common/util/translation.c b/src/common/util/translation.c index 08776ede3..f10faacc5 100644 --- a/src/common/util/translation.c +++ b/src/common/util/translation.c @@ -384,14 +384,24 @@ translate(const char* format, const void * userdata, const char* vars, variant a return rv; } +static void +eval_lt(opstack ** stack, const void * userdata) /* (int, int) -> int */ +{ + int a = opop_i(stack); + int b = opop_i(stack); + int rval = (b int */ { - int a = opop_i(stack); - int b = opop_i(stack); - int rval = (a==b)?1:0; - opush_i(stack, rval); - unused(userdata); + int a = opop_i(stack); + int b = opop_i(stack); + int rval = (a==b)?1:0; + opush_i(stack, rval); + unused(userdata); } static void @@ -465,14 +475,15 @@ eval_locale(opstack ** stack, const void * userdata) /* (string) -> locale */ void translation_init(void) { - add_function("eq", &eval_eq); - add_function("int", &eval_int); - add_function("add", &eval_add); - add_function("strlen", &eval_strlen); - add_function("if", &eval_if); - add_function("isnull", &eval_isnull); - add_function("localize", &eval_localize); - add_function("locale", &eval_locale); + add_function("lt", &eval_lt); + add_function("eq", &eval_eq); + add_function("int", &eval_int); + add_function("add", &eval_add); + add_function("strlen", &eval_strlen); + add_function("if", &eval_if); + add_function("isnull", &eval_isnull); + add_function("localize", &eval_localize); + add_function("locale", &eval_locale); } void