[BACK]Return to term.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term.c between version 1.224 and 1.227

version 1.224, 2014/07/06 18:51:13 version 1.227, 2014/08/10 23:54:41
Line 15 
Line 15 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
 #ifdef HAVE_CONFIG_H  
 #include "config.h"  #include "config.h"
 #endif  
   
 #include <sys/types.h>  #include <sys/types.h>
   
Line 769  term_vspan(const struct termp *p, const struct roffsu 
Line 767  term_vspan(const struct termp *p, const struct roffsu 
   
         switch (su->unit) {          switch (su->unit) {
         case SCALE_CM:          case SCALE_CM:
                 r = su->scale * 2;                  r = su->scale * 2.0;
                 break;                  break;
         case SCALE_IN:          case SCALE_IN:
                 r = su->scale * 6;                  r = su->scale * 6.0;
                 break;                  break;
         case SCALE_PC:          case SCALE_PC:
                 r = su->scale;                  r = su->scale;
                 break;                  break;
         case SCALE_PT:          case SCALE_PT:
                 r = su->scale / 8;                  r = su->scale / 8.0;
                 break;                  break;
         case SCALE_MM:          case SCALE_MM:
                 r = su->scale / 1000;                  r = su->scale / 1000.0;
                 break;                  break;
         case SCALE_VS:          case SCALE_VS:
                 r = su->scale;                  r = su->scale;
                 break;                  break;
         default:          default:
                 r = su->scale - 1;                  r = su->scale - 1.0;
                 break;                  break;
         }          }
   
         if (r < 0.0)          if (r < 0.0)
                 r = 0.0;                  r = 0.0;
         return((size_t)r);          return((size_t)(r + 0.0005));
 }  }
   
 size_t  size_t
Line 801  term_hspan(const struct termp *p, const struct roffsu 
Line 799  term_hspan(const struct termp *p, const struct roffsu 
 {  {
         double           v;          double           v;
   
         v = ((*p->hspan)(p, su));          v = (*p->hspan)(p, su);
         if (v < 0.0)          if (v < 0.0)
                 v = 0.0;                  v = 0.0;
         return((size_t)v);          return((size_t)(v + 0.0005));
 }  }

Legend:
Removed from v.1.224  
changed lines
  Added in v.1.227

CVSweb