Paste: Attempt at alien

Author: dmpk2k
Mode: factor
Date: Thu, 25 Dec 2008 06:23:45
Plain Text |
USING: alien alien.syntax kernel splitting sequences tools.vocabs io.pathnames namespaces ;

IN: noise-alien

<PRIVATE

<<         

: get-this-file's-dir ( -- path )
  "noise-alien" vocab-files first
  "/" split1-last drop ;

: get-shared-lib-path ( -- path )
  { "/" "noise.dylib" } get-this-file's-dir prefix        
  "" join ;

"noise" get-shared-lib-path "cdecl" add-library 

>>

LIBRARY: noise

FUNCTION: float c_noise ( int a, int b ) ;

PRIVATE>

: noise ( x y -- h )
  c_noise ; inline

New Annotation

Summary:
Author:
Mode:
Body: