r44784 - in /packages/xmds/trunk/debian: changelog patches/series patches/short-circuit-operator.diff

rlaboiss-guest at users.alioth.debian.org rlaboiss-guest at users.alioth.debian.org
Mon May 14 16:33:57 UTC 2012


Author: rlaboiss-guest
Date: Mon May 14 16:33:56 2012
New Revision: 44784

URL: http://svn.debian.org/wsvn/debian-science/?sc=1&rev=44784
Log:
Add patch for fixing Matlab-style short-circuit boolean operators

Added:
    packages/xmds/trunk/debian/patches/short-circuit-operator.diff
Modified:
    packages/xmds/trunk/debian/changelog
    packages/xmds/trunk/debian/patches/series

Modified: packages/xmds/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-science/packages/xmds/trunk/debian/changelog?rev=44784&op=diff
==============================================================================
--- packages/xmds/trunk/debian/changelog (original)
+++ packages/xmds/trunk/debian/changelog Mon May 14 16:33:56 2012
@@ -9,6 +9,7 @@
     + Install the Octave support file into a separate directory for xmds
   * debian/source/format: 3.0 (quilt)
   * Add DEP3-compliant headers to the patches
+  * debian/patches/short-circuit-operator.diff: New patch
 
  -- Rafael Laboissiere <rafael at laboissiere.net>  Mon, 14 May 2012 13:13:23 +0200
 

Modified: packages/xmds/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-science/packages/xmds/trunk/debian/patches/series?rev=44784&op=diff
==============================================================================
--- packages/xmds/trunk/debian/patches/series (original)
+++ packages/xmds/trunk/debian/patches/series Mon May 14 16:33:56 2012
@@ -1,2 +1,3 @@
 xmds-compile.diff
 const-warning.diff
+short-circuit-operator.diff

Added: packages/xmds/trunk/debian/patches/short-circuit-operator.diff
URL: http://svn.debian.org/wsvn/debian-science/packages/xmds/trunk/debian/patches/short-circuit-operator.diff?rev=44784&op=file
==============================================================================
--- packages/xmds/trunk/debian/patches/short-circuit-operator.diff (added)
+++ packages/xmds/trunk/debian/patches/short-circuit-operator.diff Mon May 14 16:33:56 2012
@@ -1,0 +1,55 @@
+Description: Fix Matlab-style short-circuit boolean operators
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Last-Update: 2012-05-14
+
+--- xmds-1.6.6.orig/source/loadxsil.m
++++ xmds-1.6.6/source/loadxsil.m
+@@ -73,21 +73,21 @@ while 1
+     % look for format="binary" on same line as <output
+     outputFound = findstr(line, '<output');
+     indStart = findstr(line, 'format="binary"');
+-    if (~isempty(outputFound) & ~isempty(indStart) & binaryFound == 0)
++    if (~isempty(outputFound) && ~isempty(indStart) && binaryFound == 0)
+       binaryFound = 1;
+       useBinary = 1;
+     end
+     
+     % look for precision="single"  (double is the default)
+     indStart = findstr(line, 'precision="single"');
+-    if (~isempty(outputFound) & ~isempty(indStart) & singleFound == 0)
++    if (~isempty(outputFound) && ~isempty(indStart) && singleFound == 0)
+       singleFound = 1;
+       useDouble = 0;  % use single precision
+     end
+ 
+     % look for <samples> tag, and work out how many moment groups there are
+     % and their parameters (ie 1 or 0)
+-    if (~isempty(findstr(line, '<samples>')) & samplesFound ==0)
++    if (~isempty(findstr(line, '<samples>')) && samplesFound ==0)
+       samplesFound = 1;
+       indStart = findstr(line, '<samples>');
+       indEnd = findstr(line, '</samples>');
+@@ -108,12 +108,12 @@ while 1
+   % ok, if we got this far, then we must make some assumptions
+   % if binary_output isn't set then assume it's text
+   % if use_double isn't set then assume it's double   
+-  if (findstr(line, '<XSIL') & binaryFound == 0)
++  if (findstr(line, '<XSIL') && binaryFound == 0)
+     disp('using ascii output for xsil file')
+     useBinary = 0;
+   end    
+   
+-  if (findstr(line, '<XSIL') & singleFound == 0 & binaryFound == 1)
++  if (findstr(line, '<XSIL') && singleFound == 0 && binaryFound == 1)
+     disp('using double output for binary file')
+     useDouble = 1;
+   end
+@@ -171,7 +171,7 @@ while 1
+     % now grab the next line, it *should* be a <Stream tag with the word
+     % "Text" in it somewhere
+     line = fgetl(fp);
+-    if (findstr(line, '<Stream>') & findstr(line, '"Text"'))
++    if (findstr(line, '<Stream>') && findstr(line, '"Text"'))
+       % now, this line should be the variables, space delimited
+       line = fgetl(fp);
+       inds = findstr(line, ' ');




More information about the debian-science-commits mailing list