From dc2d4e68199a7edff52bbf5a4dd6340b1d1e3f10 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 19 Jan 2004 19:29:59 +0000 Subject: [PATCH] * include/extern.h: + Export P_Pow to applications. git-svn-id: svn://svn.zoy.org/elk/trunk@248 55e467fa-43c5-0310-a8a2-de718669efc6 --- AUTHORS | 5 +++-- include/extern.h | 1 + src/math.c | 2 ++ src/prim.c | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 9ae0ba2..b7950bf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,6 +29,7 @@ Dave Richards, Robert Sanders, Supreet Singh, Martin Stut, Brian Taylor, Scott Watson, and Mike Wray. Oliver apologizes for any omissions from this--necessarily incomplete--list. - Sam would like to thank James Bostock, Sven Hartrumpf, Mark Sapa and -Phillip Rulon for their useful bug reports and patches on the road to Elk 4.0. + Sam would like to thank James Bostock, Sven Hartrumpf, Mark Sapa, Phillip +Rulon and Martin Rumori for their useful bug reports and patches on the road +to Elk 4.0. diff --git a/include/extern.h b/include/extern.h index ef44a26..a17d04c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -298,6 +298,7 @@ extern Object P_Truncate P_((Object)); extern Object P_Round P_((Object)); extern Object P_Sqrt P_((Object)); extern Object P_Exp P_((Object)); +extern Object P_Pow P_((Object, Object)); extern Object P_Log P_((Object)); extern Object P_Sin P_((Object)); extern Object P_Cos P_((Object)); diff --git a/src/math.c b/src/math.c index b1a43ff..13d799a 100644 --- a/src/math.c +++ b/src/math.c @@ -1100,6 +1100,8 @@ Object P_Sqrt (Object x) { return General_Function (x, Null, sqrt); } Object P_Exp (Object x) { return General_Function (x, Null, exp); } +Object P_Pow (Object x, Object y) { return General_Function (x, y, pow); } + Object P_Log (Object x) { return General_Function (x, Null, log); } Object P_Sin (Object x) { return General_Function (x, Null, sin); } diff --git a/src/prim.c b/src/prim.c index 43f0374..a64eee3 100644 --- a/src/prim.c +++ b/src/prim.c @@ -269,6 +269,7 @@ struct Prim_Init { { P_Round, "round", 1, 1, EVAL }, { P_Sqrt, "sqrt", 1, 1, EVAL }, { P_Exp, "exp", 1, 1, EVAL }, + { P_Pow, "pow", 2, 2, EVAL }, { P_Log, "log", 1, 1, EVAL }, { P_Sin, "sin", 1, 1, EVAL }, { P_Cos, "cos", 1, 1, EVAL },