[Pkg-octave-commit] r2565 - in octave-epstk/trunk/debian: . patches

Rafael Laboissiere rafael at alioth.debian.org
Wed Dec 17 22:18:14 UTC 2008


Author: rafael
Date: 2008-12-17 22:18:14 +0000 (Wed, 17 Dec 2008)
New Revision: 2565

Added:
   octave-epstk/trunk/debian/patches/modern-str-functions
Modified:
   octave-epstk/trunk/debian/changelog
   octave-epstk/trunk/debian/patches/series
Log:
Use char() and ischar() instead of the deprecated setstr() and isstr()


Modified: octave-epstk/trunk/debian/changelog
===================================================================
--- octave-epstk/trunk/debian/changelog	2008-12-17 22:14:59 UTC (rev 2564)
+++ octave-epstk/trunk/debian/changelog	2008-12-17 22:18:14 UTC (rev 2565)
@@ -15,12 +15,14 @@
     + Move ghostscript and octave3.0-headers from Build-Depends into
       Build-Depends-Indep
    * debian/patches/tickless_axes: Add description
+   * debian/patches/modern-str-functions: Use char() and ischar() instead
+     of the deprecated setstr() and isstr()
 
   [ Thomas Weber ]
   * New patches:
     - update_documentation: update the documentation (closes: #490797)
 
- -- Thomas Weber <thomas.weber.mail at gmail.com>  Mon, 28 Jul 2008 22:39:31 +0200
+ -- Rafael Laboissiere <rafael at debian.org>  Wed, 17 Dec 2008 23:25:17 +0100
 
 octave-epstk (2.2-11) unstable; urgency=low
 

Added: octave-epstk/trunk/debian/patches/modern-str-functions
===================================================================
--- octave-epstk/trunk/debian/patches/modern-str-functions	                        (rev 0)
+++ octave-epstk/trunk/debian/patches/modern-str-functions	2008-12-17 22:18:14 UTC (rev 2565)
@@ -0,0 +1,263 @@
+Use char() and ischar() instead of the deprecated setstr() and isstr()
+
+ -- Rafael Laboissiere <rafael at debian.org>  Wed, 17 Dec 2008 23:25:17 +0100
+
+--- a/m/ebbox.m
++++ b/m/ebbox.m
+@@ -42,7 +42,7 @@
+   [data n]=fread(epsFile,inf,'uchar');
+   fclose(epsFile);
+   % get head
+-  head=setstr(data(1:headsize)');
++  head=char(data(1:headsize)');
+   pos=findstr(head,'BoundingBox:');
+   currentBBox=sscanf(head(pos(1)+12:pos(1)+40),'%f',4)';
+   if newBBox>=0
+--- a/m/ebitmap.m
++++ b/m/ebitmap.m
+@@ -95,7 +95,7 @@
+   data=fread(epsFile,headsize,'uchar');
+   fclose(epsFile);
+ 
+-  head=setstr(data');
++  head=char(data');
+   pos=findstr(head,'epsTk');
+   if isempty(pos)
+     pos=findstr(head,'BoundingBox:')+12;
+@@ -117,7 +117,7 @@
+   [data n]=fread(epsFile,inf,'uchar');
+   fclose(epsFile);
+   headsize=500;
+-  head=setstr(data(1:headsize)');
++  head=char(data(1:headsize)');
+   pos=findstr(head,'BoundingBox:')+12;
+   win=sscanf(head(pos(1):pos(1)+40),'%f',4);
+   pos=findstr(head,'translate')+9;
+--- a/m/ecdcover.m
++++ b/m/ecdcover.m
+@@ -143,8 +143,8 @@
+   % table of contents 
+   if ~isempty(content)
+     [textString,tl]=etxtread(content);
+-    cr=setstr(13);
+-    lf=setstr(10);
++    cr=char(13);
++    lf=char(10);
+     tab='#';
+     pos=findstr(textString,cr);
+     textString(pos)=' ';
+--- a/m/edemo9.m
++++ b/m/edemo9.m
+@@ -33,7 +33,7 @@
+ eppmwrit(logoFile,logoImg,logoCM); % save image
+ 
+ %content
+-lf=setstr(10); %linefeed
++lf=char(10); %linefeed
+ contenttext=[
+   'New features:' lf ...
+   '#HTML documentation###'  lf ...
+--- a/m/eimagexy.m
++++ b/m/eimagexy.m
+@@ -6,7 +6,7 @@
+   if (nargin~=7)
+     eusage('eimagexy(epsFile,image,colorMap,x,y,width,height)');
+   end
+-  if isstr(image)
++  if ischar(image)
+     [image,head]=ejpgread(image);
+     n=head(1);rows=head(2);cols=head(3);rgb=head(4); 
+     if rgb
+--- a/m/eimg2shtml.m
++++ b/m/eimg2shtml.m
+@@ -53,7 +53,7 @@
+   b64=evec2b64(imgString);
+   % key
+   identNo=num2str(sum(b64));
+-  key=[setstr(key) identNo];
++  key=[char(key) identNo];
+   % encode image
+   [code checksum]=equisci(b64,key);
+   codeL=length(code);
+--- a/m/eimg2txt.m
++++ b/m/eimg2txt.m
+@@ -18,7 +18,7 @@
+     [image colormap]=ergb2idx(image);
+   end
+ 
+-  txtTab=['NBW8OUGX0woscvx+!~"-,' setstr(39) '`  ']; 
++  txtTab=['NBW8OUGX0woscvx+!~"-,' char(39) '`  ']; 
+   [rows cols]=size(image);
+   lumen=reshape(colormap(image,1)+...
+                 colormap(image,2)+...
+--- a/m/eimgview.m
++++ b/m/eimgview.m
+@@ -46,7 +46,7 @@
+   else
+       einit;
+   end
+-  if isstr(matrix)
++  if ischar(matrix)
+     ejpg2eps(matrix,epsFileName);
+   else 
+     if colorMap(1,1)<0
+--- a/m/einit.m
++++ b/m/einit.m
+@@ -310,7 +310,7 @@
+ eTextAlignment=1; % 1=right 0=center -1=left
+ eTextRotation=0; % in deg
+ eTextLimitWord=' '; % character to limit words
+-eTextLimitPara=setstr(10); % character  to limit paragraphs, setstr(10)=linefeed
++eTextLimitPara=char(10); % character  to limit paragraphs, setstr(10)=linefeed
+ 
+ % text box
+ eTextBoxFeedLine=0;  % mm 0=auto else fix linefeed
+--- a/m/einseps.m
++++ b/m/einseps.m
+@@ -34,7 +34,7 @@
+     [data dl]=fread(epsFile,inf,'uchar');
+     fclose(epsFile);
+     headsize=500;
+-    head=setstr(data(1:headsize)');
++    head=char(data(1:headsize)');
+   
+     % read box
+     pos=findstr(head,'BoundingBox:')+12;
+@@ -42,7 +42,7 @@
+   
+     % delete showpage
+     pos=dl-headsize;
+-    tail=setstr(data(pos:dl)');
++    tail=char(data(pos:dl)');
+     pos2=findstr(tail,'showpage');
+     if ~isempty(pos2)
+       data(pos+pos2(1)-1:pos+pos2(1)+6)=32;
+--- a/m/eplotlg.m
++++ b/m/eplotlg.m
+@@ -14,7 +14,7 @@
+   etextxy(epsFile,x+lineLength+textH,y,0,1,text,textFont,textSize,textColor);
+ 
+   % draw line
+-  if isstr(dash)
++  if ischar(dash)
+     fprintf(epsFile,'currentrgbcolor %1.2f %1.2f %1.2f setrgbcolor\n',...
+             color(1),color(2),color(3));
+     fprintf(epsFile,'%1.2f %1.2f 2 copy translate 0 0 moveto\n',...
+--- a/m/eplot.m
++++ b/m/eplot.m
+@@ -160,7 +160,7 @@
+ 
+       eclip(eFile,ePlotAreaPos(1)*eFac,ePlotAreaPos(2)*eFac,...
+             ePlotAreaWidth*eFac,ePlotAreaHeight*eFac);   
+-      if isstr(dash)
++      if ischar(dash)
+         n=size(xData,2);
+         exyplots(eFile,...
+           ePlotAreaPos(1)*eFac,...
+--- a/m/epolar.m
++++ b/m/epolar.m
+@@ -114,7 +114,7 @@
+               ePolarPlotAreaRadMax*eFac,...
+               ePolarPlotAreaAngStart,...
+               ePolarPlotAreaAngEnd);
+-      if isstr(dash)
++      if ischar(dash)
+         epolplos(eFile,...
+           ePolarPlotAreaCenterPos(1)*eFac,...
+           ePolarPlotAreaCenterPos(2)*eFac,...
+--- a/m/erect.m
++++ b/m/erect.m
+@@ -6,7 +6,7 @@
+     eusage('erect(epsFile,x,y,width,height,lineWidth,color,dash,rotation)');
+   end
+   eglobpar
+-  if (size(dash,1)==1) && ~isstr(dash)
++  if (size(dash,1)==1) && ~ischar(dash)
+     dash=dash*eFac;
+     width=width-lineWidth;
+     height=height-lineWidth;
+--- a/m/escalecl.m
++++ b/m/escalecl.m
+@@ -15,7 +15,7 @@
+   if valueStep==0
+     valueStep=signOfDelta*eticdis(signOfDelta*startEndDiff,nValuesMax);
+   end
+-  if isstr(vForm)
++  if ischar(vForm)
+     valueForm=vForm;
+   else
+     if vForm==0  
+--- a/m/escalepa.m
++++ b/m/escalepa.m
+@@ -21,7 +21,7 @@
+       valueStep=signOfDelta*valueStep;
+     end
+   end
+-  if isstr(vForm)
++  if ischar(vForm)
+     valueForm=vForm;
+   else
+     if vForm==0  
+--- a/m/escalexy.m
++++ b/m/escalexy.m
+@@ -59,7 +59,7 @@
+       valueStep=signOfDelta*valueStep;
+     end
+   end
+-  if isstr(vForm)
++  if ischar(vForm)
+     valueForm=vForm;
+   else
+     if isscalar (vForm) && vForm==0  
+--- a/m/esubeps.m
++++ b/m/esubeps.m
+@@ -26,7 +26,7 @@
+   if epsFile>0
+     head=fread(epsFile,headsize,'uchar');
+     fclose(epsFile);
+-    head=setstr(head');
++    head=char(head');
+     pos=findstr(head,'BoundingBox:')+12;
+     win=sscanf(head(pos(1):pos(1)+40),'%f',4);
+ 
+--- a/m/etxt2shtml.m
++++ b/m/etxt2shtml.m
+@@ -64,7 +64,7 @@
+   cPath=ePath;
+   text=text+0;
+   identNo=num2str(sum(text));
+-  key=[setstr(key) identNo];
++  key=[char(key) identNo];
+   if cipher==0
+     [text checksum]=equisci(text,key);
+     decoderFileName=[cPath 'quisci.inc'];
+--- a/m/etxtlpos.m
++++ b/m/etxtlpos.m
+@@ -36,7 +36,7 @@
+     posStart=[1 pos(1:nLines-1)+ll];
+     posEnd=pos-1;
+     if pos(1)>1
+-      if text(pos(1)-1)==setstr(13)
++      if text(pos(1)-1)==char(13)
+         posEnd=pos-2;
+       end
+     end
+--- a/m/etxtread.m
++++ b/m/etxtread.m
+@@ -17,4 +17,4 @@
+   textFile=fopen(textFileName,'rb');
+   [text textLength]=fread(textFile,inf,'uchar');
+   fclose(textFile);
+-  text=setstr(text');
++  text=char(text');
+--- a/m/ewinsize.m
++++ b/m/ewinsize.m
+@@ -34,7 +34,7 @@
+     [data dl]=fread(epsFile,inf,'uchar');
+     fclose(epsFile);
+     headsize=500;
+-    head=setstr(data(1:headsize)');
++    head=char(data(1:headsize)');
+   
+     % read box
+     pos=findstr(head,'BoundingBox:')+12;

Modified: octave-epstk/trunk/debian/patches/series
===================================================================
--- octave-epstk/trunk/debian/patches/series	2008-12-17 22:14:59 UTC (rev 2564)
+++ octave-epstk/trunk/debian/patches/series	2008-12-17 22:18:14 UTC (rev 2565)
@@ -7,3 +7,4 @@
 plot_whole_line
 tickless_axes
 update_documentation
+modern-str-functions




More information about the Pkg-octave-commit mailing list