Hello community, here is the log from the commit of package kturtle for openSUSE:Factory checked in at 2012-01-30 12:26:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kturtle (Old) and /work/SRC/openSUSE:Factory/.kturtle.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "kturtle", Maintainer is "adrian@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/kturtle/kturtle.changes 2011-12-08 11:29:37.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kturtle.new/kturtle.changes 2012-01-30 12:26:26.000000000 +0100 @@ -1,0 +2,16 @@ +Wed Jan 18 20:59:26 CET 2012 - dmueller@suse.de + +- update to 4.8.0 + * first stable release of KDE 4.8 (only critical fixes over 4.7.98) + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- +Tue Jan 10 16:33:49 CET 2012 - dmueller@suse.de + +- update to 4.7.98 + * RC2+ milestone release of KDE 4.8 + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- Old: ---- kturtle-4.7.4.tar.bz2 New: ---- kturtle-4.8.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kturtle.spec ++++++ --- /var/tmp/diff_new_pack.fn3zQu/_old 2012-01-30 12:26:27.000000000 +0100 +++ /var/tmp/diff_new_pack.fn3zQu/_new 2012-01-30 12:26:27.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package kturtle # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -50,7 +50,7 @@ License: GPL-2.0+ Group: Amusements/Teaching/Mathematics Url: http://edu.kde.org -Version: 4.7.4 +Version: 4.8.0 Release: 0 Source0: %{name}-%version.tar.bz2 Patch0: 4_6_BRANCH.diff ++++++ kturtle-4.7.4.tar.bz2 -> kturtle-4.8.0.tar.bz2 ++++++ Files old/kturtle-4.7.4/doc/index.cache.bz2 and new/kturtle-4.8.0/doc/index.cache.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/doc/index.docbook new/kturtle-4.8.0/doc/index.docbook --- old/kturtle-4.7.4/doc/index.docbook 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/doc/index.docbook 2011-11-17 21:57:12.000000000 +0100 @@ -62,8 +62,8 @@ <legalnotice>&FDLNotice;</legalnotice> -<date>2009-05-26</date> -<releaseinfo>0.8.1 beta (&kde; 4.3)</releaseinfo> +<date>2011-11-15</date> +<releaseinfo>0.8.1 beta (&kde; 4.8)</releaseinfo> <abstract> <para>&kturtle; is an educational programming environment that aims to make learning how to program as easy as possible. To achieve this &kturtle; makes all programming tools available from the user interface. The programming language used is &turtlescript; which allows its commands to be translated.</para> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/doc/programming-reference.docbook new/kturtle-4.8.0/doc/programming-reference.docbook --- old/kturtle-4.7.4/doc/programming-reference.docbook 2011-12-02 00:26:02.000000000 +0100 +++ new/kturtle-4.8.0/doc/programming-reference.docbook 2011-11-17 21:57:12.000000000 +0100 @@ -34,6 +34,7 @@ forward 100 </screen> The first line is a <link linkend="comment">comment</link>. The second line contains the <userinput>forward</userinput> command and the <link linkend="number">number</link> <userinput>100</userinput>. The number is not part of command, it is considered 'input' for the command.</para> +<para>Some commands like ⪚ <userinput>go</userinput> need more than one input value. Multiple values have to be separated using the <userinput>,</userinput> character (comma).</para> <para> For a detailed overview of all commands that &kturtle; supports go <link linkend="commands">here</link>. Built-in commands are <glossterm>highlighted</glossterm> in dark blue</para> </sect2> @@ -41,6 +42,7 @@ <title>Numbers</title> <para>Most likely you already know quite a bit about numbers. The way numbers are used in &kturtle; is not much different from spoken language, or math. </para> <para>We have the so called natural numbers: <userinput>0</userinput>, <userinput>1</userinput>, <userinput>2</userinput>, <userinput>3</userinput>, <userinput>4</userinput>, <userinput>5</userinput>, etc. The negative numbers: <userinput>-1</userinput>, <userinput>-2</userinput>, <userinput>-3</userinput>, etc. And the numbers with decimals, or dot-numbers, for example: <userinput>0.1</userinput>, <userinput>3.14</userinput>, <userinput>33.3333</userinput>, <userinput>-5.05</userinput>, <userinput>-1.0</userinput>. +The <userinput>.</userinput> character (dot) is used as decimal separator. </para> <para>Numbers can be used in <link linkend="mathematical-operators">mathematical operators</link> and <link linkend="comparing-operators">comparison operators</link>. They can also be stored in <link linkend="assignment-of-variables">variables</link>. Numbers are <glossterm>highlighted</glossterm> in dark red.</para> </sect2> @@ -264,6 +266,14 @@ </varlistentry> </variablelist> <variablelist> + <anchor id="getdirection" /> + <varlistentry> + <term>getdirection<indexterm><primary>getdirection</primary></indexterm></term> + <listitem><para><screen>getdirection</screen> + <userinput>getdirection</userinput> returns the turtle's direction as an amount of degrees counting from zero, where zero is the direction when the turtle is pointing upwards.</para></listitem> + </varlistentry> + </variablelist> + <variablelist> <anchor id="center" /> <varlistentry> <term>center<indexterm><primary>center</primary></indexterm></term> @@ -276,7 +286,7 @@ <varlistentry> <term>go<indexterm><primary>go</primary></indexterm></term> <listitem><para><screen>go X,Y</screen> - <userinput>go</userinput> commands the turtle to go to a certain place on the canvas. This place is X <glossterm linkend="pixels">pixels</glossterm> from the left of the canvas, and Y <glossterm linkend="pixels">pixels</glossterm> form the top of the canvas. </para></listitem> + <userinput>go</userinput> commands the turtle to go to a certain place on the canvas. This place is X <glossterm linkend="pixels">pixels</glossterm> from the left of the canvas, and Y <glossterm linkend="pixels">pixels</glossterm> from the top of the canvas.</para></listitem> </varlistentry> </variablelist> <variablelist> @@ -484,6 +494,14 @@ </varlistentry> </variablelist> <variablelist> + <anchor id="mod" /> + <varlistentry> + <term>mod<indexterm><primary>mod</primary></indexterm></term> + <listitem><para><screen>mod X,Y</screen> + The <userinput>mod</userinput> returns remainder of the division of first number by the second number.</para></listitem> + </varlistentry> + </variablelist> + <variablelist> <anchor id="sqrt" /> <varlistentry> <term>sqrt<indexterm><primary>sqrt</primary></indexterm></term> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/assert_spec.rb new/kturtle-4.8.0/spec/assert_spec.rb --- old/kturtle-4.7.4/spec/assert_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/assert_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/boolean_operator_spec.rb new/kturtle-4.8.0/spec/boolean_operator_spec.rb --- old/kturtle-4.7.4/spec/boolean_operator_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/boolean_operator_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/empty_spec.rb new/kturtle-4.8.0/spec/empty_spec.rb --- old/kturtle-4.7.4/spec/empty_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/empty_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/expression_spec.rb new/kturtle-4.8.0/spec/expression_spec.rb --- old/kturtle-4.7.4/spec/expression_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/expression_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/for_spec.rb new/kturtle-4.8.0/spec/for_spec.rb --- old/kturtle-4.7.4/spec/for_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/for_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/if_else_spec.rb new/kturtle-4.8.0/spec/if_else_spec.rb --- old/kturtle-4.7.4/spec/if_else_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/if_else_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/kill_kturtle.rb new/kturtle-4.8.0/spec/kill_kturtle.rb --- old/kturtle-4.7.4/spec/kill_kturtle.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/kill_kturtle.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,4 +1,21 @@ #!/usr/bin/env ruby +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + puts "Killing interpreter process." pid = IO.readlines("pid")[0].to_i diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/learn_spec.rb new/kturtle-4.8.0/spec/learn_spec.rb --- old/kturtle-4.7.4/spec/learn_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/learn_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/math_spec.rb new/kturtle-4.8.0/spec/math_spec.rb --- old/kturtle-4.7.4/spec/math_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/math_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/number_spec.rb new/kturtle-4.8.0/spec/number_spec.rb --- old/kturtle-4.7.4/spec/number_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/number_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/repeat_spec.rb new/kturtle-4.8.0/spec/repeat_spec.rb --- old/kturtle-4.7.4/spec/repeat_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/repeat_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/scope_spec.rb new/kturtle-4.8.0/spec/scope_spec.rb --- old/kturtle-4.7.4/spec/scope_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/scope_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,20 @@ +# Copyright (C) 2009 by Cies Breijs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/spec_helper.rb new/kturtle-4.8.0/spec/spec_helper.rb --- old/kturtle-4.7.4/spec/spec_helper.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/spec_helper.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require 'rubygems' require 'singleton' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/start_kturtle.rb new/kturtle-4.8.0/spec/start_kturtle.rb --- old/kturtle-4.7.4/spec/start_kturtle.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/start_kturtle.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,4 +1,22 @@ #!/usr/bin/env ruby +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + puts "Staring the KTurtle interpreter in DBUS mode..." k = IO.popen './src/kturtle --dbus' sleep 1.5 # give it some time to start diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/string_spec.rb new/kturtle-4.8.0/spec/string_spec.rb --- old/kturtle-4.7.4/spec/string_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/string_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/spec/variable_assignment_spec.rb new/kturtle-4.8.0/spec/variable_assignment_spec.rb --- old/kturtle-4.7.4/spec/variable_assignment_spec.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/spec/variable_assignment_spec.rb 2011-11-17 21:57:12.000000000 +0100 @@ -1,3 +1,21 @@ +# Copyright (C) 2009 by Cies Breijs +# Copyright (C) 2009 by Niels Slot +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + require File.dirname(__FILE__) + '/spec_helper.rb' $i = Interpreter.instance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/editor.cpp new/kturtle-4.8.0/src/editor.cpp --- old/kturtle-4.7.4/src/editor.cpp 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/editor.cpp 2011-11-17 21:57:12.000000000 +0100 @@ -410,7 +410,7 @@ QRect rect = editor->currentLineRect(); rect.setWidth(this->width() - EDITOR_MARGIN); // don't draw too much rect.translate(0, EDITOR_MARGIN); // small hack to nicely align the line highlighting - QColor bgColor = this->palette().brush(this->backgroundRole()).color(); + //QColor bgColor = this->palette().brush(this->backgroundRole()).color(); QPainter painter(this); const QBrush brush(highlightedLineBackgroundColor); painter.fillRect(rect, brush); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/definitions.rb new/kturtle-4.8.0/src/interpreter/definitions.rb --- old/kturtle-4.7.4/src/interpreter/definitions.rb 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/definitions.rb 2011-11-17 21:57:12.000000000 +0100 @@ -368,7 +368,7 @@ EOS @e_def = <<EOS - QString id = QString("__%1_%2").arg(node->token()->look()).arg((long)node); + QString id = QString("__%1_%2").arg(node->token()->look()).arg((quintptr)node); if (currentVariableTable()->contains(id)) { currentVariableTable()->remove(id); return; @@ -428,7 +428,7 @@ @p_def = p_def_repeat_while @e_def = <<EOS - QString id = QString("__%1_%2").arg(node->token()->look()).arg((long)node); + QString id = QString("__%1_%2").arg(node->token()->look()).arg((quintptr)node); if(breaking) { breaking = false; @@ -468,7 +468,7 @@ // so we do the following on every call to executeWhile: // exec scope, exec expression, exec scope, exec expression, ... - QString id = QString("__%1_%2").arg(node->token()->look()).arg((long)node); + QString id = QString("__%1_%2").arg(node->token()->look()).arg((quintptr)node); if (breaking) { // We hit a break command while executing the scope @@ -567,7 +567,7 @@ firstIteration = true; } - QString id = QString("__%1_%2").arg(node->token()->look()).arg((long)node); + QString id = QString("__%1_%2").arg(node->token()->look()).arg((quintptr)node); if(breaking) { breaking = false; @@ -1453,6 +1453,11 @@ if (!checkParameterQuantity(node, 1, 20000+Token::Sqrt*100+90)) return; double val = node->child(0)->value()->number(); + if(val<0) { + addError(i18n("Can't do a sqrt of a negative number"), *node->child(0)->token(), 0); + node->value()->setNumber(0); + return; + } node->value()->setNumber(sqrt(val)); EOS parse_item() @@ -1502,3 +1507,23 @@ node->value()->setNumber(value); EOS parse_item() + +new_item() +@type = "Mod" +@cat = "Command" +@look = "mod" +@funct = "statement, node" +@args = [:number, :number] +@e_def = +<<EOS + if (!checkParameterQuantity(node, 2, 20000+Token::Mod*100+90)) return; + TreeNode* nodeX = node->child(0); // getting + TreeNode* nodeY = node->child(1); + + if (!checkParameterType(node, Value::Number, 20000+Token::Mod*100+91)) return; + double x = nodeX->value()->number(); + double y = nodeY->value()->number(); + double m = (double)(ROUND2INT(x) % ROUND2INT(y)); + node->value()->setNumber(m); +EOS +parse_item() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/executer.cpp new/kturtle-4.8.0/src/interpreter/executer.cpp --- old/kturtle-4.7.4/src/interpreter/executer.cpp 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/executer.cpp 2011-11-17 21:57:12.000000000 +0100 @@ -238,6 +238,7 @@ case Token::Sqrt : executeSqrt(node); break; case Token::Round : executeRound(node); break; case Token::GetDirection : executeGetDirection(node); break; + case Token::Mod : executeMod(node); break; //END GENERATED executer_switch_cpp CODE @@ -1047,6 +1048,11 @@ if (!checkParameterQuantity(node, 1, 20000+Token::Sqrt*100+90)) return; double val = node->child(0)->value()->number(); + if(val<0) { + addError(i18n("Can't do a sqrt of a negative number"), *node->child(0)->token(), 0); + node->value()->setNumber(0); + return; + } node->value()->setNumber(sqrt(val)); } void Executer::executeRound(TreeNode* node) { @@ -1063,6 +1069,18 @@ emit getDirection(value); node->value()->setNumber(value); } +void Executer::executeMod(TreeNode* node) { +// kDebug() << "called"; // method name is appended by kDebug + if (!checkParameterQuantity(node, 2, 20000+Token::Mod*100+90)) return; + TreeNode* nodeX = node->child(0); // getting + TreeNode* nodeY = node->child(1); + + if (!checkParameterType(node, Value::Number, 20000+Token::Mod*100+91)) return; + double x = nodeX->value()->number(); + double y = nodeY->value()->number(); + double m = (double)(ROUND2INT(x) % ROUND2INT(y)); + node->value()->setNumber(m); +} //END GENERATED executer_cpp CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/executer.h new/kturtle-4.8.0/src/interpreter/executer.h --- old/kturtle-4.7.4/src/interpreter/executer.h 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/executer.h 2011-11-17 21:57:12.000000000 +0100 @@ -249,6 +249,7 @@ void executeSqrt(TreeNode* node); void executeRound(TreeNode* node); void executeGetDirection(TreeNode* node); + void executeMod(TreeNode* node); //END GENERATED executer_h CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/parser.cpp new/kturtle-4.8.0/src/interpreter/parser.cpp --- old/kturtle-4.7.4/src/interpreter/parser.cpp 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/parser.cpp 2011-11-17 21:57:12.000000000 +0100 @@ -229,6 +229,7 @@ case Token::Sqrt : return parseSqrt(); case Token::Round : return parseRound(); case Token::GetDirection : return parseGetDirection(); + case Token::Mod : return parseMod(); //END GENERATED parser_statements_cpp CODE case Token::Error : return new TreeNode(currentToken); @@ -972,6 +973,14 @@ skipToken(Token::EndOfLine, *node->token()); return node; } +TreeNode* Parser::parseMod() { +// kDebug(0) << "called"; // method name is appended by kDebug + TreeNode* node = new TreeNode(currentToken); + nextToken(); + appendArguments(node); + skipToken(Token::EndOfLine, *node->token()); + return node; +} //END GENERATED parser_cpp CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/parser.h new/kturtle-4.8.0/src/interpreter/parser.h --- old/kturtle-4.7.4/src/interpreter/parser.h 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/parser.h 2011-11-17 21:57:12.000000000 +0100 @@ -177,6 +177,7 @@ TreeNode* parseSqrt(); TreeNode* parseRound(); TreeNode* parseGetDirection(); + TreeNode* parseMod(); //END GENERATED parser_h CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/token.cpp new/kturtle-4.8.0/src/interpreter/token.cpp --- old/kturtle-4.7.4/src/interpreter/token.cpp 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/token.cpp 2011-11-17 21:57:12.000000000 +0100 @@ -80,6 +80,7 @@ * Thanks for looking at the code! */ + case Mod: case Sin: case GoX: case GoY: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/token.h new/kturtle-4.8.0/src/interpreter/token.h --- old/kturtle-4.7.4/src/interpreter/token.h 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/token.h 2011-11-17 21:57:12.000000000 +0100 @@ -147,7 +147,8 @@ ArcCos, Sqrt, Round, - GetDirection + GetDirection, + Mod //END GENERATED token_type_h CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/interpreter/translator.cpp new/kturtle-4.8.0/src/interpreter/translator.cpp --- old/kturtle-4.7.4/src/interpreter/translator.cpp 2011-10-02 15:25:40.000000000 +0200 +++ new/kturtle-4.8.0/src/interpreter/translator.cpp 2011-11-17 21:57:12.000000000 +0100 @@ -661,6 +661,13 @@ default2localizedMap["getdirection"] = localizedCommandLook; look2typeMap[localizedCommandLook] = Token::GetDirection; + localizedCommandLook = ki18nc( + "You are about to translate the 'Mod' COMMAND, there are some rules on how to translate it." + "Please see http://edu.kde.org/kturtle/translator.php to learn how to properly translate it.", + "mod").toString(localizer); + default2localizedMap["mod"] = localizedCommandLook; + look2typeMap[localizedCommandLook] = Token::Mod; + //END GENERATED translator_cpp CODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kturtle-4.7.4/src/kturtle.desktop new/kturtle-4.8.0/src/kturtle.desktop --- old/kturtle-4.7.4/src/kturtle.desktop 2011-10-28 09:43:52.000000000 +0200 +++ new/kturtle-4.8.0/src/kturtle.desktop 2012-01-10 15:15:18.000000000 +0100 @@ -4,7 +4,7 @@ Name[ast]=KTurtle Name[be]=KTurtle Name[bg]=KTurtle -Name[bn]=কে-টার্টল +Name[bn]=কেটারটেল Name[br]=KTurtle Name[bs]=KTurtle Name[ca]=KTurtle @@ -34,6 +34,7 @@ Name[it]=KTurtle Name[ja]=KTurtle Name[ka]=KTurtle +Name[kk]=KTurtle Name[km]=KTurtle Name[ko]=KTurtle Name[lt]=KTurtle @@ -65,6 +66,7 @@ GenericName=Educational Programming Environment GenericName[ast]=Entornu de programación educativu GenericName[bg]=Програмиране на Лого +GenericName[bn]=শিক্ষামূলক প্রোগ্রামিং পরিবেশ GenericName[bs]=Obrazovno programersko okruženje GenericName[ca]=Entorn de programació educatiu GenericName[ca@valencia]=Entorn de programació educatiu @@ -92,6 +94,7 @@ GenericName[is]=Forritunarumhverfi fyrir kennslu GenericName[it]=Ambiente educativo di programmazione GenericName[ja]=子供のためのプログラミング環境 +GenericName[kk]=Программалауды үйрету ортасы GenericName[km]=បរិស្ថានកម្មវិធីអប់រំ GenericName[ko]=교육 프로그래밍 개발 환경 GenericName[lt]=Mokomoji programavimo aplinka -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org