/[meta-cvs]/meta-cvs/F-5C4536C98E79EFAD905684B34C8DA41D.lisp
ViewVC logotype

Contents of /meta-cvs/F-5C4536C98E79EFAD905684B34C8DA41D.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sat Oct 12 19:21:16 2002 UTC (11 years, 6 months ago) by kaz
Branch: MAIN
Minor reorganization.

* posix.lisp: File renamed to paths.lisp, module renamed to "paths".
(*editor*): Variable removed.
(arglist-to-command-string, execute-programs-xargs,
invoke-editor-on): Functions removed.

* posix.lisp: New file.
(*editor*): Variable moved here from paths.lisp.
(arglist-to-command-string, invoke-editor-on): Functions moved here
from paths.lisp.

* editor.lisp: New file.
(*argument-limit*): Variable definition moved here.
(execute-programs-xargs): Function moved here from paths.lisp.

* clisp-unix.lisp: Renamed to clisp-posix.lisp.
Requires "posix" module now.
(*argument-limit*): Variable removed.

* system.lisp: Remove references to old clisp-linux module.
Added requires for new paths and execute modules.

* cmucl-unix.lisp (*argument-limit*): Variable definition removed.
1 kaz 1.1 ;;; This source file is part of the Meta-CVS program,
2     ;;; which is distributed under the GNU license.
3     ;;; Copyright 2002 Kaz Kylheku
4    
5     (provide "execute")
6    
7     (defconstant *argument-limit* (* 64 1024))
8    
9     (defun execute-program-xargs (fixed-args &optional extra-args fixed-trail-args)
10     (let* ((fixed-size (reduce #'(lambda (x y)
11     (+ x (length y) 1))
12     (append fixed-args fixed-trail-args)
13     :initial-value 0))
14     (size fixed-size))
15     (if extra-args
16     (let (chopped-arg)
17     (dolist (arg extra-args)
18     (push arg chopped-arg)
19     (when (> (incf size (1+ (length arg))) *argument-limit*)
20     (when (not (execute-program (append fixed-args
21     (nreverse chopped-arg)
22     fixed-trail-args)))
23     (return nil))
24     (setf chopped-arg nil)
25     (setf size fixed-size)))
26     (when chopped-arg
27     (execute-program (append fixed-args (nreverse chopped-arg)
28     fixed-trail-args))))
29     (execute-program fixed-args))))

  ViewVC Help
Powered by ViewVC 1.1.5