Package: release.debian.org Severity: normal Tags: bullseye User: release.debian....@packages.debian.org Usertags: pu
[ Reason ] The package wims got a bugreport (#992088, "contains two files with a non-free "disparaging to Sun" license") with severity "serious" on 11 August; I uploaded the fix on 13 August, but it was too late to take it in account for the unblock request. [ Impact ] The popcon score for wims is low, but this package is used only by sysadmins. Typically, when a sysadmin runs wims for an education group, it can reach hundreds of users online. . Unlike the upstream wims distribution, the debian package can provide a featureful server in minutes, as the only command is to type "apt install wims". So, the Debian package (and the same in Ubuntu) are a good introduction to this free software. [ Tests ] I tested manually the build and the installation of the new package. [ Risks ] Wims is a leaf package, so it cannot harm other parts of the distribution. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] The directory containing the two non-free files was removed from the source package, debian patches and the Makefile were adjusted accordingly [ Other info ] Thank you in advance for the update
diff -Nru wims-4.17b+svn13454~dfsg1/debian/changelog wims-4.17b+svn13454~dfsg2/debian/changelog --- wims-4.17b+svn13454~dfsg1/debian/changelog 2021-01-02 16:54:11.000000000 +0100 +++ wims-4.17b+svn13454~dfsg2/debian/changelog 2021-08-13 13:28:13.000000000 +0200 @@ -1,3 +1,14 @@ +wims (1:4.17b+svn13454~dfsg2-1) unstable; urgency=medium + + * created a Git branch debian/bugfix-992088 + * made a new orig tarball without files + wims/src/Misc/applets/Lattice/src/LatticeViewer.java and + wims/src/Misc/applets/Lattice/src/Matrix3D.java + (the subdirectory wims/src/Misc/applets/Lattice was removed) + * updated the debian pactch modifying java builds + + -- Georges Khaznadar <georg...@debian.org> Fri, 13 Aug 2021 13:28:13 +0200 + wims (1:4.17b+svn13454~dfsg1-6) unstable; urgency=medium * created the line "usr/share/man/man1/flydraw.1.gz" in diff -Nru wims-4.17b+svn13454~dfsg1/debian/not-installed wims-4.17b+svn13454~dfsg2/debian/not-installed --- wims-4.17b+svn13454~dfsg1/debian/not-installed 2021-01-02 16:50:29.000000000 +0100 +++ wims-4.17b+svn13454~dfsg2/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -usr/share/man/man1/flydraw.1.gz diff -Nru wims-4.17b+svn13454~dfsg1/debian/patches/java.patch wims-4.17b+svn13454~dfsg2/debian/patches/java.patch --- wims-4.17b+svn13454~dfsg1/debian/patches/java.patch 2020-04-19 16:44:31.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/debian/patches/java.patch 2021-08-13 13:28:13.000000000 +0200 @@ -277,19 +277,6 @@ <!-- used for install of symlink & jar --> <property name="WIMS_HOME" value="../../../.."/> <property name="APPLET_DIR" value="public_html/java"/> -Index: wims/wims/src/Misc/applets/Lattice/build.xml -=================================================================== ---- wims.orig/wims/src/Misc/applets/Lattice/build.xml -+++ wims/wims/src/Misc/applets/Lattice/build.xml -@@ -19,7 +19,7 @@ - <property name="source-dir" location="src"/> - <property name="build" location="build"/> - <property name="dist" location="dist"/> -- <property name="java-level" value="1.4"/> -+ <property name="java-level" value="1.8"/> - <property name="wims_old_classes_dir" location="../../../../public_html/java/Lattice"/> - - <!-- Compiles the classes. --> Index: wims/wims/src/Misc/applets/ThreeD/build.xml =================================================================== --- wims.orig/wims/src/Misc/applets/ThreeD/build.xml diff -Nru wims-4.17b+svn13454~dfsg1/.gitignore wims-4.17b+svn13454~dfsg2/.gitignore --- wims-4.17b+svn13454~dfsg1/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ wims-4.17b+svn13454~dfsg2/.gitignore 2021-08-13 13:20:53.000000000 +0200 @@ -0,0 +1,2 @@ +*~ +.pc/ diff -Nru wims-4.17b+svn13454~dfsg1/wims/public_html/scripts/authors/jm.evers/js/geogebra2wims.js wims-4.17b+svn13454~dfsg2/wims/public_html/scripts/authors/jm.evers/js/geogebra2wims.js --- wims-4.17b+svn13454~dfsg1/wims/public_html/scripts/authors/jm.evers/js/geogebra2wims.js 2013-06-16 15:44:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/public_html/scripts/authors/jm.evers/js/geogebra2wims.js 1970-01-01 01:00:00.000000000 +0100 @@ -1,66 +0,0 @@ -/* -14/6/2013 -Changed to geogebra3 : OpenJDK was not able to export the java array getAllObjectNames() -(as was already a problem for internet explorer version 6,7,8?) -Resulting in lockups of the browser and OpenJDK java virtual machine. -getAllObjectNames() function is depreciated since geogebra > 2.7 (btw: Oracle / Sun virtualmachine & plugin were/are ok ! ) - -getAllObjectNames() is replaced by a combination of -int getObjectNumber() -> Returns the total number of objects in the construction. -String getObjectName(int i) --> returns the construction name of the i-th object - -Added 'triangle','quadrilateral' 'etc' als alternatives for 'polygon' (pffff) -Now this script recognizes : -list_of_things=['text','point','line','segment','circle','function','polygon','conic','ellipse','polynomial','vector','number','angle']; -And will alert , if it encounters a unknown object. - -Examples: -circle @ name @ x_center @ y_center @ radius -line @ name @ slope @ constant (e.g. : y = slope*x + constant) -line @ name @ perp @ x = number (e.g. : vertical line x=some_number) -polygon @ name @ surface_area @ A @ B @ C .... @ Z (e.g. : names of corners points) - -remarks: -geogebra3 has some issues with frame closing, it will not respond to normal appletmethods stop(),destroy() -I will try to get hold of the source code geogebra-2.7 ; and manually add the required new functions. -geogebra4 is much too heavy for normal usage (use a CAS in java applet ? ) -*/ -function geogebra2wims(list_of_things){ - var debug=0;var polygon_alternatives = ['triangle','quadrilateral','pentagon','hexagon','heptagon','octagon'];var applet = document.getElementById("ggbApplet");var max = applet.getObjectNumber();var total_object_count=0;var point_count=0;var line_count=0;var circle_count=0;var segment_count=0;var polygon_count=0;var function_count=0;var polynomial_count=0;var conic_count=0;var ellipse_count=0;var hyperbola_count=0;var vector_count=0;var angle_count=0;var text_count=0;var reply='';var data = '';if(debug == 1 ){alert(' \"list_of_things\" to check \n'+list_of_things);}var listcnt = list_of_things.length; - for( var i = 0 ; i < max ; i++ ){ - var thing = applet.getObjectName(i);var whatisit = applet.getObjectType(thing);if( polygon_alternatives.indexOf(whatisit) != -1 ){whatisit = "polygon";}if(debug == 1){alert("whatisit = "+whatisit);} - for ( var p=0 ; p < listcnt ; p++){ - var it = list_of_things[p]; - if( it == whatisit ){ - data = applet.getValueString(thing);data = encodeURIComponent(data);if(debug == 1){alert("found : "+it+"="+whatisit+"\ndata = "+data);}if( it=="circle" ){ data = data.replace(/%C2%B2/g,'@');} else {data = data.replace(/%C2%B/g,'^');}data = decodeURIComponent(data); - if (data.indexOf("_") != 2 ){/* protected names my_somename*/ - total_object_count++; - if (it == "point"){var x = applet.getXcoord(thing);var y = applet.getYcoord(thing);data='point@'+thing+'@'+x+'@'+y ;point_count++;} - else if (it == "circle"){ data = data.replace(/\=/g,'');var t = data.length;var c = data.indexOf(':');data = data.substring(c+1,t);var broken_up_string = data.replace(/[x-y]/g,'');broken_up_string = broken_up_string.split("@");var x = broken_up_string[0];var y = broken_up_string[1];var d = broken_up_string[2];if (x == ' ' || x==' + ' || x == ' - '){x = 0;}if (y == ' ' || y == ' + ' || y == ' + '){y = 0;}if (d == ' '){d = 0;}x='-1*('+x+')';y = '-1*('+y+')';data='circle@'+thing+'@'+parseFloat(eval(x))+'@'+parseFloat(eval(y))+'@'+d;circle_count++;} - else if (it == "line"){ var t = data.length;var n = data.indexOf(':');var f = data.indexOf('=');var d = data.indexOf('x');var e = data.indexOf('y');var a,b,c,r,q; if( d > 0 && e > 0 ){ a = data.substring(n+1,d); a = a.replace(/\ /g,""); if(a == 'x'){a = '1';} if(a == ''){a = '1';} if(a == '-'){a = '-1';} b = data.substring(d+1,e); b = b.replace(/\ /g,""); if(b == '+'){b = '1';}if(b == '-'){b='-1';} c = data.substring(f+1,t);r = '(-1*('+a+')/('+b+'))';q = '('+c+')/('+b+')';data='line@'+thing+'@'+parseFloat(eval(r))+'@'+parseFloat(eval(q));} else {if (d > 0 ){ c = data.substring(f+1,t);r = 'perp'; q = 'x='+c;data='line@'+thing+'@'+r+'@'+q;} else { c = data.substring(f+1,t);r = '0';q = c;data='line@'+thing+'@'+parseFloat(eval(r))+'@'+parseFloat(eval(q)); }} line_count++;} - else if (it == "polygon" ){var def=applet.getCommandString(thing);var i1=def.indexOf("[");var i2=def.indexOf("]");var points_of_polygon = def.substring(i1+1,i2);while ( points_of_polygon.indexOf(',') != -1){points_of_polygon = points_of_polygon.replace(',','@');}data = data.replace(/\=/g,'@');data = 'polygone@'+data+'@'+points_of_polygon;polygon_count++;} - else if (it == "segment"){data = 'segment@'+data;segment_count++;} - else if (it == "function"){data = 'function@'+data;function_count++;} - else if (it == "polynomial"){data = 'polynomial@'+data;polynomial_count++;} - else if (it == "conic"){data = 'conic@'+data;conic_count++;} - else if (it == "ellipse"){data = 'ellipse@'+data;ellipse_count++;} - else if (it == "hyperbola"){data = 'hyperbola@'+data;hyperbola_count++;} - else if (it == "text"){data = 'text@'+data;text_count++;} - else if (it == "angle"){data = data.split("=");name = data[0];data = data[1];data=name+'@'+data;angle_count++;} - else if (it == "vector"){var x = applet.getXcoord(thing);var y = applet.getYcoord(thing);data = 'vector@'+thing+'@'+x+'@'+y ;vector_count++;} - else {alert ('object type with name: '+thing+'... is not in my list, please add: ' + it);} - if( i < max - 1 ){ reply = reply + data +',';} else {reply = reply + data ;}if(debug == '1'){alert ('we add the variable \"data\" to the URL string :\n' +data);} - } - } - } - } - // lost track about this ... - reply = reply.replace(/undefined/g,'');reply = reply.replace(/%C2%B/g,'^');reply = reply.replace(/%CE%B/g,'angle@');reply = reply.replace(/\^0/g,' degree'); - reply = total_object_count+','+point_count+','+circle_count+','+line_count+','+segment_count+','+polygon_count+','+conic_count+','+ellipse_count+','+hyperbola_count+','+angle_count+','+vector_count+','+function_count+','+polynomial_count+','+text_count+','+reply; - // if some inputareas are present called myinpu0....myinput100 ; read these as well - // and append it to the "geogebra string" as "text="+txt - // we use @ as fieldseparator. - if(document.getElementById('myinput0') ){var p = 0;var t="";var txt="";while( document.getElementById('myinput'+p) ){ t = document.getElementById('myinput'+p).value; if( p == 0 ){ txt = t; } else { txt = txt +"@"+t;} p++; } reply=reply+",text="+txt;}if(debug == 1){alert(reply);} - return reply; -} - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/build.xml wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/build.xml --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/build.xml 2013-06-23 01:31:55.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/build.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<!-- - - This is the Ant build script for Lattice.jar. - to build ,type: - ant -v - to clean , type - ant -v clean - ---> - - -<project name="Lattice" default="jar" basedir="."> - - <description>Lattice build file</description> - <!-- Set global properties for this build. --> - <property name="version" value="1.0"/> - <property name="source-dir" location="src"/> - <property name="build" location="build"/> - <property name="dist" location="dist"/> - <property name="java-level" value="1.4"/> - <property name="wims_old_classes_dir" location="../../../../public_html/java/Lattice"/> - - <!-- Compiles the classes. --> - <target name="compile" description="Compile the source"> - <delete includeEmptyDirs="true" quiet="true" dir="${build}"/> - <mkdir dir="${build}"/> - <javac srcdir="${source-dir}" destdir="${build}" source="${java-level}" target="${java-level}"/> - </target> - - - <!-- Creates the jar file. --> - - <target name="jar" depends="compile" description="Create Lattice jar"> - <mkdir dir="${dist}"/> - <jar destfile="${dist}/Lattice.jar"> - <fileset dir="${build}"/> - <manifest> - <attribute name="Specification-Title" value="Lattice"/> - <attribute name="Specification-Version" value="${version}"/> - <attribute name="Implementation-Title" value="Lattice"/> - <attribute name="Implementation-Version" value="${version}"/> - <section name="Lattice"> - <attribute name="Specification-Title" value="Lattice"/> - <attribute name="Specification-Version" value="${version}"/> - <attribute name="Implementation-Title" value="Lattice"/> - <attribute name="Implementation-Version" value="${version}"/> - </section> - </manifest> - </jar> - </target> - <target name="clean" description="clean up"> - <!-- Delete the ${build} and ${dist} directory trees --> - <delete dir="./build"/> - <delete dir="./dist"/> - </target> - - -</project> diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/CHANGELOG wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/CHANGELOG --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/CHANGELOG 2011-10-13 07:58:01.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/CHANGELOG 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -13/10/2011 -build.xml: will not copy *.html / *.lat to "~/public_html/java/Lattice" - -12/10/2011 -Moved sources to src/Misc/applets/Lattice ; uniform build -Backward compatibility by copying (see build.xml) the *.class files into ~/public_html/java/Lattice - -Future applet usage: use the "Lattice.jar" instead of "*.class" - -LatticeViewer.java - Date : 18th Feb 1998 - Adapted by : Simon P.A.Gill - http://www.le.ac.uk/engineering/spg3/lattice/ - The following java code is an adaptation of the Molecule Viewer XYZApp.java - freely distributed by Sun Microsystems. The conditions stated below apply - to this code. S.P.A. Gill takes no responsibility for this code. - Requires class Matrix3D.java (also from Sun at - http://www.javasoft.com:80/applets/js-applets.html) \ Pas de fin de ligne à la fin du fichier diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/diamond.lat wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/diamond.lat --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/diamond.lat 2011-10-12 21:23:27.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/diamond.lat 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -ATOM C 255 0 0 1.0 -ATOM X 0 0 0 0.0 -c 0 0 0 2 -c 0.985977 0.985977 0.985977 3 7 -c 0 1.97195 1.97195 4 -c 0.985977 2.95792 2.95792 9 12 -c 1.97195 0 1.97195 2 6 -c 2.95792 0.985977 2.95792 10 13 -c 1.97195 1.97195 0 8 -c 2.95792 2.95792 0.985977 9 11 -c 1.97195 3.94389 1.97195 -c 3.94389 1.97195 1.97195 8 -c 3.94389 3.94389 0 -c 0 3.94389 3.94389 -c 1.97195 1.97195 3.94389 4 -c 3.94389 0 3.94389 6 -x 0 0 3.94389 -x 3.94389 0 0 -x 0 3.94389 0 -x 3.94389 3.94389 3.94389 diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/lattice.html wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/lattice.html --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/lattice.html 2011-10-12 21:23:27.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/lattice.html 1970-01-01 01:00:00.000000000 +0100 @@ -1,45 +0,0 @@ -<html> -<title>Crystal Atomic Lattice Viewer</title> -<BODY bgcolor="#ffffff"> -<center><h1>Crystal Atomic Lattice Viewer</h1></center> -<p> -<center>If your browser supports Java you should be able to -rotate these structures using your mouse!!</center> -<p> -<hr> -<p> -<center> -<h2>Diamond</h2> -<td align=center> -<h2>Buckminsterfullerene</h2> -<tr> -<td align=center> -<applet code=LatticeViewer.class width=250 height=250> -<param name=model value=diamond.lat> -<param name=label value=false> -<param name=scale value=0.8> -<param name=box value=false> -<param name=bonds value=true> -<param name=bgcolor value="ffffff"> -<param name=bondcolor value="000000"> -<img src="diamond.gif"> -</applet> -</center> -<p> -<hr> -<p> -The above Java applets have been developed by -<a href="http://www.le.ac.uk/eg/spg3/spg3.html">Simon Gill</a> from Sun -Microsystems <a href="http://www.javasoft.com:80/applets/js-applets.html"> -Molecule Viewer</a>. Copyright restrictions and instructions on how to use this -<b>freely available applet</b> are in the source code -<a href="http://www.le.ac.uk/eg/spg3/lattice/LatticeViewer.java">LatticeViewer.java</a> -which also requires -<a href="http://www.le.ac.uk/eg/spg3/lattice/Matrix3D.java">Matrix3D.java</a>. If you -do use this applet I would be pleased if you let me know. -<p> -The atomic positions of the following crystal structures were obtained from the -<a href="http://cst-www.nrl.navy.mil/lattice/">Complex Systems Theory</a> branch of the -US Navy. -</body> -</html> diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/src/LatticeViewer.java wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/src/LatticeViewer.java --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/src/LatticeViewer.java 2011-11-01 22:02:13.000000000 +0100 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/src/LatticeViewer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,694 +0,0 @@ -/* - * LatticeViewer.java - * Date : 18th Feb 1998 - * Adapted by : Simon P.A.Gill - * WWW : http://www.le.ac.uk/engineering/spg3/lattice/ - * - * The following java code is an adaptation of the Molecule Viewer XYZApp.java - * freely distributed by Sun Microsystems. The conditions stated below apply - * to this code. S.P.A. Gill takes no responsibility for this code. - * Requires class Matrix3D.java (also from Sun at - * http://www.javasoft.com:80/applets/js-applets.html) - * - ***************************************************************************** - * - * @(#)XYZApp.java 1.3 96/12/06 - * - * Copyright (c) 1994-1996 Sun Microsystems, Inc. All Rights Reserved. - * - * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use, - * modify and redistribute this software in source and binary code form, - * provided that i) this copyright notice and license appear on all copies of - * the software; and ii) Licensee does not utilize the software in a manner - * which is disparaging to Sun. - * - * This software is provided "AS IS," without a warranty of any kind. ALL - * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY - * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR - * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE - * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING - * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS - * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, - * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER - * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF - * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * This software is not designed or intended for use in on-line control of - * aircraft, air traffic, aircraft navigation or aircraft communications; or in - * the design, construction, operation or maintenance of any nuclear - * facility. Licensee represents and warrants that it will not use or - * redistribute the Software for such purposes. - */ - -/* - * Initially a set of classes to parse, represent and display Chemical compounds - * in .xyz format (see http://chem.leeds.ac.uk/Project/MIME.html). Now adapted - * to also display interatomic bonds, allow the user to define the atomic radii - * and colour of the atoms and define other lines in the display (such as the - * unit cell). This code will still display .xyz files but all the atoms will - * look the same (the default atom size and colour) unless they are defined - * in the .xyz file. A .xyz file in which the bond locations and atom colours and - * sizes have been defined have been distinguished by the .lat extension - * - * FILE FORMAT : - * - * The file format is based around the standard .xyz file which defines the - * position in space of the atoms in the lattice - * (see http://cst-www.nrl.navy.mil/lattice/ for details and many examples). - * Any comments must be removed. Each atom type must be defined. - * The following line defines an atom by its name (C), its RGB colour (red=255, - * green=0, blue=0) and relative size (default=1.0, minimum=0.0 maximum=2.0) - * - * ATOM C 255 0 0 1.0 - * - * The position and bonds of the atom are defined as follows : - * - * C 0.0 1.0 0.0 3 6 8 - * - * This places a carbon (C) atom at the co-ordinates (0.0,1.0,0.0) and says that - * bonds exist between it and the 3rd, 6th and 8th atoms in the list of atoms. - * An atom can have an unlimited number of bonds, the only restriction is that - * the total is less than 300 (unless the array size of bonds[] is increased. - * NOTE - any atom defined with a size of 0.0 (eg ATOM X 0 0 0 0.0) can be used - * to define the location of a position in space without an atom being placed - * there. Any bonds between such points are known as the BOX (as these have - * been used here to define the unit cell of a lattice) and are only displayed - * if parameter box has value=true (see below). - * - * APPLET OPTIONS : - * - * PARAM = model VALUE = filename - * PARAM = label VALUE = true/false - labels atoms with their - * numerical position in the list. - * Very useful when defining bond - * positions (default = false) - * PARAM = scale VALUE = float - size of lattice in applet (default=1.0) - * PARAM = box VALUE = true/false - the box concept is defined above. - * Only displayed if TRUE (default=false) - * PARAM = bonds VALUE = true/false - display interatomic bonds if true (default=false). - * PARAM = bgcolor VALUE = RGB colour - background colour (default=lightGrey) - * PARAM = bondcolor VALUE = RGB colour - bond colour (default=black) - * PARAM = boxcolor VALUE = RGB colour - colour of box bonds (default=red) - * - * NOTE - it has been found that this applet runs significantly better under Sun's - * appletviewer than on Netscape (especially when viewing complex structures) - */ - -import java.applet.Applet; -import java.awt.Image; -import java.awt.Event; -import java.awt.Graphics; -import java.awt.Dimension; -import java.awt.Color; -import java.io.StreamTokenizer; -import java.io.InputStream; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.net.URL; -import java.util.Hashtable; -import java.awt.image.IndexColorModel; -import java.awt.image.ColorModel; -import java.awt.image.MemoryImageSource; - - -/** The representation of a Chemical .xyz or Atomic Lattice (.lat) model */ -class XYZLatModel { - float vert[]; - ScaleableAtom atoms[]; - int tvert[]; - int ZsortMap[]; - int nvert, maxvert; - int bond[][] = new int[800][2]; - int nbond = -1; - boolean box; - boolean label; - boolean bonds; - int br, bg, bb; // RGB of bonds - int gr, gg, gb; // RGB of background - int xr, xg, xb; // RGB of box - - static Hashtable atomTable; - static ScaleableAtom defaultAtom; - - boolean transformed; - Matrix3D mat; - - float xmin, xmax, ymin, ymax, zmin, zmax; - - - XYZLatModel () { - mat = new Matrix3D(); - mat.xrot(20); - mat.yrot(30); - } - - - /** Create a Chemical model by parsing an input stream */ - XYZLatModel (InputStream is, boolean labl, boolean bx, boolean bnds, Color bgcolor, Color bndcolor, Color bxcolor) throws Exception - { - this(); - StreamTokenizer st; - st = new StreamTokenizer(new BufferedInputStream(is, 4000)); - st.eolIsSignificant(true); - st.commentChar('#'); - int slot = 0; - - this.label=labl; - this.box=bx; - this.bonds=bnds; - this.br=bndcolor.getRed(); - this.bg=bndcolor.getGreen(); - this.bb=bndcolor.getBlue(); - this.gr=bgcolor.getRed(); - this.gg=bgcolor.getGreen(); - this.gb=bgcolor.getBlue(); - this.xr=bxcolor.getRed(); - this.xg=bxcolor.getGreen(); - this.xb=bxcolor.getBlue(); - atomTable = new Hashtable(); - defaultAtom = new ScaleableAtom(255, 100, 200, 1.0); - try - { -scan: - while (true) - { - switch ( st.nextToken() ) - { - case StreamTokenizer.TT_EOF: - break scan; - default: - break; - case StreamTokenizer.TT_WORD: - // get atom type - String name = st.sval; - if (name.equals("ATOM")) { - // get name, RGB colour and size - int r=255, g=255, b=255; - double s=1.0; - if (st.nextToken() == StreamTokenizer.TT_WORD) - { - name=st.sval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - r = (int)st.nval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - g = (int)st.nval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - b =(int)st.nval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - s = (double)st.nval; - } - } - } - } - if (s>=2.0) s=2.0; - if (s<0.0) s=1.0; - atomTable.put(name.toLowerCase(), new ScaleableAtom(r, g, b, s)); - } else { - // get position - double x = 0, y = 0, z = 0; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - x = st.nval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - y = st.nval; - if (st.nextToken() == StreamTokenizer.TT_NUMBER) - z = st.nval; - } - } - addVert(name, (float) x, (float) y, (float) z); - // get connectivities - while (st.nextToken() == StreamTokenizer.TT_NUMBER) - { - nbond++; - bond[nbond][0]=nvert; - bond[nbond][1]=(int)st.nval; - } - } - while( st.ttype != StreamTokenizer.TT_EOL && - st.ttype != StreamTokenizer.TT_EOF ) - st.nextToken(); - - } // end Switch - - } // end while - - is.close(); - - } // end Try - catch( IOException e) {} - - if (st.ttype != StreamTokenizer.TT_EOF) - throw new Exception(st.toString()); - - } // end XYZLatModel() - - - /** Add a vertex to this model */ - int addVert(String name, float x, float y, float z) { - int i = nvert; - if (i >= maxvert) - if (vert == null) { - maxvert = 100; - vert = new float[maxvert * 3]; - atoms = new ScaleableAtom[maxvert]; - } else { - maxvert *= 2; - float nv[] = new float[maxvert * 3]; - System.arraycopy(vert, 0, nv, 0, vert.length); - vert = nv; - ScaleableAtom na[] = new ScaleableAtom[maxvert]; - System.arraycopy(atoms, 0, na, 0, atoms.length); - atoms = na; - } - ScaleableAtom a = (ScaleableAtom) atomTable.get(name.toLowerCase()); - if (a == null) a = defaultAtom; - atoms[i] = a; - i *= 3; - vert[i] = x; - vert[i + 1] = y; - vert[i + 2] = z; - return nvert++; - } - - /** Transform all the points in this model */ - void transform() { - if (transformed || nvert <= 0) - return; - if (tvert == null || tvert.length < nvert * 3) - tvert = new int[nvert * 3]; - mat.transform(vert, tvert, nvert); - transformed = true; - } - - - /** Paint this model to a graphics context. It uses the matrix associated - with this model to map from model space to screen space. - The next version of the browser should have double buffering, - which will make this *much* nicer */ - void paint(Graphics g) { - if (vert == null || nvert <= 0) - return; - transform(); - int v[] = tvert; - int zs[] = ZsortMap; - if (zs == null) { - ZsortMap = zs = new int[nvert]; - for (int i = nvert; --i >= 0;) - zs[i] = i * 3; - } - - /* - * I use a bubble sort since from one iteration to the next, the sort - * order is pretty stable, so I just use what I had last time as a - * "guess" of the sorted order. With luck, this reduces O(N log N) - * to O(N) - */ - - for (int i = nvert - 1; --i >= 0;) { - boolean flipped = false; - for (int j = 0; j <= i; j++) { - int a = zs[j]; - int b = zs[j + 1]; - if (v[a + 2] > v[b + 2]) { - zs[j + 1] = a; - zs[j] = b; - flipped = true; - } - } - if (!flipped) - break; - } - - int lg = 0; - int lim = nvert; - ScaleableAtom ls[] = atoms; - int drawn[] = new int[nbond+1]; - if (lim <= 0 || nvert <= 0) - return; - for (int i = 0; i < lim; i++) { - int j = zs[i]; - int grey = v[j + 2]; - if (grey < 0) - grey = 0; - if (grey > 15) - grey = 15; - - // draw bonds - int v1, v2; - boolean e = atoms[j/3].Exist(); - v1=j/3+1; - if (((e)&&(bonds))||((!e)&&(box))) - { - for (int k=0; k<=nbond; k++) - { - v2=-1; - if (bond[k][0]==v1) - v2=bond[k][1]-1; - if (bond[k][1]==v1) - v2=bond[k][0]-1; - if ((v2!=-1)&&(drawn[k]==0)) - { - drawn[k]=1; - double rr=(v[j+2]+v[v2*3+2]+6)/36.0; - int r1,b1,g1; - if (e) { - r1=(int)(rr*(br-gr)+gr); - b1=(int)(rr*(bb-gb)+gb); - g1=(int)(rr*(bg-gg)+gg); - } else { - r1=(int)(rr*(xr-gr)+gr); - b1=(int)(rr*(xb-gb)+gb); - g1=(int)(rr*(xg-gg)+gg); - } - Color line = new Color(r1,g1,b1); - g.setColor(line); - g.drawLine(v[j],v[j+1],v[v2*3],v[v2*3+1]); - } - } - } - if (e) - atoms[j/3].paint(g, v[j], v[j + 1], grey); - if (label) { - g.setColor(Color.black); - g.drawString(String.valueOf(v1), v[j], v[j+1]); - } - } - } - - /** Find the bounding box of this model */ - void findBB() { - if (nvert <= 0) - return; - float v[] = vert; - float xmin = v[0], xmax = xmin; - float ymin = v[1], ymax = ymin; - float zmin = v[2], zmax = zmin; - for (int i = nvert * 3; (i -= 3) > 0;) { - float x = v[i]; - if (x < xmin) - xmin = x; - if (x > xmax) - xmax = x; - float y = v[i + 1]; - if (y < ymin) - ymin = y; - if (y > ymax) - ymax = y; - float z = v[i + 2]; - if (z < zmin) - zmin = z; - if (z > zmax) - zmax = z; - } - this.xmax = xmax; - this.xmin = xmin; - this.ymax = ymax; - this.ymin = ymin; - this.zmax = zmax; - this.zmin = zmin; - } -} - -/** An applet to put a Chemical/Atomic Lattice model into a page */ -public class LatticeViewer extends Applet implements Runnable { - XYZLatModel md; - boolean painted = true; - float xfac; - int prevx, prevy; - float xtheta, ytheta; - float scalefudge = 1; - Matrix3D amat = new Matrix3D(), tmat = new Matrix3D(); - String mdname = null; - String message = null; - boolean label = false; - boolean box = false; - boolean bonds = false; - Image backBuffer; - Graphics backGC; - Dimension backSize; - String param; - Color bgcolor, bondcolor, boxcolor; - - - private synchronized void newBackBuffer() { - backBuffer = createImage(size().width, size().height); - backGC = backBuffer.getGraphics(); - backSize = size(); - } - - public void init() { - mdname = getParameter("model"); - try { - scalefudge = Float.valueOf(getParameter("scale")).floatValue(); - } catch(Exception e) { - }; - try { - label = Boolean.valueOf(getParameter("label")).booleanValue(); - } catch(Exception e) { - }; - try { - box = Boolean.valueOf(getParameter("box")).booleanValue(); - } catch(Exception e) { - }; - try { - bonds = Boolean.valueOf(getParameter("bonds")).booleanValue(); - } catch(Exception e) { - }; - try { - param = getParameter("bgcolor"); - } catch(Exception e) { - }; - try { - Integer i = Integer.valueOf(param, 16); - bgcolor = new Color(i.intValue()); - } catch (NumberFormatException e) { - bgcolor = Color.lightGray; - } - try { - param = getParameter("bondcolor"); - } catch(Exception e) { - }; - try { - Integer i = Integer.valueOf(param, 16); - bondcolor = new Color(i.intValue()); - } catch (NumberFormatException e) { - bondcolor = Color.black; - }; - try { - param = getParameter("boxcolor"); - } catch(Exception e) { - }; - try { - Integer i = Integer.valueOf(param, 16); - boxcolor = new Color(i.intValue()); - } catch (NumberFormatException e) { - boxcolor = Color.red; - }; - amat.yrot(20); - amat.xrot(20); - if (mdname == null) - mdname = "model.obj"; - resize(size().width <= 20 ? 400 : size().width, - size().height <= 20 ? 400 : size().height); - newBackBuffer(); - } - public void run() { - InputStream is = null; - try { - Thread.currentThread().setPriority(Thread.MIN_PRIORITY); - is = new URL(getDocumentBase(), mdname).openStream(); - XYZLatModel m = new XYZLatModel (is, label, box, bonds, bgcolor, bondcolor, boxcolor); - ScaleableAtom.setApplet(this); - md = m; - m.findBB(); - float xw = m.xmax - m.xmin; - float yw = m.ymax - m.ymin; - float zw = m.zmax - m.zmin; - if (yw > xw) - xw = yw; - if (zw > xw) - xw = zw; - float f1 = size().width / xw; - float f2 = size().height / xw; - xfac = 0.7f * (f1 < f2 ? f1 : f2) * scalefudge; - } catch(Exception e) { - e.printStackTrace(); - md = null; - message = e.toString(); - } - try { - if (is != null) - is.close(); - } catch(Exception e) { - } - repaint(); - } - public void start() { - if (md == null && message == null) - new Thread(this).start(); - } - public void stop() { - } - public boolean mouseDown(Event e, int x, int y) { - prevx = x; - prevy = y; - return true; - } - public boolean mouseDrag(Event e, int x, int y) { - tmat.unit(); - float xtheta = (prevy - y) * (360.0f / size().width); - float ytheta = (x - prevx) * (360.0f / size().height); - tmat.xrot(xtheta); - tmat.yrot(ytheta); - amat.mult(tmat); - if (painted) { - painted = false; - repaint(); - } - prevx = x; - prevy = y; - return true; - } - public void update(Graphics g) { - if (backBuffer == null) - g.clearRect(0, 0, size().width, size().height); - paint(g); - } - - public void paint(Graphics g) { - if (md != null) { - md.mat.unit(); - md.mat.translate(-(md.xmin + md.xmax) / 2, - -(md.ymin + md.ymax) / 2, - -(md.zmin + md.zmax) / 2); - md.mat.mult(amat); - // md.mat.scale(xfac, -xfac, 8 * xfac / size().width); - md.mat.scale(xfac, -xfac, 16 * xfac / size().width); - md.mat.translate(size().width / 2, size().height / 2, 8); - md.transformed = false; - if (backBuffer != null) { - if (!backSize.equals(size())) - newBackBuffer(); - setBackground(bgcolor); - backGC.setColor(bgcolor); - backGC.fillRect(0,0,size().width,size().height); - md.paint(backGC); - g.drawImage(backBuffer, 0, 0, this); - } - else - md.paint(g); - setPainted(); - } else if (message != null) { - g.drawString("Error in model:", 3, 20); - g.drawString(message, 10, 40); - } - } - private synchronized void setPainted() { - painted = true; - notifyAll(); - } - - private synchronized void waitPainted() - { - while (!painted) - { - try - { - wait(); - } - catch (InterruptedException e) {} - } - painted = false; - } -} // end class LatticeViewer - -class ScaleableAtom { - private static Applet applet; - private static byte[] data; - private final static int R = 40; - private final static int hx = 15; - private final static int hy = 15; - private final static int bgGrey = 192; - private static int maxr; - - private int Rl; - private int Gl; - private int Bl; - private double Sf; - - private Image balls[]; - - static { - data = new byte[R * 2 * R * 2]; - int mr = 0; - for (int Y = 2 * R; --Y >= 0;) { - int x0 = (int) (Math.sqrt(R * R - (Y - R) * (Y - R)) + 0.5); - int p = Y * (R * 2) + R - x0; - for (int X = -x0; X < x0; X++) { - int x = X + hx; - int y = Y - R + hy; - int r = (int) (Math.sqrt(x * x + y * y) + 0.5); - if (r > mr) - mr = r; - data[p++] = r <= 0 ? 1 : (byte) r; - } - } - maxr = mr; - } - static void setApplet(Applet app) { - applet = app; - } - ScaleableAtom(int Rl, int Gl, int Bl, double Sf) { - this.Rl = Rl; - this.Gl = Gl; - this.Bl = Bl; - this.Sf = Sf; - } - boolean Exist() { - if (Sf==0.0) - return false; - else - return true; - } - private final int blend(int fg, int bg, float fgfactor) { - return (int) (bg + (fg - bg) * fgfactor); - } - private void Setup(int nBalls) { - balls = new Image[nBalls]; - byte red[] = new byte[256]; - red[0] = (byte) bgGrey; - byte green[] = new byte[256]; - green[0] = (byte) bgGrey; - byte blue[] = new byte[256]; - blue[0] = (byte) bgGrey; - for (int r = 0; r < nBalls; r++) { - float b = (float) (r+1) / nBalls; - for (int i = maxr; i >= 1; --i) { - float d = (float) i / maxr; - red[i] = (byte) blend(blend(Rl, 255, d), bgGrey, b); - green[i] = (byte) blend(blend(Gl, 255, d), bgGrey, b); - blue[i] = (byte) blend(blend(Bl, 255, d), bgGrey, b); - } - IndexColorModel model = new IndexColorModel(8, maxr + 1, - red, green, blue, 0); - balls[r] = applet.createImage( - new MemoryImageSource(R*2, R*2, model, data, 0, R*2)); - } - } - void paint(Graphics gc, int x, int y, int r) { - Image ba[] = balls; - if (ba == null) { - Setup((int)(16*Sf)); - ba = balls; - } - r=(int)(r*Sf); - Image i = ba[r]; - int size = 10 + r; - gc.drawImage(i, x - (size >> 1), y - (size >> 1), size, size, applet); - } -} diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/src/Matrix3D.java wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/src/Matrix3D.java --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/applets/Lattice/src/Matrix3D.java 2011-10-12 21:23:27.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/applets/Lattice/src/Matrix3D.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,225 +0,0 @@ -/* - * @(#)Matrix3D.java 1.2 96/12/06 - * - * Copyright (c) 1994-1996 Sun Microsystems, Inc. All Rights Reserved. - * - * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use, - * modify and redistribute this software in source and binary code form, - * provided that i) this copyright notice and license appear on all copies of - * the software; and ii) Licensee does not utilize the software in a manner - * which is disparaging to Sun. - * - * This software is provided "AS IS," without a warranty of any kind. ALL - * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY - * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR - * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE - * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING - * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS - * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, - * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER - * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF - * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - * - * This software is not designed or intended for use in on-line control of - * aircraft, air traffic, aircraft navigation or aircraft communications; or in - * the design, construction, operation or maintenance of any nuclear - * facility. Licensee represents and warrants that it will not use or - * redistribute the Software for such purposes. - */ - -/** A fairly conventional 3D matrix object that can transform sets of - 3D points and perform a variety of manipulations on the transform */ -class Matrix3D { - float xx, xy, xz, xo; - float yx, yy, yz, yo; - float zx, zy, zz, zo; - static final double pi = 3.14159265; - /** Create a new unit matrix */ - Matrix3D () { - xx = 1.0f; - yy = 1.0f; - zz = 1.0f; - } - /** Scale by f in all dimensions */ - void scale(float f) { - xx *= f; - xy *= f; - xz *= f; - xo *= f; - yx *= f; - yy *= f; - yz *= f; - yo *= f; - zx *= f; - zy *= f; - zz *= f; - zo *= f; - } - /** Scale along each axis independently */ - void scale(float xf, float yf, float zf) { - xx *= xf; - xy *= xf; - xz *= xf; - xo *= xf; - yx *= yf; - yy *= yf; - yz *= yf; - yo *= yf; - zx *= zf; - zy *= zf; - zz *= zf; - zo *= zf; - } - /** Translate the origin */ - void translate(float x, float y, float z) { - xo += x; - yo += y; - zo += z; - } - /** rotate theta degrees about the y axis */ - void yrot(double theta) { - theta *= (pi / 180); - double ct = Math.cos(theta); - double st = Math.sin(theta); - - float Nxx = (float) (xx * ct + zx * st); - float Nxy = (float) (xy * ct + zy * st); - float Nxz = (float) (xz * ct + zz * st); - float Nxo = (float) (xo * ct + zo * st); - - float Nzx = (float) (zx * ct - xx * st); - float Nzy = (float) (zy * ct - xy * st); - float Nzz = (float) (zz * ct - xz * st); - float Nzo = (float) (zo * ct - xo * st); - - xo = Nxo; - xx = Nxx; - xy = Nxy; - xz = Nxz; - zo = Nzo; - zx = Nzx; - zy = Nzy; - zz = Nzz; - } - /** rotate theta degrees about the x axis */ - void xrot(double theta) { - theta *= (pi / 180); - double ct = Math.cos(theta); - double st = Math.sin(theta); - - float Nyx = (float) (yx * ct + zx * st); - float Nyy = (float) (yy * ct + zy * st); - float Nyz = (float) (yz * ct + zz * st); - float Nyo = (float) (yo * ct + zo * st); - - float Nzx = (float) (zx * ct - yx * st); - float Nzy = (float) (zy * ct - yy * st); - float Nzz = (float) (zz * ct - yz * st); - float Nzo = (float) (zo * ct - yo * st); - - yo = Nyo; - yx = Nyx; - yy = Nyy; - yz = Nyz; - zo = Nzo; - zx = Nzx; - zy = Nzy; - zz = Nzz; - } - /** rotate theta degrees about the z axis */ - void zrot(double theta) { - theta *= (pi / 180); - double ct = Math.cos(theta); - double st = Math.sin(theta); - - float Nyx = (float) (yx * ct + xx * st); - float Nyy = (float) (yy * ct + xy * st); - float Nyz = (float) (yz * ct + xz * st); - float Nyo = (float) (yo * ct + xo * st); - - float Nxx = (float) (xx * ct - yx * st); - float Nxy = (float) (xy * ct - yy * st); - float Nxz = (float) (xz * ct - yz * st); - float Nxo = (float) (xo * ct - yo * st); - - yo = Nyo; - yx = Nyx; - yy = Nyy; - yz = Nyz; - xo = Nxo; - xx = Nxx; - xy = Nxy; - xz = Nxz; - } - /** Multiply this matrix by a second: M = M*R */ - void mult(Matrix3D rhs) { - float lxx = xx * rhs.xx + yx * rhs.xy + zx * rhs.xz; - float lxy = xy * rhs.xx + yy * rhs.xy + zy * rhs.xz; - float lxz = xz * rhs.xx + yz * rhs.xy + zz * rhs.xz; - float lxo = xo * rhs.xx + yo * rhs.xy + zo * rhs.xz + rhs.xo; - - float lyx = xx * rhs.yx + yx * rhs.yy + zx * rhs.yz; - float lyy = xy * rhs.yx + yy * rhs.yy + zy * rhs.yz; - float lyz = xz * rhs.yx + yz * rhs.yy + zz * rhs.yz; - float lyo = xo * rhs.yx + yo * rhs.yy + zo * rhs.yz + rhs.yo; - - float lzx = xx * rhs.zx + yx * rhs.zy + zx * rhs.zz; - float lzy = xy * rhs.zx + yy * rhs.zy + zy * rhs.zz; - float lzz = xz * rhs.zx + yz * rhs.zy + zz * rhs.zz; - float lzo = xo * rhs.zx + yo * rhs.zy + zo * rhs.zz + rhs.zo; - - xx = lxx; - xy = lxy; - xz = lxz; - xo = lxo; - - yx = lyx; - yy = lyy; - yz = lyz; - yo = lyo; - - zx = lzx; - zy = lzy; - zz = lzz; - zo = lzo; - } - - /** Reinitialize to the unit matrix */ - void unit() { - xo = 0; - xx = 1; - xy = 0; - xz = 0; - yo = 0; - yx = 0; - yy = 1; - yz = 0; - zo = 0; - zx = 0; - zy = 0; - zz = 1; - } - /** Transform nvert points from v into tv. v contains the input - coordinates in floating point. Three successive entries in - the array constitute a point. tv ends up holding the transformed - points as integers; three successive entries per point */ - void transform(float v[], int tv[], int nvert) { - float lxx = xx, lxy = xy, lxz = xz, lxo = xo; - float lyx = yx, lyy = yy, lyz = yz, lyo = yo; - float lzx = zx, lzy = zy, lzz = zz, lzo = zo; - for (int i = nvert * 3; (i -= 3) >= 0;) { - float x = v[i]; - float y = v[i + 1]; - float z = v[i + 2]; - tv[i ] = (int) (x * lxx + y * lxy + z * lxz + lxo); - tv[i + 1] = (int) (x * lyx + y * lyy + z * lyz + lyo); - tv[i + 2] = (int) (x * lzx + y * lzy + z * lzz + lzo); - } - } - public String toString() { - return ("[" + xo + "," + xx + "," + xy + "," + xz + ";" - + yo + "," + yx + "," + yy + "," + yz + ";" - + zo + "," + zx + "," + zy + "," + zz + "]"); - } -} diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/changelog wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/changelog --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/changelog 2008-05-28 20:38:25.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/changelog 1970-01-01 01:00:00.000000000 +0100 @@ -1,245 +0,0 @@ -chemeq (2.8-1) unstable; urgency=low - - * Modified the package to make it non-native, because it can be used - outside Debian. - - -- Georges Khaznadar <georg...@ofset.org> Wed, 05 Dec 2007 21:40:36 +0100 - -chemeq (2.7) unstable; urgency=low - - * fixed one bug with the option -wl: the output contained sequences - like "\," and Wims considers le commas like list separators. - * added an automatic update of the version number (for Debian - packages). - - -- Georges Khaznadar <georg...@ofset.org> Sun, 18 Nov 2007 02:00:33 +0100 - -chemeq (2.6) unstable; urgency=low - - * fixed some bugs with the option -w - - -- Georges Khaznadar <georg...@ofset.org> Sat, 17 Nov 2007 23:18:03 +0100 - -chemeq (2.5) unstable; urgency=low - - * implemented the support of an output for WIMS with the option -w or - -wl - - -- Georges Khaznadar <georg...@ofset.org> Fri, 16 Nov 2007 09:15:31 +0100 - -chemeq (2.4) unstable; urgency=low - - * applied Thiemo Seufer's patch, Closes: #451049. - - -- Georges Khaznadar <georg...@ofset.org> Wed, 14 Nov 2007 12:35:44 +0100 - -chemeq (2.3) unstable; urgency=low - - * modified the management of standard potentials and equilibrium - constants upon multiplication : an undefined constant must lead - to an undefined result. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 16 Sep 2007 17:53:33 +0200 - -chemeq (2.2) unstable; urgency=low - - * added a new multiplicative operator, to be able to multiply every - coefficients of each reactive or product of an equation of reaction - at the same time. - * added some tests into the suite to account for this new feature. - * removed a --strip option in the Makefile. - Closes: #436622 - * modified the format of the outputs when LaTeX notations are - involved. For example 3.2e-12 now gives 3.2\times 10^{-12}. - * Fixed a buggy test item with the direct composition of equations - (# operator), adapted test items according to the modification for - LaTeX outputs. - * Implemented the calculus of equilibrium constants and standard - potentials throughout the possible combinations of chemical - equations, by multiplying, adding, and substracting them with the - operators *, # and ~. - * recoded the files to utf-8. - * updated the scripts chemreport, so the test suite is correctly - formatted with LaTeX. - * fixed a bug for negative standard potential. There stil remains a - documented bug, due to the fact that the syntax -{int} means an - electric charge. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 26 Aug 2007 21:35:39 +0200 - -chemeq (2.1) unstable; urgency=low - - * added a better simplification behavior: now H2 + H2 is resolved as - 2H2 for example. - * updated the test suite and made it utf-8 compliant. - * Major feature enhancement: added new binary operators, # to add two - chemical equations, and ~ to make a substraction between two chemical - equations. - * added two tests into the suite to account for this new feature. - - -- Georges Khaznadar <georg...@ofset.org> Fri, 01 Jun 2007 00:35:59 +0200 - -chemeq (1.13) unstable; urgency=low - - * made some modifications to fix compilation bugs with gcc-4.3 - Closes: Bug#417131 - - -- Georges Khaznadar <georg...@ofset.org> Tue, 3 Apr 2007 19:51:22 +0200 - -chemeq (1.12) unstable; urgency=low - - * modified the behaviour with -C : now the charge count is displaied - - -- Georges Khaznadar <georg...@ofset.org> Sun, 11 Mar 2007 12:49:31 +0100 - -chemeq (1.11) unstable; urgency=low - - * fixed an error for the option -C with atom groups; for example - B(OH)3 yelded something like B(OH)3|B:1*1 (O:1*1 H:1*1)3 which - has little sense. Now it yelds B(OH)3|B:1*1 O:1*3 H:1*3, which - would be the same than parsing BO3H3. - - -- Georges Khaznadar <georg...@ofset.org> Sat, 10 Mar 2007 22:00:17 +0100 - -chemeq (1.10) unstable; urgency=low - - * fixed two stupid errors in operators '&' and '-' for the Membre object: - their return value were undefined! - Now there is no more segmentation error when the normalisation is done. - * added a new feature, bound to the option -C (detailed count) : - it prints a detailed count of molecules and atoms in each member - of the equation. This count can be used by other programs. - * added similar features (options -e and -s), which are simpler than - the option -C: they just print respectively the electric charges, - and the chemical species. - - -- Georges Khaznadar <georg...@ofset.org> Fri, 23 Feb 2007 11:54:22 +0100 - -chemeq (1.9) unstable; urgency=low - - * recompiled with a new version of flex (see - http://www.debian.org/security/2006/dsa-1020) - - -- Georges Khaznadar <georg...@ofset.org> Sun, 2 Apr 2006 16:45:22 +0200 - -chemeq (1.8) unstable; urgency=low - - * added a feature: the normalised output (chemeq -n) makes simplifications - by substracting equivalent amounts of chemicals in both members of an - equation. - - -- Georges Khaznadar <georg...@ofset.org> Thu, 16 Feb 2006 23:37:38 +0100 - -chemeq (1.7) unstable; urgency=low - - * added the environment variables prefixed with w_ to comply with Gang - Xiao's WIMS server. - * updated the manpage - - -- Georges Khaznadar <georg...@ofset.org> Sat, 28 Jan 2006 23:37:03 +0100 - -chemeq (1.6) unstable; urgency=low - - * fixed issues about the environment variable chemeq_input - * updated the manpage - - -- Georges Khaznadar <georg...@ofset.org> Sat, 28 Jan 2006 20:04:22 +0100 - -chemeq (1.5) unstable; urgency=low - - * recompilation to be consistent with the new libstdc++ - * dropped the reference to g++-3.0 - - -- Georges Khaznadar <georg...@ofset.org> Thu, 22 Dec 2005 20:38:40 +0100 - -chemeq (1.4) unstable; urgency=low - - * chemeq takes in account another environment variable, chemeq_input, which - may contain the input string for chemeq. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 27 Feb 2005 23:55:33 +0100 - -chemeq (1.3) unstable; urgency=low - - * now chemeq takes in account a parameter chemeq_option, which can be used - to pass the options "mMlcwnh" - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Wed, 26 Jan 2005 13:36:12 +0100 - -chemeq (1.2-1) unstable; urgency=low - - * added the -M switch; features molecular weights calculation - * corrected the references to endl (using std::endl instead) - closes: Bug#188906 - other incorrect references to cin, cout and cerr are due to a bad - behavior of flex when used in c++ mode. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Mon, 14 Apr 2003 12:04:35 +0200 - -chemeq (1.1.0.3-8) unstable; urgency=low - - * Rewritten the "closes" assertion correctly - closes: Bug#176265 - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 2 Feb 2003 22:09:56 +0100 - -chemeq (1.1.0.3-7) unstable; urgency=low - - * modified the type of the "ch" varaible which is used to get the result - of the getopt() function, to int. So the condition -1 == ch can be - reached on every architecture. - Closes: #176265 - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sat, 11 Jan 2003 18:45:29 +0100 - -chemeq (1.1.0.3-6) unstable; urgency=low - - * some fixes to comply with g++-3.2, thanks to Jeroen T. Vermeulen - Closes: #174962 - - -- Georges Khaznadar <georg...@gk.homelinux.org> Sun, 5 Jan 2003 00:15:16 +0100 - -chemeq (1.1.0.3-5) unstable; urgency=low - - * chemeq is now compliant with g++-v3 and should build on all archs. - Closes: #146530 - - -- Georges Khaznadar <georg...@gk.homelinux.org> Sun, 10 Nov 2002 22:00:10 +0100 - -chemeq (1.1.0.3-4) unstable; urgency=low - - * corrected build-depends according to last post about Bug#146552 - gcc and g++ are no more in buid-depends. - Closes: #146530, #146552 - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 27 Oct 2002 11:22:05 +0100 - -chemeq (1.1.0.3-3) unstable; urgency=low - - * corrected a missing parenthesis in chemreport.pl (test suite) - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 12 May 2002 15:53:36 +0200 - -chemeq (1.1.0.3-2) unstable; urgency=low - - * added build-depends : flex, bison, gcc, g++ - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sat, 11 May 2002 19:06:01 +0200 - -chemeq (1.1.0.3-1) unstable; urgency=low - - * Integrated test suite - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 05 May 2002 10:12:49 +0200 - -chemeq (1.1.0.2-1) unstable; urgency=low - - * Initial Release. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Thu, 28 Apr 2002 22:50:45 +0200 - - -Local variables: - mode: debian-changelog -End: - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/chlg wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/chlg --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/chlg 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/chlg 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -chemeq (1.1.0.3-4) stable; urgency=low - - * corrected build-depends according to last post about Bug#146552 - gcc and g++ are no more in buid-depends. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Tue May 14 23:20:32 CEST 2002 - - * corrected a missing parenthesis in chemreport.pl (test suite) - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun May 12 15:53:36 CEST 2002 - - * added build-depends : flex, bison, gcc, g++ - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sat May 11 19:06:01 CEST 2002 - - * Integrated test suite - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun May 5 10:12:49 CEST 2002 - - * Initial Release. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Thu, 28 Apr 2002 22:50:45 +0200 - -Local variables: - mode: debian-changelog -End: - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/compat wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/compat --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/compat 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/compat 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -4 diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/control wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/control --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/control 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/control 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -Source: chemeq -Section: tex -Priority: optional -Maintainer: Georges Khaznadar <georg...@ofset.org> -Build-Depends: flex (>= 2.5.31-1), bison, debhelper (>= 4.0.0) -Standards-Version: 3.7.2 - -Package: chemeq -Architecture: any -Depends: ${shlibs:Depends} -Suggests: tetex-bin, wims -Description: Parser for chemical formula and equilibria - chemeq is a basic standalone filter written in C language, - flex and bison. It inputs strings like: - 2H2 + O2 ---> 2 H2O - then it outputs LaTeX code and messages about the equilibrium of a - chemical reaction. - . - example:~/src$ echo "2H2 + O2 ---> 2 H2O" | chemeq -lc - 2\,H_{2}\,+\,O_{2}\,\rightarrow\,2\,H_{2}O - OK diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/copyright wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/copyright --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/copyright 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/copyright 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -This package was debianized by Georges Khaznadar <gekhajof...@netinfo.fr> on -Thu, 28 Apr 2002 22:50:45 +0200. - -It was downloaded from ftp://boltz.univ-littoral.fr/pub/chemeq - -Upstream Author: Georges Khaznadar <gekhajof...@netinfo.fr> - -Since version 1.2 : -Atomic data from gperiodic, authored by Kyle Burton <mor...@voicent.com>, - downloaded from http://gperiodic.seul.org/ - -Copyright: - -This software is copyright (c) 2000-02 by Georges Khaznadar - -You are free to distribute this software under the terms of -the GNU General Public License. -On Debian systems, the complete text of the GNU General Public -License can be found in /usr/share/common-licenses/GPL file. - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/docs wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/docs --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/docs 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/docs 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -README -LISEZMOI diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/README.debian wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/README.debian --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/README.debian 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/README.debian 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -Running the test suite for chemeq : - -$ cd /usr/share/doc/chemeq/tests -$ sh chemtest -$ sh chemreport - -chemtest should report several OK statements - -chemreport should output a DVI file. chemreport relies on LaTeX -being installed. diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/rules wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/rules --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/rules 2008-05-28 20:38:25.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/rules 1970-01-01 01:00:00.000000000 +0100 @@ -1,92 +0,0 @@ -#!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) - CFLAGS += -g -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. - version=$$(basename $$(pwd)| sed 's/chemeq-//'); \ - sed "s/VERSION.*/VERSION \"$${version}\"/" src/chemeq.h > src/chemeq.h.tmp && \ - mv src/chemeq.h.tmp src/chemeq.h - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - # Add here commands to compile the package. - $(MAKE) - #/usr/bin/docbook-to-man debian/chemeq.sgml > chemeq.1 - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - $(MAKE) clean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/chemeq. - $(MAKE) install DESTDIR=$(CURDIR)/debian/chemeq - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot -# dh_installdebconf - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit - dh_installcron - dh_installman - dh_installinfo -# dh_undocumented - dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_makeshlibs - dh_installdeb -# dh_perl - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/semantic.cache wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/semantic.cache --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/chemeq/debian/semantic.cache 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/chemeq/debian/semantic.cache 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -;; Object debian/ -;; SEMANTICDB Tags save file -(semanticdb-project-database-file "debian/" - :tables (list - (semanticdb-table "rules" - :major-mode 'makefile-mode - :tags '(("configure" function (:arguments ("configure-stamp")) nil [322 364]) ("configure-stamp" function nil nil [349 426]) ("build" function (:arguments ("build-stamp")) nil [451 471]) ("build-stamp" function (:arguments ("configure-stamp")) nil [471 514]) ("clean" function nil nil [645 713]) ("install" function (:arguments ("build")) nil [799 869]) ("binary-indep" function (:arguments ("build" "install")) nil [1029 1093]) ("binary-arch" function (:arguments ("build" "install")) nil [1137 1210]) ("binary" function (:arguments ("binary-indep" "binary-arch")) nil [1583 1622])) - :file "rules" - :pointmax 1686 - ) - ) - :file "semantic.cache" - :semantic-tag-version "2.0pre3" - :semanticdb-version "2.0pre3" - ) diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/changelog wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/changelog --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/changelog 2018-04-20 23:22:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/changelog 1970-01-01 01:00:00.000000000 +0100 @@ -1,325 +0,0 @@ -units-filter (3.9-1) unstable; urgency=medium - - * new upstream release : more units recognized. - * dropped the build-dependency on sphinx stuff since the documentation - is build by upstream. - - -- Georges Khaznadar <georg...@debian.org> Fri, 20 Apr 2018 17:41:25 +0200 - -units-filter (3.8-1) unstable; urgency=medium - - * new upstream release, which changes the source of the documentation: - sphinx is used to generate both man pages and html docs. - * removed build-dependencies for xsltproc, added others for sphinx - - -- Georges Khaznadar <georg...@debian.org> Fri, 20 Apr 2018 15:50:46 +0200 - -units-filter (3.7-4) unstable; urgency=medium - - * added VCS stuff - * upgraded Standards-Version to 4.1.4, dh and compat to 10. - - -- Georges Khaznadar <georg...@debian.org> Fri, 20 Apr 2018 15:17:28 +0200 - -units-filter (3.7-3) unstable; urgency=medium - - * added a build-dependency on libfl-dev; Closes: #846453 - - -- Georges Khaznadar <georg...@debian.org> Fri, 02 Dec 2016 20:14:23 +0100 - -units-filter (3.7-2) unstable; urgency=medium - - * dropped the dependency on hardening-wrapper. Closes: #836659 - * upgraded Standards-Version to 3.9.8 - - -- Georges Khaznadar <georg...@debian.org> Wed, 14 Sep 2016 15:50:13 +0200 - -units-filter (3.7-1) unstable; urgency=medium - - * rewrote the code to depend no longer on libmpfrc++-dev. - + Created a Decimal class implementing few operations, based on libgmp - + Restored the dependency on libgmp-dev - - -- Georges Khaznadar <georg...@debian.org> Fri, 22 Aug 2014 16:22:10 +0200 - -units-filter (3.6-1) unstable; urgency=medium - - * improved the comments in src/unites.y; translated every comment in English. - * rewrote the code to use libmpfrc++ instead of libgmp3 - * changed the build-dependencies accordingly - * upgraded Standards-Version to 3.9.5 - - -- Georges Khaznadar <georg...@debian.org> Sat, 05 Apr 2014 18:23:09 +0200 - -units-filter (3.5-3) unstable; urgency=low - - * Modified my DEBEMAIL - * fixed a conversion not allowed by the last version of gcc. Closes:#707460 - * updated Standards-Version and compat level - * fixed the Suggests: field in control file - * introduced hardening-wrapper in the rules and build-dependencies - * fixed src/unites.y: added a format string for printf - * fixed src/Makefile to take in account fortifying options in CXXFLAGS - - -- Georges Khaznadar <georg...@debian.org> Sun, 12 May 2013 19:52:37 +0200 - -units-filter (3.5-2) unstable; urgency=low - - * fixed typos in the manpage, thanks to A. Costa's patch. - Closes: #649228 - - -- Georges Khaznadar <georg...@ofset.org> Sat, 19 Nov 2011 14:00:30 +0100 - -units-filter (3.5-1) unstable; urgency=low - - * fixed a bug which appeared with data containing too much digits. - * added unitary tests for this feature - - -- Georges Khaznadar <georg...@ofset.org> Sat, 27 Aug 2011 20:46:11 +0200 - -units-filter (3.4-1) unstable; urgency=low - - * fixed a bug about significative digit guessing when the option -s - is active and no explicite number of significatif digits is entered. - * added unitary tests for this feature - - -- Georges Khaznadar <georg...@ofset.org> Thu, 25 Aug 2011 15:38:18 +0200 - -units-filter (3.3-3) unstable; urgency=low - - * added missing ";" in unites.y, thanks to Bernadette RIOU's bugreport - - -- Georges Khaznadar <georg...@ofset.org> Thu, 18 Aug 2011 18:31:36 +0200 - -units-filter (3.3-2) unstable; urgency=low - - * modified src/Makefile, thanks to Ilya Barygin's patch. - Closes: #632567 - * simplified the file debian/rules. - * switched to source format 3.0 (quilt). - - -- Georges Khaznadar <georg...@ofset.org> Sun, 03 Jul 2011 21:30:09 +0200 - -units-filter (3.3-1) unstable; urgency=low - - * introduced the type "decimal" which differs from "double" to get rid of - the false digitalization for non-integers. Removed any use of functions - which are based on the type "double". This should definitely close the - bugs related to significative digits. - * updated Standards-Version: 3.9.1 -> 3.9.2 - - -- Georges Khaznadar <georg...@ofset.org> Fri, 24 Jun 2011 18:04:54 +0200 - -units-filter (3.2-1) unstable; urgency=low - - * added as a possibilty to replace the symbol "e" or "E" by "*10^" in - float representation of input numbers. - - -- Georges Khaznadar <georg...@ofset.org> Wed, 02 Mar 2011 21:54:58 +0100 - -units-filter (3.1-2) unstable; urgency=low - - * modified the Makefile, now the invokation of flex can be used even with - older versions of flex. - * upgraded Standards-Version to 3.9.1 - - -- Georges Khaznadar <georg...@ofset.org> Sun, 15 Aug 2010 20:19:50 +0200 - -units-filter (3.1-1) unstable; urgency=low - - * fixed a bug about the output with negative numbers - * fixed a bug about the output with zero numbers - - -- Georges Khaznadar <georg...@ofset.org> Thu, 10 Dec 2009 18:48:32 +0100 - -units-filter (3.0-3) unstable; urgency=low - - * updated lintian and fixed the warning about standards-version - - -- Georges Khaznadar <georg...@ofset.org> Thu, 29 Oct 2009 14:11:08 +0100 - -units-filter (3.0-2) unstable; urgency=low - - * fixed a bug which was not detected by the test suite: the written - output for numbers lesser than 1 was false. Integrated one new test - in the suite. - * modified the routine used to round the numbers. As many examples - made by teachers use integer data, and divisions by 2, rounding - numbers whose mantissa should be 0.5 is not unfrequent. - Unfortunately computations with floats (for example with the - interpreter of Wims) often yelds unprecise results. This may cause - troublesome behaviors, when a mantissa which should be 0.5 is actually - 0.4999999999999998 or so. Therefore, the routine used to round numbers - adds the fraction 1000000001/2000000000 before making a - trucation. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 06 Sep 2009 16:30:16 +0200 - -units-filter (3.0-1) unstable; urgency=low - - * introduced multiprecision calculus, in order to avoid errors when - doing truncations (for exemple when specifying the number of - significant digits) - * recoded sources from latin1 to utf8 - - -- Georges Khaznadar <georg...@ofset.org> Mon, 31 Aug 2009 11:31:43 +0200 - -units-filter (2.9-7) unstable; urgency=low - - * added a dependency on docbook-xsl, thanks to José L. Redrejo - Rodríguez - * replaced some spaces by unbreakable spaces in debian/control - to get rid of a lintian warning about redundancy of the zeros. - - -- Georges Khaznadar <georg...@ofset.org> Tue, 30 Jun 2009 11:40:29 +0200 - -units-filter (2.9-6) unstable; urgency=low - - * updated the compat level, fixed a typo in the file debian/control, - rewritten the manpage with docbook (xml) - - -- Georges Khaznadar <georg...@ofset.org> Sun, 28 Jun 2009 22:59:33 +0200 - -units-filter (2.9-5) unstable; urgency=low - - * modified unites.y and Makefile so it is possible to suppress the - support for UTF8. - * added the profiles of the functions trunc and round to avoid a - warning from gcc and have these functione properly managed. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 15 Jun 2008 23:49:41 +0200 - -units-filter (2.9-4) unstable; urgency=low - - * fixed a segfault bug when the environment variable LC_ALL was not - set. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 16 Dec 2007 20:18:00 +0100 - -units-filter (2.9-3) unstable; urgency=low - - * fixed the definition of eV : it is now a unit of energy (=1.6e-19 J) - * modified the routine to simplify the output of floating numbers. - * now the default behavior with the option -o is to display the unit - given in the input (if it exists). - * modified the test suite accordingly. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 16 Dec 2007 19:43:27 +0100 - -units-filter (2.9-2) unstable; urgency=low - - * fixed a nasty bug which made a segfault when some units were used - - -- Georges Khaznadar <georg...@ofset.org> Fri, 14 Dec 2007 11:24:07 +0100 - -units-filter (2.9-1) unstable; urgency=low - - * Modified the package to make it non-native, as it can be used - outside Debian. - * Added some code to take in account the necessary recoding of some - units for non-ASCII environments, like UTF-8 - - -- Georges Khaznadar <georg...@ofset.org> Wed, 05 Dec 2007 21:54:55 +0100 - -units-filter (2.8) unstable; urgency=low - - * removed the option --strip from the Makefile. - Closes: 438234 - - -- Georges Khaznadar <georg...@ofset.org> Fri, 24 Aug 2007 17:17:34 +0200 - -units-filter (2.7) unstable; urgency=low - - * modified the behavior with the option -o: when then output string - contains e+00, the substring e+00 is erased. - - -- Georges Khaznadar <georg...@ofset.org> Sun, 27 May 2007 17:03:57 +0200 - -units-filter (2.6-1) unstable; urgency=low - - * added a new feature, to consider physical quantities with a given - rate of relative precision: syntax <quantity>~percent, to mean a - physical quantity plus or minus percent % tolerance. The syntax - <quantity>+-percent% is also allowed, which adds some rentrance. - * added a new option switch, -l, to have an output in LaTeX language. - - -- Georges Khaznadar <georg...@ofset.org> Tue, 17 Oct 2006 19:41:28 +0200 - -units-filter (2.5-1) unstable; urgency=low - - * repackaged as a non-native package - Closes: #230993 - - -- Georges Khaznadar <georg...@ofset.org> Sun, 25 Jun 2006 12:59:02 +0200 - -units-filter (2.5) unstable; urgency=low - - * allowed some spaces in the representation of real numbers. - * fixed some issues with strncat in unites.y - * added a syntax for wanted units in the output string - * fixed a bug with non-SI units at a negative power - * fixed a bug with the unit h - - -- Georges Khaznadar <georg...@ofset.org> Thu, 15 Jun 2006 09:30:26 +0200 - -units-filter (2.4) unstable; urgency=low - - * recompiled with the new version of flex, see - http://www.debian.org/security/2006/dsa-1020) - - -- Georges Khaznadar <georg...@ofset.org> Sun, 2 Apr 2006 16:49:55 +0200 - -units-filter (2.3) unstable; urgency=low - - * fixed the canonical output when some significative number of digits is - expected: an automatic rounding is made. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 5 Dec 2004 23:49:26 +0100 - -units-filter (2.2) unstable; urgency=low - - * added the possibility to pass an option via the environment as suggested - by Gang XIAO. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Mon, 29 Nov 2004 00:42:30 +0100 - -units-filter (2.1) unstable; urgency=low - - * added an option to output a simple canonical expression with basic units - of the International System. - * added support for usual units as N, J, W, etc. - * fixed a bug about numbers beginning with a '+' or '-' sign. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 21 Nov 2004 16:58:42 +0100 - -units-filter (2.0) unstable; urgency=low - - * added a syntax to express significative numbers : suffix "#n" - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sat, 20 Nov 2004 22:36:53 +0100 - -units-filter (1.0-3) unstable; urgency=low - - * removed hard dependance on libc6 without release number - Closes: #215949 - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 25 Jan 2004 19:23:07 +0100 - -units-filter (1.0-2) unstable; urgency=low - - * fixed a bug in debian/control : non-ascii character "Mu" is no more used. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Sun, 21 Sep 2003 01:54:38 +0200 - -units-filter (1.0-1) unstable; urgency=low - - * strcpy,strcat => strncpy, strncat : buffers should be secure. - * added "a" (are) unity (1 are = 100 m^2). - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Tue, 23 Jul 2002 19:30:05 +0200 -units-filter (0.9.7-1) unstable; urgency=low - - * Initial Release. - - -- Georges Khaznadar <gekhajof...@netinfo.fr> Tue, 30 Apr 2002 19:41:41 +0200 - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/compat wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/compat --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/compat 2018-04-20 23:22:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/compat 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -10 diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/control wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/control --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/control 2018-04-20 23:22:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/control 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -Source: units-filter -Section: science -Priority: optional -Maintainer: Georges Khaznadar <georg...@debian.org> -Build-Depends: debhelper (>> 10), flex, bison, - libgmp-dev, libfl-dev, librecode-dev -Standards-Version: 4.1.4 -Vcs-Browser: https://salsa.debian.org/georgesk/units-filter -Vcs-Git: https://salsa.debian.org/georgesk/units-filter.git - -Package: units-filter -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Suggests: wims -Description: Parser for expressions concerning physical values - Units-filter is a basic standalone filter written in C language, - flex and bison. It inputs strings like "1.5e3 nN.m.s^-1" (it could - be the time growth ratio of a torque) and outputs the value in - standard SI unit, followed by the physical dimension of this value. - . - example :~/src$ echo 1.5e3 nN.m.s^-1 | units-filter - 1.5e-06 2 1 -3 0 0 0 0 0 0 - . - 2 -3 - which means : 1.5e-06 (SI unit) m .kg.s - . - This parser can be embedded in educational test systems, in order to - analyze a student's answer to a problem of physics or chemistry. - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/copyright wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/copyright --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/copyright 2008-05-28 20:40:30.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/copyright 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -This package was debianized by Georges Khaznadar <georg...@ofset.org> on -Tue, 30 Apr 2002 19:41:41 +0200. - -It was downloaded from ftp://boltz.univ-littoral.fr/pub/units-filter - -Upstream Author: Georges Khaznadar <gekhajof...@netinfo.fr> - -Copyright: - -This software is copyright (c) 2000-02 by Georges Khaznadar - -You are free to distribute this software under the terms of -the GNU General Public License. -On Debian systems, the complete text of the GNU General Public -License can be found in /usr/share/common-licenses/GPL file. - - - diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/docs wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/docs --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/docs 2007-07-16 17:14:10.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/docs 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -README LISEZMOI diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/rules wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/rules --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/rules 2018-04-20 23:22:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/rules 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_HARDENING=1 - -%: - dh $@ diff -Nru wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/source/format wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/source/format --- wims-4.17b+svn13454~dfsg1/wims/src/Misc/units-filter/debian/source/format 2018-04-20 23:22:40.000000000 +0200 +++ wims-4.17b+svn13454~dfsg2/wims/src/Misc/units-filter/debian/source/format 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -3.0 (quilt)