gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] elf loader for gcl


From: Michael Koehne
Subject: [Gcl-devel] elf loader for gcl
Date: Sun, 14 Sep 2003 03:43:56 +0200
User-agent: Mutt/1.3.28i

Moin Guru's,

  the XgclGL-0.15 [1] now contains an elf loader, not yet used for
  loading the X and GL bindings, but only for a smaller example from
  libm, called elf-test.lsp, looking like the following :

(import '( elf::use-lib elf::use-sym ) 'USER)
(use-lib 'libm "libm.so.6")
(defCfun "double call_d1d(int prt, double rad)" 0
  "double (*callptr)(double); callptr=prt; return ( (*callptr)(rad) );" )
(defentry call-d1d (int double) (double call_d1d))
(defun dyn-sin (rad) (call-d1d (use-sym 'libm '|sin|) rad))
(defun dyn-cos (rad) (call-d1d (use-sym 'libm '|cos|) rad))
(defun dyn-tan (rad) (call-d1d (use-sym 'libm '|tan|) rad))
(defun dyn-asin (rad) (call-d1d (use-sym 'libm '|asin|) rad))
(defun dyn-acos (rad) (call-d1d (use-sym 'libm '|acos|) rad))
(defun dyn-atan (rad) (call-d1d (use-sym 'libm '|atan|) rad))

  I can (compile-file "elf-test") and (load "elf-test") and even call
  (elf::save-system "elf-test") to produce new a working binary!

Bye Michael

[1] : http://www.copyleft.de/lisp/ -> XgclGL
-- 
  mailto:address@hidden             UNA:+.? 'CED+2+:::Linux:2.4.18'UNZ+1'
  http://www.xml-edifact.org/           CETERUM CENSEO WINDOWS ESSE DELENDAM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]