/[meta-cvs]/meta-cvs/F-258A1D35AE34AADD34D34F5A328405CC.lisp
ViewVC logotype

Diff of /meta-cvs/F-258A1D35AE34AADD34D34F5A328405CC.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by kaz, Wed Oct 30 09:36:45 2002 UTC revision 1.7 by kaz, Tue Dec 3 07:23:03 2002 UTC
# Line 8  Line 8 
8    (:use :common-lisp)    (:use :common-lisp)
9    (:shadowing-import-from :ffi    (:shadowing-import-from :ffi
10      :def-call-out :def-c-struct :c-array-max :c-pointer :c-ptr :c-string :int      :def-call-out :def-c-struct :c-array-max :c-pointer :c-ptr :c-string :int
11      :uint :ulong :boolean :character)      :uint :ulong :boolean :character :c-array-ptr)
12    (:shadow    (:shadow
13      :open :close)      :open :close)
14    (:intern    (:intern
# Line 30  Line 30 
30      :s-ixusr :s-irwxu :s-irgrp :s-iwgrp :s-ixgrp :s-irwxg :s-iroth      :s-ixusr :s-irwxu :s-irgrp :s-iwgrp :s-ixgrp :s-irwxg :s-iroth
31      :s-iwoth :s-ixoth :s-irwxo :accessperms :deffilemode :o-accmode      :s-iwoth :s-ixoth :s-irwxo :accessperms :deffilemode :o-accmode
32      :o-rdonly :o-wronly :o-rdwr :o-creat :o-excl :o-noctty :o-trunc      :o-rdonly :o-wronly :o-rdwr :o-creat :o-excl :o-noctty :o-trunc
33      :o-append :o-nonblock :o-sync :o-async :o-ndelay :o-fsync :getcwd))      :o-append :o-nonblock :o-sync :o-async :o-ndelay :o-fsync :getcwd
34        :run-program))
35    
36  (in-package :unix-funcs)  (in-package :unix-funcs)
37    
# Line 267  Line 268 
268    
269  ;;;  ;;;
270  ;;; <unistd.h> -- getcwd  ;;; <unistd.h> -- getcwd
271    ;;;
272    
273  (def-c-call-out getcwd  (def-c-call-out getcwd
274    (:name "impl_getcwd")    (:name "impl_getcwd")
# Line 274  Line 276 
276    (:return-type c-string :malloc-free))    (:return-type c-string :malloc-free))
277    
278  ;;;  ;;;
279    ;;; <unistd.h> -- fork, wait*, exec*
280    ;;;
281    
282    (def-c-call-out spawn
283      (:name "impl_spawn")
284      (:arguments (name c-string)
285                  (argv (c-array-ptr c-string) :in :malloc-free))
286      (:return-type int))
287    
288    (defun run-program (name &key arguments)
289      (push name arguments)
290      (spawn name (coerce arguments 'vector)))
291    
292    ;;;
293  ;;; <fcntl.h>  ;;; <fcntl.h>
294  ;;;  ;;;
295    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.5