[closure-cvs] CVS closure/src/glisp
dlichteblau
dlichteblau at common-lisp.net
Tue Jan 2 12:43:09 UTC 2007
Update of /project/closure/cvsroot/closure/src/glisp
In directory clnet:/tmp/cvs-serv13051/src/glisp
Modified Files:
dep-acl.lisp dep-clisp.lisp dep-cmucl.lisp dep-scl.lisp
Log Message:
Removed some unused definitions from glisp.
Also, versions of CLISP old enough to lack define-compiler-macro won't run
McCLIM anyway.
GCL left unchanged.
--- /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp 2006/12/31 15:42:40 1.4
+++ /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp 2007/01/02 12:43:08 1.5
@@ -37,7 +37,6 @@
(defun glisp::read-char-sequence (&rest ap)
(apply #'read-sequence ap))
-#+ALLEGRO-V5.0
(defun glisp::open-inet-socket (hostname port)
(values
(socket:make-socket :remote-host hostname
@@ -45,20 +44,6 @@
:format :binary)
:byte))
-#-ALLEGRO-V5.0
-(defun glisp::open-inet-socket (hostname port)
- (values
- (ipc:open-network-stream :host hostname
- :port port
- :element-type '(unsigned-byte 8)
- :class 'EXCL::BIDIRECTIONAL-BINARY-SOCKET-STREAM)
- :byte))
-
-#||
-(defun glisp::make-server-socket (port &key (element-type '(unsigned-byte 8)))
-)
-||#
-
(defmacro glisp::with-timeout ((&rest options) &body body)
`(mp:with-timeout ,options . ,body))
--- /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp 2006/12/31 15:42:40 1.4
+++ /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp 2007/01/02 12:43:08 1.5
@@ -28,38 +28,16 @@
(in-package :CL-USER)
-(eval-when (compile load eval)
- (if (fboundp 'cl::define-compiler-macro)
- (pushnew 'define-compiler-macro *features*)))
-
(setq lisp:*load-paths* '(#P"./"))
(import 'lisp:read-byte-sequence :glisp)
(export 'lisp:read-byte-sequence :glisp)
(import 'lisp:read-char-sequence :glisp)
(export 'lisp:read-char-sequence :glisp)
-(export 'glisp::compile-file :glisp)
(export 'glisp::run-unix-shell-command :glisp)
(export 'glisp::make-server-socket :glisp)
-#||
-(export 'glisp::read-byte-sequence :glisp)
-(defun glisp::read-byte-sequence (sequence input &key (start 0) (end (length sequence)))
- (let (c (i start))
- (loop
- (cond ((= i end) (return i)))
- (setq c (read-byte input nil :eof))
- (cond ((eql c :eof) (return i)))
- (setf (aref sequence i) c)
- (incf i) )))
-||#
-
-
-(defun glisp::compile-file (&rest ap)
- (and (apply #'compile-file ap)
- (apply #'compile-file-pathname ap)))
-
(defmacro glisp::with-timeout ((&rest ignore) &body body)
(declare (ignore ignore))
`(progn
@@ -94,32 +72,6 @@
(defun glisp:run-unix-shell-command (command)
(lisp:shell command))
-#+DEFINE-COMPILER-MACRO
-(cl:define-compiler-macro ldb (bytespec value &whole whole)
- (let (pos size)
- (cond ((and (consp bytespec)
- (= (length bytespec) 3)
- (eq (car bytespec) 'byte)
- (constantp (setq size (second bytespec)))
- (constantp (setq pos (third bytespec))))
- `(logand ,(if (eql pos 0) value `(ash ,value (- ,pos)))
- (1- (ash 1 ,size))))
- (t
- whole))))
-
-#-DEFINE-COMPILER-MACRO
-(progn
- (export 'glisp::define-compiler-macro :glisp)
- (defmacro glisp::define-compiler-macro (name args &body body)
- (declare (ignore args body))
- `(progn
- ',name)))
-
-#||
-(defun xlib:draw-glyph (drawable gcontext x y elt &rest more)
- (apply #'xlib:draw-glyphs drawable gcontext x y (vector elt) more))
-||#
-
(export 'glisp::getenv :glisp)
(defun glisp::getenv (var)
(sys::getenv var))
--- /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp 2006/12/31 15:42:40 1.4
+++ /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp 2007/01/02 12:43:08 1.5
@@ -65,17 +65,6 @@
(t
r))))
-#||
-(defun glisp::read-char-sequence (sequence input &key (start 0) (end (length sequence)))
- (let (c (i start))
- (loop
- (cond ((= i end) (return i)))
- (setq c (read-byte input nil :eof))
- (cond ((eql c :eof) (return i)))
- (setf (aref sequence i) c)
- (incf i) )))
-||#
-
(defmacro glisp::with-timeout ((&rest ignore) &body body)
(declare (ignore ignore))
`(progn
@@ -115,88 +104,10 @@
(defun glisp::close-server-socket (socket)
(unix:unix-close (server-socket-fd socket)))
-;;;;;;
-
(defun glisp::g/make-string (length &rest options)
(apply #'make-array length :element-type 'base-char options))
-
-#||
-
-RUN-PROGRAM is an external symbol in the EXTENSIONS package.
-Function: #<Function RUN-PROGRAM {12E7B79}>
-Function arguments:
- (program args &key (env *environment-list*) (wait t) pty input
- if-input-does-not-exist output (if-output-exists :error) (error :output)
- (if-error-exists :error) status-hook)
-Function documentation:
- Run-program creates a new process and runs the unix progam in the
- file specified by the simple-string program. Args are the standard
- arguments that can be passed to a Unix program, for no arguments
- use NIL (which means just the name of the program is passed as arg 0).
-
- Run program will either return NIL or a PROCESS structure. See the CMU
- Common Lisp Users Manual for details about the PROCESS structure.
-
- The keyword arguments have the following meanings:
- :env -
- An A-LIST mapping keyword environment variables to simple-string
- values.
- :wait -
- If non-NIL (default), wait until the created process finishes. If
- NIL, continue running Lisp until the program finishes.
- :pty -
- Either T, NIL, or a stream. Unless NIL, the subprocess is established
- under a PTY. If :pty is a stream, all output to this pty is sent to
- this stream, otherwise the PROCESS-PTY slot is filled in with a stream
- connected to pty that can read output and write input.
- :input -
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- input for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the input is read from that stream and send to the subprocess. If
- :STREAM, the PROCESS-INPUT slot is filled in with a stream that sends
- its output to the process. Defaults to NIL.
- :if-input-does-not-exist (when :input is the name of a file) -
- can be one of:
- :error - generate an error.
- :create - create an empty file.
- nil (default) - return nil from run-program.
- :output -
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- output for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the output from the process is written to this stream. If
- :STREAM, the PROCESS-OUTPUT slot is filled in with a stream that can
- be read to get the output. Defaults to NIL.
- :if-output-exists (when :input is the name of a file) -
- can be one of:
- :error (default) - generates an error if the file already exists.
- :supersede - output from the program supersedes the file.
- :append - output from the program is appended to the file.
- nil - run-program returns nil without doing anything.
- :error and :if-error-exists -
- Same as :output and :if-output-exists, except that :error can also be
- specified as :output in which case all error output is routed to the
- same place as normal output.
- :status-hook -
- This is a function the system calls whenever the status of the
- process changes. The function takes the process as an argument.
-Its defined argument types are:
- (T T &KEY (:ENV T) (:WAIT T) (:PTY T) (:INPUT T) (:IF-INPUT-DOES-NOT-EXIST T)
- (:OUTPUT T) (:IF-OUTPUT-EXISTS T) (:ERROR T) (:IF-ERROR-EXISTS T)
- (:STATUS-HOOK T))
-Its result type is:
- (OR EXTENSIONS::PROCESS NULL)
-On Wednesday, 7/1/98 12:48:51 pm [-1] it was compiled from:
-target:code/run-program.lisp
- Created: Saturday, 6/20/98 07:13:08 pm [-1]
- Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp,v 1.4 2006/12/31 15:42:40 dlichteblau Exp $
-||#
-
-;; (process-exit-code (run-program "/bin/sh" (list "-c" "ls") :wait t :input nil :output nil))
-
(defun glisp:run-unix-shell-command (command)
(ext:process-exit-code (ext:run-program "/bin/sh" (list "-c" command) :wait t :input nil :output nil)))
--- /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp 2006/12/31 15:42:40 1.2
+++ /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp 2007/01/02 12:43:08 1.3
@@ -62,17 +62,6 @@
(t
r))))
-#||
-(defun glisp::read-char-sequence (sequence input &key (start 0) (end (length sequence)))
- (let (c (i start))
- (loop
- (cond ((= i end) (return i)))
- (setq c (read-byte input nil :eof))
- (cond ((eql c :eof) (return i)))
- (setf (aref sequence i) c)
- (incf i) )))
-||#
-
(defmacro glisp::with-timeout ((&rest ignore) &body body)
(declare (ignore ignore))
`(progn
@@ -91,86 +80,8 @@
(defun glisp::g/make-string (length &rest options)
(apply #'make-array length :element-type 'base-char options))
-#||
-
-RUN-PROGRAM is an external symbol in the EXTENSIONS package.
-Function: #<Function RUN-PROGRAM {12E7B79}>
-Function arguments:
- (program args &key (env *environment-list*) (wait t) pty input
- if-input-does-not-exist output (if-output-exists :error) (error :output)
- (if-error-exists :error) status-hook)
-Function documentation:
- Run-program creates a new process and runs the unix progam in the
- file specified by the simple-string program. Args are the standard
- arguments that can be passed to a Unix program, for no arguments
- use NIL (which means just the name of the program is passed as arg 0).
-
- Run program will either return NIL or a PROCESS structure. See the CMU
- Common Lisp Users Manual for details about the PROCESS structure.
-
- The keyword arguments have the following meanings:
- :env -
- An A-LIST mapping keyword environment variables to simple-string
- values.
- :wait -
- If non-NIL (default), wait until the created process finishes. If
- NIL, continue running Lisp until the program finishes.
- :pty -
- Either T, NIL, or a stream. Unless NIL, the subprocess is established
- under a PTY. If :pty is a stream, all output to this pty is sent to
- this stream, otherwise the PROCESS-PTY slot is filled in with a stream
- connected to pty that can read output and write input.
- :input -
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- input for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the input is read from that stream and send to the subprocess. If
- :STREAM, the PROCESS-INPUT slot is filled in with a stream that sends
- its output to the process. Defaults to NIL.
- :if-input-does-not-exist (when :input is the name of a file) -
- can be one of:
- :error - generate an error.
- :create - create an empty file.
- nil (default) - return nil from run-program.
- :output -
- Either T, NIL, a pathname, a stream, or :STREAM. If T, the standard
- output for the current process is inherited. If NIL, /dev/null
- is used. If a pathname, the file so specified is used. If a stream,
- all the output from the process is written to this stream. If
- :STREAM, the PROCESS-OUTPUT slot is filled in with a stream that can
- be read to get the output. Defaults to NIL.
- :if-output-exists (when :input is the name of a file) -
- can be one of:
- :error (default) - generates an error if the file already exists.
- :supersede - output from the program supersedes the file.
- :append - output from the program is appended to the file.
- nil - run-program returns nil without doing anything.
- :error and :if-error-exists -
- Same as :output and :if-output-exists, except that :error can also be
- specified as :output in which case all error output is routed to the
- same place as normal output.
- :status-hook -
- This is a function the system calls whenever the status of the
- process changes. The function takes the process as an argument.
-Its defined argument types are:
- (T T &KEY (:ENV T) (:WAIT T) (:PTY T) (:INPUT T) (:IF-INPUT-DOES-NOT-EXIST T)
- (:OUTPUT T) (:IF-OUTPUT-EXISTS T) (:ERROR T) (:IF-ERROR-EXISTS T)
- (:STATUS-HOOK T))
-Its result type is:
- (OR EXTENSIONS::PROCESS NULL)
-On Wednesday, 7/1/98 12:48:51 pm [-1] it was compiled from:
-target:code/run-program.lisp
- Created: Saturday, 6/20/98 07:13:08 pm [-1]
- Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp,v 1.2 2006/12/31 15:42:40 dlichteblau Exp $
-||#
-
-;; (process-exit-code (run-program "/bin/sh" (list "-c" "ls") :wait t :input nil :output nil))
-
(defun glisp:run-unix-shell-command (command)
(ext:process-exit-code (ext:run-program "/bin/sh" (list "-c" command) :wait t :input nil :output nil)))
-
-;;; MP
-
(defun glisp::getenv (string)
(cdr (assoc string ext:*environment-list* :test #'string-equal)))
More information about the Closure-cvs
mailing list