r1520: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 9 Mar 2002 21:19:31 +0000 (21:19 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 9 Mar 2002 21:19:31 +0000 (21:19 +0000)
16 files changed:
ChangeLog
Makefile
doc/ref.sgml
examples/compress.cl
examples/getenv.cl
examples/gethostname.cl
examples/getshells.cl
examples/gettime.cl
examples/strtol.cl
src/routine.cl
tests/compress.cl
tests/getenv.cl
tests/gethostname.cl
tests/getshells.cl
tests/gettime.cl
tests/strtol.cl

index a2afd220b71fbea5f50a4e6267f0f48debf91818..153f535a1aed7870fea06135ae72a4954a80d5c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,3 +3,6 @@
        - Modified def-enum to use uffi:def-constant rather than
        cl:defconstant
        
+9 Mar 2002
+       - Changed def-routine name to def-function
+       - Fixed bug in def-function for Lispworks
index 906fad8331bcfe947d7fadce1c0abf3e57175d07..fdbd5ad2f812e04a7b073e163719dd6e67e5553d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@
 #  Programer:    Kevin M. Rosenberg, M.D.
 #  Date Started: Mar 2002
 #
-#  CVS Id:   $Id: Makefile,v 1.2 2002/03/09 20:32:05 kevin Exp $
+#  CVS Id:   $Id: Makefile,v 1.3 2002/03/09 21:19:31 kevin Exp $
 #
 #  Copyright (c) 2002 by Kevin M. Rosenberg
 #
@@ -41,7 +41,7 @@ realclean: clean
 docs:
        @(cd doc; make dist-doc)
 
-VERSION=0.1.1
+VERSION=0.1.2
 DISTDIR=uffi-${VERSION}
 DIST_TARBALL=${DISTDIR}.tar.gz
 DIST_ZIP=${DISTDIR}.zip
index 549a4eb80eaedfd88b5526d4e7f7b937c4bc1e01..5b783d3482ad5661f729cb1773c835b417f006bd 100644 (file)
     <sect1>
       <title>Routine</title>
       <sect2>
-       <title>def-routine</title>
+       <title>def-function</title>
        <para>
          This macro generates a &c; routine definition.
        </para>
index cf3bec4e90f6fa66f323bf249a203eebd8a90d8b..7787b69939d001a512ecc31684d69426eb93c3e7 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: compress.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: compress.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -32,7 +32,7 @@
 (unless (uffi:load-foreign-library "/usr/lib/libz.so" "zlib" '("c"))
   (warn "Unable to load zlib"))
 
-(uffi:def-routine ("compress" c-compress)
+(uffi:def-function ("compress" c-compress)
     ((dest (* :unsigned-char))
      (destlen (* :long))
      (source :c-string)
index 3a565c282ff5e0fc20fde199a57d19183ba87ab5..335a70f694011010847e5cbea87951e2e76242c6 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: getenv.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: getenv.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -30,7 +30,7 @@
 (in-package :cl-user)
 
 
-(uffi:def-routine ("getenv" c-getenv) 
+(uffi:def-function ("getenv" c-getenv) 
     ((name :c-string))
   :returning :c-string)
 
index 4916ed33a939714ea61b4804a3efa07e0f0842a2..0b3ceda7820c3c3102714acdabf3bd7aa5a82ce8 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: gethostname.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: gethostname.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -32,7 +32,7 @@
 
 ;;; This example is inspired by the example on the CL-Cookbook web site
 
-(uffi:def-routine ("gethostname" c-gethostname) 
+(uffi:def-function ("gethostname" c-gethostname) 
     ((name :c-string)
      (len :int))
   :returning :int)
index 92ecc8bf71b78e493bd90e328fd4be65ac8cec72..58e10202f4b2d53302ac7c15ecfaf1436f35cdb7 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: getshells.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: getshells.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
 (in-package :cl-user)
 
 
-(uffi:def-routine "setusershell"
+(uffi:def-function "setusershell"
     nil
   :returning :void)
 
-(uffi:def-routine "endusershell"
+(uffi:def-function "endusershell"
     nil
   :returning :void)
 
-(uffi:def-routine "getusershell"
+(uffi:def-function "getusershell"
     nil
   :returning :c-string)
 
index a26e57ecc6c6fc1bd607f1ef8bba6d4637393be0..ea71edcd1badab116e7f38a4f12668b287ea4505 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: gettime.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: gettime.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
   (yday :int)
   (isdst :int))
 
-(uffi:def-routine ("time" c-time) 
+(uffi:def-function ("time" c-time) 
     ((time (* time-t)))
   :returning time-t)
 
-(uffi:def-routine ("localtime" c-localtime)
+(uffi:def-function ("localtime" c-localtime)
     ((time (* time-t)))
   :returning (* tm))
 
index 850542223cd606a6659aeb943603c740a43d549d..3655dd0d62a5a226cd9a8b05c6b1df862162e33f 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: strtol.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: strtol.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -35,7 +35,7 @@
 ;; the routine needs to do pointer arithmetic to see how many characters
 ;; were parsed
 
-(uffi:def-routine ("strtol" c-strtol) 
+(uffi:def-function ("strtol" c-strtol) 
     ((nptr (* :char))
      (endptr (* char-ptr))
      (base :int))
index ddbc4db0e9b55b197a9ee47957441becbd4be1f2..9dd7aa40b2cf9ab95fd055282675ec20939410c0 100644 (file)
@@ -2,14 +2,14 @@
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
-;;;; Name:          routine.cl
+;;;; Name:          function.cl
 ;;;; Purpose:       UFFI source to C function defintions
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: routine.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: routine.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of the UFFI. 
 ;;;;
@@ -58,7 +58,7 @@
 
 ;; name is either a string representing foreign name, or a list
 ;; of foreign-name as a string and lisp name as a symbol
-(defmacro def-routine (names args &key module returning)
+(defmacro def-function (names args &key module returning)
   #+(or cmu allegro) (declare (ignore module))
   
   (let* ((result-type (convert-from-uffi-type returning :return))
@@ -80,6 +80,7 @@
     `(fli:define-foreign-function (,lisp-name ,foreign-name :object)
         ,function-args
        ,@(if module (list :module module) (values))
+       :result-type ,result-type
        :calling-convention :cdecl)
     ))
 
index cf3bec4e90f6fa66f323bf249a203eebd8a90d8b..7787b69939d001a512ecc31684d69426eb93c3e7 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: compress.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: compress.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -32,7 +32,7 @@
 (unless (uffi:load-foreign-library "/usr/lib/libz.so" "zlib" '("c"))
   (warn "Unable to load zlib"))
 
-(uffi:def-routine ("compress" c-compress)
+(uffi:def-function ("compress" c-compress)
     ((dest (* :unsigned-char))
      (destlen (* :long))
      (source :c-string)
index 3a565c282ff5e0fc20fde199a57d19183ba87ab5..335a70f694011010847e5cbea87951e2e76242c6 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: getenv.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: getenv.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -30,7 +30,7 @@
 (in-package :cl-user)
 
 
-(uffi:def-routine ("getenv" c-getenv) 
+(uffi:def-function ("getenv" c-getenv) 
     ((name :c-string))
   :returning :c-string)
 
index 4916ed33a939714ea61b4804a3efa07e0f0842a2..0b3ceda7820c3c3102714acdabf3bd7aa5a82ce8 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: gethostname.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: gethostname.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -32,7 +32,7 @@
 
 ;;; This example is inspired by the example on the CL-Cookbook web site
 
-(uffi:def-routine ("gethostname" c-gethostname) 
+(uffi:def-function ("gethostname" c-gethostname) 
     ((name :c-string)
      (len :int))
   :returning :int)
index 92ecc8bf71b78e493bd90e328fd4be65ac8cec72..58e10202f4b2d53302ac7c15ecfaf1436f35cdb7 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: getshells.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: getshells.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
 (in-package :cl-user)
 
 
-(uffi:def-routine "setusershell"
+(uffi:def-function "setusershell"
     nil
   :returning :void)
 
-(uffi:def-routine "endusershell"
+(uffi:def-function "endusershell"
     nil
   :returning :void)
 
-(uffi:def-routine "getusershell"
+(uffi:def-function "getusershell"
     nil
   :returning :c-string)
 
index a26e57ecc6c6fc1bd607f1ef8bba6d4637393be0..ea71edcd1badab116e7f38a4f12668b287ea4505 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: gettime.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: gettime.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
   (yday :int)
   (isdst :int))
 
-(uffi:def-routine ("time" c-time) 
+(uffi:def-function ("time" c-time) 
     ((time (* time-t)))
   :returning time-t)
 
-(uffi:def-routine ("localtime" c-localtime)
+(uffi:def-function ("localtime" c-localtime)
     ((time (* time-t)))
   :returning (* tm))
 
index 850542223cd606a6659aeb943603c740a43d549d..3655dd0d62a5a226cd9a8b05c6b1df862162e33f 100644 (file)
@@ -9,7 +9,7 @@
 ;;;;
 ;;;; Copyright (c) 2002 Kevin M. Rosenberg
 ;;;;
-;;;; $Id: strtol.cl,v 1.1 2002/03/09 19:55:33 kevin Exp $
+;;;; $Id: strtol.cl,v 1.2 2002/03/09 21:19:31 kevin Exp $
 ;;;;
 ;;;; This file is part of UFFI. 
 ;;;;
@@ -35,7 +35,7 @@
 ;; the routine needs to do pointer arithmetic to see how many characters
 ;; were parsed
 
-(uffi:def-routine ("strtol" c-strtol) 
+(uffi:def-function ("strtol" c-strtol) 
     ((nptr (* :char))
      (endptr (* char-ptr))
      (base :int))