<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[114723] trunk/dports/graphics/ocrad</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/114723">114723</a></dd>
<dt>Author</dt> <dd>mww@macports.org</dd>
<dt>Date</dt> <dd>2013-12-14 03:23:15 -0800 (Sat, 14 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>ocrad: version 0.22</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsgraphicsocradPortfile">trunk/dports/graphics/ocrad/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/graphics/ocrad/files/</li>
<li><a href="#trunkdportsgraphicsocradfilespatchcharacter_r11ccdiff">trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchfeats_test0ccdiff">trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchprofileccdiff">trunk/dports/graphics/ocrad/files/patch-profile.cc.diff</a></li>
<li><a href="#trunkdportsgraphicsocradfilespatchtrackccdiff">trunk/dports/graphics/ocrad/files/patch-track.cc.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsgraphicsocradPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/graphics/ocrad/Portfile (114722 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/Portfile        2013-12-14 11:12:00 UTC (rev 114722)
+++ trunk/dports/graphics/ocrad/Portfile        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> PortSystem 1.0
</span><span class="cx"> 
</span><span class="cx"> name                ocrad
</span><del>-version             0.21
</del><ins>+version             0.22
</ins><span class="cx"> categories          graphics
</span><span class="cx"> platforms           darwin
</span><span class="cx"> maintainers         mww
</span><span class="lines">@@ -17,10 +17,16 @@
</span><span class="cx"> 
</span><span class="cx"> homepage            http://www.gnu.org/software/ocrad/ocrad.html
</span><span class="cx"> master_sites        gnu
</span><del>-checksums           md5     83f9eae9d808f9d86c181538d3f64aed \
-                    sha1    857a7e0b671d4216ddf2ec1ec2daf0b21d2a6a64 \
-                    rmd160  9477787f07b35165c1091ce2cf8ad76fba3daea1
</del><ins>+checksums           rmd160  610cd6361b633a1c28b3a5bde252402773483008 \
+                    sha256  d6c9dcbcf4c9cc643edfe5a03cb6125d6c39abe59e83719effb056d63c5198fd
+patchfiles          patch-track.cc.diff patch-profile.cc.diff patch-feats_test0.cc.diff patch-character_r11.cc.diff
</ins><span class="cx"> 
</span><ins>+depends_extract     bin:lzip:lzip
+
+extract.suffix      .tar.lz
+extract.cmd         lzip
+extract.pre_args    &quot;-dc&quot;
+
</ins><span class="cx"> configure.args      CC=${configure.cc} CXX=${configure.cxx} CPPFLAGS=${configure.cppflags} CFLAGS=${configure.cflags} CXXFLAGS=${configure.cxxflags} LDFLAGS=${configure.ldflags}
</span><span class="cx"> 
</span><span class="cx"> test.run            yes
</span></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchcharacter_r11ccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff                                (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-character_r11.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+--- character_r11.cc        2013-06-21 01:35:33.000000000 +0200
++++ character_r11.cc        2013-12-14 12:20:37.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include &lt;cstdio&gt;
+ #include &lt;vector&gt;
+ #include &lt;stdint.h&gt;
++#include &lt;cstdlib&gt;

+ #include &quot;common.h&quot;
+ #include &quot;rectangle.h&quot;
+@@ -229,7 +230,7 @@
+   Features f( b );
+   int top_delta = h.top() - b.top(), bottom_delta = b.bottom() - h.bottom();

+-  if( std::abs( top_delta - bottom_delta ) &lt;= std::max( 2, h.height() / 4 ) ||
++  if( abs( top_delta - bottom_delta ) &lt;= std::max( 2, h.height() / 4 ) ||
+       Ocrad::similar( top_delta, bottom_delta, 40, 2 ) )
+     {                                        // hole is vertically centred
+     int code = f.test_4ADQao( charset, charbox );
+@@ -283,15 +284,15 @@
+   Profile bp( b, Profile::bottom );

+   // Check for 'm' or 'w' with merged serifs
+-  if( 10 * std::abs( h2.vcenter() - h1.vcenter() ) &lt;= b.height() &amp;&amp;
++  if( 10 * abs( h2.vcenter() - h1.vcenter() ) &lt;= b.height() &amp;&amp;
+       h1.is_vcentred_in( b ) &amp;&amp; h2.is_vcentred_in( b ) )
+     {
+     if( ( b.bottom() - h1.bottom() &lt;= h1.top() - b.top() ) &amp;&amp;
+         ( b.bottom() - h2.bottom() &lt;= h2.top() - b.top() ) &amp;&amp; bp.isflats() )
+       { add_guess( 'm', 0 ); return; }

+-    if( 5 * std::abs( h1.bottom() - b.vcenter() ) &lt;= b.height() &amp;&amp;
+-        5 * std::abs( h2.bottom() - b.vcenter() ) &lt;= b.height() &amp;&amp;
++    if( 5 * abs( h1.bottom() - b.vcenter() ) &lt;= b.height() &amp;&amp;
++        5 * abs( h2.bottom() - b.vcenter() ) &lt;= b.height() &amp;&amp;
+         tp.isflats() &amp;&amp; bp.minima() == 2 )
+       { add_guess( 'w', 0 ); return; }
+     return;
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchfeats_test0ccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff                                (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-feats_test0.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,73 @@
</span><ins>+--- feats_test0.cc        2013-06-20 01:19:40.000000000 +0200
++++ feats_test0.cc        2013-12-14 12:19:40.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include &lt;cstdio&gt;
+ #include &lt;vector&gt;
+ #include &lt;stdint.h&gt;
++#include &lt;cstdlib&gt;

+ #include &quot;common.h&quot;
+ #include &quot;rectangle.h&quot;
+@@ -181,14 +182,14 @@
+   const int botmin = b.bottom() - vnoise;
+   if( vbars() == 1 &amp;&amp; vbar(0).width() &gt;= 2 &amp;&amp; 2 * vbar(0).width() &lt; b.width() )
+     {
+-    if( std::abs( vbar(0).hcenter() - b.hcenter() ) &lt;= noise &amp;&amp;
+-        std::abs( (vbar(0).left() - b.left()) - (b.right() - vbar(0).right()) ) &lt;= 2 * noise )
++    if( abs( vbar(0).hcenter() - b.hcenter() ) &lt;= noise &amp;&amp;
++        abs( (vbar(0).left() - b.left()) - (b.right() - vbar(0).right()) ) &lt;= 2 * noise )
+       {
+       if( hbars() == 1 &amp;&amp; 4 * hbar(0).height() &lt;= b.height() )
+         {
+         if( hbar(0).top() &lt;= topmax || hbar(0).bottom() &lt; b.vpos( 15 ) )
+           return 'T';
+-        if( std::abs( hbar(0).vcenter() - b.vcenter() ) &lt;= 1 &amp;&amp;
++        if( abs( hbar(0).vcenter() - b.vcenter() ) &lt;= 1 &amp;&amp;
+             Ocrad::similar( b.height(), b.width(), 50 ) ) return '+';
+         }
+       if( hbars() == 2 &amp;&amp;
+@@ -223,7 +224,7 @@
+         }
+       if( hbars() == 2 &amp;&amp; hbar(1).bottom() &gt;= botmin &amp;&amp;
+           b.height() &gt; b.width() &amp;&amp; hbar(1).width() &gt; hbar(0).width() &amp;&amp;
+-          std::abs( vbar(0).hcenter() - hbar(0).hcenter() ) &lt;= 1 &amp;&amp;
++          abs( vbar(0).hcenter() - hbar(0).hcenter() ) &lt;= 1 &amp;&amp;
+           rp.iminimum() &gt; rp.pos( 70 ) )
+         return 'L';
+       if( hbars() == 1 &amp;&amp; Ocrad::similar( hbar(0).width(), b.width(), 10 ) &amp;&amp;
+@@ -316,7 +317,7 @@
+           if( i &gt; lp.pos( 10 ) &amp;&amp; i &lt; lp.pos( 40 ) ) return '1'; }
+       }
+     }
+-  if( hbars() == 1 &amp;&amp; std::abs( hbar(0).vcenter() - b.vcenter() ) &lt;= 1 &amp;&amp;
++  if( hbars() == 1 &amp;&amp; abs( hbar(0).vcenter() - b.vcenter() ) &lt;= 1 &amp;&amp;
+       Ocrad::similar( b.height(), b.width(), 50 ) &amp;&amp;
+       tp.isupit() &amp;&amp; bp.isupit() )
+     return '+';
+@@ -525,7 +526,7 @@
+       int hdiff;
+       if( b.bottom_hook( &amp;hdiff ) )
+         {
+-        if( std::abs( hdiff ) &lt;= b.height() / 8 )
++        if( abs( hdiff ) &lt;= b.height() / 8 )
+           {
+           if( segments_in_row( b.vpos( 30 ) ) &gt;= 3 ) return 'v';
+           if( bp.isconvex() )
+@@ -601,7 +602,7 @@
+         if( ( vbars() &lt;= 2 || ( vbars() == 3 &amp;&amp; b.height() &gt;= b.width() ) ) &amp;&amp;
+             tp.minima( b.height() / 2 ) &lt;= 2 &amp;&amp;
+             tp.minima( ( 2 * b.height() ) / 5 ) &lt;= 2 &amp;&amp; !lp.istpit() &amp;&amp;
+-            4 * std::abs( rp[rp.pos(20)] - rp[rp.pos(80)] ) &lt;= b.width() )
++            4 * abs( rp[rp.pos(20)] - rp[rp.pos(80)] ) &lt;= b.width() )
+           {
+           const int row = b.top() + tp[tp.pos(50)];
+           if( row &gt; b.vcenter() )
+@@ -855,7 +856,7 @@
+         if( b.get_bit( b.top() + i, b.left() + i ) ) ++d;
+         if( b.get_bit( b.top() + i, b.right() - i ) ) --d;
+         }
+-      if( 2 * std::abs( d ) &gt;= n - 1 ) return 0;
++      if( 2 * abs( d ) &gt;= n - 1 ) return 0;
+       }
+     if( ( !porosity &amp;&amp; inner_area * 100 &gt;= inner_size * 75 ) ||
+         ( b.width() &gt;= 7 &amp;&amp; b.height() &gt;= 7 &amp;&amp;
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchprofileccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-profile.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-profile.cc.diff                                (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-profile.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+--- profile.cc        2013-06-20 12:39:37.000000000 +0200
++++ profile.cc        2013-12-14 12:18:36.000000000 +0100
+@@ -20,6 +20,7 @@
+ #include &lt;cstdio&gt;
+ #include &lt;vector&gt;
+ #include &lt;stdint.h&gt;
++#include &lt;cstdlib&gt;

+ #include &quot;common.h&quot;
+ #include &quot;rectangle.h&quot;
+@@ -251,7 +252,7 @@
+         { if( data[i] &lt;= noise ) continue; else return isconvex_; }
+       int d = data[i] - data[i-1];
+       if( d == 0 ) continue;
+-      if( d &gt; dmax ) { if( std::abs( d ) &lt;= noise ) ++dmax; else dmax = d; }
++      if( d &gt; dmax ) { if( abs( d ) &lt;= noise ) ++dmax; else dmax = d; }
+       else if( d &lt; dmax - noise ) return isconvex_;
+       }
+     if( 2 * ( min_end - min_begin + 1 ) &lt; samples() )
+@@ -616,7 +617,7 @@
+   for( int i = 0; i &lt; samples(); ++i )
+     {
+     int y = ( dx * yl ) + ( ( i - xl ) * dy );
+-    int d = std::abs( ( dx * data[i] ) - y );
++    int d = abs( ( dx * data[i] ) - y );
+     if( d &gt;= dmax &amp;&amp; ( ( dx * data[i] ) &lt; y || ( i &gt;= xl &amp;&amp; i &lt;= xr ) ) )
+       if( d &gt; dmax || ( d == dmax &amp;&amp; --faults &lt; 0 ) ) return false;
+     }
</ins></span></pre></div>
<a id="trunkdportsgraphicsocradfilespatchtrackccdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/graphics/ocrad/files/patch-track.cc.diff (0 => 114723)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/graphics/ocrad/files/patch-track.cc.diff                                (rev 0)
+++ trunk/dports/graphics/ocrad/files/patch-track.cc.diff        2013-12-14 11:23:15 UTC (rev 114723)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+--- track.cc        2013-03-24 18:51:08.000000000 +0100
++++ track.cc        2013-12-14 12:15:57.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include &lt;algorithm&gt;
+ #include &lt;cstdio&gt;
+ #include &lt;vector&gt;
++#include &lt;cstdlib&gt;

+ #include &quot;common.h&quot;
+ #include &quot;rectangle.h&quot;
+@@ -43,12 +44,12 @@
+       {
+       if( 9 * r1.height() &lt;= 10 * mean_height &amp;&amp;
+           9 * r2.height() &lt;= 10 * mean_height &amp;&amp;
+-          10 * std::abs( r1.bottom() - r2.bottom() ) &lt;= mean_height )
++          10 * abs( r1.bottom() - r2.bottom() ) &lt;= mean_height )
+         { val = 0; return ( r1.height() &lt;= r2.height() ) ? 0 : 1; }
+-      if( val &gt; 1 &amp;&amp; 10 * std::abs( r1.vcenter() - r2.vcenter() ) &lt;= mean_height )
++      if( val &gt; 1 &amp;&amp; 10 * abs( r1.vcenter() - r2.vcenter() ) &lt;= mean_height )
+         { val = 1; return ( r1.bottom() &lt;= r2.bottom() ) ? 0 : 1; }
+       }
+-    if( val &gt; 2 &amp;&amp; 10 * std::abs( r1.vcenter() - r2.vcenter() ) &lt;= mean_height )
++    if( val &gt; 2 &amp;&amp; 10 * abs( r1.vcenter() - r2.vcenter() ) &lt;= mean_height )
+       { val = 2; return ( r1.bottom() &lt;= r2.bottom() ) ? 0 : 1; }
+     }
+   return -1;
</ins></span></pre>
</div>
</div>

</body>
</html>