Mercurial > hg > xemacs-beta
comparison lisp/efs/efs-cu.el @ 40:7e54bd776075 r19-15b103
Import from CVS: tag r19-15b103
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:54:25 +0200 |
parents | 4103f0995bd7 |
children | 8b8b7f3559a2 |
comparison
equal
deleted
inserted
replaced
39:06f275776fba | 40:7e54bd776075 |
---|---|
24 | 24 |
25 ;;;; ------------------------------------------------------------ | 25 ;;;; ------------------------------------------------------------ |
26 ;;;; Use configuration variables. | 26 ;;;; Use configuration variables. |
27 ;;;; ------------------------------------------------------------ | 27 ;;;; ------------------------------------------------------------ |
28 | 28 |
29 (defvar efs-default-user nil | 29 (defvar efs-default-user "anonymous" |
30 "*User name to use when none is specied in a pathname. | 30 "*User name to use when none is specied in a pathname. |
31 | 31 |
32 If a string, than this string is used as the default user name. | 32 If a string, than this string is used as the default user name. |
33 If nil, then the name under which the user is logged in is used. | 33 If nil, then the name under which the user is logged in is used. |
34 If t, then the user is prompted for a name. | 34 If t, then the user is prompted for a name. |
84 | 84 |
85 (defvar efs-path-host-format | 85 (defvar efs-path-host-format |
86 (substring efs-path-user-at-host-format 3) | 86 (substring efs-path-user-at-host-format 3) |
87 "Format to return `host:' strings for completion in root directory.") | 87 "Format to return `host:' strings for completion in root directory.") |
88 | 88 |
89 ;;;###autoload | |
89 (defvar efs-path-root-regexp "^/[^/:]+:" | 90 (defvar efs-path-root-regexp "^/[^/:]+:" |
90 "Regexp to match the `/user@host:' root of an efs full path.") | 91 "Regexp to match the `/user@host:' root of an efs full path.") |
91 | 92 |
92 (defvar efs-path-root-short-circuit-regexp "//[^/:]+:") | 93 (defvar efs-path-root-short-circuit-regexp "//[^/:]+:") |
93 ;; Regexp to match an efs user@host root, which short-circuits | 94 ;; Regexp to match an efs user@host root, which short-circuits |
617 (setq efs-passwd-seed (+ 1 (random 255))))) | 618 (setq efs-passwd-seed (+ 1 (random 255))))) |
618 | 619 |
619 (defun efs-code-string (string) | 620 (defun efs-code-string (string) |
620 ;; Encode a string, using `efs-passwd-seed'. This is nil-potent, | 621 ;; Encode a string, using `efs-passwd-seed'. This is nil-potent, |
621 ;; meaning applying it twice decodes. | 622 ;; meaning applying it twice decodes. |
622 (if (and (fboundp 'int-char) (fboundp 'char-int)) | 623 (if (and (fboundp 'int-to-char) (fboundp 'char-to-int)) |
623 (mapconcat | 624 (mapconcat |
624 (function | 625 (function |
625 (lambda (c) | 626 (lambda (c) |
626 (char-to-string | 627 (char-to-string |
627 (int-char (logxor (efs-get-passwd-seed) (char-int c)))))) | 628 (int-to-char (logxor (efs-get-passwd-seed) (char-to-int c)))))) |
628 string "") | 629 string "") |
629 (mapconcat | 630 (mapconcat |
630 (function | 631 (function |
631 (lambda (c) | 632 (lambda (c) |
632 (char-to-string (logxor (efs-get-passwd-seed) c)))) | 633 (char-to-string (logxor (efs-get-passwd-seed) c)))) |