Hello community,
here is the log from the commit of package yast2-core
checked in at Sun Apr 6 17:24:05 CEST 2008.
--------
--- yast2-core/yast2-core.changes 2008-04-06 11:14:28.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-core/yast2-core.changes 2008-04-06 14:17:25.779461000 +0200
@@ -1,0 +2,6 @@
+Sun Apr 06 13:34:20 CEST 2008 - aschnell@suse.de
+
+- added float builtins trunc and pow
+- 2.16.44
+
+-------------------------------------------------------------------
Old:
----
yast2-core-2.16.43.tar.bz2
New:
----
yast2-core-2.16.44.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-core.spec ++++++
--- /var/tmp/diff_new_pack.T11965/_old 2008-04-06 17:23:53.000000000 +0200
+++ /var/tmp/diff_new_pack.T11965/_new 2008-04-06 17:23:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-core (Version 2.16.43)
+# spec file for package yast2-core (Version 2.16.44)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,12 +12,12 @@
Name: yast2-core
-Version: 2.16.43
+Version: 2.16.44
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-core-2.16.43.tar.bz2
+Source0: yast2-core-2.16.44.tar.bz2
Prefix: /usr
# obviously
BuildRequires: gcc-c++
@@ -84,7 +84,7 @@
Stanislav Visnovsky
%prep
-%setup -n yast2-core-2.16.43
+%setup -n yast2-core-2.16.44
%build
%{prefix}/bin/y2tool y2autoconf
@@ -161,6 +161,9 @@
%doc %{prefix}/share/doc/packages/yast2-core
/usr/share/YaST2/data/devtools/bin/generateYCPWrappers
%changelog
+* Sun Apr 06 2008 aschnell@suse.de
+- added float builtins trunc and pow
+- 2.16.44
* Sun Apr 06 2008 coolo@suse.de
- compile with xcrypt 3
- 2.16.43
++++++ yast2-core-2.16.43.tar.bz2 -> yast2-core-2.16.44.tar.bz2 ++++++
++++ 10798 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/agents-perl/doc/ycp-pm-pod.html new/yast2-core-2.16.44/agents-perl/doc/ycp-pm-pod.html
--- old/yast2-core-2.16.43/agents-perl/doc/ycp-pm-pod.html 2008-04-06 11:14:18.000000000 +0200
+++ new/yast2-core-2.16.44/agents-perl/doc/ycp-pm-pod.html 2007-11-16 13:03:56.000000000 +0100
@@ -9,10 +9,8 @@
<body style="background-color: white">
-
-<!-- INDEX BEGIN -->
-<div name="index">
<p><a name="__index__"></a></p>
+<!-- INDEX BEGIN -->
<ul>
@@ -76,11 +74,9 @@
</ul>
</ul>
-
-<hr name="index" />
-</div>
<!-- INDEX END -->
+<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
@@ -104,31 +100,31 @@
<p>A PerlYCPValue cannot represent a term but only a term is allowed
to initialize an agent in a .scr file. Therefore <a href="#parseterm">ParseTerm</a> is provided.</p>
<dl>
-<dt><strong><a name="string_integer_boolean" class="item">string, integer, boolean</a></strong>
+<dt><strong><a name="item_string_2c_integer_2c_boolean">string, integer, boolean</a></strong>
<dd>
<p>Stored as a scalar.</p>
</dd>
</li>
-<dt><strong><a name="list" class="item">list</a></strong>
+<dt><strong><a name="item_list">list</a></strong>
<dd>
<p>Stored as a reference to a list of PerlYCPValues.</p>
</dd>
</li>
-<dt><strong><a name="map" class="item">map</a></strong>
+<dt><strong><a name="item_map">map</a></strong>
<dd>
<p>Stored as a reference to a map of PerlYCPValues.</p>
</dd>
</li>
-<dt><strong><a name="path" class="item">path</a></strong>
+<dt><strong><a name="item_path">path</a></strong>
<dd>
-<p>Stored as a reference to a string (starting with a "." as expected).</p>
+<p>Stored as a reference to a string (starting with a ``.'' as expected).</p>
</dd>
</li>
-<dt><strong><a name="nil" class="item">nil (void)</a></strong>
+<dt><strong><a name="item_nil">nil (void)</a></strong>
<dd>
<p>Stored as an undef.</p>
@@ -145,7 +141,7 @@
<p>ParseComand $line</p>
<p><code>($command, $path, $arg) = ParseCommand ('Write (.moria.gate, "mellon")');</code></p>
<p>Parse a SCR command of the form Command (.some.path, optional_argument)</p>
-<p>Returns a three element list ("Command", ".some.path", $argument)
+<p>Returns a three element list (``Command'', ``.some.path'', $argument)
where the argument is a <a href="#perlycpvalue">PerlYCPValue</a> and will be undef
if it was not specified.
Note that the path is converted to a string.</p>
@@ -186,12 +182,12 @@
<p><code>Return (["arbitrarily", "complex", "data"]);</code></p>
<p>Sends a <a href="#perlycpvalue">PerlYCPValue</a> to the partner YCP component.</p>
<p>If there's just one argment, scalars are interpreted this way:
-"true" or "false" are sent as
+``true'' or ``false'' are sent as
booleans, integers or strings of digits are sent as integers, otherwise as
strings.
If a second argument exists and is true, all scalars are written as strings.
If a second argument exists and is false, all scalars are written as byteblocks.</p>
-<p>To send a list, call <code>Return(\@list)</code>, not <code>Return(@list)</code>.
+<p>To send a list, call Return(\@list), not Return(@list).
Similarly for a map. You can use references to anonymous lists [] and hashes {}.</p>
<p>The difference from <a href="#ycpreturn">ycpReturn</a> is that Return can return scalars directly,
strings are properly escaped if needeed and paths can be returned.</p>
@@ -204,9 +200,9 @@
and logging just works. In such case, you should not need to use ycp.pm at all.
Instead, <code>use YaST::YCP (":LOGGING")</code>.</p>
<p>The log output can now be redirected, which will be useful for test suites.
-If the first command-line option is "-l", the second argument is taken as
-the log file. A hyphen "-" designates standard output.</p>
-<p>Otherwise, <em class="file">/var/log/YaST2/y2log</em> and <em class="file">$HOME/.y2log</em> are tried, in that order.</p>
+If the first command-line option is ``-l'', the second argument is taken as
+the log file. A hyphen ``-'' designates standard output.</p>
+<p>Otherwise, <em>/var/log/YaST2/y2log</em> and <em>$HOME/.y2log</em> are tried, in that order.</p>
<p>
</p>
<h2><a name="y2debug">y2debug</a></h2>
@@ -216,7 +212,7 @@
y2error,
y2security,
y2internal</p>
-<p>Logs debug messages to <em class="file">/var/log/YaST2/y2log</em> or <em class="file">$HOME/.y2log</em></p>
+<p>Logs debug messages to <em>/var/log/YaST2/y2log</em> or <em>$HOME/.y2log</em></p>
<p>Note a <strong>semantic change</strong> in y2debug: now the environment variable
Y2DEBUG is honored so y2debug will not produce output unless this
variable is set. This is for compatibility with the logging system in libycp.</p>
@@ -231,11 +227,11 @@
<p>
</p>
<h2><a name="ycpargismap">ycpArgIsMap</a></h2>
-<p>Obsolete. Use (ref($arg) eq "HASH") instead.</p>
+<p>Obsolete. Use (ref($arg) eq ``HASH'') instead.</p>
<p>
</p>
<h2><a name="ycpargislist">ycpArgIsList</a></h2>
-<p>Obsolete. Use (ref($arg) eq "ARRAY") instead.</p>
+<p>Obsolete. Use (ref($arg) eq ``ARRAY'') instead.</p>
<p>
</p>
<h2><a name="ycpargisinteger">ycpArgIsInteger</a></h2>
@@ -251,7 +247,7 @@
<p>
</p>
<h2><a name="ycpargisnil">ycpArgIsNil</a></h2>
-<p>Obsolete. Use (ref($arg) eq "SCALAR" && $$arg eq "nil") instead.</p>
+<p>Obsolete. Use (ref($arg) eq ``SCALAR'' && $$arg eq ``nil'') instead.</p>
<p>
</p>
<h2><a name="ycpargisnone">ycpArgIsNone</a></h2>
@@ -259,23 +255,23 @@
<p>
</p>
<h2><a name="ycpcommandisdir">ycpCommandIsDir</a></h2>
-<p>Obsolete. Use ($command eq "Dir")</p>
+<p>Obsolete. Use ($command eq ``Dir'')</p>
<p>
</p>
<h2><a name="ycpcommandisread">ycpCommandIsRead</a></h2>
-<p>Obsolete. Use ($command eq "Read")</p>
+<p>Obsolete. Use ($command eq ``Read'')</p>
<p>
</p>
<h2><a name="ycpcommandiswrite">ycpCommandIsWrite</a></h2>
-<p>Obsolete. Use ($command eq "Write")</p>
+<p>Obsolete. Use ($command eq ``Write'')</p>
<p>
</p>
<h2><a name="ycpcommandisexecute">ycpCommandIsExecute</a></h2>
-<p>Obsolete. Use ($command eq "Execute")</p>
+<p>Obsolete. Use ($command eq ``Execute'')</p>
<p>
</p>
<h2><a name="ycpcommandisresult">ycpCommandIsResult</a></h2>
-<p>Obsolete. Use ($command eq "result"), note the lowercase 'r'.</p>
+<p>Obsolete. Use ($command eq ``result''), note the lowercase 'r'.</p>
<p>
</p>
<h2><a name="ycpgetcommand">ycpGetCommand</a></h2>
@@ -313,7 +309,7 @@
<p>
</p>
<h2><a name="ycpreturnskalarasboolean">ycpReturnSkalarAsBoolean</a></h2>
-<p>Obsolete. Use <a href="#return">Return</a>("true" or "false")</p>
+<p>Obsolete. Use <a href="#return">Return</a>(``true'' or ``false'')</p>
<p>
</p>
<h2><a name="ycpreturnskalarasstring">ycpReturnSkalarAsString</a></h2>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/configure.in new/yast2-core-2.16.44/configure.in
--- old/yast2-core-2.16.43/configure.in 2008-04-06 11:13:18.000000000 +0200
+++ new/yast2-core-2.16.44/configure.in 2008-04-06 13:49:51.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.in for yast2-core
dnl
-dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 2.16.8 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-core, 2.16.43, http://bugs.opensuse.org/, yast2-core)
+AC_INIT(yast2-core, 2.16.44, http://bugs.opensuse.org/, yast2-core)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.16.43"
+VERSION="2.16.44"
RPMNAME="yast2-core"
MAINTAINER="Martin Vidner "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/libycp/src/YCPBuiltinFloat.cc new/yast2-core-2.16.44/libycp/src/YCPBuiltinFloat.cc
--- old/yast2-core-2.16.43/libycp/src/YCPBuiltinFloat.cc 2007-11-13 16:00:34.000000000 +0100
+++ new/yast2-core-2.16.44/libycp/src/YCPBuiltinFloat.cc 2008-04-06 13:19:48.000000000 +0200
@@ -20,6 +20,7 @@
/-*/
#include
+#include
#include
#include "ycp/YCPBuiltinFloat.h"
@@ -44,7 +45,7 @@
* 1.5 + 2.5 -> 4.0
* </pre>
*/
-
+
if (f1.isNull () || f2.isNull ())
return YCPNull ();
@@ -131,10 +132,52 @@
static YCPValue
+f_trunc(const YCPFloat &f)
+{
+ /**
+ * @builtins trunc
+ * @short round to integer, towards zero
+ * @description
+ * Returns f round to the nearest integer, towards zero.
+ * @param f FLOAT
+ * @return FLOAT
+ * @usage trunc (+1.6) -> +1.0
+ * @usage trunc (-1.6) -> -1.0
+ */
+
+ if (f.isNull ())
+ return YCPNull ();
+
+ return YCPFloat(trunc(f->value()));
+}
+
+
+static YCPValue
+f_pow(const YCPFloat &f1, const YCPFloat &f2)
+{
+ /**
+ * @builtins pow
+ * @short power function
+ * @description
+ * Returns the value of f1 raised to the power of f2.
+ * @param f1 FLOAT
+ * @param f2 FLOAT
+ * @return FLOAT
+ * @usage pow (10.0, 3.0) -> 1000.0
+ */
+
+ if (f1.isNull () || f2.isNull ())
+ return YCPNull ();
+
+ return YCPFloat(pow(f1->value(), f2->value()));
+}
+
+
+static YCPValue
f_tostring (const YCPFloat &f, const YCPInteger &precision)
{
/**
- * @builtin tostring
+ * @builtin tostring
* @short Converts a floating point number to a string
* @description
* Converts a floating point number to a string, using the
@@ -206,6 +249,8 @@
{ "-", "float (float)", (void *)f_neg },
{ "*", "float (float, float)", (void *)f_mult },
{ "/", "float (float, float)", (void *)f_div },
+ { "trunc", "float (float)", (void *)f_trunc },
+ { "pow", "float (float, float)", (void *)f_pow },
{ "tofloat", "float (const any)", (void *)f_tofloat },
{ "tostring","string (float, integer)", (void *)f_tostring },
{ 0 }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.err new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.err
--- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.err 2004-01-16 15:40:14.000000000 +0100
+++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.err 2008-04-06 13:31:31.000000000 +0200
@@ -99,3 +99,63 @@
----------------------------------------------------------------------
tofloat ("3.14")
----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+"** trunc **"
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (1.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (1.4)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (1.6)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (2.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (-1.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (-1.4)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (-1.6)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+trunc (-2.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+"** pow ** "
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+pow (10., 2.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+pow (10., 1.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+pow (10., 0.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+pow (10., -1.)
+----------------------------------------------------------------------
+Parsed:
+----------------------------------------------------------------------
+pow (10., -2.)
+----------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.out new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.out
--- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.out 2004-01-16 15:40:14.000000000 +0100
+++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.out 2008-04-06 13:31:24.000000000 +0200
@@ -23,3 +23,18 @@
(4.)
(42.)
(3.14)
+("** trunc **")
+(1.)
+(1.)
+(1.)
+(2.)
+(-1.)
+(-1.)
+(-1.)
+(-2.)
+("** pow ** ")
+(100.)
+(10.)
+(1.)
+(0.1)
+(0.01)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.ycp new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.ycp
--- old/yast2-core-2.16.43/libycp/testsuite/tests/builtin/Builtin-Float.ycp 2004-01-16 15:40:14.000000000 +0100
+++ new/yast2-core-2.16.44/libycp/testsuite/tests/builtin/Builtin-Float.ycp 2008-04-06 13:24:03.000000000 +0200
@@ -3,7 +3,7 @@
#
# Filename: Builtin-Integer.ycp
#
-# Purpose: test cases for all integer builtins
+# Purpose: test cases for all float builtins
#
# ---------------------------------------------------------
@@ -51,3 +51,25 @@
(tofloat ("42"))
(tofloat ("3.14"))
+
+("** trunc **")
+
+(trunc (1.0))
+(trunc (1.4))
+(trunc (1.6))
+(trunc (2.0))
+
+(trunc (-1.0))
+(trunc (-1.4))
+(trunc (-1.6))
+(trunc (-2.0))
+
+
+("** pow ** ")
+
+(pow (10.0, 2.0))
+(pow (10.0, 1.0))
+(pow (10.0, 0.0))
+(pow (10.0, -1.0))
+(pow (10.0, -2.0))
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/VERSION new/yast2-core-2.16.44/VERSION
--- old/yast2-core-2.16.43/VERSION 2008-04-06 11:12:29.000000000 +0200
+++ new/yast2-core-2.16.44/VERSION 2008-04-06 13:34:14.000000000 +0200
@@ -1 +1 @@
-2.16.43
+2.16.44
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-core-2.16.43/ylwrap new/yast2-core-2.16.44/ylwrap
--- old/yast2-core-2.16.43/ylwrap 2008-04-06 11:13:43.000000000 +0200
+++ new/yast2-core-2.16.44/ylwrap 2008-04-06 13:50:15.000000000 +0200
@@ -1,10 +1,10 @@
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2007-11-22.22
+scriptversion=2005-05-14.22
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
#
# Written by Tom Tromey .
#
@@ -101,14 +101,14 @@
# FIXME: add hostname here for parallel makes that run commands on
# other machines. But that might take us over the 14-char limit.
dirname=ylwrap$$
-trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
+trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15
mkdir $dirname || exit 1
cd $dirname
case $# in
- 0) "$prog" "$input" ;;
- *) "$prog" "$@" "$input" ;;
+ 0) $prog "$input" ;;
+ *) $prog "$@" "$input" ;;
esac
ret=$?
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org