[cparse-cvs] CVS cparse

clynbech clynbech at common-lisp.net
Tue Aug 29 20:31:55 UTC 2006


Update of /project/cparse/cvsroot/cparse
In directory clnet:/tmp/cvs-serv2059/cparse

Modified Files:
	uffi-alien.lisp cparse.system ChangeLog 00debug.lisp 
Added Files:
	test4.lisp test3.lisp 
Log Message:
2006-08-29  Christian Lynbech  <christian at defun.dk>

	* test3.lisp: New file.
	* test4.lisp: New file.
	
	* uffi-alien.lisp (*cpp-args-defaults*): Removed "-D_BITS_PTHREADTYPES_H"
	and docstring instead.
	(make-alien-defs): Updated docstring.

	* cparse.system: Added CLC require for UFFI. Changed from defsystem to
	asdf. Added warning for the CMUCL hash fill bug.

	* 00debug.lisp: Added case for uffi-1.5.5 and uffi-1.5.15. 
	Changed from defsystem to asdf.
	(*uffi*): changed to allow quicker switching.


--- /project/cparse/cvsroot/cparse/uffi-alien.lisp	2004/11/24 20:23:58	1.1
+++ /project/cparse/cvsroot/cparse/uffi-alien.lisp	2006/08/29 20:31:54	1.2
@@ -2,7 +2,7 @@
 ;;; Copyright (c) 2001 Timothy Moore
 ;;; All rights reserved.
 ;;;
-;;; Modified 2004 by Christian Lynbech.
+;;; Modified 2004-2006 by Christian Lynbech.
 ;;;
 ;;; Redistribution and use in source and binary forms, with or without
 ;;; modification, are permitted provided that the following conditions
@@ -32,10 +32,16 @@
 (defvar *cpp-args-defaults* '("-D__restrict="
 			      "-D__extension__="
 			      "-D__attribute__(x)="
-			      "-D__const="
-			      ;;CMUCL does not support long long and
-			      ;;the pthreadtypes header file uses it
-			      #+cmu "-D_BITS_PTHREADTYPES_H"))
+			      "-D__const=")
+  "Default arguments given to 'cpp' when preprocessing the supplied file.
+Can be used both to define specific features that are relevant to the file
+being processed and to get rid of stuff that CPARSE does not know how
+to handle such as GCC extensions like __restrict.
+
+Implementation note: 'long long' is not supported by UFFI, so we use backend
+specific translations when they are known.
+One particular troublesome Linux header file is \"pthreadtypes\" which may
+be turned off by adding \"-D_BITS_PTHREADTYPES_H\" to the cpp argument list.")
 
 (defmacro with-temp-file ((file-name
 			   &optional
@@ -94,8 +100,9 @@
 :CPP-ARGS is a list of command-line arguments for the C
 preprocessor (for example, '\(\"-I/usr/X11R6/include\"\)\).
 
-The value of :CPP-ARGS will be added to the value of
-*cpp-args-defaults* unless :NO-CPP-DEFAULTS is non-true.
+:CPP-ARGS is a list of arguments to be given as arguments to the
+CPP call.  Also added as arguments are those of *cpp-args-defaults*
+unless :NO-CPP-DEFAULTS is non-nil.
 
 :EXTRA-CPP-LINES are added to the file passed to the C preprocessor
 and can be used for extra macro definitions, #includes, etc."
--- /project/cparse/cvsroot/cparse/cparse.system	2004/11/24 20:23:58	1.2
+++ /project/cparse/cvsroot/cparse/cparse.system	2006/08/29 20:31:54	1.3
@@ -1,7 +1,7 @@
 ;;; Copyright (c) 2001 Timothy Moore                             -*- lisp -*-
 ;;; All rights reserved.
 ;;;
-;;; Modified 2004 by Christian Lynbech
+;;; Modified 2004, 2006 by Christian Lynbech
 ;;;
 ;;; Redistribution and use in source and binary forms, with or without
 ;;; modification, are permitted provided that the following conditions
@@ -29,6 +29,8 @@
 ;;;
 ;;; CPARSE - library for parsing C header files.
 
+(clc:clc-require :uffi)
+
 ;; Choose one of the supported backends
 (defvar *cparse-backend* (nth 0 '("uffi-alien" "cmu-alien" "acl-alien")))
 
@@ -37,12 +39,15 @@
 
 #+CMU
 ;;; CMUCL 18c and earlier doesn't hash strings with fill pointers correctly.
+;;; The code below checks for the problem and adds 'hash-fill-bug' to features
+;;; in case the implementation has the problem.
 (let ((string-with-fill (make-array 32
 				    :element-type 'base-char
 				    :adjustable t
 				    :fill-pointer 7)))
   (setf (subseq string-with-fill 0) "typedef")
   (unless (= (sxhash string-with-fill) (sxhash "typedef"))
+    (warn "This CMUCL has the 'hash-fill-bug' feature.")
     (pushnew :hash-fill-bug *features*)))
 
 
@@ -51,7 +56,12 @@
 ;;; with whatever kind of system his is most comfortable with.
 
 #+ASDF
-'(to-be-done asdf:defsystem cparse)
+(asdf:defsystem :cparse
+  :serial t
+  :components ((:file "package")
+	       (:file "ctype")
+	       (:file "cparse")
+	       (:file #.*cparse-backend*)))
 
 #+MK-DEFSYSTEM
 (mk:defsystem cparse
--- /project/cparse/cvsroot/cparse/ChangeLog	2004/11/29 20:26:05	1.6
+++ /project/cparse/cvsroot/cparse/ChangeLog	2006/08/29 20:31:54	1.7
@@ -1,3 +1,19 @@
+2006-08-29  Christian Lynbech  <christian at defun.dk>
+
+	* test3.lisp: New file.
+	* test4.lisp: New file.
+	
+	* uffi-alien.lisp (*cpp-args-defaults*): Removed "-D_BITS_PTHREADTYPES_H"
+	and docstring instead.
+	(make-alien-defs): Updated docstring.
+
+	* cparse.system: Added CLC require for UFFI. Changed from defsystem to
+	asdf. Added warning for the CMUCL hash fill bug.
+
+	* 00debug.lisp: Added case for uffi-1.5.5 and uffi-1.5.15. 
+	Changed from defsystem to asdf.
+	(*uffi*): changed to allow quicker switching.
+
 2004-11-29  Christian Lynbech  <christian.lynbech at ericsson.com>
 
 	* 02debug.lisp: New file.
--- /project/cparse/cvsroot/cparse/00debug.lisp	2004/11/24 20:29:32	1.1
+++ /project/cparse/cvsroot/cparse/00debug.lisp	2006/08/29 20:31:54	1.2
@@ -1,6 +1,6 @@
 ;;;; debug.lisp --- various forms usefull when doing debugging.
 
-(defparameter *uffi* '|1.4.30|)
+(defparameter *uffi* (nth 2 '(dist |1.5.5| |1.5.15| cl-home)))
 
 (case *uffi*
   (cl-home (load "../../cl-home/cl-uffi/uffi.asd")
@@ -9,18 +9,25 @@
 	    (asdf:operate 'asdf:load-op :uffi))
   (|1.4.30| (load "../cl-uffi-1.4.30/uffi.asd")
 	    (asdf:operate 'asdf:load-op :uffi))
+  (|1.5.5| (load "../cl-uffi-1.5.5/uffi.asd")
+	    (asdf:operate 'asdf:load-op :uffi))
+  (|1.5.15| (load "../cl-uffi-1.5.15/uffi.asd")
+	    (asdf:operate 'asdf:load-op :uffi))
   (dist (clc:clc-require :uffi)))
 
-(load "/usr/share/common-lisp/source/defsystem/defsystem.lisp")
+;(load "/usr/share/common-lisp/source/defsystem/defsystem.lisp")
 
 (load "cparse.system")
 
 #+nil
 (mk:clean-system :cparse)
 
+#+nil
 (progn
   (mk:compile-system :cparse) (mk:load-system :cparse))
 
+(asdf:operate 'asdf:load-op :cparse)
+
 (defun dotest (&rest files)
   (flet ((test-1 (file)
 	   (let ((ffi (uffi-alien:make-alien-defs file)))

--- /project/cparse/cvsroot/cparse/test4.lisp	2006/08/29 20:31:55	NONE
+++ /project/cparse/cvsroot/cparse/test4.lisp	2006/08/29 20:31:55	1.1
(UNLESS (FIND-PACKAGE :DIR-TEST) (DEFPACKAGE :DIR-TEST (:SHADOW T)))

(IN-PACKAGE :DIR-TEST)

(PROGN
 (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
 (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
 (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
 (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))
 (UFFI:DEF-FOREIGN-TYPE --INTPTR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SOCKLEN-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE U-CHAR :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE U-SHORT :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE U-INT :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE U-LONG :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE QUAD-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE U-QUAD-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
 (UFFI:DEF-FOREIGN-TYPE LOFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE INO-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE DEV-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE GID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE MODE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE NLINK-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE UID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE OFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE PID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE ID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE SSIZE-T :INT)
 (UFFI:DEF-FOREIGN-TYPE DADDR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE CADDR-T (* :CHAR))
 (UFFI:DEF-FOREIGN-TYPE KEY-T :INT)
 (UFFI:DEF-FOREIGN-TYPE TIME-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE CLOCKID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE TIMER-T :INT)
 (UFFI:DEF-FOREIGN-TYPE ULONG :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE USHORT :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE UINT :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE INT8-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT16-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT64-T :INT)
 (UFFI:DEF-FOREIGN-TYPE U-INT8-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE U-INT16-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE U-INT32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE U-INT64-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE REGISTER-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SIG-ATOMIC-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SIGSET-T
                        (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
 (UFFI:DEF-FOREIGN-TYPE SIGSET-T
                        (:STRUCT NIL (--VAL (:ARRAY :UNSIGNED-LONG 32))))
 (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMESPEC (TV-SEC :LONG) (TV-NSEC :LONG)))
 (UFFI:DEF-FOREIGN-TYPE NIL (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))
 (UFFI:DEF-FOREIGN-TYPE SUSECONDS-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --FD-MASK :LONG)
 (UFFI:DEF-FOREIGN-TYPE FD-SET (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32))))
 (UFFI:DEF-FOREIGN-TYPE FD-MASK :LONG)
 (PROGN
  (DECLAIM (INLINE SELECT))
  (UFFI:DEF-FUNCTION "select"
                     ((--NFDS :INT)
                      (--READFDS
                       (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
                      (--WRITEFDS
                       (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
                      (--EXCEPTFDS
                       (* (:STRUCT NIL (--FDS-BITS (:ARRAY :LONG 32)))))
                      (--TIMEOUT
                       (* (:STRUCT TIMEVAL (TV-SEC :LONG) (TV-USEC :LONG)))))
                     :RETURNING
                     :INT))
 (UFFI:DEF-FOREIGN-TYPE BLKCNT-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE FSBLKCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE FSFILCNT-T :UNSIGNED-LONG))
(PROGN
 (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
 (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
 (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
 (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))
 (UFFI:DEF-FOREIGN-TYPE --INTPTR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SOCKLEN-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE dirent
                        (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                         (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                         (D-NAME (:ARRAY :CHAR 256))))
 (UFFI:DEF-ENUM UFFI-ALIEN::ENUM
                ((:DT-UNKNOWN 0) (:DT-FIFO 1) (:DT-CHR 2) (:DT-DIR 4)
                 (:DT-BLK 6) (:DT-REG 8) (:DT-LNK 10) (:DT-SOCK 12)
                 (:DT-WHT 14)))
 (UFFI:DEF-FOREIGN-TYPE DIR (:STRUCT --DIRSTREAM))
 (PROGN
  (DECLAIM (INLINE OPENDIR))
  (UFFI:DEF-FUNCTION "opendir"
                     ((--NAME (* :CHAR)))
                     :RETURNING
                     (* (:STRUCT --DIRSTREAM))))
 (PROGN
  (DECLAIM (INLINE CLOSEDIR))
  (UFFI:DEF-FUNCTION "closedir"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))))
                     :RETURNING
                     :INT))
 (PROGN
  (DECLAIM (INLINE READDIR))
  (UFFI:DEF-FUNCTION "readdir"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))))
                     :RETURNING
                     (*
                      (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                       (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                       (D-NAME (:ARRAY :CHAR 256))))))
 (PROGN
  (DECLAIM (INLINE READDIR-R))
  (UFFI:DEF-FUNCTION "readdir_r"
                     ((--DIRP (* (:STRUCT --DIRSTREAM)))
                      (--ENTRY
                       (*
                        (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                         (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                         (D-NAME (:ARRAY :CHAR 256)))))
                      (--RESULT
                       (*
                        (*
                         (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                          (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                          (D-NAME (:ARRAY :CHAR 256)))))))
                     :RETURNING
                     :INT))
 (PROGN
  (DECLAIM (INLINE REWINDDIR))
  (UFFI:DEF-FUNCTION "rewinddir"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))))
                     :RETURNING
                     :VOID))
 (PROGN
  (DECLAIM (INLINE SEEKDIR))
  (UFFI:DEF-FUNCTION "seekdir"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))) (--POS :LONG))
                     :RETURNING
                     :VOID))
 (PROGN
  (DECLAIM (INLINE TELLDIR))
  (UFFI:DEF-FUNCTION "telldir"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))))
                     :RETURNING
                     :LONG))
 (PROGN
  (DECLAIM (INLINE DIRFD))
  (UFFI:DEF-FUNCTION "dirfd"
                     ((--DIRP (* (:STRUCT --DIRSTREAM))))
                     :RETURNING
                     :INT))
 (PROGN
  (DECLAIM (INLINE SCANDIR))
  (UFFI:DEF-FUNCTION "scandir"
                     ((--DIR (* :CHAR))
                      (--NAMELIST
                       (*
                        (*
                         (*
                          (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                           (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                           (D-NAME (:ARRAY :CHAR 256)))))))
                      (--SELECTOR
                       (*
                        (FUNCTION :INT
                         (NIL
                          (*
                           (:STRUCT DIRENT (D-INO :UNSIGNED-LONG) (D-OFF :LONG)
                            (D-RECLEN :UNSIGNED-SHORT) (D-TYPE :UNSIGNED-CHAR)
                            (D-NAME (:ARRAY :CHAR 256))))))))
                      (--CMP
                       (*
                        (FUNCTION :INT (NIL :POINTER-VOID)
                         (NIL :POINTER-VOID)))))
                     :RETURNING
                     :INT))
 (PROGN
  (DECLAIM (INLINE ALPHASORT))
  (UFFI:DEF-FUNCTION "alphasort"
                     ((|--E1| :POINTER-VOID) (|--E2| :POINTER-VOID))
                     :RETURNING
                     :INT))
 (PROGN
  (DECLAIM (INLINE GETDIRENTRIES))
  (UFFI:DEF-FUNCTION "getdirentries"
                     ((--FD :INT) (--BUF (* :CHAR)) (--NBYTES :UNSIGNED-INT)
                      (--BASEP (* :LONG)))
                     :RETURNING
                     :INT)))
--- /project/cparse/cvsroot/cparse/test3.lisp	2006/08/29 20:31:55	NONE
+++ /project/cparse/cvsroot/cparse/test3.lisp	2006/08/29 20:31:55	1.1
(UNLESS (FIND-PACKAGE :OBEX) (DEFPACKAGE :OBEX (:SHADOW T)))

(IN-PACKAGE :OBEX)

(PROGN
 (UFFI:DEF-FOREIGN-TYPE INT8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE INT16-T :SHORT)
 (UFFI:DEF-FOREIGN-TYPE INT32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE UINT8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE UINT16-T :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE UINT32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE UINT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE INT-LEAST8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE INT-LEAST16-T :SHORT)
 (UFFI:DEF-FOREIGN-TYPE INT-LEAST32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT-LEAST64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE UINT-LEAST8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE UINT-LEAST16-T :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE UINT-LEAST32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE UINT-LEAST64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE INT-FAST8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE INT-FAST16-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT-FAST32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE INT-FAST64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE UINT-FAST8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE UINT-FAST16-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE UINT-FAST32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE UINT-FAST64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE INTPTR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE UINTPTR-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE INTMAX-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE UINTMAX-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE SIZE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-CHAR :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --U-SHORT :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --U-INT :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --U-LONG :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INT8-T :CHAR)
 (UFFI:DEF-FOREIGN-TYPE --UINT8-T :UNSIGNED-CHAR)
 (UFFI:DEF-FOREIGN-TYPE --INT16-T :SHORT)
 (UFFI:DEF-FOREIGN-TYPE --UINT16-T :UNSIGNED-SHORT)
 (UFFI:DEF-FOREIGN-TYPE --INT32-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --UINT32-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --UINT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --QUAD-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --U-QUAD-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --DEV-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --UID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --GID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --INO-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --INO64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --MODE-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --NLINK-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --OFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --OFF64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --PID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --FSID-T (:STRUCT NIL (--VAL (:ARRAY :INT 2))))
 (UFFI:DEF-FOREIGN-TYPE --CLOCK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --RLIM64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --ID-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --TIME-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --USECONDS-T :UNSIGNED-INT)
 (UFFI:DEF-FOREIGN-TYPE --SUSECONDS-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --DADDR-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --SWBLK-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --KEY-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --CLOCKID-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --TIMER-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --BLKSIZE-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --BLKCNT64-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSBLKCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --FSFILCNT64-T :UNSIGNED-LONG)
 (UFFI:DEF-FOREIGN-TYPE --SSIZE-T :INT)
 (UFFI:DEF-FOREIGN-TYPE --LOFF-T :LONG)
 (UFFI:DEF-FOREIGN-TYPE --QADDR-T (* :LONG))
 (UFFI:DEF-FOREIGN-TYPE --CADDR-T (* :CHAR))

[660 lines skipped]



More information about the Cparse-cvs mailing list