annotate lisp/efs/efs-plan9.el @ 114:8619ce7e4c50 r20-1b9

Import from CVS: tag r20-1b9
author cvs
date Mon, 13 Aug 2007 09:21:54 +0200
parents 8fc7fe29b841
children 9f59509498e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
1 ;; -*-Emacs-Lisp-*-
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
3 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
4 ;; File: efs-plan9.el
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
5 ;; Release: $efs release: 1.15 $
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 22
diff changeset
6 ;; Version: $Revision: 1.2 $
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
7 ;; RCS:
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
8 ;; Description: efs support for the Plan 9 FTP Server
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
9 ;; Author: Sandy Rutherford <sandy@ibm550.sissa.it>
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
10 ;; Created: Sat Jan 22 21:26:06 1994 by sandy on ibm550
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
11 ;; Modified: Sun Nov 27 18:41:05 1994 by sandy on gandalf
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
12 ;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
14
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
15 ;;; This file is part of efs. See efs.el for copyright
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
16 ;;; (it's copylefted) and warrranty (there isn't one) information.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
17
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
18 ;;; Works for the plan 9 server plan9.att.com. Plan 9 is an
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
19 ;;; AT&T operating system that is similar to unix.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
20
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
21 (provide 'efs-plan9)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
22 (require 'efs)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
23
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
24 (defconst efs-plan9-version
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
25 (concat (substring "$efs release: 1.15 $" 14 -2)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
26 "/"
114
8619ce7e4c50 Import from CVS: tag r20-1b9
cvs
parents: 22
diff changeset
27 (substring "$Revision: 1.2 $" 11 -2)))
22
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
28
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
29 (efs-defun efs-fix-dir-path plan9 (dir-path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
30 ;; Convert DIR-PATH from UN*X-ish to Plan 9. Does nothing actually.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
31 ;; Avoids appending the "." that we do in unix.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
32 dir-path)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
33
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
34 (efs-defun efs-allow-child-lookup plan9 (host user dir file)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
35 ;; Returns t if FILE in directory DIR could possibly be a subdir
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
36 ;; according to its file-name syntax, and therefore a child listing should
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
37 ;; be attempted.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
38 ;; Relies on the fact that directories can't have extensions in plan9,
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
39 ;; I think.
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
40 (and (not (and (string-equal dir "/") (string-equal file ".")))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
41 (progn
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
42 ;; Makes sure that this is cached, before cd'ing
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
43 (efs-expand-tilde "~" 'plan9 host user)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
44 (efs-raw-send-cd host user
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
45 (if (string-equal file ".")
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
46 (efs-internal-file-name-nondirectory
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
47 dir)
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
48 (concat dir file))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
49 t))))
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
50
8fc7fe29b841 Import from CVS: tag r19-15b94
cvs
parents:
diff changeset
51 ;;; end of efs-plan9.el