/[meta-cvs]/meta-cvs/F-26DCA2B7859BC31F50F2B5ABA0AB6950.lisp
ViewVC logotype

Contents of /meta-cvs/F-26DCA2B7859BC31F50F2B5ABA0AB6950.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations)
Mon Mar 8 06:11:40 2004 UTC (10 years, 1 month ago) by kaz
Branch: MAIN
CVS Tags: mcvs-1-1-0
Changes since 1.5: +0 -5 lines
Revamped loading system. Got rid of require/provide in all
Lisp source files.

* code/mcvs.lisp: New file. Responsible for compiling and loading
everything in the right order.

* code/mcvs-main.lisp: File renamed to main.lisp.

* code/mcvs-package.lisp: File renamed to package.lisp.

* code/system.lisp: File removed.
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 (in-package "META-CVS")
6
7 (defvar *mcvs-editor* nil)
8
9 (defun arglist-to-command-string (arglist)
10 "Convert list of strings, assumed to be an argument vector, into
11 a single command string that can be submitted to a POSIX command
12 interpreter. This requires escaping of all shell meta-characters."
13 (let ((command (make-array '(1024)
14 :element-type 'character
15 :adjustable t
16 :fill-pointer 0)))
17 (dolist (arg arglist command)
18 (dotimes (i (length arg))
19 (let ((ch (char arg i)))
20 (when (find ch #(#\' #\" #\* #\[ #\] #\?
21 #\$ #\{ #\} #\" #\space #\tab
22 #\( #\) #\< #\> #\| #\; #\&))
23 (vector-push-extend #\\ command))
24 (vector-push-extend ch command)))
25 (vector-push-extend #\space command))))
26
27 (defun invoke-editor-on (name)
28 (let ((editor (or *mcvs-editor*
29 (env-lookup "CVSEDITOR")
30 (env-lookup "VISUAL")
31 (env-lookup "EDITOR" "vi"))))
32 (execute-program `(,editor ,name))))

  ViewVC Help
Powered by ViewVC 1.1.5