Changeset 14477 in project


Ignore:
Timestamp:
04/27/09 15:57:15 (11 years ago)
Author:
Ivan Raikov
Message:

random-swb ported to Chicken 4

Location:
release/4/random-swb
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/random-swb/trunk/random-swb-eggdoc.scm

    r7358 r14477  
    66     (name "swb-random")
    77     (description "A random number generator based on the subtract-with-borrow (SWB) method.")
    8      (author (url "http://chicken.wiki.br/ivan raikov" "Ivan Raikov"))
     8     (author (url "http://chicken.wiki.br/users/ivan-raikov" "Ivan Raikov"))
    99
    1010     (history
     11      (version "1.7" "Ported to Chicken 4")
    1112      (version "1.5" "Bug fix in the setup file")
    1213      (version "1.4" "Removed easyffi dependency")
     
    106107
    107108     (license
    108       "Copyright 2007 Ivan Raikov.
     109      "Copyright 2007-2009 Ivan Raikov.
    109110
    110111This program is free software: you can redistribute it and/or modify
  • release/4/random-swb/trunk/random-swb.meta

    r9305 r14477  
     1;;;; -*- Hen -*-
     2
    13((egg "random-swb.egg") ; This should never change
    24
  • release/4/random-swb/trunk/random-swb.scm

    r6984 r14477  
    1212;;
    1313;;
    14 ;; Copyright 2007 Ivan Raikov
     14;; Copyright 2007-2009 Ivan Raikov.
    1515;;
    1616;; This program is free software: you can redistribute it and/or
     
    2727;; <http://www.gnu.org/licenses/>."))))
    2828
    29 (require-extension srfi-4)
    30 
    31 (define-extension random-swb)
    32 
    33 (declare (export make-swb-random-state
    34                  swb:random!
    35                  swb:random-natural!
    36                  swb:random-real!
    37                  swb:random-range!
    38                  swb:random
    39                  swb:random-natural
    40                  swb:random-real
    41                  swb:random-range))
     29
     30(module random-swb
     31
     32
     33 (make-swb-random-state
     34  swb:random!
     35  swb:random-natural!
     36  swb:random-real!
     37  swb:random-range!
     38  swb:random
     39  swb:random-natural
     40  swb:random-real
     41  swb:random-range)
     42
     43  (import scheme chicken extras srfi-4 matchable)
     44
     45  (require-extension srfi-4 matchable)
    4246
    4347
     
    269273         
    270274         
     275)
  • release/4/random-swb/trunk/random-swb.setup

    r7009 r14477  
    1 
    2 (define has-exports? (string>=? (chicken-version) "2.310"))
     1;;;; -*- Hen -*-
    32
    43(define (dynld-name fn)         
    54  (make-pathname #f fn ##sys#load-dynamic-extension))   
    65
    7 (compile -O2 -d0 -e -s
    8          ,@(if has-exports? '(-check-imports -emit-exports random-swb.exports) '())
    9          random-swb.scm -lchicken -ldl -lm)
     6(compile -O2 -d0 -s random-swb.scm -j random-swb)
     7(compile -O2 -d0 -s random-swb.import.scm)
    108
    119(run (csi -qbs random-swb-eggdoc.scm > random-swb.html))
     
    1715
    1816  ; Files to install for your extension:
    19   `(,(dynld-name "random-swb") "random-swb.html"
    20     ,@(if has-exports? '("random-swb.exports") (list)) )
     17  `(,(dynld-name "random-swb") ,(dynld-name "random-swb.import") "random-swb.html")
    2118
    2219  ; Assoc list with properties for your extension:
    23   '((version 1.5)
     20  '((version 1.7)
    2421    (documentation "random-swb.html")
    25     ,@(if has-exports? `((exports "random-swb.exports")) (list)) ))
     22    ))
    2623
     24
Note: See TracChangeset for help on using the changeset viewer.