Changeset 6984 in project


Ignore:
Timestamp:
12/01/07 09:11:53 (13 years ago)
Author:
Ivan Raikov
Message:

removed dependence on easyffi

Location:
random-swb/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • random-swb/trunk/random-swb.meta

    r4978 r6984  
    1616 ; A list of eggs random-swb depends on.
    1717
    18  (needs testeez eggdoc easyffi)
     18 (needs eggdoc)
    1919
    2020 (eggdoc "random-swb-eggdoc.scm")
  • random-swb/trunk/random-swb.scm

    r4878 r6984  
    5454
    5555
    56 ; Parse & embed
    57 #>!
    58   unsigned int minus (unsigned int x, unsigned int y, int b);
     56#>
     57  unsigned int cminus (unsigned int x, unsigned int y, int b)
     58  {
     59     if (b > 0)
     60     {
     61      return x-y-1;
     62      }
     63     else
     64     {
     65      return x-y;
     66      }
     67  }
    5968<#
     69
     70(define cminus (foreign-lambda int "cminus" int int int))
     71
    6072
    6173
     
    122134    (let ((x (u32vector-ref seeds ix))
    123135          (y (u32vector-ref seeds iy)))
    124       (let ((z (minus x y (if b 1 0))))
     136      (let ((z (cminus x y (if b 1 0))))
    125137        (u32vector-set! seeds iy z)
    126138        (if b (fx>= y x) (fx> y x)))))
     
    257269         
    258270         
    259 
    260 ; Include into generated code, but don't parse:
    261 #>
    262   unsigned int minus (unsigned int x, unsigned int y, int b)
    263   {
    264      if (b > 0)
    265      {
    266       return x-y-1;
    267       }
    268      else
    269      {
    270       return x-y;
    271       }
    272   }
    273 <#
Note: See TracChangeset for help on using the changeset viewer.