/[meta-cvs]/meta-cvs/F-123D61C8FE941733281D2B08C15CD438
ViewVC logotype

Diff of /meta-cvs/F-123D61C8FE941733281D2B08C15CD438

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

revision 1.18 by kaz, Mon Oct 7 02:25:29 2002 UTC revision 1.18.2.6 by kaz, Mon Apr 7 01:24:31 2003 UTC
# Line 10  Line 10 
10    (defconstant *this-dir* ".")    (defconstant *this-dir* ".")
11    (defconstant *path-sep* "/"))    (defconstant *path-sep* "/"))
12    
13  (defvar *editor* nil)  (defvar *mcvs-editor* nil)
14    
15    (defconstant *argument-limit* (* 64 1024))
16    
17  (defun canonicalize-path (path)  (defun canonicalize-path (path)
18  "Simplifies a POSIX path by eliminating . components, splicing out as many ..  "Simplifies a POSIX path by eliminating . components, splicing out as many ..
# Line 112  name, and does not count as the rightmos Line 114  name, and does not count as the rightmos
114             (values (subseq name (1+ pos)) (subseq name 0 pos)))             (values (subseq name (1+ pos)) (subseq name 0 pos)))
115          (t (values nil name))))))          (t (values nil name))))))
116    
117    (declaim (inline path-equal))
118  (defun path-equal (p1 p2)  (defun path-equal (p1 p2)
119    (string= p1 p2))    (string= p1 p2))
 (declaim (inline path-equal))  
120    
121  (defun path-prefix-equal (shorter longer)  (defun path-prefix-equal (shorter longer)
122    (let ((ls (length shorter)) (ll (length longer)))    (let ((ls (length shorter)) (ll (length longer)))
# Line 174  interpreter. This requires escaping of a Line 176  interpreter. This requires escaping of a
176                               :initial-value 0))                               :initial-value 0))
177           (size fixed-size))           (size fixed-size))
178      (if extra-args      (if extra-args
179        (let (chopped-arg)        (let ((chopped-arg ())
180                (combined-status t))
181          (dolist (arg extra-args)          (dolist (arg extra-args)
182            (push arg chopped-arg)            (push arg chopped-arg)
183            (when (> (incf size (1+ (length arg))) *argument-limit*)            (when (> (incf size (1+ (length arg))) *argument-limit*)
184              (when (not (execute-program (append fixed-args              (setf combined-status
185                      (and combined-status
186                           (execute-program (append fixed-args
187                                                  (nreverse chopped-arg)                                                  (nreverse chopped-arg)
188                                                  fixed-trail-args)))                                                  fixed-trail-args))))
               (return nil))  
189              (setf chopped-arg nil)              (setf chopped-arg nil)
190              (setf size fixed-size)))              (setf size fixed-size)))
191          (when chopped-arg          (when chopped-arg
192            (execute-program (append fixed-args (nreverse chopped-arg)            (execute-program (append fixed-args (nreverse chopped-arg)
193                                     fixed-trail-args))))                                     fixed-trail-args)))
194            combined-status)
195        (execute-program fixed-args))))        (execute-program fixed-args))))
196    
197  (defun invoke-editor-on (name)  (defun invoke-editor-on (name)
198    (let ((editor (or *editor* (env-lookup "EDITOR" "vi"))))    (let ((editor (or *mcvs-editor*
199                        (env-lookup "CVSEDITOR")
200                        (env-lookup "VISUAL")
201                        (env-lookup "EDITOR" "vi"))))
202      (execute-program `(,editor ,name))))      (execute-program `(,editor ,name))))

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.18.2.6

  ViewVC Help
Powered by ViewVC 1.1.5