(uffi:def-function ("atoi" c-atoi)
((str :cstring))
+ :module "c"
:returning :int)
(uffi:def-function ("atol" c-atol)
((str :cstring))
+ :module "c"
:returning :long)
(uffi:def-function ("atof" c-atof)
((str :cstring))
+ :module "c"
:returning :double)
(defun atoi (str)
(uffi:def-function ("cast_test_int" cast-test-int)
()
+ :module "c-uffi-test"
:returning :pointer-void)
(uffi:def-function ("cast_test_float" cast-test-float)
()
+ :module "c-uffi-test"
:returning :pointer-void)
(deftest cast.1
(d :double))
(uffi:def-foreign-var ("fvar_struct" *fvar-struct*) fvar-struct
- "uffi_tests")
+ "c-uffi-tests")
(uffi:def-function ("fvar_struct_int" fvar-struct-int)
()
:returning :int
- :module "uffi_tests")
+ :module "c-uffi-test")
(uffi:def-function ("fvar_struct_double" fvar-struct-double)
()
:returning :double
- :module "uffi_tests")
+ :module "c-uffi-test")
(deftest fvarst.1 *fvar-addend* 3)
(deftest fvarst.2 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 42)
(uffi:def-function ("getenv" c-getenv)
((name :cstring))
+ :module "c"
:returning :cstring)
(uffi:def-function ("setenv" c-setenv)
((name :cstring)
(value :cstring)
(overwrite :int))
+ :module "c"
:returning :int)
(uffi:def-function ("unsetenv" c-unsetenv)
((name :cstring))
+ :module "c"
:returning :void)
(defun my-getenv (key)
(uffi:def-function ("gethostname" c-gethostname)
((name (* :unsigned-char))
(len :int))
+ :module "c"
:returning :int)
(defun gethostname ()
((nptr char-ptr)
(endptr (* char-ptr))
(base :int))
+ :module "c"
:returning :long)
(defun strtol (str &optional (base 10))
(uffi:def-function ("time" c-time)
((time (* time-t)))
+ :module "c"
:returning time-t)
(uffi:def-function "gmtime"
((time (* time-t)))
+ :module "c"
:returning (* tm))
(uffi:def-function "asctime"
((time (* tm)))
+ :module "c"
:returning :cstring)
(uffi:def-type time-t :unsigned-long)
(uffi:def-function ("gettimeofday" c-gettimeofday)
((tv (* timeval))
(tz (* timezone)))
+ :module "c"
:returning :int)
(defun get-utime ()
(uffi:def-function ("cs_to_upper" cs-to-upper)
((input (* :unsigned-char)))
:returning :void
+ :module "uffi-c-test"
)
(defun string-to-upper (str)
(uffi:def-function ("cs_count_upper" cs-count-upper)
((input :cstring))
- :returning :int)
+ :returning :int
+ :module "uffi-c-test")
(defun string-count-upper (str)
(uffi:with-cstring (str-cstring str)
(uffi:def-function ("half_double_vector" half-double-vector)
((size :int)
(vec (* :double)))
- :returning :void)
+ :returning :void
+ :module "uffi-c-test")
(uffi:def-function ("return_long_negative_one" return-long-negative-one)
()
- :returning :long)
+ :returning :long
+ :module "uffi-c-test")
(uffi:def-function ("return_int_negative_one" return-int-negative-one)
()
- :returning :int)
+ :returning :int
+ :module "uffi-c-test")
(uffi:def-function ("return_short_negative_one" return-short-negative-one)
()
- :returning :short)
+ :returning :short
+ :module "uffi-c-test")
+
(uffi:def-constant +double-vec-length+ 10)
(defun test-half-double-vector ()